@8btc/xcanvas 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +70 -0
  2. package/dist/Tableau10-BqnYsPR6.js +9 -0
  3. package/dist/XCanvas-BxdLBkBz.js +27732 -0
  4. package/dist/_commonjs-dynamic-modules-TGKdzP3c.js +6 -0
  5. package/dist/ar-SA-G6X2FPQ2-DjqDLLYL.js +41 -0
  6. package/dist/arc-D1qX5GFf.js +132 -0
  7. package/dist/array-DgktLKBx.js +6 -0
  8. package/dist/az-AZ-76LH7QW2-D7LOsF3_.js +32 -0
  9. package/dist/bg-BG-XCXSNQG7-WI4tFn23.js +36 -0
  10. package/dist/blockDiagram-38ab4fdb-DtemKfEh.js +1811 -0
  11. package/dist/bn-BD-2XOGV67Q-Bugx_8fy.js +36 -0
  12. package/dist/c4Diagram-3d4e48cf-Byd2vU9K.js +2463 -0
  13. package/dist/ca-ES-6MX7JW3Y-6rFwKGsQ.js +39 -0
  14. package/dist/channel-BT_3Ze-Y.js +7 -0
  15. package/dist/chunk-EIO257PC-C7qD7hGu.js +1641 -0
  16. package/dist/classDiagram-70f12bd4-CwfYadk-.js +354 -0
  17. package/dist/classDiagram-v2-f2320105-B28MuM8f.js +284 -0
  18. package/dist/clone-D2FUK8WY.js +8 -0
  19. package/dist/createText-2e5e7dd3-Ca1JfQaJ.js +4914 -0
  20. package/dist/cs-CZ-2BRQDIVT-Dhd8XszK.js +42 -0
  21. package/dist/da-DK-5WZEPLOC-BhL87sSs.js +36 -0
  22. package/dist/de-DE-XR44H4JA-xSrZSV0J.js +39 -0
  23. package/dist/directory-open-01563666-XowynPwH.js +14 -0
  24. package/dist/directory-open-4ed118d0-BwYbu9dw.js +55 -0
  25. package/dist/edges-e0da2a9e-9VbVapWU.js +1840 -0
  26. package/dist/el-GR-BZB4AONW-DQORZ_pY.js +41 -0
  27. package/dist/en-B4ZKOASM-D2BVbEdz.js +39 -0
  28. package/dist/erDiagram-9861fffd-D4S9QDes.js +1318 -0
  29. package/dist/es-ES-U4NZUMDT-C0Q89-0V.js +40 -0
  30. package/dist/eu-ES-A7QVB2H4-BwBW3cEw.js +42 -0
  31. package/dist/fa-IR-HGAKTJCU-DtZ74rm4.js +39 -0
  32. package/dist/fi-FI-Z5N7JZ37-QvQan48z.js +37 -0
  33. package/dist/file-open-002ab408-BNIYSKAV.js +18 -0
  34. package/dist/file-open-7c801643-B_l1UXdI.js +15 -0
  35. package/dist/file-save-3189631c-vzijizFw.js +23 -0
  36. package/dist/file-save-745eba88-B5-wM56X.js +25 -0
  37. package/dist/flowDb-956e92f1-S6T8ppJw.js +1713 -0
  38. package/dist/flowDiagram-66a62f08-C6TTwS5_.js +1264 -0
  39. package/dist/flowDiagram-v2-96b9c2cf-CzfeUNGP.js +24 -0
  40. package/dist/flowchart-elk-definition-4a651766-CRv1kWtk.js +92922 -0
  41. package/dist/fr-FR-RHASNOE6-CZFiweNU.js +40 -0
  42. package/dist/ganttDiagram-c361ad54-CAnfd8Sw.js +3420 -0
  43. package/dist/gitGraphDiagram-72cf32ee-CSGI-xRI.js +1790 -0
  44. package/dist/gl-ES-HMX3MZ6V-Bqv2xL-V.js +41 -0
  45. package/dist/graph-Ct2tKpKj.js +1253 -0
  46. package/dist/he-IL-6SHJWFNN-kso30jhn.js +41 -0
  47. package/dist/hi-IN-IWLTKZ5I-Busk5oaa.js +35 -0
  48. package/dist/hu-HU-A5ZG7DT2-xSR2C2H0.js +38 -0
  49. package/dist/id-ID-SAP4L64H-BQQZYm1L.js +41 -0
  50. package/dist/image-EDRW2JGV-Cx7o2kxD.js +6 -0
  51. package/dist/image-blob-reduce.esm-BKPqMdie.js +2396 -0
  52. package/dist/index-3862675e-B3j3w-v_.js +663 -0
  53. package/dist/index-CLOU2Ikr.js +14364 -0
  54. package/dist/index.css +450 -0
  55. package/dist/index.d.ts +40 -0
  56. package/dist/index.js +7 -0
  57. package/dist/index.umd.cjs +235477 -0
  58. package/dist/infoDiagram-f8f76790-NqA75uBo.js +510 -0
  59. package/dist/init-ZxktEp_H.js +16 -0
  60. package/dist/it-IT-JPQ66NNP-CAMVZrYt.js +42 -0
  61. package/dist/ja-JP-DBVTYXUO-CAX8A_Uj.js +39 -0
  62. package/dist/journeyDiagram-49397b02-By5oBzsZ.js +1182 -0
  63. package/dist/kaa-6HZHGXH3-4-o94cPY.js +32 -0
  64. package/dist/kab-KAB-ZGHBKWFO-CgyjjBvZ.js +39 -0
  65. package/dist/katex-C-jAQc2m.js +14516 -0
  66. package/dist/kk-KZ-P5N5QNE5-BEqZcwLA.js +32 -0
  67. package/dist/km-KH-HSX4SM5Z-DvKDbeH4.js +42 -0
  68. package/dist/ko-KR-MTYHY66A-DKCuAbKE.js +40 -0
  69. package/dist/ku-TR-6OUDTVRD-CNUs4cCe.js +40 -0
  70. package/dist/layout-AJxYKqQV.js +2292 -0
  71. package/dist/line-DJIf5OM8.js +45 -0
  72. package/dist/linear-Cfj4s4vI.js +539 -0
  73. package/dist/lt-LT-XHIRWOB4-gouzGdoW.js +34 -0
  74. package/dist/lv-LV-5QDEKY6T-CTvg1XFv.js +38 -0
  75. package/dist/mindmap-definition-fc14e90a-CBlwH_UF.js +35283 -0
  76. package/dist/mr-IN-CRQNXWMA-QeYm06Kq.js +44 -0
  77. package/dist/my-MM-5M5IBNSE-DG3k9ORf.js +32 -0
  78. package/dist/nb-NO-T6EIAALU-Cj995Nmg.js +41 -0
  79. package/dist/nl-NL-IS3SIHDZ-B-2H7xey.js +39 -0
  80. package/dist/nn-NO-6E72VCQL-DrAwKKTN.js +39 -0
  81. package/dist/oc-FR-POXYY2M6-CeyJD7tq.js +39 -0
  82. package/dist/ordinal-DSZU4PqD.js +76 -0
  83. package/dist/pa-IN-N4M65BXN-DHzi6mjo.js +35 -0
  84. package/dist/path-Cp2qmpkd.js +109 -0
  85. package/dist/percentages-BXMCSKIN-CDYsTuua.js +6 -0
  86. package/dist/pica-CzzcRNRD.js +1702 -0
  87. package/dist/pieDiagram-8a3498a8-DueGoZOh.js +768 -0
  88. package/dist/pl-PL-T2D74RX3-BBNEV2c6.js +40 -0
  89. package/dist/pt-BR-5N22H2LF-D2cTx_F0.js +40 -0
  90. package/dist/pt-PT-UZXXM6DQ-BddvLLsF.js +40 -0
  91. package/dist/quadrantDiagram-120e2f19-Tb6_oGIn.js +1198 -0
  92. package/dist/requirementDiagram-deff3bca-CEeg0ep-.js +1089 -0
  93. package/dist/ro-RO-JPDTUUEW-DynuW50i.js +42 -0
  94. package/dist/roundRect-CjfubgrN.js +152 -0
  95. package/dist/ru-RU-B4JR7IUQ-B5Hecrew.js +40 -0
  96. package/dist/sankeyDiagram-04a897e0-CGTLQ8Gm.js +1172 -0
  97. package/dist/sequenceDiagram-704730f1-CZ72D-Nd.js +3336 -0
  98. package/dist/si-LK-N5RQ5JYF-BGMa93tc.js +32 -0
  99. package/dist/sk-SK-C5VTKIMK-BttCAlBm.js +37 -0
  100. package/dist/sl-SI-NN7IZMDC-DTC59nzG.js +37 -0
  101. package/dist/stateDiagram-587899a1-XISZzz_f.js +451 -0
  102. package/dist/stateDiagram-v2-d93cdb3a-DbCcmzTc.js +319 -0
  103. package/dist/styles-6aaf32cf-CyfdkEib.js +1363 -0
  104. package/dist/styles-9a916d00-zQ92RrTB.js +1483 -0
  105. package/dist/styles-c10674c1-BWmkigmR.js +571 -0
  106. package/dist/subset-shared.chunk-BuFt2PpZ.js +8 -0
  107. package/dist/subset-worker.chunk-CgaFXU4O.js +14 -0
  108. package/dist/sv-SE-XGPEYMSR-BPDlPxC1.js +41 -0
  109. package/dist/svgDrawCommon-08f97a94-CJ0lufOi.js +100 -0
  110. package/dist/ta-IN-2NMHFXQM-CI1ZsNk9.js +40 -0
  111. package/dist/th-TH-HPSO5L25-CUM-w2Qt.js +33 -0
  112. package/dist/timeline-definition-85554ec2-DV6084Gl.js +1210 -0
  113. package/dist/tr-TR-DEFEU3FU-CGpyf_vD.js +38 -0
  114. package/dist/uk-UA-QMV73CPH-Bg15Mv3J.js +37 -0
  115. package/dist/vi-VN-M7AON7JQ-AYmca9so.js +36 -0
  116. package/dist/vite.svg +1 -0
  117. package/dist/xychartDiagram-e933f94c-P1e6EEaH.js +1796 -0
  118. package/dist/zh-CN-LNUGB5OW-Dem2Cc-c.js +41 -0
  119. package/dist/zh-HK-E62DVLB3-BjsDyiLI.js +32 -0
  120. package/dist/zh-TW-RAJ6MFWO-IDAsc9Pz.js +40 -0
  121. package/package.json +52 -0
