@cardstack/boxel-cli 0.3.2-unstable.59 → 0.3.2-unstable.60
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/api.ts +3 -3
- package/bundled-realms/base/command.gts +73 -0
- package/bundled-test-harness/assets/adapter-TgpmkD23.js +2 -0
- package/bundled-test-harness/assets/add-field-to-card-definition-command-test-BVVD6_Wq.js +111 -0
- package/bundled-test-harness/assets/add-workspace-test-BvvYJ2Fk.js +71 -0
- package/bundled-test-harness/assets/ai-assistant-Ba_RBqf6.js +129 -0
- package/bundled-test-harness/assets/ai-assistant-panel-service-test-DK87n1hh.js +95 -0
- package/bundled-test-harness/assets/ai-assistant-test-CZATBlJS.js +2137 -0
- package/bundled-test-harness/assets/ai-function-generation-test-e58MHziu.js +996 -0
- package/bundled-test-harness/assets/ai-module-creation-test-CEieL3Fa.js +150 -0
- package/bundled-test-harness/assets/aibot-message-DhTbAqNk.js +1185 -0
- package/bundled-test-harness/assets/amd-transpile-test-CSk5COu7.js +425 -0
- package/bundled-test-harness/assets/app-Btfy4HWI.js +21464 -0
- package/bundled-test-harness/assets/apply-boxel-formatting-test-BHTP9NBp.js +134 -0
- package/bundled-test-harness/assets/apply-markdown-edit-test-BETCndeK.js +230 -0
- package/bundled-test-harness/assets/apply-search-replace-block-test-KNolar0-.js +630 -0
- package/bundled-test-harness/assets/arc-CA8yZ0zo.js +199 -0
- package/bundled-test-harness/assets/architecture-7EHR7CIX-C5JFMGdb.js +3 -0
- package/bundled-test-harness/assets/architectureDiagram-3BPJPVTR-CmVPjKgm.js +7400 -0
- package/bundled-test-harness/assets/auth-error-guard-test-D0rKESg_.js +30 -0
- package/bundled-test-harness/assets/auth-service-worker-test-DGg_vbKo.js +538 -0
- package/bundled-test-harness/assets/authed-fetch-test-CHF3eh_H.js +75 -0
- package/bundled-test-harness/assets/avif-image-def-test-p9tiyh4_.js +186 -0
- package/bundled-test-harness/assets/base-realm-Chjzrp6m.js +2 -0
- package/bundled-test-harness/assets/base-realm-DpSTsZxD.js +140 -0
- package/bundled-test-harness/assets/basic-test-D7qEz4hw.js +128 -0
- package/bundled-test-harness/assets/bfm-card-references-test-D-m1YnL8.js +577 -0
- package/bundled-test-harness/assets/binary-upload-dedupe-test-8RKK73EG.js +308 -0
- package/bundled-test-harness/assets/blockDiagram-GPEHLZMM-BdVFTa2C.js +4355 -0
- package/bundled-test-harness/assets/bot-registration-test-9zYny2wR.js +99 -0
- package/bundled-test-harness/assets/box-test-0T92xi3A.js +51 -0
- package/bundled-test-harness/assets/brand-guide-attachments-test-5ZtPn4cC.js +87 -0
- package/bundled-test-harness/assets/brand-guide-custom-css-test-CKKSgKyp.js +135 -0
- package/bundled-test-harness/assets/brand-logo-mark-field-test-nlNNQ3rw.js +87 -0
- package/bundled-test-harness/assets/broken-link-template-test-BGIExVof.js +345 -0
- package/bundled-test-harness/assets/browser-index-BaR-gTqG.js +3 -0
- package/bundled-test-harness/assets/browser-index-G4NKYBAj.js +8802 -0
- package/bundled-test-harness/assets/c4Diagram-AAUBKEIU-DyugX7zz.js +3764 -0
- package/bundled-test-harness/assets/cached-fetch-test-MtqvDphJ.js +93 -0
- package/bundled-test-harness/assets/can-read-realm-test-BZmwIOqS.js +58 -0
- package/bundled-test-harness/assets/cancel-indexing-job-test-BsQtQbDu.js +71 -0
- package/bundled-test-harness/assets/card-api-test-BxQ8f0-c.js +196 -0
- package/bundled-test-harness/assets/card-basics-test-B-uBZ8o4.js +4895 -0
- package/bundled-test-harness/assets/card-catalog-test-YmwmyIKf.js +377 -0
- package/bundled-test-harness/assets/card-copy-test-LoqdH1CQ.js +777 -0
- package/bundled-test-harness/assets/card-def-field-def-relationships-test-DvtBA1jv.js +560 -0
- package/bundled-test-harness/assets/card-def-menu-items-test-DHnd0LuM.js +182 -0
- package/bundled-test-harness/assets/card-delete-test-vKF0Jf1X.js +412 -0
- package/bundled-test-harness/assets/card-directory-name-test-CbCuPwSz.js +71 -0
- package/bundled-test-harness/assets/card-playground-test-CRIP3b5-.js +1497 -0
- package/bundled-test-harness/assets/card-prerender-ClYlSOBU.js +12661 -0
- package/bundled-test-harness/assets/card-search-adorn-test-Mggk5ZgY.js +128 -0
- package/bundled-test-harness/assets/card-search-query-builder-test-Cdl12s50.js +88 -0
- package/bundled-test-harness/assets/card-search-selection-menu-test-CtuCCLoB.js +108 -0
- package/bundled-test-harness/assets/channel-BKUMepxs.js +8 -0
- package/bundled-test-harness/assets/check-correctness-test-DBh8DT_f.js +252 -0
- package/bundled-test-harness/assets/chunk-2J33WTMH-ClrRoNQU.js +31 -0
- package/bundled-test-harness/assets/chunk-3OPIFGDE-g_0Oh8jN.js +5548 -0
- package/bundled-test-harness/assets/chunk-4BX2VUAB-D2LCc7Y9.js +11 -0
- package/bundled-test-harness/assets/chunk-4EGX6M5U-D8vRS5IG.js +44 -0
- package/bundled-test-harness/assets/chunk-55IACEB6-C5j4VAmb.js +10 -0
- package/bundled-test-harness/assets/chunk-5DO6E6H7-CPb3jsP0.js +27 -0
- package/bundled-test-harness/assets/chunk-5ZQYHXKU-BlVb7vgG.js +1767 -0
- package/bundled-test-harness/assets/chunk-727SXJPM-C_NVCDMC.js +3877 -0
- package/bundled-test-harness/assets/chunk-AQP2D5EJ-CpwrMix_.js +2622 -0
- package/bundled-test-harness/assets/chunk-BR22UD5L-AF0NWdjT.js +85 -0
- package/bundled-test-harness/assets/chunk-BSJP7CBP-Dgun5vYb.js +114 -0
- package/bundled-test-harness/assets/chunk-CSCIHK7Q-D7nFiAZ-.js +6144 -0
- package/bundled-test-harness/assets/chunk-FHYWG6QK-2nuXS9PL.js +27 -0
- package/bundled-test-harness/assets/chunk-FMBD7UC4-O-Y8VK1S.js +20 -0
- package/bundled-test-harness/assets/chunk-KSCS5N6A-Du5-DprU.js +871 -0
- package/bundled-test-harness/assets/chunk-L5ZTLDWV-C2lDtkix.js +43 -0
- package/bundled-test-harness/assets/chunk-LZXEDZCA-qAMsMZkF.js +65 -0
- package/bundled-test-harness/assets/chunk-MPE355IW-DcT_60Oq.js +27 -0
- package/bundled-test-harness/assets/chunk-MZUSXYTE-BsH_YmnC.js +36 -0
- package/bundled-test-harness/assets/chunk-N66VUXT2-DMyMHgoS.js +70 -0
- package/bundled-test-harness/assets/chunk-ND2GUHAM-DO1Znn8O.js +93 -0
- package/bundled-test-harness/assets/chunk-NZK2D7GU-B1YWBxHm.js +89 -0
- package/bundled-test-harness/assets/chunk-O5CBEL6O-CZVSBsRq.js +2395 -0
- package/bundled-test-harness/assets/chunk-PUPMXCY4-DzOK-Vbt.js +27 -0
- package/bundled-test-harness/assets/chunk-QZHKN3VN-DJFnRn99.js +20 -0
- package/bundled-test-harness/assets/chunk-UIBZB4QT-5KIxBxjk.js +27 -0
- package/bundled-test-harness/assets/chunk-WCWK7LTN-BsQwhliq.js +36 -0
- package/bundled-test-harness/assets/chunk-WU5MYG2G-DUVb5MAo.js +12 -0
- package/bundled-test-harness/assets/chunk-XPW4576I-DLaJYAOU.js +2341 -0
- package/bundled-test-harness/assets/classDiagram-4FO5ZUOK-DjP2uozG.js +31 -0
- package/bundled-test-harness/assets/classDiagram-v2-Q7XG4LA2-Dt6ps5uz.js +31 -0
- package/bundled-test-harness/assets/code-equality-assertion-BBezFT13.js +474 -0
- package/bundled-test-harness/assets/code-patches-test-DzoQGARM.js +1128 -0
- package/bundled-test-harness/assets/code-patching-test-D8r-pJ5w.js +114 -0
- package/bundled-test-harness/assets/code-ref-test-DU3HChNz.js +138 -0
- package/bundled-test-harness/assets/code-semantics-service-test-DArUotKy.js +65 -0
- package/bundled-test-harness/assets/code-submode-test-h5wWKsz2.js +1762 -0
- package/bundled-test-harness/assets/codeblocks-test-FbuwTy5v.js +492 -0
- package/bundled-test-harness/assets/codemirror-context-DVlC9C78.js +2 -0
- package/bundled-test-harness/assets/codemirror-editor-test-JDT9uwqM.js +1176 -0
- package/bundled-test-harness/assets/color-field-test-BssRlQAX.js +213 -0
- package/bundled-test-harness/assets/command-definitions-test-J21kOxBs.js +72 -0
- package/bundled-test-harness/assets/commands-DAo0DgCX.js +1379 -0
- package/bundled-test-harness/assets/commands-calling-test-C3deVvv_.js +200 -0
- package/bundled-test-harness/assets/commands-test--0zViqs2.js +1041 -0
- package/bundled-test-harness/assets/commands-test-BwNn2npL.js +1145 -0
- package/bundled-test-harness/assets/computed-test-BD_KrZmc.js +882 -0
- package/bundled-test-harness/assets/container-C8gu0I0Q.js +14605 -0
- package/bundled-test-harness/assets/convert-to-class-name-test-CX21VRzM.js +17 -0
- package/bundled-test-harness/assets/copy-and-edit-test-BUy_o8XJ.js +291 -0
- package/bundled-test-harness/assets/copy-card-test-LWbugEPe.js +156 -0
- package/bundled-test-harness/assets/copy-file-to-realm-test-BS25EUGV.js +99 -0
- package/bundled-test-harness/assets/copy-source-test-Dh33cqM8.js +56 -0
- package/bundled-test-harness/assets/cose-bilkent-S5V4N54A-CjAFDdpS.js +4275 -0
- package/bundled-test-harness/assets/create-file-test-DOc3YYij.js +963 -0
- package/bundled-test-harness/assets/create-file-test-DgUya7-i.js +397 -0
- package/bundled-test-harness/assets/create-listing-modal-test-DZxZBYS7.js +194 -0
- package/bundled-test-harness/assets/create-listing-pr-request-Aw0ms76l.js +64 -0
- package/bundled-test-harness/assets/create-listing-pr-request-test-CFvqkgky.js +117 -0
- package/bundled-test-harness/assets/create-spec-test-BTRt8oe8.js +239 -0
- package/bundled-test-harness/assets/csv-file-def-test-BVffg8wL.js +101 -0
- package/bundled-test-harness/assets/dagre-BM42HDAG-GoRrN65x.js +606 -0
- package/bundled-test-harness/assets/dagre-ByxOOmYM.js +4195 -0
- package/bundled-test-harness/assets/date-time-fields-test-BEcfCqgB.js +322 -0
- package/bundled-test-harness/assets/debug-message-test-CAxbe6x2.js +119 -0
- package/bundled-test-harness/assets/diagram-2AECGRRQ-B6-pvp9H.js +279 -0
- package/bundled-test-harness/assets/diagram-5GNKFQAL-C9M7hXIc.js +142 -0
- package/bundled-test-harness/assets/diagram-KO2AKTUF-BNJvCLGK.js +551 -0
- package/bundled-test-harness/assets/diagram-LMA3HP47-hlJyTtqP.js +184 -0
- package/bundled-test-harness/assets/diagram-OG6HWLK6-BvPoB3IH.js +857 -0
- package/bundled-test-harness/assets/diffing-test-De9Ev_Fr.js +210 -0
- package/bundled-test-harness/assets/dist-BsEojs3T.js +232 -0
- package/bundled-test-harness/assets/dist-CY3T64Hs.js +105 -0
- package/bundled-test-harness/assets/dist-q2xz8RMj.js +2 -0
- package/bundled-test-harness/assets/editor-test-DOI_TvWQ.js +551 -0
- package/bundled-test-harness/assets/editor.main-CpuM6HrX.js +43566 -0
- package/bundled-test-harness/assets/editor.main-DkMgS1qm.js +3 -0
- package/bundled-test-harness/assets/email-field-test-t-80Z94b.js +74 -0
- package/bundled-test-harness/assets/enum-field-test-DVp-2pip.js +909 -0
- package/bundled-test-harness/assets/erDiagram-TEJ5UH35-CYniRkua.js +2041 -0
- package/bundled-test-harness/assets/error-display-test-IuRxKyLz.js +343 -0
- package/bundled-test-harness/assets/evaluate-module-test-DdnfbFp-.js +66 -0
- package/bundled-test-harness/assets/eventmodeling-FCH6USID-BO089-Cs.js +3 -0
- package/bundled-test-harness/assets/execute-atomic-operations-test-CgbvrBlu.js +75 -0
- package/bundled-test-harness/assets/externals-5atxeNU4.js +5533 -0
- package/bundled-test-harness/assets/extract-css-variables-test-Cii-CYfc.js +169 -0
- package/bundled-test-harness/assets/fallback-banner-test-CUUd-Wuu.js +227 -0
- package/bundled-test-harness/assets/fallback-banner-test-D4NWyahM.js +53 -0
- package/bundled-test-harness/assets/fallback-models-test-2MJ1jAs8.js +163 -0
- package/bundled-test-harness/assets/fetch-card-json-test-Cruqsq6S.js +63 -0
- package/bundled-test-harness/assets/fetcher-test-CkHlbTzz.js +85 -0
- package/bundled-test-harness/assets/field-configuration-test-CqwsGNib.js +535 -0
- package/bundled-test-harness/assets/field-markdown-domain-test-DPjz8i4Y.js +615 -0
- package/bundled-test-harness/assets/field-markdown-primitives-test-Dw07UtT7.js +362 -0
- package/bundled-test-harness/assets/field-markdown-specialized-test-C-t34PAw.js +527 -0
- package/bundled-test-harness/assets/field-path-parser-test-BeNjacPu.js +387 -0
- package/bundled-test-harness/assets/field-playground-test-BILTGxqr.js +902 -0
- package/bundled-test-harness/assets/field-support-predicates-test-Df24w0Wa.js +170 -0
- package/bundled-test-harness/assets/field-test-helpers-P22hxBNz.js +45 -0
- package/bundled-test-harness/assets/file-attachment-test-Cjg4NBeM.js +635 -0
- package/bundled-test-harness/assets/file-chooser-test-Cl0XujPT.js +439 -0
- package/bundled-test-harness/assets/file-def-live-reload-test-D4Obzi12.js +50 -0
- package/bundled-test-harness/assets/file-def-manager-DUgR-gjs.js +470 -0
- package/bundled-test-harness/assets/file-def-manager-canonicalize-test-D_LWVsvz.js +451 -0
- package/bundled-test-harness/assets/file-def-menu-items-test-xvsUTOK4.js +114 -0
- package/bundled-test-harness/assets/file-def-navigation-test-DxPceB7E.js +109 -0
- package/bundled-test-harness/assets/file-def-serialization-test-CpwbDb8p.js +87 -0
- package/bundled-test-harness/assets/file-def-test-CEnKcvW9.js +219 -0
- package/bundled-test-harness/assets/file-tree-test-DE2aH6iq.js +773 -0
- package/bundled-test-harness/assets/flac-audio-def-test-BCg7LnR6.js +138 -0
- package/bundled-test-harness/assets/flowDiagram-I6XJVG4X-Xv8-LIxQ.js +4883 -0
- package/bundled-test-harness/assets/formatted-aibot-message-test-CsxFn62P.js +366 -0
- package/bundled-test-harness/assets/formatted-user-message-test-DjZc8qnA.js +43 -0
- package/bundled-test-harness/assets/freestyle-test-QEZaZCNJ.js +17 -0
- package/bundled-test-harness/assets/full-reindex-realm-test-C_c2OTTD.js +103 -0
- package/bundled-test-harness/assets/ganttDiagram-6RSMTGT7-DmvkzS5w.js +4060 -0
- package/bundled-test-harness/assets/garbage-collection-test-BVuvfidI.js +373 -0
- package/bundled-test-harness/assets/general-test-Ydis4jEq.js +926 -0
- package/bundled-test-harness/assets/generate-css-variables-test-CZCmgTAO.js +88 -0
- package/bundled-test-harness/assets/generate-example-cards-one-shot-test-x_szhkSN.js +67 -0
- package/bundled-test-harness/assets/get-available-realm-identifiers-test-DvRnwCHR.js +49 -0
- package/bundled-test-harness/assets/get-catalog-realm-identifiers-test-46TE-XA0.js +49 -0
- package/bundled-test-harness/assets/get-default-writable-realm-test-DaAkxTNh.js +56 -0
- package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-9XEGHVOV.js +55 -0
- package/bundled-test-harness/assets/get-relationship-membership-state-test-BY4gk5JZ.js +1306 -0
- package/bundled-test-harness/assets/get-type-refs-from-filter-test-BynlX0JE.js +136 -0
- package/bundled-test-harness/assets/get-user-system-card-test-D98Xxn1k.js +52 -0
- package/bundled-test-harness/assets/gif-image-def-test-FwKGFGWw.js +161 -0
- package/bundled-test-harness/assets/gitGraph-WXDBUCRP-Bmn0Z_Xi.js +3 -0
- package/bundled-test-harness/assets/gitGraphDiagram-PVQCEYII-BAo0G82W.js +1150 -0
- package/bundled-test-harness/assets/gts-file-def-test-ivEk8Muv.js +99 -0
- package/bundled-test-harness/assets/head-format-preview-test-CNhvk724.js +156 -0
- package/bundled-test-harness/assets/helpers-BH4Yfo_2.js +5 -0
- package/bundled-test-harness/assets/host-mode-test-BRNndb2h.js +391 -0
- package/bundled-test-harness/assets/host-submode-test-DHd0x-6x.js +904 -0
- package/bundled-test-harness/assets/index-query-engine-test-7Fzc09fG.js +2548 -0
- package/bundled-test-harness/assets/index-writer-test-D3cL2q2N.js +1842 -0
- package/bundled-test-harness/assets/indexeddb-crypto-store-C09Shau-.js +49434 -0
- package/bundled-test-harness/assets/info-J43DQDTF-Dz5b1Xgc.js +3 -0
- package/bundled-test-harness/assets/infoDiagram-5YYISTIA-Dl8XvIfi.js +23 -0
- package/bundled-test-harness/assets/inspector-test-CVZVQdIJ.js +1776 -0
- package/bundled-test-harness/assets/instance-filter-matcher-test-C-4z6qUt.js +564 -0
- package/bundled-test-harness/assets/instantiate-card-test-eQ22Vt_m.js +104 -0
- package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-hXPsRPMU.js +497 -0
- package/bundled-test-harness/assets/interact-submode-setup-D55IIVc5.js +558 -0
- package/bundled-test-harness/assets/interact-submode-test-BwrtFe2m.js +725 -0
- package/bundled-test-harness/assets/invalidate-realm-identifiers-test-BMk7yd-D.js +101 -0
- package/bundled-test-harness/assets/invite-user-to-room-test-B5B0umJQ.js +67 -0
- package/bundled-test-harness/assets/ishikawaDiagram-YF4QCWOH-BrO7NAng.js +1009 -0
- package/bundled-test-harness/assets/isolated-render-test-DX1wdHoS.js +51 -0
- package/bundled-test-harness/assets/item-button-QkVr-FW0.js +203 -0
- package/bundled-test-harness/assets/javascript-BWNQhcCY.js +75 -0
- package/bundled-test-harness/assets/job-priority-header-test-CuBZloLK.js +81 -0
- package/bundled-test-harness/assets/journeyDiagram-JHISSGLW-B7BT66v0.js +1256 -0
- package/bundled-test-harness/assets/jpg-image-def-test-DEx462nY.js +430 -0
- package/bundled-test-harness/assets/json-file-def-test-Cray6ly6.js +92 -0
- package/bundled-test-harness/assets/kanban-definition-UN3LZRKU-C0E5Vmr_.js +1284 -0
- package/bundled-test-harness/assets/last-modified-date-test-BzE25NOB.js +18 -0
- package/bundled-test-harness/assets/limited-set-test-NwGNoXKc.js +123 -0
- package/bundled-test-harness/assets/line-BbGOk93s.js +55 -0
- package/bundled-test-harness/assets/linear-CHTo-YQl.js +417 -0
- package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-CZdgRM1b.js +315 -0
- package/bundled-test-harness/assets/linksto-error-sentinel-test-DhsHO7Xs.js +236 -0
- package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-mt-RrRta.js +303 -0
- package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CdGUXZsi.js +301 -0
- package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-DOJ_6Gwf.js +258 -0
- package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-BZC-gslF.js +194 -0
- package/bundled-test-harness/assets/live-prerendered-search-BSkwf5AH.js +639 -0
- package/bundled-test-harness/assets/live-test-DTfxZnsy.js +100 -0
- package/bundled-test-harness/assets/live-test-WOMYpc1I.js +2 -0
- package/bundled-test-harness/assets/loader-icon-error-test-F_ukQytn.js +62 -0
- package/bundled-test-harness/assets/loader-parallel-prefetch-test-DpNaFnhc.js +257 -0
- package/bundled-test-harness/assets/loader-retry-test-EQ2X0bFS.js +173 -0
- package/bundled-test-harness/assets/loader-test-BYkWAwc4.js +245 -0
- package/bundled-test-harness/assets/loading-test-jfWH_OpH.js +63 -0
- package/bundled-test-harness/assets/login-error-text-test-Cldr1X6h.js +51 -0
- package/bundled-test-harness/assets/m4a-audio-def-test-BQ1WKApD.js +185 -0
- package/bundled-test-harness/assets/main-ByAsLO_g.js +5 -0
- package/bundled-test-harness/assets/markdown-fallback-test-dtTaGP1s.js +316 -0
- package/bundled-test-harness/assets/markdown-file-def-test-shW9Xxd1.js +286 -0
- package/bundled-test-harness/assets/markdown-helpers-test-B6H7p4ay.js +183 -0
- package/bundled-test-harness/assets/markdown-highlighting-test-ZIrFNHRe.js +244 -0
- package/bundled-test-harness/assets/markdown-preview-KII3nJ2M.js +69 -0
- package/bundled-test-harness/assets/markdown-preview-test-De-IaUbK.js +237 -0
- package/bundled-test-harness/assets/marked-sync-CGSehq4u.js +2 -0
- package/bundled-test-harness/assets/marked-sync-DenC7QgC.js +2561 -0
- package/bundled-test-harness/assets/marked-sync-test-jZBr20Hq.js +146 -0
- package/bundled-test-harness/assets/matrix-service-sliding-sync-test-Ax4kyAMt.js +33 -0
- package/bundled-test-harness/assets/mermaid-parser.core-B_3tzKUl.js +114 -0
- package/bundled-test-harness/assets/mermaid.core-D2hqA7Hq.js +1700 -0
- package/bundled-test-harness/assets/message-service-subscription-test-B42KnJ91.js +113 -0
- package/bundled-test-harness/assets/mindmap-definition-RKZ34NQL-IZz7Qpd0.js +1347 -0
- package/bundled-test-harness/assets/mock-matrix-BhFWlMMr.js +14292 -0
- package/bundled-test-harness/assets/mock-matrix-CrtMntcN.js +2 -0
- package/bundled-test-harness/assets/module-transpile-cache-test-BtWN4OiM.js +66 -0
- package/bundled-test-harness/assets/monaco.contribution-B1hOUP3w.js +2 -0
- package/bundled-test-harness/assets/monaco.contribution-DhNsYtZe.js +2 -0
- package/bundled-test-harness/assets/monaco.contribution-DvJDImx2.js +103 -0
- package/bundled-test-harness/assets/monaco.contribution-yXcOyzue.js +243 -0
- package/bundled-test-harness/assets/mp3-audio-def-test-D365TuA7.js +129 -0
- package/bundled-test-harness/assets/mutex-test-DY09HLvv.js +71 -0
- package/bundled-test-harness/assets/number-field-test-wYaQjnzA.js +153 -0
- package/bundled-test-harness/assets/ogg-audio-def-test-Dl01PP31.js +191 -0
- package/bundled-test-harness/assets/open-create-listing-modal-test-D8C2PUFv.js +117 -0
- package/bundled-test-harness/assets/open-workspace-test-DN2n8IkC.js +48 -0
- package/bundled-test-harness/assets/operator-mode-acceptance-test-B_hzJZo4.js +1044 -0
- package/bundled-test-harness/assets/operator-mode-card-catalog-test-Hrrnkdt9.js +989 -0
- package/bundled-test-harness/assets/operator-mode-links-test-DC6sc9TZ.js +797 -0
- package/bundled-test-harness/assets/operator-mode-state-service-test-Aqz9_v0U.js +122 -0
- package/bundled-test-harness/assets/operator-mode-test-CLgpZGEM.js +617 -0
- package/bundled-test-harness/assets/operator-mode-ui-test-CDRrORfC.js +985 -0
- package/bundled-test-harness/assets/ordinal-BIRuJQBH.js +85 -0
- package/bundled-test-harness/assets/overlay-menu-items-test-of24KuXp.js +316 -0
- package/bundled-test-harness/assets/packet-YPE3B663-hs92geQG.js +3 -0
- package/bundled-test-harness/assets/panel-rIdTMDfK.js +3371 -0
- package/bundled-test-harness/assets/past-sessions-test-ZKr4ACF0.js +321 -0
- package/bundled-test-harness/assets/patch-code-test-BZa-Itrt.js +203 -0
- package/bundled-test-harness/assets/patch-fields-test-BkaHs-zo.js +992 -0
- package/bundled-test-harness/assets/patch-instance-test-CRMgg52p.js +287 -0
- package/bundled-test-harness/assets/persist-module-inspector-view-test-CqNy2RXR.js +62 -0
- package/bundled-test-harness/assets/phone-number-field-test-CV6gntON.js +72 -0
- package/bundled-test-harness/assets/pie-LRSECV5Y-DcM5pWE3.js +3 -0
- package/bundled-test-harness/assets/pieDiagram-4H26LBE5-CtO8RHpU.js +253 -0
- package/bundled-test-harness/assets/plan-install-test-lfBTuWXU.js +417 -0
- package/bundled-test-harness/assets/playground-VscW9KdT.js +57 -0
- package/bundled-test-harness/assets/png-image-def-test-CRspcIHP.js +222 -0
- package/bundled-test-harness/assets/prerender-file-extract-test-D3SpxfMI.js +176 -0
- package/bundled-test-harness/assets/prerender-html-test-WWptGXJ0.js +615 -0
- package/bundled-test-harness/assets/prerender-meta-test-DwQEGN6j.js +388 -0
- package/bundled-test-harness/assets/prerender-module-test-BM1AOwRF.js +195 -0
- package/bundled-test-harness/assets/prerendered-card-search-test-BVJ8IHLe.js +708 -0
- package/bundled-test-harness/assets/preview-format-test-DDpiXDN_.js +103 -0
- package/bundled-test-harness/assets/preview-test-D2UV1C5D.js +455 -0
- package/bundled-test-harness/assets/published-realm-url-DUIZzAJ5.js +52 -0
- package/bundled-test-harness/assets/published-realm-url-test-CIgSf4Ub.js +137 -0
- package/bundled-test-harness/assets/qs-test-Bi679H5w.js +36 -0
- package/bundled-test-harness/assets/quadrantDiagram-W4KKPZXB-GOTAKsCo.js +2324 -0
- package/bundled-test-harness/assets/query-field-barrier-test-BlOuVxdS.js +118 -0
- package/bundled-test-harness/assets/query-field-error-sentinel-test-BsB76iUQ.js +202 -0
- package/bundled-test-harness/assets/query-field-normalization-test-B2YodJCr.js +271 -0
- package/bundled-test-harness/assets/query-field-schema-test-CQhJASFx.js +231 -0
- package/bundled-test-harness/assets/query-fields-test-CaZ19leM.js +535 -0
- package/bundled-test-harness/assets/queue-test-DrSip6mJ.js +216 -0
- package/bundled-test-harness/assets/radar-GUYGQ44K-BkAe1nkp.js +3 -0
- package/bundled-test-harness/assets/read-card-for-ai-assistant-test-D8yB-OL9.js +91 -0
- package/bundled-test-harness/assets/read-file-for-ai-assistant-test-K3M0-lBD.js +45 -0
- package/bundled-test-harness/assets/read-source-test-CKlb0ORb.js +67 -0
- package/bundled-test-harness/assets/read-text-file-test-CJdasDDU.js +124 -0
- package/bundled-test-harness/assets/realm-DhUCLR5r.js +884 -0
- package/bundled-test-harness/assets/realm-field-test-kFgxphDI.js +101 -0
- package/bundled-test-harness/assets/realm-index-card-id-test-DAnMAqw4.js +18 -0
- package/bundled-test-harness/assets/realm-indexing-test-BQkX-Dat.js +4018 -0
- package/bundled-test-harness/assets/realm-paths-test-CmEi9rzu.js +33 -0
- package/bundled-test-harness/assets/realm-querying-test-eq3qSXLu.js +1062 -0
- package/bundled-test-harness/assets/realm-test-DLQAtdMt.js +2409 -0
- package/bundled-test-harness/assets/reasoning-test-CwTfyDlj.js +234 -0
- package/bundled-test-harness/assets/recent-files-test-MVIGLp8S.js +449 -0
- package/bundled-test-harness/assets/reindex-realm-test-BwLgJeB3.js +119 -0
- package/bundled-test-harness/assets/relationship-loading-state-test-B4Ca43yD.js +289 -0
- package/bundled-test-harness/assets/render-component-BKEihV4U.js +2 -0
- package/bundled-test-harness/assets/render-error-test-DWD6tfNe.js +22 -0
- package/bundled-test-harness/assets/render-service-test-BjuoVrUK.js +87 -0
- package/bundled-test-harness/assets/render-timer-stub-test-BgUY5u3X.js +84 -0
- package/bundled-test-harness/assets/rendered-markdown-DOP-s6fW.js +211 -0
- package/bundled-test-harness/assets/rendered-markdown-test-CD02UYwA.js +360 -0
- package/bundled-test-harness/assets/requirementDiagram-4Y6WPE33-DJIy7eR9.js +2550 -0
- package/bundled-test-harness/assets/rich-markdown-field-test-BJeQx1tL.js +806 -0
- package/bundled-test-harness/assets/room-message-test-CjD7FlPD.js +171 -0
- package/bundled-test-harness/assets/rust-crypto-GS0FFZ7H.js +16141 -0
- package/bundled-test-harness/assets/sanitize-module-list-test-gi0pcqSy.js +68 -0
- package/bundled-test-harness/assets/sankeyDiagram-5OEKKPKP-wBsbt1Mr.js +1357 -0
- package/bundled-test-harness/assets/schema-editor-test-BSqu8W3e.js +784 -0
- package/bundled-test-harness/assets/schema-generation-test-DVFuSsLl.js +28 -0
- package/bundled-test-harness/assets/scrolling-test-CpzkRiBS.js +292 -0
- package/bundled-test-harness/assets/search-and-choose-test-DVWX4XRb.js +156 -0
- package/bundled-test-harness/assets/search-cache-key-test-BMnYM4a5.js +79 -0
- package/bundled-test-harness/assets/search-command-test-kEfT0AO7.js +135 -0
- package/bundled-test-harness/assets/search-correlation-id-test-D08FtVUZ.js +101 -0
- package/bundled-test-harness/assets/search-data-test-CTrBEc1m.js +243 -0
- package/bundled-test-harness/assets/search-google-images-test-UnKG8qCp.js +168 -0
- package/bundled-test-harness/assets/search-in-flight-key-test-9Va-JXFz.js +79 -0
- package/bundled-test-harness/assets/search-test-COlO2lZi.js +847 -0
- package/bundled-test-harness/assets/send-ai-assistant-message-test-BPjOjt2R.js +52 -0
- package/bundled-test-harness/assets/send-bot-trigger-event-test-BB4lHbB_.js +56 -0
- package/bundled-test-harness/assets/send-request-via-proxy-test-U8frmHZA.js +333 -0
- package/bundled-test-harness/assets/sending-test-DjEzksEX.js +317 -0
- package/bundled-test-harness/assets/sequenceDiagram-3UESZ5HK-QAEjhoay.js +5551 -0
- package/bundled-test-harness/assets/serialization-test-DHdLriC8.js +8283 -0
- package/bundled-test-harness/assets/set-user-system-card-test-C8I1lDBh.js +59 -0
- package/bundled-test-harness/assets/setup-BkuybBki.js +769 -0
- package/bundled-test-harness/assets/setup-gxkWJKID.js +2 -0
- package/bundled-test-harness/assets/show-card-test-DHKQ6AI4.js +362 -0
- package/bundled-test-harness/assets/skills-test-DlMgZrPV.js +568 -0
- package/bundled-test-harness/assets/spec-test-s9Zj7x2E.js +1012 -0
- package/bundled-test-harness/assets/stateDiagram-AJRCARHV-nEhf3efZ.js +363 -0
- package/bundled-test-harness/assets/stateDiagram-v2-BHNVJYJU-tZz_3w-7.js +29 -0
- package/bundled-test-harness/assets/store-add-test-D44FWRl3.js +52 -0
- package/bundled-test-harness/assets/store-test-TTmNBs5v.js +1562 -0
- package/bundled-test-harness/assets/summarize-session-test-DHAuNb5K.js +169 -0
- package/bundled-test-harness/assets/svg-image-def-test-C2_GGzR6.js +164 -0
- package/bundled-test-harness/assets/switch-submode-test-CfGaoxVe.js +168 -0
- package/bundled-test-harness/assets/test-realm-service-worker-C21o7yvW.js +73 -0
- package/bundled-test-harness/assets/tests-BSt6h9iC.js +2771 -0
- package/bundled-test-harness/assets/text-file-def-test-CR4QO7e_.js +93 -0
- package/bundled-test-harness/assets/text-input-validator-test-DYS3mFj9.js +155 -0
- package/bundled-test-harness/assets/text-suggestion-test-GUxJ7WtF.js +339 -0
- package/bundled-test-harness/assets/theme-card-test-Ba2KqFB8.js +573 -0
- package/bundled-test-harness/assets/timeline-definition-PNZ67QCA-BQYyTIei.js +1545 -0
- package/bundled-test-harness/assets/transform-cards-test-DyA8eCom.js +341 -0
- package/bundled-test-harness/assets/treeView-BLDUP644-Z4ezSvef.js +3 -0
- package/bundled-test-harness/assets/treemap-LRROVOQU-Bf5rk_He.js +3 -0
- package/bundled-test-harness/assets/ts-file-def-test-Cxnc6H74.js +90 -0
- package/bundled-test-harness/assets/tsMode-oJEHe-CR.js +968 -0
- package/bundled-test-harness/assets/typescript-DLbb7q56.js +2 -0
- package/bundled-test-harness/assets/update-room-skills-test-B7VLHU3-.js +197 -0
- package/bundled-test-harness/assets/url-test-w-69Zycf.js +103 -0
- package/bundled-test-harness/assets/use-ai-assistant-test-DJkFz7_b.js +330 -0
- package/bundled-test-harness/assets/validate-realm-test-BioLutB8.js +53 -0
- package/bundled-test-harness/assets/vennDiagram-CIIHVFJN-9eLwsQET.js +2833 -0
- package/bundled-test-harness/assets/wardley-L42UT6IY-qNP5_917.js +3 -0
- package/bundled-test-harness/assets/wardleyDiagram-YWT4CUSO-DZhEm4N4.js +872 -0
- package/bundled-test-harness/assets/wav-audio-def-test-DqsTEBw8.js +155 -0
- package/bundled-test-harness/assets/webp-image-def-test-23wOLPMu.js +225 -0
- package/bundled-test-harness/assets/workspace-chooser-delete-test-Q6S_nGDT.js +189 -0
- package/bundled-test-harness/assets/workspace-chooser-test-CzsvY1v_.js +235 -0
- package/bundled-test-harness/assets/workspace-delete-multiple-test-BNFHkJpQ.js +213 -0
- package/bundled-test-harness/assets/workspace-delete-summary-test-DLzNdjvC.js +63 -0
- package/bundled-test-harness/assets/write-binary-file-test-PHHt9fVI.js +100 -0
- package/bundled-test-harness/assets/write-text-file-test-DuHe6tR5.js +172 -0
- package/bundled-test-harness/assets/xychartDiagram-2RQKCTM6-bflHQbEv.js +2551 -0
- package/bundled-test-harness/index.html +24 -23
- package/bundled-test-harness/tests/index.html +31 -30
- package/bundled-types/base/command.d.ts +48 -0
- package/bundled-types/host-app/components/operator-mode/publish-realm-modal.gts +17 -26
- package/bundled-types/host-app/lib/published-realm-url.ts +135 -0
- package/package.json +2 -2
- package/src/build-program.ts +12 -12
- package/src/commands/consolidate-workspaces.ts +1 -1
- package/src/commands/file/delete.ts +4 -4
- package/src/commands/file/index.ts +6 -6
- package/src/commands/file/lint.ts +4 -4
- package/src/commands/file/list.ts +3 -3
- package/src/commands/file/read.ts +3 -3
- package/src/commands/file/touch.ts +6 -6
- package/src/commands/file/write.ts +3 -3
- package/src/commands/lint.ts +6 -6
- package/src/commands/parse.ts +6 -6
- package/src/commands/profile.ts +4 -4
- package/src/commands/read-transpiled.ts +6 -3
- package/src/commands/realm/cancel-indexing.ts +3 -3
- package/src/commands/realm/create.ts +2 -2
- package/src/commands/realm/history.ts +4 -4
- package/src/commands/realm/index.ts +15 -15
- package/src/commands/realm/indexing-errors.ts +3 -3
- package/src/commands/realm/list.ts +2 -2
- package/src/commands/realm/milestone.ts +4 -4
- package/src/commands/realm/publish.ts +4 -4
- package/src/commands/realm/pull.ts +6 -6
- package/src/commands/realm/push.ts +7 -7
- package/src/commands/realm/remove.ts +3 -3
- package/src/commands/realm/status.ts +8 -8
- package/src/commands/realm/sync.ts +9 -9
- package/src/commands/realm/unpublish.ts +3 -3
- package/src/commands/realm/wait-for-ready.ts +2 -2
- package/src/commands/realm/watch/index.ts +2 -2
- package/src/commands/realm/watch/start.ts +13 -10
- package/src/commands/realm/watch/stop.ts +2 -2
- package/src/commands/run-command.ts +6 -3
- package/src/commands/search.ts +3 -3
- package/src/commands/test.ts +5 -5
- package/src/index.ts +2 -2
- package/src/lib/auth-resolver.ts +3 -3
- package/src/lib/boxel-cli-client.ts +18 -15
- package/src/lib/checkpoint-manager.ts +1 -1
- package/src/lib/find-checkpoint.ts +1 -1
- package/src/lib/profile-manager.ts +4 -4
- package/src/lib/realm-local-paths.ts +1 -1
- package/src/lib/realm-sync-base.ts +1 -1
- package/src/lib/seed-auth.ts +1 -1
- package/src/lib/sync-logic.ts +1 -1
- package/src/lib/watch-process-registry.ts +1 -1
- package/bundled-test-harness/assets/adapter-C8oDflNN.js +0 -2
- package/bundled-test-harness/assets/add-field-to-card-definition-command-test-Cs670972.js +0 -111
- package/bundled-test-harness/assets/add-workspace-test-BviDAUBK.js +0 -71
- package/bundled-test-harness/assets/ai-assistant-B5fp2iOz.js +0 -129
- package/bundled-test-harness/assets/ai-assistant-panel-service-test-NpHZzZAz.js +0 -95
- package/bundled-test-harness/assets/ai-assistant-test-jPV29jEw.js +0 -2137
- package/bundled-test-harness/assets/ai-function-generation-test-QRPcE9tQ.js +0 -996
- package/bundled-test-harness/assets/ai-module-creation-test-DyuyfnkY.js +0 -150
- package/bundled-test-harness/assets/aibot-message-Dwxp5hTW.js +0 -1185
- package/bundled-test-harness/assets/amd-transpile-test-CF7Lkbif.js +0 -425
- package/bundled-test-harness/assets/app-CgP2IpNG.js +0 -21464
- package/bundled-test-harness/assets/apply-boxel-formatting-test-BXyZ3z0I.js +0 -134
- package/bundled-test-harness/assets/apply-markdown-edit-test-C6bcaj3a.js +0 -230
- package/bundled-test-harness/assets/apply-search-replace-block-test-BSwC4J9g.js +0 -630
- package/bundled-test-harness/assets/arc-DNRb_8LA.js +0 -199
- package/bundled-test-harness/assets/architecture-7EHR7CIX-BtVh_LBJ.js +0 -3
- package/bundled-test-harness/assets/architectureDiagram-3BPJPVTR-D9UYbaKj.js +0 -7400
- package/bundled-test-harness/assets/auth-error-guard-test-Bvu8E7Wy.js +0 -30
- package/bundled-test-harness/assets/auth-service-worker-test-CC6DzdfK.js +0 -538
- package/bundled-test-harness/assets/authed-fetch-test-CfF-IBHI.js +0 -75
- package/bundled-test-harness/assets/avif-image-def-test-B9L2z0nR.js +0 -186
- package/bundled-test-harness/assets/base-realm-43wjttN2.js +0 -140
- package/bundled-test-harness/assets/base-realm-CJ5x9iyX.js +0 -2
- package/bundled-test-harness/assets/basic-test-B64a5zCK.js +0 -128
- package/bundled-test-harness/assets/bfm-card-references-test-cLQVLpth.js +0 -577
- package/bundled-test-harness/assets/binary-upload-dedupe-test-By7Y1iQ3.js +0 -308
- package/bundled-test-harness/assets/blockDiagram-GPEHLZMM-LgOorG2O.js +0 -4355
- package/bundled-test-harness/assets/bot-registration-test-DOjf0P1R.js +0 -99
- package/bundled-test-harness/assets/box-test-Cd1-RcXg.js +0 -51
- package/bundled-test-harness/assets/brand-guide-attachments-test-DxRqP8fo.js +0 -87
- package/bundled-test-harness/assets/brand-guide-custom-css-test-DBpZiHzJ.js +0 -135
- package/bundled-test-harness/assets/brand-logo-mark-field-test-61k4e5Om.js +0 -87
- package/bundled-test-harness/assets/broken-link-template-test-A1P4flQ5.js +0 -345
- package/bundled-test-harness/assets/browser-index-Bzhpucwe.js +0 -3
- package/bundled-test-harness/assets/browser-index-D0mzSWYV.js +0 -8802
- package/bundled-test-harness/assets/c4Diagram-AAUBKEIU-1iq94vGa.js +0 -3764
- package/bundled-test-harness/assets/cached-fetch-test-ByQ-5OQI.js +0 -93
- package/bundled-test-harness/assets/can-read-realm-test-VFLHJdEv.js +0 -58
- package/bundled-test-harness/assets/cancel-indexing-job-test-n3Os4ZaX.js +0 -71
- package/bundled-test-harness/assets/card-api-test-DvNfLv3V.js +0 -196
- package/bundled-test-harness/assets/card-basics-test-CKzZuFdw.js +0 -4895
- package/bundled-test-harness/assets/card-catalog-test-JFvkVHED.js +0 -377
- package/bundled-test-harness/assets/card-copy-test-iwrFA72s.js +0 -777
- package/bundled-test-harness/assets/card-def-field-def-relationships-test-D5s2RH5t.js +0 -560
- package/bundled-test-harness/assets/card-def-menu-items-test-XcmkT4NF.js +0 -182
- package/bundled-test-harness/assets/card-delete-test-jtAOHk1Y.js +0 -412
- package/bundled-test-harness/assets/card-directory-name-test-veQEp5FJ.js +0 -71
- package/bundled-test-harness/assets/card-playground-test-P7Ed0tO4.js +0 -1497
- package/bundled-test-harness/assets/card-prerender-DXG8cQEv.js +0 -12661
- package/bundled-test-harness/assets/card-search-adorn-test-BX0-IJHB.js +0 -128
- package/bundled-test-harness/assets/card-search-query-builder-test-D01uixke.js +0 -88
- package/bundled-test-harness/assets/card-search-selection-menu-test-DMTeZFmW.js +0 -108
- package/bundled-test-harness/assets/channel-BvoW_rbI.js +0 -8
- package/bundled-test-harness/assets/check-correctness-test-D7QB1GTo.js +0 -252
- package/bundled-test-harness/assets/chunk-2J33WTMH-BbxCvOlt.js +0 -31
- package/bundled-test-harness/assets/chunk-3OPIFGDE-DHY3s0oT.js +0 -5548
- package/bundled-test-harness/assets/chunk-4BX2VUAB-CRivrLQ6.js +0 -11
- package/bundled-test-harness/assets/chunk-4EGX6M5U-qWzlMeqd.js +0 -44
- package/bundled-test-harness/assets/chunk-55IACEB6-DOl6NECJ.js +0 -10
- package/bundled-test-harness/assets/chunk-5DO6E6H7-scwNnzDb.js +0 -27
- package/bundled-test-harness/assets/chunk-5ZQYHXKU-BeETnugr.js +0 -1767
- package/bundled-test-harness/assets/chunk-727SXJPM-BlycTxFE.js +0 -3877
- package/bundled-test-harness/assets/chunk-AQP2D5EJ-BE3Clw-g.js +0 -2622
- package/bundled-test-harness/assets/chunk-BR22UD5L-BTPKlhWA.js +0 -85
- package/bundled-test-harness/assets/chunk-BSJP7CBP-BIhtUfvc.js +0 -114
- package/bundled-test-harness/assets/chunk-CSCIHK7Q-DnRAp6Bv.js +0 -6144
- package/bundled-test-harness/assets/chunk-FHYWG6QK-DpIXIGDC.js +0 -27
- package/bundled-test-harness/assets/chunk-FMBD7UC4-B36w3LIg.js +0 -20
- package/bundled-test-harness/assets/chunk-KSCS5N6A-gbz9p9BU.js +0 -871
- package/bundled-test-harness/assets/chunk-L5ZTLDWV-HNfH9U8K.js +0 -43
- package/bundled-test-harness/assets/chunk-LZXEDZCA-CbKHJfzx.js +0 -65
- package/bundled-test-harness/assets/chunk-MPE355IW-BGVbCTZH.js +0 -27
- package/bundled-test-harness/assets/chunk-MZUSXYTE-DoCjuxcJ.js +0 -36
- package/bundled-test-harness/assets/chunk-N66VUXT2-BX17MI-i.js +0 -70
- package/bundled-test-harness/assets/chunk-ND2GUHAM-IpeiJZYz.js +0 -93
- package/bundled-test-harness/assets/chunk-NZK2D7GU-CH-Gg7qc.js +0 -89
- package/bundled-test-harness/assets/chunk-O5CBEL6O-D2JbLgI8.js +0 -2395
- package/bundled-test-harness/assets/chunk-PUPMXCY4-DS4ZxM2V.js +0 -27
- package/bundled-test-harness/assets/chunk-QZHKN3VN-WLHeRUJ3.js +0 -20
- package/bundled-test-harness/assets/chunk-UIBZB4QT-DNIJBpkq.js +0 -27
- package/bundled-test-harness/assets/chunk-WCWK7LTN-CqRJ3WOy.js +0 -36
- package/bundled-test-harness/assets/chunk-WU5MYG2G-CtItCLbE.js +0 -12
- package/bundled-test-harness/assets/chunk-XPW4576I-D2Q7Qo8n.js +0 -2341
- package/bundled-test-harness/assets/classDiagram-4FO5ZUOK-CnNFReKQ.js +0 -31
- package/bundled-test-harness/assets/classDiagram-v2-Q7XG4LA2-BlhpbohY.js +0 -31
- package/bundled-test-harness/assets/code-equality-assertion-C-2g5YGf.js +0 -474
- package/bundled-test-harness/assets/code-patches-test-DaV4Mon_.js +0 -1128
- package/bundled-test-harness/assets/code-patching-test-CcbWlImN.js +0 -114
- package/bundled-test-harness/assets/code-ref-test-8Yj8gbww.js +0 -138
- package/bundled-test-harness/assets/code-semantics-service-test-C3srTfDz.js +0 -65
- package/bundled-test-harness/assets/code-submode-test-BUhjvWtB.js +0 -1762
- package/bundled-test-harness/assets/codeblocks-test-3zAp0_GA.js +0 -492
- package/bundled-test-harness/assets/codemirror-context-C7KmSAyy.js +0 -2
- package/bundled-test-harness/assets/codemirror-editor-test-WojU4k2h.js +0 -1176
- package/bundled-test-harness/assets/color-field-test-yESUakoE.js +0 -213
- package/bundled-test-harness/assets/command-definitions-test-UsXsAhn7.js +0 -72
- package/bundled-test-harness/assets/commands-CBDBujm_.js +0 -1379
- package/bundled-test-harness/assets/commands-calling-test-DJTl0EbL.js +0 -200
- package/bundled-test-harness/assets/commands-test-DW2gupNS.js +0 -1041
- package/bundled-test-harness/assets/commands-test-DjLnuojW.js +0 -1145
- package/bundled-test-harness/assets/computed-test-0n5g8Ez5.js +0 -882
- package/bundled-test-harness/assets/container-D8y7fmir.js +0 -14602
- package/bundled-test-harness/assets/convert-to-class-name-test-DSIflIV2.js +0 -17
- package/bundled-test-harness/assets/copy-and-edit-test-BuK1ZHr-.js +0 -291
- package/bundled-test-harness/assets/copy-card-test-DnDC4_7J.js +0 -156
- package/bundled-test-harness/assets/copy-file-to-realm-test-CFd_3Iff.js +0 -99
- package/bundled-test-harness/assets/copy-source-test-38yUGJor.js +0 -56
- package/bundled-test-harness/assets/cose-bilkent-S5V4N54A-DXA1S87S.js +0 -4275
- package/bundled-test-harness/assets/create-file-test-B2oem0-V.js +0 -963
- package/bundled-test-harness/assets/create-file-test-BHk00RtD.js +0 -397
- package/bundled-test-harness/assets/create-listing-modal-test-L-71-Uo2.js +0 -194
- package/bundled-test-harness/assets/create-listing-pr-request-CZaLsHhE.js +0 -64
- package/bundled-test-harness/assets/create-listing-pr-request-test-OGzk4Q2E.js +0 -117
- package/bundled-test-harness/assets/create-spec-test-BsM7VKuH.js +0 -239
- package/bundled-test-harness/assets/csv-file-def-test-BhJalhE-.js +0 -101
- package/bundled-test-harness/assets/dagre-BIk_r1iU.js +0 -4195
- package/bundled-test-harness/assets/dagre-BM42HDAG-FaUWeGOj.js +0 -606
- package/bundled-test-harness/assets/date-time-fields-test-Cs5T6Xk1.js +0 -322
- package/bundled-test-harness/assets/debug-message-test-WlHe7pJF.js +0 -119
- package/bundled-test-harness/assets/diagram-2AECGRRQ-DLve-IVM.js +0 -279
- package/bundled-test-harness/assets/diagram-5GNKFQAL-CJG1RTLk.js +0 -142
- package/bundled-test-harness/assets/diagram-KO2AKTUF-DYGDq3dD.js +0 -551
- package/bundled-test-harness/assets/diagram-LMA3HP47-BNRYdpMl.js +0 -184
- package/bundled-test-harness/assets/diagram-OG6HWLK6-BlJH5g83.js +0 -857
- package/bundled-test-harness/assets/diffing-test-DO54USSm.js +0 -210
- package/bundled-test-harness/assets/dist-BDRmXkWl.js +0 -232
- package/bundled-test-harness/assets/dist-BfNSLd0O.js +0 -105
- package/bundled-test-harness/assets/dist-BoireClP.js +0 -2
- package/bundled-test-harness/assets/editor-test-DChC9LuR.js +0 -551
- package/bundled-test-harness/assets/editor.main-BiohyrHK.js +0 -3
- package/bundled-test-harness/assets/editor.main-CMU_0pR1.js +0 -43566
- package/bundled-test-harness/assets/email-field-test-DWIFSfZ-.js +0 -74
- package/bundled-test-harness/assets/enum-field-test-BUc6l4us.js +0 -909
- package/bundled-test-harness/assets/erDiagram-TEJ5UH35-pOJ2novh.js +0 -2041
- package/bundled-test-harness/assets/error-display-test-CHSE6h6Z.js +0 -343
- package/bundled-test-harness/assets/evaluate-module-test-Caa5n0B9.js +0 -66
- package/bundled-test-harness/assets/eventmodeling-FCH6USID-B6XXU7R3.js +0 -3
- package/bundled-test-harness/assets/execute-atomic-operations-test-CT060oDk.js +0 -75
- package/bundled-test-harness/assets/externals-Do1fVZ4j.js +0 -5533
- package/bundled-test-harness/assets/extract-css-variables-test-DzjAsMgg.js +0 -169
- package/bundled-test-harness/assets/fallback-banner-test-CmxysrDn.js +0 -227
- package/bundled-test-harness/assets/fallback-banner-test-DJ4cO8PB.js +0 -53
- package/bundled-test-harness/assets/fallback-models-test-r5upJFeA.js +0 -163
- package/bundled-test-harness/assets/fetch-card-json-test-Di1wmvy5.js +0 -63
- package/bundled-test-harness/assets/fetcher-test-DjzNl_7F.js +0 -85
- package/bundled-test-harness/assets/field-configuration-test-C3vr-HhG.js +0 -535
- package/bundled-test-harness/assets/field-markdown-domain-test-DG2U4qIm.js +0 -615
- package/bundled-test-harness/assets/field-markdown-primitives-test-Bay2v8nT.js +0 -362
- package/bundled-test-harness/assets/field-markdown-specialized-test-Bl0Sl4sc.js +0 -527
- package/bundled-test-harness/assets/field-path-parser-test-bxxwUjcm.js +0 -387
- package/bundled-test-harness/assets/field-playground-test-Bcjfws4m.js +0 -902
- package/bundled-test-harness/assets/field-support-predicates-test-DYTqOGvv.js +0 -170
- package/bundled-test-harness/assets/field-test-helpers-DYSfSGdh.js +0 -45
- package/bundled-test-harness/assets/file-attachment-test-6ypDRDS7.js +0 -635
- package/bundled-test-harness/assets/file-chooser-test-mtmcHTFP.js +0 -439
- package/bundled-test-harness/assets/file-def-live-reload-test-CX1-lOv6.js +0 -50
- package/bundled-test-harness/assets/file-def-manager-DNHII2oj.js +0 -470
- package/bundled-test-harness/assets/file-def-manager-canonicalize-test-i_7UVakF.js +0 -451
- package/bundled-test-harness/assets/file-def-menu-items-test-Dw458iku.js +0 -114
- package/bundled-test-harness/assets/file-def-navigation-test-B3Ztr1Rd.js +0 -109
- package/bundled-test-harness/assets/file-def-serialization-test-C_gV8AkU.js +0 -87
- package/bundled-test-harness/assets/file-def-test-vXXJmtxX.js +0 -219
- package/bundled-test-harness/assets/file-tree-test-BJCiw9jm.js +0 -773
- package/bundled-test-harness/assets/flac-audio-def-test-BX3SE1vW.js +0 -138
- package/bundled-test-harness/assets/flowDiagram-I6XJVG4X-7Q5ROn4X.js +0 -4883
- package/bundled-test-harness/assets/formatted-aibot-message-test-DyqUz2nt.js +0 -366
- package/bundled-test-harness/assets/formatted-user-message-test-aqAzqvBP.js +0 -43
- package/bundled-test-harness/assets/freestyle-test-CLRrZkAE.js +0 -17
- package/bundled-test-harness/assets/full-reindex-realm-test-ClqPVQ0c.js +0 -103
- package/bundled-test-harness/assets/ganttDiagram-6RSMTGT7-BkDoIAAE.js +0 -4060
- package/bundled-test-harness/assets/garbage-collection-test-Ba2dD3qS.js +0 -373
- package/bundled-test-harness/assets/general-test-D0zhs14K.js +0 -926
- package/bundled-test-harness/assets/generate-css-variables-test-CKrXSlHs.js +0 -88
- package/bundled-test-harness/assets/generate-example-cards-one-shot-test-fSAdGJeT.js +0 -67
- package/bundled-test-harness/assets/get-available-realm-identifiers-test-BXMUW65I.js +0 -49
- package/bundled-test-harness/assets/get-catalog-realm-identifiers-test-DKEq6Zcq.js +0 -49
- package/bundled-test-harness/assets/get-default-writable-realm-test-Dp4nBIRP.js +0 -56
- package/bundled-test-harness/assets/get-realm-of-resource-identifier-test-DYNnMgD-.js +0 -55
- package/bundled-test-harness/assets/get-relationship-membership-state-test-k9EUNWeq.js +0 -1306
- package/bundled-test-harness/assets/get-type-refs-from-filter-test-BPuivF-v.js +0 -136
- package/bundled-test-harness/assets/get-user-system-card-test-DSHv00O7.js +0 -52
- package/bundled-test-harness/assets/gif-image-def-test-LuDSr5Kz.js +0 -161
- package/bundled-test-harness/assets/gitGraph-WXDBUCRP-BrG_LYEh.js +0 -3
- package/bundled-test-harness/assets/gitGraphDiagram-PVQCEYII-QJjQcX4J.js +0 -1150
- package/bundled-test-harness/assets/gts-file-def-test-bS3ML062.js +0 -99
- package/bundled-test-harness/assets/head-format-preview-test-B8IPh71E.js +0 -156
- package/bundled-test-harness/assets/helpers-wSIq-bau.js +0 -5
- package/bundled-test-harness/assets/host-mode-test-D44nXoQZ.js +0 -391
- package/bundled-test-harness/assets/host-submode-test-CefkXg9F.js +0 -904
- package/bundled-test-harness/assets/index-query-engine-test-DJnDqmfK.js +0 -2548
- package/bundled-test-harness/assets/index-writer-test-BcrCMj37.js +0 -1842
- package/bundled-test-harness/assets/indexeddb-crypto-store-RTTNdynf.js +0 -49434
- package/bundled-test-harness/assets/info-J43DQDTF-DhDzvz9k.js +0 -3
- package/bundled-test-harness/assets/infoDiagram-5YYISTIA-8TmRFIRz.js +0 -23
- package/bundled-test-harness/assets/inspector-test-D4iMBlbL.js +0 -1776
- package/bundled-test-harness/assets/instance-filter-matcher-test-CYT6N3hN.js +0 -564
- package/bundled-test-harness/assets/instantiate-card-test-j1JS5lDe.js +0 -104
- package/bundled-test-harness/assets/interact-submode-creation-and-permissions-test-B-aXzOh6.js +0 -497
- package/bundled-test-harness/assets/interact-submode-setup-VMwOUl3u.js +0 -558
- package/bundled-test-harness/assets/interact-submode-test-D5lNNXdq.js +0 -725
- package/bundled-test-harness/assets/invalidate-realm-identifiers-test-71Ze8eGV.js +0 -101
- package/bundled-test-harness/assets/invite-user-to-room-test-UfjsvwVp.js +0 -67
- package/bundled-test-harness/assets/ishikawaDiagram-YF4QCWOH-7UALIGwM.js +0 -1009
- package/bundled-test-harness/assets/isolated-render-test-C2IL-Fz3.js +0 -51
- package/bundled-test-harness/assets/item-button-6g7XYj56.js +0 -203
- package/bundled-test-harness/assets/javascript-BwLQ7_Nc.js +0 -75
- package/bundled-test-harness/assets/job-priority-header-test-C3FfKLPP.js +0 -81
- package/bundled-test-harness/assets/journeyDiagram-JHISSGLW-t4gEZYup.js +0 -1256
- package/bundled-test-harness/assets/jpg-image-def-test-BTBk9lk5.js +0 -430
- package/bundled-test-harness/assets/json-file-def-test-BpU_Eidn.js +0 -92
- package/bundled-test-harness/assets/kanban-definition-UN3LZRKU-C_KHB3_r.js +0 -1284
- package/bundled-test-harness/assets/last-modified-date-test-fE7IP0q0.js +0 -18
- package/bundled-test-harness/assets/limited-set-test-uu2vX1Sv.js +0 -123
- package/bundled-test-harness/assets/line-BiZHXOjs.js +0 -55
- package/bundled-test-harness/assets/linear-DUaMMmmA.js +0 -417
- package/bundled-test-harness/assets/linksto-broken-link-placeholder-test-qZeqQ1gt.js +0 -315
- package/bundled-test-harness/assets/linksto-error-sentinel-test-BaV3I8Xx.js +0 -236
- package/bundled-test-harness/assets/linksto-many-broken-link-placeholder-test-BvJi1vCb.js +0 -303
- package/bundled-test-harness/assets/linksto-many-per-slot-access-test-CK60Cugk.js +0 -301
- package/bundled-test-harness/assets/linksto-sentinel-roundtrip-test-BWxdEO9D.js +0 -258
- package/bundled-test-harness/assets/linksto-singular-js-access-contract-test-CIsLhqR2.js +0 -194
- package/bundled-test-harness/assets/live-prerendered-search-jZe3I16p.js +0 -639
- package/bundled-test-harness/assets/live-test-CF_R5WGr.js +0 -2
- package/bundled-test-harness/assets/live-test-jO7lXuyB.js +0 -100
- package/bundled-test-harness/assets/loader-icon-error-test-N4JYZuTx.js +0 -62
- package/bundled-test-harness/assets/loader-parallel-prefetch-test-DteeG7mU.js +0 -257
- package/bundled-test-harness/assets/loader-retry-test-DYVgpS_I.js +0 -173
- package/bundled-test-harness/assets/loader-test-DLI8JIx-.js +0 -245
- package/bundled-test-harness/assets/loading-test-D4ZBtRYf.js +0 -63
- package/bundled-test-harness/assets/login-error-text-test-Dcq7q3EY.js +0 -51
- package/bundled-test-harness/assets/m4a-audio-def-test-BKqGO-CW.js +0 -185
- package/bundled-test-harness/assets/main-BjBdsiQT.js +0 -5
- package/bundled-test-harness/assets/markdown-fallback-test-BBj80dZZ.js +0 -316
- package/bundled-test-harness/assets/markdown-file-def-test-BnMF5rQF.js +0 -286
- package/bundled-test-harness/assets/markdown-helpers-test-DnuuSLfS.js +0 -183
- package/bundled-test-harness/assets/markdown-highlighting-test-CWRp2Rce.js +0 -244
- package/bundled-test-harness/assets/markdown-preview-test-Bf5OqKGf.js +0 -237
- package/bundled-test-harness/assets/markdown-preview-yYHtwNeI.js +0 -69
- package/bundled-test-harness/assets/marked-sync-2EfimW4i.js +0 -2
- package/bundled-test-harness/assets/marked-sync-DZOVFLjK.js +0 -2561
- package/bundled-test-harness/assets/marked-sync-test-BaaYbZNF.js +0 -146
- package/bundled-test-harness/assets/matrix-service-sliding-sync-test-CdEy3ASW.js +0 -33
- package/bundled-test-harness/assets/mermaid-parser.core-CKNAdXJW.js +0 -114
- package/bundled-test-harness/assets/mermaid.core-C0mfwy8A.js +0 -1700
- package/bundled-test-harness/assets/message-service-subscription-test-pGz_7rz3.js +0 -113
- package/bundled-test-harness/assets/mindmap-definition-RKZ34NQL-ClcHxkdY.js +0 -1347
- package/bundled-test-harness/assets/mock-matrix-D7JHfFtT.js +0 -2
- package/bundled-test-harness/assets/mock-matrix-DqDbNhEj.js +0 -14292
- package/bundled-test-harness/assets/module-transpile-cache-test-D0M-fPxs.js +0 -66
- package/bundled-test-harness/assets/monaco.contribution-BEs3qwfd.js +0 -103
- package/bundled-test-harness/assets/monaco.contribution-Dpx8UiPl.js +0 -2
- package/bundled-test-harness/assets/monaco.contribution-RF_qxJYG.js +0 -2
- package/bundled-test-harness/assets/monaco.contribution-jPVrF29f.js +0 -243
- package/bundled-test-harness/assets/mp3-audio-def-test-CxeRk1bl.js +0 -129
- package/bundled-test-harness/assets/mutex-test-D1xyxTj2.js +0 -71
- package/bundled-test-harness/assets/number-field-test-gjAGDy6P.js +0 -153
- package/bundled-test-harness/assets/ogg-audio-def-test-B6Ww3Ixr.js +0 -191
- package/bundled-test-harness/assets/open-create-listing-modal-test-uN58T3rI.js +0 -117
- package/bundled-test-harness/assets/open-workspace-test-DXVsvBFJ.js +0 -48
- package/bundled-test-harness/assets/operator-mode-acceptance-test-BxIq2xSS.js +0 -1044
- package/bundled-test-harness/assets/operator-mode-card-catalog-test-xFYx9_ng.js +0 -989
- package/bundled-test-harness/assets/operator-mode-links-test-qhXWmz-S.js +0 -797
- package/bundled-test-harness/assets/operator-mode-state-service-test-BdA_uvaY.js +0 -122
- package/bundled-test-harness/assets/operator-mode-test-D3EyTwq3.js +0 -617
- package/bundled-test-harness/assets/operator-mode-ui-test-CSrk6Q0A.js +0 -985
- package/bundled-test-harness/assets/ordinal-DO1mUmjg.js +0 -85
- package/bundled-test-harness/assets/overlay-menu-items-test-CuqqLsQT.js +0 -316
- package/bundled-test-harness/assets/packet-YPE3B663--JkMNy78.js +0 -3
- package/bundled-test-harness/assets/panel-C2rtbx32.js +0 -3371
- package/bundled-test-harness/assets/past-sessions-test-B9SCbbXz.js +0 -316
- package/bundled-test-harness/assets/patch-code-test-CcFr9pDb.js +0 -203
- package/bundled-test-harness/assets/patch-fields-test-BW1gzcJM.js +0 -992
- package/bundled-test-harness/assets/patch-instance-test-DKqA9gQ6.js +0 -287
- package/bundled-test-harness/assets/persist-module-inspector-view-test-D1eKBUkt.js +0 -62
- package/bundled-test-harness/assets/phone-number-field-test-D1is5RWv.js +0 -72
- package/bundled-test-harness/assets/pie-LRSECV5Y-BDVv8Wdy.js +0 -3
- package/bundled-test-harness/assets/pieDiagram-4H26LBE5-CSYI-nMz.js +0 -253
- package/bundled-test-harness/assets/plan-install-test-DB-PrjPR.js +0 -417
- package/bundled-test-harness/assets/playground-B0iQV7dU.js +0 -57
- package/bundled-test-harness/assets/png-image-def-test-DnOsJGs6.js +0 -222
- package/bundled-test-harness/assets/prerender-file-extract-test-DhOLozj2.js +0 -176
- package/bundled-test-harness/assets/prerender-html-test-DKVhQZA9.js +0 -615
- package/bundled-test-harness/assets/prerender-meta-test-CnRNyqSz.js +0 -388
- package/bundled-test-harness/assets/prerender-module-test-D163QcrZ.js +0 -195
- package/bundled-test-harness/assets/prerendered-card-search-test-DX-8yabJ.js +0 -708
- package/bundled-test-harness/assets/preview-format-test-H7bnpdlC.js +0 -103
- package/bundled-test-harness/assets/preview-test-B7u6uWJR.js +0 -455
- package/bundled-test-harness/assets/qs-test-COb0mre6.js +0 -36
- package/bundled-test-harness/assets/quadrantDiagram-W4KKPZXB-2Y2ben29.js +0 -2324
- package/bundled-test-harness/assets/query-field-barrier-test-Cypj-MhK.js +0 -118
- package/bundled-test-harness/assets/query-field-error-sentinel-test-Dnqn8TdN.js +0 -202
- package/bundled-test-harness/assets/query-field-normalization-test-B7D8SHBP.js +0 -271
- package/bundled-test-harness/assets/query-field-schema-test-DIYY3-c8.js +0 -231
- package/bundled-test-harness/assets/query-fields-test-k-VBF9PE.js +0 -535
- package/bundled-test-harness/assets/queue-test-B_74vXZE.js +0 -216
- package/bundled-test-harness/assets/radar-GUYGQ44K-Cn2A0VBR.js +0 -3
- package/bundled-test-harness/assets/read-card-for-ai-assistant-test-SyL9F_La.js +0 -91
- package/bundled-test-harness/assets/read-file-for-ai-assistant-test-nLPp49U2.js +0 -45
- package/bundled-test-harness/assets/read-source-test-DBELJkhN.js +0 -67
- package/bundled-test-harness/assets/read-text-file-test-CP1JuWlX.js +0 -124
- package/bundled-test-harness/assets/realm-Dr4iygv_.js +0 -884
- package/bundled-test-harness/assets/realm-field-test-Cice2mYk.js +0 -101
- package/bundled-test-harness/assets/realm-index-card-id-test-BzpozdWc.js +0 -18
- package/bundled-test-harness/assets/realm-indexing-test-C0YSXziR.js +0 -4018
- package/bundled-test-harness/assets/realm-paths-test-DV_g07rF.js +0 -33
- package/bundled-test-harness/assets/realm-querying-test-B526abM0.js +0 -1062
- package/bundled-test-harness/assets/realm-test-D8UN5X-w.js +0 -2409
- package/bundled-test-harness/assets/reasoning-test-ClIOvdkX.js +0 -234
- package/bundled-test-harness/assets/recent-files-test-C2J_dJUD.js +0 -449
- package/bundled-test-harness/assets/reindex-realm-test-DMphy1g6.js +0 -119
- package/bundled-test-harness/assets/relationship-loading-state-test-BWrZdLlZ.js +0 -289
- package/bundled-test-harness/assets/render-component-BII_KnyK.js +0 -2
- package/bundled-test-harness/assets/render-error-test-BUAJJlUi.js +0 -22
- package/bundled-test-harness/assets/render-service-test-BKkCjErY.js +0 -87
- package/bundled-test-harness/assets/render-timer-stub-test-TUDMWJ8v.js +0 -84
- package/bundled-test-harness/assets/rendered-markdown-ColekGTF.js +0 -211
- package/bundled-test-harness/assets/rendered-markdown-test-B4CWIo02.js +0 -360
- package/bundled-test-harness/assets/requirementDiagram-4Y6WPE33-CTICatxk.js +0 -2550
- package/bundled-test-harness/assets/rich-markdown-field-test-B5u6D3Nk.js +0 -806
- package/bundled-test-harness/assets/room-message-test-0eJSqQfu.js +0 -171
- package/bundled-test-harness/assets/rust-crypto-B0m3j_yZ.js +0 -16141
- package/bundled-test-harness/assets/sanitize-module-list-test-rH6OqjKh.js +0 -68
- package/bundled-test-harness/assets/sankeyDiagram-5OEKKPKP-hBIg6-LP.js +0 -1357
- package/bundled-test-harness/assets/schema-editor-test-DH4MLFCD.js +0 -784
- package/bundled-test-harness/assets/schema-generation-test-BZMkX7VA.js +0 -28
- package/bundled-test-harness/assets/scrolling-test-CFTyLG8X.js +0 -292
- package/bundled-test-harness/assets/search-and-choose-test-CcbVyp4c.js +0 -156
- package/bundled-test-harness/assets/search-cache-key-test-BYt46iNT.js +0 -79
- package/bundled-test-harness/assets/search-command-test-BRIJPr54.js +0 -135
- package/bundled-test-harness/assets/search-correlation-id-test-B298Tfux.js +0 -101
- package/bundled-test-harness/assets/search-data-test-DHV2Fd4S.js +0 -243
- package/bundled-test-harness/assets/search-google-images-test-CNrazllP.js +0 -168
- package/bundled-test-harness/assets/search-in-flight-key-test-Dy3bU2c1.js +0 -79
- package/bundled-test-harness/assets/search-test-DL1-gD-G.js +0 -847
- package/bundled-test-harness/assets/send-ai-assistant-message-test-CyEkQ5pD.js +0 -52
- package/bundled-test-harness/assets/send-bot-trigger-event-test-CAsK28m-.js +0 -56
- package/bundled-test-harness/assets/send-request-via-proxy-test-DpMlRvPv.js +0 -333
- package/bundled-test-harness/assets/sending-test-BOeGYcTU.js +0 -317
- package/bundled-test-harness/assets/sequenceDiagram-3UESZ5HK-DQMiI040.js +0 -5551
- package/bundled-test-harness/assets/serialization-test-gY2QQVxS.js +0 -8283
- package/bundled-test-harness/assets/set-user-system-card-test-BE3y5GNK.js +0 -59
- package/bundled-test-harness/assets/setup-B8O9JQKq.js +0 -769
- package/bundled-test-harness/assets/setup-BMqGUBDK.js +0 -2
- package/bundled-test-harness/assets/show-card-test-BfJNnWMy.js +0 -362
- package/bundled-test-harness/assets/skills-test-CqhnZxBi.js +0 -568
- package/bundled-test-harness/assets/spec-test-BUKNn_1q.js +0 -1012
- package/bundled-test-harness/assets/stateDiagram-AJRCARHV-BoOij2yt.js +0 -363
- package/bundled-test-harness/assets/stateDiagram-v2-BHNVJYJU-Dosil5p2.js +0 -29
- package/bundled-test-harness/assets/store-add-test-BR1M-IDR.js +0 -52
- package/bundled-test-harness/assets/store-test-DaqI-HRh.js +0 -1562
- package/bundled-test-harness/assets/summarize-session-test-BMg54JGF.js +0 -169
- package/bundled-test-harness/assets/svg-image-def-test-xNyIKRPV.js +0 -164
- package/bundled-test-harness/assets/switch-submode-test-BKvpODUD.js +0 -168
- package/bundled-test-harness/assets/test-realm-service-worker-DK4SmTM5.js +0 -73
- package/bundled-test-harness/assets/tests-x4_eRjiT.js +0 -2770
- package/bundled-test-harness/assets/text-file-def-test-CsXiyVfI.js +0 -93
- package/bundled-test-harness/assets/text-input-validator-test-D4s_laO7.js +0 -155
- package/bundled-test-harness/assets/text-suggestion-test-CkLf1xuS.js +0 -339
- package/bundled-test-harness/assets/theme-card-test-D-6L6OfD.js +0 -573
- package/bundled-test-harness/assets/timeline-definition-PNZ67QCA-DD2d81uJ.js +0 -1545
- package/bundled-test-harness/assets/transform-cards-test-CRZF2gqZ.js +0 -341
- package/bundled-test-harness/assets/treeView-BLDUP644-CUm8wuM-.js +0 -3
- package/bundled-test-harness/assets/treemap-LRROVOQU-lbLrY2PE.js +0 -3
- package/bundled-test-harness/assets/ts-file-def-test-CDo6ojCf.js +0 -90
- package/bundled-test-harness/assets/tsMode-BPQoRibc.js +0 -968
- package/bundled-test-harness/assets/typescript-BaU6yDhK.js +0 -2
- package/bundled-test-harness/assets/update-room-skills-test-BnSgVFwT.js +0 -197
- package/bundled-test-harness/assets/url-test-CK-HB0qu.js +0 -103
- package/bundled-test-harness/assets/use-ai-assistant-test-BuJXEP8H.js +0 -330
- package/bundled-test-harness/assets/validate-realm-test-Cx7MOtS8.js +0 -53
- package/bundled-test-harness/assets/vennDiagram-CIIHVFJN-DtXtzGwZ.js +0 -2833
- package/bundled-test-harness/assets/wardley-L42UT6IY-D8aCp_Ox.js +0 -3
- package/bundled-test-harness/assets/wardleyDiagram-YWT4CUSO-D-73g3bB.js +0 -872
- package/bundled-test-harness/assets/wav-audio-def-test-DIo2GzQL.js +0 -155
- package/bundled-test-harness/assets/webp-image-def-test-BQsV0_De.js +0 -225
- package/bundled-test-harness/assets/workspace-chooser-delete-test-peDXmnQf.js +0 -189
- package/bundled-test-harness/assets/workspace-chooser-test-DS2RtTEF.js +0 -235
- package/bundled-test-harness/assets/workspace-delete-multiple-test-DTbjRSzN.js +0 -213
- package/bundled-test-harness/assets/workspace-delete-summary-test-B--ink4m.js +0 -63
- package/bundled-test-harness/assets/write-binary-file-test-A3TQ5lFn.js +0 -100
- package/bundled-test-harness/assets/write-text-file-test-D_rjNDsT.js +0 -172
- package/bundled-test-harness/assets/xychartDiagram-2RQKCTM6-D1aoqDp-.js +0 -2551
- /package/bundled-test-harness/assets/{abap-CLdVBGqB.js → abap-FZAuBTMl.js} +0 -0
- /package/bundled-test-harness/assets/{apex-DV8eHjgQ.js → apex-CAO3qFTc.js} +0 -0
- /package/bundled-test-harness/assets/{array-DsDWWqmW.js → array-CRfHnEm4.js} +0 -0
- /package/bundled-test-harness/assets/{azcli-C4pZYsiJ.js → azcli-Bnu7jG0Y.js} +0 -0
- /package/bundled-test-harness/assets/{bat-DBoaeFpB.js → bat-DdE54Pqq.js} +0 -0
- /package/bundled-test-harness/assets/{bicep-VlrJhbeK.js → bicep-Dp4vFp3K.js} +0 -0
- /package/bundled-test-harness/assets/{cameligo-jyzrvLUm.js → cameligo-Cym4x98m.js} +0 -0
- /package/bundled-test-harness/assets/{chunk-NNHCCRGN-Be15HUz2.js → chunk-NNHCCRGN-PWOfDYpb.js} +0 -0
- /package/bundled-test-harness/assets/{clojure-bzahmEtz.js → clojure-B47IJ25u.js} +0 -0
- /package/bundled-test-harness/assets/{codemirror-context-BauLYUNt.js → codemirror-context-oJy03XqC.js} +0 -0
- /package/bundled-test-harness/assets/{coffee-CMADdzOH.js → coffee-CZlkBXT8.js} +0 -0
- /package/bundled-test-harness/assets/{cpp-CEJwzcLE.js → cpp-mX4KaA7p.js} +0 -0
- /package/bundled-test-harness/assets/{csharp-XYqm0UE0.js → csharp-C-OeDGwk.js} +0 -0
- /package/bundled-test-harness/assets/{csp-82fNWQc2.js → csp-AS2OEE8R.js} +0 -0
- /package/bundled-test-harness/assets/{css-B5b0ooFS.js → css-C-TQxhWe.js} +0 -0
- /package/bundled-test-harness/assets/{cssMode-DTKuqAkO.js → cssMode-C87GnEsk.js} +0 -0
- /package/bundled-test-harness/assets/{cypher-Df9GkdDY.js → cypher-T6F_0eIM.js} +0 -0
- /package/bundled-test-harness/assets/{cytoscape.esm-D0iwZ9Jj.js → cytoscape.esm-Bc2V-MhP.js} +0 -0
- /package/bundled-test-harness/assets/{dart-C4JY9dMc.js → dart-DzVesk0n.js} +0 -0
- /package/bundled-test-harness/assets/{defaultLocale-BtLxQtxy.js → defaultLocale-CAoL4lzt.js} +0 -0
- /package/bundled-test-harness/assets/{dist-D-PuK2H3.js → dist-BZ5MfZEJ.js} +0 -0
- /package/bundled-test-harness/assets/{dockerfile-Ck0tNttO.js → dockerfile-BH0_bQxC.js} +0 -0
- /package/bundled-test-harness/assets/{ecl-BpeXqJR_.js → ecl-KIxjxrJo.js} +0 -0
- /package/bundled-test-harness/assets/{elixir-HmBzrXaX.js → elixir-CPPdtCW1.js} +0 -0
- /package/bundled-test-harness/assets/{flow9-DhsfsDhH.js → flow9-Dxho7Ldf.js} +0 -0
- /package/bundled-test-harness/assets/{freemarker2-D3Yd6nGl.js → freemarker2-DP1aOr3_.js} +0 -0
- /package/bundled-test-harness/assets/{fsharp-D56OprHc.js → fsharp-ozN53Joe.js} +0 -0
- /package/bundled-test-harness/assets/{go-BITsFLfX.js → go-DPj6Rbqe.js} +0 -0
- /package/bundled-test-harness/assets/{graphlib-qkaQhadO.js → graphlib-DOITgaas.js} +0 -0
- /package/bundled-test-harness/assets/{graphql-CJJVsEX1.js → graphql-C8_-AnBG.js} +0 -0
- /package/bundled-test-harness/assets/{handlebars-Dvw6QbL7.js → handlebars-B2gYBZpU.js} +0 -0
- /package/bundled-test-harness/assets/{hcl-DSTZcJuq.js → hcl-r3d7BhXB.js} +0 -0
- /package/bundled-test-harness/assets/{helpers-D_JZYUOQ.js → helpers-CItTycq2.js} +0 -0
- /package/bundled-test-harness/assets/{html-Bik3qLmc.js → html-DhN1Nxr0.js} +0 -0
- /package/bundled-test-harness/assets/{htmlMode-DPCaR3Ab.js → htmlMode-BnBg5hCh.js} +0 -0
- /package/bundled-test-harness/assets/{ini-li-kC8ZU.js → ini-CzzRigmS.js} +0 -0
- /package/bundled-test-harness/assets/{init-Bq7IGMcH.js → init-Bd2YUhsG.js} +0 -0
- /package/bundled-test-harness/assets/{java-CETpuNN7.js → java-BgeDsIoV.js} +0 -0
- /package/bundled-test-harness/assets/{jsonMode-CZ3hOG-W.js → jsonMode-sRb0gsB8.js} +0 -0
- /package/bundled-test-harness/assets/{julia-hgihs1aN.js → julia-u3K1H5Ts.js} +0 -0
- /package/bundled-test-harness/assets/{katex-DqhsSYO4.js → katex-CHY7BUZt.js} +0 -0
- /package/bundled-test-harness/assets/{kotlin-CKfyb82K.js → kotlin-DfqmlJ10.js} +0 -0
- /package/bundled-test-harness/assets/{less-xB5yXbw8.js → less-CSzH7DPY.js} +0 -0
- /package/bundled-test-harness/assets/{lexon-BLwrXVrI.js → lexon-DwPTpxXt.js} +0 -0
- /package/bundled-test-harness/assets/{liquid-Bf2lpknJ.js → liquid-95J9g5Vk.js} +0 -0
- /package/bundled-test-harness/assets/{lua-Ch5i3IrF.js → lua-CGw6zbeh.js} +0 -0
- /package/bundled-test-harness/assets/{m3-D5tNlhaF.js → m3-BfgwloGF.js} +0 -0
- /package/bundled-test-harness/assets/{markdown-Dzc9uMky.js → markdown-RZRK7Mc9.js} +0 -0
- /package/bundled-test-harness/assets/{mdx-xsI4TJrf.js → mdx-BYD-W2sn.js} +0 -0
- /package/bundled-test-harness/assets/{mips-CmdzHkQm.js → mips-DAySN5Lp.js} +0 -0
- /package/bundled-test-harness/assets/{msdax-CAZvxB9E.js → msdax-Cy0COjTJ.js} +0 -0
- /package/bundled-test-harness/assets/{mysql-CyVS-z5H.js → mysql-CfGw9jyw.js} +0 -0
- /package/bundled-test-harness/assets/{objective-c-CCG8cTc_.js → objective-c-B4uU-8T-.js} +0 -0
- /package/bundled-test-harness/assets/{pascal-c8B45FOC.js → pascal-CGDuZzXi.js} +0 -0
- /package/bundled-test-harness/assets/{pascaligo-CCqwSqBv.js → pascaligo-eg02k4VJ.js} +0 -0
- /package/bundled-test-harness/assets/{path-CsS38UoK.js → path-Dxiz9G2t.js} +0 -0
- /package/bundled-test-harness/assets/{perl-JUICYbO2.js → perl-BiT-JJJw.js} +0 -0
- /package/bundled-test-harness/assets/{pgsql-aNRiL0Cg.js → pgsql-DAMjrVBF.js} +0 -0
- /package/bundled-test-harness/assets/{php-B0YZj_Vw.js → php-kOSUYQyc.js} +0 -0
- /package/bundled-test-harness/assets/{pla-D3Zb3KCn.js → pla-BShYV-HC.js} +0 -0
- /package/bundled-test-harness/assets/{postiats-ks1KABlA.js → postiats-9Xamd4W2.js} +0 -0
- /package/bundled-test-harness/assets/{powerquery-D35K_osc.js → powerquery-l2Nw525Q.js} +0 -0
- /package/bundled-test-harness/assets/{powershell-DXQo6KTk.js → powershell-B5rdEn86.js} +0 -0
- /package/bundled-test-harness/assets/{protobuf-CFDvn49_.js → protobuf-DjFcruCV.js} +0 -0
- /package/bundled-test-harness/assets/{pug-CGdWzJm1.js → pug-d79Nz4-Z.js} +0 -0
- /package/bundled-test-harness/assets/{python-BHLYjYlP.js → python-d8oxFZIM.js} +0 -0
- /package/bundled-test-harness/assets/{qsharp-BIq3i63T.js → qsharp-CeTlfxZW.js} +0 -0
- /package/bundled-test-harness/assets/{qunit-2hoQyeAZ.js → qunit-Cqwmt9Vl.js} +0 -0
- /package/bundled-test-harness/assets/{r-CBvzvDSA.js → r-BOu7JTro.js} +0 -0
- /package/bundled-test-harness/assets/{razor-JQ0RiIvo.js → razor-ZatoG_Is.js} +0 -0
- /package/bundled-test-harness/assets/{recent-files-cards-BQMviQb1.js → recent-files-cards-C3vIjaKb.js} +0 -0
- /package/bundled-test-harness/assets/{redis-BmSHTqTU.js → redis-DdXYPyQE.js} +0 -0
- /package/bundled-test-harness/assets/{redshift-B1NmQEH7.js → redshift-DswnW-YX.js} +0 -0
- /package/bundled-test-harness/assets/{render-component-g_fhz2dX.js → render-component-Bs21y6iv.js} +0 -0
- /package/bundled-test-harness/assets/{restructuredtext-Br9BtTbk.js → restructuredtext-C75vUmvX.js} +0 -0
- /package/bundled-test-harness/assets/{rough.esm-D8VnzNsL.js → rough.esm-B83ARgx6.js} +0 -0
- /package/bundled-test-harness/assets/{ruby-D9_-y1I3.js → ruby-D77950a-.js} +0 -0
- /package/bundled-test-harness/assets/{rust-1Jjr1EOs.js → rust-C_G4PKsG.js} +0 -0
- /package/bundled-test-harness/assets/{sb-X2JE4zEr.js → sb-Cz3P8_Gp.js} +0 -0
- /package/bundled-test-harness/assets/{scala-qFJERKkR.js → scala-DYqUg04P.js} +0 -0
- /package/bundled-test-harness/assets/{scheme-D-WJPStO.js → scheme-B31XEGu5.js} +0 -0
- /package/bundled-test-harness/assets/{scss-DysfZiXA.js → scss-CtvB8On5.js} +0 -0
- /package/bundled-test-harness/assets/{shell-C0Iu3NNJ.js → shell-C2QqpcPN.js} +0 -0
- /package/bundled-test-harness/assets/{solidity-Bato3Qrk.js → solidity-FHrhZFd-.js} +0 -0
- /package/bundled-test-harness/assets/{sophia-DI0cKdK8.js → sophia-Cxv5FOXb.js} +0 -0
- /package/bundled-test-harness/assets/{sparql-BTJMtwoD.js → sparql-CgGkGeQB.js} +0 -0
- /package/bundled-test-harness/assets/{sql-R6uHqFYU.js → sql-S6Dos2P0.js} +0 -0
- /package/bundled-test-harness/assets/{src-CdPyB7gY.js → src-CvuaVSsl.js} +0 -0
- /package/bundled-test-harness/assets/{st-CoyBvq37.js → st-Bfa7LAWp.js} +0 -0
- /package/bundled-test-harness/assets/{swift-Bj-haAlF.js → swift-BQD5Ef-A.js} +0 -0
- /package/bundled-test-harness/assets/{systemverilog-B-x1NEFI.js → systemverilog-DaNkPux4.js} +0 -0
- /package/bundled-test-harness/assets/{tcl-DAUdSQgz.js → tcl-gOPgCDyb.js} +0 -0
- /package/bundled-test-harness/assets/{test-support-BHjxBpDK.js → test-support-BEQX5x9U.js} +0 -0
- /package/bundled-test-harness/assets/{test-support-yKvYEh-u.js → test-support-BL4XKobD.js} +0 -0
- /package/bundled-test-harness/assets/{twig-B0sJ-GzS.js → twig-Bk4gPn5b.js} +0 -0
- /package/bundled-test-harness/assets/{typescript-DTMIM5Gl.js → typescript-pPYlxWzr.js} +0 -0
- /package/bundled-test-harness/assets/{typespec-6yo9VQxY.js → typespec-D9Zz743B.js} +0 -0
- /package/bundled-test-harness/assets/{vb-Bh2IfdtJ.js → vb-ziqHIsJV.js} +0 -0
- /package/bundled-test-harness/assets/{view-card-demo-U_AOj-RK.js → view-card-demo-CSIVYD3T.js} +0 -0
- /package/bundled-test-harness/assets/{wgsl-DsvJnCCt.js → wgsl-BXiwkiJL.js} +0 -0
- /package/bundled-test-harness/assets/{xml-CisPXcjD.js → xml-a_tUOik-.js} +0 -0
- /package/bundled-test-harness/assets/{yaml-DkHUoYI5.js → yaml-B3H8LDzK.js} +0 -0
|
@@ -1,4275 +0,0 @@
|
|
|
1
|
-
import { s as __toESM, t as __commonJSMin } from "./chunk-CGdGNDIi.js";
|
|
2
|
-
import { g as log, h as __name$1, p as select_default } from "./src-CdPyB7gY.js";
|
|
3
|
-
import { t as cytoscape$1 } from "./cytoscape.esm-D0iwZ9Jj.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/layout-base@1.0.2/node_modules/layout-base/layout-base.js
|
|
5
|
-
var require_layout_base = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
7
|
-
if (typeof exports === "object" && typeof module === "object") module.exports = factory();
|
|
8
|
-
else if (typeof define === "function" && define.amd) define([], factory);
|
|
9
|
-
else if (typeof exports === "object") exports["layoutBase"] = factory();
|
|
10
|
-
else root["layoutBase"] = factory();
|
|
11
|
-
})(exports, function() {
|
|
12
|
-
return function(modules) {
|
|
13
|
-
// webpackBootstrap
|
|
14
|
-
var installedModules = {};
|
|
15
|
-
function __webpack_require__(moduleId) {
|
|
16
|
-
if (installedModules[moduleId]) return installedModules[moduleId].exports;
|
|
17
|
-
var module$15 = installedModules[moduleId] = {
|
|
18
|
-
i: moduleId,
|
|
19
|
-
l: false,
|
|
20
|
-
exports: {}
|
|
21
|
-
};
|
|
22
|
-
modules[moduleId].call(module$15.exports, module$15, module$15.exports, __webpack_require__);
|
|
23
|
-
module$15.l = true;
|
|
24
|
-
return module$15.exports;
|
|
25
|
-
}
|
|
26
|
-
__webpack_require__.m = modules;
|
|
27
|
-
__webpack_require__.c = installedModules;
|
|
28
|
-
__webpack_require__.i = function(value) {
|
|
29
|
-
return value;
|
|
30
|
-
};
|
|
31
|
-
__webpack_require__.d = function(exports$13, name, getter) {
|
|
32
|
-
if (!__webpack_require__.o(exports$13, name)) Object.defineProperty(exports$13, name, {
|
|
33
|
-
configurable: false,
|
|
34
|
-
enumerable: true,
|
|
35
|
-
get: getter
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
__webpack_require__.n = function(module$16) {
|
|
39
|
-
var getter = module$16 && module$16.__esModule ? function getDefault() {
|
|
40
|
-
return module$16["default"];
|
|
41
|
-
} : function getModuleExports() {
|
|
42
|
-
return module$16;
|
|
43
|
-
};
|
|
44
|
-
__webpack_require__.d(getter, "a", getter);
|
|
45
|
-
return getter;
|
|
46
|
-
};
|
|
47
|
-
__webpack_require__.o = function(object, property) {
|
|
48
|
-
return Object.prototype.hasOwnProperty.call(object, property);
|
|
49
|
-
};
|
|
50
|
-
__webpack_require__.p = "";
|
|
51
|
-
return __webpack_require__(__webpack_require__.s = 26);
|
|
52
|
-
}([
|
|
53
|
-
(function(module$17, exports$14, __webpack_require__) {
|
|
54
|
-
"use strict";
|
|
55
|
-
function LayoutConstants() {}
|
|
56
|
-
/**
|
|
57
|
-
* Layout Quality: 0:draft, 1:default, 2:proof
|
|
58
|
-
*/
|
|
59
|
-
LayoutConstants.QUALITY = 1;
|
|
60
|
-
/**
|
|
61
|
-
* Default parameters
|
|
62
|
-
*/
|
|
63
|
-
LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false;
|
|
64
|
-
LayoutConstants.DEFAULT_INCREMENTAL = false;
|
|
65
|
-
LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true;
|
|
66
|
-
LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false;
|
|
67
|
-
LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50;
|
|
68
|
-
LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false;
|
|
69
|
-
LayoutConstants.DEFAULT_GRAPH_MARGIN = 15;
|
|
70
|
-
LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false;
|
|
71
|
-
LayoutConstants.SIMPLE_NODE_SIZE = 40;
|
|
72
|
-
LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2;
|
|
73
|
-
LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40;
|
|
74
|
-
LayoutConstants.MIN_EDGE_LENGTH = 1;
|
|
75
|
-
LayoutConstants.WORLD_BOUNDARY = 1e6;
|
|
76
|
-
LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1e3;
|
|
77
|
-
LayoutConstants.WORLD_CENTER_X = 1200;
|
|
78
|
-
LayoutConstants.WORLD_CENTER_Y = 900;
|
|
79
|
-
module$17.exports = LayoutConstants;
|
|
80
|
-
}),
|
|
81
|
-
(function(module$18, exports$15, __webpack_require__) {
|
|
82
|
-
"use strict";
|
|
83
|
-
var LGraphObject = __webpack_require__(2);
|
|
84
|
-
var IGeometry = __webpack_require__(8);
|
|
85
|
-
var IMath = __webpack_require__(9);
|
|
86
|
-
function LEdge(source, target, vEdge) {
|
|
87
|
-
LGraphObject.call(this, vEdge);
|
|
88
|
-
this.isOverlapingSourceAndTarget = false;
|
|
89
|
-
this.vGraphObject = vEdge;
|
|
90
|
-
this.bendpoints = [];
|
|
91
|
-
this.source = source;
|
|
92
|
-
this.target = target;
|
|
93
|
-
}
|
|
94
|
-
LEdge.prototype = Object.create(LGraphObject.prototype);
|
|
95
|
-
for (var prop in LGraphObject) LEdge[prop] = LGraphObject[prop];
|
|
96
|
-
LEdge.prototype.getSource = function() {
|
|
97
|
-
return this.source;
|
|
98
|
-
};
|
|
99
|
-
LEdge.prototype.getTarget = function() {
|
|
100
|
-
return this.target;
|
|
101
|
-
};
|
|
102
|
-
LEdge.prototype.isInterGraph = function() {
|
|
103
|
-
return this.isInterGraph;
|
|
104
|
-
};
|
|
105
|
-
LEdge.prototype.getLength = function() {
|
|
106
|
-
return this.length;
|
|
107
|
-
};
|
|
108
|
-
LEdge.prototype.isOverlapingSourceAndTarget = function() {
|
|
109
|
-
return this.isOverlapingSourceAndTarget;
|
|
110
|
-
};
|
|
111
|
-
LEdge.prototype.getBendpoints = function() {
|
|
112
|
-
return this.bendpoints;
|
|
113
|
-
};
|
|
114
|
-
LEdge.prototype.getLca = function() {
|
|
115
|
-
return this.lca;
|
|
116
|
-
};
|
|
117
|
-
LEdge.prototype.getSourceInLca = function() {
|
|
118
|
-
return this.sourceInLca;
|
|
119
|
-
};
|
|
120
|
-
LEdge.prototype.getTargetInLca = function() {
|
|
121
|
-
return this.targetInLca;
|
|
122
|
-
};
|
|
123
|
-
LEdge.prototype.getOtherEnd = function(node) {
|
|
124
|
-
if (this.source === node) return this.target;
|
|
125
|
-
else if (this.target === node) return this.source;
|
|
126
|
-
else throw "Node is not incident with this edge";
|
|
127
|
-
};
|
|
128
|
-
LEdge.prototype.getOtherEndInGraph = function(node, graph) {
|
|
129
|
-
var otherEnd = this.getOtherEnd(node);
|
|
130
|
-
var root = graph.getGraphManager().getRoot();
|
|
131
|
-
while (true) {
|
|
132
|
-
if (otherEnd.getOwner() == graph) return otherEnd;
|
|
133
|
-
if (otherEnd.getOwner() == root) break;
|
|
134
|
-
otherEnd = otherEnd.getOwner().getParent();
|
|
135
|
-
}
|
|
136
|
-
return null;
|
|
137
|
-
};
|
|
138
|
-
LEdge.prototype.updateLength = function() {
|
|
139
|
-
var clipPointCoordinates = new Array(4);
|
|
140
|
-
this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates);
|
|
141
|
-
if (!this.isOverlapingSourceAndTarget) {
|
|
142
|
-
this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2];
|
|
143
|
-
this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3];
|
|
144
|
-
if (Math.abs(this.lengthX) < 1) this.lengthX = IMath.sign(this.lengthX);
|
|
145
|
-
if (Math.abs(this.lengthY) < 1) this.lengthY = IMath.sign(this.lengthY);
|
|
146
|
-
this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
LEdge.prototype.updateLengthSimple = function() {
|
|
150
|
-
this.lengthX = this.target.getCenterX() - this.source.getCenterX();
|
|
151
|
-
this.lengthY = this.target.getCenterY() - this.source.getCenterY();
|
|
152
|
-
if (Math.abs(this.lengthX) < 1) this.lengthX = IMath.sign(this.lengthX);
|
|
153
|
-
if (Math.abs(this.lengthY) < 1) this.lengthY = IMath.sign(this.lengthY);
|
|
154
|
-
this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
|
|
155
|
-
};
|
|
156
|
-
module$18.exports = LEdge;
|
|
157
|
-
}),
|
|
158
|
-
(function(module$19, exports$16, __webpack_require__) {
|
|
159
|
-
"use strict";
|
|
160
|
-
function LGraphObject(vGraphObject) {
|
|
161
|
-
this.vGraphObject = vGraphObject;
|
|
162
|
-
}
|
|
163
|
-
module$19.exports = LGraphObject;
|
|
164
|
-
}),
|
|
165
|
-
(function(module$20, exports$17, __webpack_require__) {
|
|
166
|
-
"use strict";
|
|
167
|
-
var LGraphObject = __webpack_require__(2);
|
|
168
|
-
var Integer = __webpack_require__(10);
|
|
169
|
-
var RectangleD = __webpack_require__(13);
|
|
170
|
-
var LayoutConstants = __webpack_require__(0);
|
|
171
|
-
var RandomSeed = __webpack_require__(16);
|
|
172
|
-
var PointD = __webpack_require__(4);
|
|
173
|
-
function LNode(gm, loc, size, vNode) {
|
|
174
|
-
if (size == null && vNode == null) vNode = loc;
|
|
175
|
-
LGraphObject.call(this, vNode);
|
|
176
|
-
if (gm.graphManager != null) gm = gm.graphManager;
|
|
177
|
-
this.estimatedSize = Integer.MIN_VALUE;
|
|
178
|
-
this.inclusionTreeDepth = Integer.MAX_VALUE;
|
|
179
|
-
this.vGraphObject = vNode;
|
|
180
|
-
this.edges = [];
|
|
181
|
-
this.graphManager = gm;
|
|
182
|
-
if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);
|
|
183
|
-
else this.rect = new RectangleD();
|
|
184
|
-
}
|
|
185
|
-
LNode.prototype = Object.create(LGraphObject.prototype);
|
|
186
|
-
for (var prop in LGraphObject) LNode[prop] = LGraphObject[prop];
|
|
187
|
-
LNode.prototype.getEdges = function() {
|
|
188
|
-
return this.edges;
|
|
189
|
-
};
|
|
190
|
-
LNode.prototype.getChild = function() {
|
|
191
|
-
return this.child;
|
|
192
|
-
};
|
|
193
|
-
LNode.prototype.getOwner = function() {
|
|
194
|
-
return this.owner;
|
|
195
|
-
};
|
|
196
|
-
LNode.prototype.getWidth = function() {
|
|
197
|
-
return this.rect.width;
|
|
198
|
-
};
|
|
199
|
-
LNode.prototype.setWidth = function(width) {
|
|
200
|
-
this.rect.width = width;
|
|
201
|
-
};
|
|
202
|
-
LNode.prototype.getHeight = function() {
|
|
203
|
-
return this.rect.height;
|
|
204
|
-
};
|
|
205
|
-
LNode.prototype.setHeight = function(height) {
|
|
206
|
-
this.rect.height = height;
|
|
207
|
-
};
|
|
208
|
-
LNode.prototype.getCenterX = function() {
|
|
209
|
-
return this.rect.x + this.rect.width / 2;
|
|
210
|
-
};
|
|
211
|
-
LNode.prototype.getCenterY = function() {
|
|
212
|
-
return this.rect.y + this.rect.height / 2;
|
|
213
|
-
};
|
|
214
|
-
LNode.prototype.getCenter = function() {
|
|
215
|
-
return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
|
|
216
|
-
};
|
|
217
|
-
LNode.prototype.getLocation = function() {
|
|
218
|
-
return new PointD(this.rect.x, this.rect.y);
|
|
219
|
-
};
|
|
220
|
-
LNode.prototype.getRect = function() {
|
|
221
|
-
return this.rect;
|
|
222
|
-
};
|
|
223
|
-
LNode.prototype.getDiagonal = function() {
|
|
224
|
-
return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
|
|
225
|
-
};
|
|
226
|
-
/**
|
|
227
|
-
* This method returns half the diagonal length of this node.
|
|
228
|
-
*/
|
|
229
|
-
LNode.prototype.getHalfTheDiagonal = function() {
|
|
230
|
-
return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
|
|
231
|
-
};
|
|
232
|
-
LNode.prototype.setRect = function(upperLeft, dimension) {
|
|
233
|
-
this.rect.x = upperLeft.x;
|
|
234
|
-
this.rect.y = upperLeft.y;
|
|
235
|
-
this.rect.width = dimension.width;
|
|
236
|
-
this.rect.height = dimension.height;
|
|
237
|
-
};
|
|
238
|
-
LNode.prototype.setCenter = function(cx, cy) {
|
|
239
|
-
this.rect.x = cx - this.rect.width / 2;
|
|
240
|
-
this.rect.y = cy - this.rect.height / 2;
|
|
241
|
-
};
|
|
242
|
-
LNode.prototype.setLocation = function(x, y) {
|
|
243
|
-
this.rect.x = x;
|
|
244
|
-
this.rect.y = y;
|
|
245
|
-
};
|
|
246
|
-
LNode.prototype.moveBy = function(dx, dy) {
|
|
247
|
-
this.rect.x += dx;
|
|
248
|
-
this.rect.y += dy;
|
|
249
|
-
};
|
|
250
|
-
LNode.prototype.getEdgeListToNode = function(to) {
|
|
251
|
-
var edgeList = [];
|
|
252
|
-
var self = this;
|
|
253
|
-
self.edges.forEach(function(edge) {
|
|
254
|
-
if (edge.target == to) {
|
|
255
|
-
if (edge.source != self) throw "Incorrect edge source!";
|
|
256
|
-
edgeList.push(edge);
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
return edgeList;
|
|
260
|
-
};
|
|
261
|
-
LNode.prototype.getEdgesBetween = function(other) {
|
|
262
|
-
var edgeList = [];
|
|
263
|
-
var self = this;
|
|
264
|
-
self.edges.forEach(function(edge) {
|
|
265
|
-
if (!(edge.source == self || edge.target == self)) throw "Incorrect edge source and/or target";
|
|
266
|
-
if (edge.target == other || edge.source == other) edgeList.push(edge);
|
|
267
|
-
});
|
|
268
|
-
return edgeList;
|
|
269
|
-
};
|
|
270
|
-
LNode.prototype.getNeighborsList = function() {
|
|
271
|
-
var neighbors = /* @__PURE__ */ new Set();
|
|
272
|
-
var self = this;
|
|
273
|
-
self.edges.forEach(function(edge) {
|
|
274
|
-
if (edge.source == self) neighbors.add(edge.target);
|
|
275
|
-
else {
|
|
276
|
-
if (edge.target != self) throw "Incorrect incidency!";
|
|
277
|
-
neighbors.add(edge.source);
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
return neighbors;
|
|
281
|
-
};
|
|
282
|
-
LNode.prototype.withChildren = function() {
|
|
283
|
-
var withNeighborsList = /* @__PURE__ */ new Set();
|
|
284
|
-
var childNode;
|
|
285
|
-
var children;
|
|
286
|
-
withNeighborsList.add(this);
|
|
287
|
-
if (this.child != null) {
|
|
288
|
-
var nodes = this.child.getNodes();
|
|
289
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
290
|
-
childNode = nodes[i];
|
|
291
|
-
children = childNode.withChildren();
|
|
292
|
-
children.forEach(function(node) {
|
|
293
|
-
withNeighborsList.add(node);
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
return withNeighborsList;
|
|
298
|
-
};
|
|
299
|
-
LNode.prototype.getNoOfChildren = function() {
|
|
300
|
-
var noOfChildren = 0;
|
|
301
|
-
var childNode;
|
|
302
|
-
if (this.child == null) noOfChildren = 1;
|
|
303
|
-
else {
|
|
304
|
-
var nodes = this.child.getNodes();
|
|
305
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
306
|
-
childNode = nodes[i];
|
|
307
|
-
noOfChildren += childNode.getNoOfChildren();
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
if (noOfChildren == 0) noOfChildren = 1;
|
|
311
|
-
return noOfChildren;
|
|
312
|
-
};
|
|
313
|
-
LNode.prototype.getEstimatedSize = function() {
|
|
314
|
-
if (this.estimatedSize == Integer.MIN_VALUE) throw "assert failed";
|
|
315
|
-
return this.estimatedSize;
|
|
316
|
-
};
|
|
317
|
-
LNode.prototype.calcEstimatedSize = function() {
|
|
318
|
-
if (this.child == null) return this.estimatedSize = (this.rect.width + this.rect.height) / 2;
|
|
319
|
-
else {
|
|
320
|
-
this.estimatedSize = this.child.calcEstimatedSize();
|
|
321
|
-
this.rect.width = this.estimatedSize;
|
|
322
|
-
this.rect.height = this.estimatedSize;
|
|
323
|
-
return this.estimatedSize;
|
|
324
|
-
}
|
|
325
|
-
};
|
|
326
|
-
LNode.prototype.scatter = function() {
|
|
327
|
-
var randomCenterX;
|
|
328
|
-
var randomCenterY;
|
|
329
|
-
var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY;
|
|
330
|
-
var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY;
|
|
331
|
-
randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX;
|
|
332
|
-
var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY;
|
|
333
|
-
var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY;
|
|
334
|
-
randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY;
|
|
335
|
-
this.rect.x = randomCenterX;
|
|
336
|
-
this.rect.y = randomCenterY;
|
|
337
|
-
};
|
|
338
|
-
LNode.prototype.updateBounds = function() {
|
|
339
|
-
if (this.getChild() == null) throw "assert failed";
|
|
340
|
-
if (this.getChild().getNodes().length != 0) {
|
|
341
|
-
var childGraph = this.getChild();
|
|
342
|
-
childGraph.updateBounds(true);
|
|
343
|
-
this.rect.x = childGraph.getLeft();
|
|
344
|
-
this.rect.y = childGraph.getTop();
|
|
345
|
-
this.setWidth(childGraph.getRight() - childGraph.getLeft());
|
|
346
|
-
this.setHeight(childGraph.getBottom() - childGraph.getTop());
|
|
347
|
-
if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {
|
|
348
|
-
var width = childGraph.getRight() - childGraph.getLeft();
|
|
349
|
-
var height = childGraph.getBottom() - childGraph.getTop();
|
|
350
|
-
if (this.labelWidth > width) {
|
|
351
|
-
this.rect.x -= (this.labelWidth - width) / 2;
|
|
352
|
-
this.setWidth(this.labelWidth);
|
|
353
|
-
}
|
|
354
|
-
if (this.labelHeight > height) {
|
|
355
|
-
if (this.labelPos == "center") this.rect.y -= (this.labelHeight - height) / 2;
|
|
356
|
-
else if (this.labelPos == "top") this.rect.y -= this.labelHeight - height;
|
|
357
|
-
this.setHeight(this.labelHeight);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
LNode.prototype.getInclusionTreeDepth = function() {
|
|
363
|
-
if (this.inclusionTreeDepth == Integer.MAX_VALUE) throw "assert failed";
|
|
364
|
-
return this.inclusionTreeDepth;
|
|
365
|
-
};
|
|
366
|
-
LNode.prototype.transform = function(trans) {
|
|
367
|
-
var left = this.rect.x;
|
|
368
|
-
if (left > LayoutConstants.WORLD_BOUNDARY) left = LayoutConstants.WORLD_BOUNDARY;
|
|
369
|
-
else if (left < -LayoutConstants.WORLD_BOUNDARY) left = -LayoutConstants.WORLD_BOUNDARY;
|
|
370
|
-
var top = this.rect.y;
|
|
371
|
-
if (top > LayoutConstants.WORLD_BOUNDARY) top = LayoutConstants.WORLD_BOUNDARY;
|
|
372
|
-
else if (top < -LayoutConstants.WORLD_BOUNDARY) top = -LayoutConstants.WORLD_BOUNDARY;
|
|
373
|
-
var leftTop = new PointD(left, top);
|
|
374
|
-
var vLeftTop = trans.inverseTransformPoint(leftTop);
|
|
375
|
-
this.setLocation(vLeftTop.x, vLeftTop.y);
|
|
376
|
-
};
|
|
377
|
-
LNode.prototype.getLeft = function() {
|
|
378
|
-
return this.rect.x;
|
|
379
|
-
};
|
|
380
|
-
LNode.prototype.getRight = function() {
|
|
381
|
-
return this.rect.x + this.rect.width;
|
|
382
|
-
};
|
|
383
|
-
LNode.prototype.getTop = function() {
|
|
384
|
-
return this.rect.y;
|
|
385
|
-
};
|
|
386
|
-
LNode.prototype.getBottom = function() {
|
|
387
|
-
return this.rect.y + this.rect.height;
|
|
388
|
-
};
|
|
389
|
-
LNode.prototype.getParent = function() {
|
|
390
|
-
if (this.owner == null) return null;
|
|
391
|
-
return this.owner.getParent();
|
|
392
|
-
};
|
|
393
|
-
module$20.exports = LNode;
|
|
394
|
-
}),
|
|
395
|
-
(function(module$21, exports$18, __webpack_require__) {
|
|
396
|
-
"use strict";
|
|
397
|
-
function PointD(x, y) {
|
|
398
|
-
if (x == null && y == null) {
|
|
399
|
-
this.x = 0;
|
|
400
|
-
this.y = 0;
|
|
401
|
-
} else {
|
|
402
|
-
this.x = x;
|
|
403
|
-
this.y = y;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
PointD.prototype.getX = function() {
|
|
407
|
-
return this.x;
|
|
408
|
-
};
|
|
409
|
-
PointD.prototype.getY = function() {
|
|
410
|
-
return this.y;
|
|
411
|
-
};
|
|
412
|
-
PointD.prototype.setX = function(x) {
|
|
413
|
-
this.x = x;
|
|
414
|
-
};
|
|
415
|
-
PointD.prototype.setY = function(y) {
|
|
416
|
-
this.y = y;
|
|
417
|
-
};
|
|
418
|
-
PointD.prototype.getDifference = function(pt) {
|
|
419
|
-
return new DimensionD(this.x - pt.x, this.y - pt.y);
|
|
420
|
-
};
|
|
421
|
-
PointD.prototype.getCopy = function() {
|
|
422
|
-
return new PointD(this.x, this.y);
|
|
423
|
-
};
|
|
424
|
-
PointD.prototype.translate = function(dim) {
|
|
425
|
-
this.x += dim.width;
|
|
426
|
-
this.y += dim.height;
|
|
427
|
-
return this;
|
|
428
|
-
};
|
|
429
|
-
module$21.exports = PointD;
|
|
430
|
-
}),
|
|
431
|
-
(function(module$22, exports$19, __webpack_require__) {
|
|
432
|
-
"use strict";
|
|
433
|
-
var LGraphObject = __webpack_require__(2);
|
|
434
|
-
var Integer = __webpack_require__(10);
|
|
435
|
-
var LayoutConstants = __webpack_require__(0);
|
|
436
|
-
var LGraphManager = __webpack_require__(6);
|
|
437
|
-
var LNode = __webpack_require__(3);
|
|
438
|
-
var LEdge = __webpack_require__(1);
|
|
439
|
-
var RectangleD = __webpack_require__(13);
|
|
440
|
-
var Point = __webpack_require__(12);
|
|
441
|
-
var LinkedList = __webpack_require__(11);
|
|
442
|
-
function LGraph(parent, obj2, vGraph) {
|
|
443
|
-
LGraphObject.call(this, vGraph);
|
|
444
|
-
this.estimatedSize = Integer.MIN_VALUE;
|
|
445
|
-
this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN;
|
|
446
|
-
this.edges = [];
|
|
447
|
-
this.nodes = [];
|
|
448
|
-
this.isConnected = false;
|
|
449
|
-
this.parent = parent;
|
|
450
|
-
if (obj2 != null && obj2 instanceof LGraphManager) this.graphManager = obj2;
|
|
451
|
-
else if (obj2 != null && obj2 instanceof Layout) this.graphManager = obj2.graphManager;
|
|
452
|
-
}
|
|
453
|
-
LGraph.prototype = Object.create(LGraphObject.prototype);
|
|
454
|
-
for (var prop in LGraphObject) LGraph[prop] = LGraphObject[prop];
|
|
455
|
-
LGraph.prototype.getNodes = function() {
|
|
456
|
-
return this.nodes;
|
|
457
|
-
};
|
|
458
|
-
LGraph.prototype.getEdges = function() {
|
|
459
|
-
return this.edges;
|
|
460
|
-
};
|
|
461
|
-
LGraph.prototype.getGraphManager = function() {
|
|
462
|
-
return this.graphManager;
|
|
463
|
-
};
|
|
464
|
-
LGraph.prototype.getParent = function() {
|
|
465
|
-
return this.parent;
|
|
466
|
-
};
|
|
467
|
-
LGraph.prototype.getLeft = function() {
|
|
468
|
-
return this.left;
|
|
469
|
-
};
|
|
470
|
-
LGraph.prototype.getRight = function() {
|
|
471
|
-
return this.right;
|
|
472
|
-
};
|
|
473
|
-
LGraph.prototype.getTop = function() {
|
|
474
|
-
return this.top;
|
|
475
|
-
};
|
|
476
|
-
LGraph.prototype.getBottom = function() {
|
|
477
|
-
return this.bottom;
|
|
478
|
-
};
|
|
479
|
-
LGraph.prototype.isConnected = function() {
|
|
480
|
-
return this.isConnected;
|
|
481
|
-
};
|
|
482
|
-
LGraph.prototype.add = function(obj1, sourceNode, targetNode) {
|
|
483
|
-
if (sourceNode == null && targetNode == null) {
|
|
484
|
-
var newNode = obj1;
|
|
485
|
-
if (this.graphManager == null) throw "Graph has no graph mgr!";
|
|
486
|
-
if (this.getNodes().indexOf(newNode) > -1) throw "Node already in graph!";
|
|
487
|
-
newNode.owner = this;
|
|
488
|
-
this.getNodes().push(newNode);
|
|
489
|
-
return newNode;
|
|
490
|
-
} else {
|
|
491
|
-
var newEdge = obj1;
|
|
492
|
-
if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) throw "Source or target not in graph!";
|
|
493
|
-
if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) throw "Both owners must be this graph!";
|
|
494
|
-
if (sourceNode.owner != targetNode.owner) return null;
|
|
495
|
-
newEdge.source = sourceNode;
|
|
496
|
-
newEdge.target = targetNode;
|
|
497
|
-
newEdge.isInterGraph = false;
|
|
498
|
-
this.getEdges().push(newEdge);
|
|
499
|
-
sourceNode.edges.push(newEdge);
|
|
500
|
-
if (targetNode != sourceNode) targetNode.edges.push(newEdge);
|
|
501
|
-
return newEdge;
|
|
502
|
-
}
|
|
503
|
-
};
|
|
504
|
-
LGraph.prototype.remove = function(obj) {
|
|
505
|
-
var node = obj;
|
|
506
|
-
if (obj instanceof LNode) {
|
|
507
|
-
if (node == null) throw "Node is null!";
|
|
508
|
-
if (!(node.owner != null && node.owner == this)) throw "Owner graph is invalid!";
|
|
509
|
-
if (this.graphManager == null) throw "Owner graph manager is invalid!";
|
|
510
|
-
var edgesToBeRemoved = node.edges.slice();
|
|
511
|
-
var edge;
|
|
512
|
-
var s = edgesToBeRemoved.length;
|
|
513
|
-
for (var i = 0; i < s; i++) {
|
|
514
|
-
edge = edgesToBeRemoved[i];
|
|
515
|
-
if (edge.isInterGraph) this.graphManager.remove(edge);
|
|
516
|
-
else edge.source.owner.remove(edge);
|
|
517
|
-
}
|
|
518
|
-
var index = this.nodes.indexOf(node);
|
|
519
|
-
if (index == -1) throw "Node not in owner node list!";
|
|
520
|
-
this.nodes.splice(index, 1);
|
|
521
|
-
} else if (obj instanceof LEdge) {
|
|
522
|
-
var edge = obj;
|
|
523
|
-
if (edge == null) throw "Edge is null!";
|
|
524
|
-
if (!(edge.source != null && edge.target != null)) throw "Source and/or target is null!";
|
|
525
|
-
if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) throw "Source and/or target owner is invalid!";
|
|
526
|
-
var sourceIndex = edge.source.edges.indexOf(edge);
|
|
527
|
-
var targetIndex = edge.target.edges.indexOf(edge);
|
|
528
|
-
if (!(sourceIndex > -1 && targetIndex > -1)) throw "Source and/or target doesn't know this edge!";
|
|
529
|
-
edge.source.edges.splice(sourceIndex, 1);
|
|
530
|
-
if (edge.target != edge.source) edge.target.edges.splice(targetIndex, 1);
|
|
531
|
-
var index = edge.source.owner.getEdges().indexOf(edge);
|
|
532
|
-
if (index == -1) throw "Not in owner's edge list!";
|
|
533
|
-
edge.source.owner.getEdges().splice(index, 1);
|
|
534
|
-
}
|
|
535
|
-
};
|
|
536
|
-
LGraph.prototype.updateLeftTop = function() {
|
|
537
|
-
var top = Integer.MAX_VALUE;
|
|
538
|
-
var left = Integer.MAX_VALUE;
|
|
539
|
-
var nodeTop;
|
|
540
|
-
var nodeLeft;
|
|
541
|
-
var margin;
|
|
542
|
-
var nodes = this.getNodes();
|
|
543
|
-
var s = nodes.length;
|
|
544
|
-
for (var i = 0; i < s; i++) {
|
|
545
|
-
var lNode = nodes[i];
|
|
546
|
-
nodeTop = lNode.getTop();
|
|
547
|
-
nodeLeft = lNode.getLeft();
|
|
548
|
-
if (top > nodeTop) top = nodeTop;
|
|
549
|
-
if (left > nodeLeft) left = nodeLeft;
|
|
550
|
-
}
|
|
551
|
-
if (top == Integer.MAX_VALUE) return null;
|
|
552
|
-
if (nodes[0].getParent().paddingLeft != void 0) margin = nodes[0].getParent().paddingLeft;
|
|
553
|
-
else margin = this.margin;
|
|
554
|
-
this.left = left - margin;
|
|
555
|
-
this.top = top - margin;
|
|
556
|
-
return new Point(this.left, this.top);
|
|
557
|
-
};
|
|
558
|
-
LGraph.prototype.updateBounds = function(recursive) {
|
|
559
|
-
var left = Integer.MAX_VALUE;
|
|
560
|
-
var right = -Integer.MAX_VALUE;
|
|
561
|
-
var top = Integer.MAX_VALUE;
|
|
562
|
-
var bottom = -Integer.MAX_VALUE;
|
|
563
|
-
var nodeLeft;
|
|
564
|
-
var nodeRight;
|
|
565
|
-
var nodeTop;
|
|
566
|
-
var nodeBottom;
|
|
567
|
-
var margin;
|
|
568
|
-
var nodes = this.nodes;
|
|
569
|
-
var s = nodes.length;
|
|
570
|
-
for (var i = 0; i < s; i++) {
|
|
571
|
-
var lNode = nodes[i];
|
|
572
|
-
if (recursive && lNode.child != null) lNode.updateBounds();
|
|
573
|
-
nodeLeft = lNode.getLeft();
|
|
574
|
-
nodeRight = lNode.getRight();
|
|
575
|
-
nodeTop = lNode.getTop();
|
|
576
|
-
nodeBottom = lNode.getBottom();
|
|
577
|
-
if (left > nodeLeft) left = nodeLeft;
|
|
578
|
-
if (right < nodeRight) right = nodeRight;
|
|
579
|
-
if (top > nodeTop) top = nodeTop;
|
|
580
|
-
if (bottom < nodeBottom) bottom = nodeBottom;
|
|
581
|
-
}
|
|
582
|
-
var boundingRect = new RectangleD(left, top, right - left, bottom - top);
|
|
583
|
-
if (left == Integer.MAX_VALUE) {
|
|
584
|
-
this.left = this.parent.getLeft();
|
|
585
|
-
this.right = this.parent.getRight();
|
|
586
|
-
this.top = this.parent.getTop();
|
|
587
|
-
this.bottom = this.parent.getBottom();
|
|
588
|
-
}
|
|
589
|
-
if (nodes[0].getParent().paddingLeft != void 0) margin = nodes[0].getParent().paddingLeft;
|
|
590
|
-
else margin = this.margin;
|
|
591
|
-
this.left = boundingRect.x - margin;
|
|
592
|
-
this.right = boundingRect.x + boundingRect.width + margin;
|
|
593
|
-
this.top = boundingRect.y - margin;
|
|
594
|
-
this.bottom = boundingRect.y + boundingRect.height + margin;
|
|
595
|
-
};
|
|
596
|
-
LGraph.calculateBounds = function(nodes) {
|
|
597
|
-
var left = Integer.MAX_VALUE;
|
|
598
|
-
var right = -Integer.MAX_VALUE;
|
|
599
|
-
var top = Integer.MAX_VALUE;
|
|
600
|
-
var bottom = -Integer.MAX_VALUE;
|
|
601
|
-
var nodeLeft;
|
|
602
|
-
var nodeRight;
|
|
603
|
-
var nodeTop;
|
|
604
|
-
var nodeBottom;
|
|
605
|
-
var s = nodes.length;
|
|
606
|
-
for (var i = 0; i < s; i++) {
|
|
607
|
-
var lNode = nodes[i];
|
|
608
|
-
nodeLeft = lNode.getLeft();
|
|
609
|
-
nodeRight = lNode.getRight();
|
|
610
|
-
nodeTop = lNode.getTop();
|
|
611
|
-
nodeBottom = lNode.getBottom();
|
|
612
|
-
if (left > nodeLeft) left = nodeLeft;
|
|
613
|
-
if (right < nodeRight) right = nodeRight;
|
|
614
|
-
if (top > nodeTop) top = nodeTop;
|
|
615
|
-
if (bottom < nodeBottom) bottom = nodeBottom;
|
|
616
|
-
}
|
|
617
|
-
return new RectangleD(left, top, right - left, bottom - top);
|
|
618
|
-
};
|
|
619
|
-
LGraph.prototype.getInclusionTreeDepth = function() {
|
|
620
|
-
if (this == this.graphManager.getRoot()) return 1;
|
|
621
|
-
else return this.parent.getInclusionTreeDepth();
|
|
622
|
-
};
|
|
623
|
-
LGraph.prototype.getEstimatedSize = function() {
|
|
624
|
-
if (this.estimatedSize == Integer.MIN_VALUE) throw "assert failed";
|
|
625
|
-
return this.estimatedSize;
|
|
626
|
-
};
|
|
627
|
-
LGraph.prototype.calcEstimatedSize = function() {
|
|
628
|
-
var size = 0;
|
|
629
|
-
var nodes = this.nodes;
|
|
630
|
-
var s = nodes.length;
|
|
631
|
-
for (var i = 0; i < s; i++) {
|
|
632
|
-
var lNode = nodes[i];
|
|
633
|
-
size += lNode.calcEstimatedSize();
|
|
634
|
-
}
|
|
635
|
-
if (size == 0) this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE;
|
|
636
|
-
else this.estimatedSize = size / Math.sqrt(this.nodes.length);
|
|
637
|
-
return this.estimatedSize;
|
|
638
|
-
};
|
|
639
|
-
LGraph.prototype.updateConnected = function() {
|
|
640
|
-
var self = this;
|
|
641
|
-
if (this.nodes.length == 0) {
|
|
642
|
-
this.isConnected = true;
|
|
643
|
-
return;
|
|
644
|
-
}
|
|
645
|
-
var queue = new LinkedList();
|
|
646
|
-
var visited = /* @__PURE__ */ new Set();
|
|
647
|
-
var currentNode = this.nodes[0];
|
|
648
|
-
var neighborEdges;
|
|
649
|
-
var currentNeighbor;
|
|
650
|
-
currentNode.withChildren().forEach(function(node) {
|
|
651
|
-
queue.push(node);
|
|
652
|
-
visited.add(node);
|
|
653
|
-
});
|
|
654
|
-
while (queue.length !== 0) {
|
|
655
|
-
currentNode = queue.shift();
|
|
656
|
-
neighborEdges = currentNode.getEdges();
|
|
657
|
-
var size = neighborEdges.length;
|
|
658
|
-
for (var i = 0; i < size; i++) {
|
|
659
|
-
currentNeighbor = neighborEdges[i].getOtherEndInGraph(currentNode, this);
|
|
660
|
-
if (currentNeighbor != null && !visited.has(currentNeighbor)) currentNeighbor.withChildren().forEach(function(node) {
|
|
661
|
-
queue.push(node);
|
|
662
|
-
visited.add(node);
|
|
663
|
-
});
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
this.isConnected = false;
|
|
667
|
-
if (visited.size >= this.nodes.length) {
|
|
668
|
-
var noOfVisitedInThisGraph = 0;
|
|
669
|
-
visited.forEach(function(visitedNode) {
|
|
670
|
-
if (visitedNode.owner == self) noOfVisitedInThisGraph++;
|
|
671
|
-
});
|
|
672
|
-
if (noOfVisitedInThisGraph == this.nodes.length) this.isConnected = true;
|
|
673
|
-
}
|
|
674
|
-
};
|
|
675
|
-
module$22.exports = LGraph;
|
|
676
|
-
}),
|
|
677
|
-
(function(module$23, exports$20, __webpack_require__) {
|
|
678
|
-
"use strict";
|
|
679
|
-
var LGraph;
|
|
680
|
-
var LEdge = __webpack_require__(1);
|
|
681
|
-
function LGraphManager(layout) {
|
|
682
|
-
LGraph = __webpack_require__(5);
|
|
683
|
-
this.layout = layout;
|
|
684
|
-
this.graphs = [];
|
|
685
|
-
this.edges = [];
|
|
686
|
-
}
|
|
687
|
-
LGraphManager.prototype.addRoot = function() {
|
|
688
|
-
var ngraph = this.layout.newGraph();
|
|
689
|
-
var nnode = this.layout.newNode(null);
|
|
690
|
-
var root = this.add(ngraph, nnode);
|
|
691
|
-
this.setRootGraph(root);
|
|
692
|
-
return this.rootGraph;
|
|
693
|
-
};
|
|
694
|
-
LGraphManager.prototype.add = function(newGraph, parentNode, newEdge, sourceNode, targetNode) {
|
|
695
|
-
if (newEdge == null && sourceNode == null && targetNode == null) {
|
|
696
|
-
if (newGraph == null) throw "Graph is null!";
|
|
697
|
-
if (parentNode == null) throw "Parent node is null!";
|
|
698
|
-
if (this.graphs.indexOf(newGraph) > -1) throw "Graph already in this graph mgr!";
|
|
699
|
-
this.graphs.push(newGraph);
|
|
700
|
-
if (newGraph.parent != null) throw "Already has a parent!";
|
|
701
|
-
if (parentNode.child != null) throw "Already has a child!";
|
|
702
|
-
newGraph.parent = parentNode;
|
|
703
|
-
parentNode.child = newGraph;
|
|
704
|
-
return newGraph;
|
|
705
|
-
} else {
|
|
706
|
-
targetNode = newEdge;
|
|
707
|
-
sourceNode = parentNode;
|
|
708
|
-
newEdge = newGraph;
|
|
709
|
-
var sourceGraph = sourceNode.getOwner();
|
|
710
|
-
var targetGraph = targetNode.getOwner();
|
|
711
|
-
if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) throw "Source not in this graph mgr!";
|
|
712
|
-
if (!(targetGraph != null && targetGraph.getGraphManager() == this)) throw "Target not in this graph mgr!";
|
|
713
|
-
if (sourceGraph == targetGraph) {
|
|
714
|
-
newEdge.isInterGraph = false;
|
|
715
|
-
return sourceGraph.add(newEdge, sourceNode, targetNode);
|
|
716
|
-
} else {
|
|
717
|
-
newEdge.isInterGraph = true;
|
|
718
|
-
newEdge.source = sourceNode;
|
|
719
|
-
newEdge.target = targetNode;
|
|
720
|
-
if (this.edges.indexOf(newEdge) > -1) throw "Edge already in inter-graph edge list!";
|
|
721
|
-
this.edges.push(newEdge);
|
|
722
|
-
if (!(newEdge.source != null && newEdge.target != null)) throw "Edge source and/or target is null!";
|
|
723
|
-
if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) throw "Edge already in source and/or target incidency list!";
|
|
724
|
-
newEdge.source.edges.push(newEdge);
|
|
725
|
-
newEdge.target.edges.push(newEdge);
|
|
726
|
-
return newEdge;
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
};
|
|
730
|
-
LGraphManager.prototype.remove = function(lObj) {
|
|
731
|
-
if (lObj instanceof LGraph) {
|
|
732
|
-
var graph = lObj;
|
|
733
|
-
if (graph.getGraphManager() != this) throw "Graph not in this graph mgr";
|
|
734
|
-
if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) throw "Invalid parent node!";
|
|
735
|
-
var edgesToBeRemoved = [];
|
|
736
|
-
edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges());
|
|
737
|
-
var edge;
|
|
738
|
-
var s = edgesToBeRemoved.length;
|
|
739
|
-
for (var i = 0; i < s; i++) {
|
|
740
|
-
edge = edgesToBeRemoved[i];
|
|
741
|
-
graph.remove(edge);
|
|
742
|
-
}
|
|
743
|
-
var nodesToBeRemoved = [];
|
|
744
|
-
nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes());
|
|
745
|
-
var node;
|
|
746
|
-
s = nodesToBeRemoved.length;
|
|
747
|
-
for (var i = 0; i < s; i++) {
|
|
748
|
-
node = nodesToBeRemoved[i];
|
|
749
|
-
graph.remove(node);
|
|
750
|
-
}
|
|
751
|
-
if (graph == this.rootGraph) this.setRootGraph(null);
|
|
752
|
-
var index = this.graphs.indexOf(graph);
|
|
753
|
-
this.graphs.splice(index, 1);
|
|
754
|
-
graph.parent = null;
|
|
755
|
-
} else if (lObj instanceof LEdge) {
|
|
756
|
-
edge = lObj;
|
|
757
|
-
if (edge == null) throw "Edge is null!";
|
|
758
|
-
if (!edge.isInterGraph) throw "Not an inter-graph edge!";
|
|
759
|
-
if (!(edge.source != null && edge.target != null)) throw "Source and/or target is null!";
|
|
760
|
-
if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) throw "Source and/or target doesn't know this edge!";
|
|
761
|
-
var index = edge.source.edges.indexOf(edge);
|
|
762
|
-
edge.source.edges.splice(index, 1);
|
|
763
|
-
index = edge.target.edges.indexOf(edge);
|
|
764
|
-
edge.target.edges.splice(index, 1);
|
|
765
|
-
if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) throw "Edge owner graph or owner graph manager is null!";
|
|
766
|
-
if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) throw "Not in owner graph manager's edge list!";
|
|
767
|
-
var index = edge.source.owner.getGraphManager().edges.indexOf(edge);
|
|
768
|
-
edge.source.owner.getGraphManager().edges.splice(index, 1);
|
|
769
|
-
}
|
|
770
|
-
};
|
|
771
|
-
LGraphManager.prototype.updateBounds = function() {
|
|
772
|
-
this.rootGraph.updateBounds(true);
|
|
773
|
-
};
|
|
774
|
-
LGraphManager.prototype.getGraphs = function() {
|
|
775
|
-
return this.graphs;
|
|
776
|
-
};
|
|
777
|
-
LGraphManager.prototype.getAllNodes = function() {
|
|
778
|
-
if (this.allNodes == null) {
|
|
779
|
-
var nodeList = [];
|
|
780
|
-
var graphs = this.getGraphs();
|
|
781
|
-
var s = graphs.length;
|
|
782
|
-
for (var i = 0; i < s; i++) nodeList = nodeList.concat(graphs[i].getNodes());
|
|
783
|
-
this.allNodes = nodeList;
|
|
784
|
-
}
|
|
785
|
-
return this.allNodes;
|
|
786
|
-
};
|
|
787
|
-
LGraphManager.prototype.resetAllNodes = function() {
|
|
788
|
-
this.allNodes = null;
|
|
789
|
-
};
|
|
790
|
-
LGraphManager.prototype.resetAllEdges = function() {
|
|
791
|
-
this.allEdges = null;
|
|
792
|
-
};
|
|
793
|
-
LGraphManager.prototype.resetAllNodesToApplyGravitation = function() {
|
|
794
|
-
this.allNodesToApplyGravitation = null;
|
|
795
|
-
};
|
|
796
|
-
LGraphManager.prototype.getAllEdges = function() {
|
|
797
|
-
if (this.allEdges == null) {
|
|
798
|
-
var edgeList = [];
|
|
799
|
-
var graphs = this.getGraphs();
|
|
800
|
-
graphs.length;
|
|
801
|
-
for (var i = 0; i < graphs.length; i++) edgeList = edgeList.concat(graphs[i].getEdges());
|
|
802
|
-
edgeList = edgeList.concat(this.edges);
|
|
803
|
-
this.allEdges = edgeList;
|
|
804
|
-
}
|
|
805
|
-
return this.allEdges;
|
|
806
|
-
};
|
|
807
|
-
LGraphManager.prototype.getAllNodesToApplyGravitation = function() {
|
|
808
|
-
return this.allNodesToApplyGravitation;
|
|
809
|
-
};
|
|
810
|
-
LGraphManager.prototype.setAllNodesToApplyGravitation = function(nodeList) {
|
|
811
|
-
if (this.allNodesToApplyGravitation != null) throw "assert failed";
|
|
812
|
-
this.allNodesToApplyGravitation = nodeList;
|
|
813
|
-
};
|
|
814
|
-
LGraphManager.prototype.getRoot = function() {
|
|
815
|
-
return this.rootGraph;
|
|
816
|
-
};
|
|
817
|
-
LGraphManager.prototype.setRootGraph = function(graph) {
|
|
818
|
-
if (graph.getGraphManager() != this) throw "Root not in this graph mgr!";
|
|
819
|
-
this.rootGraph = graph;
|
|
820
|
-
if (graph.parent == null) graph.parent = this.layout.newNode("Root node");
|
|
821
|
-
};
|
|
822
|
-
LGraphManager.prototype.getLayout = function() {
|
|
823
|
-
return this.layout;
|
|
824
|
-
};
|
|
825
|
-
LGraphManager.prototype.isOneAncestorOfOther = function(firstNode, secondNode) {
|
|
826
|
-
if (!(firstNode != null && secondNode != null)) throw "assert failed";
|
|
827
|
-
if (firstNode == secondNode) return true;
|
|
828
|
-
var ownerGraph = firstNode.getOwner();
|
|
829
|
-
var parentNode;
|
|
830
|
-
do {
|
|
831
|
-
parentNode = ownerGraph.getParent();
|
|
832
|
-
if (parentNode == null) break;
|
|
833
|
-
if (parentNode == secondNode) return true;
|
|
834
|
-
ownerGraph = parentNode.getOwner();
|
|
835
|
-
if (ownerGraph == null) break;
|
|
836
|
-
} while (true);
|
|
837
|
-
ownerGraph = secondNode.getOwner();
|
|
838
|
-
do {
|
|
839
|
-
parentNode = ownerGraph.getParent();
|
|
840
|
-
if (parentNode == null) break;
|
|
841
|
-
if (parentNode == firstNode) return true;
|
|
842
|
-
ownerGraph = parentNode.getOwner();
|
|
843
|
-
if (ownerGraph == null) break;
|
|
844
|
-
} while (true);
|
|
845
|
-
return false;
|
|
846
|
-
};
|
|
847
|
-
LGraphManager.prototype.calcLowestCommonAncestors = function() {
|
|
848
|
-
var edge;
|
|
849
|
-
var sourceNode;
|
|
850
|
-
var targetNode;
|
|
851
|
-
var sourceAncestorGraph;
|
|
852
|
-
var targetAncestorGraph;
|
|
853
|
-
var edges = this.getAllEdges();
|
|
854
|
-
var s = edges.length;
|
|
855
|
-
for (var i = 0; i < s; i++) {
|
|
856
|
-
edge = edges[i];
|
|
857
|
-
sourceNode = edge.source;
|
|
858
|
-
targetNode = edge.target;
|
|
859
|
-
edge.lca = null;
|
|
860
|
-
edge.sourceInLca = sourceNode;
|
|
861
|
-
edge.targetInLca = targetNode;
|
|
862
|
-
if (sourceNode == targetNode) {
|
|
863
|
-
edge.lca = sourceNode.getOwner();
|
|
864
|
-
continue;
|
|
865
|
-
}
|
|
866
|
-
sourceAncestorGraph = sourceNode.getOwner();
|
|
867
|
-
while (edge.lca == null) {
|
|
868
|
-
edge.targetInLca = targetNode;
|
|
869
|
-
targetAncestorGraph = targetNode.getOwner();
|
|
870
|
-
while (edge.lca == null) {
|
|
871
|
-
if (targetAncestorGraph == sourceAncestorGraph) {
|
|
872
|
-
edge.lca = targetAncestorGraph;
|
|
873
|
-
break;
|
|
874
|
-
}
|
|
875
|
-
if (targetAncestorGraph == this.rootGraph) break;
|
|
876
|
-
if (edge.lca != null) throw "assert failed";
|
|
877
|
-
edge.targetInLca = targetAncestorGraph.getParent();
|
|
878
|
-
targetAncestorGraph = edge.targetInLca.getOwner();
|
|
879
|
-
}
|
|
880
|
-
if (sourceAncestorGraph == this.rootGraph) break;
|
|
881
|
-
if (edge.lca == null) {
|
|
882
|
-
edge.sourceInLca = sourceAncestorGraph.getParent();
|
|
883
|
-
sourceAncestorGraph = edge.sourceInLca.getOwner();
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
if (edge.lca == null) throw "assert failed";
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
LGraphManager.prototype.calcLowestCommonAncestor = function(firstNode, secondNode) {
|
|
890
|
-
if (firstNode == secondNode) return firstNode.getOwner();
|
|
891
|
-
var firstOwnerGraph = firstNode.getOwner();
|
|
892
|
-
do {
|
|
893
|
-
if (firstOwnerGraph == null) break;
|
|
894
|
-
var secondOwnerGraph = secondNode.getOwner();
|
|
895
|
-
do {
|
|
896
|
-
if (secondOwnerGraph == null) break;
|
|
897
|
-
if (secondOwnerGraph == firstOwnerGraph) return secondOwnerGraph;
|
|
898
|
-
secondOwnerGraph = secondOwnerGraph.getParent().getOwner();
|
|
899
|
-
} while (true);
|
|
900
|
-
firstOwnerGraph = firstOwnerGraph.getParent().getOwner();
|
|
901
|
-
} while (true);
|
|
902
|
-
return firstOwnerGraph;
|
|
903
|
-
};
|
|
904
|
-
LGraphManager.prototype.calcInclusionTreeDepths = function(graph, depth) {
|
|
905
|
-
if (graph == null && depth == null) {
|
|
906
|
-
graph = this.rootGraph;
|
|
907
|
-
depth = 1;
|
|
908
|
-
}
|
|
909
|
-
var node;
|
|
910
|
-
var nodes = graph.getNodes();
|
|
911
|
-
var s = nodes.length;
|
|
912
|
-
for (var i = 0; i < s; i++) {
|
|
913
|
-
node = nodes[i];
|
|
914
|
-
node.inclusionTreeDepth = depth;
|
|
915
|
-
if (node.child != null) this.calcInclusionTreeDepths(node.child, depth + 1);
|
|
916
|
-
}
|
|
917
|
-
};
|
|
918
|
-
LGraphManager.prototype.includesInvalidEdge = function() {
|
|
919
|
-
var edge;
|
|
920
|
-
var s = this.edges.length;
|
|
921
|
-
for (var i = 0; i < s; i++) {
|
|
922
|
-
edge = this.edges[i];
|
|
923
|
-
if (this.isOneAncestorOfOther(edge.source, edge.target)) return true;
|
|
924
|
-
}
|
|
925
|
-
return false;
|
|
926
|
-
};
|
|
927
|
-
module$23.exports = LGraphManager;
|
|
928
|
-
}),
|
|
929
|
-
(function(module$24, exports$21, __webpack_require__) {
|
|
930
|
-
"use strict";
|
|
931
|
-
var LayoutConstants = __webpack_require__(0);
|
|
932
|
-
function FDLayoutConstants() {}
|
|
933
|
-
for (var prop in LayoutConstants) FDLayoutConstants[prop] = LayoutConstants[prop];
|
|
934
|
-
FDLayoutConstants.MAX_ITERATIONS = 2500;
|
|
935
|
-
FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;
|
|
936
|
-
FDLayoutConstants.DEFAULT_SPRING_STRENGTH = .45;
|
|
937
|
-
FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500;
|
|
938
|
-
FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = .4;
|
|
939
|
-
FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1;
|
|
940
|
-
FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8;
|
|
941
|
-
FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5;
|
|
942
|
-
FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true;
|
|
943
|
-
FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true;
|
|
944
|
-
FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = .3;
|
|
945
|
-
FDLayoutConstants.COOLING_ADAPTATION_FACTOR = .33;
|
|
946
|
-
FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1e3;
|
|
947
|
-
FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5e3;
|
|
948
|
-
FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100;
|
|
949
|
-
FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3;
|
|
950
|
-
FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10;
|
|
951
|
-
FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100;
|
|
952
|
-
FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = .1;
|
|
953
|
-
FDLayoutConstants.MIN_EDGE_LENGTH = 1;
|
|
954
|
-
FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10;
|
|
955
|
-
module$24.exports = FDLayoutConstants;
|
|
956
|
-
}),
|
|
957
|
-
(function(module$25, exports$22, __webpack_require__) {
|
|
958
|
-
"use strict";
|
|
959
|
-
/**
|
|
960
|
-
* This class maintains a list of static geometry related utility methods.
|
|
961
|
-
*
|
|
962
|
-
*
|
|
963
|
-
* Copyright: i-Vis Research Group, Bilkent University, 2007 - present
|
|
964
|
-
*/
|
|
965
|
-
var Point = __webpack_require__(12);
|
|
966
|
-
function IGeometry() {}
|
|
967
|
-
/**
|
|
968
|
-
* This method calculates *half* the amount in x and y directions of the two
|
|
969
|
-
* input rectangles needed to separate them keeping their respective
|
|
970
|
-
* positioning, and returns the result in the input array. An input
|
|
971
|
-
* separation buffer added to the amount in both directions. We assume that
|
|
972
|
-
* the two rectangles do intersect.
|
|
973
|
-
*/
|
|
974
|
-
IGeometry.calcSeparationAmount = function(rectA, rectB, overlapAmount, separationBuffer) {
|
|
975
|
-
if (!rectA.intersects(rectB)) throw "assert failed";
|
|
976
|
-
var directions = new Array(2);
|
|
977
|
-
this.decideDirectionsForOverlappingNodes(rectA, rectB, directions);
|
|
978
|
-
overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x);
|
|
979
|
-
overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y);
|
|
980
|
-
if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight());
|
|
981
|
-
else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight());
|
|
982
|
-
if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom());
|
|
983
|
-
else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom());
|
|
984
|
-
var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX()));
|
|
985
|
-
if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) slope = 1;
|
|
986
|
-
var moveByY = slope * overlapAmount[0];
|
|
987
|
-
var moveByX = overlapAmount[1] / slope;
|
|
988
|
-
if (overlapAmount[0] < moveByX) moveByX = overlapAmount[0];
|
|
989
|
-
else moveByY = overlapAmount[1];
|
|
990
|
-
overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer);
|
|
991
|
-
overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer);
|
|
992
|
-
};
|
|
993
|
-
/**
|
|
994
|
-
* This method decides the separation direction of overlapping nodes
|
|
995
|
-
*
|
|
996
|
-
* if directions[0] = -1, then rectA goes left
|
|
997
|
-
* if directions[0] = 1, then rectA goes right
|
|
998
|
-
* if directions[1] = -1, then rectA goes up
|
|
999
|
-
* if directions[1] = 1, then rectA goes down
|
|
1000
|
-
*/
|
|
1001
|
-
IGeometry.decideDirectionsForOverlappingNodes = function(rectA, rectB, directions) {
|
|
1002
|
-
if (rectA.getCenterX() < rectB.getCenterX()) directions[0] = -1;
|
|
1003
|
-
else directions[0] = 1;
|
|
1004
|
-
if (rectA.getCenterY() < rectB.getCenterY()) directions[1] = -1;
|
|
1005
|
-
else directions[1] = 1;
|
|
1006
|
-
};
|
|
1007
|
-
/**
|
|
1008
|
-
* This method calculates the intersection (clipping) points of the two
|
|
1009
|
-
* input rectangles with line segment defined by the centers of these two
|
|
1010
|
-
* rectangles. The clipping points are saved in the input double array and
|
|
1011
|
-
* whether or not the two rectangles overlap is returned.
|
|
1012
|
-
*/
|
|
1013
|
-
IGeometry.getIntersection2 = function(rectA, rectB, result) {
|
|
1014
|
-
var p1x = rectA.getCenterX();
|
|
1015
|
-
var p1y = rectA.getCenterY();
|
|
1016
|
-
var p2x = rectB.getCenterX();
|
|
1017
|
-
var p2y = rectB.getCenterY();
|
|
1018
|
-
if (rectA.intersects(rectB)) {
|
|
1019
|
-
result[0] = p1x;
|
|
1020
|
-
result[1] = p1y;
|
|
1021
|
-
result[2] = p2x;
|
|
1022
|
-
result[3] = p2y;
|
|
1023
|
-
return true;
|
|
1024
|
-
}
|
|
1025
|
-
var topLeftAx = rectA.getX();
|
|
1026
|
-
var topLeftAy = rectA.getY();
|
|
1027
|
-
var topRightAx = rectA.getRight();
|
|
1028
|
-
var bottomLeftAx = rectA.getX();
|
|
1029
|
-
var bottomLeftAy = rectA.getBottom();
|
|
1030
|
-
var bottomRightAx = rectA.getRight();
|
|
1031
|
-
var halfWidthA = rectA.getWidthHalf();
|
|
1032
|
-
var halfHeightA = rectA.getHeightHalf();
|
|
1033
|
-
var topLeftBx = rectB.getX();
|
|
1034
|
-
var topLeftBy = rectB.getY();
|
|
1035
|
-
var topRightBx = rectB.getRight();
|
|
1036
|
-
var bottomLeftBx = rectB.getX();
|
|
1037
|
-
var bottomLeftBy = rectB.getBottom();
|
|
1038
|
-
var bottomRightBx = rectB.getRight();
|
|
1039
|
-
var halfWidthB = rectB.getWidthHalf();
|
|
1040
|
-
var halfHeightB = rectB.getHeightHalf();
|
|
1041
|
-
var clipPointAFound = false;
|
|
1042
|
-
var clipPointBFound = false;
|
|
1043
|
-
if (p1x === p2x) {
|
|
1044
|
-
if (p1y > p2y) {
|
|
1045
|
-
result[0] = p1x;
|
|
1046
|
-
result[1] = topLeftAy;
|
|
1047
|
-
result[2] = p2x;
|
|
1048
|
-
result[3] = bottomLeftBy;
|
|
1049
|
-
return false;
|
|
1050
|
-
} else if (p1y < p2y) {
|
|
1051
|
-
result[0] = p1x;
|
|
1052
|
-
result[1] = bottomLeftAy;
|
|
1053
|
-
result[2] = p2x;
|
|
1054
|
-
result[3] = topLeftBy;
|
|
1055
|
-
return false;
|
|
1056
|
-
}
|
|
1057
|
-
} else if (p1y === p2y) {
|
|
1058
|
-
if (p1x > p2x) {
|
|
1059
|
-
result[0] = topLeftAx;
|
|
1060
|
-
result[1] = p1y;
|
|
1061
|
-
result[2] = topRightBx;
|
|
1062
|
-
result[3] = p2y;
|
|
1063
|
-
return false;
|
|
1064
|
-
} else if (p1x < p2x) {
|
|
1065
|
-
result[0] = topRightAx;
|
|
1066
|
-
result[1] = p1y;
|
|
1067
|
-
result[2] = topLeftBx;
|
|
1068
|
-
result[3] = p2y;
|
|
1069
|
-
return false;
|
|
1070
|
-
}
|
|
1071
|
-
} else {
|
|
1072
|
-
var slopeA = rectA.height / rectA.width;
|
|
1073
|
-
var slopeB = rectB.height / rectB.width;
|
|
1074
|
-
var slopePrime = (p2y - p1y) / (p2x - p1x);
|
|
1075
|
-
var cardinalDirectionA = void 0;
|
|
1076
|
-
var cardinalDirectionB = void 0;
|
|
1077
|
-
var tempPointAx = void 0;
|
|
1078
|
-
var tempPointAy = void 0;
|
|
1079
|
-
var tempPointBx = void 0;
|
|
1080
|
-
var tempPointBy = void 0;
|
|
1081
|
-
if (-slopeA === slopePrime) if (p1x > p2x) {
|
|
1082
|
-
result[0] = bottomLeftAx;
|
|
1083
|
-
result[1] = bottomLeftAy;
|
|
1084
|
-
clipPointAFound = true;
|
|
1085
|
-
} else {
|
|
1086
|
-
result[0] = topRightAx;
|
|
1087
|
-
result[1] = topLeftAy;
|
|
1088
|
-
clipPointAFound = true;
|
|
1089
|
-
}
|
|
1090
|
-
else if (slopeA === slopePrime) if (p1x > p2x) {
|
|
1091
|
-
result[0] = topLeftAx;
|
|
1092
|
-
result[1] = topLeftAy;
|
|
1093
|
-
clipPointAFound = true;
|
|
1094
|
-
} else {
|
|
1095
|
-
result[0] = bottomRightAx;
|
|
1096
|
-
result[1] = bottomLeftAy;
|
|
1097
|
-
clipPointAFound = true;
|
|
1098
|
-
}
|
|
1099
|
-
if (-slopeB === slopePrime) if (p2x > p1x) {
|
|
1100
|
-
result[2] = bottomLeftBx;
|
|
1101
|
-
result[3] = bottomLeftBy;
|
|
1102
|
-
clipPointBFound = true;
|
|
1103
|
-
} else {
|
|
1104
|
-
result[2] = topRightBx;
|
|
1105
|
-
result[3] = topLeftBy;
|
|
1106
|
-
clipPointBFound = true;
|
|
1107
|
-
}
|
|
1108
|
-
else if (slopeB === slopePrime) if (p2x > p1x) {
|
|
1109
|
-
result[2] = topLeftBx;
|
|
1110
|
-
result[3] = topLeftBy;
|
|
1111
|
-
clipPointBFound = true;
|
|
1112
|
-
} else {
|
|
1113
|
-
result[2] = bottomRightBx;
|
|
1114
|
-
result[3] = bottomLeftBy;
|
|
1115
|
-
clipPointBFound = true;
|
|
1116
|
-
}
|
|
1117
|
-
if (clipPointAFound && clipPointBFound) return false;
|
|
1118
|
-
if (p1x > p2x) if (p1y > p2y) {
|
|
1119
|
-
cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4);
|
|
1120
|
-
cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2);
|
|
1121
|
-
} else {
|
|
1122
|
-
cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3);
|
|
1123
|
-
cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1);
|
|
1124
|
-
}
|
|
1125
|
-
else if (p1y > p2y) {
|
|
1126
|
-
cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1);
|
|
1127
|
-
cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3);
|
|
1128
|
-
} else {
|
|
1129
|
-
cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2);
|
|
1130
|
-
cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4);
|
|
1131
|
-
}
|
|
1132
|
-
if (!clipPointAFound) switch (cardinalDirectionA) {
|
|
1133
|
-
case 1:
|
|
1134
|
-
tempPointAy = topLeftAy;
|
|
1135
|
-
tempPointAx = p1x + -halfHeightA / slopePrime;
|
|
1136
|
-
result[0] = tempPointAx;
|
|
1137
|
-
result[1] = tempPointAy;
|
|
1138
|
-
break;
|
|
1139
|
-
case 2:
|
|
1140
|
-
tempPointAx = bottomRightAx;
|
|
1141
|
-
tempPointAy = p1y + halfWidthA * slopePrime;
|
|
1142
|
-
result[0] = tempPointAx;
|
|
1143
|
-
result[1] = tempPointAy;
|
|
1144
|
-
break;
|
|
1145
|
-
case 3:
|
|
1146
|
-
tempPointAy = bottomLeftAy;
|
|
1147
|
-
tempPointAx = p1x + halfHeightA / slopePrime;
|
|
1148
|
-
result[0] = tempPointAx;
|
|
1149
|
-
result[1] = tempPointAy;
|
|
1150
|
-
break;
|
|
1151
|
-
case 4:
|
|
1152
|
-
tempPointAx = bottomLeftAx;
|
|
1153
|
-
tempPointAy = p1y + -halfWidthA * slopePrime;
|
|
1154
|
-
result[0] = tempPointAx;
|
|
1155
|
-
result[1] = tempPointAy;
|
|
1156
|
-
break;
|
|
1157
|
-
}
|
|
1158
|
-
if (!clipPointBFound) switch (cardinalDirectionB) {
|
|
1159
|
-
case 1:
|
|
1160
|
-
tempPointBy = topLeftBy;
|
|
1161
|
-
tempPointBx = p2x + -halfHeightB / slopePrime;
|
|
1162
|
-
result[2] = tempPointBx;
|
|
1163
|
-
result[3] = tempPointBy;
|
|
1164
|
-
break;
|
|
1165
|
-
case 2:
|
|
1166
|
-
tempPointBx = bottomRightBx;
|
|
1167
|
-
tempPointBy = p2y + halfWidthB * slopePrime;
|
|
1168
|
-
result[2] = tempPointBx;
|
|
1169
|
-
result[3] = tempPointBy;
|
|
1170
|
-
break;
|
|
1171
|
-
case 3:
|
|
1172
|
-
tempPointBy = bottomLeftBy;
|
|
1173
|
-
tempPointBx = p2x + halfHeightB / slopePrime;
|
|
1174
|
-
result[2] = tempPointBx;
|
|
1175
|
-
result[3] = tempPointBy;
|
|
1176
|
-
break;
|
|
1177
|
-
case 4:
|
|
1178
|
-
tempPointBx = bottomLeftBx;
|
|
1179
|
-
tempPointBy = p2y + -halfWidthB * slopePrime;
|
|
1180
|
-
result[2] = tempPointBx;
|
|
1181
|
-
result[3] = tempPointBy;
|
|
1182
|
-
break;
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
return false;
|
|
1186
|
-
};
|
|
1187
|
-
/**
|
|
1188
|
-
* This method returns in which cardinal direction does input point stays
|
|
1189
|
-
* 1: North
|
|
1190
|
-
* 2: East
|
|
1191
|
-
* 3: South
|
|
1192
|
-
* 4: West
|
|
1193
|
-
*/
|
|
1194
|
-
IGeometry.getCardinalDirection = function(slope, slopePrime, line) {
|
|
1195
|
-
if (slope > slopePrime) return line;
|
|
1196
|
-
else return 1 + line % 4;
|
|
1197
|
-
};
|
|
1198
|
-
/**
|
|
1199
|
-
* This method calculates the intersection of the two lines defined by
|
|
1200
|
-
* point pairs (s1,s2) and (f1,f2).
|
|
1201
|
-
*/
|
|
1202
|
-
IGeometry.getIntersection = function(s1, s2, f1, f2) {
|
|
1203
|
-
if (f2 == null) return this.getIntersection2(s1, s2, f1);
|
|
1204
|
-
var x1 = s1.x;
|
|
1205
|
-
var y1 = s1.y;
|
|
1206
|
-
var x2 = s2.x;
|
|
1207
|
-
var y2 = s2.y;
|
|
1208
|
-
var x3 = f1.x;
|
|
1209
|
-
var y3 = f1.y;
|
|
1210
|
-
var x4 = f2.x;
|
|
1211
|
-
var y4 = f2.y;
|
|
1212
|
-
var x = void 0;
|
|
1213
|
-
var y = void 0;
|
|
1214
|
-
var a1 = void 0;
|
|
1215
|
-
var a2 = void 0;
|
|
1216
|
-
var b1 = void 0;
|
|
1217
|
-
var b2 = void 0;
|
|
1218
|
-
var c1 = void 0;
|
|
1219
|
-
var c2 = void 0;
|
|
1220
|
-
var denom = void 0;
|
|
1221
|
-
a1 = y2 - y1;
|
|
1222
|
-
b1 = x1 - x2;
|
|
1223
|
-
c1 = x2 * y1 - x1 * y2;
|
|
1224
|
-
a2 = y4 - y3;
|
|
1225
|
-
b2 = x3 - x4;
|
|
1226
|
-
c2 = x4 * y3 - x3 * y4;
|
|
1227
|
-
denom = a1 * b2 - a2 * b1;
|
|
1228
|
-
if (denom === 0) return null;
|
|
1229
|
-
x = (b1 * c2 - b2 * c1) / denom;
|
|
1230
|
-
y = (a2 * c1 - a1 * c2) / denom;
|
|
1231
|
-
return new Point(x, y);
|
|
1232
|
-
};
|
|
1233
|
-
/**
|
|
1234
|
-
* This method finds and returns the angle of the vector from the + x-axis
|
|
1235
|
-
* in clockwise direction (compatible w/ Java coordinate system!).
|
|
1236
|
-
*/
|
|
1237
|
-
IGeometry.angleOfVector = function(Cx, Cy, Nx, Ny) {
|
|
1238
|
-
var C_angle = void 0;
|
|
1239
|
-
if (Cx !== Nx) {
|
|
1240
|
-
C_angle = Math.atan((Ny - Cy) / (Nx - Cx));
|
|
1241
|
-
if (Nx < Cx) C_angle += Math.PI;
|
|
1242
|
-
else if (Ny < Cy) C_angle += this.TWO_PI;
|
|
1243
|
-
} else if (Ny < Cy) C_angle = this.ONE_AND_HALF_PI;
|
|
1244
|
-
else C_angle = this.HALF_PI;
|
|
1245
|
-
return C_angle;
|
|
1246
|
-
};
|
|
1247
|
-
/**
|
|
1248
|
-
* This method checks whether the given two line segments (one with point
|
|
1249
|
-
* p1 and p2, the other with point p3 and p4) intersect at a point other
|
|
1250
|
-
* than these points.
|
|
1251
|
-
*/
|
|
1252
|
-
IGeometry.doIntersect = function(p1, p2, p3, p4) {
|
|
1253
|
-
var a = p1.x;
|
|
1254
|
-
var b = p1.y;
|
|
1255
|
-
var c = p2.x;
|
|
1256
|
-
var d = p2.y;
|
|
1257
|
-
var p = p3.x;
|
|
1258
|
-
var q = p3.y;
|
|
1259
|
-
var r = p4.x;
|
|
1260
|
-
var s = p4.y;
|
|
1261
|
-
var det = (c - a) * (s - q) - (r - p) * (d - b);
|
|
1262
|
-
if (det === 0) return false;
|
|
1263
|
-
else {
|
|
1264
|
-
var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det;
|
|
1265
|
-
var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det;
|
|
1266
|
-
return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1;
|
|
1267
|
-
}
|
|
1268
|
-
};
|
|
1269
|
-
/**
|
|
1270
|
-
* Some useful pre-calculated constants
|
|
1271
|
-
*/
|
|
1272
|
-
IGeometry.HALF_PI = .5 * Math.PI;
|
|
1273
|
-
IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI;
|
|
1274
|
-
IGeometry.TWO_PI = 2 * Math.PI;
|
|
1275
|
-
IGeometry.THREE_PI = 3 * Math.PI;
|
|
1276
|
-
module$25.exports = IGeometry;
|
|
1277
|
-
}),
|
|
1278
|
-
(function(module$26, exports$23, __webpack_require__) {
|
|
1279
|
-
"use strict";
|
|
1280
|
-
function IMath() {}
|
|
1281
|
-
/**
|
|
1282
|
-
* This method returns the sign of the input value.
|
|
1283
|
-
*/
|
|
1284
|
-
IMath.sign = function(value) {
|
|
1285
|
-
if (value > 0) return 1;
|
|
1286
|
-
else if (value < 0) return -1;
|
|
1287
|
-
else return 0;
|
|
1288
|
-
};
|
|
1289
|
-
IMath.floor = function(value) {
|
|
1290
|
-
return value < 0 ? Math.ceil(value) : Math.floor(value);
|
|
1291
|
-
};
|
|
1292
|
-
IMath.ceil = function(value) {
|
|
1293
|
-
return value < 0 ? Math.floor(value) : Math.ceil(value);
|
|
1294
|
-
};
|
|
1295
|
-
module$26.exports = IMath;
|
|
1296
|
-
}),
|
|
1297
|
-
(function(module$27, exports$24, __webpack_require__) {
|
|
1298
|
-
"use strict";
|
|
1299
|
-
function Integer() {}
|
|
1300
|
-
Integer.MAX_VALUE = 2147483647;
|
|
1301
|
-
Integer.MIN_VALUE = -2147483648;
|
|
1302
|
-
module$27.exports = Integer;
|
|
1303
|
-
}),
|
|
1304
|
-
(function(module$28, exports$25, __webpack_require__) {
|
|
1305
|
-
"use strict";
|
|
1306
|
-
var _createClass = function() {
|
|
1307
|
-
function defineProperties(target, props) {
|
|
1308
|
-
for (var i = 0; i < props.length; i++) {
|
|
1309
|
-
var descriptor = props[i];
|
|
1310
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1311
|
-
descriptor.configurable = true;
|
|
1312
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1313
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
return function(Constructor, protoProps, staticProps) {
|
|
1317
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
1318
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
1319
|
-
return Constructor;
|
|
1320
|
-
};
|
|
1321
|
-
}();
|
|
1322
|
-
function _classCallCheck(instance, Constructor) {
|
|
1323
|
-
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
1324
|
-
}
|
|
1325
|
-
var nodeFrom = function nodeFrom(value) {
|
|
1326
|
-
return {
|
|
1327
|
-
value,
|
|
1328
|
-
next: null,
|
|
1329
|
-
prev: null
|
|
1330
|
-
};
|
|
1331
|
-
};
|
|
1332
|
-
var add = function add(prev, node, next, list) {
|
|
1333
|
-
if (prev !== null) prev.next = node;
|
|
1334
|
-
else list.head = node;
|
|
1335
|
-
if (next !== null) next.prev = node;
|
|
1336
|
-
else list.tail = node;
|
|
1337
|
-
node.prev = prev;
|
|
1338
|
-
node.next = next;
|
|
1339
|
-
list.length++;
|
|
1340
|
-
return node;
|
|
1341
|
-
};
|
|
1342
|
-
var _remove = function _remove(node, list) {
|
|
1343
|
-
var prev = node.prev;
|
|
1344
|
-
var next = node.next;
|
|
1345
|
-
if (prev !== null) prev.next = next;
|
|
1346
|
-
else list.head = next;
|
|
1347
|
-
if (next !== null) next.prev = prev;
|
|
1348
|
-
else list.tail = prev;
|
|
1349
|
-
node.prev = node.next = null;
|
|
1350
|
-
list.length--;
|
|
1351
|
-
return node;
|
|
1352
|
-
};
|
|
1353
|
-
module$28.exports = function() {
|
|
1354
|
-
function LinkedList(vals) {
|
|
1355
|
-
var _this = this;
|
|
1356
|
-
_classCallCheck(this, LinkedList);
|
|
1357
|
-
this.length = 0;
|
|
1358
|
-
this.head = null;
|
|
1359
|
-
this.tail = null;
|
|
1360
|
-
if (vals != null) vals.forEach(function(v) {
|
|
1361
|
-
return _this.push(v);
|
|
1362
|
-
});
|
|
1363
|
-
}
|
|
1364
|
-
_createClass(LinkedList, [
|
|
1365
|
-
{
|
|
1366
|
-
key: "size",
|
|
1367
|
-
value: function size() {
|
|
1368
|
-
return this.length;
|
|
1369
|
-
}
|
|
1370
|
-
},
|
|
1371
|
-
{
|
|
1372
|
-
key: "insertBefore",
|
|
1373
|
-
value: function insertBefore(val, otherNode) {
|
|
1374
|
-
return add(otherNode.prev, nodeFrom(val), otherNode, this);
|
|
1375
|
-
}
|
|
1376
|
-
},
|
|
1377
|
-
{
|
|
1378
|
-
key: "insertAfter",
|
|
1379
|
-
value: function insertAfter(val, otherNode) {
|
|
1380
|
-
return add(otherNode, nodeFrom(val), otherNode.next, this);
|
|
1381
|
-
}
|
|
1382
|
-
},
|
|
1383
|
-
{
|
|
1384
|
-
key: "insertNodeBefore",
|
|
1385
|
-
value: function insertNodeBefore(newNode, otherNode) {
|
|
1386
|
-
return add(otherNode.prev, newNode, otherNode, this);
|
|
1387
|
-
}
|
|
1388
|
-
},
|
|
1389
|
-
{
|
|
1390
|
-
key: "insertNodeAfter",
|
|
1391
|
-
value: function insertNodeAfter(newNode, otherNode) {
|
|
1392
|
-
return add(otherNode, newNode, otherNode.next, this);
|
|
1393
|
-
}
|
|
1394
|
-
},
|
|
1395
|
-
{
|
|
1396
|
-
key: "push",
|
|
1397
|
-
value: function push(val) {
|
|
1398
|
-
return add(this.tail, nodeFrom(val), null, this);
|
|
1399
|
-
}
|
|
1400
|
-
},
|
|
1401
|
-
{
|
|
1402
|
-
key: "unshift",
|
|
1403
|
-
value: function unshift(val) {
|
|
1404
|
-
return add(null, nodeFrom(val), this.head, this);
|
|
1405
|
-
}
|
|
1406
|
-
},
|
|
1407
|
-
{
|
|
1408
|
-
key: "remove",
|
|
1409
|
-
value: function remove(node) {
|
|
1410
|
-
return _remove(node, this);
|
|
1411
|
-
}
|
|
1412
|
-
},
|
|
1413
|
-
{
|
|
1414
|
-
key: "pop",
|
|
1415
|
-
value: function pop() {
|
|
1416
|
-
return _remove(this.tail, this).value;
|
|
1417
|
-
}
|
|
1418
|
-
},
|
|
1419
|
-
{
|
|
1420
|
-
key: "popNode",
|
|
1421
|
-
value: function popNode() {
|
|
1422
|
-
return _remove(this.tail, this);
|
|
1423
|
-
}
|
|
1424
|
-
},
|
|
1425
|
-
{
|
|
1426
|
-
key: "shift",
|
|
1427
|
-
value: function shift() {
|
|
1428
|
-
return _remove(this.head, this).value;
|
|
1429
|
-
}
|
|
1430
|
-
},
|
|
1431
|
-
{
|
|
1432
|
-
key: "shiftNode",
|
|
1433
|
-
value: function shiftNode() {
|
|
1434
|
-
return _remove(this.head, this);
|
|
1435
|
-
}
|
|
1436
|
-
},
|
|
1437
|
-
{
|
|
1438
|
-
key: "get_object_at",
|
|
1439
|
-
value: function get_object_at(index) {
|
|
1440
|
-
if (index <= this.length()) {
|
|
1441
|
-
var i = 1;
|
|
1442
|
-
var current = this.head;
|
|
1443
|
-
while (i < index) {
|
|
1444
|
-
current = current.next;
|
|
1445
|
-
i++;
|
|
1446
|
-
}
|
|
1447
|
-
return current.value;
|
|
1448
|
-
}
|
|
1449
|
-
}
|
|
1450
|
-
},
|
|
1451
|
-
{
|
|
1452
|
-
key: "set_object_at",
|
|
1453
|
-
value: function set_object_at(index, value) {
|
|
1454
|
-
if (index <= this.length()) {
|
|
1455
|
-
var i = 1;
|
|
1456
|
-
var current = this.head;
|
|
1457
|
-
while (i < index) {
|
|
1458
|
-
current = current.next;
|
|
1459
|
-
i++;
|
|
1460
|
-
}
|
|
1461
|
-
current.value = value;
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
]);
|
|
1466
|
-
return LinkedList;
|
|
1467
|
-
}();
|
|
1468
|
-
}),
|
|
1469
|
-
(function(module$29, exports$26, __webpack_require__) {
|
|
1470
|
-
"use strict";
|
|
1471
|
-
function Point(x, y, p) {
|
|
1472
|
-
this.x = null;
|
|
1473
|
-
this.y = null;
|
|
1474
|
-
if (x == null && y == null && p == null) {
|
|
1475
|
-
this.x = 0;
|
|
1476
|
-
this.y = 0;
|
|
1477
|
-
} else if (typeof x == "number" && typeof y == "number" && p == null) {
|
|
1478
|
-
this.x = x;
|
|
1479
|
-
this.y = y;
|
|
1480
|
-
} else if (x.constructor.name == "Point" && y == null && p == null) {
|
|
1481
|
-
p = x;
|
|
1482
|
-
this.x = p.x;
|
|
1483
|
-
this.y = p.y;
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
Point.prototype.getX = function() {
|
|
1487
|
-
return this.x;
|
|
1488
|
-
};
|
|
1489
|
-
Point.prototype.getY = function() {
|
|
1490
|
-
return this.y;
|
|
1491
|
-
};
|
|
1492
|
-
Point.prototype.getLocation = function() {
|
|
1493
|
-
return new Point(this.x, this.y);
|
|
1494
|
-
};
|
|
1495
|
-
Point.prototype.setLocation = function(x, y, p) {
|
|
1496
|
-
if (x.constructor.name == "Point" && y == null && p == null) {
|
|
1497
|
-
p = x;
|
|
1498
|
-
this.setLocation(p.x, p.y);
|
|
1499
|
-
} else if (typeof x == "number" && typeof y == "number" && p == null) if (parseInt(x) == x && parseInt(y) == y) this.move(x, y);
|
|
1500
|
-
else {
|
|
1501
|
-
this.x = Math.floor(x + .5);
|
|
1502
|
-
this.y = Math.floor(y + .5);
|
|
1503
|
-
}
|
|
1504
|
-
};
|
|
1505
|
-
Point.prototype.move = function(x, y) {
|
|
1506
|
-
this.x = x;
|
|
1507
|
-
this.y = y;
|
|
1508
|
-
};
|
|
1509
|
-
Point.prototype.translate = function(dx, dy) {
|
|
1510
|
-
this.x += dx;
|
|
1511
|
-
this.y += dy;
|
|
1512
|
-
};
|
|
1513
|
-
Point.prototype.equals = function(obj) {
|
|
1514
|
-
if (obj.constructor.name == "Point") {
|
|
1515
|
-
var pt = obj;
|
|
1516
|
-
return this.x == pt.x && this.y == pt.y;
|
|
1517
|
-
}
|
|
1518
|
-
return this == obj;
|
|
1519
|
-
};
|
|
1520
|
-
Point.prototype.toString = function() {
|
|
1521
|
-
return new Point().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
|
|
1522
|
-
};
|
|
1523
|
-
module$29.exports = Point;
|
|
1524
|
-
}),
|
|
1525
|
-
(function(module$30, exports$27, __webpack_require__) {
|
|
1526
|
-
"use strict";
|
|
1527
|
-
function RectangleD(x, y, width, height) {
|
|
1528
|
-
this.x = 0;
|
|
1529
|
-
this.y = 0;
|
|
1530
|
-
this.width = 0;
|
|
1531
|
-
this.height = 0;
|
|
1532
|
-
if (x != null && y != null && width != null && height != null) {
|
|
1533
|
-
this.x = x;
|
|
1534
|
-
this.y = y;
|
|
1535
|
-
this.width = width;
|
|
1536
|
-
this.height = height;
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
RectangleD.prototype.getX = function() {
|
|
1540
|
-
return this.x;
|
|
1541
|
-
};
|
|
1542
|
-
RectangleD.prototype.setX = function(x) {
|
|
1543
|
-
this.x = x;
|
|
1544
|
-
};
|
|
1545
|
-
RectangleD.prototype.getY = function() {
|
|
1546
|
-
return this.y;
|
|
1547
|
-
};
|
|
1548
|
-
RectangleD.prototype.setY = function(y) {
|
|
1549
|
-
this.y = y;
|
|
1550
|
-
};
|
|
1551
|
-
RectangleD.prototype.getWidth = function() {
|
|
1552
|
-
return this.width;
|
|
1553
|
-
};
|
|
1554
|
-
RectangleD.prototype.setWidth = function(width) {
|
|
1555
|
-
this.width = width;
|
|
1556
|
-
};
|
|
1557
|
-
RectangleD.prototype.getHeight = function() {
|
|
1558
|
-
return this.height;
|
|
1559
|
-
};
|
|
1560
|
-
RectangleD.prototype.setHeight = function(height) {
|
|
1561
|
-
this.height = height;
|
|
1562
|
-
};
|
|
1563
|
-
RectangleD.prototype.getRight = function() {
|
|
1564
|
-
return this.x + this.width;
|
|
1565
|
-
};
|
|
1566
|
-
RectangleD.prototype.getBottom = function() {
|
|
1567
|
-
return this.y + this.height;
|
|
1568
|
-
};
|
|
1569
|
-
RectangleD.prototype.intersects = function(a) {
|
|
1570
|
-
if (this.getRight() < a.x) return false;
|
|
1571
|
-
if (this.getBottom() < a.y) return false;
|
|
1572
|
-
if (a.getRight() < this.x) return false;
|
|
1573
|
-
if (a.getBottom() < this.y) return false;
|
|
1574
|
-
return true;
|
|
1575
|
-
};
|
|
1576
|
-
RectangleD.prototype.getCenterX = function() {
|
|
1577
|
-
return this.x + this.width / 2;
|
|
1578
|
-
};
|
|
1579
|
-
RectangleD.prototype.getMinX = function() {
|
|
1580
|
-
return this.getX();
|
|
1581
|
-
};
|
|
1582
|
-
RectangleD.prototype.getMaxX = function() {
|
|
1583
|
-
return this.getX() + this.width;
|
|
1584
|
-
};
|
|
1585
|
-
RectangleD.prototype.getCenterY = function() {
|
|
1586
|
-
return this.y + this.height / 2;
|
|
1587
|
-
};
|
|
1588
|
-
RectangleD.prototype.getMinY = function() {
|
|
1589
|
-
return this.getY();
|
|
1590
|
-
};
|
|
1591
|
-
RectangleD.prototype.getMaxY = function() {
|
|
1592
|
-
return this.getY() + this.height;
|
|
1593
|
-
};
|
|
1594
|
-
RectangleD.prototype.getWidthHalf = function() {
|
|
1595
|
-
return this.width / 2;
|
|
1596
|
-
};
|
|
1597
|
-
RectangleD.prototype.getHeightHalf = function() {
|
|
1598
|
-
return this.height / 2;
|
|
1599
|
-
};
|
|
1600
|
-
module$30.exports = RectangleD;
|
|
1601
|
-
}),
|
|
1602
|
-
(function(module$31, exports$28, __webpack_require__) {
|
|
1603
|
-
"use strict";
|
|
1604
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
1605
|
-
return typeof obj;
|
|
1606
|
-
} : function(obj) {
|
|
1607
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1608
|
-
};
|
|
1609
|
-
function UniqueIDGeneretor() {}
|
|
1610
|
-
UniqueIDGeneretor.lastID = 0;
|
|
1611
|
-
UniqueIDGeneretor.createID = function(obj) {
|
|
1612
|
-
if (UniqueIDGeneretor.isPrimitive(obj)) return obj;
|
|
1613
|
-
if (obj.uniqueID != null) return obj.uniqueID;
|
|
1614
|
-
obj.uniqueID = UniqueIDGeneretor.getString();
|
|
1615
|
-
UniqueIDGeneretor.lastID++;
|
|
1616
|
-
return obj.uniqueID;
|
|
1617
|
-
};
|
|
1618
|
-
UniqueIDGeneretor.getString = function(id) {
|
|
1619
|
-
if (id == null) id = UniqueIDGeneretor.lastID;
|
|
1620
|
-
return "Object#" + id;
|
|
1621
|
-
};
|
|
1622
|
-
UniqueIDGeneretor.isPrimitive = function(arg) {
|
|
1623
|
-
var type = typeof arg === "undefined" ? "undefined" : _typeof(arg);
|
|
1624
|
-
return arg == null || type != "object" && type != "function";
|
|
1625
|
-
};
|
|
1626
|
-
module$31.exports = UniqueIDGeneretor;
|
|
1627
|
-
}),
|
|
1628
|
-
(function(module$32, exports$29, __webpack_require__) {
|
|
1629
|
-
"use strict";
|
|
1630
|
-
function _toConsumableArray(arr) {
|
|
1631
|
-
if (Array.isArray(arr)) {
|
|
1632
|
-
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
|
1633
|
-
return arr2;
|
|
1634
|
-
} else return Array.from(arr);
|
|
1635
|
-
}
|
|
1636
|
-
var LayoutConstants = __webpack_require__(0);
|
|
1637
|
-
var LGraphManager = __webpack_require__(6);
|
|
1638
|
-
var LNode = __webpack_require__(3);
|
|
1639
|
-
var LEdge = __webpack_require__(1);
|
|
1640
|
-
var LGraph = __webpack_require__(5);
|
|
1641
|
-
var PointD = __webpack_require__(4);
|
|
1642
|
-
var Transform = __webpack_require__(17);
|
|
1643
|
-
var Emitter = __webpack_require__(27);
|
|
1644
|
-
function Layout(isRemoteUse) {
|
|
1645
|
-
Emitter.call(this);
|
|
1646
|
-
this.layoutQuality = LayoutConstants.QUALITY;
|
|
1647
|
-
this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
|
|
1648
|
-
this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;
|
|
1649
|
-
this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;
|
|
1650
|
-
this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;
|
|
1651
|
-
this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;
|
|
1652
|
-
/**
|
|
1653
|
-
* Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When
|
|
1654
|
-
* they are, both spring and repulsion forces between two leaf nodes can be
|
|
1655
|
-
* calculated without the expensive clipping point calculations, resulting
|
|
1656
|
-
* in major speed-up.
|
|
1657
|
-
*/
|
|
1658
|
-
this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;
|
|
1659
|
-
/**
|
|
1660
|
-
* This is used for creation of bendpoints by using dummy nodes and edges.
|
|
1661
|
-
* Maps an LEdge to its dummy bendpoint path.
|
|
1662
|
-
*/
|
|
1663
|
-
this.edgeToDummyNodes = /* @__PURE__ */ new Map();
|
|
1664
|
-
this.graphManager = new LGraphManager(this);
|
|
1665
|
-
this.isLayoutFinished = false;
|
|
1666
|
-
this.isSubLayout = false;
|
|
1667
|
-
this.isRemoteUse = false;
|
|
1668
|
-
if (isRemoteUse != null) this.isRemoteUse = isRemoteUse;
|
|
1669
|
-
}
|
|
1670
|
-
Layout.RANDOM_SEED = 1;
|
|
1671
|
-
Layout.prototype = Object.create(Emitter.prototype);
|
|
1672
|
-
Layout.prototype.getGraphManager = function() {
|
|
1673
|
-
return this.graphManager;
|
|
1674
|
-
};
|
|
1675
|
-
Layout.prototype.getAllNodes = function() {
|
|
1676
|
-
return this.graphManager.getAllNodes();
|
|
1677
|
-
};
|
|
1678
|
-
Layout.prototype.getAllEdges = function() {
|
|
1679
|
-
return this.graphManager.getAllEdges();
|
|
1680
|
-
};
|
|
1681
|
-
Layout.prototype.getAllNodesToApplyGravitation = function() {
|
|
1682
|
-
return this.graphManager.getAllNodesToApplyGravitation();
|
|
1683
|
-
};
|
|
1684
|
-
Layout.prototype.newGraphManager = function() {
|
|
1685
|
-
var gm = new LGraphManager(this);
|
|
1686
|
-
this.graphManager = gm;
|
|
1687
|
-
return gm;
|
|
1688
|
-
};
|
|
1689
|
-
Layout.prototype.newGraph = function(vGraph) {
|
|
1690
|
-
return new LGraph(null, this.graphManager, vGraph);
|
|
1691
|
-
};
|
|
1692
|
-
Layout.prototype.newNode = function(vNode) {
|
|
1693
|
-
return new LNode(this.graphManager, vNode);
|
|
1694
|
-
};
|
|
1695
|
-
Layout.prototype.newEdge = function(vEdge) {
|
|
1696
|
-
return new LEdge(null, null, vEdge);
|
|
1697
|
-
};
|
|
1698
|
-
Layout.prototype.checkLayoutSuccess = function() {
|
|
1699
|
-
return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
|
|
1700
|
-
};
|
|
1701
|
-
Layout.prototype.runLayout = function() {
|
|
1702
|
-
this.isLayoutFinished = false;
|
|
1703
|
-
if (this.tilingPreLayout) this.tilingPreLayout();
|
|
1704
|
-
this.initParameters();
|
|
1705
|
-
var isLayoutSuccessfull;
|
|
1706
|
-
if (this.checkLayoutSuccess()) isLayoutSuccessfull = false;
|
|
1707
|
-
else isLayoutSuccessfull = this.layout();
|
|
1708
|
-
if (LayoutConstants.ANIMATE === "during") return false;
|
|
1709
|
-
if (isLayoutSuccessfull) {
|
|
1710
|
-
if (!this.isSubLayout) this.doPostLayout();
|
|
1711
|
-
}
|
|
1712
|
-
if (this.tilingPostLayout) this.tilingPostLayout();
|
|
1713
|
-
this.isLayoutFinished = true;
|
|
1714
|
-
return isLayoutSuccessfull;
|
|
1715
|
-
};
|
|
1716
|
-
/**
|
|
1717
|
-
* This method performs the operations required after layout.
|
|
1718
|
-
*/
|
|
1719
|
-
Layout.prototype.doPostLayout = function() {
|
|
1720
|
-
if (!this.incremental) this.transform();
|
|
1721
|
-
this.update();
|
|
1722
|
-
};
|
|
1723
|
-
/**
|
|
1724
|
-
* This method updates the geometry of the target graph according to
|
|
1725
|
-
* calculated layout.
|
|
1726
|
-
*/
|
|
1727
|
-
Layout.prototype.update2 = function() {
|
|
1728
|
-
if (this.createBendsAsNeeded) {
|
|
1729
|
-
this.createBendpointsFromDummyNodes();
|
|
1730
|
-
this.graphManager.resetAllEdges();
|
|
1731
|
-
}
|
|
1732
|
-
if (!this.isRemoteUse) {
|
|
1733
|
-
var allEdges = this.graphManager.getAllEdges();
|
|
1734
|
-
for (var i = 0; i < allEdges.length; i++) allEdges[i];
|
|
1735
|
-
var nodes = this.graphManager.getRoot().getNodes();
|
|
1736
|
-
for (var i = 0; i < nodes.length; i++) nodes[i];
|
|
1737
|
-
this.update(this.graphManager.getRoot());
|
|
1738
|
-
}
|
|
1739
|
-
};
|
|
1740
|
-
Layout.prototype.update = function(obj) {
|
|
1741
|
-
if (obj == null) this.update2();
|
|
1742
|
-
else if (obj instanceof LNode) {
|
|
1743
|
-
var node = obj;
|
|
1744
|
-
if (node.getChild() != null) {
|
|
1745
|
-
var nodes = node.getChild().getNodes();
|
|
1746
|
-
for (var i = 0; i < nodes.length; i++) update(nodes[i]);
|
|
1747
|
-
}
|
|
1748
|
-
if (node.vGraphObject != null) node.vGraphObject.update(node);
|
|
1749
|
-
} else if (obj instanceof LEdge) {
|
|
1750
|
-
var edge = obj;
|
|
1751
|
-
if (edge.vGraphObject != null) edge.vGraphObject.update(edge);
|
|
1752
|
-
} else if (obj instanceof LGraph) {
|
|
1753
|
-
var graph = obj;
|
|
1754
|
-
if (graph.vGraphObject != null) graph.vGraphObject.update(graph);
|
|
1755
|
-
}
|
|
1756
|
-
};
|
|
1757
|
-
/**
|
|
1758
|
-
* This method is used to set all layout parameters to default values
|
|
1759
|
-
* determined at compile time.
|
|
1760
|
-
*/
|
|
1761
|
-
Layout.prototype.initParameters = function() {
|
|
1762
|
-
if (!this.isSubLayout) {
|
|
1763
|
-
this.layoutQuality = LayoutConstants.QUALITY;
|
|
1764
|
-
this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;
|
|
1765
|
-
this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;
|
|
1766
|
-
this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;
|
|
1767
|
-
this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;
|
|
1768
|
-
this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;
|
|
1769
|
-
this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;
|
|
1770
|
-
}
|
|
1771
|
-
if (this.animationDuringLayout) this.animationOnLayout = false;
|
|
1772
|
-
};
|
|
1773
|
-
Layout.prototype.transform = function(newLeftTop) {
|
|
1774
|
-
if (newLeftTop == void 0) this.transform(new PointD(0, 0));
|
|
1775
|
-
else {
|
|
1776
|
-
var trans = new Transform();
|
|
1777
|
-
var leftTop = this.graphManager.getRoot().updateLeftTop();
|
|
1778
|
-
if (leftTop != null) {
|
|
1779
|
-
trans.setWorldOrgX(newLeftTop.x);
|
|
1780
|
-
trans.setWorldOrgY(newLeftTop.y);
|
|
1781
|
-
trans.setDeviceOrgX(leftTop.x);
|
|
1782
|
-
trans.setDeviceOrgY(leftTop.y);
|
|
1783
|
-
var nodes = this.getAllNodes();
|
|
1784
|
-
var node;
|
|
1785
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
1786
|
-
node = nodes[i];
|
|
1787
|
-
node.transform(trans);
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
};
|
|
1792
|
-
Layout.prototype.positionNodesRandomly = function(graph) {
|
|
1793
|
-
if (graph == void 0) {
|
|
1794
|
-
this.positionNodesRandomly(this.getGraphManager().getRoot());
|
|
1795
|
-
this.getGraphManager().getRoot().updateBounds(true);
|
|
1796
|
-
} else {
|
|
1797
|
-
var lNode;
|
|
1798
|
-
var childGraph;
|
|
1799
|
-
var nodes = graph.getNodes();
|
|
1800
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
1801
|
-
lNode = nodes[i];
|
|
1802
|
-
childGraph = lNode.getChild();
|
|
1803
|
-
if (childGraph == null) lNode.scatter();
|
|
1804
|
-
else if (childGraph.getNodes().length == 0) lNode.scatter();
|
|
1805
|
-
else {
|
|
1806
|
-
this.positionNodesRandomly(childGraph);
|
|
1807
|
-
lNode.updateBounds();
|
|
1808
|
-
}
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
};
|
|
1812
|
-
/**
|
|
1813
|
-
* This method returns a list of trees where each tree is represented as a
|
|
1814
|
-
* list of l-nodes. The method returns a list of size 0 when:
|
|
1815
|
-
* - The graph is not flat or
|
|
1816
|
-
* - One of the component(s) of the graph is not a tree.
|
|
1817
|
-
*/
|
|
1818
|
-
Layout.prototype.getFlatForest = function() {
|
|
1819
|
-
var flatForest = [];
|
|
1820
|
-
var isForest = true;
|
|
1821
|
-
var allNodes = this.graphManager.getRoot().getNodes();
|
|
1822
|
-
var isFlat = true;
|
|
1823
|
-
for (var i = 0; i < allNodes.length; i++) if (allNodes[i].getChild() != null) isFlat = false;
|
|
1824
|
-
if (!isFlat) return flatForest;
|
|
1825
|
-
var visited = /* @__PURE__ */ new Set();
|
|
1826
|
-
var toBeVisited = [];
|
|
1827
|
-
var parents = /* @__PURE__ */ new Map();
|
|
1828
|
-
var unProcessedNodes = [];
|
|
1829
|
-
unProcessedNodes = unProcessedNodes.concat(allNodes);
|
|
1830
|
-
while (unProcessedNodes.length > 0 && isForest) {
|
|
1831
|
-
toBeVisited.push(unProcessedNodes[0]);
|
|
1832
|
-
while (toBeVisited.length > 0 && isForest) {
|
|
1833
|
-
var currentNode = toBeVisited[0];
|
|
1834
|
-
toBeVisited.splice(0, 1);
|
|
1835
|
-
visited.add(currentNode);
|
|
1836
|
-
var neighborEdges = currentNode.getEdges();
|
|
1837
|
-
for (var i = 0; i < neighborEdges.length; i++) {
|
|
1838
|
-
var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode);
|
|
1839
|
-
if (parents.get(currentNode) != currentNeighbor) if (!visited.has(currentNeighbor)) {
|
|
1840
|
-
toBeVisited.push(currentNeighbor);
|
|
1841
|
-
parents.set(currentNeighbor, currentNode);
|
|
1842
|
-
} else {
|
|
1843
|
-
isForest = false;
|
|
1844
|
-
break;
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
if (!isForest) flatForest = [];
|
|
1849
|
-
else {
|
|
1850
|
-
var temp = [].concat(_toConsumableArray(visited));
|
|
1851
|
-
flatForest.push(temp);
|
|
1852
|
-
for (var i = 0; i < temp.length; i++) {
|
|
1853
|
-
var value = temp[i];
|
|
1854
|
-
var index = unProcessedNodes.indexOf(value);
|
|
1855
|
-
if (index > -1) unProcessedNodes.splice(index, 1);
|
|
1856
|
-
}
|
|
1857
|
-
visited = /* @__PURE__ */ new Set();
|
|
1858
|
-
parents = /* @__PURE__ */ new Map();
|
|
1859
|
-
}
|
|
1860
|
-
}
|
|
1861
|
-
return flatForest;
|
|
1862
|
-
};
|
|
1863
|
-
/**
|
|
1864
|
-
* This method creates dummy nodes (an l-level node with minimal dimensions)
|
|
1865
|
-
* for the given edge (one per bendpoint). The existing l-level structure
|
|
1866
|
-
* is updated accordingly.
|
|
1867
|
-
*/
|
|
1868
|
-
Layout.prototype.createDummyNodesForBendpoints = function(edge) {
|
|
1869
|
-
var dummyNodes = [];
|
|
1870
|
-
var prev = edge.source;
|
|
1871
|
-
var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target);
|
|
1872
|
-
for (var i = 0; i < edge.bendpoints.length; i++) {
|
|
1873
|
-
var dummyNode = this.newNode(null);
|
|
1874
|
-
dummyNode.setRect(new Point(0, 0), new Dimension(1, 1));
|
|
1875
|
-
graph.add(dummyNode);
|
|
1876
|
-
var dummyEdge = this.newEdge(null);
|
|
1877
|
-
this.graphManager.add(dummyEdge, prev, dummyNode);
|
|
1878
|
-
dummyNodes.add(dummyNode);
|
|
1879
|
-
prev = dummyNode;
|
|
1880
|
-
}
|
|
1881
|
-
var dummyEdge = this.newEdge(null);
|
|
1882
|
-
this.graphManager.add(dummyEdge, prev, edge.target);
|
|
1883
|
-
this.edgeToDummyNodes.set(edge, dummyNodes);
|
|
1884
|
-
if (edge.isInterGraph()) this.graphManager.remove(edge);
|
|
1885
|
-
else graph.remove(edge);
|
|
1886
|
-
return dummyNodes;
|
|
1887
|
-
};
|
|
1888
|
-
/**
|
|
1889
|
-
* This method creates bendpoints for edges from the dummy nodes
|
|
1890
|
-
* at l-level.
|
|
1891
|
-
*/
|
|
1892
|
-
Layout.prototype.createBendpointsFromDummyNodes = function() {
|
|
1893
|
-
var edges = [];
|
|
1894
|
-
edges = edges.concat(this.graphManager.getAllEdges());
|
|
1895
|
-
edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges);
|
|
1896
|
-
for (var k = 0; k < edges.length; k++) {
|
|
1897
|
-
var lEdge = edges[k];
|
|
1898
|
-
if (lEdge.bendpoints.length > 0) {
|
|
1899
|
-
var path = this.edgeToDummyNodes.get(lEdge);
|
|
1900
|
-
for (var i = 0; i < path.length; i++) {
|
|
1901
|
-
var dummyNode = path[i];
|
|
1902
|
-
var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY());
|
|
1903
|
-
var ebp = lEdge.bendpoints.get(i);
|
|
1904
|
-
ebp.x = p.x;
|
|
1905
|
-
ebp.y = p.y;
|
|
1906
|
-
dummyNode.getOwner().remove(dummyNode);
|
|
1907
|
-
}
|
|
1908
|
-
this.graphManager.add(lEdge, lEdge.source, lEdge.target);
|
|
1909
|
-
}
|
|
1910
|
-
}
|
|
1911
|
-
};
|
|
1912
|
-
Layout.transform = function(sliderValue, defaultValue, minDiv, maxMul) {
|
|
1913
|
-
if (minDiv != void 0 && maxMul != void 0) {
|
|
1914
|
-
var value = defaultValue;
|
|
1915
|
-
if (sliderValue <= 50) {
|
|
1916
|
-
var minValue = defaultValue / minDiv;
|
|
1917
|
-
value -= (defaultValue - minValue) / 50 * (50 - sliderValue);
|
|
1918
|
-
} else {
|
|
1919
|
-
var maxValue = defaultValue * maxMul;
|
|
1920
|
-
value += (maxValue - defaultValue) / 50 * (sliderValue - 50);
|
|
1921
|
-
}
|
|
1922
|
-
return value;
|
|
1923
|
-
} else {
|
|
1924
|
-
var a;
|
|
1925
|
-
var b;
|
|
1926
|
-
if (sliderValue <= 50) {
|
|
1927
|
-
a = 9 * defaultValue / 500;
|
|
1928
|
-
b = defaultValue / 10;
|
|
1929
|
-
} else {
|
|
1930
|
-
a = 9 * defaultValue / 50;
|
|
1931
|
-
b = -8 * defaultValue;
|
|
1932
|
-
}
|
|
1933
|
-
return a * sliderValue + b;
|
|
1934
|
-
}
|
|
1935
|
-
};
|
|
1936
|
-
/**
|
|
1937
|
-
* This method finds and returns the center of the given nodes, assuming
|
|
1938
|
-
* that the given nodes form a tree in themselves.
|
|
1939
|
-
*/
|
|
1940
|
-
Layout.findCenterOfTree = function(nodes) {
|
|
1941
|
-
var list = [];
|
|
1942
|
-
list = list.concat(nodes);
|
|
1943
|
-
var removedNodes = [];
|
|
1944
|
-
var remainingDegrees = /* @__PURE__ */ new Map();
|
|
1945
|
-
var foundCenter = false;
|
|
1946
|
-
var centerNode = null;
|
|
1947
|
-
if (list.length == 1 || list.length == 2) {
|
|
1948
|
-
foundCenter = true;
|
|
1949
|
-
centerNode = list[0];
|
|
1950
|
-
}
|
|
1951
|
-
for (var i = 0; i < list.length; i++) {
|
|
1952
|
-
var node = list[i];
|
|
1953
|
-
var degree = node.getNeighborsList().size;
|
|
1954
|
-
remainingDegrees.set(node, node.getNeighborsList().size);
|
|
1955
|
-
if (degree == 1) removedNodes.push(node);
|
|
1956
|
-
}
|
|
1957
|
-
var tempList = [];
|
|
1958
|
-
tempList = tempList.concat(removedNodes);
|
|
1959
|
-
while (!foundCenter) {
|
|
1960
|
-
var tempList2 = [];
|
|
1961
|
-
tempList2 = tempList2.concat(tempList);
|
|
1962
|
-
tempList = [];
|
|
1963
|
-
for (var i = 0; i < list.length; i++) {
|
|
1964
|
-
var node = list[i];
|
|
1965
|
-
var index = list.indexOf(node);
|
|
1966
|
-
if (index >= 0) list.splice(index, 1);
|
|
1967
|
-
node.getNeighborsList().forEach(function(neighbour) {
|
|
1968
|
-
if (removedNodes.indexOf(neighbour) < 0) {
|
|
1969
|
-
var newDegree = remainingDegrees.get(neighbour) - 1;
|
|
1970
|
-
if (newDegree == 1) tempList.push(neighbour);
|
|
1971
|
-
remainingDegrees.set(neighbour, newDegree);
|
|
1972
|
-
}
|
|
1973
|
-
});
|
|
1974
|
-
}
|
|
1975
|
-
removedNodes = removedNodes.concat(tempList);
|
|
1976
|
-
if (list.length == 1 || list.length == 2) {
|
|
1977
|
-
foundCenter = true;
|
|
1978
|
-
centerNode = list[0];
|
|
1979
|
-
}
|
|
1980
|
-
}
|
|
1981
|
-
return centerNode;
|
|
1982
|
-
};
|
|
1983
|
-
/**
|
|
1984
|
-
* During the coarsening process, this layout may be referenced by two graph managers
|
|
1985
|
-
* this setter function grants access to change the currently being used graph manager
|
|
1986
|
-
*/
|
|
1987
|
-
Layout.prototype.setGraphManager = function(gm) {
|
|
1988
|
-
this.graphManager = gm;
|
|
1989
|
-
};
|
|
1990
|
-
module$32.exports = Layout;
|
|
1991
|
-
}),
|
|
1992
|
-
(function(module$33, exports$30, __webpack_require__) {
|
|
1993
|
-
"use strict";
|
|
1994
|
-
function RandomSeed() {}
|
|
1995
|
-
RandomSeed.seed = 1;
|
|
1996
|
-
RandomSeed.x = 0;
|
|
1997
|
-
RandomSeed.nextDouble = function() {
|
|
1998
|
-
RandomSeed.x = Math.sin(RandomSeed.seed++) * 1e4;
|
|
1999
|
-
return RandomSeed.x - Math.floor(RandomSeed.x);
|
|
2000
|
-
};
|
|
2001
|
-
module$33.exports = RandomSeed;
|
|
2002
|
-
}),
|
|
2003
|
-
(function(module$34, exports$31, __webpack_require__) {
|
|
2004
|
-
"use strict";
|
|
2005
|
-
var PointD = __webpack_require__(4);
|
|
2006
|
-
function Transform(x, y) {
|
|
2007
|
-
this.lworldOrgX = 0;
|
|
2008
|
-
this.lworldOrgY = 0;
|
|
2009
|
-
this.ldeviceOrgX = 0;
|
|
2010
|
-
this.ldeviceOrgY = 0;
|
|
2011
|
-
this.lworldExtX = 1;
|
|
2012
|
-
this.lworldExtY = 1;
|
|
2013
|
-
this.ldeviceExtX = 1;
|
|
2014
|
-
this.ldeviceExtY = 1;
|
|
2015
|
-
}
|
|
2016
|
-
Transform.prototype.getWorldOrgX = function() {
|
|
2017
|
-
return this.lworldOrgX;
|
|
2018
|
-
};
|
|
2019
|
-
Transform.prototype.setWorldOrgX = function(wox) {
|
|
2020
|
-
this.lworldOrgX = wox;
|
|
2021
|
-
};
|
|
2022
|
-
Transform.prototype.getWorldOrgY = function() {
|
|
2023
|
-
return this.lworldOrgY;
|
|
2024
|
-
};
|
|
2025
|
-
Transform.prototype.setWorldOrgY = function(woy) {
|
|
2026
|
-
this.lworldOrgY = woy;
|
|
2027
|
-
};
|
|
2028
|
-
Transform.prototype.getWorldExtX = function() {
|
|
2029
|
-
return this.lworldExtX;
|
|
2030
|
-
};
|
|
2031
|
-
Transform.prototype.setWorldExtX = function(wex) {
|
|
2032
|
-
this.lworldExtX = wex;
|
|
2033
|
-
};
|
|
2034
|
-
Transform.prototype.getWorldExtY = function() {
|
|
2035
|
-
return this.lworldExtY;
|
|
2036
|
-
};
|
|
2037
|
-
Transform.prototype.setWorldExtY = function(wey) {
|
|
2038
|
-
this.lworldExtY = wey;
|
|
2039
|
-
};
|
|
2040
|
-
Transform.prototype.getDeviceOrgX = function() {
|
|
2041
|
-
return this.ldeviceOrgX;
|
|
2042
|
-
};
|
|
2043
|
-
Transform.prototype.setDeviceOrgX = function(dox) {
|
|
2044
|
-
this.ldeviceOrgX = dox;
|
|
2045
|
-
};
|
|
2046
|
-
Transform.prototype.getDeviceOrgY = function() {
|
|
2047
|
-
return this.ldeviceOrgY;
|
|
2048
|
-
};
|
|
2049
|
-
Transform.prototype.setDeviceOrgY = function(doy) {
|
|
2050
|
-
this.ldeviceOrgY = doy;
|
|
2051
|
-
};
|
|
2052
|
-
Transform.prototype.getDeviceExtX = function() {
|
|
2053
|
-
return this.ldeviceExtX;
|
|
2054
|
-
};
|
|
2055
|
-
Transform.prototype.setDeviceExtX = function(dex) {
|
|
2056
|
-
this.ldeviceExtX = dex;
|
|
2057
|
-
};
|
|
2058
|
-
Transform.prototype.getDeviceExtY = function() {
|
|
2059
|
-
return this.ldeviceExtY;
|
|
2060
|
-
};
|
|
2061
|
-
Transform.prototype.setDeviceExtY = function(dey) {
|
|
2062
|
-
this.ldeviceExtY = dey;
|
|
2063
|
-
};
|
|
2064
|
-
Transform.prototype.transformX = function(x) {
|
|
2065
|
-
var xDevice = 0;
|
|
2066
|
-
var worldExtX = this.lworldExtX;
|
|
2067
|
-
if (worldExtX != 0) xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX;
|
|
2068
|
-
return xDevice;
|
|
2069
|
-
};
|
|
2070
|
-
Transform.prototype.transformY = function(y) {
|
|
2071
|
-
var yDevice = 0;
|
|
2072
|
-
var worldExtY = this.lworldExtY;
|
|
2073
|
-
if (worldExtY != 0) yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY;
|
|
2074
|
-
return yDevice;
|
|
2075
|
-
};
|
|
2076
|
-
Transform.prototype.inverseTransformX = function(x) {
|
|
2077
|
-
var xWorld = 0;
|
|
2078
|
-
var deviceExtX = this.ldeviceExtX;
|
|
2079
|
-
if (deviceExtX != 0) xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX;
|
|
2080
|
-
return xWorld;
|
|
2081
|
-
};
|
|
2082
|
-
Transform.prototype.inverseTransformY = function(y) {
|
|
2083
|
-
var yWorld = 0;
|
|
2084
|
-
var deviceExtY = this.ldeviceExtY;
|
|
2085
|
-
if (deviceExtY != 0) yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY;
|
|
2086
|
-
return yWorld;
|
|
2087
|
-
};
|
|
2088
|
-
Transform.prototype.inverseTransformPoint = function(inPoint) {
|
|
2089
|
-
return new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y));
|
|
2090
|
-
};
|
|
2091
|
-
module$34.exports = Transform;
|
|
2092
|
-
}),
|
|
2093
|
-
(function(module$35, exports$32, __webpack_require__) {
|
|
2094
|
-
"use strict";
|
|
2095
|
-
function _toConsumableArray(arr) {
|
|
2096
|
-
if (Array.isArray(arr)) {
|
|
2097
|
-
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
|
2098
|
-
return arr2;
|
|
2099
|
-
} else return Array.from(arr);
|
|
2100
|
-
}
|
|
2101
|
-
var Layout = __webpack_require__(15);
|
|
2102
|
-
var FDLayoutConstants = __webpack_require__(7);
|
|
2103
|
-
var LayoutConstants = __webpack_require__(0);
|
|
2104
|
-
var IGeometry = __webpack_require__(8);
|
|
2105
|
-
var IMath = __webpack_require__(9);
|
|
2106
|
-
function FDLayout() {
|
|
2107
|
-
Layout.call(this);
|
|
2108
|
-
this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;
|
|
2109
|
-
this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
|
|
2110
|
-
this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;
|
|
2111
|
-
this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;
|
|
2112
|
-
this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;
|
|
2113
|
-
this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;
|
|
2114
|
-
this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;
|
|
2115
|
-
this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;
|
|
2116
|
-
this.displacementThresholdPerNode = 3 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;
|
|
2117
|
-
this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
|
|
2118
|
-
this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
|
|
2119
|
-
this.totalDisplacement = 0;
|
|
2120
|
-
this.oldTotalDisplacement = 0;
|
|
2121
|
-
this.maxIterations = FDLayoutConstants.MAX_ITERATIONS;
|
|
2122
|
-
}
|
|
2123
|
-
FDLayout.prototype = Object.create(Layout.prototype);
|
|
2124
|
-
for (var prop in Layout) FDLayout[prop] = Layout[prop];
|
|
2125
|
-
FDLayout.prototype.initParameters = function() {
|
|
2126
|
-
Layout.prototype.initParameters.call(this, arguments);
|
|
2127
|
-
this.totalIterations = 0;
|
|
2128
|
-
this.notAnimatedIterations = 0;
|
|
2129
|
-
this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION;
|
|
2130
|
-
this.grid = [];
|
|
2131
|
-
};
|
|
2132
|
-
FDLayout.prototype.calcIdealEdgeLengths = function() {
|
|
2133
|
-
var edge;
|
|
2134
|
-
var lcaDepth;
|
|
2135
|
-
var source;
|
|
2136
|
-
var target;
|
|
2137
|
-
var sizeOfSourceInLca;
|
|
2138
|
-
var sizeOfTargetInLca;
|
|
2139
|
-
var allEdges = this.getGraphManager().getAllEdges();
|
|
2140
|
-
for (var i = 0; i < allEdges.length; i++) {
|
|
2141
|
-
edge = allEdges[i];
|
|
2142
|
-
edge.idealLength = this.idealEdgeLength;
|
|
2143
|
-
if (edge.isInterGraph) {
|
|
2144
|
-
source = edge.getSource();
|
|
2145
|
-
target = edge.getTarget();
|
|
2146
|
-
sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize();
|
|
2147
|
-
sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize();
|
|
2148
|
-
if (this.useSmartIdealEdgeLengthCalculation) edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE;
|
|
2149
|
-
lcaDepth = edge.getLca().getInclusionTreeDepth();
|
|
2150
|
-
edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth);
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
};
|
|
2154
|
-
FDLayout.prototype.initSpringEmbedder = function() {
|
|
2155
|
-
var s = this.getAllNodes().length;
|
|
2156
|
-
if (this.incremental) {
|
|
2157
|
-
if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));
|
|
2158
|
-
this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL;
|
|
2159
|
-
} else {
|
|
2160
|
-
if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));
|
|
2161
|
-
else this.coolingFactor = 1;
|
|
2162
|
-
this.initialCoolingFactor = this.coolingFactor;
|
|
2163
|
-
this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT;
|
|
2164
|
-
}
|
|
2165
|
-
this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations);
|
|
2166
|
-
this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length;
|
|
2167
|
-
this.repulsionRange = this.calcRepulsionRange();
|
|
2168
|
-
};
|
|
2169
|
-
FDLayout.prototype.calcSpringForces = function() {
|
|
2170
|
-
var lEdges = this.getAllEdges();
|
|
2171
|
-
var edge;
|
|
2172
|
-
for (var i = 0; i < lEdges.length; i++) {
|
|
2173
|
-
edge = lEdges[i];
|
|
2174
|
-
this.calcSpringForce(edge, edge.idealLength);
|
|
2175
|
-
}
|
|
2176
|
-
};
|
|
2177
|
-
FDLayout.prototype.calcRepulsionForces = function() {
|
|
2178
|
-
var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
|
|
2179
|
-
var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
2180
|
-
var i;
|
|
2181
|
-
var j;
|
|
2182
|
-
var nodeA;
|
|
2183
|
-
var nodeB;
|
|
2184
|
-
var lNodes = this.getAllNodes();
|
|
2185
|
-
var processedNodeSet;
|
|
2186
|
-
if (this.useFRGridVariant) {
|
|
2187
|
-
if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) this.updateGrid();
|
|
2188
|
-
processedNodeSet = /* @__PURE__ */ new Set();
|
|
2189
|
-
for (i = 0; i < lNodes.length; i++) {
|
|
2190
|
-
nodeA = lNodes[i];
|
|
2191
|
-
this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate);
|
|
2192
|
-
processedNodeSet.add(nodeA);
|
|
2193
|
-
}
|
|
2194
|
-
} else for (i = 0; i < lNodes.length; i++) {
|
|
2195
|
-
nodeA = lNodes[i];
|
|
2196
|
-
for (j = i + 1; j < lNodes.length; j++) {
|
|
2197
|
-
nodeB = lNodes[j];
|
|
2198
|
-
if (nodeA.getOwner() != nodeB.getOwner()) continue;
|
|
2199
|
-
this.calcRepulsionForce(nodeA, nodeB);
|
|
2200
|
-
}
|
|
2201
|
-
}
|
|
2202
|
-
};
|
|
2203
|
-
FDLayout.prototype.calcGravitationalForces = function() {
|
|
2204
|
-
var node;
|
|
2205
|
-
var lNodes = this.getAllNodesToApplyGravitation();
|
|
2206
|
-
for (var i = 0; i < lNodes.length; i++) {
|
|
2207
|
-
node = lNodes[i];
|
|
2208
|
-
this.calcGravitationalForce(node);
|
|
2209
|
-
}
|
|
2210
|
-
};
|
|
2211
|
-
FDLayout.prototype.moveNodes = function() {
|
|
2212
|
-
var lNodes = this.getAllNodes();
|
|
2213
|
-
var node;
|
|
2214
|
-
for (var i = 0; i < lNodes.length; i++) {
|
|
2215
|
-
node = lNodes[i];
|
|
2216
|
-
node.move();
|
|
2217
|
-
}
|
|
2218
|
-
};
|
|
2219
|
-
FDLayout.prototype.calcSpringForce = function(edge, idealLength) {
|
|
2220
|
-
var sourceNode = edge.getSource();
|
|
2221
|
-
var targetNode = edge.getTarget();
|
|
2222
|
-
var length;
|
|
2223
|
-
var springForce;
|
|
2224
|
-
var springForceX;
|
|
2225
|
-
var springForceY;
|
|
2226
|
-
if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) edge.updateLengthSimple();
|
|
2227
|
-
else {
|
|
2228
|
-
edge.updateLength();
|
|
2229
|
-
if (edge.isOverlapingSourceAndTarget) return;
|
|
2230
|
-
}
|
|
2231
|
-
length = edge.getLength();
|
|
2232
|
-
if (length == 0) return;
|
|
2233
|
-
springForce = this.springConstant * (length - idealLength);
|
|
2234
|
-
springForceX = springForce * (edge.lengthX / length);
|
|
2235
|
-
springForceY = springForce * (edge.lengthY / length);
|
|
2236
|
-
sourceNode.springForceX += springForceX;
|
|
2237
|
-
sourceNode.springForceY += springForceY;
|
|
2238
|
-
targetNode.springForceX -= springForceX;
|
|
2239
|
-
targetNode.springForceY -= springForceY;
|
|
2240
|
-
};
|
|
2241
|
-
FDLayout.prototype.calcRepulsionForce = function(nodeA, nodeB) {
|
|
2242
|
-
var rectA = nodeA.getRect();
|
|
2243
|
-
var rectB = nodeB.getRect();
|
|
2244
|
-
var overlapAmount = new Array(2);
|
|
2245
|
-
var clipPoints = new Array(4);
|
|
2246
|
-
var distanceX;
|
|
2247
|
-
var distanceY;
|
|
2248
|
-
var distanceSquared;
|
|
2249
|
-
var distance;
|
|
2250
|
-
var repulsionForce;
|
|
2251
|
-
var repulsionForceX;
|
|
2252
|
-
var repulsionForceY;
|
|
2253
|
-
if (rectA.intersects(rectB)) {
|
|
2254
|
-
IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2);
|
|
2255
|
-
repulsionForceX = 2 * overlapAmount[0];
|
|
2256
|
-
repulsionForceY = 2 * overlapAmount[1];
|
|
2257
|
-
var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren);
|
|
2258
|
-
nodeA.repulsionForceX -= childrenConstant * repulsionForceX;
|
|
2259
|
-
nodeA.repulsionForceY -= childrenConstant * repulsionForceY;
|
|
2260
|
-
nodeB.repulsionForceX += childrenConstant * repulsionForceX;
|
|
2261
|
-
nodeB.repulsionForceY += childrenConstant * repulsionForceY;
|
|
2262
|
-
} else {
|
|
2263
|
-
if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) {
|
|
2264
|
-
distanceX = rectB.getCenterX() - rectA.getCenterX();
|
|
2265
|
-
distanceY = rectB.getCenterY() - rectA.getCenterY();
|
|
2266
|
-
} else {
|
|
2267
|
-
IGeometry.getIntersection(rectA, rectB, clipPoints);
|
|
2268
|
-
distanceX = clipPoints[2] - clipPoints[0];
|
|
2269
|
-
distanceY = clipPoints[3] - clipPoints[1];
|
|
2270
|
-
}
|
|
2271
|
-
if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST;
|
|
2272
|
-
if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST;
|
|
2273
|
-
distanceSquared = distanceX * distanceX + distanceY * distanceY;
|
|
2274
|
-
distance = Math.sqrt(distanceSquared);
|
|
2275
|
-
repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared;
|
|
2276
|
-
repulsionForceX = repulsionForce * distanceX / distance;
|
|
2277
|
-
repulsionForceY = repulsionForce * distanceY / distance;
|
|
2278
|
-
nodeA.repulsionForceX -= repulsionForceX;
|
|
2279
|
-
nodeA.repulsionForceY -= repulsionForceY;
|
|
2280
|
-
nodeB.repulsionForceX += repulsionForceX;
|
|
2281
|
-
nodeB.repulsionForceY += repulsionForceY;
|
|
2282
|
-
}
|
|
2283
|
-
};
|
|
2284
|
-
FDLayout.prototype.calcGravitationalForce = function(node) {
|
|
2285
|
-
var ownerGraph;
|
|
2286
|
-
var ownerCenterX;
|
|
2287
|
-
var ownerCenterY;
|
|
2288
|
-
var distanceX;
|
|
2289
|
-
var distanceY;
|
|
2290
|
-
var absDistanceX;
|
|
2291
|
-
var absDistanceY;
|
|
2292
|
-
var estimatedSize;
|
|
2293
|
-
ownerGraph = node.getOwner();
|
|
2294
|
-
ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2;
|
|
2295
|
-
ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2;
|
|
2296
|
-
distanceX = node.getCenterX() - ownerCenterX;
|
|
2297
|
-
distanceY = node.getCenterY() - ownerCenterY;
|
|
2298
|
-
absDistanceX = Math.abs(distanceX) + node.getWidth() / 2;
|
|
2299
|
-
absDistanceY = Math.abs(distanceY) + node.getHeight() / 2;
|
|
2300
|
-
if (node.getOwner() == this.graphManager.getRoot()) {
|
|
2301
|
-
estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor;
|
|
2302
|
-
if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {
|
|
2303
|
-
node.gravitationForceX = -this.gravityConstant * distanceX;
|
|
2304
|
-
node.gravitationForceY = -this.gravityConstant * distanceY;
|
|
2305
|
-
}
|
|
2306
|
-
} else {
|
|
2307
|
-
estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor;
|
|
2308
|
-
if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {
|
|
2309
|
-
node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant;
|
|
2310
|
-
node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant;
|
|
2311
|
-
}
|
|
2312
|
-
}
|
|
2313
|
-
};
|
|
2314
|
-
FDLayout.prototype.isConverged = function() {
|
|
2315
|
-
var converged;
|
|
2316
|
-
var oscilating = false;
|
|
2317
|
-
if (this.totalIterations > this.maxIterations / 3) oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2;
|
|
2318
|
-
converged = this.totalDisplacement < this.totalDisplacementThreshold;
|
|
2319
|
-
this.oldTotalDisplacement = this.totalDisplacement;
|
|
2320
|
-
return converged || oscilating;
|
|
2321
|
-
};
|
|
2322
|
-
FDLayout.prototype.animate = function() {
|
|
2323
|
-
if (this.animationDuringLayout && !this.isSubLayout) if (this.notAnimatedIterations == this.animationPeriod) {
|
|
2324
|
-
this.update();
|
|
2325
|
-
this.notAnimatedIterations = 0;
|
|
2326
|
-
} else this.notAnimatedIterations++;
|
|
2327
|
-
};
|
|
2328
|
-
FDLayout.prototype.calcNoOfChildrenForAllNodes = function() {
|
|
2329
|
-
var node;
|
|
2330
|
-
var allNodes = this.graphManager.getAllNodes();
|
|
2331
|
-
for (var i = 0; i < allNodes.length; i++) {
|
|
2332
|
-
node = allNodes[i];
|
|
2333
|
-
node.noOfChildren = node.getNoOfChildren();
|
|
2334
|
-
}
|
|
2335
|
-
};
|
|
2336
|
-
FDLayout.prototype.calcGrid = function(graph) {
|
|
2337
|
-
var sizeX = 0;
|
|
2338
|
-
var sizeY = 0;
|
|
2339
|
-
sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange));
|
|
2340
|
-
sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange));
|
|
2341
|
-
var grid = new Array(sizeX);
|
|
2342
|
-
for (var i = 0; i < sizeX; i++) grid[i] = new Array(sizeY);
|
|
2343
|
-
for (var i = 0; i < sizeX; i++) for (var j = 0; j < sizeY; j++) grid[i][j] = new Array();
|
|
2344
|
-
return grid;
|
|
2345
|
-
};
|
|
2346
|
-
FDLayout.prototype.addNodeToGrid = function(v, left, top) {
|
|
2347
|
-
var startX = 0;
|
|
2348
|
-
var finishX = 0;
|
|
2349
|
-
var startY = 0;
|
|
2350
|
-
var finishY = 0;
|
|
2351
|
-
startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange));
|
|
2352
|
-
finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange));
|
|
2353
|
-
startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange));
|
|
2354
|
-
finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange));
|
|
2355
|
-
for (var i = startX; i <= finishX; i++) for (var j = startY; j <= finishY; j++) {
|
|
2356
|
-
this.grid[i][j].push(v);
|
|
2357
|
-
v.setGridCoordinates(startX, finishX, startY, finishY);
|
|
2358
|
-
}
|
|
2359
|
-
};
|
|
2360
|
-
FDLayout.prototype.updateGrid = function() {
|
|
2361
|
-
var i;
|
|
2362
|
-
var nodeA;
|
|
2363
|
-
var lNodes = this.getAllNodes();
|
|
2364
|
-
this.grid = this.calcGrid(this.graphManager.getRoot());
|
|
2365
|
-
for (i = 0; i < lNodes.length; i++) {
|
|
2366
|
-
nodeA = lNodes[i];
|
|
2367
|
-
this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
|
|
2368
|
-
}
|
|
2369
|
-
};
|
|
2370
|
-
FDLayout.prototype.calculateRepulsionForceOfANode = function(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) {
|
|
2371
|
-
if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) {
|
|
2372
|
-
var surrounding = /* @__PURE__ */ new Set();
|
|
2373
|
-
nodeA.surrounding = new Array();
|
|
2374
|
-
var nodeB;
|
|
2375
|
-
var grid = this.grid;
|
|
2376
|
-
for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) for (var k = 0; k < grid[i][j].length; k++) {
|
|
2377
|
-
nodeB = grid[i][j][k];
|
|
2378
|
-
if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) continue;
|
|
2379
|
-
if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) {
|
|
2380
|
-
var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2);
|
|
2381
|
-
var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2);
|
|
2382
|
-
if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) surrounding.add(nodeB);
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
nodeA.surrounding = [].concat(_toConsumableArray(surrounding));
|
|
2386
|
-
}
|
|
2387
|
-
for (i = 0; i < nodeA.surrounding.length; i++) this.calcRepulsionForce(nodeA, nodeA.surrounding[i]);
|
|
2388
|
-
};
|
|
2389
|
-
FDLayout.prototype.calcRepulsionRange = function() {
|
|
2390
|
-
return 0;
|
|
2391
|
-
};
|
|
2392
|
-
module$35.exports = FDLayout;
|
|
2393
|
-
}),
|
|
2394
|
-
(function(module$36, exports$33, __webpack_require__) {
|
|
2395
|
-
"use strict";
|
|
2396
|
-
var LEdge = __webpack_require__(1);
|
|
2397
|
-
var FDLayoutConstants = __webpack_require__(7);
|
|
2398
|
-
function FDLayoutEdge(source, target, vEdge) {
|
|
2399
|
-
LEdge.call(this, source, target, vEdge);
|
|
2400
|
-
this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
|
|
2401
|
-
}
|
|
2402
|
-
FDLayoutEdge.prototype = Object.create(LEdge.prototype);
|
|
2403
|
-
for (var prop in LEdge) FDLayoutEdge[prop] = LEdge[prop];
|
|
2404
|
-
module$36.exports = FDLayoutEdge;
|
|
2405
|
-
}),
|
|
2406
|
-
(function(module$37, exports$34, __webpack_require__) {
|
|
2407
|
-
"use strict";
|
|
2408
|
-
var LNode = __webpack_require__(3);
|
|
2409
|
-
function FDLayoutNode(gm, loc, size, vNode) {
|
|
2410
|
-
LNode.call(this, gm, loc, size, vNode);
|
|
2411
|
-
this.springForceX = 0;
|
|
2412
|
-
this.springForceY = 0;
|
|
2413
|
-
this.repulsionForceX = 0;
|
|
2414
|
-
this.repulsionForceY = 0;
|
|
2415
|
-
this.gravitationForceX = 0;
|
|
2416
|
-
this.gravitationForceY = 0;
|
|
2417
|
-
this.displacementX = 0;
|
|
2418
|
-
this.displacementY = 0;
|
|
2419
|
-
this.startX = 0;
|
|
2420
|
-
this.finishX = 0;
|
|
2421
|
-
this.startY = 0;
|
|
2422
|
-
this.finishY = 0;
|
|
2423
|
-
this.surrounding = [];
|
|
2424
|
-
}
|
|
2425
|
-
FDLayoutNode.prototype = Object.create(LNode.prototype);
|
|
2426
|
-
for (var prop in LNode) FDLayoutNode[prop] = LNode[prop];
|
|
2427
|
-
FDLayoutNode.prototype.setGridCoordinates = function(_startX, _finishX, _startY, _finishY) {
|
|
2428
|
-
this.startX = _startX;
|
|
2429
|
-
this.finishX = _finishX;
|
|
2430
|
-
this.startY = _startY;
|
|
2431
|
-
this.finishY = _finishY;
|
|
2432
|
-
};
|
|
2433
|
-
module$37.exports = FDLayoutNode;
|
|
2434
|
-
}),
|
|
2435
|
-
(function(module$38, exports$35, __webpack_require__) {
|
|
2436
|
-
"use strict";
|
|
2437
|
-
function DimensionD(width, height) {
|
|
2438
|
-
this.width = 0;
|
|
2439
|
-
this.height = 0;
|
|
2440
|
-
if (width !== null && height !== null) {
|
|
2441
|
-
this.height = height;
|
|
2442
|
-
this.width = width;
|
|
2443
|
-
}
|
|
2444
|
-
}
|
|
2445
|
-
DimensionD.prototype.getWidth = function() {
|
|
2446
|
-
return this.width;
|
|
2447
|
-
};
|
|
2448
|
-
DimensionD.prototype.setWidth = function(width) {
|
|
2449
|
-
this.width = width;
|
|
2450
|
-
};
|
|
2451
|
-
DimensionD.prototype.getHeight = function() {
|
|
2452
|
-
return this.height;
|
|
2453
|
-
};
|
|
2454
|
-
DimensionD.prototype.setHeight = function(height) {
|
|
2455
|
-
this.height = height;
|
|
2456
|
-
};
|
|
2457
|
-
module$38.exports = DimensionD;
|
|
2458
|
-
}),
|
|
2459
|
-
(function(module$39, exports$36, __webpack_require__) {
|
|
2460
|
-
"use strict";
|
|
2461
|
-
var UniqueIDGeneretor = __webpack_require__(14);
|
|
2462
|
-
function HashMap() {
|
|
2463
|
-
this.map = {};
|
|
2464
|
-
this.keys = [];
|
|
2465
|
-
}
|
|
2466
|
-
HashMap.prototype.put = function(key, value) {
|
|
2467
|
-
var theId = UniqueIDGeneretor.createID(key);
|
|
2468
|
-
if (!this.contains(theId)) {
|
|
2469
|
-
this.map[theId] = value;
|
|
2470
|
-
this.keys.push(key);
|
|
2471
|
-
}
|
|
2472
|
-
};
|
|
2473
|
-
HashMap.prototype.contains = function(key) {
|
|
2474
|
-
UniqueIDGeneretor.createID(key);
|
|
2475
|
-
return this.map[key] != null;
|
|
2476
|
-
};
|
|
2477
|
-
HashMap.prototype.get = function(key) {
|
|
2478
|
-
var theId = UniqueIDGeneretor.createID(key);
|
|
2479
|
-
return this.map[theId];
|
|
2480
|
-
};
|
|
2481
|
-
HashMap.prototype.keySet = function() {
|
|
2482
|
-
return this.keys;
|
|
2483
|
-
};
|
|
2484
|
-
module$39.exports = HashMap;
|
|
2485
|
-
}),
|
|
2486
|
-
(function(module$40, exports$37, __webpack_require__) {
|
|
2487
|
-
"use strict";
|
|
2488
|
-
var UniqueIDGeneretor = __webpack_require__(14);
|
|
2489
|
-
function HashSet() {
|
|
2490
|
-
this.set = {};
|
|
2491
|
-
}
|
|
2492
|
-
HashSet.prototype.add = function(obj) {
|
|
2493
|
-
var theId = UniqueIDGeneretor.createID(obj);
|
|
2494
|
-
if (!this.contains(theId)) this.set[theId] = obj;
|
|
2495
|
-
};
|
|
2496
|
-
HashSet.prototype.remove = function(obj) {
|
|
2497
|
-
delete this.set[UniqueIDGeneretor.createID(obj)];
|
|
2498
|
-
};
|
|
2499
|
-
HashSet.prototype.clear = function() {
|
|
2500
|
-
this.set = {};
|
|
2501
|
-
};
|
|
2502
|
-
HashSet.prototype.contains = function(obj) {
|
|
2503
|
-
return this.set[UniqueIDGeneretor.createID(obj)] == obj;
|
|
2504
|
-
};
|
|
2505
|
-
HashSet.prototype.isEmpty = function() {
|
|
2506
|
-
return this.size() === 0;
|
|
2507
|
-
};
|
|
2508
|
-
HashSet.prototype.size = function() {
|
|
2509
|
-
return Object.keys(this.set).length;
|
|
2510
|
-
};
|
|
2511
|
-
HashSet.prototype.addAllTo = function(list) {
|
|
2512
|
-
var keys = Object.keys(this.set);
|
|
2513
|
-
var length = keys.length;
|
|
2514
|
-
for (var i = 0; i < length; i++) list.push(this.set[keys[i]]);
|
|
2515
|
-
};
|
|
2516
|
-
HashSet.prototype.size = function() {
|
|
2517
|
-
return Object.keys(this.set).length;
|
|
2518
|
-
};
|
|
2519
|
-
HashSet.prototype.addAll = function(list) {
|
|
2520
|
-
var s = list.length;
|
|
2521
|
-
for (var i = 0; i < s; i++) {
|
|
2522
|
-
var v = list[i];
|
|
2523
|
-
this.add(v);
|
|
2524
|
-
}
|
|
2525
|
-
};
|
|
2526
|
-
module$40.exports = HashSet;
|
|
2527
|
-
}),
|
|
2528
|
-
(function(module$41, exports$38, __webpack_require__) {
|
|
2529
|
-
"use strict";
|
|
2530
|
-
var _createClass = function() {
|
|
2531
|
-
function defineProperties(target, props) {
|
|
2532
|
-
for (var i = 0; i < props.length; i++) {
|
|
2533
|
-
var descriptor = props[i];
|
|
2534
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
2535
|
-
descriptor.configurable = true;
|
|
2536
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
2537
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2538
|
-
}
|
|
2539
|
-
}
|
|
2540
|
-
return function(Constructor, protoProps, staticProps) {
|
|
2541
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
2542
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
2543
|
-
return Constructor;
|
|
2544
|
-
};
|
|
2545
|
-
}();
|
|
2546
|
-
function _classCallCheck(instance, Constructor) {
|
|
2547
|
-
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
2548
|
-
}
|
|
2549
|
-
/**
|
|
2550
|
-
* A classic Quicksort algorithm with Hoare's partition
|
|
2551
|
-
* - Works also on LinkedList objects
|
|
2552
|
-
*
|
|
2553
|
-
* Copyright: i-Vis Research Group, Bilkent University, 2007 - present
|
|
2554
|
-
*/
|
|
2555
|
-
var LinkedList = __webpack_require__(11);
|
|
2556
|
-
module$41.exports = function() {
|
|
2557
|
-
function Quicksort(A, compareFunction) {
|
|
2558
|
-
_classCallCheck(this, Quicksort);
|
|
2559
|
-
if (compareFunction !== null || compareFunction !== void 0) this.compareFunction = this._defaultCompareFunction;
|
|
2560
|
-
var length = void 0;
|
|
2561
|
-
if (A instanceof LinkedList) length = A.size();
|
|
2562
|
-
else length = A.length;
|
|
2563
|
-
this._quicksort(A, 0, length - 1);
|
|
2564
|
-
}
|
|
2565
|
-
_createClass(Quicksort, [
|
|
2566
|
-
{
|
|
2567
|
-
key: "_quicksort",
|
|
2568
|
-
value: function _quicksort(A, p, r) {
|
|
2569
|
-
if (p < r) {
|
|
2570
|
-
var q = this._partition(A, p, r);
|
|
2571
|
-
this._quicksort(A, p, q);
|
|
2572
|
-
this._quicksort(A, q + 1, r);
|
|
2573
|
-
}
|
|
2574
|
-
}
|
|
2575
|
-
},
|
|
2576
|
-
{
|
|
2577
|
-
key: "_partition",
|
|
2578
|
-
value: function _partition(A, p, r) {
|
|
2579
|
-
var x = this._get(A, p);
|
|
2580
|
-
var i = p;
|
|
2581
|
-
var j = r;
|
|
2582
|
-
while (true) {
|
|
2583
|
-
while (this.compareFunction(x, this._get(A, j))) j--;
|
|
2584
|
-
while (this.compareFunction(this._get(A, i), x)) i++;
|
|
2585
|
-
if (i < j) {
|
|
2586
|
-
this._swap(A, i, j);
|
|
2587
|
-
i++;
|
|
2588
|
-
j--;
|
|
2589
|
-
} else return j;
|
|
2590
|
-
}
|
|
2591
|
-
}
|
|
2592
|
-
},
|
|
2593
|
-
{
|
|
2594
|
-
key: "_get",
|
|
2595
|
-
value: function _get(object, index) {
|
|
2596
|
-
if (object instanceof LinkedList) return object.get_object_at(index);
|
|
2597
|
-
else return object[index];
|
|
2598
|
-
}
|
|
2599
|
-
},
|
|
2600
|
-
{
|
|
2601
|
-
key: "_set",
|
|
2602
|
-
value: function _set(object, index, value) {
|
|
2603
|
-
if (object instanceof LinkedList) object.set_object_at(index, value);
|
|
2604
|
-
else object[index] = value;
|
|
2605
|
-
}
|
|
2606
|
-
},
|
|
2607
|
-
{
|
|
2608
|
-
key: "_swap",
|
|
2609
|
-
value: function _swap(A, i, j) {
|
|
2610
|
-
var temp = this._get(A, i);
|
|
2611
|
-
this._set(A, i, this._get(A, j));
|
|
2612
|
-
this._set(A, j, temp);
|
|
2613
|
-
}
|
|
2614
|
-
},
|
|
2615
|
-
{
|
|
2616
|
-
key: "_defaultCompareFunction",
|
|
2617
|
-
value: function _defaultCompareFunction(a, b) {
|
|
2618
|
-
return b > a;
|
|
2619
|
-
}
|
|
2620
|
-
}
|
|
2621
|
-
]);
|
|
2622
|
-
return Quicksort;
|
|
2623
|
-
}();
|
|
2624
|
-
}),
|
|
2625
|
-
(function(module$42, exports$39, __webpack_require__) {
|
|
2626
|
-
"use strict";
|
|
2627
|
-
var _createClass = function() {
|
|
2628
|
-
function defineProperties(target, props) {
|
|
2629
|
-
for (var i = 0; i < props.length; i++) {
|
|
2630
|
-
var descriptor = props[i];
|
|
2631
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
2632
|
-
descriptor.configurable = true;
|
|
2633
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
2634
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2635
|
-
}
|
|
2636
|
-
}
|
|
2637
|
-
return function(Constructor, protoProps, staticProps) {
|
|
2638
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
2639
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
2640
|
-
return Constructor;
|
|
2641
|
-
};
|
|
2642
|
-
}();
|
|
2643
|
-
function _classCallCheck(instance, Constructor) {
|
|
2644
|
-
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
2645
|
-
}
|
|
2646
|
-
module$42.exports = function() {
|
|
2647
|
-
function NeedlemanWunsch(sequence1, sequence2) {
|
|
2648
|
-
var match_score = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
|
2649
|
-
var mismatch_penalty = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1;
|
|
2650
|
-
var gap_penalty = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
|
|
2651
|
-
_classCallCheck(this, NeedlemanWunsch);
|
|
2652
|
-
this.sequence1 = sequence1;
|
|
2653
|
-
this.sequence2 = sequence2;
|
|
2654
|
-
this.match_score = match_score;
|
|
2655
|
-
this.mismatch_penalty = mismatch_penalty;
|
|
2656
|
-
this.gap_penalty = gap_penalty;
|
|
2657
|
-
this.iMax = sequence1.length + 1;
|
|
2658
|
-
this.jMax = sequence2.length + 1;
|
|
2659
|
-
this.grid = new Array(this.iMax);
|
|
2660
|
-
for (var i = 0; i < this.iMax; i++) {
|
|
2661
|
-
this.grid[i] = new Array(this.jMax);
|
|
2662
|
-
for (var j = 0; j < this.jMax; j++) this.grid[i][j] = 0;
|
|
2663
|
-
}
|
|
2664
|
-
this.tracebackGrid = new Array(this.iMax);
|
|
2665
|
-
for (var _i = 0; _i < this.iMax; _i++) {
|
|
2666
|
-
this.tracebackGrid[_i] = new Array(this.jMax);
|
|
2667
|
-
for (var _j = 0; _j < this.jMax; _j++) this.tracebackGrid[_i][_j] = [
|
|
2668
|
-
null,
|
|
2669
|
-
null,
|
|
2670
|
-
null
|
|
2671
|
-
];
|
|
2672
|
-
}
|
|
2673
|
-
this.alignments = [];
|
|
2674
|
-
this.score = -1;
|
|
2675
|
-
this.computeGrids();
|
|
2676
|
-
}
|
|
2677
|
-
_createClass(NeedlemanWunsch, [
|
|
2678
|
-
{
|
|
2679
|
-
key: "getScore",
|
|
2680
|
-
value: function getScore() {
|
|
2681
|
-
return this.score;
|
|
2682
|
-
}
|
|
2683
|
-
},
|
|
2684
|
-
{
|
|
2685
|
-
key: "getAlignments",
|
|
2686
|
-
value: function getAlignments() {
|
|
2687
|
-
return this.alignments;
|
|
2688
|
-
}
|
|
2689
|
-
},
|
|
2690
|
-
{
|
|
2691
|
-
key: "computeGrids",
|
|
2692
|
-
value: function computeGrids() {
|
|
2693
|
-
for (var j = 1; j < this.jMax; j++) {
|
|
2694
|
-
this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty;
|
|
2695
|
-
this.tracebackGrid[0][j] = [
|
|
2696
|
-
false,
|
|
2697
|
-
false,
|
|
2698
|
-
true
|
|
2699
|
-
];
|
|
2700
|
-
}
|
|
2701
|
-
for (var i = 1; i < this.iMax; i++) {
|
|
2702
|
-
this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty;
|
|
2703
|
-
this.tracebackGrid[i][0] = [
|
|
2704
|
-
false,
|
|
2705
|
-
true,
|
|
2706
|
-
false
|
|
2707
|
-
];
|
|
2708
|
-
}
|
|
2709
|
-
for (var _i2 = 1; _i2 < this.iMax; _i2++) for (var _j2 = 1; _j2 < this.jMax; _j2++) {
|
|
2710
|
-
var diag = void 0;
|
|
2711
|
-
if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;
|
|
2712
|
-
else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty;
|
|
2713
|
-
var up = this.grid[_i2 - 1][_j2] + this.gap_penalty;
|
|
2714
|
-
var left = this.grid[_i2][_j2 - 1] + this.gap_penalty;
|
|
2715
|
-
var maxOf = [
|
|
2716
|
-
diag,
|
|
2717
|
-
up,
|
|
2718
|
-
left
|
|
2719
|
-
];
|
|
2720
|
-
var indices = this.arrayAllMaxIndexes(maxOf);
|
|
2721
|
-
this.grid[_i2][_j2] = maxOf[indices[0]];
|
|
2722
|
-
this.tracebackGrid[_i2][_j2] = [
|
|
2723
|
-
indices.includes(0),
|
|
2724
|
-
indices.includes(1),
|
|
2725
|
-
indices.includes(2)
|
|
2726
|
-
];
|
|
2727
|
-
}
|
|
2728
|
-
this.score = this.grid[this.iMax - 1][this.jMax - 1];
|
|
2729
|
-
}
|
|
2730
|
-
},
|
|
2731
|
-
{
|
|
2732
|
-
key: "alignmentTraceback",
|
|
2733
|
-
value: function alignmentTraceback() {
|
|
2734
|
-
var inProcessAlignments = [];
|
|
2735
|
-
inProcessAlignments.push({
|
|
2736
|
-
pos: [this.sequence1.length, this.sequence2.length],
|
|
2737
|
-
seq1: "",
|
|
2738
|
-
seq2: ""
|
|
2739
|
-
});
|
|
2740
|
-
while (inProcessAlignments[0]) {
|
|
2741
|
-
var current = inProcessAlignments[0];
|
|
2742
|
-
var directions = this.tracebackGrid[current.pos[0]][current.pos[1]];
|
|
2743
|
-
if (directions[0]) inProcessAlignments.push({
|
|
2744
|
-
pos: [current.pos[0] - 1, current.pos[1] - 1],
|
|
2745
|
-
seq1: this.sequence1[current.pos[0] - 1] + current.seq1,
|
|
2746
|
-
seq2: this.sequence2[current.pos[1] - 1] + current.seq2
|
|
2747
|
-
});
|
|
2748
|
-
if (directions[1]) inProcessAlignments.push({
|
|
2749
|
-
pos: [current.pos[0] - 1, current.pos[1]],
|
|
2750
|
-
seq1: this.sequence1[current.pos[0] - 1] + current.seq1,
|
|
2751
|
-
seq2: "-" + current.seq2
|
|
2752
|
-
});
|
|
2753
|
-
if (directions[2]) inProcessAlignments.push({
|
|
2754
|
-
pos: [current.pos[0], current.pos[1] - 1],
|
|
2755
|
-
seq1: "-" + current.seq1,
|
|
2756
|
-
seq2: this.sequence2[current.pos[1] - 1] + current.seq2
|
|
2757
|
-
});
|
|
2758
|
-
if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({
|
|
2759
|
-
sequence1: current.seq1,
|
|
2760
|
-
sequence2: current.seq2
|
|
2761
|
-
});
|
|
2762
|
-
inProcessAlignments.shift();
|
|
2763
|
-
}
|
|
2764
|
-
return this.alignments;
|
|
2765
|
-
}
|
|
2766
|
-
},
|
|
2767
|
-
{
|
|
2768
|
-
key: "getAllIndexes",
|
|
2769
|
-
value: function getAllIndexes(arr, val) {
|
|
2770
|
-
var indexes = [];
|
|
2771
|
-
var i = -1;
|
|
2772
|
-
while ((i = arr.indexOf(val, i + 1)) !== -1) indexes.push(i);
|
|
2773
|
-
return indexes;
|
|
2774
|
-
}
|
|
2775
|
-
},
|
|
2776
|
-
{
|
|
2777
|
-
key: "arrayAllMaxIndexes",
|
|
2778
|
-
value: function arrayAllMaxIndexes(array) {
|
|
2779
|
-
return this.getAllIndexes(array, Math.max.apply(null, array));
|
|
2780
|
-
}
|
|
2781
|
-
}
|
|
2782
|
-
]);
|
|
2783
|
-
return NeedlemanWunsch;
|
|
2784
|
-
}();
|
|
2785
|
-
}),
|
|
2786
|
-
(function(module$43, exports$40, __webpack_require__) {
|
|
2787
|
-
"use strict";
|
|
2788
|
-
var layoutBase = function layoutBase() {};
|
|
2789
|
-
layoutBase.FDLayout = __webpack_require__(18);
|
|
2790
|
-
layoutBase.FDLayoutConstants = __webpack_require__(7);
|
|
2791
|
-
layoutBase.FDLayoutEdge = __webpack_require__(19);
|
|
2792
|
-
layoutBase.FDLayoutNode = __webpack_require__(20);
|
|
2793
|
-
layoutBase.DimensionD = __webpack_require__(21);
|
|
2794
|
-
layoutBase.HashMap = __webpack_require__(22);
|
|
2795
|
-
layoutBase.HashSet = __webpack_require__(23);
|
|
2796
|
-
layoutBase.IGeometry = __webpack_require__(8);
|
|
2797
|
-
layoutBase.IMath = __webpack_require__(9);
|
|
2798
|
-
layoutBase.Integer = __webpack_require__(10);
|
|
2799
|
-
layoutBase.Point = __webpack_require__(12);
|
|
2800
|
-
layoutBase.PointD = __webpack_require__(4);
|
|
2801
|
-
layoutBase.RandomSeed = __webpack_require__(16);
|
|
2802
|
-
layoutBase.RectangleD = __webpack_require__(13);
|
|
2803
|
-
layoutBase.Transform = __webpack_require__(17);
|
|
2804
|
-
layoutBase.UniqueIDGeneretor = __webpack_require__(14);
|
|
2805
|
-
layoutBase.Quicksort = __webpack_require__(24);
|
|
2806
|
-
layoutBase.LinkedList = __webpack_require__(11);
|
|
2807
|
-
layoutBase.LGraphObject = __webpack_require__(2);
|
|
2808
|
-
layoutBase.LGraph = __webpack_require__(5);
|
|
2809
|
-
layoutBase.LEdge = __webpack_require__(1);
|
|
2810
|
-
layoutBase.LGraphManager = __webpack_require__(6);
|
|
2811
|
-
layoutBase.LNode = __webpack_require__(3);
|
|
2812
|
-
layoutBase.Layout = __webpack_require__(15);
|
|
2813
|
-
layoutBase.LayoutConstants = __webpack_require__(0);
|
|
2814
|
-
layoutBase.NeedlemanWunsch = __webpack_require__(25);
|
|
2815
|
-
module$43.exports = layoutBase;
|
|
2816
|
-
}),
|
|
2817
|
-
(function(module$44, exports$41, __webpack_require__) {
|
|
2818
|
-
"use strict";
|
|
2819
|
-
function Emitter() {
|
|
2820
|
-
this.listeners = [];
|
|
2821
|
-
}
|
|
2822
|
-
var p = Emitter.prototype;
|
|
2823
|
-
p.addListener = function(event, callback) {
|
|
2824
|
-
this.listeners.push({
|
|
2825
|
-
event,
|
|
2826
|
-
callback
|
|
2827
|
-
});
|
|
2828
|
-
};
|
|
2829
|
-
p.removeListener = function(event, callback) {
|
|
2830
|
-
for (var i = this.listeners.length; i >= 0; i--) {
|
|
2831
|
-
var l = this.listeners[i];
|
|
2832
|
-
if (l.event === event && l.callback === callback) this.listeners.splice(i, 1);
|
|
2833
|
-
}
|
|
2834
|
-
};
|
|
2835
|
-
p.emit = function(event, data) {
|
|
2836
|
-
for (var i = 0; i < this.listeners.length; i++) {
|
|
2837
|
-
var l = this.listeners[i];
|
|
2838
|
-
if (event === l.event) l.callback(data);
|
|
2839
|
-
}
|
|
2840
|
-
};
|
|
2841
|
-
module$44.exports = Emitter;
|
|
2842
|
-
})
|
|
2843
|
-
]);
|
|
2844
|
-
});
|
|
2845
|
-
}));
|
|
2846
|
-
//#endregion
|
|
2847
|
-
//#region ../../node_modules/.pnpm/cose-base@1.0.3/node_modules/cose-base/cose-base.js
|
|
2848
|
-
var require_cose_base = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2849
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2850
|
-
if (typeof exports === "object" && typeof module === "object") module.exports = factory(require_layout_base());
|
|
2851
|
-
else if (typeof define === "function" && define.amd) define(["layout-base"], factory);
|
|
2852
|
-
else if (typeof exports === "object") exports["coseBase"] = factory(require_layout_base());
|
|
2853
|
-
else root["coseBase"] = factory(root["layoutBase"]);
|
|
2854
|
-
})(exports, function(__WEBPACK_EXTERNAL_MODULE_0__) {
|
|
2855
|
-
return function(modules) {
|
|
2856
|
-
// webpackBootstrap
|
|
2857
|
-
var installedModules = {};
|
|
2858
|
-
function __webpack_require__(moduleId) {
|
|
2859
|
-
if (installedModules[moduleId]) return installedModules[moduleId].exports;
|
|
2860
|
-
var module$5 = installedModules[moduleId] = {
|
|
2861
|
-
i: moduleId,
|
|
2862
|
-
l: false,
|
|
2863
|
-
exports: {}
|
|
2864
|
-
};
|
|
2865
|
-
modules[moduleId].call(module$5.exports, module$5, module$5.exports, __webpack_require__);
|
|
2866
|
-
module$5.l = true;
|
|
2867
|
-
return module$5.exports;
|
|
2868
|
-
}
|
|
2869
|
-
__webpack_require__.m = modules;
|
|
2870
|
-
__webpack_require__.c = installedModules;
|
|
2871
|
-
__webpack_require__.i = function(value) {
|
|
2872
|
-
return value;
|
|
2873
|
-
};
|
|
2874
|
-
__webpack_require__.d = function(exports$4, name, getter) {
|
|
2875
|
-
if (!__webpack_require__.o(exports$4, name)) Object.defineProperty(exports$4, name, {
|
|
2876
|
-
configurable: false,
|
|
2877
|
-
enumerable: true,
|
|
2878
|
-
get: getter
|
|
2879
|
-
});
|
|
2880
|
-
};
|
|
2881
|
-
__webpack_require__.n = function(module$6) {
|
|
2882
|
-
var getter = module$6 && module$6.__esModule ? function getDefault() {
|
|
2883
|
-
return module$6["default"];
|
|
2884
|
-
} : function getModuleExports() {
|
|
2885
|
-
return module$6;
|
|
2886
|
-
};
|
|
2887
|
-
__webpack_require__.d(getter, "a", getter);
|
|
2888
|
-
return getter;
|
|
2889
|
-
};
|
|
2890
|
-
__webpack_require__.o = function(object, property) {
|
|
2891
|
-
return Object.prototype.hasOwnProperty.call(object, property);
|
|
2892
|
-
};
|
|
2893
|
-
__webpack_require__.p = "";
|
|
2894
|
-
return __webpack_require__(__webpack_require__.s = 7);
|
|
2895
|
-
}([
|
|
2896
|
-
(function(module$7, exports$5) {
|
|
2897
|
-
module$7.exports = __WEBPACK_EXTERNAL_MODULE_0__;
|
|
2898
|
-
}),
|
|
2899
|
-
(function(module$8, exports$6, __webpack_require__) {
|
|
2900
|
-
"use strict";
|
|
2901
|
-
var FDLayoutConstants = __webpack_require__(0).FDLayoutConstants;
|
|
2902
|
-
function CoSEConstants() {}
|
|
2903
|
-
for (var prop in FDLayoutConstants) CoSEConstants[prop] = FDLayoutConstants[prop];
|
|
2904
|
-
CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false;
|
|
2905
|
-
CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;
|
|
2906
|
-
CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60;
|
|
2907
|
-
CoSEConstants.TILE = true;
|
|
2908
|
-
CoSEConstants.TILING_PADDING_VERTICAL = 10;
|
|
2909
|
-
CoSEConstants.TILING_PADDING_HORIZONTAL = 10;
|
|
2910
|
-
CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false;
|
|
2911
|
-
module$8.exports = CoSEConstants;
|
|
2912
|
-
}),
|
|
2913
|
-
(function(module$9, exports$7, __webpack_require__) {
|
|
2914
|
-
"use strict";
|
|
2915
|
-
var FDLayoutEdge = __webpack_require__(0).FDLayoutEdge;
|
|
2916
|
-
function CoSEEdge(source, target, vEdge) {
|
|
2917
|
-
FDLayoutEdge.call(this, source, target, vEdge);
|
|
2918
|
-
}
|
|
2919
|
-
CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype);
|
|
2920
|
-
for (var prop in FDLayoutEdge) CoSEEdge[prop] = FDLayoutEdge[prop];
|
|
2921
|
-
module$9.exports = CoSEEdge;
|
|
2922
|
-
}),
|
|
2923
|
-
(function(module$10, exports$8, __webpack_require__) {
|
|
2924
|
-
"use strict";
|
|
2925
|
-
var LGraph = __webpack_require__(0).LGraph;
|
|
2926
|
-
function CoSEGraph(parent, graphMgr, vGraph) {
|
|
2927
|
-
LGraph.call(this, parent, graphMgr, vGraph);
|
|
2928
|
-
}
|
|
2929
|
-
CoSEGraph.prototype = Object.create(LGraph.prototype);
|
|
2930
|
-
for (var prop in LGraph) CoSEGraph[prop] = LGraph[prop];
|
|
2931
|
-
module$10.exports = CoSEGraph;
|
|
2932
|
-
}),
|
|
2933
|
-
(function(module$11, exports$9, __webpack_require__) {
|
|
2934
|
-
"use strict";
|
|
2935
|
-
var LGraphManager = __webpack_require__(0).LGraphManager;
|
|
2936
|
-
function CoSEGraphManager(layout) {
|
|
2937
|
-
LGraphManager.call(this, layout);
|
|
2938
|
-
}
|
|
2939
|
-
CoSEGraphManager.prototype = Object.create(LGraphManager.prototype);
|
|
2940
|
-
for (var prop in LGraphManager) CoSEGraphManager[prop] = LGraphManager[prop];
|
|
2941
|
-
module$11.exports = CoSEGraphManager;
|
|
2942
|
-
}),
|
|
2943
|
-
(function(module$12, exports$10, __webpack_require__) {
|
|
2944
|
-
"use strict";
|
|
2945
|
-
var FDLayoutNode = __webpack_require__(0).FDLayoutNode;
|
|
2946
|
-
var IMath = __webpack_require__(0).IMath;
|
|
2947
|
-
function CoSENode(gm, loc, size, vNode) {
|
|
2948
|
-
FDLayoutNode.call(this, gm, loc, size, vNode);
|
|
2949
|
-
}
|
|
2950
|
-
CoSENode.prototype = Object.create(FDLayoutNode.prototype);
|
|
2951
|
-
for (var prop in FDLayoutNode) CoSENode[prop] = FDLayoutNode[prop];
|
|
2952
|
-
CoSENode.prototype.move = function() {
|
|
2953
|
-
var layout = this.graphManager.getLayout();
|
|
2954
|
-
this.displacementX = layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren;
|
|
2955
|
-
this.displacementY = layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren;
|
|
2956
|
-
if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX);
|
|
2957
|
-
if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY);
|
|
2958
|
-
if (this.child == null) this.moveBy(this.displacementX, this.displacementY);
|
|
2959
|
-
else if (this.child.getNodes().length == 0) this.moveBy(this.displacementX, this.displacementY);
|
|
2960
|
-
else this.propogateDisplacementToChildren(this.displacementX, this.displacementY);
|
|
2961
|
-
layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY);
|
|
2962
|
-
this.springForceX = 0;
|
|
2963
|
-
this.springForceY = 0;
|
|
2964
|
-
this.repulsionForceX = 0;
|
|
2965
|
-
this.repulsionForceY = 0;
|
|
2966
|
-
this.gravitationForceX = 0;
|
|
2967
|
-
this.gravitationForceY = 0;
|
|
2968
|
-
this.displacementX = 0;
|
|
2969
|
-
this.displacementY = 0;
|
|
2970
|
-
};
|
|
2971
|
-
CoSENode.prototype.propogateDisplacementToChildren = function(dX, dY) {
|
|
2972
|
-
var nodes = this.getChild().getNodes();
|
|
2973
|
-
var node;
|
|
2974
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
2975
|
-
node = nodes[i];
|
|
2976
|
-
if (node.getChild() == null) {
|
|
2977
|
-
node.moveBy(dX, dY);
|
|
2978
|
-
node.displacementX += dX;
|
|
2979
|
-
node.displacementY += dY;
|
|
2980
|
-
} else node.propogateDisplacementToChildren(dX, dY);
|
|
2981
|
-
}
|
|
2982
|
-
};
|
|
2983
|
-
CoSENode.prototype.setPred1 = function(pred1) {
|
|
2984
|
-
this.pred1 = pred1;
|
|
2985
|
-
};
|
|
2986
|
-
CoSENode.prototype.getPred1 = function() {
|
|
2987
|
-
return pred1;
|
|
2988
|
-
};
|
|
2989
|
-
CoSENode.prototype.getPred2 = function() {
|
|
2990
|
-
return pred2;
|
|
2991
|
-
};
|
|
2992
|
-
CoSENode.prototype.setNext = function(next) {
|
|
2993
|
-
this.next = next;
|
|
2994
|
-
};
|
|
2995
|
-
CoSENode.prototype.getNext = function() {
|
|
2996
|
-
return next;
|
|
2997
|
-
};
|
|
2998
|
-
CoSENode.prototype.setProcessed = function(processed) {
|
|
2999
|
-
this.processed = processed;
|
|
3000
|
-
};
|
|
3001
|
-
CoSENode.prototype.isProcessed = function() {
|
|
3002
|
-
return processed;
|
|
3003
|
-
};
|
|
3004
|
-
module$12.exports = CoSENode;
|
|
3005
|
-
}),
|
|
3006
|
-
(function(module$13, exports$11, __webpack_require__) {
|
|
3007
|
-
"use strict";
|
|
3008
|
-
var FDLayout = __webpack_require__(0).FDLayout;
|
|
3009
|
-
var CoSEGraphManager = __webpack_require__(4);
|
|
3010
|
-
var CoSEGraph = __webpack_require__(3);
|
|
3011
|
-
var CoSENode = __webpack_require__(5);
|
|
3012
|
-
var CoSEEdge = __webpack_require__(2);
|
|
3013
|
-
var CoSEConstants = __webpack_require__(1);
|
|
3014
|
-
var FDLayoutConstants = __webpack_require__(0).FDLayoutConstants;
|
|
3015
|
-
var LayoutConstants = __webpack_require__(0).LayoutConstants;
|
|
3016
|
-
var Point = __webpack_require__(0).Point;
|
|
3017
|
-
var PointD = __webpack_require__(0).PointD;
|
|
3018
|
-
var Layout = __webpack_require__(0).Layout;
|
|
3019
|
-
var Integer = __webpack_require__(0).Integer;
|
|
3020
|
-
var IGeometry = __webpack_require__(0).IGeometry;
|
|
3021
|
-
var LGraph = __webpack_require__(0).LGraph;
|
|
3022
|
-
var Transform = __webpack_require__(0).Transform;
|
|
3023
|
-
function CoSELayout() {
|
|
3024
|
-
FDLayout.call(this);
|
|
3025
|
-
this.toBeTiled = {};
|
|
3026
|
-
}
|
|
3027
|
-
CoSELayout.prototype = Object.create(FDLayout.prototype);
|
|
3028
|
-
for (var prop in FDLayout) CoSELayout[prop] = FDLayout[prop];
|
|
3029
|
-
CoSELayout.prototype.newGraphManager = function() {
|
|
3030
|
-
var gm = new CoSEGraphManager(this);
|
|
3031
|
-
this.graphManager = gm;
|
|
3032
|
-
return gm;
|
|
3033
|
-
};
|
|
3034
|
-
CoSELayout.prototype.newGraph = function(vGraph) {
|
|
3035
|
-
return new CoSEGraph(null, this.graphManager, vGraph);
|
|
3036
|
-
};
|
|
3037
|
-
CoSELayout.prototype.newNode = function(vNode) {
|
|
3038
|
-
return new CoSENode(this.graphManager, vNode);
|
|
3039
|
-
};
|
|
3040
|
-
CoSELayout.prototype.newEdge = function(vEdge) {
|
|
3041
|
-
return new CoSEEdge(null, null, vEdge);
|
|
3042
|
-
};
|
|
3043
|
-
CoSELayout.prototype.initParameters = function() {
|
|
3044
|
-
FDLayout.prototype.initParameters.call(this, arguments);
|
|
3045
|
-
if (!this.isSubLayout) {
|
|
3046
|
-
if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) this.idealEdgeLength = 10;
|
|
3047
|
-
else this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH;
|
|
3048
|
-
this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;
|
|
3049
|
-
this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;
|
|
3050
|
-
this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;
|
|
3051
|
-
this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;
|
|
3052
|
-
this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;
|
|
3053
|
-
this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;
|
|
3054
|
-
this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;
|
|
3055
|
-
this.prunedNodesAll = [];
|
|
3056
|
-
this.growTreeIterations = 0;
|
|
3057
|
-
this.afterGrowthIterations = 0;
|
|
3058
|
-
this.isTreeGrowing = false;
|
|
3059
|
-
this.isGrowthFinished = false;
|
|
3060
|
-
this.coolingCycle = 0;
|
|
3061
|
-
this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD;
|
|
3062
|
-
this.finalTemperature = FDLayoutConstants.CONVERGENCE_CHECK_PERIOD / this.maxIterations;
|
|
3063
|
-
this.coolingAdjuster = 1;
|
|
3064
|
-
}
|
|
3065
|
-
};
|
|
3066
|
-
CoSELayout.prototype.layout = function() {
|
|
3067
|
-
if (LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED) {
|
|
3068
|
-
this.createBendpoints();
|
|
3069
|
-
this.graphManager.resetAllEdges();
|
|
3070
|
-
}
|
|
3071
|
-
this.level = 0;
|
|
3072
|
-
return this.classicLayout();
|
|
3073
|
-
};
|
|
3074
|
-
CoSELayout.prototype.classicLayout = function() {
|
|
3075
|
-
this.nodesWithGravity = this.calculateNodesToApplyGravitationTo();
|
|
3076
|
-
this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity);
|
|
3077
|
-
this.calcNoOfChildrenForAllNodes();
|
|
3078
|
-
this.graphManager.calcLowestCommonAncestors();
|
|
3079
|
-
this.graphManager.calcInclusionTreeDepths();
|
|
3080
|
-
this.graphManager.getRoot().calcEstimatedSize();
|
|
3081
|
-
this.calcIdealEdgeLengths();
|
|
3082
|
-
if (!this.incremental) {
|
|
3083
|
-
var forest = this.getFlatForest();
|
|
3084
|
-
if (forest.length > 0) this.positionNodesRadially(forest);
|
|
3085
|
-
else {
|
|
3086
|
-
this.reduceTrees();
|
|
3087
|
-
this.graphManager.resetAllNodesToApplyGravitation();
|
|
3088
|
-
var allNodes = new Set(this.getAllNodes());
|
|
3089
|
-
var intersection = this.nodesWithGravity.filter(function(x) {
|
|
3090
|
-
return allNodes.has(x);
|
|
3091
|
-
});
|
|
3092
|
-
this.graphManager.setAllNodesToApplyGravitation(intersection);
|
|
3093
|
-
this.positionNodesRandomly();
|
|
3094
|
-
}
|
|
3095
|
-
} else if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) {
|
|
3096
|
-
this.reduceTrees();
|
|
3097
|
-
this.graphManager.resetAllNodesToApplyGravitation();
|
|
3098
|
-
var allNodes = new Set(this.getAllNodes());
|
|
3099
|
-
var intersection = this.nodesWithGravity.filter(function(x) {
|
|
3100
|
-
return allNodes.has(x);
|
|
3101
|
-
});
|
|
3102
|
-
this.graphManager.setAllNodesToApplyGravitation(intersection);
|
|
3103
|
-
}
|
|
3104
|
-
this.initSpringEmbedder();
|
|
3105
|
-
this.runSpringEmbedder();
|
|
3106
|
-
return true;
|
|
3107
|
-
};
|
|
3108
|
-
CoSELayout.prototype.tick = function() {
|
|
3109
|
-
this.totalIterations++;
|
|
3110
|
-
if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = true;
|
|
3111
|
-
else return true;
|
|
3112
|
-
if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
|
|
3113
|
-
if (this.isConverged()) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = true;
|
|
3114
|
-
else return true;
|
|
3115
|
-
this.coolingCycle++;
|
|
3116
|
-
if (this.layoutQuality == 0) this.coolingAdjuster = this.coolingCycle;
|
|
3117
|
-
else if (this.layoutQuality == 1) this.coolingAdjuster = this.coolingCycle / 3;
|
|
3118
|
-
this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature);
|
|
3119
|
-
this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
|
|
3120
|
-
}
|
|
3121
|
-
if (this.isTreeGrowing) {
|
|
3122
|
-
if (this.growTreeIterations % 10 == 0) if (this.prunedNodesAll.length > 0) {
|
|
3123
|
-
this.graphManager.updateBounds();
|
|
3124
|
-
this.updateGrid();
|
|
3125
|
-
this.growTree(this.prunedNodesAll);
|
|
3126
|
-
this.graphManager.resetAllNodesToApplyGravitation();
|
|
3127
|
-
var allNodes = new Set(this.getAllNodes());
|
|
3128
|
-
var intersection = this.nodesWithGravity.filter(function(x) {
|
|
3129
|
-
return allNodes.has(x);
|
|
3130
|
-
});
|
|
3131
|
-
this.graphManager.setAllNodesToApplyGravitation(intersection);
|
|
3132
|
-
this.graphManager.updateBounds();
|
|
3133
|
-
this.updateGrid();
|
|
3134
|
-
this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;
|
|
3135
|
-
} else {
|
|
3136
|
-
this.isTreeGrowing = false;
|
|
3137
|
-
this.isGrowthFinished = true;
|
|
3138
|
-
}
|
|
3139
|
-
this.growTreeIterations++;
|
|
3140
|
-
}
|
|
3141
|
-
if (this.isGrowthFinished) {
|
|
3142
|
-
if (this.isConverged()) return true;
|
|
3143
|
-
if (this.afterGrowthIterations % 10 == 0) {
|
|
3144
|
-
this.graphManager.updateBounds();
|
|
3145
|
-
this.updateGrid();
|
|
3146
|
-
}
|
|
3147
|
-
this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100);
|
|
3148
|
-
this.afterGrowthIterations++;
|
|
3149
|
-
}
|
|
3150
|
-
var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished;
|
|
3151
|
-
var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
|
|
3152
|
-
this.totalDisplacement = 0;
|
|
3153
|
-
this.graphManager.updateBounds();
|
|
3154
|
-
this.calcSpringForces();
|
|
3155
|
-
this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate);
|
|
3156
|
-
this.calcGravitationalForces();
|
|
3157
|
-
this.moveNodes();
|
|
3158
|
-
this.animate();
|
|
3159
|
-
return false;
|
|
3160
|
-
};
|
|
3161
|
-
CoSELayout.prototype.getPositionsData = function() {
|
|
3162
|
-
var allNodes = this.graphManager.getAllNodes();
|
|
3163
|
-
var pData = {};
|
|
3164
|
-
for (var i = 0; i < allNodes.length; i++) {
|
|
3165
|
-
var rect = allNodes[i].rect;
|
|
3166
|
-
var id = allNodes[i].id;
|
|
3167
|
-
pData[id] = {
|
|
3168
|
-
id,
|
|
3169
|
-
x: rect.getCenterX(),
|
|
3170
|
-
y: rect.getCenterY(),
|
|
3171
|
-
w: rect.width,
|
|
3172
|
-
h: rect.height
|
|
3173
|
-
};
|
|
3174
|
-
}
|
|
3175
|
-
return pData;
|
|
3176
|
-
};
|
|
3177
|
-
CoSELayout.prototype.runSpringEmbedder = function() {
|
|
3178
|
-
this.initialAnimationPeriod = 25;
|
|
3179
|
-
this.animationPeriod = this.initialAnimationPeriod;
|
|
3180
|
-
var layoutEnded = false;
|
|
3181
|
-
if (FDLayoutConstants.ANIMATE === "during") this.emit("layoutstarted");
|
|
3182
|
-
else {
|
|
3183
|
-
while (!layoutEnded) layoutEnded = this.tick();
|
|
3184
|
-
this.graphManager.updateBounds();
|
|
3185
|
-
}
|
|
3186
|
-
};
|
|
3187
|
-
CoSELayout.prototype.calculateNodesToApplyGravitationTo = function() {
|
|
3188
|
-
var nodeList = [];
|
|
3189
|
-
var graph;
|
|
3190
|
-
var graphs = this.graphManager.getGraphs();
|
|
3191
|
-
var size = graphs.length;
|
|
3192
|
-
var i;
|
|
3193
|
-
for (i = 0; i < size; i++) {
|
|
3194
|
-
graph = graphs[i];
|
|
3195
|
-
graph.updateConnected();
|
|
3196
|
-
if (!graph.isConnected) nodeList = nodeList.concat(graph.getNodes());
|
|
3197
|
-
}
|
|
3198
|
-
return nodeList;
|
|
3199
|
-
};
|
|
3200
|
-
CoSELayout.prototype.createBendpoints = function() {
|
|
3201
|
-
var edges = [];
|
|
3202
|
-
edges = edges.concat(this.graphManager.getAllEdges());
|
|
3203
|
-
var visited = /* @__PURE__ */ new Set();
|
|
3204
|
-
var i;
|
|
3205
|
-
for (i = 0; i < edges.length; i++) {
|
|
3206
|
-
var edge = edges[i];
|
|
3207
|
-
if (!visited.has(edge)) {
|
|
3208
|
-
var source = edge.getSource();
|
|
3209
|
-
var target = edge.getTarget();
|
|
3210
|
-
if (source == target) {
|
|
3211
|
-
edge.getBendpoints().push(new PointD());
|
|
3212
|
-
edge.getBendpoints().push(new PointD());
|
|
3213
|
-
this.createDummyNodesForBendpoints(edge);
|
|
3214
|
-
visited.add(edge);
|
|
3215
|
-
} else {
|
|
3216
|
-
var edgeList = [];
|
|
3217
|
-
edgeList = edgeList.concat(source.getEdgeListToNode(target));
|
|
3218
|
-
edgeList = edgeList.concat(target.getEdgeListToNode(source));
|
|
3219
|
-
if (!visited.has(edgeList[0])) {
|
|
3220
|
-
if (edgeList.length > 1) {
|
|
3221
|
-
var k;
|
|
3222
|
-
for (k = 0; k < edgeList.length; k++) {
|
|
3223
|
-
var multiEdge = edgeList[k];
|
|
3224
|
-
multiEdge.getBendpoints().push(new PointD());
|
|
3225
|
-
this.createDummyNodesForBendpoints(multiEdge);
|
|
3226
|
-
}
|
|
3227
|
-
}
|
|
3228
|
-
edgeList.forEach(function(edge) {
|
|
3229
|
-
visited.add(edge);
|
|
3230
|
-
});
|
|
3231
|
-
}
|
|
3232
|
-
}
|
|
3233
|
-
}
|
|
3234
|
-
if (visited.size == edges.length) break;
|
|
3235
|
-
}
|
|
3236
|
-
};
|
|
3237
|
-
CoSELayout.prototype.positionNodesRadially = function(forest) {
|
|
3238
|
-
var currentStartingPoint = new Point(0, 0);
|
|
3239
|
-
var numberOfColumns = Math.ceil(Math.sqrt(forest.length));
|
|
3240
|
-
var height = 0;
|
|
3241
|
-
var currentY = 0;
|
|
3242
|
-
var currentX = 0;
|
|
3243
|
-
var point = new PointD(0, 0);
|
|
3244
|
-
for (var i = 0; i < forest.length; i++) {
|
|
3245
|
-
if (i % numberOfColumns == 0) {
|
|
3246
|
-
currentX = 0;
|
|
3247
|
-
currentY = height;
|
|
3248
|
-
if (i != 0) currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION;
|
|
3249
|
-
height = 0;
|
|
3250
|
-
}
|
|
3251
|
-
var tree = forest[i];
|
|
3252
|
-
var centerNode = Layout.findCenterOfTree(tree);
|
|
3253
|
-
currentStartingPoint.x = currentX;
|
|
3254
|
-
currentStartingPoint.y = currentY;
|
|
3255
|
-
point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint);
|
|
3256
|
-
if (point.y > height) height = Math.floor(point.y);
|
|
3257
|
-
currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION);
|
|
3258
|
-
}
|
|
3259
|
-
this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2));
|
|
3260
|
-
};
|
|
3261
|
-
CoSELayout.radialLayout = function(tree, centerNode, startingPoint) {
|
|
3262
|
-
var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION);
|
|
3263
|
-
CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep);
|
|
3264
|
-
var bounds = LGraph.calculateBounds(tree);
|
|
3265
|
-
var transform = new Transform();
|
|
3266
|
-
transform.setDeviceOrgX(bounds.getMinX());
|
|
3267
|
-
transform.setDeviceOrgY(bounds.getMinY());
|
|
3268
|
-
transform.setWorldOrgX(startingPoint.x);
|
|
3269
|
-
transform.setWorldOrgY(startingPoint.y);
|
|
3270
|
-
for (var i = 0; i < tree.length; i++) tree[i].transform(transform);
|
|
3271
|
-
var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY());
|
|
3272
|
-
return transform.inverseTransformPoint(bottomRight);
|
|
3273
|
-
};
|
|
3274
|
-
CoSELayout.branchRadialLayout = function(node, parentOfNode, startAngle, endAngle, distance, radialSeparation) {
|
|
3275
|
-
var halfInterval = (endAngle - startAngle + 1) / 2;
|
|
3276
|
-
if (halfInterval < 0) halfInterval += 180;
|
|
3277
|
-
var teta = (halfInterval + startAngle) % 360 * IGeometry.TWO_PI / 360;
|
|
3278
|
-
var x_ = distance * Math.cos(teta);
|
|
3279
|
-
var y_ = distance * Math.sin(teta);
|
|
3280
|
-
node.setCenter(x_, y_);
|
|
3281
|
-
var neighborEdges = [];
|
|
3282
|
-
neighborEdges = neighborEdges.concat(node.getEdges());
|
|
3283
|
-
var childCount = neighborEdges.length;
|
|
3284
|
-
if (parentOfNode != null) childCount--;
|
|
3285
|
-
var branchCount = 0;
|
|
3286
|
-
var incEdgesCount = neighborEdges.length;
|
|
3287
|
-
var startIndex;
|
|
3288
|
-
var edges = node.getEdgesBetween(parentOfNode);
|
|
3289
|
-
while (edges.length > 1) {
|
|
3290
|
-
var temp = edges[0];
|
|
3291
|
-
edges.splice(0, 1);
|
|
3292
|
-
var index = neighborEdges.indexOf(temp);
|
|
3293
|
-
if (index >= 0) neighborEdges.splice(index, 1);
|
|
3294
|
-
incEdgesCount--;
|
|
3295
|
-
childCount--;
|
|
3296
|
-
}
|
|
3297
|
-
if (parentOfNode != null) startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount;
|
|
3298
|
-
else startIndex = 0;
|
|
3299
|
-
var stepAngle = Math.abs(endAngle - startAngle) / childCount;
|
|
3300
|
-
for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) {
|
|
3301
|
-
var currentNeighbor = neighborEdges[i].getOtherEnd(node);
|
|
3302
|
-
if (currentNeighbor == parentOfNode) continue;
|
|
3303
|
-
var childStartAngle = (startAngle + branchCount * stepAngle) % 360;
|
|
3304
|
-
var childEndAngle = (childStartAngle + stepAngle) % 360;
|
|
3305
|
-
CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation);
|
|
3306
|
-
branchCount++;
|
|
3307
|
-
}
|
|
3308
|
-
};
|
|
3309
|
-
CoSELayout.maxDiagonalInTree = function(tree) {
|
|
3310
|
-
var maxDiagonal = Integer.MIN_VALUE;
|
|
3311
|
-
for (var i = 0; i < tree.length; i++) {
|
|
3312
|
-
var diagonal = tree[i].getDiagonal();
|
|
3313
|
-
if (diagonal > maxDiagonal) maxDiagonal = diagonal;
|
|
3314
|
-
}
|
|
3315
|
-
return maxDiagonal;
|
|
3316
|
-
};
|
|
3317
|
-
CoSELayout.prototype.calcRepulsionRange = function() {
|
|
3318
|
-
return 2 * (this.level + 1) * this.idealEdgeLength;
|
|
3319
|
-
};
|
|
3320
|
-
CoSELayout.prototype.groupZeroDegreeMembers = function() {
|
|
3321
|
-
var self = this;
|
|
3322
|
-
var tempMemberGroups = {};
|
|
3323
|
-
this.memberGroups = {};
|
|
3324
|
-
this.idToDummyNode = {};
|
|
3325
|
-
var zeroDegree = [];
|
|
3326
|
-
var allNodes = this.graphManager.getAllNodes();
|
|
3327
|
-
for (var i = 0; i < allNodes.length; i++) {
|
|
3328
|
-
var node = allNodes[i];
|
|
3329
|
-
var parent = node.getParent();
|
|
3330
|
-
if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == void 0 || !this.getToBeTiled(parent))) zeroDegree.push(node);
|
|
3331
|
-
}
|
|
3332
|
-
for (var i = 0; i < zeroDegree.length; i++) {
|
|
3333
|
-
var node = zeroDegree[i];
|
|
3334
|
-
var p_id = node.getParent().id;
|
|
3335
|
-
if (typeof tempMemberGroups[p_id] === "undefined") tempMemberGroups[p_id] = [];
|
|
3336
|
-
tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node);
|
|
3337
|
-
}
|
|
3338
|
-
Object.keys(tempMemberGroups).forEach(function(p_id) {
|
|
3339
|
-
if (tempMemberGroups[p_id].length > 1) {
|
|
3340
|
-
var dummyCompoundId = "DummyCompound_" + p_id;
|
|
3341
|
-
self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id];
|
|
3342
|
-
var parent = tempMemberGroups[p_id][0].getParent();
|
|
3343
|
-
var dummyCompound = new CoSENode(self.graphManager);
|
|
3344
|
-
dummyCompound.id = dummyCompoundId;
|
|
3345
|
-
dummyCompound.paddingLeft = parent.paddingLeft || 0;
|
|
3346
|
-
dummyCompound.paddingRight = parent.paddingRight || 0;
|
|
3347
|
-
dummyCompound.paddingBottom = parent.paddingBottom || 0;
|
|
3348
|
-
dummyCompound.paddingTop = parent.paddingTop || 0;
|
|
3349
|
-
self.idToDummyNode[dummyCompoundId] = dummyCompound;
|
|
3350
|
-
var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound);
|
|
3351
|
-
var parentGraph = parent.getChild();
|
|
3352
|
-
parentGraph.add(dummyCompound);
|
|
3353
|
-
for (var i = 0; i < tempMemberGroups[p_id].length; i++) {
|
|
3354
|
-
var node = tempMemberGroups[p_id][i];
|
|
3355
|
-
parentGraph.remove(node);
|
|
3356
|
-
dummyParentGraph.add(node);
|
|
3357
|
-
}
|
|
3358
|
-
}
|
|
3359
|
-
});
|
|
3360
|
-
};
|
|
3361
|
-
CoSELayout.prototype.clearCompounds = function() {
|
|
3362
|
-
var childGraphMap = {};
|
|
3363
|
-
var idToNode = {};
|
|
3364
|
-
this.performDFSOnCompounds();
|
|
3365
|
-
for (var i = 0; i < this.compoundOrder.length; i++) {
|
|
3366
|
-
idToNode[this.compoundOrder[i].id] = this.compoundOrder[i];
|
|
3367
|
-
childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes());
|
|
3368
|
-
this.graphManager.remove(this.compoundOrder[i].getChild());
|
|
3369
|
-
this.compoundOrder[i].child = null;
|
|
3370
|
-
}
|
|
3371
|
-
this.graphManager.resetAllNodes();
|
|
3372
|
-
this.tileCompoundMembers(childGraphMap, idToNode);
|
|
3373
|
-
};
|
|
3374
|
-
CoSELayout.prototype.clearZeroDegreeMembers = function() {
|
|
3375
|
-
var self = this;
|
|
3376
|
-
var tiledZeroDegreePack = this.tiledZeroDegreePack = [];
|
|
3377
|
-
Object.keys(this.memberGroups).forEach(function(id) {
|
|
3378
|
-
var compoundNode = self.idToDummyNode[id];
|
|
3379
|
-
tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight);
|
|
3380
|
-
compoundNode.rect.width = tiledZeroDegreePack[id].width;
|
|
3381
|
-
compoundNode.rect.height = tiledZeroDegreePack[id].height;
|
|
3382
|
-
});
|
|
3383
|
-
};
|
|
3384
|
-
CoSELayout.prototype.repopulateCompounds = function() {
|
|
3385
|
-
for (var i = this.compoundOrder.length - 1; i >= 0; i--) {
|
|
3386
|
-
var lCompoundNode = this.compoundOrder[i];
|
|
3387
|
-
var id = lCompoundNode.id;
|
|
3388
|
-
var horizontalMargin = lCompoundNode.paddingLeft;
|
|
3389
|
-
var verticalMargin = lCompoundNode.paddingTop;
|
|
3390
|
-
this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin);
|
|
3391
|
-
}
|
|
3392
|
-
};
|
|
3393
|
-
CoSELayout.prototype.repopulateZeroDegreeMembers = function() {
|
|
3394
|
-
var self = this;
|
|
3395
|
-
var tiledPack = this.tiledZeroDegreePack;
|
|
3396
|
-
Object.keys(tiledPack).forEach(function(id) {
|
|
3397
|
-
var compoundNode = self.idToDummyNode[id];
|
|
3398
|
-
var horizontalMargin = compoundNode.paddingLeft;
|
|
3399
|
-
var verticalMargin = compoundNode.paddingTop;
|
|
3400
|
-
self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin);
|
|
3401
|
-
});
|
|
3402
|
-
};
|
|
3403
|
-
CoSELayout.prototype.getToBeTiled = function(node) {
|
|
3404
|
-
var id = node.id;
|
|
3405
|
-
if (this.toBeTiled[id] != null) return this.toBeTiled[id];
|
|
3406
|
-
var childGraph = node.getChild();
|
|
3407
|
-
if (childGraph == null) {
|
|
3408
|
-
this.toBeTiled[id] = false;
|
|
3409
|
-
return false;
|
|
3410
|
-
}
|
|
3411
|
-
var children = childGraph.getNodes();
|
|
3412
|
-
for (var i = 0; i < children.length; i++) {
|
|
3413
|
-
var theChild = children[i];
|
|
3414
|
-
if (this.getNodeDegree(theChild) > 0) {
|
|
3415
|
-
this.toBeTiled[id] = false;
|
|
3416
|
-
return false;
|
|
3417
|
-
}
|
|
3418
|
-
if (theChild.getChild() == null) {
|
|
3419
|
-
this.toBeTiled[theChild.id] = false;
|
|
3420
|
-
continue;
|
|
3421
|
-
}
|
|
3422
|
-
if (!this.getToBeTiled(theChild)) {
|
|
3423
|
-
this.toBeTiled[id] = false;
|
|
3424
|
-
return false;
|
|
3425
|
-
}
|
|
3426
|
-
}
|
|
3427
|
-
this.toBeTiled[id] = true;
|
|
3428
|
-
return true;
|
|
3429
|
-
};
|
|
3430
|
-
CoSELayout.prototype.getNodeDegree = function(node) {
|
|
3431
|
-
node.id;
|
|
3432
|
-
var edges = node.getEdges();
|
|
3433
|
-
var degree = 0;
|
|
3434
|
-
for (var i = 0; i < edges.length; i++) {
|
|
3435
|
-
var edge = edges[i];
|
|
3436
|
-
if (edge.getSource().id !== edge.getTarget().id) degree = degree + 1;
|
|
3437
|
-
}
|
|
3438
|
-
return degree;
|
|
3439
|
-
};
|
|
3440
|
-
CoSELayout.prototype.getNodeDegreeWithChildren = function(node) {
|
|
3441
|
-
var degree = this.getNodeDegree(node);
|
|
3442
|
-
if (node.getChild() == null) return degree;
|
|
3443
|
-
var children = node.getChild().getNodes();
|
|
3444
|
-
for (var i = 0; i < children.length; i++) {
|
|
3445
|
-
var child = children[i];
|
|
3446
|
-
degree += this.getNodeDegreeWithChildren(child);
|
|
3447
|
-
}
|
|
3448
|
-
return degree;
|
|
3449
|
-
};
|
|
3450
|
-
CoSELayout.prototype.performDFSOnCompounds = function() {
|
|
3451
|
-
this.compoundOrder = [];
|
|
3452
|
-
this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
|
|
3453
|
-
};
|
|
3454
|
-
CoSELayout.prototype.fillCompexOrderByDFS = function(children) {
|
|
3455
|
-
for (var i = 0; i < children.length; i++) {
|
|
3456
|
-
var child = children[i];
|
|
3457
|
-
if (child.getChild() != null) this.fillCompexOrderByDFS(child.getChild().getNodes());
|
|
3458
|
-
if (this.getToBeTiled(child)) this.compoundOrder.push(child);
|
|
3459
|
-
}
|
|
3460
|
-
};
|
|
3461
|
-
/**
|
|
3462
|
-
* This method places each zero degree member wrt given (x,y) coordinates (top left).
|
|
3463
|
-
*/
|
|
3464
|
-
CoSELayout.prototype.adjustLocations = function(organization, x, y, compoundHorizontalMargin, compoundVerticalMargin) {
|
|
3465
|
-
x += compoundHorizontalMargin;
|
|
3466
|
-
y += compoundVerticalMargin;
|
|
3467
|
-
var left = x;
|
|
3468
|
-
for (var i = 0; i < organization.rows.length; i++) {
|
|
3469
|
-
var row = organization.rows[i];
|
|
3470
|
-
x = left;
|
|
3471
|
-
var maxHeight = 0;
|
|
3472
|
-
for (var j = 0; j < row.length; j++) {
|
|
3473
|
-
var lnode = row[j];
|
|
3474
|
-
lnode.rect.x = x;
|
|
3475
|
-
lnode.rect.y = y;
|
|
3476
|
-
x += lnode.rect.width + organization.horizontalPadding;
|
|
3477
|
-
if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height;
|
|
3478
|
-
}
|
|
3479
|
-
y += maxHeight + organization.verticalPadding;
|
|
3480
|
-
}
|
|
3481
|
-
};
|
|
3482
|
-
CoSELayout.prototype.tileCompoundMembers = function(childGraphMap, idToNode) {
|
|
3483
|
-
var self = this;
|
|
3484
|
-
this.tiledMemberPack = [];
|
|
3485
|
-
Object.keys(childGraphMap).forEach(function(id) {
|
|
3486
|
-
var compoundNode = idToNode[id];
|
|
3487
|
-
self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight);
|
|
3488
|
-
compoundNode.rect.width = self.tiledMemberPack[id].width;
|
|
3489
|
-
compoundNode.rect.height = self.tiledMemberPack[id].height;
|
|
3490
|
-
});
|
|
3491
|
-
};
|
|
3492
|
-
CoSELayout.prototype.tileNodes = function(nodes, minWidth) {
|
|
3493
|
-
var organization = {
|
|
3494
|
-
rows: [],
|
|
3495
|
-
rowWidth: [],
|
|
3496
|
-
rowHeight: [],
|
|
3497
|
-
width: 0,
|
|
3498
|
-
height: minWidth,
|
|
3499
|
-
verticalPadding: CoSEConstants.TILING_PADDING_VERTICAL,
|
|
3500
|
-
horizontalPadding: CoSEConstants.TILING_PADDING_HORIZONTAL
|
|
3501
|
-
};
|
|
3502
|
-
nodes.sort(function(n1, n2) {
|
|
3503
|
-
if (n1.rect.width * n1.rect.height > n2.rect.width * n2.rect.height) return -1;
|
|
3504
|
-
if (n1.rect.width * n1.rect.height < n2.rect.width * n2.rect.height) return 1;
|
|
3505
|
-
return 0;
|
|
3506
|
-
});
|
|
3507
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
3508
|
-
var lNode = nodes[i];
|
|
3509
|
-
if (organization.rows.length == 0) this.insertNodeToRow(organization, lNode, 0, minWidth);
|
|
3510
|
-
else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) this.insertNodeToRow(organization, lNode, this.getShortestRowIndex(organization), minWidth);
|
|
3511
|
-
else this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth);
|
|
3512
|
-
this.shiftToLastRow(organization);
|
|
3513
|
-
}
|
|
3514
|
-
return organization;
|
|
3515
|
-
};
|
|
3516
|
-
CoSELayout.prototype.insertNodeToRow = function(organization, node, rowIndex, minWidth) {
|
|
3517
|
-
var minCompoundSize = minWidth;
|
|
3518
|
-
if (rowIndex == organization.rows.length) {
|
|
3519
|
-
organization.rows.push([]);
|
|
3520
|
-
organization.rowWidth.push(minCompoundSize);
|
|
3521
|
-
organization.rowHeight.push(0);
|
|
3522
|
-
}
|
|
3523
|
-
var w = organization.rowWidth[rowIndex] + node.rect.width;
|
|
3524
|
-
if (organization.rows[rowIndex].length > 0) w += organization.horizontalPadding;
|
|
3525
|
-
organization.rowWidth[rowIndex] = w;
|
|
3526
|
-
if (organization.width < w) organization.width = w;
|
|
3527
|
-
var h = node.rect.height;
|
|
3528
|
-
if (rowIndex > 0) h += organization.verticalPadding;
|
|
3529
|
-
var extraHeight = 0;
|
|
3530
|
-
if (h > organization.rowHeight[rowIndex]) {
|
|
3531
|
-
extraHeight = organization.rowHeight[rowIndex];
|
|
3532
|
-
organization.rowHeight[rowIndex] = h;
|
|
3533
|
-
extraHeight = organization.rowHeight[rowIndex] - extraHeight;
|
|
3534
|
-
}
|
|
3535
|
-
organization.height += extraHeight;
|
|
3536
|
-
organization.rows[rowIndex].push(node);
|
|
3537
|
-
};
|
|
3538
|
-
CoSELayout.prototype.getShortestRowIndex = function(organization) {
|
|
3539
|
-
var r = -1;
|
|
3540
|
-
var min = Number.MAX_VALUE;
|
|
3541
|
-
for (var i = 0; i < organization.rows.length; i++) if (organization.rowWidth[i] < min) {
|
|
3542
|
-
r = i;
|
|
3543
|
-
min = organization.rowWidth[i];
|
|
3544
|
-
}
|
|
3545
|
-
return r;
|
|
3546
|
-
};
|
|
3547
|
-
CoSELayout.prototype.getLongestRowIndex = function(organization) {
|
|
3548
|
-
var r = -1;
|
|
3549
|
-
var max = Number.MIN_VALUE;
|
|
3550
|
-
for (var i = 0; i < organization.rows.length; i++) if (organization.rowWidth[i] > max) {
|
|
3551
|
-
r = i;
|
|
3552
|
-
max = organization.rowWidth[i];
|
|
3553
|
-
}
|
|
3554
|
-
return r;
|
|
3555
|
-
};
|
|
3556
|
-
/**
|
|
3557
|
-
* This method checks whether adding extra width to the organization violates
|
|
3558
|
-
* the aspect ratio(1) or not.
|
|
3559
|
-
*/
|
|
3560
|
-
CoSELayout.prototype.canAddHorizontal = function(organization, extraWidth, extraHeight) {
|
|
3561
|
-
var sri = this.getShortestRowIndex(organization);
|
|
3562
|
-
if (sri < 0) return true;
|
|
3563
|
-
var min = organization.rowWidth[sri];
|
|
3564
|
-
if (min + organization.horizontalPadding + extraWidth <= organization.width) return true;
|
|
3565
|
-
var hDiff = 0;
|
|
3566
|
-
if (organization.rowHeight[sri] < extraHeight) {
|
|
3567
|
-
if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri];
|
|
3568
|
-
}
|
|
3569
|
-
var add_to_row_ratio;
|
|
3570
|
-
if (organization.width - min >= extraWidth + organization.horizontalPadding) add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding);
|
|
3571
|
-
else add_to_row_ratio = (organization.height + hDiff) / organization.width;
|
|
3572
|
-
hDiff = extraHeight + organization.verticalPadding;
|
|
3573
|
-
var add_new_row_ratio;
|
|
3574
|
-
if (organization.width < extraWidth) add_new_row_ratio = (organization.height + hDiff) / extraWidth;
|
|
3575
|
-
else add_new_row_ratio = (organization.height + hDiff) / organization.width;
|
|
3576
|
-
if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio;
|
|
3577
|
-
if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio;
|
|
3578
|
-
return add_to_row_ratio < add_new_row_ratio;
|
|
3579
|
-
};
|
|
3580
|
-
CoSELayout.prototype.shiftToLastRow = function(organization) {
|
|
3581
|
-
var longest = this.getLongestRowIndex(organization);
|
|
3582
|
-
var last = organization.rowWidth.length - 1;
|
|
3583
|
-
var row = organization.rows[longest];
|
|
3584
|
-
var node = row[row.length - 1];
|
|
3585
|
-
var diff = node.width + organization.horizontalPadding;
|
|
3586
|
-
if (organization.width - organization.rowWidth[last] > diff && longest != last) {
|
|
3587
|
-
row.splice(-1, 1);
|
|
3588
|
-
organization.rows[last].push(node);
|
|
3589
|
-
organization.rowWidth[longest] = organization.rowWidth[longest] - diff;
|
|
3590
|
-
organization.rowWidth[last] = organization.rowWidth[last] + diff;
|
|
3591
|
-
organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)];
|
|
3592
|
-
var maxHeight = Number.MIN_VALUE;
|
|
3593
|
-
for (var i = 0; i < row.length; i++) if (row[i].height > maxHeight) maxHeight = row[i].height;
|
|
3594
|
-
if (longest > 0) maxHeight += organization.verticalPadding;
|
|
3595
|
-
var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last];
|
|
3596
|
-
organization.rowHeight[longest] = maxHeight;
|
|
3597
|
-
if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding;
|
|
3598
|
-
var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last];
|
|
3599
|
-
organization.height += finalTotal - prevTotal;
|
|
3600
|
-
this.shiftToLastRow(organization);
|
|
3601
|
-
}
|
|
3602
|
-
};
|
|
3603
|
-
CoSELayout.prototype.tilingPreLayout = function() {
|
|
3604
|
-
if (CoSEConstants.TILE) {
|
|
3605
|
-
this.groupZeroDegreeMembers();
|
|
3606
|
-
this.clearCompounds();
|
|
3607
|
-
this.clearZeroDegreeMembers();
|
|
3608
|
-
}
|
|
3609
|
-
};
|
|
3610
|
-
CoSELayout.prototype.tilingPostLayout = function() {
|
|
3611
|
-
if (CoSEConstants.TILE) {
|
|
3612
|
-
this.repopulateZeroDegreeMembers();
|
|
3613
|
-
this.repopulateCompounds();
|
|
3614
|
-
}
|
|
3615
|
-
};
|
|
3616
|
-
CoSELayout.prototype.reduceTrees = function() {
|
|
3617
|
-
var prunedNodesAll = [];
|
|
3618
|
-
var containsLeaf = true;
|
|
3619
|
-
var node;
|
|
3620
|
-
while (containsLeaf) {
|
|
3621
|
-
var allNodes = this.graphManager.getAllNodes();
|
|
3622
|
-
var prunedNodesInStepTemp = [];
|
|
3623
|
-
containsLeaf = false;
|
|
3624
|
-
for (var i = 0; i < allNodes.length; i++) {
|
|
3625
|
-
node = allNodes[i];
|
|
3626
|
-
if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) {
|
|
3627
|
-
prunedNodesInStepTemp.push([
|
|
3628
|
-
node,
|
|
3629
|
-
node.getEdges()[0],
|
|
3630
|
-
node.getOwner()
|
|
3631
|
-
]);
|
|
3632
|
-
containsLeaf = true;
|
|
3633
|
-
}
|
|
3634
|
-
}
|
|
3635
|
-
if (containsLeaf == true) {
|
|
3636
|
-
var prunedNodesInStep = [];
|
|
3637
|
-
for (var j = 0; j < prunedNodesInStepTemp.length; j++) if (prunedNodesInStepTemp[j][0].getEdges().length == 1) {
|
|
3638
|
-
prunedNodesInStep.push(prunedNodesInStepTemp[j]);
|
|
3639
|
-
prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]);
|
|
3640
|
-
}
|
|
3641
|
-
prunedNodesAll.push(prunedNodesInStep);
|
|
3642
|
-
this.graphManager.resetAllNodes();
|
|
3643
|
-
this.graphManager.resetAllEdges();
|
|
3644
|
-
}
|
|
3645
|
-
}
|
|
3646
|
-
this.prunedNodesAll = prunedNodesAll;
|
|
3647
|
-
};
|
|
3648
|
-
CoSELayout.prototype.growTree = function(prunedNodesAll) {
|
|
3649
|
-
var prunedNodesInStep = prunedNodesAll[prunedNodesAll.length - 1];
|
|
3650
|
-
var nodeData;
|
|
3651
|
-
for (var i = 0; i < prunedNodesInStep.length; i++) {
|
|
3652
|
-
nodeData = prunedNodesInStep[i];
|
|
3653
|
-
this.findPlaceforPrunedNode(nodeData);
|
|
3654
|
-
nodeData[2].add(nodeData[0]);
|
|
3655
|
-
nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target);
|
|
3656
|
-
}
|
|
3657
|
-
prunedNodesAll.splice(prunedNodesAll.length - 1, 1);
|
|
3658
|
-
this.graphManager.resetAllNodes();
|
|
3659
|
-
this.graphManager.resetAllEdges();
|
|
3660
|
-
};
|
|
3661
|
-
CoSELayout.prototype.findPlaceforPrunedNode = function(nodeData) {
|
|
3662
|
-
var gridForPrunedNode;
|
|
3663
|
-
var nodeToConnect;
|
|
3664
|
-
var prunedNode = nodeData[0];
|
|
3665
|
-
if (prunedNode == nodeData[1].source) nodeToConnect = nodeData[1].target;
|
|
3666
|
-
else nodeToConnect = nodeData[1].source;
|
|
3667
|
-
var startGridX = nodeToConnect.startX;
|
|
3668
|
-
var finishGridX = nodeToConnect.finishX;
|
|
3669
|
-
var startGridY = nodeToConnect.startY;
|
|
3670
|
-
var finishGridY = nodeToConnect.finishY;
|
|
3671
|
-
var controlRegions = [
|
|
3672
|
-
0,
|
|
3673
|
-
0,
|
|
3674
|
-
0,
|
|
3675
|
-
0
|
|
3676
|
-
];
|
|
3677
|
-
if (startGridY > 0) for (var i = startGridX; i <= finishGridX; i++) controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1;
|
|
3678
|
-
if (finishGridX < this.grid.length - 1) for (var i = startGridY; i <= finishGridY; i++) controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1;
|
|
3679
|
-
if (finishGridY < this.grid[0].length - 1) for (var i = startGridX; i <= finishGridX; i++) controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1;
|
|
3680
|
-
if (startGridX > 0) for (var i = startGridY; i <= finishGridY; i++) controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1;
|
|
3681
|
-
var min = Integer.MAX_VALUE;
|
|
3682
|
-
var minCount;
|
|
3683
|
-
var minIndex;
|
|
3684
|
-
for (var j = 0; j < controlRegions.length; j++) if (controlRegions[j] < min) {
|
|
3685
|
-
min = controlRegions[j];
|
|
3686
|
-
minCount = 1;
|
|
3687
|
-
minIndex = j;
|
|
3688
|
-
} else if (controlRegions[j] == min) minCount++;
|
|
3689
|
-
if (minCount == 3 && min == 0) {
|
|
3690
|
-
if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) gridForPrunedNode = 1;
|
|
3691
|
-
else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) gridForPrunedNode = 0;
|
|
3692
|
-
else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) gridForPrunedNode = 3;
|
|
3693
|
-
else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) gridForPrunedNode = 2;
|
|
3694
|
-
} else if (minCount == 2 && min == 0) {
|
|
3695
|
-
var random = Math.floor(Math.random() * 2);
|
|
3696
|
-
if (controlRegions[0] == 0 && controlRegions[1] == 0) if (random == 0) gridForPrunedNode = 0;
|
|
3697
|
-
else gridForPrunedNode = 1;
|
|
3698
|
-
else if (controlRegions[0] == 0 && controlRegions[2] == 0) if (random == 0) gridForPrunedNode = 0;
|
|
3699
|
-
else gridForPrunedNode = 2;
|
|
3700
|
-
else if (controlRegions[0] == 0 && controlRegions[3] == 0) if (random == 0) gridForPrunedNode = 0;
|
|
3701
|
-
else gridForPrunedNode = 3;
|
|
3702
|
-
else if (controlRegions[1] == 0 && controlRegions[2] == 0) if (random == 0) gridForPrunedNode = 1;
|
|
3703
|
-
else gridForPrunedNode = 2;
|
|
3704
|
-
else if (controlRegions[1] == 0 && controlRegions[3] == 0) if (random == 0) gridForPrunedNode = 1;
|
|
3705
|
-
else gridForPrunedNode = 3;
|
|
3706
|
-
else if (random == 0) gridForPrunedNode = 2;
|
|
3707
|
-
else gridForPrunedNode = 3;
|
|
3708
|
-
} else if (minCount == 4 && min == 0) {
|
|
3709
|
-
var random = Math.floor(Math.random() * 4);
|
|
3710
|
-
gridForPrunedNode = random;
|
|
3711
|
-
} else gridForPrunedNode = minIndex;
|
|
3712
|
-
if (gridForPrunedNode == 0) prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2);
|
|
3713
|
-
else if (gridForPrunedNode == 1) prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY());
|
|
3714
|
-
else if (gridForPrunedNode == 2) prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2);
|
|
3715
|
-
else prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY());
|
|
3716
|
-
};
|
|
3717
|
-
module$13.exports = CoSELayout;
|
|
3718
|
-
}),
|
|
3719
|
-
(function(module$14, exports$12, __webpack_require__) {
|
|
3720
|
-
"use strict";
|
|
3721
|
-
var coseBase = {};
|
|
3722
|
-
coseBase.layoutBase = __webpack_require__(0);
|
|
3723
|
-
coseBase.CoSEConstants = __webpack_require__(1);
|
|
3724
|
-
coseBase.CoSEEdge = __webpack_require__(2);
|
|
3725
|
-
coseBase.CoSEGraph = __webpack_require__(3);
|
|
3726
|
-
coseBase.CoSEGraphManager = __webpack_require__(4);
|
|
3727
|
-
coseBase.CoSELayout = __webpack_require__(6);
|
|
3728
|
-
coseBase.CoSENode = __webpack_require__(5);
|
|
3729
|
-
module$14.exports = coseBase;
|
|
3730
|
-
})
|
|
3731
|
-
]);
|
|
3732
|
-
});
|
|
3733
|
-
}));
|
|
3734
|
-
//#endregion
|
|
3735
|
-
//#region ../../node_modules/.pnpm/mermaid@11.15.0/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.mjs
|
|
3736
|
-
var import_cytoscape_cose_bilkent = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3737
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3738
|
-
if (typeof exports === "object" && typeof module === "object") module.exports = factory(require_cose_base());
|
|
3739
|
-
else if (typeof define === "function" && define.amd) define(["cose-base"], factory);
|
|
3740
|
-
else if (typeof exports === "object") exports["cytoscapeCoseBilkent"] = factory(require_cose_base());
|
|
3741
|
-
else root["cytoscapeCoseBilkent"] = factory(root["coseBase"]);
|
|
3742
|
-
})(exports, function(__WEBPACK_EXTERNAL_MODULE_0__) {
|
|
3743
|
-
return function(modules) {
|
|
3744
|
-
// webpackBootstrap
|
|
3745
|
-
var installedModules = {};
|
|
3746
|
-
function __webpack_require__(moduleId) {
|
|
3747
|
-
if (installedModules[moduleId]) return installedModules[moduleId].exports;
|
|
3748
|
-
var module$1 = installedModules[moduleId] = {
|
|
3749
|
-
i: moduleId,
|
|
3750
|
-
l: false,
|
|
3751
|
-
exports: {}
|
|
3752
|
-
};
|
|
3753
|
-
modules[moduleId].call(module$1.exports, module$1, module$1.exports, __webpack_require__);
|
|
3754
|
-
module$1.l = true;
|
|
3755
|
-
return module$1.exports;
|
|
3756
|
-
}
|
|
3757
|
-
__webpack_require__.m = modules;
|
|
3758
|
-
__webpack_require__.c = installedModules;
|
|
3759
|
-
__webpack_require__.i = function(value) {
|
|
3760
|
-
return value;
|
|
3761
|
-
};
|
|
3762
|
-
__webpack_require__.d = function(exports$1, name, getter) {
|
|
3763
|
-
if (!__webpack_require__.o(exports$1, name)) Object.defineProperty(exports$1, name, {
|
|
3764
|
-
configurable: false,
|
|
3765
|
-
enumerable: true,
|
|
3766
|
-
get: getter
|
|
3767
|
-
});
|
|
3768
|
-
};
|
|
3769
|
-
__webpack_require__.n = function(module$2) {
|
|
3770
|
-
var getter = module$2 && module$2.__esModule ? function getDefault() {
|
|
3771
|
-
return module$2["default"];
|
|
3772
|
-
} : function getModuleExports() {
|
|
3773
|
-
return module$2;
|
|
3774
|
-
};
|
|
3775
|
-
__webpack_require__.d(getter, "a", getter);
|
|
3776
|
-
return getter;
|
|
3777
|
-
};
|
|
3778
|
-
__webpack_require__.o = function(object, property) {
|
|
3779
|
-
return Object.prototype.hasOwnProperty.call(object, property);
|
|
3780
|
-
};
|
|
3781
|
-
__webpack_require__.p = "";
|
|
3782
|
-
return __webpack_require__(__webpack_require__.s = 1);
|
|
3783
|
-
}([(function(module$3, exports$2) {
|
|
3784
|
-
module$3.exports = __WEBPACK_EXTERNAL_MODULE_0__;
|
|
3785
|
-
}), (function(module$4, exports$3, __webpack_require__) {
|
|
3786
|
-
"use strict";
|
|
3787
|
-
var LayoutConstants = __webpack_require__(0).layoutBase.LayoutConstants;
|
|
3788
|
-
var FDLayoutConstants = __webpack_require__(0).layoutBase.FDLayoutConstants;
|
|
3789
|
-
var CoSEConstants = __webpack_require__(0).CoSEConstants;
|
|
3790
|
-
var CoSELayout = __webpack_require__(0).CoSELayout;
|
|
3791
|
-
var CoSENode = __webpack_require__(0).CoSENode;
|
|
3792
|
-
var PointD = __webpack_require__(0).layoutBase.PointD;
|
|
3793
|
-
var DimensionD = __webpack_require__(0).layoutBase.DimensionD;
|
|
3794
|
-
var defaults = {
|
|
3795
|
-
ready: function ready() {},
|
|
3796
|
-
stop: function stop() {},
|
|
3797
|
-
quality: "default",
|
|
3798
|
-
nodeDimensionsIncludeLabels: false,
|
|
3799
|
-
refresh: 30,
|
|
3800
|
-
fit: true,
|
|
3801
|
-
padding: 10,
|
|
3802
|
-
randomize: true,
|
|
3803
|
-
nodeRepulsion: 4500,
|
|
3804
|
-
idealEdgeLength: 50,
|
|
3805
|
-
edgeElasticity: .45,
|
|
3806
|
-
nestingFactor: .1,
|
|
3807
|
-
gravity: .25,
|
|
3808
|
-
numIter: 2500,
|
|
3809
|
-
tile: true,
|
|
3810
|
-
animate: "end",
|
|
3811
|
-
animationDuration: 500,
|
|
3812
|
-
tilingPaddingVertical: 10,
|
|
3813
|
-
tilingPaddingHorizontal: 10,
|
|
3814
|
-
gravityRangeCompound: 1.5,
|
|
3815
|
-
gravityCompound: 1,
|
|
3816
|
-
gravityRange: 3.8,
|
|
3817
|
-
initialEnergyOnIncremental: .5
|
|
3818
|
-
};
|
|
3819
|
-
function extend(defaults, options) {
|
|
3820
|
-
var obj = {};
|
|
3821
|
-
for (var i in defaults) obj[i] = defaults[i];
|
|
3822
|
-
for (var i in options) obj[i] = options[i];
|
|
3823
|
-
return obj;
|
|
3824
|
-
}
|
|
3825
|
-
function _CoSELayout(_options) {
|
|
3826
|
-
this.options = extend(defaults, _options);
|
|
3827
|
-
getUserOptions(this.options);
|
|
3828
|
-
}
|
|
3829
|
-
var getUserOptions = function getUserOptions(options) {
|
|
3830
|
-
if (options.nodeRepulsion != null) CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion;
|
|
3831
|
-
if (options.idealEdgeLength != null) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength;
|
|
3832
|
-
if (options.edgeElasticity != null) CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity;
|
|
3833
|
-
if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor;
|
|
3834
|
-
if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity;
|
|
3835
|
-
if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter;
|
|
3836
|
-
if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange;
|
|
3837
|
-
if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound;
|
|
3838
|
-
if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound;
|
|
3839
|
-
if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental;
|
|
3840
|
-
if (options.quality == "draft") LayoutConstants.QUALITY = 0;
|
|
3841
|
-
else if (options.quality == "proof") LayoutConstants.QUALITY = 2;
|
|
3842
|
-
else LayoutConstants.QUALITY = 1;
|
|
3843
|
-
CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels;
|
|
3844
|
-
CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize;
|
|
3845
|
-
CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate;
|
|
3846
|
-
CoSEConstants.TILE = options.tile;
|
|
3847
|
-
CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === "function" ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical;
|
|
3848
|
-
CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === "function" ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal;
|
|
3849
|
-
};
|
|
3850
|
-
_CoSELayout.prototype.run = function() {
|
|
3851
|
-
var ready;
|
|
3852
|
-
var frameId;
|
|
3853
|
-
var options = this.options;
|
|
3854
|
-
this.idToLNode = {};
|
|
3855
|
-
var layout = this.layout = new CoSELayout();
|
|
3856
|
-
var self = this;
|
|
3857
|
-
self.stopped = false;
|
|
3858
|
-
this.cy = this.options.cy;
|
|
3859
|
-
this.cy.trigger({
|
|
3860
|
-
type: "layoutstart",
|
|
3861
|
-
layout: this
|
|
3862
|
-
});
|
|
3863
|
-
var gm = layout.newGraphManager();
|
|
3864
|
-
this.gm = gm;
|
|
3865
|
-
var nodes = this.options.eles.nodes();
|
|
3866
|
-
var edges = this.options.eles.edges();
|
|
3867
|
-
this.root = gm.addRoot();
|
|
3868
|
-
this.processChildrenList(this.root, this.getTopMostNodes(nodes), layout);
|
|
3869
|
-
for (var i = 0; i < edges.length; i++) {
|
|
3870
|
-
var edge = edges[i];
|
|
3871
|
-
var sourceNode = this.idToLNode[edge.data("source")];
|
|
3872
|
-
var targetNode = this.idToLNode[edge.data("target")];
|
|
3873
|
-
if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) {
|
|
3874
|
-
var e1 = gm.add(layout.newEdge(), sourceNode, targetNode);
|
|
3875
|
-
e1.id = edge.id();
|
|
3876
|
-
}
|
|
3877
|
-
}
|
|
3878
|
-
var getPositions = function getPositions(ele, i) {
|
|
3879
|
-
if (typeof ele === "number") ele = i;
|
|
3880
|
-
var theId = ele.data("id");
|
|
3881
|
-
var lNode = self.idToLNode[theId];
|
|
3882
|
-
return {
|
|
3883
|
-
x: lNode.getRect().getCenterX(),
|
|
3884
|
-
y: lNode.getRect().getCenterY()
|
|
3885
|
-
};
|
|
3886
|
-
};
|
|
3887
|
-
var iterateAnimated = function iterateAnimated() {
|
|
3888
|
-
var afterReposition = function afterReposition() {
|
|
3889
|
-
if (options.fit) options.cy.fit(options.eles, options.padding);
|
|
3890
|
-
if (!ready) {
|
|
3891
|
-
ready = true;
|
|
3892
|
-
self.cy.one("layoutready", options.ready);
|
|
3893
|
-
self.cy.trigger({
|
|
3894
|
-
type: "layoutready",
|
|
3895
|
-
layout: self
|
|
3896
|
-
});
|
|
3897
|
-
}
|
|
3898
|
-
};
|
|
3899
|
-
var ticksPerFrame = self.options.refresh;
|
|
3900
|
-
var isDone;
|
|
3901
|
-
for (var i = 0; i < ticksPerFrame && !isDone; i++) isDone = self.stopped || self.layout.tick();
|
|
3902
|
-
if (isDone) {
|
|
3903
|
-
if (layout.checkLayoutSuccess() && !layout.isSubLayout) layout.doPostLayout();
|
|
3904
|
-
if (layout.tilingPostLayout) layout.tilingPostLayout();
|
|
3905
|
-
layout.isLayoutFinished = true;
|
|
3906
|
-
self.options.eles.nodes().positions(getPositions);
|
|
3907
|
-
afterReposition();
|
|
3908
|
-
self.cy.one("layoutstop", self.options.stop);
|
|
3909
|
-
self.cy.trigger({
|
|
3910
|
-
type: "layoutstop",
|
|
3911
|
-
layout: self
|
|
3912
|
-
});
|
|
3913
|
-
if (frameId) cancelAnimationFrame(frameId);
|
|
3914
|
-
ready = false;
|
|
3915
|
-
return;
|
|
3916
|
-
}
|
|
3917
|
-
var animationData = self.layout.getPositionsData();
|
|
3918
|
-
options.eles.nodes().positions(function(ele, i) {
|
|
3919
|
-
if (typeof ele === "number") ele = i;
|
|
3920
|
-
if (!ele.isParent()) {
|
|
3921
|
-
var theId = ele.id();
|
|
3922
|
-
var pNode = animationData[theId];
|
|
3923
|
-
var temp = ele;
|
|
3924
|
-
while (pNode == null) {
|
|
3925
|
-
pNode = animationData[temp.data("parent")] || animationData["DummyCompound_" + temp.data("parent")];
|
|
3926
|
-
animationData[theId] = pNode;
|
|
3927
|
-
temp = temp.parent()[0];
|
|
3928
|
-
if (temp == void 0) break;
|
|
3929
|
-
}
|
|
3930
|
-
if (pNode != null) return {
|
|
3931
|
-
x: pNode.x,
|
|
3932
|
-
y: pNode.y
|
|
3933
|
-
};
|
|
3934
|
-
else return {
|
|
3935
|
-
x: ele.position("x"),
|
|
3936
|
-
y: ele.position("y")
|
|
3937
|
-
};
|
|
3938
|
-
}
|
|
3939
|
-
});
|
|
3940
|
-
afterReposition();
|
|
3941
|
-
frameId = requestAnimationFrame(iterateAnimated);
|
|
3942
|
-
};
|
|
3943
|
-
layout.addListener("layoutstarted", function() {
|
|
3944
|
-
if (self.options.animate === "during") frameId = requestAnimationFrame(iterateAnimated);
|
|
3945
|
-
});
|
|
3946
|
-
layout.runLayout();
|
|
3947
|
-
if (this.options.animate !== "during") {
|
|
3948
|
-
self.options.eles.nodes().not(":parent").layoutPositions(self, self.options, getPositions);
|
|
3949
|
-
ready = false;
|
|
3950
|
-
}
|
|
3951
|
-
return this;
|
|
3952
|
-
};
|
|
3953
|
-
_CoSELayout.prototype.getTopMostNodes = function(nodes) {
|
|
3954
|
-
var nodesMap = {};
|
|
3955
|
-
for (var i = 0; i < nodes.length; i++) nodesMap[nodes[i].id()] = true;
|
|
3956
|
-
return nodes.filter(function(ele, i) {
|
|
3957
|
-
if (typeof ele === "number") ele = i;
|
|
3958
|
-
var parent = ele.parent()[0];
|
|
3959
|
-
while (parent != null) {
|
|
3960
|
-
if (nodesMap[parent.id()]) return false;
|
|
3961
|
-
parent = parent.parent()[0];
|
|
3962
|
-
}
|
|
3963
|
-
return true;
|
|
3964
|
-
});
|
|
3965
|
-
};
|
|
3966
|
-
_CoSELayout.prototype.processChildrenList = function(parent, children, layout) {
|
|
3967
|
-
var size = children.length;
|
|
3968
|
-
for (var i = 0; i < size; i++) {
|
|
3969
|
-
var theChild = children[i];
|
|
3970
|
-
var children_of_children = theChild.children();
|
|
3971
|
-
var theNode;
|
|
3972
|
-
var dimensions = theChild.layoutDimensions({ nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels });
|
|
3973
|
-
if (theChild.outerWidth() != null && theChild.outerHeight() != null) theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position("x") - dimensions.w / 2, theChild.position("y") - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));
|
|
3974
|
-
else theNode = parent.add(new CoSENode(this.graphManager));
|
|
3975
|
-
theNode.id = theChild.data("id");
|
|
3976
|
-
theNode.paddingLeft = parseInt(theChild.css("padding"));
|
|
3977
|
-
theNode.paddingTop = parseInt(theChild.css("padding"));
|
|
3978
|
-
theNode.paddingRight = parseInt(theChild.css("padding"));
|
|
3979
|
-
theNode.paddingBottom = parseInt(theChild.css("padding"));
|
|
3980
|
-
if (this.options.nodeDimensionsIncludeLabels) {
|
|
3981
|
-
if (theChild.isParent()) {
|
|
3982
|
-
var labelWidth = theChild.boundingBox({
|
|
3983
|
-
includeLabels: true,
|
|
3984
|
-
includeNodes: false
|
|
3985
|
-
}).w;
|
|
3986
|
-
var labelHeight = theChild.boundingBox({
|
|
3987
|
-
includeLabels: true,
|
|
3988
|
-
includeNodes: false
|
|
3989
|
-
}).h;
|
|
3990
|
-
var labelPos = theChild.css("text-halign");
|
|
3991
|
-
theNode.labelWidth = labelWidth;
|
|
3992
|
-
theNode.labelHeight = labelHeight;
|
|
3993
|
-
theNode.labelPos = labelPos;
|
|
3994
|
-
}
|
|
3995
|
-
}
|
|
3996
|
-
this.idToLNode[theChild.data("id")] = theNode;
|
|
3997
|
-
if (isNaN(theNode.rect.x)) theNode.rect.x = 0;
|
|
3998
|
-
if (isNaN(theNode.rect.y)) theNode.rect.y = 0;
|
|
3999
|
-
if (children_of_children != null && children_of_children.length > 0) {
|
|
4000
|
-
var theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode);
|
|
4001
|
-
this.processChildrenList(theNewGraph, children_of_children, layout);
|
|
4002
|
-
}
|
|
4003
|
-
}
|
|
4004
|
-
};
|
|
4005
|
-
/**
|
|
4006
|
-
* @brief : called on continuous layouts to stop them before they finish
|
|
4007
|
-
*/
|
|
4008
|
-
_CoSELayout.prototype.stop = function() {
|
|
4009
|
-
this.stopped = true;
|
|
4010
|
-
return this;
|
|
4011
|
-
};
|
|
4012
|
-
var register = function register(cytoscape) {
|
|
4013
|
-
cytoscape("layout", "cose-bilkent", _CoSELayout);
|
|
4014
|
-
};
|
|
4015
|
-
if (typeof cytoscape !== "undefined") register(cytoscape);
|
|
4016
|
-
module$4.exports = register;
|
|
4017
|
-
})]);
|
|
4018
|
-
});
|
|
4019
|
-
})))(), 1);
|
|
4020
|
-
cytoscape$1.use(import_cytoscape_cose_bilkent.default);
|
|
4021
|
-
function addNodes(nodes, cy) {
|
|
4022
|
-
nodes.forEach((node) => {
|
|
4023
|
-
const nodeData = {
|
|
4024
|
-
id: node.id,
|
|
4025
|
-
labelText: node.label,
|
|
4026
|
-
height: node.height,
|
|
4027
|
-
width: node.width,
|
|
4028
|
-
padding: node.padding ?? 0
|
|
4029
|
-
};
|
|
4030
|
-
Object.keys(node).forEach((key) => {
|
|
4031
|
-
if (![
|
|
4032
|
-
"id",
|
|
4033
|
-
"label",
|
|
4034
|
-
"height",
|
|
4035
|
-
"width",
|
|
4036
|
-
"padding",
|
|
4037
|
-
"x",
|
|
4038
|
-
"y"
|
|
4039
|
-
].includes(key)) nodeData[key] = node[key];
|
|
4040
|
-
});
|
|
4041
|
-
cy.add({
|
|
4042
|
-
group: "nodes",
|
|
4043
|
-
data: nodeData,
|
|
4044
|
-
position: {
|
|
4045
|
-
x: node.x ?? 0,
|
|
4046
|
-
y: node.y ?? 0
|
|
4047
|
-
}
|
|
4048
|
-
});
|
|
4049
|
-
});
|
|
4050
|
-
}
|
|
4051
|
-
__name$1(addNodes, "addNodes");
|
|
4052
|
-
function addEdges(edges, cy) {
|
|
4053
|
-
edges.forEach((edge) => {
|
|
4054
|
-
const edgeData = {
|
|
4055
|
-
id: edge.id,
|
|
4056
|
-
source: edge.start,
|
|
4057
|
-
target: edge.end
|
|
4058
|
-
};
|
|
4059
|
-
Object.keys(edge).forEach((key) => {
|
|
4060
|
-
if (![
|
|
4061
|
-
"id",
|
|
4062
|
-
"start",
|
|
4063
|
-
"end"
|
|
4064
|
-
].includes(key)) edgeData[key] = edge[key];
|
|
4065
|
-
});
|
|
4066
|
-
cy.add({
|
|
4067
|
-
group: "edges",
|
|
4068
|
-
data: edgeData
|
|
4069
|
-
});
|
|
4070
|
-
});
|
|
4071
|
-
}
|
|
4072
|
-
__name$1(addEdges, "addEdges");
|
|
4073
|
-
function createCytoscapeInstance(data) {
|
|
4074
|
-
return new Promise((resolve) => {
|
|
4075
|
-
const renderEl = select_default("body").append("div").attr("id", "cy").attr("style", "display:none");
|
|
4076
|
-
const cy = cytoscape$1({
|
|
4077
|
-
container: document.getElementById("cy"),
|
|
4078
|
-
style: [{
|
|
4079
|
-
selector: "edge",
|
|
4080
|
-
style: { "curve-style": "bezier" }
|
|
4081
|
-
}]
|
|
4082
|
-
});
|
|
4083
|
-
renderEl.remove();
|
|
4084
|
-
addNodes(data.nodes, cy);
|
|
4085
|
-
addEdges(data.edges, cy);
|
|
4086
|
-
cy.nodes().forEach(function(n) {
|
|
4087
|
-
n.layoutDimensions = () => {
|
|
4088
|
-
const nodeData = n.data();
|
|
4089
|
-
return {
|
|
4090
|
-
w: nodeData.width,
|
|
4091
|
-
h: nodeData.height
|
|
4092
|
-
};
|
|
4093
|
-
};
|
|
4094
|
-
});
|
|
4095
|
-
cy.layout({
|
|
4096
|
-
name: "cose-bilkent",
|
|
4097
|
-
quality: "proof",
|
|
4098
|
-
styleEnabled: false,
|
|
4099
|
-
animate: false
|
|
4100
|
-
}).run();
|
|
4101
|
-
cy.ready((e) => {
|
|
4102
|
-
log.info("Cytoscape ready", e);
|
|
4103
|
-
resolve(cy);
|
|
4104
|
-
});
|
|
4105
|
-
});
|
|
4106
|
-
}
|
|
4107
|
-
__name$1(createCytoscapeInstance, "createCytoscapeInstance");
|
|
4108
|
-
function extractPositionedNodes(cy) {
|
|
4109
|
-
return cy.nodes().map((node) => {
|
|
4110
|
-
const data = node.data();
|
|
4111
|
-
const position = node.position();
|
|
4112
|
-
const positionedNode = {
|
|
4113
|
-
id: data.id,
|
|
4114
|
-
x: position.x,
|
|
4115
|
-
y: position.y
|
|
4116
|
-
};
|
|
4117
|
-
Object.keys(data).forEach((key) => {
|
|
4118
|
-
if (key !== "id") positionedNode[key] = data[key];
|
|
4119
|
-
});
|
|
4120
|
-
return positionedNode;
|
|
4121
|
-
});
|
|
4122
|
-
}
|
|
4123
|
-
__name$1(extractPositionedNodes, "extractPositionedNodes");
|
|
4124
|
-
function extractPositionedEdges(cy) {
|
|
4125
|
-
return cy.edges().map((edge) => {
|
|
4126
|
-
const data = edge.data();
|
|
4127
|
-
const rscratch = edge._private.rscratch;
|
|
4128
|
-
const positionedEdge = {
|
|
4129
|
-
id: data.id,
|
|
4130
|
-
source: data.source,
|
|
4131
|
-
target: data.target,
|
|
4132
|
-
startX: rscratch.startX,
|
|
4133
|
-
startY: rscratch.startY,
|
|
4134
|
-
midX: rscratch.midX,
|
|
4135
|
-
midY: rscratch.midY,
|
|
4136
|
-
endX: rscratch.endX,
|
|
4137
|
-
endY: rscratch.endY
|
|
4138
|
-
};
|
|
4139
|
-
Object.keys(data).forEach((key) => {
|
|
4140
|
-
if (![
|
|
4141
|
-
"id",
|
|
4142
|
-
"source",
|
|
4143
|
-
"target"
|
|
4144
|
-
].includes(key)) positionedEdge[key] = data[key];
|
|
4145
|
-
});
|
|
4146
|
-
return positionedEdge;
|
|
4147
|
-
});
|
|
4148
|
-
}
|
|
4149
|
-
__name$1(extractPositionedEdges, "extractPositionedEdges");
|
|
4150
|
-
async function executeCoseBilkentLayout(data, _config) {
|
|
4151
|
-
log.debug("Starting cose-bilkent layout algorithm");
|
|
4152
|
-
try {
|
|
4153
|
-
validateLayoutData(data);
|
|
4154
|
-
const cy = await createCytoscapeInstance(data);
|
|
4155
|
-
const positionedNodes = extractPositionedNodes(cy);
|
|
4156
|
-
const positionedEdges = extractPositionedEdges(cy);
|
|
4157
|
-
log.debug(`Layout completed: ${positionedNodes.length} nodes, ${positionedEdges.length} edges`);
|
|
4158
|
-
return {
|
|
4159
|
-
nodes: positionedNodes,
|
|
4160
|
-
edges: positionedEdges
|
|
4161
|
-
};
|
|
4162
|
-
} catch (error) {
|
|
4163
|
-
log.error("Error in cose-bilkent layout algorithm:", error);
|
|
4164
|
-
throw error;
|
|
4165
|
-
}
|
|
4166
|
-
}
|
|
4167
|
-
__name$1(executeCoseBilkentLayout, "executeCoseBilkentLayout");
|
|
4168
|
-
function validateLayoutData(data) {
|
|
4169
|
-
if (!data) throw new Error("Layout data is required");
|
|
4170
|
-
if (!data.config) throw new Error("Configuration is required in layout data");
|
|
4171
|
-
if (!data.rootNode) throw new Error("Root node is required");
|
|
4172
|
-
if (!data.nodes || !Array.isArray(data.nodes)) throw new Error("No nodes found in layout data");
|
|
4173
|
-
if (!Array.isArray(data.edges)) throw new Error("Edges array is required in layout data");
|
|
4174
|
-
return true;
|
|
4175
|
-
}
|
|
4176
|
-
__name$1(validateLayoutData, "validateLayoutData");
|
|
4177
|
-
var render2 = /* @__PURE__ */ __name$1(async (data4Layout, svg, { insertCluster, insertEdge, insertEdgeLabel, insertMarkers, insertNode, log: log2, positionEdgeLabel }, { algorithm: _algorithm }) => {
|
|
4178
|
-
const nodeDb = {};
|
|
4179
|
-
const clusterDb = {};
|
|
4180
|
-
const element = svg.select("g");
|
|
4181
|
-
insertMarkers(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);
|
|
4182
|
-
const subGraphsEl = element.insert("g").attr("class", "subgraphs");
|
|
4183
|
-
const edgePaths = element.insert("g").attr("class", "edgePaths");
|
|
4184
|
-
const edgeLabels = element.insert("g").attr("class", "edgeLabels");
|
|
4185
|
-
const nodes = element.insert("g").attr("class", "nodes");
|
|
4186
|
-
log2.debug("Inserting nodes into DOM for dimension calculation");
|
|
4187
|
-
await Promise.all(data4Layout.nodes.map(async (node) => {
|
|
4188
|
-
if (node.isGroup) {
|
|
4189
|
-
const clusterNode = { ...node };
|
|
4190
|
-
clusterDb[node.id] = clusterNode;
|
|
4191
|
-
nodeDb[node.id] = clusterNode;
|
|
4192
|
-
await insertCluster(subGraphsEl, node);
|
|
4193
|
-
} else {
|
|
4194
|
-
const nodeWithPosition = { ...node };
|
|
4195
|
-
nodeDb[node.id] = nodeWithPosition;
|
|
4196
|
-
const nodeEl = await insertNode(nodes, node, {
|
|
4197
|
-
config: data4Layout.config,
|
|
4198
|
-
dir: data4Layout.direction || "TB"
|
|
4199
|
-
});
|
|
4200
|
-
const boundingBox = nodeEl.node().getBBox();
|
|
4201
|
-
nodeWithPosition.width = boundingBox.width;
|
|
4202
|
-
nodeWithPosition.height = boundingBox.height;
|
|
4203
|
-
nodeWithPosition.domId = nodeEl;
|
|
4204
|
-
log2.debug(`Node ${node.id} dimensions: ${boundingBox.width}x${boundingBox.height}`);
|
|
4205
|
-
}
|
|
4206
|
-
}));
|
|
4207
|
-
log2.debug("Running cose-bilkent layout algorithm");
|
|
4208
|
-
const layoutResult = await executeCoseBilkentLayout({
|
|
4209
|
-
...data4Layout,
|
|
4210
|
-
nodes: data4Layout.nodes.map((node) => {
|
|
4211
|
-
const nodeWithDimensions = nodeDb[node.id];
|
|
4212
|
-
return {
|
|
4213
|
-
...node,
|
|
4214
|
-
width: nodeWithDimensions.width,
|
|
4215
|
-
height: nodeWithDimensions.height
|
|
4216
|
-
};
|
|
4217
|
-
})
|
|
4218
|
-
}, data4Layout.config);
|
|
4219
|
-
log2.debug("Positioning nodes based on layout results");
|
|
4220
|
-
layoutResult.nodes.forEach((positionedNode) => {
|
|
4221
|
-
const node = nodeDb[positionedNode.id];
|
|
4222
|
-
if (node?.domId) {
|
|
4223
|
-
node.domId.attr("transform", `translate(${positionedNode.x}, ${positionedNode.y})`);
|
|
4224
|
-
node.x = positionedNode.x;
|
|
4225
|
-
node.y = positionedNode.y;
|
|
4226
|
-
log2.debug(`Positioned node ${node.id} at center (${positionedNode.x}, ${positionedNode.y})`);
|
|
4227
|
-
}
|
|
4228
|
-
});
|
|
4229
|
-
layoutResult.edges.forEach((positionedEdge) => {
|
|
4230
|
-
const edge = data4Layout.edges.find((e) => e.id === positionedEdge.id);
|
|
4231
|
-
if (edge) edge.points = [
|
|
4232
|
-
{
|
|
4233
|
-
x: positionedEdge.startX,
|
|
4234
|
-
y: positionedEdge.startY
|
|
4235
|
-
},
|
|
4236
|
-
{
|
|
4237
|
-
x: positionedEdge.midX,
|
|
4238
|
-
y: positionedEdge.midY
|
|
4239
|
-
},
|
|
4240
|
-
{
|
|
4241
|
-
x: positionedEdge.endX,
|
|
4242
|
-
y: positionedEdge.endY
|
|
4243
|
-
}
|
|
4244
|
-
];
|
|
4245
|
-
});
|
|
4246
|
-
log2.debug("Inserting and positioning edges");
|
|
4247
|
-
await Promise.all(data4Layout.edges.map(async (edge) => {
|
|
4248
|
-
await insertEdgeLabel(edgeLabels, edge);
|
|
4249
|
-
const startNode = nodeDb[edge.start ?? ""];
|
|
4250
|
-
const endNode = nodeDb[edge.end ?? ""];
|
|
4251
|
-
if (startNode && endNode) {
|
|
4252
|
-
const positionedEdge = layoutResult.edges.find((e) => e.id === edge.id);
|
|
4253
|
-
if (positionedEdge) {
|
|
4254
|
-
log2.debug("APA01 positionedEdge", positionedEdge);
|
|
4255
|
-
const edgeWithPath = { ...edge };
|
|
4256
|
-
positionEdgeLabel(edgeWithPath, insertEdge(edgePaths, edgeWithPath, clusterDb, data4Layout.type, startNode, endNode, data4Layout.diagramId));
|
|
4257
|
-
} else {
|
|
4258
|
-
const edgeWithPath = {
|
|
4259
|
-
...edge,
|
|
4260
|
-
points: [{
|
|
4261
|
-
x: startNode.x || 0,
|
|
4262
|
-
y: startNode.y || 0
|
|
4263
|
-
}, {
|
|
4264
|
-
x: endNode.x || 0,
|
|
4265
|
-
y: endNode.y || 0
|
|
4266
|
-
}]
|
|
4267
|
-
};
|
|
4268
|
-
positionEdgeLabel(edgeWithPath, insertEdge(edgePaths, edgeWithPath, clusterDb, data4Layout.type, startNode, endNode, data4Layout.diagramId));
|
|
4269
|
-
}
|
|
4270
|
-
}
|
|
4271
|
-
}));
|
|
4272
|
-
log2.debug("Cose-bilkent rendering completed");
|
|
4273
|
-
}, "render");
|
|
4274
|
-
//#endregion
|
|
4275
|
-
export { render2 as render };
|