qasm-ts 1.1.2 → 2.0.0

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 (188) hide show
  1. package/.eslintrc.json +13 -0
  2. package/dist/errors.js +119 -2
  3. package/dist/lexer.js +39 -294
  4. package/dist/main.js +42 -12
  5. package/dist/parser.js +46 -482
  6. package/dist/{ast.js → qasm2/ast.js} +38 -2
  7. package/dist/qasm2/lexer.js +436 -0
  8. package/dist/qasm2/parser.js +609 -0
  9. package/dist/{token.js → qasm2/token.js} +62 -21
  10. package/dist/qasm3/ast.js +1081 -0
  11. package/dist/qasm3/lexer.js +615 -0
  12. package/dist/qasm3/parser.js +2030 -0
  13. package/dist/qasm3/token.js +342 -0
  14. package/dist/version.js +41 -0
  15. package/docs/.nojekyll +1 -0
  16. package/docs/assets/highlight.css +99 -0
  17. package/docs/assets/icons.js +18 -0
  18. package/docs/assets/icons.svg +1 -0
  19. package/docs/assets/main.js +60 -0
  20. package/docs/assets/navigation.js +1 -0
  21. package/docs/assets/search.js +1 -0
  22. package/docs/assets/style.css +1493 -0
  23. package/docs/classes/errors.BadArgumentError.html +12 -0
  24. package/docs/classes/errors.BadBarrierError.html +12 -0
  25. package/docs/classes/errors.BadClassicalTypeError.html +12 -0
  26. package/docs/classes/errors.BadConditionalError.html +12 -0
  27. package/docs/classes/errors.BadCregError.html +12 -0
  28. package/docs/classes/errors.BadEqualsError.html +12 -0
  29. package/docs/classes/errors.BadExpressionError.html +12 -0
  30. package/docs/classes/errors.BadGateError.html +12 -0
  31. package/docs/classes/errors.BadIncludeError.html +12 -0
  32. package/docs/classes/errors.BadLoopError.html +12 -0
  33. package/docs/classes/errors.BadMeasurementError.html +12 -0
  34. package/docs/classes/errors.BadParameterError.html +12 -0
  35. package/docs/classes/errors.BadQregError.html +12 -0
  36. package/docs/classes/errors.BadQuantumInstructionError.html +12 -0
  37. package/docs/classes/errors.BadStringLiteralError.html +12 -0
  38. package/docs/classes/errors.BadSubroutineError.html +12 -0
  39. package/docs/classes/errors.MissingBraceError.html +12 -0
  40. package/docs/classes/errors.MissingSemicolonError.html +12 -0
  41. package/docs/classes/errors.UnsupportedOpenQASMVersionError.html +12 -0
  42. package/docs/classes/qasm2_ast.ApplyGate.html +6 -0
  43. package/docs/classes/qasm2_ast.AstNode.html +3 -0
  44. package/docs/classes/qasm2_ast.Barrier.html +5 -0
  45. package/docs/classes/qasm2_ast.CReg.html +5 -0
  46. package/docs/classes/qasm2_ast.Cos.html +3 -0
  47. package/docs/classes/qasm2_ast.Divide.html +3 -0
  48. package/docs/classes/qasm2_ast.Exp.html +3 -0
  49. package/docs/classes/qasm2_ast.Gate.html +7 -0
  50. package/docs/classes/qasm2_ast.Id.html +4 -0
  51. package/docs/classes/qasm2_ast.If.html +6 -0
  52. package/docs/classes/qasm2_ast.Include.html +4 -0
  53. package/docs/classes/qasm2_ast.Ln.html +3 -0
  54. package/docs/classes/qasm2_ast.Measure.html +7 -0
  55. package/docs/classes/qasm2_ast.Minus.html +3 -0
  56. package/docs/classes/qasm2_ast.NNInteger.html +4 -0
  57. package/docs/classes/qasm2_ast.Opaque.html +6 -0
  58. package/docs/classes/qasm2_ast.Pi.html +3 -0
  59. package/docs/classes/qasm2_ast.Plus.html +3 -0
  60. package/docs/classes/qasm2_ast.Power.html +3 -0
  61. package/docs/classes/qasm2_ast.QReg.html +5 -0
  62. package/docs/classes/qasm2_ast.Real.html +4 -0
  63. package/docs/classes/qasm2_ast.Sin.html +3 -0
  64. package/docs/classes/qasm2_ast.Sqrt.html +3 -0
  65. package/docs/classes/qasm2_ast.Tan.html +3 -0
  66. package/docs/classes/qasm2_ast.Times.html +3 -0
  67. package/docs/classes/qasm2_ast.Variable.html +4 -0
  68. package/docs/classes/qasm2_ast.Version.html +4 -0
  69. package/docs/classes/qasm2_lexer.default.html +50 -0
  70. package/docs/classes/qasm2_parser.default.html +87 -0
  71. package/docs/classes/qasm3_ast.AliasStatement.html +5 -0
  72. package/docs/classes/qasm3_ast.AngleType.html +4 -0
  73. package/docs/classes/qasm3_ast.Arithmetic.html +6 -0
  74. package/docs/classes/qasm3_ast.ArrayAccess.html +5 -0
  75. package/docs/classes/qasm3_ast.ArrayDeclaration.html +7 -0
  76. package/docs/classes/qasm3_ast.ArrayInitializer.html +4 -0
  77. package/docs/classes/qasm3_ast.ArrayReference.html +5 -0
  78. package/docs/classes/qasm3_ast.AssignmentStatement.html +5 -0
  79. package/docs/classes/qasm3_ast.AstNode.html +3 -0
  80. package/docs/classes/qasm3_ast.Binary.html +6 -0
  81. package/docs/classes/qasm3_ast.BitType.html +4 -0
  82. package/docs/classes/qasm3_ast.BitstringLiteral.html +4 -0
  83. package/docs/classes/qasm3_ast.BoolType.html +3 -0
  84. package/docs/classes/qasm3_ast.BooleanLiteral.html +4 -0
  85. package/docs/classes/qasm3_ast.BoxDefinition.html +7 -0
  86. package/docs/classes/qasm3_ast.BranchingStatement.html +8 -0
  87. package/docs/classes/qasm3_ast.BreakStatement.html +3 -0
  88. package/docs/classes/qasm3_ast.CalibrationGrammarDeclaration.html +6 -0
  89. package/docs/classes/qasm3_ast.CaseStatement.html +5 -0
  90. package/docs/classes/qasm3_ast.Cast.html +5 -0
  91. package/docs/classes/qasm3_ast.ClassicalDeclaration.html +7 -0
  92. package/docs/classes/qasm3_ast.ClassicalType.html +3 -0
  93. package/docs/classes/qasm3_ast.ComplexType.html +6 -0
  94. package/docs/classes/qasm3_ast.ContinueStatement.html +3 -0
  95. package/docs/classes/qasm3_ast.DefaultStatement.html +4 -0
  96. package/docs/classes/qasm3_ast.DurationLiteral.html +5 -0
  97. package/docs/classes/qasm3_ast.DurationOf.html +4 -0
  98. package/docs/classes/qasm3_ast.DurationType.html +3 -0
  99. package/docs/classes/qasm3_ast.Euler.html +3 -0
  100. package/docs/classes/qasm3_ast.Expression.html +3 -0
  101. package/docs/classes/qasm3_ast.ExternSignature.html +8 -0
  102. package/docs/classes/qasm3_ast.FloatLiteral.html +4 -0
  103. package/docs/classes/qasm3_ast.FloatType.html +6 -0
  104. package/docs/classes/qasm3_ast.ForLoopStatement.html +12 -0
  105. package/docs/classes/qasm3_ast.HardwareQubit.html +5 -0
  106. package/docs/classes/qasm3_ast.IODeclaration.html +5 -0
  107. package/docs/classes/qasm3_ast.Identifier.html +4 -0
  108. package/docs/classes/qasm3_ast.ImaginaryLiteral.html +4 -0
  109. package/docs/classes/qasm3_ast.Include.html +6 -0
  110. package/docs/classes/qasm3_ast.IndexSet.html +5 -0
  111. package/docs/classes/qasm3_ast.IntType.html +4 -0
  112. package/docs/classes/qasm3_ast.IntegerLiteral.html +4 -0
  113. package/docs/classes/qasm3_ast.MathFunction.html +5 -0
  114. package/docs/classes/qasm3_ast.NumericLiteral.html +4 -0
  115. package/docs/classes/qasm3_ast.Parameters.html +4 -0
  116. package/docs/classes/qasm3_ast.Pi.html +3 -0
  117. package/docs/classes/qasm3_ast.ProgramBlock.html +7 -0
  118. package/docs/classes/qasm3_ast.QuantumBarrier.html +6 -0
  119. package/docs/classes/qasm3_ast.QuantumBlock.html +6 -0
  120. package/docs/classes/qasm3_ast.QuantumDeclaration.html +8 -0
  121. package/docs/classes/qasm3_ast.QuantumDelay.html +5 -0
  122. package/docs/classes/qasm3_ast.QuantumGateCall.html +9 -0
  123. package/docs/classes/qasm3_ast.QuantumGateDefinition.html +9 -0
  124. package/docs/classes/qasm3_ast.QuantumGateModifier.html +5 -0
  125. package/docs/classes/qasm3_ast.QuantumMeasurement.html +6 -0
  126. package/docs/classes/qasm3_ast.QuantumMeasurementAssignment.html +8 -0
  127. package/docs/classes/qasm3_ast.QuantumReset.html +4 -0
  128. package/docs/classes/qasm3_ast.Range.html +6 -0
  129. package/docs/classes/qasm3_ast.ReturnStatement.html +4 -0
  130. package/docs/classes/qasm3_ast.SizeOf.html +5 -0
  131. package/docs/classes/qasm3_ast.Statement.html +12 -0
  132. package/docs/classes/qasm3_ast.StretchType.html +3 -0
  133. package/docs/classes/qasm3_ast.SubroutineBlock.html +6 -0
  134. package/docs/classes/qasm3_ast.SubroutineCall.html +5 -0
  135. package/docs/classes/qasm3_ast.SubroutineDefinition.html +10 -0
  136. package/docs/classes/qasm3_ast.SubscriptedIdentifier.html +5 -0
  137. package/docs/classes/qasm3_ast.SwitchStatement.html +6 -0
  138. package/docs/classes/qasm3_ast.Tau.html +3 -0
  139. package/docs/classes/qasm3_ast.TrigFunction.html +5 -0
  140. package/docs/classes/qasm3_ast.UIntType.html +4 -0
  141. package/docs/classes/qasm3_ast.Unary.html +5 -0
  142. package/docs/classes/qasm3_ast.Version.html +6 -0
  143. package/docs/classes/qasm3_ast.WhileLoopStatement.html +6 -0
  144. package/docs/classes/qasm3_lexer.default.html +60 -0
  145. package/docs/classes/qasm3_parser.default.html +227 -0
  146. package/docs/classes/version.OpenQASMVersion.html +16 -0
  147. package/docs/enums/qasm2_token.Token.html +39 -0
  148. package/docs/enums/qasm3_ast.ArithmeticOp.html +9 -0
  149. package/docs/enums/qasm3_ast.ArrayReferenceModifier.html +4 -0
  150. package/docs/enums/qasm3_ast.BinaryOp.html +15 -0
  151. package/docs/enums/qasm3_ast.DurationUnit.html +7 -0
  152. package/docs/enums/qasm3_ast.IOModifier.html +4 -0
  153. package/docs/enums/qasm3_ast.MathFunctionTypes.html +12 -0
  154. package/docs/enums/qasm3_ast.QuantumGateModifierName.html +6 -0
  155. package/docs/enums/qasm3_ast.TrigFunctionTypes.html +8 -0
  156. package/docs/enums/qasm3_ast.UnaryOp.html +5 -0
  157. package/docs/enums/qasm3_token.Token.html +101 -0
  158. package/docs/enums/version.OpenQASMMajorVersion.html +4 -0
  159. package/docs/functions/lexer.lex.html +1 -0
  160. package/docs/functions/main.parseFile.html +4 -0
  161. package/docs/functions/main.parseString.html +4 -0
  162. package/docs/functions/parser.parse.html +1 -0
  163. package/docs/functions/qasm2_token.inverseLookup.html +3 -0
  164. package/docs/functions/qasm2_token.lookup.html +4 -0
  165. package/docs/functions/qasm2_token.notParam.html +3 -0
  166. package/docs/functions/qasm3_token.inverseLookup.html +3 -0
  167. package/docs/functions/qasm3_token.lookup.html +4 -0
  168. package/docs/functions/qasm3_token.notParam.html +3 -0
  169. package/docs/hierarchy.html +1 -0
  170. package/docs/index.html +55 -0
  171. package/docs/modules/errors.html +21 -0
  172. package/docs/modules/lexer.html +2 -0
  173. package/docs/modules/main.html +3 -0
  174. package/docs/modules/parser.html +2 -0
  175. package/docs/modules/qasm2_ast.html +28 -0
  176. package/docs/modules/qasm2_lexer.html +2 -0
  177. package/docs/modules/qasm2_parser.html +2 -0
  178. package/docs/modules/qasm2_token.html +5 -0
  179. package/docs/modules/qasm3_ast.html +83 -0
  180. package/docs/modules/qasm3_lexer.html +2 -0
  181. package/docs/modules/qasm3_parser.html +2 -0
  182. package/docs/modules/qasm3_token.html +5 -0
  183. package/docs/modules/version.html +3 -0
  184. package/docs/modules.html +14 -0
  185. package/docs/types/errors.ReturnErrorConstructor.html +2 -0
  186. package/package.json +5 -4
  187. package/readme.md +67 -51
  188. package/dist/example.js +0 -22
