@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.
Files changed (398) hide show
  1. package/LICENSE +22 -21
  2. package/README.md +160 -1012
  3. package/README_CN.md +210 -1070
  4. package/dist/main/chunks/docx-export.js +29695 -0
  5. package/dist/main/chunks/image-export.js +175 -0
  6. package/dist/main/index.js +17765 -452
  7. package/dist/preload/index.js +135 -23
  8. package/dist/renderer/assets/2DXBBFLN-BmaQ8lqV.js +667 -0
  9. package/dist/renderer/assets/46IJ22JX-Caywmaj-.js +854 -0
  10. package/dist/renderer/assets/4TTDE5I4-C82Tw8vO.js +502 -0
  11. package/dist/renderer/assets/4UF3HTLV-BD8W-BSm.js +30 -0
  12. package/dist/renderer/assets/5THPTBWS-2mBFupjU.js +21 -0
  13. package/dist/renderer/assets/7WLXJQOR-C8MM6Bra.js +23 -0
  14. package/dist/renderer/assets/AAXQQPKT-CCArPgA1.js +1131 -0
  15. package/dist/renderer/assets/AKE5O7KZ-DOAgUvEX.js +185 -0
  16. package/dist/renderer/assets/BNMLP6AG-igM96Ol7.js +805 -0
  17. package/dist/renderer/assets/DKTLEL5E-Dj3316cp.js +42 -0
  18. package/dist/renderer/assets/DR6PKOQU-C-e6zzyf.js +302 -0
  19. package/dist/renderer/assets/E4RJ7UJB-BMF4zoOQ.js +442 -0
  20. package/dist/renderer/assets/ELSXBIJH-BI2ySIoX.js +39 -0
  21. package/dist/renderer/assets/ERTIBQVS-CnvF3w9r.js +183 -0
  22. package/dist/renderer/assets/F653G4FO-CgzvjfOe.js +1498 -0
  23. package/dist/renderer/assets/FKCDD66M-BkVPFntx.js +205 -0
  24. package/dist/renderer/assets/FP7KDXVC-K0VCFuri.js +222 -0
  25. package/dist/renderer/assets/FT5I3RHX-zgsvTvBh.js +244 -0
  26. package/dist/renderer/assets/FTXIJQGB-BX14b7pN.js +13 -0
  27. package/dist/renderer/assets/G3MDBVQH-qZ3yfAIw.js +25 -0
  28. package/dist/renderer/assets/GY35JXOZ-Lo9DxsPK.js +169 -0
  29. package/dist/renderer/assets/H5EEJPP2-Bw2musel.js +354 -0
  30. package/dist/renderer/assets/HWDLEDTA-CCOSSl9K.js +982 -0
  31. package/dist/renderer/assets/JZWSX6AR-BBtw8K-1.js +67 -0
  32. package/dist/renderer/assets/KQOEJWJY-Brg31xSn.js +84 -0
  33. package/dist/renderer/assets/KS3BB3KE-2GQdjVNT.js +139 -0
  34. package/dist/renderer/assets/KXJRRZHI-B0Oj-tMS.js +503 -0
  35. package/dist/renderer/assets/MFVI5XKI-BpwEOECT.js +10 -0
  36. package/dist/renderer/assets/MWY2J62P-CSmi7lMQ.js +1103 -0
  37. package/dist/renderer/assets/MXGNCBL2-CSoCLfJw.js +217 -0
  38. package/dist/renderer/assets/N6DAJLIZ-DB-xlSjM.js +120 -0
  39. package/dist/renderer/assets/NU5M23IW-BhGgUeDk.js +117 -0
  40. package/dist/renderer/assets/NV4XNBIS-DMg8ibKU.js +1221 -0
  41. package/dist/renderer/assets/OGLU4SIR-DOU7cIL3.js +290 -0
  42. package/dist/renderer/assets/OUNS5N76-BO_k5M0O.js +1065 -0
  43. package/dist/renderer/assets/PU4ISKXV-Cw53csyu.js +516 -0
  44. package/dist/renderer/assets/PUZGS23X-_iUQg51-.js +21 -0
  45. package/dist/renderer/assets/Q3IYVLG5-ZFBZi3vs.js +501 -0
  46. package/dist/renderer/assets/QYHQDLKZ-BPb6lHi6.js +984 -0
  47. package/dist/renderer/assets/RVARI57O-DMrXgtoB.js +10 -0
  48. package/dist/renderer/assets/RZSVICHU-I7fvqLMQ.js +263 -0
  49. package/dist/renderer/assets/UEXXS2NB-AVpw2xTC.js +25 -0
  50. package/dist/renderer/assets/UHTQJXKL-6oSc4D2k.js +135 -0
  51. package/dist/renderer/assets/URA2L2QI-DkFUeeK0.js +201 -0
  52. package/dist/renderer/assets/UXCHDUKG-B54p4156.js +174 -0
  53. package/dist/renderer/assets/VKNV3BUX-Cc_4x0WI.js +278 -0
  54. package/dist/renderer/assets/VMV7XPHP-BjfrE66I.js +127 -0
  55. package/dist/renderer/assets/WEVWDWVA-Ca8eMbXN.js +57 -0
  56. package/dist/renderer/assets/XRRJ35LF-EWRU-xXu.js +120 -0
  57. package/dist/renderer/assets/YFKBLVVN-D2oaE2c2.js +991 -0
  58. package/dist/renderer/assets/YHRE5QGZ-ucJgE2vP.js +698 -0
  59. package/dist/renderer/assets/ZF3OVT4B-SN2E7Wbi.js +421 -0
  60. package/dist/renderer/assets/apl-fqmucPXA.js +140 -0
  61. package/dist/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
  62. package/dist/renderer/assets/asn1-BnOEsgAm.js +144 -0
  63. package/dist/renderer/assets/asterisk-QAlztEwS.js +345 -0
  64. package/dist/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
  65. package/dist/renderer/assets/clike-xqXYL6ge.js +805 -0
  66. package/dist/renderer/assets/clojure-BhXMqnxz.js +849 -0
  67. package/dist/renderer/assets/cmake-BGaNd9E7.js +71 -0
  68. package/dist/renderer/assets/cobol-4yqQntpt.js +120 -0
  69. package/dist/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
  70. package/dist/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
  71. package/dist/renderer/assets/crystal-DyuLTqLs.js +398 -0
  72. package/dist/renderer/assets/css-c-jst79C.js +1783 -0
  73. package/dist/renderer/assets/cypher-Dlu_3r4V.js +121 -0
  74. package/dist/renderer/assets/d-UURgV0Ux.js +179 -0
  75. package/dist/renderer/assets/diff-B_Bi2Crb.js +25 -0
  76. package/dist/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
  77. package/dist/renderer/assets/dtd-Dy74G54E.js +114 -0
  78. package/dist/renderer/assets/dylan-TSb-Nfix.js +314 -0
  79. package/dist/renderer/assets/ebnf-4fKAGW3a.js +140 -0
  80. package/dist/renderer/assets/ecl-B59qGGVg.js +178 -0
  81. package/dist/renderer/assets/eiffel-Dze7nlu3.js +134 -0
  82. package/dist/renderer/assets/elm-DG7jkhNZ.js +176 -0
  83. package/dist/renderer/assets/erlang-BO6gOnGA.js +674 -0
  84. package/dist/renderer/assets/factor-CMxFHDqz.js +65 -0
  85. package/dist/renderer/assets/fcl-CDDUNjTj.js +141 -0
  86. package/dist/renderer/assets/forth-B9D2JCeE.js +116 -0
  87. package/dist/renderer/assets/fortran-CAG2BFbe.js +467 -0
  88. package/dist/renderer/assets/gas-d3KEcW3x.js +294 -0
  89. package/dist/renderer/assets/gherkin-DhZlEZiy.js +115 -0
  90. package/dist/renderer/assets/groovy-CpwJiBl7.js +223 -0
  91. package/dist/renderer/assets/haskell-ySd-OUo8.js +459 -0
  92. package/dist/renderer/assets/haxe-7MlzfeYV.js +514 -0
  93. package/dist/renderer/assets/http-BqypyemW.js +79 -0
  94. package/dist/renderer/assets/idl-4HIGJlDI.js +985 -0
  95. package/dist/renderer/assets/index-6G13Twgt.js +311 -0
  96. package/dist/renderer/assets/index-B2_pQa3G.js +384 -0
  97. package/dist/renderer/assets/index-B4keY9Xz.js +328 -0
  98. package/dist/renderer/assets/index-B5Jih3QA.js +47421 -0
  99. package/dist/renderer/assets/index-BH0PaTow.js +405 -0
  100. package/dist/renderer/assets/index-BWfIKsyn.js +8 -0
  101. package/dist/renderer/assets/index-B_BLxvag.js +156 -0
  102. package/dist/renderer/assets/index-BnXxA35e.js +325 -0
  103. package/dist/renderer/assets/index-Bu1PrnbA.js +81 -0
  104. package/dist/renderer/assets/index-BvXJHaQ4.js +60 -0
  105. package/dist/renderer/assets/index-BzHXcCGC.js +307 -0
  106. package/dist/renderer/assets/index-CXI9cRfo.js +287 -0
  107. package/dist/renderer/assets/index-Ccsf_83j.js +149 -0
  108. package/dist/renderer/assets/index-CkLQq2g4.js +688 -0
  109. package/dist/renderer/assets/index-DNL6Tijf.js +8 -0
  110. package/dist/renderer/assets/index-DRZsGkXi.js +78 -0
  111. package/dist/renderer/assets/index-Dfyz4Aee.js +181 -0
  112. package/dist/renderer/assets/index-HtqODURL.js +703 -0
  113. package/dist/renderer/assets/{index-DxOzbfR-.js → index-MJfkvBRx.js} +1 -1
  114. package/dist/renderer/assets/index-NsiBA9UX.js +113 -0
  115. package/dist/renderer/assets/index-aUzhL6sM.js +96 -0
  116. package/dist/renderer/assets/index-bx07CRyn.css +2503 -0
  117. package/dist/renderer/assets/{index-CBcVpA3d.js → index-k1ZFPJcr.js} +3 -4
  118. package/dist/renderer/assets/javascript-C_OHM9hj.js +994 -0
  119. package/dist/renderer/assets/julia-Bs6JJhYG.js +407 -0
  120. package/dist/renderer/assets/lazy-BY7ljzvO.js +1041 -0
  121. package/dist/renderer/assets/livescript-DmzgM3Yt.js +296 -0
  122. package/dist/renderer/assets/lua-Cvg8VrAA.js +256 -0
  123. package/dist/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
  124. package/dist/renderer/assets/mbox-Ga7d4MMN.js +117 -0
  125. package/dist/renderer/assets/mirc-Dma3B8rS.js +107 -0
  126. package/dist/renderer/assets/mllike-DHn7xckP.js +334 -0
  127. package/dist/renderer/assets/modelica-0d55jYY0.js +147 -0
  128. package/dist/renderer/assets/mscgen-DdqZYINH.js +135 -0
  129. package/dist/renderer/assets/mumps-Btr8VblO.js +93 -0
  130. package/dist/renderer/assets/nginx-DTDtBDVN.js +141 -0
  131. package/dist/renderer/assets/nsis-CyKBdPWp.js +62 -0
  132. package/dist/renderer/assets/ntriples-CvgOYMpL.js +153 -0
  133. package/dist/renderer/assets/octave-DYBj3-tl.js +200 -0
  134. package/dist/renderer/assets/oz-R_e8WMIi.js +231 -0
  135. package/dist/renderer/assets/pascal-GD8iposT.js +105 -0
  136. package/dist/renderer/assets/perl-DL9mHpoi.js +1105 -0
  137. package/dist/renderer/assets/pig-C_4T4YIV.js +101 -0
  138. package/dist/renderer/assets/powershell-B0suO7Vd.js +328 -0
  139. package/dist/renderer/assets/properties-BR-vP1aU.js +58 -0
  140. package/dist/renderer/assets/protobuf-BxgpyhoW.js +77 -0
  141. package/dist/renderer/assets/pug-CTXt1f8z.js +405 -0
  142. package/dist/renderer/assets/puppet-Bdao66PW.js +137 -0
  143. package/dist/renderer/assets/python-CvWbmiX4.js +427 -0
  144. package/dist/renderer/assets/q-CrbCVq4a.js +131 -0
  145. package/dist/renderer/assets/r-V7nswm59.js +170 -0
  146. package/dist/renderer/assets/rpm-C-DLY-If.js +109 -0
  147. package/dist/renderer/assets/ruby-CQTpZw6f.js +331 -0
  148. package/dist/renderer/assets/sas-D2UG-yhZ.js +207 -0
  149. package/dist/renderer/assets/scheme-BKzrkGJD.js +222 -0
  150. package/dist/renderer/assets/shell-BlsXDxCn.js +222 -0
  151. package/dist/renderer/assets/sieve-CjwBwOY5.js +135 -0
  152. package/dist/renderer/assets/simple-mode-DMneyfDu.js +130 -0
  153. package/dist/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
  154. package/dist/renderer/assets/solr-CwD7U71z.js +69 -0
  155. package/dist/renderer/assets/sparql-DYskk2vE.js +249 -0
  156. package/dist/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
  157. package/dist/renderer/assets/sql-BSrOzCRI.js +354 -0
  158. package/dist/renderer/assets/stex-B6LNC55o.js +231 -0
  159. package/dist/renderer/assets/stylus-BkS-boTH.js +565 -0
  160. package/dist/renderer/assets/swift-FRZi1uvB.js +291 -0
  161. package/dist/renderer/assets/tcl-CUcaCdmq.js +114 -0
  162. package/dist/renderer/assets/textile-BnFpjsrl.js +414 -0
  163. package/dist/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
  164. package/dist/renderer/assets/tiki-DK9DOeWn.js +268 -0
  165. package/dist/renderer/assets/toml-BOuWGMcf.js +76 -0
  166. package/dist/renderer/assets/troff-E1bJ0PPL.js +61 -0
  167. package/dist/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
  168. package/dist/renderer/assets/ttcn-tKd4HLu4.js +192 -0
  169. package/dist/renderer/assets/turtle-Dq7-1WAf.js +124 -0
  170. package/dist/renderer/assets/vb-Dp90gtsv.js +196 -0
  171. package/dist/renderer/assets/vbscript-CI6_mxxU.js +479 -0
  172. package/dist/renderer/assets/velocity-BwIZK1TH.js +149 -0
  173. package/dist/renderer/assets/verilog-DDCYnHN8.js +430 -0
  174. package/dist/renderer/assets/vhdl-DCkMIyT9.js +158 -0
  175. package/dist/renderer/assets/{web-BKE0SH0E.js → web-C4yaM4Cl.js} +1 -1
  176. package/dist/renderer/assets/{web-CBsFp24u.js → web-CF2Dtak3.js} +2 -3
  177. package/dist/renderer/assets/{web-Dc8YgoHP.js → web-DUy9unYf.js} +1 -1
  178. package/dist/renderer/assets/webidl-BTLTThCm.js +204 -0
  179. package/dist/renderer/assets/xquery-BrBUuxMR.js +525 -0
  180. package/dist/renderer/assets/yacas-b5lAVEIl.js +130 -0
  181. package/dist/renderer/assets/z80-BZV19vqv.js +93 -0
  182. package/dist/renderer/index.html +97 -77
  183. package/package.json +88 -60
  184. package/themes/README.md +99 -300
  185. package/themes/bear.css +38 -0
  186. package/themes/dark.css +20 -0
  187. package/themes/dracula.css +38 -0
  188. package/themes/elegant.css +53 -671
  189. package/themes/gruvbox.css +42 -0
  190. package/themes/light.css +20 -0
  191. package/themes/midnight.css +31 -0
  192. package/themes/nord.css +38 -0
  193. package/themes/notion.css +48 -0
  194. package/themes/sepia.css +48 -0
  195. package/themes/solarized-dark.css +35 -0
  196. package/themes/template.css +76 -498
  197. package/themes/writer.css +44 -0
  198. package/.github/workflows/release.yml +0 -66
  199. package/.trae/specs/optimize-theme-loading/checklist.md +0 -20
  200. package/.trae/specs/optimize-theme-loading/spec.md +0 -103
  201. package/.trae/specs/optimize-theme-loading/tasks.md +0 -40
  202. package/CHANGELOG.md +0 -320
  203. package/CLAUDE.md +0 -143
  204. package/android/app/build/.npmkeep +0 -0
  205. package/android/app/build.gradle +0 -76
  206. package/android/app/capacitor.build.gradle +0 -24
  207. package/android/app/proguard-rules.pro +0 -21
  208. package/android/app/release.keystore +0 -0
  209. package/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +0 -26
  210. package/android/app/src/main/AndroidManifest.xml +0 -64
  211. package/android/app/src/main/java/cn/bytechain/colamd/MainActivity.java +0 -180
  212. package/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -170
  213. package/android/app/src/main/res/drawable/splash.png +0 -0
  214. package/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
  215. package/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
  216. package/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
  217. package/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
  218. package/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
  219. package/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
  220. package/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
  221. package/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
  222. package/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
  223. package/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
  224. package/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +0 -34
  225. package/android/app/src/main/res/layout/activity_main.xml +0 -12
  226. package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
  227. package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -5
  228. package/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  229. package/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
  230. package/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  231. package/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  232. package/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
  233. package/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  234. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  235. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
  236. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  237. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  238. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
  239. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  240. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  241. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
  242. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  243. package/android/app/src/main/res/values/ic_launcher_background.xml +0 -4
  244. package/android/app/src/main/res/values/strings.xml +0 -7
  245. package/android/app/src/main/res/values/styles.xml +0 -22
  246. package/android/app/src/main/res/xml/file_paths.xml +0 -5
  247. package/android/app/src/main/res/xml/network_security_config.xml +0 -8
  248. package/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +0 -18
  249. package/android/build.gradle +0 -29
  250. package/android/capacitor.settings.gradle +0 -21
  251. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  252. package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  253. package/android/gradle.properties +0 -22
  254. package/android/gradlew +0 -248
  255. package/android/gradlew.bat +0 -92
  256. package/android/settings.gradle +0 -5
  257. package/android/variables.gradle +0 -16
  258. package/capacitor.config.js +0 -29
  259. package/capacitor.config.ts +0 -30
  260. package/demo.md +0 -193
  261. package/dist/renderer/assets/arc-_lugyDzx.js +0 -131
  262. package/dist/renderer/assets/architectureDiagram-3BPJPVTR-DDfP-F9D.js +0 -8721
  263. package/dist/renderer/assets/blockDiagram-GPEHLZMM-DOETUKma.js +0 -3826
  264. package/dist/renderer/assets/c4Diagram-AAUBKEIU-kAmLfVtk.js +0 -2483
  265. package/dist/renderer/assets/channel-CD4vJFwr.js +0 -7
  266. package/dist/renderer/assets/chunk-2J33WTMH-DkVrgw4l.js +0 -24
  267. package/dist/renderer/assets/chunk-4BX2VUAB-JTZ-VKNX.js +0 -16
  268. package/dist/renderer/assets/chunk-55IACEB6-Di_O5box.js +0 -13
  269. package/dist/renderer/assets/chunk-727SXJPM-BgKvwR8w.js +0 -2016
  270. package/dist/renderer/assets/chunk-AQP2D5EJ-DonSXCCQ.js +0 -1953
  271. package/dist/renderer/assets/chunk-FMBD7UC4-CsV8Lmy6.js +0 -19
  272. package/dist/renderer/assets/chunk-ND2GUHAM-C_-_dlq7.js +0 -116
  273. package/dist/renderer/assets/chunk-QZHKN3VN-aCmcDsfu.js +0 -19
  274. package/dist/renderer/assets/classDiagram-4FO5ZUOK-nuHQLjzM.js +0 -24
  275. package/dist/renderer/assets/classDiagram-v2-Q7XG4LA2-nuHQLjzM.js +0 -24
  276. package/dist/renderer/assets/cose-bilkent-S5V4N54A-Di1_SXt9.js +0 -4943
  277. package/dist/renderer/assets/cytoscape.esm-CpHeHM5e.js +0 -30269
  278. package/dist/renderer/assets/dagre-BM42HDAG-CqOUIYsL.js +0 -706
  279. package/dist/renderer/assets/defaultLocale-B2RvLBDe.js +0 -206
  280. package/dist/renderer/assets/diagram-2AECGRRQ-F-fP19TC.js +0 -302
  281. package/dist/renderer/assets/diagram-5GNKFQAL-BD5XZc8G.js +0 -170
  282. package/dist/renderer/assets/diagram-KO2AKTUF-Qa3ZxA67.js +0 -633
  283. package/dist/renderer/assets/diagram-LMA3HP47-DqDnw2RA.js +0 -213
  284. package/dist/renderer/assets/diagram-OG6HWLK6-BH4Elzby.js +0 -852
  285. package/dist/renderer/assets/erDiagram-TEJ5UH35-CaKZCewa.js +0 -1228
  286. package/dist/renderer/assets/flowDiagram-I6XJVG4X-C8znUgyL.js +0 -2333
  287. package/dist/renderer/assets/ganttDiagram-6RSMTGT7-DnRvbMnU.js +0 -3721
  288. package/dist/renderer/assets/gitGraphDiagram-PVQCEYII-CZuRZzk4.js +0 -1374
  289. package/dist/renderer/assets/graph-CYiEKt0j.js +0 -1988
  290. package/dist/renderer/assets/index-B4uDgADr.js +0 -530
  291. package/dist/renderer/assets/index-BX6JHKv6.js +0 -73314
  292. package/dist/renderer/assets/index-CGj1spkU.js +0 -27
  293. package/dist/renderer/assets/index-CcwAgVRi.css +0 -2226
  294. package/dist/renderer/assets/index-D4CPFkph.js +0 -9
  295. package/dist/renderer/assets/index-Y89U1ptl.js +0 -9
  296. package/dist/renderer/assets/infoDiagram-5YYISTIA-BlBUdqMb.js +0 -32
  297. package/dist/renderer/assets/init-ZxktEp_H.js +0 -16
  298. package/dist/renderer/assets/ishikawaDiagram-YF4QCWOH-TeVytCrP.js +0 -968
  299. package/dist/renderer/assets/journeyDiagram-JHISSGLW-BLZa3jnX.js +0 -1256
  300. package/dist/renderer/assets/kanban-definition-UN3LZRKU-foVxWrJn.js +0 -1053
  301. package/dist/renderer/assets/layout-DOAlFUVb.js +0 -2610
  302. package/dist/renderer/assets/linear-BMBn6kVq.js +0 -340
  303. package/dist/renderer/assets/mindmap-definition-RKZ34NQL-5pGeNCcp.js +0 -1181
  304. package/dist/renderer/assets/ordinal-DSZU4PqD.js +0 -76
  305. package/dist/renderer/assets/pieDiagram-4H26LBE5-N9aAUxfr.js +0 -247
  306. package/dist/renderer/assets/preload-helper-tXtZnHb0.js +0 -88
  307. package/dist/renderer/assets/quadrantDiagram-W4KKPZXB-BPxbtjga.js +0 -1345
  308. package/dist/renderer/assets/requirementDiagram-4Y6WPE33-CK1LrJyG.js +0 -1205
  309. package/dist/renderer/assets/sankeyDiagram-5OEKKPKP-BNj7Sqii.js +0 -1275
  310. package/dist/renderer/assets/sequenceDiagram-3UESZ5HK-B-r7lNhI.js +0 -4515
  311. package/dist/renderer/assets/stateDiagram-AJRCARHV-wrWE0MRa.js +0 -451
  312. package/dist/renderer/assets/stateDiagram-v2-BHNVJYJU-CE-Lqo2d.js +0 -22
  313. package/dist/renderer/assets/timeline-definition-PNZ67QCA-BkeMGH4J.js +0 -1597
  314. package/dist/renderer/assets/vennDiagram-CIIHVFJN-BTxVzto3.js +0 -2487
  315. package/dist/renderer/assets/wardley-L42UT6IY-b-_GPpqL.js +0 -30699
  316. package/dist/renderer/assets/wardleyDiagram-YWT4CUSO-D2r5dVGW.js +0 -976
  317. package/dist/renderer/assets/web-TfDzToU7.js +0 -58
  318. package/dist/renderer/assets/xychartDiagram-2RQKCTM6-BHQdINVc.js +0 -1933
  319. package/docs/RELEASE_NOTES_v1.5.1.md +0 -382
  320. package/docs/academic-demo.md +0 -567
  321. package/docs/agent-diff-view.md +0 -48
  322. package/docs/demo.html +0 -748
  323. package/docs/demo.md +0 -546
  324. package/docs/demo.pdf +0 -0
  325. package/docs/theme-paradigm.md +0 -797
  326. package/electron-builder.yml +0 -64
  327. package/electron.vite.config.js +0 -31
  328. package/electron.vite.config.ts +0 -30
  329. package/ios/App/App/AppDelegate.swift +0 -49
  330. package/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
  331. package/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -14
  332. package/ios/App/App/Assets.xcassets/Contents.json +0 -6
  333. package/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +0 -23
  334. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
  335. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
  336. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
  337. package/ios/App/App/Base.lproj/LaunchScreen.storyboard +0 -32
  338. package/ios/App/App/Base.lproj/Main.storyboard +0 -19
  339. package/ios/App/App/Info.plist +0 -49
  340. package/ios/App/App.xcodeproj/project.pbxproj +0 -408
  341. package/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  342. package/ios/App/Podfile +0 -28
  343. package/resources/entitlements.mac.plist +0 -12
  344. package/resources/icon.icns +0 -0
  345. package/resources/icon.png +0 -0
  346. package/resources/icon.svg +0 -23
  347. package/resources/templates/slides/icon.png +0 -0
  348. package/resources/templates/slides/slides-template.md +0 -74
  349. package/resources/templates/slides/template-forest-ink.html +0 -540
  350. package/resources/templates/slides/template.html +0 -535
  351. package/scripts/afterPack.js +0 -13
  352. package/scripts/generate-icons.js +0 -102
  353. package/src/main/index.ts +0 -919
  354. package/src/preload/index.d.ts +0 -51
  355. package/src/preload/index.js +0 -70
  356. package/src/preload/index.ts +0 -110
  357. package/src/renderer/capacitor-api.ts +0 -713
  358. package/src/renderer/editor/editor.ts +0 -287
  359. package/src/renderer/editor/html-view.ts +0 -15
  360. package/src/renderer/editor/plugins/index.ts +0 -86
  361. package/src/renderer/editor/plugins/math-plugin.ts +0 -305
  362. package/src/renderer/editor/plugins/mermaid-plugin-custom.css +0 -46
  363. package/src/renderer/editor/plugins/mermaid-plugin-dark.css +0 -428
  364. package/src/renderer/editor/plugins/mermaid-plugin-elegant.css +0 -443
  365. package/src/renderer/editor/plugins/mermaid-plugin-newsprint.css +0 -208
  366. package/src/renderer/editor/plugins/mermaid-plugin.css +0 -111
  367. package/src/renderer/editor/plugins/mermaid-plugin.ts +0 -680
  368. package/src/renderer/editor/plugins/themes/base/dark.css +0 -23
  369. package/src/renderer/editor/plugins/themes/base/elegant.css +0 -32
  370. package/src/renderer/editor/plugins/themes/base/light.css +0 -20
  371. package/src/renderer/editor/plugins/themes/base/newsprint.css +0 -27
  372. package/src/renderer/editor/plugins/themes/base.css +0 -509
  373. package/src/renderer/editor/plugins/themes/components/mermaid/academic.css +0 -43
  374. package/src/renderer/editor/plugins/themes/components/mermaid/dark.css +0 -20
  375. package/src/renderer/editor/plugins/themes/components/mermaid/elegant.css +0 -24
  376. package/src/renderer/editor/plugins/themes/components/mermaid/light.css +0 -21
  377. package/src/renderer/editor/plugins/themes/components/mermaid/newsprint.css +0 -26
  378. package/src/renderer/editor/plugins/themes/components/mermaid/variables.css +0 -592
  379. package/src/renderer/editor/plugins/themes/foundation.css +0 -143
  380. package/src/renderer/editor/plugins/themes/theme-manager.ts +0 -133
  381. package/src/renderer/env.d.ts +0 -10
  382. package/src/renderer/index.html +0 -76
  383. package/src/renderer/main.ts +0 -775
  384. package/src/renderer/mobile.css +0 -428
  385. package/themes/academic-paper-pt.css +0 -1321
  386. package/themes/academic-paper.css +0 -1416
  387. package/themes/forest-ink.css +0 -664
  388. package/themes/guizang.css +0 -732
  389. package/themes/pixso-design.css +0 -1261
  390. package/themes/swiss-design.css +0 -596
  391. package/tsconfig.json +0 -14
  392. package/tsconfig.main.json +0 -12
  393. package/tsconfig.main.tsbuildinfo +0 -1
  394. package/tsconfig.preload.json +0 -12
  395. package/tsconfig.preload.tsbuildinfo +0 -1
  396. package/tsconfig.renderer.json +0 -13
  397. package/tsconfig.renderer.tsbuildinfo +0 -1
  398. package/tsconfig.tsbuildinfo +0 -1
