cli-jaw 2.0.4 → 2.0.5
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.
- package/README.ja.md +17 -0
- package/README.ko.md +17 -0
- package/README.md +17 -0
- package/README.zh-CN.md +16 -1
- package/dist/bin/cli-jaw.js +7 -1
- package/dist/bin/cli-jaw.js.map +1 -1
- package/dist/bin/commands/browser.js +5 -0
- package/dist/bin/commands/browser.js.map +1 -1
- package/dist/bin/commands/connector.js +227 -0
- package/dist/bin/commands/connector.js.map +1 -0
- package/dist/bin/commands/dashboard-memory.js +243 -0
- package/dist/bin/commands/dashboard-memory.js.map +1 -0
- package/dist/bin/commands/dashboard.js +5 -0
- package/dist/bin/commands/dashboard.js.map +1 -1
- package/dist/bin/commands/dispatch-helpers.js +17 -0
- package/dist/bin/commands/dispatch-helpers.js.map +1 -0
- package/dist/bin/commands/dispatch.js +8 -3
- package/dist/bin/commands/dispatch.js.map +1 -1
- package/dist/bin/commands/doctor.js +34 -8
- package/dist/bin/commands/doctor.js.map +1 -1
- package/dist/bin/commands/reminders.js +105 -0
- package/dist/bin/commands/reminders.js.map +1 -0
- package/dist/bin/postinstall.js +26 -0
- package/dist/bin/postinstall.js.map +1 -1
- package/dist/server.js +71 -9
- package/dist/server.js.map +1 -1
- package/dist/src/agent/events.js +58 -30
- package/dist/src/agent/events.js.map +1 -1
- package/dist/src/agent/spawn.js +20 -3
- package/dist/src/agent/spawn.js.map +1 -1
- package/dist/src/agent/tool-timeout.js +27 -0
- package/dist/src/agent/tool-timeout.js.map +1 -0
- package/dist/src/agent/watchdog.js +20 -3
- package/dist/src/agent/watchdog.js.map +1 -1
- package/dist/src/browser/launch-policy.js +1 -1
- package/dist/src/browser/launch-policy.js.map +1 -1
- package/dist/src/browser/web-ai/chatgpt-model.js +102 -19
- package/dist/src/browser/web-ai/chatgpt-model.js.map +1 -1
- package/dist/src/browser/web-ai/chatgpt-response.js +30 -1
- package/dist/src/browser/web-ai/chatgpt-response.js.map +1 -1
- package/dist/src/browser/web-ai/chatgpt.js +55 -8
- package/dist/src/browser/web-ai/chatgpt.js.map +1 -1
- package/dist/src/browser/web-ai/diagnostics.js +1 -0
- package/dist/src/browser/web-ai/diagnostics.js.map +1 -1
- package/dist/src/browser/web-ai/gemini-live.js +24 -3
- package/dist/src/browser/web-ai/gemini-live.js.map +1 -1
- package/dist/src/browser/web-ai/interstitial.js +64 -0
- package/dist/src/browser/web-ai/interstitial.js.map +1 -0
- package/dist/src/browser/web-ai/session.js +12 -0
- package/dist/src/browser/web-ai/session.js.map +1 -1
- package/dist/src/browser/web-ai/watcher.js +25 -7
- package/dist/src/browser/web-ai/watcher.js.map +1 -1
- package/dist/src/cli/connector.js +60 -0
- package/dist/src/cli/connector.js.map +1 -0
- package/dist/src/cli/handlers-runtime.js +39 -0
- package/dist/src/cli/handlers-runtime.js.map +1 -1
- package/dist/src/cli/reminders.js +29 -0
- package/dist/src/cli/reminders.js.map +1 -0
- package/dist/src/core/cli-detect.js +161 -0
- package/dist/src/core/cli-detect.js.map +1 -0
- package/dist/src/core/config.js +9 -22
- package/dist/src/core/config.js.map +1 -1
- package/dist/src/core/db.js +14 -1
- package/dist/src/core/db.js.map +1 -1
- package/dist/src/core/settings-merge.js +2 -2
- package/dist/src/core/settings-merge.js.map +1 -1
- package/dist/src/jaw-ceo/completion.js +101 -0
- package/dist/src/jaw-ceo/completion.js.map +1 -0
- package/dist/src/jaw-ceo/confirmations.js +39 -0
- package/dist/src/jaw-ceo/confirmations.js.map +1 -0
- package/dist/src/jaw-ceo/coordinator-admin.js +295 -0
- package/dist/src/jaw-ceo/coordinator-admin.js.map +1 -0
- package/dist/src/jaw-ceo/coordinator-completions.js +201 -0
- package/dist/src/jaw-ceo/coordinator-completions.js.map +1 -0
- package/dist/src/jaw-ceo/coordinator-realtime-tools.js +108 -0
- package/dist/src/jaw-ceo/coordinator-realtime-tools.js.map +1 -0
- package/dist/src/jaw-ceo/coordinator-types.js +2 -0
- package/dist/src/jaw-ceo/coordinator-types.js.map +1 -0
- package/dist/src/jaw-ceo/coordinator-utils.js +86 -0
- package/dist/src/jaw-ceo/coordinator-utils.js.map +1 -0
- package/dist/src/jaw-ceo/coordinator-workers.js +234 -0
- package/dist/src/jaw-ceo/coordinator-workers.js.map +1 -0
- package/dist/src/jaw-ceo/coordinator.js +116 -0
- package/dist/src/jaw-ceo/coordinator.js.map +1 -0
- package/dist/src/jaw-ceo/docs-edit.js +142 -0
- package/dist/src/jaw-ceo/docs-edit.js.map +1 -0
- package/dist/src/jaw-ceo/openai-key.js +22 -0
- package/dist/src/jaw-ceo/openai-key.js.map +1 -0
- package/dist/src/jaw-ceo/policy.js +92 -0
- package/dist/src/jaw-ceo/policy.js.map +1 -0
- package/dist/src/jaw-ceo/realtime-sideband.js +372 -0
- package/dist/src/jaw-ceo/realtime-sideband.js.map +1 -0
- package/dist/src/jaw-ceo/store.js +206 -0
- package/dist/src/jaw-ceo/store.js.map +1 -0
- package/dist/src/jaw-ceo/transcript-persistence.js +28 -0
- package/dist/src/jaw-ceo/transcript-persistence.js.map +1 -0
- package/dist/src/jaw-ceo/types.js +2 -0
- package/dist/src/jaw-ceo/types.js.map +1 -0
- package/dist/src/manager/connector/audit-log.js +95 -0
- package/dist/src/manager/connector/audit-log.js.map +1 -0
- package/dist/src/manager/connector/routes.js +251 -0
- package/dist/src/manager/connector/routes.js.map +1 -0
- package/dist/src/manager/connector/types.js +2 -0
- package/dist/src/manager/connector/types.js.map +1 -0
- package/dist/src/manager/memory/embedding/hybrid-search.js +61 -0
- package/dist/src/manager/memory/embedding/hybrid-search.js.map +1 -0
- package/dist/src/manager/memory/embedding/index.js +6 -0
- package/dist/src/manager/memory/embedding/index.js.map +1 -0
- package/dist/src/manager/memory/embedding/provider.js +187 -0
- package/dist/src/manager/memory/embedding/provider.js.map +1 -0
- package/dist/src/manager/memory/embedding/state-machine.js +68 -0
- package/dist/src/manager/memory/embedding/state-machine.js.map +1 -0
- package/dist/src/manager/memory/embedding/sync.js +156 -0
- package/dist/src/manager/memory/embedding/sync.js.map +1 -0
- package/dist/src/manager/memory/embedding/vec-store.js +166 -0
- package/dist/src/manager/memory/embedding/vec-store.js.map +1 -0
- package/dist/src/manager/memory/federation.js +56 -0
- package/dist/src/manager/memory/federation.js.map +1 -0
- package/dist/src/manager/memory/index.js +5 -0
- package/dist/src/manager/memory/index.js.map +1 -0
- package/dist/src/manager/memory/instance-discovery.js +83 -0
- package/dist/src/manager/memory/instance-discovery.js.map +1 -0
- package/dist/src/manager/memory/result-rerank.js +28 -0
- package/dist/src/manager/memory/result-rerank.js.map +1 -0
- package/dist/src/manager/memory/types.js +2 -0
- package/dist/src/manager/memory/types.js.map +1 -0
- package/dist/src/manager/observability.js.map +1 -1
- package/dist/src/manager/process-verify.js +4 -1
- package/dist/src/manager/process-verify.js.map +1 -1
- package/dist/src/manager/registry.js +59 -1
- package/dist/src/manager/registry.js.map +1 -1
- package/dist/src/manager/reminders/api.js +16 -0
- package/dist/src/manager/reminders/api.js.map +1 -0
- package/dist/src/manager/reminders/dispatcher.js +40 -0
- package/dist/src/manager/reminders/dispatcher.js.map +1 -0
- package/dist/src/manager/reminders/due-time.js +16 -0
- package/dist/src/manager/reminders/due-time.js.map +1 -0
- package/dist/src/manager/reminders/instance-link.js +22 -0
- package/dist/src/manager/reminders/instance-link.js.map +1 -0
- package/dist/src/manager/reminders/routes.js +170 -0
- package/dist/src/manager/reminders/routes.js.map +1 -0
- package/dist/src/manager/reminders/scheduler.js +67 -0
- package/dist/src/manager/reminders/scheduler.js.map +1 -0
- package/dist/src/manager/reminders/store.js +311 -0
- package/dist/src/manager/reminders/store.js.map +1 -0
- package/dist/src/manager/routes/dashboard-memory.js +380 -0
- package/dist/src/manager/routes/dashboard-memory.js.map +1 -0
- package/dist/src/manager/server.js +209 -4
- package/dist/src/manager/server.js.map +1 -1
- package/dist/src/manager/worker-messages.js +60 -0
- package/dist/src/manager/worker-messages.js.map +1 -0
- package/dist/src/manager/workspace/routes.js +240 -0
- package/dist/src/manager/workspace/routes.js.map +1 -0
- package/dist/src/manager/workspace/store.js +369 -0
- package/dist/src/manager/workspace/store.js.map +1 -0
- package/dist/src/manager/workspace/types.js +5 -0
- package/dist/src/manager/workspace/types.js.map +1 -0
- package/dist/src/memory/indexing.js +38 -11
- package/dist/src/memory/indexing.js.map +1 -1
- package/dist/src/memory/shared.js +6 -0
- package/dist/src/memory/shared.js.map +1 -1
- package/dist/src/orchestrator/parser.js +3 -8
- package/dist/src/orchestrator/parser.js.map +1 -1
- package/dist/src/prompt/builder.js +35 -16
- package/dist/src/prompt/builder.js.map +1 -1
- package/dist/src/prompt/templates/a1-system.md +23 -1
- package/dist/src/reminders/jaw-reminders-bridge.js +313 -0
- package/dist/src/reminders/jaw-reminders-bridge.js.map +1 -0
- package/dist/src/reminders/types.js +7 -0
- package/dist/src/reminders/types.js.map +1 -0
- package/dist/src/routes/jaw-ceo.js +290 -0
- package/dist/src/routes/jaw-ceo.js.map +1 -0
- package/dist/src/routes/jaw-memory.js +37 -1
- package/dist/src/routes/jaw-memory.js.map +1 -1
- package/dist/src/routes/settings.js +47 -12
- package/dist/src/routes/settings.js.map +1 -1
- package/package.json +4 -1
- package/public/css/chat.css +90 -12
- package/public/css/diagram.css +9 -9
- package/public/css/modals.css +60 -1
- package/public/css/sidebar.css +18 -0
- package/public/dist/assets/{AdvancedExport-DJZ2VmBR.js → AdvancedExport-BAdZUC-6.js} +1 -1
- package/public/dist/assets/{Agent-CgpLT8IY.js → Agent-DNpehKB2.js} +1 -1
- package/public/dist/assets/{Browser-CrkiQoB8.js → Browser-BsdxDVgM.js} +1 -1
- package/public/dist/assets/{ChannelsDiscord-CVUC22D4.js → ChannelsDiscord-Dg_jto6l.js} +1 -1
- package/public/dist/assets/{ChannelsTelegram-DEatIQNM.js → ChannelsTelegram-DGyZfJGS.js} +1 -1
- package/public/dist/assets/DashboardEmbeddingSection-BYdGgqg7.js +2 -0
- package/public/dist/assets/{DashboardMeta-BKoxRc7i.js → DashboardMeta-CAH9ONTb.js} +1 -1
- package/public/dist/assets/{Display-DnNGV9Km.js → Display-DM_yvyKL.js} +1 -1
- package/public/dist/assets/{Employees-DZ2iJYKy.js → Employees-CuYuTy0R.js} +1 -1
- package/public/dist/assets/{HealthBadge-Cq2c7G9s.js → HealthBadge-Dtr-dDnw.js} +1 -1
- package/public/dist/assets/{Heartbeat-BML6eTXZ.js → Heartbeat-C-vq02MW.js} +1 -1
- package/public/dist/assets/{InlineWarn-BooBRm7o.js → InlineWarn-E64UaKFh.js} +1 -1
- package/public/dist/assets/{Mcp-BlEviQ3h.js → Mcp-Dlp2X7X7.js} +1 -1
- package/public/dist/assets/{Memory-BRyH80He.js → Memory-BPKWJDXK.js} +1 -1
- package/public/dist/assets/MilkdownWysiwygEditor-Ctww8i0L.js +160 -0
- package/public/dist/assets/{ModelProvider-DxyR7EL9.js → ModelProvider-Bd6vGkXT.js} +1 -1
- package/public/dist/assets/{Network-DDOOESh1.js → Network-Df1R2YcQ.js} +1 -1
- package/public/dist/assets/{Permissions-Br0eSbKb.js → Permissions-BKJ5K6EL.js} +1 -1
- package/public/dist/assets/{Permissions-QHkzStqQ.js → Permissions-CcWZoOVP.js} +1 -1
- package/public/dist/assets/{Profile-C79NKumk.js → Profile-DZ7xf1WZ.js} +1 -1
- package/public/dist/assets/{Prompts-BmiIDiXW.js → Prompts-Bh5DYt8e.js} +1 -1
- package/public/dist/assets/{SpeechKeys-B8304XJK.js → SpeechKeys-CQwtVxOP.js} +1 -1
- package/public/dist/assets/app-BxsIleo0.js +32 -0
- package/public/dist/assets/app-CB9n5A77.css +1 -0
- package/public/dist/assets/architecture-YZFGNWBL-BRI-0IaU.js +1 -0
- package/public/dist/assets/{architectureDiagram-Q4EWVU46-D0VjH4Hz.js → architectureDiagram-Q4EWVU46-z0JCgZrJ.js} +1 -1
- package/public/dist/assets/{blockDiagram-DXYQGD6D-CY4ROZPD.js → blockDiagram-DXYQGD6D-KaOz3aFS.js} +1 -1
- package/public/dist/assets/{c4Diagram-AHTNJAMY-CXSKBhA5.js → c4Diagram-AHTNJAMY-Bp2QLC-s.js} +1 -1
- package/public/dist/assets/channel-jLopKIgm.js +1 -0
- package/public/dist/assets/{chunk-2KRD3SAO-DKaML5Aw.js → chunk-2KRD3SAO-C8hJZPJu.js} +1 -1
- package/public/dist/assets/{chunk-336JU56O-CU3sZss9.js → chunk-336JU56O-CAt5aBOe.js} +1 -1
- package/public/dist/assets/chunk-426QAEUC-atJRhvKN.js +1 -0
- package/public/dist/assets/{chunk-4BX2VUAB-X0ZSlark.js → chunk-4BX2VUAB-Cm3KqBkS.js} +1 -1
- package/public/dist/assets/{chunk-4TB4RGXK-DxI0GIVy.js → chunk-4TB4RGXK-BD7UhIN8.js} +1 -1
- package/public/dist/assets/chunk-55IACEB6-CAWcPDdr.js +1 -0
- package/public/dist/assets/{chunk-5FUZZQ4R-BqlA0aLQ.js → chunk-5FUZZQ4R-Cg1pzs6p.js} +1 -1
- package/public/dist/assets/{chunk-5PVQY5BW-BVW1DG4s.js → chunk-5PVQY5BW-otv3HwE_.js} +1 -1
- package/public/dist/assets/{chunk-67CJDMHE-Blm2TZ-J.js → chunk-67CJDMHE-AU2iOKLT.js} +1 -1
- package/public/dist/assets/{chunk-7N4EOEYR-BoIOnnji.js → chunk-7N4EOEYR-BTIS4jBw.js} +1 -1
- package/public/dist/assets/{chunk-AA7GKIK3-Dsfi7oEW.js → chunk-AA7GKIK3-c9UUJO_T.js} +1 -1
- package/public/dist/assets/{chunk-BSJP7CBP-DMGz9IOn.js → chunk-BSJP7CBP-DnSYKjii.js} +1 -1
- package/public/dist/assets/{chunk-CIAEETIT-T5_zEp7h.js → chunk-CIAEETIT-Dwbln6rM.js} +1 -1
- package/public/dist/assets/{chunk-EDXVE4YY-DjfvQwok.js → chunk-EDXVE4YY-COudQKkJ.js} +1 -1
- package/public/dist/assets/{chunk-ENJZ2VHE-LawplD1x.js → chunk-ENJZ2VHE-PT_jAckw.js} +1 -1
- package/public/dist/assets/{chunk-FMBD7UC4-C7tckXtF.js → chunk-FMBD7UC4-6yXYicjw.js} +1 -1
- package/public/dist/assets/{chunk-FOC6F5B3-xPGbUzqY.js → chunk-FOC6F5B3-BqDmFFeg.js} +1 -1
- package/public/dist/assets/{chunk-ICPOFSXX-Cdp_Bt1o.js → chunk-ICPOFSXX-P6V6jqiT.js} +2 -2
- package/public/dist/assets/{chunk-K5T4RW27-BwIFil23.js → chunk-K5T4RW27-C42sOmZR.js} +1 -1
- package/public/dist/assets/{chunk-KGLVRYIC-BsNQ1OkZ.js → chunk-KGLVRYIC-K-BVa8b2.js} +1 -1
- package/public/dist/assets/{chunk-LIHQZDEY-DbaX7k3n.js → chunk-LIHQZDEY-Xw9ZX8of.js} +1 -1
- package/public/dist/assets/{chunk-ORNJ4GCN-C6D0ZHHr.js → chunk-ORNJ4GCN-CEXU6WaD.js} +1 -1
- package/public/dist/assets/{chunk-OYMX7WX6-C1WV9uUT.js → chunk-OYMX7WX6-DmJG2z1S.js} +1 -1
- package/public/dist/assets/chunk-QZHKN3VN-BkVLii_3.js +1 -0
- package/public/dist/assets/{chunk-U2HBQHQK-B-5yzlzA.js → chunk-U2HBQHQK-Ny6UwUgK.js} +1 -1
- package/public/dist/assets/{chunk-X2U36JSP-yL0Tpsl1.js → chunk-X2U36JSP-CoMFMVNF.js} +1 -1
- package/public/dist/assets/{chunk-XPW4576I-CeaUaSCU.js → chunk-XPW4576I-CmAz5C-j.js} +1 -1
- package/public/dist/assets/{chunk-YZCP3GAM-CASMOrQq.js → chunk-YZCP3GAM-c7FYtZME.js} +1 -1
- package/public/dist/assets/{chunk-ZZ45TVLE-B4c7TOr9.js → chunk-ZZ45TVLE-D5oxCC1O.js} +1 -1
- package/public/dist/assets/classDiagram-6PBFFD2Q-BgOyAynm.js +1 -0
- package/public/dist/assets/classDiagram-v2-HSJHXN6E-5gBdoVH9.js +1 -0
- package/public/dist/assets/{cose-bilkent-S5V4N54A-B21AcnwY.js → cose-bilkent-S5V4N54A-CvH6qY_r.js} +1 -1
- package/public/dist/assets/{dagre-DzTKkA3a.js → dagre--20B2-ZQ.js} +1 -1
- package/public/dist/assets/{dagre-KV5264BT-fAyzMxIJ.js → dagre-KV5264BT-CQ0wo0ma.js} +1 -1
- package/public/dist/assets/{diagram-5BDNPKRD-O30SB9_x.js → diagram-5BDNPKRD-Cl4PzCD0.js} +1 -1
- package/public/dist/assets/{diagram-G4DWMVQ6-DZ1S54sq.js → diagram-G4DWMVQ6-_aP6kMTh.js} +1 -1
- package/public/dist/assets/{diagram-MMDJMWI5-DRO_GSWW.js → diagram-MMDJMWI5-J1l6Q0JG.js} +1 -1
- package/public/dist/assets/{diagram-TYMM5635-BxWgQj5r.js → diagram-TYMM5635-B_Xoa1Gp.js} +1 -1
- package/public/dist/assets/{dist-W51oDoeA.js → dist-2oDfqE98.js} +1 -1
- package/public/dist/assets/{dist-BZosRD2u.js → dist-55MYVjjj.js} +1 -1
- package/public/dist/assets/dist-B1p80u1b.js +1 -0
- package/public/dist/assets/{dist-Bd9PlnQm.js → dist-B1rKu9eP.js} +1 -1
- package/public/dist/assets/{dist-Ch5VAlV9.js → dist-B6G8pbap.js} +1 -1
- package/public/dist/assets/{dist-CpUK8ypo.js → dist-BA7sRne4.js} +1 -1
- package/public/dist/assets/{dist-eU7TyC86.js → dist-BDMNMdPF.js} +1 -1
- package/public/dist/assets/{dist-DFYRUAjN.js → dist-BGzHP3f8.js} +1 -1
- package/public/dist/assets/dist-BKyzWv22.js +1 -0
- package/public/dist/assets/{dist-BNfXO3Yr.js → dist-BTp_Oy_x.js} +1 -1
- package/public/dist/assets/{dist-BD0UXfgF2.js → dist-BhzKO6nt2.js} +1 -1
- package/public/dist/assets/{dist-BUnPYbK3.js → dist-BjqyutOM.js} +1 -1
- package/public/dist/assets/dist-BoG5I6U5.js +1 -0
- package/public/dist/assets/{dist-yHP6L0Ty.js → dist-BuaQLcgQ.js} +1 -1
- package/public/dist/assets/{dist-DZsFVYF4.js → dist-C0sOT_UM.js} +5 -5
- package/public/dist/assets/{dist-CIuXW-sc.js → dist-C5S-Rbvc.js} +1 -1
- package/public/dist/assets/{dist-Db16ogVk.js → dist-C9LWf2uC.js} +1 -1
- package/public/dist/assets/{dist-urPTQzXL.js → dist-CCKktDoF.js} +1 -1
- package/public/dist/assets/{dist-D7bCuS3f.js → dist-CEDX2HGI.js} +1 -1
- package/public/dist/assets/dist-Ch6JG5jE.js +23 -0
- package/public/dist/assets/{dist-SU-YTAIg.js → dist-CkMC2PPt.js} +1 -1
- package/public/dist/assets/dist-CxJpXP6s.js +1 -0
- package/public/dist/assets/dist-DNLFuTrS.js +1 -0
- package/public/dist/assets/{dist-CL4PTYWf.js → dist-DdhWu7OM.js} +1 -1
- package/public/dist/assets/{dist-D6cUXP7K.js → dist-G7QUHtDS.js} +1 -1
- package/public/dist/assets/{dist-UYn7T-GH.js → dist-W7IGn2ug.js} +1 -1
- package/public/dist/assets/{dist-Cp42cMcI.js → dist-wdLr2dSH.js} +1 -1
- package/public/dist/assets/{dockerfile-zC7EsydA.js → dockerfile-CrC2HXHP.js} +1 -1
- package/public/dist/assets/employees-CIkIyvtL.js +33 -0
- package/public/dist/assets/{erDiagram-SMLLAGMA-oYlCN-2d.js → erDiagram-SMLLAGMA-BvtqhMsS.js} +1 -1
- package/public/dist/assets/{error-normalize-5n-zlEQ3.js → error-normalize-CkhPeQYx.js} +1 -1
- package/public/dist/assets/esm-BmJkIat2.js +4 -0
- package/public/dist/assets/{factor-DSufIRGh.js → factor-1CttFx2G.js} +1 -1
- package/public/dist/assets/{fields-BtncIZYA.js → fields-BISouxp2.js} +1 -1
- package/public/dist/assets/{flowDiagram-DWJPFMVM-er6Wfb34.js → flowDiagram-DWJPFMVM-C_F0rqqT.js} +1 -1
- package/public/dist/assets/{ganttDiagram-T4ZO3ILL-Co2j1qn3.js → ganttDiagram-T4ZO3ILL-B5S8EZRg.js} +1 -1
- package/public/dist/assets/gitGraph-7Q5UKJZL-DTTW6pxr.js +1 -0
- package/public/dist/assets/{gitGraphDiagram-UUTBAWPF-clYndUgV.js → gitGraphDiagram-UUTBAWPF-DMGzYJeb.js} +1 -1
- package/public/dist/assets/{graphlib-BjOif-SH.js → graphlib-CZk_Ii16.js} +1 -1
- package/public/dist/assets/idb-cache-BnZfG5FD.js +1 -0
- package/public/dist/assets/info-OMHHGYJF-BU-iuaSm.js +1 -0
- package/public/dist/assets/{infoDiagram-42DDH7IO-uYs7OoSA.js → infoDiagram-42DDH7IO-dzSaYFFK.js} +1 -1
- package/public/dist/assets/{ishikawaDiagram-UXIWVN3A-32bIEtCb.js → ishikawaDiagram-UXIWVN3A-DZW-Nqsf.js} +1 -1
- package/public/dist/assets/javascript-BhB45e0W.js +1 -0
- package/public/dist/assets/{journeyDiagram-VCZTEJTY-hBNsU7mK.js → journeyDiagram-VCZTEJTY-ByVRJxVF.js} +1 -1
- package/public/dist/assets/{kanban-definition-6JOO6SKY-DoepMHBI.js → kanban-definition-6JOO6SKY-xwN0YCW2.js} +1 -1
- package/public/dist/assets/katex-DamPUmTE.js +1 -0
- package/public/dist/assets/manager-B84u-pcn.js +25 -0
- package/public/dist/assets/manager-DMg_sTEP.css +1 -0
- package/public/dist/assets/memory-BV62wlsG.js +1 -0
- package/public/dist/assets/{memory-dJGp6QBv.js → memory-CnBc2_Va.js} +1 -1
- package/public/dist/assets/mermaid-loader-DxFGz4EE.js +1 -0
- package/public/dist/assets/{mermaid-parser.core-CrXy-45O.js → mermaid-parser.core-CMIZ0my_.js} +1 -1
- package/public/dist/assets/mermaid-preprocess-p7OIpOon.js +5 -0
- package/public/dist/assets/mermaid.core-CicVBD9l.js +1 -0
- package/public/dist/assets/{mermaid.core-DYApH8sc.js → mermaid.core-Dj6viEzN.js} +2 -2
- package/public/dist/assets/{mindmap-definition-QFDTVHPH-C-QWWjaf.js → mindmap-definition-QFDTVHPH-Chqgsh1N.js} +1 -1
- package/public/dist/assets/{nsis-DLskXEqR.js → nsis-_CjIiUyF.js} +1 -1
- package/public/dist/assets/packet-4T2RLAQJ-DzmBsAf0.js +1 -0
- package/public/dist/assets/{page-shell-D5tbivHH.js → page-shell-CTxVDJ8Y.js} +1 -1
- package/public/dist/assets/pie-ZZUOXDRM-DyG1KzTn.js +1 -0
- package/public/dist/assets/{pieDiagram-DEJITSTG-DvMWxH5R.js → pieDiagram-DEJITSTG-DJLiSymi.js} +1 -1
- package/public/dist/assets/{pug-B2rz0Rz1.js → pug-CbR8lCtK.js} +1 -1
- package/public/dist/assets/{quadrantDiagram-34T5L4WZ-DjoQDyzO.js → quadrantDiagram-34T5L4WZ-qcnWmcRr.js} +1 -1
- package/public/dist/assets/radar-PYXPWWZC-CEBZARUu.js +1 -0
- package/public/dist/assets/render-lpTpN1El.js +28 -0
- package/public/dist/assets/{requirementDiagram-MS252O5E-sQav3xIA.js → requirementDiagram-MS252O5E-wnPtv0LG.js} +1 -1
- package/public/dist/assets/{sankeyDiagram-XADWPNL6-DkdEFMeo.js → sankeyDiagram-XADWPNL6-Bn3pUd_K.js} +1 -1
- package/public/dist/assets/{sequenceDiagram-FGHM5R23-kaplo282.js → sequenceDiagram-FGHM5R23-DfxcHSdj.js} +1 -1
- package/public/dist/assets/settings-CfAXLa8a.js +1 -0
- package/public/dist/assets/{settings-C7QWaUHB.js → settings-FWgmcubl.js} +8 -8
- package/public/dist/assets/sidebar-Cwt0FxQl.js +14 -0
- package/public/dist/assets/skills-D-qUVJ-e.js +1 -0
- package/public/dist/assets/{skills-CHkTgM7L.js → skills-DDmTyywh.js} +2 -2
- package/public/dist/assets/slash-commands-BfI19vIz.js +1 -0
- package/public/dist/assets/{slash-commands-2ThyUGvX.js → slash-commands-D5y5AVvS.js} +1 -1
- package/public/dist/assets/{stateDiagram-FHFEXIEX-B2L3h2aE.js → stateDiagram-FHFEXIEX-CiR7P2OG.js} +1 -1
- package/public/dist/assets/stateDiagram-v2-QKLJ7IA2-BaWWpysK.js +1 -0
- package/public/dist/assets/{timeline-definition-GMOUNBTQ-_Nnp2LU-.js → timeline-definition-GMOUNBTQ-DUz1-iOx.js} +1 -1
- package/public/dist/assets/{trace-drawer-Dis80M6X.js → trace-drawer-DVF5F1df.js} +1 -1
- package/public/dist/assets/treeView-SZITEDCU-D5-TP7Qp.js +1 -0
- package/public/dist/assets/treemap-W4RFUUIX-BQhm_ZSp.js +1 -0
- package/public/dist/assets/ui-BJXY16Dk.js +140 -0
- package/public/dist/assets/ui-BXm3OPPh.js +1 -0
- package/public/dist/assets/{vendor-render-984tPmpy.js → vendor-render-DEStnpJ8.js} +22 -22
- package/public/dist/assets/{vennDiagram-DHZGUBPP-vNU8EDoW.js → vennDiagram-DHZGUBPP-CYu7SDdG.js} +1 -1
- package/public/dist/assets/wardley-RL74JXVD-CpnBMRe0.js +1 -0
- package/public/dist/assets/{wardleyDiagram-NUSXRM2D-DB2wK0zr.js → wardleyDiagram-NUSXRM2D-CLAhOzap.js} +1 -1
- package/public/dist/assets/wiki-link-suggestions-LQuYT22G.js +23 -0
- package/public/dist/assets/{xychartDiagram-5P7HB3ND-CisgDiJM.js → xychartDiagram-5P7HB3ND-DLnY9i8z.js} +1 -1
- package/public/dist/index.html +36 -12
- package/public/dist/manager/index.html +2 -2
- package/public/index.html +34 -10
- package/public/js/features/chat-messages.ts +132 -0
- package/public/js/features/chat-scroll.ts +226 -0
- package/public/js/features/employees.ts +4 -1
- package/public/js/features/help-content.ts +11 -1
- package/public/js/features/help-dialog.ts +78 -17
- package/public/js/features/message-actions.ts +157 -0
- package/public/js/features/message-history.ts +138 -0
- package/public/js/features/message-item-html.ts +34 -0
- package/public/js/features/preview-shortcut-bridge.ts +29 -0
- package/public/js/features/process-block-dom.ts +175 -0
- package/public/js/features/process-log-adapter.ts +104 -0
- package/public/js/features/settings-cli-status.ts +52 -1
- package/public/js/features/settings.ts +1 -0
- package/public/js/features/sidebar.ts +7 -1
- package/public/js/features/ui-status.ts +47 -0
- package/public/js/main.ts +10 -3
- package/public/js/render/code-copy.ts +47 -0
- package/public/js/render/delegations.ts +10 -0
- package/public/js/render/file-links.ts +150 -0
- package/public/js/render/highlight.ts +83 -0
- package/public/js/render/html.ts +26 -0
- package/public/js/render/markdown.ts +84 -0
- package/public/js/render/math.ts +76 -0
- package/public/js/render/mermaid-preprocess.ts +77 -0
- package/public/js/render/mermaid.ts +267 -0
- package/public/js/render/post-render.ts +35 -0
- package/public/js/render/sanitize.ts +51 -0
- package/public/js/render/svg-actions.ts +291 -0
- package/public/js/render.ts +17 -1081
- package/public/js/ui.ts +23 -841
- package/public/js/virtual-scroll-bootstrap.ts +18 -5
- package/public/js/virtual-scroll.ts +17 -0
- package/public/js/ws.ts +5 -0
- package/public/locales/en.json +76 -1
- package/public/locales/ja.json +74 -1
- package/public/locales/ko.json +76 -1
- package/public/locales/zh.json +74 -1
- package/public/manager/src/App.tsx +143 -258
- package/public/manager/src/AppChrome.tsx +144 -0
- package/public/manager/src/InstancePreview.tsx +18 -0
- package/public/manager/src/SidebarRailRouter.tsx +229 -0
- package/public/manager/src/components/ActivityTimeline.tsx +9 -1
- package/public/manager/src/components/ProcessControlPanel.tsx +3 -0
- package/public/manager/src/components/SidebarRail.tsx +22 -0
- package/public/manager/src/components/Workbench.tsx +17 -13
- package/public/manager/src/components/WorkbenchHeader.tsx +44 -33
- package/public/manager/src/components/WorkspaceLayout.tsx +3 -0
- package/public/manager/src/dashboard-board/DashboardBoardSidebar.tsx +1 -1
- package/public/manager/src/dashboard-board/DashboardBoardWorkspace.tsx +6 -0
- package/public/manager/src/dashboard-features.ts +4 -1
- package/public/manager/src/dashboard-reminders/DashboardRemindersSidebar.tsx +157 -0
- package/public/manager/src/dashboard-reminders/DashboardRemindersWorkspace.tsx +502 -0
- package/public/manager/src/dashboard-reminders/InlineReminderTitle.tsx +78 -0
- package/public/manager/src/dashboard-reminders/ReminderDetailPopover.tsx +118 -0
- package/public/manager/src/dashboard-reminders/reminder-order.ts +45 -0
- package/public/manager/src/dashboard-reminders/reminders-api.ts +126 -0
- package/public/manager/src/dashboard-reminders/reminders-view-model.ts +63 -0
- package/public/manager/src/dashboard-reminders/useDashboardReminderDrag.ts +55 -0
- package/public/manager/src/dashboard-reminders/useRemindersFeed.ts +72 -0
- package/public/manager/src/dashboard-schedule/DashboardScheduleWorkspace.tsx +10 -4
- package/public/manager/src/dashboard-settings/DashboardEmbeddingSection.tsx +350 -0
- package/public/manager/src/dashboard-settings/DashboardSettingsSidebar.tsx +6 -2
- package/public/manager/src/dashboard-settings/DashboardSettingsWorkspace.tsx +217 -6
- package/public/manager/src/dashboard-settings/dashboard-settings-ui.ts +2 -0
- package/public/manager/src/dashboard-url-state.ts +15 -0
- package/public/manager/src/help/HelpDrawer.tsx +5 -6
- package/public/manager/src/help/HelpTopicButton.tsx +23 -0
- package/public/manager/src/help/help-shortcuts.ts +7 -0
- package/public/manager/src/help/helpContent.tsx +155 -5
- package/public/manager/src/hooks/useDashboardView.ts +12 -1
- package/public/manager/src/hooks/useInstanceMessageEvents.ts +3 -1
- package/public/manager/src/jaw-ceo/JawCeoConsole.tsx +108 -0
- package/public/manager/src/jaw-ceo/JawCeoConsolePanels.tsx +331 -0
- package/public/manager/src/jaw-ceo/JawCeoSettingsPanel.tsx +94 -0
- package/public/manager/src/jaw-ceo/JawCeoTabs.tsx +28 -0
- package/public/manager/src/jaw-ceo/JawCeoVoiceOverlay.tsx +34 -0
- package/public/manager/src/jaw-ceo/JawCeoWorkbenchButton.tsx +61 -0
- package/public/manager/src/jaw-ceo/api.ts +169 -0
- package/public/manager/src/jaw-ceo/jaw-ceo-console.css +481 -0
- package/public/manager/src/jaw-ceo/jaw-ceo-virtual.css +24 -0
- package/public/manager/src/jaw-ceo/jaw-ceo.css +429 -0
- package/public/manager/src/jaw-ceo/types.ts +164 -0
- package/public/manager/src/jaw-ceo/useJawCeo.ts +235 -0
- package/public/manager/src/jaw-ceo/useJawCeoConsoleModel.ts +67 -0
- package/public/manager/src/jaw-ceo/useJawCeoDashboardBridge.tsx +76 -0
- package/public/manager/src/jaw-ceo/useJawCeoVirtualTimeline.ts +109 -0
- package/public/manager/src/jaw-ceo/useJawCeoVoice.ts +219 -0
- package/public/manager/src/jaw-ceo/voice-cues.ts +34 -0
- package/public/manager/src/jaw-ceo/voice-session.ts +87 -0
- package/public/manager/src/main.tsx +10 -0
- package/public/manager/src/manager-components.css +7 -0
- package/public/manager/src/manager-dashboard-board-sidebar-scroll.css +64 -0
- package/public/manager/src/manager-dashboard-reminders-parity.css +156 -0
- package/public/manager/src/manager-dashboard-reminders-priority.css +164 -0
- package/public/manager/src/manager-dashboard-reminders.css +482 -0
- package/public/manager/src/manager-dashboard-schedule.css +12 -0
- package/public/manager/src/manager-dashboard-settings.css +16 -2
- package/public/manager/src/manager-help.css +27 -0
- package/public/manager/src/manager-layout.css +19 -0
- package/public/manager/src/manager-notes.css +13 -4
- package/public/manager/src/manager-p0-1-1.css +3 -3
- package/public/manager/src/manager-polish.css +7 -3
- package/public/manager/src/manager-shortcuts.ts +116 -0
- package/public/manager/src/notes/MarkdownEditor.tsx +20 -3
- package/public/manager/src/notes/MarkdownPreview.tsx +10 -1
- package/public/manager/src/notes/NotesFrontmatterStrip.tsx +61 -0
- package/public/manager/src/notes/NotesQuickSwitcher.tsx +187 -0
- package/public/manager/src/notes/NotesSidebar.tsx +36 -14
- package/public/manager/src/notes/NotesWorkspace.tsx +63 -4
- package/public/manager/src/notes/frontmatter-preview.ts +16 -0
- package/public/manager/src/notes/notes-quick-switcher.css +151 -0
- package/public/manager/src/notes/notes-tags.css +292 -0
- package/public/manager/src/notes/notes-types.ts +4 -0
- package/public/manager/src/notes/rendering/MarkdownRenderer.tsx +67 -3
- package/public/manager/src/notes/rendering/MermaidBlock.tsx +11 -1
- package/public/manager/src/notes/useNoteDocument.ts +14 -2
- package/public/manager/src/notes/useNotesModel.ts +39 -2
- package/public/manager/src/notes/wiki-link-codemirror-completion.ts +55 -0
- package/public/manager/src/notes/wiki-link-rendering.ts +129 -0
- package/public/manager/src/notes/wiki-link-resolver.ts +220 -0
- package/public/manager/src/notes/wiki-link-suggestions.ts +153 -0
- package/public/manager/src/notes/wysiwyg/MilkdownWysiwygEditor.tsx +126 -79
- package/public/manager/src/notes/wysiwyg/WysiwygFrontmatterPanel.tsx +93 -0
- package/public/manager/src/notes/wysiwyg/milkdown-code-block-view.ts +11 -0
- package/public/manager/src/notes/wysiwyg/milkdown-editor-utils.ts +32 -0
- package/public/manager/src/notes/wysiwyg/milkdown-math.ts +9 -0
- package/public/manager/src/notes/wysiwyg/milkdown-wikilink-completion.ts +195 -0
- package/public/manager/src/notes/wysiwyg/milkdown-wikilink-plugin.ts +152 -0
- package/public/manager/src/notes/wysiwyg/milkdown-wysiwyg-types.ts +13 -0
- package/public/manager/src/notes/wysiwyg/wysiwyg-fixtures.ts +4 -0
- package/public/manager/src/notes/wysiwyg/wysiwyg-frontmatter.ts +155 -0
- package/public/manager/src/settings/pages/Embedding.tsx +382 -0
- package/public/manager/src/settings-embedding.css +168 -0
- package/public/manager/src/types.ts +12 -2
- package/scripts/install-officecli.sh +3 -1
- package/scripts/install-wsl.sh +65 -11
- package/public/dist/assets/MilkdownWysiwygEditor-DIebNZF7.js +0 -52
- package/public/dist/assets/app-CphocJzo.css +0 -1
- package/public/dist/assets/app-DJ8ys0j5.js +0 -32
- package/public/dist/assets/architecture-YZFGNWBL-VpdnYwVC.js +0 -1
- package/public/dist/assets/channel-xhp7drfS.js +0 -1
- package/public/dist/assets/chunk-426QAEUC-DadS7Aoc.js +0 -1
- package/public/dist/assets/chunk-55IACEB6-Cr281urY.js +0 -1
- package/public/dist/assets/chunk-QZHKN3VN-BYRU3VjK.js +0 -1
- package/public/dist/assets/classDiagram-6PBFFD2Q-Brk35lpl.js +0 -1
- package/public/dist/assets/classDiagram-v2-HSJHXN6E-CVZHK0Hg.js +0 -1
- package/public/dist/assets/dist-BsT5UdNP.js +0 -1
- package/public/dist/assets/dist-ClqO40BE.js +0 -1
- package/public/dist/assets/dist-CxeLAw2Y.js +0 -1
- package/public/dist/assets/dist-D2SH8nxa.js +0 -1
- package/public/dist/assets/dist-DfodGES_.js +0 -23
- package/public/dist/assets/dist-l9HH00ip.js +0 -1
- package/public/dist/assets/employees-RJ_wRL09.js +0 -33
- package/public/dist/assets/gitGraph-7Q5UKJZL-CBKRRUZJ.js +0 -1
- package/public/dist/assets/idb-cache-C5ilDI6r.js +0 -1
- package/public/dist/assets/info-OMHHGYJF-BqzRlF_E.js +0 -1
- package/public/dist/assets/insert-image-markdown-kk053MvN.js +0 -22
- package/public/dist/assets/javascript-DT-6B2IU.js +0 -1
- package/public/dist/assets/katex-CS4w7U2j.js +0 -1
- package/public/dist/assets/manager-DAe38I94.js +0 -25
- package/public/dist/assets/manager-fQR46YFa.css +0 -1
- package/public/dist/assets/memory-w3yQettQ.js +0 -1
- package/public/dist/assets/mermaid-loader-BEFIOoJn.js +0 -1
- package/public/dist/assets/mermaid.core-D0tXHgVC.js +0 -1
- package/public/dist/assets/packet-4T2RLAQJ-D7VqJs5z.js +0 -1
- package/public/dist/assets/pie-ZZUOXDRM-FbISwuBg.js +0 -1
- package/public/dist/assets/radar-PYXPWWZC-CLzM3m4R.js +0 -1
- package/public/dist/assets/render-KVGsbWj1.js +0 -31
- package/public/dist/assets/settings-DmUCo6lz.js +0 -1
- package/public/dist/assets/skills-SxG_nfwn.js +0 -1
- package/public/dist/assets/slash-commands-BxJkKdhB.js +0 -1
- package/public/dist/assets/stateDiagram-v2-QKLJ7IA2-DScAhoyh.js +0 -1
- package/public/dist/assets/treeView-SZITEDCU-HJajkeQK.js +0 -1
- package/public/dist/assets/treemap-W4RFUUIX-CsRQ896G.js +0 -1
- package/public/dist/assets/ui-LhD1VfQs.js +0 -1
- package/public/dist/assets/ui-kS1ZJfez.js +0 -143
- package/public/dist/assets/wardley-RL74JXVD-DMQFnlJp.js +0 -1
- package/public/dist/assets/ws-DVE3eWRj.js +0 -14
- /package/public/dist/assets/{agent-meta-DHddpWHQ.js → agent-meta-C1pQzExf.js} +0 -0
- /package/public/dist/assets/{apl-1H3fJ-n9.js → apl-HYRstREL.js} +0 -0
- /package/public/dist/assets/{asciiarmor-_1f4lqIZ.js → asciiarmor-BDXCrhAK.js} +0 -0
- /package/public/dist/assets/{asn1-B_wp1Pdt.js → asn1-CnSBhb0M.js} +0 -0
- /package/public/dist/assets/{asterisk-9Hxmlnbz.js → asterisk-AqV7rnIi.js} +0 -0
- /package/public/dist/assets/{brainfuck-C-PAVNT8.js → brainfuck-Dv46-iL9.js} +0 -0
- /package/public/dist/assets/{chunk-AGHRB4JF-EroDCcEL.js → chunk-AGHRB4JF-DIMn8T3_.js} +0 -0
- /package/public/dist/assets/{clike-DAVXDhrz.js → clike-GRffz5hY.js} +0 -0
- /package/public/dist/assets/{clojure-BIpQu4v4.js → clojure-DzgT_fqE.js} +0 -0
- /package/public/dist/assets/{cmake-YlOBEvgc.js → cmake-Co1237r5.js} +0 -0
- /package/public/dist/assets/{cobol-CU8lw6mH.js → cobol-rUaLketb.js} +0 -0
- /package/public/dist/assets/{coffeescript-DKG8mABL.js → coffeescript-DQyfHE86.js} +0 -0
- /package/public/dist/assets/{commonlisp-CbWboHR_.js → commonlisp-Buue1PGW.js} +0 -0
- /package/public/dist/assets/{constants-CYjOMbjf.js → constants-4A2GptQT.js} +0 -0
- /package/public/dist/assets/{crystal-WWs3Njra.js → crystal-BMWO0kOJ.js} +0 -0
- /package/public/dist/assets/{css-C9qNtc8P.js → css-DaxibPo5.js} +0 -0
- /package/public/dist/assets/{cypher-DglnWVZO.js → cypher-CmpGfiBR.js} +0 -0
- /package/public/dist/assets/{cytoscape.esm-BH6rhG9A.js → cytoscape.esm-zT8GwLFm.js} +0 -0
- /package/public/dist/assets/{d-DiNW6jcC.js → d-qmdtoIzU.js} +0 -0
- /package/public/dist/assets/{diff-PxsoX0eK.js → diff-B40m6u1h.js} +0 -0
- /package/public/dist/assets/{dist-BRFvH5ne.js → dist-BJyDhGpS.js} +0 -0
- /package/public/dist/assets/{dtd-BSiaE0hE.js → dtd-569ynYVj.js} +0 -0
- /package/public/dist/assets/{dylan-GcUJt0a5.js → dylan-Dxolp30i.js} +0 -0
- /package/public/dist/assets/{ebnf-DSIN9Ycp.js → ebnf-BZiX9Iq3.js} +0 -0
- /package/public/dist/assets/{ecl-LP9l5g0J.js → ecl-B8F1Q0oZ.js} +0 -0
- /package/public/dist/assets/{eiffel-CqpH5qaY.js → eiffel-Bv8Kvgh1.js} +0 -0
- /package/public/dist/assets/{elm-Dw3cJ7hz.js → elm-QWXQaIis.js} +0 -0
- /package/public/dist/assets/{erlang-DL9rpJep.js → erlang-CuDGzTGm.js} +0 -0
- /package/public/dist/assets/{fcl-DUmfTiJ7.js → fcl-BiFeqtHf.js} +0 -0
- /package/public/dist/assets/{forth-BSp-YOKj.js → forth-R7Uc2VcL.js} +0 -0
- /package/public/dist/assets/{fortran-BtIRmo6s.js → fortran-kDRG6BzW.js} +0 -0
- /package/public/dist/assets/{gas-okqIRy8I.js → gas-CyRkuC5T.js} +0 -0
- /package/public/dist/assets/{gherkin-DIlSAX9i.js → gherkin-BE0p00ey.js} +0 -0
- /package/public/dist/assets/{groovy-Dn6VQ7le.js → groovy-B_Sh3D1t.js} +0 -0
- /package/public/dist/assets/{haskell-DxXJRRAf.js → haskell-DWXgCy4o.js} +0 -0
- /package/public/dist/assets/{haxe-Cf0nItU4.js → haxe-xGxZ54Hv.js} +0 -0
- /package/public/dist/assets/{http-C3zQeWFV.js → http-CKv9cSBA.js} +0 -0
- /package/public/dist/assets/{idb-cache-CjnC_K0x.js → idb-cache-CZ3JdK8r.js} +0 -0
- /package/public/dist/assets/{idl-BvqkcZq5.js → idl-DmlI3XzS.js} +0 -0
- /package/public/dist/assets/{javascript-D1nkUbtD.js → javascript-j6r5uf_k.js} +0 -0
- /package/public/dist/assets/{jsx-runtime-DOs-BiPY.js → jsx-runtime-BjL7qHh8.js} +0 -0
- /package/public/dist/assets/{julia-CCUCEuMJ.js → julia-CQSp9Qa0.js} +0 -0
- /package/public/dist/assets/{livescript-DJ-6Zja2.js → livescript-CqvtVTlb.js} +0 -0
- /package/public/dist/assets/{locale-f397XJgr.js → locale-BHMJIzyw.js} +0 -0
- /package/public/dist/assets/{lua-CxE7YJaJ.js → lua-DazQKUZ0.js} +0 -0
- /package/public/dist/assets/{mathematica-oNEp3xtK.js → mathematica-DqhJVCs9.js} +0 -0
- /package/public/dist/assets/{mbox-AvjHxuWl.js → mbox-Dsyo1_UL.js} +0 -0
- /package/public/dist/assets/{mirc-CiJGiXcS.js → mirc-D7ThhoF-.js} +0 -0
- /package/public/dist/assets/{mllike-CV8oQtvy.js → mllike-EPZ6pqQD.js} +0 -0
- /package/public/dist/assets/{modelica-M4BAagfL.js → modelica-PU45hbqg.js} +0 -0
- /package/public/dist/assets/{mscgen-3QXoaqEl.js → mscgen-DEnh2Ojr.js} +0 -0
- /package/public/dist/assets/{mumps-BZoVj2VG.js → mumps-8GhR7rRa.js} +0 -0
- /package/public/dist/assets/{nginx-CBycrar_.js → nginx-CXwagpwp.js} +0 -0
- /package/public/dist/assets/{ntriples-BzBBWYSl.js → ntriples-BDQxxstw.js} +0 -0
- /package/public/dist/assets/{octave-BeIsGSMy.js → octave-2c90WnyU.js} +0 -0
- /package/public/dist/assets/{oz-DdNR63iD.js → oz-CO0rQ8EL.js} +0 -0
- /package/public/dist/assets/{pascal-BvmM4Y7z.js → pascal-CcVwOGeN.js} +0 -0
- /package/public/dist/assets/{path-utils-BuEEtj9w.js → path-utils-DySmCVZK.js} +0 -0
- /package/public/dist/assets/{perl-DFibaVbf.js → perl-B9UvGoAV.js} +0 -0
- /package/public/dist/assets/{pig-DyLcrln-.js → pig-Cd1f86ZJ.js} +0 -0
- /package/public/dist/assets/{powershell-CDOpEwhN.js → powershell-DV4cOnkJ.js} +0 -0
- /package/public/dist/assets/{preload-helper-CMqhPRCH.js → preload-helper-DuH3-WbD.js} +0 -0
- /package/public/dist/assets/{properties-Ju2yMwi3.js → properties-DaSVPhrZ.js} +0 -0
- /package/public/dist/assets/{protobuf-CfKx2SfO.js → protobuf-CEtFnY22.js} +0 -0
- /package/public/dist/assets/{puppet-dmjzqANu.js → puppet-Ca0DHfcW.js} +0 -0
- /package/public/dist/assets/{python-D9BZyYi1.js → python-ydzCwWG-.js} +0 -0
- /package/public/dist/assets/{q-C68SC4ma.js → q-Cl8kzQmk.js} +0 -0
- /package/public/dist/assets/{r-DP6KYC7N.js → r-DKZPJFrD.js} +0 -0
- /package/public/dist/assets/{rough.esm-BRGGwqOp.js → rough.esm-Dnk3WN4D.js} +0 -0
- /package/public/dist/assets/{rpm-DH2Z4z_v.js → rpm-D0lqeHoZ.js} +0 -0
- /package/public/dist/assets/{ruby-CwiqsW2a.js → ruby-RVmtmNDw.js} +0 -0
- /package/public/dist/assets/{sas-Btq5K1IU.js → sas-CEzodAB7.js} +0 -0
- /package/public/dist/assets/{scheme-BvG_RNGf.js → scheme-Pqmt6dh3.js} +0 -0
- /package/public/dist/assets/{settings-client-ajlwI-oK.js → settings-client-BN3XzwEo.js} +0 -0
- /package/public/dist/assets/{shell-waWIPbLL.js → shell-CLG3zy-u.js} +0 -0
- /package/public/dist/assets/{sieve-wIycBENd.js → sieve-C95IWC3O.js} +0 -0
- /package/public/dist/assets/{simple-mode-lHvrAolQ.js → simple-mode-B9ErAHMD.js} +0 -0
- /package/public/dist/assets/{smalltalk-SHoYQOtw.js → smalltalk-4cL-gRJb.js} +0 -0
- /package/public/dist/assets/{solr-D1Apesak.js → solr-CEA7oOx_.js} +0 -0
- /package/public/dist/assets/{sparql-BJozOrmN.js → sparql-w8kHjP6I.js} +0 -0
- /package/public/dist/assets/{spreadsheet-71jLW2fq.js → spreadsheet-C8bDfTgC.js} +0 -0
- /package/public/dist/assets/{sql-BaHU6gLz.js → sql-BrKz8968.js} +0 -0
- /package/public/dist/assets/{stex-BuVGLRtt.js → stex-xFw1nXeT.js} +0 -0
- /package/public/dist/assets/{stylus-Cqweyusm.js → stylus-gS_68vPk.js} +0 -0
- /package/public/dist/assets/{swift-Dx3m4XfV.js → swift-D5lXmY2d.js} +0 -0
- /package/public/dist/assets/{tcl-5yXjCZ8e.js → tcl-D-41REtC.js} +0 -0
- /package/public/dist/assets/{textile-9HVfsYV6.js → textile-D-Znao0j.js} +0 -0
- /package/public/dist/assets/{tiddlywiki-DlSf8L__.js → tiddlywiki-Co8lXJKd.js} +0 -0
- /package/public/dist/assets/{tiki-CDZRH0A4.js → tiki-DsiNRYMP.js} +0 -0
- /package/public/dist/assets/{toml-BgjfE0Y7.js → toml-CaVZGou4.js} +0 -0
- /package/public/dist/assets/{troff-B4ZrJIrZ.js → troff-DJvDVr-d.js} +0 -0
- /package/public/dist/assets/{ttcn-BJIiaYhP.js → ttcn-DAC92l4d.js} +0 -0
- /package/public/dist/assets/{ttcn-cfg-PZp_QKQg.js → ttcn-cfg-C0X-mYlr.js} +0 -0
- /package/public/dist/assets/{turtle--ft5y7IN.js → turtle-D6WHyCrL.js} +0 -0
- /package/public/dist/assets/{vb-DL6cecZs.js → vb-CEo_ccq3.js} +0 -0
- /package/public/dist/assets/{vbscript-Bb1xiv7E.js → vbscript-B_PKDV1v.js} +0 -0
- /package/public/dist/assets/{velocity-DKS9ZfbJ.js → velocity-ClKnKBLH.js} +0 -0
- /package/public/dist/assets/{vendor-utils-CWelFt6C.js → vendor-utils-IVTPs69f.js} +0 -0
- /package/public/dist/assets/{verilog-DSfhYFaT.js → verilog-Pnuspgw6.js} +0 -0
- /package/public/dist/assets/{vhdl-CFTSUmh9.js → vhdl-CZnyY4fs.js} +0 -0
- /package/public/dist/assets/{w3c-keyname-IiiZScED.js → w3c-keyname-DJlC6DTY.js} +0 -0
- /package/public/dist/assets/{webidl-C-IpKmuN.js → webidl-DHr762Dm.js} +0 -0
- /package/public/dist/assets/{xquery-9pXYEith.js → xquery-5-FiyUtN.js} +0 -0
- /package/public/dist/assets/{yacas-CqSYoSTv.js → yacas-GlqsXIeT.js} +0 -0
- /package/public/dist/assets/{z80-BltHQfm4.js → z80-CI7N40Oo.js} +0 -0
package/public/dist/assets/{cose-bilkent-S5V4N54A-B21AcnwY.js → cose-bilkent-S5V4N54A-CvH6qY_r.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,t}from"./rolldown-runtime-DE9SaGGd.js";import{Ct as n}from"./vendor-utils-CWelFt6C.js";import{n as r,r as i}from"./chunk-AGHRB4JF-EroDCcEL.js";import{t as a}from"./cytoscape.esm-BH6rhG9A.js";var o=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=26)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(4);function l(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,n!=null&&t!=null?this.rect=new a(t.x,t.y,n.width,n.height):this.rect=new a}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(!(r.source==n||r.target==n))throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.withChildren(),n.forEach(function(t){e.add(t)});return e},l.prototype.getNoOfChildren=function(){var e=0,t;if(this.child==null)e=1;else for(var n=this.child.getNodes(),r=0;r<n.length;r++)t=n[r],e+=t.getNoOfChildren();return e==0&&(e=1),e},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},l.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)},l.prototype.scatter=function(){var e,t,n=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY;e=o.WORLD_CENTER_X+s.nextDouble()*(r-n)+n;var i=-o.INITIAL_WORLD_BOUNDARY,a=o.INITIAL_WORLD_BOUNDARY;t=o.WORLD_CENTER_Y+s.nextDouble()*(a-i)+i,this.rect.x=e,this.rect.y=t},l.prototype.updateBounds=function(){if(this.getChild()==null)throw`assert failed`;if(this.getChild().getNodes().length!=0){var e=this.getChild();if(e.updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var t=e.getRight()-e.getLeft(),n=e.getBottom()-e.getTop();this.labelWidth>t&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&(this.labelPos==`center`?this.rect.y-=(this.labelHeight-n)/2:this.labelPos==`top`&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}else{var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(!(t.owner==n.owner&&t.owner==this))throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null}},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(!(t.owner!=null&&t.owner==this))throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a<i;a++)r=n[a],r.isInterGraph?this.graphManager.remove(r):r.source.owner.remove(r);var o=this.nodes.indexOf(t);if(o==-1)throw`Node not in owner node list!`;this.nodes.splice(o,1)}else if(e instanceof c){var r=e;if(r==null)throw`Edge is null!`;if(!(r.source!=null&&r.target!=null))throw`Source and/or target is null!`;if(!(r.source.owner!=null&&r.target.owner!=null&&r.source.owner==this&&r.target.owner==this))throw`Source and/or target owner is invalid!`;var l=r.source.edges.indexOf(r),u=r.target.edges.indexOf(r);if(!(l>-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;c<s;c++){var l=o[c];n=l.getTop(),r=l.getLeft(),e>n&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;m<p;m++){var h=f[m];e&&h.child!=null&&h.updateBounds(),o=h.getLeft(),s=h.getRight(),c=h.getTop(),u=h.getBottom(),t>o&&(t=o),n<s&&(n=s),r>c&&(r=c),a<u&&(a=u)}var g=new l(t,r,n-t,a-r);t==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),d=f[0].getParent().paddingLeft==null?this.margin:f[0].getParent().paddingLeft,this.left=g.x-d,this.right=g.x+g.width+d,this.top=g.y-d,this.bottom=g.y+g.height+d},f.calculateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d=e.length,f=0;f<d;f++){var p=e[f];o=p.getLeft(),s=p.getRight(),c=p.getTop(),u=p.getBottom(),t>o&&(t=o),n<s&&(n=s),r>c&&(r=c),a<u&&(a=u)}return new l(t,r,n-t,a-r)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r<n;r++){var i=t[r];e+=i.calcEstimatedSize()}return e==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=e/Math.sqrt(this.nodes.length),this.estimatedSize},f.prototype.updateConnected=function(){var e=this;if(this.nodes.length==0){this.isConnected=!0;return}var t=new d,n=new Set,r=this.nodes[0],i,a;for(r.withChildren().forEach(function(e){t.push(e),n.add(e)});t.length!==0;){r=t.shift(),i=r.getEdges();for(var o=i.length,s=0;s<o;s++)a=i[s].getOtherEndInGraph(r,this),a!=null&&!n.has(a)&&a.withChildren().forEach(function(e){t.push(e),n.add(e)})}if(this.isConnected=!1,n.size>=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}else{i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(!(a!=null&&a.getGraphManager()==this))throw`Source not in this graph mgr!`;if(!(o!=null&&o.getGraphManager()==this))throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),!(n.source!=null&&n.target!=null))throw`Edge source and/or target is null!`;if(!(n.source.edges.indexOf(n)==-1&&n.target.edges.indexOf(n)==-1))throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n}},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s<o;s++)a=n[s],t.remove(a);var c=[];c=c.concat(t.getNodes());var l;o=c.length;for(var s=0;s<o;s++)l=c[s],t.remove(l);t==this.rootGraph&&this.setRootGraph(null);var u=this.graphs.indexOf(t);this.graphs.splice(u,1),t.parent=null}else if(e instanceof i){if(a=e,a==null)throw`Edge is null!`;if(!a.isInterGraph)throw`Not an inter-graph edge!`;if(!(a.source!=null&&a.target!=null))throw`Source and/or target is null!`;if(!(a.source.edges.indexOf(a)!=-1&&a.target.edges.indexOf(a)!=-1))throw`Source and/or target doesn't know this edge!`;var u=a.source.edges.indexOf(a);if(a.source.edges.splice(u,1),u=a.target.edges.indexOf(a),a.target.edges.splice(u,1),!(a.source.owner!=null&&a.source.owner.getGraphManager()!=null))throw`Edge owner graph or owner graph manager is null!`;if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw`Not in owner graph manager's edge list!`;var u=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(u,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],t=this.getGraphs(),n=t.length,r=0;r<n;r++)e=e.concat(t[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],t=this.getGraphs();t.length;for(var n=0;n<t.length;n++)e=e.concat(t[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw`assert failed`;this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw`Root not in this graph mgr!`;this.rootGraph=e,e.parent??=this.layout.newNode(`Root node`)},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,t){if(!(e!=null&&t!=null))throw`assert failed`;if(e==t)return!0;var n=e.getOwner(),r;do{if(r=n.getParent(),r==null)break;if(r==t)return!0;if(n=r.getOwner(),n==null)break}while(!0);n=t.getOwner();do{if(r=n.getParent(),r==null)break;if(r==e)return!0;if(n=r.getOwner(),n==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,t,n,r,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++){if(e=a[s],t=e.source,n=e.target,e.lca=null,e.sourceInLca=t,e.targetInLca=n,t==n){e.lca=t.getOwner();continue}for(r=t.getOwner();e.lca==null;){for(e.targetInLca=n,i=n.getOwner();e.lca==null;){if(i==r){e.lca=i;break}if(i==this.rootGraph)break;if(e.lca!=null)throw`assert failed`;e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca??(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw`assert failed`}},a.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();var n=e.getOwner();do{if(n==null)break;var r=t.getOwner();do{if(r==null)break;if(r==n)return r;r=r.getParent().getOwner()}while(!0);n=n.getParent().getOwner()}while(!0);return n},a.prototype.calcInclusionTreeDepths=function(e,t){e==null&&t==null&&(e=this.rootGraph,t=1);for(var n,r=e.getNodes(),i=r.length,a=0;a<i;a++)n=r[a],n.inclusionTreeDepth=t,n.child!=null&&this.calcInclusionTreeDepths(n.child,t+1)},a.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,n=0;n<t;n++)if(e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=a}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){var r=n(12);function i(){}i.calcSeparationAmount=function(e,t,n,r){if(!e.intersects(t))throw`assert failed`;var i=[,,];this.decideDirectionsForOverlappingNodes(e,t,i),n[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),n[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]<s?s=n[0]:o=n[1],n[0]=-1*i[0]*(s/2+r),n[1]=-1*i[1]*(o/2+r)},i.decideDirectionsForOverlappingNodes=function(e,t,n){e.getCenterX()<t.getCenterX()?n[0]=-1:n[0]=1,e.getCenterY()<t.getCenterY()?n[1]=-1:n[1]=1},i.getIntersection2=function(e,t,n){var r=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),o=t.getCenterY();if(e.intersects(t))return n[0]=r,n[1]=i,n[2]=a,n[3]=o,!0;var s=e.getX(),c=e.getY(),l=e.getRight(),u=e.getX(),d=e.getBottom(),f=e.getRight(),p=e.getWidthHalf(),m=e.getHeightHalf(),h=t.getX(),g=t.getY(),_=t.getRight(),v=t.getX(),y=t.getBottom(),b=t.getRight(),x=t.getWidthHalf(),S=t.getHeightHalf(),C=!1,w=!1;if(r===a){if(i>o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(i<o)return n[0]=r,n[1]=d,n[2]=a,n[3]=g,!1}else if(i===o){if(r>a)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(r<a)return n[0]=l,n[1]=i,n[2]=h,n[3]=o,!1}else{var T=e.height/e.width,E=t.height/t.width,D=(o-i)/(a-r),O=void 0,k=void 0,A=void 0,j=void 0,M=void 0,N=void 0;if(-T===D?r>a?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j;break}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N;break}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r<t?this.ONE_AND_HALF_PI:this.HALF_PI:(i=Math.atan((r-t)/(n-e)),n<e?i+=Math.PI:r<t&&(i+=this.TWO_PI)),i},i.doIntersect=function(e,t,n,r){var i=e.x,a=e.y,o=t.x,s=t.y,c=n.x,l=n.y,u=r.x,d=r.y,f=(o-i)*(d-l)-(u-c)*(s-a);if(f===0)return!1;var p=((d-l)*(u-i)+(c-u)*(d-a))/f,m=((a-s)*(u-i)+(o-i)*(d-a))/f;return 0<p&&p<1&&0<m&&m<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=function(e){return{value:e,next:null,prev:null}},o=function(e,t,n,r){return e===null?r.head=t:e.next=t,n===null?r.tail=t:n.prev=t,t.prev=e,t.next=n,r.length++,t},s=function(e,t){var n=e.prev,r=e.next;return n===null?t.head=r:n.next=r,r===null?t.tail=n:r.prev=n,e.prev=e.next=null,t.length--,e};e.exports=function(){function e(t){var n=this;i(this,e),this.length=0,this.head=null,this.tail=null,t?.forEach(function(e){return n.push(e)})}return r(e,[{key:`size`,value:function(){return this.length}},{key:`insertBefore`,value:function(e,t){return o(t.prev,a(e),t,this)}},{key:`insertAfter`,value:function(e,t){return o(t,a(e),t.next,this)}},{key:`insertNodeBefore`,value:function(e,t){return o(t.prev,e,t,this)}},{key:`insertNodeAfter`,value:function(e,t){return o(t,e,t.next,this)}},{key:`push`,value:function(e){return o(this.tail,a(e),null,this)}},{key:`unshift`,value:function(e){return o(null,a(e),this.head,this)}},{key:`remove`,value:function(e){return s(e,this)}},{key:`pop`,value:function(){return s(this.tail,this).value}},{key:`popNode`,value:function(){return s(this.tail,this)}},{key:`shift`,value:function(){return s(this.head,this).value}},{key:`shiftNode`,value:function(){return s(this.head,this)}},{key:`get_object_at`,value:function(e){if(e<=this.length()){for(var t=1,n=this.head;t<e;)n=n.next,t++;return n.value}}},{key:`set_object_at`,value:function(e,t){if(e<=this.length()){for(var n=1,r=this.head;n<e;)r=r.next,n++;r.value=t}}}]),e}()}),(function(e,t,n){function r(e,t,n){this.x=null,this.y=null,e==null&&t==null&&n==null?(this.x=0,this.y=0):typeof e==`number`&&typeof t==`number`&&n==null?(this.x=e,this.y=t):e.constructor.name==`Point`&&t==null&&n==null&&(n=e,this.x=n.x,this.y=n.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(e,t,n){e.constructor.name==`Point`&&t==null&&n==null?(n=e,this.setLocation(n.x,n.y)):typeof e==`number`&&typeof t==`number`&&n==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},r.prototype.move=function(e,t){this.x=e,this.y=t},r.prototype.translate=function(e,t){this.x+=e,this.y+=t},r.prototype.equals=function(e){if(e.constructor.name==`Point`){var t=e;return this.x==t.x&&this.y==t.y}return this==e},r.prototype.toString=function(){return new r().constructor.name+`[x=`+this.x+`,y=`+this.y+`]`},e.exports=r}),(function(e,t,n){function r(e,t,n,r){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&n!=null&&r!=null&&(this.x=e,this.y=t,this.width=n,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(e){this.x=e},r.prototype.getY=function(){return this.y},r.prototype.setY=function(e){this.y=e},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},e.exports=r}),(function(e,t,n){var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e};function i(){}i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:e.uniqueID==null?(e.uniqueID=i.getString(),i.lastID++,e.uniqueID):e.uniqueID},i.getString=function(e){return e??=i.lastID,`Object#`+e},i.isPrimitive=function(e){var t=e===void 0?`undefined`:r(e);return e==null||t!=`object`&&t!=`function`},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var i=n(0),a=n(6),o=n(3),s=n(1),c=n(5),l=n(4),u=n(17),d=n(27);function f(e){d.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,e!=null&&(this.isRemoteUse=e)}f.RANDOM_SEED=1,f.prototype=Object.create(d.prototype),f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},f.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},f.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},f.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e,e},f.prototype.newGraph=function(e){return new c(null,this.graphManager,e)},f.prototype.newNode=function(e){return new o(this.graphManager,e)},f.prototype.newEdge=function(e){return new s(null,null,e)},f.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},f.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var e=this.checkLayoutSuccess()?!1:this.layout();return i.ANIMATE===`during`?!1:(e&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},f.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},f.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var n=this.graphManager.getRoot().getNodes(),t=0;t<n.length;t++)n[t];this.update(this.graphManager.getRoot())}},f.prototype.update=function(e){if(e==null)this.update2();else if(e instanceof o){var t=e;if(t.getChild()!=null)for(var n=t.getChild().getNodes(),r=0;r<n.length;r++)update(n[r]);t.vGraphObject!=null&&t.vGraphObject.update(t)}else if(e instanceof s){var i=e;i.vGraphObject!=null&&i.vGraphObject.update(i)}else if(e instanceof c){var a=e;a.vGraphObject!=null&&a.vGraphObject.update(a)}},f.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},f.prototype.transform=function(e){if(e==null)this.transform(new l(0,0));else{var t=new u,n=this.graphManager.getRoot().updateLeftTop();if(n!=null){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(n.x),t.setDeviceOrgY(n.y);for(var r=this.getAllNodes(),i,a=0;a<r.length;a++)i=r[a],i.transform(t)}}},f.prototype.positionNodesRandomly=function(e){if(e==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,n,r=e.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.getChild(),n==null||n.getNodes().length==0?t.scatter():(this.positionNodesRandomly(n),t.updateBounds())},f.prototype.getFlatForest=function(){for(var e=[],t=!0,n=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<n.length;a++)n[a].getChild()!=null&&(i=!1);if(!i)return e;var o=new Set,s=[],c=new Map,l=[];for(l=l.concat(n);l.length>0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a<d.length;a++){var f=d[a].getOtherEnd(u);if(c.get(u)!=f)if(!o.has(f))s.push(f),c.set(f,u);else{t=!1;break}}}if(!t)e=[];else{var p=[].concat(r(o));e.push(p);for(var a=0;a<p.length;a++){var m=p[a],h=l.indexOf(m);h>-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),r.add(a);var o=this.newEdge(null);this.graphManager.add(o,n,a),t.add(a),n=a}var o=this.newEdge(null);return this.graphManager.add(o,n,e.target),this.edgeToDummyNodes.set(e,t),e.isInterGraph()?this.graphManager.remove(e):r.remove(e),t},f.prototype.createBendpointsFromDummyNodes=function(){var e=[];e=e.concat(this.graphManager.getAllEdges()),e=[].concat(r(this.edgeToDummyNodes.keys()),e);for(var t=0;t<e.length;t++){var n=e[t];if(n.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(n),a=0;a<i.length;a++){var o=i[a],s=new l(o.getCenterX(),o.getCenterY()),c=n.bendpoints.get(a);c.x=s.x,c.y=s.y,o.getOwner().remove(o)}this.graphManager.add(n,n.source,n.target)}}},f.transform=function(e,t,n,r){if(n!=null&&r!=null){var i=t;if(e<=50){var a=t/n;i-=(t-a)/50*(50-e)}else{var o=t*r;i+=(o-t)/50*(e-50)}return i}else{var s,c;return e<=50?(s=9*t/500,c=t/10):(s=9*t/50,c=-8*t),s*e+c}},f.findCenterOfTree=function(e){var t=[];t=t.concat(e);var n=[],r=new Map,i=!1,a=null;(t.length==1||t.length==2)&&(i=!0,a=t[0]);for(var o=0;o<t.length;o++){var s=t[o],c=s.getNeighborsList().size;r.set(s,s.getNeighborsList().size),c==1&&n.push(s)}var l=[];for(l=l.concat(n);!i;){var u=[];u=u.concat(l),l=[];for(var o=0;o<t.length;o++){var s=t[o],d=t.indexOf(s);d>=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var i=n(15),a=n(7),o=n(0),s=n(8),c=n(9);function l(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}for(var u in l.prototype=Object.create(i.prototype),i)l[u]=i[u];l.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,i,s,c=this.getGraphManager().getAllEdges(),l=0;l<c.length;l++)e=c[l],e.idealLength=this.idealEdgeLength,e.isInterGraph&&(n=e.getSource(),r=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),s=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+s-2*o.SIMPLE_NODE_SIZE),t=e.getLca().getInclusionTreeDepth(),e.idealLength+=a.DEFAULT_EDGE_LENGTH*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*t))},l.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n<e.length;n++)t=e[n],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;n<s.length;n++)i=s[n],this.calculateRepulsionForceOfANode(i,c,e,t),c.add(i);else for(n=0;n<s.length;n++)for(i=s[n],r=n+1;r<s.length;r++)o=s[r],i.getOwner()==o.getOwner()&&this.calcRepulsionForce(i,o)},l.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),n=0;n<t.length;n++)e=t[n],this.calcGravitationalForce(e)},l.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t,n=0;n<e.length;n++)t=e[n],t.move()},l.prototype.calcSpringForce=function(e,t){var n=e.getSource(),r=e.getTarget(),i,a,o,s;if(this.uniformLeafNodeSizes&&n.getChild()==null&&r.getChild()==null)e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;i=e.getLength(),i!=0&&(a=this.springConstant*(i-t),o=a*(e.lengthX/i),s=a*(e.lengthY/i),n.springForceX+=o,n.springForceY+=s,r.springForceX-=o,r.springForceY-=s)},l.prototype.calcRepulsionForce=function(e,t){var n=e.getRect(),r=t.getRect(),i=[,,],o=[,,,,],l,u,d,f,p,m,h;if(n.intersects(r)){s.calcSeparationAmount(n,r,i,a.DEFAULT_EDGE_LENGTH/2),m=2*i[0],h=2*i[1];var g=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren);e.repulsionForceX-=g*m,e.repulsionForceY-=g*h,t.repulsionForceX+=g*m,t.repulsionForceY+=g*h}else this.uniformLeafNodeSizes&&e.getChild()==null&&t.getChild()==null?(l=r.getCenterX()-n.getCenterX(),u=r.getCenterY()-n.getCenterY()):(s.getIntersection(n,r,o),l=o[2]-o[0],u=o[3]-o[1]),Math.abs(l)<a.MIN_REPULSION_DIST&&(l=c.sign(l)*a.MIN_REPULSION_DIST),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=c.sign(u)*a.MIN_REPULSION_DIST),d=l*l+u*u,f=Math.sqrt(d),p=this.repulsionConstant*e.noOfChildren*t.noOfChildren/d,m=p*l/f,h=p*u/f,e.repulsionForceX-=m,e.repulsionForceY-=h,t.repulsionForceX+=m,t.repulsionForceY+=h},l.prototype.calcGravitationalForce=function(e){var t=e.getOwner(),n=(t.getRight()+t.getLeft())/2,r=(t.getTop()+t.getBottom())/2,i=e.getCenterX()-n,a=e.getCenterY()-r,o=Math.abs(i)+e.getWidth()/2,s=Math.abs(a)+e.getHeight()/2,c;e.getOwner()==this.graphManager.getRoot()?(c=t.getEstimatedSize()*this.gravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),n=0;n<t.length;n++)e=t[n],e.noOfChildren=e.getNoOfChildren()},l.prototype.calcGrid=function(e){var t=0,n=0;t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange));for(var r=Array(t),i=0;i<t;i++)r[i]=Array(n);for(var i=0;i<t;i++)for(var a=0;a<n;a++)r[i][a]=[];return r},l.prototype.addNodeToGrid=function(e,t,n){var r=0,i=0,a=0,o=0;r=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-n)/this.repulsionRange)),o=parseInt(Math.floor((e.getRect().height+e.getRect().y-n)/this.repulsionRange));for(var s=r;s<=i;s++)for(var c=a;c<=o;c++)this.grid[s][c].push(e),e.setGridCoordinates(r,i,a,o)},l.prototype.updateGrid=function(){var e,t,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<n.length;e++)t=n[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(e,t,n,i){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&n||i){var o=new Set;e.surrounding=[];for(var s,c=this.grid,l=e.startX-1;l<e.finishX+2;l++)for(var u=e.startY-1;u<e.finishY+2;u++)if(!(l<0||u<0||l>=c.length||u>=c[0].length)){for(var d=0;d<c[l][u].length;d++)if(s=c[l][u][d],!(e.getOwner()!=s.getOwner()||e==s)&&!t.has(s)&&!o.has(s)){var f=Math.abs(e.getCenterX()-s.getCenterX())-(e.getWidth()/2+s.getWidth()/2),p=Math.abs(e.getCenterY()-s.getCenterY())-(e.getHeight()/2+s.getHeight()/2);f<=this.repulsionRange&&p<=this.repulsionRange&&o.add(s)}}e.surrounding=[].concat(r(o))}for(l=0;l<e.surrounding.length;l++)this.calcRepulsionForce(e,e.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},e.exports=l}),(function(e,t,n){var r=n(1),i=n(7);function a(e,t,n){r.call(this,e,t,n),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];e.exports=a}),(function(e,t,n){var r=n(3);function i(e,t,n,i){r.call(this,e,t,n,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.setGridCoordinates=function(e,t,n,r){this.startX=e,this.finishX=t,this.startY=n,this.finishY=r},e.exports=i}),(function(e,t,n){function r(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},e.exports=r}),(function(e,t,n){var r=n(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(e,t){var n=r.createID(e);this.contains(n)||(this.map[n]=t,this.keys.push(e))},i.prototype.contains=function(e){return r.createID(e),this.map[e]!=null},i.prototype.get=function(e){var t=r.createID(e);return this.map[t]},i.prototype.keySet=function(){return this.keys},e.exports=i}),(function(e,t,n){var r=n(14);function i(){this.set={}}i.prototype.add=function(e){var t=r.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[r.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[r.createID(e)]==e},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),n=t.length,r=0;r<n;r++)e.push(this.set[t[r]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,n=0;n<t;n++){var r=e[n];this.add(r)}},e.exports=i}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=n(11);e.exports=function(){function e(t,n){i(this,e),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=t instanceof a?t.size():t.length,this._quicksort(t,0,r-1)}return r(e,[{key:`_quicksort`,value:function(e,t,n){if(t<n){var r=this._partition(e,t,n);this._quicksort(e,t,r),this._quicksort(e,r+1,n)}}},{key:`_partition`,value:function(e,t,n){for(var r=this._get(e,t),i=t,a=n;;){for(;this.compareFunction(r,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),r);)i++;if(i<a)this._swap(e,i,a),i++,a--;else return a}}},{key:`_get`,value:function(e,t){return e instanceof a?e.get_object_at(t):e[t]}},{key:`_set`,value:function(e,t,n){e instanceof a?e.set_object_at(t,n):e[t]=n}},{key:`_swap`,value:function(e,t,n){var r=this._get(e,t);this._set(e,t,this._get(e,n)),this._set(e,n,r)}},{key:`_defaultCompareFunction`,value:function(e,t){return t>e}}]),e}()}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.exports=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var c=0;c<this.jMax;c++)this.grid[s][c]=0}this.tracebackGrid=Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=Array(this.jMax);for(var u=0;u<this.jMax;u++)this.tracebackGrid[l][u]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(e,[{key:`getScore`,value:function(){return this.score}},{key:`getAlignments`,value:function(){return this.alignments}},{key:`computeGrids`,value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var r=1;r<this.jMax;r++){var i=void 0;i=this.sequence1[n-1]===this.sequence2[r-1]?this.grid[n-1][r-1]+this.match_score:this.grid[n-1][r-1]+this.mismatch_penalty;var a=this.grid[n-1][r]+this.gap_penalty,o=this.grid[n][r-1]+this.gap_penalty,s=[i,a,o],c=this.arrayAllMaxIndexes(s);this.grid[n][r]=s[c[0]],this.tracebackGrid[n][r]=[c.includes(0),c.includes(1),c.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:`alignmentTraceback`,value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:``,seq2:``});e[0];){var t=e[0],n=this.tracebackGrid[t.pos[0]][t.pos[1]];n[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),n[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:`-`+t.seq2}),n[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:`-`+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),t.pos[0]===0&&t.pos[1]===0&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments}},{key:`getAllIndexes`,value:function(e,t){for(var n=[],r=-1;(r=e.indexOf(t,r+1))!==-1;)n.push(r);return n}},{key:`arrayAllMaxIndexes`,value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),e}()}),(function(e,t,n){var r=function(){};r.FDLayout=n(18),r.FDLayoutConstants=n(7),r.FDLayoutEdge=n(19),r.FDLayoutNode=n(20),r.DimensionD=n(21),r.HashMap=n(22),r.HashSet=n(23),r.IGeometry=n(8),r.IMath=n(9),r.Integer=n(10),r.Point=n(12),r.PointD=n(4),r.RandomSeed=n(16),r.RectangleD=n(13),r.Transform=n(17),r.UniqueIDGeneretor=n(14),r.Quicksort=n(24),r.LinkedList=n(11),r.LGraphObject=n(2),r.LGraph=n(5),r.LEdge=n(1),r.LGraphManager=n(6),r.LNode=n(3),r.Layout=n(15),r.LayoutConstants=n(0),r.NeedlemanWunsch=n(25),e.exports=r}),(function(e,t,n){function r(){this.listeners=[]}var i=r.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var n=this.listeners.length;n>=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];e===r.event&&r.callback(t)}},e.exports=r})])})})),s=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(o()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(o()):n.coseBase=r(n.layoutBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=7)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i<n.length;i++)r=n[i],r.getChild()==null?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a}),(function(e,t,n){var r=n(0).FDLayout,i=n(4),a=n(3),o=n(5),s=n(2),c=n(1),l=n(0).FDLayoutConstants,u=n(0).LayoutConstants,d=n(0).Point,f=n(0).PointD,p=n(0).Layout,m=n(0).Integer,h=n(0).IGeometry,g=n(0).LGraph,_=n(0).Transform;function v(){r.call(this),this.toBeTiled={}}for(var y in v.prototype=Object.create(r.prototype),r)v[y]=r[y];v.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},v.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},v.prototype.newNode=function(e){return new o(this.graphManager,e)},v.prototype.newEdge=function(e){return new s(null,null,e)},v.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=l.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=l.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=l.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},v.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.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){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-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 e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(l.ANIMATE===`during`)this.emit(`layoutstarted`);else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},v.prototype.calculateNodesToApplyGravitationTo=function(){var e=[],t,n=this.graphManager.getGraphs(),r=n.length,i;for(i=0;i<r;i++)t=n[i],t.updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},v.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var t=new Set,n;for(n=0;n<e.length;n++){var r=e[n];if(!t.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new f),r.getBendpoints().push(new f),this.createDummyNodesForBendpoints(r),t.add(r);else{var o=[];if(o=o.concat(i.getEdgeListToNode(a)),o=o.concat(a.getEdgeListToNode(i)),!t.has(o[0])){if(o.length>1){var s;for(s=0;s<o.length;s++){var c=o[s];c.getBendpoints().push(new f),this.createDummyNodesForBendpoints(c)}}o.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},v.prototype.positionNodesRadially=function(e){for(var t=new d(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new f(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,s!=0&&(i+=c.DEFAULT_COMPONENT_SEPERATION),r=0);var l=e[s],m=p.findCenterOfTree(l);t.x=a,t.y=i,o=v.radialLayout(l,m,t),o.y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(u.WORLD_CENTER_X-o.x/2,u.WORLD_CENTER_Y-o.y/2))},v.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(t,null,0,359,0,r);var i=g.calculateBounds(e),a=new _;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new f(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},v.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*h.TWO_PI/360,c=i*Math.cos(s),l=i*Math.sin(s);e.setCenter(c,l);var u=[];u=u.concat(e.getEdges());var d=u.length;t!=null&&d--;for(var f=0,p=u.length,m,g=e.getEdgesBetween(t);g.length>1;){var _=g[0];g.splice(0,1);var y=u.indexOf(_);y>=0&&u.splice(y,1),p--,d--}m=t==null?0:(u.indexOf(g[0])+1)%p;for(var b=Math.abs(r-n)/d,x=m;f!=d;x=++x%p){var S=u[x].getOtherEnd(e);if(S!=t){var C=(n+f*b)%360,w=(C+b)%360;v.branchRadialLayout(S,e,C,w,i+a,a),f++}}},v.maxDiagonalInTree=function(e){for(var t=m.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=r[i],s=a.getParent();this.getNodeDegreeWithChildren(a)===0&&(s.id==null||!this.getToBeTiled(s))&&n.push(a)}for(var i=0;i<n.length;i++){var a=n[i],c=a.getParent().id;t[c]===void 0&&(t[c]=[]),t[c]=t[c].concat(a)}Object.keys(t).forEach(function(n){if(t[n].length>1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;l<t[n].length;l++){var u=t[n][l];c.remove(u),s.add(u)}}})},v.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},v.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=e.idToDummyNode[n];t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height})},v.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},v.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},v.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},v.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},v.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(e.getChild()==null)return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.getChild()!=null&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},v.prototype.adjustLocations=function(e,t,n,r,i){t+=r,n+=i;for(var a=t,o=0;o<e.rows.length;o++){var s=e.rows[o];t=a;for(var c=0,l=0;l<s.length;l++){var u=s[l];u.rect.x=t,u.rect.y=n,t+=u.rect.width+e.horizontalPadding,u.rect.height>c&&(c=u.rect.height)}n+=c+e.verticalPadding}},v.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},v.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:c.TILING_PADDING_VERTICAL,horizontalPadding:c.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height<t.rect.width*t.rect.height)});for(var r=0;r<e.length;r++){var i=e[r];n.rows.length==0?this.insertNodeToRow(n,i,0,t):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),t):this.insertNodeToRow(n,i,n.rows.length,t),this.shiftToLastRow(n)}return n},v.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},v.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},v.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},v.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]<n&&r>0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.width<t?(e.height+a)/t:(e.height+a)/e.width;return s<1&&(s=1/s),o<1&&(o=1/o),o<s},v.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.height+=l-c,this.shiftToLastRow(e)}},v.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var e=[],t=!0,n;t;){var r=this.graphManager.getAllNodes(),i=[];t=!1;for(var a=0;a<r.length;a++)n=r[a],n.getEdges().length==1&&!n.getEdges()[0].isInterGraph&&n.getChild()==null&&(i.push([n,n.getEdges()[0],n.getOwner()]),t=!0);if(t==1){for(var o=[],s=0;s<i.length;s++)i[s][0].getEdges().length==1&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},v.prototype.growTree=function(e){for(var t=e[e.length-1],n,r=0;r<t.length;r++)n=t[r],this.findPlaceforPrunedNode(n),n[2].add(n[0]),n[2].add(n[1],n[1].source,n[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0];n=r==e[1].source?e[1].target:e[1].source;var i=n.startX,a=n.finishX,o=n.startY,s=n.finishY,c=[0,0,0,0];if(o>0)for(var u=i;u<=a;u++)c[0]+=this.grid[u][o-1].length+this.grid[u][o].length-1;if(a<this.grid.length-1)for(var u=o;u<=s;u++)c[1]+=this.grid[a+1][u].length+this.grid[a][u].length-1;if(s<this.grid[0].length-1)for(var u=i;u<=a;u++)c[2]+=this.grid[u][s+1].length+this.grid[u][s].length-1;if(i>0)for(var u=o;u<=s;u++)c[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var d=m.MAX_VALUE,f,p,h=0;h<c.length;h++)c[h]<d?(d=c[h],f=1,p=h):c[h]==d&&f++;if(f==3&&d==0)c[0]==0&&c[1]==0&&c[2]==0?t=1:c[0]==0&&c[1]==0&&c[3]==0?t=0:c[0]==0&&c[2]==0&&c[3]==0?t=3:c[1]==0&&c[2]==0&&c[3]==0&&(t=2);else if(f==2&&d==0){var g=Math.floor(Math.random()*2);t=c[0]==0&&c[1]==0?g==0?0:1:c[0]==0&&c[2]==0?g==0?0:2:c[0]==0&&c[3]==0?g==0?0:3:c[1]==0&&c[2]==0?g==0?1:2:c[1]==0&&c[3]==0?g==0?1:3:g==0?2:3}else if(f==4&&d==0){var g=Math.floor(Math.random()*4);t=g}else t=p;t==0?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-l.DEFAULT_EDGE_LENGTH-r.getHeight()/2):t==1?r.setCenter(n.getCenterX()+n.getWidth()/2+l.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):t==2?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+l.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-l.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},e.exports=v}),(function(e,t,n){var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(6),r.CoSENode=n(5),e.exports=r})])})})),c=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(s()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeCoseBilkent=r(s()):n.cytoscapeCoseBilkent=r(n.coseBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,c=n(0).layoutBase.PointD,l=n(0).layoutBase.DimensionD,u={ready:function(){},stop:function(){},quality:`default`,nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:`end`,animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function f(e){this.options=d(u,e),p(this.options)}var p=function(e){e.nodeRepulsion!=null&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),e.idealEdgeLength!=null&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),e.edgeElasticity!=null&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),e.nestingFactor!=null&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.quality==`draft`?r.QUALITY=0:e.quality==`proof`?r.QUALITY=2:r.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};f.prototype.run=function(){var e,t,n=this.options;this.idToLNode={};var r=this.layout=new o,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:`layoutstart`,layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),c=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var l=0;l<c.length;l++){var u=c[l],d=this.idToLNode[u.data(`source`)],f=this.idToLNode[u.data(`target`)];if(d!==f&&d.getEdgesBetween(f).length==0){var p=a.add(r.newEdge(),d,f);p.id=u.id()}}var m=function(e,t){typeof e==`number`&&(e=t);var n=e.data(`id`),r=i.idToLNode[n];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},h=function a(){for(var o=function(){n.fit&&n.cy.fit(n.eles,n.padding),e||(e=!0,i.cy.one(`layoutready`,n.ready),i.cy.trigger({type:`layoutready`,layout:i}))},s=i.options.refresh,c,l=0;l<s&&!c;l++)c=i.stopped||i.layout.tick();if(c){r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,i.options.eles.nodes().positions(m),o(),i.cy.one(`layoutstop`,i.options.stop),i.cy.trigger({type:`layoutstop`,layout:i}),t&&cancelAnimationFrame(t),e=!1;return}var u=i.layout.getPositionsData();n.eles.nodes().positions(function(e,t){if(typeof e==`number`&&(e=t),!e.isParent()){for(var n=e.id(),r=u[n],i=e;r==null&&(r=u[i.data(`parent`)]||u[`DummyCompound_`+i.data(`parent`)],u[n]=r,i=i.parent()[0],i!=null););return r==null?{x:e.position(`x`),y:e.position(`y`)}:{x:r.x,y:r.y}}}),o(),t=requestAnimationFrame(a)};return r.addListener(`layoutstarted`,function(){i.options.animate===`during`&&(t=requestAnimationFrame(h))}),r.runLayout(),this.options.animate!==`during`&&(i.options.eles.nodes().not(`:parent`).layoutPositions(i,i.options,m),e=!1),this},f.prototype.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter(function(e,n){typeof e==`number`&&(e=n);for(var r=e.parent()[0];r!=null;){if(t[r.id()])return!1;r=r.parent()[0]}return!0})},f.prototype.processChildrenList=function(e,t,n){for(var r=t.length,i=0;i<r;i++){var a=t[i],o=a.children(),u,d=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(u=a.outerWidth()!=null&&a.outerHeight()!=null?e.add(new s(n.graphManager,new c(a.position(`x`)-d.w/2,a.position(`y`)-d.h/2),new l(parseFloat(d.w),parseFloat(d.h)))):e.add(new s(this.graphManager)),u.id=a.data(`id`),u.paddingLeft=parseInt(a.css(`padding`)),u.paddingTop=parseInt(a.css(`padding`)),u.paddingRight=parseInt(a.css(`padding`)),u.paddingBottom=parseInt(a.css(`padding`)),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var f=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,p=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,m=a.css(`text-halign`);u.labelWidth=f,u.labelHeight=p,u.labelPos=m}if(this.idToLNode[a.data(`id`)]=u,isNaN(u.rect.x)&&(u.rect.x=0),isNaN(u.rect.y)&&(u.rect.y=0),o!=null&&o.length>0){var h=n.getGraphManager().add(n.newGraph(),u);this.processChildrenList(h,o,n)}}},f.prototype.stop=function(){return this.stopped=!0,this};var m=function(e){e(`layout`,`cose-bilkent`,f)};typeof cytoscape<`u`&&m(cytoscape),e.exports=m})])})}))(),1);a.use(c.default);function l(e,t){e.forEach(e=>{let n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{[`id`,`label`,`height`,`width`,`padding`,`x`,`y`].includes(t)||(n[t]=e[t])}),t.add({group:`nodes`,data:n,position:{x:e.x??0,y:e.y??0}})})}r(l,`addNodes`);function u(e,t){e.forEach(e=>{let n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{[`id`,`start`,`end`].includes(t)||(n[t]=e[t])}),t.add({group:`edges`,data:n})})}r(u,`addEdges`);function d(e){return new Promise(t=>{let r=n(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),o=a({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`bezier`}}]});r.remove(),l(e.nodes,o),u(e.edges,o),o.nodes().forEach(function(e){e.layoutDimensions=()=>{let t=e.data();return{w:t.width,h:t.height}}}),o.layout({name:`cose-bilkent`,quality:`proof`,styleEnabled:!1,animate:!1}).run(),o.ready(e=>{i.info(`Cytoscape ready`,e),t(o)})})}r(d,`createCytoscapeInstance`);function f(e){return e.nodes().map(e=>{let t=e.data(),n=e.position(),r={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{e!==`id`&&(r[e]=t[e])}),r})}r(f,`extractPositionedNodes`);function p(e){return e.edges().map(e=>{let t=e.data(),n=e._private.rscratch,r={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{[`id`,`source`,`target`].includes(e)||(r[e]=t[e])}),r})}r(p,`extractPositionedEdges`);async function m(e,t){i.debug(`Starting cose-bilkent layout algorithm`);try{h(e);let t=await d(e),n=f(t),r=p(t);return i.debug(`Layout completed: ${n.length} nodes, ${r.length} edges`),{nodes:n,edges:r}}catch(e){throw i.error(`Error in cose-bilkent layout algorithm:`,e),e}}r(m,`executeCoseBilkentLayout`);function h(e){if(!e)throw Error(`Layout data is required`);if(!e.config)throw Error(`Configuration is required in layout data`);if(!e.rootNode)throw Error(`Root node is required`);if(!e.nodes||!Array.isArray(e.nodes))throw Error(`No nodes found in layout data`);if(!Array.isArray(e.edges))throw Error(`Edges array is required in layout data`);return!0}r(h,`validateLayoutData`);var g=r(async(e,t,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:c},{algorithm:l})=>{let u={},d={},f=t.select(`g`);a(f,e.markers,e.type,e.diagramId);let p=f.insert(`g`).attr(`class`,`subgraphs`),h=f.insert(`g`).attr(`class`,`edgePaths`),g=f.insert(`g`).attr(`class`,`edgeLabels`),_=f.insert(`g`).attr(`class`,`nodes`);s.debug(`Inserting nodes into DOM for dimension calculation`),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){let e={...t};d[t.id]=e,u[t.id]=e,await n(p,t)}else{let n={...t};u[t.id]=n;let r=await o(_,t,{config:e.config,dir:e.direction||`TB`}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`)}})),s.debug(`Running cose-bilkent layout algorithm`);let v=await m({...e,nodes:e.nodes.map(e=>{let t=u[e.id];return{...e,width:t.width,height:t.height}})},e.config);s.debug(`Positioning nodes based on layout results`),v.nodes.forEach(e=>{let t=u[e.id];t?.domId&&(t.domId.attr(`transform`,`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),v.edges.forEach(t=>{let n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),s.debug(`Inserting and positioning edges`),await Promise.all(e.edges.map(async t=>{await i(g,t);let n=u[t.start??``],a=u[t.end??``];if(n&&a){let i=v.edges.find(e=>e.id===t.id);if(i){s.debug(`APA01 positionedEdge`,i);let o={...t};c(o,r(h,o,d,e.type,n,a,e.diagramId))}else{let i={...t,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]};c(i,r(h,i,d,e.type,n,a,e.diagramId))}}})),s.debug(`Cose-bilkent rendering completed`)},`render`);export{g as render};
|
|
1
|
+
import{o as e,t}from"./rolldown-runtime-DE9SaGGd.js";import{Ct as n}from"./vendor-utils-IVTPs69f.js";import{n as r,r as i}from"./chunk-AGHRB4JF-DIMn8T3_.js";import{t as a}from"./cytoscape.esm-zT8GwLFm.js";var o=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=26)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(4);function l(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,n!=null&&t!=null?this.rect=new a(t.x,t.y,n.width,n.height):this.rect=new a}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(!(r.source==n||r.target==n))throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.withChildren(),n.forEach(function(t){e.add(t)});return e},l.prototype.getNoOfChildren=function(){var e=0,t;if(this.child==null)e=1;else for(var n=this.child.getNodes(),r=0;r<n.length;r++)t=n[r],e+=t.getNoOfChildren();return e==0&&(e=1),e},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},l.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)},l.prototype.scatter=function(){var e,t,n=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY;e=o.WORLD_CENTER_X+s.nextDouble()*(r-n)+n;var i=-o.INITIAL_WORLD_BOUNDARY,a=o.INITIAL_WORLD_BOUNDARY;t=o.WORLD_CENTER_Y+s.nextDouble()*(a-i)+i,this.rect.x=e,this.rect.y=t},l.prototype.updateBounds=function(){if(this.getChild()==null)throw`assert failed`;if(this.getChild().getNodes().length!=0){var e=this.getChild();if(e.updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var t=e.getRight()-e.getLeft(),n=e.getBottom()-e.getTop();this.labelWidth>t&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&(this.labelPos==`center`?this.rect.y-=(this.labelHeight-n)/2:this.labelPos==`top`&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}else{var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(!(t.owner==n.owner&&t.owner==this))throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null}},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(!(t.owner!=null&&t.owner==this))throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a<i;a++)r=n[a],r.isInterGraph?this.graphManager.remove(r):r.source.owner.remove(r);var o=this.nodes.indexOf(t);if(o==-1)throw`Node not in owner node list!`;this.nodes.splice(o,1)}else if(e instanceof c){var r=e;if(r==null)throw`Edge is null!`;if(!(r.source!=null&&r.target!=null))throw`Source and/or target is null!`;if(!(r.source.owner!=null&&r.target.owner!=null&&r.source.owner==this&&r.target.owner==this))throw`Source and/or target owner is invalid!`;var l=r.source.edges.indexOf(r),u=r.target.edges.indexOf(r);if(!(l>-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;c<s;c++){var l=o[c];n=l.getTop(),r=l.getLeft(),e>n&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;m<p;m++){var h=f[m];e&&h.child!=null&&h.updateBounds(),o=h.getLeft(),s=h.getRight(),c=h.getTop(),u=h.getBottom(),t>o&&(t=o),n<s&&(n=s),r>c&&(r=c),a<u&&(a=u)}var g=new l(t,r,n-t,a-r);t==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),d=f[0].getParent().paddingLeft==null?this.margin:f[0].getParent().paddingLeft,this.left=g.x-d,this.right=g.x+g.width+d,this.top=g.y-d,this.bottom=g.y+g.height+d},f.calculateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d=e.length,f=0;f<d;f++){var p=e[f];o=p.getLeft(),s=p.getRight(),c=p.getTop(),u=p.getBottom(),t>o&&(t=o),n<s&&(n=s),r>c&&(r=c),a<u&&(a=u)}return new l(t,r,n-t,a-r)},f.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},f.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r<n;r++){var i=t[r];e+=i.calcEstimatedSize()}return e==0?this.estimatedSize=a.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=e/Math.sqrt(this.nodes.length),this.estimatedSize},f.prototype.updateConnected=function(){var e=this;if(this.nodes.length==0){this.isConnected=!0;return}var t=new d,n=new Set,r=this.nodes[0],i,a;for(r.withChildren().forEach(function(e){t.push(e),n.add(e)});t.length!==0;){r=t.shift(),i=r.getEdges();for(var o=i.length,s=0;s<o;s++)a=i[s].getOtherEndInGraph(r,this),a!=null&&!n.has(a)&&a.withChildren().forEach(function(e){t.push(e),n.add(e)})}if(this.isConnected=!1,n.size>=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}else{i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(!(a!=null&&a.getGraphManager()==this))throw`Source not in this graph mgr!`;if(!(o!=null&&o.getGraphManager()==this))throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),!(n.source!=null&&n.target!=null))throw`Edge source and/or target is null!`;if(!(n.source.edges.indexOf(n)==-1&&n.target.edges.indexOf(n)==-1))throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n}},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s<o;s++)a=n[s],t.remove(a);var c=[];c=c.concat(t.getNodes());var l;o=c.length;for(var s=0;s<o;s++)l=c[s],t.remove(l);t==this.rootGraph&&this.setRootGraph(null);var u=this.graphs.indexOf(t);this.graphs.splice(u,1),t.parent=null}else if(e instanceof i){if(a=e,a==null)throw`Edge is null!`;if(!a.isInterGraph)throw`Not an inter-graph edge!`;if(!(a.source!=null&&a.target!=null))throw`Source and/or target is null!`;if(!(a.source.edges.indexOf(a)!=-1&&a.target.edges.indexOf(a)!=-1))throw`Source and/or target doesn't know this edge!`;var u=a.source.edges.indexOf(a);if(a.source.edges.splice(u,1),u=a.target.edges.indexOf(a),a.target.edges.splice(u,1),!(a.source.owner!=null&&a.source.owner.getGraphManager()!=null))throw`Edge owner graph or owner graph manager is null!`;if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw`Not in owner graph manager's edge list!`;var u=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(u,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],t=this.getGraphs(),n=t.length,r=0;r<n;r++)e=e.concat(t[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],t=this.getGraphs();t.length;for(var n=0;n<t.length;n++)e=e.concat(t[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw`assert failed`;this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw`Root not in this graph mgr!`;this.rootGraph=e,e.parent??=this.layout.newNode(`Root node`)},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,t){if(!(e!=null&&t!=null))throw`assert failed`;if(e==t)return!0;var n=e.getOwner(),r;do{if(r=n.getParent(),r==null)break;if(r==t)return!0;if(n=r.getOwner(),n==null)break}while(!0);n=t.getOwner();do{if(r=n.getParent(),r==null)break;if(r==e)return!0;if(n=r.getOwner(),n==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,t,n,r,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++){if(e=a[s],t=e.source,n=e.target,e.lca=null,e.sourceInLca=t,e.targetInLca=n,t==n){e.lca=t.getOwner();continue}for(r=t.getOwner();e.lca==null;){for(e.targetInLca=n,i=n.getOwner();e.lca==null;){if(i==r){e.lca=i;break}if(i==this.rootGraph)break;if(e.lca!=null)throw`assert failed`;e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca??(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw`assert failed`}},a.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();var n=e.getOwner();do{if(n==null)break;var r=t.getOwner();do{if(r==null)break;if(r==n)return r;r=r.getParent().getOwner()}while(!0);n=n.getParent().getOwner()}while(!0);return n},a.prototype.calcInclusionTreeDepths=function(e,t){e==null&&t==null&&(e=this.rootGraph,t=1);for(var n,r=e.getNodes(),i=r.length,a=0;a<i;a++)n=r[a],n.inclusionTreeDepth=t,n.child!=null&&this.calcInclusionTreeDepths(n.child,t+1)},a.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,n=0;n<t;n++)if(e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=a}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){var r=n(12);function i(){}i.calcSeparationAmount=function(e,t,n,r){if(!e.intersects(t))throw`assert failed`;var i=[,,];this.decideDirectionsForOverlappingNodes(e,t,i),n[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),n[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]<s?s=n[0]:o=n[1],n[0]=-1*i[0]*(s/2+r),n[1]=-1*i[1]*(o/2+r)},i.decideDirectionsForOverlappingNodes=function(e,t,n){e.getCenterX()<t.getCenterX()?n[0]=-1:n[0]=1,e.getCenterY()<t.getCenterY()?n[1]=-1:n[1]=1},i.getIntersection2=function(e,t,n){var r=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),o=t.getCenterY();if(e.intersects(t))return n[0]=r,n[1]=i,n[2]=a,n[3]=o,!0;var s=e.getX(),c=e.getY(),l=e.getRight(),u=e.getX(),d=e.getBottom(),f=e.getRight(),p=e.getWidthHalf(),m=e.getHeightHalf(),h=t.getX(),g=t.getY(),_=t.getRight(),v=t.getX(),y=t.getBottom(),b=t.getRight(),x=t.getWidthHalf(),S=t.getHeightHalf(),C=!1,w=!1;if(r===a){if(i>o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(i<o)return n[0]=r,n[1]=d,n[2]=a,n[3]=g,!1}else if(i===o){if(r>a)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(r<a)return n[0]=l,n[1]=i,n[2]=h,n[3]=o,!1}else{var T=e.height/e.width,E=t.height/t.width,D=(o-i)/(a-r),O=void 0,k=void 0,A=void 0,j=void 0,M=void 0,N=void 0;if(-T===D?r>a?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j;break}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N;break}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r<t?this.ONE_AND_HALF_PI:this.HALF_PI:(i=Math.atan((r-t)/(n-e)),n<e?i+=Math.PI:r<t&&(i+=this.TWO_PI)),i},i.doIntersect=function(e,t,n,r){var i=e.x,a=e.y,o=t.x,s=t.y,c=n.x,l=n.y,u=r.x,d=r.y,f=(o-i)*(d-l)-(u-c)*(s-a);if(f===0)return!1;var p=((d-l)*(u-i)+(c-u)*(d-a))/f,m=((a-s)*(u-i)+(o-i)*(d-a))/f;return 0<p&&p<1&&0<m&&m<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=function(e){return{value:e,next:null,prev:null}},o=function(e,t,n,r){return e===null?r.head=t:e.next=t,n===null?r.tail=t:n.prev=t,t.prev=e,t.next=n,r.length++,t},s=function(e,t){var n=e.prev,r=e.next;return n===null?t.head=r:n.next=r,r===null?t.tail=n:r.prev=n,e.prev=e.next=null,t.length--,e};e.exports=function(){function e(t){var n=this;i(this,e),this.length=0,this.head=null,this.tail=null,t?.forEach(function(e){return n.push(e)})}return r(e,[{key:`size`,value:function(){return this.length}},{key:`insertBefore`,value:function(e,t){return o(t.prev,a(e),t,this)}},{key:`insertAfter`,value:function(e,t){return o(t,a(e),t.next,this)}},{key:`insertNodeBefore`,value:function(e,t){return o(t.prev,e,t,this)}},{key:`insertNodeAfter`,value:function(e,t){return o(t,e,t.next,this)}},{key:`push`,value:function(e){return o(this.tail,a(e),null,this)}},{key:`unshift`,value:function(e){return o(null,a(e),this.head,this)}},{key:`remove`,value:function(e){return s(e,this)}},{key:`pop`,value:function(){return s(this.tail,this).value}},{key:`popNode`,value:function(){return s(this.tail,this)}},{key:`shift`,value:function(){return s(this.head,this).value}},{key:`shiftNode`,value:function(){return s(this.head,this)}},{key:`get_object_at`,value:function(e){if(e<=this.length()){for(var t=1,n=this.head;t<e;)n=n.next,t++;return n.value}}},{key:`set_object_at`,value:function(e,t){if(e<=this.length()){for(var n=1,r=this.head;n<e;)r=r.next,n++;r.value=t}}}]),e}()}),(function(e,t,n){function r(e,t,n){this.x=null,this.y=null,e==null&&t==null&&n==null?(this.x=0,this.y=0):typeof e==`number`&&typeof t==`number`&&n==null?(this.x=e,this.y=t):e.constructor.name==`Point`&&t==null&&n==null&&(n=e,this.x=n.x,this.y=n.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(e,t,n){e.constructor.name==`Point`&&t==null&&n==null?(n=e,this.setLocation(n.x,n.y)):typeof e==`number`&&typeof t==`number`&&n==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},r.prototype.move=function(e,t){this.x=e,this.y=t},r.prototype.translate=function(e,t){this.x+=e,this.y+=t},r.prototype.equals=function(e){if(e.constructor.name==`Point`){var t=e;return this.x==t.x&&this.y==t.y}return this==e},r.prototype.toString=function(){return new r().constructor.name+`[x=`+this.x+`,y=`+this.y+`]`},e.exports=r}),(function(e,t,n){function r(e,t,n,r){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&n!=null&&r!=null&&(this.x=e,this.y=t,this.width=n,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(e){this.x=e},r.prototype.getY=function(){return this.y},r.prototype.setY=function(e){this.y=e},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},e.exports=r}),(function(e,t,n){var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e};function i(){}i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:e.uniqueID==null?(e.uniqueID=i.getString(),i.lastID++,e.uniqueID):e.uniqueID},i.getString=function(e){return e??=i.lastID,`Object#`+e},i.isPrimitive=function(e){var t=e===void 0?`undefined`:r(e);return e==null||t!=`object`&&t!=`function`},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var i=n(0),a=n(6),o=n(3),s=n(1),c=n(5),l=n(4),u=n(17),d=n(27);function f(e){d.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,e!=null&&(this.isRemoteUse=e)}f.RANDOM_SEED=1,f.prototype=Object.create(d.prototype),f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},f.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},f.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},f.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e,e},f.prototype.newGraph=function(e){return new c(null,this.graphManager,e)},f.prototype.newNode=function(e){return new o(this.graphManager,e)},f.prototype.newEdge=function(e){return new s(null,null,e)},f.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},f.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var e=this.checkLayoutSuccess()?!1:this.layout();return i.ANIMATE===`during`?!1:(e&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},f.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},f.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var n=this.graphManager.getRoot().getNodes(),t=0;t<n.length;t++)n[t];this.update(this.graphManager.getRoot())}},f.prototype.update=function(e){if(e==null)this.update2();else if(e instanceof o){var t=e;if(t.getChild()!=null)for(var n=t.getChild().getNodes(),r=0;r<n.length;r++)update(n[r]);t.vGraphObject!=null&&t.vGraphObject.update(t)}else if(e instanceof s){var i=e;i.vGraphObject!=null&&i.vGraphObject.update(i)}else if(e instanceof c){var a=e;a.vGraphObject!=null&&a.vGraphObject.update(a)}},f.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},f.prototype.transform=function(e){if(e==null)this.transform(new l(0,0));else{var t=new u,n=this.graphManager.getRoot().updateLeftTop();if(n!=null){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(n.x),t.setDeviceOrgY(n.y);for(var r=this.getAllNodes(),i,a=0;a<r.length;a++)i=r[a],i.transform(t)}}},f.prototype.positionNodesRandomly=function(e){if(e==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,n,r=e.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.getChild(),n==null||n.getNodes().length==0?t.scatter():(this.positionNodesRandomly(n),t.updateBounds())},f.prototype.getFlatForest=function(){for(var e=[],t=!0,n=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<n.length;a++)n[a].getChild()!=null&&(i=!1);if(!i)return e;var o=new Set,s=[],c=new Map,l=[];for(l=l.concat(n);l.length>0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a<d.length;a++){var f=d[a].getOtherEnd(u);if(c.get(u)!=f)if(!o.has(f))s.push(f),c.set(f,u);else{t=!1;break}}}if(!t)e=[];else{var p=[].concat(r(o));e.push(p);for(var a=0;a<p.length;a++){var m=p[a],h=l.indexOf(m);h>-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),r.add(a);var o=this.newEdge(null);this.graphManager.add(o,n,a),t.add(a),n=a}var o=this.newEdge(null);return this.graphManager.add(o,n,e.target),this.edgeToDummyNodes.set(e,t),e.isInterGraph()?this.graphManager.remove(e):r.remove(e),t},f.prototype.createBendpointsFromDummyNodes=function(){var e=[];e=e.concat(this.graphManager.getAllEdges()),e=[].concat(r(this.edgeToDummyNodes.keys()),e);for(var t=0;t<e.length;t++){var n=e[t];if(n.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(n),a=0;a<i.length;a++){var o=i[a],s=new l(o.getCenterX(),o.getCenterY()),c=n.bendpoints.get(a);c.x=s.x,c.y=s.y,o.getOwner().remove(o)}this.graphManager.add(n,n.source,n.target)}}},f.transform=function(e,t,n,r){if(n!=null&&r!=null){var i=t;if(e<=50){var a=t/n;i-=(t-a)/50*(50-e)}else{var o=t*r;i+=(o-t)/50*(e-50)}return i}else{var s,c;return e<=50?(s=9*t/500,c=t/10):(s=9*t/50,c=-8*t),s*e+c}},f.findCenterOfTree=function(e){var t=[];t=t.concat(e);var n=[],r=new Map,i=!1,a=null;(t.length==1||t.length==2)&&(i=!0,a=t[0]);for(var o=0;o<t.length;o++){var s=t[o],c=s.getNeighborsList().size;r.set(s,s.getNeighborsList().size),c==1&&n.push(s)}var l=[];for(l=l.concat(n);!i;){var u=[];u=u.concat(l),l=[];for(var o=0;o<t.length;o++){var s=t[o],d=t.indexOf(s);d>=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var i=n(15),a=n(7),o=n(0),s=n(8),c=n(9);function l(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}for(var u in l.prototype=Object.create(i.prototype),i)l[u]=i[u];l.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,i,s,c=this.getGraphManager().getAllEdges(),l=0;l<c.length;l++)e=c[l],e.idealLength=this.idealEdgeLength,e.isInterGraph&&(n=e.getSource(),r=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),s=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+s-2*o.SIMPLE_NODE_SIZE),t=e.getLca().getInclusionTreeDepth(),e.idealLength+=a.DEFAULT_EDGE_LENGTH*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*t))},l.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n<e.length;n++)t=e[n],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;n<s.length;n++)i=s[n],this.calculateRepulsionForceOfANode(i,c,e,t),c.add(i);else for(n=0;n<s.length;n++)for(i=s[n],r=n+1;r<s.length;r++)o=s[r],i.getOwner()==o.getOwner()&&this.calcRepulsionForce(i,o)},l.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),n=0;n<t.length;n++)e=t[n],this.calcGravitationalForce(e)},l.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t,n=0;n<e.length;n++)t=e[n],t.move()},l.prototype.calcSpringForce=function(e,t){var n=e.getSource(),r=e.getTarget(),i,a,o,s;if(this.uniformLeafNodeSizes&&n.getChild()==null&&r.getChild()==null)e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;i=e.getLength(),i!=0&&(a=this.springConstant*(i-t),o=a*(e.lengthX/i),s=a*(e.lengthY/i),n.springForceX+=o,n.springForceY+=s,r.springForceX-=o,r.springForceY-=s)},l.prototype.calcRepulsionForce=function(e,t){var n=e.getRect(),r=t.getRect(),i=[,,],o=[,,,,],l,u,d,f,p,m,h;if(n.intersects(r)){s.calcSeparationAmount(n,r,i,a.DEFAULT_EDGE_LENGTH/2),m=2*i[0],h=2*i[1];var g=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren);e.repulsionForceX-=g*m,e.repulsionForceY-=g*h,t.repulsionForceX+=g*m,t.repulsionForceY+=g*h}else this.uniformLeafNodeSizes&&e.getChild()==null&&t.getChild()==null?(l=r.getCenterX()-n.getCenterX(),u=r.getCenterY()-n.getCenterY()):(s.getIntersection(n,r,o),l=o[2]-o[0],u=o[3]-o[1]),Math.abs(l)<a.MIN_REPULSION_DIST&&(l=c.sign(l)*a.MIN_REPULSION_DIST),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=c.sign(u)*a.MIN_REPULSION_DIST),d=l*l+u*u,f=Math.sqrt(d),p=this.repulsionConstant*e.noOfChildren*t.noOfChildren/d,m=p*l/f,h=p*u/f,e.repulsionForceX-=m,e.repulsionForceY-=h,t.repulsionForceX+=m,t.repulsionForceY+=h},l.prototype.calcGravitationalForce=function(e){var t=e.getOwner(),n=(t.getRight()+t.getLeft())/2,r=(t.getTop()+t.getBottom())/2,i=e.getCenterX()-n,a=e.getCenterY()-r,o=Math.abs(i)+e.getWidth()/2,s=Math.abs(a)+e.getHeight()/2,c;e.getOwner()==this.graphManager.getRoot()?(c=t.getEstimatedSize()*this.gravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),n=0;n<t.length;n++)e=t[n],e.noOfChildren=e.getNoOfChildren()},l.prototype.calcGrid=function(e){var t=0,n=0;t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange));for(var r=Array(t),i=0;i<t;i++)r[i]=Array(n);for(var i=0;i<t;i++)for(var a=0;a<n;a++)r[i][a]=[];return r},l.prototype.addNodeToGrid=function(e,t,n){var r=0,i=0,a=0,o=0;r=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-n)/this.repulsionRange)),o=parseInt(Math.floor((e.getRect().height+e.getRect().y-n)/this.repulsionRange));for(var s=r;s<=i;s++)for(var c=a;c<=o;c++)this.grid[s][c].push(e),e.setGridCoordinates(r,i,a,o)},l.prototype.updateGrid=function(){var e,t,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<n.length;e++)t=n[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(e,t,n,i){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&n||i){var o=new Set;e.surrounding=[];for(var s,c=this.grid,l=e.startX-1;l<e.finishX+2;l++)for(var u=e.startY-1;u<e.finishY+2;u++)if(!(l<0||u<0||l>=c.length||u>=c[0].length)){for(var d=0;d<c[l][u].length;d++)if(s=c[l][u][d],!(e.getOwner()!=s.getOwner()||e==s)&&!t.has(s)&&!o.has(s)){var f=Math.abs(e.getCenterX()-s.getCenterX())-(e.getWidth()/2+s.getWidth()/2),p=Math.abs(e.getCenterY()-s.getCenterY())-(e.getHeight()/2+s.getHeight()/2);f<=this.repulsionRange&&p<=this.repulsionRange&&o.add(s)}}e.surrounding=[].concat(r(o))}for(l=0;l<e.surrounding.length;l++)this.calcRepulsionForce(e,e.surrounding[l])},l.prototype.calcRepulsionRange=function(){return 0},e.exports=l}),(function(e,t,n){var r=n(1),i=n(7);function a(e,t,n){r.call(this,e,t,n),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];e.exports=a}),(function(e,t,n){var r=n(3);function i(e,t,n,i){r.call(this,e,t,n,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.setGridCoordinates=function(e,t,n,r){this.startX=e,this.finishX=t,this.startY=n,this.finishY=r},e.exports=i}),(function(e,t,n){function r(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},e.exports=r}),(function(e,t,n){var r=n(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(e,t){var n=r.createID(e);this.contains(n)||(this.map[n]=t,this.keys.push(e))},i.prototype.contains=function(e){return r.createID(e),this.map[e]!=null},i.prototype.get=function(e){var t=r.createID(e);return this.map[t]},i.prototype.keySet=function(){return this.keys},e.exports=i}),(function(e,t,n){var r=n(14);function i(){this.set={}}i.prototype.add=function(e){var t=r.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[r.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[r.createID(e)]==e},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),n=t.length,r=0;r<n;r++)e.push(this.set[t[r]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,n=0;n<t;n++){var r=e[n];this.add(r)}},e.exports=i}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=n(11);e.exports=function(){function e(t,n){i(this,e),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=t instanceof a?t.size():t.length,this._quicksort(t,0,r-1)}return r(e,[{key:`_quicksort`,value:function(e,t,n){if(t<n){var r=this._partition(e,t,n);this._quicksort(e,t,r),this._quicksort(e,r+1,n)}}},{key:`_partition`,value:function(e,t,n){for(var r=this._get(e,t),i=t,a=n;;){for(;this.compareFunction(r,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),r);)i++;if(i<a)this._swap(e,i,a),i++,a--;else return a}}},{key:`_get`,value:function(e,t){return e instanceof a?e.get_object_at(t):e[t]}},{key:`_set`,value:function(e,t,n){e instanceof a?e.set_object_at(t,n):e[t]=n}},{key:`_swap`,value:function(e,t,n){var r=this._get(e,t);this._set(e,t,this._get(e,n)),this._set(e,n,r)}},{key:`_defaultCompareFunction`,value:function(e,t){return t>e}}]),e}()}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.exports=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var c=0;c<this.jMax;c++)this.grid[s][c]=0}this.tracebackGrid=Array(this.iMax);for(var l=0;l<this.iMax;l++){this.tracebackGrid[l]=Array(this.jMax);for(var u=0;u<this.jMax;u++)this.tracebackGrid[l][u]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(e,[{key:`getScore`,value:function(){return this.score}},{key:`getAlignments`,value:function(){return this.alignments}},{key:`computeGrids`,value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var r=1;r<this.jMax;r++){var i=void 0;i=this.sequence1[n-1]===this.sequence2[r-1]?this.grid[n-1][r-1]+this.match_score:this.grid[n-1][r-1]+this.mismatch_penalty;var a=this.grid[n-1][r]+this.gap_penalty,o=this.grid[n][r-1]+this.gap_penalty,s=[i,a,o],c=this.arrayAllMaxIndexes(s);this.grid[n][r]=s[c[0]],this.tracebackGrid[n][r]=[c.includes(0),c.includes(1),c.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:`alignmentTraceback`,value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:``,seq2:``});e[0];){var t=e[0],n=this.tracebackGrid[t.pos[0]][t.pos[1]];n[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),n[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:`-`+t.seq2}),n[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:`-`+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),t.pos[0]===0&&t.pos[1]===0&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments}},{key:`getAllIndexes`,value:function(e,t){for(var n=[],r=-1;(r=e.indexOf(t,r+1))!==-1;)n.push(r);return n}},{key:`arrayAllMaxIndexes`,value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),e}()}),(function(e,t,n){var r=function(){};r.FDLayout=n(18),r.FDLayoutConstants=n(7),r.FDLayoutEdge=n(19),r.FDLayoutNode=n(20),r.DimensionD=n(21),r.HashMap=n(22),r.HashSet=n(23),r.IGeometry=n(8),r.IMath=n(9),r.Integer=n(10),r.Point=n(12),r.PointD=n(4),r.RandomSeed=n(16),r.RectangleD=n(13),r.Transform=n(17),r.UniqueIDGeneretor=n(14),r.Quicksort=n(24),r.LinkedList=n(11),r.LGraphObject=n(2),r.LGraph=n(5),r.LEdge=n(1),r.LGraphManager=n(6),r.LNode=n(3),r.Layout=n(15),r.LayoutConstants=n(0),r.NeedlemanWunsch=n(25),e.exports=r}),(function(e,t,n){function r(){this.listeners=[]}var i=r.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var n=this.listeners.length;n>=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];e===r.event&&r.callback(t)}},e.exports=r})])})})),s=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(o()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(o()):n.coseBase=r(n.layoutBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=7)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i<n.length;i++)r=n[i],r.getChild()==null?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a}),(function(e,t,n){var r=n(0).FDLayout,i=n(4),a=n(3),o=n(5),s=n(2),c=n(1),l=n(0).FDLayoutConstants,u=n(0).LayoutConstants,d=n(0).Point,f=n(0).PointD,p=n(0).Layout,m=n(0).Integer,h=n(0).IGeometry,g=n(0).LGraph,_=n(0).Transform;function v(){r.call(this),this.toBeTiled={}}for(var y in v.prototype=Object.create(r.prototype),r)v[y]=r[y];v.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},v.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},v.prototype.newNode=function(e){return new o(this.graphManager,e)},v.prototype.newEdge=function(e){return new s(null,null,e)},v.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=l.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=l.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=l.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},v.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.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){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-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 e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(l.ANIMATE===`during`)this.emit(`layoutstarted`);else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},v.prototype.calculateNodesToApplyGravitationTo=function(){var e=[],t,n=this.graphManager.getGraphs(),r=n.length,i;for(i=0;i<r;i++)t=n[i],t.updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},v.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var t=new Set,n;for(n=0;n<e.length;n++){var r=e[n];if(!t.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new f),r.getBendpoints().push(new f),this.createDummyNodesForBendpoints(r),t.add(r);else{var o=[];if(o=o.concat(i.getEdgeListToNode(a)),o=o.concat(a.getEdgeListToNode(i)),!t.has(o[0])){if(o.length>1){var s;for(s=0;s<o.length;s++){var c=o[s];c.getBendpoints().push(new f),this.createDummyNodesForBendpoints(c)}}o.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},v.prototype.positionNodesRadially=function(e){for(var t=new d(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new f(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,s!=0&&(i+=c.DEFAULT_COMPONENT_SEPERATION),r=0);var l=e[s],m=p.findCenterOfTree(l);t.x=a,t.y=i,o=v.radialLayout(l,m,t),o.y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(u.WORLD_CENTER_X-o.x/2,u.WORLD_CENTER_Y-o.y/2))},v.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(t,null,0,359,0,r);var i=g.calculateBounds(e),a=new _;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new f(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},v.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*h.TWO_PI/360,c=i*Math.cos(s),l=i*Math.sin(s);e.setCenter(c,l);var u=[];u=u.concat(e.getEdges());var d=u.length;t!=null&&d--;for(var f=0,p=u.length,m,g=e.getEdgesBetween(t);g.length>1;){var _=g[0];g.splice(0,1);var y=u.indexOf(_);y>=0&&u.splice(y,1),p--,d--}m=t==null?0:(u.indexOf(g[0])+1)%p;for(var b=Math.abs(r-n)/d,x=m;f!=d;x=++x%p){var S=u[x].getOtherEnd(e);if(S!=t){var C=(n+f*b)%360,w=(C+b)%360;v.branchRadialLayout(S,e,C,w,i+a,a),f++}}},v.maxDiagonalInTree=function(e){for(var t=m.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=r[i],s=a.getParent();this.getNodeDegreeWithChildren(a)===0&&(s.id==null||!this.getToBeTiled(s))&&n.push(a)}for(var i=0;i<n.length;i++){var a=n[i],c=a.getParent().id;t[c]===void 0&&(t[c]=[]),t[c]=t[c].concat(a)}Object.keys(t).forEach(function(n){if(t[n].length>1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;l<t[n].length;l++){var u=t[n][l];c.remove(u),s.add(u)}}})},v.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},v.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=e.idToDummyNode[n];t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height})},v.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},v.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},v.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},v.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},v.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(e.getChild()==null)return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.getChild()!=null&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},v.prototype.adjustLocations=function(e,t,n,r,i){t+=r,n+=i;for(var a=t,o=0;o<e.rows.length;o++){var s=e.rows[o];t=a;for(var c=0,l=0;l<s.length;l++){var u=s[l];u.rect.x=t,u.rect.y=n,t+=u.rect.width+e.horizontalPadding,u.rect.height>c&&(c=u.rect.height)}n+=c+e.verticalPadding}},v.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},v.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:c.TILING_PADDING_VERTICAL,horizontalPadding:c.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height<t.rect.width*t.rect.height)});for(var r=0;r<e.length;r++){var i=e[r];n.rows.length==0?this.insertNodeToRow(n,i,0,t):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),t):this.insertNodeToRow(n,i,n.rows.length,t),this.shiftToLastRow(n)}return n},v.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},v.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},v.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},v.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]<n&&r>0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.width<t?(e.height+a)/t:(e.height+a)/e.width;return s<1&&(s=1/s),o<1&&(o=1/o),o<s},v.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.height+=l-c,this.shiftToLastRow(e)}},v.prototype.tilingPreLayout=function(){c.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){c.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var e=[],t=!0,n;t;){var r=this.graphManager.getAllNodes(),i=[];t=!1;for(var a=0;a<r.length;a++)n=r[a],n.getEdges().length==1&&!n.getEdges()[0].isInterGraph&&n.getChild()==null&&(i.push([n,n.getEdges()[0],n.getOwner()]),t=!0);if(t==1){for(var o=[],s=0;s<i.length;s++)i[s][0].getEdges().length==1&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},v.prototype.growTree=function(e){for(var t=e[e.length-1],n,r=0;r<t.length;r++)n=t[r],this.findPlaceforPrunedNode(n),n[2].add(n[0]),n[2].add(n[1],n[1].source,n[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0];n=r==e[1].source?e[1].target:e[1].source;var i=n.startX,a=n.finishX,o=n.startY,s=n.finishY,c=[0,0,0,0];if(o>0)for(var u=i;u<=a;u++)c[0]+=this.grid[u][o-1].length+this.grid[u][o].length-1;if(a<this.grid.length-1)for(var u=o;u<=s;u++)c[1]+=this.grid[a+1][u].length+this.grid[a][u].length-1;if(s<this.grid[0].length-1)for(var u=i;u<=a;u++)c[2]+=this.grid[u][s+1].length+this.grid[u][s].length-1;if(i>0)for(var u=o;u<=s;u++)c[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var d=m.MAX_VALUE,f,p,h=0;h<c.length;h++)c[h]<d?(d=c[h],f=1,p=h):c[h]==d&&f++;if(f==3&&d==0)c[0]==0&&c[1]==0&&c[2]==0?t=1:c[0]==0&&c[1]==0&&c[3]==0?t=0:c[0]==0&&c[2]==0&&c[3]==0?t=3:c[1]==0&&c[2]==0&&c[3]==0&&(t=2);else if(f==2&&d==0){var g=Math.floor(Math.random()*2);t=c[0]==0&&c[1]==0?g==0?0:1:c[0]==0&&c[2]==0?g==0?0:2:c[0]==0&&c[3]==0?g==0?0:3:c[1]==0&&c[2]==0?g==0?1:2:c[1]==0&&c[3]==0?g==0?1:3:g==0?2:3}else if(f==4&&d==0){var g=Math.floor(Math.random()*4);t=g}else t=p;t==0?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-l.DEFAULT_EDGE_LENGTH-r.getHeight()/2):t==1?r.setCenter(n.getCenterX()+n.getWidth()/2+l.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):t==2?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+l.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-l.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},e.exports=v}),(function(e,t,n){var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(6),r.CoSENode=n(5),e.exports=r})])})})),c=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(s()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeCoseBilkent=r(s()):n.cytoscapeCoseBilkent=r(n.coseBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,c=n(0).layoutBase.PointD,l=n(0).layoutBase.DimensionD,u={ready:function(){},stop:function(){},quality:`default`,nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:`end`,animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function f(e){this.options=d(u,e),p(this.options)}var p=function(e){e.nodeRepulsion!=null&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),e.idealEdgeLength!=null&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),e.edgeElasticity!=null&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),e.nestingFactor!=null&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.quality==`draft`?r.QUALITY=0:e.quality==`proof`?r.QUALITY=2:r.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};f.prototype.run=function(){var e,t,n=this.options;this.idToLNode={};var r=this.layout=new o,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:`layoutstart`,layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),c=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var l=0;l<c.length;l++){var u=c[l],d=this.idToLNode[u.data(`source`)],f=this.idToLNode[u.data(`target`)];if(d!==f&&d.getEdgesBetween(f).length==0){var p=a.add(r.newEdge(),d,f);p.id=u.id()}}var m=function(e,t){typeof e==`number`&&(e=t);var n=e.data(`id`),r=i.idToLNode[n];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},h=function a(){for(var o=function(){n.fit&&n.cy.fit(n.eles,n.padding),e||(e=!0,i.cy.one(`layoutready`,n.ready),i.cy.trigger({type:`layoutready`,layout:i}))},s=i.options.refresh,c,l=0;l<s&&!c;l++)c=i.stopped||i.layout.tick();if(c){r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,i.options.eles.nodes().positions(m),o(),i.cy.one(`layoutstop`,i.options.stop),i.cy.trigger({type:`layoutstop`,layout:i}),t&&cancelAnimationFrame(t),e=!1;return}var u=i.layout.getPositionsData();n.eles.nodes().positions(function(e,t){if(typeof e==`number`&&(e=t),!e.isParent()){for(var n=e.id(),r=u[n],i=e;r==null&&(r=u[i.data(`parent`)]||u[`DummyCompound_`+i.data(`parent`)],u[n]=r,i=i.parent()[0],i!=null););return r==null?{x:e.position(`x`),y:e.position(`y`)}:{x:r.x,y:r.y}}}),o(),t=requestAnimationFrame(a)};return r.addListener(`layoutstarted`,function(){i.options.animate===`during`&&(t=requestAnimationFrame(h))}),r.runLayout(),this.options.animate!==`during`&&(i.options.eles.nodes().not(`:parent`).layoutPositions(i,i.options,m),e=!1),this},f.prototype.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter(function(e,n){typeof e==`number`&&(e=n);for(var r=e.parent()[0];r!=null;){if(t[r.id()])return!1;r=r.parent()[0]}return!0})},f.prototype.processChildrenList=function(e,t,n){for(var r=t.length,i=0;i<r;i++){var a=t[i],o=a.children(),u,d=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(u=a.outerWidth()!=null&&a.outerHeight()!=null?e.add(new s(n.graphManager,new c(a.position(`x`)-d.w/2,a.position(`y`)-d.h/2),new l(parseFloat(d.w),parseFloat(d.h)))):e.add(new s(this.graphManager)),u.id=a.data(`id`),u.paddingLeft=parseInt(a.css(`padding`)),u.paddingTop=parseInt(a.css(`padding`)),u.paddingRight=parseInt(a.css(`padding`)),u.paddingBottom=parseInt(a.css(`padding`)),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var f=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,p=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,m=a.css(`text-halign`);u.labelWidth=f,u.labelHeight=p,u.labelPos=m}if(this.idToLNode[a.data(`id`)]=u,isNaN(u.rect.x)&&(u.rect.x=0),isNaN(u.rect.y)&&(u.rect.y=0),o!=null&&o.length>0){var h=n.getGraphManager().add(n.newGraph(),u);this.processChildrenList(h,o,n)}}},f.prototype.stop=function(){return this.stopped=!0,this};var m=function(e){e(`layout`,`cose-bilkent`,f)};typeof cytoscape<`u`&&m(cytoscape),e.exports=m})])})}))(),1);a.use(c.default);function l(e,t){e.forEach(e=>{let n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{[`id`,`label`,`height`,`width`,`padding`,`x`,`y`].includes(t)||(n[t]=e[t])}),t.add({group:`nodes`,data:n,position:{x:e.x??0,y:e.y??0}})})}r(l,`addNodes`);function u(e,t){e.forEach(e=>{let n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{[`id`,`start`,`end`].includes(t)||(n[t]=e[t])}),t.add({group:`edges`,data:n})})}r(u,`addEdges`);function d(e){return new Promise(t=>{let r=n(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),o=a({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`bezier`}}]});r.remove(),l(e.nodes,o),u(e.edges,o),o.nodes().forEach(function(e){e.layoutDimensions=()=>{let t=e.data();return{w:t.width,h:t.height}}}),o.layout({name:`cose-bilkent`,quality:`proof`,styleEnabled:!1,animate:!1}).run(),o.ready(e=>{i.info(`Cytoscape ready`,e),t(o)})})}r(d,`createCytoscapeInstance`);function f(e){return e.nodes().map(e=>{let t=e.data(),n=e.position(),r={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{e!==`id`&&(r[e]=t[e])}),r})}r(f,`extractPositionedNodes`);function p(e){return e.edges().map(e=>{let t=e.data(),n=e._private.rscratch,r={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{[`id`,`source`,`target`].includes(e)||(r[e]=t[e])}),r})}r(p,`extractPositionedEdges`);async function m(e,t){i.debug(`Starting cose-bilkent layout algorithm`);try{h(e);let t=await d(e),n=f(t),r=p(t);return i.debug(`Layout completed: ${n.length} nodes, ${r.length} edges`),{nodes:n,edges:r}}catch(e){throw i.error(`Error in cose-bilkent layout algorithm:`,e),e}}r(m,`executeCoseBilkentLayout`);function h(e){if(!e)throw Error(`Layout data is required`);if(!e.config)throw Error(`Configuration is required in layout data`);if(!e.rootNode)throw Error(`Root node is required`);if(!e.nodes||!Array.isArray(e.nodes))throw Error(`No nodes found in layout data`);if(!Array.isArray(e.edges))throw Error(`Edges array is required in layout data`);return!0}r(h,`validateLayoutData`);var g=r(async(e,t,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:c},{algorithm:l})=>{let u={},d={},f=t.select(`g`);a(f,e.markers,e.type,e.diagramId);let p=f.insert(`g`).attr(`class`,`subgraphs`),h=f.insert(`g`).attr(`class`,`edgePaths`),g=f.insert(`g`).attr(`class`,`edgeLabels`),_=f.insert(`g`).attr(`class`,`nodes`);s.debug(`Inserting nodes into DOM for dimension calculation`),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){let e={...t};d[t.id]=e,u[t.id]=e,await n(p,t)}else{let n={...t};u[t.id]=n;let r=await o(_,t,{config:e.config,dir:e.direction||`TB`}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`)}})),s.debug(`Running cose-bilkent layout algorithm`);let v=await m({...e,nodes:e.nodes.map(e=>{let t=u[e.id];return{...e,width:t.width,height:t.height}})},e.config);s.debug(`Positioning nodes based on layout results`),v.nodes.forEach(e=>{let t=u[e.id];t?.domId&&(t.domId.attr(`transform`,`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),v.edges.forEach(t=>{let n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),s.debug(`Inserting and positioning edges`),await Promise.all(e.edges.map(async t=>{await i(g,t);let n=u[t.start??``],a=u[t.end??``];if(n&&a){let i=v.edges.find(e=>e.id===t.id);if(i){s.debug(`APA01 positionedEdge`,i);let o={...t};c(o,r(h,o,d,e.type,n,a,e.diagramId))}else{let i={...t,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]};c(i,r(h,i,d,e.type,n,a,e.diagramId))}}})),s.debug(`Cose-bilkent rendering completed`)},`render`);export{g as render};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,At as t,C as n,D as r,E as i,Ft as a,It as o,Ot as s,Pt as c,S as l,_ as u,b as d,c as f,d as p,f as m,g as h,h as g,jt as _,k as v,m as y,p as b,s as ee,u as x,v as S,w as te,x as ne,y as re,zt as ie}from"./vendor-utils-CWelFt6C.js";import{t as C}from"./graphlib-BjOif-SH.js";var ae=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return w(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&w(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,oe)),n=n._prev;return`[`+e.join(`, `)+`]`}};function w(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function oe(e,t){if(e!==`_next`&&e!==`_prev`)return t}var se=e(1);function ce(e,t){if(e.nodeCount()<=1)return[];var n=ue(e,t||se);return _(o(le(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}function le(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)T(e,t,n,o);for(;o=i.dequeue();)T(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(T(e,t,n,o,!0));break}}}return r}function T(e,n,r,i,a){var o=a?[]:void 0;return t(e.inEdges(i.v),function(t){var i=e.edge(t),s=e.node(t.v);a&&o.push({v:t.v,w:t.w}),s.out-=i,E(n,r,s)}),t(e.outEdges(i.v),function(t){var i=e.edge(t),a=t.w,o=e.node(a);o.in-=i,E(n,r,o)}),e.removeNode(i.v),o}function ue(e,n){var r=new C,i=0,a=0;t(e.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),t(e.edges(),function(e){var t=r.edge(e.v,e.w)||0,o=n(e),s=t+o;r.setEdge(e.v,e.w,s),a=Math.max(a,r.node(e.v).out+=o),i=Math.max(i,r.node(e.w).in+=o)});var o=m(a+i+3).map(function(){return new ae}),s=i+1;return t(r.nodes(),function(e){E(o,s,r.node(e))}),{graph:r,buckets:o,zeroIdx:s}}function E(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function de(e){t(e.graph().acyclicer===`greedy`?ce(e,n(e)):fe(e),function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,f(`rev`))});function n(e){return function(t){return e.edge(t).weight}}}function fe(e){var n=[],r={},i={};function a(o){Object.prototype.hasOwnProperty.call(i,o)||(i[o]=!0,r[o]=!0,t(e.outEdges(o),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):a(e.w)}),delete r[o])}return t(e.nodes(),a),n}function pe(e){t(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function D(e,t,n,r){var i;do i=f(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function me(e){var n=new C().setGraph(e.graph());return t(e.nodes(),function(t){n.setNode(t,e.node(t))}),t(e.edges(),function(t){var r=n.edge(t.v,t.w)||{weight:0,minlen:1},i=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),n}function he(e){var n=new C({multigraph:e.isMultigraph()}).setGraph(e.graph());return t(e.nodes(),function(t){e.children(t).length||n.setNode(t,e.node(t))}),t(e.edges(),function(t){n.setEdge(t,e.edge(t))}),n}function ge(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function O(e){var n=o(m(A(e)+1),function(){return[]});return t(e.nodes(),function(t){var r=e.node(t),i=r.rank;u(i)||(n[i][r.order]=t)}),n}function _e(e){var n=c(o(e.nodes(),function(t){return e.node(t).rank}));t(e.nodes(),function(t){var r=e.node(t);re(r,`rank`)&&(r.rank-=n)})}function ve(e){var n=c(o(e.nodes(),function(t){return e.node(t).rank})),r=[];t(e.nodes(),function(t){var i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});var i=0,a=e.graph().nodeRankFactor;t(r,function(n,r){u(n)&&r%a!==0?--i:i&&t(n,function(t){e.node(t).rank+=i})})}function k(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),D(e,`border`,i,t)}function A(e){return g(o(e.nodes(),function(t){var n=e.node(t).rank;if(!u(n))return n}))}function ye(e,n){var r={lhs:[],rhs:[]};return t(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}function be(e,t){var n=i();try{return t()}finally{console.log(e+` time: `+(i()-n)+`ms`)}}function xe(e,t){return t()}function Se(e){function n(r){var i=e.children(r),a=e.node(r);if(i.length&&t(i,n),Object.prototype.hasOwnProperty.call(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,s=a.maxRank+1;o<s;++o)j(e,`borderLeft`,`_bl`,r,a,o),j(e,`borderRight`,`_br`,r,a,o)}}t(e.children(),n)}function j(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=D(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function Ce(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&M(e)}function we(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&Te(e),(t===`lr`||t===`rl`)&&(Ee(e),M(e))}function M(e){t(e.nodes(),function(t){N(e.node(t))}),t(e.edges(),function(t){N(e.edge(t))})}function N(e){var t=e.width;e.width=e.height,e.height=t}function Te(e){t(e.nodes(),function(t){P(e.node(t))}),t(e.edges(),function(n){var r=e.edge(n);t(r.points,P),Object.prototype.hasOwnProperty.call(r,`y`)&&P(r)})}function P(e){e.y=-e.y}function Ee(e){t(e.nodes(),function(t){F(e.node(t))}),t(e.edges(),function(n){var r=e.edge(n);t(r.points,F),Object.prototype.hasOwnProperty.call(r,`x`)&&F(r)})}function F(e){var t=e.x;e.x=e.y,e.y=t}function De(e){e.graph().dummyChains=[],t(e.edges(),function(t){Oe(e,t)})}function Oe(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=D(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function ke(e){t(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function I(e){var n={};function r(t){var i=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return i.rank;n[t]=!0;var a=c(o(e.outEdges(t),function(t){return r(t.w)-e.edge(t).minlen}));return(a===1/0||a==null)&&(a=0),i.rank=a}t(e.sources(),r)}function L(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function R(e){var t=new C({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;Ae(t,e)<r;)i=je(t,e),a=t.hasNode(i.v)?L(e,i):-L(e,i),Me(t,e,a);return t}function Ae(e,n){function r(i){t(n.nodeEdges(i),function(t){var a=t.v,o=i===a?t.w:a;!e.hasNode(o)&&!L(n,t)&&(e.setNode(o,{}),e.setEdge(i,o,{}),r(o))})}return t(e.nodes(),r),e.nodeCount()}function je(e,t){return y(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return L(t,n)})}function Me(e,n,r){t(e.nodes(),function(e){n.node(e).rank+=r})}e(1),e(1),Ne.CycleException=z;function Ne(e){var n={},r={},i=[];function a(o){if(Object.prototype.hasOwnProperty.call(r,o))throw new z;Object.prototype.hasOwnProperty.call(n,o)||(r[o]=!0,n[o]=!0,t(e.predecessors(o),a),delete r[o],i.push(o))}if(t(e.sinks(),a),p(n)!==e.nodeCount())throw new z;return i}function z(){}z.prototype=Error();function B(e,n,r){ie(n)||(n=[n]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],o={};return t(n,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);V(e,t,r===`post`,o,i,a)}),a}function V(e,n,r,i,a,o){Object.prototype.hasOwnProperty.call(i,n)||(i[n]=!0,r||o.push(n),t(a(n),function(t){V(e,t,r,i,a,o)}),r&&o.push(n))}function Pe(e,t){return B(e,t,`post`)}function Fe(e,t){return B(e,t,`pre`)}H.initLowLimValues=G,H.initCutValues=U,H.calcCutValue=W,H.leaveEdge=q,H.enterEdge=J,H.exchangeEdges=Y;function H(e){e=me(e),I(e);var t=R(e);G(t),U(t,e);for(var n,r;n=q(t);)r=J(t,e,n),Y(t,e,n,r)}function U(e,n){var r=Pe(e,e.nodes());r=r.slice(0,r.length-1),t(r,function(t){Ie(e,n,t)})}function Ie(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=W(e,t,n)}function W(e,n,r){var i=e.node(r).parent,a=!0,o=n.edge(r,i),s=0;return o||=(a=!1,n.edge(i,r)),s=o.weight,t(n.nodeEdges(r),function(t){var o=t.v===r,c=o?t.w:t.v;if(c!==i){var l=o===a,u=n.edge(t).weight;if(s+=l?u:-u,Re(e,r,c)){var d=e.edge(r,c).cutvalue;s+=l?-d:d}}}),s}function G(e,t){arguments.length<2&&(t=e.nodes()[0]),K(e,{},1,t)}function K(e,n,r,i,a){var o=r,s=e.node(i);return n[i]=!0,t(e.neighbors(i),function(t){Object.prototype.hasOwnProperty.call(n,t)||(r=K(e,n,r,t,i))}),s.low=o,s.lim=r++,a?s.parent=a:delete s.parent,r}function q(e){return l(e.edges(),function(t){return e.edge(t).cutvalue<0})}function J(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var o=e.node(r),s=e.node(i),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),y(a(t.edges(),function(t){return l===X(e,e.node(t.v),c)&&l!==X(e,e.node(t.w),c)}),function(e){return L(t,e)})}function Y(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),G(e),U(e,t),Le(e,t)}function Le(e,n){var r=Fe(e,l(e.nodes(),function(e){return!n.node(e).parent}));r=r.slice(1),t(r,function(t){var r=e.node(t).parent,i=n.edge(t,r),a=!1;i||(i=n.edge(r,t),a=!0),n.node(t).rank=n.node(r).rank+(a?i.minlen:-i.minlen)})}function Re(e,t,n){return e.hasEdge(t,n)}function X(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function ze(e){switch(e.graph().ranker){case`network-simplex`:Z(e);break;case`tight-tree`:Ve(e);break;case`longest-path`:Be(e);break;default:Z(e)}}var Be=I;function Ve(e){I(e),R(e)}function Z(e){H(e)}function He(e){var n=D(e,`root`,{},`_root`),r=We(e),i=g(S(r))-1,a=2*i+1;e.graph().nestingRoot=n,t(e.edges(),function(t){e.edge(t).minlen*=a});var o=Ge(e)+1;t(e.children(),function(t){Ue(e,n,a,o,i,r,t)}),e.graph().nodeRankFactor=a}function Ue(e,n,r,i,a,o,s){var c=e.children(s);if(!c.length){s!==n&&e.setEdge(n,s,{weight:0,minlen:r});return}var l=k(e,`_bt`),u=k(e,`_bb`),d=e.node(s);e.setParent(l,s),d.borderTop=l,e.setParent(u,s),d.borderBottom=u,t(c,function(t){Ue(e,n,r,i,a,o,t);var c=e.node(t),d=c.borderTop?c.borderTop:t,f=c.borderBottom?c.borderBottom:t,p=c.borderTop?i:2*i,m=d===f?a-o[s]+1:1;e.setEdge(l,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,u,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(s)||e.setEdge(n,l,{weight:0,minlen:a+o[s]})}function We(e){var n={};function r(i,a){var o=e.children(i);o&&o.length&&t(o,function(e){r(e,a+1)}),n[i]=a}return t(e.children(),function(e){r(e,1)}),n}function Ge(e){return s(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function Ke(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,t(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function qe(e,n,r){var i={},a;t(r,function(t){for(var r=e.parent(t),o,s;r;){if(o=e.parent(r),o?(s=i[o],i[o]=r):(s=a,a=r),s&&s!==r){n.setEdge(s,r);return}r=o}})}function Je(e,n,r){var i=Ye(e),a=new C({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(t){return e.node(t)});return t(e.nodes(),function(o){var s=e.node(o),c=e.parent(o);(s.rank===n||s.minRank<=n&&n<=s.maxRank)&&(a.setNode(o),a.setParent(o,c||i),t(e[r](o),function(t){var n=t.v===o?t.w:t.v,r=a.edge(n,o),i=u(r)?0:r.weight;a.setEdge(n,o,{weight:e.edge(t).weight+i})}),Object.prototype.hasOwnProperty.call(s,`minRank`)&&a.setNode(o,{borderLeft:s.borderLeft[n],borderRight:s.borderRight[n]}))}),a}function Ye(e){for(var t;e.hasNode(t=f(`_root`)););return t}function Xe(e,t){for(var n=0,r=1;r<t.length;++r)n+=Ze(e,t[r-1],t[r]);return n}function Ze(e,n,r){for(var i=ee(r,o(r,function(e,t){return t})),a=_(o(n,function(t){return x(o(e.outEdges(t),function(t){return{pos:i[t.w],weight:e.edge(t).weight}}),`pos`)})),s=1;s<r.length;)s<<=1;var c=2*s-1;--s;var l=o(Array(c),function(){return 0}),u=0;return t(a.forEach(function(e){var t=e.pos+s;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),t=t-1>>1,l[t]+=e.weight;u+=e.weight*n})),u}function Qe(e){var n={},r=a(e.nodes(),function(t){return!e.children(t).length}),i=o(m(g(o(r,function(t){return e.node(t).rank}))+1),function(){return[]});function s(r){re(n,r)||(n[r]=!0,i[e.node(r).rank].push(r),t(e.successors(r),s))}return t(x(r,function(t){return e.node(t).rank}),s),i}function $e(e,t){return o(t,function(t){var n=e.inEdges(t);if(n.length){var r=s(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}function et(e,n){var r={};return t(e,function(e,t){var n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};u(e.barycenter)||(n.barycenter=e.barycenter,n.weight=e.weight)}),t(n.edges(),function(e){var t=r[e.v],n=r[e.w];!u(t)&&!u(n)&&(n.indegree++,t.out.push(r[e.w]))}),tt(a(r,function(e){return!e.indegree}))}function tt(e){var n=[];function r(e){return function(t){t.merged||(u(t.barycenter)||u(e.barycenter)||t.barycenter>=e.barycenter)&&nt(e,t)}}function i(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var s=e.pop();n.push(s),t(s.in.reverse(),r(s)),t(s.out,i(s))}return o(a(n,function(e){return!e.merged}),function(e){return b(e,[`vs`,`i`,`barycenter`,`weight`])})}function nt(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function rt(e,n){var r=ye(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),i=r.lhs,a=x(r.rhs,function(e){return-e.i}),o=[],s=0,c=0,l=0;i.sort(at(!!n)),l=it(o,a,l),t(i,function(e){l+=e.vs.length,o.push(e.vs),s+=e.barycenter*e.weight,c+=e.weight,l=it(o,a,l)});var u={vs:_(o)};return c&&(u.barycenter=s/c,u.weight=c),u}function it(e,t,r){for(var i;t.length&&(i=n(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function at(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function ot(e,n,r,i){var o=e.children(n),s=e.node(n),c=s?s.borderLeft:void 0,l=s?s.borderRight:void 0,u={};c&&(o=a(o,function(e){return e!==c&&e!==l}));var d=$e(e,o);t(d,function(t){if(e.children(t.v).length){var n=ot(e,t.v,r,i);u[t.v]=n,Object.prototype.hasOwnProperty.call(n,`barycenter`)&&ct(t,n)}});var f=et(d,r);st(f,u);var p=rt(f,i);if(c&&(p.vs=_([c,p.vs,l]),e.predecessors(c).length)){var m=e.node(e.predecessors(c)[0]),h=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(p,`barycenter`)||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+m.order+h.order)/(p.weight+2),p.weight+=2}return p}function st(e,n){t(e,function(e){e.vs=_(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}function ct(e,t){u(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function lt(e){var t=A(e),n=ut(e,m(1,t+1),`inEdges`),i=ut(e,m(t-1,-1,-1),`outEdges`),a=Qe(e);ft(e,a);for(var o=1/0,s,c=0,l=0;l<4;++c,++l){dt(c%2?n:i,c%4>=2),a=O(e);var u=Xe(e,a);u<o&&(l=0,s=r(a),o=u)}ft(e,s)}function ut(e,t,n){return o(t,function(t){return Je(e,t,n)})}function dt(e,n){var r=new C;t(e,function(e){var i=e.graph().root,a=ot(e,i,r,n);t(a.vs,function(t,n){e.node(t).order=n}),qe(e,r,a.vs)})}function ft(e,n){t(n,function(n){t(n,function(t,n){e.node(t).order=n})})}function pt(e){var n=ht(e);t(e.graph().dummyChains,function(t){for(var r=e.node(t),i=r.edgeObj,a=mt(e,n,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;t!==i.w;){if(r=e.node(t),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(t,l),t=e.successors(t)[0]}})}function mt(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function ht(e){var n={},r=0;function i(a){var o=r;t(e.children(a),i),n[a]={low:o,lim:r++}}return t(e.children(),i),n}function gt(e,r){var i={};function a(r,a){var o=0,s=0,c=r.length,l=n(a);return t(a,function(n,r){var u=vt(e,n),d=u?e.node(u).order:c;(u||n===l)&&(t(a.slice(s,r+1),function(n){t(e.predecessors(n),function(t){var r=e.node(t),a=r.order;(a<o||d<a)&&!(r.dummy&&e.node(n).dummy)&&yt(i,t,n)})}),s=r+1,o=d)}),a}return s(r,a),i}function _t(e,n){var r={};function i(n,i,a,o,s){var c;t(m(i,a),function(i){c=n[i],e.node(c).dummy&&t(e.predecessors(c),function(t){var n=e.node(t);n.dummy&&(n.order<o||n.order>s)&&yt(r,t,c)})})}function a(n,r){var a=-1,o,s=0;return t(r,function(t,c){if(e.node(t).dummy===`border`){var l=e.predecessors(t);l.length&&(o=e.node(l[0]).order,i(r,s,c,a,o),s=c,a=o)}i(r,s,r.length,o,n.length)}),r}return s(n,a),r}function vt(e,t){if(e.node(t).dummy)return l(e.predecessors(t),function(t){return e.node(t).dummy})}function yt(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function bt(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function xt(e,n,r,i){var a={},o={},s={};return t(n,function(e){t(e,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),t(n,function(e){var n=-1;t(e,function(e){var t=i(e);if(t.length){t=x(t,function(e){return s[e]});for(var c=(t.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=t[l];o[e]===e&&n<s[d]&&!bt(r,e,d)&&(o[d]=e,o[e]=a[e]=a[d],n=s[d])}}})}),{root:a,align:o}}function St(e,n,r,i,a){var o={},s=Ct(e,n,r,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}function d(t){var n=s.outEdges(t).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=e.node(t);n!==1/0&&r.borderType!==c&&(o[t]=Math.max(o[t],n))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),t(i,function(e){o[e]=o[r[e]]}),o}function Ct(e,n,r,i){var a=new C,o=e.graph(),s=Ot(o.nodesep,o.edgesep,i);return t(n,function(n){var i;t(n,function(t){var n=r[t];if(a.setNode(n),i){var o=r[i],c=a.edge(o,n);a.setEdge(o,n,Math.max(s(e,t,i),c||0))}i=t})}),a}function wt(e,t){return y(S(t),function(t){var n=-1/0,r=1/0;return ne(t,function(t,i){var a=kt(e,i)/2;n=Math.max(t+a,n),r=Math.min(t-a,r)}),n-r})}function Tt(e,n){var r=S(n),i=c(r),a=g(r);t([`u`,`d`],function(r){t([`l`,`r`],function(t){var o=r+t,s=e[o],l;if(s!==n){var u=S(s);l=t===`l`?i-c(u):a-g(u),l&&(e[o]=h(s,function(e){return e+l}))}})})}function Et(e,t){return h(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=x(o(e,r));return(i[1]+i[2])/2})}function Dt(e){var n=O(e),r=v(gt(e,n),_t(e,n)),i={},a;return t([`u`,`d`],function(s){a=s===`u`?n:S(n).reverse(),t([`l`,`r`],function(t){t===`r`&&(a=o(a,function(e){return S(e).reverse()}));var n=(s===`u`?e.predecessors:e.successors).bind(e),c=xt(e,a,r,n),l=St(e,a,c.root,c.align,t===`r`);t===`r`&&(l=h(l,function(e){return-e})),i[s+t]=l})}),Tt(i,wt(e,i)),Et(i,e.graph().align)}function Ot(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function kt(e,t){return e.node(t).width}function At(e){e=he(e),jt(e),d(Dt(e),function(t,n){e.node(n).x=t})}function jt(e){var n=O(e),r=e.graph().ranksep,i=0;t(n,function(n){var a=g(o(n,function(t){return e.node(t).height}));t(n,function(t){e.node(t).y=i+a/2}),i+=a+r})}function Mt(e,t){var n=t&&t.debugTiming?be:xe;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>Ut(e));n(` runLayout`,()=>Nt(t,n)),n(` updateInputGraph`,()=>Pt(e,t))})}function Nt(e,t){t(` makeSpaceForEdgeLabels`,()=>Wt(e)),t(` removeSelfEdges`,()=>$t(e)),t(` acyclic`,()=>de(e)),t(` nestingGraph.run`,()=>He(e)),t(` rank`,()=>ze(he(e))),t(` injectEdgeLabelProxies`,()=>Gt(e)),t(` removeEmptyRanks`,()=>ve(e)),t(` nestingGraph.cleanup`,()=>Ke(e)),t(` normalizeRanks`,()=>_e(e)),t(` assignRankMinMax`,()=>Kt(e)),t(` removeEdgeLabelProxies`,()=>qt(e)),t(` normalize.run`,()=>De(e)),t(` parentDummyChains`,()=>pt(e)),t(` addBorderSegments`,()=>Se(e)),t(` order`,()=>lt(e)),t(` insertSelfEdges`,()=>en(e)),t(` adjustCoordinateSystem`,()=>Ce(e)),t(` position`,()=>At(e)),t(` positionSelfEdges`,()=>tn(e)),t(` removeBorderNodes`,()=>Qt(e)),t(` normalize.undo`,()=>ke(e)),t(` fixupEdgeLabelCoords`,()=>Xt(e)),t(` undoCoordinateSystem`,()=>we(e)),t(` translateGraph`,()=>Jt(e)),t(` assignNodeIntersects`,()=>Yt(e)),t(` reversePoints`,()=>Zt(e)),t(` acyclic.undo`,()=>pe(e))}function Pt(e,n){t(e.nodes(),function(t){var r=e.node(t),i=n.node(t);r&&(r.x=i.x,r.y=i.y,n.children(t).length&&(r.width=i.width,r.height=i.height))}),t(e.edges(),function(t){var r=e.edge(t),i=n.edge(t);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Ft=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],It={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Lt=[`acyclicer`,`ranker`,`rankdir`,`align`],Rt=[`width`,`height`],zt={width:0,height:0},Bt=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Vt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Ht=[`labelpos`];function Ut(e){var n=new C({multigraph:!0,compound:!0}),r=$(e.graph());return n.setGraph(v({},It,Q(r,Ft),b(r,Lt))),t(e.nodes(),function(t){var r=$(e.node(t));n.setNode(t,te(Q(r,Rt),zt)),n.setParent(t,e.parent(t))}),t(e.edges(),function(t){var r=$(e.edge(t));n.setEdge(t,v({},Vt,Q(r,Bt),b(r,Ht)))}),n}function Wt(e){var n=e.graph();n.ranksep/=2,t(e.edges(),function(t){var r=e.edge(t);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(n.rankdir===`TB`||n.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Gt(e){t(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);D(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function Kt(e){var n=0;t(e.nodes(),function(t){var r=e.node(t);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,n=g(n,r.maxRank))}),e.graph().maxRank=n}function qt(e){t(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function Jt(e){var n=1/0,r=0,i=1/0,a=0,o=e.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var t=e.x,o=e.y,s=e.width,c=e.height;n=Math.min(n,t-s/2),r=Math.max(r,t+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}t(e.nodes(),function(t){l(e.node(t))}),t(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),n-=s,i-=c,t(e.nodes(),function(t){var r=e.node(t);r.x-=n,r.y-=i}),t(e.edges(),function(r){var a=e.edge(r);t(a.points,function(e){e.x-=n,e.y-=i}),Object.prototype.hasOwnProperty.call(a,`x`)&&(a.x-=n),Object.prototype.hasOwnProperty.call(a,`y`)&&(a.y-=i)}),o.width=r-n+s,o.height=a-i+c}function Yt(e){t(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(ge(r,a)),n.points.push(ge(i,o))})}function Xt(e){t(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function Zt(e){t(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function Qt(e){t(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),i=e.node(r.borderTop),a=e.node(r.borderBottom),o=e.node(n(r.borderLeft)),s=e.node(n(r.borderRight));r.width=Math.abs(s.x-o.x),r.height=Math.abs(a.y-i.y),r.x=o.x+r.width/2,r.y=i.y+r.height/2}}),t(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function $t(e){t(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function en(e){t(O(e),function(n){var r=0;t(n,function(n,i){var a=e.node(n);a.order=i+r,t(a.selfEdges,function(t){D(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:a.rank,order:i+ ++r,e:t.e,label:t.label},`_se`)}),delete a.selfEdges})})}function tn(e){t(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function Q(e,t){return h(b(e,t),Number)}function $(e){var n={};return t(e,function(e,t){n[t.toLowerCase()]=e}),n}export{Mt as t};
|
|
1
|
+
import{A as e,At as t,C as n,D as r,E as i,Ft as a,It as o,Ot as s,Pt as c,S as l,_ as u,b as d,c as f,d as p,f as m,g as h,h as g,jt as _,k as v,m as y,p as b,s as ee,u as x,v as S,w as te,x as ne,y as re,zt as ie}from"./vendor-utils-IVTPs69f.js";import{t as C}from"./graphlib-CZk_Ii16.js";var ae=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return w(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&w(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,oe)),n=n._prev;return`[`+e.join(`, `)+`]`}};function w(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function oe(e,t){if(e!==`_next`&&e!==`_prev`)return t}var se=e(1);function ce(e,t){if(e.nodeCount()<=1)return[];var n=ue(e,t||se);return _(o(le(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}function le(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)T(e,t,n,o);for(;o=i.dequeue();)T(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(T(e,t,n,o,!0));break}}}return r}function T(e,n,r,i,a){var o=a?[]:void 0;return t(e.inEdges(i.v),function(t){var i=e.edge(t),s=e.node(t.v);a&&o.push({v:t.v,w:t.w}),s.out-=i,E(n,r,s)}),t(e.outEdges(i.v),function(t){var i=e.edge(t),a=t.w,o=e.node(a);o.in-=i,E(n,r,o)}),e.removeNode(i.v),o}function ue(e,n){var r=new C,i=0,a=0;t(e.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),t(e.edges(),function(e){var t=r.edge(e.v,e.w)||0,o=n(e),s=t+o;r.setEdge(e.v,e.w,s),a=Math.max(a,r.node(e.v).out+=o),i=Math.max(i,r.node(e.w).in+=o)});var o=m(a+i+3).map(function(){return new ae}),s=i+1;return t(r.nodes(),function(e){E(o,s,r.node(e))}),{graph:r,buckets:o,zeroIdx:s}}function E(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function de(e){t(e.graph().acyclicer===`greedy`?ce(e,n(e)):fe(e),function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,f(`rev`))});function n(e){return function(t){return e.edge(t).weight}}}function fe(e){var n=[],r={},i={};function a(o){Object.prototype.hasOwnProperty.call(i,o)||(i[o]=!0,r[o]=!0,t(e.outEdges(o),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):a(e.w)}),delete r[o])}return t(e.nodes(),a),n}function pe(e){t(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function D(e,t,n,r){var i;do i=f(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function me(e){var n=new C().setGraph(e.graph());return t(e.nodes(),function(t){n.setNode(t,e.node(t))}),t(e.edges(),function(t){var r=n.edge(t.v,t.w)||{weight:0,minlen:1},i=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),n}function he(e){var n=new C({multigraph:e.isMultigraph()}).setGraph(e.graph());return t(e.nodes(),function(t){e.children(t).length||n.setNode(t,e.node(t))}),t(e.edges(),function(t){n.setEdge(t,e.edge(t))}),n}function ge(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function O(e){var n=o(m(A(e)+1),function(){return[]});return t(e.nodes(),function(t){var r=e.node(t),i=r.rank;u(i)||(n[i][r.order]=t)}),n}function _e(e){var n=c(o(e.nodes(),function(t){return e.node(t).rank}));t(e.nodes(),function(t){var r=e.node(t);re(r,`rank`)&&(r.rank-=n)})}function ve(e){var n=c(o(e.nodes(),function(t){return e.node(t).rank})),r=[];t(e.nodes(),function(t){var i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});var i=0,a=e.graph().nodeRankFactor;t(r,function(n,r){u(n)&&r%a!==0?--i:i&&t(n,function(t){e.node(t).rank+=i})})}function k(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),D(e,`border`,i,t)}function A(e){return g(o(e.nodes(),function(t){var n=e.node(t).rank;if(!u(n))return n}))}function ye(e,n){var r={lhs:[],rhs:[]};return t(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}function be(e,t){var n=i();try{return t()}finally{console.log(e+` time: `+(i()-n)+`ms`)}}function xe(e,t){return t()}function Se(e){function n(r){var i=e.children(r),a=e.node(r);if(i.length&&t(i,n),Object.prototype.hasOwnProperty.call(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,s=a.maxRank+1;o<s;++o)j(e,`borderLeft`,`_bl`,r,a,o),j(e,`borderRight`,`_br`,r,a,o)}}t(e.children(),n)}function j(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=D(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function Ce(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&M(e)}function we(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&Te(e),(t===`lr`||t===`rl`)&&(Ee(e),M(e))}function M(e){t(e.nodes(),function(t){N(e.node(t))}),t(e.edges(),function(t){N(e.edge(t))})}function N(e){var t=e.width;e.width=e.height,e.height=t}function Te(e){t(e.nodes(),function(t){P(e.node(t))}),t(e.edges(),function(n){var r=e.edge(n);t(r.points,P),Object.prototype.hasOwnProperty.call(r,`y`)&&P(r)})}function P(e){e.y=-e.y}function Ee(e){t(e.nodes(),function(t){F(e.node(t))}),t(e.edges(),function(n){var r=e.edge(n);t(r.points,F),Object.prototype.hasOwnProperty.call(r,`x`)&&F(r)})}function F(e){var t=e.x;e.x=e.y,e.y=t}function De(e){e.graph().dummyChains=[],t(e.edges(),function(t){Oe(e,t)})}function Oe(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=D(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function ke(e){t(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function I(e){var n={};function r(t){var i=e.node(t);if(Object.prototype.hasOwnProperty.call(n,t))return i.rank;n[t]=!0;var a=c(o(e.outEdges(t),function(t){return r(t.w)-e.edge(t).minlen}));return(a===1/0||a==null)&&(a=0),i.rank=a}t(e.sources(),r)}function L(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function R(e){var t=new C({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;Ae(t,e)<r;)i=je(t,e),a=t.hasNode(i.v)?L(e,i):-L(e,i),Me(t,e,a);return t}function Ae(e,n){function r(i){t(n.nodeEdges(i),function(t){var a=t.v,o=i===a?t.w:a;!e.hasNode(o)&&!L(n,t)&&(e.setNode(o,{}),e.setEdge(i,o,{}),r(o))})}return t(e.nodes(),r),e.nodeCount()}function je(e,t){return y(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return L(t,n)})}function Me(e,n,r){t(e.nodes(),function(e){n.node(e).rank+=r})}e(1),e(1),Ne.CycleException=z;function Ne(e){var n={},r={},i=[];function a(o){if(Object.prototype.hasOwnProperty.call(r,o))throw new z;Object.prototype.hasOwnProperty.call(n,o)||(r[o]=!0,n[o]=!0,t(e.predecessors(o),a),delete r[o],i.push(o))}if(t(e.sinks(),a),p(n)!==e.nodeCount())throw new z;return i}function z(){}z.prototype=Error();function B(e,n,r){ie(n)||(n=[n]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],o={};return t(n,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);V(e,t,r===`post`,o,i,a)}),a}function V(e,n,r,i,a,o){Object.prototype.hasOwnProperty.call(i,n)||(i[n]=!0,r||o.push(n),t(a(n),function(t){V(e,t,r,i,a,o)}),r&&o.push(n))}function Pe(e,t){return B(e,t,`post`)}function Fe(e,t){return B(e,t,`pre`)}H.initLowLimValues=G,H.initCutValues=U,H.calcCutValue=W,H.leaveEdge=q,H.enterEdge=J,H.exchangeEdges=Y;function H(e){e=me(e),I(e);var t=R(e);G(t),U(t,e);for(var n,r;n=q(t);)r=J(t,e,n),Y(t,e,n,r)}function U(e,n){var r=Pe(e,e.nodes());r=r.slice(0,r.length-1),t(r,function(t){Ie(e,n,t)})}function Ie(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=W(e,t,n)}function W(e,n,r){var i=e.node(r).parent,a=!0,o=n.edge(r,i),s=0;return o||=(a=!1,n.edge(i,r)),s=o.weight,t(n.nodeEdges(r),function(t){var o=t.v===r,c=o?t.w:t.v;if(c!==i){var l=o===a,u=n.edge(t).weight;if(s+=l?u:-u,Re(e,r,c)){var d=e.edge(r,c).cutvalue;s+=l?-d:d}}}),s}function G(e,t){arguments.length<2&&(t=e.nodes()[0]),K(e,{},1,t)}function K(e,n,r,i,a){var o=r,s=e.node(i);return n[i]=!0,t(e.neighbors(i),function(t){Object.prototype.hasOwnProperty.call(n,t)||(r=K(e,n,r,t,i))}),s.low=o,s.lim=r++,a?s.parent=a:delete s.parent,r}function q(e){return l(e.edges(),function(t){return e.edge(t).cutvalue<0})}function J(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var o=e.node(r),s=e.node(i),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),y(a(t.edges(),function(t){return l===X(e,e.node(t.v),c)&&l!==X(e,e.node(t.w),c)}),function(e){return L(t,e)})}function Y(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),G(e),U(e,t),Le(e,t)}function Le(e,n){var r=Fe(e,l(e.nodes(),function(e){return!n.node(e).parent}));r=r.slice(1),t(r,function(t){var r=e.node(t).parent,i=n.edge(t,r),a=!1;i||(i=n.edge(r,t),a=!0),n.node(t).rank=n.node(r).rank+(a?i.minlen:-i.minlen)})}function Re(e,t,n){return e.hasEdge(t,n)}function X(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function ze(e){switch(e.graph().ranker){case`network-simplex`:Z(e);break;case`tight-tree`:Ve(e);break;case`longest-path`:Be(e);break;default:Z(e)}}var Be=I;function Ve(e){I(e),R(e)}function Z(e){H(e)}function He(e){var n=D(e,`root`,{},`_root`),r=We(e),i=g(S(r))-1,a=2*i+1;e.graph().nestingRoot=n,t(e.edges(),function(t){e.edge(t).minlen*=a});var o=Ge(e)+1;t(e.children(),function(t){Ue(e,n,a,o,i,r,t)}),e.graph().nodeRankFactor=a}function Ue(e,n,r,i,a,o,s){var c=e.children(s);if(!c.length){s!==n&&e.setEdge(n,s,{weight:0,minlen:r});return}var l=k(e,`_bt`),u=k(e,`_bb`),d=e.node(s);e.setParent(l,s),d.borderTop=l,e.setParent(u,s),d.borderBottom=u,t(c,function(t){Ue(e,n,r,i,a,o,t);var c=e.node(t),d=c.borderTop?c.borderTop:t,f=c.borderBottom?c.borderBottom:t,p=c.borderTop?i:2*i,m=d===f?a-o[s]+1:1;e.setEdge(l,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,u,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(s)||e.setEdge(n,l,{weight:0,minlen:a+o[s]})}function We(e){var n={};function r(i,a){var o=e.children(i);o&&o.length&&t(o,function(e){r(e,a+1)}),n[i]=a}return t(e.children(),function(e){r(e,1)}),n}function Ge(e){return s(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function Ke(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,t(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function qe(e,n,r){var i={},a;t(r,function(t){for(var r=e.parent(t),o,s;r;){if(o=e.parent(r),o?(s=i[o],i[o]=r):(s=a,a=r),s&&s!==r){n.setEdge(s,r);return}r=o}})}function Je(e,n,r){var i=Ye(e),a=new C({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(t){return e.node(t)});return t(e.nodes(),function(o){var s=e.node(o),c=e.parent(o);(s.rank===n||s.minRank<=n&&n<=s.maxRank)&&(a.setNode(o),a.setParent(o,c||i),t(e[r](o),function(t){var n=t.v===o?t.w:t.v,r=a.edge(n,o),i=u(r)?0:r.weight;a.setEdge(n,o,{weight:e.edge(t).weight+i})}),Object.prototype.hasOwnProperty.call(s,`minRank`)&&a.setNode(o,{borderLeft:s.borderLeft[n],borderRight:s.borderRight[n]}))}),a}function Ye(e){for(var t;e.hasNode(t=f(`_root`)););return t}function Xe(e,t){for(var n=0,r=1;r<t.length;++r)n+=Ze(e,t[r-1],t[r]);return n}function Ze(e,n,r){for(var i=ee(r,o(r,function(e,t){return t})),a=_(o(n,function(t){return x(o(e.outEdges(t),function(t){return{pos:i[t.w],weight:e.edge(t).weight}}),`pos`)})),s=1;s<r.length;)s<<=1;var c=2*s-1;--s;var l=o(Array(c),function(){return 0}),u=0;return t(a.forEach(function(e){var t=e.pos+s;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),t=t-1>>1,l[t]+=e.weight;u+=e.weight*n})),u}function Qe(e){var n={},r=a(e.nodes(),function(t){return!e.children(t).length}),i=o(m(g(o(r,function(t){return e.node(t).rank}))+1),function(){return[]});function s(r){re(n,r)||(n[r]=!0,i[e.node(r).rank].push(r),t(e.successors(r),s))}return t(x(r,function(t){return e.node(t).rank}),s),i}function $e(e,t){return o(t,function(t){var n=e.inEdges(t);if(n.length){var r=s(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}function et(e,n){var r={};return t(e,function(e,t){var n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};u(e.barycenter)||(n.barycenter=e.barycenter,n.weight=e.weight)}),t(n.edges(),function(e){var t=r[e.v],n=r[e.w];!u(t)&&!u(n)&&(n.indegree++,t.out.push(r[e.w]))}),tt(a(r,function(e){return!e.indegree}))}function tt(e){var n=[];function r(e){return function(t){t.merged||(u(t.barycenter)||u(e.barycenter)||t.barycenter>=e.barycenter)&&nt(e,t)}}function i(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var s=e.pop();n.push(s),t(s.in.reverse(),r(s)),t(s.out,i(s))}return o(a(n,function(e){return!e.merged}),function(e){return b(e,[`vs`,`i`,`barycenter`,`weight`])})}function nt(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function rt(e,n){var r=ye(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),i=r.lhs,a=x(r.rhs,function(e){return-e.i}),o=[],s=0,c=0,l=0;i.sort(at(!!n)),l=it(o,a,l),t(i,function(e){l+=e.vs.length,o.push(e.vs),s+=e.barycenter*e.weight,c+=e.weight,l=it(o,a,l)});var u={vs:_(o)};return c&&(u.barycenter=s/c,u.weight=c),u}function it(e,t,r){for(var i;t.length&&(i=n(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function at(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function ot(e,n,r,i){var o=e.children(n),s=e.node(n),c=s?s.borderLeft:void 0,l=s?s.borderRight:void 0,u={};c&&(o=a(o,function(e){return e!==c&&e!==l}));var d=$e(e,o);t(d,function(t){if(e.children(t.v).length){var n=ot(e,t.v,r,i);u[t.v]=n,Object.prototype.hasOwnProperty.call(n,`barycenter`)&&ct(t,n)}});var f=et(d,r);st(f,u);var p=rt(f,i);if(c&&(p.vs=_([c,p.vs,l]),e.predecessors(c).length)){var m=e.node(e.predecessors(c)[0]),h=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(p,`barycenter`)||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+m.order+h.order)/(p.weight+2),p.weight+=2}return p}function st(e,n){t(e,function(e){e.vs=_(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}function ct(e,t){u(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function lt(e){var t=A(e),n=ut(e,m(1,t+1),`inEdges`),i=ut(e,m(t-1,-1,-1),`outEdges`),a=Qe(e);ft(e,a);for(var o=1/0,s,c=0,l=0;l<4;++c,++l){dt(c%2?n:i,c%4>=2),a=O(e);var u=Xe(e,a);u<o&&(l=0,s=r(a),o=u)}ft(e,s)}function ut(e,t,n){return o(t,function(t){return Je(e,t,n)})}function dt(e,n){var r=new C;t(e,function(e){var i=e.graph().root,a=ot(e,i,r,n);t(a.vs,function(t,n){e.node(t).order=n}),qe(e,r,a.vs)})}function ft(e,n){t(n,function(n){t(n,function(t,n){e.node(t).order=n})})}function pt(e){var n=ht(e);t(e.graph().dummyChains,function(t){for(var r=e.node(t),i=r.edgeObj,a=mt(e,n,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;t!==i.w;){if(r=e.node(t),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(t,l),t=e.successors(t)[0]}})}function mt(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function ht(e){var n={},r=0;function i(a){var o=r;t(e.children(a),i),n[a]={low:o,lim:r++}}return t(e.children(),i),n}function gt(e,r){var i={};function a(r,a){var o=0,s=0,c=r.length,l=n(a);return t(a,function(n,r){var u=vt(e,n),d=u?e.node(u).order:c;(u||n===l)&&(t(a.slice(s,r+1),function(n){t(e.predecessors(n),function(t){var r=e.node(t),a=r.order;(a<o||d<a)&&!(r.dummy&&e.node(n).dummy)&&yt(i,t,n)})}),s=r+1,o=d)}),a}return s(r,a),i}function _t(e,n){var r={};function i(n,i,a,o,s){var c;t(m(i,a),function(i){c=n[i],e.node(c).dummy&&t(e.predecessors(c),function(t){var n=e.node(t);n.dummy&&(n.order<o||n.order>s)&&yt(r,t,c)})})}function a(n,r){var a=-1,o,s=0;return t(r,function(t,c){if(e.node(t).dummy===`border`){var l=e.predecessors(t);l.length&&(o=e.node(l[0]).order,i(r,s,c,a,o),s=c,a=o)}i(r,s,r.length,o,n.length)}),r}return s(n,a),r}function vt(e,t){if(e.node(t).dummy)return l(e.predecessors(t),function(t){return e.node(t).dummy})}function yt(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function bt(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function xt(e,n,r,i){var a={},o={},s={};return t(n,function(e){t(e,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),t(n,function(e){var n=-1;t(e,function(e){var t=i(e);if(t.length){t=x(t,function(e){return s[e]});for(var c=(t.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=t[l];o[e]===e&&n<s[d]&&!bt(r,e,d)&&(o[d]=e,o[e]=a[e]=a[d],n=s[d])}}})}),{root:a,align:o}}function St(e,n,r,i,a){var o={},s=Ct(e,n,r,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}function d(t){var n=s.outEdges(t).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=e.node(t);n!==1/0&&r.borderType!==c&&(o[t]=Math.max(o[t],n))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),t(i,function(e){o[e]=o[r[e]]}),o}function Ct(e,n,r,i){var a=new C,o=e.graph(),s=Ot(o.nodesep,o.edgesep,i);return t(n,function(n){var i;t(n,function(t){var n=r[t];if(a.setNode(n),i){var o=r[i],c=a.edge(o,n);a.setEdge(o,n,Math.max(s(e,t,i),c||0))}i=t})}),a}function wt(e,t){return y(S(t),function(t){var n=-1/0,r=1/0;return ne(t,function(t,i){var a=kt(e,i)/2;n=Math.max(t+a,n),r=Math.min(t-a,r)}),n-r})}function Tt(e,n){var r=S(n),i=c(r),a=g(r);t([`u`,`d`],function(r){t([`l`,`r`],function(t){var o=r+t,s=e[o],l;if(s!==n){var u=S(s);l=t===`l`?i-c(u):a-g(u),l&&(e[o]=h(s,function(e){return e+l}))}})})}function Et(e,t){return h(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=x(o(e,r));return(i[1]+i[2])/2})}function Dt(e){var n=O(e),r=v(gt(e,n),_t(e,n)),i={},a;return t([`u`,`d`],function(s){a=s===`u`?n:S(n).reverse(),t([`l`,`r`],function(t){t===`r`&&(a=o(a,function(e){return S(e).reverse()}));var n=(s===`u`?e.predecessors:e.successors).bind(e),c=xt(e,a,r,n),l=St(e,a,c.root,c.align,t===`r`);t===`r`&&(l=h(l,function(e){return-e})),i[s+t]=l})}),Tt(i,wt(e,i)),Et(i,e.graph().align)}function Ot(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function kt(e,t){return e.node(t).width}function At(e){e=he(e),jt(e),d(Dt(e),function(t,n){e.node(n).x=t})}function jt(e){var n=O(e),r=e.graph().ranksep,i=0;t(n,function(n){var a=g(o(n,function(t){return e.node(t).height}));t(n,function(t){e.node(t).y=i+a/2}),i+=a+r})}function Mt(e,t){var n=t&&t.debugTiming?be:xe;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>Ut(e));n(` runLayout`,()=>Nt(t,n)),n(` updateInputGraph`,()=>Pt(e,t))})}function Nt(e,t){t(` makeSpaceForEdgeLabels`,()=>Wt(e)),t(` removeSelfEdges`,()=>$t(e)),t(` acyclic`,()=>de(e)),t(` nestingGraph.run`,()=>He(e)),t(` rank`,()=>ze(he(e))),t(` injectEdgeLabelProxies`,()=>Gt(e)),t(` removeEmptyRanks`,()=>ve(e)),t(` nestingGraph.cleanup`,()=>Ke(e)),t(` normalizeRanks`,()=>_e(e)),t(` assignRankMinMax`,()=>Kt(e)),t(` removeEdgeLabelProxies`,()=>qt(e)),t(` normalize.run`,()=>De(e)),t(` parentDummyChains`,()=>pt(e)),t(` addBorderSegments`,()=>Se(e)),t(` order`,()=>lt(e)),t(` insertSelfEdges`,()=>en(e)),t(` adjustCoordinateSystem`,()=>Ce(e)),t(` position`,()=>At(e)),t(` positionSelfEdges`,()=>tn(e)),t(` removeBorderNodes`,()=>Qt(e)),t(` normalize.undo`,()=>ke(e)),t(` fixupEdgeLabelCoords`,()=>Xt(e)),t(` undoCoordinateSystem`,()=>we(e)),t(` translateGraph`,()=>Jt(e)),t(` assignNodeIntersects`,()=>Yt(e)),t(` reversePoints`,()=>Zt(e)),t(` acyclic.undo`,()=>pe(e))}function Pt(e,n){t(e.nodes(),function(t){var r=e.node(t),i=n.node(t);r&&(r.x=i.x,r.y=i.y,n.children(t).length&&(r.width=i.width,r.height=i.height))}),t(e.edges(),function(t){var r=e.edge(t),i=n.edge(t);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Ft=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],It={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},Lt=[`acyclicer`,`ranker`,`rankdir`,`align`],Rt=[`width`,`height`],zt={width:0,height:0},Bt=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Vt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Ht=[`labelpos`];function Ut(e){var n=new C({multigraph:!0,compound:!0}),r=$(e.graph());return n.setGraph(v({},It,Q(r,Ft),b(r,Lt))),t(e.nodes(),function(t){var r=$(e.node(t));n.setNode(t,te(Q(r,Rt),zt)),n.setParent(t,e.parent(t))}),t(e.edges(),function(t){var r=$(e.edge(t));n.setEdge(t,v({},Vt,Q(r,Bt),b(r,Ht)))}),n}function Wt(e){var n=e.graph();n.ranksep/=2,t(e.edges(),function(t){var r=e.edge(t);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(n.rankdir===`TB`||n.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Gt(e){t(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);D(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function Kt(e){var n=0;t(e.nodes(),function(t){var r=e.node(t);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,n=g(n,r.maxRank))}),e.graph().maxRank=n}function qt(e){t(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function Jt(e){var n=1/0,r=0,i=1/0,a=0,o=e.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var t=e.x,o=e.y,s=e.width,c=e.height;n=Math.min(n,t-s/2),r=Math.max(r,t+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}t(e.nodes(),function(t){l(e.node(t))}),t(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),n-=s,i-=c,t(e.nodes(),function(t){var r=e.node(t);r.x-=n,r.y-=i}),t(e.edges(),function(r){var a=e.edge(r);t(a.points,function(e){e.x-=n,e.y-=i}),Object.prototype.hasOwnProperty.call(a,`x`)&&(a.x-=n),Object.prototype.hasOwnProperty.call(a,`y`)&&(a.y-=i)}),o.width=r-n+s,o.height=a-i+c}function Yt(e){t(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(ge(r,a)),n.points.push(ge(i,o))})}function Xt(e){t(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function Zt(e){t(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function Qt(e){t(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),i=e.node(r.borderTop),a=e.node(r.borderBottom),o=e.node(n(r.borderLeft)),s=e.node(n(r.borderRight));r.width=Math.abs(s.x-o.x),r.height=Math.abs(a.y-i.y),r.x=o.x+r.width/2,r.y=i.y+r.height/2}}),t(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function $t(e){t(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function en(e){t(O(e),function(n){var r=0;t(n,function(n,i){var a=e.node(n);a.order=i+r,t(a.selfEdges,function(t){D(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:a.rank,order:i+ ++r,e:t.e,label:t.label},`_se`)}),delete a.selfEdges})})}function tn(e){t(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function Q(e,t){return h(b(e,t),Number)}function $(e){var n={};return t(e,function(e,t){n[t.toLowerCase()]=e}),n}export{Mt as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{It as e,O as t,_ as n}from"./vendor-utils-
|
|
1
|
+
import{It as e,O as t,_ as n}from"./vendor-utils-IVTPs69f.js";import{n as r,r as i}from"./chunk-AGHRB4JF-DIMn8T3_.js";import{b as a}from"./chunk-ICPOFSXX-P6V6jqiT.js";import"./chunk-5PVQY5BW-otv3HwE_.js";import"./chunk-U2HBQHQK-Ny6UwUgK.js";import"./chunk-BSJP7CBP-DnSYKjii.js";import{n as o}from"./chunk-ZZ45TVLE-D5oxCC1O.js";import{t as s}from"./graphlib-CZk_Ii16.js";import"./chunk-X2U36JSP-CoMFMVNF.js";import{a as c,c as l,i as u,l as d,n as f,t as p,u as m}from"./chunk-5FUZZQ4R-Cg1pzs6p.js";import{a as h,i as g,n as _,r as v,t as y}from"./chunk-ENJZ2VHE-PT_jAckw.js";import{t as b}from"./dagre--20B2-ZQ.js";function x(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:S(e),edges:C(e)};return n(e.graph())||(r.value=t(e.graph())),r}function S(t){return e(t.nodes(),function(e){var r=t.node(e),i=t.parent(e),a={v:e};return n(r)||(a.value=r),n(i)||(a.parent=i),a})}function C(t){return e(t.edges(),function(e){var r=t.edge(e),i={v:e.v,w:e.w};return n(e.name)||(i.name=e.name),n(r)||(i.value=r),i})}var w=new Map,T=new Map,E=new Map,D=r(()=>{T.clear(),E.clear(),w.clear()},`clear`),O=r((e,t)=>{let n=T.get(t)||[];return i.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),k=r((e,t)=>{let n=T.get(t)||[];return i.info(`Descendants of `,t,` is `,n),i.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),A=r((e,t,n,r)=>{i.warn(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let a=t.children(e)||[];e!==r&&a.push(e),i.warn(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(t.children(a).length>0)A(a,t,n,r);else{let o=t.node(a);i.info(`cp `,a,` to `,r,` with parent `,e),n.setNode(a,o),r!==t.parent(a)&&(i.warn(`Setting parent`,a,t.parent(a)),n.setParent(a,t.parent(a))),e!==r&&a!==e?(i.debug(`Setting parent`,a,e),n.setParent(a,e)):(i.info(`In copy `,e,`root`,r,`data`,t.node(e),r),i.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==r,`node!==clusterId`,a!==e));let s=t.edges(a);i.debug(`Copying Edges`,s),s.forEach(a=>{i.info(`Edge`,a);let o=t.edge(a.v,a.w,a.name);i.info(`Edge data`,o,r);try{k(a,r)?(i.info(`Copying as `,a.v,a.w,o,a.name),n.setEdge(a.v,a.w,o,a.name),i.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):i.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,r,` clusterId:`,e)}catch(e){i.error(e)}})}i.debug(`Removing node`,a),t.removeNode(a)})},`copy`),j=r((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)E.set(i,e),r=[...r,...j(i,t)];return r},`extractDescendants`),M=r((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),N=r((e,t,n)=>{let r=t.children(e);if(i.trace(`Searching children of id `,e,r),r.length<1)return e;let a;for(let e of r){let r=N(e,t,n),i=M(t,n,r);if(r)if(i.length>0)a=r;else return r}return a},`findNonClusterChild`),P=r(e=>!w.has(e)||!w.get(e).externalConnections?e:w.has(e)?w.get(e).id:e,`getAnchorId`),F=r((e,t)=>{if(!e||t>10){i.debug(`Opting out, no graph `);return}else i.debug(`Opting in, graph `);e.nodes().forEach(function(t){e.children(t).length>0&&(i.warn(`Cluster identified`,t,` Replacement id in edges: `,N(t,e,t)),T.set(t,j(t,e)),w.set(t,{id:N(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(i.debug(`Cluster identified`,t,T),r.forEach(e=>{O(e.v,t)^O(e.w,t)&&(i.warn(`Edge: `,e,` leaves cluster `,t),i.warn(`Descendants of XXX `,t,`: `,T.get(t)),w.get(t).externalConnections=!0)})):i.debug(`Not a cluster `,t,T)});for(let t of w.keys()){let n=w.get(t).id,r=e.parent(n);r!==t&&w.has(r)&&!w.get(r).externalConnections&&(w.get(t).id=r)}e.edges().forEach(function(t){let n=e.edge(t);i.warn(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),i.warn(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,a=t.w;if(i.warn(`Fix XXX`,w,`ids:`,t.v,t.w,`Translating: `,w.get(t.v),` --- `,w.get(t.w)),w.get(t.v)||w.get(t.w)){if(i.warn(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=P(t.v),a=P(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);w.get(i).externalConnections=!0,n.fromCluster=t.v}if(a!==t.w){let r=e.parent(a);w.get(r).externalConnections=!0,n.toCluster=t.w}i.warn(`Fix Replacing with XXX`,r,a,t.name),e.setEdge(r,a,n,t.name)}}),i.warn(`Adjusted Graph`,x(e)),I(e,0),i.trace(w)},`adjustClustersAndEdges`),I=r((e,t)=>{if(i.warn(`extractor - `,t,x(e),e.children(`D`)),t>10){i.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r||=n.length>0}if(!r){i.debug(`Done, no node has children`,e.nodes());return}i.debug(`Nodes = `,n,t);for(let r of n)if(i.debug(`Extracting node`,r,w,w.has(r)&&!w.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!w.has(r))i.debug(`Not a cluster`,r,t);else if(!w.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;w.get(r)?.clusterData?.dir&&(n=w.get(r).clusterData.dir,i.warn(`Fixing dir`,w.get(r).clusterData.dir,n));let a=new s({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn(`Old graph before copy`,x(e)),A(r,e,a,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:w.get(r).clusterData,label:w.get(r).label,graph:a}),i.warn(`New graph after copy node: (`,r,`)`,x(a)),i.debug(`Old graph after copy`,x(e))}else i.warn(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!w.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),i.debug(w);n=e.nodes(),i.warn(`New list of nodes`,n);for(let r of n){let n=e.node(r);i.warn(` Now next level`,r,n),n?.clusterNode&&I(n.graph,t+1)}},`extractor`),L=r((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=L(e,e.children(t));n=[...n,...r]}),n},`sorter`),R=r(e=>L(e,e.children()),`sortNodesByHierarchy`),z=r(async(e,t,n,a,s,f)=>{i.warn(`Graph in recursive render:XAX`,x(t),s);let p=t.graph().rankdir;i.trace(`Dir in recursive render - dir:`,p);let g=e.insert(`g`).attr(`class`,`root`);t.nodes()?i.info(`Recursive render XXX`,t.nodes()):i.info(`No nodes found for`,t),t.edges().length>0&&i.info(`Recursive edges`,t.edge(t.edges()[0]));let y=g.insert(`g`).attr(`class`,`clusters`),S=g.insert(`g`).attr(`class`,`edgePaths`),C=g.insert(`g`).attr(`class`,`edgeLabels`),T=g.insert(`g`).attr(`class`,`nodes`);await Promise.all(t.nodes().map(async function(e){let r=t.node(e);if(s!==void 0){let n=JSON.parse(JSON.stringify(s.clusterData));i.trace(`Setting data for parent cluster XXX
|
|
2
2
|
Node.id = `,e,`
|
|
3
3
|
data=`,n.height,`
|
|
4
4
|
Parent cluster`,s.height),t.setNode(s.id,n),t.parent(e)||(i.trace(`Setting parent`,e,s.id),t.setParent(e,s.id,n))}if(i.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(t.node(e))),r?.clusterNode){i.info(`Cluster identified XBX`,e,r.width,t.node(e));let{ranksep:o,nodesep:s}=t.graph();r.graph.setGraph({...r.graph.graph(),ranksep:o+25,nodesep:s});let c=await z(T,r.graph,n,a,t.node(e),f),l=c.elem;m(r,l),r.diff=c.diff||0,i.info(`New compound node after recursive render XAX`,e,`width`,r.width,`height`,r.height),d(l,r)}else t.children(e).length>0?(i.trace(`Cluster - the non recursive path XBX`,e,r.id,r,r.width,`Graph:`,t),i.trace(N(r.id,t)),w.set(r.id,{id:N(r.id,t),node:r})):(i.trace(`Node - the non recursive path XAX`,e,T,t.node(e),p),await c(T,t.node(e),{config:f,dir:p}))})),await r(async()=>{let e=t.edges().map(async function(e){let n=t.edge(e.v,e.w,e.name);i.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),i.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(t.edge(e))),i.info(`Fix`,w,`ids:`,e.v,e.w,`Translating: `,w.get(e.v),w.get(e.w)),await v(C,n)});await Promise.all(e)},`processEdges`)(),i.info(`Graph before layout:`,JSON.stringify(x(t))),i.info(`############################################# XXX`),i.info(`### Layout ### XXX`),i.info(`############################################# XXX`),b(t),i.info(`Graph after layout:`,JSON.stringify(x(t)));let E=0,{subGraphTitleTotalMargin:D}=o(f);return await Promise.all(R(t).map(async function(e){let n=t.node(e);if(i.info(`Position XBX => `+e+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=D,i.info(`A tainted cluster node XBX1`,e,n.id,n.width,n.height,n.x,n.y,t.parent(e)),w.get(n.id).node=n,l(n);else if(t.children(e).length>0){i.info(`A pure cluster node XBX1`,e,n.id,n.x,n.y,n.width,n.height,t.parent(e)),n.height+=D,t.node(n.parentId);let r=n?.padding/2||0,a=n?.labelBBox?.height||0,o=a-r||0;i.debug(`OffsetY`,o,`labelHeight`,a,`halfPadding`,r),await u(y,n),w.get(n.id).node=n}else{let e=t.node(n.parentId);n.y+=D/2,i.info(`A regular node XBX1 - using the padding`,n.id,`parent`,n.parentId,n.width,n.height,n.x,n.y,`offsetY`,n.offsetY,`parent`,e,e?.offsetY,n),l(n)}})),t.edges().forEach(function(e){let r=t.edge(e);i.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(r),r),r.points.forEach(e=>e.y+=D/2),h(r,_(S,r,w,n,t.node(e.v),t.node(e.w),a))}),t.nodes().forEach(function(e){let n=t.node(e);i.info(e,n.type,n.diff),n.isGroup&&(E=n.diff)}),i.warn(`Returning from recursive render XAX`,g,E),{elem:g,diff:E}},`recursiveRender`),B=r(async(e,t)=>{let n=new s({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=t.select(`g`);g(r,e.markers,e.type,e.diagramId),f(),y(),p(),D(),e.nodes.forEach(e=>{n.setNode(e.id,{...e}),e.parentId&&n.setParent(e.id,e.parentId)}),i.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,r=t+`---`+t+`---1`,i=t+`---`+t+`---2`,a=n.node(t);n.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),n.setParent(r,a.parentId),n.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),n.setParent(i,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e);o.label=``,o.arrowTypeEnd=`none`,o.id=t+`-cyclic-special-1`,s.arrowTypeStart=`none`,s.arrowTypeEnd=`none`,s.id=t+`-cyclic-special-mid`,c.label=``,a.isGroup&&(o.fromCluster=t,c.toCluster=t),c.id=t+`-cyclic-special-2`,c.arrowTypeStart=`none`,n.setEdge(t,r,o,t+`-cyclic-special-0`),n.setEdge(r,i,s,t+`-cyclic-special-1`),n.setEdge(i,t,c,t+`-cyc<lic-special-2`)}else n.setEdge(e.start,e.end,{...e},e.id)}),i.warn(`Graph at first:`,JSON.stringify(x(n))),F(n),i.warn(`Graph after XAX:`,JSON.stringify(x(n)));let o=a();await z(r,n,e.type,e.diagramId,void 0,o)},`render`);export{B as render};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./chunk-AGHRB4JF-
|
|
1
|
+
import{n as e,r as t}from"./chunk-AGHRB4JF-DIMn8T3_.js";import{B as n,C as r,V as i,W as a,_ as o,a as s,c,d as l,v as u,y as d}from"./chunk-ICPOFSXX-P6V6jqiT.js";import{t as f}from"./chunk-426QAEUC-atJRhvKN.js";import{r as p}from"./chunk-5PVQY5BW-otv3HwE_.js";import{t as m}from"./chunk-4BX2VUAB-Cm3KqBkS.js";import{t as h}from"./mermaid-parser.core-CMIZ0my_.js";import{t as g}from"./chunk-QZHKN3VN-BkVLii_3.js";var _=new g(()=>({cnt:1,stack:[{id:0,level:-1,name:`/`,children:[]}]})),v=e(()=>{_.reset(),s()},`clear`),y=e(()=>_.records.stack[0],`getRoot`),b=e(()=>_.records.cnt,`getCount`),x=l.treeView,S={clear:v,addNode:e((e,t)=>{for(;e<=_.records.stack[_.records.stack.length-1].level;)_.records.stack.pop();let n={id:_.records.cnt++,level:e,name:t,children:[]};_.records.stack[_.records.stack.length-1].children.push(n),_.records.stack.push(n)},`addNode`),getRoot:y,getCount:b,getConfig:e(()=>p(x,d().treeView),`getConfig`),getAccTitle:u,getAccDescription:o,getDiagramTitle:r,setAccDescription:n,setAccTitle:i,setDiagramTitle:a},C=e(e=>{m(e,S),e.nodes.map(e=>S.addNode(e.indent?parseInt(e.indent):0,e.name))},`populate`),w={parse:e(async e=>{let n=await h(`treeView`,e);t.debug(n),C(n)},`parse`)},T=e((e,t,n,r,i)=>{let a=r.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-label`),{height:o,width:s}=a.node().getBBox(),c=o+i.paddingY*2,l=s+i.paddingX*2;a.attr(`x`,e+i.paddingX),a.attr(`y`,t+c/2),n.BBox={x:e,y:t,width:l,height:c}},`positionLabel`),E=e((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),D=e((t,n,r)=>{let i=0,a=0,o=e((e,t,n,r)=>{let o=r*(n.rowIndent+n.paddingX);T(o,i,t,e,n);let{height:s,width:c}=t.BBox;E(e,o-n.rowIndent,i+s/2,o,i+s/2,n.lineThickness),a=Math.max(a,o+c),i+=s},`drawNode`),s=e((e,n=0)=>{o(t,e,r,n),e.children.forEach(e=>{s(e,n+1)});let{x:i,y:a,height:c}=e.BBox;if(e.children.length){let{y:n,height:o}=e.children[e.children.length-1].BBox;E(t,i+r.paddingX,a+c,i+r.paddingX,n+o/2+r.lineThickness/2,r.lineThickness)}},`processNode`);return s(n),{totalHeight:i,totalWidth:a}},`drawTree`),O={draw:e((e,n,r,i)=>{t.debug(`Rendering treeView diagram
|
|
2
2
|
`+e);let a=i.db,o=a.getRoot(),s=a.getConfig(),l=f(n),u=l.append(`g`);u.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:p}=D(u,o,s);l.attr(`viewBox`,`-${s.lineThickness/2} 0 ${p} ${d}`),c(l,d,p,s.useMaxWidth)},`draw`)},k={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`},A={db:S,renderer:O,parser:w,styles:e(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r}=p(k,e);return`
|
|
3
3
|
.treeView-node-label {
|
|
4
4
|
font-size: ${t};
|