jekyll-ham 1.0.2 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (369) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -6
  3. data/_layouts/default.html +6 -0
  4. data/_layouts/page.html +1 -1
  5. data/assets/bootstrap-icons.min.css +3 -3
  6. data/assets/fonts/bootstrap-icons.woff +0 -0
  7. data/assets/fonts/bootstrap-icons.woff2 +0 -0
  8. data/assets/mermaid/Diagram.d.ts +33 -0
  9. data/assets/mermaid/Tableau10-31042135.js +10 -0
  10. data/assets/mermaid/Tableau10-558cc280.js +9 -0
  11. data/assets/mermaid/__mocks__/mermaidAPI.d.ts +13 -0
  12. data/assets/mermaid/accessibility.d.ts +27 -0
  13. data/assets/mermaid/accessibility.spec.d.ts +1 -0
  14. data/assets/mermaid/arc-c0f908ab.js +148 -0
  15. data/assets/mermaid/arc-d1f6357e.js +86 -0
  16. data/assets/mermaid/array-2ff2c7a6.js +6 -0
  17. data/assets/mermaid/array-b7dcf730.js +6 -0
  18. data/assets/mermaid/assignWithDepth.d.ts +30 -0
  19. data/assets/mermaid/blockDiagram-5dc23a45.js +1230 -0
  20. data/assets/mermaid/blockDiagram-9f4a6865.js +1822 -0
  21. data/assets/mermaid/blockDiagram-efe38566.js +1818 -0
  22. data/assets/mermaid/c4Diagram-1e775db3.js +1579 -0
  23. data/assets/mermaid/c4Diagram-ae766693.js +2473 -0
  24. data/assets/mermaid/c4Diagram-af207393.js +2463 -0
  25. data/assets/mermaid/channel-ebbc4130.js +5 -0
  26. data/assets/mermaid/channel-f9001828.js +8 -0
  27. data/assets/mermaid/classDiagram-72b9c71d.js +356 -0
  28. data/assets/mermaid/classDiagram-f52caa06.js +220 -0
  29. data/assets/mermaid/classDiagram-fb54d2a0.js +363 -0
  30. data/assets/mermaid/classDiagram-v2-640c694e.js +206 -0
  31. data/assets/mermaid/classDiagram-v2-a2b738ad.js +298 -0
  32. data/assets/mermaid/classDiagram-v2-fedb80f6.js +290 -0
  33. data/assets/mermaid/clone-9ea6bfeb.js +8 -0
  34. data/assets/mermaid/clone-afc2f047.js +8 -0
  35. data/assets/mermaid/config.d.ts +98 -0
  36. data/assets/mermaid/config.spec.d.ts +1 -0
  37. data/assets/mermaid/config.type.d.ts +1534 -0
  38. data/assets/mermaid/createText-03b82060.js +2966 -0
  39. data/assets/mermaid/createText-b70fe78a.js +4929 -0
  40. data/assets/mermaid/createText-ca0c5216.js +251 -0
  41. data/assets/mermaid/dagre-wrapper/blockArrowHelper.d.ts +8 -0
  42. data/assets/mermaid/dagre-wrapper/clusters.d.ts +4 -0
  43. data/assets/mermaid/dagre-wrapper/createLabel.d.ts +9 -0
  44. data/assets/mermaid/dagre-wrapper/edgeMarker.d.ts +12 -0
  45. data/assets/mermaid/dagre-wrapper/edgeMarker.spec.d.ts +1 -0
  46. data/assets/mermaid/dagre-wrapper/edges.d.ts +14 -0
  47. data/assets/mermaid/dagre-wrapper/index.d.ts +1 -0
  48. data/assets/mermaid/dagre-wrapper/intersect/index.d.ts +13 -0
  49. data/assets/mermaid/dagre-wrapper/intersect/intersect-circle.d.ts +10 -0
  50. data/assets/mermaid/dagre-wrapper/intersect/intersect-ellipse.d.ts +11 -0
  51. data/assets/mermaid/dagre-wrapper/intersect/intersect-line.d.ts +13 -0
  52. data/assets/mermaid/dagre-wrapper/intersect/intersect-node.d.ts +6 -0
  53. data/assets/mermaid/dagre-wrapper/intersect/intersect-polygon.d.ts +10 -0
  54. data/assets/mermaid/dagre-wrapper/intersect/intersect-rect.d.ts +5 -0
  55. data/assets/mermaid/dagre-wrapper/markers.d.ts +2 -0
  56. data/assets/mermaid/dagre-wrapper/mermaid-graphlib.d.ts +8 -0
  57. data/assets/mermaid/dagre-wrapper/nodes.d.ts +4 -0
  58. data/assets/mermaid/dagre-wrapper/shapes/note.d.ts +2 -0
  59. data/assets/mermaid/dagre-wrapper/shapes/util.d.ts +14 -0
  60. data/assets/mermaid/defaultConfig.d.ts +12 -0
  61. data/assets/mermaid/diagram-api/comments.d.ts +6 -0
  62. data/assets/mermaid/diagram-api/comments.spec.d.ts +1 -0
  63. data/assets/mermaid/diagram-api/detectType.d.ts +42 -0
  64. data/assets/mermaid/diagram-api/diagram-orchestration.d.ts +1 -0
  65. data/assets/mermaid/diagram-api/diagram-orchestration.spec.d.ts +1 -0
  66. data/assets/mermaid/diagram-api/diagramAPI.d.ts +31 -0
  67. data/assets/mermaid/diagram-api/diagramAPI.spec.d.ts +1 -0
  68. data/assets/mermaid/diagram-api/frontmatter.d.ts +18 -0
  69. data/assets/mermaid/diagram-api/frontmatter.spec.d.ts +1 -0
  70. data/assets/mermaid/diagram-api/loadDiagram.d.ts +1 -0
  71. data/assets/mermaid/diagram-api/regexes.d.ts +3 -0
  72. data/assets/mermaid/diagram-api/types.d.ts +84 -0
  73. data/assets/mermaid/diagram.spec.d.ts +1 -0
  74. data/assets/mermaid/diagrams/block/blockDB.d.ts +54 -0
  75. data/assets/mermaid/diagrams/block/blockDetector.d.ts +3 -0
  76. data/assets/mermaid/diagrams/block/blockDiagram.d.ts +2 -0
  77. data/assets/mermaid/diagrams/block/blockRenderer.d.ts +15 -0
  78. data/assets/mermaid/diagrams/block/blockTypes.d.ts +36 -0
  79. data/assets/mermaid/diagrams/block/blockUtils.d.ts +1 -0
  80. data/assets/mermaid/diagrams/block/layout.d.ts +13 -0
  81. data/assets/mermaid/diagrams/block/layout.spec.d.ts +1 -0
  82. data/assets/mermaid/diagrams/block/parser/block.spec.d.ts +1 -0
  83. data/assets/mermaid/diagrams/block/renderHelpers.d.ts +10 -0
  84. data/assets/mermaid/diagrams/block/styles.d.ts +18 -0
  85. data/assets/mermaid/diagrams/c4/c4Db.d.ts +127 -0
  86. data/assets/mermaid/diagrams/c4/c4Detector.d.ts +3 -0
  87. data/assets/mermaid/diagrams/c4/c4Diagram.d.ts +2 -0
  88. data/assets/mermaid/diagrams/c4/c4Renderer.d.ts +12 -0
  89. data/assets/mermaid/diagrams/c4/styles.d.ts +2 -0
  90. data/assets/mermaid/diagrams/c4/svgDraw.d.ts +36 -0
  91. data/assets/mermaid/diagrams/class/classDb.d.ts +144 -0
  92. data/assets/mermaid/diagrams/class/classDetector-V2.d.ts +3 -0
  93. data/assets/mermaid/diagrams/class/classDetector.d.ts +3 -0
  94. data/assets/mermaid/diagrams/class/classDiagram-v2.d.ts +2 -0
  95. data/assets/mermaid/diagrams/class/classDiagram.d.ts +2 -0
  96. data/assets/mermaid/diagrams/class/classDiagram.spec.d.ts +1 -0
  97. data/assets/mermaid/diagrams/class/classRenderer-v2.d.ts +57 -0
  98. data/assets/mermaid/diagrams/class/classRenderer.d.ts +5 -0
  99. data/assets/mermaid/diagrams/class/classTypes.d.ts +78 -0
  100. data/assets/mermaid/diagrams/class/classTypes.spec.d.ts +1 -0
  101. data/assets/mermaid/diagrams/class/styles.d.ts +2 -0
  102. data/assets/mermaid/diagrams/class/svgDraw.d.ts +25 -0
  103. data/assets/mermaid/diagrams/common/common.d.ts +110 -0
  104. data/assets/mermaid/diagrams/common/common.spec.d.ts +1 -0
  105. data/assets/mermaid/diagrams/common/commonDb.d.ts +7 -0
  106. data/assets/mermaid/diagrams/common/commonTypes.d.ts +51 -0
  107. data/assets/mermaid/diagrams/common/svgDrawCommon.d.ts +15 -0
  108. data/assets/mermaid/diagrams/er/erDb.d.ts +49 -0
  109. data/assets/mermaid/diagrams/er/erDetector.d.ts +3 -0
  110. data/assets/mermaid/diagrams/er/erDiagram.d.ts +34 -0
  111. data/assets/mermaid/diagrams/er/erMarkers.d.ts +24 -0
  112. data/assets/mermaid/diagrams/er/erRenderer.d.ts +19 -0
  113. data/assets/mermaid/diagrams/er/erRenderer.spec.d.ts +1 -0
  114. data/assets/mermaid/diagrams/er/styles.d.ts +2 -0
  115. data/assets/mermaid/diagrams/error/errorDiagram.d.ts +3 -0
  116. data/assets/mermaid/diagrams/error/errorRenderer.d.ts +12 -0
  117. data/assets/mermaid/diagrams/flowchart/elk/detector.d.ts +3 -0
  118. data/assets/mermaid/diagrams/flowchart/elk/detector.spec.d.ts +1 -0
  119. data/assets/mermaid/diagrams/flowchart/elk/flowRenderer-elk.d.ts +10 -0
  120. data/assets/mermaid/diagrams/flowchart/elk/flowchart-elk-definition.d.ts +10 -0
  121. data/assets/mermaid/diagrams/flowchart/elk/render-utils.d.ts +5 -0
  122. data/assets/mermaid/diagrams/flowchart/elk/render-utils.spec.d.ts +1 -0
  123. data/assets/mermaid/diagrams/flowchart/elk/styles.d.ts +19 -0
  124. data/assets/mermaid/diagrams/flowchart/flowChartShapes.d.ts +9 -0
  125. data/assets/mermaid/diagrams/flowchart/flowDb.d.ts +87 -0
  126. data/assets/mermaid/diagrams/flowchart/flowDetector-v2.d.ts +3 -0
  127. data/assets/mermaid/diagrams/flowchart/flowDetector.d.ts +3 -0
  128. data/assets/mermaid/diagrams/flowchart/flowDiagram-v2.d.ts +57 -0
  129. data/assets/mermaid/diagrams/flowchart/flowDiagram.d.ts +57 -0
  130. data/assets/mermaid/diagrams/flowchart/flowRenderer-v2.d.ts +13 -0
  131. data/assets/mermaid/diagrams/flowchart/flowRenderer.d.ts +13 -0
  132. data/assets/mermaid/diagrams/flowchart/styles.d.ts +18 -0
  133. data/assets/mermaid/diagrams/gantt/ganttDb.d.ts +106 -0
  134. data/assets/mermaid/diagrams/gantt/ganttDb.spec.d.ts +1 -0
  135. data/assets/mermaid/diagrams/gantt/ganttDetector.d.ts +3 -0
  136. data/assets/mermaid/diagrams/gantt/ganttDiagram.d.ts +2 -0
  137. data/assets/mermaid/diagrams/gantt/ganttRenderer.d.ts +7 -0
  138. data/assets/mermaid/diagrams/gantt/styles.d.ts +2 -0
  139. data/assets/mermaid/diagrams/git/gitGraphAst.d.ts +61 -0
  140. data/assets/mermaid/diagrams/git/gitGraphDetector.d.ts +3 -0
  141. data/assets/mermaid/diagrams/git/gitGraphDiagram.d.ts +2 -0
  142. data/assets/mermaid/diagrams/git/gitGraphRenderer.d.ts +5 -0
  143. data/assets/mermaid/diagrams/git/styles.d.ts +2 -0
  144. data/assets/mermaid/diagrams/info/info.spec.d.ts +1 -0
  145. data/assets/mermaid/diagrams/info/infoDb.d.ts +5 -0
  146. data/assets/mermaid/diagrams/info/infoDetector.d.ts +2 -0
  147. data/assets/mermaid/diagrams/info/infoDiagram.d.ts +2 -0
  148. data/assets/mermaid/diagrams/info/infoRenderer.d.ts +4 -0
  149. data/assets/mermaid/diagrams/info/infoTypes.d.ts +9 -0
  150. data/assets/mermaid/diagrams/mindmap/detector.d.ts +3 -0
  151. data/assets/mermaid/diagrams/mindmap/mindmap-definition.d.ts +2 -0
  152. data/assets/mermaid/diagrams/mindmap/mindmap.spec.d.ts +1 -0
  153. data/assets/mermaid/diagrams/mindmap/mindmapDb.d.ts +30 -0
  154. data/assets/mermaid/diagrams/mindmap/mindmapRenderer.d.ts +21 -0
  155. data/assets/mermaid/diagrams/mindmap/mindmapTypes.d.ts +20 -0
  156. data/assets/mermaid/diagrams/mindmap/styles.d.ts +3 -0
  157. data/assets/mermaid/diagrams/mindmap/svgDraw.d.ts +13 -0
  158. data/assets/mermaid/diagrams/pie/pie.spec.d.ts +1 -0
  159. data/assets/mermaid/diagrams/pie/pieDb.d.ts +6 -0
  160. data/assets/mermaid/diagrams/pie/pieDetector.d.ts +2 -0
  161. data/assets/mermaid/diagrams/pie/pieDiagram.d.ts +2 -0
  162. data/assets/mermaid/diagrams/pie/pieRenderer.d.ts +13 -0
  163. data/assets/mermaid/diagrams/pie/pieStyles.d.ts +3 -0
  164. data/assets/mermaid/diagrams/pie/pieTypes.d.ts +53 -0
  165. data/assets/mermaid/diagrams/quadrant-chart/parser/quadrant.jison.spec.d.ts +1 -0
  166. data/assets/mermaid/diagrams/quadrant-chart/quadrantBuilder.d.ts +118 -0
  167. data/assets/mermaid/diagrams/quadrant-chart/quadrantDb.d.ts +38 -0
  168. data/assets/mermaid/diagrams/quadrant-chart/quadrantDetector.d.ts +3 -0
  169. data/assets/mermaid/diagrams/quadrant-chart/quadrantDiagram.d.ts +2 -0
  170. data/assets/mermaid/diagrams/quadrant-chart/quadrantRenderer.d.ts +6 -0
  171. data/assets/mermaid/diagrams/requirement/requirementDb.d.ts +70 -0
  172. data/assets/mermaid/diagrams/requirement/requirementDetector.d.ts +3 -0
  173. data/assets/mermaid/diagrams/requirement/requirementDiagram.d.ts +2 -0
  174. data/assets/mermaid/diagrams/requirement/requirementMarkers.d.ts +10 -0
  175. data/assets/mermaid/diagrams/requirement/requirementRenderer.d.ts +7 -0
  176. data/assets/mermaid/diagrams/requirement/styles.d.ts +2 -0
  177. data/assets/mermaid/diagrams/sankey/parser/sankey.spec.d.ts +1 -0
  178. data/assets/mermaid/diagrams/sankey/sankeyDB.d.ts +36 -0
  179. data/assets/mermaid/diagrams/sankey/sankeyDetector.d.ts +3 -0
  180. data/assets/mermaid/diagrams/sankey/sankeyDiagram.d.ts +2 -0
  181. data/assets/mermaid/diagrams/sankey/sankeyRenderer.d.ts +14 -0
  182. data/assets/mermaid/diagrams/sankey/sankeyUtils.d.ts +1 -0
  183. data/assets/mermaid/diagrams/sequence/sequenceDb.d.ts +153 -0
  184. data/assets/mermaid/diagrams/sequence/sequenceDetector.d.ts +3 -0
  185. data/assets/mermaid/diagrams/sequence/sequenceDiagram.d.ts +2 -0
  186. data/assets/mermaid/diagrams/sequence/sequenceRenderer.d.ts +202 -0
  187. data/assets/mermaid/diagrams/sequence/styles.d.ts +2 -0
  188. data/assets/mermaid/diagrams/sequence/svgDraw.d.ts +73 -0
  189. data/assets/mermaid/diagrams/state/id-cache.d.ts +11 -0
  190. data/assets/mermaid/diagrams/state/shapes.d.ts +14 -0
  191. data/assets/mermaid/diagrams/state/stateCommon.d.ts +22 -0
  192. data/assets/mermaid/diagrams/state/stateDb.d.ts +91 -0
  193. data/assets/mermaid/diagrams/state/stateDetector-V2.d.ts +3 -0
  194. data/assets/mermaid/diagrams/state/stateDetector.d.ts +3 -0
  195. data/assets/mermaid/diagrams/state/stateDiagram-v2.d.ts +2 -0
  196. data/assets/mermaid/diagrams/state/stateDiagram.d.ts +2 -0
  197. data/assets/mermaid/diagrams/state/stateRenderer-v2.d.ts +20 -0
  198. data/assets/mermaid/diagrams/state/stateRenderer.d.ts +7 -0
  199. data/assets/mermaid/diagrams/state/styles.d.ts +2 -0
  200. data/assets/mermaid/diagrams/timeline/detector.d.ts +3 -0
  201. data/assets/mermaid/diagrams/timeline/styles.d.ts +2 -0
  202. data/assets/mermaid/diagrams/timeline/svgDraw.d.ts +46 -0
  203. data/assets/mermaid/diagrams/timeline/timeline-definition.d.ts +10 -0
  204. data/assets/mermaid/diagrams/timeline/timelineDb.d.ts +20 -0
  205. data/assets/mermaid/diagrams/timeline/timelineRenderer.d.ts +19 -0
  206. data/assets/mermaid/diagrams/user-journey/journeyDb.d.ts +30 -0
  207. data/assets/mermaid/diagrams/user-journey/journeyDetector.d.ts +3 -0
  208. data/assets/mermaid/diagrams/user-journey/journeyDiagram.d.ts +2 -0
  209. data/assets/mermaid/diagrams/user-journey/journeyRenderer.d.ts +30 -0
  210. data/assets/mermaid/diagrams/user-journey/styles.d.ts +2 -0
  211. data/assets/mermaid/diagrams/user-journey/svgDraw.d.ts +20 -0
  212. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/bandAxis.d.ts +12 -0
  213. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/baseAxis.d.ts +38 -0
  214. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/index.d.ts +12 -0
  215. data/assets/mermaid/diagrams/xychart/chartBuilder/components/axis/linearAxis.d.ts +11 -0
  216. data/assets/mermaid/diagrams/xychart/chartBuilder/components/chartTitle.d.ts +16 -0
  217. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/barPlot.d.ts +12 -0
  218. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/index.d.ts +20 -0
  219. data/assets/mermaid/diagrams/xychart/chartBuilder/components/plot/linePlot.d.ts +11 -0
  220. data/assets/mermaid/diagrams/xychart/chartBuilder/index.d.ts +5 -0
  221. data/assets/mermaid/diagrams/xychart/chartBuilder/interfaces.d.ts +132 -0
  222. data/assets/mermaid/diagrams/xychart/chartBuilder/orchestrator.d.ts +12 -0
  223. data/assets/mermaid/diagrams/xychart/chartBuilder/textDimensionCalculator.d.ts +10 -0
  224. data/assets/mermaid/diagrams/xychart/parser/xychart.jison.spec.d.ts +1 -0
  225. data/assets/mermaid/diagrams/xychart/xychartDb.d.ts +40 -0
  226. data/assets/mermaid/diagrams/xychart/xychartDetector.d.ts +3 -0
  227. data/assets/mermaid/diagrams/xychart/xychartDiagram.d.ts +2 -0
  228. data/assets/mermaid/diagrams/xychart/xychartRenderer.d.ts +6 -0
  229. data/assets/mermaid/docs/vite.config.d.ts +2 -0
  230. data/assets/mermaid/edges-066a5561.js +1840 -0
  231. data/assets/mermaid/edges-16357fde.js +1083 -0
  232. data/assets/mermaid/edges-ce5cfb7c.js +1840 -0
  233. data/assets/mermaid/erDiagram-09d1c15f.js +1176 -0
  234. data/assets/mermaid/erDiagram-543717f2.js +1321 -0
  235. data/assets/mermaid/erDiagram-c7ff1bec.js +931 -0
  236. data/assets/mermaid/errors.d.ts +3 -0
  237. data/assets/mermaid/flowDb-9a89ea33.js +1126 -0
  238. data/assets/mermaid/flowDb-ba9bd7fa.js +1713 -0
  239. data/assets/mermaid/flowDb-c1833063.js +1714 -0
  240. data/assets/mermaid/flowDiagram-aadb13b0.js +797 -0
  241. data/assets/mermaid/flowDiagram-b222e15a.js +614 -0
  242. data/assets/mermaid/flowDiagram-b5e7ba30.js +1278 -0
  243. data/assets/mermaid/flowDiagram-v2-13329dc7.js +40 -0
  244. data/assets/mermaid/flowDiagram-v2-54711e03.js +32 -0
  245. data/assets/mermaid/flowDiagram-v2-f2119625.js +25 -0
  246. data/assets/mermaid/flowchart-elk-definition-2d49707c.js +93397 -0
  247. data/assets/mermaid/flowchart-elk-definition-ae0efee6.js +814 -0
  248. data/assets/mermaid/flowchart-elk-definition-cf813a97.js +48407 -0
  249. data/assets/mermaid/ganttDiagram-12cf43db.js +3445 -0
  250. data/assets/mermaid/ganttDiagram-3c2fde2b.js +2501 -0
  251. data/assets/mermaid/ganttDiagram-b62c793e.js +2061 -0
  252. data/assets/mermaid/gitGraphDiagram-942e62fe.js +1800 -0
  253. data/assets/mermaid/gitGraphDiagram-b9392a12.js +1790 -0
  254. data/assets/mermaid/gitGraphDiagram-c3a0619c.js +1264 -0
  255. data/assets/mermaid/graph-0ee63739.js +881 -0
  256. data/assets/mermaid/graph-fe24fab6.js +1285 -0
  257. data/assets/mermaid/index-01f381cb.js +622 -0
  258. data/assets/mermaid/index-bb6d8841.js +373 -0
  259. data/assets/mermaid/index-fc479858.js +663 -0
  260. data/assets/mermaid/infoDiagram-2f5c50c0.js +319 -0
  261. data/assets/mermaid/infoDiagram-94cd232f.js +520 -0
  262. data/assets/mermaid/infoDiagram-d0d5c9bd.js +510 -0
  263. data/assets/mermaid/init-cc95ec8e.js +16 -0
  264. data/assets/mermaid/init-f9637058.js +16 -0
  265. data/assets/mermaid/interactionDb.d.ts +2 -0
  266. data/assets/mermaid/journeyDiagram-14fe341a.js +804 -0
  267. data/assets/mermaid/journeyDiagram-6625b456.js +1191 -0
  268. data/assets/mermaid/journeyDiagram-b56e6921.js +1183 -0
  269. data/assets/mermaid/katex-d90b6d29.js +11624 -0
  270. data/assets/mermaid/katex-ffb0e8f1.js +14432 -0
  271. data/assets/mermaid/layout-163b9689.js +2314 -0
  272. data/assets/mermaid/layout-fd473db2.js +1536 -0
  273. data/assets/mermaid/line-24d93f1b.js +34 -0
  274. data/assets/mermaid/line-87f517ef.js +50 -0
  275. data/assets/mermaid/linear-0ad15847.js +595 -0
  276. data/assets/mermaid/linear-9bcf74c4.js +447 -0
  277. data/assets/mermaid/logger.d.ts +9 -0
  278. data/assets/mermaid/mermaid-6dc72991.js +6461 -0
  279. data/assets/mermaid/mermaid-9f2aa176.js +8112 -0
  280. data/assets/mermaid/mermaid-dcacb631.js +12793 -0
  281. data/assets/mermaid/mermaid.core.mjs +14 -0
  282. data/assets/mermaid/mermaid.d.ts +146 -0
  283. data/assets/mermaid/mermaid.esm.min.mjs +4 -0
  284. data/assets/mermaid/mermaid.esm.mjs +4 -0
  285. data/assets/mermaid/mermaid.js +195755 -0
  286. data/assets/mermaid/mermaid.min.js +2029 -0
  287. data/assets/mermaid/mermaid.spec.d.ts +1 -0
  288. data/assets/mermaid/mermaidAPI.d.ts +170 -0
  289. data/assets/mermaid/mermaidAPI.spec.d.ts +1 -0
  290. data/assets/mermaid/mindmap-definition-307c710a.js +1177 -0
  291. data/assets/mermaid/mindmap-definition-696ddea4.js +32342 -0
  292. data/assets/mermaid/mindmap-definition-9399c7e6.js +18760 -0
  293. data/assets/mermaid/ordinal-475e0c0c.js +82 -0
  294. data/assets/mermaid/ordinal-5695958c.js +65 -0
  295. data/assets/mermaid/path-39bad7e2.js +118 -0
  296. data/assets/mermaid/path-428ebac9.js +91 -0
  297. data/assets/mermaid/pieDiagram-828dae43.js +502 -0
  298. data/assets/mermaid/pieDiagram-bb1d19e5.js +722 -0
  299. data/assets/mermaid/pieDiagram-e854eaf0.js +772 -0
  300. data/assets/mermaid/preprocess.d.ts +10 -0
  301. data/assets/mermaid/quadrantDiagram-25a9848b.js +1199 -0
  302. data/assets/mermaid/quadrantDiagram-5fa00455.js +904 -0
  303. data/assets/mermaid/quadrantDiagram-c759a472.js +1207 -0
  304. data/assets/mermaid/rendering-util/createText.d.ts +11 -0
  305. data/assets/mermaid/rendering-util/handle-markdown-text.d.ts +6 -0
  306. data/assets/mermaid/rendering-util/handle-markdown-text.spec.d.ts +1 -0
  307. data/assets/mermaid/rendering-util/selectSvgElement.d.ts +8 -0
  308. data/assets/mermaid/rendering-util/splitText.d.ts +24 -0
  309. data/assets/mermaid/rendering-util/splitText.spec.d.ts +1 -0
  310. data/assets/mermaid/rendering-util/uid.d.ts +8 -0
  311. data/assets/mermaid/requirementDiagram-03163dc4.js +769 -0
  312. data/assets/mermaid/requirementDiagram-87253d64.js +1098 -0
  313. data/assets/mermaid/requirementDiagram-a721e157.js +1091 -0
  314. data/assets/mermaid/sankeyDiagram-33525efb.js +1198 -0
  315. data/assets/mermaid/sankeyDiagram-52ec8976.js +818 -0
  316. data/assets/mermaid/sankeyDiagram-707fac0f.js +660 -0
  317. data/assets/mermaid/sequenceDiagram-6894f283.js +3346 -0
  318. data/assets/mermaid/sequenceDiagram-9813c129.js +3336 -0
  319. data/assets/mermaid/sequenceDiagram-b517d154.js +2234 -0
  320. data/assets/mermaid/setupGraphViewbox.d.ts +3 -0
  321. data/assets/mermaid/stateDiagram-5dee940d.js +474 -0
  322. data/assets/mermaid/stateDiagram-5ec31577.js +467 -0
  323. data/assets/mermaid/stateDiagram-fca82b5b.js +275 -0
  324. data/assets/mermaid/stateDiagram-v2-1992cada.js +333 -0
  325. data/assets/mermaid/stateDiagram-v2-992e82a1.js +325 -0
  326. data/assets/mermaid/stateDiagram-v2-ed04200a.js +190 -0
  327. data/assets/mermaid/styles-0784dbeb.js +1363 -0
  328. data/assets/mermaid/styles-11e81fdd.js +1089 -0
  329. data/assets/mermaid/styles-36a1a2e8.js +1483 -0
  330. data/assets/mermaid/styles-483fbfea.js +509 -0
  331. data/assets/mermaid/styles-727cdd61.js +571 -0
  332. data/assets/mermaid/styles-b83b31c9.js +1484 -0
  333. data/assets/mermaid/styles-cacbff60.js +960 -0
  334. data/assets/mermaid/styles-e75131e4.js +433 -0
  335. data/assets/mermaid/styles-f80da881.js +1363 -0
  336. data/assets/mermaid/styles.d.ts +12 -0
  337. data/assets/mermaid/styles.spec.d.ts +1 -0
  338. data/assets/mermaid/svgDrawCommon-5e1cfd1d.js +101 -0
  339. data/assets/mermaid/svgDrawCommon-d6ab583c.js +100 -0
  340. data/assets/mermaid/svgDrawCommon-ecc5f780.js +64 -0
  341. data/assets/mermaid/tests/MockedD3.d.ts +45 -0
  342. data/assets/mermaid/tests/setup.d.ts +1 -0
  343. data/assets/mermaid/tests/util.d.ts +3 -0
  344. data/assets/mermaid/themes/erDiagram-oldHardcodedValues.d.ts +7 -0
  345. data/assets/mermaid/themes/index.d.ts +24 -0
  346. data/assets/mermaid/themes/theme-base.d.ts +189 -0
  347. data/assets/mermaid/themes/theme-dark.d.ts +177 -0
  348. data/assets/mermaid/themes/theme-default.d.ts +188 -0
  349. data/assets/mermaid/themes/theme-forest.d.ts +185 -0
  350. data/assets/mermaid/themes/theme-helpers.d.ts +1 -0
  351. data/assets/mermaid/themes/theme-neutral.d.ts +182 -0
  352. data/assets/mermaid/timeline-definition-23ce0e2e.js +1211 -0
  353. data/assets/mermaid/timeline-definition-4ee9bff4.js +795 -0
  354. data/assets/mermaid/timeline-definition-bf702344.js +1219 -0
  355. data/assets/mermaid/types.d.ts +31 -0
  356. data/assets/mermaid/utils/imperativeState.d.ts +32 -0
  357. data/assets/mermaid/utils/imperativeState.spec.d.ts +1 -0
  358. data/assets/mermaid/utils/lineWithOffset.d.ts +5 -0
  359. data/assets/mermaid/utils/sanitizeDirective.d.ts +7 -0
  360. data/assets/mermaid/utils/subGraphTitleMargins.d.ts +8 -0
  361. data/assets/mermaid/utils/subGraphTitleMargins.spec.d.ts +1 -0
  362. data/assets/mermaid/utils.d.ts +286 -0
  363. data/assets/mermaid/utils.spec.d.ts +1 -0
  364. data/assets/mermaid/xychartDiagram-de2e5521.js +1800 -0
  365. data/assets/mermaid/xychartDiagram-e5e6b652.js +1284 -0
  366. data/assets/mermaid/xychartDiagram-f11f50a6.js +1745 -0
  367. data/assets/tables.css +23 -0
  368. data/assets/toURI.js +142 -0
  369. metadata +368 -7
