jekyll-ham 1.0.4 → 1.1.1

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