daigram 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (581) hide show
  1. package/LICENSE +661 -0
  2. package/LICENSE-MIT +21 -0
  3. package/NOTICE +11 -0
  4. package/README.md +788 -2
  5. package/assets/fonts/CascadiaCode-Regular.ttf +0 -0
  6. package/assets/fonts/Excalifont-Regular.ttf +0 -0
  7. package/assets/fonts/LICENSES.md +63 -0
  8. package/assets/fonts/LiberationSans-Regular.ttf +0 -0
  9. package/assets/fonts/Virgil-Regular.ttf +0 -0
  10. package/dist/ai/config.d.ts +11 -0
  11. package/dist/ai/config.d.ts.map +1 -0
  12. package/dist/ai/config.js +59 -0
  13. package/dist/ai/config.js.map +1 -0
  14. package/dist/ai/providers/anthropic.d.ts +3 -0
  15. package/dist/ai/providers/anthropic.d.ts.map +1 -0
  16. package/dist/ai/providers/anthropic.js +71 -0
  17. package/dist/ai/providers/anthropic.js.map +1 -0
  18. package/dist/ai/providers/openai-compatible.d.ts +3 -0
  19. package/dist/ai/providers/openai-compatible.d.ts.map +1 -0
  20. package/dist/ai/providers/openai-compatible.js +95 -0
  21. package/dist/ai/providers/openai-compatible.js.map +1 -0
  22. package/dist/ai/request-settings.d.ts +9 -0
  23. package/dist/ai/request-settings.d.ts.map +1 -0
  24. package/dist/ai/request-settings.js +56 -0
  25. package/dist/ai/request-settings.js.map +1 -0
  26. package/dist/ai/routes.d.ts +7 -0
  27. package/dist/ai/routes.d.ts.map +1 -0
  28. package/dist/ai/routes.js +192 -0
  29. package/dist/ai/routes.js.map +1 -0
  30. package/dist/ai/runner.d.ts +19 -0
  31. package/dist/ai/runner.d.ts.map +1 -0
  32. package/dist/ai/runner.js +77 -0
  33. package/dist/ai/runner.js.map +1 -0
  34. package/dist/ai/sse.d.ts +4 -0
  35. package/dist/ai/sse.d.ts.map +1 -0
  36. package/dist/ai/sse.js +53 -0
  37. package/dist/ai/sse.js.map +1 -0
  38. package/dist/ai/system.d.ts +2 -0
  39. package/dist/ai/system.d.ts.map +1 -0
  40. package/dist/ai/system.js +17 -0
  41. package/dist/ai/system.js.map +1 -0
  42. package/dist/ai/tools.d.ts +10 -0
  43. package/dist/ai/tools.d.ts.map +1 -0
  44. package/dist/ai/tools.js +134 -0
  45. package/dist/ai/tools.js.map +1 -0
  46. package/dist/ai/types.d.ts +72 -0
  47. package/dist/ai/types.d.ts.map +1 -0
  48. package/dist/ai/types.js +2 -0
  49. package/dist/ai/types.js.map +1 -0
  50. package/dist/bin.d.ts +3 -0
  51. package/dist/bin.d.ts.map +1 -0
  52. package/dist/bin.js +52 -0
  53. package/dist/bin.js.map +1 -0
  54. package/dist/cli/args.d.ts +15 -0
  55. package/dist/cli/args.d.ts.map +1 -0
  56. package/dist/cli/args.js +78 -0
  57. package/dist/cli/args.js.map +1 -0
  58. package/dist/cli/commands/ai.d.ts +2 -0
  59. package/dist/cli/commands/ai.d.ts.map +1 -0
  60. package/dist/cli/commands/ai.js +45 -0
  61. package/dist/cli/commands/ai.js.map +1 -0
  62. package/dist/cli/commands/arrange.d.ts +2 -0
  63. package/dist/cli/commands/arrange.d.ts.map +1 -0
  64. package/dist/cli/commands/arrange.js +103 -0
  65. package/dist/cli/commands/arrange.js.map +1 -0
  66. package/dist/cli/commands/canvases.d.ts +2 -0
  67. package/dist/cli/commands/canvases.d.ts.map +1 -0
  68. package/dist/cli/commands/canvases.js +38 -0
  69. package/dist/cli/commands/canvases.js.map +1 -0
  70. package/dist/cli/commands/check.d.ts +2 -0
  71. package/dist/cli/commands/check.d.ts.map +1 -0
  72. package/dist/cli/commands/check.js +15 -0
  73. package/dist/cli/commands/check.js.map +1 -0
  74. package/dist/cli/commands/comment.d.ts +2 -0
  75. package/dist/cli/commands/comment.d.ts.map +1 -0
  76. package/dist/cli/commands/comment.js +76 -0
  77. package/dist/cli/commands/comment.js.map +1 -0
  78. package/dist/cli/commands/elements.d.ts +8 -0
  79. package/dist/cli/commands/elements.d.ts.map +1 -0
  80. package/dist/cli/commands/elements.js +285 -0
  81. package/dist/cli/commands/elements.js.map +1 -0
  82. package/dist/cli/commands/frame.d.ts +2 -0
  83. package/dist/cli/commands/frame.d.ts.map +1 -0
  84. package/dist/cli/commands/frame.js +58 -0
  85. package/dist/cli/commands/frame.js.map +1 -0
  86. package/dist/cli/commands/install-skill.d.ts +2 -0
  87. package/dist/cli/commands/install-skill.d.ts.map +1 -0
  88. package/dist/cli/commands/install-skill.js +108 -0
  89. package/dist/cli/commands/install-skill.js.map +1 -0
  90. package/dist/cli/commands/layout.d.ts +2 -0
  91. package/dist/cli/commands/layout.d.ts.map +1 -0
  92. package/dist/cli/commands/layout.js +15 -0
  93. package/dist/cli/commands/layout.js.map +1 -0
  94. package/dist/cli/commands/render.d.ts +2 -0
  95. package/dist/cli/commands/render.d.ts.map +1 -0
  96. package/dist/cli/commands/render.js +64 -0
  97. package/dist/cli/commands/render.js.map +1 -0
  98. package/dist/cli/commands/scene.d.ts +8 -0
  99. package/dist/cli/commands/scene.d.ts.map +1 -0
  100. package/dist/cli/commands/scene.js +147 -0
  101. package/dist/cli/commands/scene.js.map +1 -0
  102. package/dist/cli/commands/server.d.ts +4 -0
  103. package/dist/cli/commands/server.d.ts.map +1 -0
  104. package/dist/cli/commands/server.js +66 -0
  105. package/dist/cli/commands/server.js.map +1 -0
  106. package/dist/cli/commands/snapshot.d.ts +2 -0
  107. package/dist/cli/commands/snapshot.d.ts.map +1 -0
  108. package/dist/cli/commands/snapshot.js +41 -0
  109. package/dist/cli/commands/snapshot.js.map +1 -0
  110. package/dist/cli/image-options.d.ts +43 -0
  111. package/dist/cli/image-options.d.ts.map +1 -0
  112. package/dist/cli/image-options.js +71 -0
  113. package/dist/cli/image-options.js.map +1 -0
  114. package/dist/cli/run.d.ts +2 -0
  115. package/dist/cli/run.d.ts.map +1 -0
  116. package/dist/cli/run.js +115 -0
  117. package/dist/cli/run.js.map +1 -0
  118. package/dist/cli/util.d.ts +5 -0
  119. package/dist/cli/util.d.ts.map +1 -0
  120. package/dist/cli/util.js +35 -0
  121. package/dist/cli/util.js.map +1 -0
  122. package/dist/core/arrow-routing.d.ts +31 -0
  123. package/dist/core/arrow-routing.d.ts.map +1 -0
  124. package/dist/core/arrow-routing.js +244 -0
  125. package/dist/core/arrow-routing.js.map +1 -0
  126. package/dist/core/bulk-ops.d.ts +55 -0
  127. package/dist/core/bulk-ops.d.ts.map +1 -0
  128. package/dist/core/bulk-ops.js +181 -0
  129. package/dist/core/bulk-ops.js.map +1 -0
  130. package/dist/core/canvas-client.d.ts +110 -0
  131. package/dist/core/canvas-client.d.ts.map +1 -0
  132. package/dist/core/canvas-client.js +416 -0
  133. package/dist/core/canvas-client.js.map +1 -0
  134. package/dist/core/canvas-id.d.ts +4 -0
  135. package/dist/core/canvas-id.d.ts.map +1 -0
  136. package/dist/core/canvas-id.js +5 -0
  137. package/dist/core/canvas-id.js.map +1 -0
  138. package/dist/core/canvas-persistence.d.ts +30 -0
  139. package/dist/core/canvas-persistence.d.ts.map +1 -0
  140. package/dist/core/canvas-persistence.js +854 -0
  141. package/dist/core/canvas-persistence.js.map +1 -0
  142. package/dist/core/canvas-registry.d.ts +36 -0
  143. package/dist/core/canvas-registry.d.ts.map +1 -0
  144. package/dist/core/canvas-registry.js +161 -0
  145. package/dist/core/canvas-registry.js.map +1 -0
  146. package/dist/core/canvas-routes.d.ts +5 -0
  147. package/dist/core/canvas-routes.d.ts.map +1 -0
  148. package/dist/core/canvas-routes.js +29 -0
  149. package/dist/core/canvas-routes.js.map +1 -0
  150. package/dist/core/canvas-state.d.ts +14 -0
  151. package/dist/core/canvas-state.d.ts.map +1 -0
  152. package/dist/core/canvas-state.js +20 -0
  153. package/dist/core/canvas-state.js.map +1 -0
  154. package/dist/core/canvas.d.ts +13 -0
  155. package/dist/core/canvas.d.ts.map +1 -0
  156. package/dist/core/canvas.js +4 -0
  157. package/dist/core/canvas.js.map +1 -0
  158. package/dist/core/comment-ops.d.ts +3 -0
  159. package/dist/core/comment-ops.d.ts.map +1 -0
  160. package/dist/core/comment-ops.js +36 -0
  161. package/dist/core/comment-ops.js.map +1 -0
  162. package/dist/core/comments.d.ts +5 -0
  163. package/dist/core/comments.d.ts.map +1 -0
  164. package/dist/core/comments.js +137 -0
  165. package/dist/core/comments.js.map +1 -0
  166. package/dist/core/compact.d.ts +13 -0
  167. package/dist/core/compact.d.ts.map +1 -0
  168. package/dist/core/compact.js +20 -0
  169. package/dist/core/compact.js.map +1 -0
  170. package/dist/core/config.d.ts +8 -0
  171. package/dist/core/config.d.ts.map +1 -0
  172. package/dist/core/config.js +18 -0
  173. package/dist/core/config.js.map +1 -0
  174. package/dist/core/describe.d.ts +3 -0
  175. package/dist/core/describe.d.ts.map +1 -0
  176. package/dist/core/describe.js +94 -0
  177. package/dist/core/describe.js.map +1 -0
  178. package/dist/core/design-guide.d.ts +2 -0
  179. package/dist/core/design-guide.d.ts.map +1 -0
  180. package/dist/core/design-guide.js +115 -0
  181. package/dist/core/design-guide.js.map +1 -0
  182. package/dist/core/diagram-layout.d.ts +64 -0
  183. package/dist/core/diagram-layout.d.ts.map +1 -0
  184. package/dist/core/diagram-layout.js +238 -0
  185. package/dist/core/diagram-layout.js.map +1 -0
  186. package/dist/core/diagram-ops.d.ts +165 -0
  187. package/dist/core/diagram-ops.d.ts.map +1 -0
  188. package/dist/core/diagram-ops.js +46 -0
  189. package/dist/core/diagram-ops.js.map +1 -0
  190. package/dist/core/entry.d.ts +3 -0
  191. package/dist/core/entry.d.ts.map +1 -0
  192. package/dist/core/entry.js +35 -0
  193. package/dist/core/entry.js.map +1 -0
  194. package/dist/core/expand-elements.d.ts +9 -0
  195. package/dist/core/expand-elements.d.ts.map +1 -0
  196. package/dist/core/expand-elements.js +277 -0
  197. package/dist/core/expand-elements.js.map +1 -0
  198. package/dist/core/frame-ops.d.ts +60 -0
  199. package/dist/core/frame-ops.d.ts.map +1 -0
  200. package/dist/core/frame-ops.js +90 -0
  201. package/dist/core/frame-ops.js.map +1 -0
  202. package/dist/core/frames.d.ts +31 -0
  203. package/dist/core/frames.d.ts.map +1 -0
  204. package/dist/core/frames.js +95 -0
  205. package/dist/core/frames.js.map +1 -0
  206. package/dist/core/geometry.d.ts +30 -0
  207. package/dist/core/geometry.d.ts.map +1 -0
  208. package/dist/core/geometry.js +167 -0
  209. package/dist/core/geometry.js.map +1 -0
  210. package/dist/core/layout-check.d.ts +30 -0
  211. package/dist/core/layout-check.d.ts.map +1 -0
  212. package/dist/core/layout-check.js +181 -0
  213. package/dist/core/layout-check.js.map +1 -0
  214. package/dist/core/local-origin.d.ts +4 -0
  215. package/dist/core/local-origin.d.ts.map +1 -0
  216. package/dist/core/local-origin.js +27 -0
  217. package/dist/core/local-origin.js.map +1 -0
  218. package/dist/core/mcp-dispatch.d.ts +9 -0
  219. package/dist/core/mcp-dispatch.d.ts.map +1 -0
  220. package/dist/core/mcp-dispatch.js +741 -0
  221. package/dist/core/mcp-dispatch.js.map +1 -0
  222. package/dist/core/mcp-http.d.ts +3 -0
  223. package/dist/core/mcp-http.d.ts.map +1 -0
  224. package/dist/core/mcp-http.js +38 -0
  225. package/dist/core/mcp-http.js.map +1 -0
  226. package/dist/core/mcp-server.d.ts +19 -0
  227. package/dist/core/mcp-server.d.ts.map +1 -0
  228. package/dist/core/mcp-server.js +57 -0
  229. package/dist/core/mcp-server.js.map +1 -0
  230. package/dist/core/mcp-tools.d.ts +3 -0
  231. package/dist/core/mcp-tools.d.ts.map +1 -0
  232. package/dist/core/mcp-tools.js +723 -0
  233. package/dist/core/mcp-tools.js.map +1 -0
  234. package/dist/core/normalize.d.ts +26 -0
  235. package/dist/core/normalize.d.ts.map +1 -0
  236. package/dist/core/normalize.js +134 -0
  237. package/dist/core/normalize.js.map +1 -0
  238. package/dist/core/obsidian-md.d.ts +4 -0
  239. package/dist/core/obsidian-md.d.ts.map +1 -0
  240. package/dist/core/obsidian-md.js +227 -0
  241. package/dist/core/obsidian-md.js.map +1 -0
  242. package/dist/core/pidfile.d.ts +5 -0
  243. package/dist/core/pidfile.d.ts.map +1 -0
  244. package/dist/core/pidfile.js +51 -0
  245. package/dist/core/pidfile.js.map +1 -0
  246. package/dist/core/png-scene.d.ts +4 -0
  247. package/dist/core/png-scene.d.ts.map +1 -0
  248. package/dist/core/png-scene.js +176 -0
  249. package/dist/core/png-scene.js.map +1 -0
  250. package/dist/core/render/excalidraw-node/dom.d.ts +29 -0
  251. package/dist/core/render/excalidraw-node/dom.d.ts.map +1 -0
  252. package/dist/core/render/excalidraw-node/dom.js +132 -0
  253. package/dist/core/render/excalidraw-node/dom.js.map +1 -0
  254. package/dist/core/render/excalidraw-node/index.d.ts +11 -0
  255. package/dist/core/render/excalidraw-node/index.d.ts.map +1 -0
  256. package/dist/core/render/excalidraw-node/index.js +77 -0
  257. package/dist/core/render/excalidraw-node/index.js.map +1 -0
  258. package/dist/core/render/fonts.d.ts +34 -0
  259. package/dist/core/render/fonts.d.ts.map +1 -0
  260. package/dist/core/render/fonts.js +133 -0
  261. package/dist/core/render/fonts.js.map +1 -0
  262. package/dist/core/render/index.d.ts +40 -0
  263. package/dist/core/render/index.d.ts.map +1 -0
  264. package/dist/core/render/index.js +135 -0
  265. package/dist/core/render/index.js.map +1 -0
  266. package/dist/core/render/png-worker.d.ts +2 -0
  267. package/dist/core/render/png-worker.d.ts.map +1 -0
  268. package/dist/core/render/png-worker.js +65 -0
  269. package/dist/core/render/png-worker.js.map +1 -0
  270. package/dist/core/render/png.d.ts +15 -0
  271. package/dist/core/render/png.d.ts.map +1 -0
  272. package/dist/core/render/png.js +128 -0
  273. package/dist/core/render/png.js.map +1 -0
  274. package/dist/core/render/text-metrics.d.ts +2 -0
  275. package/dist/core/render/text-metrics.d.ts.map +1 -0
  276. package/dist/core/render/text-metrics.js +136 -0
  277. package/dist/core/render/text-metrics.js.map +1 -0
  278. package/dist/core/request-canvas.d.ts +9 -0
  279. package/dist/core/request-canvas.d.ts.map +1 -0
  280. package/dist/core/request-canvas.js +2 -0
  281. package/dist/core/request-canvas.js.map +1 -0
  282. package/dist/core/request-headers.d.ts +5 -0
  283. package/dist/core/request-headers.d.ts.map +1 -0
  284. package/dist/core/request-headers.js +80 -0
  285. package/dist/core/request-headers.js.map +1 -0
  286. package/dist/core/scene-input.d.ts +2 -0
  287. package/dist/core/scene-input.d.ts.map +1 -0
  288. package/dist/core/scene-input.js +11 -0
  289. package/dist/core/scene-input.js.map +1 -0
  290. package/dist/core/scene-io.d.ts +16 -0
  291. package/dist/core/scene-io.d.ts.map +1 -0
  292. package/dist/core/scene-io.js +95 -0
  293. package/dist/core/scene-io.js.map +1 -0
  294. package/dist/core/share-url.d.ts +3 -0
  295. package/dist/core/share-url.d.ts.map +1 -0
  296. package/dist/core/share-url.js +77 -0
  297. package/dist/core/share-url.js.map +1 -0
  298. package/dist/core/spawn.d.ts +41 -0
  299. package/dist/core/spawn.d.ts.map +1 -0
  300. package/dist/core/spawn.js +153 -0
  301. package/dist/core/spawn.js.map +1 -0
  302. package/dist/core/version.d.ts +2 -0
  303. package/dist/core/version.d.ts.map +1 -0
  304. package/dist/core/version.js +14 -0
  305. package/dist/core/version.js.map +1 -0
  306. package/dist/frontend/assets/Assistant-Bold-gm-uSS1B.woff2 +0 -0
  307. package/dist/frontend/assets/Assistant-Medium-DrcxCXg3.woff2 +0 -0
  308. package/dist/frontend/assets/Assistant-Regular-DVxZuzxb.woff2 +0 -0
  309. package/dist/frontend/assets/Assistant-SemiBold-SCI4bEL9.woff2 +0 -0
  310. package/dist/frontend/assets/Tableau10-CvOaoHrI.js +1 -0
  311. package/dist/frontend/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
  312. package/dist/frontend/assets/abnfDiagram-VCTEODGH-CO_aNPe5.js +1 -0
  313. package/dist/frontend/assets/advancedFormat-DE2dNp0u.js +1 -0
  314. package/dist/frontend/assets/ar-SA-G6X2FPQ2-Bq4yiKbc.js +10 -0
  315. package/dist/frontend/assets/arc--vhPzIZC.js +1 -0
  316. package/dist/frontend/assets/architectureDiagram-5GKGNRK7-aHYJQElw.js +36 -0
  317. package/dist/frontend/assets/array-BKyUJesY.js +1 -0
  318. package/dist/frontend/assets/az-AZ-76LH7QW2-BB3yat67.js +1 -0
  319. package/dist/frontend/assets/band-dPffDWoQ.js +1 -0
  320. package/dist/frontend/assets/bg-BG-XCXSNQG7-DmC2FjQc.js +5 -0
  321. package/dist/frontend/assets/blockDiagram-68f4deed-Bn83vchM.js +118 -0
  322. package/dist/frontend/assets/blockDiagram-NRAW4CY4-CxaW-TzC.js +129 -0
  323. package/dist/frontend/assets/bn-BD-2XOGV67Q-DpCbZMS6.js +5 -0
  324. package/dist/frontend/assets/c4Diagram-15b5d702-Bq7Ko0Vs.js +10 -0
  325. package/dist/frontend/assets/c4Diagram-UCG6FXSJ-Dh883fAO.js +38 -0
  326. package/dist/frontend/assets/ca-ES-6MX7JW3Y-CBOshpbV.js +8 -0
  327. package/dist/frontend/assets/channel-DYvM7vRx.js +1 -0
  328. package/dist/frontend/assets/chunk-2Q5K7J3B-DaFhLtFc.js +1 -0
  329. package/dist/frontend/assets/chunk-5VM5RSS4-CyLfaWw7.js +15 -0
  330. package/dist/frontend/assets/chunk-F27PBJKO-BHNc-edD.js +1 -0
  331. package/dist/frontend/assets/chunk-G27WJ6UU-BBKiZxqf.js +231 -0
  332. package/dist/frontend/assets/chunk-JWPE2WC7-7twsn51D.js +1 -0
  333. package/dist/frontend/assets/chunk-LCL6LL3I-BTwZuXJ6.js +206 -0
  334. package/dist/frontend/assets/chunk-POPQ4Y6H-CaHDxqyV.js +1 -0
  335. package/dist/frontend/assets/chunk-SVP7TREG-B8-zByXy.js +88 -0
  336. package/dist/frontend/assets/chunk-XXDRQBXY-DQLro-7R.js +1 -0
  337. package/dist/frontend/assets/classDiagram-DTDB5LWJ-Dpwx6IJK.js +1 -0
  338. package/dist/frontend/assets/classDiagram-d40c83e7-BPxlcZuc.js +2 -0
  339. package/dist/frontend/assets/classDiagram-v2-JRS7N3AN-Dpwx6IJK.js +1 -0
  340. package/dist/frontend/assets/classDiagram-v2-d5a6b087-Cyz34qAK.js +2 -0
  341. package/dist/frontend/assets/clone-Iw0eB1Cb.js +1 -0
  342. package/dist/frontend/assets/cose-bilkent-JH36ORCC-C4ZX1Xvi.js +1 -0
  343. package/dist/frontend/assets/createText-d213de94-CDH1rzxH.js +7 -0
  344. package/dist/frontend/assets/cs-CZ-2BRQDIVT-CGAN69M4.js +11 -0
  345. package/dist/frontend/assets/cynefin-OW5HDTMX-B8XT9png.js +178 -0
  346. package/dist/frontend/assets/cynefinDiagram-5FMLGOSQ-COTZjqlj.js +62 -0
  347. package/dist/frontend/assets/cytoscape-cose-bilkent-D4yGolDn.js +1 -0
  348. package/dist/frontend/assets/cytoscape.esm-BjAbmLdb.js +331 -0
  349. package/dist/frontend/assets/da-DK-5WZEPLOC-FIDoeOAn.js +5 -0
  350. package/dist/frontend/assets/dagre-3AP2YEHR-v8EtxNwx.js +4 -0
  351. package/dist/frontend/assets/de-DE-XR44H4JA-Hquyrt1G.js +8 -0
  352. package/dist/frontend/assets/defaultLocale-C4B-KCzX.js +1 -0
  353. package/dist/frontend/assets/diagram-S7CK7UJ4-BiwOlZBI.js +30 -0
  354. package/dist/frontend/assets/diagram-UQ7AKVKN-DIfzNs7s.js +41 -0
  355. package/dist/frontend/assets/diagram-VSXAHHWV-kKkEHy5z.js +3 -0
  356. package/dist/frontend/assets/diagram-VX7I27RA-zTp2qGKo.js +24 -0
  357. package/dist/frontend/assets/diagram-Z3DM3KII-hUxSr-QT.js +24 -0
  358. package/dist/frontend/assets/directory-open-01563666-DWU9wJ6I.js +1 -0
  359. package/dist/frontend/assets/directory-open-4ed118d0-CunoC1EB.js +1 -0
  360. package/dist/frontend/assets/ebnfDiagram-PWID7BFC-CRwXBVzS.js +1 -0
  361. package/dist/frontend/assets/edges-332bd1c7-CbPhghy3.js +4 -0
  362. package/dist/frontend/assets/el-GR-BZB4AONW-CWRJJANX.js +10 -0
  363. package/dist/frontend/assets/erDiagram-880f2ed8-CY1dU-f9.js +51 -0
  364. package/dist/frontend/assets/erDiagram-SSCWMZ5O-BfDW8Lxf.js +99 -0
  365. package/dist/frontend/assets/es-ES-U4NZUMDT-BwZWIjT5.js +9 -0
  366. package/dist/frontend/assets/eu-ES-A7QVB2H4-B9suQ9BE.js +11 -0
  367. package/dist/frontend/assets/fa-IR-HGAKTJCU-tgrKvE4J.js +8 -0
  368. package/dist/frontend/assets/fi-FI-Z5N7JZ37-Ddoc7R-q.js +6 -0
  369. package/dist/frontend/assets/file-open-002ab408-DIuFHtCF.js +1 -0
  370. package/dist/frontend/assets/file-open-7c801643-684qeFg4.js +1 -0
  371. package/dist/frontend/assets/file-save-3189631c-C1wFhQhH.js +1 -0
  372. package/dist/frontend/assets/file-save-745eba88-Bb9F9Kg7.js +1 -0
  373. package/dist/frontend/assets/flowDb-7c981674-DkYacLUz.js +10 -0
  374. package/dist/frontend/assets/flowDiagram-A5DVABFB-CCBuG42p.js +168 -0
  375. package/dist/frontend/assets/flowDiagram-cbd28bf7-DhhBmCsw.js +4 -0
  376. package/dist/frontend/assets/flowDiagram-v2-ffc7f31a-BICbZ5-w.js +1 -0
  377. package/dist/frontend/assets/flowchart-elk-definition-36e2d292-BsyTsM2Q.js +139 -0
  378. package/dist/frontend/assets/fr-FR-RHASNOE6-Bzn_6dcd.js +9 -0
  379. package/dist/frontend/assets/ganttDiagram-04f9e578-CCKAlfpJ.js +257 -0
  380. package/dist/frontend/assets/ganttDiagram-EL5Y4UJY-B8CXkutd.js +292 -0
  381. package/dist/frontend/assets/gitGraphDiagram-21fc4d3e-DBAYEQql.js +70 -0
  382. package/dist/frontend/assets/gitGraphDiagram-WWUBYQGX-Ge5QWjv2.js +106 -0
  383. package/dist/frontend/assets/gl-ES-HMX3MZ6V-vcZHbFum.js +10 -0
  384. package/dist/frontend/assets/graph-87dI2d0Q.js +1 -0
  385. package/dist/frontend/assets/has-D7z5cd7K.js +1 -0
  386. package/dist/frontend/assets/he-IL-6SHJWFNN-CK07fY3l.js +10 -0
  387. package/dist/frontend/assets/hi-IN-IWLTKZ5I-CDZ0p7Jv.js +4 -0
  388. package/dist/frontend/assets/hu-HU-A5ZG7DT2-FH5SLnWy.js +7 -0
  389. package/dist/frontend/assets/id-ID-SAP4L64H-MjXIXb2f.js +10 -0
  390. package/dist/frontend/assets/image-blob-reduce.esm-HwCm7IZ0.js +7 -0
  391. package/dist/frontend/assets/index-6079d271-DiB2AL6F.js +1 -0
  392. package/dist/frontend/assets/index-BcAUh2Nm.css +1 -0
  393. package/dist/frontend/assets/index-Biw8Vgb3.js +320 -0
  394. package/dist/frontend/assets/index-fTyH8AV3.js +354 -0
  395. package/dist/frontend/assets/infoDiagram-4a4f5b27-BOdJmCUU.js +7 -0
  396. package/dist/frontend/assets/infoDiagram-RXCK75RN-CNm06Rxs.js +2 -0
  397. package/dist/frontend/assets/init-Gi6I4Gst.js +1 -0
  398. package/dist/frontend/assets/ishikawaDiagram-5VMMS53U-DoLWy3n2.js +70 -0
  399. package/dist/frontend/assets/it-IT-JPQ66NNP-D3n0iaPa.js +11 -0
  400. package/dist/frontend/assets/ja-JP-DBVTYXUO-ejSNO7M9.js +8 -0
  401. package/dist/frontend/assets/journeyDiagram-29694f62-Cm6qVjA9.js +139 -0
  402. package/dist/frontend/assets/journeyDiagram-EYS64GPL-ByZmvOcj.js +139 -0
  403. package/dist/frontend/assets/kaa-6HZHGXH3-D8l_gwno.js +1 -0
  404. package/dist/frontend/assets/kab-KAB-ZGHBKWFO-CCdAUgdW.js +8 -0
  405. package/dist/frontend/assets/kanban-definition-3QL26DDD-Y5ylzca9.js +89 -0
  406. package/dist/frontend/assets/katex-C5jXJg4s.js +257 -0
  407. package/dist/frontend/assets/kk-KZ-P5N5QNE5-DeuZqHeo.js +1 -0
  408. package/dist/frontend/assets/km-KH-HSX4SM5Z-CiG2k5fk.js +11 -0
  409. package/dist/frontend/assets/ko-KR-MTYHY66A-KQOGYf_l.js +9 -0
  410. package/dist/frontend/assets/ku-TR-6OUDTVRD-iPec9Wpx.js +9 -0
  411. package/dist/frontend/assets/layout-ChryVliD.js +1 -0
  412. package/dist/frontend/assets/layout-chXYHUIV.js +1 -0
  413. package/dist/frontend/assets/line-V0o6yOnB.js +1 -0
  414. package/dist/frontend/assets/linear-BvV3B0Vg.js +1 -0
  415. package/dist/frontend/assets/lt-LT-XHIRWOB4-CATjC2gQ.js +3 -0
  416. package/dist/frontend/assets/lv-LV-5QDEKY6T-BsDP-7Dd.js +7 -0
  417. package/dist/frontend/assets/mindmap-definition-FBJOCRG2-z4KcwRlx.js +96 -0
  418. package/dist/frontend/assets/mindmap-definition-ac74a2e8-C1QU2vBv.js +95 -0
  419. package/dist/frontend/assets/mr-IN-CRQNXWMA-DWJhwvxv.js +13 -0
  420. package/dist/frontend/assets/my-MM-5M5IBNSE-DckXEMN8.js +1 -0
  421. package/dist/frontend/assets/nb-NO-T6EIAALU-HaOR9ZeX.js +10 -0
  422. package/dist/frontend/assets/nl-NL-IS3SIHDZ-ef_ywpFu.js +8 -0
  423. package/dist/frontend/assets/nn-NO-6E72VCQL-Bg7QdVqf.js +8 -0
  424. package/dist/frontend/assets/oc-FR-POXYY2M6-D5HmBPnC.js +8 -0
  425. package/dist/frontend/assets/ordinal-Cboi1Yqb.js +1 -0
  426. package/dist/frontend/assets/pa-IN-N4M65BXN-BHYM0tZp.js +4 -0
  427. package/dist/frontend/assets/path-CbwjOpE9.js +1 -0
  428. package/dist/frontend/assets/pegDiagram-XKGWAZYB-BL0-JiYs.js +1 -0
  429. package/dist/frontend/assets/pica-CHpl3DYP.js +7 -0
  430. package/dist/frontend/assets/pie-b97pL0mM.js +1 -0
  431. package/dist/frontend/assets/pieDiagram-421022e6-DiRybrxD.js +35 -0
  432. package/dist/frontend/assets/pieDiagram-E7YTZNPT-VybkpWmu.js +39 -0
  433. package/dist/frontend/assets/pl-PL-T2D74RX3-uZIVDHgu.js +9 -0
  434. package/dist/frontend/assets/pt-BR-5N22H2LF-dJVfhAeV.js +9 -0
  435. package/dist/frontend/assets/pt-PT-UZXXM6DQ-DjJzcznP.js +9 -0
  436. package/dist/frontend/assets/quadrantDiagram-0957ecba-BHJpECv1.js +7 -0
  437. package/dist/frontend/assets/quadrantDiagram-AXDQQJYC-RAG8nSkZ.js +7 -0
  438. package/dist/frontend/assets/railroadDiagram-O6MQD6OU-lCMtporN.js +1 -0
  439. package/dist/frontend/assets/requirementDiagram-23d650b8-mSFTWSrD.js +52 -0
  440. package/dist/frontend/assets/requirementDiagram-EFPCY7ZU-B8YnTqPO.js +84 -0
  441. package/dist/frontend/assets/ro-RO-JPDTUUEW-B5X8VOmp.js +11 -0
  442. package/dist/frontend/assets/roundRect-0PYZxl1G.js +1 -0
  443. package/dist/frontend/assets/ru-RU-B4JR7IUQ-Czv9kfuz.js +9 -0
  444. package/dist/frontend/assets/sankeyDiagram-23345273-B3g3P-D1.js +8 -0
  445. package/dist/frontend/assets/sankeyDiagram-P5KCCOFB-DRm9HHoQ.js +40 -0
  446. package/dist/frontend/assets/sankeyLinkHorizontal-CgO6js3K.js +1 -0
  447. package/dist/frontend/assets/sequenceDiagram-17ac3bff-DzZiSttS.js +122 -0
  448. package/dist/frontend/assets/sequenceDiagram-WJ2MYXX4-BrSDYDx-.js +162 -0
  449. package/dist/frontend/assets/si-LK-N5RQ5JYF-DFWOZdgD.js +1 -0
  450. package/dist/frontend/assets/sizeCapture-X5ZJPWSS-CbaN7yeQ.js +1 -0
  451. package/dist/frontend/assets/sk-SK-C5VTKIMK-B8VlFn2Z.js +6 -0
  452. package/dist/frontend/assets/sl-SI-NN7IZMDC-CJeSgLEg.js +6 -0
  453. package/dist/frontend/assets/stateDiagram-9c5f0230-Dzm1fyzw.js +1 -0
  454. package/dist/frontend/assets/stateDiagram-HBIQ2CUA-B5Nv-PBX.js +1 -0
  455. package/dist/frontend/assets/stateDiagram-v2-4QOOHH4V-B72hUL6s.js +1 -0
  456. package/dist/frontend/assets/stateDiagram-v2-51a3dcff-DvLAYBjA.js +1 -0
  457. package/dist/frontend/assets/styles-2ab5d517-D6473lhT.js +116 -0
  458. package/dist/frontend/assets/styles-5f03d8d2-CZ5U9u1n.js +160 -0
  459. package/dist/frontend/assets/styles-edf9a4b0-DzQC88FF.js +207 -0
  460. package/dist/frontend/assets/subset-shared.chunk.js +84 -0
  461. package/dist/frontend/assets/subset-worker.chunk.js +1 -0
  462. package/dist/frontend/assets/sv-SE-XGPEYMSR-BKMKxZWF.js +10 -0
  463. package/dist/frontend/assets/svgDrawCommon-3ba9043b-CQsuw6x4.js +1 -0
  464. package/dist/frontend/assets/swimlanes-XN3QIQJK-D6c81JTS.js +1 -0
  465. package/dist/frontend/assets/swimlanesDiagram-VK2B7HYN-SMIGSMWR.js +8 -0
  466. package/dist/frontend/assets/ta-IN-2NMHFXQM-BtPPl3RQ.js +9 -0
  467. package/dist/frontend/assets/th-TH-HPSO5L25-CSjFGi1j.js +2 -0
  468. package/dist/frontend/assets/timeline-definition-24CTP7MA-DTBgPsOR.js +120 -0
  469. package/dist/frontend/assets/timeline-definition-7e6b55e7-D44e8lHF.js +61 -0
  470. package/dist/frontend/assets/tr-TR-DEFEU3FU-BS1kZ0-G.js +7 -0
  471. package/dist/frontend/assets/uk-UA-QMV73CPH--ucRdDwc.js +6 -0
  472. package/dist/frontend/assets/union-DI_iry4-.js +1 -0
  473. package/dist/frontend/assets/vennDiagram-4TSXK5OY-DDIUJU_f.js +34 -0
  474. package/dist/frontend/assets/vi-VN-M7AON7JQ-BcGYkPOn.js +5 -0
  475. package/dist/frontend/assets/wardleyDiagram-VM6X3IG4-TfvrOirV.js +78 -0
  476. package/dist/frontend/assets/xychartDiagram-S5SC5T6Z-DaSdOJbv.js +7 -0
  477. package/dist/frontend/assets/xychartDiagram-b6496bcd-VIsyqEG1.js +7 -0
  478. package/dist/frontend/assets/zh-CN-LNUGB5OW-RL4CyEYU.js +10 -0
  479. package/dist/frontend/assets/zh-HK-E62DVLB3-DKGVR3J1.js +1 -0
  480. package/dist/frontend/assets/zh-TW-RAJ6MFWO-C7djgh-M.js +9 -0
  481. package/dist/frontend/assets/zipObject-Bl99JdSU.js +1 -0
  482. package/dist/frontend/index.html +569 -0
  483. package/dist/index.d.ts +7 -0
  484. package/dist/index.d.ts.map +1 -0
  485. package/dist/index.js +74 -0
  486. package/dist/index.js.map +1 -0
  487. package/dist/render/excalidraw-node.mjs +540 -0
  488. package/dist/server.d.ts +5 -0
  489. package/dist/server.d.ts.map +1 -0
  490. package/dist/server.js +1684 -0
  491. package/dist/server.js.map +1 -0
  492. package/dist/types.d.ts +263 -0
  493. package/dist/types.d.ts.map +1 -0
  494. package/dist/types.js +49 -0
  495. package/dist/types.js.map +1 -0
  496. package/dist/utils/logger.d.ts +4 -0
  497. package/dist/utils/logger.d.ts.map +1 -0
  498. package/dist/utils/logger.js +63 -0
  499. package/dist/utils/logger.js.map +1 -0
  500. package/package.json +127 -4
  501. package/skills/excalidraw-skill/SKILL.md +331 -0
  502. package/skills/excalidraw-skill/evals/evals.json +35 -0
  503. package/skills/excalidraw-skill/references/cheatsheet.md +217 -0
  504. package/src/ai/config.ts +58 -0
  505. package/src/ai/providers/anthropic.ts +62 -0
  506. package/src/ai/providers/openai-compatible.ts +84 -0
  507. package/src/ai/request-settings.ts +50 -0
  508. package/src/ai/routes.ts +157 -0
  509. package/src/ai/runner.ts +80 -0
  510. package/src/ai/sse.ts +40 -0
  511. package/src/ai/system.ts +16 -0
  512. package/src/ai/tools.ts +130 -0
  513. package/src/ai/types.ts +48 -0
  514. package/src/bin.ts +56 -0
  515. package/src/cli/args.ts +97 -0
  516. package/src/cli/commands/ai.ts +40 -0
  517. package/src/cli/commands/arrange.ts +112 -0
  518. package/src/cli/commands/canvases.ts +37 -0
  519. package/src/cli/commands/check.ts +15 -0
  520. package/src/cli/commands/comment.ts +72 -0
  521. package/src/cli/commands/elements.ts +299 -0
  522. package/src/cli/commands/frame.ts +55 -0
  523. package/src/cli/commands/install-skill.ts +116 -0
  524. package/src/cli/commands/layout.ts +14 -0
  525. package/src/cli/commands/render.ts +68 -0
  526. package/src/cli/commands/scene.ts +168 -0
  527. package/src/cli/commands/server.ts +71 -0
  528. package/src/cli/commands/snapshot.ts +45 -0
  529. package/src/cli/image-options.ts +77 -0
  530. package/src/cli/run.ts +123 -0
  531. package/src/cli/util.ts +39 -0
  532. package/src/core/arrow-routing.ts +256 -0
  533. package/src/core/bulk-ops.ts +183 -0
  534. package/src/core/canvas-client.ts +525 -0
  535. package/src/core/canvas-id.ts +8 -0
  536. package/src/core/canvas-persistence.ts +1067 -0
  537. package/src/core/canvas-registry.ts +180 -0
  538. package/src/core/canvas-routes.ts +34 -0
  539. package/src/core/canvas-state.ts +37 -0
  540. package/src/core/canvas.ts +18 -0
  541. package/src/core/comment-ops.ts +36 -0
  542. package/src/core/comments.ts +142 -0
  543. package/src/core/compact.ts +21 -0
  544. package/src/core/config.ts +24 -0
  545. package/src/core/describe.ts +100 -0
  546. package/src/core/design-guide.ts +114 -0
  547. package/src/core/diagram-layout.ts +278 -0
  548. package/src/core/diagram-ops.ts +48 -0
  549. package/src/core/entry.ts +37 -0
  550. package/src/core/expand-elements.ts +316 -0
  551. package/src/core/frame-ops.ts +112 -0
  552. package/src/core/frames.ts +113 -0
  553. package/src/core/geometry.ts +213 -0
  554. package/src/core/layout-check.ts +200 -0
  555. package/src/core/local-origin.ts +27 -0
  556. package/src/core/mcp-dispatch.ts +858 -0
  557. package/src/core/mcp-http.ts +38 -0
  558. package/src/core/mcp-server.ts +72 -0
  559. package/src/core/mcp-tools.ts +725 -0
  560. package/src/core/normalize.ts +158 -0
  561. package/src/core/obsidian-md.ts +231 -0
  562. package/src/core/pidfile.ts +52 -0
  563. package/src/core/png-scene.ts +177 -0
  564. package/src/core/render/excalidraw-node/dom.ts +159 -0
  565. package/src/core/render/excalidraw-node/index.ts +100 -0
  566. package/src/core/render/fonts.ts +173 -0
  567. package/src/core/render/index.ts +198 -0
  568. package/src/core/render/png-worker.ts +75 -0
  569. package/src/core/render/png.ts +148 -0
  570. package/src/core/render/text-metrics.ts +141 -0
  571. package/src/core/request-canvas.ts +10 -0
  572. package/src/core/request-headers.ts +79 -0
  573. package/src/core/scene-input.ts +11 -0
  574. package/src/core/scene-io.ts +125 -0
  575. package/src/core/share-url.ts +99 -0
  576. package/src/core/spawn.ts +186 -0
  577. package/src/core/version.ts +13 -0
  578. package/src/index.ts +86 -0
  579. package/src/server.ts +1873 -0
  580. package/src/types.ts +384 -0
  581. package/src/utils/logger.ts +77 -0
