@bytechain.cn/colamd 1.5.1 → 2.7.7
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/LICENSE +22 -21
- package/README.md +160 -1012
- package/README_CN.md +210 -1070
- package/dist/main/chunks/docx-export.js +29695 -0
- package/dist/main/chunks/image-export.js +175 -0
- package/dist/main/index.js +17765 -452
- package/dist/preload/index.js +135 -23
- package/dist/renderer/assets/2DXBBFLN-BmaQ8lqV.js +667 -0
- package/dist/renderer/assets/46IJ22JX-Caywmaj-.js +854 -0
- package/dist/renderer/assets/4TTDE5I4-C82Tw8vO.js +502 -0
- package/dist/renderer/assets/4UF3HTLV-BD8W-BSm.js +30 -0
- package/dist/renderer/assets/5THPTBWS-2mBFupjU.js +21 -0
- package/dist/renderer/assets/7WLXJQOR-C8MM6Bra.js +23 -0
- package/dist/renderer/assets/AAXQQPKT-CCArPgA1.js +1131 -0
- package/dist/renderer/assets/AKE5O7KZ-DOAgUvEX.js +185 -0
- package/dist/renderer/assets/BNMLP6AG-igM96Ol7.js +805 -0
- package/dist/renderer/assets/DKTLEL5E-Dj3316cp.js +42 -0
- package/dist/renderer/assets/DR6PKOQU-C-e6zzyf.js +302 -0
- package/dist/renderer/assets/E4RJ7UJB-BMF4zoOQ.js +442 -0
- package/dist/renderer/assets/ELSXBIJH-BI2ySIoX.js +39 -0
- package/dist/renderer/assets/ERTIBQVS-CnvF3w9r.js +183 -0
- package/dist/renderer/assets/F653G4FO-CgzvjfOe.js +1498 -0
- package/dist/renderer/assets/FKCDD66M-BkVPFntx.js +205 -0
- package/dist/renderer/assets/FP7KDXVC-K0VCFuri.js +222 -0
- package/dist/renderer/assets/FT5I3RHX-zgsvTvBh.js +244 -0
- package/dist/renderer/assets/FTXIJQGB-BX14b7pN.js +13 -0
- package/dist/renderer/assets/G3MDBVQH-qZ3yfAIw.js +25 -0
- package/dist/renderer/assets/GY35JXOZ-Lo9DxsPK.js +169 -0
- package/dist/renderer/assets/H5EEJPP2-Bw2musel.js +354 -0
- package/dist/renderer/assets/HWDLEDTA-CCOSSl9K.js +982 -0
- package/dist/renderer/assets/JZWSX6AR-BBtw8K-1.js +67 -0
- package/dist/renderer/assets/KQOEJWJY-Brg31xSn.js +84 -0
- package/dist/renderer/assets/KS3BB3KE-2GQdjVNT.js +139 -0
- package/dist/renderer/assets/KXJRRZHI-B0Oj-tMS.js +503 -0
- package/dist/renderer/assets/MFVI5XKI-BpwEOECT.js +10 -0
- package/dist/renderer/assets/MWY2J62P-CSmi7lMQ.js +1103 -0
- package/dist/renderer/assets/MXGNCBL2-CSoCLfJw.js +217 -0
- package/dist/renderer/assets/N6DAJLIZ-DB-xlSjM.js +120 -0
- package/dist/renderer/assets/NU5M23IW-BhGgUeDk.js +117 -0
- package/dist/renderer/assets/NV4XNBIS-DMg8ibKU.js +1221 -0
- package/dist/renderer/assets/OGLU4SIR-DOU7cIL3.js +290 -0
- package/dist/renderer/assets/OUNS5N76-BO_k5M0O.js +1065 -0
- package/dist/renderer/assets/PU4ISKXV-Cw53csyu.js +516 -0
- package/dist/renderer/assets/PUZGS23X-_iUQg51-.js +21 -0
- package/dist/renderer/assets/Q3IYVLG5-ZFBZi3vs.js +501 -0
- package/dist/renderer/assets/QYHQDLKZ-BPb6lHi6.js +984 -0
- package/dist/renderer/assets/RVARI57O-DMrXgtoB.js +10 -0
- package/dist/renderer/assets/RZSVICHU-I7fvqLMQ.js +263 -0
- package/dist/renderer/assets/UEXXS2NB-AVpw2xTC.js +25 -0
- package/dist/renderer/assets/UHTQJXKL-6oSc4D2k.js +135 -0
- package/dist/renderer/assets/URA2L2QI-DkFUeeK0.js +201 -0
- package/dist/renderer/assets/UXCHDUKG-B54p4156.js +174 -0
- package/dist/renderer/assets/VKNV3BUX-Cc_4x0WI.js +278 -0
- package/dist/renderer/assets/VMV7XPHP-BjfrE66I.js +127 -0
- package/dist/renderer/assets/WEVWDWVA-Ca8eMbXN.js +57 -0
- package/dist/renderer/assets/XRRJ35LF-EWRU-xXu.js +120 -0
- package/dist/renderer/assets/YFKBLVVN-D2oaE2c2.js +991 -0
- package/dist/renderer/assets/YHRE5QGZ-ucJgE2vP.js +698 -0
- package/dist/renderer/assets/ZF3OVT4B-SN2E7Wbi.js +421 -0
- package/dist/renderer/assets/apl-fqmucPXA.js +140 -0
- package/dist/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
- package/dist/renderer/assets/asn1-BnOEsgAm.js +144 -0
- package/dist/renderer/assets/asterisk-QAlztEwS.js +345 -0
- package/dist/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
- package/dist/renderer/assets/clike-xqXYL6ge.js +805 -0
- package/dist/renderer/assets/clojure-BhXMqnxz.js +849 -0
- package/dist/renderer/assets/cmake-BGaNd9E7.js +71 -0
- package/dist/renderer/assets/cobol-4yqQntpt.js +120 -0
- package/dist/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
- package/dist/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
- package/dist/renderer/assets/crystal-DyuLTqLs.js +398 -0
- package/dist/renderer/assets/css-c-jst79C.js +1783 -0
- package/dist/renderer/assets/cypher-Dlu_3r4V.js +121 -0
- package/dist/renderer/assets/d-UURgV0Ux.js +179 -0
- package/dist/renderer/assets/diff-B_Bi2Crb.js +25 -0
- package/dist/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
- package/dist/renderer/assets/dtd-Dy74G54E.js +114 -0
- package/dist/renderer/assets/dylan-TSb-Nfix.js +314 -0
- package/dist/renderer/assets/ebnf-4fKAGW3a.js +140 -0
- package/dist/renderer/assets/ecl-B59qGGVg.js +178 -0
- package/dist/renderer/assets/eiffel-Dze7nlu3.js +134 -0
- package/dist/renderer/assets/elm-DG7jkhNZ.js +176 -0
- package/dist/renderer/assets/erlang-BO6gOnGA.js +674 -0
- package/dist/renderer/assets/factor-CMxFHDqz.js +65 -0
- package/dist/renderer/assets/fcl-CDDUNjTj.js +141 -0
- package/dist/renderer/assets/forth-B9D2JCeE.js +116 -0
- package/dist/renderer/assets/fortran-CAG2BFbe.js +467 -0
- package/dist/renderer/assets/gas-d3KEcW3x.js +294 -0
- package/dist/renderer/assets/gherkin-DhZlEZiy.js +115 -0
- package/dist/renderer/assets/groovy-CpwJiBl7.js +223 -0
- package/dist/renderer/assets/haskell-ySd-OUo8.js +459 -0
- package/dist/renderer/assets/haxe-7MlzfeYV.js +514 -0
- package/dist/renderer/assets/http-BqypyemW.js +79 -0
- package/dist/renderer/assets/idl-4HIGJlDI.js +985 -0
- package/dist/renderer/assets/index-6G13Twgt.js +311 -0
- package/dist/renderer/assets/index-B2_pQa3G.js +384 -0
- package/dist/renderer/assets/index-B4keY9Xz.js +328 -0
- package/dist/renderer/assets/index-B5Jih3QA.js +47421 -0
- package/dist/renderer/assets/index-BH0PaTow.js +405 -0
- package/dist/renderer/assets/index-BWfIKsyn.js +8 -0
- package/dist/renderer/assets/index-B_BLxvag.js +156 -0
- package/dist/renderer/assets/index-BnXxA35e.js +325 -0
- package/dist/renderer/assets/index-Bu1PrnbA.js +81 -0
- package/dist/renderer/assets/index-BvXJHaQ4.js +60 -0
- package/dist/renderer/assets/index-BzHXcCGC.js +307 -0
- package/dist/renderer/assets/index-CXI9cRfo.js +287 -0
- package/dist/renderer/assets/index-Ccsf_83j.js +149 -0
- package/dist/renderer/assets/index-CkLQq2g4.js +688 -0
- package/dist/renderer/assets/index-DNL6Tijf.js +8 -0
- package/dist/renderer/assets/index-DRZsGkXi.js +78 -0
- package/dist/renderer/assets/index-Dfyz4Aee.js +181 -0
- package/dist/renderer/assets/index-HtqODURL.js +703 -0
- package/dist/renderer/assets/{index-DxOzbfR-.js → index-MJfkvBRx.js} +1 -1
- package/dist/renderer/assets/index-NsiBA9UX.js +113 -0
- package/dist/renderer/assets/index-aUzhL6sM.js +96 -0
- package/dist/renderer/assets/index-bx07CRyn.css +2503 -0
- package/dist/renderer/assets/{index-CBcVpA3d.js → index-k1ZFPJcr.js} +3 -4
- package/dist/renderer/assets/javascript-C_OHM9hj.js +994 -0
- package/dist/renderer/assets/julia-Bs6JJhYG.js +407 -0
- package/dist/renderer/assets/lazy-BY7ljzvO.js +1041 -0
- package/dist/renderer/assets/livescript-DmzgM3Yt.js +296 -0
- package/dist/renderer/assets/lua-Cvg8VrAA.js +256 -0
- package/dist/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
- package/dist/renderer/assets/mbox-Ga7d4MMN.js +117 -0
- package/dist/renderer/assets/mirc-Dma3B8rS.js +107 -0
- package/dist/renderer/assets/mllike-DHn7xckP.js +334 -0
- package/dist/renderer/assets/modelica-0d55jYY0.js +147 -0
- package/dist/renderer/assets/mscgen-DdqZYINH.js +135 -0
- package/dist/renderer/assets/mumps-Btr8VblO.js +93 -0
- package/dist/renderer/assets/nginx-DTDtBDVN.js +141 -0
- package/dist/renderer/assets/nsis-CyKBdPWp.js +62 -0
- package/dist/renderer/assets/ntriples-CvgOYMpL.js +153 -0
- package/dist/renderer/assets/octave-DYBj3-tl.js +200 -0
- package/dist/renderer/assets/oz-R_e8WMIi.js +231 -0
- package/dist/renderer/assets/pascal-GD8iposT.js +105 -0
- package/dist/renderer/assets/perl-DL9mHpoi.js +1105 -0
- package/dist/renderer/assets/pig-C_4T4YIV.js +101 -0
- package/dist/renderer/assets/powershell-B0suO7Vd.js +328 -0
- package/dist/renderer/assets/properties-BR-vP1aU.js +58 -0
- package/dist/renderer/assets/protobuf-BxgpyhoW.js +77 -0
- package/dist/renderer/assets/pug-CTXt1f8z.js +405 -0
- package/dist/renderer/assets/puppet-Bdao66PW.js +137 -0
- package/dist/renderer/assets/python-CvWbmiX4.js +427 -0
- package/dist/renderer/assets/q-CrbCVq4a.js +131 -0
- package/dist/renderer/assets/r-V7nswm59.js +170 -0
- package/dist/renderer/assets/rpm-C-DLY-If.js +109 -0
- package/dist/renderer/assets/ruby-CQTpZw6f.js +331 -0
- package/dist/renderer/assets/sas-D2UG-yhZ.js +207 -0
- package/dist/renderer/assets/scheme-BKzrkGJD.js +222 -0
- package/dist/renderer/assets/shell-BlsXDxCn.js +222 -0
- package/dist/renderer/assets/sieve-CjwBwOY5.js +135 -0
- package/dist/renderer/assets/simple-mode-DMneyfDu.js +130 -0
- package/dist/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
- package/dist/renderer/assets/solr-CwD7U71z.js +69 -0
- package/dist/renderer/assets/sparql-DYskk2vE.js +249 -0
- package/dist/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
- package/dist/renderer/assets/sql-BSrOzCRI.js +354 -0
- package/dist/renderer/assets/stex-B6LNC55o.js +231 -0
- package/dist/renderer/assets/stylus-BkS-boTH.js +565 -0
- package/dist/renderer/assets/swift-FRZi1uvB.js +291 -0
- package/dist/renderer/assets/tcl-CUcaCdmq.js +114 -0
- package/dist/renderer/assets/textile-BnFpjsrl.js +414 -0
- package/dist/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
- package/dist/renderer/assets/tiki-DK9DOeWn.js +268 -0
- package/dist/renderer/assets/toml-BOuWGMcf.js +76 -0
- package/dist/renderer/assets/troff-E1bJ0PPL.js +61 -0
- package/dist/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
- package/dist/renderer/assets/ttcn-tKd4HLu4.js +192 -0
- package/dist/renderer/assets/turtle-Dq7-1WAf.js +124 -0
- package/dist/renderer/assets/vb-Dp90gtsv.js +196 -0
- package/dist/renderer/assets/vbscript-CI6_mxxU.js +479 -0
- package/dist/renderer/assets/velocity-BwIZK1TH.js +149 -0
- package/dist/renderer/assets/verilog-DDCYnHN8.js +430 -0
- package/dist/renderer/assets/vhdl-DCkMIyT9.js +158 -0
- package/dist/renderer/assets/{web-BKE0SH0E.js → web-C4yaM4Cl.js} +1 -1
- package/dist/renderer/assets/{web-CBsFp24u.js → web-CF2Dtak3.js} +2 -3
- package/dist/renderer/assets/{web-Dc8YgoHP.js → web-DUy9unYf.js} +1 -1
- package/dist/renderer/assets/webidl-BTLTThCm.js +204 -0
- package/dist/renderer/assets/xquery-BrBUuxMR.js +525 -0
- package/dist/renderer/assets/yacas-b5lAVEIl.js +130 -0
- package/dist/renderer/assets/z80-BZV19vqv.js +93 -0
- package/dist/renderer/index.html +97 -77
- package/package.json +88 -60
- package/themes/README.md +99 -300
- package/themes/bear.css +38 -0
- package/themes/dark.css +20 -0
- package/themes/dracula.css +38 -0
- package/themes/elegant.css +53 -671
- package/themes/gruvbox.css +42 -0
- package/themes/light.css +20 -0
- package/themes/midnight.css +31 -0
- package/themes/nord.css +38 -0
- package/themes/notion.css +48 -0
- package/themes/sepia.css +48 -0
- package/themes/solarized-dark.css +35 -0
- package/themes/template.css +76 -498
- package/themes/writer.css +44 -0
- package/.github/workflows/release.yml +0 -66
- package/.trae/specs/optimize-theme-loading/checklist.md +0 -20
- package/.trae/specs/optimize-theme-loading/spec.md +0 -103
- package/.trae/specs/optimize-theme-loading/tasks.md +0 -40
- package/CHANGELOG.md +0 -320
- package/CLAUDE.md +0 -143
- package/android/app/build/.npmkeep +0 -0
- package/android/app/build.gradle +0 -76
- package/android/app/capacitor.build.gradle +0 -24
- package/android/app/proguard-rules.pro +0 -21
- package/android/app/release.keystore +0 -0
- package/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +0 -26
- package/android/app/src/main/AndroidManifest.xml +0 -64
- package/android/app/src/main/java/cn/bytechain/colamd/MainActivity.java +0 -180
- package/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -170
- package/android/app/src/main/res/drawable/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +0 -34
- package/android/app/src/main/res/layout/activity_main.xml +0 -12
- package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
- package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -5
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/values/ic_launcher_background.xml +0 -4
- package/android/app/src/main/res/values/strings.xml +0 -7
- package/android/app/src/main/res/values/styles.xml +0 -22
- package/android/app/src/main/res/xml/file_paths.xml +0 -5
- package/android/app/src/main/res/xml/network_security_config.xml +0 -8
- package/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +0 -18
- package/android/build.gradle +0 -29
- package/android/capacitor.settings.gradle +0 -21
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/android/gradle.properties +0 -22
- package/android/gradlew +0 -248
- package/android/gradlew.bat +0 -92
- package/android/settings.gradle +0 -5
- package/android/variables.gradle +0 -16
- package/capacitor.config.js +0 -29
- package/capacitor.config.ts +0 -30
- package/demo.md +0 -193
- package/dist/renderer/assets/arc-_lugyDzx.js +0 -131
- package/dist/renderer/assets/architectureDiagram-3BPJPVTR-DDfP-F9D.js +0 -8721
- package/dist/renderer/assets/blockDiagram-GPEHLZMM-DOETUKma.js +0 -3826
- package/dist/renderer/assets/c4Diagram-AAUBKEIU-kAmLfVtk.js +0 -2483
- package/dist/renderer/assets/channel-CD4vJFwr.js +0 -7
- package/dist/renderer/assets/chunk-2J33WTMH-DkVrgw4l.js +0 -24
- package/dist/renderer/assets/chunk-4BX2VUAB-JTZ-VKNX.js +0 -16
- package/dist/renderer/assets/chunk-55IACEB6-Di_O5box.js +0 -13
- package/dist/renderer/assets/chunk-727SXJPM-BgKvwR8w.js +0 -2016
- package/dist/renderer/assets/chunk-AQP2D5EJ-DonSXCCQ.js +0 -1953
- package/dist/renderer/assets/chunk-FMBD7UC4-CsV8Lmy6.js +0 -19
- package/dist/renderer/assets/chunk-ND2GUHAM-C_-_dlq7.js +0 -116
- package/dist/renderer/assets/chunk-QZHKN3VN-aCmcDsfu.js +0 -19
- package/dist/renderer/assets/classDiagram-4FO5ZUOK-nuHQLjzM.js +0 -24
- package/dist/renderer/assets/classDiagram-v2-Q7XG4LA2-nuHQLjzM.js +0 -24
- package/dist/renderer/assets/cose-bilkent-S5V4N54A-Di1_SXt9.js +0 -4943
- package/dist/renderer/assets/cytoscape.esm-CpHeHM5e.js +0 -30269
- package/dist/renderer/assets/dagre-BM42HDAG-CqOUIYsL.js +0 -706
- package/dist/renderer/assets/defaultLocale-B2RvLBDe.js +0 -206
- package/dist/renderer/assets/diagram-2AECGRRQ-F-fP19TC.js +0 -302
- package/dist/renderer/assets/diagram-5GNKFQAL-BD5XZc8G.js +0 -170
- package/dist/renderer/assets/diagram-KO2AKTUF-Qa3ZxA67.js +0 -633
- package/dist/renderer/assets/diagram-LMA3HP47-DqDnw2RA.js +0 -213
- package/dist/renderer/assets/diagram-OG6HWLK6-BH4Elzby.js +0 -852
- package/dist/renderer/assets/erDiagram-TEJ5UH35-CaKZCewa.js +0 -1228
- package/dist/renderer/assets/flowDiagram-I6XJVG4X-C8znUgyL.js +0 -2333
- package/dist/renderer/assets/ganttDiagram-6RSMTGT7-DnRvbMnU.js +0 -3721
- package/dist/renderer/assets/gitGraphDiagram-PVQCEYII-CZuRZzk4.js +0 -1374
- package/dist/renderer/assets/graph-CYiEKt0j.js +0 -1988
- package/dist/renderer/assets/index-B4uDgADr.js +0 -530
- package/dist/renderer/assets/index-BX6JHKv6.js +0 -73314
- package/dist/renderer/assets/index-CGj1spkU.js +0 -27
- package/dist/renderer/assets/index-CcwAgVRi.css +0 -2226
- package/dist/renderer/assets/index-D4CPFkph.js +0 -9
- package/dist/renderer/assets/index-Y89U1ptl.js +0 -9
- package/dist/renderer/assets/infoDiagram-5YYISTIA-BlBUdqMb.js +0 -32
- package/dist/renderer/assets/init-ZxktEp_H.js +0 -16
- package/dist/renderer/assets/ishikawaDiagram-YF4QCWOH-TeVytCrP.js +0 -968
- package/dist/renderer/assets/journeyDiagram-JHISSGLW-BLZa3jnX.js +0 -1256
- package/dist/renderer/assets/kanban-definition-UN3LZRKU-foVxWrJn.js +0 -1053
- package/dist/renderer/assets/layout-DOAlFUVb.js +0 -2610
- package/dist/renderer/assets/linear-BMBn6kVq.js +0 -340
- package/dist/renderer/assets/mindmap-definition-RKZ34NQL-5pGeNCcp.js +0 -1181
- package/dist/renderer/assets/ordinal-DSZU4PqD.js +0 -76
- package/dist/renderer/assets/pieDiagram-4H26LBE5-N9aAUxfr.js +0 -247
- package/dist/renderer/assets/preload-helper-tXtZnHb0.js +0 -88
- package/dist/renderer/assets/quadrantDiagram-W4KKPZXB-BPxbtjga.js +0 -1345
- package/dist/renderer/assets/requirementDiagram-4Y6WPE33-CK1LrJyG.js +0 -1205
- package/dist/renderer/assets/sankeyDiagram-5OEKKPKP-BNj7Sqii.js +0 -1275
- package/dist/renderer/assets/sequenceDiagram-3UESZ5HK-B-r7lNhI.js +0 -4515
- package/dist/renderer/assets/stateDiagram-AJRCARHV-wrWE0MRa.js +0 -451
- package/dist/renderer/assets/stateDiagram-v2-BHNVJYJU-CE-Lqo2d.js +0 -22
- package/dist/renderer/assets/timeline-definition-PNZ67QCA-BkeMGH4J.js +0 -1597
- package/dist/renderer/assets/vennDiagram-CIIHVFJN-BTxVzto3.js +0 -2487
- package/dist/renderer/assets/wardley-L42UT6IY-b-_GPpqL.js +0 -30699
- package/dist/renderer/assets/wardleyDiagram-YWT4CUSO-D2r5dVGW.js +0 -976
- package/dist/renderer/assets/web-TfDzToU7.js +0 -58
- package/dist/renderer/assets/xychartDiagram-2RQKCTM6-BHQdINVc.js +0 -1933
- package/docs/RELEASE_NOTES_v1.5.1.md +0 -382
- package/docs/academic-demo.md +0 -567
- package/docs/agent-diff-view.md +0 -48
- package/docs/demo.html +0 -748
- package/docs/demo.md +0 -546
- package/docs/demo.pdf +0 -0
- package/docs/theme-paradigm.md +0 -797
- package/electron-builder.yml +0 -64
- package/electron.vite.config.js +0 -31
- package/electron.vite.config.ts +0 -30
- package/ios/App/App/AppDelegate.swift +0 -49
- package/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
- package/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -14
- package/ios/App/App/Assets.xcassets/Contents.json +0 -6
- package/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +0 -23
- package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/ios/App/App/Base.lproj/LaunchScreen.storyboard +0 -32
- package/ios/App/App/Base.lproj/Main.storyboard +0 -19
- package/ios/App/App/Info.plist +0 -49
- package/ios/App/App.xcodeproj/project.pbxproj +0 -408
- package/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/App/Podfile +0 -28
- package/resources/entitlements.mac.plist +0 -12
- package/resources/icon.icns +0 -0
- package/resources/icon.png +0 -0
- package/resources/icon.svg +0 -23
- package/resources/templates/slides/icon.png +0 -0
- package/resources/templates/slides/slides-template.md +0 -74
- package/resources/templates/slides/template-forest-ink.html +0 -540
- package/resources/templates/slides/template.html +0 -535
- package/scripts/afterPack.js +0 -13
- package/scripts/generate-icons.js +0 -102
- package/src/main/index.ts +0 -919
- package/src/preload/index.d.ts +0 -51
- package/src/preload/index.js +0 -70
- package/src/preload/index.ts +0 -110
- package/src/renderer/capacitor-api.ts +0 -713
- package/src/renderer/editor/editor.ts +0 -287
- package/src/renderer/editor/html-view.ts +0 -15
- package/src/renderer/editor/plugins/index.ts +0 -86
- package/src/renderer/editor/plugins/math-plugin.ts +0 -305
- package/src/renderer/editor/plugins/mermaid-plugin-custom.css +0 -46
- package/src/renderer/editor/plugins/mermaid-plugin-dark.css +0 -428
- package/src/renderer/editor/plugins/mermaid-plugin-elegant.css +0 -443
- package/src/renderer/editor/plugins/mermaid-plugin-newsprint.css +0 -208
- package/src/renderer/editor/plugins/mermaid-plugin.css +0 -111
- package/src/renderer/editor/plugins/mermaid-plugin.ts +0 -680
- package/src/renderer/editor/plugins/themes/base/dark.css +0 -23
- package/src/renderer/editor/plugins/themes/base/elegant.css +0 -32
- package/src/renderer/editor/plugins/themes/base/light.css +0 -20
- package/src/renderer/editor/plugins/themes/base/newsprint.css +0 -27
- package/src/renderer/editor/plugins/themes/base.css +0 -509
- package/src/renderer/editor/plugins/themes/components/mermaid/academic.css +0 -43
- package/src/renderer/editor/plugins/themes/components/mermaid/dark.css +0 -20
- package/src/renderer/editor/plugins/themes/components/mermaid/elegant.css +0 -24
- package/src/renderer/editor/plugins/themes/components/mermaid/light.css +0 -21
- package/src/renderer/editor/plugins/themes/components/mermaid/newsprint.css +0 -26
- package/src/renderer/editor/plugins/themes/components/mermaid/variables.css +0 -592
- package/src/renderer/editor/plugins/themes/foundation.css +0 -143
- package/src/renderer/editor/plugins/themes/theme-manager.ts +0 -133
- package/src/renderer/env.d.ts +0 -10
- package/src/renderer/index.html +0 -76
- package/src/renderer/main.ts +0 -775
- package/src/renderer/mobile.css +0 -428
- package/themes/academic-paper-pt.css +0 -1321
- package/themes/academic-paper.css +0 -1416
- package/themes/forest-ink.css +0 -664
- package/themes/guizang.css +0 -732
- package/themes/pixso-design.css +0 -1261
- package/themes/swiss-design.css +0 -596
- package/tsconfig.json +0 -14
- package/tsconfig.main.json +0 -12
- package/tsconfig.main.tsbuildinfo +0 -1
- package/tsconfig.preload.json +0 -12
- package/tsconfig.preload.tsbuildinfo +0 -1
- package/tsconfig.renderer.json +0 -13
- package/tsconfig.renderer.tsbuildinfo +0 -1
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,1275 +0,0 @@
|
|
|
1
|
-
import { p as setDiagramTitle, q as getDiagramTitle, s as setAccDescription, g as getAccDescription, b as setAccTitle, a as getAccTitle, _ as __name, c as getConfig2, A as defaultConfig2, d as select, Y as setupGraphViewbox, z as clear, k as common_default } from "./index-BX6JHKv6.js";
|
|
2
|
-
import { o as ordinal } from "./ordinal-DSZU4PqD.js";
|
|
3
|
-
import "./preload-helper-tXtZnHb0.js";
|
|
4
|
-
import "./init-ZxktEp_H.js";
|
|
5
|
-
function colors(specifier) {
|
|
6
|
-
var n = specifier.length / 6 | 0, colors2 = new Array(n), i = 0;
|
|
7
|
-
while (i < n) colors2[i] = "#" + specifier.slice(i * 6, ++i * 6);
|
|
8
|
-
return colors2;
|
|
9
|
-
}
|
|
10
|
-
const d3schemeTableau10 = colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
|
|
11
|
-
function max(values, valueof) {
|
|
12
|
-
let max2;
|
|
13
|
-
if (valueof === void 0) {
|
|
14
|
-
for (const value2 of values) {
|
|
15
|
-
if (value2 != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
|
|
16
|
-
max2 = value2;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
} else {
|
|
20
|
-
let index = -1;
|
|
21
|
-
for (let value2 of values) {
|
|
22
|
-
if ((value2 = valueof(value2, ++index, values)) != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
|
|
23
|
-
max2 = value2;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return max2;
|
|
28
|
-
}
|
|
29
|
-
function min(values, valueof) {
|
|
30
|
-
let min2;
|
|
31
|
-
if (valueof === void 0) {
|
|
32
|
-
for (const value2 of values) {
|
|
33
|
-
if (value2 != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
|
|
34
|
-
min2 = value2;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
} else {
|
|
38
|
-
let index = -1;
|
|
39
|
-
for (let value2 of values) {
|
|
40
|
-
if ((value2 = valueof(value2, ++index, values)) != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
|
|
41
|
-
min2 = value2;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return min2;
|
|
46
|
-
}
|
|
47
|
-
function sum(values, valueof) {
|
|
48
|
-
let sum2 = 0;
|
|
49
|
-
if (valueof === void 0) {
|
|
50
|
-
for (let value2 of values) {
|
|
51
|
-
if (value2 = +value2) {
|
|
52
|
-
sum2 += value2;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
} else {
|
|
56
|
-
let index = -1;
|
|
57
|
-
for (let value2 of values) {
|
|
58
|
-
if (value2 = +valueof(value2, ++index, values)) {
|
|
59
|
-
sum2 += value2;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return sum2;
|
|
64
|
-
}
|
|
65
|
-
function targetDepth(d) {
|
|
66
|
-
return d.target.depth;
|
|
67
|
-
}
|
|
68
|
-
function left(node) {
|
|
69
|
-
return node.depth;
|
|
70
|
-
}
|
|
71
|
-
function right(node, n) {
|
|
72
|
-
return n - 1 - node.height;
|
|
73
|
-
}
|
|
74
|
-
function justify(node, n) {
|
|
75
|
-
return node.sourceLinks.length ? node.depth : n - 1;
|
|
76
|
-
}
|
|
77
|
-
function center(node) {
|
|
78
|
-
return node.targetLinks.length ? node.depth : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1 : 0;
|
|
79
|
-
}
|
|
80
|
-
function constant$1(x2) {
|
|
81
|
-
return function() {
|
|
82
|
-
return x2;
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
function ascendingSourceBreadth(a, b) {
|
|
86
|
-
return ascendingBreadth(a.source, b.source) || a.index - b.index;
|
|
87
|
-
}
|
|
88
|
-
function ascendingTargetBreadth(a, b) {
|
|
89
|
-
return ascendingBreadth(a.target, b.target) || a.index - b.index;
|
|
90
|
-
}
|
|
91
|
-
function ascendingBreadth(a, b) {
|
|
92
|
-
return a.y0 - b.y0;
|
|
93
|
-
}
|
|
94
|
-
function value(d) {
|
|
95
|
-
return d.value;
|
|
96
|
-
}
|
|
97
|
-
function defaultId(d) {
|
|
98
|
-
return d.index;
|
|
99
|
-
}
|
|
100
|
-
function defaultNodes(graph) {
|
|
101
|
-
return graph.nodes;
|
|
102
|
-
}
|
|
103
|
-
function defaultLinks(graph) {
|
|
104
|
-
return graph.links;
|
|
105
|
-
}
|
|
106
|
-
function find(nodeById, id) {
|
|
107
|
-
const node = nodeById.get(id);
|
|
108
|
-
if (!node) throw new Error("missing: " + id);
|
|
109
|
-
return node;
|
|
110
|
-
}
|
|
111
|
-
function computeLinkBreadths({ nodes: nodes2 }) {
|
|
112
|
-
for (const node of nodes2) {
|
|
113
|
-
let y0 = node.y0;
|
|
114
|
-
let y1 = y0;
|
|
115
|
-
for (const link2 of node.sourceLinks) {
|
|
116
|
-
link2.y0 = y0 + link2.width / 2;
|
|
117
|
-
y0 += link2.width;
|
|
118
|
-
}
|
|
119
|
-
for (const link2 of node.targetLinks) {
|
|
120
|
-
link2.y1 = y1 + link2.width / 2;
|
|
121
|
-
y1 += link2.width;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
function Sankey() {
|
|
126
|
-
let x0 = 0, y0 = 0, x1 = 1, y1 = 1;
|
|
127
|
-
let dx = 24;
|
|
128
|
-
let dy = 8, py;
|
|
129
|
-
let id = defaultId;
|
|
130
|
-
let align = justify;
|
|
131
|
-
let sort;
|
|
132
|
-
let linkSort;
|
|
133
|
-
let nodes2 = defaultNodes;
|
|
134
|
-
let links2 = defaultLinks;
|
|
135
|
-
let iterations = 6;
|
|
136
|
-
function sankey() {
|
|
137
|
-
const graph = { nodes: nodes2.apply(null, arguments), links: links2.apply(null, arguments) };
|
|
138
|
-
computeNodeLinks(graph);
|
|
139
|
-
computeNodeValues(graph);
|
|
140
|
-
computeNodeDepths(graph);
|
|
141
|
-
computeNodeHeights(graph);
|
|
142
|
-
computeNodeBreadths(graph);
|
|
143
|
-
computeLinkBreadths(graph);
|
|
144
|
-
return graph;
|
|
145
|
-
}
|
|
146
|
-
sankey.update = function(graph) {
|
|
147
|
-
computeLinkBreadths(graph);
|
|
148
|
-
return graph;
|
|
149
|
-
};
|
|
150
|
-
sankey.nodeId = function(_) {
|
|
151
|
-
return arguments.length ? (id = typeof _ === "function" ? _ : constant$1(_), sankey) : id;
|
|
152
|
-
};
|
|
153
|
-
sankey.nodeAlign = function(_) {
|
|
154
|
-
return arguments.length ? (align = typeof _ === "function" ? _ : constant$1(_), sankey) : align;
|
|
155
|
-
};
|
|
156
|
-
sankey.nodeSort = function(_) {
|
|
157
|
-
return arguments.length ? (sort = _, sankey) : sort;
|
|
158
|
-
};
|
|
159
|
-
sankey.nodeWidth = function(_) {
|
|
160
|
-
return arguments.length ? (dx = +_, sankey) : dx;
|
|
161
|
-
};
|
|
162
|
-
sankey.nodePadding = function(_) {
|
|
163
|
-
return arguments.length ? (dy = py = +_, sankey) : dy;
|
|
164
|
-
};
|
|
165
|
-
sankey.nodes = function(_) {
|
|
166
|
-
return arguments.length ? (nodes2 = typeof _ === "function" ? _ : constant$1(_), sankey) : nodes2;
|
|
167
|
-
};
|
|
168
|
-
sankey.links = function(_) {
|
|
169
|
-
return arguments.length ? (links2 = typeof _ === "function" ? _ : constant$1(_), sankey) : links2;
|
|
170
|
-
};
|
|
171
|
-
sankey.linkSort = function(_) {
|
|
172
|
-
return arguments.length ? (linkSort = _, sankey) : linkSort;
|
|
173
|
-
};
|
|
174
|
-
sankey.size = function(_) {
|
|
175
|
-
return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];
|
|
176
|
-
};
|
|
177
|
-
sankey.extent = function(_) {
|
|
178
|
-
return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];
|
|
179
|
-
};
|
|
180
|
-
sankey.iterations = function(_) {
|
|
181
|
-
return arguments.length ? (iterations = +_, sankey) : iterations;
|
|
182
|
-
};
|
|
183
|
-
function computeNodeLinks({ nodes: nodes3, links: links3 }) {
|
|
184
|
-
for (const [i, node] of nodes3.entries()) {
|
|
185
|
-
node.index = i;
|
|
186
|
-
node.sourceLinks = [];
|
|
187
|
-
node.targetLinks = [];
|
|
188
|
-
}
|
|
189
|
-
const nodeById = new Map(nodes3.map((d, i) => [id(d, i, nodes3), d]));
|
|
190
|
-
for (const [i, link2] of links3.entries()) {
|
|
191
|
-
link2.index = i;
|
|
192
|
-
let { source, target } = link2;
|
|
193
|
-
if (typeof source !== "object") source = link2.source = find(nodeById, source);
|
|
194
|
-
if (typeof target !== "object") target = link2.target = find(nodeById, target);
|
|
195
|
-
source.sourceLinks.push(link2);
|
|
196
|
-
target.targetLinks.push(link2);
|
|
197
|
-
}
|
|
198
|
-
if (linkSort != null) {
|
|
199
|
-
for (const { sourceLinks, targetLinks } of nodes3) {
|
|
200
|
-
sourceLinks.sort(linkSort);
|
|
201
|
-
targetLinks.sort(linkSort);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
function computeNodeValues({ nodes: nodes3 }) {
|
|
206
|
-
for (const node of nodes3) {
|
|
207
|
-
node.value = node.fixedValue === void 0 ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value)) : node.fixedValue;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
function computeNodeDepths({ nodes: nodes3 }) {
|
|
211
|
-
const n = nodes3.length;
|
|
212
|
-
let current = new Set(nodes3);
|
|
213
|
-
let next = /* @__PURE__ */ new Set();
|
|
214
|
-
let x2 = 0;
|
|
215
|
-
while (current.size) {
|
|
216
|
-
for (const node of current) {
|
|
217
|
-
node.depth = x2;
|
|
218
|
-
for (const { target } of node.sourceLinks) {
|
|
219
|
-
next.add(target);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
if (++x2 > n) throw new Error("circular link");
|
|
223
|
-
current = next;
|
|
224
|
-
next = /* @__PURE__ */ new Set();
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
function computeNodeHeights({ nodes: nodes3 }) {
|
|
228
|
-
const n = nodes3.length;
|
|
229
|
-
let current = new Set(nodes3);
|
|
230
|
-
let next = /* @__PURE__ */ new Set();
|
|
231
|
-
let x2 = 0;
|
|
232
|
-
while (current.size) {
|
|
233
|
-
for (const node of current) {
|
|
234
|
-
node.height = x2;
|
|
235
|
-
for (const { source } of node.targetLinks) {
|
|
236
|
-
next.add(source);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
if (++x2 > n) throw new Error("circular link");
|
|
240
|
-
current = next;
|
|
241
|
-
next = /* @__PURE__ */ new Set();
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
function computeNodeLayers({ nodes: nodes3 }) {
|
|
245
|
-
const x2 = max(nodes3, (d) => d.depth) + 1;
|
|
246
|
-
const kx = (x1 - x0 - dx) / (x2 - 1);
|
|
247
|
-
const columns = new Array(x2);
|
|
248
|
-
for (const node of nodes3) {
|
|
249
|
-
const i = Math.max(0, Math.min(x2 - 1, Math.floor(align.call(null, node, x2))));
|
|
250
|
-
node.layer = i;
|
|
251
|
-
node.x0 = x0 + i * kx;
|
|
252
|
-
node.x1 = node.x0 + dx;
|
|
253
|
-
if (columns[i]) columns[i].push(node);
|
|
254
|
-
else columns[i] = [node];
|
|
255
|
-
}
|
|
256
|
-
if (sort) for (const column of columns) {
|
|
257
|
-
column.sort(sort);
|
|
258
|
-
}
|
|
259
|
-
return columns;
|
|
260
|
-
}
|
|
261
|
-
function initializeNodeBreadths(columns) {
|
|
262
|
-
const ky = min(columns, (c) => (y1 - y0 - (c.length - 1) * py) / sum(c, value));
|
|
263
|
-
for (const nodes3 of columns) {
|
|
264
|
-
let y2 = y0;
|
|
265
|
-
for (const node of nodes3) {
|
|
266
|
-
node.y0 = y2;
|
|
267
|
-
node.y1 = y2 + node.value * ky;
|
|
268
|
-
y2 = node.y1 + py;
|
|
269
|
-
for (const link2 of node.sourceLinks) {
|
|
270
|
-
link2.width = link2.value * ky;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
y2 = (y1 - y2 + py) / (nodes3.length + 1);
|
|
274
|
-
for (let i = 0; i < nodes3.length; ++i) {
|
|
275
|
-
const node = nodes3[i];
|
|
276
|
-
node.y0 += y2 * (i + 1);
|
|
277
|
-
node.y1 += y2 * (i + 1);
|
|
278
|
-
}
|
|
279
|
-
reorderLinks(nodes3);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
function computeNodeBreadths(graph) {
|
|
283
|
-
const columns = computeNodeLayers(graph);
|
|
284
|
-
py = Math.min(dy, (y1 - y0) / (max(columns, (c) => c.length) - 1));
|
|
285
|
-
initializeNodeBreadths(columns);
|
|
286
|
-
for (let i = 0; i < iterations; ++i) {
|
|
287
|
-
const alpha = Math.pow(0.99, i);
|
|
288
|
-
const beta = Math.max(1 - alpha, (i + 1) / iterations);
|
|
289
|
-
relaxRightToLeft(columns, alpha, beta);
|
|
290
|
-
relaxLeftToRight(columns, alpha, beta);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
function relaxLeftToRight(columns, alpha, beta) {
|
|
294
|
-
for (let i = 1, n = columns.length; i < n; ++i) {
|
|
295
|
-
const column = columns[i];
|
|
296
|
-
for (const target of column) {
|
|
297
|
-
let y2 = 0;
|
|
298
|
-
let w = 0;
|
|
299
|
-
for (const { source, value: value2 } of target.targetLinks) {
|
|
300
|
-
let v = value2 * (target.layer - source.layer);
|
|
301
|
-
y2 += targetTop(source, target) * v;
|
|
302
|
-
w += v;
|
|
303
|
-
}
|
|
304
|
-
if (!(w > 0)) continue;
|
|
305
|
-
let dy2 = (y2 / w - target.y0) * alpha;
|
|
306
|
-
target.y0 += dy2;
|
|
307
|
-
target.y1 += dy2;
|
|
308
|
-
reorderNodeLinks(target);
|
|
309
|
-
}
|
|
310
|
-
if (sort === void 0) column.sort(ascendingBreadth);
|
|
311
|
-
resolveCollisions(column, beta);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
function relaxRightToLeft(columns, alpha, beta) {
|
|
315
|
-
for (let n = columns.length, i = n - 2; i >= 0; --i) {
|
|
316
|
-
const column = columns[i];
|
|
317
|
-
for (const source of column) {
|
|
318
|
-
let y2 = 0;
|
|
319
|
-
let w = 0;
|
|
320
|
-
for (const { target, value: value2 } of source.sourceLinks) {
|
|
321
|
-
let v = value2 * (target.layer - source.layer);
|
|
322
|
-
y2 += sourceTop(source, target) * v;
|
|
323
|
-
w += v;
|
|
324
|
-
}
|
|
325
|
-
if (!(w > 0)) continue;
|
|
326
|
-
let dy2 = (y2 / w - source.y0) * alpha;
|
|
327
|
-
source.y0 += dy2;
|
|
328
|
-
source.y1 += dy2;
|
|
329
|
-
reorderNodeLinks(source);
|
|
330
|
-
}
|
|
331
|
-
if (sort === void 0) column.sort(ascendingBreadth);
|
|
332
|
-
resolveCollisions(column, beta);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
function resolveCollisions(nodes3, alpha) {
|
|
336
|
-
const i = nodes3.length >> 1;
|
|
337
|
-
const subject = nodes3[i];
|
|
338
|
-
resolveCollisionsBottomToTop(nodes3, subject.y0 - py, i - 1, alpha);
|
|
339
|
-
resolveCollisionsTopToBottom(nodes3, subject.y1 + py, i + 1, alpha);
|
|
340
|
-
resolveCollisionsBottomToTop(nodes3, y1, nodes3.length - 1, alpha);
|
|
341
|
-
resolveCollisionsTopToBottom(nodes3, y0, 0, alpha);
|
|
342
|
-
}
|
|
343
|
-
function resolveCollisionsTopToBottom(nodes3, y2, i, alpha) {
|
|
344
|
-
for (; i < nodes3.length; ++i) {
|
|
345
|
-
const node = nodes3[i];
|
|
346
|
-
const dy2 = (y2 - node.y0) * alpha;
|
|
347
|
-
if (dy2 > 1e-6) node.y0 += dy2, node.y1 += dy2;
|
|
348
|
-
y2 = node.y1 + py;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
function resolveCollisionsBottomToTop(nodes3, y2, i, alpha) {
|
|
352
|
-
for (; i >= 0; --i) {
|
|
353
|
-
const node = nodes3[i];
|
|
354
|
-
const dy2 = (node.y1 - y2) * alpha;
|
|
355
|
-
if (dy2 > 1e-6) node.y0 -= dy2, node.y1 -= dy2;
|
|
356
|
-
y2 = node.y0 - py;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
function reorderNodeLinks({ sourceLinks, targetLinks }) {
|
|
360
|
-
if (linkSort === void 0) {
|
|
361
|
-
for (const { source: { sourceLinks: sourceLinks2 } } of targetLinks) {
|
|
362
|
-
sourceLinks2.sort(ascendingTargetBreadth);
|
|
363
|
-
}
|
|
364
|
-
for (const { target: { targetLinks: targetLinks2 } } of sourceLinks) {
|
|
365
|
-
targetLinks2.sort(ascendingSourceBreadth);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
function reorderLinks(nodes3) {
|
|
370
|
-
if (linkSort === void 0) {
|
|
371
|
-
for (const { sourceLinks, targetLinks } of nodes3) {
|
|
372
|
-
sourceLinks.sort(ascendingTargetBreadth);
|
|
373
|
-
targetLinks.sort(ascendingSourceBreadth);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
function targetTop(source, target) {
|
|
378
|
-
let y2 = source.y0 - (source.sourceLinks.length - 1) * py / 2;
|
|
379
|
-
for (const { target: node, width } of source.sourceLinks) {
|
|
380
|
-
if (node === target) break;
|
|
381
|
-
y2 += width + py;
|
|
382
|
-
}
|
|
383
|
-
for (const { source: node, width } of target.targetLinks) {
|
|
384
|
-
if (node === source) break;
|
|
385
|
-
y2 -= width;
|
|
386
|
-
}
|
|
387
|
-
return y2;
|
|
388
|
-
}
|
|
389
|
-
function sourceTop(source, target) {
|
|
390
|
-
let y2 = target.y0 - (target.targetLinks.length - 1) * py / 2;
|
|
391
|
-
for (const { source: node, width } of target.targetLinks) {
|
|
392
|
-
if (node === source) break;
|
|
393
|
-
y2 += width + py;
|
|
394
|
-
}
|
|
395
|
-
for (const { target: node, width } of source.sourceLinks) {
|
|
396
|
-
if (node === target) break;
|
|
397
|
-
y2 -= width;
|
|
398
|
-
}
|
|
399
|
-
return y2;
|
|
400
|
-
}
|
|
401
|
-
return sankey;
|
|
402
|
-
}
|
|
403
|
-
var pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon;
|
|
404
|
-
function Path() {
|
|
405
|
-
this._x0 = this._y0 = // start of current subpath
|
|
406
|
-
this._x1 = this._y1 = null;
|
|
407
|
-
this._ = "";
|
|
408
|
-
}
|
|
409
|
-
function path() {
|
|
410
|
-
return new Path();
|
|
411
|
-
}
|
|
412
|
-
Path.prototype = path.prototype = {
|
|
413
|
-
constructor: Path,
|
|
414
|
-
moveTo: function(x2, y2) {
|
|
415
|
-
this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2);
|
|
416
|
-
},
|
|
417
|
-
closePath: function() {
|
|
418
|
-
if (this._x1 !== null) {
|
|
419
|
-
this._x1 = this._x0, this._y1 = this._y0;
|
|
420
|
-
this._ += "Z";
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
lineTo: function(x2, y2) {
|
|
424
|
-
this._ += "L" + (this._x1 = +x2) + "," + (this._y1 = +y2);
|
|
425
|
-
},
|
|
426
|
-
quadraticCurveTo: function(x1, y1, x2, y2) {
|
|
427
|
-
this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x2) + "," + (this._y1 = +y2);
|
|
428
|
-
},
|
|
429
|
-
bezierCurveTo: function(x1, y1, x2, y2, x3, y3) {
|
|
430
|
-
this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x3) + "," + (this._y1 = +y3);
|
|
431
|
-
},
|
|
432
|
-
arcTo: function(x1, y1, x2, y2, r) {
|
|
433
|
-
x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
|
|
434
|
-
var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
|
|
435
|
-
if (r < 0) throw new Error("negative radius: " + r);
|
|
436
|
-
if (this._x1 === null) {
|
|
437
|
-
this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
|
|
438
|
-
} else if (!(l01_2 > epsilon)) ;
|
|
439
|
-
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
|
|
440
|
-
this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
|
|
441
|
-
} else {
|
|
442
|
-
var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21;
|
|
443
|
-
if (Math.abs(t01 - 1) > epsilon) {
|
|
444
|
-
this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
|
|
445
|
-
}
|
|
446
|
-
this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
arc: function(x2, y2, r, a0, a1, ccw) {
|
|
450
|
-
x2 = +x2, y2 = +y2, r = +r, ccw = !!ccw;
|
|
451
|
-
var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;
|
|
452
|
-
if (r < 0) throw new Error("negative radius: " + r);
|
|
453
|
-
if (this._x1 === null) {
|
|
454
|
-
this._ += "M" + x0 + "," + y0;
|
|
455
|
-
} else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
|
|
456
|
-
this._ += "L" + x0 + "," + y0;
|
|
457
|
-
}
|
|
458
|
-
if (!r) return;
|
|
459
|
-
if (da < 0) da = da % tau + tau;
|
|
460
|
-
if (da > tauEpsilon) {
|
|
461
|
-
this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x2 - dx) + "," + (y2 - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
|
|
462
|
-
} else if (da > epsilon) {
|
|
463
|
-
this._ += "A" + r + "," + r + ",0," + +(da >= pi) + "," + cw + "," + (this._x1 = x2 + r * Math.cos(a1)) + "," + (this._y1 = y2 + r * Math.sin(a1));
|
|
464
|
-
}
|
|
465
|
-
},
|
|
466
|
-
rect: function(x2, y2, w, h) {
|
|
467
|
-
this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2) + "h" + +w + "v" + +h + "h" + -w + "Z";
|
|
468
|
-
},
|
|
469
|
-
toString: function() {
|
|
470
|
-
return this._;
|
|
471
|
-
}
|
|
472
|
-
};
|
|
473
|
-
function constant(x2) {
|
|
474
|
-
return function constant2() {
|
|
475
|
-
return x2;
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
function x(p) {
|
|
479
|
-
return p[0];
|
|
480
|
-
}
|
|
481
|
-
function y(p) {
|
|
482
|
-
return p[1];
|
|
483
|
-
}
|
|
484
|
-
var slice = Array.prototype.slice;
|
|
485
|
-
function linkSource(d) {
|
|
486
|
-
return d.source;
|
|
487
|
-
}
|
|
488
|
-
function linkTarget(d) {
|
|
489
|
-
return d.target;
|
|
490
|
-
}
|
|
491
|
-
function link(curve) {
|
|
492
|
-
var source = linkSource, target = linkTarget, x$1 = x, y$1 = y, context = null;
|
|
493
|
-
function link2() {
|
|
494
|
-
var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);
|
|
495
|
-
if (!context) context = buffer = path();
|
|
496
|
-
curve(context, +x$1.apply(this, (argv[0] = s, argv)), +y$1.apply(this, argv), +x$1.apply(this, (argv[0] = t, argv)), +y$1.apply(this, argv));
|
|
497
|
-
if (buffer) return context = null, buffer + "" || null;
|
|
498
|
-
}
|
|
499
|
-
link2.source = function(_) {
|
|
500
|
-
return arguments.length ? (source = _, link2) : source;
|
|
501
|
-
};
|
|
502
|
-
link2.target = function(_) {
|
|
503
|
-
return arguments.length ? (target = _, link2) : target;
|
|
504
|
-
};
|
|
505
|
-
link2.x = function(_) {
|
|
506
|
-
return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), link2) : x$1;
|
|
507
|
-
};
|
|
508
|
-
link2.y = function(_) {
|
|
509
|
-
return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), link2) : y$1;
|
|
510
|
-
};
|
|
511
|
-
link2.context = function(_) {
|
|
512
|
-
return arguments.length ? (context = _ == null ? null : _, link2) : context;
|
|
513
|
-
};
|
|
514
|
-
return link2;
|
|
515
|
-
}
|
|
516
|
-
function curveHorizontal(context, x0, y0, x1, y1) {
|
|
517
|
-
context.moveTo(x0, y0);
|
|
518
|
-
context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);
|
|
519
|
-
}
|
|
520
|
-
function linkHorizontal() {
|
|
521
|
-
return link(curveHorizontal);
|
|
522
|
-
}
|
|
523
|
-
function horizontalSource(d) {
|
|
524
|
-
return [d.source.x1, d.y0];
|
|
525
|
-
}
|
|
526
|
-
function horizontalTarget(d) {
|
|
527
|
-
return [d.target.x0, d.y1];
|
|
528
|
-
}
|
|
529
|
-
function d3SankeyLinkHorizontal() {
|
|
530
|
-
return linkHorizontal().source(horizontalSource).target(horizontalTarget);
|
|
531
|
-
}
|
|
532
|
-
var parser = (function() {
|
|
533
|
-
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
|
534
|
-
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
|
|
535
|
-
return o2;
|
|
536
|
-
}, "o"), $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12];
|
|
537
|
-
var parser2 = {
|
|
538
|
-
trace: /* @__PURE__ */ __name(function trace() {
|
|
539
|
-
}, "trace"),
|
|
540
|
-
yy: {},
|
|
541
|
-
symbols_: { "error": 2, "start": 3, "SANKEY": 4, "NEWLINE": 5, "csv": 6, "opt_eof": 7, "record": 8, "csv_tail": 9, "EOF": 10, "field[source]": 11, "COMMA": 12, "field[target]": 13, "field[value]": 14, "field": 15, "escaped": 16, "non_escaped": 17, "DQUOTE": 18, "ESCAPED_TEXT": 19, "NON_ESCAPED_TEXT": 20, "$accept": 0, "$end": 1 },
|
|
542
|
-
terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
|
|
543
|
-
productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
|
|
544
|
-
performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
545
|
-
var $0 = $$.length - 1;
|
|
546
|
-
switch (yystate) {
|
|
547
|
-
case 7:
|
|
548
|
-
const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('""', '"'));
|
|
549
|
-
const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('""', '"'));
|
|
550
|
-
const value2 = parseFloat($$[$0].trim());
|
|
551
|
-
yy.addLink(source, target, value2);
|
|
552
|
-
break;
|
|
553
|
-
case 8:
|
|
554
|
-
case 9:
|
|
555
|
-
case 11:
|
|
556
|
-
this.$ = $$[$0];
|
|
557
|
-
break;
|
|
558
|
-
case 10:
|
|
559
|
-
this.$ = $$[$0 - 1];
|
|
560
|
-
break;
|
|
561
|
-
}
|
|
562
|
-
}, "anonymous"),
|
|
563
|
-
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])],
|
|
564
|
-
defaultActions: { 11: [2, 1], 12: [2, 5] },
|
|
565
|
-
parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
|
|
566
|
-
if (hash.recoverable) {
|
|
567
|
-
this.trace(str);
|
|
568
|
-
} else {
|
|
569
|
-
var error = new Error(str);
|
|
570
|
-
error.hash = hash;
|
|
571
|
-
throw error;
|
|
572
|
-
}
|
|
573
|
-
}, "parseError"),
|
|
574
|
-
parse: /* @__PURE__ */ __name(function parse(input) {
|
|
575
|
-
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
|
|
576
|
-
var args = lstack.slice.call(arguments, 1);
|
|
577
|
-
var lexer2 = Object.create(this.lexer);
|
|
578
|
-
var sharedState = { yy: {} };
|
|
579
|
-
for (var k in this.yy) {
|
|
580
|
-
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
581
|
-
sharedState.yy[k] = this.yy[k];
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
lexer2.setInput(input, sharedState.yy);
|
|
585
|
-
sharedState.yy.lexer = lexer2;
|
|
586
|
-
sharedState.yy.parser = this;
|
|
587
|
-
if (typeof lexer2.yylloc == "undefined") {
|
|
588
|
-
lexer2.yylloc = {};
|
|
589
|
-
}
|
|
590
|
-
var yyloc = lexer2.yylloc;
|
|
591
|
-
lstack.push(yyloc);
|
|
592
|
-
var ranges = lexer2.options && lexer2.options.ranges;
|
|
593
|
-
if (typeof sharedState.yy.parseError === "function") {
|
|
594
|
-
this.parseError = sharedState.yy.parseError;
|
|
595
|
-
} else {
|
|
596
|
-
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
597
|
-
}
|
|
598
|
-
function popStack(n) {
|
|
599
|
-
stack.length = stack.length - 2 * n;
|
|
600
|
-
vstack.length = vstack.length - n;
|
|
601
|
-
lstack.length = lstack.length - n;
|
|
602
|
-
}
|
|
603
|
-
__name(popStack, "popStack");
|
|
604
|
-
function lex() {
|
|
605
|
-
var token;
|
|
606
|
-
token = tstack.pop() || lexer2.lex() || EOF;
|
|
607
|
-
if (typeof token !== "number") {
|
|
608
|
-
if (token instanceof Array) {
|
|
609
|
-
tstack = token;
|
|
610
|
-
token = tstack.pop();
|
|
611
|
-
}
|
|
612
|
-
token = self.symbols_[token] || token;
|
|
613
|
-
}
|
|
614
|
-
return token;
|
|
615
|
-
}
|
|
616
|
-
__name(lex, "lex");
|
|
617
|
-
var symbol, state, action, r, yyval = {}, p, len, newState, expected;
|
|
618
|
-
while (true) {
|
|
619
|
-
state = stack[stack.length - 1];
|
|
620
|
-
if (this.defaultActions[state]) {
|
|
621
|
-
action = this.defaultActions[state];
|
|
622
|
-
} else {
|
|
623
|
-
if (symbol === null || typeof symbol == "undefined") {
|
|
624
|
-
symbol = lex();
|
|
625
|
-
}
|
|
626
|
-
action = table[state] && table[state][symbol];
|
|
627
|
-
}
|
|
628
|
-
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
629
|
-
var errStr = "";
|
|
630
|
-
expected = [];
|
|
631
|
-
for (p in table[state]) {
|
|
632
|
-
if (this.terminals_[p] && p > TERROR) {
|
|
633
|
-
expected.push("'" + this.terminals_[p] + "'");
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
if (lexer2.showPosition) {
|
|
637
|
-
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
638
|
-
} else {
|
|
639
|
-
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
640
|
-
}
|
|
641
|
-
this.parseError(errStr, {
|
|
642
|
-
text: lexer2.match,
|
|
643
|
-
token: this.terminals_[symbol] || symbol,
|
|
644
|
-
line: lexer2.yylineno,
|
|
645
|
-
loc: yyloc,
|
|
646
|
-
expected
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
if (action[0] instanceof Array && action.length > 1) {
|
|
650
|
-
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
651
|
-
}
|
|
652
|
-
switch (action[0]) {
|
|
653
|
-
case 1:
|
|
654
|
-
stack.push(symbol);
|
|
655
|
-
vstack.push(lexer2.yytext);
|
|
656
|
-
lstack.push(lexer2.yylloc);
|
|
657
|
-
stack.push(action[1]);
|
|
658
|
-
symbol = null;
|
|
659
|
-
{
|
|
660
|
-
yyleng = lexer2.yyleng;
|
|
661
|
-
yytext = lexer2.yytext;
|
|
662
|
-
yylineno = lexer2.yylineno;
|
|
663
|
-
yyloc = lexer2.yylloc;
|
|
664
|
-
}
|
|
665
|
-
break;
|
|
666
|
-
case 2:
|
|
667
|
-
len = this.productions_[action[1]][1];
|
|
668
|
-
yyval.$ = vstack[vstack.length - len];
|
|
669
|
-
yyval._$ = {
|
|
670
|
-
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
671
|
-
last_line: lstack[lstack.length - 1].last_line,
|
|
672
|
-
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
673
|
-
last_column: lstack[lstack.length - 1].last_column
|
|
674
|
-
};
|
|
675
|
-
if (ranges) {
|
|
676
|
-
yyval._$.range = [
|
|
677
|
-
lstack[lstack.length - (len || 1)].range[0],
|
|
678
|
-
lstack[lstack.length - 1].range[1]
|
|
679
|
-
];
|
|
680
|
-
}
|
|
681
|
-
r = this.performAction.apply(yyval, [
|
|
682
|
-
yytext,
|
|
683
|
-
yyleng,
|
|
684
|
-
yylineno,
|
|
685
|
-
sharedState.yy,
|
|
686
|
-
action[1],
|
|
687
|
-
vstack,
|
|
688
|
-
lstack
|
|
689
|
-
].concat(args));
|
|
690
|
-
if (typeof r !== "undefined") {
|
|
691
|
-
return r;
|
|
692
|
-
}
|
|
693
|
-
if (len) {
|
|
694
|
-
stack = stack.slice(0, -1 * len * 2);
|
|
695
|
-
vstack = vstack.slice(0, -1 * len);
|
|
696
|
-
lstack = lstack.slice(0, -1 * len);
|
|
697
|
-
}
|
|
698
|
-
stack.push(this.productions_[action[1]][0]);
|
|
699
|
-
vstack.push(yyval.$);
|
|
700
|
-
lstack.push(yyval._$);
|
|
701
|
-
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
702
|
-
stack.push(newState);
|
|
703
|
-
break;
|
|
704
|
-
case 3:
|
|
705
|
-
return true;
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
return true;
|
|
709
|
-
}, "parse")
|
|
710
|
-
};
|
|
711
|
-
var lexer = /* @__PURE__ */ (function() {
|
|
712
|
-
var lexer2 = {
|
|
713
|
-
EOF: 1,
|
|
714
|
-
parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
|
|
715
|
-
if (this.yy.parser) {
|
|
716
|
-
this.yy.parser.parseError(str, hash);
|
|
717
|
-
} else {
|
|
718
|
-
throw new Error(str);
|
|
719
|
-
}
|
|
720
|
-
}, "parseError"),
|
|
721
|
-
// resets the lexer, sets new input
|
|
722
|
-
setInput: /* @__PURE__ */ __name(function(input, yy) {
|
|
723
|
-
this.yy = yy || this.yy || {};
|
|
724
|
-
this._input = input;
|
|
725
|
-
this._more = this._backtrack = this.done = false;
|
|
726
|
-
this.yylineno = this.yyleng = 0;
|
|
727
|
-
this.yytext = this.matched = this.match = "";
|
|
728
|
-
this.conditionStack = ["INITIAL"];
|
|
729
|
-
this.yylloc = {
|
|
730
|
-
first_line: 1,
|
|
731
|
-
first_column: 0,
|
|
732
|
-
last_line: 1,
|
|
733
|
-
last_column: 0
|
|
734
|
-
};
|
|
735
|
-
if (this.options.ranges) {
|
|
736
|
-
this.yylloc.range = [0, 0];
|
|
737
|
-
}
|
|
738
|
-
this.offset = 0;
|
|
739
|
-
return this;
|
|
740
|
-
}, "setInput"),
|
|
741
|
-
// consumes and returns one char from the input
|
|
742
|
-
input: /* @__PURE__ */ __name(function() {
|
|
743
|
-
var ch = this._input[0];
|
|
744
|
-
this.yytext += ch;
|
|
745
|
-
this.yyleng++;
|
|
746
|
-
this.offset++;
|
|
747
|
-
this.match += ch;
|
|
748
|
-
this.matched += ch;
|
|
749
|
-
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
750
|
-
if (lines) {
|
|
751
|
-
this.yylineno++;
|
|
752
|
-
this.yylloc.last_line++;
|
|
753
|
-
} else {
|
|
754
|
-
this.yylloc.last_column++;
|
|
755
|
-
}
|
|
756
|
-
if (this.options.ranges) {
|
|
757
|
-
this.yylloc.range[1]++;
|
|
758
|
-
}
|
|
759
|
-
this._input = this._input.slice(1);
|
|
760
|
-
return ch;
|
|
761
|
-
}, "input"),
|
|
762
|
-
// unshifts one char (or a string) into the input
|
|
763
|
-
unput: /* @__PURE__ */ __name(function(ch) {
|
|
764
|
-
var len = ch.length;
|
|
765
|
-
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
766
|
-
this._input = ch + this._input;
|
|
767
|
-
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
768
|
-
this.offset -= len;
|
|
769
|
-
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
770
|
-
this.match = this.match.substr(0, this.match.length - 1);
|
|
771
|
-
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
772
|
-
if (lines.length - 1) {
|
|
773
|
-
this.yylineno -= lines.length - 1;
|
|
774
|
-
}
|
|
775
|
-
var r = this.yylloc.range;
|
|
776
|
-
this.yylloc = {
|
|
777
|
-
first_line: this.yylloc.first_line,
|
|
778
|
-
last_line: this.yylineno + 1,
|
|
779
|
-
first_column: this.yylloc.first_column,
|
|
780
|
-
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
|
781
|
-
};
|
|
782
|
-
if (this.options.ranges) {
|
|
783
|
-
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
784
|
-
}
|
|
785
|
-
this.yyleng = this.yytext.length;
|
|
786
|
-
return this;
|
|
787
|
-
}, "unput"),
|
|
788
|
-
// When called from action, caches matched text and appends it on next action
|
|
789
|
-
more: /* @__PURE__ */ __name(function() {
|
|
790
|
-
this._more = true;
|
|
791
|
-
return this;
|
|
792
|
-
}, "more"),
|
|
793
|
-
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
794
|
-
reject: /* @__PURE__ */ __name(function() {
|
|
795
|
-
if (this.options.backtrack_lexer) {
|
|
796
|
-
this._backtrack = true;
|
|
797
|
-
} else {
|
|
798
|
-
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(), {
|
|
799
|
-
text: "",
|
|
800
|
-
token: null,
|
|
801
|
-
line: this.yylineno
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
return this;
|
|
805
|
-
}, "reject"),
|
|
806
|
-
// retain first n characters of the match
|
|
807
|
-
less: /* @__PURE__ */ __name(function(n) {
|
|
808
|
-
this.unput(this.match.slice(n));
|
|
809
|
-
}, "less"),
|
|
810
|
-
// displays already matched input, i.e. for error messages
|
|
811
|
-
pastInput: /* @__PURE__ */ __name(function() {
|
|
812
|
-
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
813
|
-
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
814
|
-
}, "pastInput"),
|
|
815
|
-
// displays upcoming input, i.e. for error messages
|
|
816
|
-
upcomingInput: /* @__PURE__ */ __name(function() {
|
|
817
|
-
var next = this.match;
|
|
818
|
-
if (next.length < 20) {
|
|
819
|
-
next += this._input.substr(0, 20 - next.length);
|
|
820
|
-
}
|
|
821
|
-
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
822
|
-
}, "upcomingInput"),
|
|
823
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
824
|
-
showPosition: /* @__PURE__ */ __name(function() {
|
|
825
|
-
var pre = this.pastInput();
|
|
826
|
-
var c = new Array(pre.length + 1).join("-");
|
|
827
|
-
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
828
|
-
}, "showPosition"),
|
|
829
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
830
|
-
test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
|
|
831
|
-
var token, lines, backup;
|
|
832
|
-
if (this.options.backtrack_lexer) {
|
|
833
|
-
backup = {
|
|
834
|
-
yylineno: this.yylineno,
|
|
835
|
-
yylloc: {
|
|
836
|
-
first_line: this.yylloc.first_line,
|
|
837
|
-
last_line: this.last_line,
|
|
838
|
-
first_column: this.yylloc.first_column,
|
|
839
|
-
last_column: this.yylloc.last_column
|
|
840
|
-
},
|
|
841
|
-
yytext: this.yytext,
|
|
842
|
-
match: this.match,
|
|
843
|
-
matches: this.matches,
|
|
844
|
-
matched: this.matched,
|
|
845
|
-
yyleng: this.yyleng,
|
|
846
|
-
offset: this.offset,
|
|
847
|
-
_more: this._more,
|
|
848
|
-
_input: this._input,
|
|
849
|
-
yy: this.yy,
|
|
850
|
-
conditionStack: this.conditionStack.slice(0),
|
|
851
|
-
done: this.done
|
|
852
|
-
};
|
|
853
|
-
if (this.options.ranges) {
|
|
854
|
-
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
858
|
-
if (lines) {
|
|
859
|
-
this.yylineno += lines.length;
|
|
860
|
-
}
|
|
861
|
-
this.yylloc = {
|
|
862
|
-
first_line: this.yylloc.last_line,
|
|
863
|
-
last_line: this.yylineno + 1,
|
|
864
|
-
first_column: this.yylloc.last_column,
|
|
865
|
-
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
866
|
-
};
|
|
867
|
-
this.yytext += match[0];
|
|
868
|
-
this.match += match[0];
|
|
869
|
-
this.matches = match;
|
|
870
|
-
this.yyleng = this.yytext.length;
|
|
871
|
-
if (this.options.ranges) {
|
|
872
|
-
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
873
|
-
}
|
|
874
|
-
this._more = false;
|
|
875
|
-
this._backtrack = false;
|
|
876
|
-
this._input = this._input.slice(match[0].length);
|
|
877
|
-
this.matched += match[0];
|
|
878
|
-
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
879
|
-
if (this.done && this._input) {
|
|
880
|
-
this.done = false;
|
|
881
|
-
}
|
|
882
|
-
if (token) {
|
|
883
|
-
return token;
|
|
884
|
-
} else if (this._backtrack) {
|
|
885
|
-
for (var k in backup) {
|
|
886
|
-
this[k] = backup[k];
|
|
887
|
-
}
|
|
888
|
-
return false;
|
|
889
|
-
}
|
|
890
|
-
return false;
|
|
891
|
-
}, "test_match"),
|
|
892
|
-
// return next match in input
|
|
893
|
-
next: /* @__PURE__ */ __name(function() {
|
|
894
|
-
if (this.done) {
|
|
895
|
-
return this.EOF;
|
|
896
|
-
}
|
|
897
|
-
if (!this._input) {
|
|
898
|
-
this.done = true;
|
|
899
|
-
}
|
|
900
|
-
var token, match, tempMatch, index;
|
|
901
|
-
if (!this._more) {
|
|
902
|
-
this.yytext = "";
|
|
903
|
-
this.match = "";
|
|
904
|
-
}
|
|
905
|
-
var rules = this._currentRules();
|
|
906
|
-
for (var i = 0; i < rules.length; i++) {
|
|
907
|
-
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
908
|
-
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
909
|
-
match = tempMatch;
|
|
910
|
-
index = i;
|
|
911
|
-
if (this.options.backtrack_lexer) {
|
|
912
|
-
token = this.test_match(tempMatch, rules[i]);
|
|
913
|
-
if (token !== false) {
|
|
914
|
-
return token;
|
|
915
|
-
} else if (this._backtrack) {
|
|
916
|
-
match = false;
|
|
917
|
-
continue;
|
|
918
|
-
} else {
|
|
919
|
-
return false;
|
|
920
|
-
}
|
|
921
|
-
} else if (!this.options.flex) {
|
|
922
|
-
break;
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
if (match) {
|
|
927
|
-
token = this.test_match(match, rules[index]);
|
|
928
|
-
if (token !== false) {
|
|
929
|
-
return token;
|
|
930
|
-
}
|
|
931
|
-
return false;
|
|
932
|
-
}
|
|
933
|
-
if (this._input === "") {
|
|
934
|
-
return this.EOF;
|
|
935
|
-
} else {
|
|
936
|
-
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
937
|
-
text: "",
|
|
938
|
-
token: null,
|
|
939
|
-
line: this.yylineno
|
|
940
|
-
});
|
|
941
|
-
}
|
|
942
|
-
}, "next"),
|
|
943
|
-
// return next match that has a token
|
|
944
|
-
lex: /* @__PURE__ */ __name(function lex() {
|
|
945
|
-
var r = this.next();
|
|
946
|
-
if (r) {
|
|
947
|
-
return r;
|
|
948
|
-
} else {
|
|
949
|
-
return this.lex();
|
|
950
|
-
}
|
|
951
|
-
}, "lex"),
|
|
952
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
953
|
-
begin: /* @__PURE__ */ __name(function begin(condition) {
|
|
954
|
-
this.conditionStack.push(condition);
|
|
955
|
-
}, "begin"),
|
|
956
|
-
// pop the previously active lexer condition state off the condition stack
|
|
957
|
-
popState: /* @__PURE__ */ __name(function popState() {
|
|
958
|
-
var n = this.conditionStack.length - 1;
|
|
959
|
-
if (n > 0) {
|
|
960
|
-
return this.conditionStack.pop();
|
|
961
|
-
} else {
|
|
962
|
-
return this.conditionStack[0];
|
|
963
|
-
}
|
|
964
|
-
}, "popState"),
|
|
965
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
966
|
-
_currentRules: /* @__PURE__ */ __name(function _currentRules() {
|
|
967
|
-
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
968
|
-
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
969
|
-
} else {
|
|
970
|
-
return this.conditions["INITIAL"].rules;
|
|
971
|
-
}
|
|
972
|
-
}, "_currentRules"),
|
|
973
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
974
|
-
topState: /* @__PURE__ */ __name(function topState(n) {
|
|
975
|
-
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
976
|
-
if (n >= 0) {
|
|
977
|
-
return this.conditionStack[n];
|
|
978
|
-
} else {
|
|
979
|
-
return "INITIAL";
|
|
980
|
-
}
|
|
981
|
-
}, "topState"),
|
|
982
|
-
// alias for begin(condition)
|
|
983
|
-
pushState: /* @__PURE__ */ __name(function pushState(condition) {
|
|
984
|
-
this.begin(condition);
|
|
985
|
-
}, "pushState"),
|
|
986
|
-
// return the number of states currently on the stack
|
|
987
|
-
stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
|
|
988
|
-
return this.conditionStack.length;
|
|
989
|
-
}, "stateStackSize"),
|
|
990
|
-
options: { "case-insensitive": true },
|
|
991
|
-
performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
992
|
-
switch ($avoiding_name_collisions) {
|
|
993
|
-
case 0:
|
|
994
|
-
this.pushState("csv");
|
|
995
|
-
return 4;
|
|
996
|
-
case 1:
|
|
997
|
-
this.pushState("csv");
|
|
998
|
-
return 4;
|
|
999
|
-
case 2:
|
|
1000
|
-
return 10;
|
|
1001
|
-
case 3:
|
|
1002
|
-
return 5;
|
|
1003
|
-
case 4:
|
|
1004
|
-
return 12;
|
|
1005
|
-
case 5:
|
|
1006
|
-
this.pushState("escaped_text");
|
|
1007
|
-
return 18;
|
|
1008
|
-
case 6:
|
|
1009
|
-
return 20;
|
|
1010
|
-
case 7:
|
|
1011
|
-
this.popState("escaped_text");
|
|
1012
|
-
return 18;
|
|
1013
|
-
case 8:
|
|
1014
|
-
return 19;
|
|
1015
|
-
}
|
|
1016
|
-
}, "anonymous"),
|
|
1017
|
-
rules: [/^(?:sankey-beta\b)/i, /^(?:sankey\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],
|
|
1018
|
-
conditions: { "csv": { "rules": [2, 3, 4, 5, 6, 7, 8], "inclusive": false }, "escaped_text": { "rules": [7, 8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8], "inclusive": true } }
|
|
1019
|
-
};
|
|
1020
|
-
return lexer2;
|
|
1021
|
-
})();
|
|
1022
|
-
parser2.lexer = lexer;
|
|
1023
|
-
function Parser() {
|
|
1024
|
-
this.yy = {};
|
|
1025
|
-
}
|
|
1026
|
-
__name(Parser, "Parser");
|
|
1027
|
-
Parser.prototype = parser2;
|
|
1028
|
-
parser2.Parser = Parser;
|
|
1029
|
-
return new Parser();
|
|
1030
|
-
})();
|
|
1031
|
-
parser.parser = parser;
|
|
1032
|
-
var sankey_default = parser;
|
|
1033
|
-
var links = [];
|
|
1034
|
-
var nodes = [];
|
|
1035
|
-
var nodesMap = /* @__PURE__ */ new Map();
|
|
1036
|
-
var clear2 = /* @__PURE__ */ __name(() => {
|
|
1037
|
-
links = [];
|
|
1038
|
-
nodes = [];
|
|
1039
|
-
nodesMap = /* @__PURE__ */ new Map();
|
|
1040
|
-
clear();
|
|
1041
|
-
}, "clear");
|
|
1042
|
-
var SankeyLink = class {
|
|
1043
|
-
constructor(source, target, value2 = 0) {
|
|
1044
|
-
this.source = source;
|
|
1045
|
-
this.target = target;
|
|
1046
|
-
this.value = value2;
|
|
1047
|
-
}
|
|
1048
|
-
static {
|
|
1049
|
-
__name(this, "SankeyLink");
|
|
1050
|
-
}
|
|
1051
|
-
};
|
|
1052
|
-
var addLink = /* @__PURE__ */ __name((source, target, value2) => {
|
|
1053
|
-
links.push(new SankeyLink(source, target, value2));
|
|
1054
|
-
}, "addLink");
|
|
1055
|
-
var SankeyNode = class {
|
|
1056
|
-
constructor(ID) {
|
|
1057
|
-
this.ID = ID;
|
|
1058
|
-
}
|
|
1059
|
-
static {
|
|
1060
|
-
__name(this, "SankeyNode");
|
|
1061
|
-
}
|
|
1062
|
-
};
|
|
1063
|
-
var findOrCreateNode = /* @__PURE__ */ __name((ID) => {
|
|
1064
|
-
ID = common_default.sanitizeText(ID, getConfig2());
|
|
1065
|
-
let node = nodesMap.get(ID);
|
|
1066
|
-
if (node === void 0) {
|
|
1067
|
-
node = new SankeyNode(ID);
|
|
1068
|
-
nodesMap.set(ID, node);
|
|
1069
|
-
nodes.push(node);
|
|
1070
|
-
}
|
|
1071
|
-
return node;
|
|
1072
|
-
}, "findOrCreateNode");
|
|
1073
|
-
var getNodes = /* @__PURE__ */ __name(() => nodes, "getNodes");
|
|
1074
|
-
var getLinks = /* @__PURE__ */ __name(() => links, "getLinks");
|
|
1075
|
-
var getGraph = /* @__PURE__ */ __name(() => ({
|
|
1076
|
-
nodes: nodes.map((node) => ({ id: node.ID })),
|
|
1077
|
-
links: links.map((link2) => ({
|
|
1078
|
-
source: link2.source.ID,
|
|
1079
|
-
target: link2.target.ID,
|
|
1080
|
-
value: link2.value
|
|
1081
|
-
}))
|
|
1082
|
-
}), "getGraph");
|
|
1083
|
-
var sankeyDB_default = {
|
|
1084
|
-
nodesMap,
|
|
1085
|
-
getConfig: /* @__PURE__ */ __name(() => getConfig2().sankey, "getConfig"),
|
|
1086
|
-
getNodes,
|
|
1087
|
-
getLinks,
|
|
1088
|
-
getGraph,
|
|
1089
|
-
addLink,
|
|
1090
|
-
findOrCreateNode,
|
|
1091
|
-
getAccTitle,
|
|
1092
|
-
setAccTitle,
|
|
1093
|
-
getAccDescription,
|
|
1094
|
-
setAccDescription,
|
|
1095
|
-
getDiagramTitle,
|
|
1096
|
-
setDiagramTitle,
|
|
1097
|
-
clear: clear2
|
|
1098
|
-
};
|
|
1099
|
-
var Uid = class _Uid {
|
|
1100
|
-
static {
|
|
1101
|
-
__name(this, "Uid");
|
|
1102
|
-
}
|
|
1103
|
-
static {
|
|
1104
|
-
this.count = 0;
|
|
1105
|
-
}
|
|
1106
|
-
static next(name) {
|
|
1107
|
-
return new _Uid(name + ++_Uid.count);
|
|
1108
|
-
}
|
|
1109
|
-
constructor(id) {
|
|
1110
|
-
this.id = id;
|
|
1111
|
-
this.href = `#${id}`;
|
|
1112
|
-
}
|
|
1113
|
-
toString() {
|
|
1114
|
-
return "url(" + this.href + ")";
|
|
1115
|
-
}
|
|
1116
|
-
};
|
|
1117
|
-
var alignmentsMap = {
|
|
1118
|
-
left,
|
|
1119
|
-
right,
|
|
1120
|
-
center,
|
|
1121
|
-
justify
|
|
1122
|
-
};
|
|
1123
|
-
var findCentralNodeLayer = /* @__PURE__ */ __name((nodes2) => {
|
|
1124
|
-
let maxValue = 0;
|
|
1125
|
-
let centralLayer = 0;
|
|
1126
|
-
for (const node of nodes2) {
|
|
1127
|
-
const value2 = node.value ?? 0;
|
|
1128
|
-
if (value2 > maxValue) {
|
|
1129
|
-
maxValue = value2;
|
|
1130
|
-
centralLayer = node.layer ?? 0;
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
return centralLayer;
|
|
1134
|
-
}, "findCentralNodeLayer");
|
|
1135
|
-
var draw = /* @__PURE__ */ __name(function(text, id, _version, diagObj) {
|
|
1136
|
-
const { securityLevel, sankey: conf } = getConfig2();
|
|
1137
|
-
const defaultSankeyConfig = defaultConfig2.sankey;
|
|
1138
|
-
let sandboxElement;
|
|
1139
|
-
if (securityLevel === "sandbox") {
|
|
1140
|
-
sandboxElement = select("#i" + id);
|
|
1141
|
-
}
|
|
1142
|
-
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
|
|
1143
|
-
const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select(`[id="${id}"]`);
|
|
1144
|
-
const width = conf?.width ?? defaultSankeyConfig.width;
|
|
1145
|
-
const height = conf?.height ?? defaultSankeyConfig.width;
|
|
1146
|
-
const useMaxWidth = conf?.useMaxWidth ?? defaultSankeyConfig.useMaxWidth;
|
|
1147
|
-
const nodeAlignment = conf?.nodeAlignment ?? defaultSankeyConfig.nodeAlignment;
|
|
1148
|
-
const prefix = conf?.prefix ?? defaultSankeyConfig.prefix;
|
|
1149
|
-
const suffix = conf?.suffix ?? defaultSankeyConfig.suffix;
|
|
1150
|
-
const showValues = conf?.showValues ?? defaultSankeyConfig.showValues;
|
|
1151
|
-
const nodeWidth = conf?.nodeWidth ?? defaultSankeyConfig.nodeWidth ?? 10;
|
|
1152
|
-
const nodePadding = conf?.nodePadding ?? defaultSankeyConfig.nodePadding ?? 12;
|
|
1153
|
-
const labelStyle = conf?.labelStyle ?? defaultSankeyConfig.labelStyle ?? "legacy";
|
|
1154
|
-
const nodeColors = conf?.nodeColors ?? {};
|
|
1155
|
-
const graph = diagObj.db.getGraph();
|
|
1156
|
-
const nodeAlign = alignmentsMap[nodeAlignment];
|
|
1157
|
-
const sankey = Sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(nodePadding + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([
|
|
1158
|
-
[0, 0],
|
|
1159
|
-
[width, height]
|
|
1160
|
-
]);
|
|
1161
|
-
sankey(graph);
|
|
1162
|
-
const centralNodeLayer = findCentralNodeLayer(graph.nodes);
|
|
1163
|
-
const colorScheme = ordinal(d3schemeTableau10);
|
|
1164
|
-
const getNodeColor = /* @__PURE__ */ __name((nodeId) => {
|
|
1165
|
-
return nodeColors[nodeId] ?? colorScheme(nodeId);
|
|
1166
|
-
}, "getNodeColor");
|
|
1167
|
-
svg.append("g").attr("class", "nodes").selectAll(".node").data(graph.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = Uid.next("node-")).id).attr("transform", function(d) {
|
|
1168
|
-
return "translate(" + d.x0 + "," + d.y0 + ")";
|
|
1169
|
-
}).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => {
|
|
1170
|
-
return d.y1 - d.y0;
|
|
1171
|
-
}).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => getNodeColor(d.id));
|
|
1172
|
-
const getText = /* @__PURE__ */ __name(({ id: id2, value: value2 }) => {
|
|
1173
|
-
if (!showValues) {
|
|
1174
|
-
return id2;
|
|
1175
|
-
}
|
|
1176
|
-
return `${id2}
|
|
1177
|
-
${prefix}${Math.round(value2 * 100) / 100}${suffix}`;
|
|
1178
|
-
}, "getText");
|
|
1179
|
-
const getLabelPosition = /* @__PURE__ */ __name((d) => {
|
|
1180
|
-
if (labelStyle === "outlined") {
|
|
1181
|
-
const nodeLayer = d.layer ?? 0;
|
|
1182
|
-
if (nodeLayer < centralNodeLayer) {
|
|
1183
|
-
return { x: d.x0 - 6, anchor: "end" };
|
|
1184
|
-
}
|
|
1185
|
-
return { x: d.x1 + 6, anchor: "start" };
|
|
1186
|
-
}
|
|
1187
|
-
if (d.x0 < width / 2) {
|
|
1188
|
-
return { x: d.x1 + 6, anchor: "start" };
|
|
1189
|
-
}
|
|
1190
|
-
return { x: d.x0 - 6, anchor: "end" };
|
|
1191
|
-
}, "getLabelPosition");
|
|
1192
|
-
const labelsGroup = svg.append("g").attr("class", "node-labels").attr("font-size", 14);
|
|
1193
|
-
const appendLabel = /* @__PURE__ */ __name((className) => labelsGroup.selectAll(className ? `.${className}` : "text").data(graph.nodes).join("text").attr("class", className ?? null).attr("x", (d) => getLabelPosition(d).x).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${showValues ? "0" : "0.35"}em`).attr("text-anchor", (d) => getLabelPosition(d).anchor).text(getText), "appendLabel");
|
|
1194
|
-
if (labelStyle === "outlined") {
|
|
1195
|
-
appendLabel("sankey-label-bg");
|
|
1196
|
-
appendLabel("sankey-label-fg");
|
|
1197
|
-
} else {
|
|
1198
|
-
appendLabel();
|
|
1199
|
-
}
|
|
1200
|
-
const link2 = svg.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(graph.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply");
|
|
1201
|
-
const linkColor = conf?.linkColor ?? "gradient";
|
|
1202
|
-
if (linkColor === "gradient") {
|
|
1203
|
-
const gradient = link2.append("linearGradient").attr("id", (d) => (d.uid = Uid.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (d) => d.source.x1).attr("x2", (d) => d.target.x0);
|
|
1204
|
-
gradient.append("stop").attr("offset", "0%").attr("stop-color", (d) => getNodeColor(d.source.id));
|
|
1205
|
-
gradient.append("stop").attr("offset", "100%").attr("stop-color", (d) => getNodeColor(d.target.id));
|
|
1206
|
-
}
|
|
1207
|
-
let coloring;
|
|
1208
|
-
switch (linkColor) {
|
|
1209
|
-
case "gradient":
|
|
1210
|
-
coloring = /* @__PURE__ */ __name((d) => d.uid, "coloring");
|
|
1211
|
-
break;
|
|
1212
|
-
case "source":
|
|
1213
|
-
coloring = /* @__PURE__ */ __name((d) => getNodeColor(d.source.id), "coloring");
|
|
1214
|
-
break;
|
|
1215
|
-
case "target":
|
|
1216
|
-
coloring = /* @__PURE__ */ __name((d) => getNodeColor(d.target.id), "coloring");
|
|
1217
|
-
break;
|
|
1218
|
-
default:
|
|
1219
|
-
coloring = linkColor;
|
|
1220
|
-
}
|
|
1221
|
-
link2.append("path").attr("d", d3SankeyLinkHorizontal()).attr("stroke", coloring).attr("stroke-width", (d) => Math.max(1, d.width));
|
|
1222
|
-
setupGraphViewbox(void 0, svg, 0, useMaxWidth);
|
|
1223
|
-
}, "draw");
|
|
1224
|
-
var sankeyRenderer_default = {
|
|
1225
|
-
draw
|
|
1226
|
-
};
|
|
1227
|
-
var prepareTextForParsing = /* @__PURE__ */ __name((text) => {
|
|
1228
|
-
const textToParse = text.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim();
|
|
1229
|
-
return textToParse;
|
|
1230
|
-
}, "prepareTextForParsing");
|
|
1231
|
-
var getStyles = /* @__PURE__ */ __name((options) => `.label {
|
|
1232
|
-
font-family: ${options.fontFamily};
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
.node-labels {
|
|
1236
|
-
font-family: ${options.fontFamily};
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
/* Outlined label style - background stroke for better readability */
|
|
1240
|
-
.sankey-label-bg {
|
|
1241
|
-
stroke: ${options.mainBkg || options.background || "#fff"};
|
|
1242
|
-
stroke-width: 4px;
|
|
1243
|
-
stroke-linejoin: round;
|
|
1244
|
-
paint-order: stroke;
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
/* Foreground label text */
|
|
1248
|
-
.sankey-label-fg {
|
|
1249
|
-
fill: ${options.textColor};
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
/* Node styling */
|
|
1253
|
-
.node rect {
|
|
1254
|
-
shape-rendering: crispEdges;
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
/* Link styling */
|
|
1258
|
-
.link {
|
|
1259
|
-
fill: none;
|
|
1260
|
-
stroke-opacity: 0.5;
|
|
1261
|
-
mix-blend-mode: multiply;
|
|
1262
|
-
}
|
|
1263
|
-
`, "getStyles");
|
|
1264
|
-
var styles_default = getStyles;
|
|
1265
|
-
var originalParse = sankey_default.parse.bind(sankey_default);
|
|
1266
|
-
sankey_default.parse = (text) => originalParse(prepareTextForParsing(text));
|
|
1267
|
-
var diagram = {
|
|
1268
|
-
styles: styles_default,
|
|
1269
|
-
parser: sankey_default,
|
|
1270
|
-
db: sankeyDB_default,
|
|
1271
|
-
renderer: sankeyRenderer_default
|
|
1272
|
-
};
|
|
1273
|
-
export {
|
|
1274
|
-
diagram
|
|
1275
|
-
};
|