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,1219 @@
1
+ import { L as commonDb, v as clear$1, c as getConfig, l as log, o as setupGraphViewbox } from "./mermaid-6dc72991.js";
2
+ import { select, arc } from "d3";
3
+ import { isDark, lighten, darken } from "khroma";
4
+ import "ts-dedent";
5
+ import "dayjs";
6
+ import "@braintree/sanitize-url";
7
+ import "dompurify";
8
+ import "lodash-es/memoize.js";
9
+ import "lodash-es/merge.js";
10
+ import "stylis";
11
+ import "lodash-es/isEmpty.js";
12
+ var parser = function() {
13
+ var o = function(k, v, o2, l) {
14
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
15
+ ;
16
+ return o2;
17
+ }, $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 16], $V7 = [1, 17];
18
+ var parser2 = {
19
+ trace: function trace() {
20
+ },
21
+ yy: {},
22
+ symbols_: { "error": 2, "start": 3, "timeline": 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, "period_statement": 18, "event_statement": 19, "period": 20, "event": 21, "$accept": 0, "$end": 1 },
23
+ terminals_: { 2: "error", 4: "timeline", 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", 20: "period", 21: "event" },
24
+ 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, 1], [9, 1], [18, 1], [19, 1]],
25
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
26
+ var $0 = $$.length - 1;
27
+ switch (yystate) {
28
+ case 1:
29
+ return $$[$0 - 1];
30
+ case 2:
31
+ this.$ = [];
32
+ break;
33
+ case 3:
34
+ $$[$0 - 1].push($$[$0]);
35
+ this.$ = $$[$0 - 1];
36
+ break;
37
+ case 4:
38
+ case 5:
39
+ this.$ = $$[$0];
40
+ break;
41
+ case 6:
42
+ case 7:
43
+ this.$ = [];
44
+ break;
45
+ case 8:
46
+ yy.getCommonDb().setDiagramTitle($$[$0].substr(6));
47
+ this.$ = $$[$0].substr(6);
48
+ break;
49
+ case 9:
50
+ this.$ = $$[$0].trim();
51
+ yy.getCommonDb().setAccTitle(this.$);
52
+ break;
53
+ case 10:
54
+ case 11:
55
+ this.$ = $$[$0].trim();
56
+ yy.getCommonDb().setAccDescription(this.$);
57
+ break;
58
+ case 12:
59
+ yy.addSection($$[$0].substr(8));
60
+ this.$ = $$[$0].substr(8);
61
+ break;
62
+ case 15:
63
+ yy.addTask($$[$0], 0, "");
64
+ this.$ = $$[$0];
65
+ break;
66
+ case 16:
67
+ yy.addEvent($$[$0].substr(2));
68
+ this.$ = $$[$0];
69
+ break;
70
+ }
71
+ },
72
+ 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: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 18, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: 14, 19: 15, 20: $V6, 21: $V7 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10])],
73
+ defaultActions: {},
74
+ parseError: function parseError(str, hash) {
75
+ if (hash.recoverable) {
76
+ this.trace(str);
77
+ } else {
78
+ var error = new Error(str);
79
+ error.hash = hash;
80
+ throw error;
81
+ }
82
+ },
83
+ parse: function parse(input) {
84
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
85
+ var args = lstack.slice.call(arguments, 1);
86
+ var lexer2 = Object.create(this.lexer);
87
+ var sharedState = { yy: {} };
88
+ for (var k in this.yy) {
89
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
90
+ sharedState.yy[k] = this.yy[k];
91
+ }
92
+ }
93
+ lexer2.setInput(input, sharedState.yy);
94
+ sharedState.yy.lexer = lexer2;
95
+ sharedState.yy.parser = this;
96
+ if (typeof lexer2.yylloc == "undefined") {
97
+ lexer2.yylloc = {};
98
+ }
99
+ var yyloc = lexer2.yylloc;
100
+ lstack.push(yyloc);
101
+ var ranges = lexer2.options && lexer2.options.ranges;
102
+ if (typeof sharedState.yy.parseError === "function") {
103
+ this.parseError = sharedState.yy.parseError;
104
+ } else {
105
+ this.parseError = Object.getPrototypeOf(this).parseError;
106
+ }
107
+ function lex() {
108
+ var token;
109
+ token = tstack.pop() || lexer2.lex() || EOF;
110
+ if (typeof token !== "number") {
111
+ if (token instanceof Array) {
112
+ tstack = token;
113
+ token = tstack.pop();
114
+ }
115
+ token = self.symbols_[token] || token;
116
+ }
117
+ return token;
118
+ }
119
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
120
+ while (true) {
121
+ state = stack[stack.length - 1];
122
+ if (this.defaultActions[state]) {
123
+ action = this.defaultActions[state];
124
+ } else {
125
+ if (symbol === null || typeof symbol == "undefined") {
126
+ symbol = lex();
127
+ }
128
+ action = table[state] && table[state][symbol];
129
+ }
130
+ if (typeof action === "undefined" || !action.length || !action[0]) {
131
+ var errStr = "";
132
+ expected = [];
133
+ for (p in table[state]) {
134
+ if (this.terminals_[p] && p > TERROR) {
135
+ expected.push("'" + this.terminals_[p] + "'");
136
+ }
137
+ }
138
+ if (lexer2.showPosition) {
139
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
140
+ } else {
141
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
142
+ }
143
+ this.parseError(errStr, {
144
+ text: lexer2.match,
145
+ token: this.terminals_[symbol] || symbol,
146
+ line: lexer2.yylineno,
147
+ loc: yyloc,
148
+ expected
149
+ });
150
+ }
151
+ if (action[0] instanceof Array && action.length > 1) {
152
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
153
+ }
154
+ switch (action[0]) {
155
+ case 1:
156
+ stack.push(symbol);
157
+ vstack.push(lexer2.yytext);
158
+ lstack.push(lexer2.yylloc);
159
+ stack.push(action[1]);
160
+ symbol = null;
161
+ {
162
+ yyleng = lexer2.yyleng;
163
+ yytext = lexer2.yytext;
164
+ yylineno = lexer2.yylineno;
165
+ yyloc = lexer2.yylloc;
166
+ }
167
+ break;
168
+ case 2:
169
+ len = this.productions_[action[1]][1];
170
+ yyval.$ = vstack[vstack.length - len];
171
+ yyval._$ = {
172
+ first_line: lstack[lstack.length - (len || 1)].first_line,
173
+ last_line: lstack[lstack.length - 1].last_line,
174
+ first_column: lstack[lstack.length - (len || 1)].first_column,
175
+ last_column: lstack[lstack.length - 1].last_column
176
+ };
177
+ if (ranges) {
178
+ yyval._$.range = [
179
+ lstack[lstack.length - (len || 1)].range[0],
180
+ lstack[lstack.length - 1].range[1]
181
+ ];
182
+ }
183
+ r = this.performAction.apply(yyval, [
184
+ yytext,
185
+ yyleng,
186
+ yylineno,
187
+ sharedState.yy,
188
+ action[1],
189
+ vstack,
190
+ lstack
191
+ ].concat(args));
192
+ if (typeof r !== "undefined") {
193
+ return r;
194
+ }
195
+ if (len) {
196
+ stack = stack.slice(0, -1 * len * 2);
197
+ vstack = vstack.slice(0, -1 * len);
198
+ lstack = lstack.slice(0, -1 * len);
199
+ }
200
+ stack.push(this.productions_[action[1]][0]);
201
+ vstack.push(yyval.$);
202
+ lstack.push(yyval._$);
203
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
204
+ stack.push(newState);
205
+ break;
206
+ case 3:
207
+ return true;
208
+ }
209
+ }
210
+ return true;
211
+ }
212
+ };
213
+ var lexer = function() {
214
+ var lexer2 = {
215
+ EOF: 1,
216
+ parseError: function parseError(str, hash) {
217
+ if (this.yy.parser) {
218
+ this.yy.parser.parseError(str, hash);
219
+ } else {
220
+ throw new Error(str);
221
+ }
222
+ },
223
+ // resets the lexer, sets new input
224
+ setInput: function(input, yy) {
225
+ this.yy = yy || this.yy || {};
226
+ this._input = input;
227
+ this._more = this._backtrack = this.done = false;
228
+ this.yylineno = this.yyleng = 0;
229
+ this.yytext = this.matched = this.match = "";
230
+ this.conditionStack = ["INITIAL"];
231
+ this.yylloc = {
232
+ first_line: 1,
233
+ first_column: 0,
234
+ last_line: 1,
235
+ last_column: 0
236
+ };
237
+ if (this.options.ranges) {
238
+ this.yylloc.range = [0, 0];
239
+ }
240
+ this.offset = 0;
241
+ return this;
242
+ },
243
+ // consumes and returns one char from the input
244
+ input: function() {
245
+ var ch = this._input[0];
246
+ this.yytext += ch;
247
+ this.yyleng++;
248
+ this.offset++;
249
+ this.match += ch;
250
+ this.matched += ch;
251
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
252
+ if (lines) {
253
+ this.yylineno++;
254
+ this.yylloc.last_line++;
255
+ } else {
256
+ this.yylloc.last_column++;
257
+ }
258
+ if (this.options.ranges) {
259
+ this.yylloc.range[1]++;
260
+ }
261
+ this._input = this._input.slice(1);
262
+ return ch;
263
+ },
264
+ // unshifts one char (or a string) into the input
265
+ unput: function(ch) {
266
+ var len = ch.length;
267
+ var lines = ch.split(/(?:\r\n?|\n)/g);
268
+ this._input = ch + this._input;
269
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
270
+ this.offset -= len;
271
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
272
+ this.match = this.match.substr(0, this.match.length - 1);
273
+ this.matched = this.matched.substr(0, this.matched.length - 1);
274
+ if (lines.length - 1) {
275
+ this.yylineno -= lines.length - 1;
276
+ }
277
+ var r = this.yylloc.range;
278
+ this.yylloc = {
279
+ first_line: this.yylloc.first_line,
280
+ last_line: this.yylineno + 1,
281
+ first_column: this.yylloc.first_column,
282
+ 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
283
+ };
284
+ if (this.options.ranges) {
285
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
286
+ }
287
+ this.yyleng = this.yytext.length;
288
+ return this;
289
+ },
290
+ // When called from action, caches matched text and appends it on next action
291
+ more: function() {
292
+ this._more = true;
293
+ return this;
294
+ },
295
+ // 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.
296
+ reject: function() {
297
+ if (this.options.backtrack_lexer) {
298
+ this._backtrack = true;
299
+ } else {
300
+ 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(), {
301
+ text: "",
302
+ token: null,
303
+ line: this.yylineno
304
+ });
305
+ }
306
+ return this;
307
+ },
308
+ // retain first n characters of the match
309
+ less: function(n) {
310
+ this.unput(this.match.slice(n));
311
+ },
312
+ // displays already matched input, i.e. for error messages
313
+ pastInput: function() {
314
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
315
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
316
+ },
317
+ // displays upcoming input, i.e. for error messages
318
+ upcomingInput: function() {
319
+ var next = this.match;
320
+ if (next.length < 20) {
321
+ next += this._input.substr(0, 20 - next.length);
322
+ }
323
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
324
+ },
325
+ // displays the character position where the lexing error occurred, i.e. for error messages
326
+ showPosition: function() {
327
+ var pre = this.pastInput();
328
+ var c = new Array(pre.length + 1).join("-");
329
+ return pre + this.upcomingInput() + "\n" + c + "^";
330
+ },
331
+ // test the lexed token: return FALSE when not a match, otherwise return token
332
+ test_match: function(match, indexed_rule) {
333
+ var token, lines, backup;
334
+ if (this.options.backtrack_lexer) {
335
+ backup = {
336
+ yylineno: this.yylineno,
337
+ yylloc: {
338
+ first_line: this.yylloc.first_line,
339
+ last_line: this.last_line,
340
+ first_column: this.yylloc.first_column,
341
+ last_column: this.yylloc.last_column
342
+ },
343
+ yytext: this.yytext,
344
+ match: this.match,
345
+ matches: this.matches,
346
+ matched: this.matched,
347
+ yyleng: this.yyleng,
348
+ offset: this.offset,
349
+ _more: this._more,
350
+ _input: this._input,
351
+ yy: this.yy,
352
+ conditionStack: this.conditionStack.slice(0),
353
+ done: this.done
354
+ };
355
+ if (this.options.ranges) {
356
+ backup.yylloc.range = this.yylloc.range.slice(0);
357
+ }
358
+ }
359
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
360
+ if (lines) {
361
+ this.yylineno += lines.length;
362
+ }
363
+ this.yylloc = {
364
+ first_line: this.yylloc.last_line,
365
+ last_line: this.yylineno + 1,
366
+ first_column: this.yylloc.last_column,
367
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
368
+ };
369
+ this.yytext += match[0];
370
+ this.match += match[0];
371
+ this.matches = match;
372
+ this.yyleng = this.yytext.length;
373
+ if (this.options.ranges) {
374
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
375
+ }
376
+ this._more = false;
377
+ this._backtrack = false;
378
+ this._input = this._input.slice(match[0].length);
379
+ this.matched += match[0];
380
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
381
+ if (this.done && this._input) {
382
+ this.done = false;
383
+ }
384
+ if (token) {
385
+ return token;
386
+ } else if (this._backtrack) {
387
+ for (var k in backup) {
388
+ this[k] = backup[k];
389
+ }
390
+ return false;
391
+ }
392
+ return false;
393
+ },
394
+ // return next match in input
395
+ next: function() {
396
+ if (this.done) {
397
+ return this.EOF;
398
+ }
399
+ if (!this._input) {
400
+ this.done = true;
401
+ }
402
+ var token, match, tempMatch, index;
403
+ if (!this._more) {
404
+ this.yytext = "";
405
+ this.match = "";
406
+ }
407
+ var rules = this._currentRules();
408
+ for (var i = 0; i < rules.length; i++) {
409
+ tempMatch = this._input.match(this.rules[rules[i]]);
410
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
411
+ match = tempMatch;
412
+ index = i;
413
+ if (this.options.backtrack_lexer) {
414
+ token = this.test_match(tempMatch, rules[i]);
415
+ if (token !== false) {
416
+ return token;
417
+ } else if (this._backtrack) {
418
+ match = false;
419
+ continue;
420
+ } else {
421
+ return false;
422
+ }
423
+ } else if (!this.options.flex) {
424
+ break;
425
+ }
426
+ }
427
+ }
428
+ if (match) {
429
+ token = this.test_match(match, rules[index]);
430
+ if (token !== false) {
431
+ return token;
432
+ }
433
+ return false;
434
+ }
435
+ if (this._input === "") {
436
+ return this.EOF;
437
+ } else {
438
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
439
+ text: "",
440
+ token: null,
441
+ line: this.yylineno
442
+ });
443
+ }
444
+ },
445
+ // return next match that has a token
446
+ lex: function lex() {
447
+ var r = this.next();
448
+ if (r) {
449
+ return r;
450
+ } else {
451
+ return this.lex();
452
+ }
453
+ },
454
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
455
+ begin: function begin(condition) {
456
+ this.conditionStack.push(condition);
457
+ },
458
+ // pop the previously active lexer condition state off the condition stack
459
+ popState: function popState() {
460
+ var n = this.conditionStack.length - 1;
461
+ if (n > 0) {
462
+ return this.conditionStack.pop();
463
+ } else {
464
+ return this.conditionStack[0];
465
+ }
466
+ },
467
+ // produce the lexer rule set which is active for the currently active lexer condition state
468
+ _currentRules: function _currentRules() {
469
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
470
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
471
+ } else {
472
+ return this.conditions["INITIAL"].rules;
473
+ }
474
+ },
475
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
476
+ topState: function topState(n) {
477
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
478
+ if (n >= 0) {
479
+ return this.conditionStack[n];
480
+ } else {
481
+ return "INITIAL";
482
+ }
483
+ },
484
+ // alias for begin(condition)
485
+ pushState: function pushState(condition) {
486
+ this.begin(condition);
487
+ },
488
+ // return the number of states currently on the stack
489
+ stateStackSize: function stateStackSize() {
490
+ return this.conditionStack.length;
491
+ },
492
+ options: { "case-insensitive": true },
493
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
494
+ switch ($avoiding_name_collisions) {
495
+ case 0:
496
+ break;
497
+ case 1:
498
+ break;
499
+ case 2:
500
+ return 10;
501
+ case 3:
502
+ break;
503
+ case 4:
504
+ break;
505
+ case 5:
506
+ return 4;
507
+ case 6:
508
+ return 11;
509
+ case 7:
510
+ this.begin("acc_title");
511
+ return 12;
512
+ case 8:
513
+ this.popState();
514
+ return "acc_title_value";
515
+ case 9:
516
+ this.begin("acc_descr");
517
+ return 14;
518
+ case 10:
519
+ this.popState();
520
+ return "acc_descr_value";
521
+ case 11:
522
+ this.begin("acc_descr_multiline");
523
+ break;
524
+ case 12:
525
+ this.popState();
526
+ break;
527
+ case 13:
528
+ return "acc_descr_multiline_value";
529
+ case 14:
530
+ return 17;
531
+ case 15:
532
+ return 21;
533
+ case 16:
534
+ return 20;
535
+ case 17:
536
+ return 6;
537
+ case 18:
538
+ return "INVALID";
539
+ }
540
+ },
541
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\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, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i],
542
+ 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], "inclusive": true } }
543
+ };
544
+ return lexer2;
545
+ }();
546
+ parser2.lexer = lexer;
547
+ function Parser() {
548
+ this.yy = {};
549
+ }
550
+ Parser.prototype = parser2;
551
+ parser2.Parser = Parser;
552
+ return new Parser();
553
+ }();
554
+ parser.parser = parser;
555
+ const parser$1 = parser;
556
+ let currentSection = "";
557
+ let currentTaskId = 0;
558
+ const sections = [];
559
+ const tasks = [];
560
+ const rawTasks = [];
561
+ const getCommonDb = () => commonDb;
562
+ const clear = function() {
563
+ sections.length = 0;
564
+ tasks.length = 0;
565
+ currentSection = "";
566
+ rawTasks.length = 0;
567
+ clear$1();
568
+ };
569
+ const addSection = function(txt) {
570
+ currentSection = txt;
571
+ sections.push(txt);
572
+ };
573
+ const getSections = function() {
574
+ return sections;
575
+ };
576
+ const getTasks = function() {
577
+ let allItemsProcessed = compileTasks();
578
+ const maxDepth = 100;
579
+ let iterationCount = 0;
580
+ while (!allItemsProcessed && iterationCount < maxDepth) {
581
+ allItemsProcessed = compileTasks();
582
+ iterationCount++;
583
+ }
584
+ tasks.push(...rawTasks);
585
+ return tasks;
586
+ };
587
+ const addTask = function(period, length, event) {
588
+ const rawTask = {
589
+ id: currentTaskId++,
590
+ section: currentSection,
591
+ type: currentSection,
592
+ task: period,
593
+ score: length ? length : 0,
594
+ //if event is defined, then add it the events array
595
+ events: event ? [event] : []
596
+ };
597
+ rawTasks.push(rawTask);
598
+ };
599
+ const addEvent = function(event) {
600
+ const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1);
601
+ currentTask.events.push(event);
602
+ };
603
+ const addTaskOrg = function(descr) {
604
+ const newTask = {
605
+ section: currentSection,
606
+ type: currentSection,
607
+ description: descr,
608
+ task: descr,
609
+ classes: []
610
+ };
611
+ tasks.push(newTask);
612
+ };
613
+ const compileTasks = function() {
614
+ const compileTask = function(pos) {
615
+ return rawTasks[pos].processed;
616
+ };
617
+ let allProcessed = true;
618
+ for (const [i, rawTask] of rawTasks.entries()) {
619
+ compileTask(i);
620
+ allProcessed = allProcessed && rawTask.processed;
621
+ }
622
+ return allProcessed;
623
+ };
624
+ const timelineDb = {
625
+ clear,
626
+ getCommonDb,
627
+ addSection,
628
+ getSections,
629
+ getTasks,
630
+ addTask,
631
+ addTaskOrg,
632
+ addEvent
633
+ };
634
+ const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
635
+ __proto__: null,
636
+ addEvent,
637
+ addSection,
638
+ addTask,
639
+ addTaskOrg,
640
+ clear,
641
+ default: timelineDb,
642
+ getCommonDb,
643
+ getSections,
644
+ getTasks
645
+ }, Symbol.toStringTag, { value: "Module" }));
646
+ const MAX_SECTIONS = 12;
647
+ const drawRect = function(elem, rectData) {
648
+ const rectElem = elem.append("rect");
649
+ rectElem.attr("x", rectData.x);
650
+ rectElem.attr("y", rectData.y);
651
+ rectElem.attr("fill", rectData.fill);
652
+ rectElem.attr("stroke", rectData.stroke);
653
+ rectElem.attr("width", rectData.width);
654
+ rectElem.attr("height", rectData.height);
655
+ rectElem.attr("rx", rectData.rx);
656
+ rectElem.attr("ry", rectData.ry);
657
+ if (rectData.class !== void 0) {
658
+ rectElem.attr("class", rectData.class);
659
+ }
660
+ return rectElem;
661
+ };
662
+ const drawFace = function(element, faceData) {
663
+ const radius = 15;
664
+ 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");
665
+ const face = element.append("g");
666
+ 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");
667
+ 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");
668
+ function smile(face2) {
669
+ const arc$1 = arc().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
670
+ face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
671
+ }
672
+ function sad(face2) {
673
+ const arc$1 = arc().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
674
+ face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
675
+ }
676
+ function ambivalent(face2) {
677
+ 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");
678
+ }
679
+ if (faceData.score > 3) {
680
+ smile(face);
681
+ } else if (faceData.score < 3) {
682
+ sad(face);
683
+ } else {
684
+ ambivalent(face);
685
+ }
686
+ return circleElement;
687
+ };
688
+ const drawCircle = function(element, circleData) {
689
+ const circleElement = element.append("circle");
690
+ circleElement.attr("cx", circleData.cx);
691
+ circleElement.attr("cy", circleData.cy);
692
+ circleElement.attr("class", "actor-" + circleData.pos);
693
+ circleElement.attr("fill", circleData.fill);
694
+ circleElement.attr("stroke", circleData.stroke);
695
+ circleElement.attr("r", circleData.r);
696
+ if (circleElement.class !== void 0) {
697
+ circleElement.attr("class", circleElement.class);
698
+ }
699
+ if (circleData.title !== void 0) {
700
+ circleElement.append("title").text(circleData.title);
701
+ }
702
+ return circleElement;
703
+ };
704
+ const drawText = function(elem, textData) {
705
+ const nText = textData.text.replace(/<br\s*\/?>/gi, " ");
706
+ const textElem = elem.append("text");
707
+ textElem.attr("x", textData.x);
708
+ textElem.attr("y", textData.y);
709
+ textElem.attr("class", "legend");
710
+ textElem.style("text-anchor", textData.anchor);
711
+ if (textData.class !== void 0) {
712
+ textElem.attr("class", textData.class);
713
+ }
714
+ const span = textElem.append("tspan");
715
+ span.attr("x", textData.x + textData.textMargin * 2);
716
+ span.text(nText);
717
+ return textElem;
718
+ };
719
+ const drawLabel = function(elem, txtObject) {
720
+ function genPoints(x, y, width, height, cut) {
721
+ return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
722
+ }
723
+ const polygon = elem.append("polygon");
724
+ polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
725
+ polygon.attr("class", "labelBox");
726
+ txtObject.y = txtObject.y + txtObject.labelMargin;
727
+ txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
728
+ drawText(elem, txtObject);
729
+ };
730
+ const drawSection = function(elem, section, conf) {
731
+ const g = elem.append("g");
732
+ const rect = getNoteRect();
733
+ rect.x = section.x;
734
+ rect.y = section.y;
735
+ rect.fill = section.fill;
736
+ rect.width = conf.width;
737
+ rect.height = conf.height;
738
+ rect.class = "journey-section section-type-" + section.num;
739
+ rect.rx = 3;
740
+ rect.ry = 3;
741
+ drawRect(g, rect);
742
+ _drawTextCandidateFunc(conf)(
743
+ section.text,
744
+ g,
745
+ rect.x,
746
+ rect.y,
747
+ rect.width,
748
+ rect.height,
749
+ { class: "journey-section section-type-" + section.num },
750
+ conf,
751
+ section.colour
752
+ );
753
+ };
754
+ let taskCount = -1;
755
+ const drawTask = function(elem, task, conf) {
756
+ const center = task.x + conf.width / 2;
757
+ const g = elem.append("g");
758
+ taskCount++;
759
+ const maxHeight = 300 + 5 * 30;
760
+ 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");
761
+ drawFace(g, {
762
+ cx: center,
763
+ cy: 300 + (5 - task.score) * 30,
764
+ score: task.score
765
+ });
766
+ const rect = getNoteRect();
767
+ rect.x = task.x;
768
+ rect.y = task.y;
769
+ rect.fill = task.fill;
770
+ rect.width = conf.width;
771
+ rect.height = conf.height;
772
+ rect.class = "task task-type-" + task.num;
773
+ rect.rx = 3;
774
+ rect.ry = 3;
775
+ drawRect(g, rect);
776
+ task.x + 14;
777
+ _drawTextCandidateFunc(conf)(
778
+ task.task,
779
+ g,
780
+ rect.x,
781
+ rect.y,
782
+ rect.width,
783
+ rect.height,
784
+ { class: "task" },
785
+ conf,
786
+ task.colour
787
+ );
788
+ };
789
+ const drawBackgroundRect = function(elem, bounds) {
790
+ const rectElem = drawRect(elem, {
791
+ x: bounds.startx,
792
+ y: bounds.starty,
793
+ width: bounds.stopx - bounds.startx,
794
+ height: bounds.stopy - bounds.starty,
795
+ fill: bounds.fill,
796
+ class: "rect"
797
+ });
798
+ rectElem.lower();
799
+ };
800
+ const getTextObj = function() {
801
+ return {
802
+ x: 0,
803
+ y: 0,
804
+ fill: void 0,
805
+ "text-anchor": "start",
806
+ width: 100,
807
+ height: 100,
808
+ textMargin: 0,
809
+ rx: 0,
810
+ ry: 0
811
+ };
812
+ };
813
+ const getNoteRect = function() {
814
+ return {
815
+ x: 0,
816
+ y: 0,
817
+ width: 100,
818
+ anchor: "start",
819
+ height: 100,
820
+ rx: 0,
821
+ ry: 0
822
+ };
823
+ };
824
+ const _drawTextCandidateFunc = function() {
825
+ function byText(content, g, x, y, width, height, textAttrs, colour) {
826
+ 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);
827
+ _setTextAttrs(text, textAttrs);
828
+ }
829
+ function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {
830
+ const { taskFontSize, taskFontFamily } = conf;
831
+ const lines = content.split(/<br\s*\/?>/gi);
832
+ for (let i = 0; i < lines.length; i++) {
833
+ const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
834
+ 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);
835
+ text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
836
+ text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
837
+ _setTextAttrs(text, textAttrs);
838
+ }
839
+ }
840
+ function byFo(content, g, x, y, width, height, textAttrs, conf) {
841
+ const body = g.append("switch");
842
+ const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
843
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
844
+ text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
845
+ byTspan(content, body, x, y, width, height, textAttrs, conf);
846
+ _setTextAttrs(text, textAttrs);
847
+ }
848
+ function _setTextAttrs(toText, fromTextAttrsDict) {
849
+ for (const key in fromTextAttrsDict) {
850
+ if (key in fromTextAttrsDict) {
851
+ toText.attr(key, fromTextAttrsDict[key]);
852
+ }
853
+ }
854
+ }
855
+ return function(conf) {
856
+ return conf.textPlacement === "fo" ? byFo : conf.textPlacement === "old" ? byText : byTspan;
857
+ };
858
+ }();
859
+ const initGraphics = function(graphics) {
860
+ 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");
861
+ };
862
+ function wrap(text, width) {
863
+ text.each(function() {
864
+ var text2 = select(this), words = text2.text().split(/(\s+|<br>)/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em");
865
+ for (let j = 0; j < words.length; j++) {
866
+ word = words[words.length - 1 - j];
867
+ line.push(word);
868
+ tspan.text(line.join(" ").trim());
869
+ if (tspan.node().getComputedTextLength() > width || word === "<br>") {
870
+ line.pop();
871
+ tspan.text(line.join(" ").trim());
872
+ if (word === "<br>") {
873
+ line = [""];
874
+ } else {
875
+ line = [word];
876
+ }
877
+ tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word);
878
+ }
879
+ }
880
+ });
881
+ }
882
+ const drawNode = function(elem, node, fullSection, conf) {
883
+ const section = fullSection % MAX_SECTIONS - 1;
884
+ const nodeElem = elem.append("g");
885
+ node.section = section;
886
+ nodeElem.attr(
887
+ "class",
888
+ (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section)
889
+ );
890
+ const bkgElem = nodeElem.append("g");
891
+ const textElem = nodeElem.append("g");
892
+ const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width);
893
+ const bbox = txt.node().getBBox();
894
+ const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize;
895
+ node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding;
896
+ node.height = Math.max(node.height, node.maxHeight);
897
+ node.width = node.width + 2 * node.padding;
898
+ textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")");
899
+ defaultBkg(bkgElem, node, section);
900
+ return node;
901
+ };
902
+ const getVirtualNodeHeight = function(elem, node, conf) {
903
+ const textElem = elem.append("g");
904
+ const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width);
905
+ const bbox = txt.node().getBBox();
906
+ const fontSize = conf.fontSize && conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize;
907
+ textElem.remove();
908
+ return bbox.height + fontSize * 1.1 * 0.5 + node.padding;
909
+ };
910
+ const defaultBkg = function(elem, node, section) {
911
+ const rd = 5;
912
+ elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr(
913
+ "d",
914
+ `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z`
915
+ );
916
+ elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height);
917
+ };
918
+ const svgDraw = {
919
+ drawRect,
920
+ drawCircle,
921
+ drawSection,
922
+ drawText,
923
+ drawLabel,
924
+ drawTask,
925
+ drawBackgroundRect,
926
+ getTextObj,
927
+ getNoteRect,
928
+ initGraphics,
929
+ drawNode,
930
+ getVirtualNodeHeight
931
+ };
932
+ const draw = function(text, id, version, diagObj) {
933
+ var _a, _b;
934
+ const conf = getConfig();
935
+ const LEFT_MARGIN = conf.leftMargin ?? 50;
936
+ log.debug("timeline", diagObj.db);
937
+ const securityLevel = conf.securityLevel;
938
+ let sandboxElement;
939
+ if (securityLevel === "sandbox") {
940
+ sandboxElement = select("#i" + id);
941
+ }
942
+ const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
943
+ const svg = root.select("#" + id);
944
+ svg.append("g");
945
+ const tasks2 = diagObj.db.getTasks();
946
+ const title = diagObj.db.getCommonDb().getDiagramTitle();
947
+ log.debug("task", tasks2);
948
+ svgDraw.initGraphics(svg);
949
+ const sections2 = diagObj.db.getSections();
950
+ log.debug("sections", sections2);
951
+ let maxSectionHeight = 0;
952
+ let maxTaskHeight = 0;
953
+ let depthY = 0;
954
+ let sectionBeginY = 0;
955
+ let masterX = 50 + LEFT_MARGIN;
956
+ let masterY = 50;
957
+ sectionBeginY = 50;
958
+ let sectionNumber = 0;
959
+ let hasSections = true;
960
+ sections2.forEach(function(section) {
961
+ const sectionNode = {
962
+ number: sectionNumber,
963
+ descr: section,
964
+ section: sectionNumber,
965
+ width: 150,
966
+ padding: 20,
967
+ maxHeight: maxSectionHeight
968
+ };
969
+ const sectionHeight = svgDraw.getVirtualNodeHeight(svg, sectionNode, conf);
970
+ log.debug("sectionHeight before draw", sectionHeight);
971
+ maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20);
972
+ });
973
+ let maxEventCount = 0;
974
+ let maxEventLineLength = 0;
975
+ log.debug("tasks.length", tasks2.length);
976
+ for (const [i, task] of tasks2.entries()) {
977
+ const taskNode = {
978
+ number: i,
979
+ descr: task,
980
+ section: task.section,
981
+ width: 150,
982
+ padding: 20,
983
+ maxHeight: maxTaskHeight
984
+ };
985
+ const taskHeight = svgDraw.getVirtualNodeHeight(svg, taskNode, conf);
986
+ log.debug("taskHeight before draw", taskHeight);
987
+ maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20);
988
+ maxEventCount = Math.max(maxEventCount, task.events.length);
989
+ let maxEventLineLengthTemp = 0;
990
+ for (let j = 0; j < task.events.length; j++) {
991
+ const event = task.events[j];
992
+ const eventNode = {
993
+ descr: event,
994
+ section: task.section,
995
+ number: task.section,
996
+ width: 150,
997
+ padding: 20,
998
+ maxHeight: 50
999
+ };
1000
+ maxEventLineLengthTemp += svgDraw.getVirtualNodeHeight(svg, eventNode, conf);
1001
+ }
1002
+ maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp);
1003
+ }
1004
+ log.debug("maxSectionHeight before draw", maxSectionHeight);
1005
+ log.debug("maxTaskHeight before draw", maxTaskHeight);
1006
+ if (sections2 && sections2.length > 0) {
1007
+ sections2.forEach((section) => {
1008
+ const tasksForSection = tasks2.filter((task) => task.section === section);
1009
+ const sectionNode = {
1010
+ number: sectionNumber,
1011
+ descr: section,
1012
+ section: sectionNumber,
1013
+ width: 200 * Math.max(tasksForSection.length, 1) - 50,
1014
+ padding: 20,
1015
+ maxHeight: maxSectionHeight
1016
+ };
1017
+ log.debug("sectionNode", sectionNode);
1018
+ const sectionNodeWrapper = svg.append("g");
1019
+ const node = svgDraw.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf);
1020
+ log.debug("sectionNode output", node);
1021
+ sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`);
1022
+ masterY += maxSectionHeight + 50;
1023
+ if (tasksForSection.length > 0) {
1024
+ drawTasks(
1025
+ svg,
1026
+ tasksForSection,
1027
+ sectionNumber,
1028
+ masterX,
1029
+ masterY,
1030
+ maxTaskHeight,
1031
+ conf,
1032
+ maxEventCount,
1033
+ maxEventLineLength,
1034
+ maxSectionHeight,
1035
+ false
1036
+ );
1037
+ }
1038
+ masterX += 200 * Math.max(tasksForSection.length, 1);
1039
+ masterY = sectionBeginY;
1040
+ sectionNumber++;
1041
+ });
1042
+ } else {
1043
+ hasSections = false;
1044
+ drawTasks(
1045
+ svg,
1046
+ tasks2,
1047
+ sectionNumber,
1048
+ masterX,
1049
+ masterY,
1050
+ maxTaskHeight,
1051
+ conf,
1052
+ maxEventCount,
1053
+ maxEventLineLength,
1054
+ maxSectionHeight,
1055
+ true
1056
+ );
1057
+ }
1058
+ const box = svg.node().getBBox();
1059
+ log.debug("bounds", box);
1060
+ if (title) {
1061
+ svg.append("text").text(title).attr("x", box.width / 2 - LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20);
1062
+ }
1063
+ depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100;
1064
+ const lineWrapper = svg.append("g").attr("class", "lineWrapper");
1065
+ lineWrapper.append("line").attr("x1", LEFT_MARGIN).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
1066
+ setupGraphViewbox(
1067
+ void 0,
1068
+ svg,
1069
+ ((_a = conf.timeline) == null ? void 0 : _a.padding) ?? 50,
1070
+ ((_b = conf.timeline) == null ? void 0 : _b.useMaxWidth) ?? false
1071
+ );
1072
+ };
1073
+ const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) {
1074
+ var _a;
1075
+ for (const task of tasks2) {
1076
+ const taskNode = {
1077
+ descr: task.task,
1078
+ section: sectionColor,
1079
+ number: sectionColor,
1080
+ width: 150,
1081
+ padding: 20,
1082
+ maxHeight: maxTaskHeight
1083
+ };
1084
+ log.debug("taskNode", taskNode);
1085
+ const taskWrapper = diagram2.append("g").attr("class", "taskWrapper");
1086
+ const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf);
1087
+ const taskHeight = node.height;
1088
+ log.debug("taskHeight after draw", taskHeight);
1089
+ taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`);
1090
+ maxTaskHeight = Math.max(maxTaskHeight, taskHeight);
1091
+ if (task.events) {
1092
+ const lineWrapper = diagram2.append("g").attr("class", "lineWrapper");
1093
+ let lineLength = maxTaskHeight;
1094
+ masterY += 100;
1095
+ lineLength = lineLength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf);
1096
+ masterY -= 100;
1097
+ lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr(
1098
+ "y2",
1099
+ masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120
1100
+ ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
1101
+ }
1102
+ masterX = masterX + 200;
1103
+ if (isWithoutSections && !((_a = conf.timeline) == null ? void 0 : _a.disableMulticolor)) {
1104
+ sectionColor++;
1105
+ }
1106
+ }
1107
+ masterY = masterY - 10;
1108
+ };
1109
+ const drawEvents = function(diagram2, events, sectionColor, masterX, masterY, conf) {
1110
+ let maxEventHeight = 0;
1111
+ const eventBeginY = masterY;
1112
+ masterY = masterY + 100;
1113
+ for (const event of events) {
1114
+ const eventNode = {
1115
+ descr: event,
1116
+ section: sectionColor,
1117
+ number: sectionColor,
1118
+ width: 150,
1119
+ padding: 20,
1120
+ maxHeight: 50
1121
+ };
1122
+ log.debug("eventNode", eventNode);
1123
+ const eventWrapper = diagram2.append("g").attr("class", "eventWrapper");
1124
+ const node = svgDraw.drawNode(eventWrapper, eventNode, sectionColor, conf);
1125
+ const eventHeight = node.height;
1126
+ maxEventHeight = maxEventHeight + eventHeight;
1127
+ eventWrapper.attr("transform", `translate(${masterX}, ${masterY})`);
1128
+ masterY = masterY + 10 + eventHeight;
1129
+ }
1130
+ masterY = eventBeginY;
1131
+ return maxEventHeight;
1132
+ };
1133
+ const renderer = {
1134
+ setConf: () => {
1135
+ },
1136
+ draw
1137
+ };
1138
+ const genSections = (options) => {
1139
+ let sections2 = "";
1140
+ for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1141
+ options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i];
1142
+ if (isDark(options["lineColor" + i])) {
1143
+ options["lineColor" + i] = lighten(options["lineColor" + i], 20);
1144
+ } else {
1145
+ options["lineColor" + i] = darken(options["lineColor" + i], 20);
1146
+ }
1147
+ }
1148
+ for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
1149
+ const sw = "" + (17 - 3 * i);
1150
+ sections2 += `
1151
+ .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} path {
1152
+ fill: ${options["cScale" + i]};
1153
+ }
1154
+ .section-${i - 1} text {
1155
+ fill: ${options["cScaleLabel" + i]};
1156
+ }
1157
+ .node-icon-${i - 1} {
1158
+ font-size: 40px;
1159
+ color: ${options["cScaleLabel" + i]};
1160
+ }
1161
+ .section-edge-${i - 1}{
1162
+ stroke: ${options["cScale" + i]};
1163
+ }
1164
+ .edge-depth-${i - 1}{
1165
+ stroke-width: ${sw};
1166
+ }
1167
+ .section-${i - 1} line {
1168
+ stroke: ${options["cScaleInv" + i]} ;
1169
+ stroke-width: 3;
1170
+ }
1171
+
1172
+ .lineWrapper line{
1173
+ stroke: ${options["cScaleLabel" + i]} ;
1174
+ }
1175
+
1176
+ .disabled, .disabled circle, .disabled text {
1177
+ fill: lightgray;
1178
+ }
1179
+ .disabled text {
1180
+ fill: #efefef;
1181
+ }
1182
+ `;
1183
+ }
1184
+ return sections2;
1185
+ };
1186
+ const getStyles = (options) => `
1187
+ .edge {
1188
+ stroke-width: 3;
1189
+ }
1190
+ ${genSections(options)}
1191
+ .section-root rect, .section-root path, .section-root circle {
1192
+ fill: ${options.git0};
1193
+ }
1194
+ .section-root text {
1195
+ fill: ${options.gitBranchLabel0};
1196
+ }
1197
+ .icon-container {
1198
+ height:100%;
1199
+ display: flex;
1200
+ justify-content: center;
1201
+ align-items: center;
1202
+ }
1203
+ .edge {
1204
+ fill: none;
1205
+ }
1206
+ .eventWrapper {
1207
+ filter: brightness(120%);
1208
+ }
1209
+ `;
1210
+ const styles = getStyles;
1211
+ const diagram = {
1212
+ db,
1213
+ renderer,
1214
+ parser: parser$1,
1215
+ styles
1216
+ };
1217
+ export {
1218
+ diagram
1219
+ };