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,1091 @@
1
+ import { c as getConfig, s as setAccTitle, g as getAccTitle, b as setAccDescription, a as getAccDescription, l as log, E as clear$1, j as d3select, k as configureSvgSize, f as common } from "./mermaid-dcacb631.js";
2
+ import { G as Graph } from "./graph-fe24fab6.js";
3
+ import { l as layout } from "./layout-163b9689.js";
4
+ import { l as line } from "./line-87f517ef.js";
5
+ import "./array-b7dcf730.js";
6
+ import "./path-39bad7e2.js";
7
+ var parser = function() {
8
+ var o = function(k, v, o2, l) {
9
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
10
+ ;
11
+ return o2;
12
+ }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], $V5 = [1, 18], $V6 = [2, 7], $V7 = [1, 22], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 20], $Ve = [1, 28], $Vf = [1, 29], $Vg = [62, 63], $Vh = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], $Vi = [1, 47], $Vj = [1, 48], $Vk = [1, 49], $Vl = [1, 50], $Vm = [1, 51], $Vn = [1, 52], $Vo = [1, 53], $Vp = [53, 54], $Vq = [1, 64], $Vr = [1, 60], $Vs = [1, 61], $Vt = [1, 62], $Vu = [1, 63], $Vv = [1, 65], $Vw = [1, 69], $Vx = [1, 70], $Vy = [1, 67], $Vz = [1, 68], $VA = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63];
13
+ var parser2 = {
14
+ trace: function trace() {
15
+ },
16
+ yy: {},
17
+ symbols_: { "error": 2, "start": 3, "directive": 4, "NEWLINE": 5, "RD": 6, "diagram": 7, "EOF": 8, "acc_title": 9, "acc_title_value": 10, "acc_descr": 11, "acc_descr_value": 12, "acc_descr_multiline_value": 13, "requirementDef": 14, "elementDef": 15, "relationshipDef": 16, "requirementType": 17, "requirementName": 18, "STRUCT_START": 19, "requirementBody": 20, "ID": 21, "COLONSEP": 22, "id": 23, "TEXT": 24, "text": 25, "RISK": 26, "riskLevel": 27, "VERIFYMTHD": 28, "verifyType": 29, "STRUCT_STOP": 30, "REQUIREMENT": 31, "FUNCTIONAL_REQUIREMENT": 32, "INTERFACE_REQUIREMENT": 33, "PERFORMANCE_REQUIREMENT": 34, "PHYSICAL_REQUIREMENT": 35, "DESIGN_CONSTRAINT": 36, "LOW_RISK": 37, "MED_RISK": 38, "HIGH_RISK": 39, "VERIFY_ANALYSIS": 40, "VERIFY_DEMONSTRATION": 41, "VERIFY_INSPECTION": 42, "VERIFY_TEST": 43, "ELEMENT": 44, "elementName": 45, "elementBody": 46, "TYPE": 47, "type": 48, "DOCREF": 49, "ref": 50, "END_ARROW_L": 51, "relationship": 52, "LINE": 53, "END_ARROW_R": 54, "CONTAINS": 55, "COPIES": 56, "DERIVES": 57, "SATISFIES": 58, "VERIFIES": 59, "REFINES": 60, "TRACES": 61, "unqString": 62, "qString": 63, "$accept": 0, "$end": 1 },
18
+ terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 9: "acc_title", 10: "acc_title_value", 11: "acc_descr", 12: "acc_descr_value", 13: "acc_descr_multiline_value", 19: "STRUCT_START", 21: "ID", 22: "COLONSEP", 24: "TEXT", 26: "RISK", 28: "VERIFYMTHD", 30: "STRUCT_STOP", 31: "REQUIREMENT", 32: "FUNCTIONAL_REQUIREMENT", 33: "INTERFACE_REQUIREMENT", 34: "PERFORMANCE_REQUIREMENT", 35: "PHYSICAL_REQUIREMENT", 36: "DESIGN_CONSTRAINT", 37: "LOW_RISK", 38: "MED_RISK", 39: "HIGH_RISK", 40: "VERIFY_ANALYSIS", 41: "VERIFY_DEMONSTRATION", 42: "VERIFY_INSPECTION", 43: "VERIFY_TEST", 44: "ELEMENT", 47: "TYPE", 49: "DOCREF", 51: "END_ARROW_L", 53: "LINE", 54: "END_ARROW_R", 55: "CONTAINS", 56: "COPIES", 57: "DERIVES", 58: "SATISFIES", 59: "VERIFIES", 60: "REFINES", 61: "TRACES", 62: "unqString", 63: "qString" },
19
+ productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]],
20
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
21
+ var $0 = $$.length - 1;
22
+ switch (yystate) {
23
+ case 4:
24
+ this.$ = $$[$0].trim();
25
+ yy.setAccTitle(this.$);
26
+ break;
27
+ case 5:
28
+ case 6:
29
+ this.$ = $$[$0].trim();
30
+ yy.setAccDescription(this.$);
31
+ break;
32
+ case 7:
33
+ this.$ = [];
34
+ break;
35
+ case 13:
36
+ yy.addRequirement($$[$0 - 3], $$[$0 - 4]);
37
+ break;
38
+ case 14:
39
+ yy.setNewReqId($$[$0 - 2]);
40
+ break;
41
+ case 15:
42
+ yy.setNewReqText($$[$0 - 2]);
43
+ break;
44
+ case 16:
45
+ yy.setNewReqRisk($$[$0 - 2]);
46
+ break;
47
+ case 17:
48
+ yy.setNewReqVerifyMethod($$[$0 - 2]);
49
+ break;
50
+ case 20:
51
+ this.$ = yy.RequirementType.REQUIREMENT;
52
+ break;
53
+ case 21:
54
+ this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT;
55
+ break;
56
+ case 22:
57
+ this.$ = yy.RequirementType.INTERFACE_REQUIREMENT;
58
+ break;
59
+ case 23:
60
+ this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT;
61
+ break;
62
+ case 24:
63
+ this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT;
64
+ break;
65
+ case 25:
66
+ this.$ = yy.RequirementType.DESIGN_CONSTRAINT;
67
+ break;
68
+ case 26:
69
+ this.$ = yy.RiskLevel.LOW_RISK;
70
+ break;
71
+ case 27:
72
+ this.$ = yy.RiskLevel.MED_RISK;
73
+ break;
74
+ case 28:
75
+ this.$ = yy.RiskLevel.HIGH_RISK;
76
+ break;
77
+ case 29:
78
+ this.$ = yy.VerifyType.VERIFY_ANALYSIS;
79
+ break;
80
+ case 30:
81
+ this.$ = yy.VerifyType.VERIFY_DEMONSTRATION;
82
+ break;
83
+ case 31:
84
+ this.$ = yy.VerifyType.VERIFY_INSPECTION;
85
+ break;
86
+ case 32:
87
+ this.$ = yy.VerifyType.VERIFY_TEST;
88
+ break;
89
+ case 33:
90
+ yy.addElement($$[$0 - 3]);
91
+ break;
92
+ case 34:
93
+ yy.setNewElementType($$[$0 - 2]);
94
+ break;
95
+ case 35:
96
+ yy.setNewElementDocRef($$[$0 - 2]);
97
+ break;
98
+ case 38:
99
+ yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]);
100
+ break;
101
+ case 39:
102
+ yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]);
103
+ break;
104
+ case 40:
105
+ this.$ = yy.Relationships.CONTAINS;
106
+ break;
107
+ case 41:
108
+ this.$ = yy.Relationships.COPIES;
109
+ break;
110
+ case 42:
111
+ this.$ = yy.Relationships.DERIVES;
112
+ break;
113
+ case 43:
114
+ this.$ = yy.Relationships.SATISFIES;
115
+ break;
116
+ case 44:
117
+ this.$ = yy.Relationships.VERIFIES;
118
+ break;
119
+ case 45:
120
+ this.$ = yy.Relationships.REFINES;
121
+ break;
122
+ case 46:
123
+ this.$ = yy.Relationships.TRACES;
124
+ break;
125
+ }
126
+ },
127
+ table: [{ 3: 1, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, o($V4, [2, 6]), { 3: 12, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [2, 2] }, { 4: 17, 5: $V5, 7: 13, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, o($V4, [2, 4]), o($V4, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: $V5, 7: 31, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 32, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 33, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 34, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 35, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, o($Vg, [2, 20]), o($Vg, [2, 21]), o($Vg, [2, 22]), o($Vg, [2, 23]), o($Vg, [2, 24]), o($Vg, [2, 25]), o($Vh, [2, 49]), o($Vh, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 52: 54, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, o($Vp, [2, 40]), o($Vp, [2, 41]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), { 54: [1, 58] }, { 5: $Vq, 20: 59, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 66, 47: $Vy, 49: $Vz }, { 23: 71, 62: $Ve, 63: $Vf }, { 23: 72, 62: $Ve, 63: $Vf }, o($VA, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: $Vq, 20: 77, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, o($VA, [2, 19]), o($VA, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: $Vw, 30: $Vx, 46: 80, 47: $Vy, 49: $Vz }, o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), { 23: 81, 62: $Ve, 63: $Vf }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, o($VA, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, o($VA, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: $Vq, 20: 106, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 107, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 108, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 109, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 110, 47: $Vy, 49: $Vz }, { 5: $Vw, 30: $Vx, 46: 111, 47: $Vy, 49: $Vz }, o($VA, [2, 14]), o($VA, [2, 15]), o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 34]), o($VA, [2, 35])],
128
+ defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] },
129
+ parseError: function parseError(str, hash) {
130
+ if (hash.recoverable) {
131
+ this.trace(str);
132
+ } else {
133
+ var error = new Error(str);
134
+ error.hash = hash;
135
+ throw error;
136
+ }
137
+ },
138
+ parse: function parse(input) {
139
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
140
+ var args = lstack.slice.call(arguments, 1);
141
+ var lexer2 = Object.create(this.lexer);
142
+ var sharedState = { yy: {} };
143
+ for (var k in this.yy) {
144
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
145
+ sharedState.yy[k] = this.yy[k];
146
+ }
147
+ }
148
+ lexer2.setInput(input, sharedState.yy);
149
+ sharedState.yy.lexer = lexer2;
150
+ sharedState.yy.parser = this;
151
+ if (typeof lexer2.yylloc == "undefined") {
152
+ lexer2.yylloc = {};
153
+ }
154
+ var yyloc = lexer2.yylloc;
155
+ lstack.push(yyloc);
156
+ var ranges = lexer2.options && lexer2.options.ranges;
157
+ if (typeof sharedState.yy.parseError === "function") {
158
+ this.parseError = sharedState.yy.parseError;
159
+ } else {
160
+ this.parseError = Object.getPrototypeOf(this).parseError;
161
+ }
162
+ function lex() {
163
+ var token;
164
+ token = tstack.pop() || lexer2.lex() || EOF;
165
+ if (typeof token !== "number") {
166
+ if (token instanceof Array) {
167
+ tstack = token;
168
+ token = tstack.pop();
169
+ }
170
+ token = self.symbols_[token] || token;
171
+ }
172
+ return token;
173
+ }
174
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
175
+ while (true) {
176
+ state = stack[stack.length - 1];
177
+ if (this.defaultActions[state]) {
178
+ action = this.defaultActions[state];
179
+ } else {
180
+ if (symbol === null || typeof symbol == "undefined") {
181
+ symbol = lex();
182
+ }
183
+ action = table[state] && table[state][symbol];
184
+ }
185
+ if (typeof action === "undefined" || !action.length || !action[0]) {
186
+ var errStr = "";
187
+ expected = [];
188
+ for (p in table[state]) {
189
+ if (this.terminals_[p] && p > TERROR) {
190
+ expected.push("'" + this.terminals_[p] + "'");
191
+ }
192
+ }
193
+ if (lexer2.showPosition) {
194
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
195
+ } else {
196
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
197
+ }
198
+ this.parseError(errStr, {
199
+ text: lexer2.match,
200
+ token: this.terminals_[symbol] || symbol,
201
+ line: lexer2.yylineno,
202
+ loc: yyloc,
203
+ expected
204
+ });
205
+ }
206
+ if (action[0] instanceof Array && action.length > 1) {
207
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
208
+ }
209
+ switch (action[0]) {
210
+ case 1:
211
+ stack.push(symbol);
212
+ vstack.push(lexer2.yytext);
213
+ lstack.push(lexer2.yylloc);
214
+ stack.push(action[1]);
215
+ symbol = null;
216
+ {
217
+ yyleng = lexer2.yyleng;
218
+ yytext = lexer2.yytext;
219
+ yylineno = lexer2.yylineno;
220
+ yyloc = lexer2.yylloc;
221
+ }
222
+ break;
223
+ case 2:
224
+ len = this.productions_[action[1]][1];
225
+ yyval.$ = vstack[vstack.length - len];
226
+ yyval._$ = {
227
+ first_line: lstack[lstack.length - (len || 1)].first_line,
228
+ last_line: lstack[lstack.length - 1].last_line,
229
+ first_column: lstack[lstack.length - (len || 1)].first_column,
230
+ last_column: lstack[lstack.length - 1].last_column
231
+ };
232
+ if (ranges) {
233
+ yyval._$.range = [
234
+ lstack[lstack.length - (len || 1)].range[0],
235
+ lstack[lstack.length - 1].range[1]
236
+ ];
237
+ }
238
+ r = this.performAction.apply(yyval, [
239
+ yytext,
240
+ yyleng,
241
+ yylineno,
242
+ sharedState.yy,
243
+ action[1],
244
+ vstack,
245
+ lstack
246
+ ].concat(args));
247
+ if (typeof r !== "undefined") {
248
+ return r;
249
+ }
250
+ if (len) {
251
+ stack = stack.slice(0, -1 * len * 2);
252
+ vstack = vstack.slice(0, -1 * len);
253
+ lstack = lstack.slice(0, -1 * len);
254
+ }
255
+ stack.push(this.productions_[action[1]][0]);
256
+ vstack.push(yyval.$);
257
+ lstack.push(yyval._$);
258
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
259
+ stack.push(newState);
260
+ break;
261
+ case 3:
262
+ return true;
263
+ }
264
+ }
265
+ return true;
266
+ }
267
+ };
268
+ var lexer = function() {
269
+ var lexer2 = {
270
+ EOF: 1,
271
+ parseError: function parseError(str, hash) {
272
+ if (this.yy.parser) {
273
+ this.yy.parser.parseError(str, hash);
274
+ } else {
275
+ throw new Error(str);
276
+ }
277
+ },
278
+ // resets the lexer, sets new input
279
+ setInput: function(input, yy) {
280
+ this.yy = yy || this.yy || {};
281
+ this._input = input;
282
+ this._more = this._backtrack = this.done = false;
283
+ this.yylineno = this.yyleng = 0;
284
+ this.yytext = this.matched = this.match = "";
285
+ this.conditionStack = ["INITIAL"];
286
+ this.yylloc = {
287
+ first_line: 1,
288
+ first_column: 0,
289
+ last_line: 1,
290
+ last_column: 0
291
+ };
292
+ if (this.options.ranges) {
293
+ this.yylloc.range = [0, 0];
294
+ }
295
+ this.offset = 0;
296
+ return this;
297
+ },
298
+ // consumes and returns one char from the input
299
+ input: function() {
300
+ var ch = this._input[0];
301
+ this.yytext += ch;
302
+ this.yyleng++;
303
+ this.offset++;
304
+ this.match += ch;
305
+ this.matched += ch;
306
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
307
+ if (lines) {
308
+ this.yylineno++;
309
+ this.yylloc.last_line++;
310
+ } else {
311
+ this.yylloc.last_column++;
312
+ }
313
+ if (this.options.ranges) {
314
+ this.yylloc.range[1]++;
315
+ }
316
+ this._input = this._input.slice(1);
317
+ return ch;
318
+ },
319
+ // unshifts one char (or a string) into the input
320
+ unput: function(ch) {
321
+ var len = ch.length;
322
+ var lines = ch.split(/(?:\r\n?|\n)/g);
323
+ this._input = ch + this._input;
324
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
325
+ this.offset -= len;
326
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
327
+ this.match = this.match.substr(0, this.match.length - 1);
328
+ this.matched = this.matched.substr(0, this.matched.length - 1);
329
+ if (lines.length - 1) {
330
+ this.yylineno -= lines.length - 1;
331
+ }
332
+ var r = this.yylloc.range;
333
+ this.yylloc = {
334
+ first_line: this.yylloc.first_line,
335
+ last_line: this.yylineno + 1,
336
+ first_column: this.yylloc.first_column,
337
+ 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
338
+ };
339
+ if (this.options.ranges) {
340
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
341
+ }
342
+ this.yyleng = this.yytext.length;
343
+ return this;
344
+ },
345
+ // When called from action, caches matched text and appends it on next action
346
+ more: function() {
347
+ this._more = true;
348
+ return this;
349
+ },
350
+ // 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.
351
+ reject: function() {
352
+ if (this.options.backtrack_lexer) {
353
+ this._backtrack = true;
354
+ } else {
355
+ 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(), {
356
+ text: "",
357
+ token: null,
358
+ line: this.yylineno
359
+ });
360
+ }
361
+ return this;
362
+ },
363
+ // retain first n characters of the match
364
+ less: function(n) {
365
+ this.unput(this.match.slice(n));
366
+ },
367
+ // displays already matched input, i.e. for error messages
368
+ pastInput: function() {
369
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
370
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
371
+ },
372
+ // displays upcoming input, i.e. for error messages
373
+ upcomingInput: function() {
374
+ var next = this.match;
375
+ if (next.length < 20) {
376
+ next += this._input.substr(0, 20 - next.length);
377
+ }
378
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
379
+ },
380
+ // displays the character position where the lexing error occurred, i.e. for error messages
381
+ showPosition: function() {
382
+ var pre = this.pastInput();
383
+ var c = new Array(pre.length + 1).join("-");
384
+ return pre + this.upcomingInput() + "\n" + c + "^";
385
+ },
386
+ // test the lexed token: return FALSE when not a match, otherwise return token
387
+ test_match: function(match, indexed_rule) {
388
+ var token, lines, backup;
389
+ if (this.options.backtrack_lexer) {
390
+ backup = {
391
+ yylineno: this.yylineno,
392
+ yylloc: {
393
+ first_line: this.yylloc.first_line,
394
+ last_line: this.last_line,
395
+ first_column: this.yylloc.first_column,
396
+ last_column: this.yylloc.last_column
397
+ },
398
+ yytext: this.yytext,
399
+ match: this.match,
400
+ matches: this.matches,
401
+ matched: this.matched,
402
+ yyleng: this.yyleng,
403
+ offset: this.offset,
404
+ _more: this._more,
405
+ _input: this._input,
406
+ yy: this.yy,
407
+ conditionStack: this.conditionStack.slice(0),
408
+ done: this.done
409
+ };
410
+ if (this.options.ranges) {
411
+ backup.yylloc.range = this.yylloc.range.slice(0);
412
+ }
413
+ }
414
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
415
+ if (lines) {
416
+ this.yylineno += lines.length;
417
+ }
418
+ this.yylloc = {
419
+ first_line: this.yylloc.last_line,
420
+ last_line: this.yylineno + 1,
421
+ first_column: this.yylloc.last_column,
422
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
423
+ };
424
+ this.yytext += match[0];
425
+ this.match += match[0];
426
+ this.matches = match;
427
+ this.yyleng = this.yytext.length;
428
+ if (this.options.ranges) {
429
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
430
+ }
431
+ this._more = false;
432
+ this._backtrack = false;
433
+ this._input = this._input.slice(match[0].length);
434
+ this.matched += match[0];
435
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
436
+ if (this.done && this._input) {
437
+ this.done = false;
438
+ }
439
+ if (token) {
440
+ return token;
441
+ } else if (this._backtrack) {
442
+ for (var k in backup) {
443
+ this[k] = backup[k];
444
+ }
445
+ return false;
446
+ }
447
+ return false;
448
+ },
449
+ // return next match in input
450
+ next: function() {
451
+ if (this.done) {
452
+ return this.EOF;
453
+ }
454
+ if (!this._input) {
455
+ this.done = true;
456
+ }
457
+ var token, match, tempMatch, index;
458
+ if (!this._more) {
459
+ this.yytext = "";
460
+ this.match = "";
461
+ }
462
+ var rules = this._currentRules();
463
+ for (var i = 0; i < rules.length; i++) {
464
+ tempMatch = this._input.match(this.rules[rules[i]]);
465
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
466
+ match = tempMatch;
467
+ index = i;
468
+ if (this.options.backtrack_lexer) {
469
+ token = this.test_match(tempMatch, rules[i]);
470
+ if (token !== false) {
471
+ return token;
472
+ } else if (this._backtrack) {
473
+ match = false;
474
+ continue;
475
+ } else {
476
+ return false;
477
+ }
478
+ } else if (!this.options.flex) {
479
+ break;
480
+ }
481
+ }
482
+ }
483
+ if (match) {
484
+ token = this.test_match(match, rules[index]);
485
+ if (token !== false) {
486
+ return token;
487
+ }
488
+ return false;
489
+ }
490
+ if (this._input === "") {
491
+ return this.EOF;
492
+ } else {
493
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
494
+ text: "",
495
+ token: null,
496
+ line: this.yylineno
497
+ });
498
+ }
499
+ },
500
+ // return next match that has a token
501
+ lex: function lex() {
502
+ var r = this.next();
503
+ if (r) {
504
+ return r;
505
+ } else {
506
+ return this.lex();
507
+ }
508
+ },
509
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
510
+ begin: function begin(condition) {
511
+ this.conditionStack.push(condition);
512
+ },
513
+ // pop the previously active lexer condition state off the condition stack
514
+ popState: function popState() {
515
+ var n = this.conditionStack.length - 1;
516
+ if (n > 0) {
517
+ return this.conditionStack.pop();
518
+ } else {
519
+ return this.conditionStack[0];
520
+ }
521
+ },
522
+ // produce the lexer rule set which is active for the currently active lexer condition state
523
+ _currentRules: function _currentRules() {
524
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
525
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
526
+ } else {
527
+ return this.conditions["INITIAL"].rules;
528
+ }
529
+ },
530
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
531
+ topState: function topState(n) {
532
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
533
+ if (n >= 0) {
534
+ return this.conditionStack[n];
535
+ } else {
536
+ return "INITIAL";
537
+ }
538
+ },
539
+ // alias for begin(condition)
540
+ pushState: function pushState(condition) {
541
+ this.begin(condition);
542
+ },
543
+ // return the number of states currently on the stack
544
+ stateStackSize: function stateStackSize() {
545
+ return this.conditionStack.length;
546
+ },
547
+ options: { "case-insensitive": true },
548
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
549
+ switch ($avoiding_name_collisions) {
550
+ case 0:
551
+ return "title";
552
+ case 1:
553
+ this.begin("acc_title");
554
+ return 9;
555
+ case 2:
556
+ this.popState();
557
+ return "acc_title_value";
558
+ case 3:
559
+ this.begin("acc_descr");
560
+ return 11;
561
+ case 4:
562
+ this.popState();
563
+ return "acc_descr_value";
564
+ case 5:
565
+ this.begin("acc_descr_multiline");
566
+ break;
567
+ case 6:
568
+ this.popState();
569
+ break;
570
+ case 7:
571
+ return "acc_descr_multiline_value";
572
+ case 8:
573
+ return 5;
574
+ case 9:
575
+ break;
576
+ case 10:
577
+ break;
578
+ case 11:
579
+ break;
580
+ case 12:
581
+ return 8;
582
+ case 13:
583
+ return 6;
584
+ case 14:
585
+ return 19;
586
+ case 15:
587
+ return 30;
588
+ case 16:
589
+ return 22;
590
+ case 17:
591
+ return 21;
592
+ case 18:
593
+ return 24;
594
+ case 19:
595
+ return 26;
596
+ case 20:
597
+ return 28;
598
+ case 21:
599
+ return 31;
600
+ case 22:
601
+ return 32;
602
+ case 23:
603
+ return 33;
604
+ case 24:
605
+ return 34;
606
+ case 25:
607
+ return 35;
608
+ case 26:
609
+ return 36;
610
+ case 27:
611
+ return 37;
612
+ case 28:
613
+ return 38;
614
+ case 29:
615
+ return 39;
616
+ case 30:
617
+ return 40;
618
+ case 31:
619
+ return 41;
620
+ case 32:
621
+ return 42;
622
+ case 33:
623
+ return 43;
624
+ case 34:
625
+ return 44;
626
+ case 35:
627
+ return 55;
628
+ case 36:
629
+ return 56;
630
+ case 37:
631
+ return 57;
632
+ case 38:
633
+ return 58;
634
+ case 39:
635
+ return 59;
636
+ case 40:
637
+ return 60;
638
+ case 41:
639
+ return 61;
640
+ case 42:
641
+ return 47;
642
+ case 43:
643
+ return 49;
644
+ case 44:
645
+ return 51;
646
+ case 45:
647
+ return 54;
648
+ case 46:
649
+ return 53;
650
+ case 47:
651
+ this.begin("string");
652
+ break;
653
+ case 48:
654
+ this.popState();
655
+ break;
656
+ case 49:
657
+ return "qString";
658
+ case 50:
659
+ yy_.yytext = yy_.yytext.trim();
660
+ return 62;
661
+ }
662
+ },
663
+ rules: [/^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\b)/i, /^(?:\{)/i, /^(?:\})/i, /^(?::)/i, /^(?:id\b)/i, /^(?:text\b)/i, /^(?:risk\b)/i, /^(?:verifyMethod\b)/i, /^(?:requirement\b)/i, /^(?:functionalRequirement\b)/i, /^(?:interfaceRequirement\b)/i, /^(?:performanceRequirement\b)/i, /^(?:physicalRequirement\b)/i, /^(?:designConstraint\b)/i, /^(?:low\b)/i, /^(?:medium\b)/i, /^(?:high\b)/i, /^(?:analysis\b)/i, /^(?:demonstration\b)/i, /^(?:inspection\b)/i, /^(?:test\b)/i, /^(?:element\b)/i, /^(?:contains\b)/i, /^(?:copies\b)/i, /^(?:derives\b)/i, /^(?:satisfies\b)/i, /^(?:verifies\b)/i, /^(?:refines\b)/i, /^(?:traces\b)/i, /^(?:type\b)/i, /^(?:docref\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[\w][^\r\n\{\<\>\-\=]*)/i],
664
+ conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "unqString": { "rules": [], "inclusive": false }, "token": { "rules": [], "inclusive": false }, "string": { "rules": [48, 49], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50], "inclusive": true } }
665
+ };
666
+ return lexer2;
667
+ }();
668
+ parser2.lexer = lexer;
669
+ function Parser() {
670
+ this.yy = {};
671
+ }
672
+ Parser.prototype = parser2;
673
+ parser2.Parser = Parser;
674
+ return new Parser();
675
+ }();
676
+ parser.parser = parser;
677
+ const parser$1 = parser;
678
+ let relations = [];
679
+ let latestRequirement = {};
680
+ let requirements = {};
681
+ let latestElement = {};
682
+ let elements = {};
683
+ const RequirementType = {
684
+ REQUIREMENT: "Requirement",
685
+ FUNCTIONAL_REQUIREMENT: "Functional Requirement",
686
+ INTERFACE_REQUIREMENT: "Interface Requirement",
687
+ PERFORMANCE_REQUIREMENT: "Performance Requirement",
688
+ PHYSICAL_REQUIREMENT: "Physical Requirement",
689
+ DESIGN_CONSTRAINT: "Design Constraint"
690
+ };
691
+ const RiskLevel = {
692
+ LOW_RISK: "Low",
693
+ MED_RISK: "Medium",
694
+ HIGH_RISK: "High"
695
+ };
696
+ const VerifyType = {
697
+ VERIFY_ANALYSIS: "Analysis",
698
+ VERIFY_DEMONSTRATION: "Demonstration",
699
+ VERIFY_INSPECTION: "Inspection",
700
+ VERIFY_TEST: "Test"
701
+ };
702
+ const Relationships = {
703
+ CONTAINS: "contains",
704
+ COPIES: "copies",
705
+ DERIVES: "derives",
706
+ SATISFIES: "satisfies",
707
+ VERIFIES: "verifies",
708
+ REFINES: "refines",
709
+ TRACES: "traces"
710
+ };
711
+ const addRequirement = (name, type) => {
712
+ if (requirements[name] === void 0) {
713
+ requirements[name] = {
714
+ name,
715
+ type,
716
+ id: latestRequirement.id,
717
+ text: latestRequirement.text,
718
+ risk: latestRequirement.risk,
719
+ verifyMethod: latestRequirement.verifyMethod
720
+ };
721
+ }
722
+ latestRequirement = {};
723
+ return requirements[name];
724
+ };
725
+ const getRequirements = () => requirements;
726
+ const setNewReqId = (id) => {
727
+ if (latestRequirement !== void 0) {
728
+ latestRequirement.id = id;
729
+ }
730
+ };
731
+ const setNewReqText = (text) => {
732
+ if (latestRequirement !== void 0) {
733
+ latestRequirement.text = text;
734
+ }
735
+ };
736
+ const setNewReqRisk = (risk) => {
737
+ if (latestRequirement !== void 0) {
738
+ latestRequirement.risk = risk;
739
+ }
740
+ };
741
+ const setNewReqVerifyMethod = (verifyMethod) => {
742
+ if (latestRequirement !== void 0) {
743
+ latestRequirement.verifyMethod = verifyMethod;
744
+ }
745
+ };
746
+ const addElement = (name) => {
747
+ if (elements[name] === void 0) {
748
+ elements[name] = {
749
+ name,
750
+ type: latestElement.type,
751
+ docRef: latestElement.docRef
752
+ };
753
+ log.info("Added new requirement: ", name);
754
+ }
755
+ latestElement = {};
756
+ return elements[name];
757
+ };
758
+ const getElements = () => elements;
759
+ const setNewElementType = (type) => {
760
+ if (latestElement !== void 0) {
761
+ latestElement.type = type;
762
+ }
763
+ };
764
+ const setNewElementDocRef = (docRef) => {
765
+ if (latestElement !== void 0) {
766
+ latestElement.docRef = docRef;
767
+ }
768
+ };
769
+ const addRelationship = (type, src, dst) => {
770
+ relations.push({
771
+ type,
772
+ src,
773
+ dst
774
+ });
775
+ };
776
+ const getRelationships = () => relations;
777
+ const clear = () => {
778
+ relations = [];
779
+ latestRequirement = {};
780
+ requirements = {};
781
+ latestElement = {};
782
+ elements = {};
783
+ clear$1();
784
+ };
785
+ const db = {
786
+ RequirementType,
787
+ RiskLevel,
788
+ VerifyType,
789
+ Relationships,
790
+ getConfig: () => getConfig().req,
791
+ addRequirement,
792
+ getRequirements,
793
+ setNewReqId,
794
+ setNewReqText,
795
+ setNewReqRisk,
796
+ setNewReqVerifyMethod,
797
+ setAccTitle,
798
+ getAccTitle,
799
+ setAccDescription,
800
+ getAccDescription,
801
+ addElement,
802
+ getElements,
803
+ setNewElementType,
804
+ setNewElementDocRef,
805
+ addRelationship,
806
+ getRelationships,
807
+ clear
808
+ };
809
+ const getStyles = (options) => `
810
+
811
+ marker {
812
+ fill: ${options.relationColor};
813
+ stroke: ${options.relationColor};
814
+ }
815
+
816
+ marker.cross {
817
+ stroke: ${options.lineColor};
818
+ }
819
+
820
+ svg {
821
+ font-family: ${options.fontFamily};
822
+ font-size: ${options.fontSize};
823
+ }
824
+
825
+ .reqBox {
826
+ fill: ${options.requirementBackground};
827
+ fill-opacity: 1.0;
828
+ stroke: ${options.requirementBorderColor};
829
+ stroke-width: ${options.requirementBorderSize};
830
+ }
831
+
832
+ .reqTitle, .reqLabel{
833
+ fill: ${options.requirementTextColor};
834
+ }
835
+ .reqLabelBox {
836
+ fill: ${options.relationLabelBackground};
837
+ fill-opacity: 1.0;
838
+ }
839
+
840
+ .req-title-line {
841
+ stroke: ${options.requirementBorderColor};
842
+ stroke-width: ${options.requirementBorderSize};
843
+ }
844
+ .relationshipLine {
845
+ stroke: ${options.relationColor};
846
+ stroke-width: 1;
847
+ }
848
+ .relationshipLabel {
849
+ fill: ${options.relationLabelColor};
850
+ }
851
+
852
+ `;
853
+ const styles = getStyles;
854
+ const ReqMarkers = {
855
+ CONTAINS: "contains",
856
+ ARROW: "arrow"
857
+ };
858
+ const insertLineEndings = (parentNode, conf2) => {
859
+ let containsNode = parentNode.append("defs").append("marker").attr("id", ReqMarkers.CONTAINS + "_line_ending").attr("refX", 0).attr("refY", conf2.line_height / 2).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("g");
860
+ containsNode.append("circle").attr("cx", conf2.line_height / 2).attr("cy", conf2.line_height / 2).attr("r", conf2.line_height / 2).attr("fill", "none");
861
+ containsNode.append("line").attr("x1", 0).attr("x2", conf2.line_height).attr("y1", conf2.line_height / 2).attr("y2", conf2.line_height / 2).attr("stroke-width", 1);
862
+ containsNode.append("line").attr("y1", 0).attr("y2", conf2.line_height).attr("x1", conf2.line_height / 2).attr("x2", conf2.line_height / 2).attr("stroke-width", 1);
863
+ parentNode.append("defs").append("marker").attr("id", ReqMarkers.ARROW + "_line_ending").attr("refX", conf2.line_height).attr("refY", 0.5 * conf2.line_height).attr("markerWidth", conf2.line_height).attr("markerHeight", conf2.line_height).attr("orient", "auto").append("path").attr(
864
+ "d",
865
+ `M0,0
866
+ L${conf2.line_height},${conf2.line_height / 2}
867
+ M${conf2.line_height},${conf2.line_height / 2}
868
+ L0,${conf2.line_height}`
869
+ ).attr("stroke-width", 1);
870
+ };
871
+ const markers = {
872
+ ReqMarkers,
873
+ insertLineEndings
874
+ };
875
+ let conf = {};
876
+ let relCnt = 0;
877
+ const newRectNode = (parentNode, id) => {
878
+ return parentNode.insert("rect", "#" + id).attr("class", "req reqBox").attr("x", 0).attr("y", 0).attr("width", conf.rect_min_width + "px").attr("height", conf.rect_min_height + "px");
879
+ };
880
+ const newTitleNode = (parentNode, id, txts) => {
881
+ let x = conf.rect_min_width / 2;
882
+ let title = parentNode.append("text").attr("class", "req reqLabel reqTitle").attr("id", id).attr("x", x).attr("y", conf.rect_padding).attr("dominant-baseline", "hanging");
883
+ let i = 0;
884
+ txts.forEach((textStr) => {
885
+ if (i == 0) {
886
+ title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", 0).text(textStr);
887
+ } else {
888
+ title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", conf.line_height * 0.75).text(textStr);
889
+ }
890
+ i++;
891
+ });
892
+ let yPadding = 1.5 * conf.rect_padding;
893
+ let linePadding = i * conf.line_height * 0.75;
894
+ let totalY = yPadding + linePadding;
895
+ parentNode.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", conf.rect_min_width).attr("y1", totalY).attr("y2", totalY);
896
+ return {
897
+ titleNode: title,
898
+ y: totalY
899
+ };
900
+ };
901
+ const newBodyNode = (parentNode, id, txts, yStart) => {
902
+ let body = parentNode.append("text").attr("class", "req reqLabel").attr("id", id).attr("x", conf.rect_padding).attr("y", yStart).attr("dominant-baseline", "hanging");
903
+ let currentRow = 0;
904
+ const charLimit = 30;
905
+ let wrappedTxts = [];
906
+ txts.forEach((textStr) => {
907
+ let currentTextLen = textStr.length;
908
+ while (currentTextLen > charLimit && currentRow < 3) {
909
+ let firstPart = textStr.substring(0, charLimit);
910
+ textStr = textStr.substring(charLimit, textStr.length);
911
+ currentTextLen = textStr.length;
912
+ wrappedTxts[wrappedTxts.length] = firstPart;
913
+ currentRow++;
914
+ }
915
+ if (currentRow == 3) {
916
+ let lastStr = wrappedTxts[wrappedTxts.length - 1];
917
+ wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + "...";
918
+ } else {
919
+ wrappedTxts[wrappedTxts.length] = textStr;
920
+ }
921
+ currentRow = 0;
922
+ });
923
+ wrappedTxts.forEach((textStr) => {
924
+ body.append("tspan").attr("x", conf.rect_padding).attr("dy", conf.line_height).text(textStr);
925
+ });
926
+ return body;
927
+ };
928
+ const addEdgeLabel = (parentNode, svgPath, conf2, txt) => {
929
+ const len = svgPath.node().getTotalLength();
930
+ const labelPoint = svgPath.node().getPointAtLength(len * 0.5);
931
+ const labelId = "rel" + relCnt;
932
+ relCnt++;
933
+ const labelNode = parentNode.append("text").attr("class", "req relationshipLabel").attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(txt);
934
+ const labelBBox = labelNode.node().getBBox();
935
+ parentNode.insert("rect", "#" + labelId).attr("class", "req reqLabelBox").attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height).attr("fill", "white").attr("fill-opacity", "85%");
936
+ };
937
+ const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) {
938
+ const edge = g.edge(elementString(rel.src), elementString(rel.dst));
939
+ const lineFunction = line().x(function(d) {
940
+ return d.x;
941
+ }).y(function(d) {
942
+ return d.y;
943
+ });
944
+ const svgPath = svg.insert("path", "#" + insert).attr("class", "er relationshipLine").attr("d", lineFunction(edge.points)).attr("fill", "none");
945
+ if (rel.type == diagObj.db.Relationships.CONTAINS) {
946
+ svgPath.attr(
947
+ "marker-start",
948
+ "url(" + common.getUrl(conf.arrowMarkerAbsolute) + "#" + rel.type + "_line_ending)"
949
+ );
950
+ } else {
951
+ svgPath.attr("stroke-dasharray", "10,7");
952
+ svgPath.attr(
953
+ "marker-end",
954
+ "url(" + common.getUrl(conf.arrowMarkerAbsolute) + "#" + markers.ReqMarkers.ARROW + "_line_ending)"
955
+ );
956
+ }
957
+ addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`);
958
+ return;
959
+ };
960
+ const drawReqs = (reqs, graph, svgNode) => {
961
+ Object.keys(reqs).forEach((reqName) => {
962
+ let req = reqs[reqName];
963
+ reqName = elementString(reqName);
964
+ log.info("Added new requirement: ", reqName);
965
+ const groupNode = svgNode.append("g").attr("id", reqName);
966
+ const textId = "req-" + reqName;
967
+ const rectNode = newRectNode(groupNode, textId);
968
+ let titleNodeInfo = newTitleNode(groupNode, reqName + "_title", [
969
+ `<<${req.type}>>`,
970
+ `${req.name}`
971
+ ]);
972
+ newBodyNode(
973
+ groupNode,
974
+ reqName + "_body",
975
+ [
976
+ `Id: ${req.id}`,
977
+ `Text: ${req.text}`,
978
+ `Risk: ${req.risk}`,
979
+ `Verification: ${req.verifyMethod}`
980
+ ],
981
+ titleNodeInfo.y
982
+ );
983
+ const rectBBox = rectNode.node().getBBox();
984
+ graph.setNode(reqName, {
985
+ width: rectBBox.width,
986
+ height: rectBBox.height,
987
+ shape: "rect",
988
+ id: reqName
989
+ });
990
+ });
991
+ };
992
+ const drawElements = (els, graph, svgNode) => {
993
+ Object.keys(els).forEach((elName) => {
994
+ let el = els[elName];
995
+ const id = elementString(elName);
996
+ const groupNode = svgNode.append("g").attr("id", id);
997
+ const textId = "element-" + id;
998
+ const rectNode = newRectNode(groupNode, textId);
999
+ let titleNodeInfo = newTitleNode(groupNode, textId + "_title", [`<<Element>>`, `${elName}`]);
1000
+ newBodyNode(
1001
+ groupNode,
1002
+ textId + "_body",
1003
+ [`Type: ${el.type || "Not Specified"}`, `Doc Ref: ${el.docRef || "None"}`],
1004
+ titleNodeInfo.y
1005
+ );
1006
+ const rectBBox = rectNode.node().getBBox();
1007
+ graph.setNode(id, {
1008
+ width: rectBBox.width,
1009
+ height: rectBBox.height,
1010
+ shape: "rect",
1011
+ id
1012
+ });
1013
+ });
1014
+ };
1015
+ const addRelationships = (relationships, g) => {
1016
+ relationships.forEach(function(r) {
1017
+ let src = elementString(r.src);
1018
+ let dst = elementString(r.dst);
1019
+ g.setEdge(src, dst, { relationship: r });
1020
+ });
1021
+ return relationships;
1022
+ };
1023
+ const adjustEntities = function(svgNode, graph) {
1024
+ graph.nodes().forEach(function(v) {
1025
+ if (v !== void 0 && graph.node(v) !== void 0) {
1026
+ svgNode.select("#" + v);
1027
+ svgNode.select("#" + v).attr(
1028
+ "transform",
1029
+ "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )"
1030
+ );
1031
+ }
1032
+ });
1033
+ return;
1034
+ };
1035
+ const elementString = (str) => {
1036
+ return str.replace(/\s/g, "").replace(/\./g, "_");
1037
+ };
1038
+ const draw = (text, id, _version, diagObj) => {
1039
+ conf = getConfig().requirement;
1040
+ const securityLevel = conf.securityLevel;
1041
+ let sandboxElement;
1042
+ if (securityLevel === "sandbox") {
1043
+ sandboxElement = d3select("#i" + id);
1044
+ }
1045
+ const root = securityLevel === "sandbox" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select("body");
1046
+ const svg = root.select(`[id='${id}']`);
1047
+ markers.insertLineEndings(svg, conf);
1048
+ const g = new Graph({
1049
+ multigraph: false,
1050
+ compound: false,
1051
+ directed: true
1052
+ }).setGraph({
1053
+ rankdir: conf.layoutDirection,
1054
+ marginx: 20,
1055
+ marginy: 20,
1056
+ nodesep: 100,
1057
+ edgesep: 100,
1058
+ ranksep: 100
1059
+ }).setDefaultEdgeLabel(function() {
1060
+ return {};
1061
+ });
1062
+ let requirements2 = diagObj.db.getRequirements();
1063
+ let elements2 = diagObj.db.getElements();
1064
+ let relationships = diagObj.db.getRelationships();
1065
+ drawReqs(requirements2, g, svg);
1066
+ drawElements(elements2, g, svg);
1067
+ addRelationships(relationships, g);
1068
+ layout(g);
1069
+ adjustEntities(svg, g);
1070
+ relationships.forEach(function(rel) {
1071
+ drawRelationshipFromLayout(svg, rel, g, id, diagObj);
1072
+ });
1073
+ const padding = conf.rect_padding;
1074
+ const svgBounds = svg.node().getBBox();
1075
+ const width = svgBounds.width + padding * 2;
1076
+ const height = svgBounds.height + padding * 2;
1077
+ configureSvgSize(svg, height, width, conf.useMaxWidth);
1078
+ svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);
1079
+ };
1080
+ const renderer = {
1081
+ draw
1082
+ };
1083
+ const diagram = {
1084
+ parser: parser$1,
1085
+ db,
1086
+ renderer,
1087
+ styles
1088
+ };
1089
+ export {
1090
+ diagram
1091
+ };