@@ -0,0 +1 @@
1
+ import{aI as ye,aJ as Ae,aK as Me,aL as pe,aM as de,aN as At,aO as Oe,ad as Xt}from"./index-fTyH8AV3.js";import{b as Ne,t as Kt,c as $e,a as ze}from"./linear-BvV3B0Vg.js";import{i as Ie}from"./init-Gi6I4Gst.js";function Wr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Hr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ze(t){return t}var Tt=1,Ot=2,_t=3,dt=4,te=1e-6;function Pe(t){return"translate("+t+",0)"}function Ve(t){return"translate(0,"+t+")"}function qe(t){return e=>+t(e)}function Re(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function _e(){return!this.__axis}function Te(t,e){var n=[],r=null,i=null,u=6,o=6,c=3,M=typeof window<"u"&&window.devicePixelRatio>1?0:.5,f=t===Tt||t===dt?-1:1,l=t===dt||t===Ot?"x":"y",D=t===Tt||t===_t?Pe:Ve;function y(m){var I=r??(e.ticks?e.ticks.apply(e,n):e.domain()),V=i??(e.tickFormat?e.tickFormat.apply(e,n):Ze),g=Math.max(u,0)+c,d=e.range(),U=+d[0]+M,T=+d[d.length-1]+M,x=(e.bandwidth?Re:qe)(e.copy(),M),S=m.selection?m.selection():m,h=S.selectAll(".domain").data([null]),C=S.selectAll(".tick").data(I,e).order(),b=C.exit(),N=C.enter().append("g").attr("class","tick"),z=C.select("line"),$=C.select("text");h=h.merge(h.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(N),z=z.merge(N.append("line").attr("stroke","currentColor").attr(l+"2",f*u)),$=$.merge(N.append("text").attr("fill","currentColor").attr(l,f*g).attr("dy",t===Tt?"0em":t===_t?"0.71em":"0.32em")),m!==S&&(h=h.transition(m),C=C.transition(m),z=z.transition(m),$=$.transition(m),b=b.transition(m).attr("opacity",te).attr("transform",function(k){return isFinite(k=x(k))?D(k+M):this.getAttribute("transform")}),N.attr("opacity",te).attr("transform",function(k){var W=this.parentNode.__axis;return D((W&&isFinite(W=W(k))?W:x(k))+M)})),b.remove(),h.attr("d",t===dt||t===Ot?o?"M"+f*o+","+U+"H"+M+"V"+T+"H"+f*o:"M"+M+","+U+"V"+T:o?"M"+U+","+f*o+"V"+M+"H"+T+"V"+f*o:"M"+U+","+M+"H"+T),C.attr("opacity",1).attr("transform",function(k){return D(x(k)+M)}),z.attr(l+"2",f*u),$.attr(l,f*g).text(V),S.filter(_e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Ot?"start":t===dt?"end":"middle"),S.each(function(){this.__axis=x})}return y.scale=function(m){return arguments.length?(e=m,y):e},y.ticks=function(){return n=Array.from(arguments),y},y.tickArguments=function(m){return arguments.length?(n=m==null?[]:Array.from(m),y):n.slice()},y.tickValues=function(m){return arguments.length?(r=m==null?null:Array.from(m),y):r&&r.slice()},y.tickFormat=function(m){return arguments.length?(i=m,y):i},y.tickSize=function(m){return arguments.length?(u=o=+m,y):u},y.tickSizeInner=function(m){return arguments.length?(u=+m,y):u},y.tickSizeOuter=function(m){return arguments.length?(o=+m,y):o},y.tickPadding=function(m){return arguments.length?(c=+m,y):c},y.offset=function(m){return arguments.length?(M=+m,y):M},y}function Lr(t){return Te(Tt,t)}function Ar(t){return Te(_t,t)}const Qe=Math.PI/180,Xe=180/Math.PI,Dt=18,ve=.96422,Ce=1,we=.82521,De=4/29,ft=6/29,Ue=3*ft*ft,Ge=ft*ft*ft;function Ye(t){if(t instanceof Q)return new Q(t.l,t.a,t.b,t.opacity);if(t instanceof E)return xe(t);t instanceof ye||(t=Ae(t));var e=It(t.r),n=It(t.g),r=It(t.b),i=Nt((.2225045*e+.7168786*n+.0606169*r)/Ce),u,o;return e===n&&n===r?u=o=i:(u=Nt((.4360747*e+.3850649*n+.1430804*r)/ve),o=Nt((.0139322*e+.0971045*n+.7141733*r)/we)),new Q(116*i-16,500*(u-i),200*(i-o),t.opacity)}function Ee(t,e,n,r){return arguments.length===1?Ye(t):new Q(t,e,n,r??1)}function Q(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}Me(Q,Ee,pe(de,{brighter(t){return new Q(this.l+Dt*(t??1),this.a,this.b,this.opacity)},darker(t){return new Q(this.l-Dt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=ve*$t(e),t=Ce*$t(t),n=we*$t(n),new ye(zt(3.1338561*e-1.6168667*t-.4906146*n),zt(-.9787684*e+1.9161415*t+.033454*n),zt(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function Nt(t){return t>Ge?Math.pow(t,1/3):t/Ue+De}function $t(t){return t>ft?t*t*t:Ue*(t-De)}function zt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function It(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function je(t){if(t instanceof E)return new E(t.h,t.c,t.l,t.opacity);if(t instanceof Q||(t=Ye(t)),t.a===0&&t.b===0)return new E(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Xe;return new E(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Qt(t,e,n,r){return arguments.length===1?je(t):new E(t,e,n,r??1)}function E(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function xe(t){if(isNaN(t.h))return new Q(t.l,0,0,t.opacity);var e=t.h*Qe;return new Q(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Me(E,Qt,pe(de,{brighter(t){return new E(this.h,this.c,this.l+Dt*(t??1),this.opacity)},darker(t){return new E(this.h,this.c,this.l-Dt*(t??1),this.opacity)},rgb(){return xe(this).rgb()}}));function Je(t){return function(e,n){var r=t((e=Qt(e)).h,(n=Qt(n)).h),i=At(e.c,n.c),u=At(e.l,n.l),o=At(e.opacity,n.opacity);return function(c){return e.h=r(c),e.c=i(c),e.l=u(c),e.opacity=o(c),e+""}}}const Or=Je(Oe);function Be(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],u=t[r],o;return u<i&&(o=n,n=r,r=o,o=i,i=u,u=o),t[n]=e.floor(i),t[r]=e.ceil(u),t}const Zt=new Date,Pt=new Date;function F(t,e,n,r){function i(u){return t(u=arguments.length===0?new Date:new Date(+u)),u}return i.floor=u=>(t(u=new Date(+u)),u),i.ceil=u=>(t(u=new Date(u-1)),e(u,1),t(u),u),i.round=u=>{const o=i(u),c=i.ceil(u);return u-o<c-u?o:c},i.offset=(u,o)=>(e(u=new Date(+u),o==null?1:Math.floor(o)),u),i.range=(u,o,c)=>{const M=[];if(u=i.ceil(u),c=c==null?1:Math.floor(c),!(u<o)||!(c>0))return M;let f;do M.push(f=new Date(+u)),e(u,c),t(u);while(f<u&&u<o);return M},i.filter=u=>F(o=>{if(o>=o)for(;t(o),!u(o);)o.setTime(o-1)},(o,c)=>{if(o>=o)if(c<0)for(;++c<=0;)for(;e(o,-1),!u(o););else for(;--c>=0;)for(;e(o,1),!u(o););}),n&&(i.count=(u,o)=>(Zt.setTime(+u),Pt.setTime(+o),t(Zt),t(Pt),Math.floor(n(Zt,Pt))),i.every=u=>(u=Math.floor(u),!isFinite(u)||!(u>0)?null:u>1?i.filter(r?o=>r(o)%u===0:o=>i.count(0,o)%u===0):i)),i}const Ut=F(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ut.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?F(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ut);Ut.range;const j=1e3,P=j*60,J=P*60,B=J*24,Gt=B*7,ee=B*30,Vt=B*365,ct=F(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*j)},(t,e)=>(e-t)/j,t=>t.getUTCSeconds());ct.range;const Et=F(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*j)},(t,e)=>{t.setTime(+t+e*P)},(t,e)=>(e-t)/P,t=>t.getMinutes());Et.range;const Ke=F(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*P)},(t,e)=>(e-t)/P,t=>t.getUTCMinutes());Ke.range;const jt=F(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*j-t.getMinutes()*P)},(t,e)=>{t.setTime(+t+e*J)},(t,e)=>(e-t)/J,t=>t.getHours());jt.range;const tn=F(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*J)},(t,e)=>(e-t)/J,t=>t.getUTCHours());tn.range;const pt=F(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*P)/B,t=>t.getDate()-1);pt.range;const Jt=F(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/B,t=>t.getUTCDate()-1);Jt.range;const en=F(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/B,t=>Math.floor(t/B));en.range;function nt(t){return F(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*P)/Gt)}const kt=nt(0),Yt=nt(1),nn=nt(2),rn=nt(3),lt=nt(4),an=nt(5),un=nt(6);kt.range;Yt.range;nn.range;rn.range;lt.range;an.range;un.range;function rt(t){return F(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Gt)}const ke=rt(0),xt=rt(1),on=rt(2),sn=rt(3),ht=rt(4),cn=rt(5),fn=rt(6);ke.range;xt.range;on.range;sn.range;ht.range;cn.range;fn.range;const Bt=F(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Bt.range;const ln=F(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());ln.range;const K=F(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());K.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:F(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});K.range;const et=F(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());et.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:F(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});et.range;function hn(t,e,n,r,i,u){const o=[[ct,1,j],[ct,5,5*j],[ct,15,15*j],[ct,30,30*j],[u,1,P],[u,5,5*P],[u,15,15*P],[u,30,30*P],[i,1,J],[i,3,3*J],[i,6,6*J],[i,12,12*J],[r,1,B],[r,2,2*B],[n,1,Gt],[e,1,ee],[e,3,3*ee],[t,1,Vt]];function c(f,l,D){const y=l<f;y&&([f,l]=[l,f]);const m=D&&typeof D.range=="function"?D:M(f,l,D),I=m?m.range(f,+l+1):[];return y?I.reverse():I}function M(f,l,D){const y=Math.abs(l-f)/D,m=Ne(([,,g])=>g).right(o,y);if(m===o.length)return t.every(Kt(f/Vt,l/Vt,D));if(m===0)return Ut.every(Math.max(Kt(f,l,D),1));const[I,V]=o[y/o[m-1][2]<o[m][2]/y?m-1:m];return I.every(V)}return[c,M]}const[mn,gn]=hn(K,Bt,kt,pt,jt,Et);function qt(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Rt(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function gt(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function yn(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,u=t.days,o=t.shortDays,c=t.months,M=t.shortMonths,f=yt(i),l=Mt(i),D=yt(u),y=Mt(u),m=yt(o),I=Mt(o),V=yt(c),g=Mt(c),d=yt(M),U=Mt(M),T={a:at,A:tt,b:G,B:ut,c:null,d:ie,e:ie,f:zn,g:Gn,G:jn,H:On,I:Nn,j:$n,L:Se,m:In,M:Zn,p:Z,q:mt,Q:fe,s:le,S:Pn,u:Vn,U:qn,V:Rn,w:_n,W:Qn,x:null,X:null,y:Xn,Y:En,Z:Jn,"%":ce},x={a:ot,A:St,b:Ft,B:bt,c:null,d:se,e:se,f:er,g:lr,G:mr,H:Bn,I:Kn,j:tr,L:be,m:nr,M:rr,p:Wt,q:Ht,Q:fe,s:le,S:ar,u:ur,U:or,V:ir,w:sr,W:cr,x:null,X:null,y:fr,Y:hr,Z:gr,"%":ce},S={a:z,A:$,b:k,B:W,c:R,d:ue,e:ue,f:Wn,g:ae,G:re,H:oe,I:oe,j:kn,L:bn,m:xn,M:Sn,p:N,q:Yn,Q:Ln,s:An,S:Fn,u:vn,U:Cn,V:wn,w:Tn,W:Dn,x:_,X,y:ae,Y:re,Z:Un,"%":Hn};T.x=h(n,T),T.X=h(r,T),T.c=h(e,T),x.x=h(n,x),x.X=h(r,x),x.c=h(e,x);function h(s,p){return function(v){var a=[],H=-1,Y=0,L=s.length,O,q,it;for(v instanceof Date||(v=new Date(+v));++H<L;)s.charCodeAt(H)===37&&(a.push(s.slice(Y,H)),(q=ne[O=s.charAt(++H)])!=null?O=s.charAt(++H):q=O==="e"?" ":"0",(it=p[O])&&(O=it(v,q)),a.push(O),Y=H+1);return a.push(s.slice(Y,H)),a.join("")}}function C(s,p){return function(v){var a=gt(1900,void 0,1),H=b(a,s,v+="",0),Y,L;if(H!=v.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(a.s*1e3+("L"in a?a.L:0));if(p&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+a.p*12),a.m===void 0&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(Y=Rt(gt(a.y,0,1)),L=Y.getUTCDay(),Y=L>4||L===0?xt.ceil(Y):xt(Y),Y=Jt.offset(Y,(a.V-1)*7),a.y=Y.getUTCFullYear(),a.m=Y.getUTCMonth(),a.d=Y.getUTCDate()+(a.w+6)%7):(Y=qt(gt(a.y,0,1)),L=Y.getDay(),Y=L>4||L===0?Yt.ceil(Y):Yt(Y),Y=pt.offset(Y,(a.V-1)*7),a.y=Y.getFullYear(),a.m=Y.getMonth(),a.d=Y.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),L="Z"in a?Rt(gt(a.y,0,1)).getUTCDay():qt(gt(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+a.W*7-(L+5)%7:a.w+a.U*7-(L+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Rt(a)):qt(a)}}function b(s,p,v,a){for(var H=0,Y=p.length,L=v.length,O,q;H<Y;){if(a>=L)return-1;if(O=p.charCodeAt(H++),O===37){if(O=p.charAt(H++),q=S[O in ne?p.charAt(H++):O],!q||(a=q(s,v,a))<0)return-1}else if(O!=v.charCodeAt(a++))return-1}return a}function N(s,p,v){var a=f.exec(p.slice(v));return a?(s.p=l.get(a[0].toLowerCase()),v+a[0].length):-1}function z(s,p,v){var a=m.exec(p.slice(v));return a?(s.w=I.get(a[0].toLowerCase()),v+a[0].length):-1}function $(s,p,v){var a=D.exec(p.slice(v));return a?(s.w=y.get(a[0].toLowerCase()),v+a[0].length):-1}function k(s,p,v){var a=d.exec(p.slice(v));return a?(s.m=U.get(a[0].toLowerCase()),v+a[0].length):-1}function W(s,p,v){var a=V.exec(p.slice(v));return a?(s.m=g.get(a[0].toLowerCase()),v+a[0].length):-1}function R(s,p,v){return b(s,e,p,v)}function _(s,p,v){return b(s,n,p,v)}function X(s,p,v){return b(s,r,p,v)}function at(s){return o[s.getDay()]}function tt(s){return u[s.getDay()]}function G(s){return M[s.getMonth()]}function ut(s){return c[s.getMonth()]}function Z(s){return i[+(s.getHours()>=12)]}function mt(s){return 1+~~(s.getMonth()/3)}function ot(s){return o[s.getUTCDay()]}function St(s){return u[s.getUTCDay()]}function Ft(s){return M[s.getUTCMonth()]}function bt(s){return c[s.getUTCMonth()]}function Wt(s){return i[+(s.getUTCHours()>=12)]}function Ht(s){return 1+~~(s.getUTCMonth()/3)}return{format:function(s){var p=h(s+="",T);return p.toString=function(){return s},p},parse:function(s){var p=C(s+="",!1);return p.toString=function(){return s},p},utcFormat:function(s){var p=h(s+="",x);return p.toString=function(){return s},p},utcParse:function(s){var p=C(s+="",!0);return p.toString=function(){return s},p}}}var ne={"-":"",_:" ",0:"0"},A=/^\s*\d+/,Mn=/^%/,pn=/[\\^$*+?|[\]().{}]/g;function w(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",u=i.length;return r+(u<n?new Array(n-u+1).join(e)+i:i)}function dn(t){return t.replace(pn,"\\$&")}function yt(t){return new RegExp("^(?:"+t.map(dn).join("|")+")","i")}function Mt(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Tn(t,e,n){var r=A.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function vn(t,e,n){var r=A.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Cn(t,e,n){var r=A.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function wn(t,e,n){var r=A.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Dn(t,e,n){var r=A.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function re(t,e,n){var r=A.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ae(t,e,n){var r=A.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Un(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Yn(t,e,n){var r=A.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function xn(t,e,n){var r=A.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ue(t,e,n){var r=A.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function kn(t,e,n){var r=A.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function oe(t,e,n){var r=A.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Sn(t,e,n){var r=A.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Fn(t,e,n){var r=A.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function bn(t,e,n){var r=A.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Wn(t,e,n){var r=A.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Hn(t,e,n){var r=Mn.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ln(t,e,n){var r=A.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function An(t,e,n){var r=A.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ie(t,e){return w(t.getDate(),e,2)}function On(t,e){return w(t.getHours(),e,2)}function Nn(t,e){return w(t.getHours()%12||12,e,2)}function $n(t,e){return w(1+pt.count(K(t),t),e,3)}function Se(t,e){return w(t.getMilliseconds(),e,3)}function zn(t,e){return Se(t,e)+"000"}function In(t,e){return w(t.getMonth()+1,e,2)}function Zn(t,e){return w(t.getMinutes(),e,2)}function Pn(t,e){return w(t.getSeconds(),e,2)}function Vn(t){var e=t.getDay();return e===0?7:e}function qn(t,e){return w(kt.count(K(t)-1,t),e,2)}function Fe(t){var e=t.getDay();return e>=4||e===0?lt(t):lt.ceil(t)}function Rn(t,e){return t=Fe(t),w(lt.count(K(t),t)+(K(t).getDay()===4),e,2)}function _n(t){return t.getDay()}function Qn(t,e){return w(Yt.count(K(t)-1,t),e,2)}function Xn(t,e){return w(t.getFullYear()%100,e,2)}function Gn(t,e){return t=Fe(t),w(t.getFullYear()%100,e,2)}function En(t,e){return w(t.getFullYear()%1e4,e,4)}function jn(t,e){var n=t.getDay();return t=n>=4||n===0?lt(t):lt.ceil(t),w(t.getFullYear()%1e4,e,4)}function Jn(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+w(e/60|0,"0",2)+w(e%60,"0",2)}function se(t,e){return w(t.getUTCDate(),e,2)}function Bn(t,e){return w(t.getUTCHours(),e,2)}function Kn(t,e){return w(t.getUTCHours()%12||12,e,2)}function tr(t,e){return w(1+Jt.count(et(t),t),e,3)}function be(t,e){return w(t.getUTCMilliseconds(),e,3)}function er(t,e){return be(t,e)+"000"}function nr(t,e){return w(t.getUTCMonth()+1,e,2)}function rr(t,e){return w(t.getUTCMinutes(),e,2)}function ar(t,e){return w(t.getUTCSeconds(),e,2)}function ur(t){var e=t.getUTCDay();return e===0?7:e}function or(t,e){return w(ke.count(et(t)-1,t),e,2)}function We(t){var e=t.getUTCDay();return e>=4||e===0?ht(t):ht.ceil(t)}function ir(t,e){return t=We(t),w(ht.count(et(t),t)+(et(t).getUTCDay()===4),e,2)}function sr(t){return t.getUTCDay()}function cr(t,e){return w(xt.count(et(t)-1,t),e,2)}function fr(t,e){return w(t.getUTCFullYear()%100,e,2)}function lr(t,e){return t=We(t),w(t.getUTCFullYear()%100,e,2)}function hr(t,e){return w(t.getUTCFullYear()%1e4,e,4)}function mr(t,e){var n=t.getUTCDay();return t=n>=4||n===0?ht(t):ht.ceil(t),w(t.getUTCFullYear()%1e4,e,4)}function gr(){return"+0000"}function ce(){return"%"}function fe(t){return+t}function le(t){return Math.floor(+t/1e3)}var st,He;yr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function yr(t){return st=yn(t),He=st.format,st.parse,st.utcFormat,st.utcParse,st}function Mr(t){return new Date(t)}function pr(t){return t instanceof Date?+t:+new Date(+t)}function Le(t,e,n,r,i,u,o,c,M,f){var l=$e(),D=l.invert,y=l.domain,m=f(".%L"),I=f(":%S"),V=f("%I:%M"),g=f("%I %p"),d=f("%a %d"),U=f("%b %d"),T=f("%B"),x=f("%Y");function S(h){return(M(h)<h?m:c(h)<h?I:o(h)<h?V:u(h)<h?g:r(h)<h?i(h)<h?d:U:n(h)<h?T:x)(h)}return l.invert=function(h){return new Date(D(h))},l.domain=function(h){return arguments.length?y(Array.from(h,pr)):y().map(Mr)},l.ticks=function(h){var C=y();return t(C[0],C[C.length-1],h??10)},l.tickFormat=function(h,C){return C==null?S:f(C)},l.nice=function(h){var C=y();return(!h||typeof h.range!="function")&&(h=e(C[0],C[C.length-1],h??10)),h?y(Be(C,h)):l},l.copy=function(){return ze(l,Le(t,e,n,r,i,u,o,c,M,f))},l}function Nr(){return Ie.apply(Le(mn,gn,K,Bt,kt,pt,jt,Et,ct,He).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var vt={exports:{}},dr=vt.exports,he;function Tr(){return he||(he=1,(function(t,e){(function(n,r){t.exports=r()})(dr,(function(){var n="day";return function(r,i,u){var o=function(f){return f.add(4-f.isoWeekday(),n)},c=i.prototype;c.isoWeekYear=function(){return o(this).year()},c.isoWeek=function(f){if(!this.$utils().u(f))return this.add(7*(f-this.isoWeek()),n);var l,D,y,m,I=o(this),V=(l=this.isoWeekYear(),D=this.$u,y=(D?u.utc:u)().year(l).startOf("year"),m=4-y.isoWeekday(),y.isoWeekday()>4&&(m+=7),y.add(m,n));return I.diff(V,"week")+1},c.isoWeekday=function(f){return this.$utils().u(f)?this.day()||7:this.day(this.day()%7?f:f-7)};var M=c.startOf;c.startOf=function(f,l){var D=this.$utils(),y=!!D.u(l)||l;return D.p(f)==="isoweek"?y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):M.bind(this)(f,l)}}}))})(vt)),vt.exports}var vr=Tr();const $r=Xt(vr);var Ct={exports:{}},Cr=Ct.exports,me;function wr(){return me||(me=1,(function(t,e){(function(n,r){t.exports=r()})(Cr,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,u=/\d\d/,o=/\d\d?/,c=/\d*[^-_:/,()\s\d]+/,M={},f=function(g){return(g=+g)+(g>68?1900:2e3)},l=function(g){return function(d){this[g]=+d}},D=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(d){if(!d||d==="Z")return 0;var U=d.match(/([+-]|\d\d)/g),T=60*U[1]+(+U[2]||0);return T===0?0:U[0]==="+"?-T:T})(g)}],y=function(g){var d=M[g];return d&&(d.indexOf?d:d.s.concat(d.f))},m=function(g,d){var U,T=M.meridiem;if(T){for(var x=1;x<=24;x+=1)if(g.indexOf(T(x,0,d))>-1){U=x>12;break}}else U=g===(d?"pm":"PM");return U},I={A:[c,function(g){this.afternoon=m(g,!1)}],a:[c,function(g){this.afternoon=m(g,!0)}],Q:[i,function(g){this.month=3*(g-1)+1}],S:[i,function(g){this.milliseconds=100*+g}],SS:[u,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[o,l("seconds")],ss:[o,l("seconds")],m:[o,l("minutes")],mm:[o,l("minutes")],H:[o,l("hours")],h:[o,l("hours")],HH:[o,l("hours")],hh:[o,l("hours")],D:[o,l("day")],DD:[u,l("day")],Do:[c,function(g){var d=M.ordinal,U=g.match(/\d+/);if(this.day=U[0],d)for(var T=1;T<=31;T+=1)d(T).replace(/\[|\]/g,"")===g&&(this.day=T)}],w:[o,l("week")],ww:[u,l("week")],M:[o,l("month")],MM:[u,l("month")],MMM:[c,function(g){var d=y("months"),U=(y("monthsShort")||d.map((function(T){return T.slice(0,3)}))).indexOf(g)+1;if(U<1)throw new Error;this.month=U%12||U}],MMMM:[c,function(g){var d=y("months").indexOf(g)+1;if(d<1)throw new Error;this.month=d%12||d}],Y:[/[+-]?\d+/,l("year")],YY:[u,function(g){this.year=f(g)}],YYYY:[/\d{4}/,l("year")],Z:D,ZZ:D};function V(g){var d,U;d=g,U=M&&M.formats;for(var T=(g=d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(z,$,k){var W=k&&k.toUpperCase();return $||U[k]||n[k]||U[W].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(R,_,X){return _||X.slice(1)}))}))).match(r),x=T.length,S=0;S<x;S+=1){var h=T[S],C=I[h],b=C&&C[0],N=C&&C[1];T[S]=N?{regex:b,parser:N}:h.replace(/^\[|\]$/g,"")}return function(z){for(var $={},k=0,W=0;k<x;k+=1){var R=T[k];if(typeof R=="string")W+=R.length;else{var _=R.regex,X=R.parser,at=z.slice(W),tt=_.exec(at)[0];X.call($,tt),z=z.replace(tt,"")}}return(function(G){var ut=G.afternoon;if(ut!==void 0){var Z=G.hours;ut?Z<12&&(G.hours+=12):Z===12&&(G.hours=0),delete G.afternoon}})($),$}}return function(g,d,U){U.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(f=g.parseTwoDigitYear);var T=d.prototype,x=T.parse;T.parse=function(S){var h=S.date,C=S.utc,b=S.args;this.$u=C;var N=b[1];if(typeof N=="string"){var z=b[2]===!0,$=b[3]===!0,k=z||$,W=b[2];$&&(W=b[2]),M=this.$locale(),!z&&W&&(M=U.Ls[W]),this.$d=(function(at,tt,G,ut){try{if(["x","X"].indexOf(tt)>-1)return new Date((tt==="X"?1e3:1)*at);var Z=V(tt)(at),mt=Z.year,ot=Z.month,St=Z.day,Ft=Z.hours,bt=Z.minutes,Wt=Z.seconds,Ht=Z.milliseconds,s=Z.zone,p=Z.week,v=new Date,a=St||(mt||ot?1:v.getDate()),H=mt||v.getFullYear(),Y=0;mt&&!ot||(Y=ot>0?ot-1:v.getMonth());var L,O=Ft||0,q=bt||0,it=Wt||0,Lt=Ht||0;return s?new Date(Date.UTC(H,Y,a,O,q,it,Lt+60*s.offset*1e3)):G?new Date(Date.UTC(H,Y,a,O,q,it,Lt)):(L=new Date(H,Y,a,O,q,it,Lt),p&&(L=ut(L).week(p).toDate()),L)}catch{return new Date("")}})(h,N,C,U),this.init(),W&&W!==!0&&(this.$L=this.locale(W).$L),k&&h!=this.format(N)&&(this.$d=new Date("")),M={}}else if(N instanceof Array)for(var R=N.length,_=1;_<=R;_+=1){b[1]=N[_-1];var X=U.apply(this,b);if(X.isValid()){this.$d=X.$d,this.$L=X.$L,this.init();break}_===R&&(this.$d=new Date(""))}else x.call(this,S)}}}))})(Ct)),Ct.exports}var Dr=wr();const zr=Xt(Dr);var wt={exports:{}},Ur=wt.exports,ge;function Yr(){return ge||(ge=1,(function(t,e){(function(n,r){t.exports=r()})(Ur,(function(){return function(n,r){var i=r.prototype,u=i.format;i.format=function(o){var c=this,M=this.$locale();if(!this.isValid())return u.bind(this)(o);var f=this.$utils(),l=(o||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(D){switch(D){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return M.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return M.ordinal(c.week(),"W");case"w":case"ww":return f.s(c.week(),D==="w"?1:2,"0");case"W":case"WW":return f.s(c.isoWeek(),D==="W"?1:2,"0");case"k":case"kk":return f.s(String(c.$H===0?24:c.$H),D==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return D}}));return u.bind(this)(l)}}}))})(wt)),wt.exports}var xr=Yr();const Ir=Xt(xr);export{Wr as a,Ar as b,He as c,Bt as d,kt as e,un as f,an as g,lt as h,Or as i,rn as j,nn as k,Yt as l,Hr as m,pt as n,jt as o,Et as p,Ut as q,Lr as r,ct as s,Nr as t,$r as u,zr as v,Ir as w};
@@ -0,0 +1,10 @@
1
+ import"./index-fTyH8AV3.js";var u={paste:"لصق",pasteAsPlaintext:"اللصق كنص عادي",pasteCharts:"لصق الرسوم البيانية",selectAll:"تحديد الكل",multiSelect:"إضافة عنصر للتحديد",moveCanvas:"نقل لوح الرسم",cut:"قص",copy:"نسخ",copyAsPng:"نسخ إلى الحافظة بصيغة PNG",copyAsSvg:"نسخ إلى الحافظة بصيغة SVG",copyText:"نسخ إلى الحافظة كنص",copySource:"",convertToCode:"",bringForward:"جلب للأمام",sendToBack:"أرسل للخلف",bringToFront:"أحضر للأمام",sendBackward:"أرسل للخلف",delete:"حذف",copyStyles:"نسخ الأنماط",pasteStyles:"لصق الأنماط",stroke:"الخط",background:"الخلفية",fill:"التعبئة",strokeWidth:"سُمك الخط",strokeStyle:"نمط الخط",strokeStyle_solid:"متصل",strokeStyle_dashed:"متقطع",strokeStyle_dotted:"منقط",sloppiness:"الإمالة",opacity:"الشفافية",textAlign:"محاذاة النص",edges:"الحواف",sharp:"حادة",round:"دائرية",arrowheads:"رؤوس الأسهم",arrowhead_none:"لا شيء",arrowhead_arrow:"سهم",arrowhead_bar:"شريط",arrowhead_circle:"",arrowhead_circle_outline:"",arrowhead_triangle:"مثلث",arrowhead_triangle_outline:"",arrowhead_diamond:"",arrowhead_diamond_outline:"",fontSize:"حجم الخط",fontFamily:"نوع الخط",addWatermark:'إضافة "مصنوعة بواسطة Excalidraw"',handDrawn:"رسم باليد",normal:"عادي",code:"رمز",small:"صغير",medium:"متوسط",large:"كبير",veryLarge:"كبير جدا",solid:"كامل",hachure:"خطوط",zigzag:"متعرج",crossHatch:"خطوط متقطعة",thin:"نحيف",bold:"داكن",left:"الـيسار",center:"وسط",right:"يمين",extraBold:"عريض",architect:"معماري",artist:"رسام",cartoonist:"كرتوني",fileTitle:"إسم الملف",colorPicker:"منتقي اللون",canvasColors:"تستخدم على القماش",canvasBackground:"خلفية اللوحة",drawingCanvas:"لوحة الرسم",layers:"الطبقات",actions:"الإجراءات",language:"اللغة",liveCollaboration:"التعاون المباشر...",duplicateSelection:"تكرار",untitled:"غير معنون",name:"الاسم",yourName:"اسمك",madeWithExcalidraw:"مصنوعة بواسطة Excalidraw",group:"تحديد مجموعة",ungroup:"إلغاء تحديد مجموعة",collaborators:"المتعاونون",showGrid:"إظهار الشبكة",addToLibrary:"أضف إلى المكتبة",removeFromLibrary:"حذف من المكتبة",libraryLoadingMessage:"جارٍ تحميل المكتبة…",libraries:"تصفح المكتبات",loadingScene:"جاري تحميل المشهد…",align:"محاذاة",alignTop:"محاذاة إلى اﻷعلى",alignBottom:"محاذاة إلى اﻷسفل",alignLeft:"محاذاة إلى اليسار",alignRight:"محاذاة إلى اليمين",centerVertically:"توسيط عمودي",centerHorizontally:"توسيط أفقي",distributeHorizontally:"التوزيع الأفقي",distributeVertically:"التوزيع عمودياً",flipHorizontal:"قلب عامودي",flipVertical:"قلب أفقي",viewMode:"نمط العرض",share:"مشاركة",showStroke:"إظهار منتقي لون الخط",showBackground:"إظهار منتقي لون الخلفية",toggleTheme:"غير النمط",personalLib:"المكتبة الشخصية",excalidrawLib:"مكتبتنا",decreaseFontSize:"تصغير حجم الخط",increaseFontSize:"تكبير حجم الخط",unbindText:"فك ربط النص",bindText:"ربط النص بالحاوية",createContainerFromText:"نص مغلف في حاوية",link:{edit:"تعديل الرابط",editEmbed:"تحرير الرابط وإدراجه",create:"إنشاء رابط",createEmbed:"إنشاء رابط و إدراجه",label:"رابط",labelEmbed:"رابط و إدراج",empty:"لم يتم تعيين رابط"},lineEditor:{edit:"تحرير السطر",exit:"الخروج من المُحرر"},elementLock:{lock:"قفل",unlock:"فتح",lockAll:"قفل الكل",unlockAll:"فتح الكل"},statusPublished:"نُشر",sidebarLock:"إبقاء الشريط الجانبي مفتوح",selectAllElementsInFrame:"تحديد جميع العناصر في الإطار",removeAllElementsFromFrame:"إزالة جميع العناصر من الإطار",eyeDropper:"اختيار اللون من القماش",textToDiagram:"",prompt:""},A={noItems:"لا توجد عناصر أضيفت بعد...",hint_emptyLibrary:"حدد عنصر على القماش لإضافته هنا، أو تثبيت مكتبة من المستودع العام أدناه.",hint_emptyPrivateLibrary:"حدد عنصر على القماش لإضافته هنا."},e={clearReset:"إعادة تعيين اللوحة",exportJSON:"صدر الملف",exportImage:"تصدير الصورة...",export:"حفظ إلى...",copyToClipboard:"نسخ إلى الحافظة",save:"احفظ للملف الحالي",saveAs:"حفظ كـ",load:"فتح",getShareableLink:"احصل على رابط المشاركة",close:"غلق",selectLanguage:"اختر اللغة",scrollBackToContent:"الرجوع إلى المحتوى",zoomIn:"تكبير",zoomOut:"تصغير",resetZoom:"إعادة تعيين الشاشة",menu:"القائمة",done:"تم",edit:"تعديل",undo:"تراجع",redo:"إعادة تنفيذ",resetLibrary:"إعادة ضبط المكتبة",createNewRoom:"إنشاء غرفة جديدة",fullScreen:"شاشة كاملة",darkMode:"الوضع المظلم",lightMode:"الوضع المضيء",zenMode:"وضع التأمل",objectsSnapMode:"التقط إلى العناصر",exitZenMode:"إلغاء الوضع الليلى",cancel:"إلغاء",clear:"مسح",remove:"إزالة",embed:"تبديل الإدراج",publishLibrary:"انشر",submit:"أرسل",confirm:"تأكيد",embeddableInteractionButton:"اضغط للتفاعل"},a={clearReset:"هذا سيُزيل كامل اللوحة. هل أنت متأكد؟",couldNotCreateShareableLink:"تعذر إنشاء رابطة المشاركة.",couldNotCreateShareableLinkTooBig:"تعذر إنشاء رابط قابل للمشاركة: المشهد كبير جدًا",couldNotLoadInvalidFile:"تعذر التحميل، الملف غير صالح",importBackendFailed:"فشل الاستيراد من الخادوم.",cannotExportEmptyCanvas:"لا يمكن تصدير لوحة فارغة.",couldNotCopyToClipboard:"تعذر النسخ إلى الحافظة.",decryptFailed:"تعذر فك تشفير البيانات.",uploadedSecurly:"تم تأمين التحميل بتشفير النهاية إلى النهاية، مما يعني أن خادوم Excalidraw والأطراف الثالثة لا يمكنها قراءة المحتوى.",loadSceneOverridePrompt:"تحميل الرسم الخارجي سيحل محل المحتوى الموجود لديك. هل ترغب في المتابعة؟",collabStopOverridePrompt:`إيقاف الجلسة سيؤدي إلى الكتابة فوق رسومك السابقة المخزنة داخليا. هل أنت متأكد؟
2
+
3
+ (إذا كنت ترغب في الاحتفاظ برسمك المخزن داخليا، ببساطة أغلق علامة تبويب المتصفح بدلاً من ذلك.)`,errorAddingToLibrary:"تعذر إضافة العنصر للمكتبة",errorRemovingFromLibrary:"تعذر إزالة العنصر من المكتبة",confirmAddLibrary:"هذا سيضيف {{numShapes}} شكل إلى مكتبتك. هل أنت متأكد؟",imageDoesNotContainScene:"يبدو أن هذه الصورة لا تحتوي على أي بيانات مشهد. هل قمت بتمكين تضمين المشهد أثناء التصدير؟",cannotRestoreFromImage:"تعذر استعادة المشهد من ملف الصورة",invalidSceneUrl:"تعذر استيراد المشهد من عنوان URL المتوفر. إما أنها مشوهة، أو لا تحتوي على بيانات Excalidraw JSON صالحة.",resetLibrary:"هذا سوف يمسح مكتبتك. هل أنت متأكد؟",removeItemsFromsLibrary:"حذف {{count}} عنصر (عناصر) من المكتبة؟",invalidEncryptionKey:"مفتاح التشفير يجب أن يكون من 22 حرفاً. التعاون المباشر معطل.",collabOfflineWarning:`لا يوجد اتصال بالانترنت.
4
+ لن يتم حفظ التغييرات التي قمت بها!`},r={unsupportedFileType:"نوع الملف غير مدعوم.",imageInsertError:"تعذر إدراج الصورة. حاول مرة أخرى لاحقاً...",fileTooBig:"الملف كبير جداً. الحد الأقصى المسموح به للحجم هو {{maxSize}}.",svgImageInsertError:"تعذر إدراج صورة SVG. يبدو أن ترميز SVG غير صحيح.",failedToFetchImage:"",invalidSVGString:"SVG غير صالح.",cannotResolveCollabServer:"تعذر الاتصال بخادم التعاون. الرجاء إعادة تحميل الصفحة والمحاولة مرة أخرى.",importLibraryError:"تعذر تحميل المكتبة",collabSaveFailed:"تعذر الحفظ في قاعدة البيانات. إذا استمرت المشاكل، يفضل أن تحفظ ملفك محليا كي لا تفقد عملك.",collabSaveFailed_sizeExceeded:"تعذر الحفظ في قاعدة البيانات، يبدو أن القماش كبير للغاية، يفضّل حفظ الملف محليا كي لا تفقد عملك.",imageToolNotSupported:"",brave_measure_text_error:{line1:"يبدو أنك تستخدم متصفح Brave مع إعداد <bold>حظر صارم لتتبع البصمة</bold>.",line2:"قد يؤدي هذا إلى كسر <bold>عناصر النص</bold> في الرسومات الخاصة بك.",line3:"من المستحسن إلغاء تفعيل هذا الإعداد. يمكنك اتباع <link>هذه الخطوات</link> لفعل ذلك.",line4:"إذا لم يصلح تعطيل هذا الإعداد طريقة عرض النصوص، الرجاء كتابة <issueLink>بلاغ</issueLink> على حسابنا في GitHub، أو راسلنا على <discordLink>Discord</discordLink>"},libraryElementTypeError:{embeddable:"لا يمكن إضافة العناصر القابلة للتضمين في المكتبة.",iframe:"",image:"سوف يتم دعم إضافة صور إلى المكتبة قريباً!"},asyncPasteFailedOnRead:"",asyncPasteFailedOnParse:"",copyToSystemClipboardFailed:""},o={selection:"تحديد",image:"إدراج صورة",rectangle:"مستطيل",diamond:"مضلع",ellipse:"دائرة",arrow:"سهم",line:"خط",freedraw:"رسم",text:"نص",library:"مكتبة",lock:"الحفاظ على أداة التحديد نشطة بعد الرسم",penMode:"وضع القلم - امنع اللمس",link:"إضافة/تحديث الرابط للشكل المحدد",eraser:"ممحاة",frame:"أداة الإطار",magicframe:"",embeddable:"تضمين ويب",laser:"مؤشر ليزر",hand:"يد (أداة الإزاحة)",extraTools:"المزيد من أﻷدوات",mermaidToExcalidraw:"",magicSettings:""},t={canvasActions:"إجراءات اللوحة",selectedShapeActions:"إجراءات الشكل المحدد",shapes:"الأشكال"},i={canvasPanning:"لتحريك القماش، اضغط على عجلة الفأرة أو مفتاح المسافة أثناء السحب، أو استخدم أداة اليد",linearElement:"انقر لبدء نقاط متعددة، اسحب لخط واحد",freeDraw:"انقر واسحب، افرج عند الانتهاء",text:"نصيحة: يمكنك أيضًا إضافة نص بالنقر المزدوج في أي مكان بأداة الاختيار",embeddable:"اضغط مع السحب لإنشاء موقع ويب مضمّن",text_selected:"انقر نقراً مزدوجاً أو اضغط ادخال لتعديل النص",text_editing:"اضغط على Esc أو (Ctrl أو Cmd) + Enter لإنهاء التعديل",linearElementMulti:"انقر فوق النقطة الأخيرة أو اضغط على Esc أو Enter للإنهاء",lockAngle:"يمكنك تقييد الزاوية بالضغط على SHIFT",resize:`يمكنك تقييد النسب بالضغط على SHIFT أثناء تغيير الحجم،
5
+ اضغط على ALT لتغيير الحجم من المركز`,resizeImage:`يمكنك تغيير الحجم بحرية بالضغط بأستمرار على SHIFT،
6
+ اضغط بأستمرار على ALT أيضا لتغيير الحجم من المركز`,rotate:"يمكنك تقييد الزوايا من خلال الضغط على SHIFT أثناء الدوران",lineEditor_info:"اضغط على مفتاح (Ctrl أو Cmd) و انقر بشكل مزدوج، أو اضغط على مفتاحي (Ctrl أو Cmd) و (Enter) لتعديل النقاط",lineEditor_pointSelected:"اضغط على حذف لإزالة النقطة (النِّقَاط)، Ctrl/Cmd+D للتكرار، أو اسحب للانتقال",lineEditor_nothingSelected:`اختر نقطة لتعديلها (اضغط على SHIFT لتحديد عدة نِقَاط),
7
+ أو اضغط على ALT و انقر بالفأرة لإضافة نِقَاط جديدة`,placeImage:"انقر لوضع الصورة، أو انقر واسحب لتعيين حجمها يدوياً",publishLibrary:"نشر مكتبتك",bindTextToElement:"اضغط على إدخال لإضافة نص",deepBoxSelect:"اضغط على Ctrl\\Cmd للاختيار العميق، ولمنع السحب",eraserRevert:"اضغط على Alt لاستعادة العناصر المعلَّمة للحذف",firefox_clipboard_write:'يمكن على الأرجح تمكين هذه الميزة عن طريق تعيين علم "dom.events.asyncClipboard.clipboardItem" إلى "true". لتغيير أعلام المتصفح في Firefox، قم بزيارة صفحة "about:config".',disableSnapping:"اضغط على Ctrl أو Cmd لتعطيل الالتقاط"},l={cannotShowPreview:"تعذر عرض المعاينة",canvasTooBig:"قد تكون اللوحة كبيرة جداً.",canvasTooBigTip:"نصيحة: حاول تحريك العناصر البعيدة بشكل أقرب قليلاً."},F={headingMain:"حدث خطأ. حاول <button>تحديث الصفحة</button>.",clearCanvasMessage:"إذا لم تعمل إعادة التحميل، حاول مرة أخرى ",clearCanvasCaveat:" هذا سيؤدي إلى فقدان العمل ",trackedToSentry:"تم تتبع الخطأ في المعرف {{eventId}} على نظامنا.",openIssueMessage:"حرصنا على عدم إضافة معلومات المشهد في بلاغ الخطأ. في حال كون مشهدك لا يحمل أي معلومات خاصة نرجو المتابعة على <button>نظام تتبع الأخطاء</button>. نرجو إضافة المعلومات أدناه بنسخها ولصقها في محتوى البلاغ على GitHub.",sceneContent:"محتوى المشهد:"},n={desc_intro:"يمكنك دعوة الآخرين لمشاركتك نفس الجلسة التي تعمل عليها.",desc_privacy:"لا تقلق، الجلسة تستخدم التشفير من النهاية إلى النهاية، لذلك فإن أي شيء ترسمه سيبقى خاصاً. لن يتمكن حتى الخادوم الخاص بنا من رؤية ما توصلت إليه.",button_startSession:"بدء الجلسة",button_stopSession:"إيقاف الجلسة",desc_inProgressIntro:"تجري الآن المشاركة الحية.",desc_shareLink:"شارك هذا الرابط مع أي شخص تريده أن يشاركك الجلسة:",desc_exitSession:"إيقاف الجلسة سيؤدي إلى قطع الاتصال الخاص بك من الغرفة، ولكن ستتمكن من مواصلة العمل مع المشهد، محليا. لاحظ أن هذا لن يؤثر على الأشخاص الآخرين، و سيظلون قادرين على التعاون في إصدارهم.",shareTitle:"الانضمام إلى جلسة تعاون حية على Excalidraw"},s={title:"خطأ"},D={disk_title:"حفظ الملف للجهاز",disk_details:"تصدير بيانات المشهد إلى ملف يمكنك الاستيراد منه لاحقاً.",disk_button:"إحفظ لملف",link_title:"رابط قابل للمشاركة",link_details:"صدر الملف للمشاهدة فقط.",link_button:"التصدير كرابط",excalidrawplus_description:"حفظ المشهد إلى مساحة العمل +Excalidraw الخاصة بك.",excalidrawplus_button:"تصدير",excalidrawplus_exportError:"تعذر التصدير إلى +Excalidraw في الوقت الحالي..."},d={blog:"اقرأ مدونتنا",click:"انقر",deepSelect:"تحديد عميق",deepBoxSelect:"تحديد عميق داخل المربع، ومنع السحب",curvedArrow:"سهم مائل",curvedLine:"خط مائل",documentation:"دليل الاستخدام",doubleClick:"انقر مرتين",drag:"اسحب",editor:"المحرر",editLineArrowPoints:"تحرير سطر/نقاط سهم",editText:"تعديل النص / إضافة تسمية",github:"عثرت على مشكلة؟ إرسال",howto:"اتبع التعليمات",or:"أو",preventBinding:"منع ارتبط السهم",tools:"الأدوات",shortcuts:"اختصارات لوحة المفاتيح",textFinish:"إنهاء التعديل (محرر النص)",textNewLine:"أضف سطر جديد (محرر نص)",title:"المساعدة",view:"عرض",zoomToFit:"تكبير للملائمة",zoomToSelection:"تكبير للعنصر المحدد",toggleElementLock:"إغلاق/فتح المحدد",movePageUpDown:"نقل الصفحة أعلى/أسفل",movePageLeftRight:"نقل الصفحة يسار/يمين"},c={title:"مسح اللوحة"},C={title:"نشر المكتبة",itemName:"إسم العنصر",authorName:"إسم المؤلف",githubUsername:"اسم المستخدم في جيت هب",twitterUsername:"اسم المستخدم في تويتر",libraryName:"اسم المكتبة",libraryDesc:"وصف المكتبة",website:"الموقع",placeholder:{authorName:"اسمك أو اسم المستخدم",libraryName:"اسم مكتبتك",libraryDesc:"وصف مكتبتك لمساعدة الناس على فهم استخدامها",githubHandle:"معالج GitHub (اختياري)، حتى تتمكن من تحرير المكتبة عند إرسالها للمراجعة",twitterHandle:"اسم مستخدم تويتر (اختياري)، حتى نعرف من الذي سيتم الإشارة إليه عند الترويج عبر تويتر",website:"رابط إلى موقعك الشخصي أو في مكان آخر (اختياري)"},errors:{required:"مطلوب",website:"أدخل عنوان URL صالح"},noteDescription:"تقديم مكتبتك لتضمينها في مستودع المكتبة العامة <link></link> لأشخاص آخرين لاستخدامها في رسومهم.",noteGuidelines:"تحتاج المكتبة إلى الموافقة أولا. يرجى قراءة <link>المعايير</link> قبل تقديمها. سوف تحتاج إلى حساب GitHub للتواصل وإجراء التغييرات عند الطلب، ولكن ليس مطلوبا بشكل صارم.",noteLicense:"تقديمك يعني موافقتك على نشر المكتبة المقدمة تحت <link>MIT ترخيص</link>، ما يعني أن لأي أحد الحق في استخدامها دون قيود.",noteItems:"يجب أن يكون لكل عنصر مكتبة اسمه الخاص حتى يكون قابلاً للتصفية. سيتم تضمين عناصر المكتبة التالية:",atleastOneLibItem:"يرجى تحديد عنصر مكتبة واحد على الأقل للبدء",republishWarning:"ملاحظة: بعض العناصر المحددة معينة على أنه نشرها أو تقديمها من قبل. يجب عليك فقط إعادة إرسال العناصر عند تحديث مكتبة موجودة أو إرسالها."},E={title:"تم إرسال المكتبة",content:"شكرا لك {{authorName}}. لقد تم إرسال مكتبتك للمراجعة. يمكنك تتبع الحالة"},m={resetLibrary:"إعادة ضبط المكتبة",removeItemsFromLib:"إزالة العناصر المحددة من المكتبة"},b={header:"تصدير الصورة",label:{withBackground:"الخلفية",onlySelected:"المحدد فقط",darkMode:"الوضع الداكن",embedScene:"تضمين المشهد",scale:"الحجم",padding:"الهوامش"},tooltip:{embedScene:`سيتم حفظ بيانات المشهد في ملف PNG/SVG المصدّر بحيث يمكن استعادة المشهد منه.
8
+ سيزيد حجم الملف المصدر.`},title:{exportToPng:"تصدير بصيغة PNG",exportToSvg:"تصدير بصيغة SVG",copyPngToClipboard:"نسخ الـ PNG إلى الحافظة"},button:{exportToPng:"PNG",exportToSvg:"SVG",copyPngToClipboard:"نسخ إلى الحافظة"}},p={tooltip:"رسوماتك مشفرة من النهاية إلى النهاية حتى أن خوادم Excalidraw لن تراها أبدا.",link:"مشاركة المدونة في التشفير من النهاية إلى النهاية في Excalidraw"},g={angle:"الزاوية",element:"عنصر",elements:"العناصر",height:"الارتفاع",scene:"المشهد",selected:"المحدد",storage:"التخزين",title:"إحصائيات للمهووسين",total:"المجموع",version:"الإصدار",versionCopy:"انقر للنسخ",versionNotAvailable:"الإصدار غير متوفر",width:"العرض"},h={addedToLibrary:"تمت الاضافة الى المكتبة!",copyStyles:"نسخت الانماط.",copyToClipboard:"نسخ إلى الحافظة.",copyToClipboardAsPng:`تم نسخ {{exportSelection}} إلى الحافظة بصيغة PNG
9
+ ({{exportColorScheme}})`,fileSaved:"تم حفظ الملف.",fileSavedToFilename:"حفظ باسم {filename}",canvas:"لوحة الرسم",selection:"العنصر المحدد",pasteAsSingleElement:`استخدم {{shortcut}} للصق كعنصر واحد،
10
+ أو لصق في محرر نص موجود`,unableToEmbed:"تضمين هذا الرابط غير مسموح حاليًا. افتح بلاغاً على GitHub لطلب عنوان Url القائمة البيضاء",unrecognizedLinkFormat:"الرابط الذي ضمنته لا يتطابق مع التنسيق المتوقع. الرجاء محاولة لصق النص 'المضمن' المُزوَد من موقع المصدر"},S={transparent:"شفاف",black:"أسود",white:"أبيض",red:"أحمر",pink:"وردي",grape:"عنبي",violet:"بنفسجي",gray:"رمادي",blue:"أزرق",cyan:"سماوي",teal:"أزرق مخضر",green:"أخضر",yellow:"أصفر",orange:"برتقالي",bronze:"برونزي"},y={app:{center_heading:"جميع بياناتك محفوظة محليا في المتصفح الخاص بك.",center_heading_plus:"هل تريد الذهاب إلى Excalidraw+ بدلاً من ذلك؟",menuHint:"التصدير والتفضيلات واللغات ..."},defaults:{menuHint:"التصدير والتفضيلات وغيرها...",center_heading:"الرسم البياني التصويري. بشكل مبسط.",toolbarHint:"اختر أداة و ابدأ الرسم!",helpHint:"الاختصارات و المساعدة"}},v={mostUsedCustomColors:"الألوان المخصصة الأكثر استخداما",colors:"الألوان",shades:"الدرجات",hexCode:"رمز Hex",noShades:"لا تتوفر درجات لهذا اللون"},x={action:{exportToImage:{title:"تصدير كصورة",button:"تصدير كصورة",description:"تصدير بيانات المشهد إلى ملف يمكنك الاستيراد منه لاحقاً."},saveToDisk:{title:"حفظ الملف للجهاز",button:"حفظ الملف للجهاز",description:"تصدير بيانات المشهد إلى ملف يمكنك الاستيراد منه لاحقاً."},excalidrawPlus:{title:"Excalidraw+",button:"تصدير إلى Excalidraw+",description:"حفظ المشهد إلى مساحة العمل +Excalidraw الخاصة بك."}},modal:{loadFromFile:{title:"تحميل من ملف",button:"تحميل من ملف",description:"سيتم التحميل من الملف <bold>استبدال المحتوى الموجود</bold>.<br></br>يمكنك النسخ الاحتياطي لرسمك أولاً باستخدام أحد الخيارات أدناه."},shareableLink:{title:"تحميل من رابط",button:"استبدال محتواي",description:"سيتسبب تحميل رسمة خارجية <bold>باستبدال محتواك الموجود حالياً</bold>.<br></br>بإمكانك إجراء النسخ الاحتياطي لرسمتك الحالية باستخدام أحد الخيارات أدناه."}}},w={title:"",button:"",description:"",syntax:"",preview:""},B={labels:u,library:A,buttons:e,alerts:a,errors:r,toolBar:o,headings:t,hints:i,canvasError:l,errorSplash:F,roomDialog:n,errorDialog:s,exportDialog:D,helpDialog:d,clearCanvasDialog:c,publishDialog:C,publishSuccessDialog:E,confirmDialog:m,imageExportDialog:b,encrypted:p,stats:g,toast:h,colors:S,welcomeScreen:y,colorPicker:v,overwriteConfirm:x,mermaid:w};export{a as alerts,e as buttons,l as canvasError,c as clearCanvasDialog,v as colorPicker,S as colors,m as confirmDialog,B as default,p as encrypted,s as errorDialog,F as errorSplash,r as errors,D as exportDialog,t as headings,d as helpDialog,i as hints,b as imageExportDialog,u as labels,A as library,w as mermaid,x as overwriteConfirm,C as publishDialog,E as publishSuccessDialog,n as roomDialog,g as stats,h as toast,o as toolBar,y as welcomeScreen};
@@ -0,0 +1 @@
1
+ import{w as ln,c as M}from"./path-CbwjOpE9.js";import{K as rn,L as W,M as O,N as un,O as y,P as on,Q as z,R as _,S as an,T as t,V as tn,W as sn,X as fn}from"./index-fTyH8AV3.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function mn(l){return l.endAngle}function pn(l){return l&&l.padAngle}function dn(l,h,D,S,v,R,N,r){var E=D-l,i=S-h,n=N-v,m=r-R,u=m*E-n*i;if(!(u*u<y))return u=(n*(h-R)-m*(l-v))/u,[l+u*E,h+u*i]}function J(l,h,D,S,v,R,N){var r=l-D,E=h-S,i=(N?R:-R)/z(r*r+E*E),n=i*E,m=-i*r,u=l+n,s=h+m,f=D+n,c=S+m,Q=(u+f)/2,o=(s+c)/2,p=f-u,g=c-s,A=p*p+g*g,T=v-R,P=u*c-f*s,I=(g<0?-1:1)*z(tn(0,T*T*A-P*P)),K=(P*g-p*I)/A,L=(-P*p-g*I)/A,w=(P*g+p*I)/A,d=(-P*p+g*I)/A,x=K-Q,e=L-o,a=w-Q,V=d-o;return x*x+e*e>a*a+V*V&&(K=w,L=d),{cx:K,cy:L,x01:-n,y01:-m,x11:K*(v/T-1),y11:L*(v/T-1)}}function vn(){var l=cn,h=yn,D=M(0),S=null,v=gn,R=mn,N=pn,r=null,E=ln(i);function i(){var n,m,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,Q=an(c-f),o=c>f;if(r||(r=n=E()),s<u&&(m=s,s=u,u=m),!(s>y))r.moveTo(0,0);else if(Q>on-y)r.moveTo(s*W(f),s*O(f)),r.arc(0,0,s,f,c,!o),u>y&&(r.moveTo(u*W(c),u*O(c)),r.arc(0,0,u,c,f,o));else{var p=f,g=c,A=f,T=c,P=Q,I=Q,K=N.apply(this,arguments)/2,L=K>y&&(S?+S.apply(this,arguments):z(u*u+s*s)),w=_(an(s-u)/2,+D.apply(this,arguments)),d=w,x=w,e,a;if(L>y){var V=sn(L/u*O(K)),B=sn(L/s*O(K));(P-=V*2)>y?(V*=o?1:-1,A+=V,T-=V):(P=0,A=T=(f+c)/2),(I-=B*2)>y?(B*=o?1:-1,p+=B,g-=B):(I=0,p=g=(f+c)/2)}var X=s*W(p),j=s*O(p),C=u*W(T),F=u*O(T);if(w>y){var G=s*W(g),H=s*O(g),U=u*W(A),Y=u*O(A),q;if(Q<rn)if(q=dn(X,j,U,Y,G,H,C,F)){var Z=X-q[0],$=j-q[1],k=G-q[0],b=H-q[1],nn=1/O(fn((Z*k+$*b)/(z(Z*Z+$*$)*z(k*k+b*b)))/2),en=z(q[0]*q[0]+q[1]*q[1]);d=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else d=x=0}I>y?x>y?(e=J(U,Y,X,j,s,x,o),a=J(G,H,C,F,s,x,o),r.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?r.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(a.y01,a.x01),!o):(r.arc(e.cx,e.cy,x,t(e.y01,e.x01),t(e.y11,e.x11),!o),r.arc(0,0,s,t(e.cy+e.y11,e.cx+e.x11),t(a.cy+a.y11,a.cx+a.x11),!o),r.arc(a.cx,a.cy,x,t(a.y11,a.x11),t(a.y01,a.x01),!o))):(r.moveTo(X,j),r.arc(0,0,s,p,g,!o)):r.moveTo(X,j),!(u>y)||!(P>y)?r.lineTo(C,F):d>y?(e=J(C,F,G,H,u,-d,o),a=J(X,j,U,Y,u,-d,o),r.lineTo(e.cx+e.x01,e.cy+e.y01),d<w?r.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(a.y01,a.x01),!o):(r.arc(e.cx,e.cy,d,t(e.y01,e.x01),t(e.y11,e.x11),!o),r.arc(0,0,u,t(e.cy+e.y11,e.cx+e.x11),t(a.cy+a.y11,a.cx+a.x11),o),r.arc(a.cx,a.cy,d,t(a.y11,a.x11),t(a.y01,a.x01),!o))):r.arc(0,0,u,T,A,o)}if(r.closePath(),n)return r=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,m=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-rn/2;return[W(m)*n,O(m)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:M(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:M(+n),i):h},i.cornerRadius=function(n){return arguments.length?(D=typeof n=="function"?n:M(+n),i):D},i.padRadius=function(n){return arguments.length?(S=n==null?null:typeof n=="function"?n:M(+n),i):S},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:M(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:M(+n),i):R},i.padAngle=function(n){return arguments.length?(N=typeof n=="function"?n:M(+n),i):N},i.context=function(n){return arguments.length?(r=n??null,i):r},i}export{vn as d};
@@ -0,0 +1,36 @@
1
+ import{p as qe}from"./chunk-JWPE2WC7-7twsn51D.js";import{_ as ct,D as Qe,S as Je,l as Fe,b as Ke,a as je,o as _e,p as tr,g as er,s as rr,q as ir,A as ar,y as nr,B as or,c as Ee,aI as Te,Y as pe,i as sr,r as hr,$ as lr,aJ as fr}from"./index-Biw8Vgb3.js";import{p as cr}from"./cynefin-OW5HDTMX-B8XT9png.js";import{c as be}from"./cytoscape.esm-BjAbmLdb.js";import{ad as gr,d as ur}from"./index-fTyH8AV3.js";import"./line-V0o6yOnB.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./union-DI_iry4-.js";var he={exports:{}},le={exports:{}},fe={exports:{}},dr=fe.exports,De;function vr(){return De||(De=1,(function(I,M){(function(x,N){I.exports=N()})(dr,function(){return(function(C){var x={};function N(v){if(x[v])return x[v].exports;var l=x[v]={i:v,l:!1,exports:{}};return C[v].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=C,N.c=x,N.i=function(v){return v},N.d=function(v,l,n){N.o(v,l)||Object.defineProperty(v,l,{configurable:!1,enumerable:!0,get:n})},N.n=function(v){var l=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(l,"a",l),l},N.o=function(v,l){return Object.prototype.hasOwnProperty.call(v,l)},N.p="",N(N.s=28)})([(function(C,x,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,C.exports=v}),(function(C,x,N){var v=N(2),l=N(8),n=N(9);function r(f,e,g){v.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var i in v)r[i]=v[i];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.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"},r.prototype.getOtherEndInGraph=function(f,e){for(var g=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(g.getOwner()==e)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=r}),(function(C,x,N){function v(l){this.vGraphObject=l}C.exports=v}),(function(C,x,N){var v=N(2),l=N(10),n=N(13),r=N(0),i=N(16),f=N(5);function e(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new n(s.x,s.y,o.width,o.height):this.rect=new n}e.prototype=Object.create(v.prototype);for(var g in v)e[g]=v[g];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.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},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.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},e.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},e.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},e.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),h=0;h<c.length;h++)s=c[h],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},e.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},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.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)},e.prototype.scatter=function(){var t,s,o=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+i.nextDouble()*(c-o)+o;var h=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+i.nextDouble()*(T-h)+h,this.rect.x=t,this.rect.y=s},e.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()),r.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))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=e}),(function(C,x,N){var v=N(0);function l(){}for(var n in v)l[n]=v[n];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=l}),(function(C,x,N){function v(l,n){l==null&&n==null?(this.x=0,this.y=0):(this.x=l,this.y=n)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(l){this.x=l},v.prototype.setY=function(l){this.y=l},v.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},C.exports=v}),(function(C,x,N){var v=N(2),l=N(10),n=N(0),r=N(7),i=N(3),f=N(1),e=N(13),g=N(12),t=N(11);function s(c,h,T){v.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[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,h,T){if(h==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 d=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(d.source=h,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),T!=h&&T.edges.push(d),d)}},s.prototype.remove=function(c){var h=c;if(c instanceof i){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),u,d=T.length,L=0;L<d;L++)u=T[L],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var b=this.nodes.indexOf(h);if(b==-1)throw"Node not in owner node list!";this.nodes.splice(b,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 w=u.source.edges.indexOf(u),G=u.target.edges.indexOf(u);if(!(w>-1&&G>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(w,1),u.target!=u.source&&u.target.edges.splice(G,1);var b=u.source.owner.getEdges().indexOf(u);if(b==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,u,d,L=this.getNodes(),b=L.length,w=0;w<b;w++){var G=L[w];T=G.getTop(),u=G.getLeft(),c>T&&(c=T),h>u&&(h=u)}return c==l.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=c-d,new g(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,u=l.MAX_VALUE,d=-l.MAX_VALUE,L,b,w,G,V,Y=this.nodes,B=Y.length,A=0;A<B;A++){var j=Y[A];c&&j.child!=null&&j.updateBounds(),L=j.getLeft(),b=j.getRight(),w=j.getTop(),G=j.getBottom(),h>L&&(h=L),T<b&&(T=b),u>w&&(u=w),d<G&&(d=G)}var a=new e(h,u,T-h,d-u);h==l.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),Y[0].getParent().paddingLeft!=null?V=Y[0].getParent().paddingLeft:V=this.margin,this.left=a.x-V,this.right=a.x+a.width+V,this.top=a.y-V,this.bottom=a.y+a.height+V},s.calculateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,u=l.MAX_VALUE,d=-l.MAX_VALUE,L,b,w,G,V=c.length,Y=0;Y<V;Y++){var B=c[Y];L=B.getLeft(),b=B.getRight(),w=B.getTop(),G=B.getBottom(),h>L&&(h=L),T<b&&(T=b),u>w&&(u=w),d<G&&(d=G)}var A=new e(h,u,T-h,d-u);return A},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==l.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,h=this.nodes,T=h.length,u=0;u<T;u++){var d=h[u];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=n.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 h=new t,T=new Set,u=this.nodes[0],d,L,b=u.withChildren();for(b.forEach(function(A){h.push(A),T.add(A)});h.length!==0;){u=h.shift(),d=u.getEdges();for(var w=d.length,G=0;G<w;G++){var V=d[G];if(L=V.getOtherEndInGraph(u,this),L!=null&&!T.has(L)){var Y=L.withChildren();Y.forEach(function(A){h.push(A),T.add(A)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var B=0;T.forEach(function(A){A.owner==c&&B++}),B==this.nodes.length&&(this.isConnected=!0)}},C.exports=s}),(function(C,x,N){var v,l=N(1);function n(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var r=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(r,i);return this.setRootGraph(f),this.rootGraph},n.prototype.add=function(r,i,f,e,g){if(f==null&&e==null&&g==null){if(r==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return r.parent=i,i.child=r,r}else{g=f,e=i,f=r;var t=e.getOwner(),s=g.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,e,g);if(f.isInterGraph=!0,f.source=e,f.target=g,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}},n.prototype.remove=function(r){if(r instanceof v){var i=r;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 e,g=f.length,t=0;t<g;t++)e=f[t],i.remove(e);var s=[];s=s.concat(i.getNodes());var o;g=s.length;for(var t=0;t<g;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(r instanceof l){if(e=r,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var c=e.source.edges.indexOf(e);if(e.source.edges.splice(c,1),c=e.target.edges.indexOf(e),e.target.edges.splice(c,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var c=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(c,1)}},n.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},n.prototype.getGraphs=function(){return this.graphs},n.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],i=this.getGraphs(),f=i.length,e=0;e<f;e++)r=r.concat(i[e].getNodes());this.allNodes=r}return this.allNodes},n.prototype.resetAllNodes=function(){this.allNodes=null},n.prototype.resetAllEdges=function(){this.allEdges=null},n.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},n.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],i=this.getGraphs();i.length;for(var f=0;f<i.length;f++)r=r.concat(i[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},n.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},n.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},n.prototype.getRoot=function(){return this.rootGraph},n.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},n.prototype.getLayout=function(){return this.layout},n.prototype.isOneAncestorOfOther=function(r,i){if(!(r!=null&&i!=null))throw"assert failed";if(r==i)return!0;var f=r.getOwner(),e;do{if(e=f.getParent(),e==null)break;if(e==i)return!0;if(f=e.getOwner(),f==null)break}while(!0);f=i.getOwner();do{if(e=f.getParent(),e==null)break;if(e==r)return!0;if(f=e.getOwner(),f==null)break}while(!0);return!1},n.prototype.calcLowestCommonAncestors=function(){for(var r,i,f,e,g,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(r=t[o],i=r.source,f=r.target,r.lca=null,r.sourceInLca=i,r.targetInLca=f,i==f){r.lca=i.getOwner();continue}for(e=i.getOwner();r.lca==null;){for(r.targetInLca=f,g=f.getOwner();r.lca==null;){if(g==e){r.lca=g;break}if(g==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=g.getParent(),g=r.targetInLca.getOwner()}if(e==this.rootGraph)break;r.lca==null&&(r.sourceInLca=e.getParent(),e=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},n.prototype.calcLowestCommonAncestor=function(r,i){if(r==i)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var e=i.getOwner();do{if(e==null)break;if(e==f)return e;e=e.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},n.prototype.calcInclusionTreeDepths=function(r,i){r==null&&i==null&&(r=this.rootGraph,i=1);for(var f,e=r.getNodes(),g=e.length,t=0;t<g;t++)f=e[t],f.inclusionTreeDepth=i,f.child!=null&&this.calcInclusionTreeDepths(f.child,i+1)},n.prototype.includesInvalidEdge=function(){for(var r,i=[],f=this.edges.length,e=0;e<f;e++)r=this.edges[e],this.isOneAncestorOfOther(r.source,r.target)&&i.push(r);for(var e=0;e<i.length;e++)this.remove(i[e]);return!1},C.exports=n}),(function(C,x,N){var v=N(12);function l(){}l.calcSeparationAmount=function(n,r,i,f){if(!n.intersects(r))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(n,r,e),i[0]=Math.min(n.getRight(),r.getRight())-Math.max(n.x,r.x),i[1]=Math.min(n.getBottom(),r.getBottom())-Math.max(n.y,r.y),n.getX()<=r.getX()&&n.getRight()>=r.getRight()?i[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(i[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?i[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(i[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var g=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(g=1);var t=g*i[0],s=i[1]/g;i[0]<s?s=i[0]:t=i[1],i[0]=-1*e[0]*(s/2+f),i[1]=-1*e[1]*(t/2+f)},l.decideDirectionsForOverlappingNodes=function(n,r,i){n.getCenterX()<r.getCenterX()?i[0]=-1:i[0]=1,n.getCenterY()<r.getCenterY()?i[1]=-1:i[1]=1},l.getIntersection2=function(n,r,i){var f=n.getCenterX(),e=n.getCenterY(),g=r.getCenterX(),t=r.getCenterY();if(n.intersects(r))return i[0]=f,i[1]=e,i[2]=g,i[3]=t,!0;var s=n.getX(),o=n.getY(),c=n.getRight(),h=n.getX(),T=n.getBottom(),u=n.getRight(),d=n.getWidthHalf(),L=n.getHeightHalf(),b=r.getX(),w=r.getY(),G=r.getRight(),V=r.getX(),Y=r.getBottom(),B=r.getRight(),A=r.getWidthHalf(),j=r.getHeightHalf(),a=!1,E=!1;if(f===g){if(e>t)return i[0]=f,i[1]=o,i[2]=g,i[3]=Y,!1;if(e<t)return i[0]=f,i[1]=T,i[2]=g,i[3]=w,!1}else if(e===t){if(f>g)return i[0]=s,i[1]=e,i[2]=G,i[3]=t,!1;if(f<g)return i[0]=c,i[1]=e,i[2]=b,i[3]=t,!1}else{var p=n.height/n.width,m=r.height/r.width,y=(t-e)/(g-f),S=void 0,D=void 0,F=void 0,W=void 0,R=void 0,Q=void 0;if(-p===y?f>g?(i[0]=h,i[1]=T,a=!0):(i[0]=c,i[1]=o,a=!0):p===y&&(f>g?(i[0]=s,i[1]=o,a=!0):(i[0]=u,i[1]=T,a=!0)),-m===y?g>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=G,i[3]=w,E=!0):m===y&&(g>f?(i[2]=b,i[3]=w,E=!0):(i[2]=B,i[3]=Y,E=!0)),a&&E)return!1;if(f>g?e>t?(S=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(S=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):e>t?(S=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(S=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!a)switch(S){case 1:W=o,F=f+-L/y,i[0]=F,i[1]=W;break;case 2:F=u,W=e+d*y,i[0]=F,i[1]=W;break;case 3:W=T,F=f+L/y,i[0]=F,i[1]=W;break;case 4:F=h,W=e+-d*y,i[0]=F,i[1]=W;break}if(!E)switch(D){case 1:Q=w,R=g+-j/y,i[2]=R,i[3]=Q;break;case 2:R=B,Q=t+A*y,i[2]=R,i[3]=Q;break;case 3:Q=Y,R=g+j/y,i[2]=R,i[3]=Q;break;case 4:R=V,Q=t+-A*y,i[2]=R,i[3]=Q;break}}return!1},l.getCardinalDirection=function(n,r,i){return n>r?i:1+i%4},l.getIntersection=function(n,r,i,f){if(f==null)return this.getIntersection2(n,r,i);var e=n.x,g=n.y,t=r.x,s=r.y,o=i.x,c=i.y,h=f.x,T=f.y,u=void 0,d=void 0,L=void 0,b=void 0,w=void 0,G=void 0,V=void 0,Y=void 0,B=void 0;return L=s-g,w=e-t,V=t*g-e*s,b=T-c,G=o-h,Y=h*c-o*T,B=L*G-b*w,B===0?null:(u=(w*Y-G*V)/B,d=(b*V-L*Y)/B,new v(u,d))},l.angleOfVector=function(n,r,i,f){var e=void 0;return n!==i?(e=Math.atan((f-r)/(i-n)),i<n?e+=Math.PI:f<r&&(e+=this.TWO_PI)):f<r?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},l.doIntersect=function(n,r,i,f){var e=n.x,g=n.y,t=r.x,s=r.y,o=i.x,c=i.y,h=f.x,T=f.y,u=(t-e)*(T-c)-(h-o)*(s-g);if(u===0)return!1;var d=((T-c)*(h-e)+(o-h)*(T-g))/u,L=((g-s)*(h-e)+(t-e)*(T-g))/u;return 0<d&&d<1&&0<L&&L<1},l.findCircleLineIntersections=function(n,r,i,f,e,g,t){var s=(i-n)*(i-n)+(f-r)*(f-r),o=2*((n-e)*(i-n)+(r-g)*(f-r)),c=(n-e)*(n-e)+(r-g)*(r-g)-t*t,h=o*o-4*s*c;if(h>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),u=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,C.exports=l}),(function(C,x,N){function v(){}v.sign=function(l){return l>0?1:l<0?-1:0},v.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},v.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},C.exports=v}),(function(C,x,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,C.exports=v}),(function(C,x,N){var v=(function(){function e(g,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(g,o.key,o)}}return function(g,t,s){return t&&e(g.prototype,t),s&&e(g,s),g}})();function l(e,g){if(!(e instanceof g))throw new TypeError("Cannot call a class as a function")}var n=function(g){return{value:g,next:null,prev:null}},r=function(g,t,s,o){return g!==null?g.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=g,t.next=s,o.length++,t},i=function(g,t){var s=g.prev,o=g.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,g.prev=g.next=null,t.length--,g},f=(function(){function e(g){var t=this;l(this,e),this.length=0,this.head=null,this.tail=null,g!=null&&g.forEach(function(s){return t.push(s)})}return v(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,n(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,n(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,n(t),null,this)}},{key:"unshift",value:function(t){return r(null,n(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}}}]),e})();C.exports=f}),(function(C,x,N){function v(l,n,r){this.x=null,this.y=null,l==null&&n==null&&r==null?(this.x=0,this.y=0):typeof l=="number"&&typeof n=="number"&&r==null?(this.x=l,this.y=n):l.constructor.name=="Point"&&n==null&&r==null&&(r=l,this.x=r.x,this.y=r.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(l,n,r){l.constructor.name=="Point"&&n==null&&r==null?(r=l,this.setLocation(r.x,r.y)):typeof l=="number"&&typeof n=="number"&&r==null&&(parseInt(l)==l&&parseInt(n)==n?this.move(l,n):(this.x=Math.floor(l+.5),this.y=Math.floor(n+.5)))},v.prototype.move=function(l,n){this.x=l,this.y=n},v.prototype.translate=function(l,n){this.x+=l,this.y+=n},v.prototype.equals=function(l){if(l.constructor.name=="Point"){var n=l;return this.x==n.x&&this.y==n.y}return this==l},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},C.exports=v}),(function(C,x,N){function v(l,n,r,i){this.x=0,this.y=0,this.width=0,this.height=0,l!=null&&n!=null&&r!=null&&i!=null&&(this.x=l,this.y=n,this.width=r,this.height=i)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(l){this.x=l},v.prototype.getY=function(){return this.y},v.prototype.setY=function(l){this.y=l},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(l){this.width=l},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(l){this.height=l},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(l){return!(this.getRight()<l.x||this.getBottom()<l.y||l.getRight()<this.x||l.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},C.exports=v}),(function(C,x,N){var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n};function l(){}l.lastID=0,l.createID=function(n){return l.isPrimitive(n)?n:(n.uniqueID!=null||(n.uniqueID=l.getString(),l.lastID++),n.uniqueID)},l.getString=function(n){return n==null&&(n=l.lastID),"Object#"+n},l.isPrimitive=function(n){var r=typeof n>"u"?"undefined":v(n);return n==null||r!="object"&&r!="function"},C.exports=l}),(function(C,x,N){function v(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c<o.length;c++)h[c]=o[c];return h}else return Array.from(o)}var l=N(0),n=N(7),r=N(3),i=N(1),f=N(6),e=N(5),g=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=l.QUALITY,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=l.DEFAULT_INCREMENTAL,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new n(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 n(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 r(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(),l.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 h=this.graphManager.getRoot().getNodes(),c=0;c<h.length;c++)h[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var c=o;if(c.getChild()!=null)for(var h=c.getChild().getNodes(),T=0;T<h.length;T++)update(h[T]);if(c.vGraphObject!=null){var u=c.vGraphObject;u.update(c)}}else if(o instanceof i){var d=o;if(d.vGraphObject!=null){var L=d.vGraphObject;L.update(d)}}else if(o instanceof f){var b=o;if(b.vGraphObject!=null){var w=b.vGraphObject;w.update(b)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=l.QUALITY,this.animationDuringLayout=l.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=l.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=l.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=l.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=l.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=l.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new e(0,0));else{var c=new g,h=this.graphManager.getRoot().updateLeftTop();if(h!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(h.x),c.setDeviceOrgY(h.y);for(var T=this.getAllNodes(),u,d=0;d<T.length;d++)u=T[d],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,h,T=o.getNodes(),u=0;u<T.length;u++)c=T[u],h=c.getChild(),h==null||h.getNodes().length==0?c.scatter():(this.positionNodesRandomly(h),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,h=this.graphManager.getRoot().getNodes(),T=!0,u=0;u<h.length;u++)h[u].getChild()!=null&&(T=!1);if(!T)return o;var d=new Set,L=[],b=new Map,w=[];for(w=w.concat(h);w.length>0&&c;){for(L.push(w[0]);L.length>0&&c;){var G=L[0];L.splice(0,1),d.add(G);for(var V=G.getEdges(),u=0;u<V.length;u++){var Y=V[u].getOtherEnd(G);if(b.get(G)!=Y)if(!d.has(Y))L.push(Y),b.set(Y,G);else{c=!1;break}}}if(!c)o=[];else{var B=[].concat(v(d));o.push(B);for(var u=0;u<B.length;u++){var A=B[u],j=w.indexOf(A);j>-1&&w.splice(j,1)}d=new Set,b=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u<o.bendpoints.length;u++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var L=this.newEdge(null);this.graphManager.add(L,h,d),c.add(d),h=d}var L=this.newEdge(null);return this.graphManager.add(L,h,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(v(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var h=o[c];if(h.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(h),u=0;u<T.length;u++){var d=T[u],L=new e(d.getCenterX(),d.getCenterY()),b=h.bendpoints.get(u);b.x=L.x,b.y=L.y,d.getOwner().remove(d)}this.graphManager.add(h,h.source,h.target)}}},s.transform=function(o,c,h,T){if(h!=null&&T!=null){var u=c;if(o<=50){var d=c/h;u-=(c-d)/50*(50-o)}else{var L=c*T;u+=(L-c)/50*(o-50)}return u}else{var b,w;return o<=50?(b=9*c/500,w=c/10):(b=9*c/50,w=-8*c),b*o+w}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var h=[],T=new Map,u=!1,d=null;(c.length==1||c.length==2)&&(u=!0,d=c[0]);for(var L=0;L<c.length;L++){var b=c[L],w=b.getNeighborsList().size;T.set(b,b.getNeighborsList().size),w==1&&h.push(b)}var G=[];for(G=G.concat(h);!u;){var V=[];V=V.concat(G),G=[];for(var L=0;L<c.length;L++){var b=c[L],Y=c.indexOf(b);Y>=0&&c.splice(Y,1);var B=b.getNeighborsList();B.forEach(function(a){if(h.indexOf(a)<0){var E=T.get(a),p=E-1;p==1&&G.push(a),T.set(a,p)}})}h=h.concat(G),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},C.exports=s}),(function(C,x,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},C.exports=v}),(function(C,x,N){var v=N(5);function l(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(n){this.lworldExtX=n},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(n){this.lworldExtY=n},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},l.prototype.transformX=function(n){var r=0,i=this.lworldExtX;return i!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/i),r},l.prototype.transformY=function(n){var r=0,i=this.lworldExtY;return i!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/i),r},l.prototype.inverseTransformX=function(n){var r=0,i=this.ldeviceExtX;return i!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/i),r},l.prototype.inverseTransformY=function(n){var r=0,i=this.ldeviceExtY;return i!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/i),r},l.prototype.inverseTransformPoint=function(n){var r=new v(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},C.exports=l}),(function(C,x,N){function v(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 l=N(15),n=N(4),r=N(0),i=N(8),f=N(9);function e(){l.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}e.prototype=Object.create(l.prototype);for(var g in l)e[g]=l[g];e.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,h,T,u,d=this.getGraphManager().getAllEdges(),L=0;L<d.length;L++)t=d[L],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),h=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),u=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+u-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+h.getInclusionTreeDepth()-2*o))},e.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},e.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,h,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;o<u.length;o++)h=u[o],this.calculateRepulsionForceOfANode(h,d,t,s),d.add(h);else for(o=0;o<u.length;o++)for(h=u[o],c=o+1;c<u.length;c++)T=u[c],h.getOwner()==T.getOwner()&&this.calcRepulsionForce(h,T)},e.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},e.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},e.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),h,T,u,d;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;h=t.getLength(),h!=0&&(T=t.edgeElasticity*(h-s),u=T*(t.lengthX/h),d=T*(t.lengthY/h),o.springForceX+=u,o.springForceY+=d,c.springForceX-=u,c.springForceY-=d)},e.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),h=new Array(2),T=new Array(4),u,d,L,b,w,G,V;if(o.intersects(c)){i.calcSeparationAmount(o,c,h,n.DEFAULT_EDGE_LENGTH/2),G=2*h[0],V=2*h[1];var Y=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=Y*G,t.repulsionForceY-=Y*V,s.repulsionForceX+=Y*G,s.repulsionForceY+=Y*V}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(u=c.getCenterX()-o.getCenterX(),d=c.getCenterY()-o.getCenterY()):(i.getIntersection(o,c,T),u=T[2]-T[0],d=T[3]-T[1]),Math.abs(u)<n.MIN_REPULSION_DIST&&(u=f.sign(u)*n.MIN_REPULSION_DIST),Math.abs(d)<n.MIN_REPULSION_DIST&&(d=f.sign(d)*n.MIN_REPULSION_DIST),L=u*u+d*d,b=Math.sqrt(L),w=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/L,G=w*u/b,V=w*d/b,t.repulsionForceX-=G,t.repulsionForceY-=V,s.repulsionForceX+=G,s.repulsionForceY+=V},e.prototype.calcGravitationalForce=function(t){var s,o,c,h,T,u,d,L;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,h=t.getCenterX()-o,T=t.getCenterY()-c,u=Math.abs(h)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(L=s.getEstimatedSize()*this.gravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.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},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},e.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),h=0;h<s;h++)c[h]=new Array(o);for(var h=0;h<s;h++)for(var T=0;T<o;T++)c[h][T]=new Array;return c},e.prototype.addNodeToGrid=function(t,s,o){var c=0,h=0,T=0,u=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),h=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 d=c;d<=h;d++)for(var L=T;L<=u;L++)this.grid[d][L].push(t),t.setGridCoordinates(c,h,T,u)},e.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())},e.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var h=new Set;t.surrounding=new Array;for(var T,u=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var L=t.startY-1;L<t.finishY+2;L++)if(!(d<0||L<0||d>=u.length||L>=u[0].length)){for(var b=0;b<u[d][L].length;b++)if(T=u[d][L][b],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!h.has(T)){var w=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),G=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);w<=this.repulsionRange&&G<=this.repulsionRange&&h.add(T)}}t.surrounding=[].concat(v(h))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},e.prototype.calcRepulsionRange=function(){return 0},C.exports=e}),(function(C,x,N){var v=N(1),l=N(4);function n(i,f,e){v.call(this,i,f,e),this.idealLength=l.DEFAULT_EDGE_LENGTH,this.edgeElasticity=l.DEFAULT_SPRING_STRENGTH}n.prototype=Object.create(v.prototype);for(var r in v)n[r]=v[r];C.exports=n}),(function(C,x,N){var v=N(3),l=N(4);function n(i,f,e,g){v.call(this,i,f,e,g),this.nodeRepulsion=l.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=[]}n.prototype=Object.create(v.prototype);for(var r in v)n[r]=v[r];n.prototype.setGridCoordinates=function(i,f,e,g){this.startX=i,this.finishX=f,this.startY=e,this.finishY=g},C.exports=n}),(function(C,x,N){function v(l,n){this.width=0,this.height=0,l!==null&&n!==null&&(this.height=n,this.width=l)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(l){this.width=l},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(l){this.height=l},C.exports=v}),(function(C,x,N){var v=N(14);function l(){this.map={},this.keys=[]}l.prototype.put=function(n,r){var i=v.createID(n);this.contains(i)||(this.map[i]=r,this.keys.push(n))},l.prototype.contains=function(n){return v.createID(n),this.map[n]!=null},l.prototype.get=function(n){var r=v.createID(n);return this.map[r]},l.prototype.keySet=function(){return this.keys},C.exports=l}),(function(C,x,N){var v=N(14);function l(){this.set={}}l.prototype.add=function(n){var r=v.createID(n);this.contains(r)||(this.set[r]=n)},l.prototype.remove=function(n){delete this.set[v.createID(n)]},l.prototype.clear=function(){this.set={}},l.prototype.contains=function(n){return this.set[v.createID(n)]==n},l.prototype.isEmpty=function(){return this.size()===0},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAllTo=function(n){for(var r=Object.keys(this.set),i=r.length,f=0;f<i;f++)n.push(this.set[r[f]])},l.prototype.size=function(){return Object.keys(this.set).length},l.prototype.addAll=function(n){for(var r=n.length,i=0;i<r;i++){var f=n[i];this.add(f)}},C.exports=l}),(function(C,x,N){function v(){}v.multMat=function(l,n){for(var r=[],i=0;i<l.length;i++){r[i]=[];for(var f=0;f<n[0].length;f++){r[i][f]=0;for(var e=0;e<l[0].length;e++)r[i][f]+=l[i][e]*n[e][f]}}return r},v.transpose=function(l){for(var n=[],r=0;r<l[0].length;r++){n[r]=[];for(var i=0;i<l.length;i++)n[r][i]=l[i][r]}return n},v.multCons=function(l,n){for(var r=[],i=0;i<l.length;i++)r[i]=l[i]*n;return r},v.minusOp=function(l,n){for(var r=[],i=0;i<l.length;i++)r[i]=l[i]-n[i];return r},v.dotProduct=function(l,n){for(var r=0,i=0;i<l.length;i++)r+=l[i]*n[i];return r},v.mag=function(l){return Math.sqrt(this.dotProduct(l,l))},v.normalize=function(l){for(var n=[],r=this.mag(l),i=0;i<l.length;i++)n[i]=l[i]/r;return n},v.multGamma=function(l){for(var n=[],r=0,i=0;i<l.length;i++)r+=l[i];r*=-1/l.length;for(var f=0;f<l.length;f++)n[f]=r+l[f];return n},v.multL=function(l,n,r){for(var i=[],f=[],e=[],g=0;g<n[0].length;g++){for(var t=0,s=0;s<n.length;s++)t+=-.5*n[s][g]*l[s];f[g]=t}for(var o=0;o<r.length;o++){for(var c=0,h=0;h<r.length;h++)c+=r[o][h]*f[h];e[o]=c}for(var T=0;T<n.length;T++){for(var u=0,d=0;d<n[0].length;d++)u+=n[T][d]*e[d];i[T]=u}return i},C.exports=v}),(function(C,x,N){var v=(function(){function i(f,e){for(var g=0;g<e.length;g++){var t=e[g];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,e,g){return e&&i(f.prototype,e),g&&i(f,g),f}})();function l(i,f){if(!(i instanceof f))throw new TypeError("Cannot call a class as a function")}var n=N(11),r=(function(){function i(f,e){l(this,i),(e!==null||e!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var g=void 0;f instanceof n?g=f.size():g=f.length,this._quicksort(f,0,g-1)}return v(i,[{key:"_quicksort",value:function(e,g,t){if(g<t){var s=this._partition(e,g,t);this._quicksort(e,g,s),this._quicksort(e,s+1,t)}}},{key:"_partition",value:function(e,g,t){for(var s=this._get(e,g),o=g,c=t;;){for(;this.compareFunction(s,this._get(e,c));)c--;for(;this.compareFunction(this._get(e,o),s);)o++;if(o<c)this._swap(e,o,c),o++,c--;else return c}}},{key:"_get",value:function(e,g){return e instanceof n?e.get_object_at(g):e[g]}},{key:"_set",value:function(e,g,t){e instanceof n?e.set_object_at(g,t):e[g]=t}},{key:"_swap",value:function(e,g,t){var s=this._get(e,g);this._set(e,g,this._get(e,t)),this._set(e,t,s)}},{key:"_defaultCompareFunction",value:function(e,g){return g>e}}]),i})();C.exports=r}),(function(C,x,N){function v(){}v.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var n=Math.min(this.m,this.n);this.s=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var wt=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 wt(Tt)})([this.m,n]),this.V=(function(Tt){var wt=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 wt(Tt)})([this.n,this.n]);for(var r=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(this.n),i=(function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt})(this.m),f=!0,e=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(e,g);t++){if(t<e){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=v.hypot(this.s[t],l[s][t]);if(this.s[t]!==0){l[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)l[o][t]/=this.s[t];l[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,wt){return Tt&&wt})(t<e,this.s[t]!==0)){for(var h=0,T=t;T<this.m;T++)h+=l[T][t]*l[T][c];h=-h/l[t][t];for(var u=t;u<this.m;u++)l[u][c]+=h*l[u][t]}r[c]=l[t][c]}if((function(Tt,wt){return wt})(f,t<e))for(var d=t;d<this.m;d++)this.U[d][t]=l[d][t];if(t<g){r[t]=0;for(var L=t+1;L<this.n;L++)r[t]=v.hypot(r[t],r[L]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var b=t+1;b<this.n;b++)r[b]/=r[t];r[t+1]+=1}if(r[t]=-r[t],(function(Tt,wt){return Tt&&wt})(t+1<this.m,r[t]!==0)){for(var w=t+1;w<this.m;w++)i[w]=0;for(var G=t+1;G<this.n;G++)for(var V=t+1;V<this.m;V++)i[V]+=r[G]*l[V][G];for(var Y=t+1;Y<this.n;Y++)for(var B=-r[Y]/r[t+1],A=t+1;A<this.m;A++)l[A][Y]+=B*i[A]}for(var j=t+1;j<this.n;j++)this.V[j][t]=r[j]}}var a=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=l[e][e]),this.m<a&&(this.s[a-1]=0),g+1<a&&(r[g]=l[g][a-1]),r[a-1]=0;{for(var E=e;E<n;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=e-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<n;y++){for(var S=0,D=m;D<this.m;D++)S+=this.U[D][m]*this.U[D][y];S=-S/this.U[m][m];for(var F=m;F<this.m;F++)this.U[F][y]+=S*this.U[F][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var R=0;R<m-1;R++)this.U[R][m]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][m]=0;this.U[m][m]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,wt){return Tt&&wt})(z<g,r[z]!==0))for(var X=z+1;X<n;X++){for(var rt=0,$=z+1;$<this.n;$++)rt+=this.V[$][z]*this.V[$][X];rt=-rt/this.V[z+1][z];for(var O=z+1;O<this.n;O++)this.V[O][X]+=rt*this.V[O][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var Z=a-1,tt=Math.pow(2,-52),ht=Math.pow(2,-966);a>0;){var J=void 0,It=void 0;for(J=a-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===a-2)It=4;else{var Nt=void 0;for(Nt=a-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==a?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===a-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=r[a-2];r[a-2]=0;for(var ut=a-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),Ct=this.s[ut]/Et,Dt=it/Et;this.s[ut]=Et,ut!==J&&(it=-Dt*r[ut-1],r[ut-1]=Ct*r[ut-1]);for(var mt=0;mt<this.n;mt++)Et=Ct*this.V[mt][ut]+Dt*this.V[mt][a-1],this.V[mt][a-1]=-Dt*this.V[mt][ut]+Ct*this.V[mt][a-1],this.V[mt][ut]=Et}}break;case 2:{var Ot=r[J-1];r[J-1]=0;for(var Rt=J;Rt<a;Rt++){var Ht=v.hypot(this.s[Rt],Ot),Ut=this.s[Rt]/Ht,Pt=Ot/Ht;this.s[Rt]=Ht,Ot=-Pt*r[Rt],r[Rt]=Ut*r[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[a-1]),Math.abs(this.s[a-2])),Math.abs(r[a-2])),Math.abs(this.s[J])),Math.abs(r[J])),Vt=this.s[a-1]/Yt,P=this.s[a-2]/Yt,U=r[a-2]/Yt,k=this.s[J]/Yt,K=r[J]/Yt,q=((P+Vt)*(P-Vt)+U*U)/2,at=Vt*U*(Vt*U),gt=0;(function(Tt,wt){return Tt||wt})(q!==0,at!==0)&&(gt=Math.sqrt(q*q+at),q<0&&(gt=-gt),gt=at/(q+gt));for(var nt=(k+Vt)*(k-Vt)+gt,et=k*K,_=J;_<a-1;_++){var dt=v.hypot(nt,et),Mt=nt/dt,pt=et/dt;_!==J&&(r[_-1]=dt),nt=Mt*this.s[_]+pt*r[_],r[_]=Mt*r[_]-pt*this.s[_],et=pt*this.s[_+1],this.s[_+1]=Mt*this.s[_+1];for(var xt=0;xt<this.n;xt++)dt=Mt*this.V[xt][_]+pt*this.V[xt][_+1],this.V[xt][_+1]=-pt*this.V[xt][_]+Mt*this.V[xt][_+1],this.V[xt][_]=dt;if(dt=v.hypot(nt,et),Mt=nt/dt,pt=et/dt,this.s[_]=dt,nt=Mt*r[_]+pt*this.s[_+1],this.s[_+1]=-pt*r[_]+Mt*this.s[_+1],et=pt*r[_+1],r[_+1]=Mt*r[_+1],_<this.m-1)for(var lt=0;lt<this.m;lt++)dt=Mt*this.U[lt][_]+pt*this.U[lt][_+1],this.U[lt][_+1]=-pt*this.U[lt][_]+Mt*this.U[lt][_+1],this.U[lt][_]=dt}r[a-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<=Z;ot++)this.V[ot][J]=-this.V[ot][J]}for(;J<Z&&!(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++}a--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},v.hypot=function(l,n){var r=void 0;return Math.abs(l)>Math.abs(n)?(r=n/l,r=Math.abs(l)*Math.sqrt(1+r*r)):n!=0?(r=l/n,r=Math.abs(n)*Math.sqrt(1+r*r)):r=0,r},C.exports=v}),(function(C,x,N){var v=(function(){function r(i,f){for(var e=0;e<f.length;e++){var g=f[e];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(i,g.key,g)}}return function(i,f,e){return f&&r(i.prototype,f),e&&r(i,e),i}})();function l(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}var n=(function(){function r(i,f){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=i,this.sequence2=f,this.match_score=e,this.mismatch_penalty=g,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 h=0;h<this.jMax;h++)this.tracebackGrid[c][h]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(r,[{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 e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var g=1;g<this.iMax;g++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[g-1]===this.sequence2[t-1]?s=this.grid[g-1][t-1]+this.match_score:s=this.grid[g-1][t-1]+this.mismatch_penalty;var o=this.grid[g-1][t]+this.gap_penalty,c=this.grid[g][t-1]+this.gap_penalty,h=[s,o,c],T=this.arrayAllMaxIndexes(h);this.grid[g][t]=h[T[0]],this.tracebackGrid[g][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 e=f[0],g=this.tracebackGrid[e.pos[0]][e.pos[1]];g[0]&&f.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),g[1]&&f.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),g[2]&&f.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,e){for(var g=[],t=-1;(t=f.indexOf(e,t+1))!==-1;)g.push(t);return g}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),r})();C.exports=n}),(function(C,x,N){var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),C.exports=v}),(function(C,x,N){function v(){this.listeners=[]}var l=v.prototype;l.addListener=function(n,r){this.listeners.push({event:n,callback:r})},l.removeListener=function(n,r){for(var i=this.listeners.length;i>=0;i--){var f=this.listeners[i];f.event===n&&f.callback===r&&this.listeners.splice(i,1)}},l.emit=function(n,r){for(var i=0;i<this.listeners.length;i++){var f=this.listeners[i];n===f.event&&f.callback(r)}},C.exports=v})])})})(fe)),fe.exports}var pr=le.exports,Oe;function yr(){return Oe||(Oe=1,(function(I,M){(function(x,N){I.exports=N(vr())})(pr,function(C){return(()=>{var x={45:((n,r,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),n.exports=f}),806:((n,r,i)=>{var f=i(551).FDLayoutConstants;function e(){}for(var g in f)e[g]=f[g];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,n.exports=e}),767:((n,r,i)=>{var f=i(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e}),880:((n,r,i)=>{var f=i(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e}),578:((n,r,i)=>{var f=i(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e}),765:((n,r,i)=>{var f=i(551).FDLayout,e=i(578),g=i(880),t=i(991),s=i(767),o=i(806),c=i(902),h=i(551).FDLayoutConstants,T=i(551).LayoutConstants,u=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,b=i(551).Layout,w=i(551).Integer,G=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,B=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var j in f)A[j]=f[j];A.prototype.newGraphManager=function(){var a=new e(this);return this.graphManager=a,a},A.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},A.prototype.newNode=function(a){return new t(this.graphManager,a)},A.prototype.newEdge=function(a){return new s(null,null,a)},A.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=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var a=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return a&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.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 E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(S){return E.has(S)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});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},A.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%h.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 a=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return a.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.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=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),E={},p=0;p<a.length;p++){var m=a[p].rect,y=a[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},A.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(h.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},A.prototype.moveNodes=function(){for(var a=this.getAllNodes(),E,p=0;p<a.length;p++)E=a[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<a.length;p++)E=a[p],E.move()},A.prototype.initConstraintVariables=function(){var a=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),p=0;p<E.length;p++){var m=E[p];this.idToNodeMap.set(m.id,m)}var y=function O(H){for(var Z=H.getChild().getNodes(),tt,ht=0,J=0;J<Z.length;J++)tt=Z[J],tt.getChild()==null?a.fixedNodeSet.has(tt.id)&&(ht+=100):ht+=O(tt);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(Z){a.fixedNodeSet.add(Z.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var S=y(m);S>0&&(m.fixedNodeWeight=S)}}if(this.constraints.relativePlacementConstraint){var D=new Map,F=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){a.fixedNodesOnHorizontal.add(O),a.fixedNodesOnVertical.add(O)}),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){D.set(H,"dummy"+p),a.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),a.fixedNodeSet.has(H)&&a.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var R=this.constraints.alignmentConstraint.horizontal,p=0;p<R.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),R[p].forEach(function(H){F.set(H,"dummy"+p),a.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),a.fixedNodeSet.has(H)&&a.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var H,Z,tt;for(tt=O.length-1;tt>=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),Z=O[tt],O[tt]=O[H],O[H]=Z;return O},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(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,Z=D.has(O.right)?D.get(O.right):O.right;a.nodesInRelativeHorizontal.includes(H)||(a.nodesInRelativeHorizontal.push(H),a.nodeToRelativeConstraintMapHorizontal.set(H,[]),a.dummyToNodeForVerticalAlignment.has(H)?a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(H).getCenterX())),a.nodesInRelativeHorizontal.includes(Z)||(a.nodesInRelativeHorizontal.push(Z),a.nodeToRelativeConstraintMapHorizontal.set(Z,[]),a.dummyToNodeForVerticalAlignment.has(Z)?a.nodeToTempPositionMapHorizontal.set(Z,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(Z)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(Z,a.idToNodeMap.get(Z).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(H).push({right:Z,gap:O.gap}),a.nodeToRelativeConstraintMapHorizontal.get(Z).push({left:H,gap:O.gap})}else{var tt=F.has(O.top)?F.get(O.top):O.top,ht=F.has(O.bottom)?F.get(O.bottom):O.bottom;a.nodesInRelativeVertical.includes(tt)||(a.nodesInRelativeVertical.push(tt),a.nodeToRelativeConstraintMapVertical.set(tt,[]),a.dummyToNodeForHorizontalAlignment.has(tt)?a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(tt).getCenterY())),a.nodesInRelativeVertical.includes(ht)||(a.nodesInRelativeVertical.push(ht),a.nodeToRelativeConstraintMapVertical.set(ht,[]),a.dummyToNodeForHorizontalAlignment.has(ht)?a.nodeToTempPositionMapVertical.set(ht,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(ht,a.idToNodeMap.get(ht).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),a.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,Z=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(Z):Q.set(H,[Z]),Q.has(Z)?Q.get(Z).push(H):Q.set(Z,[H])}else{var tt=F.has(O.top)?F.get(O.top):O.top,ht=F.has(O.bottom)?F.get(O.bottom):O.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 X=function(H,Z){var tt=[],ht=[],J=new B,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),Z.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,a.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},A.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=a.idToNodeMap.get($.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p<E.length;p++){for(var m=0,y=0;y<E[p].length;y++){if(this.fixedNodeSet.has(E[p][y])){m=0;break}m+=this.idToNodeMap.get(E[p][y]).displacementX}for(var S=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=S}if(this.constraints.alignmentConstraint.horizontal)for(var D=this.constraints.alignmentConstraint.horizontal,p=0;p<D.length;p++){for(var F=0,y=0;y<D[p].length;y++){if(this.fixedNodeSet.has(D[p][y])){F=0;break}F+=this.idToNodeMap.get(D[p][y]).displacementY}for(var W=F/D[p].length,y=0;y<D[p].length;y++)this.idToNodeMap.get(D[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(!a.fixedNodesOnHorizontal.has($)){var O=0;a.dummyToNodeForVerticalAlignment.has($)?O=a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:O=a.idToNodeMap.get($).displacementX,a.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var Z=a.nodeToTempPositionMapHorizontal.get(H.right)-a.nodeToTempPositionMapHorizontal.get($)-O;Z<H.gap&&(O-=H.gap-Z)}else{var Z=a.nodeToTempPositionMapHorizontal.get($)-a.nodeToTempPositionMapHorizontal.get(H.left)+O;Z<H.gap&&(O+=H.gap-Z)}}),a.nodeToTempPositionMapHorizontal.set($,a.nodeToTempPositionMapHorizontal.get($)+O),a.dummyToNodeForVerticalAlignment.has($)?a.dummyToNodeForVerticalAlignment.get($).forEach(function(H){a.idToNodeMap.get(H).displacementX=O}):a.idToNodeMap.get($).displacementX=O}}),this.nodesInRelativeVertical.forEach(function($){if(!a.fixedNodesOnHorizontal.has($)){var O=0;a.dummyToNodeForHorizontalAlignment.has($)?O=a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:O=a.idToNodeMap.get($).displacementY,a.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var Z=a.nodeToTempPositionMapVertical.get(H.bottom)-a.nodeToTempPositionMapVertical.get($)-O;Z<H.gap&&(O-=H.gap-Z)}else{var Z=a.nodeToTempPositionMapVertical.get($)-a.nodeToTempPositionMapVertical.get(H.top)+O;Z<H.gap&&(O+=H.gap-Z)}}),a.nodeToTempPositionMapVertical.set($,a.nodeToTempPositionMapVertical.get($)+O),a.dummyToNodeForHorizontalAlignment.has($)?a.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){a.idToNodeMap.get(H).displacementY=O}):a.idToNodeMap.get($).displacementY=O}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var R=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<R.length;y++)this.dummyToNodeForVerticalAlignment.has(R[y])?this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(H){a.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(R[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<R.length;y++)if(this.dummyToNodeForVerticalAlignment.has(R[y])){var X=this.dummyToNodeForVerticalAlignment.get(R[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(R[y]).displacementX,z++;for(var rt=Q/z,y=0;y<R.length;y++)this.dummyToNodeForVerticalAlignment.has(R[y])?this.dummyToNodeForVerticalAlignment.get(R[y]).forEach(function(H){a.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(R[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var R=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<R.length;y++)this.dummyToNodeForHorizontalAlignment.has(R[y])?this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(Z){a.idToNodeMap.get(Z).displacementY=0}):this.idToNodeMap.get(R[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<R.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(R[y])){var X=this.dummyToNodeForHorizontalAlignment.get(R[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(R[y]).displacementY,z++;for(var rt=Q/z,y=0;y<R.length;y++)this.dummyToNodeForHorizontalAlignment.has(R[y])?this.dummyToNodeForHorizontalAlignment.get(R[y]).forEach(function(J){a.idToNodeMap.get(J).displacementY=rt}):this.idToNodeMap.get(R[y]).displacementY=rt}}}},A.prototype.calculateNodesToApplyGravitationTo=function(){var a=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(a=a.concat(E.getNodes()));return a},A.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<a.length;p++){var m=a[p];if(!E.has(m)){var y=m.getSource(),S=m.getTarget();if(y==S)m.getBendpoints().push(new d),m.getBendpoints().push(new d),this.createDummyNodesForBendpoints(m),E.add(m);else{var D=[];if(D=D.concat(y.getEdgeListToNode(S)),D=D.concat(S.getEdgeListToNode(y)),!E.has(D[0])){if(D.length>1){var F;for(F=0;F<D.length;F++){var W=D[F];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}D.forEach(function(R){E.add(R)})}}}if(E.size==a.length)break}},A.prototype.positionNodesRadially=function(a){for(var E=new u(0,0),p=Math.ceil(Math.sqrt(a.length)),m=0,y=0,S=0,D=new d(0,0),F=0;F<a.length;F++){F%p==0&&(S=0,y=m,F!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),m=0);var W=a[F],R=b.findCenterOfTree(W);E.x=S,E.y=y,D=A.radialLayout(W,R,E),D.y>m&&(m=Math.floor(D.y)),S=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(a,E,p){var m=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(a),S=new Y;S.setDeviceOrgX(y.getMinX()),S.setDeviceOrgY(y.getMinY()),S.setWorldOrgX(p.x),S.setWorldOrgY(p.y);for(var D=0;D<a.length;D++){var F=a[D];F.transform(S)}var W=new d(y.getMaxX(),y.getMaxY());return S.inverseTransformPoint(W)},A.branchRadialLayout=function(a,E,p,m,y,S){var D=(m-p+1)/2;D<0&&(D+=180);var F=(D+p)%360,W=F*G.TWO_PI/360,R=y*Math.cos(W),Q=y*Math.sin(W);a.setCenter(R,Q);var z=[];z=z.concat(a.getEdges());var X=z.length;E!=null&&X--;for(var rt=0,$=z.length,O,H=a.getEdgesBetween(E);H.length>1;){var Z=H[0];H.splice(0,1);var tt=z.indexOf(Z);tt>=0&&z.splice(tt,1),$--,X--}E!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var ht=Math.abs(m-p)/X,J=O;rt!=X;J=++J%$){var It=z[J].getOtherEnd(a);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;A.branchRadialLayout(It,a,Nt,vt,y+S,S),rt++}}},A.maxDiagonalInTree=function(a){for(var E=w.MIN_VALUE,p=0;p<a.length;p++){var m=a[p],y=m.getDiagonal();y>E&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var a=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var S=m[y],D=S.getParent();this.getNodeDegreeWithChildren(S)===0&&(D.id==null||!this.getToBeTiled(D))&&p.push(S)}for(var y=0;y<p.length;y++){var S=p[y],F=S.getParent().id;typeof E[F]>"u"&&(E[F]=[]),E[F]=E[F].concat(S)}Object.keys(E).forEach(function(W){if(E[W].length>1){var R="DummyCompound_"+W;a.memberGroups[R]=E[W];var Q=E[W][0].getParent(),z=new t(a.graphManager);z.id=R,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,a.idToDummyNode[R]=z;var X=a.getGraphManager().add(a.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$<E[W].length;$++){var O=E[W][$];rt.remove(O),X.add(O)}}})},A.prototype.clearCompounds=function(){var a={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],a[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(a,E)},A.prototype.clearZeroDegreeMembers=function(){var a=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=a.idToDummyNode[p];if(E[p]=a.tileNodes(a.memberGroups[p],m.paddingLeft+m.paddingRight),m.rect.width=E[p].width,m.rect.height=E[p].height,m.setCenter(E[p].centerX,E[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,S=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(S+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>S?(m.rect.y-=(m.labelHeight-S)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-S)/2):m.labelPosVertical=="bottom"&&m.setHeight(S+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var E=this.compoundOrder[a],p=E.id,m=E.paddingLeft,y=E.paddingTop,S=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,S,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var a=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=a.idToDummyNode[p],y=m.paddingLeft,S=m.paddingTop,D=m.labelMarginLeft,F=m.labelMarginTop;a.adjustLocations(E[p],m.rect.x,m.rect.y,y,S,D,F)})},A.prototype.getToBeTiled=function(a){var E=a.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=a.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y<m.length;y++){var S=m[y];if(this.getNodeDegree(S)>0)return this.toBeTiled[E]=!1,!1;if(S.getChild()==null){this.toBeTiled[S.id]=!1;continue}if(!this.getToBeTiled(S))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(a){a.id;for(var E=a.getEdges(),p=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},A.prototype.getNodeDegreeWithChildren=function(a){var E=this.getNodeDegree(a);if(a.getChild()==null)return E;for(var p=a.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},A.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},A.prototype.fillCompexOrderByDFS=function(a){for(var E=0;E<a.length;E++){var p=a[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},A.prototype.adjustLocations=function(a,E,p,m,y,S,D){E+=m+S,p+=y+D;for(var F=E,W=0;W<a.rows.length;W++){var R=a.rows[W];E=F;for(var Q=0,z=0;z<R.length;z++){var X=R[z];X.rect.x=E,X.rect.y=p,E+=X.rect.width+a.horizontalPadding,X.rect.height>Q&&(Q=X.rect.height)}p+=Q+a.verticalPadding}},A.prototype.tileCompoundMembers=function(a,E){var p=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(a[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var S=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(S+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>S?(y.rect.x-=(y.labelWidth-S)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-S)/2):y.labelPosHorizontal=="right"&&y.setWidth(S+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(a,E){var p=this.tileNodesByFavoringDim(a,E,!0),m=this.tileNodesByFavoringDim(a,E,!1),y=this.getOrgRatio(p),S=this.getOrgRatio(m),D;return S<y?D=m:D=p,D},A.prototype.getOrgRatio=function(a){var E=a.width,p=a.height,m=E/p;return m<1&&(m=1/m),m},A.prototype.calcIdealRowWidth=function(a,E){var p=o.TILING_PADDING_VERTICAL,m=o.TILING_PADDING_HORIZONTAL,y=a.length,S=0,D=0,F=0;a.forEach(function($){S+=$.getWidth(),D+=$.getHeight(),$.getWidth()>F&&(F=$.getWidth())});var W=S/y,R=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(R+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return F>rt&&(rt=F),rt+=m*2,rt},A.prototype.tileNodesByFavoringDim=function(a,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,S=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};S&&(D.idealRowWidth=this.calcIdealRowWidth(a,p));var F=function(O){return O.rect.width*O.rect.height},W=function(O,H){return F(H)-F(O)};a.sort(function($,O){var H=W;return D.idealRowWidth?(H=S,H($.id,O.id)):H($,O)});for(var R=0,Q=0,z=0;z<a.length;z++){var X=a[z];R+=X.getCenterX(),Q+=X.getCenterY()}D.centerX=R/a.length,D.centerY=Q/a.length;for(var z=0;z<a.length;z++){var X=a[z];if(D.rows.length==0)this.insertNodeToRow(D,X,0,E);else if(this.canAddHorizontal(D,X.rect.width,X.rect.height)){var rt=D.rows.length-1;D.idealRowWidth||(rt=this.getShortestRowIndex(D)),this.insertNodeToRow(D,X,rt,E)}else this.insertNodeToRow(D,X,D.rows.length,E);this.shiftToLastRow(D)}return D},A.prototype.insertNodeToRow=function(a,E,p,m){var y=m;if(p==a.rows.length){var S=[];a.rows.push(S),a.rowWidth.push(y),a.rowHeight.push(0)}var D=a.rowWidth[p]+E.rect.width;a.rows[p].length>0&&(D+=a.horizontalPadding),a.rowWidth[p]=D,a.width<D&&(a.width=D);var F=E.rect.height;p>0&&(F+=a.verticalPadding);var W=0;F>a.rowHeight[p]&&(W=a.rowHeight[p],a.rowHeight[p]=F,W=a.rowHeight[p]-W),a.height+=W,a.rows[p].push(E)},A.prototype.getShortestRowIndex=function(a){for(var E=-1,p=Number.MAX_VALUE,m=0;m<a.rows.length;m++)a.rowWidth[m]<p&&(E=m,p=a.rowWidth[m]);return E},A.prototype.getLongestRowIndex=function(a){for(var E=-1,p=Number.MIN_VALUE,m=0;m<a.rows.length;m++)a.rowWidth[m]>p&&(E=m,p=a.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(a,E,p){if(a.idealRowWidth){var m=a.rows.length-1,y=a.rowWidth[m];return y+E+a.horizontalPadding<=a.idealRowWidth}var S=this.getShortestRowIndex(a);if(S<0)return!0;var D=a.rowWidth[S];if(D+a.horizontalPadding+E<=a.width)return!0;var F=0;a.rowHeight[S]<p&&S>0&&(F=p+a.verticalPadding-a.rowHeight[S]);var W;a.width-D>=E+a.horizontalPadding?W=(a.height+F)/(D+E+a.horizontalPadding):W=(a.height+F)/a.width,F=p+a.verticalPadding;var R;return a.width<E?R=(a.height+F)/E:R=(a.height+F)/a.width,R<1&&(R=1/R),W<1&&(W=1/W),W<R},A.prototype.shiftToLastRow=function(a){var E=this.getLongestRowIndex(a),p=a.rowWidth.length-1,m=a.rows[E],y=m[m.length-1],S=y.width+a.horizontalPadding;if(a.width-a.rowWidth[p]>S&&E!=p){m.splice(-1,1),a.rows[p].push(y),a.rowWidth[E]=a.rowWidth[E]-S,a.rowWidth[p]=a.rowWidth[p]+S,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var D=Number.MIN_VALUE,F=0;F<m.length;F++)m[F].height>D&&(D=m[F].height);E>0&&(D+=a.verticalPadding);var W=a.rowHeight[E]+a.rowHeight[p];a.rowHeight[E]=D,a.rowHeight[p]<y.height+a.verticalPadding&&(a.rowHeight[p]=y.height+a.verticalPadding);var R=a.rowHeight[E]+a.rowHeight[p];a.height+=R-W,this.shiftToLastRow(a)}},A.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},A.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},A.prototype.reduceTrees=function(){for(var a=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var S=0;S<m.length;S++)if(p=m[S],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var D=p.getEdges()[0].getOtherEnd(p),F=new L(p.getCenterX()-D.getCenterX(),p.getCenterY()-D.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),F])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var W=[],R=0;R<y.length;R++)y[R][0].getEdges().length==1&&(W.push(y[R]),y[R][0].getOwner().remove(y[R][0]));a.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=a},A.prototype.growTree=function(a){for(var E=a.length,p=a[E-1],m,y=0;y<p.length;y++)m=p[y],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},A.prototype.findPlaceforPrunedNode=function(a){var E,p,m=a[0];if(m==a[1].source?p=a[1].target:p=a[1].source,o.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+a[3].getWidth(),p.getCenterY()+a[3].getHeight());else{var y=p.startX,S=p.finishX,D=p.startY,F=p.finishY,W=0,R=0,Q=0,z=0,X=[W,Q,R,z];if(D>0)for(var rt=y;rt<=S;rt++)X[0]+=this.grid[rt][D-1].length+this.grid[rt][D].length-1;if(S<this.grid.length-1)for(var rt=D;rt<=F;rt++)X[1]+=this.grid[S+1][rt].length+this.grid[S][rt].length-1;if(F<this.grid[0].length-1)for(var rt=y;rt<=S;rt++)X[2]+=this.grid[rt][F+1].length+this.grid[rt][F].length-1;if(y>0)for(var rt=D;rt<=F;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,O,H,Z=0;Z<X.length;Z++)X[Z]<$?($=X[Z],O=1,H=Z):X[Z]==$&&O++;if(O==3&&$==0)X[0]==0&&X[1]==0&&X[2]==0?E=1:X[0]==0&&X[1]==0&&X[3]==0?E=0:X[0]==0&&X[2]==0&&X[3]==0?E=3:X[1]==0&&X[2]==0&&X[3]==0&&(E=2);else if(O==2&&$==0){var tt=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?tt==0?E=0:E=1:X[0]==0&&X[2]==0?tt==0?E=0:E=2:X[0]==0&&X[3]==0?tt==0?E=0:E=3:X[1]==0&&X[2]==0?tt==0?E=1:E=2:X[1]==0&&X[3]==0?tt==0?E=1:E=3:tt==0?E=2:E=3}else if(O==4&&$==0){var tt=Math.floor(Math.random()*4);E=tt}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-h.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+h.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+h.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-h.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},n.exports=A}),991:((n,r,i)=>{var f=i(551).FDLayoutNode,e=i(551).IMath;function g(s,o,c,h){f.call(this,s,o,c,h)}g.prototype=Object.create(f.prototype);for(var t in f)g[t]=f[t];g.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*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},g.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T<c.length;T++)h=c[T],h.getChild()==null?(h.displacementX+=s,h.displacementY+=o):h.propogateDisplacementToChildren(s,o)},g.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},g.prototype.setPred1=function(s){this.pred1=s},g.prototype.getPred1=function(){return pred1},g.prototype.getPred2=function(){return pred2},g.prototype.setNext=function(s){this.next=s},g.prototype.getNext=function(){return next},g.prototype.setProcessed=function(s){this.processed=s},g.prototype.isProcessed=function(){return processed},n.exports=g}),902:((n,r,i)=>{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h<c.length;h++)T[h]=c[h];return T}else return Array.from(c)}var e=i(806),g=i(551).LinkedList,t=i(551).Matrix,s=i(551).SVD;function o(){}o.handleConstraints=function(c){var h={};h.fixedNodeConstraint=c.constraints.fixedNodeConstraint,h.alignmentConstraint=c.constraints.alignmentConstraint,h.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,u=new Map,d=[],L=[],b=c.getAllNodes(),w=0,G=0;G<b.length;G++){var V=b[G];V.getChild()==null&&(u.set(V.id,w++),d.push(V.getCenterX()),L.push(V.getCenterY()),T.set(V.id,V))}h.relativePlacementConstraint&&h.relativePlacementConstraint.forEach(function(P){!P.gap&&P.gap!=0&&(P.left?P.gap=e.DEFAULT_EDGE_LENGTH+T.get(P.left).getWidth()/2+T.get(P.right).getWidth()/2:P.gap=e.DEFAULT_EDGE_LENGTH+T.get(P.top).getHeight()/2+T.get(P.bottom).getHeight()/2)});var Y=function(U,k){return{x:U.x-k.x,y:U.y-k.y}},B=function(U){var k=0,K=0;return U.forEach(function(q){k+=d[u.get(q)],K+=L[u.get(q)]}),{x:k/U.size,y:K/U.size}},A=function(U,k,K,q,at){function gt(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),wt;!(ft=(wt=Tt.next()).done);ft=!0){var $t=wt.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,_=new Map,dt=new g;nt.forEach(function(lt,ot){lt==0?(dt.push(ot),K||(k=="horizontal"?et.set(ot,u.has(ot)?d[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&&_.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){k=="horizontal"?(et.set(st,u.has(st)?d[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){k=="horizontal"?ft+=u.has(st)?d[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 Mt=function(){var ot=dt.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(k=="horizontal"?st=u.has(ft.id)?d[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;_.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&&dt.push(ft.id),K&&_.set(ft.id,gt(_.get(ot),_.get(ft.id)))})};dt.length!=0;)Mt();if(K){var pt=new Set;U.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];_.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](),wt;!(ft=(wt=Tt.next()).done);ft=!0){var $t=wt.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,wt=!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;k=="horizontal"?Zt=u.has(St)?d[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){wt=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)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},j=function(U){var k=0,K=0,q=0,at=0;if(U.forEach(function(_){_.left?d[u.get(_.left)]-d[u.get(_.right)]>=0?k++:K++:L[u.get(_.top)]-L[u.get(_.bottom)]>=0?q++:at++}),k>K&&q>at)for(var gt=0;gt<u.size;gt++)d[gt]=-1*d[gt],L[gt]=-1*L[gt];else if(k>K)for(var nt=0;nt<u.size;nt++)d[nt]=-1*d[nt];else if(q>at)for(var et=0;et<u.size;et++)L[et]=-1*L[et]},a=function(U){var k=[],K=new g,q=new Set,at=0;return U.forEach(function(gt,nt){if(!q.has(nt)){k[at]=[];var et=nt;for(K.push(et),q.add(et),k[at].push(et);K.length!=0;){et=K.shift();var _=U.get(et);_.forEach(function(dt){q.has(dt.id)||(K.push(dt.id),q.add(dt.id),k[at].push(dt.id))})}at++}}),k},E=function(U){var k=new Map;return U.forEach(function(K,q){k.set(q,[])}),U.forEach(function(K,q){K.forEach(function(at){k.get(q).push(at),k.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),k},p=function(U){var k=new Map;return U.forEach(function(K,q){k.set(q,[])}),U.forEach(function(K,q){K.forEach(function(at){k.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),k},m=[],y=[],S=!1,D=!1,F=new Set,W=new Map,R=new Map,Q=[];if(h.fixedNodeConstraint&&h.fixedNodeConstraint.forEach(function(P){F.add(P.nodeId)}),h.relativePlacementConstraint&&(h.relativePlacementConstraint.forEach(function(P){P.left?(W.has(P.left)?W.get(P.left).push({id:P.right,gap:P.gap,direction:"horizontal"}):W.set(P.left,[{id:P.right,gap:P.gap,direction:"horizontal"}]),W.has(P.right)||W.set(P.right,[])):(W.has(P.top)?W.get(P.top).push({id:P.bottom,gap:P.gap,direction:"vertical"}):W.set(P.top,[{id:P.bottom,gap:P.gap,direction:"vertical"}]),W.has(P.bottom)||W.set(P.bottom,[]))}),R=E(W),Q=a(R)),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>1)h.fixedNodeConstraint.forEach(function(P,U){m[U]=[P.position.x,P.position.y],y[U]=[d[u.get(P.nodeId)],L[u.get(P.nodeId)]]}),S=!0;else if(h.alignmentConstraint)(function(){var P=0;if(h.alignmentConstraint.vertical){for(var U=h.alignmentConstraint.vertical,k=function(et){var _=new Set;U[et].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return F.has(pt)})),Mt=void 0;dt.size>0?Mt=d[u.get(dt.values().next().value)]:Mt=B(_).x,U[et].forEach(function(pt){m[P]=[Mt,L[u.get(pt)]],y[P]=[d[u.get(pt)],L[u.get(pt)]],P++})},K=0;K<U.length;K++)k(K);S=!0}if(h.alignmentConstraint.horizontal){for(var q=h.alignmentConstraint.horizontal,at=function(et){var _=new Set;q[et].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return F.has(pt)})),Mt=void 0;dt.size>0?Mt=d[u.get(dt.values().next().value)]:Mt=B(_).y,q[et].forEach(function(pt){m[P]=[d[u.get(pt)],Mt],y[P]=[d[u.get(pt)],L[u.get(pt)]],P++})},gt=0;gt<q.length;gt++)at(gt);S=!0}h.relativePlacementConstraint&&(D=!0)})();else if(h.relativePlacementConstraint){for(var z=0,X=0,rt=0;rt<Q.length;rt++)Q[rt].length>z&&(z=Q[rt].length,X=rt);if(z<R.size/2)j(h.relativePlacementConstraint),S=!1,D=!1;else{var $=new Map,O=new Map,H=[];Q[X].forEach(function(P){W.get(P).forEach(function(U){U.direction=="horizontal"?($.has(P)?$.get(P).push(U):$.set(P,[U]),$.has(U.id)||$.set(U.id,[]),H.push({left:P,right:U.id})):(O.has(P)?O.get(P).push(U):O.set(P,[U]),O.has(U.id)||O.set(U.id,[]),H.push({top:P,bottom:U.id}))})}),j(H),D=!1;var Z=A($,"horizontal"),tt=A(O,"vertical");Q[X].forEach(function(P,U){y[U]=[d[u.get(P)],L[u.get(P)]],m[U]=[],Z.has(P)?m[U][0]=Z.get(P):m[U][0]=d[u.get(P)],tt.has(P)?m[U][1]=tt.get(P):m[U][1]=L[u.get(P)]}),S=!0}}if(S){for(var ht=void 0,J=t.transpose(m),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 ut=0;ut<u.size;ut++){var Et=[d[ut],L[ut]],Ct=[ht[0][0],ht[1][0]],Dt=[ht[0][1],ht[1][1]];d[ut]=t.dotProduct(Et,Ct),L[ut]=t.dotProduct(Et,Dt)}D&&j(h.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(h.fixedNodeConstraint&&h.fixedNodeConstraint.length>0){var mt={x:0,y:0};h.fixedNodeConstraint.forEach(function(P,U){var k={x:d[u.get(P.nodeId)],y:L[u.get(P.nodeId)]},K=P.position,q=Y(K,k);mt.x+=q.x,mt.y+=q.y}),mt.x/=h.fixedNodeConstraint.length,mt.y/=h.fixedNodeConstraint.length,d.forEach(function(P,U){d[U]+=mt.x}),L.forEach(function(P,U){L[U]+=mt.y}),h.fixedNodeConstraint.forEach(function(P){d[u.get(P.nodeId)]=P.position.x,L[u.get(P.nodeId)]=P.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var Ot=h.alignmentConstraint.vertical,Rt=function(U){var k=new Set;Ot[U].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=d[u.get(K.values().next().value)]:q=B(k).x,k.forEach(function(at){F.has(at)||(d[u.get(at)]=q)})},Ht=0;Ht<Ot.length;Ht++)Rt(Ht);if(h.alignmentConstraint.horizontal)for(var Ut=h.alignmentConstraint.horizontal,Pt=function(U){var k=new Set;Ut[U].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=L[u.get(K.values().next().value)]:q=B(k).y,k.forEach(function(at){F.has(at)||(L[u.get(at)]=q)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}h.relativePlacementConstraint&&(function(){var P=new Map,U=new Map,k=new Map,K=new Map,q=new Map,at=new Map,gt=new Set,nt=new Set;if(F.forEach(function(Gt){gt.add(Gt),nt.add(Gt)}),h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var et=h.alignmentConstraint.vertical,_=function(yt){k.set("dummy"+yt,[]),et[yt].forEach(function(At){P.set(At,"dummy"+yt),k.get("dummy"+yt).push(At),F.has(At)&&gt.add("dummy"+yt)}),q.set("dummy"+yt,d[u.get(et[yt][0])])},dt=0;dt<et.length;dt++)_(dt);if(h.alignmentConstraint.horizontal)for(var Mt=h.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),Mt[yt].forEach(function(At){U.set(At,"dummy"+yt),K.get("dummy"+yt).push(At),F.has(At)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,L[u.get(Mt[yt][0])])},xt=0;xt<Mt.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(At){var kt=void 0,Bt=void 0;At.direction=="horizontal"?(kt=P.get(yt)?P.get(yt):yt,P.get(At.id)?Bt={id:P.get(At.id),gap:At.gap,direction:At.direction}:Bt=At,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(At.id)?Bt={id:U.get(At.id),gap:At.gap,direction:At.direction}:Bt=At,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](),wt;!(ft=(wt=Tt.next()).done);ft=!0){var $t=wt.value;Lt($t)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=E(lt),zt=E(ot),St=a(bt),Zt=a(zt),Kt=p(lt),ce=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(At){Kt.get(At).length==0&&Qt[yt].push(At)})}),Zt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(At){ce.get(At).length==0&&jt[yt].push(At)})});var _t=A(lt,"horizontal",gt,q,Qt),Jt=A(ot,"vertical",nt,at,jt),oe=function(yt){k.get(yt)?k.get(yt).forEach(function(At){d[u.get(At)]=_t.get(yt)}):d[u.get(yt)]=_t.get(yt)},te=!0,ee=!1,Le=void 0;try{for(var ge=_t.keys()[Symbol.iterator](),we;!(te=(we=ge.next()).done);te=!0){var ue=we.value;oe(ue)}}catch(Gt){ee=!0,Le=Gt}finally{try{!te&&ge.return&&ge.return()}finally{if(ee)throw Le}}var ke=function(yt){K.get(yt)?K.get(yt).forEach(function(At){L[u.get(At)]=Jt.get(yt)}):L[u.get(yt)]=Jt.get(yt)},de=!0,Ce=!1,Me=void 0;try{for(var ve=Jt.keys()[Symbol.iterator](),Ae;!(de=(Ae=ve.next()).done);de=!0){var ue=Ae.value;ke(ue)}}catch(Gt){Ce=!0,Me=Gt}finally{try{!de&&ve.return&&ve.return()}finally{if(Ce)throw Me}}})()}for(var Yt=0;Yt<b.length;Yt++){var Vt=b[Yt];Vt.getChild()==null&&Vt.setCenter(d[u.get(Vt.id)],L[u.get(Vt.id)])}},n.exports=o}),551:(n=>{n.exports=C})},N={};function v(n){var r=N[n];if(r!==void 0)return r.exports;var i=N[n]={exports:{}};return x[n](i,i.exports,v),i.exports}var l=v(45);return l})()})})(le)),le.exports}var mr=he.exports,xe;function Er(){return xe||(xe=1,(function(I,M){(function(x,N){I.exports=N(yr())})(mr,function(C){return(()=>{var x={658:(n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var i=arguments.length,f=Array(i>1?i-1:0),e=1;e<i;e++)f[e-1]=arguments[e];return f.forEach(function(g){Object.keys(g).forEach(function(t){return r[t]=g[t]})}),r}}),548:((n,r,i)=>{var f=(function(){function t(s,o){var c=[],h=!0,T=!1,u=void 0;try{for(var d=s[Symbol.iterator](),L;!(h=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));h=!0);}catch(b){T=!0,u=b}finally{try{!h&&d.return&&d.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")}})(),e=i(140).layoutBase.LinkedList,g={};g.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(h,T){typeof h=="number"&&(h=T);for(var u=h.parent()[0];u!=null;){if(s[u.id()])return!1;u=u.parent()[0]}return!0});return c},g.connectComponents=function(t,s,o,c){var h=new e,T=new Set,u=[],d=void 0,L=void 0,b=void 0,w=!1,G=1,V=[],Y=[],B=function(){var j=t.collection();Y.push(j);var a=o[0],E=t.collection();E.merge(a).merge(a.descendants().intersection(s)),u.push(a),E.forEach(function(y){h.push(y),T.add(y),j.merge(y)});for(var p=function(){a=h.shift();var S=t.collection();a.neighborhood().nodes().forEach(function(R){s.intersection(a.edgesWith(R)).length>0&&S.merge(R)});for(var D=0;D<S.length;D++){var F=S[D];if(d=o.intersection(F.union(F.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(R){h.push(R),T.add(R),j.merge(R),o.has(R)&&u.push(R)})}}};h.length!=0;)p();if(j.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(S){j.has(S.source())&&j.has(S.target())&&j.merge(S)})}),u.length==o.length&&(w=!0),!w||w&&G>1){L=u[0],b=L.connectedEdges().length,u.forEach(function(y){y.connectedEdges().length<b&&(b=y.connectedEdges().length,L=y)}),V.push(L.id());var m=t.collection();m.merge(u[0]),u.forEach(function(y){m.merge(y)}),u=[],o=o.difference(m),G++}};do B();while(!w);return c&&V.length>0&&c.set("dummy"+(c.size+1),V),Y},g.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,b=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),G;!(d=(G=w.next()).done);d=!0){var V=G.value,Y=f(V,2),B=Y[0],A=Y[1],j=o.cy.getElementById(B);if(j){var a=j.boundingBox(),E=s.xCoords[A]-a.w/2,p=s.xCoords[A]+a.w/2,m=s.yCoords[A]-a.h/2,y=s.yCoords[A]+a.h/2;E<c&&(c=E),p>h&&(h=p),m<T&&(T=m),y>u&&(u=y)}}}catch(R){L=!0,b=R}finally{try{!d&&w.return&&w.return()}finally{if(L)throw b}}var S=t.x-(h+c)/2,D=t.y-(u+T)/2;s.xCoords=s.xCoords.map(function(R){return R+S}),s.yCoords=s.yCoords.map(function(R){return R+D})}else{Object.keys(s).forEach(function(R){var Q=s[R],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;z<c&&(c=z),X>h&&(h=X),rt<T&&(T=rt),$>u&&(u=$)});var F=t.x-(h+c)/2,W=t.y-(u+T)/2;Object.keys(s).forEach(function(R){var Q=s[R];Q.setCenter(Q.getCenterX()+F,Q.getCenterY()+W)})}}},g.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,b=void 0,w=void 0,G=void 0,V=t.descendants().not(":parent"),Y=V.length,B=0;B<Y;B++){var A=V[B];L=s[c.get(A.id())]-A.width()/2,b=s[c.get(A.id())]+A.width()/2,w=o[c.get(A.id())]-A.height()/2,G=o[c.get(A.id())]+A.height()/2,h>L&&(h=L),T<b&&(T=b),u>w&&(u=w),d<G&&(d=G)}var j={};return j.topLeftX=h,j.topLeftY=u,j.width=T-h,j.height=d-u,j},g.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var h=!1;c.children().forEach(function(T){T.css("display")!="none"&&(h=!0)}),h||o.merge(c)}),o},n.exports=g}),816:((n,r,i)=>{var f=i(548),e=i(140).CoSELayout,g=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,h=i(140).CoSEConstants,T=function(d,L){var b=d.cy,w=d.eles,G=w.nodes(),V=w.edges(),Y=void 0,B=void 0,A=void 0,j={};d.randomize&&(Y=L.nodeIndexes,B=L.xCoords,A=L.yCoords);var a=function(R){return typeof R=="function"},E=function(R,Q){return a(R)?R(Q):R},p=f.calcParentsWithoutChildren(b,w),m=function W(R,Q,z,X){for(var rt=Q.length,$=0;$<rt;$++){var O=Q[$],H=null;O.intersection(p).length==0&&(H=O.children());var Z=void 0,tt=O.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(O.outerWidth()!=null&&O.outerHeight()!=null)if(X.randomize)if(!O.isParent())Z=R.add(new g(z.graphManager,new t(B[Y.get(O.id())]-tt.w/2,A[Y.get(O.id())]-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else{var ht=f.calcBoundingBox(O,B,A,Y);O.intersection(p).length==0?Z=R.add(new g(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(ht.width,ht.height))):Z=R.add(new g(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(parseFloat(tt.w),parseFloat(tt.h))))}else Z=R.add(new g(z.graphManager,new t(O.position("x")-tt.w/2,O.position("y")-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else Z=R.add(new g(this.graphManager));if(Z.id=O.data("id"),Z.nodeRepulsion=E(X.nodeRepulsion,O),Z.paddingLeft=parseInt(O.css("padding")),Z.paddingTop=parseInt(O.css("padding")),Z.paddingRight=parseInt(O.css("padding")),Z.paddingBottom=parseInt(O.css("padding")),X.nodeDimensionsIncludeLabels&&(Z.labelWidth=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,Z.labelHeight=O.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,Z.labelPosVertical=O.css("text-valign"),Z.labelPosHorizontal=O.css("text-halign")),j[O.data("id")]=Z,isNaN(Z.rect.x)&&(Z.rect.x=0),isNaN(Z.rect.y)&&(Z.rect.y=0),H!=null&&H.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),Z),W(J,H,z,X)}}},y=function(R,Q,z){for(var X=0,rt=0,$=0;$<z.length;$++){var O=z[$],H=j[O.data("source")],Z=j[O.data("target")];if(H&&Z&&H!==Z&&H.getEdgesBetween(Z).length==0){var tt=Q.add(R.newEdge(),H,Z);tt.id=O.id(),tt.idealLength=E(d.idealEdgeLength,O),tt.edgeElasticity=E(d.edgeElasticity,O),X+=tt.idealLength,rt++}}d.idealEdgeLength!=null&&(rt>0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:a(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},S=function(R,Q){Q.fixedNodeConstraint&&(R.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(R.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(R.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new e,F=D.newGraphManager();return m(F.addRoot(),f.getTopMostNodes(G),D,d),y(D,F,V),S(D,d),D.runLayout(),j};n.exports={coseLayout:T}}),212:((n,r,i)=>{var f=(function(){function d(L,b){for(var w=0;w<b.length;w++){var G=b[w];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(L,G.key,G)}}return function(L,b,w){return b&&d(L.prototype,b),w&&d(L,w),L}})();function e(d,L){if(!(d instanceof L))throw new TypeError("Cannot call a class as a function")}var g=i(658),t=i(548),s=i(657),o=s.spectralLayout,c=i(816),h=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 d(L){e(this,d),this.options=g({},T,L)}return f(d,[{key:"run",value:function(){var b=this,w=this.options,G=w.cy,V=w.eles,Y=[],B=[],A=void 0,j=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var a=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;a&&(w.tile=!1,w.packComponents=!1);var E=void 0,p=!1;if(G.layoutUtilities&&w.packComponents&&(E=G.layoutUtilities("get"),E||(E=G.layoutUtilities()),p=!0),V.nodes().length>0)if(p){var S=t.getTopMostNodes(w.eles.nodes());if(A=t.connectComponents(G,w.eles,S),A.forEach(function(vt){var it=vt.boundingBox();j.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&A.forEach(function(vt){w.eles=vt,Y.push(o(w))}),w.quality=="default"||w.quality=="proof"){var D=G.collection();if(w.tile){var F=new Map,W=[],R=[],Q=0,z={nodeIndexes:F,xCoords:W,yCoords:R},X=[];if(A.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),D.length>1){var rt=D.boundingBox();j.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),A.push(D),Y.push(z);for(var $=X.length-1;$>=0;$--)A.splice(X[$],1),Y.splice(X[$],1),j.splice(X[$],1)}}A.forEach(function(vt,it){w.eles=vt,B.push(h(w,Y[it])),t.relocateComponent(j[it],B[it],w)})}else A.forEach(function(vt,it){t.relocateComponent(j[it],Y[it],w)});var O=new Set;if(A.length>1){var H=[],Z=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=Y[it].nodeIndexes),vt.nodes().not(Z).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(Z).forEach(function(Dt){if(w.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[it].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else B[it][Dt.id()]&&Et.nodes.push({x:B[it][Dt.id()].getLeft(),y:B[it][Dt.id()].getTop(),width:B[it][Dt.id()].getWidth(),height:B[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(Y[it].xCoords[Ht]),Pt.push(Y[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else B[it][mt.id()]&&B[it][Ot.id()]&&Et.edges.push({startX:B[it][mt.id()].getCenterX(),startY:B[it][mt.id()].getCenterY(),endX:B[it][Ot.id()].getCenterX(),endY:B[it][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")Y.forEach(function(vt,it){var ut=vt.xCoords.map(function(Ct){return Ct+tt[it].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;O.forEach(function(vt){Object.keys(B[vt]).forEach(function(it){var ut=B[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(j.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);Y.push(y)}w.quality=="default"||w.quality=="proof"?(B.push(h(w,Y[0])),t.relocateComponent(j[0],B[0],w)):t.relocateComponent(j[0],Y[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,Ct=void 0,Dt=it.data("id");return B.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),w.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(G,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});w.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(b,w,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'.")}}]),d})();n.exports=u}),657:((n,r,i)=>{var f=i(548),e=i(140).layoutBase.Matrix,g=i(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),u=h.nodes(":parent"),d=new Map,L=new Map,b=new Map,w=[],G=[],V=[],Y=[],B=[],A=[],j=[],a=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,S=o.samplingType,D=o.nodeSeparation,F=void 0,W=function(){for(var U=0,k=0,K=!1;k<F;){U=Math.floor(Math.random()*E),K=!1;for(var q=0;q<k;q++)if(Y[q]==U){K=!0;break}if(!K)Y[k]=U,k++;else continue}},R=function(U,k,K){for(var q=[],at=0,gt=0,nt=0,et=void 0,_=[],dt=0,Mt=1,pt=0;pt<E;pt++)_[pt]=p;for(q[gt]=U,_[U]=0;gt>=at;){nt=q[at++];for(var xt=w[nt],lt=0;lt<xt.length;lt++)et=L.get(xt[lt]),_[et]==p&&(_[et]=_[nt]+1,q[++gt]=et);A[nt][k]=_[nt]*D}if(K){for(var ot=0;ot<E;ot++)A[ot][k]<B[ot]&&(B[ot]=A[ot][k]);for(var Lt=0;Lt<E;Lt++)B[Lt]>dt&&(dt=B[Lt],Mt=Lt)}return Mt},Q=function(U){var k=void 0;if(U){k=Math.floor(Math.random()*E);for(var q=0;q<E;q++)B[q]=p;for(var at=0;at<F;at++)Y[at]=k,k=R(k,at,U)}else{W();for(var K=0;K<F;K++)R(Y[K],K,U)}for(var gt=0;gt<E;gt++)for(var nt=0;nt<F;nt++)A[gt][nt]*=A[gt][nt];for(var et=0;et<F;et++)j[et]=[];for(var _=0;_<F;_++)for(var dt=0;dt<F;dt++)j[_][dt]=A[Y[dt]][_]},z=function(){for(var U=g.svd(j),k=U.S,K=U.U,q=U.V,at=k[0]*k[0]*k[0],gt=[],nt=0;nt<F;nt++){gt[nt]=[];for(var et=0;et<F;et++)gt[nt][et]=0,nt==et&&(gt[nt][et]=k[nt]/(k[nt]*k[nt]+at/(k[nt]*k[nt])))}a=e.multMat(e.multMat(q,gt),e.transpose(K))},X=function(){for(var U=void 0,k=void 0,K=[],q=[],at=[],gt=[],nt=0;nt<E;nt++)K[nt]=Math.random(),q[nt]=Math.random();K=e.normalize(K),q=e.normalize(q);for(var et=m,_=m,dt=void 0;;){for(var Mt=0;Mt<E;Mt++)at[Mt]=K[Mt];if(K=e.multGamma(e.multL(e.multGamma(at),A,a)),U=e.dotProduct(at,K),K=e.normalize(K),et=e.dotProduct(at,K),dt=Math.abs(et/_),dt<=1+y&&dt>=1)break;_=et}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(_=m;;){for(var xt=0;xt<E;xt++)gt[xt]=q[xt];if(gt=e.minusOp(gt,e.multCons(at,e.dotProduct(at,gt))),q=e.multGamma(e.multL(e.multGamma(gt),A,a)),k=e.dotProduct(gt,q),q=e.normalize(q),et=e.dotProduct(gt,q),dt=Math.abs(et/_),dt<=1+y&&dt>=1)break;_=et}for(var lt=0;lt<E;lt++)gt[lt]=q[lt];G=e.multCons(at,Math.sqrt(Math.abs(U))),V=e.multCons(gt,Math.sqrt(Math.abs(k)))};f.connectComponents(c,h,f.getTopMostNodes(T),d),u.forEach(function(P){f.connectComponents(c,h,f.getTopMostNodes(P.descendants().intersection(h)),d)});for(var rt=0,$=0;$<T.length;$++)T[$].isParent()||L.set(T[$].id(),rt++);var O=!0,H=!1,Z=void 0;try{for(var tt=d.keys()[Symbol.iterator](),ht;!(O=(ht=tt.next()).done);O=!0){var J=ht.value;L.set(J,rt++)}}catch(P){H=!0,Z=P}finally{try{!O&&tt.return&&tt.return()}finally{if(H)throw Z}}for(var It=0;It<L.size;It++)w[It]=[];u.forEach(function(P){for(var U=P.children().intersection(h);U.nodes(":childless").length==0;)U=U.nodes()[0].children().intersection(h);var k=0,K=U.nodes(":childless")[0].connectedEdges().length;U.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,k=at)}),b.set(P.id(),U.nodes(":childless")[k].id())}),T.forEach(function(P){var U=void 0;P.isParent()?U=L.get(b.get(P.id())):U=L.get(P.id()),P.neighborhood().nodes().forEach(function(k){h.intersection(P.edgesWith(k)).length>0&&(k.isParent()?w[U].push(b.get(k.id())):w[U].push(k.id()))})});var Nt=function(U){var k=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,w[k].push(K),w[L.get(K)].push(U)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(P){it=!0,ut=P}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=L.size;var mt=void 0;if(E>2){F=E<o.sampleSize?E:o.sampleSize;for(var Ot=0;Ot<E;Ot++)A[Ot]=[];for(var Rt=0;Rt<F;Rt++)a[Rt]=[];return o.quality=="draft"||o.step=="all"?(Q(S),z(),X(),mt={nodeIndexes:L,xCoords:G,yCoords:V}):(L.forEach(function(P,U){G.push(c.getElementById(U).position("x")),V.push(c.getElementById(U).position("y"))}),mt={nodeIndexes:L,xCoords:G,yCoords:V}),mt}else{var Ht=L.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(G.push(Pt.x),V.push(Pt.y),E==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();G.push(Pt.x+Ft/2+Vt/2+o.idealEdgeLength),V.push(Pt.y)}return mt={nodeIndexes:L,xCoords:G,yCoords:V},mt}};n.exports={spectralLayout:t}}),579:((n,r,i)=>{var f=i(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),n.exports=e}),140:(n=>{n.exports=C})},N={};function v(n){var r=N[n];if(r!==void 0)return r.exports;var i=N[n]={exports:{}};return x[n](i,i.exports,v),i.exports}var l=v(579);return l})()})})(he)),he.exports}var Tr=Er();const Nr=gr(Tr);var Ie={L:"left",R:"right",T:"top",B:"bottom"},Re={L:ct(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:ct(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:ct(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:ct(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},se={L:ct((I,M)=>I-M+2,"L"),R:ct((I,M)=>I-2,"R"),T:ct((I,M)=>I-M+2,"T"),B:ct((I,M)=>I-2,"B")},Lr=ct(function(I){return Wt(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),Se=ct(function(I){const M=I;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),Wt=ct(function(I){const M=I;return M==="L"||M==="R"},"isArchitectureDirectionX"),qt=ct(function(I){const M=I;return M==="T"||M==="B"},"isArchitectureDirectionY"),Ne=ct(function(I,M){const C=Wt(I)&&qt(M),x=qt(I)&&Wt(M);return C||x},"isArchitectureDirectionXY"),wr=ct(function(I){const M=I[0],C=I[1],x=Wt(M)&&qt(C),N=qt(M)&&Wt(C);return x||N},"isArchitecturePairXY"),Cr=ct(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),ye=ct(function(I,M){const C=`${I}${M}`;return Cr(C)?C:void 0},"getArchitectureDirectionPair"),Mr=ct(function([I,M],C){const x=C[0],N=C[1];return Wt(x)?qt(N)?[I+(x==="L"?-1:1),M+(N==="T"?1:-1)]:[I+(x==="L"?-1:1),M]:Wt(N)?[I+(N==="L"?1:-1),M+(x==="T"?1:-1)]:[I,M+(x==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ar=ct(function(I){return I==="LT"||I==="TL"?[1,1]:I==="BL"||I==="LB"?[1,-1]:I==="BR"||I==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Dr=ct(function(I,M){return Ne(I,M)?"bend":Wt(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Or=ct(function(I){return I.type==="service"},"isArchitectureService"),xr=ct(function(I){return I.type==="junction"},"isArchitectureJunction"),Pe=ct((I,M)=>{const[C,x]=[I,M].sort();return`${JSON.stringify(C)}-${JSON.stringify(x)}`},"architectureGroupAlignmentKey"),Ge=ct(I=>I.data(),"edgeData"),ie=ct(I=>I.data(),"nodeData"),Ir=or.architecture,ae,Ue=(ae=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=Ke,this.getAccTitle=je,this.setDiagramTitle=_e,this.getDiagramTitle=tr,this.getAccDescription=er,this.setAccDescription=rr,this.clear()}setDiagramId(M){this.diagramId=M}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",ir()}addService({id:M,icon:C,in:x,title:N,iconText:v}){if(this.registeredIds.has(M))throw new Error(`The service id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(x!==void 0){if(M===x)throw new Error(`The service [${M}] cannot be placed within itself`);if(!this.registeredIds.has(x))throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(x)==="node")throw new Error(`The service [${M}]'s parent is not a group`)}this.registeredIds.set(M,"node"),this.nodes.set(M,{id:M,type:"service",icon:C,iconText:v,title:N,edges:[],in:x})}getServices(){return[...this.nodes.values()].filter(Or)}addJunction({id:M,in:C}){if(this.registeredIds.has(M))throw new Error(`The junction id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(C!==void 0){if(M===C)throw new Error(`The junction [${M}] cannot be placed within itself`);if(!this.registeredIds.has(C))throw new Error(`The junction [${M}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(C)==="node")throw new Error(`The junction [${M}]'s parent is not a group`)}this.registeredIds.set(M,"node"),this.nodes.set(M,{id:M,type:"junction",edges:[],in:C})}getJunctions(){return[...this.nodes.values()].filter(xr)}getNodes(){return[...this.nodes.values()]}getNode(M){return this.nodes.get(M)??null}addGroup({id:M,icon:C,in:x,title:N}){if(this.registeredIds.has(M))throw new Error(`The group id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(x!==void 0){if(M===x)throw new Error(`The group [${M}] cannot be placed within itself`);if(!this.registeredIds.has(x))throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(x)==="node")throw new Error(`The group [${M}]'s parent is not a group`)}this.registeredIds.set(M,"group"),this.groups.set(M,{id:M,icon:C,title:N,in:x})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:M,rhsId:C,lhsDir:x,rhsDir:N,lhsInto:v,rhsInto:l,lhsGroup:n,rhsGroup:r,title:i}){if(!Se(x))throw new Error(`Invalid direction given for left hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(x)}`);if(!Se(N))throw new Error(`Invalid direction given for right hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(!this.nodes.has(M)&&!this.groups.has(M))throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(C)&&!this.groups.has(C))throw new Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes.get(M).in,e=this.nodes.get(C).in;if(n&&f&&e&&f==e)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(r&&f&&e&&f==e)throw new Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:M,lhsDir:x,lhsInto:v,lhsGroup:n,rhsId:C,rhsDir:N,rhsInto:l,rhsGroup:r,title:i};this.edges.push(g);const t=this.nodes.get(M),s=this.nodes.get(C);t&&s&&(t.edges.push(this.edges[this.edges.length-1]),s.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(M){if(M.members.length<2)throw new Error(`An align directive requires at least two members; got ${M.members.length}`);const C=new Set;M.members.forEach(x=>{if(this.registeredIds.get(x)!=="node")throw new Error(`align ${M.direction} references [${x}], which is not a service or junction`);if(C.has(x))throw new Error(`align ${M.direction} lists [${x}] more than once`);C.add(x)}),this.layoutHints.push(M)}getLayoutHints(){return this.layoutHints}getDataStructures(){var M,C;if(this.dataStructures===void 0){const x=new Map,N=new Map;for(const[i,f]of this.nodes.entries()){const e=new Map;for(const g of f.edges){const t=(M=this.getNode(g.lhsId))==null?void 0:M.in,s=(C=this.getNode(g.rhsId))==null?void 0:C.in;if(t&&s&&t!==s){const o=Dr(g.lhsDir,g.rhsDir);o!=="bend"&&x.set(Pe(t,s),o)}if(g.lhsId===i){const o=ye(g.lhsDir,g.rhsDir);o&&e.set(o,g.rhsId)}else{const o=ye(g.rhsDir,g.lhsDir);o&&e.set(o,g.lhsId)}}N.set(i,e)}const v=new Set,l=new Set(N.keys()),n=ct(i=>{const f=new Map([[i,[0,0]]]),e=[i];for(;e.length>0;){const g=e.shift();if(g){v.add(g),l.delete(g);const t=N.get(g);if(!t)throw new Error(`BFS error: adjacency list for id ${g} not found. Please report this as a bug.`);const s=f.get(g);if(!s)throw new Error(`BFS error: position for id ${g} not found in spatial map. Please report this as a bug.`);const[o,c]=s;t.forEach((h,T)=>{v.has(h)||(f.set(h,Mr([o,c],T)),e.push(h))})}}return f},"BFS"),r=[];for(;l.size>0;){const i=l.values().next().value;r.push(n(i))}this.dataStructures={adjList:N,spatialMaps:r,groupAlignments:x}}return this.dataStructures}setElementForId(M,C){this.elements.set(M,C)}getElementById(M){return this.elements.get(M)}getConfig(){return ar({...Ir,...nr().architecture})}getConfigField(M){return this.getConfig()[M]}},ct(ae,"ArchitectureDB"),ae),Rr=ct((I,M)=>{var C;qe(I,M),I.groups.map(x=>M.addGroup(x)),I.services.map(x=>M.addService({...x,type:"service"})),I.junctions.map(x=>M.addJunction({...x,type:"junction"})),I.edges.map(x=>M.addEdge(x)),(C=I.alignments)==null||C.map(x=>M.addLayoutHint({direction:x.direction,members:[...x.members]}))},"populateDb"),Ye={parser:{yy:void 0},parse:ct(async I=>{var x;const M=await cr("architecture",I);Fe.debug(M);const C=(x=Ye.parser)==null?void 0:x.yy;if(!(C instanceof Ue))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.");Rr(M,C)},"parse")},Sr=ct(I=>`
2
+ .edge {
3
+ stroke-width: ${I.archEdgeWidth};
4
+ stroke: ${I.archEdgeColor};
5
+ fill: none;
6
+ }
7
+
8
+ .arrow {
9
+ fill: ${I.archEdgeArrowColor};
10
+ }
11
+
12
+ .node-bkg {
13
+ fill: none;
14
+ stroke: ${I.archGroupBorderColor};
15
+ stroke-width: ${I.archGroupBorderWidth};
16
+ stroke-dasharray: 8;
17
+ }
18
+ .node-icon-text {
19
+ display: flex;
20
+ align-items: center;
21
+ }
22
+
23
+ .node-icon-text > div {
24
+ color: #fff;
25
+ margin: 1px;
26
+ height: fit-content;
27
+ text-align: center;
28
+ overflow: hidden;
29
+ display: -webkit-box;
30
+ -webkit-box-orient: vertical;
31
+ }
32
+ `,"getStyles"),Fr=Sr;function me(I,M){if(I===0)return M();const C=Math.random;let x=I>>>0;Math.random=function(){x=x+1831565813>>>0;let N=x;return N=Math.imul(N^N>>>15,N|1),N^=N+Math.imul(N^N>>>7,N|61),((N^N>>>14)>>>0)/4294967296};try{return M()}finally{Math.random=C}}ct(me,"withSeededRandom");var re=ct(I=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${I}</g>`,"wrapIcon"),ne={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:re('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:re('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:re('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:re('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:re('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:fr,blank:{body:re("")}}},br=ct(async function(I,M,C,x){const N=C.getConfigField("padding"),v=C.getConfigField("iconSize"),l=v/2,n=v/6,r=n/2;await Promise.all(M.edges().map(async i=>{var Y,B;const{source:f,sourceDir:e,sourceArrow:g,sourceGroup:t,target:s,targetDir:o,targetArrow:c,targetGroup:h,label:T}=Ge(i);let{x:u,y:d}=i[0].sourceEndpoint();const{x:L,y:b}=i[0].midpoint();let{x:w,y:G}=i[0].targetEndpoint();const V=N+4;if(t&&(Wt(e)?u+=e==="L"?-V:V:d+=e==="T"?-V:V+18),h&&(Wt(o)?w+=o==="L"?-V:V:G+=o==="T"?-V:V+18),!t&&((Y=C.getNode(f))==null?void 0:Y.type)==="junction"&&(Wt(e)?u+=e==="L"?l:-l:d+=e==="T"?l:-l),!h&&((B=C.getNode(s))==null?void 0:B.type)==="junction"&&(Wt(o)?w+=o==="L"?l:-l:G+=o==="T"?l:-l),i[0]._private.rscratch){const A=I.insert("g");if(A.insert("path").attr("d",`M ${u},${d} L ${L},${b} L${w},${G} `).attr("class","edge").attr("id",`${x}-${hr(f,s,{prefix:"L"})}`),g){const j=Wt(e)?se[e](u,n):u-r,a=qt(e)?se[e](d,n):d-r;A.insert("polygon").attr("points",Re[e](n)).attr("transform",`translate(${j},${a})`).attr("class","arrow")}if(c){const j=Wt(o)?se[o](w,n):w-r,a=qt(o)?se[o](G,n):G-r;A.insert("polygon").attr("points",Re[o](n)).attr("transform",`translate(${j},${a})`).attr("class","arrow")}if(T){const j=Ne(e,o)?"XY":Wt(e)?"X":"Y";let a=0;j==="X"?a=Math.abs(u-w):j==="Y"?a=Math.abs(d-G)/1.5:a=Math.abs(u-w)/2;const E=A.append("g");if(await Te(E,T,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},Ee()),E.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),j==="X")E.attr("transform","translate("+L+", "+b+")");else if(j==="Y")E.attr("transform","translate("+L+", "+b+") rotate(-90)");else if(j==="XY"){const p=ye(e,o);if(p&&wr(p)){const m=E.node().getBoundingClientRect(),[y,S]=Ar(p);E.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*S*45})`);const D=E.node().getBoundingClientRect();E.attr("transform",`
33
+ translate(${L}, ${b-m.height/2})
34
+ translate(${y*D.width/2}, ${S*D.height/2})
35
+ rotate(${-1*y*S*45}, 0, ${m.height/2})
36
+ `)}}}}}))},"drawEdges"),Pr=ct(async function(I,M,C,x){const v=C.getConfigField("padding")*.75,l=C.getConfigField("fontSize"),r=C.getConfigField("iconSize")/2;await Promise.all(M.nodes().map(async i=>{const f=ie(i);if(f.type==="group"){const{h:e,w:g,x1:t,y1:s}=i.boundingBox(),o=I.append("rect");o.attr("id",`${x}-group-${f.id}`).attr("x",t+r).attr("y",s+r).attr("width",g).attr("height",e).attr("class","node-bkg");const c=I.append("g");let h=t,T=s;if(f.icon){const u=c.append("g");u.html(`<g>${await pe(f.icon,{height:v,width:v,fallbackPrefix:ne.prefix})}</g>`),u.attr("transform","translate("+(h+r+1)+", "+(T+r+1)+")"),h+=v,T+=l/2-1-2}if(f.label){const u=c.append("g");await Te(u,f.label,{useHtmlLabels:!1,width:g,classes:"architecture-service-label"},Ee()),u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),u.attr("transform","translate("+(h+r+4)+", "+(T+r+2)+")")}C.setElementForId(f.id,o)}}))},"drawGroups"),Gr=ct(async function(I,M,C,x){const N=Ee();for(const v of C){const l=M.append("g"),n=I.getConfigField("iconSize");if(v.title){const e=l.append("g");await Te(e,v.title,{useHtmlLabels:!1,width:n*1.5,classes:"architecture-service-label"},N),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+n/2+", "+n+")")}const r=l.append("g");if(v.icon)r.html(`<g>${await pe(v.icon,{height:n,width:n,fallbackPrefix:ne.prefix})}</g>`);else if(v.iconText){r.html(`<g>${await pe("blank",{height:n,width:n,fallbackPrefix:ne.prefix})}</g>`);const t=r.append("g").append("foreignObject").attr("width",n).attr("height",n).append("div").attr("class","node-icon-text").attr("style",`height: ${n}px;`).append("div").html(sr(v.iconText,N)),s=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((n-2)/s)};`)}else r.append("path").attr("class","node-bkg").attr("id",`${x}-node-${v.id}`).attr("d",`M0,${n} V5 Q0,0 5,0 H${n-5} Q${n},0 ${n},5 V${n} Z`);l.attr("id",`${x}-service-${v.id}`).attr("class","architecture-service");const{width:i,height:f}=l.node().getBBox();v.width=i,v.height=f,I.setElementForId(v.id,l)}return 0},"drawServices"),Ur=ct(function(I,M,C,x){C.forEach(N=>{const v=M.append("g"),l=I.getConfigField("iconSize");v.append("g").append("rect").attr("id",`${x}-node-${N.id}`).attr("fill-opacity","0").attr("width",l).attr("height",l),v.attr("class","architecture-junction");const{width:r,height:i}=v._groups[0][0].getBBox();v.width=r,v.height=i,I.setElementForId(N.id,v)})},"drawJunctions");lr([{name:ne.prefix,icons:ne}]);be.use(Nr);function Xe(I,M,C){I.forEach(x=>{M.add({group:"nodes",data:{type:"service",id:x.id,icon:x.icon,label:x.title,parent:x.in,width:C.getConfigField("iconSize"),height:C.getConfigField("iconSize")},classes:"node-service"})})}ct(Xe,"addServices");function He(I,M,C){I.forEach(x=>{M.add({group:"nodes",data:{type:"junction",id:x.id,parent:x.in,width:C.getConfigField("iconSize"),height:C.getConfigField("iconSize")},classes:"node-junction"})})}ct(He,"addJunctions");function We(I,M){M.nodes().map(C=>{const x=ie(C);if(x.type==="group")return;x.x=C.position().x,x.y=C.position().y,I.getElementById(x.id).attr("transform","translate("+(x.x||0)+","+(x.y||0)+")")})}ct(We,"positionNodes");function Ve(I,M){I.forEach(C=>{M.add({group:"nodes",data:{type:"group",id:C.id,icon:C.icon,label:C.title,parent:C.in},classes:"node-group"})})}ct(Ve,"addGroups");function ze(I,M){I.forEach(C=>{const{lhsId:x,rhsId:N,lhsInto:v,lhsGroup:l,rhsInto:n,lhsDir:r,rhsDir:i,rhsGroup:f,title:e}=C,g=Ne(C.lhsDir,C.rhsDir)?"segments":"straight",t={id:`${x}-${N}`,label:e,source:x,sourceDir:r,sourceArrow:v,sourceGroup:l,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:N,targetDir:i,targetArrow:n,targetGroup:f,targetEndpoint:i==="L"?"0 50%":i==="R"?"100% 50%":i==="T"?"50% 0":"50% 100%"};M.add({group:"edges",data:t,classes:g})})}ct(ze,"addEdges");function $e(I,M,C,x=[]){const N=ct((g,t)=>{const s=new Map;for(const[o,c]of g.entries()){const h=`${o}`;let T=0;const u=[...c.entries()];if(u.length===1){s.set(h,u[0][1]);continue}for(let d=0;d<u.length-1;d++)for(let L=d+1;L<u.length;L++){const[b,w]=u[d],[G,V]=u[L];if(C.get(Pe(b,G))===t)s.set(h,[...s.get(h)??[],...w,...V]);else if(b==="default"||G==="default")s.set(h,[...s.get(h)??[],...w,...V]);else{const B=`${h}-${T++}`;s.set(B,w);const A=`${h}-${T++}`;s.set(A,V)}}}return s},"flattenAlignments"),v=M.map(g=>{const t=new Map,s=new Map;return g.forEach(([o,c],h)=>{var L;const T=((L=I.getNode(h))==null?void 0:L.in)??"default",u=t.get(c)??new Map;t.has(c)||t.set(c,u);const d=s.get(o)??new Map;s.has(o)||s.set(o,d);for(const b of[u,d]){const w=b.get(T)??[];b.has(T)||b.set(T,w),w.push(h)}}),{horiz:[...N(t,"horizontal").values()].filter(o=>o.length>1),vert:[...N(s,"vertical").values()].filter(o=>o.length>1)}}),[l,n]=v.reduce(([g,t],{horiz:s,vert:o})=>[[...g,...s],[...t,...o]],[[],[]]),r=new Set;x.forEach(g=>g.members.forEach(t=>r.add(t)));const i=ct(g=>g.filter(t=>!t.some(s=>r.has(s))),"dropOverlapping"),f=i(l),e=i(n);return x.forEach(g=>{g.members.length<2||(g.direction==="row"?f.push([...g.members]):e.push([...g.members]))}),{horizontal:f,vertical:e}}ct($e,"getAlignments");function Be(I,M,C=[]){const x=[],N=M.getConfigField("iconSize"),v=M.getConfigField("idealEdgeLengthMultiplier"),l=v*N,n=new Set;C.forEach(f=>{for(let e=0;e<f.members.length-1;e++){const g=f.members[e],t=f.members[e+1];n.add(`${g}|${t}`),n.add(`${t}|${g}`),f.direction==="row"?x.push({left:g,right:t,gap:l}):x.push({top:g,bottom:t,gap:l})}});const r=ct(f=>`${f[0]},${f[1]}`,"posToStr"),i=ct(f=>f.split(",").map(e=>parseInt(e)),"strToPos");return I.forEach(f=>{const e=new Map([...f.entries()].map(([o,c])=>[r(c),o])),g=[r([0,0])],t={},s={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;g.length>0;){const o=g.shift();if(o){t[o]=1;const c=e.get(o);if(c){const h=i(o);Object.entries(s).forEach(([T,u])=>{const d=r([h[0]+u[0],h[1]+u[1]]),L=e.get(d);if(L&&!t[d]){if(g.push(d),n.has(`${c}|${L}`))return;x.push({[Ie[T]]:L,[Ie[Lr(T)]]:c,gap:v*N})}})}}}}),x}ct(Be,"getRelativeConstraints");function Ze(I,M,C,x,N,{spatialMaps:v,groupAlignments:l}){return new Promise(n=>{const r=ur("body").append("div").attr("id","cy").attr("style","display:none"),i=be({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${N.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${N.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});r.remove(),Ve(C,i),Xe(I,i,N),He(M,i,N),ze(x,i);const f=N.getLayoutHints(),e=$e(N,v,l,f),g=Be(v,N,f),t=N.getConfigField("iconSize"),s=N.getConfigField("idealEdgeLengthMultiplier")*t,o=.5*t,c=N.getConfigField("edgeElasticity"),h=N.getConfigField("seed"),T=i.layout({name:"fcose",quality:"proof",randomize:N.getConfigField("randomize"),nodeSeparation:N.getConfigField("nodeSeparation"),numIter:N.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(u){const[d,L]=u.connectedNodes(),{parent:b}=ie(d),{parent:w}=ie(L);return b===w?s:o},edgeElasticity(u){const[d,L]=u.connectedNodes(),{parent:b}=ie(d),{parent:w}=ie(L);return b===w?c:.001},alignmentConstraint:e,relativePlacementConstraint:g});T.one("layoutstop",()=>{var d;function u(L,b,w,G){let V,Y;const{x:B,y:A}=L,{x:j,y:a}=b;Y=(G-A+(B-w)*(A-a)/(B-j))/Math.sqrt(1+Math.pow((A-a)/(B-j),2)),V=Math.sqrt(Math.pow(G-A,2)+Math.pow(w-B,2)-Math.pow(Y,2));const E=Math.sqrt(Math.pow(j-B,2)+Math.pow(a-A,2));V=V/E;let p=(j-B)*(G-A)-(a-A)*(w-B);switch(!0){case p>=0:p=1;break;case p<0:p=-1;break}let m=(j-B)*(w-B)+(a-A)*(G-A);switch(!0){case m>=0:m=1;break;case m<0:m=-1;break}return Y=Math.abs(Y)*p,V=V*m,{distances:Y,weights:V}}ct(u,"getSegmentWeights"),i.startBatch();for(const L of Object.values(i.edges()))if((d=L.data)!=null&&d.call(L)){const{x:b,y:w}=L.source().position(),{x:G,y:V}=L.target().position();if(b!==G&&w!==V){const Y=L.sourceEndpoint(),B=L.targetEndpoint(),{sourceDir:A}=Ge(L),[j,a]=qt(A)?[Y.x,B.y]:[B.x,Y.y],{weights:E,distances:p}=u(Y,B,j,a);L.style("segment-distances",p),L.style("segment-weights",E)}}i.endBatch(),me(h,()=>T.run())});try{me(h,()=>T.run())}catch(u){throw u instanceof RangeError&&u.message.includes("Invalid array length")?new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):u}i.ready(u=>{Fe.info("Ready",u),n(i)})})}ct(Ze,"layoutArchitecture");var Yr=ct(async(I,M,C,x)=>{const N=x.db;N.setDiagramId(M);const v=N.getServices(),l=N.getJunctions(),n=N.getGroups(),r=N.getEdges(),i=N.getDataStructures(),f=Qe(M),e=f.append("g");e.attr("class","architecture-edges");const g=f.append("g");g.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Gr(N,g,v,M),Ur(N,g,l,M);const s=await Ze(v,l,n,r,N,i);await br(e,s,N,M),await Pr(t,s,N,M),We(N,s),Je(void 0,f,N.getConfigField("padding"),N.getConfigField("useMaxWidth"))},"draw"),Xr={draw:Yr},Qr={parser:Ye,get db(){return new Ue},renderer:Xr,styles:Fr};export{Qr as diagram};
@@ -0,0 +1 @@
1
+ function t(r){return typeof r=="object"&&"length"in r?r:Array.from(r)}export{t as a};