@@ -0,0 +1,342 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Token = void 0;
4
+ exports.notParam = notParam;
5
+ exports.lookup = lookup;
6
+ exports.inverseLookup = inverseLookup;
7
+ var Token;
8
+ (function (Token) {
9
+ // 0; invalid or unrecognized token
10
+ Token[Token["Illegal"] = 0] = "Illegal";
11
+ // 1; end of file character
12
+ Token[Token["EndOfFile"] = 1] = "EndOfFile";
13
+ // 2; real number (floating point)
14
+ Token[Token["Real"] = 2] = "Real";
15
+ // 3; non-negative integer
16
+ Token[Token["NNInteger"] = 3] = "NNInteger";
17
+ // 4; integer that supports underscores and negatives
18
+ Token[Token["Integer"] = 4] = "Integer";
19
+ // 5; identifier (variables names, function names, etc.)
20
+ Token[Token["Id"] = 5] = "Id";
21
+ // 6; OPENQASM version declaration
22
+ Token[Token["OpenQASM"] = 6] = "OpenQASM";
23
+ // 7; include statement
24
+ Token[Token["Include"] = 7] = "Include";
25
+ // 8; semicolon to terminate statements
26
+ Token[Token["Semicolon"] = 8] = "Semicolon";
27
+ // 9; colon
28
+ Token[Token["Colon"] = 9] = "Colon";
29
+ // 10; comma
30
+ Token[Token["Comma"] = 10] = "Comma";
31
+ // 11; left paren (
32
+ Token[Token["LParen"] = 11] = "LParen";
33
+ // 12; left square bracket [
34
+ Token[Token["LSParen"] = 12] = "LSParen";
35
+ // 13; left curly brakcet {
36
+ Token[Token["LCParen"] = 13] = "LCParen";
37
+ // 14; right paren )
38
+ Token[Token["RParen"] = 14] = "RParen";
39
+ // 15; right square paren ]
40
+ Token[Token["RSParen"] = 15] = "RSParen";
41
+ // 16; right curly bracket }
42
+ Token[Token["RCParen"] = 16] = "RCParen";
43
+ // 17; assignment operator (=)
44
+ Token[Token["EqualsAssmt"] = 17] = "EqualsAssmt";
45
+ // 18; arrow (->) used in measurement operations
46
+ Token[Token["Arrow"] = 18] = "Arrow";
47
+ // 19; quantum register declaration
48
+ Token[Token["QReg"] = 19] = "QReg";
49
+ // 20; quantum register declaration (functionally equivalent to QReg but for OpenQASM version 3)
50
+ Token[Token["Qubit"] = 20] = "Qubit";
51
+ // 21; classical register declaration
52
+ Token[Token["CReg"] = 21] = "CReg";
53
+ // 22; classical register declaration (functionally equivalent to Creg but for OpenQASM version 3)
54
+ Token[Token["Bit"] = 22] = "Bit";
55
+ // 23; barrier operation
56
+ Token[Token["Barrier"] = 23] = "Barrier";
57
+ // 24; gate declaration or application
58
+ Token[Token["Gate"] = 24] = "Gate";
59
+ // 25; measurement operation
60
+ Token[Token["Measure"] = 25] = "Measure";
61
+ // 26; qubit reset operation
62
+ Token[Token["Reset"] = 26] = "Reset";
63
+ // 27; string literal
64
+ Token[Token["String"] = 27] = "String";
65
+ // 28; opaque keyword
66
+ Token[Token["Opaque"] = 28] = "Opaque";
67
+ // 29; defcalgrammar keyword
68
+ Token[Token["DefcalGrammar"] = 29] = "DefcalGrammar";
69
+ // 30; float type keyword
70
+ Token[Token["Float"] = 30] = "Float";
71
+ // 31; bool type keyword,
72
+ Token[Token["Bool"] = 31] = "Bool";
73
+ // 32; int type keyword
74
+ Token[Token["Int"] = 32] = "Int";
75
+ // 33; uint type keyword
76
+ Token[Token["UInt"] = 33] = "UInt";
77
+ // 34; mathematical constant pi
78
+ Token[Token["Pi"] = 34] = "Pi";
79
+ // 35; euler constant
80
+ Token[Token["Euler"] = 35] = "Euler";
81
+ // 36; tau constant
82
+ Token[Token["Tau"] = 36] = "Tau";
83
+ // 37; binary literal
84
+ Token[Token["BinaryLiteral"] = 37] = "BinaryLiteral";
85
+ // 38; octal literal
86
+ Token[Token["OctalLiteral"] = 38] = "OctalLiteral";
87
+ // 39; hex literal
88
+ Token[Token["HexLiteral"] = 39] = "HexLiteral";
89
+ // 40; arithmetic operators
90
+ Token[Token["ArithmeticOp"] = 40] = "ArithmeticOp";
91
+ // 41; compound arithmetic operators
92
+ Token[Token["CompoundArithmeticOp"] = 41] = "CompoundArithmeticOp";
93
+ // 42; boolean literal value
94
+ Token[Token["BoolLiteral"] = 42] = "BoolLiteral";
95
+ // 43; duration keyword
96
+ Token[Token["Duration"] = 43] = "Duration";
97
+ // 44; unary operator
98
+ Token[Token["UnaryOp"] = 44] = "UnaryOp";
99
+ // 45; binary operator
100
+ Token[Token["BinaryOp"] = 45] = "BinaryOp";
101
+ // 46; let keyword for aliasing
102
+ Token[Token["Let"] = 46] = "Let";
103
+ // 47; quantum gate modifier
104
+ Token[Token["QuantumModifier"] = 47] = "QuantumModifier";
105
+ // 48; delay keyword
106
+ Token[Token["Delay"] = 48] = "Delay";
107
+ // 49; return keyword
108
+ Token[Token["Return"] = 49] = "Return";
109
+ // 50; def keyword for subroutines
110
+ Token[Token["Def"] = 50] = "Def";
111
+ // 51; for loop keyword
112
+ Token[Token["For"] = 51] = "For";
113
+ // 52; in keyword
114
+ Token[Token["In"] = 52] = "In";
115
+ // 53; while loop keyword
116
+ Token[Token["While"] = 53] = "While";
117
+ // 54; break keyword
118
+ Token[Token["Break"] = 54] = "Break";
119
+ // 55; continue keyword
120
+ Token[Token["Continue"] = 55] = "Continue";
121
+ // 56; input keyword
122
+ Token[Token["Input"] = 56] = "Input";
123
+ // 57; output keyword
124
+ Token[Token["Output"] = 57] = "Output";
125
+ // 58; switch statement keyword
126
+ Token[Token["Switch"] = 58] = "Switch";
127
+ // 59; switch case keyword
128
+ Token[Token["Case"] = 59] = "Case";
129
+ // 60; switch default keyword
130
+ Token[Token["Default"] = 60] = "Default";
131
+ // 61; defcal keyword
132
+ Token[Token["Defcal"] = 61] = "Defcal";
133
+ // 62; constant keywork
134
+ Token[Token["Const"] = 62] = "Const";
135
+ // 63; if statement conditional
136
+ Token[Token["If"] = 63] = "If";
137
+ // 64; else keyword
138
+ Token[Token["Else"] = 64] = "Else";
139
+ // 65; end keyword
140
+ Token[Token["End"] = 65] = "End";
141
+ // 66; inverse cosine
142
+ Token[Token["Arccos"] = 66] = "Arccos";
143
+ // 67; inverse sine
144
+ Token[Token["Arcsin"] = 67] = "Arcsin";
145
+ // 68; inverse tangent
146
+ Token[Token["Arctan"] = 68] = "Arctan";
147
+ // 69; ceiling function
148
+ Token[Token["Ceiling"] = 69] = "Ceiling";
149
+ // 70; cosine function
150
+ Token[Token["Cos"] = 70] = "Cos";
151
+ // 71; exp keyword
152
+ Token[Token["Exp"] = 71] = "Exp";
153
+ // 72; floor function
154
+ Token[Token["Floor"] = 72] = "Floor";
155
+ // 73; logarithm base e
156
+ Token[Token["Log"] = 73] = "Log";
157
+ // 74; modulus
158
+ Token[Token["Mod"] = 74] = "Mod";
159
+ // 75; popcount function
160
+ Token[Token["Popcount"] = 75] = "Popcount";
161
+ // 76; power function
162
+ Token[Token["Pow"] = 76] = "Pow";
163
+ // 77; rotate bits left function
164
+ Token[Token["Rotl"] = 77] = "Rotl";
165
+ // 78; rotate bits right function
166
+ Token[Token["Rotr"] = 78] = "Rotr";
167
+ // 79; sine
168
+ Token[Token["Sin"] = 79] = "Sin";
169
+ // 80; sqaure root
170
+ Token[Token["Sqrt"] = 80] = "Sqrt";
171
+ // 81; tangent
172
+ Token[Token["Tan"] = 81] = "Tan";
173
+ // 82; angle type
174
+ Token[Token["Angle"] = 82] = "Angle";
175
+ // 83; ctrl gate modifier
176
+ Token[Token["Ctrl"] = 83] = "Ctrl";
177
+ // 84; negctrl gate modifier
178
+ Token[Token["NegCtrl"] = 84] = "NegCtrl";
179
+ // 85; inv gate modifier
180
+ Token[Token["Inv"] = 85] = "Inv";
181
+ // 86; pow gate modifier
182
+ Token[Token["PowM"] = 86] = "PowM";
183
+ // 87; @ symbol
184
+ Token[Token["At"] = 87] = "At";
185
+ // 88; complex number keyword
186
+ Token[Token["Complex"] = 88] = "Complex";
187
+ // 89; $ symbol
188
+ Token[Token["Dollar"] = 89] = "Dollar";
189
+ // 90; array keyword
190
+ Token[Token["Array"] = 90] = "Array";
191
+ // 91; durationof function keyword
192
+ Token[Token["DurationOf"] = 91] = "DurationOf";
193
+ // 92; stretch type keyword
194
+ Token[Token["Stretch"] = 92] = "Stretch";
195
+ // 93; box keyword
196
+ Token[Token["Box"] = 93] = "Box";
197
+ // 94; readonly keyword
198
+ Token[Token["ReadOnly"] = 94] = "ReadOnly";
199
+ // 95; mutable keyword
200
+ Token[Token["Mutable"] = 95] = "Mutable";
201
+ // 96; #dim array dimensions
202
+ Token[Token["Dim"] = 96] = "Dim";
203
+ // 97; scientific notation literal
204
+ Token[Token["ScientificNotation"] = 97] = "ScientificNotation";
205
+ // 98; sizeof function
206
+ Token[Token["SizeOf"] = 98] = "SizeOf";
207
+ // 99; extern keyword
208
+ Token[Token["Extern"] = 99] = "Extern";
209
+ // 100; compound binary operators
210
+ Token[Token["CompoundBinaryOp"] = 100] = "CompoundBinaryOp";
211
+ })(Token || (exports.Token = Token = {}));
212
+ var lookupMap = {
213
+ pi: Token.Pi,
214
+ π: Token.Pi,
215
+ qreg: Token.QReg,
216
+ qubit: Token.Qubit,
217
+ creg: Token.CReg,
218
+ bit: Token.Bit,
219
+ barrier: Token.Barrier,
220
+ gate: Token.Gate,
221
+ measure: Token.Measure,
222
+ reset: Token.Reset,
223
+ include: Token.Include,
224
+ if: Token.If,
225
+ opaque: Token.Opaque,
226
+ defcalgrammar: Token.DefcalGrammar,
227
+ float: Token.Float,
228
+ bool: Token.Bool,
229
+ true: Token.BoolLiteral,
230
+ false: Token.BoolLiteral,
231
+ int: Token.Int,
232
+ uint: Token.UInt,
233
+ euler: Token.Euler,
234
+ ℇ: Token.Euler,
235
+ tau: Token.Tau,
236
+ τ: Token.Tau,
237
+ duration: Token.Duration,
238
+ let: Token.Let,
239
+ delay: Token.Delay,
240
+ return: Token.Return,
241
+ def: Token.Def,
242
+ for: Token.For,
243
+ in: Token.In,
244
+ while: Token.While,
245
+ break: Token.Break,
246
+ continue: Token.Continue,
247
+ input: Token.Input,
248
+ output: Token.Output,
249
+ switch: Token.Switch,
250
+ case: Token.Case,
251
+ default: Token.Default,
252
+ defcal: Token.Defcal,
253
+ const: Token.Const,
254
+ else: Token.Else,
255
+ end: Token.End,
256
+ "!": Token.UnaryOp,
257
+ "~": Token.UnaryOp,
258
+ "**": Token.ArithmeticOp,
259
+ "*": Token.ArithmeticOp,
260
+ "/": Token.ArithmeticOp,
261
+ "%": Token.ArithmeticOp,
262
+ "+": Token.ArithmeticOp,
263
+ "++": Token.ArithmeticOp,
264
+ "&": Token.BinaryOp,
265
+ "|": Token.BinaryOp,
266
+ "^": Token.BinaryOp,
267
+ "&&": Token.BinaryOp,
268
+ "||": Token.BinaryOp,
269
+ "<": Token.BinaryOp,
270
+ "<=": Token.BinaryOp,
271
+ ">": Token.BinaryOp,
272
+ ">=": Token.BinaryOp,
273
+ "==": Token.BinaryOp,
274
+ "!=": Token.BinaryOp,
275
+ "<<": Token.BinaryOp,
276
+ ">>": Token.BinaryOp,
277
+ "**=": Token.CompoundArithmeticOp,
278
+ "/=": Token.CompoundArithmeticOp,
279
+ "%=": Token.CompoundArithmeticOp,
280
+ "+=": Token.CompoundArithmeticOp,
281
+ "-=": Token.CompoundArithmeticOp,
282
+ "*=": Token.CompoundArithmeticOp,
283
+ "^=": Token.CompoundArithmeticOp,
284
+ arccos: Token.Arccos,
285
+ arcsin: Token.Arcsin,
286
+ arctan: Token.Arctan,
287
+ ceiling: Token.Ceiling,
288
+ cos: Token.Cos,
289
+ exp: Token.Exp,
290
+ floor: Token.Floor,
291
+ log: Token.Log,
292
+ mod: Token.Mod,
293
+ popcount: Token.Popcount,
294
+ pow: Token.Pow,
295
+ rotl: Token.Rotl,
296
+ rotr: Token.Rotr,
297
+ sin: Token.Sin,
298
+ sqrt: Token.Sqrt,
299
+ tan: Token.Tan,
300
+ angle: Token.Angle,
301
+ "@": Token.At,
302
+ complex: Token.Complex,
303
+ "$": Token.Dollar,
304
+ array: Token.Array,
305
+ durationof: Token.DurationOf,
306
+ stretch: Token.Stretch,
307
+ box: Token.Box,
308
+ readonly: Token.ReadOnly,
309
+ mutable: Token.Mutable,
310
+ sizeof: Token.SizeOf,
311
+ extern: Token.Extern,
312
+ };
313
+ /**
314
+ * Returns the token that represents a given string.
315
+ * @param ident - The string.
316
+ * @return The corresponding token.
317
+ */
318
+ function lookup(ident) {
319
+ return ident in lookupMap ? lookupMap[ident] : Token.Id;
320
+ }
321
+ /**
322
+ * Returns the string representation of a token.
323
+ * @param tokens - The token.
324
+ * @return The string representation of the token.
325
+ */
326
+ function inverseLookup(token) {
327
+ return Object.keys(lookupMap).find(function (ident) { return lookupMap[ident] == token; });
328
+ }
329
+ /**
330
+ * Determines whether a token denotes a parameter.
331
+ * @param tokens - The token.
332
+ * @return Whether the token does NOT denote a parameter.
333
+ */
334
+ function notParam(token) {
335
+ if (token == Token.NNInteger ||
336
+ token == Token.Real ||
337
+ token == Token.Id ||
338
+ inverseLookup(token)) {
339
+ return false;
340
+ }
341
+ return true;
342
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OpenQASMVersion = exports.OpenQASMMajorVersion = void 0;
4
+ /** Enum representing the major OpenQASM versions. */
5
+ var OpenQASMMajorVersion;
6
+ (function (OpenQASMMajorVersion) {
7
+ OpenQASMMajorVersion[OpenQASMMajorVersion["Version2"] = 2] = "Version2";
8
+ OpenQASMMajorVersion[OpenQASMMajorVersion["Version3"] = 3] = "Version3";
9
+ })(OpenQASMMajorVersion || (exports.OpenQASMMajorVersion = OpenQASMMajorVersion = {}));
10
+ /** Class representing the OpenQASM version. */
11
+ var OpenQASMVersion = /** @class */ (function () {
12
+ /**
13
+ * Creates an OpenQASMVersion instance.
14
+ * @param major - The OpenQASM major version. (optional)
15
+ * @param minor - The OpenQASM minor version (optional).
16
+ */
17
+ function OpenQASMVersion(major, minor) {
18
+ this.major = major ? major : OpenQASMMajorVersion.Version3;
19
+ this.minor = minor ? minor : 0;
20
+ }
21
+ /** Returns the version as a formatted string. */
22
+ OpenQASMVersion.prototype.toString = function () {
23
+ return "".concat(this.major, ".").concat(this.minor);
24
+ };
25
+ /** Returns whether the version is 3.x */
26
+ OpenQASMVersion.prototype.isVersion3 = function () {
27
+ if (this.major === OpenQASMMajorVersion.Version3) {
28
+ return true;
29
+ }
30
+ return false;
31
+ };
32
+ /** Returns whether the version is 2.x */
33
+ OpenQASMVersion.prototype.isVersion2 = function () {
34
+ if (this.major === OpenQASMMajorVersion.Version2) {
35
+ return true;
36
+ }
37
+ return false;
38
+ };
39
+ return OpenQASMVersion;
40
+ }());
41
+ exports.OpenQASMVersion = OpenQASMVersion;
package/docs/.nojekyll ADDED
@@ -0,0 +1 @@
1
+ TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
@@ -0,0 +1,99 @@
1
+ :root {
2
+ --light-hl-0: #AF00DB;
3
+ --dark-hl-0: #C586C0;
4
+ --light-hl-1: #000000;
5
+ --dark-hl-1: #D4D4D4;
6
+ --light-hl-2: #001080;
7
+ --dark-hl-2: #9CDCFE;
8
+ --light-hl-3: #A31515;
9
+ --dark-hl-3: #CE9178;
10
+ --light-hl-4: #0000FF;
11
+ --dark-hl-4: #569CD6;
12
+ --light-hl-5: #795E26;
13
+ --dark-hl-5: #DCDCAA;
14
+ --light-hl-6: #098658;
15
+ --dark-hl-6: #B5CEA8;
16
+ --light-hl-7: #0070C1;
17
+ --dark-hl-7: #4FC1FF;
18
+ --light-hl-8: #EE0000;
19
+ --dark-hl-8: #D7BA7D;
20
+ --light-hl-9: #008000;
21
+ --dark-hl-9: #6A9955;
22
+ --light-hl-10: #000000;
23
+ --dark-hl-10: #C8C8C8;
24
+ --light-code-background: #FFFFFF;
25
+ --dark-code-background: #1E1E1E;
26
+ }
27
+
28
+ @media (prefers-color-scheme: light) { :root {
29
+ --hl-0: var(--light-hl-0);
30
+ --hl-1: var(--light-hl-1);
31
+ --hl-2: var(--light-hl-2);
32
+ --hl-3: var(--light-hl-3);
33
+ --hl-4: var(--light-hl-4);
34
+ --hl-5: var(--light-hl-5);
35
+ --hl-6: var(--light-hl-6);
36
+ --hl-7: var(--light-hl-7);
37
+ --hl-8: var(--light-hl-8);
38
+ --hl-9: var(--light-hl-9);
39
+ --hl-10: var(--light-hl-10);
40
+ --code-background: var(--light-code-background);
41
+ } }
42
+
43
+ @media (prefers-color-scheme: dark) { :root {
44
+ --hl-0: var(--dark-hl-0);
45
+ --hl-1: var(--dark-hl-1);
46
+ --hl-2: var(--dark-hl-2);
47
+ --hl-3: var(--dark-hl-3);
48
+ --hl-4: var(--dark-hl-4);
49
+ --hl-5: var(--dark-hl-5);
50
+ --hl-6: var(--dark-hl-6);
51
+ --hl-7: var(--dark-hl-7);
52
+ --hl-8: var(--dark-hl-8);
53
+ --hl-9: var(--dark-hl-9);
54
+ --hl-10: var(--dark-hl-10);
55
+ --code-background: var(--dark-code-background);
56
+ } }
57
+
58
+ :root[data-theme='light'] {
59
+ --hl-0: var(--light-hl-0);
60
+ --hl-1: var(--light-hl-1);
61
+ --hl-2: var(--light-hl-2);
62
+ --hl-3: var(--light-hl-3);
63
+ --hl-4: var(--light-hl-4);
64
+ --hl-5: var(--light-hl-5);
65
+ --hl-6: var(--light-hl-6);
66
+ --hl-7: var(--light-hl-7);
67
+ --hl-8: var(--light-hl-8);
68
+ --hl-9: var(--light-hl-9);
69
+ --hl-10: var(--light-hl-10);
70
+ --code-background: var(--light-code-background);
71
+ }
72
+
73
+ :root[data-theme='dark'] {
74
+ --hl-0: var(--dark-hl-0);
75
+ --hl-1: var(--dark-hl-1);
76
+ --hl-2: var(--dark-hl-2);
77
+ --hl-3: var(--dark-hl-3);
78
+ --hl-4: var(--dark-hl-4);
79
+ --hl-5: var(--dark-hl-5);
80
+ --hl-6: var(--dark-hl-6);
81
+ --hl-7: var(--dark-hl-7);
82
+ --hl-8: var(--dark-hl-8);
83
+ --hl-9: var(--dark-hl-9);
84
+ --hl-10: var(--dark-hl-10);
85
+ --code-background: var(--dark-code-background);
86
+ }
87
+
88
+ .hl-0 { color: var(--hl-0); }
89
+ .hl-1 { color: var(--hl-1); }
90
+ .hl-2 { color: var(--hl-2); }
91
+ .hl-3 { color: var(--hl-3); }
92
+ .hl-4 { color: var(--hl-4); }
93
+ .hl-5 { color: var(--hl-5); }
94
+ .hl-6 { color: var(--hl-6); }
95
+ .hl-7 { color: var(--hl-7); }
96
+ .hl-8 { color: var(--hl-8); }
97
+ .hl-9 { color: var(--hl-9); }
98
+ .hl-10 { color: var(--hl-10); }
99
+ pre, code { background: var(--code-background); }
@@ -0,0 +1,18 @@
1
+ (function() {
2
+ addIcons();
3
+ function addIcons() {
4
+ if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons);
5
+ const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"));
6
+ svg.innerHTML = `<g id="icon-1" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-2" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">N</text></g><g id="icon-8" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">E</text></g><g id="icon-16" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-32" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">V</text></g><g id="icon-64" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-128" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-256" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">I</text></g><g id="icon-512" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-1024" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-2048" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-method)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4096" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-8192" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-16384" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-32768" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-65536" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-131072" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-262144" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-524288" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-1048576" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-2097152" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-4194304" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-reference)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">R</text></g><g id="icon-8388608" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="6,5 6,19 18,19, 18,10 13,5"></polygon><line x1="9" y1="9" x2="13" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-folder" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="5,5 10,5 12,8 19,8 19,18 5,18"></polygon></g></g><g id="icon-chevronDown" class="tsd-no-select"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-icon-text)"></path></g><g id="icon-chevronSmall" class="tsd-no-select"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-icon-text)"></path></g><g id="icon-checkbox" class="tsd-no-select"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu" class="tsd-no-select"><rect x="1" y="3" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-icon-text)"></rect></g><g id="icon-search" class="tsd-no-select"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-icon-text)"></path></g><g id="icon-anchor" class="tsd-no-select"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g>`;
7
+ svg.style.display = "none";
8
+ if (location.protocol === "file:") updateUseElements();
9
+ }
10
+
11
+ function updateUseElements() {
12
+ document.querySelectorAll("use").forEach(el => {
13
+ if (el.getAttribute("href").includes("#icon-")) {
14
+ el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#"));
15
+ }
16
+ });
17
+ }
18
+ })()
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg"><g id="icon-1" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-2" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">N</text></g><g id="icon-8" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">E</text></g><g id="icon-16" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-32" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">V</text></g><g id="icon-64" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-128" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-256" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">I</text></g><g id="icon-512" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-1024" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-2048" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-method)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4096" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-8192" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-16384" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-32768" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-65536" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-131072" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-262144" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-524288" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-1048576" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-2097152" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-4194304" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-reference)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">R</text></g><g id="icon-8388608" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="6,5 6,19 18,19, 18,10 13,5"></polygon><line x1="9" y1="9" x2="13" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-folder" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="5,5 10,5 12,8 19,8 19,18 5,18"></polygon></g></g><g id="icon-chevronDown" class="tsd-no-select"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-icon-text)"></path></g><g id="icon-chevronSmall" class="tsd-no-select"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-icon-text)"></path></g><g id="icon-checkbox" class="tsd-no-select"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu" class="tsd-no-select"><rect x="1" y="3" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-icon-text)"></rect></g><g id="icon-search" class="tsd-no-select"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-icon-text)"></path></g><g id="icon-anchor" class="tsd-no-select"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g></svg>