@@ -1,1256 +0,0 @@
1
- import { g as getIconStyles } from "./chunk-FMBD7UC4-CsV8Lmy6.js";
2
- import { a as drawBackgroundRect, g as getNoteRect, h as drawText, d as drawRect } from "./chunk-ND2GUHAM-C_-_dlq7.js";
3
- import { g as getAccDescription, s as setAccDescription, a as getAccTitle, b as setAccTitle, q as getDiagramTitle, p as setDiagramTitle, _ as __name, c as getConfig2, d as select, e as configureSvgSize, z as clear } from "./index-BX6JHKv6.js";
4
- import { d as d3arc } from "./arc-_lugyDzx.js";
5
- import "./preload-helper-tXtZnHb0.js";
6
- var parser = (function() {
7
- var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
8
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
9
- return o2;
10
- }, "o"), $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14];
11
- var parser2 = {
12
- trace: /* @__PURE__ */ __name(function trace() {
13
- }, "trace"),
14
- yy: {},
15
- symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "title": 11, "acc_title": 12, "acc_title_value": 13, "acc_descr": 14, "acc_descr_value": 15, "acc_descr_multiline_value": 16, "section": 17, "taskName": 18, "taskData": 19, "$accept": 0, "$end": 1 },
16
- terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" },
17
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]],
18
- performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
19
- var $0 = $$.length - 1;
20
- switch (yystate) {
21
- case 1:
22
- return $$[$0 - 1];
23
- case 2:
24
- this.$ = [];
25
- break;
26
- case 3:
27
- $$[$0 - 1].push($$[$0]);
28
- this.$ = $$[$0 - 1];
29
- break;
30
- case 4:
31
- case 5:
32
- this.$ = $$[$0];
33
- break;
34
- case 6:
35
- case 7:
36
- this.$ = [];
37
- break;
38
- case 8:
39
- yy.setDiagramTitle($$[$0].substr(6));
40
- this.$ = $$[$0].substr(6);
41
- break;
42
- case 9:
43
- this.$ = $$[$0].trim();
44
- yy.setAccTitle(this.$);
45
- break;
46
- case 10:
47
- case 11:
48
- this.$ = $$[$0].trim();
49
- yy.setAccDescription(this.$);
50
- break;
51
- case 12:
52
- yy.addSection($$[$0].substr(8));
53
- this.$ = $$[$0].substr(8);
54
- break;
55
- case 13:
56
- yy.addTask($$[$0 - 1], $$[$0]);
57
- this.$ = "task";
58
- break;
59
- }
60
- }, "anonymous"),
61
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])],
62
- defaultActions: {},
63
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
64
- if (hash.recoverable) {
65
- this.trace(str);
66
- } else {
67
- var error = new Error(str);
68
- error.hash = hash;
69
- throw error;
70
- }
71
- }, "parseError"),
72
- parse: /* @__PURE__ */ __name(function parse(input) {
73
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
74
- var args = lstack.slice.call(arguments, 1);
75
- var lexer2 = Object.create(this.lexer);
76
- var sharedState = { yy: {} };
77
- for (var k in this.yy) {
78
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
79
- sharedState.yy[k] = this.yy[k];
80
- }
81
- }
82
- lexer2.setInput(input, sharedState.yy);
83
- sharedState.yy.lexer = lexer2;
84
- sharedState.yy.parser = this;
85
- if (typeof lexer2.yylloc == "undefined") {
86
- lexer2.yylloc = {};
87
- }
88
- var yyloc = lexer2.yylloc;
89
- lstack.push(yyloc);
90
- var ranges = lexer2.options && lexer2.options.ranges;
91
- if (typeof sharedState.yy.parseError === "function") {
92
- this.parseError = sharedState.yy.parseError;
93
- } else {
94
- this.parseError = Object.getPrototypeOf(this).parseError;
95
- }
96
- function popStack(n) {
97
- stack.length = stack.length - 2 * n;
98
- vstack.length = vstack.length - n;
99
- lstack.length = lstack.length - n;
100
- }
101
- __name(popStack, "popStack");
102
- function lex() {
103
- var token;
104
- token = tstack.pop() || lexer2.lex() || EOF;
105
- if (typeof token !== "number") {
106
- if (token instanceof Array) {
107
- tstack = token;
108
- token = tstack.pop();
109
- }
110
- token = self.symbols_[token] || token;
111
- }
112
- return token;
113
- }
114
- __name(lex, "lex");
115
- var symbol, state, action, r, yyval = {}, p, len, newState, expected;
116
- while (true) {
117
- state = stack[stack.length - 1];
118
- if (this.defaultActions[state]) {
119
- action = this.defaultActions[state];
120
- } else {
121
- if (symbol === null || typeof symbol == "undefined") {
122
- symbol = lex();
123
- }
124
- action = table[state] && table[state][symbol];
125
- }
126
- if (typeof action === "undefined" || !action.length || !action[0]) {
127
- var errStr = "";
128
- expected = [];
129
- for (p in table[state]) {
130
- if (this.terminals_[p] && p > TERROR) {
131
- expected.push("'" + this.terminals_[p] + "'");
132
- }
133
- }
134
- if (lexer2.showPosition) {
135
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
136
- } else {
137
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
138
- }
139
- this.parseError(errStr, {
140
- text: lexer2.match,
141
- token: this.terminals_[symbol] || symbol,
142
- line: lexer2.yylineno,
143
- loc: yyloc,
144
- expected
145
- });
146
- }
147
- if (action[0] instanceof Array && action.length > 1) {
148
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
149
- }
150
- switch (action[0]) {
151
- case 1:
152
- stack.push(symbol);
153
- vstack.push(lexer2.yytext);
154
- lstack.push(lexer2.yylloc);
155
- stack.push(action[1]);
156
- symbol = null;
157
- {
158
- yyleng = lexer2.yyleng;
159
- yytext = lexer2.yytext;
160
- yylineno = lexer2.yylineno;
161
- yyloc = lexer2.yylloc;
162
- }
163
- break;
164
- case 2:
165
- len = this.productions_[action[1]][1];
166
- yyval.$ = vstack[vstack.length - len];
167
- yyval._$ = {
168
- first_line: lstack[lstack.length - (len || 1)].first_line,
169
- last_line: lstack[lstack.length - 1].last_line,
170
- first_column: lstack[lstack.length - (len || 1)].first_column,
171
- last_column: lstack[lstack.length - 1].last_column
172
- };
173
- if (ranges) {
174
- yyval._$.range = [
175
- lstack[lstack.length - (len || 1)].range[0],
176
- lstack[lstack.length - 1].range[1]
177
- ];
178
- }
179
- r = this.performAction.apply(yyval, [
180
- yytext,
181
- yyleng,
182
- yylineno,
183
- sharedState.yy,
184
- action[1],
185
- vstack,
186
- lstack
187
- ].concat(args));
188
- if (typeof r !== "undefined") {
189
- return r;
190
- }
191
- if (len) {
192
- stack = stack.slice(0, -1 * len * 2);
193
- vstack = vstack.slice(0, -1 * len);
194
- lstack = lstack.slice(0, -1 * len);
195
- }
196
- stack.push(this.productions_[action[1]][0]);
197
- vstack.push(yyval.$);
198
- lstack.push(yyval._$);
199
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
200
- stack.push(newState);
201
- break;
202
- case 3:
203
- return true;
204
- }
205
- }
206
- return true;
207
- }, "parse")
208
- };
209
- var lexer = /* @__PURE__ */ (function() {
210
- var lexer2 = {
211
- EOF: 1,
212
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
213
- if (this.yy.parser) {
214
- this.yy.parser.parseError(str, hash);
215
- } else {
216
- throw new Error(str);
217
- }
218
- }, "parseError"),
219
- // resets the lexer, sets new input
220
- setInput: /* @__PURE__ */ __name(function(input, yy) {
221
- this.yy = yy || this.yy || {};
222
- this._input = input;
223
- this._more = this._backtrack = this.done = false;
224
- this.yylineno = this.yyleng = 0;
225
- this.yytext = this.matched = this.match = "";
226
- this.conditionStack = ["INITIAL"];
227
- this.yylloc = {
228
- first_line: 1,
229
- first_column: 0,
230
- last_line: 1,
231
- last_column: 0
232
- };
233
- if (this.options.ranges) {
234
- this.yylloc.range = [0, 0];
235
- }
236
- this.offset = 0;
237
- return this;
238
- }, "setInput"),
239
- // consumes and returns one char from the input
240
- input: /* @__PURE__ */ __name(function() {
241
- var ch = this._input[0];
242
- this.yytext += ch;
243
- this.yyleng++;
244
- this.offset++;
245
- this.match += ch;
246
- this.matched += ch;
247
- var lines = ch.match(/(?:\r\n?|\n).*/g);
248
- if (lines) {
249
- this.yylineno++;
250
- this.yylloc.last_line++;
251
- } else {
252
- this.yylloc.last_column++;
253
- }
254
- if (this.options.ranges) {
255
- this.yylloc.range[1]++;
256
- }
257
- this._input = this._input.slice(1);
258
- return ch;
259
- }, "input"),
260
- // unshifts one char (or a string) into the input
261
- unput: /* @__PURE__ */ __name(function(ch) {
262
- var len = ch.length;
263
- var lines = ch.split(/(?:\r\n?|\n)/g);
264
- this._input = ch + this._input;
265
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
266
- this.offset -= len;
267
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
268
- this.match = this.match.substr(0, this.match.length - 1);
269
- this.matched = this.matched.substr(0, this.matched.length - 1);
270
- if (lines.length - 1) {
271
- this.yylineno -= lines.length - 1;
272
- }
273
- var r = this.yylloc.range;
274
- this.yylloc = {
275
- first_line: this.yylloc.first_line,
276
- last_line: this.yylineno + 1,
277
- first_column: this.yylloc.first_column,
278
- 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
279
- };
280
- if (this.options.ranges) {
281
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
282
- }
283
- this.yyleng = this.yytext.length;
284
- return this;
285
- }, "unput"),
286
- // When called from action, caches matched text and appends it on next action
287
- more: /* @__PURE__ */ __name(function() {
288
- this._more = true;
289
- return this;
290
- }, "more"),
291
- // 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.
292
- reject: /* @__PURE__ */ __name(function() {
293
- if (this.options.backtrack_lexer) {
294
- this._backtrack = true;
295
- } else {
296
- 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(), {
297
- text: "",
298
- token: null,
299
- line: this.yylineno
300
- });
301
- }
302
- return this;
303
- }, "reject"),
304
- // retain first n characters of the match
305
- less: /* @__PURE__ */ __name(function(n) {
306
- this.unput(this.match.slice(n));
307
- }, "less"),
308
- // displays already matched input, i.e. for error messages
309
- pastInput: /* @__PURE__ */ __name(function() {
310
- var past = this.matched.substr(0, this.matched.length - this.match.length);
311
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
312
- }, "pastInput"),
313
- // displays upcoming input, i.e. for error messages
314
- upcomingInput: /* @__PURE__ */ __name(function() {
315
- var next = this.match;
316
- if (next.length < 20) {
317
- next += this._input.substr(0, 20 - next.length);
318
- }
319
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
320
- }, "upcomingInput"),
321
- // displays the character position where the lexing error occurred, i.e. for error messages
322
- showPosition: /* @__PURE__ */ __name(function() {
323
- var pre = this.pastInput();
324
- var c = new Array(pre.length + 1).join("-");
325
- return pre + this.upcomingInput() + "\n" + c + "^";
326
- }, "showPosition"),
327
- // test the lexed token: return FALSE when not a match, otherwise return token
328
- test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
329
- var token, lines, backup;
330
- if (this.options.backtrack_lexer) {
331
- backup = {
332
- yylineno: this.yylineno,
333
- yylloc: {
334
- first_line: this.yylloc.first_line,
335
- last_line: this.last_line,
336
- first_column: this.yylloc.first_column,
337
- last_column: this.yylloc.last_column
338
- },
339
- yytext: this.yytext,
340
- match: this.match,
341
- matches: this.matches,
342
- matched: this.matched,
343
- yyleng: this.yyleng,
344
- offset: this.offset,
345
- _more: this._more,
346
- _input: this._input,
347
- yy: this.yy,
348
- conditionStack: this.conditionStack.slice(0),
349
- done: this.done
350
- };
351
- if (this.options.ranges) {
352
- backup.yylloc.range = this.yylloc.range.slice(0);
353
- }
354
- }
355
- lines = match[0].match(/(?:\r\n?|\n).*/g);
356
- if (lines) {
357
- this.yylineno += lines.length;
358
- }
359
- this.yylloc = {
360
- first_line: this.yylloc.last_line,
361
- last_line: this.yylineno + 1,
362
- first_column: this.yylloc.last_column,
363
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
364
- };
365
- this.yytext += match[0];
366
- this.match += match[0];
367
- this.matches = match;
368
- this.yyleng = this.yytext.length;
369
- if (this.options.ranges) {
370
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
371
- }
372
- this._more = false;
373
- this._backtrack = false;
374
- this._input = this._input.slice(match[0].length);
375
- this.matched += match[0];
376
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
377
- if (this.done && this._input) {
378
- this.done = false;
379
- }
380
- if (token) {
381
- return token;
382
- } else if (this._backtrack) {
383
- for (var k in backup) {
384
- this[k] = backup[k];
385
- }
386
- return false;
387
- }
388
- return false;
389
- }, "test_match"),
390
- // return next match in input
391
- next: /* @__PURE__ */ __name(function() {
392
- if (this.done) {
393
- return this.EOF;
394
- }
395
- if (!this._input) {
396
- this.done = true;
397
- }
398
- var token, match, tempMatch, index;
399
- if (!this._more) {
400
- this.yytext = "";
401
- this.match = "";
402
- }
403
- var rules = this._currentRules();
404
- for (var i = 0; i < rules.length; i++) {
405
- tempMatch = this._input.match(this.rules[rules[i]]);
406
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
407
- match = tempMatch;
408
- index = i;
409
- if (this.options.backtrack_lexer) {
410
- token = this.test_match(tempMatch, rules[i]);
411
- if (token !== false) {
412
- return token;
413
- } else if (this._backtrack) {
414
- match = false;
415
- continue;
416
- } else {
417
- return false;
418
- }
419
- } else if (!this.options.flex) {
420
- break;
421
- }
422
- }
423
- }
424
- if (match) {
425
- token = this.test_match(match, rules[index]);
426
- if (token !== false) {
427
- return token;
428
- }
429
- return false;
430
- }
431
- if (this._input === "") {
432
- return this.EOF;
433
- } else {
434
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
435
- text: "",
436
- token: null,
437
- line: this.yylineno
438
- });
439
- }
440
- }, "next"),
441
- // return next match that has a token
442
- lex: /* @__PURE__ */ __name(function lex() {
443
- var r = this.next();
444
- if (r) {
445
- return r;
446
- } else {
447
- return this.lex();
448
- }
449
- }, "lex"),
450
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
451
- begin: /* @__PURE__ */ __name(function begin(condition) {
452
- this.conditionStack.push(condition);
453
- }, "begin"),
454
- // pop the previously active lexer condition state off the condition stack
455
- popState: /* @__PURE__ */ __name(function popState() {
456
- var n = this.conditionStack.length - 1;
457
- if (n > 0) {
458
- return this.conditionStack.pop();
459
- } else {
460
- return this.conditionStack[0];
461
- }
462
- }, "popState"),
463
- // produce the lexer rule set which is active for the currently active lexer condition state
464
- _currentRules: /* @__PURE__ */ __name(function _currentRules() {
465
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
466
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
467
- } else {
468
- return this.conditions["INITIAL"].rules;
469
- }
470
- }, "_currentRules"),
471
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
472
- topState: /* @__PURE__ */ __name(function topState(n) {
473
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
474
- if (n >= 0) {
475
- return this.conditionStack[n];
476
- } else {
477
- return "INITIAL";
478
- }
479
- }, "topState"),
480
- // alias for begin(condition)
481
- pushState: /* @__PURE__ */ __name(function pushState(condition) {
482
- this.begin(condition);
483
- }, "pushState"),
484
- // return the number of states currently on the stack
485
- stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
486
- return this.conditionStack.length;
487
- }, "stateStackSize"),
488
- options: { "case-insensitive": true },
489
- performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
490
- switch ($avoiding_name_collisions) {
491
- case 0:
492
- break;
493
- case 1:
494
- break;
495
- case 2:
496
- return 10;
497
- case 3:
498
- break;
499
- case 4:
500
- break;
501
- case 5:
502
- return 4;
503
- case 6:
504
- return 11;
505
- case 7:
506
- this.begin("acc_title");
507
- return 12;
508
- case 8:
509
- this.popState();
510
- return "acc_title_value";
511
- case 9:
512
- this.begin("acc_descr");
513
- return 14;
514
- case 10:
515
- this.popState();
516
- return "acc_descr_value";
517
- case 11:
518
- this.begin("acc_descr_multiline");
519
- break;
520
- case 12:
521
- this.popState();
522
- break;
523
- case 13:
524
- return "acc_descr_multiline_value";
525
- case 14:
526
- return 17;
527
- case 15:
528
- return 18;
529
- case 16:
530
- return 19;
531
- case 17:
532
- return ":";
533
- case 18:
534
- return 6;
535
- case 19:
536
- return "INVALID";
537
- }
538
- }, "anonymous"),
539
- rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
540
- conditions: { "acc_descr_multiline": { "rules": [12, 13], "inclusive": false }, "acc_descr": { "rules": [10], "inclusive": false }, "acc_title": { "rules": [8], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], "inclusive": true } }
541
- };
542
- return lexer2;
543
- })();
544
- parser2.lexer = lexer;
545
- function Parser() {
546
- this.yy = {};
547
- }
548
- __name(Parser, "Parser");
549
- Parser.prototype = parser2;
550
- parser2.Parser = Parser;
551
- return new Parser();
552
- })();
553
- parser.parser = parser;
554
- var journey_default = parser;
555
- var currentSection = "";
556
- var sections = [];
557
- var tasks = [];
558
- var rawTasks = [];
559
- var clear2 = /* @__PURE__ */ __name(function() {
560
- sections.length = 0;
561
- tasks.length = 0;
562
- currentSection = "";
563
- rawTasks.length = 0;
564
- clear();
565
- }, "clear");
566
- var addSection = /* @__PURE__ */ __name(function(txt) {
567
- currentSection = txt;
568
- sections.push(txt);
569
- }, "addSection");
570
- var getSections = /* @__PURE__ */ __name(function() {
571
- return sections;
572
- }, "getSections");
573
- var getTasks = /* @__PURE__ */ __name(function() {
574
- let allItemsProcessed = compileTasks();
575
- const maxDepth = 100;
576
- let iterationCount = 0;
577
- while (!allItemsProcessed && iterationCount < maxDepth) {
578
- allItemsProcessed = compileTasks();
579
- iterationCount++;
580
- }
581
- tasks.push(...rawTasks);
582
- return tasks;
583
- }, "getTasks");
584
- var updateActors = /* @__PURE__ */ __name(function() {
585
- const tempActors = [];
586
- tasks.forEach((task) => {
587
- if (task.people) {
588
- tempActors.push(...task.people);
589
- }
590
- });
591
- const unique = new Set(tempActors);
592
- return [...unique].sort();
593
- }, "updateActors");
594
- var addTask = /* @__PURE__ */ __name(function(descr, taskData) {
595
- const pieces = taskData.substr(1).split(":");
596
- let score = 0;
597
- let peeps = [];
598
- if (pieces.length === 1) {
599
- score = Number(pieces[0]);
600
- peeps = [];
601
- } else {
602
- score = Number(pieces[0]);
603
- peeps = pieces[1].split(",");
604
- }
605
- const peopleList = peeps.map((s) => s.trim());
606
- const rawTask = {
607
- section: currentSection,
608
- type: currentSection,
609
- people: peopleList,
610
- task: descr,
611
- score
612
- };
613
- rawTasks.push(rawTask);
614
- }, "addTask");
615
- var addTaskOrg = /* @__PURE__ */ __name(function(descr) {
616
- const newTask = {
617
- section: currentSection,
618
- type: currentSection,
619
- description: descr,
620
- task: descr,
621
- classes: []
622
- };
623
- tasks.push(newTask);
624
- }, "addTaskOrg");
625
- var compileTasks = /* @__PURE__ */ __name(function() {
626
- const compileTask = /* @__PURE__ */ __name(function(pos) {
627
- return rawTasks[pos].processed;
628
- }, "compileTask");
629
- let allProcessed = true;
630
- for (const [i, rawTask] of rawTasks.entries()) {
631
- compileTask(i);
632
- allProcessed = allProcessed && rawTask.processed;
633
- }
634
- return allProcessed;
635
- }, "compileTasks");
636
- var getActors = /* @__PURE__ */ __name(function() {
637
- return updateActors();
638
- }, "getActors");
639
- var journeyDb_default = {
640
- getConfig: /* @__PURE__ */ __name(() => getConfig2().journey, "getConfig"),
641
- clear: clear2,
642
- setDiagramTitle,
643
- getDiagramTitle,
644
- setAccTitle,
645
- getAccTitle,
646
- setAccDescription,
647
- getAccDescription,
648
- addSection,
649
- getSections,
650
- getTasks,
651
- addTask,
652
- addTaskOrg,
653
- getActors
654
- };
655
- var getStyles = /* @__PURE__ */ __name((options) => `.label {
656
- font-family: ${options.fontFamily};
657
- color: ${options.textColor};
658
- }
659
- .mouth {
660
- stroke: #666;
661
- }
662
-
663
- line {
664
- stroke: ${options.textColor}
665
- }
666
-
667
- .legend {
668
- fill: ${options.textColor};
669
- font-family: ${options.fontFamily};
670
- }
671
-
672
- .label text {
673
- fill: #333;
674
- }
675
- .label {
676
- color: ${options.textColor}
677
- }
678
-
679
- .face {
680
- ${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"};
681
- stroke: #999;
682
- }
683
-
684
- .node rect,
685
- .node circle,
686
- .node ellipse,
687
- .node polygon,
688
- .node path {
689
- fill: ${options.mainBkg};
690
- stroke: ${options.nodeBorder};
691
- stroke-width: 1px;
692
- }
693
-
694
- .node .label {
695
- text-align: center;
696
- }
697
- .node.clickable {
698
- cursor: pointer;
699
- }
700
-
701
- .arrowheadPath {
702
- fill: ${options.arrowheadColor};
703
- }
704
-
705
- .edgePath .path {
706
- stroke: ${options.lineColor};
707
- stroke-width: 1.5px;
708
- }
709
-
710
- .flowchart-link {
711
- stroke: ${options.lineColor};
712
- fill: none;
713
- }
714
-
715
- .edgeLabel {
716
- background-color: ${options.edgeLabelBackground};
717
- rect {
718
- opacity: 0.5;
719
- }
720
- text-align: center;
721
- }
722
-
723
- .cluster rect {
724
- }
725
-
726
- .cluster text {
727
- fill: ${options.titleColor};
728
- }
729
-
730
- div.mermaidTooltip {
731
- position: absolute;
732
- text-align: center;
733
- max-width: 200px;
734
- padding: 2px;
735
- font-family: ${options.fontFamily};
736
- font-size: 12px;
737
- background: ${options.tertiaryColor};
738
- border: 1px solid ${options.border2};
739
- border-radius: 2px;
740
- pointer-events: none;
741
- z-index: 100;
742
- }
743
-
744
- .task-type-0, .section-type-0 {
745
- ${options.fillType0 ? `fill: ${options.fillType0}` : ""};
746
- }
747
- .task-type-1, .section-type-1 {
748
- ${options.fillType0 ? `fill: ${options.fillType1}` : ""};
749
- }
750
- .task-type-2, .section-type-2 {
751
- ${options.fillType0 ? `fill: ${options.fillType2}` : ""};
752
- }
753
- .task-type-3, .section-type-3 {
754
- ${options.fillType0 ? `fill: ${options.fillType3}` : ""};
755
- }
756
- .task-type-4, .section-type-4 {
757
- ${options.fillType0 ? `fill: ${options.fillType4}` : ""};
758
- }
759
- .task-type-5, .section-type-5 {
760
- ${options.fillType0 ? `fill: ${options.fillType5}` : ""};
761
- }
762
- .task-type-6, .section-type-6 {
763
- ${options.fillType0 ? `fill: ${options.fillType6}` : ""};
764
- }
765
- .task-type-7, .section-type-7 {
766
- ${options.fillType0 ? `fill: ${options.fillType7}` : ""};
767
- }
768
-
769
- .actor-0 {
770
- ${options.actor0 ? `fill: ${options.actor0}` : ""};
771
- }
772
- .actor-1 {
773
- ${options.actor1 ? `fill: ${options.actor1}` : ""};
774
- }
775
- .actor-2 {
776
- ${options.actor2 ? `fill: ${options.actor2}` : ""};
777
- }
778
- .actor-3 {
779
- ${options.actor3 ? `fill: ${options.actor3}` : ""};
780
- }
781
- .actor-4 {
782
- ${options.actor4 ? `fill: ${options.actor4}` : ""};
783
- }
784
- .actor-5 {
785
- ${options.actor5 ? `fill: ${options.actor5}` : ""};
786
- }
787
- ${getIconStyles()}
788
- `, "getStyles");
789
- var styles_default = getStyles;
790
- var drawRect2 = /* @__PURE__ */ __name(function(elem, rectData) {
791
- return drawRect(elem, rectData);
792
- }, "drawRect");
793
- var drawFace = /* @__PURE__ */ __name(function(element, faceData) {
794
- const radius = 15;
795
- const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible");
796
- const face = element.append("g");
797
- face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
798
- face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
799
- function smile(face2) {
800
- const arc = d3arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
801
- face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
802
- }
803
- __name(smile, "smile");
804
- function sad(face2) {
805
- const arc = d3arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
806
- face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
807
- }
808
- __name(sad, "sad");
809
- function ambivalent(face2) {
810
- face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
811
- }
812
- __name(ambivalent, "ambivalent");
813
- if (faceData.score > 3) {
814
- smile(face);
815
- } else if (faceData.score < 3) {
816
- sad(face);
817
- } else {
818
- ambivalent(face);
819
- }
820
- return circleElement;
821
- }, "drawFace");
822
- var drawCircle = /* @__PURE__ */ __name(function(element, circleData) {
823
- const circleElement = element.append("circle");
824
- circleElement.attr("cx", circleData.cx);
825
- circleElement.attr("cy", circleData.cy);
826
- circleElement.attr("class", "actor-" + circleData.pos);
827
- circleElement.attr("fill", circleData.fill);
828
- circleElement.attr("stroke", circleData.stroke);
829
- circleElement.attr("r", circleData.r);
830
- if (circleElement.class !== void 0) {
831
- circleElement.attr("class", circleElement.class);
832
- }
833
- if (circleData.title !== void 0) {
834
- circleElement.append("title").text(circleData.title);
835
- }
836
- return circleElement;
837
- }, "drawCircle");
838
- var drawText2 = /* @__PURE__ */ __name(function(elem, textData) {
839
- return drawText(elem, textData);
840
- }, "drawText");
841
- var drawLabel = /* @__PURE__ */ __name(function(elem, txtObject) {
842
- function genPoints(x, y, width, height, cut) {
843
- return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
844
- }
845
- __name(genPoints, "genPoints");
846
- const polygon = elem.append("polygon");
847
- polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
848
- polygon.attr("class", "labelBox");
849
- txtObject.y = txtObject.y + txtObject.labelMargin;
850
- txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
851
- drawText2(elem, txtObject);
852
- }, "drawLabel");
853
- var drawSection = /* @__PURE__ */ __name(function(elem, section, conf2) {
854
- const g = elem.append("g");
855
- const rect = getNoteRect();
856
- rect.x = section.x;
857
- rect.y = section.y;
858
- rect.fill = section.fill;
859
- rect.width = conf2.width * section.taskCount + // width of the tasks
860
- conf2.diagramMarginX * (section.taskCount - 1);
861
- rect.height = conf2.height;
862
- rect.class = "journey-section section-type-" + section.num;
863
- rect.rx = 3;
864
- rect.ry = 3;
865
- drawRect2(g, rect);
866
- _drawTextCandidateFunc(conf2)(
867
- section.text,
868
- g,
869
- rect.x,
870
- rect.y,
871
- rect.width,
872
- rect.height,
873
- { class: "journey-section section-type-" + section.num },
874
- conf2,
875
- section.colour
876
- );
877
- }, "drawSection");
878
- var taskCount = -1;
879
- var drawTask = /* @__PURE__ */ __name(function(elem, task, conf2, diagramId) {
880
- const center = task.x + conf2.width / 2;
881
- const g = elem.append("g");
882
- taskCount++;
883
- const maxHeight = 300 + 5 * 30;
884
- g.append("line").attr("id", diagramId + "-task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666");
885
- drawFace(g, {
886
- cx: center,
887
- cy: 300 + (5 - task.score) * 30,
888
- score: task.score
889
- });
890
- const rect = getNoteRect();
891
- rect.x = task.x;
892
- rect.y = task.y;
893
- rect.fill = task.fill;
894
- rect.width = conf2.width;
895
- rect.height = conf2.height;
896
- rect.class = "task task-type-" + task.num;
897
- rect.rx = 3;
898
- rect.ry = 3;
899
- drawRect2(g, rect);
900
- let xPos = task.x + 14;
901
- task.people.forEach((person) => {
902
- const colour = task.actors[person].color;
903
- const circle = {
904
- cx: xPos,
905
- cy: task.y,
906
- r: 7,
907
- fill: colour,
908
- stroke: "#000",
909
- title: person,
910
- pos: task.actors[person].position
911
- };
912
- drawCircle(g, circle);
913
- xPos += 10;
914
- });
915
- _drawTextCandidateFunc(conf2)(
916
- task.task,
917
- g,
918
- rect.x,
919
- rect.y,
920
- rect.width,
921
- rect.height,
922
- { class: "task" },
923
- conf2,
924
- task.colour
925
- );
926
- }, "drawTask");
927
- var drawBackgroundRect2 = /* @__PURE__ */ __name(function(elem, bounds2) {
928
- drawBackgroundRect(elem, bounds2);
929
- }, "drawBackgroundRect");
930
- var _drawTextCandidateFunc = /* @__PURE__ */ (function() {
931
- function byText(content, g, x, y, width, height, textAttrs, colour) {
932
- const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content);
933
- _setTextAttrs(text, textAttrs);
934
- }
935
- __name(byText, "byText");
936
- function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) {
937
- const { taskFontSize, taskFontFamily } = conf2;
938
- const lines = content.split(/<br\s*\/?>/gi);
939
- for (let i = 0; i < lines.length; i++) {
940
- const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
941
- const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily);
942
- text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
943
- text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
944
- _setTextAttrs(text, textAttrs);
945
- }
946
- }
947
- __name(byTspan, "byTspan");
948
- function byFo(content, g, x, y, width, height, textAttrs, conf2) {
949
- const body = g.append("switch");
950
- const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
951
- const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
952
- text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
953
- byTspan(content, body, x, y, width, height, textAttrs, conf2);
954
- _setTextAttrs(text, textAttrs);
955
- }
956
- __name(byFo, "byFo");
957
- function _setTextAttrs(toText, fromTextAttrsDict) {
958
- for (const key in fromTextAttrsDict) {
959
- if (key in fromTextAttrsDict) {
960
- toText.attr(key, fromTextAttrsDict[key]);
961
- }
962
- }
963
- }
964
- __name(_setTextAttrs, "_setTextAttrs");
965
- return function(conf2) {
966
- return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
967
- };
968
- })();
969
- var initGraphics = /* @__PURE__ */ __name(function(graphics, id) {
970
- taskCount = -1;
971
- graphics.append("defs").append("marker").attr("id", id + "-arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
972
- }, "initGraphics");
973
- var svgDraw_default = {
974
- drawRect: drawRect2,
975
- drawCircle,
976
- drawSection,
977
- drawText: drawText2,
978
- drawLabel,
979
- drawTask,
980
- drawBackgroundRect: drawBackgroundRect2,
981
- initGraphics
982
- };
983
- var setConf = /* @__PURE__ */ __name(function(cnf) {
984
- const keys = Object.keys(cnf);
985
- keys.forEach(function(key) {
986
- conf[key] = cnf[key];
987
- });
988
- }, "setConf");
989
- var actors = {};
990
- var maxWidth = 0;
991
- function drawActorLegend(diagram2) {
992
- const conf2 = getConfig2().journey;
993
- const maxLabelWidth = conf2.maxLabelWidth;
994
- maxWidth = 0;
995
- let yPos = 60;
996
- Object.keys(actors).forEach((person) => {
997
- const colour = actors[person].color;
998
- const circleData = {
999
- cx: 20,
1000
- cy: yPos,
1001
- r: 7,
1002
- fill: colour,
1003
- stroke: "#000",
1004
- pos: actors[person].position
1005
- };
1006
- svgDraw_default.drawCircle(diagram2, circleData);
1007
- let measureText = diagram2.append("text").attr("visibility", "hidden").text(person);
1008
- const fullTextWidth = measureText.node().getBoundingClientRect().width;
1009
- measureText.remove();
1010
- let lines = [];
1011
- if (fullTextWidth <= maxLabelWidth) {
1012
- lines = [person];
1013
- } else {
1014
- const words = person.split(" ");
1015
- let currentLine = "";
1016
- measureText = diagram2.append("text").attr("visibility", "hidden");
1017
- words.forEach((word) => {
1018
- const testLine = currentLine ? `${currentLine} ${word}` : word;
1019
- measureText.text(testLine);
1020
- const textWidth = measureText.node().getBoundingClientRect().width;
1021
- if (textWidth > maxLabelWidth) {
1022
- if (currentLine) {
1023
- lines.push(currentLine);
1024
- }
1025
- currentLine = word;
1026
- measureText.text(word);
1027
- if (measureText.node().getBoundingClientRect().width > maxLabelWidth) {
1028
- let brokenWord = "";
1029
- for (const char of word) {
1030
- brokenWord += char;
1031
- measureText.text(brokenWord + "-");
1032
- if (measureText.node().getBoundingClientRect().width > maxLabelWidth) {
1033
- lines.push(brokenWord.slice(0, -1) + "-");
1034
- brokenWord = char;
1035
- }
1036
- }
1037
- currentLine = brokenWord;
1038
- }
1039
- } else {
1040
- currentLine = testLine;
1041
- }
1042
- });
1043
- if (currentLine) {
1044
- lines.push(currentLine);
1045
- }
1046
- measureText.remove();
1047
- }
1048
- lines.forEach((line, index) => {
1049
- const labelData = {
1050
- x: 40,
1051
- y: yPos + 7 + index * 20,
1052
- fill: "#666",
1053
- text: line,
1054
- textMargin: conf2.boxTextMargin ?? 5
1055
- };
1056
- const textElement = svgDraw_default.drawText(diagram2, labelData);
1057
- const lineWidth = textElement.node().getBoundingClientRect().width;
1058
- if (lineWidth > maxWidth && lineWidth > conf2.leftMargin - lineWidth) {
1059
- maxWidth = lineWidth;
1060
- }
1061
- });
1062
- yPos += Math.max(20, lines.length * 20);
1063
- });
1064
- }
1065
- __name(drawActorLegend, "drawActorLegend");
1066
- var conf = getConfig2().journey;
1067
- var leftMargin = 0;
1068
- var draw = /* @__PURE__ */ __name(function(text, id, version, diagObj) {
1069
- const configObject = getConfig2();
1070
- const titleColor = configObject.journey.titleColor;
1071
- const titleFontSize = configObject.journey.titleFontSize;
1072
- const titleFontFamily = configObject.journey.titleFontFamily;
1073
- const securityLevel = configObject.securityLevel;
1074
- let sandboxElement;
1075
- if (securityLevel === "sandbox") {
1076
- sandboxElement = select("#i" + id);
1077
- }
1078
- const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
1079
- bounds.init();
1080
- const diagram2 = root.select("#" + id);
1081
- svgDraw_default.initGraphics(diagram2, id);
1082
- const tasks2 = diagObj.db.getTasks();
1083
- const title = diagObj.db.getDiagramTitle();
1084
- const actorNames = diagObj.db.getActors();
1085
- for (const member in actors) {
1086
- delete actors[member];
1087
- }
1088
- let actorPos = 0;
1089
- actorNames.forEach((actorName) => {
1090
- actors[actorName] = {
1091
- color: conf.actorColours[actorPos % conf.actorColours.length],
1092
- position: actorPos
1093
- };
1094
- actorPos++;
1095
- });
1096
- drawActorLegend(diagram2);
1097
- leftMargin = conf.leftMargin + maxWidth;
1098
- bounds.insert(0, 0, leftMargin, Object.keys(actors).length * 50);
1099
- drawTasks(diagram2, tasks2, 0, id);
1100
- const box = bounds.getBounds();
1101
- if (title) {
1102
- diagram2.append("text").text(title).attr("x", leftMargin).attr("font-size", titleFontSize).attr("font-weight", "bold").attr("y", 25).attr("fill", titleColor).attr("font-family", titleFontFamily);
1103
- }
1104
- const height = box.stopy - box.starty + 2 * conf.diagramMarginY;
1105
- const width = leftMargin + box.stopx + 2 * conf.diagramMarginX;
1106
- configureSvgSize(diagram2, height, width, conf.useMaxWidth);
1107
- diagram2.append("line").attr("x1", leftMargin).attr("y1", conf.height * 4).attr("x2", width - leftMargin - 4).attr("y2", conf.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#" + id + "-arrowhead)");
1108
- const extraVertForTitle = title ? 70 : 0;
1109
- diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`);
1110
- diagram2.attr("preserveAspectRatio", "xMinYMin meet");
1111
- diagram2.attr("height", height + extraVertForTitle + 25);
1112
- }, "draw");
1113
- var bounds = {
1114
- data: {
1115
- startx: void 0,
1116
- stopx: void 0,
1117
- starty: void 0,
1118
- stopy: void 0
1119
- },
1120
- verticalPos: 0,
1121
- sequenceItems: [],
1122
- init: /* @__PURE__ */ __name(function() {
1123
- this.sequenceItems = [];
1124
- this.data = {
1125
- startx: void 0,
1126
- stopx: void 0,
1127
- starty: void 0,
1128
- stopy: void 0
1129
- };
1130
- this.verticalPos = 0;
1131
- }, "init"),
1132
- updateVal: /* @__PURE__ */ __name(function(obj, key, val, fun) {
1133
- if (obj[key] === void 0) {
1134
- obj[key] = val;
1135
- } else {
1136
- obj[key] = fun(val, obj[key]);
1137
- }
1138
- }, "updateVal"),
1139
- updateBounds: /* @__PURE__ */ __name(function(startx, starty, stopx, stopy) {
1140
- const conf2 = getConfig2().journey;
1141
- const _self = this;
1142
- let cnt = 0;
1143
- function updateFn(type) {
1144
- return /* @__PURE__ */ __name(function updateItemBounds(item) {
1145
- cnt++;
1146
- const n = _self.sequenceItems.length - cnt + 1;
1147
- _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min);
1148
- _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max);
1149
- _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min);
1150
- _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max);
1151
- if (!(type === "activation")) {
1152
- _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min);
1153
- _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max);
1154
- _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min);
1155
- _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max);
1156
- }
1157
- }, "updateItemBounds");
1158
- }
1159
- __name(updateFn, "updateFn");
1160
- this.sequenceItems.forEach(updateFn());
1161
- }, "updateBounds"),
1162
- insert: /* @__PURE__ */ __name(function(startx, starty, stopx, stopy) {
1163
- const _startx = Math.min(startx, stopx);
1164
- const _stopx = Math.max(startx, stopx);
1165
- const _starty = Math.min(starty, stopy);
1166
- const _stopy = Math.max(starty, stopy);
1167
- this.updateVal(bounds.data, "startx", _startx, Math.min);
1168
- this.updateVal(bounds.data, "starty", _starty, Math.min);
1169
- this.updateVal(bounds.data, "stopx", _stopx, Math.max);
1170
- this.updateVal(bounds.data, "stopy", _stopy, Math.max);
1171
- this.updateBounds(_startx, _starty, _stopx, _stopy);
1172
- }, "insert"),
1173
- bumpVerticalPos: /* @__PURE__ */ __name(function(bump) {
1174
- this.verticalPos = this.verticalPos + bump;
1175
- this.data.stopy = this.verticalPos;
1176
- }, "bumpVerticalPos"),
1177
- getVerticalPos: /* @__PURE__ */ __name(function() {
1178
- return this.verticalPos;
1179
- }, "getVerticalPos"),
1180
- getBounds: /* @__PURE__ */ __name(function() {
1181
- return this.data;
1182
- }, "getBounds")
1183
- };
1184
- var fills = conf.sectionFills;
1185
- var textColours = conf.sectionColours;
1186
- var drawTasks = /* @__PURE__ */ __name(function(diagram2, tasks2, verticalPos, diagramId) {
1187
- const conf2 = getConfig2().journey;
1188
- let lastSection = "";
1189
- const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY;
1190
- const taskPos = verticalPos + sectionVHeight;
1191
- let sectionNumber = 0;
1192
- let fill = "#CCC";
1193
- let colour = "black";
1194
- let num = 0;
1195
- for (const [i, task] of tasks2.entries()) {
1196
- if (lastSection !== task.section) {
1197
- fill = fills[sectionNumber % fills.length];
1198
- num = sectionNumber % fills.length;
1199
- colour = textColours[sectionNumber % textColours.length];
1200
- let taskInSectionCount = 0;
1201
- const currentSection2 = task.section;
1202
- for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) {
1203
- if (tasks2[taskIndex].section == currentSection2) {
1204
- taskInSectionCount = taskInSectionCount + 1;
1205
- } else {
1206
- break;
1207
- }
1208
- }
1209
- const section = {
1210
- x: i * conf2.taskMargin + i * conf2.width + leftMargin,
1211
- y: 50,
1212
- text: task.section,
1213
- fill,
1214
- num,
1215
- colour,
1216
- taskCount: taskInSectionCount
1217
- };
1218
- svgDraw_default.drawSection(diagram2, section, conf2);
1219
- lastSection = task.section;
1220
- sectionNumber++;
1221
- }
1222
- const taskActors = task.people.reduce((acc, actorName) => {
1223
- if (actors[actorName]) {
1224
- acc[actorName] = actors[actorName];
1225
- }
1226
- return acc;
1227
- }, {});
1228
- task.x = i * conf2.taskMargin + i * conf2.width + leftMargin;
1229
- task.y = taskPos;
1230
- task.width = conf2.diagramMarginX;
1231
- task.height = conf2.diagramMarginY;
1232
- task.colour = colour;
1233
- task.fill = fill;
1234
- task.num = num;
1235
- task.actors = taskActors;
1236
- svgDraw_default.drawTask(diagram2, task, conf2, diagramId);
1237
- bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30);
1238
- }
1239
- }, "drawTasks");
1240
- var journeyRenderer_default = {
1241
- setConf,
1242
- draw
1243
- };
1244
- var diagram = {
1245
- parser: journey_default,
1246
- db: journeyDb_default,
1247
- renderer: journeyRenderer_default,
1248
- styles: styles_default,
1249
- init: /* @__PURE__ */ __name((cnf) => {
1250
- journeyRenderer_default.setConf(cnf.journey);
1251
- journeyDb_default.clear();
1252
- }, "init")
1253
- };
1254
- export {
1255
- diagram
1256
- };