@jackuait/blok 0.9.0 → 0.10.0-beta.10
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/codemod/migrate-editorjs-to-blok.js +50 -2
- package/codemod/test.js +39 -6
- package/dist/blok.mjs +3 -3
- package/dist/chunks/_basePickBy-DISiGhsr.mjs +410 -0
- package/dist/chunks/_baseUniq-gAuHRtRF.mjs +1045 -0
- package/dist/chunks/_getTag-Aj56Wgor.mjs +26 -0
- package/dist/chunks/arc-D-pL2Ftf.mjs +80 -0
- package/dist/chunks/architecture-YZFGNWBL-CuqTb_ae.mjs +3 -0
- package/dist/chunks/architectureDiagram-Q4EWVU46-DS7mqjL2.mjs +4066 -0
- package/dist/chunks/array-BsrkCVSZ.mjs +6 -0
- package/dist/chunks/blockDiagram-DXYQGD6D-BTtcn4NG.mjs +3259 -0
- package/dist/chunks/{blok-RJ3hyzDH.mjs → blok-Bg3-zpSu.mjs} +2192 -2156
- package/dist/chunks/c-C6JXJf5K.mjs +5 -0
- package/dist/chunks/c4Diagram-AHTNJAMY-Y4Dcwcoo.mjs +2956 -0
- package/dist/chunks/ccount-C9Y7nqDe.mjs +10 -0
- package/dist/chunks/channel-Cln-eWE0.mjs +5 -0
- package/dist/chunks/chunk-2KRD3SAO-DkM7qh-k.mjs +20 -0
- package/dist/chunks/chunk-336JU56O-B17AtzlK.mjs +49 -0
- package/dist/chunks/chunk-426QAEUC-D6UAVUog.mjs +13 -0
- package/dist/chunks/chunk-4BX2VUAB-CgIkjF7Z.mjs +19 -0
- package/dist/chunks/chunk-4TB4RGXK-BUP4eON3.mjs +3250 -0
- package/dist/chunks/chunk-55IACEB6-zZ-IgaSt.mjs +8 -0
- package/dist/chunks/chunk-5FUZZQ4R-DsZnJYxM.mjs +3786 -0
- package/dist/chunks/chunk-5PVQY5BW-CORl9dnu.mjs +1692 -0
- package/dist/chunks/chunk-67CJDMHE-m0UKdcSH.mjs +20 -0
- package/dist/chunks/chunk-7N4EOEYR-DKNajFZd.mjs +29 -0
- package/dist/chunks/chunk-AA7GKIK3-BeLhNzKa.mjs +24 -0
- package/dist/chunks/chunk-BSJP7CBP-CJExmx8a.mjs +83 -0
- package/dist/chunks/chunk-CIAEETIT-CTikoJ19.mjs +20 -0
- package/dist/chunks/chunk-D6kmoKXy.mjs +20 -0
- package/dist/chunks/chunk-EDXVE4YY-DjInnnwb.mjs +26 -0
- package/dist/chunks/chunk-ENJZ2VHE-CIl5FRDA.mjs +566 -0
- package/dist/chunks/chunk-FMBD7UC4-DjV0W7UE.mjs +5 -0
- package/dist/chunks/chunk-FOC6F5B3-LmHCCWYY.mjs +20 -0
- package/dist/chunks/chunk-ICPOFSXX-BHZIN46A.mjs +3290 -0
- package/dist/chunks/chunk-K5T4RW27-BPZ6fFnW.mjs +16370 -0
- package/dist/chunks/chunk-KGLVRYIC-S1OQdW76.mjs +20 -0
- package/dist/chunks/chunk-LIHQZDEY-CjtyJlI6.mjs +55 -0
- package/dist/chunks/chunk-ORNJ4GCN-CdO0hAge.mjs +25 -0
- package/dist/chunks/chunk-OYMX7WX6-ApX8eV4o.mjs +2038 -0
- package/dist/chunks/chunk-QZHKN3VN-BGFuA6-k.mjs +12 -0
- package/dist/chunks/chunk-U2HBQHQK-B88ZUOTL.mjs +1875 -0
- package/dist/chunks/chunk-X2U36JSP-1VS5TyCr.mjs +68 -0
- package/dist/chunks/chunk-XPW4576I-BMupdrvo.mjs +1146 -0
- package/dist/chunks/chunk-YZCP3GAM-BQ7eEsm2.mjs +60 -0
- package/dist/chunks/chunk-ZZ45TVLE-D1xks9zd.mjs +33 -0
- package/dist/chunks/classDiagram-6PBFFD2Q-C59BZJxp.mjs +30 -0
- package/dist/chunks/classDiagram-v2-HSJHXN6E-7a0qeMsE.mjs +30 -0
- package/dist/chunks/clone-Ckjt1LtE.mjs +8 -0
- package/dist/chunks/{constants-A3iVmQL8.mjs → constants-D7zjGD5W.mjs} +529 -530
- package/dist/chunks/core-Bm6DWt7D.mjs +4501 -0
- package/dist/chunks/cose-bilkent-S5V4N54A-Bpcs2jA_.mjs +2246 -0
- package/dist/chunks/cpp-BdjvAny0.mjs +16 -0
- package/dist/chunks/csharp-YHxeHpeH.mjs +3 -0
- package/dist/chunks/css-DdLevFaX.mjs +3 -0
- package/dist/chunks/cytoscape.esm-BvD8wo00.mjs +18108 -0
- package/dist/chunks/dagre-CGNbYTKq.mjs +1536 -0
- package/dist/chunks/dagre-KV5264BT-DUD9ikgN.mjs +298 -0
- package/dist/chunks/dart-DrPWqfcC.mjs +3 -0
- package/dist/chunks/default-qigT1Xpq.mjs +4 -0
- package/dist/chunks/defaultLocale-ChuSeAxU.mjs +201 -0
- package/dist/chunks/diagram-5BDNPKRD-CZGfTYEe.mjs +112 -0
- package/dist/chunks/diagram-G4DWMVQ6-CuS0-h95.mjs +546 -0
- package/dist/chunks/diagram-MMDJMWI5-C-AEApYz.mjs +234 -0
- package/dist/chunks/diagram-TYMM5635-CiwAJVMq.mjs +144 -0
- package/dist/chunks/dist-Ctq-pyfb.mjs +59 -0
- package/dist/chunks/dockerfile-C68ALcaN.mjs +3 -0
- package/dist/chunks/engine-javascript-CJpnSvzf.mjs +2373 -0
- package/dist/chunks/erDiagram-SMLLAGMA-DeH5yck2.mjs +1712 -0
- package/dist/chunks/flowDiagram-DWJPFMVM-Cr6dwmQ5.mjs +4175 -0
- package/dist/chunks/ganttDiagram-T4ZO3ILL-K-divBg_.mjs +3083 -0
- package/dist/chunks/gitGraph-7Q5UKJZL-Dl-vQzrq.mjs +3 -0
- package/dist/chunks/gitGraphDiagram-UUTBAWPF-UytPZv72.mjs +792 -0
- package/dist/chunks/go-Fm5N96DN.mjs +3 -0
- package/dist/chunks/graphlib-Cye9EPNq.mjs +223 -0
- package/dist/chunks/graphql-BSnqmqgO.mjs +11 -0
- package/dist/chunks/html-BLNeZvnp.mjs +10 -0
- package/dist/chunks/{i18next-Ch0gVA3V.mjs → i18next-CXx5niYF.mjs} +1 -1
- package/dist/chunks/{i18next-loader-dH3UPF7S.mjs → i18next-loader-CwsYu0n6.mjs} +2 -2
- package/dist/chunks/info-OMHHGYJF-BOejJvJR.mjs +3 -0
- package/dist/chunks/infoDiagram-42DDH7IO-DuYnDbF3.mjs +29 -0
- package/dist/chunks/init-C6T-mugb.mjs +15 -0
- package/dist/chunks/ishikawaDiagram-UXIWVN3A-CHc59dLn.mjs +719 -0
- package/dist/chunks/java-83DWBpzu.mjs +5 -0
- package/dist/chunks/javascript-CBgeF1Xx.mjs +3 -0
- package/dist/chunks/journeyDiagram-VCZTEJTY-CD25C4_n.mjs +885 -0
- package/dist/chunks/json-BI17y-1H.mjs +3 -0
- package/dist/chunks/kanban-definition-6JOO6SKY-CTCT6N_p.mjs +980 -0
- package/dist/chunks/katex-CmTPfM0f.mjs +22026 -0
- package/dist/chunks/kotlin-DjnvsrfO.mjs +3 -0
- package/dist/chunks/latex-24n3TcOR.mjs +5 -0
- package/dist/chunks/{lightweight-i18n-1rbaxIZW.mjs → lightweight-i18n-Cvv8CWh4.mjs} +69 -2
- package/dist/chunks/line-Dct5pMmw.mjs +34 -0
- package/dist/chunks/linear-BRCpMvtr.mjs +289 -0
- package/dist/chunks/lua-DV0fuZWx.mjs +5 -0
- package/dist/chunks/markdown-BqQYT45f.mjs +3 -0
- package/dist/chunks/mdast-util-math-BlK2Zu-1.mjs +151 -0
- package/dist/chunks/mermaid-parser.core-CA3DKkuk.mjs +57 -0
- package/dist/chunks/mermaid-vF0cEnZ0.mjs +3 -0
- package/dist/chunks/mermaid.core-CA8nc1sZ.mjs +989 -0
- package/dist/{messages-DaOnbI6d.mjs → chunks/messages-8IHf7ZP3.mjs} +68 -1
- package/dist/chunks/{messages-C9aKfCro.mjs → messages-A_MkXDlG.mjs} +68 -1
- package/dist/{messages-BLEVLZve.mjs → chunks/messages-B0vPBsWq.mjs} +68 -1
- package/dist/chunks/{messages-C0hQPZmh2.mjs → messages-B2N4fUi72.mjs} +68 -1
- package/dist/{messages-HNAtlVax.mjs → chunks/messages-B4UMuyjT.mjs} +73 -6
- package/dist/chunks/{messages-DRUkmDVZ.mjs → messages-B9kmbUWV.mjs} +68 -1
- package/dist/{messages-Dbsx9m5q2.mjs → chunks/messages-BA8Iv99Y2.mjs} +68 -1
- package/dist/chunks/{messages-Da-SOTFW.mjs → messages-BAsb5CgZ.mjs} +68 -1
- package/dist/{messages-D1P0QGLz2.mjs → chunks/messages-BDZA10kl2.mjs} +68 -1
- package/dist/chunks/{messages-ComLU2T32.mjs → messages-BE6lHKwf.mjs} +68 -1
- package/dist/chunks/{messages-gaxTO-87.mjs → messages-BQYvBqm2.mjs} +68 -1
- package/dist/chunks/{messages-BwKs-9DF.mjs → messages-BSghd0ez.mjs} +68 -1
- package/dist/{messages-BPRR6TMf.mjs → chunks/messages-BUVhHx0q2.mjs} +68 -1
- package/dist/{messages-B7jZvo-m.mjs → chunks/messages-BVjoM7P0.mjs} +68 -1
- package/dist/{messages-C-4z1-Dh.mjs → chunks/messages-BXM80fdr2.mjs} +68 -1
- package/dist/{messages-Bm0nvUuj2.mjs → chunks/messages-BYlSMRkd.mjs} +68 -1
- package/dist/chunks/{messages-DLPrj3Dh.mjs → messages-BYxLFj7y.mjs} +68 -1
- package/dist/{messages-BRcLIBCd2.mjs → chunks/messages-BeFqtIrc2.mjs} +68 -1
- package/dist/{messages-zHkURG6V2.mjs → chunks/messages-Bfnq1xv4.mjs} +68 -1
- package/dist/chunks/{messages-Z762-GLL.mjs → messages-BhzzNkN-.mjs} +68 -1
- package/dist/chunks/{messages-COJ0CbVV2.mjs → messages-BjadX8jR2.mjs} +68 -1
- package/dist/{messages-B2ZwD4n9.mjs → chunks/messages-Bp8qin1R.mjs} +68 -1
- package/dist/chunks/{messages-DdEWnfAR.mjs → messages-Bphq_Bt3.mjs} +71 -4
- package/dist/{messages-CUDbNJG5.mjs → chunks/messages-Bxvi1ebN.mjs} +68 -1
- package/dist/chunks/{messages-B0t2L3bi.mjs → messages-C0HvoMPb.mjs} +68 -1
- package/dist/{messages-D6qfWi6H2.mjs → chunks/messages-C3aX3q0H.mjs} +68 -1
- package/dist/chunks/{messages-v9NkxRcL.mjs → messages-C6Mpiacw.mjs} +68 -1
- package/dist/chunks/{messages-CqZ9vFyx.mjs → messages-C7VGpihw.mjs} +69 -2
- package/dist/chunks/{messages-Yj4Q1_uX2.mjs → messages-CKBhDGI3.mjs} +69 -2
- package/dist/chunks/{messages-DxtnwNPo.mjs → messages-COO5xmcA.mjs} +68 -1
- package/dist/{messages-CZTcgUzd.mjs → chunks/messages-CSJ_zb3a2.mjs} +68 -1
- package/dist/{messages-A8aZS7d_2.mjs → chunks/messages-CSL-6xfb2.mjs} +68 -1
- package/dist/{messages-CxruHsuD2.mjs → chunks/messages-CVdpweyf2.mjs} +69 -2
- package/dist/{messages-D2Mf9z2D.mjs → chunks/messages-Cdf0W9H02.mjs} +68 -1
- package/dist/chunks/{messages-DAbCNake2.mjs → messages-Ck81cQkn2.mjs} +68 -1
- package/dist/chunks/{messages-Dyku8Cut.mjs → messages-Cmf6NhSC.mjs} +68 -1
- package/dist/chunks/{messages-DQ6bFum9.mjs → messages-Cs81Z_Bh.mjs} +68 -1
- package/dist/chunks/{messages-cegxHurd2.mjs → messages-Cu-Wevxs2.mjs} +68 -1
- package/dist/{messages-D2HwpoUE.mjs → chunks/messages-D3zojZ94.mjs} +69 -2
- package/dist/{messages-BfTBVFd9.mjs → chunks/messages-D55HRx5O2.mjs} +68 -1
- package/dist/chunks/{messages-Dl03jd4b2.mjs → messages-D9N2MvQx2.mjs} +68 -1
- package/dist/{messages-DfXh-i9o.mjs → chunks/messages-DG-4DPmP.mjs} +68 -1
- package/dist/chunks/{messages-DmJf9laH2.mjs → messages-DGL1ySqb2.mjs} +68 -1
- package/dist/chunks/{messages-DfU4yvkL.mjs → messages-DJoNVjqP.mjs} +68 -1
- package/dist/{messages-Bsd4ruEY.mjs → chunks/messages-DMVXnAYj.mjs} +70 -3
- package/dist/{messages-3WhPEFd7.mjs → chunks/messages-DOuS1Qge.mjs} +68 -1
- package/dist/chunks/{messages-B1kDfIN82.mjs → messages-DWu1r4gc2.mjs} +68 -1
- package/dist/{messages-Dtih3ffa2.mjs → chunks/messages-DlLXpgWM2.mjs} +68 -1
- package/dist/chunks/{messages-DKNULJpc.mjs → messages-DlonA3wa.mjs} +69 -2
- package/dist/{messages-C5pBfa_W.mjs → chunks/messages-Dr0Ekmbz.mjs} +81 -14
- package/dist/{messages-Du62vI49.mjs → chunks/messages-DzTk8bJ5.mjs} +68 -1
- package/dist/{messages-DNAp0U4l2.mjs → chunks/messages-FWfsxpBz.mjs} +68 -1
- package/dist/{messages-B2YeJw8s2.mjs → chunks/messages-G416eyjY.mjs} +68 -1
- package/dist/chunks/{messages-C5-aaU2b.mjs → messages-Je5YvxiY.mjs} +68 -1
- package/dist/chunks/{messages-DHHZUf_H2.mjs → messages-JyvWu4rf2.mjs} +68 -1
- package/dist/chunks/{messages-D_6vPBzT.mjs → messages-KdawW5Na.mjs} +68 -1
- package/dist/chunks/{messages-DnuhgHG0.mjs → messages-MxpWO1db.mjs} +68 -1
- package/dist/{messages-DT4rHATO2.mjs → chunks/messages-NEqrrYvE2.mjs} +68 -1
- package/dist/chunks/{messages-DeSSxLsh.mjs → messages-RInp1ytX.mjs} +68 -1
- package/dist/{messages-DfEPVRdJ.mjs → chunks/messages-TRUuyiFB.mjs} +68 -1
- package/dist/chunks/{messages--eH7tTJV2.mjs → messages-aZcy0JQq2.mjs} +68 -1
- package/dist/{messages-O6z1uabG.mjs → chunks/messages-iS34FHFB.mjs} +68 -1
- package/dist/{messages-BE0DjTEC.mjs → chunks/messages-ihCjSFJI2.mjs} +68 -1
- package/dist/chunks/{messages-_5Pg5fKy2.mjs → messages-jfVpL9c-2.mjs} +68 -1
- package/dist/chunks/{messages-CaRSYuhO.mjs → messages-p1mbe__S.mjs} +68 -1
- package/dist/chunks/{messages-BGssMBWM2.mjs → messages-rCd0Rrw6.mjs} +69 -2
- package/dist/{messages-COgvIEeW.mjs → chunks/messages-xuqyb6Ff2.mjs} +68 -1
- package/dist/chunks/micromark-extension-math-BbkUb36G.mjs +169 -0
- package/dist/chunks/micromark-factory-space-y4SDWQKm.mjs +36 -0
- package/dist/chunks/mindmap-definition-QFDTVHPH-hNnyBkEP.mjs +1013 -0
- package/dist/chunks/{notifier-Butv4Dvo.mjs → notifier-CuvTt9pe.mjs} +1 -1
- package/dist/chunks/objectWithoutProperties-D0XxKB4n.mjs +23 -0
- package/dist/chunks/one-light-DmNO_Y4X.mjs +4 -0
- package/dist/chunks/ordinal-B-kolV-i.mjs +65 -0
- package/dist/chunks/packet-4T2RLAQJ-B5ZMgwzZ.mjs +3 -0
- package/dist/chunks/path-rIMjg_tH.mjs +85 -0
- package/dist/chunks/php-DmXKyPwJ.mjs +18 -0
- package/dist/chunks/pie-ZZUOXDRM-B9l6y0XJ.mjs +3 -0
- package/dist/chunks/pieDiagram-DEJITSTG-Gw-fsc6U.mjs +179 -0
- package/dist/chunks/python-DfwfY9t5.mjs +3 -0
- package/dist/chunks/quadrantDiagram-34T5L4WZ-CQ5fGYI5.mjs +1960 -0
- package/dist/chunks/r-BD2D7qEW.mjs +5 -0
- package/dist/chunks/radar-PYXPWWZC-D5kYmUaB.mjs +3 -0
- package/dist/chunks/requirementDiagram-MS252O5E-DjWKB42c.mjs +2224 -0
- package/dist/chunks/rough.esm-cmMIcj7N.mjs +1353 -0
- package/dist/chunks/ruby-DdOo03Kg.mjs +33 -0
- package/dist/chunks/rust-DEDueB5R.mjs +3 -0
- package/dist/chunks/sankeyDiagram-XADWPNL6-BIN2evSB.mjs +909 -0
- package/dist/chunks/scala-CsjqvxE4.mjs +3 -0
- package/dist/chunks/sequenceDiagram-FGHM5R23-CQz2lMoS.mjs +4181 -0
- package/dist/chunks/shellscript-Bh5zEpnQ.mjs +3 -0
- package/dist/chunks/sql-D9CrOi1i.mjs +3 -0
- package/dist/chunks/src-DVJl6f6s.mjs +2149 -0
- package/dist/chunks/stateDiagram-FHFEXIEX-BIBFsF65.mjs +218 -0
- package/dist/chunks/stateDiagram-v2-QKLJ7IA2-BZUmAVw7.mjs +28 -0
- package/dist/chunks/swift-Dpyt0s2c.mjs +3 -0
- package/dist/chunks/timeline-definition-GMOUNBTQ-CzvQ7Lav.mjs +1084 -0
- package/dist/chunks/{tools-nT6zA9QL.mjs → tools-CrRhWn8L.mjs} +3043 -1303
- package/dist/chunks/treeView-SZITEDCU-BNtnNxpI.mjs +3 -0
- package/dist/chunks/treemap-W4RFUUIX-DYENULz2.mjs +3 -0
- package/dist/chunks/typescript-DO5cd4m8.mjs +5 -0
- package/dist/chunks/vennDiagram-DHZGUBPP-B0DmLQqe.mjs +1876 -0
- package/dist/chunks/vitesse-dark-CcorSKT2.mjs +4 -0
- package/dist/chunks/wardley-RL74JXVD-ByNHVBTb.mjs +3 -0
- package/dist/chunks/wardleyDiagram-NUSXRM2D-CzoKesUw.mjs +594 -0
- package/dist/chunks/xml-g8kXXALs.mjs +5 -0
- package/dist/chunks/xychartDiagram-5P7HB3ND-CixwR8r2.mjs +2017 -0
- package/dist/chunks/yaml-CrNNZyLb.mjs +3 -0
- package/dist/cli.mjs +1 -1
- package/dist/full.mjs +14 -14
- package/dist/locales.mjs +135 -68
- package/dist/markdown.mjs +3954 -0
- package/dist/{messages-D_CUdqU12.mjs → messages-5jvKxQNu2.mjs} +68 -1
- package/dist/{chunks/messages-CFfpHyTU.mjs → messages-7QD-X6XT2.mjs} +68 -1
- package/dist/{messages-CdX1odk_2.mjs → messages-96iaAUds2.mjs} +68 -1
- package/dist/{messages-C8ca-jEa.mjs → messages-B19o-Teb.mjs} +69 -2
- package/dist/{messages-I03yFhup.mjs → messages-B1ZUQagA.mjs} +68 -1
- package/dist/{chunks/messages-BSw88lIo2.mjs → messages-B7ieAJBd2.mjs} +68 -1
- package/dist/{messages-sNSXCkeB.mjs → messages-BECMxmfX.mjs} +68 -1
- package/dist/{messages-DgGZsxBB.mjs → messages-BIHc0KHY.mjs} +68 -1
- package/dist/{messages-yZj20Fvf.mjs → messages-BIoeoik5.mjs} +68 -1
- package/dist/{chunks/messages-D8JFu42v.mjs → messages-BJeGJksD.mjs} +68 -1
- package/dist/{messages-BSLErTnW2.mjs → messages-BRZX964b2.mjs} +68 -1
- package/dist/{chunks/messages-BW8arxf72.mjs → messages-BTQPpoM42.mjs} +68 -1
- package/dist/{messages-C52AiyVV.mjs → messages-BYNcD6uR.mjs} +68 -1
- package/dist/{messages-BxJv0qBn2.mjs → messages-BYmmMDrN2.mjs} +68 -1
- package/dist/{messages-CoCy2JIP.mjs → messages-BbYq1pk-.mjs} +68 -1
- package/dist/{messages-Cnz_SHE32.mjs → messages-BiUGXvYr2.mjs} +68 -1
- package/dist/{chunks/messages-Dl6SVT1Z.mjs → messages-BiiongNz2.mjs} +68 -1
- package/dist/{chunks/messages-C912bk5I.mjs → messages-Bm0Feca1.mjs} +69 -2
- package/dist/{chunks/messages-CTuCPqpJ.mjs → messages-BmAn22OX.mjs} +68 -1
- package/dist/{messages-DdiPWkV8.mjs → messages-Bq3F2Tp_.mjs} +68 -1
- package/dist/{chunks/messages-DJxXZi1D2.mjs → messages-BsycN_JI2.mjs} +68 -1
- package/dist/{chunks/messages-OdEuBvgf.mjs → messages-BwHs4cm1.mjs} +70 -3
- package/dist/{chunks/messages-C4ZAJzBh.mjs → messages-CJTy6JZt.mjs} +68 -1
- package/dist/{chunks/messages-D2OZ9dbO.mjs → messages-CR_L_UtK.mjs} +68 -1
- package/dist/{messages-ypuLZyw12.mjs → messages-CSUHBs4c2.mjs} +68 -1
- package/dist/{chunks/messages-BkES2MDr2.mjs → messages-CWIXvnDf2.mjs} +68 -1
- package/dist/{messages-Cpeko5kB.mjs → messages-CcF4y-E4.mjs} +68 -1
- package/dist/{messages-BmnC-s4X.mjs → messages-Ce6KVEbT.mjs} +68 -1
- package/dist/{messages-DTNfG4ZH.mjs → messages-Ci0KqX-J.mjs} +71 -4
- package/dist/{chunks/messages-CGh56r-H2.mjs → messages-CjbnogEC.mjs} +68 -1
- package/dist/{messages-B3jq5Hpa.mjs → messages-CmB406HW.mjs} +69 -2
- package/dist/{chunks/messages-BsZz1Hnn2.mjs → messages-CqXtJTpU.mjs} +68 -1
- package/dist/{messages-DL000FUf2.mjs → messages-D0aw5_0k2.mjs} +68 -1
- package/dist/{chunks/messages-Df2RYuup2.mjs → messages-D8FQWulF2.mjs} +68 -1
- package/dist/{messages-CxHn7cs2.mjs → messages-DBiVgUs2.mjs} +68 -1
- package/dist/{chunks/messages-Dsapm4K9.mjs → messages-DIJlIqlQ2.mjs} +68 -1
- package/dist/{chunks/messages-517llQmh.mjs → messages-DLX_iBDJ.mjs} +68 -1
- package/dist/{chunks/messages-BG8Nq35G.mjs → messages-DLlc9QPw.mjs} +68 -1
- package/dist/{messages-cokJPuUp2.mjs → messages-DMr62KiO2.mjs} +68 -1
- package/dist/{chunks/messages-Dkp-Eyu02.mjs → messages-DPA-mMWC2.mjs} +68 -1
- package/dist/{chunks/messages-7uCUVFea.mjs → messages-DTh9a8mR.mjs} +68 -1
- package/dist/{messages-VBFioL2M.mjs → messages-DY4IqlhY.mjs} +68 -1
- package/dist/{chunks/messages-C4X0xP3h.mjs → messages-DYTTu0O12.mjs} +68 -1
- package/dist/{messages-diSPQ2Da2.mjs → messages-DbySKTKt2.mjs} +69 -2
- package/dist/{chunks/messages-BGE43_6M.mjs → messages-Ddnj2iTG2.mjs} +68 -1
- package/dist/{chunks/messages-BtUqUzMG2.mjs → messages-DkLU_rWm.mjs} +68 -1
- package/dist/{messages-DSX2HaeN2.mjs → messages-Dl3Sv6Rq2.mjs} +68 -1
- package/dist/{chunks/messages-BDvpl6Ox.mjs → messages-Dl5Y2-Ia.mjs} +81 -14
- package/dist/{chunks/messages-C7plNvNE2.mjs → messages-DnG0ef8t2.mjs} +69 -2
- package/dist/{chunks/messages-qS8tM3Dk.mjs → messages-DnGJD4TL.mjs} +68 -1
- package/dist/{messages-Ct468oX22.mjs → messages-Dnp9N6RU2.mjs} +68 -1
- package/dist/{chunks/messages-CjIA--kO.mjs → messages-Dvn35ksS.mjs} +68 -1
- package/dist/{messages-BRxNqmJ8.mjs → messages-Dw__BcTj.mjs} +68 -1
- package/dist/{chunks/messages-0zhE8A9X.mjs → messages-Dy-Y_nEI.mjs} +68 -1
- package/dist/{chunks/messages-CCH4OETw2.mjs → messages-E_ZuzGDt.mjs} +68 -1
- package/dist/{chunks/messages-DZzoT0T_.mjs → messages-F2xRoY1w.mjs} +68 -1
- package/dist/{chunks/messages-zGdqNZbH.mjs → messages-Smt4GBbj.mjs} +73 -6
- package/dist/{messages-CvIxHHp92.mjs → messages-aMXpHt5X2.mjs} +68 -1
- package/dist/{messages-C8JVJUp12.mjs → messages-aWZH50vu2.mjs} +68 -1
- package/dist/{messages-Phrqr7a6.mjs → messages-dv19AkyJ.mjs} +68 -1
- package/dist/{chunks/messages-DngM4hda2.mjs → messages-hWwSRF-2.mjs} +68 -1
- package/dist/{messages-DpGo_Da5.mjs → messages-j7o5rT9s.mjs} +68 -1
- package/dist/{messages-C6WJx6Z0.mjs → messages-nUVjeh7K.mjs} +68 -1
- package/dist/{messages-CbVilNPE.mjs → messages-nlhESX9t.mjs} +68 -1
- package/dist/{messages-C6o0FVy02.mjs → messages-rk-A1Wa42.mjs} +69 -2
- package/dist/{messages-D4mCIODv.mjs → messages-xh2eOLvs.mjs} +68 -1
- package/dist/{chunks/messages-Ct9UUOrl2.mjs → messages-ynAe7ewZ.mjs} +68 -1
- package/dist/react.mjs +26 -25
- package/dist/tools.mjs +3 -3
- package/dist/vendor.LICENSE.txt +5404 -80
- package/package.json +16 -1
- package/src/components/blocks.ts +26 -1
- package/src/components/constants/data-attributes.ts +2 -2
- package/src/components/i18n/locales/am/messages.json +68 -1
- package/src/components/i18n/locales/ar/messages.json +68 -1
- package/src/components/i18n/locales/az/messages.json +68 -1
- package/src/components/i18n/locales/bg/messages.json +68 -1
- package/src/components/i18n/locales/bn/messages.json +68 -1
- package/src/components/i18n/locales/bs/messages.json +69 -2
- package/src/components/i18n/locales/cs/messages.json +70 -3
- package/src/components/i18n/locales/da/messages.json +71 -4
- package/src/components/i18n/locales/de/messages.json +73 -6
- package/src/components/i18n/locales/dv/messages.json +68 -1
- package/src/components/i18n/locales/el/messages.json +68 -1
- package/src/components/i18n/locales/en/messages.json +68 -1
- package/src/components/i18n/locales/es/messages.json +68 -1
- package/src/components/i18n/locales/et/messages.json +69 -2
- package/src/components/i18n/locales/fa/messages.json +68 -1
- package/src/components/i18n/locales/fi/messages.json +68 -1
- package/src/components/i18n/locales/fil/messages.json +81 -14
- package/src/components/i18n/locales/fr/messages.json +68 -1
- package/src/components/i18n/locales/gu/messages.json +68 -1
- package/src/components/i18n/locales/he/messages.json +68 -1
- package/src/components/i18n/locales/hi/messages.json +68 -1
- package/src/components/i18n/locales/hr/messages.json +69 -2
- package/src/components/i18n/locales/hu/messages.json +68 -1
- package/src/components/i18n/locales/hy/messages.json +68 -1
- package/src/components/i18n/locales/id/messages.json +68 -1
- package/src/components/i18n/locales/it/messages.json +68 -1
- package/src/components/i18n/locales/ja/messages.json +68 -1
- package/src/components/i18n/locales/ka/messages.json +68 -1
- package/src/components/i18n/locales/km/messages.json +68 -1
- package/src/components/i18n/locales/kn/messages.json +68 -1
- package/src/components/i18n/locales/ko/messages.json +68 -1
- package/src/components/i18n/locales/ku/messages.json +68 -1
- package/src/components/i18n/locales/lo/messages.json +68 -1
- package/src/components/i18n/locales/lt/messages.json +68 -1
- package/src/components/i18n/locales/lv/messages.json +68 -1
- package/src/components/i18n/locales/mk/messages.json +68 -1
- package/src/components/i18n/locales/ml/messages.json +68 -1
- package/src/components/i18n/locales/mn/messages.json +68 -1
- package/src/components/i18n/locales/mr/messages.json +68 -1
- package/src/components/i18n/locales/ms/messages.json +69 -2
- package/src/components/i18n/locales/my/messages.json +68 -1
- package/src/components/i18n/locales/ne/messages.json +68 -1
- package/src/components/i18n/locales/nl/messages.json +68 -1
- package/src/components/i18n/locales/no/messages.json +68 -1
- package/src/components/i18n/locales/pa/messages.json +68 -1
- package/src/components/i18n/locales/pl/messages.json +68 -1
- package/src/components/i18n/locales/ps/messages.json +68 -1
- package/src/components/i18n/locales/pt/messages.json +68 -1
- package/src/components/i18n/locales/ro/messages.json +68 -1
- package/src/components/i18n/locales/ru/messages.json +68 -1
- package/src/components/i18n/locales/sd/messages.json +68 -1
- package/src/components/i18n/locales/si/messages.json +68 -1
- package/src/components/i18n/locales/sk/messages.json +69 -2
- package/src/components/i18n/locales/sl/messages.json +69 -2
- package/src/components/i18n/locales/sq/messages.json +68 -1
- package/src/components/i18n/locales/sr/messages.json +68 -1
- package/src/components/i18n/locales/sv/messages.json +68 -1
- package/src/components/i18n/locales/sw/messages.json +68 -1
- package/src/components/i18n/locales/ta/messages.json +68 -1
- package/src/components/i18n/locales/te/messages.json +68 -1
- package/src/components/i18n/locales/th/messages.json +68 -1
- package/src/components/i18n/locales/tr/messages.json +68 -1
- package/src/components/i18n/locales/ug/messages.json +68 -1
- package/src/components/i18n/locales/uk/messages.json +68 -1
- package/src/components/i18n/locales/ur/messages.json +68 -1
- package/src/components/i18n/locales/vi/messages.json +68 -1
- package/src/components/i18n/locales/yi/messages.json +68 -1
- package/src/components/i18n/locales/zh/messages.json +68 -1
- package/src/components/icons/index.ts +78 -0
- package/src/components/inline-tools/inline-tool-code.ts +399 -0
- package/src/components/modules/api/blocks.ts +17 -0
- package/src/components/modules/api/ui.ts +0 -3
- package/src/components/modules/blockEvents/composers/blockSelectionKeys.ts +20 -3
- package/src/components/modules/paste/handlers/html-handler.ts +13 -10
- package/src/components/modules/paste/handlers/index.ts +1 -0
- package/src/components/modules/paste/index.ts +6 -0
- package/src/components/modules/renderer.ts +17 -0
- package/src/components/modules/ui.ts +1 -13
- package/src/components/ui/toolbox.ts +9 -0
- package/src/components/utils/caret/boundaries.ts +15 -4
- package/src/components/utils/popover/popover-desktop.ts +11 -0
- package/src/markdown/index.ts +63 -0
- package/src/markdown/markdown-handler.ts +110 -0
- package/src/markdown/mdast-to-blocks.ts +418 -0
- package/src/markdown/phrasing-to-html.ts +60 -0
- package/src/markdown/types.ts +42 -0
- package/src/stories/EditorModes.stories.ts +0 -60
- package/src/styles/main.css +57 -2
- package/src/tools/callout/constants.ts +2 -1
- package/src/tools/callout/emoji-picker/index.ts +41 -2
- package/src/tools/callout/index.ts +25 -0
- package/src/tools/code/code-keyboard.ts +142 -0
- package/src/tools/code/constants.ts +96 -0
- package/src/tools/code/dom-builder.ts +181 -0
- package/src/tools/code/highlight-applier.ts +229 -0
- package/src/tools/code/index.ts +462 -0
- package/src/tools/code/katex-loader.ts +50 -0
- package/src/tools/code/language-picker.ts +241 -0
- package/src/tools/code/mermaid-loader.ts +45 -0
- package/src/tools/code/shiki-loader.ts +135 -0
- package/src/tools/divider/index.ts +11 -2
- package/src/tools/header/index.ts +2 -0
- package/src/tools/index.ts +6 -0
- package/src/tools/list/block-operations.ts +3 -1
- package/src/tools/list/depth-validator.ts +4 -7
- package/src/tools/list/dom-builder.ts +5 -3
- package/src/tools/list/index.ts +21 -3
- package/src/tools/list/list-helpers.ts +9 -2
- package/src/tools/list/list-keyboard.ts +56 -14
- package/src/tools/list/list-lifecycle.ts +3 -1
- package/src/tools/list/marker-calculator.ts +37 -0
- package/src/tools/list/ordered-marker-manager.ts +4 -2
- package/src/tools/list/style-config.ts +3 -0
- package/src/tools/paragraph/index.ts +1 -0
- package/src/tools/quote/index.ts +229 -0
- package/src/tools/table/core/table-commands.ts +16 -0
- package/src/tools/table/core/table-controller.ts +29 -0
- package/src/tools/table/core/table-events.ts +17 -0
- package/src/tools/table/index.ts +220 -14
- package/src/tools/table/table-cell-blocks.ts +51 -6
- package/src/tools/table/table-cell-clipboard.ts +7 -2
- package/src/tools/table/table-cell-placement-picker.ts +133 -0
- package/src/tools/table/table-cell-selection.ts +174 -19
- package/src/tools/table/table-core.ts +321 -113
- package/src/tools/table/table-map.ts +279 -0
- package/src/tools/table/table-model.ts +901 -1
- package/src/tools/table/table-operations.ts +87 -44
- package/src/tools/table/table-resize.ts +19 -17
- package/src/tools/table/table-row-col-drag.ts +24 -10
- package/src/tools/table/types.ts +24 -2
- package/src/tools/toggle/index.ts +1 -0
- package/types/configs/blok-config.d.ts +7 -0
- package/types/data-attributes.d.ts +0 -1
- package/types/markdown.d.ts +2 -0
- package/types/tools/callout.d.ts +16 -0
- package/types/tools/code.d.ts +13 -0
- package/types/tools/quote.d.ts +13 -0
- package/types/tools/tool-settings.d.ts +7 -0
- package/types/tools-entry.d.ts +7 -0
- /package/dist/chunks/{am-CHDDMHkd.mjs → am-BxlkYGsI.mjs} +0 -0
- /package/dist/chunks/{ar-DoqfNqut.mjs → ar-9vlpr9V8.mjs} +0 -0
- /package/dist/chunks/{az-C34P9iEa.mjs → az-ON63W_FP.mjs} +0 -0
- /package/dist/chunks/{bg-jroXLY8Y.mjs → bg-CtXWTP5w.mjs} +0 -0
- /package/dist/chunks/{bn-BRI-WqxY.mjs → bn-BERvhXM4.mjs} +0 -0
- /package/dist/chunks/{bs-CCGUpNHu.mjs → bs-CBg8NVPG.mjs} +0 -0
- /package/dist/chunks/{cs-D5qZOGuc.mjs → cs-DeQddxS7.mjs} +0 -0
- /package/dist/chunks/{da-DrJ7W37K.mjs → da-DyTo-ec_.mjs} +0 -0
- /package/dist/chunks/{de-BW6-kp2c.mjs → de-Cu7545m1.mjs} +0 -0
- /package/dist/chunks/{el-C-Vc_Otu.mjs → el-oiubLRBq.mjs} +0 -0
- /package/dist/chunks/{es-B6fI5K9i.mjs → es-DZUC6Klv.mjs} +0 -0
- /package/dist/chunks/{et-BhVlZ-Yz.mjs → et-CDeklAog.mjs} +0 -0
- /package/dist/chunks/{fa-D55Ijdqa.mjs → fa-Cafp7_Li.mjs} +0 -0
- /package/dist/chunks/{fi-jNLjhKUQ.mjs → fi-BD_V_aVW.mjs} +0 -0
- /package/dist/chunks/{fil-DYd0T5aX.mjs → fil-Crsfbtx4.mjs} +0 -0
- /package/dist/chunks/{fr-yxy5xWw_.mjs → fr-BGGc04Zv.mjs} +0 -0
- /package/dist/chunks/{gu-CcY_LJe7.mjs → gu-Vg_BgCTp.mjs} +0 -0
- /package/dist/chunks/{he-DL9s7wNw.mjs → he-DTY9chlZ.mjs} +0 -0
- /package/dist/chunks/{hi-C8eGXgw5.mjs → hi-DChMXk0x.mjs} +0 -0
- /package/dist/chunks/{hr-DLpybOhU.mjs → hr-BWVgNU8k.mjs} +0 -0
- /package/dist/chunks/{hu-BkT0gT00.mjs → hu-B37awHXA.mjs} +0 -0
- /package/dist/chunks/{hy-CVFDCp2S.mjs → hy-DGC_GDHh.mjs} +0 -0
- /package/dist/chunks/{id-0P4W9Az0.mjs → id-V7cw6La2.mjs} +0 -0
- /package/dist/chunks/{it-mLY6_uoW.mjs → it-DrTGP8Rn.mjs} +0 -0
- /package/dist/chunks/{ja-7RkeRNWG.mjs → ja-DS4pbJEG.mjs} +0 -0
- /package/dist/chunks/{ka-C7Lx-Qsh.mjs → ka-BueyosRh.mjs} +0 -0
- /package/dist/chunks/{km-Q8udaraH.mjs → km-B0K891yW.mjs} +0 -0
- /package/dist/chunks/{kn-BiETM-iq.mjs → kn-BQ__skg8.mjs} +0 -0
- /package/dist/chunks/{ko-tiB80pF1.mjs → ko-BuPxi_7e.mjs} +0 -0
- /package/dist/chunks/{ku-CY-OABkR.mjs → ku-nQjwPRw2.mjs} +0 -0
- /package/dist/chunks/{lo-CTBhEnyk.mjs → lo-K5NVFoq1.mjs} +0 -0
- /package/dist/chunks/{lt-BHKHEtqK.mjs → lt-D3xD6Eb2.mjs} +0 -0
- /package/dist/chunks/{lv-DWxgtfUg.mjs → lv-DH13mzZj.mjs} +0 -0
- /package/dist/chunks/{mk-BjookGdx.mjs → mk-Bb48BcDA.mjs} +0 -0
- /package/dist/chunks/{ml-L-NnZcp9.mjs → ml-BHPEj1kD.mjs} +0 -0
- /package/dist/chunks/{mn-OMWi7Hl_.mjs → mn-BNGzpdI6.mjs} +0 -0
- /package/dist/chunks/{mr-B6JPzITo.mjs → mr-D5PgU-cH.mjs} +0 -0
- /package/dist/chunks/{ms-CG3S-sPB.mjs → ms-DPkxqKz5.mjs} +0 -0
- /package/dist/chunks/{my-BLAmGfhT.mjs → my-DZGcyfxy.mjs} +0 -0
- /package/dist/chunks/{native-BPcABu9z.mjs → native-D0cfLXsM.mjs} +0 -0
- /package/dist/chunks/{ne-D1JHLfYw.mjs → ne-BU_Wh4Wv.mjs} +0 -0
- /package/dist/chunks/{nl-Ca7Q8FnY.mjs → nl-DtAPk1mK.mjs} +0 -0
- /package/dist/chunks/{no-Coxcohcz.mjs → no-CdW3n3BY.mjs} +0 -0
- /package/dist/chunks/{objectSpread2-CyPxu8-u.mjs → objectSpread2-CWwMYL_U.mjs} +0 -0
- /package/dist/chunks/{pa-CCaXqpaI.mjs → pa-BacCHz87.mjs} +0 -0
- /package/dist/chunks/{pl-Cl_fAZ84.mjs → pl-8zBJbmhZ.mjs} +0 -0
- /package/dist/chunks/{ps-WD5qGAWy.mjs → ps-c6nGXD-W.mjs} +0 -0
- /package/dist/chunks/{pt-C4zvLfvq.mjs → pt-B5yR8Qhr.mjs} +0 -0
- /package/dist/chunks/{ro-DbefHcmM.mjs → ro-Nscylsqb.mjs} +0 -0
- /package/dist/chunks/{ru-uU1J14jd.mjs → ru-DxERQkVJ.mjs} +0 -0
- /package/dist/chunks/{sd-DKu368Ip.mjs → sd-5z-QY3q9.mjs} +0 -0
- /package/dist/chunks/{si-BsJCiPkZ.mjs → si-DTL0mzrx.mjs} +0 -0
- /package/dist/chunks/{sk-CD-a3SN6.mjs → sk-DrGczTvY.mjs} +0 -0
- /package/dist/chunks/{sl-CXhrPJe_.mjs → sl-D8nJjig4.mjs} +0 -0
- /package/dist/chunks/{sq-CTctCoFQ.mjs → sq-C74Hm3YL.mjs} +0 -0
- /package/dist/chunks/{sr-BZkhBwXj.mjs → sr-DAwB05Gj.mjs} +0 -0
- /package/dist/chunks/{sv-NmRZb_xi.mjs → sv-BkHBsN4y.mjs} +0 -0
- /package/dist/chunks/{sw-Be5ik3H6.mjs → sw-BBQLTq_z.mjs} +0 -0
- /package/dist/chunks/{ta-DsXh6neL.mjs → ta-DRRzdKky.mjs} +0 -0
- /package/dist/chunks/{te-CwpCbM8M.mjs → te-CedXLsKM.mjs} +0 -0
- /package/dist/chunks/{th-CcZ15OLk.mjs → th-DDOlGA0W.mjs} +0 -0
- /package/dist/chunks/{tr-q3bTgvhW.mjs → tr-ClgvwOlL.mjs} +0 -0
- /package/dist/chunks/{tw-DmW6-pCY.mjs → tw-CqxBf-1Y.mjs} +0 -0
- /package/dist/chunks/{ug-919EhLsL.mjs → ug-bXxwiinM.mjs} +0 -0
- /package/dist/chunks/{uk-aNMEzd0Y.mjs → uk-Dp46o_VT.mjs} +0 -0
- /package/dist/chunks/{ur-BwQI77sh.mjs → ur-MfEEhdFq.mjs} +0 -0
- /package/dist/chunks/{vi-Dxq806-F.mjs → vi-bt-3LPGO.mjs} +0 -0
- /package/dist/chunks/{zh-BcHuy1Ti.mjs → zh-Dgyb5Ly8.mjs} +0 -0
|
@@ -0,0 +1,3259 @@
|
|
|
1
|
+
import { t as e } from "./objectSpread2-CWwMYL_U.mjs";
|
|
2
|
+
import { t } from "./graphlib-Cye9EPNq.mjs";
|
|
3
|
+
import { g as n, h as r, p as i } from "./src-DVJl6f6s.mjs";
|
|
4
|
+
import { D as a, L as o, a as s, b as c, c as l, nt as u, s as d, w as f, y as p } from "./chunk-ICPOFSXX-BHZIN46A.mjs";
|
|
5
|
+
import { t as m } from "./channel-Cln-eWE0.mjs";
|
|
6
|
+
import "./dist-Ctq-pyfb.mjs";
|
|
7
|
+
import { $ as h, C as g, E as _, F as v, I as y, L as b, N as x, O as S, P as C, S as w, T, U as E, V as D, _ as O, b as k, c as ee, h as A, i as j, j as te, k as ne, v as re, w as ie, y as M } from "./chunk-5PVQY5BW-CORl9dnu.mjs";
|
|
8
|
+
import { t as ae } from "./line-Dct5pMmw.mjs";
|
|
9
|
+
import { n as oe } from "./chunk-U2HBQHQK-B88ZUOTL.mjs";
|
|
10
|
+
import { t as se } from "./chunk-FMBD7UC4-DjV0W7UE.mjs";
|
|
11
|
+
import { n as ce, t as N } from "./chunk-BSJP7CBP-CJExmx8a.mjs";
|
|
12
|
+
import { n as le, t as ue } from "./chunk-ZZ45TVLE-D1xks9zd.mjs";
|
|
13
|
+
import { n as de, t as fe } from "./_getTag-Aj56Wgor.mjs";
|
|
14
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_arrayEach.js
|
|
15
|
+
function pe(e, t) {
|
|
16
|
+
for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1;);
|
|
17
|
+
return e;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region node_modules/mermaid/node_modules/lodash-es/keys.js
|
|
21
|
+
function me(e) {
|
|
22
|
+
return T(e) ? re(e) : de(e);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_baseAssign.js
|
|
26
|
+
function he(e, t) {
|
|
27
|
+
return e && M(t, me(t), e);
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_baseAssignIn.js
|
|
31
|
+
function ge(e, t) {
|
|
32
|
+
return e && M(t, O(t), e);
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_arrayFilter.js
|
|
36
|
+
function _e(e, t) {
|
|
37
|
+
for (var n = -1, r = e == null ? 0 : e.length, i = 0, a = []; ++n < r;) {
|
|
38
|
+
var o = e[n];
|
|
39
|
+
t(o, n, e) && (a[i++] = o);
|
|
40
|
+
}
|
|
41
|
+
return a;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region node_modules/mermaid/node_modules/lodash-es/stubArray.js
|
|
45
|
+
function ve() {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_getSymbols.js
|
|
50
|
+
var ye = Object.prototype.propertyIsEnumerable, be = Object.getOwnPropertySymbols, xe = be ? function(e) {
|
|
51
|
+
return e == null ? [] : (e = Object(e), _e(be(e), function(t) {
|
|
52
|
+
return ye.call(e, t);
|
|
53
|
+
}));
|
|
54
|
+
} : ve;
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_copySymbols.js
|
|
57
|
+
function Se(e, t) {
|
|
58
|
+
return M(e, xe(e), t);
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_arrayPush.js
|
|
62
|
+
function Ce(e, t) {
|
|
63
|
+
for (var n = -1, r = t.length, i = e.length; ++n < r;) e[i + n] = t[n];
|
|
64
|
+
return e;
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_getSymbolsIn.js
|
|
68
|
+
var we = Object.getOwnPropertySymbols ? function(e) {
|
|
69
|
+
for (var t = []; e;) Ce(t, xe(e)), e = te(e);
|
|
70
|
+
return t;
|
|
71
|
+
} : ve;
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_copySymbolsIn.js
|
|
74
|
+
function Te(e, t) {
|
|
75
|
+
return M(e, we(e), t);
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_baseGetAllKeys.js
|
|
79
|
+
function Ee(e, t, n) {
|
|
80
|
+
var r = t(e);
|
|
81
|
+
return _(e) ? r : Ce(r, n(e));
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_getAllKeys.js
|
|
85
|
+
function De(e) {
|
|
86
|
+
return Ee(e, me, xe);
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_getAllKeysIn.js
|
|
90
|
+
function Oe(e) {
|
|
91
|
+
return Ee(e, O, we);
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_initCloneArray.js
|
|
95
|
+
var ke = Object.prototype.hasOwnProperty;
|
|
96
|
+
function Ae(e) {
|
|
97
|
+
var t = e.length, n = new e.constructor(t);
|
|
98
|
+
return t && typeof e[0] == "string" && ke.call(e, "index") && (n.index = e.index, n.input = e.input), n;
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_cloneDataView.js
|
|
102
|
+
function je(e, t) {
|
|
103
|
+
var n = t ? v(e.buffer) : e.buffer;
|
|
104
|
+
return new e.constructor(n, e.byteOffset, e.byteLength);
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_cloneRegExp.js
|
|
108
|
+
var Me = /\w*$/;
|
|
109
|
+
function Ne(e) {
|
|
110
|
+
var t = new e.constructor(e.source, Me.exec(e));
|
|
111
|
+
return t.lastIndex = e.lastIndex, t;
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_cloneSymbol.js
|
|
115
|
+
var Pe = E ? E.prototype : void 0, Fe = Pe ? Pe.valueOf : void 0;
|
|
116
|
+
function Ie(e) {
|
|
117
|
+
return Fe ? Object(Fe.call(e)) : {};
|
|
118
|
+
}
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_initCloneByTag.js
|
|
121
|
+
var Le = "[object Boolean]", Re = "[object Date]", ze = "[object Map]", Be = "[object Number]", Ve = "[object RegExp]", He = "[object Set]", Ue = "[object String]", We = "[object Symbol]", Ge = "[object ArrayBuffer]", Ke = "[object DataView]", qe = "[object Float32Array]", Je = "[object Float64Array]", Ye = "[object Int8Array]", Xe = "[object Int16Array]", Ze = "[object Int32Array]", Qe = "[object Uint8Array]", $e = "[object Uint8ClampedArray]", et = "[object Uint16Array]", tt = "[object Uint32Array]";
|
|
122
|
+
function nt(e, t, n) {
|
|
123
|
+
var r = e.constructor;
|
|
124
|
+
switch (t) {
|
|
125
|
+
case Ge: return v(e);
|
|
126
|
+
case Le:
|
|
127
|
+
case Re: return new r(+e);
|
|
128
|
+
case Ke: return je(e, n);
|
|
129
|
+
case qe:
|
|
130
|
+
case Je:
|
|
131
|
+
case Ye:
|
|
132
|
+
case Xe:
|
|
133
|
+
case Ze:
|
|
134
|
+
case Qe:
|
|
135
|
+
case $e:
|
|
136
|
+
case et:
|
|
137
|
+
case tt: return C(e, n);
|
|
138
|
+
case ze: return new r();
|
|
139
|
+
case Be:
|
|
140
|
+
case Ue: return new r(e);
|
|
141
|
+
case Ve: return Ne(e);
|
|
142
|
+
case He: return new r();
|
|
143
|
+
case We: return Ie(e);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region node_modules/mermaid/node_modules/lodash-es/_baseIsMap.js
|
|
148
|
+
var rt = "[object Map]";
|
|
149
|
+
function it(e) {
|
|
150
|
+
return S(e) && fe(e) == rt;
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region node_modules/mermaid/node_modules/lodash-es/isMap.js
|
|
154
|
+
var at = w && w.isMap, ot = at ? g(at) : it, st = "[object Set]";
|
|
155
|
+
function ct(e) {
|
|
156
|
+
return S(e) && fe(e) == st;
|
|
157
|
+
}
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region node_modules/mermaid/node_modules/lodash-es/isSet.js
|
|
160
|
+
var lt = w && w.isSet, ut = lt ? g(lt) : ct, dt = 1, ft = 2, pt = 4, mt = "[object Arguments]", ht = "[object Array]", gt = "[object Boolean]", _t = "[object Date]", vt = "[object Error]", yt = "[object Function]", bt = "[object GeneratorFunction]", xt = "[object Map]", St = "[object Number]", Ct = "[object Object]", wt = "[object RegExp]", Tt = "[object Set]", Et = "[object String]", Dt = "[object Symbol]", Ot = "[object WeakMap]", kt = "[object ArrayBuffer]", At = "[object DataView]", jt = "[object Float32Array]", Mt = "[object Float64Array]", Nt = "[object Int8Array]", Pt = "[object Int16Array]", Ft = "[object Int32Array]", It = "[object Uint8Array]", Lt = "[object Uint8ClampedArray]", Rt = "[object Uint16Array]", zt = "[object Uint32Array]", P = {};
|
|
161
|
+
P[mt] = P[ht] = P[kt] = P[At] = P[gt] = P[_t] = P[jt] = P[Mt] = P[Nt] = P[Pt] = P[Ft] = P[xt] = P[St] = P[Ct] = P[wt] = P[Tt] = P[Et] = P[Dt] = P[It] = P[Lt] = P[Rt] = P[zt] = !0, P[vt] = P[yt] = P[Ot] = !1;
|
|
162
|
+
function F(e, t, n, r, i, a) {
|
|
163
|
+
var o, s = t & dt, c = t & ft, l = t & pt;
|
|
164
|
+
if (n && (o = i ? n(e, r, i, a) : n(e)), o !== void 0) return o;
|
|
165
|
+
if (!D(e)) return e;
|
|
166
|
+
var u = _(e);
|
|
167
|
+
if (u) {
|
|
168
|
+
if (o = Ae(e), !s) return x(e, o);
|
|
169
|
+
} else {
|
|
170
|
+
var d = fe(e), f = d == yt || d == bt;
|
|
171
|
+
if (ie(e)) return y(e, s);
|
|
172
|
+
if (d == Ct || d == mt || f && !i) {
|
|
173
|
+
if (o = c || f ? {} : ne(e), !s) return c ? Te(e, ge(o, e)) : Se(e, he(o, e));
|
|
174
|
+
} else {
|
|
175
|
+
if (!P[d]) return i ? e : {};
|
|
176
|
+
o = nt(e, d, s);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
a || (a = new b());
|
|
180
|
+
var p = a.get(e);
|
|
181
|
+
if (p) return p;
|
|
182
|
+
a.set(e, o), ut(e) ? e.forEach(function(r) {
|
|
183
|
+
o.add(F(r, t, n, r, e, a));
|
|
184
|
+
}) : ot(e) && e.forEach(function(r, i) {
|
|
185
|
+
o.set(i, F(r, t, n, i, e, a));
|
|
186
|
+
});
|
|
187
|
+
var m = u ? void 0 : (l ? c ? Oe : De : c ? O : me)(e);
|
|
188
|
+
return pe(m || e, function(r, i) {
|
|
189
|
+
m && (i = r, r = e[i]), k(o, i, F(r, t, n, i, e, a));
|
|
190
|
+
}), o;
|
|
191
|
+
}
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region node_modules/mermaid/node_modules/lodash-es/clone.js
|
|
194
|
+
var Bt = 4;
|
|
195
|
+
function Vt(e) {
|
|
196
|
+
return F(e, Bt);
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.mjs
|
|
200
|
+
var Ht, I, Ut = (function() {
|
|
201
|
+
var t = /* @__PURE__ */ r(function(e, t, n, r) {
|
|
202
|
+
for (n = n || {}, r = e.length; r--; n[e[r]] = t);
|
|
203
|
+
return n;
|
|
204
|
+
}, "o"), n = [1, 15], i = [1, 7], a = [1, 13], o = [1, 14], s = [1, 19], c = [1, 16], l = [1, 17], u = [1, 18], d = [8, 30], f = [
|
|
205
|
+
8,
|
|
206
|
+
10,
|
|
207
|
+
21,
|
|
208
|
+
28,
|
|
209
|
+
29,
|
|
210
|
+
30,
|
|
211
|
+
31,
|
|
212
|
+
39,
|
|
213
|
+
43,
|
|
214
|
+
46
|
|
215
|
+
], p = [1, 23], m = [1, 24], h = [
|
|
216
|
+
8,
|
|
217
|
+
10,
|
|
218
|
+
15,
|
|
219
|
+
16,
|
|
220
|
+
21,
|
|
221
|
+
28,
|
|
222
|
+
29,
|
|
223
|
+
30,
|
|
224
|
+
31,
|
|
225
|
+
39,
|
|
226
|
+
43,
|
|
227
|
+
46
|
|
228
|
+
], g = [
|
|
229
|
+
8,
|
|
230
|
+
10,
|
|
231
|
+
15,
|
|
232
|
+
16,
|
|
233
|
+
21,
|
|
234
|
+
27,
|
|
235
|
+
28,
|
|
236
|
+
29,
|
|
237
|
+
30,
|
|
238
|
+
31,
|
|
239
|
+
39,
|
|
240
|
+
43,
|
|
241
|
+
46
|
|
242
|
+
], _ = [1, 49], v = {
|
|
243
|
+
trace: /* @__PURE__ */ r(function() {}, "trace"),
|
|
244
|
+
yy: {},
|
|
245
|
+
symbols_: {
|
|
246
|
+
error: 2,
|
|
247
|
+
spaceLines: 3,
|
|
248
|
+
SPACELINE: 4,
|
|
249
|
+
NL: 5,
|
|
250
|
+
separator: 6,
|
|
251
|
+
SPACE: 7,
|
|
252
|
+
EOF: 8,
|
|
253
|
+
start: 9,
|
|
254
|
+
BLOCK_DIAGRAM_KEY: 10,
|
|
255
|
+
document: 11,
|
|
256
|
+
stop: 12,
|
|
257
|
+
statement: 13,
|
|
258
|
+
link: 14,
|
|
259
|
+
LINK: 15,
|
|
260
|
+
START_LINK: 16,
|
|
261
|
+
LINK_LABEL: 17,
|
|
262
|
+
STR: 18,
|
|
263
|
+
nodeStatement: 19,
|
|
264
|
+
columnsStatement: 20,
|
|
265
|
+
SPACE_BLOCK: 21,
|
|
266
|
+
blockStatement: 22,
|
|
267
|
+
classDefStatement: 23,
|
|
268
|
+
cssClassStatement: 24,
|
|
269
|
+
styleStatement: 25,
|
|
270
|
+
node: 26,
|
|
271
|
+
SIZE: 27,
|
|
272
|
+
COLUMNS: 28,
|
|
273
|
+
"id-block": 29,
|
|
274
|
+
end: 30,
|
|
275
|
+
NODE_ID: 31,
|
|
276
|
+
nodeShapeNLabel: 32,
|
|
277
|
+
dirList: 33,
|
|
278
|
+
DIR: 34,
|
|
279
|
+
NODE_DSTART: 35,
|
|
280
|
+
NODE_DEND: 36,
|
|
281
|
+
BLOCK_ARROW_START: 37,
|
|
282
|
+
BLOCK_ARROW_END: 38,
|
|
283
|
+
classDef: 39,
|
|
284
|
+
CLASSDEF_ID: 40,
|
|
285
|
+
CLASSDEF_STYLEOPTS: 41,
|
|
286
|
+
DEFAULT: 42,
|
|
287
|
+
class: 43,
|
|
288
|
+
CLASSENTITY_IDS: 44,
|
|
289
|
+
STYLECLASS: 45,
|
|
290
|
+
style: 46,
|
|
291
|
+
STYLE_ENTITY_IDS: 47,
|
|
292
|
+
STYLE_DEFINITION_DATA: 48,
|
|
293
|
+
$accept: 0,
|
|
294
|
+
$end: 1
|
|
295
|
+
},
|
|
296
|
+
terminals_: {
|
|
297
|
+
2: "error",
|
|
298
|
+
4: "SPACELINE",
|
|
299
|
+
5: "NL",
|
|
300
|
+
7: "SPACE",
|
|
301
|
+
8: "EOF",
|
|
302
|
+
10: "BLOCK_DIAGRAM_KEY",
|
|
303
|
+
15: "LINK",
|
|
304
|
+
16: "START_LINK",
|
|
305
|
+
17: "LINK_LABEL",
|
|
306
|
+
18: "STR",
|
|
307
|
+
21: "SPACE_BLOCK",
|
|
308
|
+
27: "SIZE",
|
|
309
|
+
28: "COLUMNS",
|
|
310
|
+
29: "id-block",
|
|
311
|
+
30: "end",
|
|
312
|
+
31: "NODE_ID",
|
|
313
|
+
34: "DIR",
|
|
314
|
+
35: "NODE_DSTART",
|
|
315
|
+
36: "NODE_DEND",
|
|
316
|
+
37: "BLOCK_ARROW_START",
|
|
317
|
+
38: "BLOCK_ARROW_END",
|
|
318
|
+
39: "classDef",
|
|
319
|
+
40: "CLASSDEF_ID",
|
|
320
|
+
41: "CLASSDEF_STYLEOPTS",
|
|
321
|
+
42: "DEFAULT",
|
|
322
|
+
43: "class",
|
|
323
|
+
44: "CLASSENTITY_IDS",
|
|
324
|
+
45: "STYLECLASS",
|
|
325
|
+
46: "style",
|
|
326
|
+
47: "STYLE_ENTITY_IDS",
|
|
327
|
+
48: "STYLE_DEFINITION_DATA"
|
|
328
|
+
},
|
|
329
|
+
productions_: [
|
|
330
|
+
0,
|
|
331
|
+
[3, 1],
|
|
332
|
+
[3, 2],
|
|
333
|
+
[3, 2],
|
|
334
|
+
[6, 1],
|
|
335
|
+
[6, 1],
|
|
336
|
+
[6, 1],
|
|
337
|
+
[9, 3],
|
|
338
|
+
[12, 1],
|
|
339
|
+
[12, 1],
|
|
340
|
+
[12, 2],
|
|
341
|
+
[12, 2],
|
|
342
|
+
[11, 1],
|
|
343
|
+
[11, 2],
|
|
344
|
+
[14, 1],
|
|
345
|
+
[14, 4],
|
|
346
|
+
[13, 1],
|
|
347
|
+
[13, 1],
|
|
348
|
+
[13, 1],
|
|
349
|
+
[13, 1],
|
|
350
|
+
[13, 1],
|
|
351
|
+
[13, 1],
|
|
352
|
+
[13, 1],
|
|
353
|
+
[19, 3],
|
|
354
|
+
[19, 2],
|
|
355
|
+
[19, 1],
|
|
356
|
+
[20, 1],
|
|
357
|
+
[22, 4],
|
|
358
|
+
[22, 3],
|
|
359
|
+
[26, 1],
|
|
360
|
+
[26, 2],
|
|
361
|
+
[33, 1],
|
|
362
|
+
[33, 2],
|
|
363
|
+
[32, 3],
|
|
364
|
+
[32, 4],
|
|
365
|
+
[23, 3],
|
|
366
|
+
[23, 3],
|
|
367
|
+
[24, 3],
|
|
368
|
+
[25, 3]
|
|
369
|
+
],
|
|
370
|
+
performAction: /* @__PURE__ */ r(function(t, n, r, i, a, o, s) {
|
|
371
|
+
var c = o.length - 1;
|
|
372
|
+
switch (a) {
|
|
373
|
+
case 4:
|
|
374
|
+
i.getLogger().debug("Rule: separator (NL) ");
|
|
375
|
+
break;
|
|
376
|
+
case 5:
|
|
377
|
+
i.getLogger().debug("Rule: separator (Space) ");
|
|
378
|
+
break;
|
|
379
|
+
case 6:
|
|
380
|
+
i.getLogger().debug("Rule: separator (EOF) ");
|
|
381
|
+
break;
|
|
382
|
+
case 7:
|
|
383
|
+
i.getLogger().debug("Rule: hierarchy: ", o[c - 1]), i.setHierarchy(o[c - 1]);
|
|
384
|
+
break;
|
|
385
|
+
case 8:
|
|
386
|
+
i.getLogger().debug("Stop NL ");
|
|
387
|
+
break;
|
|
388
|
+
case 9:
|
|
389
|
+
i.getLogger().debug("Stop EOF ");
|
|
390
|
+
break;
|
|
391
|
+
case 10:
|
|
392
|
+
i.getLogger().debug("Stop NL2 ");
|
|
393
|
+
break;
|
|
394
|
+
case 11:
|
|
395
|
+
i.getLogger().debug("Stop EOF2 ");
|
|
396
|
+
break;
|
|
397
|
+
case 12:
|
|
398
|
+
i.getLogger().debug("Rule: statement: ", o[c]), typeof o[c].length == "number" ? this.$ = o[c] : this.$ = [o[c]];
|
|
399
|
+
break;
|
|
400
|
+
case 13:
|
|
401
|
+
i.getLogger().debug("Rule: statement #2: ", o[c - 1]), this.$ = [o[c - 1]].concat(o[c]);
|
|
402
|
+
break;
|
|
403
|
+
case 14:
|
|
404
|
+
i.getLogger().debug("Rule: link: ", o[c], t), this.$ = {
|
|
405
|
+
edgeTypeStr: o[c],
|
|
406
|
+
label: ""
|
|
407
|
+
};
|
|
408
|
+
break;
|
|
409
|
+
case 15:
|
|
410
|
+
i.getLogger().debug("Rule: LABEL link: ", o[c - 3], o[c - 1], o[c]), this.$ = {
|
|
411
|
+
edgeTypeStr: o[c],
|
|
412
|
+
label: o[c - 1]
|
|
413
|
+
};
|
|
414
|
+
break;
|
|
415
|
+
case 18:
|
|
416
|
+
let n = parseInt(o[c]);
|
|
417
|
+
this.$ = {
|
|
418
|
+
id: i.generateId(),
|
|
419
|
+
type: "space",
|
|
420
|
+
label: "",
|
|
421
|
+
width: n,
|
|
422
|
+
children: []
|
|
423
|
+
};
|
|
424
|
+
break;
|
|
425
|
+
case 23:
|
|
426
|
+
i.getLogger().debug("Rule: (nodeStatement link node) ", o[c - 2], o[c - 1], o[c], " typestr: ", o[c - 1].edgeTypeStr);
|
|
427
|
+
let r = i.edgeStrToEdgeData(o[c - 1].edgeTypeStr);
|
|
428
|
+
this.$ = [
|
|
429
|
+
{
|
|
430
|
+
id: o[c - 2].id,
|
|
431
|
+
label: o[c - 2].label,
|
|
432
|
+
type: o[c - 2].type,
|
|
433
|
+
directions: o[c - 2].directions
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
id: o[c - 2].id + "-" + o[c].id,
|
|
437
|
+
start: o[c - 2].id,
|
|
438
|
+
end: o[c].id,
|
|
439
|
+
label: o[c - 1].label,
|
|
440
|
+
type: "edge",
|
|
441
|
+
directions: o[c].directions,
|
|
442
|
+
arrowTypeEnd: r,
|
|
443
|
+
arrowTypeStart: "arrow_open"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
id: o[c].id,
|
|
447
|
+
label: o[c].label,
|
|
448
|
+
type: i.typeStr2Type(o[c].typeStr),
|
|
449
|
+
directions: o[c].directions
|
|
450
|
+
}
|
|
451
|
+
];
|
|
452
|
+
break;
|
|
453
|
+
case 24:
|
|
454
|
+
i.getLogger().debug("Rule: nodeStatement (abc88 node size) ", o[c - 1], o[c]), this.$ = {
|
|
455
|
+
id: o[c - 1].id,
|
|
456
|
+
label: o[c - 1].label,
|
|
457
|
+
type: i.typeStr2Type(o[c - 1].typeStr),
|
|
458
|
+
directions: o[c - 1].directions,
|
|
459
|
+
widthInColumns: parseInt(o[c], 10)
|
|
460
|
+
};
|
|
461
|
+
break;
|
|
462
|
+
case 25:
|
|
463
|
+
i.getLogger().debug("Rule: nodeStatement (node) ", o[c]), this.$ = {
|
|
464
|
+
id: o[c].id,
|
|
465
|
+
label: o[c].label,
|
|
466
|
+
type: i.typeStr2Type(o[c].typeStr),
|
|
467
|
+
directions: o[c].directions,
|
|
468
|
+
widthInColumns: 1
|
|
469
|
+
};
|
|
470
|
+
break;
|
|
471
|
+
case 26:
|
|
472
|
+
i.getLogger().debug("APA123", this ? this : "na"), i.getLogger().debug("COLUMNS: ", o[c]), this.$ = {
|
|
473
|
+
type: "column-setting",
|
|
474
|
+
columns: o[c] === "auto" ? -1 : parseInt(o[c])
|
|
475
|
+
};
|
|
476
|
+
break;
|
|
477
|
+
case 27:
|
|
478
|
+
i.getLogger().debug("Rule: id-block statement : ", o[c - 2], o[c - 1]), i.generateId(), this.$ = e(e({}, o[c - 2]), {}, {
|
|
479
|
+
type: "composite",
|
|
480
|
+
children: o[c - 1]
|
|
481
|
+
});
|
|
482
|
+
break;
|
|
483
|
+
case 28:
|
|
484
|
+
i.getLogger().debug("Rule: blockStatement : ", o[c - 2], o[c - 1], o[c]), this.$ = {
|
|
485
|
+
id: i.generateId(),
|
|
486
|
+
type: "composite",
|
|
487
|
+
label: "",
|
|
488
|
+
children: o[c - 1]
|
|
489
|
+
};
|
|
490
|
+
break;
|
|
491
|
+
case 29:
|
|
492
|
+
i.getLogger().debug("Rule: node (NODE_ID separator): ", o[c]), this.$ = { id: o[c] };
|
|
493
|
+
break;
|
|
494
|
+
case 30:
|
|
495
|
+
i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", o[c - 1], o[c]), this.$ = {
|
|
496
|
+
id: o[c - 1],
|
|
497
|
+
label: o[c].label,
|
|
498
|
+
typeStr: o[c].typeStr,
|
|
499
|
+
directions: o[c].directions
|
|
500
|
+
};
|
|
501
|
+
break;
|
|
502
|
+
case 31:
|
|
503
|
+
i.getLogger().debug("Rule: dirList: ", o[c]), this.$ = [o[c]];
|
|
504
|
+
break;
|
|
505
|
+
case 32:
|
|
506
|
+
i.getLogger().debug("Rule: dirList: ", o[c - 1], o[c]), this.$ = [o[c - 1]].concat(o[c]);
|
|
507
|
+
break;
|
|
508
|
+
case 33:
|
|
509
|
+
i.getLogger().debug("Rule: nodeShapeNLabel: ", o[c - 2], o[c - 1], o[c]), this.$ = {
|
|
510
|
+
typeStr: o[c - 2] + o[c],
|
|
511
|
+
label: o[c - 1]
|
|
512
|
+
};
|
|
513
|
+
break;
|
|
514
|
+
case 34:
|
|
515
|
+
i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", o[c - 3], o[c - 2], " #3:", o[c - 1], o[c]), this.$ = {
|
|
516
|
+
typeStr: o[c - 3] + o[c],
|
|
517
|
+
label: o[c - 2],
|
|
518
|
+
directions: o[c - 1]
|
|
519
|
+
};
|
|
520
|
+
break;
|
|
521
|
+
case 35:
|
|
522
|
+
case 36:
|
|
523
|
+
this.$ = {
|
|
524
|
+
type: "classDef",
|
|
525
|
+
id: o[c - 1].trim(),
|
|
526
|
+
css: o[c].trim()
|
|
527
|
+
};
|
|
528
|
+
break;
|
|
529
|
+
case 37:
|
|
530
|
+
this.$ = {
|
|
531
|
+
type: "applyClass",
|
|
532
|
+
id: o[c - 1].trim(),
|
|
533
|
+
styleClass: o[c].trim()
|
|
534
|
+
};
|
|
535
|
+
break;
|
|
536
|
+
case 38:
|
|
537
|
+
this.$ = {
|
|
538
|
+
type: "applyStyles",
|
|
539
|
+
id: o[c - 1].trim(),
|
|
540
|
+
stylesStr: o[c].trim()
|
|
541
|
+
};
|
|
542
|
+
break;
|
|
543
|
+
}
|
|
544
|
+
}, "anonymous"),
|
|
545
|
+
table: [
|
|
546
|
+
{
|
|
547
|
+
9: 1,
|
|
548
|
+
10: [1, 2]
|
|
549
|
+
},
|
|
550
|
+
{ 1: [3] },
|
|
551
|
+
{
|
|
552
|
+
10: n,
|
|
553
|
+
11: 3,
|
|
554
|
+
13: 4,
|
|
555
|
+
19: 5,
|
|
556
|
+
20: 6,
|
|
557
|
+
21: i,
|
|
558
|
+
22: 8,
|
|
559
|
+
23: 9,
|
|
560
|
+
24: 10,
|
|
561
|
+
25: 11,
|
|
562
|
+
26: 12,
|
|
563
|
+
28: a,
|
|
564
|
+
29: o,
|
|
565
|
+
31: s,
|
|
566
|
+
39: c,
|
|
567
|
+
43: l,
|
|
568
|
+
46: u
|
|
569
|
+
},
|
|
570
|
+
{ 8: [1, 20] },
|
|
571
|
+
t(d, [2, 12], {
|
|
572
|
+
13: 4,
|
|
573
|
+
19: 5,
|
|
574
|
+
20: 6,
|
|
575
|
+
22: 8,
|
|
576
|
+
23: 9,
|
|
577
|
+
24: 10,
|
|
578
|
+
25: 11,
|
|
579
|
+
26: 12,
|
|
580
|
+
11: 21,
|
|
581
|
+
10: n,
|
|
582
|
+
21: i,
|
|
583
|
+
28: a,
|
|
584
|
+
29: o,
|
|
585
|
+
31: s,
|
|
586
|
+
39: c,
|
|
587
|
+
43: l,
|
|
588
|
+
46: u
|
|
589
|
+
}),
|
|
590
|
+
t(f, [2, 16], {
|
|
591
|
+
14: 22,
|
|
592
|
+
15: p,
|
|
593
|
+
16: m
|
|
594
|
+
}),
|
|
595
|
+
t(f, [2, 17]),
|
|
596
|
+
t(f, [2, 18]),
|
|
597
|
+
t(f, [2, 19]),
|
|
598
|
+
t(f, [2, 20]),
|
|
599
|
+
t(f, [2, 21]),
|
|
600
|
+
t(f, [2, 22]),
|
|
601
|
+
t(h, [2, 25], { 27: [1, 25] }),
|
|
602
|
+
t(f, [2, 26]),
|
|
603
|
+
{
|
|
604
|
+
19: 26,
|
|
605
|
+
26: 12,
|
|
606
|
+
31: s
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
10: n,
|
|
610
|
+
11: 27,
|
|
611
|
+
13: 4,
|
|
612
|
+
19: 5,
|
|
613
|
+
20: 6,
|
|
614
|
+
21: i,
|
|
615
|
+
22: 8,
|
|
616
|
+
23: 9,
|
|
617
|
+
24: 10,
|
|
618
|
+
25: 11,
|
|
619
|
+
26: 12,
|
|
620
|
+
28: a,
|
|
621
|
+
29: o,
|
|
622
|
+
31: s,
|
|
623
|
+
39: c,
|
|
624
|
+
43: l,
|
|
625
|
+
46: u
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
40: [1, 28],
|
|
629
|
+
42: [1, 29]
|
|
630
|
+
},
|
|
631
|
+
{ 44: [1, 30] },
|
|
632
|
+
{ 47: [1, 31] },
|
|
633
|
+
t(g, [2, 29], {
|
|
634
|
+
32: 32,
|
|
635
|
+
35: [1, 33],
|
|
636
|
+
37: [1, 34]
|
|
637
|
+
}),
|
|
638
|
+
{ 1: [2, 7] },
|
|
639
|
+
t(d, [2, 13]),
|
|
640
|
+
{
|
|
641
|
+
26: 35,
|
|
642
|
+
31: s
|
|
643
|
+
},
|
|
644
|
+
{ 31: [2, 14] },
|
|
645
|
+
{ 17: [1, 36] },
|
|
646
|
+
t(h, [2, 24]),
|
|
647
|
+
{
|
|
648
|
+
10: n,
|
|
649
|
+
11: 37,
|
|
650
|
+
13: 4,
|
|
651
|
+
14: 22,
|
|
652
|
+
15: p,
|
|
653
|
+
16: m,
|
|
654
|
+
19: 5,
|
|
655
|
+
20: 6,
|
|
656
|
+
21: i,
|
|
657
|
+
22: 8,
|
|
658
|
+
23: 9,
|
|
659
|
+
24: 10,
|
|
660
|
+
25: 11,
|
|
661
|
+
26: 12,
|
|
662
|
+
28: a,
|
|
663
|
+
29: o,
|
|
664
|
+
31: s,
|
|
665
|
+
39: c,
|
|
666
|
+
43: l,
|
|
667
|
+
46: u
|
|
668
|
+
},
|
|
669
|
+
{ 30: [1, 38] },
|
|
670
|
+
{ 41: [1, 39] },
|
|
671
|
+
{ 41: [1, 40] },
|
|
672
|
+
{ 45: [1, 41] },
|
|
673
|
+
{ 48: [1, 42] },
|
|
674
|
+
t(g, [2, 30]),
|
|
675
|
+
{ 18: [1, 43] },
|
|
676
|
+
{ 18: [1, 44] },
|
|
677
|
+
t(h, [2, 23]),
|
|
678
|
+
{ 18: [1, 45] },
|
|
679
|
+
{ 30: [1, 46] },
|
|
680
|
+
t(f, [2, 28]),
|
|
681
|
+
t(f, [2, 35]),
|
|
682
|
+
t(f, [2, 36]),
|
|
683
|
+
t(f, [2, 37]),
|
|
684
|
+
t(f, [2, 38]),
|
|
685
|
+
{ 36: [1, 47] },
|
|
686
|
+
{
|
|
687
|
+
33: 48,
|
|
688
|
+
34: _
|
|
689
|
+
},
|
|
690
|
+
{ 15: [1, 50] },
|
|
691
|
+
t(f, [2, 27]),
|
|
692
|
+
t(g, [2, 33]),
|
|
693
|
+
{ 38: [1, 51] },
|
|
694
|
+
{
|
|
695
|
+
33: 52,
|
|
696
|
+
34: _,
|
|
697
|
+
38: [2, 31]
|
|
698
|
+
},
|
|
699
|
+
{ 31: [2, 15] },
|
|
700
|
+
t(g, [2, 34]),
|
|
701
|
+
{ 38: [2, 32] }
|
|
702
|
+
],
|
|
703
|
+
defaultActions: {
|
|
704
|
+
20: [2, 7],
|
|
705
|
+
23: [2, 14],
|
|
706
|
+
50: [2, 15],
|
|
707
|
+
52: [2, 32]
|
|
708
|
+
},
|
|
709
|
+
parseError: /* @__PURE__ */ r(function(e, t) {
|
|
710
|
+
if (t.recoverable) this.trace(e);
|
|
711
|
+
else {
|
|
712
|
+
var n = Error(e);
|
|
713
|
+
throw n.hash = t, n;
|
|
714
|
+
}
|
|
715
|
+
}, "parseError"),
|
|
716
|
+
parse: /* @__PURE__ */ r(function(e) {
|
|
717
|
+
var t = this, n = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
|
|
718
|
+
for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
|
|
719
|
+
h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
|
|
720
|
+
var v = h.yylloc;
|
|
721
|
+
o.push(v);
|
|
722
|
+
var y = h.options && h.options.ranges;
|
|
723
|
+
typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
724
|
+
function b(e) {
|
|
725
|
+
n.length -= 2 * e, a.length -= e, o.length -= e;
|
|
726
|
+
}
|
|
727
|
+
r(b, "popStack");
|
|
728
|
+
function x() {
|
|
729
|
+
var e = i.pop() || h.lex() || p;
|
|
730
|
+
return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
|
|
731
|
+
}
|
|
732
|
+
r(x, "lex");
|
|
733
|
+
for (var S, C, w, T, E, D = {}, O, k, ee, A;;) {
|
|
734
|
+
if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S == null && (S = x()), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
|
|
735
|
+
var j = "";
|
|
736
|
+
for (O in A = [], s[w]) this.terminals_[O] && O > f && A.push("'" + this.terminals_[O] + "'");
|
|
737
|
+
j = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + A.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(j, {
|
|
738
|
+
text: h.match,
|
|
739
|
+
token: this.terminals_[S] || S,
|
|
740
|
+
line: h.yylineno,
|
|
741
|
+
loc: v,
|
|
742
|
+
expected: A
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
|
|
746
|
+
switch (T[0]) {
|
|
747
|
+
case 1:
|
|
748
|
+
n.push(S), a.push(h.yytext), o.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
|
|
749
|
+
break;
|
|
750
|
+
case 2:
|
|
751
|
+
if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
|
|
752
|
+
first_line: o[o.length - (k || 1)].first_line,
|
|
753
|
+
last_line: o[o.length - 1].last_line,
|
|
754
|
+
first_column: o[o.length - (k || 1)].first_column,
|
|
755
|
+
last_column: o[o.length - 1].last_column
|
|
756
|
+
}, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
|
|
757
|
+
c,
|
|
758
|
+
u,
|
|
759
|
+
l,
|
|
760
|
+
g.yy,
|
|
761
|
+
T[1],
|
|
762
|
+
a,
|
|
763
|
+
o
|
|
764
|
+
].concat(m)), E !== void 0) return E;
|
|
765
|
+
k && (n = n.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), ee = s[n[n.length - 2]][n[n.length - 1]], n.push(ee);
|
|
766
|
+
break;
|
|
767
|
+
case 3: return !0;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
return !0;
|
|
771
|
+
}, "parse")
|
|
772
|
+
};
|
|
773
|
+
v.lexer = /* @__PURE__ */ (function() {
|
|
774
|
+
return {
|
|
775
|
+
EOF: 1,
|
|
776
|
+
parseError: /* @__PURE__ */ r(function(e, t) {
|
|
777
|
+
if (this.yy.parser) this.yy.parser.parseError(e, t);
|
|
778
|
+
else throw Error(e);
|
|
779
|
+
}, "parseError"),
|
|
780
|
+
setInput: /* @__PURE__ */ r(function(e, t) {
|
|
781
|
+
return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
782
|
+
first_line: 1,
|
|
783
|
+
first_column: 0,
|
|
784
|
+
last_line: 1,
|
|
785
|
+
last_column: 0
|
|
786
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
787
|
+
}, "setInput"),
|
|
788
|
+
input: /* @__PURE__ */ r(function() {
|
|
789
|
+
var e = this._input[0];
|
|
790
|
+
return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
|
|
791
|
+
}, "input"),
|
|
792
|
+
unput: /* @__PURE__ */ r(function(e) {
|
|
793
|
+
var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
|
|
794
|
+
this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
|
|
795
|
+
var r = this.match.split(/(?:\r\n?|\n)/g);
|
|
796
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
|
|
797
|
+
var i = this.yylloc.range;
|
|
798
|
+
return this.yylloc = {
|
|
799
|
+
first_line: this.yylloc.first_line,
|
|
800
|
+
last_line: this.yylineno + 1,
|
|
801
|
+
first_column: this.yylloc.first_column,
|
|
802
|
+
last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
|
|
803
|
+
}, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
|
|
804
|
+
}, "unput"),
|
|
805
|
+
more: /* @__PURE__ */ r(function() {
|
|
806
|
+
return this._more = !0, this;
|
|
807
|
+
}, "more"),
|
|
808
|
+
reject: /* @__PURE__ */ r(function() {
|
|
809
|
+
if (this.options.backtrack_lexer) this._backtrack = !0;
|
|
810
|
+
else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
|
|
811
|
+
text: "",
|
|
812
|
+
token: null,
|
|
813
|
+
line: this.yylineno
|
|
814
|
+
});
|
|
815
|
+
return this;
|
|
816
|
+
}, "reject"),
|
|
817
|
+
less: /* @__PURE__ */ r(function(e) {
|
|
818
|
+
this.unput(this.match.slice(e));
|
|
819
|
+
}, "less"),
|
|
820
|
+
pastInput: /* @__PURE__ */ r(function() {
|
|
821
|
+
var e = this.matched.substr(0, this.matched.length - this.match.length);
|
|
822
|
+
return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
|
|
823
|
+
}, "pastInput"),
|
|
824
|
+
upcomingInput: /* @__PURE__ */ r(function() {
|
|
825
|
+
var e = this.match;
|
|
826
|
+
return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
827
|
+
}, "upcomingInput"),
|
|
828
|
+
showPosition: /* @__PURE__ */ r(function() {
|
|
829
|
+
var e = this.pastInput(), t = Array(e.length + 1).join("-");
|
|
830
|
+
return e + this.upcomingInput() + "\n" + t + "^";
|
|
831
|
+
}, "showPosition"),
|
|
832
|
+
test_match: /* @__PURE__ */ r(function(e, t) {
|
|
833
|
+
var n, r, i;
|
|
834
|
+
if (this.options.backtrack_lexer && (i = {
|
|
835
|
+
yylineno: this.yylineno,
|
|
836
|
+
yylloc: {
|
|
837
|
+
first_line: this.yylloc.first_line,
|
|
838
|
+
last_line: this.last_line,
|
|
839
|
+
first_column: this.yylloc.first_column,
|
|
840
|
+
last_column: this.yylloc.last_column
|
|
841
|
+
},
|
|
842
|
+
yytext: this.yytext,
|
|
843
|
+
match: this.match,
|
|
844
|
+
matches: this.matches,
|
|
845
|
+
matched: this.matched,
|
|
846
|
+
yyleng: this.yyleng,
|
|
847
|
+
offset: this.offset,
|
|
848
|
+
_more: this._more,
|
|
849
|
+
_input: this._input,
|
|
850
|
+
yy: this.yy,
|
|
851
|
+
conditionStack: this.conditionStack.slice(0),
|
|
852
|
+
done: this.done
|
|
853
|
+
}, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
|
|
854
|
+
first_line: this.yylloc.last_line,
|
|
855
|
+
last_line: this.yylineno + 1,
|
|
856
|
+
first_column: this.yylloc.last_column,
|
|
857
|
+
last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
|
|
858
|
+
}, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
|
|
859
|
+
if (this._backtrack) {
|
|
860
|
+
for (var a in i) this[a] = i[a];
|
|
861
|
+
return !1;
|
|
862
|
+
}
|
|
863
|
+
return !1;
|
|
864
|
+
}, "test_match"),
|
|
865
|
+
next: /* @__PURE__ */ r(function() {
|
|
866
|
+
if (this.done) return this.EOF;
|
|
867
|
+
this._input || (this.done = !0);
|
|
868
|
+
var e, t, n, r;
|
|
869
|
+
this._more || (this.yytext = "", this.match = "");
|
|
870
|
+
for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
|
|
871
|
+
if (t = n, r = a, this.options.backtrack_lexer) {
|
|
872
|
+
if (e = this.test_match(n, i[a]), e !== !1) return e;
|
|
873
|
+
if (this._backtrack) {
|
|
874
|
+
t = !1;
|
|
875
|
+
continue;
|
|
876
|
+
} else return !1;
|
|
877
|
+
} else if (!this.options.flex) break;
|
|
878
|
+
}
|
|
879
|
+
return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
880
|
+
text: "",
|
|
881
|
+
token: null,
|
|
882
|
+
line: this.yylineno
|
|
883
|
+
});
|
|
884
|
+
}, "next"),
|
|
885
|
+
lex: /* @__PURE__ */ r(function() {
|
|
886
|
+
return this.next() || this.lex();
|
|
887
|
+
}, "lex"),
|
|
888
|
+
begin: /* @__PURE__ */ r(function(e) {
|
|
889
|
+
this.conditionStack.push(e);
|
|
890
|
+
}, "begin"),
|
|
891
|
+
popState: /* @__PURE__ */ r(function() {
|
|
892
|
+
return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
893
|
+
}, "popState"),
|
|
894
|
+
_currentRules: /* @__PURE__ */ r(function() {
|
|
895
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
896
|
+
}, "_currentRules"),
|
|
897
|
+
topState: /* @__PURE__ */ r(function(e) {
|
|
898
|
+
return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
|
|
899
|
+
}, "topState"),
|
|
900
|
+
pushState: /* @__PURE__ */ r(function(e) {
|
|
901
|
+
this.begin(e);
|
|
902
|
+
}, "pushState"),
|
|
903
|
+
stateStackSize: /* @__PURE__ */ r(function() {
|
|
904
|
+
return this.conditionStack.length;
|
|
905
|
+
}, "stateStackSize"),
|
|
906
|
+
options: {},
|
|
907
|
+
performAction: /* @__PURE__ */ r(function(e, t, n, r) {
|
|
908
|
+
switch (n) {
|
|
909
|
+
case 0: return e.getLogger().debug("Found block-beta"), 10;
|
|
910
|
+
case 1: return e.getLogger().debug("Found id-block"), 29;
|
|
911
|
+
case 2: return e.getLogger().debug("Found block"), 10;
|
|
912
|
+
case 3:
|
|
913
|
+
e.getLogger().debug(".", t.yytext);
|
|
914
|
+
break;
|
|
915
|
+
case 4:
|
|
916
|
+
e.getLogger().debug("_", t.yytext);
|
|
917
|
+
break;
|
|
918
|
+
case 5: return 5;
|
|
919
|
+
case 6: return t.yytext = -1, 28;
|
|
920
|
+
case 7: return t.yytext = t.yytext.replace(/columns\s+/, ""), e.getLogger().debug("COLUMNS (LEX)", t.yytext), 28;
|
|
921
|
+
case 8:
|
|
922
|
+
this.pushState("md_string");
|
|
923
|
+
break;
|
|
924
|
+
case 9: return "MD_STR";
|
|
925
|
+
case 10:
|
|
926
|
+
this.popState();
|
|
927
|
+
break;
|
|
928
|
+
case 11:
|
|
929
|
+
this.pushState("string");
|
|
930
|
+
break;
|
|
931
|
+
case 12:
|
|
932
|
+
e.getLogger().debug("LEX: POPPING STR:", t.yytext), this.popState();
|
|
933
|
+
break;
|
|
934
|
+
case 13: return e.getLogger().debug("LEX: STR end:", t.yytext), "STR";
|
|
935
|
+
case 14: return t.yytext = t.yytext.replace(/space\:/, ""), e.getLogger().debug("SPACE NUM (LEX)", t.yytext), 21;
|
|
936
|
+
case 15: return t.yytext = "1", e.getLogger().debug("COLUMNS (LEX)", t.yytext), 21;
|
|
937
|
+
case 16: return 42;
|
|
938
|
+
case 17: return "LINKSTYLE";
|
|
939
|
+
case 18: return "INTERPOLATE";
|
|
940
|
+
case 19: return this.pushState("CLASSDEF"), 39;
|
|
941
|
+
case 20: return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
|
|
942
|
+
case 21: return this.popState(), this.pushState("CLASSDEFID"), 40;
|
|
943
|
+
case 22: return this.popState(), 41;
|
|
944
|
+
case 23: return this.pushState("CLASS"), 43;
|
|
945
|
+
case 24: return this.popState(), this.pushState("CLASS_STYLE"), 44;
|
|
946
|
+
case 25: return this.popState(), 45;
|
|
947
|
+
case 26: return this.pushState("STYLE_STMNT"), 46;
|
|
948
|
+
case 27: return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
|
|
949
|
+
case 28: return this.popState(), 48;
|
|
950
|
+
case 29: return this.pushState("acc_title"), "acc_title";
|
|
951
|
+
case 30: return this.popState(), "acc_title_value";
|
|
952
|
+
case 31: return this.pushState("acc_descr"), "acc_descr";
|
|
953
|
+
case 32: return this.popState(), "acc_descr_value";
|
|
954
|
+
case 33:
|
|
955
|
+
this.pushState("acc_descr_multiline");
|
|
956
|
+
break;
|
|
957
|
+
case 34:
|
|
958
|
+
this.popState();
|
|
959
|
+
break;
|
|
960
|
+
case 35: return "acc_descr_multiline_value";
|
|
961
|
+
case 36: return 30;
|
|
962
|
+
case 37: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
963
|
+
case 38: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
964
|
+
case 39: return this.popState(), e.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
965
|
+
case 40: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
966
|
+
case 41: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
967
|
+
case 42: return this.popState(), e.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
968
|
+
case 43: return this.popState(), e.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
969
|
+
case 44: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
970
|
+
case 45: return this.popState(), e.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
971
|
+
case 46: return this.popState(), e.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
972
|
+
case 47: return this.popState(), e.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
973
|
+
case 48: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
974
|
+
case 49: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
975
|
+
case 50: return this.popState(), e.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
976
|
+
case 51: return this.popState(), e.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
977
|
+
case 52: return this.popState(), e.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
978
|
+
case 53: return this.popState(), e.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
979
|
+
case 54: return e.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
|
|
980
|
+
case 55: return e.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
|
|
981
|
+
case 56: return e.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
|
|
982
|
+
case 57: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
983
|
+
case 58: return e.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
|
|
984
|
+
case 59: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
985
|
+
case 60: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
986
|
+
case 61: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
987
|
+
case 62: return e.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
|
|
988
|
+
case 63: return e.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
|
|
989
|
+
case 64: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
990
|
+
case 65: return this.pushState("NODE"), 35;
|
|
991
|
+
case 66: return this.pushState("NODE"), 35;
|
|
992
|
+
case 67: return this.pushState("NODE"), 35;
|
|
993
|
+
case 68: return this.pushState("NODE"), 35;
|
|
994
|
+
case 69: return this.pushState("NODE"), 35;
|
|
995
|
+
case 70: return this.pushState("NODE"), 35;
|
|
996
|
+
case 71: return this.pushState("NODE"), 35;
|
|
997
|
+
case 72: return e.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
|
|
998
|
+
case 73: return this.pushState("BLOCK_ARROW"), e.getLogger().debug("LEX ARR START"), 37;
|
|
999
|
+
case 74: return e.getLogger().debug("Lex: NODE_ID", t.yytext), 31;
|
|
1000
|
+
case 75: return e.getLogger().debug("Lex: EOF", t.yytext), 8;
|
|
1001
|
+
case 76:
|
|
1002
|
+
this.pushState("md_string");
|
|
1003
|
+
break;
|
|
1004
|
+
case 77:
|
|
1005
|
+
this.pushState("md_string");
|
|
1006
|
+
break;
|
|
1007
|
+
case 78: return "NODE_DESCR";
|
|
1008
|
+
case 79:
|
|
1009
|
+
this.popState();
|
|
1010
|
+
break;
|
|
1011
|
+
case 80:
|
|
1012
|
+
e.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
1013
|
+
break;
|
|
1014
|
+
case 81:
|
|
1015
|
+
e.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
1016
|
+
break;
|
|
1017
|
+
case 82: return e.getLogger().debug("LEX: NODE_DESCR:", t.yytext), "NODE_DESCR";
|
|
1018
|
+
case 83:
|
|
1019
|
+
e.getLogger().debug("LEX POPPING"), this.popState();
|
|
1020
|
+
break;
|
|
1021
|
+
case 84:
|
|
1022
|
+
e.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
1023
|
+
break;
|
|
1024
|
+
case 85: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (right): dir:", t.yytext), "DIR";
|
|
1025
|
+
case 86: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (left):", t.yytext), "DIR";
|
|
1026
|
+
case 87: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (x):", t.yytext), "DIR";
|
|
1027
|
+
case 88: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (y):", t.yytext), "DIR";
|
|
1028
|
+
case 89: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (up):", t.yytext), "DIR";
|
|
1029
|
+
case 90: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (down):", t.yytext), "DIR";
|
|
1030
|
+
case 91: return t.yytext = "]>", e.getLogger().debug("Lex (ARROW_DIR end):", t.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
1031
|
+
case 92: return e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
|
|
1032
|
+
case 93: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
|
|
1033
|
+
case 94: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
|
|
1034
|
+
case 95: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
|
|
1035
|
+
case 96: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
|
|
1036
|
+
case 97: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
|
|
1037
|
+
case 98: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
|
|
1038
|
+
case 99:
|
|
1039
|
+
this.pushState("md_string");
|
|
1040
|
+
break;
|
|
1041
|
+
case 100: return e.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
1042
|
+
case 101: return this.popState(), e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
|
|
1043
|
+
case 102: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
|
|
1044
|
+
case 103: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
|
|
1045
|
+
case 104: return e.getLogger().debug("Lex: COLON", t.yytext), t.yytext = t.yytext.slice(1), 27;
|
|
1046
|
+
}
|
|
1047
|
+
}, "anonymous"),
|
|
1048
|
+
rules: [
|
|
1049
|
+
/^(?:block-beta\b)/,
|
|
1050
|
+
/^(?:block:)/,
|
|
1051
|
+
/^(?:block\b)/,
|
|
1052
|
+
/^(?:[\s]+)/,
|
|
1053
|
+
/^(?:[\n]+)/,
|
|
1054
|
+
/^(?:((\u000D\u000A)|(\u000A)))/,
|
|
1055
|
+
/^(?:columns\s+auto\b)/,
|
|
1056
|
+
/^(?:columns\s+[\d]+)/,
|
|
1057
|
+
/^(?:["][`])/,
|
|
1058
|
+
/^(?:[^`"]+)/,
|
|
1059
|
+
/^(?:[`]["])/,
|
|
1060
|
+
/^(?:["])/,
|
|
1061
|
+
/^(?:["])/,
|
|
1062
|
+
/^(?:[^"]*)/,
|
|
1063
|
+
/^(?:space[:]\d+)/,
|
|
1064
|
+
/^(?:space\b)/,
|
|
1065
|
+
/^(?:default\b)/,
|
|
1066
|
+
/^(?:linkStyle\b)/,
|
|
1067
|
+
/^(?:interpolate\b)/,
|
|
1068
|
+
/^(?:classDef\s+)/,
|
|
1069
|
+
/^(?:DEFAULT\s+)/,
|
|
1070
|
+
/^(?:\w+\s+)/,
|
|
1071
|
+
/^(?:[^\n]*)/,
|
|
1072
|
+
/^(?:class\s+)/,
|
|
1073
|
+
/^(?:(\w+)+((,\s*\w+)*))/,
|
|
1074
|
+
/^(?:[^\n]*)/,
|
|
1075
|
+
/^(?:style\s+)/,
|
|
1076
|
+
/^(?:(\w+)+((,\s*\w+)*))/,
|
|
1077
|
+
/^(?:[^\n]*)/,
|
|
1078
|
+
/^(?:accTitle\s*:\s*)/,
|
|
1079
|
+
/^(?:(?!\n||)*[^\n]*)/,
|
|
1080
|
+
/^(?:accDescr\s*:\s*)/,
|
|
1081
|
+
/^(?:(?!\n||)*[^\n]*)/,
|
|
1082
|
+
/^(?:accDescr\s*\{\s*)/,
|
|
1083
|
+
/^(?:[\}])/,
|
|
1084
|
+
/^(?:[^\}]*)/,
|
|
1085
|
+
/^(?:end\b\s*)/,
|
|
1086
|
+
/^(?:\(\(\()/,
|
|
1087
|
+
/^(?:\)\)\))/,
|
|
1088
|
+
/^(?:[\)]\))/,
|
|
1089
|
+
/^(?:\}\})/,
|
|
1090
|
+
/^(?:\})/,
|
|
1091
|
+
/^(?:\(-)/,
|
|
1092
|
+
/^(?:-\))/,
|
|
1093
|
+
/^(?:\(\()/,
|
|
1094
|
+
/^(?:\]\])/,
|
|
1095
|
+
/^(?:\()/,
|
|
1096
|
+
/^(?:\]\))/,
|
|
1097
|
+
/^(?:\\\])/,
|
|
1098
|
+
/^(?:\/\])/,
|
|
1099
|
+
/^(?:\)\])/,
|
|
1100
|
+
/^(?:[\)])/,
|
|
1101
|
+
/^(?:\]>)/,
|
|
1102
|
+
/^(?:[\]])/,
|
|
1103
|
+
/^(?:-\))/,
|
|
1104
|
+
/^(?:\(-)/,
|
|
1105
|
+
/^(?:\)\))/,
|
|
1106
|
+
/^(?:\))/,
|
|
1107
|
+
/^(?:\(\(\()/,
|
|
1108
|
+
/^(?:\(\()/,
|
|
1109
|
+
/^(?:\{\{)/,
|
|
1110
|
+
/^(?:\{)/,
|
|
1111
|
+
/^(?:>)/,
|
|
1112
|
+
/^(?:\(\[)/,
|
|
1113
|
+
/^(?:\()/,
|
|
1114
|
+
/^(?:\[\[)/,
|
|
1115
|
+
/^(?:\[\|)/,
|
|
1116
|
+
/^(?:\[\()/,
|
|
1117
|
+
/^(?:\)\)\))/,
|
|
1118
|
+
/^(?:\[\\)/,
|
|
1119
|
+
/^(?:\[\/)/,
|
|
1120
|
+
/^(?:\[\\)/,
|
|
1121
|
+
/^(?:\[)/,
|
|
1122
|
+
/^(?:<\[)/,
|
|
1123
|
+
/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,
|
|
1124
|
+
/^(?:$)/,
|
|
1125
|
+
/^(?:["][`])/,
|
|
1126
|
+
/^(?:["][`])/,
|
|
1127
|
+
/^(?:[^`"]+)/,
|
|
1128
|
+
/^(?:[`]["])/,
|
|
1129
|
+
/^(?:["])/,
|
|
1130
|
+
/^(?:["])/,
|
|
1131
|
+
/^(?:[^"]+)/,
|
|
1132
|
+
/^(?:["])/,
|
|
1133
|
+
/^(?:\]>\s*\()/,
|
|
1134
|
+
/^(?:,?\s*right\s*)/,
|
|
1135
|
+
/^(?:,?\s*left\s*)/,
|
|
1136
|
+
/^(?:,?\s*x\s*)/,
|
|
1137
|
+
/^(?:,?\s*y\s*)/,
|
|
1138
|
+
/^(?:,?\s*up\s*)/,
|
|
1139
|
+
/^(?:,?\s*down\s*)/,
|
|
1140
|
+
/^(?:\)\s*)/,
|
|
1141
|
+
/^(?:\s*[xo<]?--+[-xo>]\s*)/,
|
|
1142
|
+
/^(?:\s*[xo<]?==+[=xo>]\s*)/,
|
|
1143
|
+
/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
|
|
1144
|
+
/^(?:\s*~~[\~]+\s*)/,
|
|
1145
|
+
/^(?:\s*[xo<]?--\s*)/,
|
|
1146
|
+
/^(?:\s*[xo<]?==\s*)/,
|
|
1147
|
+
/^(?:\s*[xo<]?-\.\s*)/,
|
|
1148
|
+
/^(?:["][`])/,
|
|
1149
|
+
/^(?:["])/,
|
|
1150
|
+
/^(?:\s*[xo<]?--+[-xo>]\s*)/,
|
|
1151
|
+
/^(?:\s*[xo<]?==+[=xo>]\s*)/,
|
|
1152
|
+
/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
|
|
1153
|
+
/^(?::\d+)/
|
|
1154
|
+
],
|
|
1155
|
+
conditions: {
|
|
1156
|
+
STYLE_DEFINITION: {
|
|
1157
|
+
rules: [28],
|
|
1158
|
+
inclusive: !1
|
|
1159
|
+
},
|
|
1160
|
+
STYLE_STMNT: {
|
|
1161
|
+
rules: [27],
|
|
1162
|
+
inclusive: !1
|
|
1163
|
+
},
|
|
1164
|
+
CLASSDEFID: {
|
|
1165
|
+
rules: [22],
|
|
1166
|
+
inclusive: !1
|
|
1167
|
+
},
|
|
1168
|
+
CLASSDEF: {
|
|
1169
|
+
rules: [20, 21],
|
|
1170
|
+
inclusive: !1
|
|
1171
|
+
},
|
|
1172
|
+
CLASS_STYLE: {
|
|
1173
|
+
rules: [25],
|
|
1174
|
+
inclusive: !1
|
|
1175
|
+
},
|
|
1176
|
+
CLASS: {
|
|
1177
|
+
rules: [24],
|
|
1178
|
+
inclusive: !1
|
|
1179
|
+
},
|
|
1180
|
+
LLABEL: {
|
|
1181
|
+
rules: [
|
|
1182
|
+
99,
|
|
1183
|
+
100,
|
|
1184
|
+
101,
|
|
1185
|
+
102,
|
|
1186
|
+
103
|
|
1187
|
+
],
|
|
1188
|
+
inclusive: !1
|
|
1189
|
+
},
|
|
1190
|
+
ARROW_DIR: {
|
|
1191
|
+
rules: [
|
|
1192
|
+
85,
|
|
1193
|
+
86,
|
|
1194
|
+
87,
|
|
1195
|
+
88,
|
|
1196
|
+
89,
|
|
1197
|
+
90,
|
|
1198
|
+
91
|
|
1199
|
+
],
|
|
1200
|
+
inclusive: !1
|
|
1201
|
+
},
|
|
1202
|
+
BLOCK_ARROW: {
|
|
1203
|
+
rules: [
|
|
1204
|
+
76,
|
|
1205
|
+
81,
|
|
1206
|
+
84
|
|
1207
|
+
],
|
|
1208
|
+
inclusive: !1
|
|
1209
|
+
},
|
|
1210
|
+
NODE: {
|
|
1211
|
+
rules: [
|
|
1212
|
+
37,
|
|
1213
|
+
38,
|
|
1214
|
+
39,
|
|
1215
|
+
40,
|
|
1216
|
+
41,
|
|
1217
|
+
42,
|
|
1218
|
+
43,
|
|
1219
|
+
44,
|
|
1220
|
+
45,
|
|
1221
|
+
46,
|
|
1222
|
+
47,
|
|
1223
|
+
48,
|
|
1224
|
+
49,
|
|
1225
|
+
50,
|
|
1226
|
+
51,
|
|
1227
|
+
52,
|
|
1228
|
+
53,
|
|
1229
|
+
77,
|
|
1230
|
+
80
|
|
1231
|
+
],
|
|
1232
|
+
inclusive: !1
|
|
1233
|
+
},
|
|
1234
|
+
md_string: {
|
|
1235
|
+
rules: [
|
|
1236
|
+
9,
|
|
1237
|
+
10,
|
|
1238
|
+
78,
|
|
1239
|
+
79
|
|
1240
|
+
],
|
|
1241
|
+
inclusive: !1
|
|
1242
|
+
},
|
|
1243
|
+
space: {
|
|
1244
|
+
rules: [],
|
|
1245
|
+
inclusive: !1
|
|
1246
|
+
},
|
|
1247
|
+
string: {
|
|
1248
|
+
rules: [
|
|
1249
|
+
12,
|
|
1250
|
+
13,
|
|
1251
|
+
82,
|
|
1252
|
+
83
|
|
1253
|
+
],
|
|
1254
|
+
inclusive: !1
|
|
1255
|
+
},
|
|
1256
|
+
acc_descr_multiline: {
|
|
1257
|
+
rules: [34, 35],
|
|
1258
|
+
inclusive: !1
|
|
1259
|
+
},
|
|
1260
|
+
acc_descr: {
|
|
1261
|
+
rules: [32],
|
|
1262
|
+
inclusive: !1
|
|
1263
|
+
},
|
|
1264
|
+
acc_title: {
|
|
1265
|
+
rules: [30],
|
|
1266
|
+
inclusive: !1
|
|
1267
|
+
},
|
|
1268
|
+
INITIAL: {
|
|
1269
|
+
rules: [
|
|
1270
|
+
0,
|
|
1271
|
+
1,
|
|
1272
|
+
2,
|
|
1273
|
+
3,
|
|
1274
|
+
4,
|
|
1275
|
+
5,
|
|
1276
|
+
6,
|
|
1277
|
+
7,
|
|
1278
|
+
8,
|
|
1279
|
+
11,
|
|
1280
|
+
14,
|
|
1281
|
+
15,
|
|
1282
|
+
16,
|
|
1283
|
+
17,
|
|
1284
|
+
18,
|
|
1285
|
+
19,
|
|
1286
|
+
23,
|
|
1287
|
+
26,
|
|
1288
|
+
29,
|
|
1289
|
+
31,
|
|
1290
|
+
33,
|
|
1291
|
+
36,
|
|
1292
|
+
54,
|
|
1293
|
+
55,
|
|
1294
|
+
56,
|
|
1295
|
+
57,
|
|
1296
|
+
58,
|
|
1297
|
+
59,
|
|
1298
|
+
60,
|
|
1299
|
+
61,
|
|
1300
|
+
62,
|
|
1301
|
+
63,
|
|
1302
|
+
64,
|
|
1303
|
+
65,
|
|
1304
|
+
66,
|
|
1305
|
+
67,
|
|
1306
|
+
68,
|
|
1307
|
+
69,
|
|
1308
|
+
70,
|
|
1309
|
+
71,
|
|
1310
|
+
72,
|
|
1311
|
+
73,
|
|
1312
|
+
74,
|
|
1313
|
+
75,
|
|
1314
|
+
92,
|
|
1315
|
+
93,
|
|
1316
|
+
94,
|
|
1317
|
+
95,
|
|
1318
|
+
96,
|
|
1319
|
+
97,
|
|
1320
|
+
98,
|
|
1321
|
+
104
|
|
1322
|
+
],
|
|
1323
|
+
inclusive: !0
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
};
|
|
1327
|
+
})();
|
|
1328
|
+
function y() {
|
|
1329
|
+
this.yy = {};
|
|
1330
|
+
}
|
|
1331
|
+
return r(y, "Parser"), y.prototype = v, v.Parser = y, new y();
|
|
1332
|
+
})();
|
|
1333
|
+
Ut.parser = Ut;
|
|
1334
|
+
var Wt = Ut, L = /* @__PURE__ */ new Map(), R = [], Gt = /* @__PURE__ */ new Map(), Kt = "color", qt = "fill", Jt = "bgFill", Yt = ",", Xt = c(), z = /* @__PURE__ */ new Map(), Zt = "", Qt = /* @__PURE__ */ r((e) => d.sanitizeText(e, Xt), "sanitizeText"), $t = /* @__PURE__ */ r(function(e, t = "") {
|
|
1335
|
+
let n = z.get(e);
|
|
1336
|
+
n || (n = {
|
|
1337
|
+
id: e,
|
|
1338
|
+
styles: [],
|
|
1339
|
+
textStyles: []
|
|
1340
|
+
}, z.set(e, n)), t != null && t.split(Yt).forEach((e) => {
|
|
1341
|
+
let t = e.replace(/([^;]*);/, "$1").trim();
|
|
1342
|
+
if (RegExp(Kt).exec(e)) {
|
|
1343
|
+
let e = t.replace(qt, Jt).replace(Kt, qt);
|
|
1344
|
+
n.textStyles.push(e);
|
|
1345
|
+
}
|
|
1346
|
+
n.styles.push(t);
|
|
1347
|
+
});
|
|
1348
|
+
}, "addStyleClass"), en = /* @__PURE__ */ r(function(e, t = "") {
|
|
1349
|
+
let n = L.get(e);
|
|
1350
|
+
t != null && (n.styles = t.split(Yt));
|
|
1351
|
+
}, "addStyle2Node"), tn = /* @__PURE__ */ r(function(e, t) {
|
|
1352
|
+
e.split(",").forEach(function(e) {
|
|
1353
|
+
let n = L.get(e);
|
|
1354
|
+
if (n === void 0) {
|
|
1355
|
+
let t = e.trim();
|
|
1356
|
+
n = {
|
|
1357
|
+
id: t,
|
|
1358
|
+
type: "na",
|
|
1359
|
+
children: []
|
|
1360
|
+
}, L.set(t, n);
|
|
1361
|
+
}
|
|
1362
|
+
n.classes || (n.classes = []), n.classes.push(t);
|
|
1363
|
+
});
|
|
1364
|
+
}, "setCssClass"), nn = /* @__PURE__ */ r((e, t) => {
|
|
1365
|
+
var r;
|
|
1366
|
+
let i = e.flat(), a = [], o = i.find((e) => (e == null ? void 0 : e.type) === "column-setting"), s = (r = o == null ? void 0 : o.columns) == null ? -1 : r;
|
|
1367
|
+
for (let e of i) {
|
|
1368
|
+
if (typeof s == "number" && s > 0 && e.type !== "column-setting" && typeof e.widthInColumns == "number" && e.widthInColumns > s && n.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${s}`), e.label && (e.label = Qt(e.label)), e.type === "classDef") {
|
|
1369
|
+
$t(e.id, e.css);
|
|
1370
|
+
continue;
|
|
1371
|
+
}
|
|
1372
|
+
if (e.type === "applyClass") {
|
|
1373
|
+
var c;
|
|
1374
|
+
tn(e.id, (c = e == null ? void 0 : e.styleClass) == null ? "" : c);
|
|
1375
|
+
continue;
|
|
1376
|
+
}
|
|
1377
|
+
if (e.type === "applyStyles") {
|
|
1378
|
+
e != null && e.stylesStr && en(e.id, e == null ? void 0 : e.stylesStr);
|
|
1379
|
+
continue;
|
|
1380
|
+
}
|
|
1381
|
+
if (e.type === "column-setting") {
|
|
1382
|
+
var l;
|
|
1383
|
+
t.columns = (l = e.columns) == null ? -1 : l;
|
|
1384
|
+
} else if (e.type === "edge") {
|
|
1385
|
+
var u;
|
|
1386
|
+
let t = ((u = Gt.get(e.id)) == null ? 0 : u) + 1;
|
|
1387
|
+
Gt.set(e.id, t), e.id = t + "-" + e.id, R.push(e);
|
|
1388
|
+
} else {
|
|
1389
|
+
e.label || (e.type === "composite" ? e.label = "" : e.label = e.id);
|
|
1390
|
+
let t = L.get(e.id);
|
|
1391
|
+
if (t === void 0 ? L.set(e.id, e) : (e.type !== "na" && (t.type = e.type), e.label !== e.id && (t.label = e.label)), e.children && nn(e.children, e), e.type === "space") {
|
|
1392
|
+
var d;
|
|
1393
|
+
let t = (d = e.width) == null ? 1 : d;
|
|
1394
|
+
for (let n = 0; n < t; n++) {
|
|
1395
|
+
let t = Vt(e);
|
|
1396
|
+
t.id = t.id + "-" + n, L.set(t.id, t), a.push(t);
|
|
1397
|
+
}
|
|
1398
|
+
} else t === void 0 && a.push(e);
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
t.children = a;
|
|
1402
|
+
}, "populateBlockDatabase"), rn = [], B = {
|
|
1403
|
+
id: "root",
|
|
1404
|
+
type: "composite",
|
|
1405
|
+
children: [],
|
|
1406
|
+
columns: -1
|
|
1407
|
+
}, an = /* @__PURE__ */ r(() => {
|
|
1408
|
+
n.debug("Clear called"), s(), B = {
|
|
1409
|
+
id: "root",
|
|
1410
|
+
type: "composite",
|
|
1411
|
+
children: [],
|
|
1412
|
+
columns: -1
|
|
1413
|
+
}, L = /* @__PURE__ */ new Map([["root", B]]), rn = [], z = /* @__PURE__ */ new Map(), R = [], Gt = /* @__PURE__ */ new Map(), Zt = "";
|
|
1414
|
+
}, "clear");
|
|
1415
|
+
function on(e) {
|
|
1416
|
+
switch (n.debug("typeStr2Type", e), e) {
|
|
1417
|
+
case "[]": return "square";
|
|
1418
|
+
case "()": return n.debug("we have a round"), "round";
|
|
1419
|
+
case "(())": return "circle";
|
|
1420
|
+
case ">]": return "rect_left_inv_arrow";
|
|
1421
|
+
case "{}": return "diamond";
|
|
1422
|
+
case "{{}}": return "hexagon";
|
|
1423
|
+
case "([])": return "stadium";
|
|
1424
|
+
case "[[]]": return "subroutine";
|
|
1425
|
+
case "[()]": return "cylinder";
|
|
1426
|
+
case "((()))": return "doublecircle";
|
|
1427
|
+
case "[//]": return "lean_right";
|
|
1428
|
+
case "[\\\\]": return "lean_left";
|
|
1429
|
+
case "[/\\]": return "trapezoid";
|
|
1430
|
+
case "[\\/]": return "inv_trapezoid";
|
|
1431
|
+
case "<[]>": return "block_arrow";
|
|
1432
|
+
default: return "na";
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
r(on, "typeStr2Type");
|
|
1436
|
+
function sn(e) {
|
|
1437
|
+
switch (n.debug("typeStr2Type", e), e) {
|
|
1438
|
+
case "==": return "thick";
|
|
1439
|
+
default: return "normal";
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
r(sn, "edgeTypeStr2Type");
|
|
1443
|
+
function cn(e) {
|
|
1444
|
+
switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
|
|
1445
|
+
case "x": return "arrow_cross";
|
|
1446
|
+
case "o": return "arrow_circle";
|
|
1447
|
+
case ">": return "arrow_point";
|
|
1448
|
+
default: return "";
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
r(cn, "edgeStrToEdgeData");
|
|
1452
|
+
var ln = 0, un = {
|
|
1453
|
+
getConfig: /* @__PURE__ */ r(() => p().block, "getConfig"),
|
|
1454
|
+
typeStr2Type: on,
|
|
1455
|
+
edgeTypeStr2Type: sn,
|
|
1456
|
+
edgeStrToEdgeData: cn,
|
|
1457
|
+
getLogger: /* @__PURE__ */ r(() => n, "getLogger"),
|
|
1458
|
+
getBlocksFlat: /* @__PURE__ */ r(() => [...L.values()], "getBlocksFlat"),
|
|
1459
|
+
getBlocks: /* @__PURE__ */ r(() => rn || [], "getBlocks"),
|
|
1460
|
+
getEdges: /* @__PURE__ */ r(() => R, "getEdges"),
|
|
1461
|
+
setHierarchy: /* @__PURE__ */ r((e) => {
|
|
1462
|
+
B.children = e, nn(e, B), rn = B.children;
|
|
1463
|
+
}, "setHierarchy"),
|
|
1464
|
+
getBlock: /* @__PURE__ */ r((e) => L.get(e), "getBlock"),
|
|
1465
|
+
setBlock: /* @__PURE__ */ r((e) => {
|
|
1466
|
+
L.set(e.id, e);
|
|
1467
|
+
}, "setBlock"),
|
|
1468
|
+
getColumns: /* @__PURE__ */ r((e) => {
|
|
1469
|
+
let t = L.get(e);
|
|
1470
|
+
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
1471
|
+
}, "getColumns"),
|
|
1472
|
+
getClasses: /* @__PURE__ */ r(function() {
|
|
1473
|
+
return z;
|
|
1474
|
+
}, "getClasses"),
|
|
1475
|
+
clear: an,
|
|
1476
|
+
generateId: /* @__PURE__ */ r(() => (ln++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + ln), "generateId"),
|
|
1477
|
+
setDiagramId: /* @__PURE__ */ r((e) => {
|
|
1478
|
+
Zt = e;
|
|
1479
|
+
}, "setDiagramId"),
|
|
1480
|
+
getDiagramId: /* @__PURE__ */ r(() => Zt, "getDiagramId")
|
|
1481
|
+
}, dn = /* @__PURE__ */ r((e, t) => {
|
|
1482
|
+
let n = m;
|
|
1483
|
+
return u(n(e, "r"), n(e, "g"), n(e, "b"), t);
|
|
1484
|
+
}, "fade"), fn = /* @__PURE__ */ r((e) => `.label {
|
|
1485
|
+
font-family: ${e.fontFamily};
|
|
1486
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
1487
|
+
}
|
|
1488
|
+
.cluster-label text {
|
|
1489
|
+
fill: ${e.titleColor};
|
|
1490
|
+
}
|
|
1491
|
+
.cluster-label span,p {
|
|
1492
|
+
color: ${e.titleColor};
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
.label text,span,p {
|
|
1498
|
+
fill: ${e.nodeTextColor || e.textColor};
|
|
1499
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
.node rect,
|
|
1503
|
+
.node circle,
|
|
1504
|
+
.node ellipse,
|
|
1505
|
+
.node polygon,
|
|
1506
|
+
.node path {
|
|
1507
|
+
fill: ${e.mainBkg};
|
|
1508
|
+
stroke: ${e.nodeBorder};
|
|
1509
|
+
stroke-width: 1px;
|
|
1510
|
+
}
|
|
1511
|
+
.flowchart-label text {
|
|
1512
|
+
text-anchor: middle;
|
|
1513
|
+
}
|
|
1514
|
+
// .flowchart-label .text-outer-tspan {
|
|
1515
|
+
// text-anchor: middle;
|
|
1516
|
+
// }
|
|
1517
|
+
// .flowchart-label .text-inner-tspan {
|
|
1518
|
+
// text-anchor: start;
|
|
1519
|
+
// }
|
|
1520
|
+
|
|
1521
|
+
.node .label {
|
|
1522
|
+
text-align: center;
|
|
1523
|
+
}
|
|
1524
|
+
.node.clickable {
|
|
1525
|
+
cursor: pointer;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
.arrowheadPath {
|
|
1529
|
+
fill: ${e.arrowheadColor};
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
.edgePath .path {
|
|
1533
|
+
stroke: ${e.lineColor};
|
|
1534
|
+
stroke-width: 2.0px;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
.flowchart-link {
|
|
1538
|
+
stroke: ${e.lineColor};
|
|
1539
|
+
fill: none;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
.edgeLabel {
|
|
1543
|
+
background-color: ${e.edgeLabelBackground};
|
|
1544
|
+
/*
|
|
1545
|
+
* This is for backward compatibility with existing code that didn't
|
|
1546
|
+
* add a \`<p>\` around edge labels.
|
|
1547
|
+
*
|
|
1548
|
+
* TODO: We should probably remove this in a future release.
|
|
1549
|
+
*/
|
|
1550
|
+
p {
|
|
1551
|
+
margin: 0;
|
|
1552
|
+
padding: 0;
|
|
1553
|
+
display: inline;
|
|
1554
|
+
}
|
|
1555
|
+
rect {
|
|
1556
|
+
opacity: 0.5;
|
|
1557
|
+
background-color: ${e.edgeLabelBackground};
|
|
1558
|
+
fill: ${e.edgeLabelBackground};
|
|
1559
|
+
}
|
|
1560
|
+
text-align: center;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
/* For html labels only */
|
|
1564
|
+
.labelBkg {
|
|
1565
|
+
background-color: ${e.edgeLabelBackground};
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
.node .cluster {
|
|
1569
|
+
// fill: ${dn(e.mainBkg, .5)};
|
|
1570
|
+
fill: ${dn(e.clusterBkg, .5)};
|
|
1571
|
+
stroke: ${dn(e.clusterBorder, .2)};
|
|
1572
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
1573
|
+
stroke-width: 1px;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
.cluster text {
|
|
1577
|
+
fill: ${e.titleColor};
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
.cluster span,p {
|
|
1581
|
+
color: ${e.titleColor};
|
|
1582
|
+
}
|
|
1583
|
+
/* .cluster div {
|
|
1584
|
+
color: ${e.titleColor};
|
|
1585
|
+
} */
|
|
1586
|
+
|
|
1587
|
+
div.mermaidTooltip {
|
|
1588
|
+
position: absolute;
|
|
1589
|
+
text-align: center;
|
|
1590
|
+
max-width: 200px;
|
|
1591
|
+
padding: 2px;
|
|
1592
|
+
font-family: ${e.fontFamily};
|
|
1593
|
+
font-size: 12px;
|
|
1594
|
+
background: ${e.tertiaryColor};
|
|
1595
|
+
border: 1px solid ${e.border2};
|
|
1596
|
+
border-radius: 2px;
|
|
1597
|
+
pointer-events: none;
|
|
1598
|
+
z-index: 100;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
.flowchartTitleText {
|
|
1602
|
+
text-anchor: middle;
|
|
1603
|
+
font-size: 18px;
|
|
1604
|
+
fill: ${e.textColor};
|
|
1605
|
+
}
|
|
1606
|
+
${se()}
|
|
1607
|
+
`, "getStyles"), pn = /* @__PURE__ */ r((e, t, n, r) => {
|
|
1608
|
+
t.forEach((t) => {
|
|
1609
|
+
mn[t](e, n, r);
|
|
1610
|
+
});
|
|
1611
|
+
}, "insertMarkers"), mn = {
|
|
1612
|
+
extension: /* @__PURE__ */ r((e, t, r) => {
|
|
1613
|
+
n.trace("Making markers for ", r), e.append("defs").append("marker").attr("id", r + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", r + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
1614
|
+
}, "extension"),
|
|
1615
|
+
composition: /* @__PURE__ */ r((e, t, n) => {
|
|
1616
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1617
|
+
}, "composition"),
|
|
1618
|
+
aggregation: /* @__PURE__ */ r((e, t, n) => {
|
|
1619
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1620
|
+
}, "aggregation"),
|
|
1621
|
+
dependency: /* @__PURE__ */ r((e, t, n) => {
|
|
1622
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
1623
|
+
}, "dependency"),
|
|
1624
|
+
lollipop: /* @__PURE__ */ r((e, t, n) => {
|
|
1625
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
1626
|
+
}, "lollipop"),
|
|
1627
|
+
point: /* @__PURE__ */ r((e, t, n) => {
|
|
1628
|
+
e.append("marker").attr("id", n + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
1629
|
+
}, "point"),
|
|
1630
|
+
circle: /* @__PURE__ */ r((e, t, n) => {
|
|
1631
|
+
e.append("marker").attr("id", n + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
1632
|
+
}, "circle"),
|
|
1633
|
+
cross: /* @__PURE__ */ r((e, t, n) => {
|
|
1634
|
+
e.append("marker").attr("id", n + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
1635
|
+
}, "cross"),
|
|
1636
|
+
barb: /* @__PURE__ */ r((e, t, n) => {
|
|
1637
|
+
e.append("defs").append("marker").attr("id", n + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
1638
|
+
}, "barb")
|
|
1639
|
+
}, hn = pn, V = (Ht = (I = c()) == null || (I = I.block) == null ? void 0 : I.padding) == null ? 8 : Ht;
|
|
1640
|
+
function gn(e, t) {
|
|
1641
|
+
if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
|
|
1642
|
+
if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
|
|
1643
|
+
return e < 0 ? {
|
|
1644
|
+
px: t,
|
|
1645
|
+
py: 0
|
|
1646
|
+
} : e === 1 ? {
|
|
1647
|
+
px: 0,
|
|
1648
|
+
py: t
|
|
1649
|
+
} : {
|
|
1650
|
+
px: t % e,
|
|
1651
|
+
py: Math.floor(t / e)
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
r(gn, "calculateBlockPosition");
|
|
1655
|
+
var _n = /* @__PURE__ */ r((e) => {
|
|
1656
|
+
let t = 0, r = 0;
|
|
1657
|
+
for (let o of e.children) {
|
|
1658
|
+
var i;
|
|
1659
|
+
let { width: e, height: s, x: c, y: l } = (i = o.size) == null ? {
|
|
1660
|
+
width: 0,
|
|
1661
|
+
height: 0,
|
|
1662
|
+
x: 0,
|
|
1663
|
+
y: 0
|
|
1664
|
+
} : i;
|
|
1665
|
+
if (n.debug("getMaxChildSize abc95 child:", o.id, "width:", e, "height:", s, "x:", c, "y:", l, o.type), o.type !== "space") {
|
|
1666
|
+
if (e > t) {
|
|
1667
|
+
var a;
|
|
1668
|
+
t = e / ((a = o.widthInColumns) == null ? 1 : a);
|
|
1669
|
+
}
|
|
1670
|
+
s > r && (r = s);
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
return {
|
|
1674
|
+
width: t,
|
|
1675
|
+
height: r
|
|
1676
|
+
};
|
|
1677
|
+
}, "getMaxChildSize");
|
|
1678
|
+
function H(e, t, r = 0, i = 0) {
|
|
1679
|
+
var a, o, s, c, l, u, d;
|
|
1680
|
+
n.debug("setBlockSizes abc95 (start)", e.id, e == null || (a = e.size) == null ? void 0 : a.x, "block width =", e == null ? void 0 : e.size, "siblingWidth", r), !(e == null || (o = e.size) == null) && o.width || (e.size = {
|
|
1681
|
+
width: r,
|
|
1682
|
+
height: i,
|
|
1683
|
+
x: 0,
|
|
1684
|
+
y: 0
|
|
1685
|
+
});
|
|
1686
|
+
let f = 0, p = 0;
|
|
1687
|
+
if (((s = e.children) == null ? void 0 : s.length) > 0) {
|
|
1688
|
+
var m, h, g;
|
|
1689
|
+
for (let n of e.children) H(n, t);
|
|
1690
|
+
let a = _n(e);
|
|
1691
|
+
f = a.width, p = a.height, n.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", f, p);
|
|
1692
|
+
for (let t of e.children) if (t.size) {
|
|
1693
|
+
var _, v;
|
|
1694
|
+
n.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${f} ${p} ${JSON.stringify(t.size)}`), t.size.width = f * ((_ = t.widthInColumns) == null ? 1 : _) + V * (((v = t.widthInColumns) == null ? 1 : v) - 1), t.size.height = p, t.size.x = 0, t.size.y = 0, n.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${f} maxHeight:${p}`);
|
|
1695
|
+
}
|
|
1696
|
+
for (let n of e.children) H(n, t, f, p);
|
|
1697
|
+
let o = (m = e.columns) == null ? -1 : m, s = 0;
|
|
1698
|
+
for (let t of e.children) {
|
|
1699
|
+
var y;
|
|
1700
|
+
s += (y = t.widthInColumns) == null ? 1 : y;
|
|
1701
|
+
}
|
|
1702
|
+
let c = e.children.length;
|
|
1703
|
+
o > 0 && o < s && (c = o);
|
|
1704
|
+
let l = Math.ceil(s / c), u = c * (f + V) + V, d = l * (p + V) + V;
|
|
1705
|
+
if (u < r) {
|
|
1706
|
+
n.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${r} siblingHeight ${i} width ${u}`), u = r, d = i;
|
|
1707
|
+
let t = (r - c * V - V) / c, a = (i - l * V - V) / l;
|
|
1708
|
+
n.debug("Size indata abc88", e.id, "childWidth", t, "maxWidth", f), n.debug("Size indata abc88", e.id, "childHeight", a, "maxHeight", p), n.debug("Size indata abc88 xSize", c, "padding", V);
|
|
1709
|
+
for (let n of e.children) n.size && (n.size.width = t, n.size.height = a, n.size.x = 0, n.size.y = 0);
|
|
1710
|
+
}
|
|
1711
|
+
if (n.debug(`abc95 (finale calc) ${e.id} xSize ${c} ySize ${l} columns ${o}${e.children.length} width=${Math.max(u, ((h = e.size) == null ? void 0 : h.width) || 0)}`), u < ((e == null || (g = e.size) == null ? void 0 : g.width) || 0)) {
|
|
1712
|
+
var b;
|
|
1713
|
+
u = (e == null || (b = e.size) == null ? void 0 : b.width) || 0;
|
|
1714
|
+
let t = o > 0 ? Math.min(e.children.length, o) : e.children.length;
|
|
1715
|
+
if (t > 0) {
|
|
1716
|
+
var x;
|
|
1717
|
+
let r = (u - t * V - V) / t;
|
|
1718
|
+
n.debug("abc95 (growing to fit) width", e.id, u, (x = e.size) == null ? void 0 : x.width, r);
|
|
1719
|
+
for (let t of e.children) t.size && (t.size.width = r);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
e.size = {
|
|
1723
|
+
width: u,
|
|
1724
|
+
height: d,
|
|
1725
|
+
x: 0,
|
|
1726
|
+
y: 0
|
|
1727
|
+
};
|
|
1728
|
+
}
|
|
1729
|
+
n.debug("setBlockSizes abc94 (done)", e.id, e == null || (c = e.size) == null ? void 0 : c.x, e == null || (l = e.size) == null ? void 0 : l.width, e == null || (u = e.size) == null ? void 0 : u.y, e == null || (d = e.size) == null ? void 0 : d.height);
|
|
1730
|
+
}
|
|
1731
|
+
r(H, "setBlockSizes");
|
|
1732
|
+
function vn(e, t) {
|
|
1733
|
+
var r, i, a, o, s, c, l;
|
|
1734
|
+
n.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e == null || (r = e.size) == null ? void 0 : r.x} y: ${e == null || (i = e.size) == null ? void 0 : i.y} width: ${e == null || (a = e.size) == null ? void 0 : a.width}`);
|
|
1735
|
+
let u = (o = e.columns) == null ? -1 : o;
|
|
1736
|
+
if (n.debug("layoutBlocks columns abc95", e.id, "=>", u, e), e.children && e.children.length > 0) {
|
|
1737
|
+
var d, f, p, m, h, g;
|
|
1738
|
+
let r = (d = e == null || (f = e.children[0]) == null || (f = f.size) == null ? void 0 : f.width) == null ? 0 : d, i = e.children.length * r + (e.children.length - 1) * V;
|
|
1739
|
+
n.debug("widthOfChildren 88", i, "posX");
|
|
1740
|
+
let a = /* @__PURE__ */ new Map();
|
|
1741
|
+
{
|
|
1742
|
+
let t = 0;
|
|
1743
|
+
for (let n of e.children) {
|
|
1744
|
+
var _, v;
|
|
1745
|
+
if (!n.size) continue;
|
|
1746
|
+
let { py: e } = gn(u, t), r = (_ = a.get(e)) == null ? 0 : _;
|
|
1747
|
+
n.size.height > r && a.set(e, n.size.height);
|
|
1748
|
+
let i = (v = n == null ? void 0 : n.widthInColumns) == null ? 1 : v;
|
|
1749
|
+
u > 0 && (i = Math.min(i, u - t % u)), t += i;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
let o = /* @__PURE__ */ new Map();
|
|
1753
|
+
{
|
|
1754
|
+
let e = 0, t = [...a.keys()].sort((e, t) => e - t);
|
|
1755
|
+
for (let n of t) {
|
|
1756
|
+
var y;
|
|
1757
|
+
o.set(n, e), e += ((y = a.get(n)) == null ? 0 : y) + V;
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
let s = 0;
|
|
1761
|
+
n.debug("abc91 block?.size?.x", e.id, e == null || (p = e.size) == null ? void 0 : p.x);
|
|
1762
|
+
let c = !(e == null || (m = e.size) == null) && m.x ? (e == null || (h = e.size) == null ? void 0 : h.x) + (-(e == null || (g = e.size) == null ? void 0 : g.width) / 2 || 0) : -V, l = 0;
|
|
1763
|
+
for (let r of e.children) {
|
|
1764
|
+
var b, x, S;
|
|
1765
|
+
let i = e;
|
|
1766
|
+
if (!r.size) continue;
|
|
1767
|
+
let { width: d, height: f } = r.size, { px: p, py: m } = gn(u, s);
|
|
1768
|
+
if (m != l) {
|
|
1769
|
+
var C, w, T;
|
|
1770
|
+
l = m, c = !(e == null || (C = e.size) == null) && C.x ? (e == null || (w = e.size) == null ? void 0 : w.x) + (-(e == null || (T = e.size) == null ? void 0 : T.width) / 2 || 0) : -V, n.debug("New row in layout for block", e.id, " and child ", r.id, l);
|
|
1771
|
+
}
|
|
1772
|
+
if (n.debug(`abc89 layout blocks (child) id: ${r.id} Pos: ${s} (px, py) ${p},${m} (${i == null || (b = i.size) == null ? void 0 : b.x},${i == null || (x = i.size) == null ? void 0 : x.y}) parent: ${i.id} width: ${d}${V}`), i.size) {
|
|
1773
|
+
var E, D, O, k;
|
|
1774
|
+
let e = d / 2;
|
|
1775
|
+
r.size.x = c + V + e, n.debug(`abc91 layout blocks (calc) px, pyid:${r.id} startingPos=X${c} new startingPosX${r.size.x} ${e} padding=${V} width=${d} halfWidth=${e} => x:${r.size.x} y:${r.size.y} ${r.widthInColumns} (width * (child?.w || 1)) / 2 ${d * ((E = r == null ? void 0 : r.widthInColumns) == null ? 1 : E) / 2}`), c = r.size.x + e;
|
|
1776
|
+
let t = (D = o.get(m)) == null ? 0 : D, s = (O = a.get(m)) == null ? f : O;
|
|
1777
|
+
r.size.y = i.size.y - i.size.height / 2 + t + s / 2 + V, n.debug(`abc88 layout blocks (calc) px, pyid:${r.id}startingPosX${c}${V}${e}=>x:${r.size.x}y:${r.size.y}${r.widthInColumns}(width * (child?.w || 1)) / 2${d * ((k = r == null ? void 0 : r.widthInColumns) == null ? 1 : k) / 2}`);
|
|
1778
|
+
}
|
|
1779
|
+
r.children && vn(r, t);
|
|
1780
|
+
let h = (S = r == null ? void 0 : r.widthInColumns) == null ? 1 : S;
|
|
1781
|
+
u > 0 && (h = Math.min(h, u - s % u)), s += h, n.debug("abc88 columnsPos", r, s);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
n.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e == null || (s = e.size) == null ? void 0 : s.x} y: ${e == null || (c = e.size) == null ? void 0 : c.y} width: ${e == null || (l = e.size) == null ? void 0 : l.width}`);
|
|
1785
|
+
}
|
|
1786
|
+
r(vn, "layoutBlocks");
|
|
1787
|
+
function yn(e, { minX: t, minY: n, maxX: r, maxY: i } = {
|
|
1788
|
+
minX: 0,
|
|
1789
|
+
minY: 0,
|
|
1790
|
+
maxX: 0,
|
|
1791
|
+
maxY: 0
|
|
1792
|
+
}) {
|
|
1793
|
+
if (e.size && e.id !== "root") {
|
|
1794
|
+
let { x: a, y: o, width: s, height: c } = e.size;
|
|
1795
|
+
a - s / 2 < t && (t = a - s / 2), o - c / 2 < n && (n = o - c / 2), a + s / 2 > r && (r = a + s / 2), o + c / 2 > i && (i = o + c / 2);
|
|
1796
|
+
}
|
|
1797
|
+
if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = yn(a, {
|
|
1798
|
+
minX: t,
|
|
1799
|
+
minY: n,
|
|
1800
|
+
maxX: r,
|
|
1801
|
+
maxY: i
|
|
1802
|
+
}));
|
|
1803
|
+
return {
|
|
1804
|
+
minX: t,
|
|
1805
|
+
minY: n,
|
|
1806
|
+
maxX: r,
|
|
1807
|
+
maxY: i
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1810
|
+
r(yn, "findBounds");
|
|
1811
|
+
function bn(e) {
|
|
1812
|
+
let t = e.getBlock("root");
|
|
1813
|
+
if (!t) return;
|
|
1814
|
+
H(t, e, 0, 0), vn(t, e), n.debug("getBlocks", JSON.stringify(t, null, 2));
|
|
1815
|
+
let { minX: r, minY: i, maxX: a, maxY: o } = yn(t), s = o - i;
|
|
1816
|
+
return {
|
|
1817
|
+
x: r,
|
|
1818
|
+
y: i,
|
|
1819
|
+
width: a - r,
|
|
1820
|
+
height: s
|
|
1821
|
+
};
|
|
1822
|
+
}
|
|
1823
|
+
r(bn, "layout");
|
|
1824
|
+
var U = /* @__PURE__ */ r(async (e, t, n, r = !1, i = !1) => {
|
|
1825
|
+
let a = t || "";
|
|
1826
|
+
typeof a == "object" && (a = a[0]);
|
|
1827
|
+
let o = c(), s = f(o);
|
|
1828
|
+
return await oe(e, a, {
|
|
1829
|
+
style: n,
|
|
1830
|
+
isTitle: r,
|
|
1831
|
+
useHtmlLabels: s,
|
|
1832
|
+
markdown: !1,
|
|
1833
|
+
isNode: i,
|
|
1834
|
+
width: Infinity
|
|
1835
|
+
}, o);
|
|
1836
|
+
}, "createLabel"), xn = /* @__PURE__ */ r((e, t, n, r, i) => {
|
|
1837
|
+
t.arrowTypeStart && Cn(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && Cn(e, "end", t.arrowTypeEnd, n, r, i);
|
|
1838
|
+
}, "addEdgeMarkers"), Sn = {
|
|
1839
|
+
arrow_cross: "cross",
|
|
1840
|
+
arrow_point: "point",
|
|
1841
|
+
arrow_barb: "barb",
|
|
1842
|
+
arrow_circle: "circle",
|
|
1843
|
+
aggregation: "aggregation",
|
|
1844
|
+
extension: "extension",
|
|
1845
|
+
composition: "composition",
|
|
1846
|
+
dependency: "dependency",
|
|
1847
|
+
lollipop: "lollipop"
|
|
1848
|
+
}, Cn = /* @__PURE__ */ r((e, t, r, i, a, o) => {
|
|
1849
|
+
let s = Sn[r];
|
|
1850
|
+
if (!s) {
|
|
1851
|
+
n.warn(`Unknown arrow type: ${r}`);
|
|
1852
|
+
return;
|
|
1853
|
+
}
|
|
1854
|
+
let c = t === "start" ? "Start" : "End";
|
|
1855
|
+
e.attr(`marker-${t}`, `url(${i}#${a}_${o}-${s}${c})`);
|
|
1856
|
+
}, "addEdgeMarker"), wn = {}, W = {}, Tn = /* @__PURE__ */ r(async (e, t) => {
|
|
1857
|
+
let n = c(), r = f(n), a = e.insert("g").attr("class", "edgeLabel"), o = a.insert("g").attr("class", "label"), s = t.labelType === "markdown", l = await oe(e, t.label, {
|
|
1858
|
+
style: t.labelStyle,
|
|
1859
|
+
useHtmlLabels: r,
|
|
1860
|
+
addSvgBackground: s,
|
|
1861
|
+
isNode: !1,
|
|
1862
|
+
markdown: s,
|
|
1863
|
+
width: s ? void 0 : Infinity
|
|
1864
|
+
}, n);
|
|
1865
|
+
o.node().appendChild(l);
|
|
1866
|
+
let u = l.getBBox(), d = u;
|
|
1867
|
+
if (r) {
|
|
1868
|
+
let e = l.children[0], t = i(l);
|
|
1869
|
+
u = e.getBoundingClientRect(), d = u, t.attr("width", u.width), t.attr("height", u.height);
|
|
1870
|
+
} else {
|
|
1871
|
+
let e = i(l).select("text").node();
|
|
1872
|
+
e && typeof e.getBBox == "function" && (d = e.getBBox());
|
|
1873
|
+
}
|
|
1874
|
+
o.attr("transform", N(d, r)), wn[t.id] = a, t.width = u.width, t.height = u.height;
|
|
1875
|
+
let p;
|
|
1876
|
+
if (t.startLabelLeft) {
|
|
1877
|
+
let n = e.insert("g").attr("class", "edgeTerminals"), a = n.insert("g").attr("class", "inner"), o = await U(a, t.startLabelLeft, t.labelStyle);
|
|
1878
|
+
p = o;
|
|
1879
|
+
let s = o.getBBox();
|
|
1880
|
+
if (r) {
|
|
1881
|
+
let e = o.children[0], t = i(o);
|
|
1882
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1883
|
+
}
|
|
1884
|
+
a.attr("transform", N(s, r)), W[t.id] || (W[t.id] = {}), W[t.id].startLeft = n, G(p, t.startLabelLeft);
|
|
1885
|
+
}
|
|
1886
|
+
if (t.startLabelRight) {
|
|
1887
|
+
let n = e.insert("g").attr("class", "edgeTerminals"), a = n.insert("g").attr("class", "inner"), o = await U(n, t.startLabelRight, t.labelStyle);
|
|
1888
|
+
p = o, a.node().appendChild(o);
|
|
1889
|
+
let s = o.getBBox();
|
|
1890
|
+
if (r) {
|
|
1891
|
+
let e = o.children[0], t = i(o);
|
|
1892
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1893
|
+
}
|
|
1894
|
+
a.attr("transform", N(s, r)), W[t.id] || (W[t.id] = {}), W[t.id].startRight = n, G(p, t.startLabelRight);
|
|
1895
|
+
}
|
|
1896
|
+
if (t.endLabelLeft) {
|
|
1897
|
+
let n = e.insert("g").attr("class", "edgeTerminals"), a = n.insert("g").attr("class", "inner"), o = await U(a, t.endLabelLeft, t.labelStyle);
|
|
1898
|
+
p = o;
|
|
1899
|
+
let s = o.getBBox();
|
|
1900
|
+
if (r) {
|
|
1901
|
+
let e = o.children[0], t = i(o);
|
|
1902
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1903
|
+
}
|
|
1904
|
+
a.attr("transform", N(s, r)), n.node().appendChild(o), W[t.id] || (W[t.id] = {}), W[t.id].endLeft = n, G(p, t.endLabelLeft);
|
|
1905
|
+
}
|
|
1906
|
+
if (t.endLabelRight) {
|
|
1907
|
+
let n = e.insert("g").attr("class", "edgeTerminals"), a = n.insert("g").attr("class", "inner"), o = await U(a, t.endLabelRight, t.labelStyle);
|
|
1908
|
+
p = o;
|
|
1909
|
+
let s = o.getBBox();
|
|
1910
|
+
if (r) {
|
|
1911
|
+
let e = o.children[0], t = i(o);
|
|
1912
|
+
s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
|
|
1913
|
+
}
|
|
1914
|
+
a.attr("transform", N(s, r)), n.node().appendChild(o), W[t.id] || (W[t.id] = {}), W[t.id].endRight = n, G(p, t.endLabelRight);
|
|
1915
|
+
}
|
|
1916
|
+
return l;
|
|
1917
|
+
}, "insertEdgeLabel");
|
|
1918
|
+
function G(e, t) {
|
|
1919
|
+
f(c()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1920
|
+
}
|
|
1921
|
+
r(G, "setTerminalWidth");
|
|
1922
|
+
var En = /* @__PURE__ */ r((e, t) => {
|
|
1923
|
+
n.debug("Moving label abc88 ", e.id, e.label, wn[e.id], t);
|
|
1924
|
+
let r = t.updatedPath ? t.updatedPath : t.originalPath, { subGraphTitleTotalMargin: i } = le(c());
|
|
1925
|
+
if (e.label) {
|
|
1926
|
+
let a = wn[e.id], o = e.x, s = e.y;
|
|
1927
|
+
if (r) {
|
|
1928
|
+
let i = A.calcLabelPosition(r);
|
|
1929
|
+
n.debug("Moving label " + e.label + " from (", o, ",", s, ") to (", i.x, ",", i.y, ") abc88"), t.updatedPath && (o = i.x, s = i.y);
|
|
1930
|
+
}
|
|
1931
|
+
a.attr("transform", `translate(${o}, ${s + i / 2})`);
|
|
1932
|
+
}
|
|
1933
|
+
if (e.startLabelLeft) {
|
|
1934
|
+
let t = W[e.id].startLeft, n = e.x, i = e.y;
|
|
1935
|
+
if (r) {
|
|
1936
|
+
let t = A.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", r);
|
|
1937
|
+
n = t.x, i = t.y;
|
|
1938
|
+
}
|
|
1939
|
+
t.attr("transform", `translate(${n}, ${i})`);
|
|
1940
|
+
}
|
|
1941
|
+
if (e.startLabelRight) {
|
|
1942
|
+
let t = W[e.id].startRight, n = e.x, i = e.y;
|
|
1943
|
+
if (r) {
|
|
1944
|
+
let t = A.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", r);
|
|
1945
|
+
n = t.x, i = t.y;
|
|
1946
|
+
}
|
|
1947
|
+
t.attr("transform", `translate(${n}, ${i})`);
|
|
1948
|
+
}
|
|
1949
|
+
if (e.endLabelLeft) {
|
|
1950
|
+
let t = W[e.id].endLeft, n = e.x, i = e.y;
|
|
1951
|
+
if (r) {
|
|
1952
|
+
let t = A.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", r);
|
|
1953
|
+
n = t.x, i = t.y;
|
|
1954
|
+
}
|
|
1955
|
+
t.attr("transform", `translate(${n}, ${i})`);
|
|
1956
|
+
}
|
|
1957
|
+
if (e.endLabelRight) {
|
|
1958
|
+
let t = W[e.id].endRight, n = e.x, i = e.y;
|
|
1959
|
+
if (r) {
|
|
1960
|
+
let t = A.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", r);
|
|
1961
|
+
n = t.x, i = t.y;
|
|
1962
|
+
}
|
|
1963
|
+
t.attr("transform", `translate(${n}, ${i})`);
|
|
1964
|
+
}
|
|
1965
|
+
}, "positionEdgeLabel"), Dn = /* @__PURE__ */ r((e, t) => {
|
|
1966
|
+
let n = e.x, r = e.y, i = Math.abs(t.x - n), a = Math.abs(t.y - r), o = e.width / 2, s = e.height / 2;
|
|
1967
|
+
return i >= o || a >= s;
|
|
1968
|
+
}, "outsideNode"), On = /* @__PURE__ */ r((e, t, r) => {
|
|
1969
|
+
n.debug(`intersection calc abc89:
|
|
1970
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
1971
|
+
insidePoint : ${JSON.stringify(r)}
|
|
1972
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
1973
|
+
let i = e.x, a = e.y, o = Math.abs(i - r.x), s = e.width / 2, c = r.x < t.x ? s - o : s + o, l = e.height / 2, u = Math.abs(t.y - r.y), d = Math.abs(t.x - r.x);
|
|
1974
|
+
if (Math.abs(a - t.y) * s > Math.abs(i - t.x) * l) {
|
|
1975
|
+
let e = r.y < t.y ? t.y - l - a : a - l - t.y;
|
|
1976
|
+
c = d * e / u;
|
|
1977
|
+
let i = {
|
|
1978
|
+
x: r.x < t.x ? r.x + c : r.x - d + c,
|
|
1979
|
+
y: r.y < t.y ? r.y + u - e : r.y - u + e
|
|
1980
|
+
};
|
|
1981
|
+
return c === 0 && (i.x = t.x, i.y = t.y), d === 0 && (i.x = t.x), u === 0 && (i.y = t.y), n.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${c}`, i), i;
|
|
1982
|
+
} else {
|
|
1983
|
+
c = r.x < t.x ? t.x - s - i : i - s - t.x;
|
|
1984
|
+
let e = u * c / d, a = r.x < t.x ? r.x + d - c : r.x - d + c, o = r.y < t.y ? r.y + e : r.y - e;
|
|
1985
|
+
return n.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${c}`, {
|
|
1986
|
+
_x: a,
|
|
1987
|
+
_y: o
|
|
1988
|
+
}), c === 0 && (a = t.x, o = t.y), d === 0 && (a = t.x), u === 0 && (o = t.y), {
|
|
1989
|
+
x: a,
|
|
1990
|
+
y: o
|
|
1991
|
+
};
|
|
1992
|
+
}
|
|
1993
|
+
}, "intersection"), kn = /* @__PURE__ */ r((e, t) => {
|
|
1994
|
+
n.debug("abc88 cutPathAtIntersect", e, t);
|
|
1995
|
+
let r = [], i = e[0], a = !1;
|
|
1996
|
+
return e.forEach((e) => {
|
|
1997
|
+
if (!Dn(t, e) && !a) {
|
|
1998
|
+
let n = On(t, i, e), o = !1;
|
|
1999
|
+
r.forEach((e) => {
|
|
2000
|
+
o = o || e.x === n.x && e.y === n.y;
|
|
2001
|
+
}), r.some((e) => e.x === n.x && e.y === n.y) || r.push(n), a = !0;
|
|
2002
|
+
} else i = e, a || r.push(e);
|
|
2003
|
+
}), r;
|
|
2004
|
+
}, "cutPathAtIntersect"), An = /* @__PURE__ */ r(function(e, t, r, i, o, s, l) {
|
|
2005
|
+
let u = r.points;
|
|
2006
|
+
n.debug("abc88 InsertEdge: edge=", r, "e=", t);
|
|
2007
|
+
let d = !1, f = s.node(t.v);
|
|
2008
|
+
var p = s.node(t.w);
|
|
2009
|
+
p != null && p.intersect && f != null && f.intersect && (u = u.slice(1, r.points.length - 1), u.unshift(f.intersect(u[0])), u.push(p.intersect(u[u.length - 1]))), r.toCluster && (n.debug("to cluster abc88", i[r.toCluster]), u = kn(r.points, i[r.toCluster].node), d = !0), r.fromCluster && (n.debug("from cluster abc88", i[r.fromCluster]), u = kn(u.reverse(), i[r.fromCluster].node).reverse(), d = !0);
|
|
2010
|
+
let m = u.filter((e) => !Number.isNaN(e.y)), g = h;
|
|
2011
|
+
r.curve && (o === "graph" || o === "flowchart") && (g = r.curve);
|
|
2012
|
+
let { x: _, y: v } = ce(r), y = ae().x(_).y(v).curve(g), b;
|
|
2013
|
+
switch (r.thickness) {
|
|
2014
|
+
case "normal":
|
|
2015
|
+
b = "edge-thickness-normal";
|
|
2016
|
+
break;
|
|
2017
|
+
case "thick":
|
|
2018
|
+
b = "edge-thickness-thick";
|
|
2019
|
+
break;
|
|
2020
|
+
case "invisible":
|
|
2021
|
+
b = "edge-thickness-thick";
|
|
2022
|
+
break;
|
|
2023
|
+
default: b = "";
|
|
2024
|
+
}
|
|
2025
|
+
switch (r.pattern) {
|
|
2026
|
+
case "solid":
|
|
2027
|
+
b += " edge-pattern-solid";
|
|
2028
|
+
break;
|
|
2029
|
+
case "dotted":
|
|
2030
|
+
b += " edge-pattern-dotted";
|
|
2031
|
+
break;
|
|
2032
|
+
case "dashed":
|
|
2033
|
+
b += " edge-pattern-dashed";
|
|
2034
|
+
break;
|
|
2035
|
+
}
|
|
2036
|
+
let x = e.append("path").attr("d", y(m)).attr("id", r.id).attr("class", " " + b + (r.classes ? " " + r.classes : "")).attr("style", r.style), S = "";
|
|
2037
|
+
(c().flowchart.arrowMarkerAbsolute || c().state.arrowMarkerAbsolute) && (S = a(!0)), xn(x, r, S, l, o);
|
|
2038
|
+
let C = {};
|
|
2039
|
+
return d && (C.updatedPath = u), C.originalPath = r.points, C;
|
|
2040
|
+
}, "insertEdge"), jn = /* @__PURE__ */ r((e) => {
|
|
2041
|
+
let t = /* @__PURE__ */ new Set();
|
|
2042
|
+
for (let n of e) switch (n) {
|
|
2043
|
+
case "x":
|
|
2044
|
+
t.add("right"), t.add("left");
|
|
2045
|
+
break;
|
|
2046
|
+
case "y":
|
|
2047
|
+
t.add("up"), t.add("down");
|
|
2048
|
+
break;
|
|
2049
|
+
default:
|
|
2050
|
+
t.add(n);
|
|
2051
|
+
break;
|
|
2052
|
+
}
|
|
2053
|
+
return t;
|
|
2054
|
+
}, "expandAndDeduplicateDirections"), Mn = /* @__PURE__ */ r((e, t, n) => {
|
|
2055
|
+
let r = jn(e), i = t.height + 2 * n.padding, a = i / 2, o = t.width + 2 * a + n.padding, s = n.padding / 2;
|
|
2056
|
+
return r.has("right") && r.has("left") && r.has("up") && r.has("down") ? [
|
|
2057
|
+
{
|
|
2058
|
+
x: 0,
|
|
2059
|
+
y: 0
|
|
2060
|
+
},
|
|
2061
|
+
{
|
|
2062
|
+
x: a,
|
|
2063
|
+
y: 0
|
|
2064
|
+
},
|
|
2065
|
+
{
|
|
2066
|
+
x: o / 2,
|
|
2067
|
+
y: 2 * s
|
|
2068
|
+
},
|
|
2069
|
+
{
|
|
2070
|
+
x: o - a,
|
|
2071
|
+
y: 0
|
|
2072
|
+
},
|
|
2073
|
+
{
|
|
2074
|
+
x: o,
|
|
2075
|
+
y: 0
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
x: o,
|
|
2079
|
+
y: -i / 3
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
x: o + 2 * s,
|
|
2083
|
+
y: -i / 2
|
|
2084
|
+
},
|
|
2085
|
+
{
|
|
2086
|
+
x: o,
|
|
2087
|
+
y: -2 * i / 3
|
|
2088
|
+
},
|
|
2089
|
+
{
|
|
2090
|
+
x: o,
|
|
2091
|
+
y: -i
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
x: o - a,
|
|
2095
|
+
y: -i
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
x: o / 2,
|
|
2099
|
+
y: -i - 2 * s
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
x: a,
|
|
2103
|
+
y: -i
|
|
2104
|
+
},
|
|
2105
|
+
{
|
|
2106
|
+
x: 0,
|
|
2107
|
+
y: -i
|
|
2108
|
+
},
|
|
2109
|
+
{
|
|
2110
|
+
x: 0,
|
|
2111
|
+
y: -2 * i / 3
|
|
2112
|
+
},
|
|
2113
|
+
{
|
|
2114
|
+
x: -2 * s,
|
|
2115
|
+
y: -i / 2
|
|
2116
|
+
},
|
|
2117
|
+
{
|
|
2118
|
+
x: 0,
|
|
2119
|
+
y: -i / 3
|
|
2120
|
+
}
|
|
2121
|
+
] : r.has("right") && r.has("left") && r.has("up") ? [
|
|
2122
|
+
{
|
|
2123
|
+
x: a,
|
|
2124
|
+
y: 0
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
x: o - a,
|
|
2128
|
+
y: 0
|
|
2129
|
+
},
|
|
2130
|
+
{
|
|
2131
|
+
x: o,
|
|
2132
|
+
y: -i / 2
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
x: o - a,
|
|
2136
|
+
y: -i
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
x: a,
|
|
2140
|
+
y: -i
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
x: 0,
|
|
2144
|
+
y: -i / 2
|
|
2145
|
+
}
|
|
2146
|
+
] : r.has("right") && r.has("left") && r.has("down") ? [
|
|
2147
|
+
{
|
|
2148
|
+
x: 0,
|
|
2149
|
+
y: 0
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
x: a,
|
|
2153
|
+
y: -i
|
|
2154
|
+
},
|
|
2155
|
+
{
|
|
2156
|
+
x: o - a,
|
|
2157
|
+
y: -i
|
|
2158
|
+
},
|
|
2159
|
+
{
|
|
2160
|
+
x: o,
|
|
2161
|
+
y: 0
|
|
2162
|
+
}
|
|
2163
|
+
] : r.has("right") && r.has("up") && r.has("down") ? [
|
|
2164
|
+
{
|
|
2165
|
+
x: 0,
|
|
2166
|
+
y: 0
|
|
2167
|
+
},
|
|
2168
|
+
{
|
|
2169
|
+
x: o,
|
|
2170
|
+
y: -a
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
x: o,
|
|
2174
|
+
y: -i + a
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
x: 0,
|
|
2178
|
+
y: -i
|
|
2179
|
+
}
|
|
2180
|
+
] : r.has("left") && r.has("up") && r.has("down") ? [
|
|
2181
|
+
{
|
|
2182
|
+
x: o,
|
|
2183
|
+
y: 0
|
|
2184
|
+
},
|
|
2185
|
+
{
|
|
2186
|
+
x: 0,
|
|
2187
|
+
y: -a
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
x: 0,
|
|
2191
|
+
y: -i + a
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
x: o,
|
|
2195
|
+
y: -i
|
|
2196
|
+
}
|
|
2197
|
+
] : r.has("right") && r.has("left") ? [
|
|
2198
|
+
{
|
|
2199
|
+
x: a,
|
|
2200
|
+
y: 0
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
x: a,
|
|
2204
|
+
y: -s
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
x: o - a,
|
|
2208
|
+
y: -s
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
x: o - a,
|
|
2212
|
+
y: 0
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
x: o,
|
|
2216
|
+
y: -i / 2
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
x: o - a,
|
|
2220
|
+
y: -i
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
x: o - a,
|
|
2224
|
+
y: -i + s
|
|
2225
|
+
},
|
|
2226
|
+
{
|
|
2227
|
+
x: a,
|
|
2228
|
+
y: -i + s
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
x: a,
|
|
2232
|
+
y: -i
|
|
2233
|
+
},
|
|
2234
|
+
{
|
|
2235
|
+
x: 0,
|
|
2236
|
+
y: -i / 2
|
|
2237
|
+
}
|
|
2238
|
+
] : r.has("up") && r.has("down") ? [
|
|
2239
|
+
{
|
|
2240
|
+
x: o / 2,
|
|
2241
|
+
y: 0
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
x: 0,
|
|
2245
|
+
y: -s
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
x: a,
|
|
2249
|
+
y: -s
|
|
2250
|
+
},
|
|
2251
|
+
{
|
|
2252
|
+
x: a,
|
|
2253
|
+
y: -i + s
|
|
2254
|
+
},
|
|
2255
|
+
{
|
|
2256
|
+
x: 0,
|
|
2257
|
+
y: -i + s
|
|
2258
|
+
},
|
|
2259
|
+
{
|
|
2260
|
+
x: o / 2,
|
|
2261
|
+
y: -i
|
|
2262
|
+
},
|
|
2263
|
+
{
|
|
2264
|
+
x: o,
|
|
2265
|
+
y: -i + s
|
|
2266
|
+
},
|
|
2267
|
+
{
|
|
2268
|
+
x: o - a,
|
|
2269
|
+
y: -i + s
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
x: o - a,
|
|
2273
|
+
y: -s
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
x: o,
|
|
2277
|
+
y: -s
|
|
2278
|
+
}
|
|
2279
|
+
] : r.has("right") && r.has("up") ? [
|
|
2280
|
+
{
|
|
2281
|
+
x: 0,
|
|
2282
|
+
y: 0
|
|
2283
|
+
},
|
|
2284
|
+
{
|
|
2285
|
+
x: o,
|
|
2286
|
+
y: -a
|
|
2287
|
+
},
|
|
2288
|
+
{
|
|
2289
|
+
x: 0,
|
|
2290
|
+
y: -i
|
|
2291
|
+
}
|
|
2292
|
+
] : r.has("right") && r.has("down") ? [
|
|
2293
|
+
{
|
|
2294
|
+
x: 0,
|
|
2295
|
+
y: 0
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
x: o,
|
|
2299
|
+
y: 0
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
x: 0,
|
|
2303
|
+
y: -i
|
|
2304
|
+
}
|
|
2305
|
+
] : r.has("left") && r.has("up") ? [
|
|
2306
|
+
{
|
|
2307
|
+
x: o,
|
|
2308
|
+
y: 0
|
|
2309
|
+
},
|
|
2310
|
+
{
|
|
2311
|
+
x: 0,
|
|
2312
|
+
y: -a
|
|
2313
|
+
},
|
|
2314
|
+
{
|
|
2315
|
+
x: o,
|
|
2316
|
+
y: -i
|
|
2317
|
+
}
|
|
2318
|
+
] : r.has("left") && r.has("down") ? [
|
|
2319
|
+
{
|
|
2320
|
+
x: o,
|
|
2321
|
+
y: 0
|
|
2322
|
+
},
|
|
2323
|
+
{
|
|
2324
|
+
x: 0,
|
|
2325
|
+
y: 0
|
|
2326
|
+
},
|
|
2327
|
+
{
|
|
2328
|
+
x: o,
|
|
2329
|
+
y: -i
|
|
2330
|
+
}
|
|
2331
|
+
] : r.has("right") ? [
|
|
2332
|
+
{
|
|
2333
|
+
x: a,
|
|
2334
|
+
y: -s
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
x: a,
|
|
2338
|
+
y: -s
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
x: o - a,
|
|
2342
|
+
y: -s
|
|
2343
|
+
},
|
|
2344
|
+
{
|
|
2345
|
+
x: o - a,
|
|
2346
|
+
y: 0
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
x: o,
|
|
2350
|
+
y: -i / 2
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
x: o - a,
|
|
2354
|
+
y: -i
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
x: o - a,
|
|
2358
|
+
y: -i + s
|
|
2359
|
+
},
|
|
2360
|
+
{
|
|
2361
|
+
x: a,
|
|
2362
|
+
y: -i + s
|
|
2363
|
+
},
|
|
2364
|
+
{
|
|
2365
|
+
x: a,
|
|
2366
|
+
y: -i + s
|
|
2367
|
+
}
|
|
2368
|
+
] : r.has("left") ? [
|
|
2369
|
+
{
|
|
2370
|
+
x: a,
|
|
2371
|
+
y: 0
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
x: a,
|
|
2375
|
+
y: -s
|
|
2376
|
+
},
|
|
2377
|
+
{
|
|
2378
|
+
x: o - a,
|
|
2379
|
+
y: -s
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
x: o - a,
|
|
2383
|
+
y: -i + s
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
x: a,
|
|
2387
|
+
y: -i + s
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
x: a,
|
|
2391
|
+
y: -i
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
x: 0,
|
|
2395
|
+
y: -i / 2
|
|
2396
|
+
}
|
|
2397
|
+
] : r.has("up") ? [
|
|
2398
|
+
{
|
|
2399
|
+
x: a,
|
|
2400
|
+
y: -s
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
x: a,
|
|
2404
|
+
y: -i + s
|
|
2405
|
+
},
|
|
2406
|
+
{
|
|
2407
|
+
x: 0,
|
|
2408
|
+
y: -i + s
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
x: o / 2,
|
|
2412
|
+
y: -i
|
|
2413
|
+
},
|
|
2414
|
+
{
|
|
2415
|
+
x: o,
|
|
2416
|
+
y: -i + s
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
x: o - a,
|
|
2420
|
+
y: -i + s
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
x: o - a,
|
|
2424
|
+
y: -s
|
|
2425
|
+
}
|
|
2426
|
+
] : r.has("down") ? [
|
|
2427
|
+
{
|
|
2428
|
+
x: o / 2,
|
|
2429
|
+
y: 0
|
|
2430
|
+
},
|
|
2431
|
+
{
|
|
2432
|
+
x: 0,
|
|
2433
|
+
y: -s
|
|
2434
|
+
},
|
|
2435
|
+
{
|
|
2436
|
+
x: a,
|
|
2437
|
+
y: -s
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
x: a,
|
|
2441
|
+
y: -i + s
|
|
2442
|
+
},
|
|
2443
|
+
{
|
|
2444
|
+
x: o - a,
|
|
2445
|
+
y: -i + s
|
|
2446
|
+
},
|
|
2447
|
+
{
|
|
2448
|
+
x: o - a,
|
|
2449
|
+
y: -s
|
|
2450
|
+
},
|
|
2451
|
+
{
|
|
2452
|
+
x: o,
|
|
2453
|
+
y: -s
|
|
2454
|
+
}
|
|
2455
|
+
] : [{
|
|
2456
|
+
x: 0,
|
|
2457
|
+
y: 0
|
|
2458
|
+
}];
|
|
2459
|
+
}, "getArrowPoints");
|
|
2460
|
+
function Nn(e, t) {
|
|
2461
|
+
return e.intersect(t);
|
|
2462
|
+
}
|
|
2463
|
+
r(Nn, "intersectNode");
|
|
2464
|
+
var Pn = Nn;
|
|
2465
|
+
function Fn(e, t, n, r) {
|
|
2466
|
+
var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
|
|
2467
|
+
r.x < i && (l = -l);
|
|
2468
|
+
var u = Math.abs(t * n * s / c);
|
|
2469
|
+
return r.y < a && (u = -u), {
|
|
2470
|
+
x: i + l,
|
|
2471
|
+
y: a + u
|
|
2472
|
+
};
|
|
2473
|
+
}
|
|
2474
|
+
r(Fn, "intersectEllipse");
|
|
2475
|
+
var In = Fn;
|
|
2476
|
+
function Ln(e, t, n) {
|
|
2477
|
+
return In(e, t, t, n);
|
|
2478
|
+
}
|
|
2479
|
+
r(Ln, "intersectCircle");
|
|
2480
|
+
var Rn = Ln;
|
|
2481
|
+
function zn(e, t, n, r) {
|
|
2482
|
+
var i = t.y - e.y, a, o = e.x - t.x, s, c = t.x * e.y - e.x * t.y, l, u, d, f = i * n.x + o * n.y + c, p = i * r.x + o * r.y + c, m, h, g, _, v;
|
|
2483
|
+
if (!(f !== 0 && p !== 0 && Bn(f, p)) && (a = r.y - n.y, s = n.x - r.x, l = r.x * n.y - n.x * r.y, u = a * e.x + s * e.y + l, d = a * t.x + s * t.y + l, !(u !== 0 && d !== 0 && Bn(u, d)) && (m = i * s - a * o, m !== 0))) return h = Math.abs(m / 2), g = o * l - s * c, _ = g < 0 ? (g - h) / m : (g + h) / m, g = a * c - i * l, v = g < 0 ? (g - h) / m : (g + h) / m, {
|
|
2484
|
+
x: _,
|
|
2485
|
+
y: v
|
|
2486
|
+
};
|
|
2487
|
+
}
|
|
2488
|
+
r(zn, "intersectLine");
|
|
2489
|
+
function Bn(e, t) {
|
|
2490
|
+
return e * t > 0;
|
|
2491
|
+
}
|
|
2492
|
+
r(Bn, "sameSign");
|
|
2493
|
+
var Vn = zn, Hn = Un;
|
|
2494
|
+
function Un(e, t, n) {
|
|
2495
|
+
var r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
|
|
2496
|
+
typeof t.forEach == "function" ? t.forEach(function(e) {
|
|
2497
|
+
o = Math.min(o, e.x), s = Math.min(s, e.y);
|
|
2498
|
+
}) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
|
|
2499
|
+
for (var c = r - e.width / 2 - o, l = i - e.height / 2 - s, u = 0; u < t.length; u++) {
|
|
2500
|
+
var d = t[u], f = t[u < t.length - 1 ? u + 1 : 0], p = Vn(e, n, {
|
|
2501
|
+
x: c + d.x,
|
|
2502
|
+
y: l + d.y
|
|
2503
|
+
}, {
|
|
2504
|
+
x: c + f.x,
|
|
2505
|
+
y: l + f.y
|
|
2506
|
+
});
|
|
2507
|
+
p && a.push(p);
|
|
2508
|
+
}
|
|
2509
|
+
return a.length ? (a.length > 1 && a.sort(function(e, t) {
|
|
2510
|
+
var r = e.x - n.x, i = e.y - n.y, a = Math.sqrt(r * r + i * i), o = t.x - n.x, s = t.y - n.y, c = Math.sqrt(o * o + s * s);
|
|
2511
|
+
return a < c ? -1 : a === c ? 0 : 1;
|
|
2512
|
+
}), a[0]) : e;
|
|
2513
|
+
}
|
|
2514
|
+
r(Un, "intersectPolygon");
|
|
2515
|
+
var K = {
|
|
2516
|
+
node: Pn,
|
|
2517
|
+
circle: Rn,
|
|
2518
|
+
ellipse: In,
|
|
2519
|
+
polygon: Hn,
|
|
2520
|
+
rect: /* @__PURE__ */ r((e, t) => {
|
|
2521
|
+
var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
|
|
2522
|
+
return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
|
|
2523
|
+
x: n + c,
|
|
2524
|
+
y: r + l
|
|
2525
|
+
};
|
|
2526
|
+
}, "intersectRect")
|
|
2527
|
+
}, q = /* @__PURE__ */ r(async (e, t, n, r) => {
|
|
2528
|
+
let a = c(), s, l = t.useHtmlLabels || f(a);
|
|
2529
|
+
s = n || "node default";
|
|
2530
|
+
let u = e.insert("g").attr("class", s).attr("id", t.domId || t.id), d = u.insert("g").attr("class", "label").attr("style", t.labelStyle), p;
|
|
2531
|
+
p = t.labelText === void 0 ? "" : typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
2532
|
+
let m;
|
|
2533
|
+
m = t.labelType === "markdown" ? oe(d, o(j(p), a), {
|
|
2534
|
+
useHtmlLabels: l,
|
|
2535
|
+
width: t.width || a.flowchart.wrappingWidth,
|
|
2536
|
+
classes: "markdown-node-label"
|
|
2537
|
+
}, a) : await U(d, o(j(p), a), t.labelStyle, !1, r);
|
|
2538
|
+
let h = m.getBBox(), g = t.padding / 2;
|
|
2539
|
+
if (f(a)) {
|
|
2540
|
+
let e = m.children[0], t = i(m);
|
|
2541
|
+
await ue(e, p), h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
|
|
2542
|
+
}
|
|
2543
|
+
return l ? d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")") : d.attr("transform", "translate(0, " + -h.height / 2 + ")"), t.centerLabel && d.attr("transform", "translate(" + -h.width / 2 + ", " + -h.height / 2 + ")"), d.insert("rect", ":first-child"), {
|
|
2544
|
+
shapeSvg: u,
|
|
2545
|
+
bbox: h,
|
|
2546
|
+
halfPadding: g,
|
|
2547
|
+
label: d
|
|
2548
|
+
};
|
|
2549
|
+
}, "labelHelper"), J = /* @__PURE__ */ r((e, t) => {
|
|
2550
|
+
let n = t.node().getBBox();
|
|
2551
|
+
e.width = n.width, e.height = n.height;
|
|
2552
|
+
}, "updateNodeBounds");
|
|
2553
|
+
function Y(e, t, n, r) {
|
|
2554
|
+
return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
|
|
2555
|
+
return e.x + "," + e.y;
|
|
2556
|
+
}).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
|
|
2557
|
+
}
|
|
2558
|
+
r(Y, "insertPolygonShape");
|
|
2559
|
+
var Wn = /* @__PURE__ */ r(async (e, t) => {
|
|
2560
|
+
t.useHtmlLabels || f(c()) || (t.centerLabel = !0);
|
|
2561
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, t, "node " + t.classes, !0);
|
|
2562
|
+
n.info("Classes = ", t.classes);
|
|
2563
|
+
let o = r.insert("rect", ":first-child");
|
|
2564
|
+
return o.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - a).attr("y", -i.height / 2 - a).attr("width", i.width + t.padding).attr("height", i.height + t.padding), J(t, o), t.intersect = function(e) {
|
|
2565
|
+
return K.rect(t, e);
|
|
2566
|
+
}, r;
|
|
2567
|
+
}, "note"), Gn = /* @__PURE__ */ r((e) => e ? " " + e : "", "formatClass"), X = /* @__PURE__ */ r((e, t) => `${t || "node default"}${Gn(e.classes)} ${Gn(e.class)}`, "getClassesFromNode"), Kn = /* @__PURE__ */ r(async (e, t) => {
|
|
2568
|
+
let { shapeSvg: r, bbox: i } = await q(e, t, X(t, void 0), !0), a = i.width + t.padding + (i.height + t.padding), o = [
|
|
2569
|
+
{
|
|
2570
|
+
x: a / 2,
|
|
2571
|
+
y: 0
|
|
2572
|
+
},
|
|
2573
|
+
{
|
|
2574
|
+
x: a,
|
|
2575
|
+
y: -a / 2
|
|
2576
|
+
},
|
|
2577
|
+
{
|
|
2578
|
+
x: a / 2,
|
|
2579
|
+
y: -a
|
|
2580
|
+
},
|
|
2581
|
+
{
|
|
2582
|
+
x: 0,
|
|
2583
|
+
y: -a / 2
|
|
2584
|
+
}
|
|
2585
|
+
];
|
|
2586
|
+
n.info("Question main (Circle)");
|
|
2587
|
+
let s = Y(r, a, a, o);
|
|
2588
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2589
|
+
return n.warn("Intersect called"), K.polygon(t, o, e);
|
|
2590
|
+
}, r;
|
|
2591
|
+
}, "question"), qn = /* @__PURE__ */ r((e, t) => {
|
|
2592
|
+
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
2593
|
+
return n.insert("polygon", ":first-child").attr("points", [
|
|
2594
|
+
{
|
|
2595
|
+
x: 0,
|
|
2596
|
+
y: 28 / 2
|
|
2597
|
+
},
|
|
2598
|
+
{
|
|
2599
|
+
x: 28 / 2,
|
|
2600
|
+
y: 0
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
x: 0,
|
|
2604
|
+
y: -28 / 2
|
|
2605
|
+
},
|
|
2606
|
+
{
|
|
2607
|
+
x: -28 / 2,
|
|
2608
|
+
y: 0
|
|
2609
|
+
}
|
|
2610
|
+
].map(function(e) {
|
|
2611
|
+
return e.x + "," + e.y;
|
|
2612
|
+
}).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
|
|
2613
|
+
return K.circle(t, 14, e);
|
|
2614
|
+
}, n;
|
|
2615
|
+
}, "choice"), Jn = /* @__PURE__ */ r(async (e, t) => {
|
|
2616
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.height + t.padding, a = i / 4, o = r.width + 2 * a + t.padding, s = [
|
|
2617
|
+
{
|
|
2618
|
+
x: a,
|
|
2619
|
+
y: 0
|
|
2620
|
+
},
|
|
2621
|
+
{
|
|
2622
|
+
x: o - a,
|
|
2623
|
+
y: 0
|
|
2624
|
+
},
|
|
2625
|
+
{
|
|
2626
|
+
x: o,
|
|
2627
|
+
y: -i / 2
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
x: o - a,
|
|
2631
|
+
y: -i
|
|
2632
|
+
},
|
|
2633
|
+
{
|
|
2634
|
+
x: a,
|
|
2635
|
+
y: -i
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
x: 0,
|
|
2639
|
+
y: -i / 2
|
|
2640
|
+
}
|
|
2641
|
+
], c = Y(n, o, i, s);
|
|
2642
|
+
return c.attr("style", t.style), J(t, c), t.intersect = function(e) {
|
|
2643
|
+
return K.polygon(t, s, e);
|
|
2644
|
+
}, n;
|
|
2645
|
+
}, "hexagon"), Yn = /* @__PURE__ */ r(async (e, t) => {
|
|
2646
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, void 0, !0), i = r.height + 2 * t.padding, a = i / 2, o = r.width + 2 * a + t.padding, s = Mn(t.directions, r, t), c = Y(n, o, i, s);
|
|
2647
|
+
return c.attr("style", t.style), J(t, c), t.intersect = function(e) {
|
|
2648
|
+
return K.polygon(t, s, e);
|
|
2649
|
+
}, n;
|
|
2650
|
+
}, "block_arrow"), Xn = /* @__PURE__ */ r(async (e, t) => {
|
|
2651
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2652
|
+
{
|
|
2653
|
+
x: -a / 2,
|
|
2654
|
+
y: 0
|
|
2655
|
+
},
|
|
2656
|
+
{
|
|
2657
|
+
x: i,
|
|
2658
|
+
y: 0
|
|
2659
|
+
},
|
|
2660
|
+
{
|
|
2661
|
+
x: i,
|
|
2662
|
+
y: -a
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
x: -a / 2,
|
|
2666
|
+
y: -a
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
x: 0,
|
|
2670
|
+
y: -a / 2
|
|
2671
|
+
}
|
|
2672
|
+
];
|
|
2673
|
+
return Y(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
|
|
2674
|
+
return K.polygon(t, o, e);
|
|
2675
|
+
}, n;
|
|
2676
|
+
}, "rect_left_inv_arrow"), Zn = /* @__PURE__ */ r(async (e, t) => {
|
|
2677
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2678
|
+
{
|
|
2679
|
+
x: -2 * a / 6,
|
|
2680
|
+
y: 0
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
x: i - a / 6,
|
|
2684
|
+
y: 0
|
|
2685
|
+
},
|
|
2686
|
+
{
|
|
2687
|
+
x: i + 2 * a / 6,
|
|
2688
|
+
y: -a
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
x: a / 6,
|
|
2692
|
+
y: -a
|
|
2693
|
+
}
|
|
2694
|
+
], s = Y(n, i, a, o);
|
|
2695
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2696
|
+
return K.polygon(t, o, e);
|
|
2697
|
+
}, n;
|
|
2698
|
+
}, "lean_right"), Qn = /* @__PURE__ */ r(async (e, t) => {
|
|
2699
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2700
|
+
{
|
|
2701
|
+
x: 2 * a / 6,
|
|
2702
|
+
y: 0
|
|
2703
|
+
},
|
|
2704
|
+
{
|
|
2705
|
+
x: i + a / 6,
|
|
2706
|
+
y: 0
|
|
2707
|
+
},
|
|
2708
|
+
{
|
|
2709
|
+
x: i - 2 * a / 6,
|
|
2710
|
+
y: -a
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
x: -a / 6,
|
|
2714
|
+
y: -a
|
|
2715
|
+
}
|
|
2716
|
+
], s = Y(n, i, a, o);
|
|
2717
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2718
|
+
return K.polygon(t, o, e);
|
|
2719
|
+
}, n;
|
|
2720
|
+
}, "lean_left"), $n = /* @__PURE__ */ r(async (e, t) => {
|
|
2721
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2722
|
+
{
|
|
2723
|
+
x: -2 * a / 6,
|
|
2724
|
+
y: 0
|
|
2725
|
+
},
|
|
2726
|
+
{
|
|
2727
|
+
x: i + 2 * a / 6,
|
|
2728
|
+
y: 0
|
|
2729
|
+
},
|
|
2730
|
+
{
|
|
2731
|
+
x: i - a / 6,
|
|
2732
|
+
y: -a
|
|
2733
|
+
},
|
|
2734
|
+
{
|
|
2735
|
+
x: a / 6,
|
|
2736
|
+
y: -a
|
|
2737
|
+
}
|
|
2738
|
+
], s = Y(n, i, a, o);
|
|
2739
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2740
|
+
return K.polygon(t, o, e);
|
|
2741
|
+
}, n;
|
|
2742
|
+
}, "trapezoid"), er = /* @__PURE__ */ r(async (e, t) => {
|
|
2743
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2744
|
+
{
|
|
2745
|
+
x: a / 6,
|
|
2746
|
+
y: 0
|
|
2747
|
+
},
|
|
2748
|
+
{
|
|
2749
|
+
x: i - a / 6,
|
|
2750
|
+
y: 0
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
x: i + 2 * a / 6,
|
|
2754
|
+
y: -a
|
|
2755
|
+
},
|
|
2756
|
+
{
|
|
2757
|
+
x: -2 * a / 6,
|
|
2758
|
+
y: -a
|
|
2759
|
+
}
|
|
2760
|
+
], s = Y(n, i, a, o);
|
|
2761
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2762
|
+
return K.polygon(t, o, e);
|
|
2763
|
+
}, n;
|
|
2764
|
+
}, "inv_trapezoid"), tr = /* @__PURE__ */ r(async (e, t) => {
|
|
2765
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2766
|
+
{
|
|
2767
|
+
x: 0,
|
|
2768
|
+
y: 0
|
|
2769
|
+
},
|
|
2770
|
+
{
|
|
2771
|
+
x: i + a / 2,
|
|
2772
|
+
y: 0
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
x: i,
|
|
2776
|
+
y: -a / 2
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
x: i + a / 2,
|
|
2780
|
+
y: -a
|
|
2781
|
+
},
|
|
2782
|
+
{
|
|
2783
|
+
x: 0,
|
|
2784
|
+
y: -a
|
|
2785
|
+
}
|
|
2786
|
+
], s = Y(n, i, a, o);
|
|
2787
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2788
|
+
return K.polygon(t, o, e);
|
|
2789
|
+
}, n;
|
|
2790
|
+
}, "rect_right_inv_arrow"), nr = /* @__PURE__ */ r(async (e, t) => {
|
|
2791
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = i / 2, o = a / (2.5 + i / 50), s = r.height + o + t.padding, c = "M 0," + o + " a " + a + "," + o + " 0,0,0 " + i + " 0 a " + a + "," + o + " 0,0,0 " + -i + " 0 l 0," + s + " a " + a + "," + o + " 0,0,0 " + i + " 0 l 0," + -s;
|
|
2792
|
+
return J(t, n.attr("label-offset-y", o).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -i / 2 + "," + -(s / 2 + o) + ")")), t.intersect = function(e) {
|
|
2793
|
+
let n = K.rect(t, e), r = n.x - t.x;
|
|
2794
|
+
if (a != 0 && (Math.abs(r) < t.width / 2 || Math.abs(r) == t.width / 2 && Math.abs(n.y - t.y) > t.height / 2 - o)) {
|
|
2795
|
+
let i = o * o * (1 - r * r / (a * a));
|
|
2796
|
+
i != 0 && (i = Math.sqrt(i)), i = o - i, e.y - t.y > 0 && (i = -i), n.y += i;
|
|
2797
|
+
}
|
|
2798
|
+
return n;
|
|
2799
|
+
}, n;
|
|
2800
|
+
}, "cylinder"), rr = /* @__PURE__ */ r(async (e, t) => {
|
|
2801
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, t, "node " + t.classes + " " + t.class, !0), o = r.insert("rect", ":first-child"), s = t.positioned ? t.width : i.width + t.padding, c = t.positioned ? t.height : i.height + t.padding, l = t.positioned ? -s / 2 : -i.width / 2 - a, u = t.positioned ? -c / 2 : -i.height / 2 - a;
|
|
2802
|
+
if (o.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), t.props) {
|
|
2803
|
+
let e = new Set(Object.keys(t.props));
|
|
2804
|
+
t.props.borders && (Z(o, t.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
|
|
2805
|
+
n.warn(`Unknown node property ${e}`);
|
|
2806
|
+
});
|
|
2807
|
+
}
|
|
2808
|
+
return J(t, o), t.intersect = function(e) {
|
|
2809
|
+
return K.rect(t, e);
|
|
2810
|
+
}, r;
|
|
2811
|
+
}, "rect"), ir = /* @__PURE__ */ r(async (e, t) => {
|
|
2812
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, t, "node " + t.classes, !0), o = r.insert("rect", ":first-child"), s = t.positioned ? t.width : i.width + t.padding, c = t.positioned ? t.height : i.height + t.padding, l = t.positioned ? -s / 2 : -i.width / 2 - a, u = t.positioned ? -c / 2 : -i.height / 2 - a;
|
|
2813
|
+
if (o.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), t.props) {
|
|
2814
|
+
let e = new Set(Object.keys(t.props));
|
|
2815
|
+
t.props.borders && (Z(o, t.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
|
|
2816
|
+
n.warn(`Unknown node property ${e}`);
|
|
2817
|
+
});
|
|
2818
|
+
}
|
|
2819
|
+
return J(t, o), t.intersect = function(e) {
|
|
2820
|
+
return K.rect(t, e);
|
|
2821
|
+
}, r;
|
|
2822
|
+
}, "composite"), ar = /* @__PURE__ */ r(async (e, t) => {
|
|
2823
|
+
let { shapeSvg: r } = await q(e, t, "label", !0);
|
|
2824
|
+
n.trace("Classes = ", t.class);
|
|
2825
|
+
let i = r.insert("rect", ":first-child");
|
|
2826
|
+
if (i.attr("width", 0).attr("height", 0), r.attr("class", "label edgeLabel"), t.props) {
|
|
2827
|
+
let e = new Set(Object.keys(t.props));
|
|
2828
|
+
t.props.borders && (Z(i, t.props.borders, 0, 0), e.delete("borders")), e.forEach((e) => {
|
|
2829
|
+
n.warn(`Unknown node property ${e}`);
|
|
2830
|
+
});
|
|
2831
|
+
}
|
|
2832
|
+
return J(t, i), t.intersect = function(e) {
|
|
2833
|
+
return K.rect(t, e);
|
|
2834
|
+
}, r;
|
|
2835
|
+
}, "labelRect");
|
|
2836
|
+
function Z(e, t, i, a) {
|
|
2837
|
+
let o = [], s = /* @__PURE__ */ r((e) => {
|
|
2838
|
+
o.push(e, 0);
|
|
2839
|
+
}, "addBorder"), c = /* @__PURE__ */ r((e) => {
|
|
2840
|
+
o.push(0, e);
|
|
2841
|
+
}, "skipBorder");
|
|
2842
|
+
t.includes("t") ? (n.debug("add top border"), s(i)) : c(i), t.includes("r") ? (n.debug("add right border"), s(a)) : c(a), t.includes("b") ? (n.debug("add bottom border"), s(i)) : c(i), t.includes("l") ? (n.debug("add left border"), s(a)) : c(a), e.attr("stroke-dasharray", o.join(" "));
|
|
2843
|
+
}
|
|
2844
|
+
r(Z, "applyNodePropertyBorders");
|
|
2845
|
+
var or = /* @__PURE__ */ r(async (e, t) => {
|
|
2846
|
+
let r;
|
|
2847
|
+
r = t.classes ? "node " + t.classes : "node default";
|
|
2848
|
+
let a = e.insert("g").attr("class", r).attr("id", t.domId || t.id), o = a.insert("rect", ":first-child"), s = a.insert("line"), l = a.insert("g").attr("class", "label"), u = t.labelText.flat ? t.labelText.flat() : t.labelText, d = "";
|
|
2849
|
+
d = typeof u == "object" ? u[0] : u, n.info("Label text abc79", d, u, typeof u == "object");
|
|
2850
|
+
let p = await U(l, d, t.labelStyle, !0, !0), m = {
|
|
2851
|
+
width: 0,
|
|
2852
|
+
height: 0
|
|
2853
|
+
};
|
|
2854
|
+
if (f(c())) {
|
|
2855
|
+
let e = p.children[0], t = i(p);
|
|
2856
|
+
m = e.getBoundingClientRect(), t.attr("width", m.width), t.attr("height", m.height);
|
|
2857
|
+
}
|
|
2858
|
+
n.info("Text 2", u);
|
|
2859
|
+
let h = u.slice(1, u.length), g = p.getBBox(), _ = await U(l, h.join ? h.join("<br/>") : h, t.labelStyle, !0, !0);
|
|
2860
|
+
if (f(c())) {
|
|
2861
|
+
let e = _.children[0], t = i(_);
|
|
2862
|
+
m = e.getBoundingClientRect(), t.attr("width", m.width), t.attr("height", m.height);
|
|
2863
|
+
}
|
|
2864
|
+
let v = t.padding / 2;
|
|
2865
|
+
return i(_).attr("transform", "translate( " + (m.width > g.width ? 0 : (g.width - m.width) / 2) + ", " + (g.height + v + 5) + ")"), i(p).attr("transform", "translate( " + (m.width < g.width ? 0 : -(g.width - m.width) / 2) + ", 0)"), m = l.node().getBBox(), l.attr("transform", "translate(" + -m.width / 2 + ", " + (-m.height / 2 - v + 3) + ")"), o.attr("class", "outer title-state").attr("x", -m.width / 2 - v).attr("y", -m.height / 2 - v).attr("width", m.width + t.padding).attr("height", m.height + t.padding), s.attr("class", "divider").attr("x1", -m.width / 2 - v).attr("x2", m.width / 2 + v).attr("y1", -m.height / 2 - v + g.height + v).attr("y2", -m.height / 2 - v + g.height + v), J(t, o), t.intersect = function(e) {
|
|
2866
|
+
return K.rect(t, e);
|
|
2867
|
+
}, a;
|
|
2868
|
+
}, "rectWithTitle"), sr = /* @__PURE__ */ r(async (e, t) => {
|
|
2869
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.height + t.padding, a = r.width + i / 4 + t.padding;
|
|
2870
|
+
return J(t, n.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -a / 2).attr("y", -i / 2).attr("width", a).attr("height", i)), t.intersect = function(e) {
|
|
2871
|
+
return K.rect(t, e);
|
|
2872
|
+
}, n;
|
|
2873
|
+
}, "stadium"), cr = /* @__PURE__ */ r(async (e, t) => {
|
|
2874
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, t, X(t, void 0), !0), o = r.insert("circle", ":first-child");
|
|
2875
|
+
return o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + a).attr("width", i.width + t.padding).attr("height", i.height + t.padding), n.info("Circle main"), J(t, o), t.intersect = function(e) {
|
|
2876
|
+
return n.info("Circle intersect", t, i.width / 2 + a, e), K.circle(t, i.width / 2 + a, e);
|
|
2877
|
+
}, r;
|
|
2878
|
+
}, "circle"), lr = /* @__PURE__ */ r(async (e, t) => {
|
|
2879
|
+
let { shapeSvg: r, bbox: i, halfPadding: a } = await q(e, t, X(t, void 0), !0), o = r.insert("g", ":first-child"), s = o.insert("circle"), c = o.insert("circle");
|
|
2880
|
+
return o.attr("class", t.class), s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + a + 5).attr("width", i.width + t.padding + 10).attr("height", i.height + t.padding + 10), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + a).attr("width", i.width + t.padding).attr("height", i.height + t.padding), n.info("DoubleCircle main"), J(t, s), t.intersect = function(e) {
|
|
2881
|
+
return n.info("DoubleCircle intersect", t, i.width / 2 + a + 5, e), K.circle(t, i.width / 2 + a + 5, e);
|
|
2882
|
+
}, r;
|
|
2883
|
+
}, "doublecircle"), ur = /* @__PURE__ */ r(async (e, t) => {
|
|
2884
|
+
let { shapeSvg: n, bbox: r } = await q(e, t, X(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
|
|
2885
|
+
{
|
|
2886
|
+
x: 0,
|
|
2887
|
+
y: 0
|
|
2888
|
+
},
|
|
2889
|
+
{
|
|
2890
|
+
x: i,
|
|
2891
|
+
y: 0
|
|
2892
|
+
},
|
|
2893
|
+
{
|
|
2894
|
+
x: i,
|
|
2895
|
+
y: -a
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
x: 0,
|
|
2899
|
+
y: -a
|
|
2900
|
+
},
|
|
2901
|
+
{
|
|
2902
|
+
x: 0,
|
|
2903
|
+
y: 0
|
|
2904
|
+
},
|
|
2905
|
+
{
|
|
2906
|
+
x: -8,
|
|
2907
|
+
y: 0
|
|
2908
|
+
},
|
|
2909
|
+
{
|
|
2910
|
+
x: i + 8,
|
|
2911
|
+
y: 0
|
|
2912
|
+
},
|
|
2913
|
+
{
|
|
2914
|
+
x: i + 8,
|
|
2915
|
+
y: -a
|
|
2916
|
+
},
|
|
2917
|
+
{
|
|
2918
|
+
x: -8,
|
|
2919
|
+
y: -a
|
|
2920
|
+
},
|
|
2921
|
+
{
|
|
2922
|
+
x: -8,
|
|
2923
|
+
y: 0
|
|
2924
|
+
}
|
|
2925
|
+
], s = Y(n, i, a, o);
|
|
2926
|
+
return s.attr("style", t.style), J(t, s), t.intersect = function(e) {
|
|
2927
|
+
return K.polygon(t, o, e);
|
|
2928
|
+
}, n;
|
|
2929
|
+
}, "subroutine"), dr = /* @__PURE__ */ r((e, t) => {
|
|
2930
|
+
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child");
|
|
2931
|
+
return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), J(t, r), t.intersect = function(e) {
|
|
2932
|
+
return K.circle(t, 7, e);
|
|
2933
|
+
}, n;
|
|
2934
|
+
}, "start"), fr = /* @__PURE__ */ r((e, t, n) => {
|
|
2935
|
+
let r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, a = 10;
|
|
2936
|
+
return n === "LR" && (i = 10, a = 70), J(t, r.append("rect").attr("x", -1 * i / 2).attr("y", -1 * a / 2).attr("width", i).attr("height", a).attr("class", "fork-join")), t.height += t.padding / 2, t.width += t.padding / 2, t.intersect = function(e) {
|
|
2937
|
+
return K.rect(t, e);
|
|
2938
|
+
}, r;
|
|
2939
|
+
}, "forkJoin"), pr = {
|
|
2940
|
+
rhombus: Kn,
|
|
2941
|
+
composite: ir,
|
|
2942
|
+
question: Kn,
|
|
2943
|
+
rect: rr,
|
|
2944
|
+
labelRect: ar,
|
|
2945
|
+
rectWithTitle: or,
|
|
2946
|
+
choice: qn,
|
|
2947
|
+
circle: cr,
|
|
2948
|
+
doublecircle: lr,
|
|
2949
|
+
stadium: sr,
|
|
2950
|
+
hexagon: Jn,
|
|
2951
|
+
block_arrow: Yn,
|
|
2952
|
+
rect_left_inv_arrow: Xn,
|
|
2953
|
+
lean_right: Zn,
|
|
2954
|
+
lean_left: Qn,
|
|
2955
|
+
trapezoid: $n,
|
|
2956
|
+
inv_trapezoid: er,
|
|
2957
|
+
rect_right_inv_arrow: tr,
|
|
2958
|
+
cylinder: nr,
|
|
2959
|
+
start: dr,
|
|
2960
|
+
end: /* @__PURE__ */ r((e, t) => {
|
|
2961
|
+
let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child"), i = n.insert("circle", ":first-child");
|
|
2962
|
+
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), r.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), J(t, i), t.intersect = function(e) {
|
|
2963
|
+
return K.circle(t, 7, e);
|
|
2964
|
+
}, n;
|
|
2965
|
+
}, "end"),
|
|
2966
|
+
note: Wn,
|
|
2967
|
+
subroutine: ur,
|
|
2968
|
+
fork: fr,
|
|
2969
|
+
join: fr,
|
|
2970
|
+
class_box: /* @__PURE__ */ r(async (e, t) => {
|
|
2971
|
+
var n;
|
|
2972
|
+
let r = t.padding / 2, a;
|
|
2973
|
+
a = t.classes ? "node " + t.classes : "node default";
|
|
2974
|
+
let o = e.insert("g").attr("class", a).attr("id", t.domId || t.id), s = o.insert("rect", ":first-child"), l = o.insert("line"), u = o.insert("line"), d = 0, p = 4, m = o.insert("g").attr("class", "label"), h = 0, g = (n = t.classData.annotations) == null ? void 0 : n[0], _ = await U(m, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), v = _.getBBox();
|
|
2975
|
+
if (f(c())) {
|
|
2976
|
+
let e = _.children[0], t = i(_);
|
|
2977
|
+
v = e.getBoundingClientRect(), t.attr("width", v.width), t.attr("height", v.height);
|
|
2978
|
+
}
|
|
2979
|
+
t.classData.annotations[0] && (p += v.height + 4, d += v.width);
|
|
2980
|
+
let y = t.classData.label;
|
|
2981
|
+
t.classData.type !== void 0 && t.classData.type !== "" && (f(c()) ? y += "<" + t.classData.type + ">" : y += "<" + t.classData.type + ">");
|
|
2982
|
+
let b = await U(m, y, t.labelStyle, !0, !0);
|
|
2983
|
+
i(b).attr("class", "classTitle");
|
|
2984
|
+
let x = b.getBBox();
|
|
2985
|
+
if (f(c())) {
|
|
2986
|
+
let e = b.children[0], t = i(b);
|
|
2987
|
+
x = e.getBoundingClientRect(), t.attr("width", x.width), t.attr("height", x.height);
|
|
2988
|
+
}
|
|
2989
|
+
p += x.height + 4, x.width > d && (d = x.width);
|
|
2990
|
+
let S = [];
|
|
2991
|
+
t.classData.members.forEach(async (e) => {
|
|
2992
|
+
let n = e.getDisplayDetails(), r = n.displayText;
|
|
2993
|
+
f(c()) && (r = r.replace(/</g, "<").replace(/>/g, ">"));
|
|
2994
|
+
let a = await U(m, r, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), o = a.getBBox();
|
|
2995
|
+
if (f(c())) {
|
|
2996
|
+
let e = a.children[0], t = i(a);
|
|
2997
|
+
o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
|
|
2998
|
+
}
|
|
2999
|
+
o.width > d && (d = o.width), p += o.height + 4, S.push(a);
|
|
3000
|
+
}), p += 8;
|
|
3001
|
+
let C = [];
|
|
3002
|
+
if (t.classData.methods.forEach(async (e) => {
|
|
3003
|
+
let n = e.getDisplayDetails(), r = n.displayText;
|
|
3004
|
+
f(c()) && (r = r.replace(/</g, "<").replace(/>/g, ">"));
|
|
3005
|
+
let a = await U(m, r, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), o = a.getBBox();
|
|
3006
|
+
if (f(c())) {
|
|
3007
|
+
let e = a.children[0], t = i(a);
|
|
3008
|
+
o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
|
|
3009
|
+
}
|
|
3010
|
+
o.width > d && (d = o.width), p += o.height + 4, C.push(a);
|
|
3011
|
+
}), p += 8, g) {
|
|
3012
|
+
let e = (d - v.width) / 2;
|
|
3013
|
+
i(_).attr("transform", "translate( " + (-1 * d / 2 + e) + ", " + -1 * p / 2 + ")"), h = v.height + 4;
|
|
3014
|
+
}
|
|
3015
|
+
let w = (d - x.width) / 2;
|
|
3016
|
+
return i(b).attr("transform", "translate( " + (-1 * d / 2 + w) + ", " + (-1 * p / 2 + h) + ")"), h += x.height + 4, l.attr("class", "divider").attr("x1", -d / 2 - r).attr("x2", d / 2 + r).attr("y1", -p / 2 - r + 8 + h).attr("y2", -p / 2 - r + 8 + h), h += 8, S.forEach((e) => {
|
|
3017
|
+
var t;
|
|
3018
|
+
i(e).attr("transform", "translate( " + -d / 2 + ", " + (-1 * p / 2 + h + 8 / 2) + ")");
|
|
3019
|
+
let n = e == null ? void 0 : e.getBBox();
|
|
3020
|
+
h += ((t = n == null ? void 0 : n.height) == null ? 0 : t) + 4;
|
|
3021
|
+
}), h += 8, u.attr("class", "divider").attr("x1", -d / 2 - r).attr("x2", d / 2 + r).attr("y1", -p / 2 - r + 8 + h).attr("y2", -p / 2 - r + 8 + h), h += 8, C.forEach((e) => {
|
|
3022
|
+
var t;
|
|
3023
|
+
i(e).attr("transform", "translate( " + -d / 2 + ", " + (-1 * p / 2 + h) + ")");
|
|
3024
|
+
let n = e == null ? void 0 : e.getBBox();
|
|
3025
|
+
h += ((t = n == null ? void 0 : n.height) == null ? 0 : t) + 4;
|
|
3026
|
+
}), s.attr("style", t.style).attr("class", "outer title-state").attr("x", -d / 2 - r).attr("y", -(p / 2) - r).attr("width", d + t.padding).attr("height", p + t.padding), J(t, s), t.intersect = function(e) {
|
|
3027
|
+
return K.rect(t, e);
|
|
3028
|
+
}, o;
|
|
3029
|
+
}, "class_box")
|
|
3030
|
+
}, Q = {}, mr = /* @__PURE__ */ r(async (e, t, n) => {
|
|
3031
|
+
let r, i;
|
|
3032
|
+
if (t.link) {
|
|
3033
|
+
let a;
|
|
3034
|
+
c().securityLevel === "sandbox" ? a = "_top" : t.linkTarget && (a = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", a), i = await pr[t.shape](r, t, n);
|
|
3035
|
+
} else i = await pr[t.shape](e, t, n), r = i;
|
|
3036
|
+
return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), Q[t.id] = r, t.haveCallback && Q[t.id].attr("class", Q[t.id].attr("class") + " clickable"), r;
|
|
3037
|
+
}, "insertNode"), hr = /* @__PURE__ */ r((e) => {
|
|
3038
|
+
let t = Q[e.id];
|
|
3039
|
+
n.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
|
|
3040
|
+
let r = e.diff || 0;
|
|
3041
|
+
return e.clusterNode ? t.attr("transform", "translate(" + (e.x + r - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), r;
|
|
3042
|
+
}, "positionNode");
|
|
3043
|
+
function gr(e, t, n = !1) {
|
|
3044
|
+
var r, i, a, o, s, c;
|
|
3045
|
+
let l = e, u = "default";
|
|
3046
|
+
if (((l == null || (r = l.classes) == null ? void 0 : r.length) || 0) > 0) {
|
|
3047
|
+
var d;
|
|
3048
|
+
u = ((d = l == null ? void 0 : l.classes) == null ? [] : d).join(" ");
|
|
3049
|
+
}
|
|
3050
|
+
u += " flowchart-label";
|
|
3051
|
+
let f = 0, m = "", h;
|
|
3052
|
+
switch (l.type) {
|
|
3053
|
+
case "round":
|
|
3054
|
+
f = 5, m = "rect";
|
|
3055
|
+
break;
|
|
3056
|
+
case "composite":
|
|
3057
|
+
f = 0, m = "composite", h = 0;
|
|
3058
|
+
break;
|
|
3059
|
+
case "square":
|
|
3060
|
+
m = "rect";
|
|
3061
|
+
break;
|
|
3062
|
+
case "diamond":
|
|
3063
|
+
m = "question";
|
|
3064
|
+
break;
|
|
3065
|
+
case "hexagon":
|
|
3066
|
+
m = "hexagon";
|
|
3067
|
+
break;
|
|
3068
|
+
case "block_arrow":
|
|
3069
|
+
m = "block_arrow";
|
|
3070
|
+
break;
|
|
3071
|
+
case "odd":
|
|
3072
|
+
m = "rect_left_inv_arrow";
|
|
3073
|
+
break;
|
|
3074
|
+
case "lean_right":
|
|
3075
|
+
m = "lean_right";
|
|
3076
|
+
break;
|
|
3077
|
+
case "lean_left":
|
|
3078
|
+
m = "lean_left";
|
|
3079
|
+
break;
|
|
3080
|
+
case "trapezoid":
|
|
3081
|
+
m = "trapezoid";
|
|
3082
|
+
break;
|
|
3083
|
+
case "inv_trapezoid":
|
|
3084
|
+
m = "inv_trapezoid";
|
|
3085
|
+
break;
|
|
3086
|
+
case "rect_left_inv_arrow":
|
|
3087
|
+
m = "rect_left_inv_arrow";
|
|
3088
|
+
break;
|
|
3089
|
+
case "circle":
|
|
3090
|
+
m = "circle";
|
|
3091
|
+
break;
|
|
3092
|
+
case "ellipse":
|
|
3093
|
+
m = "ellipse";
|
|
3094
|
+
break;
|
|
3095
|
+
case "stadium":
|
|
3096
|
+
m = "stadium";
|
|
3097
|
+
break;
|
|
3098
|
+
case "subroutine":
|
|
3099
|
+
m = "subroutine";
|
|
3100
|
+
break;
|
|
3101
|
+
case "cylinder":
|
|
3102
|
+
m = "cylinder";
|
|
3103
|
+
break;
|
|
3104
|
+
case "group":
|
|
3105
|
+
m = "rect";
|
|
3106
|
+
break;
|
|
3107
|
+
case "doublecircle":
|
|
3108
|
+
m = "doublecircle";
|
|
3109
|
+
break;
|
|
3110
|
+
default: m = "rect";
|
|
3111
|
+
}
|
|
3112
|
+
let g = ee((i = l == null ? void 0 : l.styles) == null ? [] : i), _ = l.label, v = (a = l.size) == null ? {
|
|
3113
|
+
width: 0,
|
|
3114
|
+
height: 0,
|
|
3115
|
+
x: 0,
|
|
3116
|
+
y: 0
|
|
3117
|
+
} : a, y = t.getDiagramId();
|
|
3118
|
+
return {
|
|
3119
|
+
labelStyle: g.labelStyle,
|
|
3120
|
+
shape: m,
|
|
3121
|
+
labelText: _,
|
|
3122
|
+
rx: f,
|
|
3123
|
+
ry: f,
|
|
3124
|
+
class: u,
|
|
3125
|
+
style: g.style,
|
|
3126
|
+
id: l.id,
|
|
3127
|
+
domId: y ? `${y}-${l.id}` : l.id,
|
|
3128
|
+
directions: l.directions,
|
|
3129
|
+
width: v.width,
|
|
3130
|
+
height: v.height,
|
|
3131
|
+
x: v.x,
|
|
3132
|
+
y: v.y,
|
|
3133
|
+
positioned: n,
|
|
3134
|
+
intersect: void 0,
|
|
3135
|
+
type: l.type,
|
|
3136
|
+
padding: (o = (s = h) == null ? (c = p()) == null || (c = c.block) == null ? void 0 : c.padding : s) == null ? 0 : o
|
|
3137
|
+
};
|
|
3138
|
+
}
|
|
3139
|
+
r(gr, "getNodeFromBlock");
|
|
3140
|
+
async function _r(e, t, n) {
|
|
3141
|
+
let r = gr(t, n, !1);
|
|
3142
|
+
if (r.type === "group") return;
|
|
3143
|
+
let i = await mr(e, r, { config: p() }), a = i.node().getBBox(), o = n.getBlock(r.id);
|
|
3144
|
+
o.size = {
|
|
3145
|
+
width: a.width,
|
|
3146
|
+
height: a.height,
|
|
3147
|
+
x: 0,
|
|
3148
|
+
y: 0,
|
|
3149
|
+
node: i
|
|
3150
|
+
}, n.setBlock(o), i.remove();
|
|
3151
|
+
}
|
|
3152
|
+
r(_r, "calculateBlockSize");
|
|
3153
|
+
async function vr(e, t, n) {
|
|
3154
|
+
let r = gr(t, n, !0);
|
|
3155
|
+
n.getBlock(r.id).type !== "space" && (await mr(e, r, { config: p() }), t.intersect = r == null ? void 0 : r.intersect, hr(r));
|
|
3156
|
+
}
|
|
3157
|
+
r(vr, "insertBlockPositioned");
|
|
3158
|
+
async function $(e, t, n, r) {
|
|
3159
|
+
for (let i of t) await r(e, i, n), i.children && await $(e, i.children, n, r);
|
|
3160
|
+
}
|
|
3161
|
+
r($, "performOperations");
|
|
3162
|
+
async function yr(e, t, n) {
|
|
3163
|
+
await $(e, t, n, _r);
|
|
3164
|
+
}
|
|
3165
|
+
r(yr, "calculateBlockSizes");
|
|
3166
|
+
async function br(e, t, n) {
|
|
3167
|
+
await $(e, t, n, vr);
|
|
3168
|
+
}
|
|
3169
|
+
r(br, "insertBlocks");
|
|
3170
|
+
async function xr(n, r, i, a, o) {
|
|
3171
|
+
let s = new t({
|
|
3172
|
+
multigraph: !0,
|
|
3173
|
+
compound: !0
|
|
3174
|
+
});
|
|
3175
|
+
s.setGraph({
|
|
3176
|
+
rankdir: "TB",
|
|
3177
|
+
nodesep: 10,
|
|
3178
|
+
ranksep: 10,
|
|
3179
|
+
marginx: 8,
|
|
3180
|
+
marginy: 8
|
|
3181
|
+
});
|
|
3182
|
+
for (let e of i) e.size && s.setNode(e.id, {
|
|
3183
|
+
width: e.size.width,
|
|
3184
|
+
height: e.size.height,
|
|
3185
|
+
intersect: e.intersect
|
|
3186
|
+
});
|
|
3187
|
+
for (let t of r) if (t.start && t.end) {
|
|
3188
|
+
let r = a.getBlock(t.start), i = a.getBlock(t.end);
|
|
3189
|
+
if (r != null && r.size && i != null && i.size) {
|
|
3190
|
+
let a = r.size, c = i.size, l = [
|
|
3191
|
+
{
|
|
3192
|
+
x: a.x,
|
|
3193
|
+
y: a.y
|
|
3194
|
+
},
|
|
3195
|
+
{
|
|
3196
|
+
x: a.x + (c.x - a.x) / 2,
|
|
3197
|
+
y: a.y + (c.y - a.y) / 2
|
|
3198
|
+
},
|
|
3199
|
+
{
|
|
3200
|
+
x: c.x,
|
|
3201
|
+
y: c.y
|
|
3202
|
+
}
|
|
3203
|
+
], u = o ? `${o}-${t.id}` : t.id;
|
|
3204
|
+
An(n, {
|
|
3205
|
+
v: t.start,
|
|
3206
|
+
w: t.end,
|
|
3207
|
+
name: u
|
|
3208
|
+
}, e(e({}, t), {}, {
|
|
3209
|
+
id: u,
|
|
3210
|
+
arrowTypeEnd: t.arrowTypeEnd,
|
|
3211
|
+
arrowTypeStart: t.arrowTypeStart,
|
|
3212
|
+
points: l,
|
|
3213
|
+
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
3214
|
+
}), void 0, "block", s, o), t.label && (await Tn(n, e(e({}, t), {}, {
|
|
3215
|
+
label: t.label,
|
|
3216
|
+
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
3217
|
+
arrowTypeEnd: t.arrowTypeEnd,
|
|
3218
|
+
arrowTypeStart: t.arrowTypeStart,
|
|
3219
|
+
points: l,
|
|
3220
|
+
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
3221
|
+
})), En(e(e({}, t), {}, {
|
|
3222
|
+
x: l[1].x,
|
|
3223
|
+
y: l[1].y
|
|
3224
|
+
}), { originalPath: l }));
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
}
|
|
3228
|
+
r(xr, "insertEdges");
|
|
3229
|
+
var Sr = {
|
|
3230
|
+
parser: Wt,
|
|
3231
|
+
db: un,
|
|
3232
|
+
renderer: {
|
|
3233
|
+
draw: /* @__PURE__ */ r(async function(e, t, r, a) {
|
|
3234
|
+
let { securityLevel: o, block: s } = p(), c = a.db;
|
|
3235
|
+
c.setDiagramId(t);
|
|
3236
|
+
let u;
|
|
3237
|
+
o === "sandbox" && (u = i("#i" + t));
|
|
3238
|
+
let d = i(o === "sandbox" ? u.nodes()[0].contentDocument.body : "body"), f = o === "sandbox" ? d.select(`[id="${t}"]`) : i(`[id="${t}"]`);
|
|
3239
|
+
hn(f, [
|
|
3240
|
+
"point",
|
|
3241
|
+
"circle",
|
|
3242
|
+
"cross"
|
|
3243
|
+
], a.type, t);
|
|
3244
|
+
let m = c.getBlocks(), h = c.getBlocksFlat(), g = c.getEdges(), _ = f.insert("g").attr("class", "block");
|
|
3245
|
+
await yr(_, m, c);
|
|
3246
|
+
let v = bn(c);
|
|
3247
|
+
if (await br(_, m, c), await xr(_, g, h, c, t), v) {
|
|
3248
|
+
let e = v, t = Math.max(1, Math.round(.125 * (e.width / e.height))), r = e.height + t + 10, i = e.width + 10, { useMaxWidth: a } = s;
|
|
3249
|
+
l(f, r, i, !!a), n.debug("Here Bounds", v, e), f.attr("viewBox", `${e.x - 5} ${e.y - 5} ${e.width + 10} ${e.height + 10}`);
|
|
3250
|
+
}
|
|
3251
|
+
}, "draw"),
|
|
3252
|
+
getClasses: /* @__PURE__ */ r(function(e, t) {
|
|
3253
|
+
return t.db.getClasses();
|
|
3254
|
+
}, "getClasses")
|
|
3255
|
+
},
|
|
3256
|
+
styles: fn
|
|
3257
|
+
};
|
|
3258
|
+
//#endregion
|
|
3259
|
+
export { Sr as diagram };
|