@@ -0,0 +1,1183 @@
1
+ import { c as getConfig, C as setDiagramTitle, D as getDiagramTitle, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, E as clear$1, j as d3select, k as configureSvgSize } from "./mermaid-dcacb631.js";
2
+ import { d as drawRect$1, f as drawText$1, a as drawBackgroundRect$1, g as getNoteRect } from "./svgDrawCommon-d6ab583c.js";
3
+ import { d as d3arc } from "./arc-c0f908ab.js";
4
+ import "./path-39bad7e2.js";
5
+ var parser = function() {
6
+ var o = function(k, v, o2, l) {
7
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
8
+ ;
9
+ return o2;
10
+ }, $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: function trace() {
13
+ },
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: 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
+ },
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: 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
+ },
72
+ parse: 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 lex() {
97
+ var token;
98
+ token = tstack.pop() || lexer2.lex() || EOF;
99
+ if (typeof token !== "number") {
100
+ if (token instanceof Array) {
101
+ tstack = token;
102
+ token = tstack.pop();
103
+ }
104
+ token = self.symbols_[token] || token;
105
+ }
106
+ return token;
107
+ }
108
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
109
+ while (true) {
110
+ state = stack[stack.length - 1];
111
+ if (this.defaultActions[state]) {
112
+ action = this.defaultActions[state];
113
+ } else {
114
+ if (symbol === null || typeof symbol == "undefined") {
115
+ symbol = lex();
116
+ }
117
+ action = table[state] && table[state][symbol];
118
+ }
119
+ if (typeof action === "undefined" || !action.length || !action[0]) {
120
+ var errStr = "";
121
+ expected = [];
122
+ for (p in table[state]) {
123
+ if (this.terminals_[p] && p > TERROR) {
124
+ expected.push("'" + this.terminals_[p] + "'");
125
+ }
126
+ }
127
+ if (lexer2.showPosition) {
128
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
129
+ } else {
130
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
131
+ }
132
+ this.parseError(errStr, {
133
+ text: lexer2.match,
134
+ token: this.terminals_[symbol] || symbol,
135
+ line: lexer2.yylineno,
136
+ loc: yyloc,
137
+ expected
138
+ });
139
+ }
140
+ if (action[0] instanceof Array && action.length > 1) {
141
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
142
+ }
143
+ switch (action[0]) {
144
+ case 1:
145
+ stack.push(symbol);
146
+ vstack.push(lexer2.yytext);
147
+ lstack.push(lexer2.yylloc);
148
+ stack.push(action[1]);
149
+ symbol = null;
150
+ {
151
+ yyleng = lexer2.yyleng;
152
+ yytext = lexer2.yytext;
153
+ yylineno = lexer2.yylineno;
154
+ yyloc = lexer2.yylloc;
155
+ }
156
+ break;
157
+ case 2:
158
+ len = this.productions_[action[1]][1];
159
+ yyval.$ = vstack[vstack.length - len];
160
+ yyval._$ = {
161
+ first_line: lstack[lstack.length - (len || 1)].first_line,
162
+ last_line: lstack[lstack.length - 1].last_line,
163
+ first_column: lstack[lstack.length - (len || 1)].first_column,
164
+ last_column: lstack[lstack.length - 1].last_column
165
+ };
166
+ if (ranges) {
167
+ yyval._$.range = [
168
+ lstack[lstack.length - (len || 1)].range[0],
169
+ lstack[lstack.length - 1].range[1]
170
+ ];
171
+ }
172
+ r = this.performAction.apply(yyval, [
173
+ yytext,
174
+ yyleng,
175
+ yylineno,
176
+ sharedState.yy,
177
+ action[1],
178
+ vstack,
179
+ lstack
180
+ ].concat(args));
181
+ if (typeof r !== "undefined") {
182
+ return r;
183
+ }
184
+ if (len) {
185
+ stack = stack.slice(0, -1 * len * 2);
186
+ vstack = vstack.slice(0, -1 * len);
187
+ lstack = lstack.slice(0, -1 * len);
188
+ }
189
+ stack.push(this.productions_[action[1]][0]);
190
+ vstack.push(yyval.$);
191
+ lstack.push(yyval._$);
192
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
193
+ stack.push(newState);
194
+ break;
195
+ case 3:
196
+ return true;
197
+ }
198
+ }
199
+ return true;
200
+ }
201
+ };
202
+ var lexer = function() {
203
+ var lexer2 = {
204
+ EOF: 1,
205
+ parseError: function parseError(str, hash) {
206
+ if (this.yy.parser) {
207
+ this.yy.parser.parseError(str, hash);
208
+ } else {
209
+ throw new Error(str);
210
+ }
211
+ },
212
+ // resets the lexer, sets new input
213
+ setInput: function(input, yy) {
214
+ this.yy = yy || this.yy || {};
215
+ this._input = input;
216
+ this._more = this._backtrack = this.done = false;
217
+ this.yylineno = this.yyleng = 0;
218
+ this.yytext = this.matched = this.match = "";
219
+ this.conditionStack = ["INITIAL"];
220
+ this.yylloc = {
221
+ first_line: 1,
222
+ first_column: 0,
223
+ last_line: 1,
224
+ last_column: 0
225
+ };
226
+ if (this.options.ranges) {
227
+ this.yylloc.range = [0, 0];
228
+ }
229
+ this.offset = 0;
230
+ return this;
231
+ },
232
+ // consumes and returns one char from the input
233
+ input: function() {
234
+ var ch = this._input[0];
235
+ this.yytext += ch;
236
+ this.yyleng++;
237
+ this.offset++;
238
+ this.match += ch;
239
+ this.matched += ch;
240
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
241
+ if (lines) {
242
+ this.yylineno++;
243
+ this.yylloc.last_line++;
244
+ } else {
245
+ this.yylloc.last_column++;
246
+ }
247
+ if (this.options.ranges) {
248
+ this.yylloc.range[1]++;
249
+ }
250
+ this._input = this._input.slice(1);
251
+ return ch;
252
+ },
253
+ // unshifts one char (or a string) into the input
254
+ unput: function(ch) {
255
+ var len = ch.length;
256
+ var lines = ch.split(/(?:\r\n?|\n)/g);
257
+ this._input = ch + this._input;
258
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
259
+ this.offset -= len;
260
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
261
+ this.match = this.match.substr(0, this.match.length - 1);
262
+ this.matched = this.matched.substr(0, this.matched.length - 1);
263
+ if (lines.length - 1) {
264
+ this.yylineno -= lines.length - 1;
265
+ }
266
+ var r = this.yylloc.range;
267
+ this.yylloc = {
268
+ first_line: this.yylloc.first_line,
269
+ last_line: this.yylineno + 1,
270
+ first_column: this.yylloc.first_column,
271
+ 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
272
+ };
273
+ if (this.options.ranges) {
274
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
275
+ }
276
+ this.yyleng = this.yytext.length;
277
+ return this;
278
+ },
279
+ // When called from action, caches matched text and appends it on next action
280
+ more: function() {
281
+ this._more = true;
282
+ return this;
283
+ },
284
+ // 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.
285
+ reject: function() {
286
+ if (this.options.backtrack_lexer) {
287
+ this._backtrack = true;
288
+ } else {
289
+ 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(), {
290
+ text: "",
291
+ token: null,
292
+ line: this.yylineno
293
+ });
294
+ }
295
+ return this;
296
+ },
297
+ // retain first n characters of the match
298
+ less: function(n) {
299
+ this.unput(this.match.slice(n));
300
+ },
301
+ // displays already matched input, i.e. for error messages
302
+ pastInput: function() {
303
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
304
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
305
+ },
306
+ // displays upcoming input, i.e. for error messages
307
+ upcomingInput: function() {
308
+ var next = this.match;
309
+ if (next.length < 20) {
310
+ next += this._input.substr(0, 20 - next.length);
311
+ }
312
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
313
+ },
314
+ // displays the character position where the lexing error occurred, i.e. for error messages
315
+ showPosition: function() {
316
+ var pre = this.pastInput();
317
+ var c = new Array(pre.length + 1).join("-");
318
+ return pre + this.upcomingInput() + "\n" + c + "^";
319
+ },
320
+ // test the lexed token: return FALSE when not a match, otherwise return token
321
+ test_match: function(match, indexed_rule) {
322
+ var token, lines, backup;
323
+ if (this.options.backtrack_lexer) {
324
+ backup = {
325
+ yylineno: this.yylineno,
326
+ yylloc: {
327
+ first_line: this.yylloc.first_line,
328
+ last_line: this.last_line,
329
+ first_column: this.yylloc.first_column,
330
+ last_column: this.yylloc.last_column
331
+ },
332
+ yytext: this.yytext,
333
+ match: this.match,
334
+ matches: this.matches,
335
+ matched: this.matched,
336
+ yyleng: this.yyleng,
337
+ offset: this.offset,
338
+ _more: this._more,
339
+ _input: this._input,
340
+ yy: this.yy,
341
+ conditionStack: this.conditionStack.slice(0),
342
+ done: this.done
343
+ };
344
+ if (this.options.ranges) {
345
+ backup.yylloc.range = this.yylloc.range.slice(0);
346
+ }
347
+ }
348
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
349
+ if (lines) {
350
+ this.yylineno += lines.length;
351
+ }
352
+ this.yylloc = {
353
+ first_line: this.yylloc.last_line,
354
+ last_line: this.yylineno + 1,
355
+ first_column: this.yylloc.last_column,
356
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
357
+ };
358
+ this.yytext += match[0];
359
+ this.match += match[0];
360
+ this.matches = match;
361
+ this.yyleng = this.yytext.length;
362
+ if (this.options.ranges) {
363
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
364
+ }
365
+ this._more = false;
366
+ this._backtrack = false;
367
+ this._input = this._input.slice(match[0].length);
368
+ this.matched += match[0];
369
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
370
+ if (this.done && this._input) {
371
+ this.done = false;
372
+ }
373
+ if (token) {
374
+ return token;
375
+ } else if (this._backtrack) {
376
+ for (var k in backup) {
377
+ this[k] = backup[k];
378
+ }
379
+ return false;
380
+ }
381
+ return false;
382
+ },
383
+ // return next match in input
384
+ next: function() {
385
+ if (this.done) {
386
+ return this.EOF;
387
+ }
388
+ if (!this._input) {
389
+ this.done = true;
390
+ }
391
+ var token, match, tempMatch, index;
392
+ if (!this._more) {
393
+ this.yytext = "";
394
+ this.match = "";
395
+ }
396
+ var rules = this._currentRules();
397
+ for (var i = 0; i < rules.length; i++) {
398
+ tempMatch = this._input.match(this.rules[rules[i]]);
399
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
400
+ match = tempMatch;
401
+ index = i;
402
+ if (this.options.backtrack_lexer) {
403
+ token = this.test_match(tempMatch, rules[i]);
404
+ if (token !== false) {
405
+ return token;
406
+ } else if (this._backtrack) {
407
+ match = false;
408
+ continue;
409
+ } else {
410
+ return false;
411
+ }
412
+ } else if (!this.options.flex) {
413
+ break;
414
+ }
415
+ }
416
+ }
417
+ if (match) {
418
+ token = this.test_match(match, rules[index]);
419
+ if (token !== false) {
420
+ return token;
421
+ }
422
+ return false;
423
+ }
424
+ if (this._input === "") {
425
+ return this.EOF;
426
+ } else {
427
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
428
+ text: "",
429
+ token: null,
430
+ line: this.yylineno
431
+ });
432
+ }
433
+ },
434
+ // return next match that has a token
435
+ lex: function lex() {
436
+ var r = this.next();
437
+ if (r) {
438
+ return r;
439
+ } else {
440
+ return this.lex();
441
+ }
442
+ },
443
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
444
+ begin: function begin(condition) {
445
+ this.conditionStack.push(condition);
446
+ },
447
+ // pop the previously active lexer condition state off the condition stack
448
+ popState: function popState() {
449
+ var n = this.conditionStack.length - 1;
450
+ if (n > 0) {
451
+ return this.conditionStack.pop();
452
+ } else {
453
+ return this.conditionStack[0];
454
+ }
455
+ },
456
+ // produce the lexer rule set which is active for the currently active lexer condition state
457
+ _currentRules: function _currentRules() {
458
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
459
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
460
+ } else {
461
+ return this.conditions["INITIAL"].rules;
462
+ }
463
+ },
464
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
465
+ topState: function topState(n) {
466
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
467
+ if (n >= 0) {
468
+ return this.conditionStack[n];
469
+ } else {
470
+ return "INITIAL";
471
+ }
472
+ },
473
+ // alias for begin(condition)
474
+ pushState: function pushState(condition) {
475
+ this.begin(condition);
476
+ },
477
+ // return the number of states currently on the stack
478
+ stateStackSize: function stateStackSize() {
479
+ return this.conditionStack.length;
480
+ },
481
+ options: { "case-insensitive": true },
482
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
483
+ switch ($avoiding_name_collisions) {
484
+ case 0:
485
+ break;
486
+ case 1:
487
+ break;
488
+ case 2:
489
+ return 10;
490
+ case 3:
491
+ break;
492
+ case 4:
493
+ break;
494
+ case 5:
495
+ return 4;
496
+ case 6:
497
+ return 11;
498
+ case 7:
499
+ this.begin("acc_title");
500
+ return 12;
501
+ case 8:
502
+ this.popState();
503
+ return "acc_title_value";
504
+ case 9:
505
+ this.begin("acc_descr");
506
+ return 14;
507
+ case 10:
508
+ this.popState();
509
+ return "acc_descr_value";
510
+ case 11:
511
+ this.begin("acc_descr_multiline");
512
+ break;
513
+ case 12:
514
+ this.popState();
515
+ break;
516
+ case 13:
517
+ return "acc_descr_multiline_value";
518
+ case 14:
519
+ return 17;
520
+ case 15:
521
+ return 18;
522
+ case 16:
523
+ return 19;
524
+ case 17:
525
+ return ":";
526
+ case 18:
527
+ return 6;
528
+ case 19:
529
+ return "INVALID";
530
+ }
531
+ },
532
+ 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],
533
+ 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 } }
534
+ };
535
+ return lexer2;
536
+ }();
537
+ parser2.lexer = lexer;
538
+ function Parser() {
539
+ this.yy = {};
540
+ }
541
+ Parser.prototype = parser2;
542
+ parser2.Parser = Parser;
543
+ return new Parser();
544
+ }();
545
+ parser.parser = parser;
546
+ const parser$1 = parser;
547
+ let currentSection = "";
548
+ const sections = [];
549
+ const tasks = [];
550
+ const rawTasks = [];
551
+ const clear = function() {
552
+ sections.length = 0;
553
+ tasks.length = 0;
554
+ currentSection = "";
555
+ rawTasks.length = 0;
556
+ clear$1();
557
+ };
558
+ const addSection = function(txt) {
559
+ currentSection = txt;
560
+ sections.push(txt);
561
+ };
562
+ const getSections = function() {
563
+ return sections;
564
+ };
565
+ const getTasks = function() {
566
+ let allItemsProcessed = compileTasks();
567
+ const maxDepth = 100;
568
+ let iterationCount = 0;
569
+ while (!allItemsProcessed && iterationCount < maxDepth) {
570
+ allItemsProcessed = compileTasks();
571
+ iterationCount++;
572
+ }
573
+ tasks.push(...rawTasks);
574
+ return tasks;
575
+ };
576
+ const updateActors = function() {
577
+ const tempActors = [];
578
+ tasks.forEach((task) => {
579
+ if (task.people) {
580
+ tempActors.push(...task.people);
581
+ }
582
+ });
583
+ const unique = new Set(tempActors);
584
+ return [...unique].sort();
585
+ };
586
+ const addTask = function(descr, taskData) {
587
+ const pieces = taskData.substr(1).split(":");
588
+ let score = 0;
589
+ let peeps = [];
590
+ if (pieces.length === 1) {
591
+ score = Number(pieces[0]);
592
+ peeps = [];
593
+ } else {
594
+ score = Number(pieces[0]);
595
+ peeps = pieces[1].split(",");
596
+ }
597
+ const peopleList = peeps.map((s) => s.trim());
598
+ const rawTask = {
599
+ section: currentSection,
600
+ type: currentSection,
601
+ people: peopleList,
602
+ task: descr,
603
+ score
604
+ };
605
+ rawTasks.push(rawTask);
606
+ };
607
+ const addTaskOrg = function(descr) {
608
+ const newTask = {
609
+ section: currentSection,
610
+ type: currentSection,
611
+ description: descr,
612
+ task: descr,
613
+ classes: []
614
+ };
615
+ tasks.push(newTask);
616
+ };
617
+ const compileTasks = function() {
618
+ const compileTask = function(pos) {
619
+ return rawTasks[pos].processed;
620
+ };
621
+ let allProcessed = true;
622
+ for (const [i, rawTask] of rawTasks.entries()) {
623
+ compileTask(i);
624
+ allProcessed = allProcessed && rawTask.processed;
625
+ }
626
+ return allProcessed;
627
+ };
628
+ const getActors = function() {
629
+ return updateActors();
630
+ };
631
+ const db = {
632
+ getConfig: () => getConfig().journey,
633
+ clear,
634
+ setDiagramTitle,
635
+ getDiagramTitle,
636
+ setAccTitle,
637
+ getAccTitle,
638
+ setAccDescription,
639
+ getAccDescription,
640
+ addSection,
641
+ getSections,
642
+ getTasks,
643
+ addTask,
644
+ addTaskOrg,
645
+ getActors
646
+ };
647
+ const getStyles = (options) => `.label {
648
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
649
+ font-family: var(--mermaid-font-family);
650
+ color: ${options.textColor};
651
+ }
652
+ .mouth {
653
+ stroke: #666;
654
+ }
655
+
656
+ line {
657
+ stroke: ${options.textColor}
658
+ }
659
+
660
+ .legend {
661
+ fill: ${options.textColor};
662
+ }
663
+
664
+ .label text {
665
+ fill: #333;
666
+ }
667
+ .label {
668
+ color: ${options.textColor}
669
+ }
670
+
671
+ .face {
672
+ ${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"};
673
+ stroke: #999;
674
+ }
675
+
676
+ .node rect,
677
+ .node circle,
678
+ .node ellipse,
679
+ .node polygon,
680
+ .node path {
681
+ fill: ${options.mainBkg};
682
+ stroke: ${options.nodeBorder};
683
+ stroke-width: 1px;
684
+ }
685
+
686
+ .node .label {
687
+ text-align: center;
688
+ }
689
+ .node.clickable {
690
+ cursor: pointer;
691
+ }
692
+
693
+ .arrowheadPath {
694
+ fill: ${options.arrowheadColor};
695
+ }
696
+
697
+ .edgePath .path {
698
+ stroke: ${options.lineColor};
699
+ stroke-width: 1.5px;
700
+ }
701
+
702
+ .flowchart-link {
703
+ stroke: ${options.lineColor};
704
+ fill: none;
705
+ }
706
+
707
+ .edgeLabel {
708
+ background-color: ${options.edgeLabelBackground};
709
+ rect {
710
+ opacity: 0.5;
711
+ }
712
+ text-align: center;
713
+ }
714
+
715
+ .cluster rect {
716
+ }
717
+
718
+ .cluster text {
719
+ fill: ${options.titleColor};
720
+ }
721
+
722
+ div.mermaidTooltip {
723
+ position: absolute;
724
+ text-align: center;
725
+ max-width: 200px;
726
+ padding: 2px;
727
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
728
+ font-family: var(--mermaid-font-family);
729
+ font-size: 12px;
730
+ background: ${options.tertiaryColor};
731
+ border: 1px solid ${options.border2};
732
+ border-radius: 2px;
733
+ pointer-events: none;
734
+ z-index: 100;
735
+ }
736
+
737
+ .task-type-0, .section-type-0 {
738
+ ${options.fillType0 ? `fill: ${options.fillType0}` : ""};
739
+ }
740
+ .task-type-1, .section-type-1 {
741
+ ${options.fillType0 ? `fill: ${options.fillType1}` : ""};
742
+ }
743
+ .task-type-2, .section-type-2 {
744
+ ${options.fillType0 ? `fill: ${options.fillType2}` : ""};
745
+ }
746
+ .task-type-3, .section-type-3 {
747
+ ${options.fillType0 ? `fill: ${options.fillType3}` : ""};
748
+ }
749
+ .task-type-4, .section-type-4 {
750
+ ${options.fillType0 ? `fill: ${options.fillType4}` : ""};
751
+ }
752
+ .task-type-5, .section-type-5 {
753
+ ${options.fillType0 ? `fill: ${options.fillType5}` : ""};
754
+ }
755
+ .task-type-6, .section-type-6 {
756
+ ${options.fillType0 ? `fill: ${options.fillType6}` : ""};
757
+ }
758
+ .task-type-7, .section-type-7 {
759
+ ${options.fillType0 ? `fill: ${options.fillType7}` : ""};
760
+ }
761
+
762
+ .actor-0 {
763
+ ${options.actor0 ? `fill: ${options.actor0}` : ""};
764
+ }
765
+ .actor-1 {
766
+ ${options.actor1 ? `fill: ${options.actor1}` : ""};
767
+ }
768
+ .actor-2 {
769
+ ${options.actor2 ? `fill: ${options.actor2}` : ""};
770
+ }
771
+ .actor-3 {
772
+ ${options.actor3 ? `fill: ${options.actor3}` : ""};
773
+ }
774
+ .actor-4 {
775
+ ${options.actor4 ? `fill: ${options.actor4}` : ""};
776
+ }
777
+ .actor-5 {
778
+ ${options.actor5 ? `fill: ${options.actor5}` : ""};
779
+ }
780
+ `;
781
+ const styles = getStyles;
782
+ const drawRect = function(elem, rectData) {
783
+ return drawRect$1(elem, rectData);
784
+ };
785
+ const drawFace = function(element, faceData) {
786
+ const radius = 15;
787
+ 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");
788
+ const face = element.append("g");
789
+ 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");
790
+ 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");
791
+ function smile(face2) {
792
+ const arc = d3arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
793
+ face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
794
+ }
795
+ function sad(face2) {
796
+ const arc = d3arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
797
+ face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
798
+ }
799
+ function ambivalent(face2) {
800
+ 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");
801
+ }
802
+ if (faceData.score > 3) {
803
+ smile(face);
804
+ } else if (faceData.score < 3) {
805
+ sad(face);
806
+ } else {
807
+ ambivalent(face);
808
+ }
809
+ return circleElement;
810
+ };
811
+ const drawCircle = function(element, circleData) {
812
+ const circleElement = element.append("circle");
813
+ circleElement.attr("cx", circleData.cx);
814
+ circleElement.attr("cy", circleData.cy);
815
+ circleElement.attr("class", "actor-" + circleData.pos);
816
+ circleElement.attr("fill", circleData.fill);
817
+ circleElement.attr("stroke", circleData.stroke);
818
+ circleElement.attr("r", circleData.r);
819
+ if (circleElement.class !== void 0) {
820
+ circleElement.attr("class", circleElement.class);
821
+ }
822
+ if (circleData.title !== void 0) {
823
+ circleElement.append("title").text(circleData.title);
824
+ }
825
+ return circleElement;
826
+ };
827
+ const drawText = function(elem, textData) {
828
+ return drawText$1(elem, textData);
829
+ };
830
+ const drawLabel = function(elem, txtObject) {
831
+ function genPoints(x, y, width, height, cut) {
832
+ return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
833
+ }
834
+ const polygon = elem.append("polygon");
835
+ polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
836
+ polygon.attr("class", "labelBox");
837
+ txtObject.y = txtObject.y + txtObject.labelMargin;
838
+ txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
839
+ drawText(elem, txtObject);
840
+ };
841
+ const drawSection = function(elem, section, conf2) {
842
+ const g = elem.append("g");
843
+ const rect = getNoteRect();
844
+ rect.x = section.x;
845
+ rect.y = section.y;
846
+ rect.fill = section.fill;
847
+ rect.width = conf2.width * section.taskCount + // width of the tasks
848
+ conf2.diagramMarginX * (section.taskCount - 1);
849
+ rect.height = conf2.height;
850
+ rect.class = "journey-section section-type-" + section.num;
851
+ rect.rx = 3;
852
+ rect.ry = 3;
853
+ drawRect(g, rect);
854
+ _drawTextCandidateFunc(conf2)(
855
+ section.text,
856
+ g,
857
+ rect.x,
858
+ rect.y,
859
+ rect.width,
860
+ rect.height,
861
+ { class: "journey-section section-type-" + section.num },
862
+ conf2,
863
+ section.colour
864
+ );
865
+ };
866
+ let taskCount = -1;
867
+ const drawTask = function(elem, task, conf2) {
868
+ const center = task.x + conf2.width / 2;
869
+ const g = elem.append("g");
870
+ taskCount++;
871
+ const maxHeight = 300 + 5 * 30;
872
+ g.append("line").attr("id", "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");
873
+ drawFace(g, {
874
+ cx: center,
875
+ cy: 300 + (5 - task.score) * 30,
876
+ score: task.score
877
+ });
878
+ const rect = getNoteRect();
879
+ rect.x = task.x;
880
+ rect.y = task.y;
881
+ rect.fill = task.fill;
882
+ rect.width = conf2.width;
883
+ rect.height = conf2.height;
884
+ rect.class = "task task-type-" + task.num;
885
+ rect.rx = 3;
886
+ rect.ry = 3;
887
+ drawRect(g, rect);
888
+ let xPos = task.x + 14;
889
+ task.people.forEach((person) => {
890
+ const colour = task.actors[person].color;
891
+ const circle = {
892
+ cx: xPos,
893
+ cy: task.y,
894
+ r: 7,
895
+ fill: colour,
896
+ stroke: "#000",
897
+ title: person,
898
+ pos: task.actors[person].position
899
+ };
900
+ drawCircle(g, circle);
901
+ xPos += 10;
902
+ });
903
+ _drawTextCandidateFunc(conf2)(
904
+ task.task,
905
+ g,
906
+ rect.x,
907
+ rect.y,
908
+ rect.width,
909
+ rect.height,
910
+ { class: "task" },
911
+ conf2,
912
+ task.colour
913
+ );
914
+ };
915
+ const drawBackgroundRect = function(elem, bounds2) {
916
+ drawBackgroundRect$1(elem, bounds2);
917
+ };
918
+ const _drawTextCandidateFunc = function() {
919
+ function byText(content, g, x, y, width, height, textAttrs, colour) {
920
+ 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);
921
+ _setTextAttrs(text, textAttrs);
922
+ }
923
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) {
924
+ const { taskFontSize, taskFontFamily } = conf2;
925
+ const lines = content.split(/<br\s*\/?>/gi);
926
+ for (let i = 0; i < lines.length; i++) {
927
+ const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
928
+ 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);
929
+ text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
930
+ text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
931
+ _setTextAttrs(text, textAttrs);
932
+ }
933
+ }
934
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
935
+ const body = g.append("switch");
936
+ const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
937
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
938
+ text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
939
+ byTspan(content, body, x, y, width, height, textAttrs, conf2);
940
+ _setTextAttrs(text, textAttrs);
941
+ }
942
+ function _setTextAttrs(toText, fromTextAttrsDict) {
943
+ for (const key in fromTextAttrsDict) {
944
+ if (key in fromTextAttrsDict) {
945
+ toText.attr(key, fromTextAttrsDict[key]);
946
+ }
947
+ }
948
+ }
949
+ return function(conf2) {
950
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
951
+ };
952
+ }();
953
+ const initGraphics = function(graphics) {
954
+ graphics.append("defs").append("marker").attr("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");
955
+ };
956
+ const svgDraw = {
957
+ drawRect,
958
+ drawCircle,
959
+ drawSection,
960
+ drawText,
961
+ drawLabel,
962
+ drawTask,
963
+ drawBackgroundRect,
964
+ initGraphics
965
+ };
966
+ const setConf = function(cnf) {
967
+ const keys = Object.keys(cnf);
968
+ keys.forEach(function(key) {
969
+ conf[key] = cnf[key];
970
+ });
971
+ };
972
+ const actors = {};
973
+ function drawActorLegend(diagram2) {
974
+ const conf2 = getConfig().journey;
975
+ let yPos = 60;
976
+ Object.keys(actors).forEach((person) => {
977
+ const colour = actors[person].color;
978
+ const circleData = {
979
+ cx: 20,
980
+ cy: yPos,
981
+ r: 7,
982
+ fill: colour,
983
+ stroke: "#000",
984
+ pos: actors[person].position
985
+ };
986
+ svgDraw.drawCircle(diagram2, circleData);
987
+ const labelData = {
988
+ x: 40,
989
+ y: yPos + 7,
990
+ fill: "#666",
991
+ text: person,
992
+ textMargin: conf2.boxTextMargin | 5
993
+ };
994
+ svgDraw.drawText(diagram2, labelData);
995
+ yPos += 20;
996
+ });
997
+ }
998
+ const conf = getConfig().journey;
999
+ const LEFT_MARGIN = conf.leftMargin;
1000
+ const draw = function(text, id, version, diagObj) {
1001
+ const conf2 = getConfig().journey;
1002
+ const securityLevel = getConfig().securityLevel;
1003
+ let sandboxElement;
1004
+ if (securityLevel === "sandbox") {
1005
+ sandboxElement = d3select("#i" + id);
1006
+ }
1007
+ const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body");
1008
+ bounds.init();
1009
+ const diagram2 = root.select("#" + id);
1010
+ svgDraw.initGraphics(diagram2);
1011
+ const tasks2 = diagObj.db.getTasks();
1012
+ const title = diagObj.db.getDiagramTitle();
1013
+ const actorNames = diagObj.db.getActors();
1014
+ for (const member in actors) {
1015
+ delete actors[member];
1016
+ }
1017
+ let actorPos = 0;
1018
+ actorNames.forEach((actorName) => {
1019
+ actors[actorName] = {
1020
+ color: conf2.actorColours[actorPos % conf2.actorColours.length],
1021
+ position: actorPos
1022
+ };
1023
+ actorPos++;
1024
+ });
1025
+ drawActorLegend(diagram2);
1026
+ bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);
1027
+ drawTasks(diagram2, tasks2, 0);
1028
+ const box = bounds.getBounds();
1029
+ if (title) {
1030
+ diagram2.append("text").text(title).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
1031
+ }
1032
+ const height = box.stopy - box.starty + 2 * conf2.diagramMarginY;
1033
+ const width = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX;
1034
+ configureSvgSize(diagram2, height, width, conf2.useMaxWidth);
1035
+ diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
1036
+ const extraVertForTitle = title ? 70 : 0;
1037
+ diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`);
1038
+ diagram2.attr("preserveAspectRatio", "xMinYMin meet");
1039
+ diagram2.attr("height", height + extraVertForTitle + 25);
1040
+ };
1041
+ const bounds = {
1042
+ data: {
1043
+ startx: void 0,
1044
+ stopx: void 0,
1045
+ starty: void 0,
1046
+ stopy: void 0
1047
+ },
1048
+ verticalPos: 0,
1049
+ sequenceItems: [],
1050
+ init: function() {
1051
+ this.sequenceItems = [];
1052
+ this.data = {
1053
+ startx: void 0,
1054
+ stopx: void 0,
1055
+ starty: void 0,
1056
+ stopy: void 0
1057
+ };
1058
+ this.verticalPos = 0;
1059
+ },
1060
+ updateVal: function(obj, key, val, fun) {
1061
+ if (obj[key] === void 0) {
1062
+ obj[key] = val;
1063
+ } else {
1064
+ obj[key] = fun(val, obj[key]);
1065
+ }
1066
+ },
1067
+ updateBounds: function(startx, starty, stopx, stopy) {
1068
+ const conf2 = getConfig().journey;
1069
+ const _self = this;
1070
+ let cnt = 0;
1071
+ function updateFn(type) {
1072
+ return function updateItemBounds(item) {
1073
+ cnt++;
1074
+ const n = _self.sequenceItems.length - cnt + 1;
1075
+ _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min);
1076
+ _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max);
1077
+ _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min);
1078
+ _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max);
1079
+ if (!(type === "activation")) {
1080
+ _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min);
1081
+ _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max);
1082
+ _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min);
1083
+ _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max);
1084
+ }
1085
+ };
1086
+ }
1087
+ this.sequenceItems.forEach(updateFn());
1088
+ },
1089
+ insert: function(startx, starty, stopx, stopy) {
1090
+ const _startx = Math.min(startx, stopx);
1091
+ const _stopx = Math.max(startx, stopx);
1092
+ const _starty = Math.min(starty, stopy);
1093
+ const _stopy = Math.max(starty, stopy);
1094
+ this.updateVal(bounds.data, "startx", _startx, Math.min);
1095
+ this.updateVal(bounds.data, "starty", _starty, Math.min);
1096
+ this.updateVal(bounds.data, "stopx", _stopx, Math.max);
1097
+ this.updateVal(bounds.data, "stopy", _stopy, Math.max);
1098
+ this.updateBounds(_startx, _starty, _stopx, _stopy);
1099
+ },
1100
+ bumpVerticalPos: function(bump) {
1101
+ this.verticalPos = this.verticalPos + bump;
1102
+ this.data.stopy = this.verticalPos;
1103
+ },
1104
+ getVerticalPos: function() {
1105
+ return this.verticalPos;
1106
+ },
1107
+ getBounds: function() {
1108
+ return this.data;
1109
+ }
1110
+ };
1111
+ const fills = conf.sectionFills;
1112
+ const textColours = conf.sectionColours;
1113
+ const drawTasks = function(diagram2, tasks2, verticalPos) {
1114
+ const conf2 = getConfig().journey;
1115
+ let lastSection = "";
1116
+ const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY;
1117
+ const taskPos = verticalPos + sectionVHeight;
1118
+ let sectionNumber = 0;
1119
+ let fill = "#CCC";
1120
+ let colour = "black";
1121
+ let num = 0;
1122
+ for (const [i, task] of tasks2.entries()) {
1123
+ if (lastSection !== task.section) {
1124
+ fill = fills[sectionNumber % fills.length];
1125
+ num = sectionNumber % fills.length;
1126
+ colour = textColours[sectionNumber % textColours.length];
1127
+ let taskInSectionCount = 0;
1128
+ const currentSection2 = task.section;
1129
+ for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) {
1130
+ if (tasks2[taskIndex].section == currentSection2) {
1131
+ taskInSectionCount = taskInSectionCount + 1;
1132
+ } else {
1133
+ break;
1134
+ }
1135
+ }
1136
+ const section = {
1137
+ x: i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN,
1138
+ y: 50,
1139
+ text: task.section,
1140
+ fill,
1141
+ num,
1142
+ colour,
1143
+ taskCount: taskInSectionCount
1144
+ };
1145
+ svgDraw.drawSection(diagram2, section, conf2);
1146
+ lastSection = task.section;
1147
+ sectionNumber++;
1148
+ }
1149
+ const taskActors = task.people.reduce((acc, actorName) => {
1150
+ if (actors[actorName]) {
1151
+ acc[actorName] = actors[actorName];
1152
+ }
1153
+ return acc;
1154
+ }, {});
1155
+ task.x = i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN;
1156
+ task.y = taskPos;
1157
+ task.width = conf2.diagramMarginX;
1158
+ task.height = conf2.diagramMarginY;
1159
+ task.colour = colour;
1160
+ task.fill = fill;
1161
+ task.num = num;
1162
+ task.actors = taskActors;
1163
+ svgDraw.drawTask(diagram2, task, conf2);
1164
+ bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30);
1165
+ }
1166
+ };
1167
+ const renderer = {
1168
+ setConf,
1169
+ draw
1170
+ };
1171
+ const diagram = {
1172
+ parser: parser$1,
1173
+ db,
1174
+ renderer,
1175
+ styles,
1176
+ init: (cnf) => {
1177
+ renderer.setConf(cnf.journey);
1178
+ db.clear();
1179
+ }
1180
+ };
1181
+ export {
1182
+ diagram
1183
+ };