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