@@ -0,0 +1,1089 @@
1
+ import { a as getAccDescription, s as setAccDescription, b as getAccTitle, c as setAccTitle, g as getConfig, d as select, e as configureSvgSize, r as clear$1, l as log$1, k as common$1 } from "./index-CLOU2Ikr.js";
2
+ import { G as Graph } from "./graph-Ct2tKpKj.js";
3
+ import { l as layout } from "./layout-AJxYKqQV.js";
4
+ import { l as line } from "./line-DJIf5OM8.js";
5
+ var parser = (function() {
6
+ var o = function(k, v, o2, l) {
7
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
8
+ ;
9
+ return o2;
10
+ }, $V0 = [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];
11
+ var parser2 = {
12
+ trace: function trace() {
13
+ },
14
+ yy: {},
15
+ 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 },
16
+ 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" },
17
+ 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]],
18
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
19
+ var $0 = $$.length - 1;
20
+ switch (yystate) {
21
+ case 4:
22
+ this.$ = $$[$0].trim();
23
+ yy.setAccTitle(this.$);
24
+ break;
25
+ case 5:
26
+ case 6:
27
+ this.$ = $$[$0].trim();
28
+ yy.setAccDescription(this.$);
29
+ break;
30
+ case 7:
31
+ this.$ = [];
32
+ break;
33
+ case 13:
34
+ yy.addRequirement($$[$0 - 3], $$[$0 - 4]);
35
+ break;
36
+ case 14:
37
+ yy.setNewReqId($$[$0 - 2]);
38
+ break;
39
+ case 15:
40
+ yy.setNewReqText($$[$0 - 2]);
41
+ break;
42
+ case 16:
43
+ yy.setNewReqRisk($$[$0 - 2]);
44
+ break;
45
+ case 17:
46
+ yy.setNewReqVerifyMethod($$[$0 - 2]);
47
+ break;
48
+ case 20:
49
+ this.$ = yy.RequirementType.REQUIREMENT;
50
+ break;
51
+ case 21:
52
+ this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT;
53
+ break;
54
+ case 22:
55
+ this.$ = yy.RequirementType.INTERFACE_REQUIREMENT;
56
+ break;
57
+ case 23:
58
+ this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT;
59
+ break;
60
+ case 24:
61
+ this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT;
62
+ break;
63
+ case 25:
64
+ this.$ = yy.RequirementType.DESIGN_CONSTRAINT;
65
+ break;
66
+ case 26:
67
+ this.$ = yy.RiskLevel.LOW_RISK;
68
+ break;
69
+ case 27:
70
+ this.$ = yy.RiskLevel.MED_RISK;
71
+ break;
72
+ case 28:
73
+ this.$ = yy.RiskLevel.HIGH_RISK;
74
+ break;
75
+ case 29:
76
+ this.$ = yy.VerifyType.VERIFY_ANALYSIS;
77
+ break;
78
+ case 30:
79
+ this.$ = yy.VerifyType.VERIFY_DEMONSTRATION;
80
+ break;
81
+ case 31:
82
+ this.$ = yy.VerifyType.VERIFY_INSPECTION;
83
+ break;
84
+ case 32:
85
+ this.$ = yy.VerifyType.VERIFY_TEST;
86
+ break;
87
+ case 33:
88
+ yy.addElement($$[$0 - 3]);
89
+ break;
90
+ case 34:
91
+ yy.setNewElementType($$[$0 - 2]);
92
+ break;
93
+ case 35:
94
+ yy.setNewElementDocRef($$[$0 - 2]);
95
+ break;
96
+ case 38:
97
+ yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]);
98
+ break;
99
+ case 39:
100
+ yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]);
101
+ break;
102
+ case 40:
103
+ this.$ = yy.Relationships.CONTAINS;
104
+ break;
105
+ case 41:
106
+ this.$ = yy.Relationships.COPIES;
107
+ break;
108
+ case 42:
109
+ this.$ = yy.Relationships.DERIVES;
110
+ break;
111
+ case 43:
112
+ this.$ = yy.Relationships.SATISFIES;
113
+ break;
114
+ case 44:
115
+ this.$ = yy.Relationships.VERIFIES;
116
+ break;
117
+ case 45:
118
+ this.$ = yy.Relationships.REFINES;
119
+ break;
120
+ case 46:
121
+ this.$ = yy.Relationships.TRACES;
122
+ break;
123
+ }
124
+ },
125
+ 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])],
126
+ 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] },
127
+ parseError: function parseError(str, hash) {
128
+ if (hash.recoverable) {
129
+ this.trace(str);
130
+ } else {
131
+ var error = new Error(str);
132
+ error.hash = hash;
133
+ throw error;
134
+ }
135
+ },
136
+ parse: function parse(input) {
137
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
138
+ var args = lstack.slice.call(arguments, 1);
139
+ var lexer2 = Object.create(this.lexer);
140
+ var sharedState = { yy: {} };
141
+ for (var k in this.yy) {
142
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
143
+ sharedState.yy[k] = this.yy[k];
144
+ }
145
+ }
146
+ lexer2.setInput(input, sharedState.yy);
147
+ sharedState.yy.lexer = lexer2;
148
+ sharedState.yy.parser = this;
149
+ if (typeof lexer2.yylloc == "undefined") {
150
+ lexer2.yylloc = {};
151
+ }
152
+ var yyloc = lexer2.yylloc;
153
+ lstack.push(yyloc);
154
+ var ranges = lexer2.options && lexer2.options.ranges;
155
+ if (typeof sharedState.yy.parseError === "function") {
156
+ this.parseError = sharedState.yy.parseError;
157
+ } else {
158
+ this.parseError = Object.getPrototypeOf(this).parseError;
159
+ }
160
+ function lex() {
161
+ var token;
162
+ token = tstack.pop() || lexer2.lex() || EOF;
163
+ if (typeof token !== "number") {
164
+ if (token instanceof Array) {
165
+ tstack = token;
166
+ token = tstack.pop();
167
+ }
168
+ token = self.symbols_[token] || token;
169
+ }
170
+ return token;
171
+ }
172
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
173
+ while (true) {
174
+ state = stack[stack.length - 1];
175
+ if (this.defaultActions[state]) {
176
+ action = this.defaultActions[state];
177
+ } else {
178
+ if (symbol === null || typeof symbol == "undefined") {
179
+ symbol = lex();
180
+ }
181
+ action = table[state] && table[state][symbol];
182
+ }
183
+ if (typeof action === "undefined" || !action.length || !action[0]) {
184
+ var errStr = "";
185
+ expected = [];
186
+ for (p in table[state]) {
187
+ if (this.terminals_[p] && p > TERROR) {
188
+ expected.push("'" + this.terminals_[p] + "'");
189
+ }
190
+ }
191
+ if (lexer2.showPosition) {
192
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
193
+ } else {
194
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
195
+ }
196
+ this.parseError(errStr, {
197
+ text: lexer2.match,
198
+ token: this.terminals_[symbol] || symbol,
199
+ line: lexer2.yylineno,
200
+ loc: yyloc,
201
+ expected
202
+ });
203
+ }
204
+ if (action[0] instanceof Array && action.length > 1) {
205
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
206
+ }
207
+ switch (action[0]) {
208
+ case 1:
209
+ stack.push(symbol);
210
+ vstack.push(lexer2.yytext);
211
+ lstack.push(lexer2.yylloc);
212
+ stack.push(action[1]);
213
+ symbol = null;
214
+ {
215
+ yyleng = lexer2.yyleng;
216
+ yytext = lexer2.yytext;
217
+ yylineno = lexer2.yylineno;
218
+ yyloc = lexer2.yylloc;
219
+ }
220
+ break;
221
+ case 2:
222
+ len = this.productions_[action[1]][1];
223
+ yyval.$ = vstack[vstack.length - len];
224
+ yyval._$ = {
225
+ first_line: lstack[lstack.length - (len || 1)].first_line,
226
+ last_line: lstack[lstack.length - 1].last_line,
227
+ first_column: lstack[lstack.length - (len || 1)].first_column,
228
+ last_column: lstack[lstack.length - 1].last_column
229
+ };
230
+ if (ranges) {
231
+ yyval._$.range = [
232
+ lstack[lstack.length - (len || 1)].range[0],
233
+ lstack[lstack.length - 1].range[1]
234
+ ];
235
+ }
236
+ r = this.performAction.apply(yyval, [
237
+ yytext,
238
+ yyleng,
239
+ yylineno,
240
+ sharedState.yy,
241
+ action[1],
242
+ vstack,
243
+ lstack
244
+ ].concat(args));
245
+ if (typeof r !== "undefined") {
246
+ return r;
247
+ }
248
+ if (len) {
249
+ stack = stack.slice(0, -1 * len * 2);
250
+ vstack = vstack.slice(0, -1 * len);
251
+ lstack = lstack.slice(0, -1 * len);
252
+ }
253
+ stack.push(this.productions_[action[1]][0]);
254
+ vstack.push(yyval.$);
255
+ lstack.push(yyval._$);
256
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
257
+ stack.push(newState);
258
+ break;
259
+ case 3:
260
+ return true;
261
+ }
262
+ }
263
+ return true;
264
+ }
265
+ };
266
+ var lexer = /* @__PURE__ */ (function() {
267
+ var lexer2 = {
268
+ EOF: 1,
269
+ parseError: function parseError(str, hash) {
270
+ if (this.yy.parser) {
271
+ this.yy.parser.parseError(str, hash);
272
+ } else {
273
+ throw new Error(str);
274
+ }
275
+ },
276
+ // resets the lexer, sets new input
277
+ setInput: function(input, yy) {
278
+ this.yy = yy || this.yy || {};
279
+ this._input = input;
280
+ this._more = this._backtrack = this.done = false;
281
+ this.yylineno = this.yyleng = 0;
282
+ this.yytext = this.matched = this.match = "";
283
+ this.conditionStack = ["INITIAL"];
284
+ this.yylloc = {
285
+ first_line: 1,
286
+ first_column: 0,
287
+ last_line: 1,
288
+ last_column: 0
289
+ };
290
+ if (this.options.ranges) {
291
+ this.yylloc.range = [0, 0];
292
+ }
293
+ this.offset = 0;
294
+ return this;
295
+ },
296
+ // consumes and returns one char from the input
297
+ input: function() {
298
+ var ch = this._input[0];
299
+ this.yytext += ch;
300
+ this.yyleng++;
301
+ this.offset++;
302
+ this.match += ch;
303
+ this.matched += ch;
304
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
305
+ if (lines) {
306
+ this.yylineno++;
307
+ this.yylloc.last_line++;
308
+ } else {
309
+ this.yylloc.last_column++;
310
+ }
311
+ if (this.options.ranges) {
312
+ this.yylloc.range[1]++;
313
+ }
314
+ this._input = this._input.slice(1);
315
+ return ch;
316
+ },
317
+ // unshifts one char (or a string) into the input
318
+ unput: function(ch) {
319
+ var len = ch.length;
320
+ var lines = ch.split(/(?:\r\n?|\n)/g);
321
+ this._input = ch + this._input;
322
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
323
+ this.offset -= len;
324
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
325
+ this.match = this.match.substr(0, this.match.length - 1);
326
+ this.matched = this.matched.substr(0, this.matched.length - 1);
327
+ if (lines.length - 1) {
328
+ this.yylineno -= lines.length - 1;
329
+ }
330
+ var r = this.yylloc.range;
331
+ this.yylloc = {
332
+ first_line: this.yylloc.first_line,
333
+ last_line: this.yylineno + 1,
334
+ first_column: this.yylloc.first_column,
335
+ 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
336
+ };
337
+ if (this.options.ranges) {
338
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
339
+ }
340
+ this.yyleng = this.yytext.length;
341
+ return this;
342
+ },
343
+ // When called from action, caches matched text and appends it on next action
344
+ more: function() {
345
+ this._more = true;
346
+ return this;
347
+ },
348
+ // 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.
349
+ reject: function() {
350
+ if (this.options.backtrack_lexer) {
351
+ this._backtrack = true;
352
+ } else {
353
+ 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(), {
354
+ text: "",
355
+ token: null,
356
+ line: this.yylineno
357
+ });
358
+ }
359
+ return this;
360
+ },
361
+ // retain first n characters of the match
362
+ less: function(n) {
363
+ this.unput(this.match.slice(n));
364
+ },
365
+ // displays already matched input, i.e. for error messages
366
+ pastInput: function() {
367
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
368
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
369
+ },
370
+ // displays upcoming input, i.e. for error messages
371
+ upcomingInput: function() {
372
+ var next = this.match;
373
+ if (next.length < 20) {
374
+ next += this._input.substr(0, 20 - next.length);
375
+ }
376
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
377
+ },
378
+ // displays the character position where the lexing error occurred, i.e. for error messages
379
+ showPosition: function() {
380
+ var pre = this.pastInput();
381
+ var c = new Array(pre.length + 1).join("-");
382
+ return pre + this.upcomingInput() + "\n" + c + "^";
383
+ },
384
+ // test the lexed token: return FALSE when not a match, otherwise return token
385
+ test_match: function(match, indexed_rule) {
386
+ var token, lines, backup;
387
+ if (this.options.backtrack_lexer) {
388
+ backup = {
389
+ yylineno: this.yylineno,
390
+ yylloc: {
391
+ first_line: this.yylloc.first_line,
392
+ last_line: this.last_line,
393
+ first_column: this.yylloc.first_column,
394
+ last_column: this.yylloc.last_column
395
+ },
396
+ yytext: this.yytext,
397
+ match: this.match,
398
+ matches: this.matches,
399
+ matched: this.matched,
400
+ yyleng: this.yyleng,
401
+ offset: this.offset,
402
+ _more: this._more,
403
+ _input: this._input,
404
+ yy: this.yy,
405
+ conditionStack: this.conditionStack.slice(0),
406
+ done: this.done
407
+ };
408
+ if (this.options.ranges) {
409
+ backup.yylloc.range = this.yylloc.range.slice(0);
410
+ }
411
+ }
412
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
413
+ if (lines) {
414
+ this.yylineno += lines.length;
415
+ }
416
+ this.yylloc = {
417
+ first_line: this.yylloc.last_line,
418
+ last_line: this.yylineno + 1,
419
+ first_column: this.yylloc.last_column,
420
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
421
+ };
422
+ this.yytext += match[0];
423
+ this.match += match[0];
424
+ this.matches = match;
425
+ this.yyleng = this.yytext.length;
426
+ if (this.options.ranges) {
427
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
428
+ }
429
+ this._more = false;
430
+ this._backtrack = false;
431
+ this._input = this._input.slice(match[0].length);
432
+ this.matched += match[0];
433
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
434
+ if (this.done && this._input) {
435
+ this.done = false;
436
+ }
437
+ if (token) {
438
+ return token;
439
+ } else if (this._backtrack) {
440
+ for (var k in backup) {
441
+ this[k] = backup[k];
442
+ }
443
+ return false;
444
+ }
445
+ return false;
446
+ },
447
+ // return next match in input
448
+ next: function() {
449
+ if (this.done) {
450
+ return this.EOF;
451
+ }
452
+ if (!this._input) {
453
+ this.done = true;
454
+ }
455
+ var token, match, tempMatch, index;
456
+ if (!this._more) {
457
+ this.yytext = "";
458
+ this.match = "";
459
+ }
460
+ var rules = this._currentRules();
461
+ for (var i = 0; i < rules.length; i++) {
462
+ tempMatch = this._input.match(this.rules[rules[i]]);
463
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
464
+ match = tempMatch;
465
+ index = i;
466
+ if (this.options.backtrack_lexer) {
467
+ token = this.test_match(tempMatch, rules[i]);
468
+ if (token !== false) {
469
+ return token;
470
+ } else if (this._backtrack) {
471
+ match = false;
472
+ continue;
473
+ } else {
474
+ return false;
475
+ }
476
+ } else if (!this.options.flex) {
477
+ break;
478
+ }
479
+ }
480
+ }
481
+ if (match) {
482
+ token = this.test_match(match, rules[index]);
483
+ if (token !== false) {
484
+ return token;
485
+ }
486
+ return false;
487
+ }
488
+ if (this._input === "") {
489
+ return this.EOF;
490
+ } else {
491
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
492
+ text: "",
493
+ token: null,
494
+ line: this.yylineno
495
+ });
496
+ }
497
+ },
498
+ // return next match that has a token
499
+ lex: function lex() {
500
+ var r = this.next();
501
+ if (r) {
502
+ return r;
503
+ } else {
504
+ return this.lex();
505
+ }
506
+ },
507
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
508
+ begin: function begin(condition) {
509
+ this.conditionStack.push(condition);
510
+ },
511
+ // pop the previously active lexer condition state off the condition stack
512
+ popState: function popState() {
513
+ var n = this.conditionStack.length - 1;
514
+ if (n > 0) {
515
+ return this.conditionStack.pop();
516
+ } else {
517
+ return this.conditionStack[0];
518
+ }
519
+ },
520
+ // produce the lexer rule set which is active for the currently active lexer condition state
521
+ _currentRules: function _currentRules() {
522
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
523
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
524
+ } else {
525
+ return this.conditions["INITIAL"].rules;
526
+ }
527
+ },
528
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
529
+ topState: function topState(n) {
530
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
531
+ if (n >= 0) {
532
+ return this.conditionStack[n];
533
+ } else {
534
+ return "INITIAL";
535
+ }
536
+ },
537
+ // alias for begin(condition)
538
+ pushState: function pushState(condition) {
539
+ this.begin(condition);
540
+ },
541
+ // return the number of states currently on the stack
542
+ stateStackSize: function stateStackSize() {
543
+ return this.conditionStack.length;
544
+ },
545
+ options: { "case-insensitive": true },
546
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
547
+ switch ($avoiding_name_collisions) {
548
+ case 0:
549
+ return "title";
550
+ case 1:
551
+ this.begin("acc_title");
552
+ return 9;
553
+ case 2:
554
+ this.popState();
555
+ return "acc_title_value";
556
+ case 3:
557
+ this.begin("acc_descr");
558
+ return 11;
559
+ case 4:
560
+ this.popState();
561
+ return "acc_descr_value";
562
+ case 5:
563
+ this.begin("acc_descr_multiline");
564
+ break;
565
+ case 6:
566
+ this.popState();
567
+ break;
568
+ case 7:
569
+ return "acc_descr_multiline_value";
570
+ case 8:
571
+ return 5;
572
+ case 9:
573
+ break;
574
+ case 10:
575
+ break;
576
+ case 11:
577
+ break;
578
+ case 12:
579
+ return 8;
580
+ case 13:
581
+ return 6;
582
+ case 14:
583
+ return 19;
584
+ case 15:
585
+ return 30;
586
+ case 16:
587
+ return 22;
588
+ case 17:
589
+ return 21;
590
+ case 18:
591
+ return 24;
592
+ case 19:
593
+ return 26;
594
+ case 20:
595
+ return 28;
596
+ case 21:
597
+ return 31;
598
+ case 22:
599
+ return 32;
600
+ case 23:
601
+ return 33;
602
+ case 24:
603
+ return 34;
604
+ case 25:
605
+ return 35;
606
+ case 26:
607
+ return 36;
608
+ case 27:
609
+ return 37;
610
+ case 28:
611
+ return 38;
612
+ case 29:
613
+ return 39;
614
+ case 30:
615
+ return 40;
616
+ case 31:
617
+ return 41;
618
+ case 32:
619
+ return 42;
620
+ case 33:
621
+ return 43;
622
+ case 34:
623
+ return 44;
624
+ case 35:
625
+ return 55;
626
+ case 36:
627
+ return 56;
628
+ case 37:
629
+ return 57;
630
+ case 38:
631
+ return 58;
632
+ case 39:
633
+ return 59;
634
+ case 40:
635
+ return 60;
636
+ case 41:
637
+ return 61;
638
+ case 42:
639
+ return 47;
640
+ case 43:
641
+ return 49;
642
+ case 44:
643
+ return 51;
644
+ case 45:
645
+ return 54;
646
+ case 46:
647
+ return 53;
648
+ case 47:
649
+ this.begin("string");
650
+ break;
651
+ case 48:
652
+ this.popState();
653
+ break;
654
+ case 49:
655
+ return "qString";
656
+ case 50:
657
+ yy_.yytext = yy_.yytext.trim();
658
+ return 62;
659
+ }
660
+ },
661
+ 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],
662
+ 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 } }
663
+ };
664
+ return lexer2;
665
+ })();
666
+ parser2.lexer = lexer;
667
+ function Parser() {
668
+ this.yy = {};
669
+ }
670
+ Parser.prototype = parser2;
671
+ parser2.Parser = Parser;
672
+ return new Parser();
673
+ })();
674
+ parser.parser = parser;
675
+ const parser$1 = parser;
676
+ let relations = [];
677
+ let latestRequirement = {};
678
+ let requirements = {};
679
+ let latestElement = {};
680
+ let elements = {};
681
+ const RequirementType = {
682
+ REQUIREMENT: "Requirement",
683
+ FUNCTIONAL_REQUIREMENT: "Functional Requirement",
684
+ INTERFACE_REQUIREMENT: "Interface Requirement",
685
+ PERFORMANCE_REQUIREMENT: "Performance Requirement",
686
+ PHYSICAL_REQUIREMENT: "Physical Requirement",
687
+ DESIGN_CONSTRAINT: "Design Constraint"
688
+ };
689
+ const RiskLevel = {
690
+ LOW_RISK: "Low",
691
+ MED_RISK: "Medium",
692
+ HIGH_RISK: "High"
693
+ };
694
+ const VerifyType = {
695
+ VERIFY_ANALYSIS: "Analysis",
696
+ VERIFY_DEMONSTRATION: "Demonstration",
697
+ VERIFY_INSPECTION: "Inspection",
698
+ VERIFY_TEST: "Test"
699
+ };
700
+ const Relationships = {
701
+ CONTAINS: "contains",
702
+ COPIES: "copies",
703
+ DERIVES: "derives",
704
+ SATISFIES: "satisfies",
705
+ VERIFIES: "verifies",
706
+ REFINES: "refines",
707
+ TRACES: "traces"
708
+ };
709
+ const addRequirement = (name, type) => {
710
+ if (requirements[name] === void 0) {
711
+ requirements[name] = {
712
+ name,
713
+ type,
714
+ id: latestRequirement.id,
715
+ text: latestRequirement.text,
716
+ risk: latestRequirement.risk,
717
+ verifyMethod: latestRequirement.verifyMethod
718
+ };
719
+ }
720
+ latestRequirement = {};
721
+ return requirements[name];
722
+ };
723
+ const getRequirements = () => requirements;
724
+ const setNewReqId = (id) => {
725
+ if (latestRequirement !== void 0) {
726
+ latestRequirement.id = id;
727
+ }
728
+ };
729
+ const setNewReqText = (text) => {
730
+ if (latestRequirement !== void 0) {
731
+ latestRequirement.text = text;
732
+ }
733
+ };
734
+ const setNewReqRisk = (risk) => {
735
+ if (latestRequirement !== void 0) {
736
+ latestRequirement.risk = risk;
737
+ }
738
+ };
739
+ const setNewReqVerifyMethod = (verifyMethod) => {
740
+ if (latestRequirement !== void 0) {
741
+ latestRequirement.verifyMethod = verifyMethod;
742
+ }
743
+ };
744
+ const addElement = (name) => {
745
+ if (elements[name] === void 0) {
746
+ elements[name] = {
747
+ name,
748
+ type: latestElement.type,
749
+ docRef: latestElement.docRef
750
+ };
751
+ log$1.info("Added new requirement: ", name);
752
+ }
753
+ latestElement = {};
754
+ return elements[name];
755
+ };
756
+ const getElements = () => elements;
757
+ const setNewElementType = (type) => {
758
+ if (latestElement !== void 0) {
759
+ latestElement.type = type;
760
+ }
761
+ };
762
+ const setNewElementDocRef = (docRef) => {
763
+ if (latestElement !== void 0) {
764
+ latestElement.docRef = docRef;
765
+ }
766
+ };
767
+ const addRelationship = (type, src, dst) => {
768
+ relations.push({
769
+ type,
770
+ src,
771
+ dst
772
+ });
773
+ };
774
+ const getRelationships = () => relations;
775
+ const clear = () => {
776
+ relations = [];
777
+ latestRequirement = {};
778
+ requirements = {};
779
+ latestElement = {};
780
+ elements = {};
781
+ clear$1();
782
+ };
783
+ const db = {
784
+ RequirementType,
785
+ RiskLevel,
786
+ VerifyType,
787
+ Relationships,
788
+ getConfig: () => getConfig().req,
789
+ addRequirement,
790
+ getRequirements,
791
+ setNewReqId,
792
+ setNewReqText,
793
+ setNewReqRisk,
794
+ setNewReqVerifyMethod,
795
+ setAccTitle,
796
+ getAccTitle,
797
+ setAccDescription,
798
+ getAccDescription,
799
+ addElement,
800
+ getElements,
801
+ setNewElementType,
802
+ setNewElementDocRef,
803
+ addRelationship,
804
+ getRelationships,
805
+ clear
806
+ };
807
+ const getStyles = (options) => `
808
+
809
+ marker {
810
+ fill: ${options.relationColor};
811
+ stroke: ${options.relationColor};
812
+ }
813
+
814
+ marker.cross {
815
+ stroke: ${options.lineColor};
816
+ }
817
+
818
+ svg {
819
+ font-family: ${options.fontFamily};
820
+ font-size: ${options.fontSize};
821
+ }
822
+
823
+ .reqBox {
824
+ fill: ${options.requirementBackground};
825
+ fill-opacity: 1.0;
826
+ stroke: ${options.requirementBorderColor};
827
+ stroke-width: ${options.requirementBorderSize};
828
+ }
829
+
830
+ .reqTitle, .reqLabel{
831
+ fill: ${options.requirementTextColor};
832
+ }
833
+ .reqLabelBox {
834
+ fill: ${options.relationLabelBackground};
835
+ fill-opacity: 1.0;
836
+ }
837
+
838
+ .req-title-line {
839
+ stroke: ${options.requirementBorderColor};
840
+ stroke-width: ${options.requirementBorderSize};
841
+ }
842
+ .relationshipLine {
843
+ stroke: ${options.relationColor};
844
+ stroke-width: 1;
845
+ }
846
+ .relationshipLabel {
847
+ fill: ${options.relationLabelColor};
848
+ }
849
+
850
+ `;
851
+ const styles = getStyles;
852
+ const ReqMarkers = {
853
+ CONTAINS: "contains",
854
+ ARROW: "arrow"
855
+ };
856
+ const insertLineEndings = (parentNode, conf2) => {
857
+ 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");
858
+ containsNode.append("circle").attr("cx", conf2.line_height / 2).attr("cy", conf2.line_height / 2).attr("r", conf2.line_height / 2).attr("fill", "none");
859
+ 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);
860
+ 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);
861
+ 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(
862
+ "d",
863
+ `M0,0
864
+ L${conf2.line_height},${conf2.line_height / 2}
865
+ M${conf2.line_height},${conf2.line_height / 2}
866
+ L0,${conf2.line_height}`
867
+ ).attr("stroke-width", 1);
868
+ };
869
+ const markers = {
870
+ ReqMarkers,
871
+ insertLineEndings
872
+ };
873
+ let conf = {};
874
+ let relCnt = 0;
875
+ const newRectNode = (parentNode, id) => {
876
+ 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");
877
+ };
878
+ const newTitleNode = (parentNode, id, txts) => {
879
+ let x = conf.rect_min_width / 2;
880
+ 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");
881
+ let i = 0;
882
+ txts.forEach((textStr) => {
883
+ if (i == 0) {
884
+ title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", 0).text(textStr);
885
+ } else {
886
+ title.append("tspan").attr("text-anchor", "middle").attr("x", conf.rect_min_width / 2).attr("dy", conf.line_height * 0.75).text(textStr);
887
+ }
888
+ i++;
889
+ });
890
+ let yPadding = 1.5 * conf.rect_padding;
891
+ let linePadding = i * conf.line_height * 0.75;
892
+ let totalY = yPadding + linePadding;
893
+ parentNode.append("line").attr("class", "req-title-line").attr("x1", "0").attr("x2", conf.rect_min_width).attr("y1", totalY).attr("y2", totalY);
894
+ return {
895
+ titleNode: title,
896
+ y: totalY
897
+ };
898
+ };
899
+ const newBodyNode = (parentNode, id, txts, yStart) => {
900
+ let body = parentNode.append("text").attr("class", "req reqLabel").attr("id", id).attr("x", conf.rect_padding).attr("y", yStart).attr("dominant-baseline", "hanging");
901
+ let currentRow = 0;
902
+ const charLimit = 30;
903
+ let wrappedTxts = [];
904
+ txts.forEach((textStr) => {
905
+ let currentTextLen = textStr.length;
906
+ while (currentTextLen > charLimit && currentRow < 3) {
907
+ let firstPart = textStr.substring(0, charLimit);
908
+ textStr = textStr.substring(charLimit, textStr.length);
909
+ currentTextLen = textStr.length;
910
+ wrappedTxts[wrappedTxts.length] = firstPart;
911
+ currentRow++;
912
+ }
913
+ if (currentRow == 3) {
914
+ let lastStr = wrappedTxts[wrappedTxts.length - 1];
915
+ wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + "...";
916
+ } else {
917
+ wrappedTxts[wrappedTxts.length] = textStr;
918
+ }
919
+ currentRow = 0;
920
+ });
921
+ wrappedTxts.forEach((textStr) => {
922
+ body.append("tspan").attr("x", conf.rect_padding).attr("dy", conf.line_height).text(textStr);
923
+ });
924
+ return body;
925
+ };
926
+ const addEdgeLabel = (parentNode, svgPath, conf2, txt) => {
927
+ const len = svgPath.node().getTotalLength();
928
+ const labelPoint = svgPath.node().getPointAtLength(len * 0.5);
929
+ const labelId = "rel" + relCnt;
930
+ relCnt++;
931
+ 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);
932
+ const labelBBox = labelNode.node().getBBox();
933
+ 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%");
934
+ };
935
+ const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) {
936
+ const edge = g.edge(elementString(rel.src), elementString(rel.dst));
937
+ const lineFunction = line().x(function(d) {
938
+ return d.x;
939
+ }).y(function(d) {
940
+ return d.y;
941
+ });
942
+ const svgPath = svg.insert("path", "#" + insert).attr("class", "er relationshipLine").attr("d", lineFunction(edge.points)).attr("fill", "none");
943
+ if (rel.type == diagObj.db.Relationships.CONTAINS) {
944
+ svgPath.attr(
945
+ "marker-start",
946
+ "url(" + common$1.getUrl(conf.arrowMarkerAbsolute) + "#" + rel.type + "_line_ending)"
947
+ );
948
+ } else {
949
+ svgPath.attr("stroke-dasharray", "10,7");
950
+ svgPath.attr(
951
+ "marker-end",
952
+ "url(" + common$1.getUrl(conf.arrowMarkerAbsolute) + "#" + markers.ReqMarkers.ARROW + "_line_ending)"
953
+ );
954
+ }
955
+ addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`);
956
+ return;
957
+ };
958
+ const drawReqs = (reqs, graph, svgNode) => {
959
+ Object.keys(reqs).forEach((reqName) => {
960
+ let req = reqs[reqName];
961
+ reqName = elementString(reqName);
962
+ log$1.info("Added new requirement: ", reqName);
963
+ const groupNode = svgNode.append("g").attr("id", reqName);
964
+ const textId = "req-" + reqName;
965
+ const rectNode = newRectNode(groupNode, textId);
966
+ let titleNodeInfo = newTitleNode(groupNode, reqName + "_title", [
967
+ `<<${req.type}>>`,
968
+ `${req.name}`
969
+ ]);
970
+ newBodyNode(
971
+ groupNode,
972
+ reqName + "_body",
973
+ [
974
+ `Id: ${req.id}`,
975
+ `Text: ${req.text}`,
976
+ `Risk: ${req.risk}`,
977
+ `Verification: ${req.verifyMethod}`
978
+ ],
979
+ titleNodeInfo.y
980
+ );
981
+ const rectBBox = rectNode.node().getBBox();
982
+ graph.setNode(reqName, {
983
+ width: rectBBox.width,
984
+ height: rectBBox.height,
985
+ shape: "rect",
986
+ id: reqName
987
+ });
988
+ });
989
+ };
990
+ const drawElements = (els, graph, svgNode) => {
991
+ Object.keys(els).forEach((elName) => {
992
+ let el = els[elName];
993
+ const id = elementString(elName);
994
+ const groupNode = svgNode.append("g").attr("id", id);
995
+ const textId = "element-" + id;
996
+ const rectNode = newRectNode(groupNode, textId);
997
+ let titleNodeInfo = newTitleNode(groupNode, textId + "_title", [`<<Element>>`, `${elName}`]);
998
+ newBodyNode(
999
+ groupNode,
1000
+ textId + "_body",
1001
+ [`Type: ${el.type || "Not Specified"}`, `Doc Ref: ${el.docRef || "None"}`],
1002
+ titleNodeInfo.y
1003
+ );
1004
+ const rectBBox = rectNode.node().getBBox();
1005
+ graph.setNode(id, {
1006
+ width: rectBBox.width,
1007
+ height: rectBBox.height,
1008
+ shape: "rect",
1009
+ id
1010
+ });
1011
+ });
1012
+ };
1013
+ const addRelationships = (relationships, g) => {
1014
+ relationships.forEach(function(r) {
1015
+ let src = elementString(r.src);
1016
+ let dst = elementString(r.dst);
1017
+ g.setEdge(src, dst, { relationship: r });
1018
+ });
1019
+ return relationships;
1020
+ };
1021
+ const adjustEntities = function(svgNode, graph) {
1022
+ graph.nodes().forEach(function(v) {
1023
+ if (v !== void 0 && graph.node(v) !== void 0) {
1024
+ svgNode.select("#" + v);
1025
+ svgNode.select("#" + v).attr(
1026
+ "transform",
1027
+ "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )"
1028
+ );
1029
+ }
1030
+ });
1031
+ return;
1032
+ };
1033
+ const elementString = (str) => {
1034
+ return str.replace(/\s/g, "").replace(/\./g, "_");
1035
+ };
1036
+ const draw = (text, id, _version, diagObj) => {
1037
+ conf = getConfig().requirement;
1038
+ const securityLevel = conf.securityLevel;
1039
+ let sandboxElement;
1040
+ if (securityLevel === "sandbox") {
1041
+ sandboxElement = select("#i" + id);
1042
+ }
1043
+ const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
1044
+ const svg = root.select(`[id='${id}']`);
1045
+ markers.insertLineEndings(svg, conf);
1046
+ const g = new Graph({
1047
+ multigraph: false,
1048
+ compound: false,
1049
+ directed: true
1050
+ }).setGraph({
1051
+ rankdir: conf.layoutDirection,
1052
+ marginx: 20,
1053
+ marginy: 20,
1054
+ nodesep: 100,
1055
+ edgesep: 100,
1056
+ ranksep: 100
1057
+ }).setDefaultEdgeLabel(function() {
1058
+ return {};
1059
+ });
1060
+ let requirements2 = diagObj.db.getRequirements();
1061
+ let elements2 = diagObj.db.getElements();
1062
+ let relationships = diagObj.db.getRelationships();
1063
+ drawReqs(requirements2, g, svg);
1064
+ drawElements(elements2, g, svg);
1065
+ addRelationships(relationships, g);
1066
+ layout(g);
1067
+ adjustEntities(svg, g);
1068
+ relationships.forEach(function(rel) {
1069
+ drawRelationshipFromLayout(svg, rel, g, id, diagObj);
1070
+ });
1071
+ const padding = conf.rect_padding;
1072
+ const svgBounds = svg.node().getBBox();
1073
+ const width = svgBounds.width + padding * 2;
1074
+ const height = svgBounds.height + padding * 2;
1075
+ configureSvgSize(svg, height, width, conf.useMaxWidth);
1076
+ svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);
1077
+ };
1078
+ const renderer = {
1079
+ draw
1080
+ };
1081
+ const diagram = {
1082
+ parser: parser$1,
1083
+ db,
1084
+ renderer,
1085
+ styles
1086
+ };
1087
+ export {
1088
+ diagram
1089
+ };