@dotenvx/dotenvx 2.26.0 → 2.27.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 (45) hide show
  1. package/CHANGELOG.md +14 -2
  2. package/README.md +48 -40
  3. package/package.json +12 -2
  4. package/src/cli/actions/decrypt.js +3 -3
  5. package/src/cli/actions/encrypt.js +3 -3
  6. package/src/cli/actions/get.js +2 -2
  7. package/src/cli/actions/keypair.js +1 -1
  8. package/src/cli/actions/run.js +46 -42
  9. package/src/cli/actions/set.js +2 -2
  10. package/src/cli/actions/validate.js +21 -33
  11. package/src/cli/commands/armor.js +1 -1
  12. package/src/cli/commands/custody.js +43 -0
  13. package/src/cli/commands/native.js +1 -1
  14. package/src/cli/dotenvx.js +11 -6
  15. package/src/lib/grammars/envfile.peggy +98 -0
  16. package/src/lib/helpers/bitwardenCustody.js +9 -1
  17. package/src/lib/helpers/encryptedSources.js +15 -0
  18. package/src/lib/helpers/envfileParser.js +2731 -0
  19. package/src/lib/helpers/errors.js +16 -16
  20. package/src/lib/helpers/executeCommand.js +6 -2
  21. package/src/lib/helpers/formatEnvfileSyntaxError.js +24 -0
  22. package/src/lib/helpers/isValidEmail.js +11 -0
  23. package/src/lib/helpers/isValidUrl.js +9 -0
  24. package/src/lib/helpers/onePasswordCustody.js +10 -2
  25. package/src/lib/helpers/parseWithDecryptor.js +9 -1
  26. package/src/lib/helpers/readEnvfile.js +128 -0
  27. package/src/lib/helpers/selectKeyStorage.js +2 -2
  28. package/src/lib/helpers/validate.js +83 -14
  29. package/src/lib/helpers/validateEnvfile.js +24 -0
  30. package/src/lib/main.js +7 -7
  31. package/src/lib/providers/index.js +1 -1
  32. package/src/lib/proxy/configureProxy.js +55 -0
  33. package/src/lib/proxy/eligibleHeaders.js +16 -0
  34. package/src/lib/proxy/prepareProxy.js +24 -0
  35. package/src/lib/proxy/proxyCertificates.js +44 -0
  36. package/src/lib/proxy/proxyForward.js +65 -0
  37. package/src/lib/proxy/proxyPreload.js +21 -0
  38. package/src/lib/proxy/proxyPreloadSource.js +3 -0
  39. package/src/lib/proxy/proxyServer.js +175 -0
  40. package/src/lib/resolvers/envs.js +15 -5
  41. package/src/lib/resolvers/get.js +1 -1
  42. package/src/lib/services/custodyTransfer.js +50 -0
  43. package/src/lib/services/validate.js +58 -0
  44. package/src/lib/transforms/set.js +2 -2
  45. package/src/lib/helpers/validateEnvExample.js +0 -24
@@ -0,0 +1,2731 @@
1
+ // @generated by Peggy 5.1.0.
2
+ //
3
+ // https://peggyjs.org/
4
+
5
+ "use strict";
6
+
7
+ class peg$SyntaxError extends SyntaxError {
8
+ constructor(message, expected, found, location) {
9
+ super(message);
10
+ this.expected = expected;
11
+ this.found = found;
12
+ this.location = location;
13
+ this.name = "SyntaxError";
14
+ }
15
+
16
+ format(sources) {
17
+ let str = "Error: " + this.message;
18
+ if (this.location) {
19
+ let src = null;
20
+ const st = sources.find(s => s.source === this.location.source);
21
+ if (st) {
22
+ src = st.text.split(/\r\n|\n|\r/g);
23
+ }
24
+ const s = this.location.start;
25
+ const offset_s = (this.location.source && (typeof this.location.source.offset === "function"))
26
+ ? this.location.source.offset(s)
27
+ : s;
28
+ const loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
29
+ if (src) {
30
+ const e = this.location.end;
31
+ const filler = "".padEnd(offset_s.line.toString().length, " ");
32
+ const line = src[s.line - 1];
33
+ const last = s.line === e.line ? e.column : line.length + 1;
34
+ const hatLen = (last - s.column) || 1;
35
+ str += "\n --> " + loc + "\n"
36
+ + filler + " |\n"
37
+ + offset_s.line + " | " + line + "\n"
38
+ + filler + " | " + "".padEnd(s.column - 1, " ")
39
+ + "".padEnd(hatLen, "^");
40
+ } else {
41
+ str += "\n at " + loc;
42
+ }
43
+ }
44
+ return str;
45
+ }
46
+
47
+ static buildMessage(expected, found) {
48
+ function hex(ch) {
49
+ return ch.codePointAt(0).toString(16).toUpperCase();
50
+ }
51
+
52
+ const nonPrintable = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode")
53
+ ? new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu")
54
+ : null;
55
+ function unicodeEscape(s) {
56
+ if (nonPrintable) {
57
+ return s.replace(nonPrintable, ch => "\\u{" + hex(ch) + "}");
58
+ }
59
+ return s;
60
+ }
61
+
62
+ function literalEscape(s) {
63
+ return unicodeEscape(s
64
+ .replace(/\\/g, "\\\\")
65
+ .replace(/"/g, "\\\"")
66
+ .replace(/\0/g, "\\0")
67
+ .replace(/\t/g, "\\t")
68
+ .replace(/\n/g, "\\n")
69
+ .replace(/\r/g, "\\r")
70
+ .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
71
+ .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
72
+ }
73
+
74
+ function classEscape(s) {
75
+ return unicodeEscape(s
76
+ .replace(/\\/g, "\\\\")
77
+ .replace(/\]/g, "\\]")
78
+ .replace(/\^/g, "\\^")
79
+ .replace(/-/g, "\\-")
80
+ .replace(/\0/g, "\\0")
81
+ .replace(/\t/g, "\\t")
82
+ .replace(/\n/g, "\\n")
83
+ .replace(/\r/g, "\\r")
84
+ .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
85
+ .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
86
+ }
87
+
88
+ const DESCRIBE_EXPECTATION_FNS = {
89
+ literal(expectation) {
90
+ return "\"" + literalEscape(expectation.text) + "\"";
91
+ },
92
+
93
+ class(expectation) {
94
+ const escapedParts = expectation.parts.map(
95
+ part => (Array.isArray(part)
96
+ ? classEscape(part[0]) + "-" + classEscape(part[1])
97
+ : classEscape(part))
98
+ );
99
+
100
+ return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]" + (expectation.unicode ? "u" : "");
101
+ },
102
+
103
+ any() {
104
+ return "any character";
105
+ },
106
+
107
+ end() {
108
+ return "end of input";
109
+ },
110
+
111
+ other(expectation) {
112
+ return expectation.description;
113
+ },
114
+ };
115
+
116
+ function describeExpectation(expectation) {
117
+ return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
118
+ }
119
+
120
+ function describeExpected(expected) {
121
+ const descriptions = expected.map(describeExpectation);
122
+ descriptions.sort();
123
+
124
+ if (descriptions.length > 0) {
125
+ let j = 1;
126
+ for (let i = 1; i < descriptions.length; i++) {
127
+ if (descriptions[i - 1] !== descriptions[i]) {
128
+ descriptions[j] = descriptions[i];
129
+ j++;
130
+ }
131
+ }
132
+ descriptions.length = j;
133
+ }
134
+
135
+ switch (descriptions.length) {
136
+ case 1:
137
+ return descriptions[0];
138
+
139
+ case 2:
140
+ return descriptions[0] + " or " + descriptions[1];
141
+
142
+ default:
143
+ return descriptions.slice(0, -1).join(", ")
144
+ + ", or "
145
+ + descriptions[descriptions.length - 1];
146
+ }
147
+ }
148
+
149
+ function describeFound(found) {
150
+ return found ? "\"" + literalEscape(found) + "\"" : "end of input";
151
+ }
152
+
153
+ return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
154
+ }
155
+ }
156
+
157
+ function peg$parse(input, options) {
158
+ options = options !== undefined ? options : {};
159
+
160
+ const peg$FAILED = {};
161
+ const peg$source = options.grammarSource;
162
+
163
+ const peg$startRuleFunctions = {
164
+ Document: peg$parseDocument,
165
+ };
166
+ let peg$startRuleFunction = peg$parseDocument;
167
+
168
+ const peg$c0 = "file";
169
+ const peg$c1 = "do";
170
+ const peg$c2 = "end";
171
+ const peg$c3 = "\"";
172
+ const peg$c4 = "'";
173
+ const peg$c5 = "encrypted";
174
+ const peg$c6 = "env";
175
+ const peg$c7 = ",";
176
+ const peg$c8 = "proxy";
177
+ const peg$c9 = ":";
178
+ const peg$c10 = "required";
179
+ const peg$c11 = "optional";
180
+ const peg$c12 = "type";
181
+ const peg$c13 = "enum";
182
+ const peg$c14 = "min";
183
+ const peg$c15 = "max";
184
+ const peg$c16 = "[";
185
+ const peg$c17 = "]";
186
+ const peg$c18 = "\\";
187
+ const peg$c19 = "\"integer\"";
188
+ const peg$c20 = "'integer'";
189
+ const peg$c21 = "\"boolean\"";
190
+ const peg$c22 = "'boolean'";
191
+ const peg$c23 = "\"port\"";
192
+ const peg$c24 = "'port'";
193
+ const peg$c25 = "\"url\"";
194
+ const peg$c26 = "'url'";
195
+ const peg$c27 = "\"email\"";
196
+ const peg$c28 = "'email'";
197
+ const peg$c29 = "\"ip\"";
198
+ const peg$c30 = "'ip'";
199
+ const peg$c31 = "true";
200
+ const peg$c32 = "{";
201
+ const peg$c33 = "domain";
202
+ const peg$c34 = "}";
203
+ const peg$c35 = "false";
204
+ const peg$c36 = "#";
205
+ const peg$c37 = "\r\n";
206
+
207
+ const peg$r0 = /^[ \t]/;
208
+ const peg$r1 = /^[^"\r\n\0]/;
209
+ const peg$r2 = /^[^'\r\n\0]/;
210
+ const peg$r3 = /^[+\-]/;
211
+ const peg$r4 = /^[0-9]/;
212
+ const peg$r5 = /^[^"\\\r\n]/;
213
+ const peg$r6 = /^[^'\\\r\n]/;
214
+ const peg$r7 = /^["'\\nrt]/;
215
+ const peg$r8 = /^[A-Za-z0-9.\-]/;
216
+ const peg$r9 = /^[A-Za-z_]/;
217
+ const peg$r10 = /^[A-Za-z0-9_]/;
218
+ const peg$r11 = /^[^\r\n]/;
219
+ const peg$r12 = /^[\n\r]/;
220
+
221
+ const peg$e0 = peg$literalExpectation("file", false);
222
+ const peg$e1 = peg$classExpectation([" ", "\t"], false, false, false);
223
+ const peg$e2 = peg$literalExpectation("do", false);
224
+ const peg$e3 = peg$literalExpectation("end", false);
225
+ const peg$e4 = peg$anyExpectation();
226
+ const peg$e5 = peg$otherExpectation("a quoted filename");
227
+ const peg$e6 = peg$literalExpectation("\"", false);
228
+ const peg$e7 = peg$classExpectation(["\"", "\r", "\n", "\0"], true, false, false);
229
+ const peg$e8 = peg$literalExpectation("'", false);
230
+ const peg$e9 = peg$classExpectation(["'", "\r", "\n", "\0"], true, false, false);
231
+ const peg$e10 = peg$literalExpectation("encrypted", false);
232
+ const peg$e11 = peg$literalExpectation("env", false);
233
+ const peg$e12 = peg$literalExpectation(",", false);
234
+ const peg$e13 = peg$literalExpectation("proxy", false);
235
+ const peg$e14 = peg$literalExpectation(":", false);
236
+ const peg$e15 = peg$literalExpectation("required", false);
237
+ const peg$e16 = peg$literalExpectation("optional", false);
238
+ const peg$e17 = peg$literalExpectation("type", false);
239
+ const peg$e18 = peg$literalExpectation("enum", false);
240
+ const peg$e19 = peg$literalExpectation("min", false);
241
+ const peg$e20 = peg$literalExpectation("max", false);
242
+ const peg$e21 = peg$otherExpectation("an integer");
243
+ const peg$e22 = peg$classExpectation(["+", "-"], false, false, false);
244
+ const peg$e23 = peg$classExpectation([["0", "9"]], false, false, false);
245
+ const peg$e24 = peg$literalExpectation("[", false);
246
+ const peg$e25 = peg$literalExpectation("]", false);
247
+ const peg$e26 = peg$classExpectation(["\"", "\\", "\r", "\n"], true, false, false);
248
+ const peg$e27 = peg$classExpectation(["'", "\\", "\r", "\n"], true, false, false);
249
+ const peg$e28 = peg$literalExpectation("\\", false);
250
+ const peg$e29 = peg$classExpectation(["\"", "'", "\\", "n", "r", "t"], false, false, false);
251
+ const peg$e30 = peg$otherExpectation("a supported type (integer, boolean, port, url, email, or ip)");
252
+ const peg$e31 = peg$literalExpectation("\"integer\"", false);
253
+ const peg$e32 = peg$literalExpectation("'integer'", false);
254
+ const peg$e33 = peg$literalExpectation("\"boolean\"", false);
255
+ const peg$e34 = peg$literalExpectation("'boolean'", false);
256
+ const peg$e35 = peg$literalExpectation("\"port\"", false);
257
+ const peg$e36 = peg$literalExpectation("'port'", false);
258
+ const peg$e37 = peg$literalExpectation("\"url\"", false);
259
+ const peg$e38 = peg$literalExpectation("'url'", false);
260
+ const peg$e39 = peg$literalExpectation("\"email\"", false);
261
+ const peg$e40 = peg$literalExpectation("'email'", false);
262
+ const peg$e41 = peg$literalExpectation("\"ip\"", false);
263
+ const peg$e42 = peg$literalExpectation("'ip'", false);
264
+ const peg$e43 = peg$otherExpectation("true or false");
265
+ const peg$e44 = peg$literalExpectation("true", false);
266
+ const peg$e45 = peg$literalExpectation("{", false);
267
+ const peg$e46 = peg$literalExpectation("domain", false);
268
+ const peg$e47 = peg$literalExpectation("}", false);
269
+ const peg$e48 = peg$literalExpectation("false", false);
270
+ const peg$e49 = peg$otherExpectation("a quoted domain");
271
+ const peg$e50 = peg$classExpectation([["A", "Z"], ["a", "z"], ["0", "9"], ".", "-"], false, false, false);
272
+ const peg$e51 = peg$otherExpectation("a quoted variable name");
273
+ const peg$e52 = peg$classExpectation([["A", "Z"], ["a", "z"], "_"], false, false, false);
274
+ const peg$e53 = peg$classExpectation([["A", "Z"], ["a", "z"], ["0", "9"], "_"], false, false, false);
275
+ const peg$e54 = peg$literalExpectation("#", false);
276
+ const peg$e55 = peg$classExpectation(["\r", "\n"], true, false, false);
277
+ const peg$e56 = peg$literalExpectation("\r\n", false);
278
+ const peg$e57 = peg$classExpectation(["\n", "\r"], false, false, false);
279
+
280
+ function peg$f0(encrypted, entries) {
281
+ return { encrypted: encrypted === true, declarations: entries.map(item => item[0]).filter(item => !item.file), files: entries.map(item => item[0]).filter(item => item.file) };
282
+ }
283
+ function peg$f1(file, encrypted, declarations) {
284
+ return { file, encrypted, declarations: declarations.map(item => item[0]) };
285
+ }
286
+ function peg$f2(value) { return value; }
287
+ function peg$f3(value) { return value; }
288
+ function peg$f4(value) { return value; }
289
+ function peg$f5(name, options) {
290
+ const declaration = { name };
291
+ const seen = new Set();
292
+ for (const option of options) {
293
+ if (seen.has(option.key)) error(`Duplicate Envfile option: ${option.key}`);
294
+ if ((option.key === "optional" && seen.has("required")) ||
295
+ (option.key === "required" && seen.has("optional"))) {
296
+ error("Cannot combine required and optional in an Envfile declaration");
297
+ }
298
+ seen.add(option.key);
299
+ if (option.key === "optional") declaration.required = !option.value;
300
+ else declaration[option.key] = option.value;
301
+ }
302
+ return declaration;
303
+ }
304
+ function peg$f6(value) { return { key: "proxy", value }; }
305
+ function peg$f7(value) { return { key: "required", value }; }
306
+ function peg$f8(value) { return { key: "optional", value }; }
307
+ function peg$f9(value) { return { key: "encrypted", value }; }
308
+ function peg$f10(value) { return { key: "type", value }; }
309
+ function peg$f11(value) { return { key: "enum", value }; }
310
+ function peg$f12(key, value) { return { key, value }; }
311
+ function peg$f13(value) { return value; }
312
+ function peg$f14(first, value) { return value; }
313
+ function peg$f15(first, rest) {
314
+ return [first, ...rest];
315
+ }
316
+ function peg$f16(chars) { return chars.join(""); }
317
+ function peg$f17(chars) { return chars.join(""); }
318
+ function peg$f18(char) {
319
+ return ({ n: "\n", r: "\r", t: "\t" })[char] || char;
320
+ }
321
+ function peg$f19() { return "integer"; }
322
+ function peg$f20() { return "boolean"; }
323
+ function peg$f21() { return "port"; }
324
+ function peg$f22() { return "url"; }
325
+ function peg$f23() { return "email"; }
326
+ function peg$f24() { return "ip"; }
327
+ function peg$f25() { return true; }
328
+ function peg$f26(domain) { return { domain }; }
329
+ function peg$f27() { return false; }
330
+ function peg$f28(host) { return host; }
331
+ function peg$f29(host) { return host; }
332
+ function peg$f30(name) { return name; }
333
+ function peg$f31(name) { return name; }
334
+ let peg$currPos = options.peg$currPos | 0;
335
+ let peg$savedPos = peg$currPos;
336
+ const peg$posDetailsCache = [{ line: 1, column: 1 }];
337
+ let peg$maxFailPos = peg$currPos;
338
+ let peg$maxFailExpected = options.peg$maxFailExpected || [];
339
+ let peg$silentFails = options.peg$silentFails | 0;
340
+
341
+ let peg$result;
342
+
343
+ if (options.startRule) {
344
+ if (!(options.startRule in peg$startRuleFunctions)) {
345
+ throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
346
+ }
347
+
348
+ peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
349
+ }
350
+
351
+ function text() {
352
+ return input.substring(peg$savedPos, peg$currPos);
353
+ }
354
+
355
+ function offset() {
356
+ return peg$savedPos;
357
+ }
358
+
359
+ function range() {
360
+ return {
361
+ source: peg$source,
362
+ start: peg$savedPos,
363
+ end: peg$currPos,
364
+ };
365
+ }
366
+
367
+ function location() {
368
+ return peg$computeLocation(peg$savedPos, peg$currPos);
369
+ }
370
+
371
+ function expected(description, location) {
372
+ location = location !== undefined
373
+ ? location
374
+ : peg$computeLocation(peg$savedPos, peg$currPos);
375
+
376
+ throw peg$buildStructuredError(
377
+ [peg$otherExpectation(description)],
378
+ input.substring(peg$savedPos, peg$currPos),
379
+ location
380
+ );
381
+ }
382
+
383
+ function error(message, location) {
384
+ location = location !== undefined
385
+ ? location
386
+ : peg$computeLocation(peg$savedPos, peg$currPos);
387
+
388
+ throw peg$buildSimpleError(message, location);
389
+ }
390
+
391
+ function peg$getUnicode(pos = peg$currPos) {
392
+ const cp = input.codePointAt(pos);
393
+ if (cp === undefined) {
394
+ return "";
395
+ }
396
+ return String.fromCodePoint(cp);
397
+ }
398
+
399
+ function peg$literalExpectation(text, ignoreCase) {
400
+ return { type: "literal", text, ignoreCase };
401
+ }
402
+
403
+ function peg$classExpectation(parts, inverted, ignoreCase, unicode) {
404
+ return { type: "class", parts, inverted, ignoreCase, unicode };
405
+ }
406
+
407
+ function peg$anyExpectation() {
408
+ return { type: "any" };
409
+ }
410
+
411
+ function peg$endExpectation() {
412
+ return { type: "end" };
413
+ }
414
+
415
+ function peg$otherExpectation(description) {
416
+ return { type: "other", description };
417
+ }
418
+
419
+ function peg$computePosDetails(pos) {
420
+ let details = peg$posDetailsCache[pos];
421
+ let p;
422
+
423
+ if (details) {
424
+ return details;
425
+ } else {
426
+ if (pos >= peg$posDetailsCache.length) {
427
+ p = peg$posDetailsCache.length - 1;
428
+ } else {
429
+ p = pos;
430
+ while (!peg$posDetailsCache[--p]) {}
431
+ }
432
+
433
+ details = peg$posDetailsCache[p];
434
+ details = {
435
+ line: details.line,
436
+ column: details.column,
437
+ };
438
+
439
+ while (p < pos) {
440
+ if (input.charCodeAt(p) === 10) {
441
+ details.line++;
442
+ details.column = 1;
443
+ } else {
444
+ details.column++;
445
+ }
446
+
447
+ p++;
448
+ }
449
+
450
+ peg$posDetailsCache[pos] = details;
451
+
452
+ return details;
453
+ }
454
+ }
455
+
456
+ function peg$computeLocation(startPos, endPos, offset) {
457
+ const startPosDetails = peg$computePosDetails(startPos);
458
+ const endPosDetails = peg$computePosDetails(endPos);
459
+
460
+ const res = {
461
+ source: peg$source,
462
+ start: {
463
+ offset: startPos,
464
+ line: startPosDetails.line,
465
+ column: startPosDetails.column,
466
+ },
467
+ end: {
468
+ offset: endPos,
469
+ line: endPosDetails.line,
470
+ column: endPosDetails.column,
471
+ },
472
+ };
473
+ if (offset && peg$source && (typeof peg$source.offset === "function")) {
474
+ res.start = peg$source.offset(res.start);
475
+ res.end = peg$source.offset(res.end);
476
+ }
477
+ return res;
478
+ }
479
+
480
+ function peg$fail(expected) {
481
+ if (peg$currPos < peg$maxFailPos) { return; }
482
+
483
+ if (peg$currPos > peg$maxFailPos) {
484
+ peg$maxFailPos = peg$currPos;
485
+ peg$maxFailExpected = [];
486
+ }
487
+
488
+ peg$maxFailExpected.push(expected);
489
+ }
490
+
491
+ function peg$buildSimpleError(message, location) {
492
+ return new peg$SyntaxError(message, null, null, location);
493
+ }
494
+
495
+ function peg$buildStructuredError(expected, found, location) {
496
+ return new peg$SyntaxError(
497
+ peg$SyntaxError.buildMessage(expected, found),
498
+ expected,
499
+ found,
500
+ location
501
+ );
502
+ }
503
+
504
+ function peg$parseDocument() {
505
+ let s0, s1, s2, s3, s4, s5, s6, s7;
506
+
507
+ s0 = peg$currPos;
508
+ s1 = peg$parse_();
509
+ s2 = peg$parseEncryptedDefault();
510
+ if (s2 === peg$FAILED) {
511
+ s2 = null;
512
+ }
513
+ s3 = peg$parse_();
514
+ s4 = [];
515
+ s5 = peg$currPos;
516
+ s6 = peg$parseFileBlock();
517
+ if (s6 === peg$FAILED) {
518
+ s6 = peg$parseDeclaration();
519
+ }
520
+ if (s6 !== peg$FAILED) {
521
+ s7 = peg$parse_();
522
+ s6 = [s6, s7];
523
+ s5 = s6;
524
+ } else {
525
+ peg$currPos = s5;
526
+ s5 = peg$FAILED;
527
+ }
528
+ while (s5 !== peg$FAILED) {
529
+ s4.push(s5);
530
+ s5 = peg$currPos;
531
+ s6 = peg$parseFileBlock();
532
+ if (s6 === peg$FAILED) {
533
+ s6 = peg$parseDeclaration();
534
+ }
535
+ if (s6 !== peg$FAILED) {
536
+ s7 = peg$parse_();
537
+ s6 = [s6, s7];
538
+ s5 = s6;
539
+ } else {
540
+ peg$currPos = s5;
541
+ s5 = peg$FAILED;
542
+ }
543
+ }
544
+ peg$savedPos = s0;
545
+ s0 = peg$f0(s2, s4);
546
+
547
+ return s0;
548
+ }
549
+
550
+ function peg$parseFileBlock() {
551
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, s17;
552
+
553
+ s0 = peg$currPos;
554
+ if (input.substr(peg$currPos, 4) === peg$c0) {
555
+ s1 = peg$c0;
556
+ peg$currPos += 4;
557
+ } else {
558
+ s1 = peg$FAILED;
559
+ if (peg$silentFails === 0) { peg$fail(peg$e0); }
560
+ }
561
+ if (s1 !== peg$FAILED) {
562
+ s2 = [];
563
+ s3 = input.charAt(peg$currPos);
564
+ if (peg$r0.test(s3)) {
565
+ peg$currPos++;
566
+ } else {
567
+ s3 = peg$FAILED;
568
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
569
+ }
570
+ if (s3 !== peg$FAILED) {
571
+ while (s3 !== peg$FAILED) {
572
+ s2.push(s3);
573
+ s3 = input.charAt(peg$currPos);
574
+ if (peg$r0.test(s3)) {
575
+ peg$currPos++;
576
+ } else {
577
+ s3 = peg$FAILED;
578
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
579
+ }
580
+ }
581
+ } else {
582
+ s2 = peg$FAILED;
583
+ }
584
+ if (s2 !== peg$FAILED) {
585
+ s3 = peg$parseFilename();
586
+ if (s3 !== peg$FAILED) {
587
+ s4 = [];
588
+ s5 = input.charAt(peg$currPos);
589
+ if (peg$r0.test(s5)) {
590
+ peg$currPos++;
591
+ } else {
592
+ s5 = peg$FAILED;
593
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
594
+ }
595
+ if (s5 !== peg$FAILED) {
596
+ while (s5 !== peg$FAILED) {
597
+ s4.push(s5);
598
+ s5 = input.charAt(peg$currPos);
599
+ if (peg$r0.test(s5)) {
600
+ peg$currPos++;
601
+ } else {
602
+ s5 = peg$FAILED;
603
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
604
+ }
605
+ }
606
+ } else {
607
+ s4 = peg$FAILED;
608
+ }
609
+ if (s4 !== peg$FAILED) {
610
+ if (input.substr(peg$currPos, 2) === peg$c1) {
611
+ s5 = peg$c1;
612
+ peg$currPos += 2;
613
+ } else {
614
+ s5 = peg$FAILED;
615
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
616
+ }
617
+ if (s5 !== peg$FAILED) {
618
+ s6 = [];
619
+ s7 = input.charAt(peg$currPos);
620
+ if (peg$r0.test(s7)) {
621
+ peg$currPos++;
622
+ } else {
623
+ s7 = peg$FAILED;
624
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
625
+ }
626
+ while (s7 !== peg$FAILED) {
627
+ s6.push(s7);
628
+ s7 = input.charAt(peg$currPos);
629
+ if (peg$r0.test(s7)) {
630
+ peg$currPos++;
631
+ } else {
632
+ s7 = peg$FAILED;
633
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
634
+ }
635
+ }
636
+ s7 = peg$parseComment();
637
+ if (s7 === peg$FAILED) {
638
+ s7 = null;
639
+ }
640
+ s8 = peg$parseNewline();
641
+ if (s8 !== peg$FAILED) {
642
+ s9 = peg$parse_();
643
+ s10 = peg$parseEncryptedDefault();
644
+ if (s10 === peg$FAILED) {
645
+ s10 = null;
646
+ }
647
+ s11 = peg$parse_();
648
+ s12 = [];
649
+ s13 = peg$currPos;
650
+ s14 = peg$parseDeclaration();
651
+ if (s14 !== peg$FAILED) {
652
+ s15 = peg$parse_();
653
+ s14 = [s14, s15];
654
+ s13 = s14;
655
+ } else {
656
+ peg$currPos = s13;
657
+ s13 = peg$FAILED;
658
+ }
659
+ while (s13 !== peg$FAILED) {
660
+ s12.push(s13);
661
+ s13 = peg$currPos;
662
+ s14 = peg$parseDeclaration();
663
+ if (s14 !== peg$FAILED) {
664
+ s15 = peg$parse_();
665
+ s14 = [s14, s15];
666
+ s13 = s14;
667
+ } else {
668
+ peg$currPos = s13;
669
+ s13 = peg$FAILED;
670
+ }
671
+ }
672
+ if (input.substr(peg$currPos, 3) === peg$c2) {
673
+ s13 = peg$c2;
674
+ peg$currPos += 3;
675
+ } else {
676
+ s13 = peg$FAILED;
677
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
678
+ }
679
+ if (s13 !== peg$FAILED) {
680
+ s14 = [];
681
+ s15 = input.charAt(peg$currPos);
682
+ if (peg$r0.test(s15)) {
683
+ peg$currPos++;
684
+ } else {
685
+ s15 = peg$FAILED;
686
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
687
+ }
688
+ while (s15 !== peg$FAILED) {
689
+ s14.push(s15);
690
+ s15 = input.charAt(peg$currPos);
691
+ if (peg$r0.test(s15)) {
692
+ peg$currPos++;
693
+ } else {
694
+ s15 = peg$FAILED;
695
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
696
+ }
697
+ }
698
+ s15 = peg$parseComment();
699
+ if (s15 === peg$FAILED) {
700
+ s15 = null;
701
+ }
702
+ s16 = peg$parseNewline();
703
+ if (s16 === peg$FAILED) {
704
+ s16 = peg$currPos;
705
+ peg$silentFails++;
706
+ if (input.length > peg$currPos) {
707
+ s17 = input.charAt(peg$currPos);
708
+ peg$currPos++;
709
+ } else {
710
+ s17 = peg$FAILED;
711
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
712
+ }
713
+ peg$silentFails--;
714
+ if (s17 === peg$FAILED) {
715
+ s16 = undefined;
716
+ } else {
717
+ peg$currPos = s16;
718
+ s16 = peg$FAILED;
719
+ }
720
+ }
721
+ if (s16 !== peg$FAILED) {
722
+ peg$savedPos = s0;
723
+ s0 = peg$f1(s3, s10, s12);
724
+ } else {
725
+ peg$currPos = s0;
726
+ s0 = peg$FAILED;
727
+ }
728
+ } else {
729
+ peg$currPos = s0;
730
+ s0 = peg$FAILED;
731
+ }
732
+ } else {
733
+ peg$currPos = s0;
734
+ s0 = peg$FAILED;
735
+ }
736
+ } else {
737
+ peg$currPos = s0;
738
+ s0 = peg$FAILED;
739
+ }
740
+ } else {
741
+ peg$currPos = s0;
742
+ s0 = peg$FAILED;
743
+ }
744
+ } else {
745
+ peg$currPos = s0;
746
+ s0 = peg$FAILED;
747
+ }
748
+ } else {
749
+ peg$currPos = s0;
750
+ s0 = peg$FAILED;
751
+ }
752
+ } else {
753
+ peg$currPos = s0;
754
+ s0 = peg$FAILED;
755
+ }
756
+
757
+ return s0;
758
+ }
759
+
760
+ function peg$parseFilename() {
761
+ let s0, s1, s2, s3, s4;
762
+
763
+ peg$silentFails++;
764
+ s0 = peg$currPos;
765
+ if (input.charCodeAt(peg$currPos) === 34) {
766
+ s1 = peg$c3;
767
+ peg$currPos++;
768
+ } else {
769
+ s1 = peg$FAILED;
770
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
771
+ }
772
+ if (s1 !== peg$FAILED) {
773
+ s2 = peg$currPos;
774
+ s3 = [];
775
+ s4 = input.charAt(peg$currPos);
776
+ if (peg$r1.test(s4)) {
777
+ peg$currPos++;
778
+ } else {
779
+ s4 = peg$FAILED;
780
+ if (peg$silentFails === 0) { peg$fail(peg$e7); }
781
+ }
782
+ if (s4 !== peg$FAILED) {
783
+ while (s4 !== peg$FAILED) {
784
+ s3.push(s4);
785
+ s4 = input.charAt(peg$currPos);
786
+ if (peg$r1.test(s4)) {
787
+ peg$currPos++;
788
+ } else {
789
+ s4 = peg$FAILED;
790
+ if (peg$silentFails === 0) { peg$fail(peg$e7); }
791
+ }
792
+ }
793
+ } else {
794
+ s3 = peg$FAILED;
795
+ }
796
+ if (s3 !== peg$FAILED) {
797
+ s2 = input.substring(s2, peg$currPos);
798
+ } else {
799
+ s2 = s3;
800
+ }
801
+ if (s2 !== peg$FAILED) {
802
+ if (input.charCodeAt(peg$currPos) === 34) {
803
+ s3 = peg$c3;
804
+ peg$currPos++;
805
+ } else {
806
+ s3 = peg$FAILED;
807
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
808
+ }
809
+ if (s3 !== peg$FAILED) {
810
+ peg$savedPos = s0;
811
+ s0 = peg$f2(s2);
812
+ } else {
813
+ peg$currPos = s0;
814
+ s0 = peg$FAILED;
815
+ }
816
+ } else {
817
+ peg$currPos = s0;
818
+ s0 = peg$FAILED;
819
+ }
820
+ } else {
821
+ peg$currPos = s0;
822
+ s0 = peg$FAILED;
823
+ }
824
+ if (s0 === peg$FAILED) {
825
+ s0 = peg$currPos;
826
+ if (input.charCodeAt(peg$currPos) === 39) {
827
+ s1 = peg$c4;
828
+ peg$currPos++;
829
+ } else {
830
+ s1 = peg$FAILED;
831
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
832
+ }
833
+ if (s1 !== peg$FAILED) {
834
+ s2 = peg$currPos;
835
+ s3 = [];
836
+ s4 = input.charAt(peg$currPos);
837
+ if (peg$r2.test(s4)) {
838
+ peg$currPos++;
839
+ } else {
840
+ s4 = peg$FAILED;
841
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
842
+ }
843
+ if (s4 !== peg$FAILED) {
844
+ while (s4 !== peg$FAILED) {
845
+ s3.push(s4);
846
+ s4 = input.charAt(peg$currPos);
847
+ if (peg$r2.test(s4)) {
848
+ peg$currPos++;
849
+ } else {
850
+ s4 = peg$FAILED;
851
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
852
+ }
853
+ }
854
+ } else {
855
+ s3 = peg$FAILED;
856
+ }
857
+ if (s3 !== peg$FAILED) {
858
+ s2 = input.substring(s2, peg$currPos);
859
+ } else {
860
+ s2 = s3;
861
+ }
862
+ if (s2 !== peg$FAILED) {
863
+ if (input.charCodeAt(peg$currPos) === 39) {
864
+ s3 = peg$c4;
865
+ peg$currPos++;
866
+ } else {
867
+ s3 = peg$FAILED;
868
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
869
+ }
870
+ if (s3 !== peg$FAILED) {
871
+ peg$savedPos = s0;
872
+ s0 = peg$f3(s2);
873
+ } else {
874
+ peg$currPos = s0;
875
+ s0 = peg$FAILED;
876
+ }
877
+ } else {
878
+ peg$currPos = s0;
879
+ s0 = peg$FAILED;
880
+ }
881
+ } else {
882
+ peg$currPos = s0;
883
+ s0 = peg$FAILED;
884
+ }
885
+ }
886
+ peg$silentFails--;
887
+ if (s0 === peg$FAILED) {
888
+ s1 = peg$FAILED;
889
+ if (peg$silentFails === 0) { peg$fail(peg$e5); }
890
+ }
891
+
892
+ return s0;
893
+ }
894
+
895
+ function peg$parseEncryptedDefault() {
896
+ let s0, s1, s2, s3, s4, s5, s6, s7;
897
+
898
+ s0 = peg$currPos;
899
+ if (input.substr(peg$currPos, 9) === peg$c5) {
900
+ s1 = peg$c5;
901
+ peg$currPos += 9;
902
+ } else {
903
+ s1 = peg$FAILED;
904
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
905
+ }
906
+ if (s1 !== peg$FAILED) {
907
+ s2 = [];
908
+ s3 = input.charAt(peg$currPos);
909
+ if (peg$r0.test(s3)) {
910
+ peg$currPos++;
911
+ } else {
912
+ s3 = peg$FAILED;
913
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
914
+ }
915
+ if (s3 !== peg$FAILED) {
916
+ while (s3 !== peg$FAILED) {
917
+ s2.push(s3);
918
+ s3 = input.charAt(peg$currPos);
919
+ if (peg$r0.test(s3)) {
920
+ peg$currPos++;
921
+ } else {
922
+ s3 = peg$FAILED;
923
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
924
+ }
925
+ }
926
+ } else {
927
+ s2 = peg$FAILED;
928
+ }
929
+ if (s2 !== peg$FAILED) {
930
+ s3 = peg$parseBoolean();
931
+ if (s3 !== peg$FAILED) {
932
+ s4 = [];
933
+ s5 = input.charAt(peg$currPos);
934
+ if (peg$r0.test(s5)) {
935
+ peg$currPos++;
936
+ } else {
937
+ s5 = peg$FAILED;
938
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
939
+ }
940
+ while (s5 !== peg$FAILED) {
941
+ s4.push(s5);
942
+ s5 = input.charAt(peg$currPos);
943
+ if (peg$r0.test(s5)) {
944
+ peg$currPos++;
945
+ } else {
946
+ s5 = peg$FAILED;
947
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
948
+ }
949
+ }
950
+ s5 = peg$parseComment();
951
+ if (s5 === peg$FAILED) {
952
+ s5 = null;
953
+ }
954
+ s6 = peg$parseNewline();
955
+ if (s6 === peg$FAILED) {
956
+ s6 = peg$currPos;
957
+ peg$silentFails++;
958
+ if (input.length > peg$currPos) {
959
+ s7 = input.charAt(peg$currPos);
960
+ peg$currPos++;
961
+ } else {
962
+ s7 = peg$FAILED;
963
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
964
+ }
965
+ peg$silentFails--;
966
+ if (s7 === peg$FAILED) {
967
+ s6 = undefined;
968
+ } else {
969
+ peg$currPos = s6;
970
+ s6 = peg$FAILED;
971
+ }
972
+ }
973
+ if (s6 !== peg$FAILED) {
974
+ peg$savedPos = s0;
975
+ s0 = peg$f4(s3);
976
+ } else {
977
+ peg$currPos = s0;
978
+ s0 = peg$FAILED;
979
+ }
980
+ } else {
981
+ peg$currPos = s0;
982
+ s0 = peg$FAILED;
983
+ }
984
+ } else {
985
+ peg$currPos = s0;
986
+ s0 = peg$FAILED;
987
+ }
988
+ } else {
989
+ peg$currPos = s0;
990
+ s0 = peg$FAILED;
991
+ }
992
+
993
+ return s0;
994
+ }
995
+
996
+ function peg$parseDeclaration() {
997
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8;
998
+
999
+ s0 = peg$currPos;
1000
+ if (input.substr(peg$currPos, 3) === peg$c6) {
1001
+ s1 = peg$c6;
1002
+ peg$currPos += 3;
1003
+ } else {
1004
+ s1 = peg$FAILED;
1005
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
1006
+ }
1007
+ if (s1 !== peg$FAILED) {
1008
+ s2 = [];
1009
+ s3 = input.charAt(peg$currPos);
1010
+ if (peg$r0.test(s3)) {
1011
+ peg$currPos++;
1012
+ } else {
1013
+ s3 = peg$FAILED;
1014
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1015
+ }
1016
+ if (s3 !== peg$FAILED) {
1017
+ while (s3 !== peg$FAILED) {
1018
+ s2.push(s3);
1019
+ s3 = input.charAt(peg$currPos);
1020
+ if (peg$r0.test(s3)) {
1021
+ peg$currPos++;
1022
+ } else {
1023
+ s3 = peg$FAILED;
1024
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1025
+ }
1026
+ }
1027
+ } else {
1028
+ s2 = peg$FAILED;
1029
+ }
1030
+ if (s2 !== peg$FAILED) {
1031
+ s3 = peg$parseName();
1032
+ if (s3 !== peg$FAILED) {
1033
+ s4 = [];
1034
+ s5 = peg$parseOption();
1035
+ while (s5 !== peg$FAILED) {
1036
+ s4.push(s5);
1037
+ s5 = peg$parseOption();
1038
+ }
1039
+ s5 = [];
1040
+ s6 = input.charAt(peg$currPos);
1041
+ if (peg$r0.test(s6)) {
1042
+ peg$currPos++;
1043
+ } else {
1044
+ s6 = peg$FAILED;
1045
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1046
+ }
1047
+ while (s6 !== peg$FAILED) {
1048
+ s5.push(s6);
1049
+ s6 = input.charAt(peg$currPos);
1050
+ if (peg$r0.test(s6)) {
1051
+ peg$currPos++;
1052
+ } else {
1053
+ s6 = peg$FAILED;
1054
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1055
+ }
1056
+ }
1057
+ s6 = peg$parseComment();
1058
+ if (s6 === peg$FAILED) {
1059
+ s6 = null;
1060
+ }
1061
+ s7 = peg$parseNewline();
1062
+ if (s7 === peg$FAILED) {
1063
+ s7 = peg$currPos;
1064
+ peg$silentFails++;
1065
+ if (input.length > peg$currPos) {
1066
+ s8 = input.charAt(peg$currPos);
1067
+ peg$currPos++;
1068
+ } else {
1069
+ s8 = peg$FAILED;
1070
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
1071
+ }
1072
+ peg$silentFails--;
1073
+ if (s8 === peg$FAILED) {
1074
+ s7 = undefined;
1075
+ } else {
1076
+ peg$currPos = s7;
1077
+ s7 = peg$FAILED;
1078
+ }
1079
+ }
1080
+ if (s7 !== peg$FAILED) {
1081
+ peg$savedPos = s0;
1082
+ s0 = peg$f5(s3, s4);
1083
+ } else {
1084
+ peg$currPos = s0;
1085
+ s0 = peg$FAILED;
1086
+ }
1087
+ } else {
1088
+ peg$currPos = s0;
1089
+ s0 = peg$FAILED;
1090
+ }
1091
+ } else {
1092
+ peg$currPos = s0;
1093
+ s0 = peg$FAILED;
1094
+ }
1095
+ } else {
1096
+ peg$currPos = s0;
1097
+ s0 = peg$FAILED;
1098
+ }
1099
+
1100
+ return s0;
1101
+ }
1102
+
1103
+ function peg$parseOption() {
1104
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8;
1105
+
1106
+ s0 = peg$currPos;
1107
+ s1 = [];
1108
+ s2 = input.charAt(peg$currPos);
1109
+ if (peg$r0.test(s2)) {
1110
+ peg$currPos++;
1111
+ } else {
1112
+ s2 = peg$FAILED;
1113
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1114
+ }
1115
+ while (s2 !== peg$FAILED) {
1116
+ s1.push(s2);
1117
+ s2 = input.charAt(peg$currPos);
1118
+ if (peg$r0.test(s2)) {
1119
+ peg$currPos++;
1120
+ } else {
1121
+ s2 = peg$FAILED;
1122
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1123
+ }
1124
+ }
1125
+ if (input.charCodeAt(peg$currPos) === 44) {
1126
+ s2 = peg$c7;
1127
+ peg$currPos++;
1128
+ } else {
1129
+ s2 = peg$FAILED;
1130
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1131
+ }
1132
+ if (s2 !== peg$FAILED) {
1133
+ s3 = peg$parse_();
1134
+ if (input.substr(peg$currPos, 5) === peg$c8) {
1135
+ s4 = peg$c8;
1136
+ peg$currPos += 5;
1137
+ } else {
1138
+ s4 = peg$FAILED;
1139
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
1140
+ }
1141
+ if (s4 !== peg$FAILED) {
1142
+ s5 = [];
1143
+ s6 = input.charAt(peg$currPos);
1144
+ if (peg$r0.test(s6)) {
1145
+ peg$currPos++;
1146
+ } else {
1147
+ s6 = peg$FAILED;
1148
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1149
+ }
1150
+ while (s6 !== peg$FAILED) {
1151
+ s5.push(s6);
1152
+ s6 = input.charAt(peg$currPos);
1153
+ if (peg$r0.test(s6)) {
1154
+ peg$currPos++;
1155
+ } else {
1156
+ s6 = peg$FAILED;
1157
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1158
+ }
1159
+ }
1160
+ if (input.charCodeAt(peg$currPos) === 58) {
1161
+ s6 = peg$c9;
1162
+ peg$currPos++;
1163
+ } else {
1164
+ s6 = peg$FAILED;
1165
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
1166
+ }
1167
+ if (s6 !== peg$FAILED) {
1168
+ s7 = peg$parse_();
1169
+ s8 = peg$parseProxyOptions();
1170
+ if (s8 === peg$FAILED) {
1171
+ s8 = peg$parseDisabled();
1172
+ }
1173
+ if (s8 !== peg$FAILED) {
1174
+ peg$savedPos = s0;
1175
+ s0 = peg$f6(s8);
1176
+ } else {
1177
+ peg$currPos = s0;
1178
+ s0 = peg$FAILED;
1179
+ }
1180
+ } else {
1181
+ peg$currPos = s0;
1182
+ s0 = peg$FAILED;
1183
+ }
1184
+ } else {
1185
+ peg$currPos = s0;
1186
+ s0 = peg$FAILED;
1187
+ }
1188
+ } else {
1189
+ peg$currPos = s0;
1190
+ s0 = peg$FAILED;
1191
+ }
1192
+ if (s0 === peg$FAILED) {
1193
+ s0 = peg$currPos;
1194
+ s1 = [];
1195
+ s2 = input.charAt(peg$currPos);
1196
+ if (peg$r0.test(s2)) {
1197
+ peg$currPos++;
1198
+ } else {
1199
+ s2 = peg$FAILED;
1200
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1201
+ }
1202
+ while (s2 !== peg$FAILED) {
1203
+ s1.push(s2);
1204
+ s2 = input.charAt(peg$currPos);
1205
+ if (peg$r0.test(s2)) {
1206
+ peg$currPos++;
1207
+ } else {
1208
+ s2 = peg$FAILED;
1209
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1210
+ }
1211
+ }
1212
+ if (input.charCodeAt(peg$currPos) === 44) {
1213
+ s2 = peg$c7;
1214
+ peg$currPos++;
1215
+ } else {
1216
+ s2 = peg$FAILED;
1217
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1218
+ }
1219
+ if (s2 !== peg$FAILED) {
1220
+ s3 = peg$parse_();
1221
+ if (input.substr(peg$currPos, 8) === peg$c10) {
1222
+ s4 = peg$c10;
1223
+ peg$currPos += 8;
1224
+ } else {
1225
+ s4 = peg$FAILED;
1226
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
1227
+ }
1228
+ if (s4 !== peg$FAILED) {
1229
+ s5 = [];
1230
+ s6 = input.charAt(peg$currPos);
1231
+ if (peg$r0.test(s6)) {
1232
+ peg$currPos++;
1233
+ } else {
1234
+ s6 = peg$FAILED;
1235
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1236
+ }
1237
+ while (s6 !== peg$FAILED) {
1238
+ s5.push(s6);
1239
+ s6 = input.charAt(peg$currPos);
1240
+ if (peg$r0.test(s6)) {
1241
+ peg$currPos++;
1242
+ } else {
1243
+ s6 = peg$FAILED;
1244
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1245
+ }
1246
+ }
1247
+ if (input.charCodeAt(peg$currPos) === 58) {
1248
+ s6 = peg$c9;
1249
+ peg$currPos++;
1250
+ } else {
1251
+ s6 = peg$FAILED;
1252
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
1253
+ }
1254
+ if (s6 !== peg$FAILED) {
1255
+ s7 = peg$parse_();
1256
+ s8 = peg$parseBoolean();
1257
+ if (s8 !== peg$FAILED) {
1258
+ peg$savedPos = s0;
1259
+ s0 = peg$f7(s8);
1260
+ } else {
1261
+ peg$currPos = s0;
1262
+ s0 = peg$FAILED;
1263
+ }
1264
+ } else {
1265
+ peg$currPos = s0;
1266
+ s0 = peg$FAILED;
1267
+ }
1268
+ } else {
1269
+ peg$currPos = s0;
1270
+ s0 = peg$FAILED;
1271
+ }
1272
+ } else {
1273
+ peg$currPos = s0;
1274
+ s0 = peg$FAILED;
1275
+ }
1276
+ if (s0 === peg$FAILED) {
1277
+ s0 = peg$currPos;
1278
+ s1 = [];
1279
+ s2 = input.charAt(peg$currPos);
1280
+ if (peg$r0.test(s2)) {
1281
+ peg$currPos++;
1282
+ } else {
1283
+ s2 = peg$FAILED;
1284
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1285
+ }
1286
+ while (s2 !== peg$FAILED) {
1287
+ s1.push(s2);
1288
+ s2 = input.charAt(peg$currPos);
1289
+ if (peg$r0.test(s2)) {
1290
+ peg$currPos++;
1291
+ } else {
1292
+ s2 = peg$FAILED;
1293
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1294
+ }
1295
+ }
1296
+ if (input.charCodeAt(peg$currPos) === 44) {
1297
+ s2 = peg$c7;
1298
+ peg$currPos++;
1299
+ } else {
1300
+ s2 = peg$FAILED;
1301
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1302
+ }
1303
+ if (s2 !== peg$FAILED) {
1304
+ s3 = peg$parse_();
1305
+ if (input.substr(peg$currPos, 8) === peg$c11) {
1306
+ s4 = peg$c11;
1307
+ peg$currPos += 8;
1308
+ } else {
1309
+ s4 = peg$FAILED;
1310
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
1311
+ }
1312
+ if (s4 !== peg$FAILED) {
1313
+ s5 = [];
1314
+ s6 = input.charAt(peg$currPos);
1315
+ if (peg$r0.test(s6)) {
1316
+ peg$currPos++;
1317
+ } else {
1318
+ s6 = peg$FAILED;
1319
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1320
+ }
1321
+ while (s6 !== peg$FAILED) {
1322
+ s5.push(s6);
1323
+ s6 = input.charAt(peg$currPos);
1324
+ if (peg$r0.test(s6)) {
1325
+ peg$currPos++;
1326
+ } else {
1327
+ s6 = peg$FAILED;
1328
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1329
+ }
1330
+ }
1331
+ if (input.charCodeAt(peg$currPos) === 58) {
1332
+ s6 = peg$c9;
1333
+ peg$currPos++;
1334
+ } else {
1335
+ s6 = peg$FAILED;
1336
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
1337
+ }
1338
+ if (s6 !== peg$FAILED) {
1339
+ s7 = peg$parse_();
1340
+ s8 = peg$parseBoolean();
1341
+ if (s8 !== peg$FAILED) {
1342
+ peg$savedPos = s0;
1343
+ s0 = peg$f8(s8);
1344
+ } else {
1345
+ peg$currPos = s0;
1346
+ s0 = peg$FAILED;
1347
+ }
1348
+ } else {
1349
+ peg$currPos = s0;
1350
+ s0 = peg$FAILED;
1351
+ }
1352
+ } else {
1353
+ peg$currPos = s0;
1354
+ s0 = peg$FAILED;
1355
+ }
1356
+ } else {
1357
+ peg$currPos = s0;
1358
+ s0 = peg$FAILED;
1359
+ }
1360
+ if (s0 === peg$FAILED) {
1361
+ s0 = peg$currPos;
1362
+ s1 = [];
1363
+ s2 = input.charAt(peg$currPos);
1364
+ if (peg$r0.test(s2)) {
1365
+ peg$currPos++;
1366
+ } else {
1367
+ s2 = peg$FAILED;
1368
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1369
+ }
1370
+ while (s2 !== peg$FAILED) {
1371
+ s1.push(s2);
1372
+ s2 = input.charAt(peg$currPos);
1373
+ if (peg$r0.test(s2)) {
1374
+ peg$currPos++;
1375
+ } else {
1376
+ s2 = peg$FAILED;
1377
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1378
+ }
1379
+ }
1380
+ if (input.charCodeAt(peg$currPos) === 44) {
1381
+ s2 = peg$c7;
1382
+ peg$currPos++;
1383
+ } else {
1384
+ s2 = peg$FAILED;
1385
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1386
+ }
1387
+ if (s2 !== peg$FAILED) {
1388
+ s3 = peg$parse_();
1389
+ if (input.substr(peg$currPos, 9) === peg$c5) {
1390
+ s4 = peg$c5;
1391
+ peg$currPos += 9;
1392
+ } else {
1393
+ s4 = peg$FAILED;
1394
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1395
+ }
1396
+ if (s4 !== peg$FAILED) {
1397
+ s5 = [];
1398
+ s6 = input.charAt(peg$currPos);
1399
+ if (peg$r0.test(s6)) {
1400
+ peg$currPos++;
1401
+ } else {
1402
+ s6 = peg$FAILED;
1403
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1404
+ }
1405
+ while (s6 !== peg$FAILED) {
1406
+ s5.push(s6);
1407
+ s6 = input.charAt(peg$currPos);
1408
+ if (peg$r0.test(s6)) {
1409
+ peg$currPos++;
1410
+ } else {
1411
+ s6 = peg$FAILED;
1412
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1413
+ }
1414
+ }
1415
+ if (input.charCodeAt(peg$currPos) === 58) {
1416
+ s6 = peg$c9;
1417
+ peg$currPos++;
1418
+ } else {
1419
+ s6 = peg$FAILED;
1420
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
1421
+ }
1422
+ if (s6 !== peg$FAILED) {
1423
+ s7 = peg$parse_();
1424
+ s8 = peg$parseBoolean();
1425
+ if (s8 !== peg$FAILED) {
1426
+ peg$savedPos = s0;
1427
+ s0 = peg$f9(s8);
1428
+ } else {
1429
+ peg$currPos = s0;
1430
+ s0 = peg$FAILED;
1431
+ }
1432
+ } else {
1433
+ peg$currPos = s0;
1434
+ s0 = peg$FAILED;
1435
+ }
1436
+ } else {
1437
+ peg$currPos = s0;
1438
+ s0 = peg$FAILED;
1439
+ }
1440
+ } else {
1441
+ peg$currPos = s0;
1442
+ s0 = peg$FAILED;
1443
+ }
1444
+ if (s0 === peg$FAILED) {
1445
+ s0 = peg$currPos;
1446
+ s1 = [];
1447
+ s2 = input.charAt(peg$currPos);
1448
+ if (peg$r0.test(s2)) {
1449
+ peg$currPos++;
1450
+ } else {
1451
+ s2 = peg$FAILED;
1452
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1453
+ }
1454
+ while (s2 !== peg$FAILED) {
1455
+ s1.push(s2);
1456
+ s2 = input.charAt(peg$currPos);
1457
+ if (peg$r0.test(s2)) {
1458
+ peg$currPos++;
1459
+ } else {
1460
+ s2 = peg$FAILED;
1461
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1462
+ }
1463
+ }
1464
+ if (input.charCodeAt(peg$currPos) === 44) {
1465
+ s2 = peg$c7;
1466
+ peg$currPos++;
1467
+ } else {
1468
+ s2 = peg$FAILED;
1469
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1470
+ }
1471
+ if (s2 !== peg$FAILED) {
1472
+ s3 = peg$parse_();
1473
+ if (input.substr(peg$currPos, 4) === peg$c12) {
1474
+ s4 = peg$c12;
1475
+ peg$currPos += 4;
1476
+ } else {
1477
+ s4 = peg$FAILED;
1478
+ if (peg$silentFails === 0) { peg$fail(peg$e17); }
1479
+ }
1480
+ if (s4 !== peg$FAILED) {
1481
+ s5 = [];
1482
+ s6 = input.charAt(peg$currPos);
1483
+ if (peg$r0.test(s6)) {
1484
+ peg$currPos++;
1485
+ } else {
1486
+ s6 = peg$FAILED;
1487
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1488
+ }
1489
+ while (s6 !== peg$FAILED) {
1490
+ s5.push(s6);
1491
+ s6 = input.charAt(peg$currPos);
1492
+ if (peg$r0.test(s6)) {
1493
+ peg$currPos++;
1494
+ } else {
1495
+ s6 = peg$FAILED;
1496
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1497
+ }
1498
+ }
1499
+ if (input.charCodeAt(peg$currPos) === 58) {
1500
+ s6 = peg$c9;
1501
+ peg$currPos++;
1502
+ } else {
1503
+ s6 = peg$FAILED;
1504
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
1505
+ }
1506
+ if (s6 !== peg$FAILED) {
1507
+ s7 = peg$parse_();
1508
+ s8 = peg$parseType();
1509
+ if (s8 !== peg$FAILED) {
1510
+ peg$savedPos = s0;
1511
+ s0 = peg$f10(s8);
1512
+ } else {
1513
+ peg$currPos = s0;
1514
+ s0 = peg$FAILED;
1515
+ }
1516
+ } else {
1517
+ peg$currPos = s0;
1518
+ s0 = peg$FAILED;
1519
+ }
1520
+ } else {
1521
+ peg$currPos = s0;
1522
+ s0 = peg$FAILED;
1523
+ }
1524
+ } else {
1525
+ peg$currPos = s0;
1526
+ s0 = peg$FAILED;
1527
+ }
1528
+ if (s0 === peg$FAILED) {
1529
+ s0 = peg$currPos;
1530
+ s1 = [];
1531
+ s2 = input.charAt(peg$currPos);
1532
+ if (peg$r0.test(s2)) {
1533
+ peg$currPos++;
1534
+ } else {
1535
+ s2 = peg$FAILED;
1536
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1537
+ }
1538
+ while (s2 !== peg$FAILED) {
1539
+ s1.push(s2);
1540
+ s2 = input.charAt(peg$currPos);
1541
+ if (peg$r0.test(s2)) {
1542
+ peg$currPos++;
1543
+ } else {
1544
+ s2 = peg$FAILED;
1545
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1546
+ }
1547
+ }
1548
+ if (input.charCodeAt(peg$currPos) === 44) {
1549
+ s2 = peg$c7;
1550
+ peg$currPos++;
1551
+ } else {
1552
+ s2 = peg$FAILED;
1553
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1554
+ }
1555
+ if (s2 !== peg$FAILED) {
1556
+ s3 = peg$parse_();
1557
+ if (input.substr(peg$currPos, 4) === peg$c13) {
1558
+ s4 = peg$c13;
1559
+ peg$currPos += 4;
1560
+ } else {
1561
+ s4 = peg$FAILED;
1562
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
1563
+ }
1564
+ if (s4 !== peg$FAILED) {
1565
+ s5 = [];
1566
+ s6 = input.charAt(peg$currPos);
1567
+ if (peg$r0.test(s6)) {
1568
+ peg$currPos++;
1569
+ } else {
1570
+ s6 = peg$FAILED;
1571
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1572
+ }
1573
+ while (s6 !== peg$FAILED) {
1574
+ s5.push(s6);
1575
+ s6 = input.charAt(peg$currPos);
1576
+ if (peg$r0.test(s6)) {
1577
+ peg$currPos++;
1578
+ } else {
1579
+ s6 = peg$FAILED;
1580
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1581
+ }
1582
+ }
1583
+ if (input.charCodeAt(peg$currPos) === 58) {
1584
+ s6 = peg$c9;
1585
+ peg$currPos++;
1586
+ } else {
1587
+ s6 = peg$FAILED;
1588
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
1589
+ }
1590
+ if (s6 !== peg$FAILED) {
1591
+ s7 = peg$parse_();
1592
+ s8 = peg$parseEnum();
1593
+ if (s8 !== peg$FAILED) {
1594
+ peg$savedPos = s0;
1595
+ s0 = peg$f11(s8);
1596
+ } else {
1597
+ peg$currPos = s0;
1598
+ s0 = peg$FAILED;
1599
+ }
1600
+ } else {
1601
+ peg$currPos = s0;
1602
+ s0 = peg$FAILED;
1603
+ }
1604
+ } else {
1605
+ peg$currPos = s0;
1606
+ s0 = peg$FAILED;
1607
+ }
1608
+ } else {
1609
+ peg$currPos = s0;
1610
+ s0 = peg$FAILED;
1611
+ }
1612
+ if (s0 === peg$FAILED) {
1613
+ s0 = peg$currPos;
1614
+ s1 = [];
1615
+ s2 = input.charAt(peg$currPos);
1616
+ if (peg$r0.test(s2)) {
1617
+ peg$currPos++;
1618
+ } else {
1619
+ s2 = peg$FAILED;
1620
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1621
+ }
1622
+ while (s2 !== peg$FAILED) {
1623
+ s1.push(s2);
1624
+ s2 = input.charAt(peg$currPos);
1625
+ if (peg$r0.test(s2)) {
1626
+ peg$currPos++;
1627
+ } else {
1628
+ s2 = peg$FAILED;
1629
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1630
+ }
1631
+ }
1632
+ if (input.charCodeAt(peg$currPos) === 44) {
1633
+ s2 = peg$c7;
1634
+ peg$currPos++;
1635
+ } else {
1636
+ s2 = peg$FAILED;
1637
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1638
+ }
1639
+ if (s2 !== peg$FAILED) {
1640
+ s3 = peg$parse_();
1641
+ if (input.substr(peg$currPos, 3) === peg$c14) {
1642
+ s4 = peg$c14;
1643
+ peg$currPos += 3;
1644
+ } else {
1645
+ s4 = peg$FAILED;
1646
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
1647
+ }
1648
+ if (s4 === peg$FAILED) {
1649
+ if (input.substr(peg$currPos, 3) === peg$c15) {
1650
+ s4 = peg$c15;
1651
+ peg$currPos += 3;
1652
+ } else {
1653
+ s4 = peg$FAILED;
1654
+ if (peg$silentFails === 0) { peg$fail(peg$e20); }
1655
+ }
1656
+ }
1657
+ if (s4 !== peg$FAILED) {
1658
+ s5 = [];
1659
+ s6 = input.charAt(peg$currPos);
1660
+ if (peg$r0.test(s6)) {
1661
+ peg$currPos++;
1662
+ } else {
1663
+ s6 = peg$FAILED;
1664
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1665
+ }
1666
+ while (s6 !== peg$FAILED) {
1667
+ s5.push(s6);
1668
+ s6 = input.charAt(peg$currPos);
1669
+ if (peg$r0.test(s6)) {
1670
+ peg$currPos++;
1671
+ } else {
1672
+ s6 = peg$FAILED;
1673
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1674
+ }
1675
+ }
1676
+ if (input.charCodeAt(peg$currPos) === 58) {
1677
+ s6 = peg$c9;
1678
+ peg$currPos++;
1679
+ } else {
1680
+ s6 = peg$FAILED;
1681
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
1682
+ }
1683
+ if (s6 !== peg$FAILED) {
1684
+ s7 = peg$parse_();
1685
+ s8 = peg$parseInteger();
1686
+ if (s8 !== peg$FAILED) {
1687
+ peg$savedPos = s0;
1688
+ s0 = peg$f12(s4, s8);
1689
+ } else {
1690
+ peg$currPos = s0;
1691
+ s0 = peg$FAILED;
1692
+ }
1693
+ } else {
1694
+ peg$currPos = s0;
1695
+ s0 = peg$FAILED;
1696
+ }
1697
+ } else {
1698
+ peg$currPos = s0;
1699
+ s0 = peg$FAILED;
1700
+ }
1701
+ } else {
1702
+ peg$currPos = s0;
1703
+ s0 = peg$FAILED;
1704
+ }
1705
+ }
1706
+ }
1707
+ }
1708
+ }
1709
+ }
1710
+ }
1711
+
1712
+ return s0;
1713
+ }
1714
+
1715
+ function peg$parseInteger() {
1716
+ let s0, s1, s2, s3, s4, s5;
1717
+
1718
+ peg$silentFails++;
1719
+ s0 = peg$currPos;
1720
+ s1 = peg$currPos;
1721
+ s2 = peg$currPos;
1722
+ s3 = input.charAt(peg$currPos);
1723
+ if (peg$r3.test(s3)) {
1724
+ peg$currPos++;
1725
+ } else {
1726
+ s3 = peg$FAILED;
1727
+ if (peg$silentFails === 0) { peg$fail(peg$e22); }
1728
+ }
1729
+ if (s3 === peg$FAILED) {
1730
+ s3 = null;
1731
+ }
1732
+ s4 = [];
1733
+ s5 = input.charAt(peg$currPos);
1734
+ if (peg$r4.test(s5)) {
1735
+ peg$currPos++;
1736
+ } else {
1737
+ s5 = peg$FAILED;
1738
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
1739
+ }
1740
+ if (s5 !== peg$FAILED) {
1741
+ while (s5 !== peg$FAILED) {
1742
+ s4.push(s5);
1743
+ s5 = input.charAt(peg$currPos);
1744
+ if (peg$r4.test(s5)) {
1745
+ peg$currPos++;
1746
+ } else {
1747
+ s5 = peg$FAILED;
1748
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
1749
+ }
1750
+ }
1751
+ } else {
1752
+ s4 = peg$FAILED;
1753
+ }
1754
+ if (s4 !== peg$FAILED) {
1755
+ s3 = [s3, s4];
1756
+ s2 = s3;
1757
+ } else {
1758
+ peg$currPos = s2;
1759
+ s2 = peg$FAILED;
1760
+ }
1761
+ if (s2 !== peg$FAILED) {
1762
+ s1 = input.substring(s1, peg$currPos);
1763
+ } else {
1764
+ s1 = s2;
1765
+ }
1766
+ if (s1 !== peg$FAILED) {
1767
+ peg$savedPos = s0;
1768
+ s1 = peg$f13(s1);
1769
+ }
1770
+ s0 = s1;
1771
+ peg$silentFails--;
1772
+ if (s0 === peg$FAILED) {
1773
+ s1 = peg$FAILED;
1774
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
1775
+ }
1776
+
1777
+ return s0;
1778
+ }
1779
+
1780
+ function peg$parseEnum() {
1781
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
1782
+
1783
+ s0 = peg$currPos;
1784
+ if (input.charCodeAt(peg$currPos) === 91) {
1785
+ s1 = peg$c16;
1786
+ peg$currPos++;
1787
+ } else {
1788
+ s1 = peg$FAILED;
1789
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
1790
+ }
1791
+ if (s1 !== peg$FAILED) {
1792
+ s2 = peg$parse_();
1793
+ s3 = peg$parseEnumValue();
1794
+ if (s3 !== peg$FAILED) {
1795
+ s4 = [];
1796
+ s5 = peg$currPos;
1797
+ s6 = peg$parse_();
1798
+ if (input.charCodeAt(peg$currPos) === 44) {
1799
+ s7 = peg$c7;
1800
+ peg$currPos++;
1801
+ } else {
1802
+ s7 = peg$FAILED;
1803
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1804
+ }
1805
+ if (s7 !== peg$FAILED) {
1806
+ s8 = peg$parse_();
1807
+ s9 = peg$parseEnumValue();
1808
+ if (s9 !== peg$FAILED) {
1809
+ peg$savedPos = s5;
1810
+ s5 = peg$f14(s3, s9);
1811
+ } else {
1812
+ peg$currPos = s5;
1813
+ s5 = peg$FAILED;
1814
+ }
1815
+ } else {
1816
+ peg$currPos = s5;
1817
+ s5 = peg$FAILED;
1818
+ }
1819
+ while (s5 !== peg$FAILED) {
1820
+ s4.push(s5);
1821
+ s5 = peg$currPos;
1822
+ s6 = peg$parse_();
1823
+ if (input.charCodeAt(peg$currPos) === 44) {
1824
+ s7 = peg$c7;
1825
+ peg$currPos++;
1826
+ } else {
1827
+ s7 = peg$FAILED;
1828
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1829
+ }
1830
+ if (s7 !== peg$FAILED) {
1831
+ s8 = peg$parse_();
1832
+ s9 = peg$parseEnumValue();
1833
+ if (s9 !== peg$FAILED) {
1834
+ peg$savedPos = s5;
1835
+ s5 = peg$f14(s3, s9);
1836
+ } else {
1837
+ peg$currPos = s5;
1838
+ s5 = peg$FAILED;
1839
+ }
1840
+ } else {
1841
+ peg$currPos = s5;
1842
+ s5 = peg$FAILED;
1843
+ }
1844
+ }
1845
+ s5 = peg$parse_();
1846
+ if (input.charCodeAt(peg$currPos) === 44) {
1847
+ s6 = peg$c7;
1848
+ peg$currPos++;
1849
+ } else {
1850
+ s6 = peg$FAILED;
1851
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1852
+ }
1853
+ if (s6 === peg$FAILED) {
1854
+ s6 = null;
1855
+ }
1856
+ s7 = peg$parse_();
1857
+ if (input.charCodeAt(peg$currPos) === 93) {
1858
+ s8 = peg$c17;
1859
+ peg$currPos++;
1860
+ } else {
1861
+ s8 = peg$FAILED;
1862
+ if (peg$silentFails === 0) { peg$fail(peg$e25); }
1863
+ }
1864
+ if (s8 !== peg$FAILED) {
1865
+ peg$savedPos = s0;
1866
+ s0 = peg$f15(s3, s4);
1867
+ } else {
1868
+ peg$currPos = s0;
1869
+ s0 = peg$FAILED;
1870
+ }
1871
+ } else {
1872
+ peg$currPos = s0;
1873
+ s0 = peg$FAILED;
1874
+ }
1875
+ } else {
1876
+ peg$currPos = s0;
1877
+ s0 = peg$FAILED;
1878
+ }
1879
+
1880
+ return s0;
1881
+ }
1882
+
1883
+ function peg$parseEnumValue() {
1884
+ let s0, s1, s2, s3;
1885
+
1886
+ s0 = peg$currPos;
1887
+ if (input.charCodeAt(peg$currPos) === 34) {
1888
+ s1 = peg$c3;
1889
+ peg$currPos++;
1890
+ } else {
1891
+ s1 = peg$FAILED;
1892
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
1893
+ }
1894
+ if (s1 !== peg$FAILED) {
1895
+ s2 = [];
1896
+ s3 = peg$parseEscape();
1897
+ if (s3 === peg$FAILED) {
1898
+ s3 = input.charAt(peg$currPos);
1899
+ if (peg$r5.test(s3)) {
1900
+ peg$currPos++;
1901
+ } else {
1902
+ s3 = peg$FAILED;
1903
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
1904
+ }
1905
+ }
1906
+ while (s3 !== peg$FAILED) {
1907
+ s2.push(s3);
1908
+ s3 = peg$parseEscape();
1909
+ if (s3 === peg$FAILED) {
1910
+ s3 = input.charAt(peg$currPos);
1911
+ if (peg$r5.test(s3)) {
1912
+ peg$currPos++;
1913
+ } else {
1914
+ s3 = peg$FAILED;
1915
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
1916
+ }
1917
+ }
1918
+ }
1919
+ if (input.charCodeAt(peg$currPos) === 34) {
1920
+ s3 = peg$c3;
1921
+ peg$currPos++;
1922
+ } else {
1923
+ s3 = peg$FAILED;
1924
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
1925
+ }
1926
+ if (s3 !== peg$FAILED) {
1927
+ peg$savedPos = s0;
1928
+ s0 = peg$f16(s2);
1929
+ } else {
1930
+ peg$currPos = s0;
1931
+ s0 = peg$FAILED;
1932
+ }
1933
+ } else {
1934
+ peg$currPos = s0;
1935
+ s0 = peg$FAILED;
1936
+ }
1937
+ if (s0 === peg$FAILED) {
1938
+ s0 = peg$currPos;
1939
+ if (input.charCodeAt(peg$currPos) === 39) {
1940
+ s1 = peg$c4;
1941
+ peg$currPos++;
1942
+ } else {
1943
+ s1 = peg$FAILED;
1944
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
1945
+ }
1946
+ if (s1 !== peg$FAILED) {
1947
+ s2 = [];
1948
+ s3 = peg$parseEscape();
1949
+ if (s3 === peg$FAILED) {
1950
+ s3 = input.charAt(peg$currPos);
1951
+ if (peg$r6.test(s3)) {
1952
+ peg$currPos++;
1953
+ } else {
1954
+ s3 = peg$FAILED;
1955
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1956
+ }
1957
+ }
1958
+ while (s3 !== peg$FAILED) {
1959
+ s2.push(s3);
1960
+ s3 = peg$parseEscape();
1961
+ if (s3 === peg$FAILED) {
1962
+ s3 = input.charAt(peg$currPos);
1963
+ if (peg$r6.test(s3)) {
1964
+ peg$currPos++;
1965
+ } else {
1966
+ s3 = peg$FAILED;
1967
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1968
+ }
1969
+ }
1970
+ }
1971
+ if (input.charCodeAt(peg$currPos) === 39) {
1972
+ s3 = peg$c4;
1973
+ peg$currPos++;
1974
+ } else {
1975
+ s3 = peg$FAILED;
1976
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
1977
+ }
1978
+ if (s3 !== peg$FAILED) {
1979
+ peg$savedPos = s0;
1980
+ s0 = peg$f17(s2);
1981
+ } else {
1982
+ peg$currPos = s0;
1983
+ s0 = peg$FAILED;
1984
+ }
1985
+ } else {
1986
+ peg$currPos = s0;
1987
+ s0 = peg$FAILED;
1988
+ }
1989
+ if (s0 === peg$FAILED) {
1990
+ s0 = peg$parseInteger();
1991
+ }
1992
+ }
1993
+
1994
+ return s0;
1995
+ }
1996
+
1997
+ function peg$parseEscape() {
1998
+ let s0, s1, s2;
1999
+
2000
+ s0 = peg$currPos;
2001
+ if (input.charCodeAt(peg$currPos) === 92) {
2002
+ s1 = peg$c18;
2003
+ peg$currPos++;
2004
+ } else {
2005
+ s1 = peg$FAILED;
2006
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
2007
+ }
2008
+ if (s1 !== peg$FAILED) {
2009
+ s2 = input.charAt(peg$currPos);
2010
+ if (peg$r7.test(s2)) {
2011
+ peg$currPos++;
2012
+ } else {
2013
+ s2 = peg$FAILED;
2014
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
2015
+ }
2016
+ if (s2 !== peg$FAILED) {
2017
+ peg$savedPos = s0;
2018
+ s0 = peg$f18(s2);
2019
+ } else {
2020
+ peg$currPos = s0;
2021
+ s0 = peg$FAILED;
2022
+ }
2023
+ } else {
2024
+ peg$currPos = s0;
2025
+ s0 = peg$FAILED;
2026
+ }
2027
+
2028
+ return s0;
2029
+ }
2030
+
2031
+ function peg$parseType() {
2032
+ let s0, s1;
2033
+
2034
+ peg$silentFails++;
2035
+ s0 = peg$currPos;
2036
+ if (input.substr(peg$currPos, 9) === peg$c19) {
2037
+ s1 = peg$c19;
2038
+ peg$currPos += 9;
2039
+ } else {
2040
+ s1 = peg$FAILED;
2041
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
2042
+ }
2043
+ if (s1 === peg$FAILED) {
2044
+ if (input.substr(peg$currPos, 9) === peg$c20) {
2045
+ s1 = peg$c20;
2046
+ peg$currPos += 9;
2047
+ } else {
2048
+ s1 = peg$FAILED;
2049
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
2050
+ }
2051
+ }
2052
+ if (s1 !== peg$FAILED) {
2053
+ peg$savedPos = s0;
2054
+ s1 = peg$f19();
2055
+ }
2056
+ s0 = s1;
2057
+ if (s0 === peg$FAILED) {
2058
+ s0 = peg$currPos;
2059
+ if (input.substr(peg$currPos, 9) === peg$c21) {
2060
+ s1 = peg$c21;
2061
+ peg$currPos += 9;
2062
+ } else {
2063
+ s1 = peg$FAILED;
2064
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
2065
+ }
2066
+ if (s1 === peg$FAILED) {
2067
+ if (input.substr(peg$currPos, 9) === peg$c22) {
2068
+ s1 = peg$c22;
2069
+ peg$currPos += 9;
2070
+ } else {
2071
+ s1 = peg$FAILED;
2072
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
2073
+ }
2074
+ }
2075
+ if (s1 !== peg$FAILED) {
2076
+ peg$savedPos = s0;
2077
+ s1 = peg$f20();
2078
+ }
2079
+ s0 = s1;
2080
+ if (s0 === peg$FAILED) {
2081
+ s0 = peg$currPos;
2082
+ if (input.substr(peg$currPos, 6) === peg$c23) {
2083
+ s1 = peg$c23;
2084
+ peg$currPos += 6;
2085
+ } else {
2086
+ s1 = peg$FAILED;
2087
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
2088
+ }
2089
+ if (s1 === peg$FAILED) {
2090
+ if (input.substr(peg$currPos, 6) === peg$c24) {
2091
+ s1 = peg$c24;
2092
+ peg$currPos += 6;
2093
+ } else {
2094
+ s1 = peg$FAILED;
2095
+ if (peg$silentFails === 0) { peg$fail(peg$e36); }
2096
+ }
2097
+ }
2098
+ if (s1 !== peg$FAILED) {
2099
+ peg$savedPos = s0;
2100
+ s1 = peg$f21();
2101
+ }
2102
+ s0 = s1;
2103
+ if (s0 === peg$FAILED) {
2104
+ s0 = peg$currPos;
2105
+ if (input.substr(peg$currPos, 5) === peg$c25) {
2106
+ s1 = peg$c25;
2107
+ peg$currPos += 5;
2108
+ } else {
2109
+ s1 = peg$FAILED;
2110
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
2111
+ }
2112
+ if (s1 === peg$FAILED) {
2113
+ if (input.substr(peg$currPos, 5) === peg$c26) {
2114
+ s1 = peg$c26;
2115
+ peg$currPos += 5;
2116
+ } else {
2117
+ s1 = peg$FAILED;
2118
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
2119
+ }
2120
+ }
2121
+ if (s1 !== peg$FAILED) {
2122
+ peg$savedPos = s0;
2123
+ s1 = peg$f22();
2124
+ }
2125
+ s0 = s1;
2126
+ if (s0 === peg$FAILED) {
2127
+ s0 = peg$currPos;
2128
+ if (input.substr(peg$currPos, 7) === peg$c27) {
2129
+ s1 = peg$c27;
2130
+ peg$currPos += 7;
2131
+ } else {
2132
+ s1 = peg$FAILED;
2133
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
2134
+ }
2135
+ if (s1 === peg$FAILED) {
2136
+ if (input.substr(peg$currPos, 7) === peg$c28) {
2137
+ s1 = peg$c28;
2138
+ peg$currPos += 7;
2139
+ } else {
2140
+ s1 = peg$FAILED;
2141
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
2142
+ }
2143
+ }
2144
+ if (s1 !== peg$FAILED) {
2145
+ peg$savedPos = s0;
2146
+ s1 = peg$f23();
2147
+ }
2148
+ s0 = s1;
2149
+ if (s0 === peg$FAILED) {
2150
+ s0 = peg$currPos;
2151
+ if (input.substr(peg$currPos, 4) === peg$c29) {
2152
+ s1 = peg$c29;
2153
+ peg$currPos += 4;
2154
+ } else {
2155
+ s1 = peg$FAILED;
2156
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
2157
+ }
2158
+ if (s1 === peg$FAILED) {
2159
+ if (input.substr(peg$currPos, 4) === peg$c30) {
2160
+ s1 = peg$c30;
2161
+ peg$currPos += 4;
2162
+ } else {
2163
+ s1 = peg$FAILED;
2164
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
2165
+ }
2166
+ }
2167
+ if (s1 !== peg$FAILED) {
2168
+ peg$savedPos = s0;
2169
+ s1 = peg$f24();
2170
+ }
2171
+ s0 = s1;
2172
+ }
2173
+ }
2174
+ }
2175
+ }
2176
+ }
2177
+ peg$silentFails--;
2178
+ if (s0 === peg$FAILED) {
2179
+ s1 = peg$FAILED;
2180
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
2181
+ }
2182
+
2183
+ return s0;
2184
+ }
2185
+
2186
+ function peg$parseBoolean() {
2187
+ let s0, s1;
2188
+
2189
+ peg$silentFails++;
2190
+ s0 = peg$currPos;
2191
+ if (input.substr(peg$currPos, 4) === peg$c31) {
2192
+ s1 = peg$c31;
2193
+ peg$currPos += 4;
2194
+ } else {
2195
+ s1 = peg$FAILED;
2196
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
2197
+ }
2198
+ if (s1 !== peg$FAILED) {
2199
+ peg$savedPos = s0;
2200
+ s1 = peg$f25();
2201
+ }
2202
+ s0 = s1;
2203
+ if (s0 === peg$FAILED) {
2204
+ s0 = peg$parseDisabled();
2205
+ }
2206
+ peg$silentFails--;
2207
+ if (s0 === peg$FAILED) {
2208
+ s1 = peg$FAILED;
2209
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
2210
+ }
2211
+
2212
+ return s0;
2213
+ }
2214
+
2215
+ function peg$parseProxyOptions() {
2216
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11;
2217
+
2218
+ s0 = peg$currPos;
2219
+ if (input.charCodeAt(peg$currPos) === 123) {
2220
+ s1 = peg$c32;
2221
+ peg$currPos++;
2222
+ } else {
2223
+ s1 = peg$FAILED;
2224
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
2225
+ }
2226
+ if (s1 !== peg$FAILED) {
2227
+ s2 = peg$parse_();
2228
+ if (input.substr(peg$currPos, 6) === peg$c33) {
2229
+ s3 = peg$c33;
2230
+ peg$currPos += 6;
2231
+ } else {
2232
+ s3 = peg$FAILED;
2233
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
2234
+ }
2235
+ if (s3 !== peg$FAILED) {
2236
+ s4 = [];
2237
+ s5 = input.charAt(peg$currPos);
2238
+ if (peg$r0.test(s5)) {
2239
+ peg$currPos++;
2240
+ } else {
2241
+ s5 = peg$FAILED;
2242
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
2243
+ }
2244
+ while (s5 !== peg$FAILED) {
2245
+ s4.push(s5);
2246
+ s5 = input.charAt(peg$currPos);
2247
+ if (peg$r0.test(s5)) {
2248
+ peg$currPos++;
2249
+ } else {
2250
+ s5 = peg$FAILED;
2251
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
2252
+ }
2253
+ }
2254
+ if (input.charCodeAt(peg$currPos) === 58) {
2255
+ s5 = peg$c9;
2256
+ peg$currPos++;
2257
+ } else {
2258
+ s5 = peg$FAILED;
2259
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
2260
+ }
2261
+ if (s5 !== peg$FAILED) {
2262
+ s6 = peg$parse_();
2263
+ s7 = peg$parseDestination();
2264
+ if (s7 !== peg$FAILED) {
2265
+ s8 = peg$parse_();
2266
+ if (input.charCodeAt(peg$currPos) === 44) {
2267
+ s9 = peg$c7;
2268
+ peg$currPos++;
2269
+ } else {
2270
+ s9 = peg$FAILED;
2271
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
2272
+ }
2273
+ if (s9 === peg$FAILED) {
2274
+ s9 = null;
2275
+ }
2276
+ s10 = peg$parse_();
2277
+ if (input.charCodeAt(peg$currPos) === 125) {
2278
+ s11 = peg$c34;
2279
+ peg$currPos++;
2280
+ } else {
2281
+ s11 = peg$FAILED;
2282
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
2283
+ }
2284
+ if (s11 !== peg$FAILED) {
2285
+ peg$savedPos = s0;
2286
+ s0 = peg$f26(s7);
2287
+ } else {
2288
+ peg$currPos = s0;
2289
+ s0 = peg$FAILED;
2290
+ }
2291
+ } else {
2292
+ peg$currPos = s0;
2293
+ s0 = peg$FAILED;
2294
+ }
2295
+ } else {
2296
+ peg$currPos = s0;
2297
+ s0 = peg$FAILED;
2298
+ }
2299
+ } else {
2300
+ peg$currPos = s0;
2301
+ s0 = peg$FAILED;
2302
+ }
2303
+ } else {
2304
+ peg$currPos = s0;
2305
+ s0 = peg$FAILED;
2306
+ }
2307
+
2308
+ return s0;
2309
+ }
2310
+
2311
+ function peg$parseDisabled() {
2312
+ let s0, s1;
2313
+
2314
+ s0 = peg$currPos;
2315
+ if (input.substr(peg$currPos, 5) === peg$c35) {
2316
+ s1 = peg$c35;
2317
+ peg$currPos += 5;
2318
+ } else {
2319
+ s1 = peg$FAILED;
2320
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
2321
+ }
2322
+ if (s1 !== peg$FAILED) {
2323
+ peg$savedPos = s0;
2324
+ s1 = peg$f27();
2325
+ }
2326
+ s0 = s1;
2327
+
2328
+ return s0;
2329
+ }
2330
+
2331
+ function peg$parseDestination() {
2332
+ let s0, s1, s2, s3, s4;
2333
+
2334
+ peg$silentFails++;
2335
+ s0 = peg$currPos;
2336
+ if (input.charCodeAt(peg$currPos) === 34) {
2337
+ s1 = peg$c3;
2338
+ peg$currPos++;
2339
+ } else {
2340
+ s1 = peg$FAILED;
2341
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
2342
+ }
2343
+ if (s1 !== peg$FAILED) {
2344
+ s2 = peg$currPos;
2345
+ s3 = [];
2346
+ s4 = input.charAt(peg$currPos);
2347
+ if (peg$r8.test(s4)) {
2348
+ peg$currPos++;
2349
+ } else {
2350
+ s4 = peg$FAILED;
2351
+ if (peg$silentFails === 0) { peg$fail(peg$e50); }
2352
+ }
2353
+ if (s4 !== peg$FAILED) {
2354
+ while (s4 !== peg$FAILED) {
2355
+ s3.push(s4);
2356
+ s4 = input.charAt(peg$currPos);
2357
+ if (peg$r8.test(s4)) {
2358
+ peg$currPos++;
2359
+ } else {
2360
+ s4 = peg$FAILED;
2361
+ if (peg$silentFails === 0) { peg$fail(peg$e50); }
2362
+ }
2363
+ }
2364
+ } else {
2365
+ s3 = peg$FAILED;
2366
+ }
2367
+ if (s3 !== peg$FAILED) {
2368
+ s2 = input.substring(s2, peg$currPos);
2369
+ } else {
2370
+ s2 = s3;
2371
+ }
2372
+ if (s2 !== peg$FAILED) {
2373
+ if (input.charCodeAt(peg$currPos) === 34) {
2374
+ s3 = peg$c3;
2375
+ peg$currPos++;
2376
+ } else {
2377
+ s3 = peg$FAILED;
2378
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
2379
+ }
2380
+ if (s3 !== peg$FAILED) {
2381
+ peg$savedPos = s0;
2382
+ s0 = peg$f28(s2);
2383
+ } else {
2384
+ peg$currPos = s0;
2385
+ s0 = peg$FAILED;
2386
+ }
2387
+ } else {
2388
+ peg$currPos = s0;
2389
+ s0 = peg$FAILED;
2390
+ }
2391
+ } else {
2392
+ peg$currPos = s0;
2393
+ s0 = peg$FAILED;
2394
+ }
2395
+ if (s0 === peg$FAILED) {
2396
+ s0 = peg$currPos;
2397
+ if (input.charCodeAt(peg$currPos) === 39) {
2398
+ s1 = peg$c4;
2399
+ peg$currPos++;
2400
+ } else {
2401
+ s1 = peg$FAILED;
2402
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
2403
+ }
2404
+ if (s1 !== peg$FAILED) {
2405
+ s2 = peg$currPos;
2406
+ s3 = [];
2407
+ s4 = input.charAt(peg$currPos);
2408
+ if (peg$r8.test(s4)) {
2409
+ peg$currPos++;
2410
+ } else {
2411
+ s4 = peg$FAILED;
2412
+ if (peg$silentFails === 0) { peg$fail(peg$e50); }
2413
+ }
2414
+ if (s4 !== peg$FAILED) {
2415
+ while (s4 !== peg$FAILED) {
2416
+ s3.push(s4);
2417
+ s4 = input.charAt(peg$currPos);
2418
+ if (peg$r8.test(s4)) {
2419
+ peg$currPos++;
2420
+ } else {
2421
+ s4 = peg$FAILED;
2422
+ if (peg$silentFails === 0) { peg$fail(peg$e50); }
2423
+ }
2424
+ }
2425
+ } else {
2426
+ s3 = peg$FAILED;
2427
+ }
2428
+ if (s3 !== peg$FAILED) {
2429
+ s2 = input.substring(s2, peg$currPos);
2430
+ } else {
2431
+ s2 = s3;
2432
+ }
2433
+ if (s2 !== peg$FAILED) {
2434
+ if (input.charCodeAt(peg$currPos) === 39) {
2435
+ s3 = peg$c4;
2436
+ peg$currPos++;
2437
+ } else {
2438
+ s3 = peg$FAILED;
2439
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
2440
+ }
2441
+ if (s3 !== peg$FAILED) {
2442
+ peg$savedPos = s0;
2443
+ s0 = peg$f29(s2);
2444
+ } else {
2445
+ peg$currPos = s0;
2446
+ s0 = peg$FAILED;
2447
+ }
2448
+ } else {
2449
+ peg$currPos = s0;
2450
+ s0 = peg$FAILED;
2451
+ }
2452
+ } else {
2453
+ peg$currPos = s0;
2454
+ s0 = peg$FAILED;
2455
+ }
2456
+ }
2457
+ peg$silentFails--;
2458
+ if (s0 === peg$FAILED) {
2459
+ s1 = peg$FAILED;
2460
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
2461
+ }
2462
+
2463
+ return s0;
2464
+ }
2465
+
2466
+ function peg$parseName() {
2467
+ let s0, s1, s2, s3;
2468
+
2469
+ peg$silentFails++;
2470
+ s0 = peg$currPos;
2471
+ if (input.charCodeAt(peg$currPos) === 34) {
2472
+ s1 = peg$c3;
2473
+ peg$currPos++;
2474
+ } else {
2475
+ s1 = peg$FAILED;
2476
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
2477
+ }
2478
+ if (s1 !== peg$FAILED) {
2479
+ s2 = peg$parseIdentifier();
2480
+ if (s2 !== peg$FAILED) {
2481
+ if (input.charCodeAt(peg$currPos) === 34) {
2482
+ s3 = peg$c3;
2483
+ peg$currPos++;
2484
+ } else {
2485
+ s3 = peg$FAILED;
2486
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
2487
+ }
2488
+ if (s3 !== peg$FAILED) {
2489
+ peg$savedPos = s0;
2490
+ s0 = peg$f30(s2);
2491
+ } else {
2492
+ peg$currPos = s0;
2493
+ s0 = peg$FAILED;
2494
+ }
2495
+ } else {
2496
+ peg$currPos = s0;
2497
+ s0 = peg$FAILED;
2498
+ }
2499
+ } else {
2500
+ peg$currPos = s0;
2501
+ s0 = peg$FAILED;
2502
+ }
2503
+ if (s0 === peg$FAILED) {
2504
+ s0 = peg$currPos;
2505
+ if (input.charCodeAt(peg$currPos) === 39) {
2506
+ s1 = peg$c4;
2507
+ peg$currPos++;
2508
+ } else {
2509
+ s1 = peg$FAILED;
2510
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
2511
+ }
2512
+ if (s1 !== peg$FAILED) {
2513
+ s2 = peg$parseIdentifier();
2514
+ if (s2 !== peg$FAILED) {
2515
+ if (input.charCodeAt(peg$currPos) === 39) {
2516
+ s3 = peg$c4;
2517
+ peg$currPos++;
2518
+ } else {
2519
+ s3 = peg$FAILED;
2520
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
2521
+ }
2522
+ if (s3 !== peg$FAILED) {
2523
+ peg$savedPos = s0;
2524
+ s0 = peg$f31(s2);
2525
+ } else {
2526
+ peg$currPos = s0;
2527
+ s0 = peg$FAILED;
2528
+ }
2529
+ } else {
2530
+ peg$currPos = s0;
2531
+ s0 = peg$FAILED;
2532
+ }
2533
+ } else {
2534
+ peg$currPos = s0;
2535
+ s0 = peg$FAILED;
2536
+ }
2537
+ }
2538
+ peg$silentFails--;
2539
+ if (s0 === peg$FAILED) {
2540
+ s1 = peg$FAILED;
2541
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
2542
+ }
2543
+
2544
+ return s0;
2545
+ }
2546
+
2547
+ function peg$parseIdentifier() {
2548
+ let s0, s1, s2, s3, s4;
2549
+
2550
+ s0 = peg$currPos;
2551
+ s1 = peg$currPos;
2552
+ s2 = input.charAt(peg$currPos);
2553
+ if (peg$r9.test(s2)) {
2554
+ peg$currPos++;
2555
+ } else {
2556
+ s2 = peg$FAILED;
2557
+ if (peg$silentFails === 0) { peg$fail(peg$e52); }
2558
+ }
2559
+ if (s2 !== peg$FAILED) {
2560
+ s3 = [];
2561
+ s4 = input.charAt(peg$currPos);
2562
+ if (peg$r10.test(s4)) {
2563
+ peg$currPos++;
2564
+ } else {
2565
+ s4 = peg$FAILED;
2566
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
2567
+ }
2568
+ while (s4 !== peg$FAILED) {
2569
+ s3.push(s4);
2570
+ s4 = input.charAt(peg$currPos);
2571
+ if (peg$r10.test(s4)) {
2572
+ peg$currPos++;
2573
+ } else {
2574
+ s4 = peg$FAILED;
2575
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
2576
+ }
2577
+ }
2578
+ s2 = [s2, s3];
2579
+ s1 = s2;
2580
+ } else {
2581
+ peg$currPos = s1;
2582
+ s1 = peg$FAILED;
2583
+ }
2584
+ if (s1 !== peg$FAILED) {
2585
+ s0 = input.substring(s0, peg$currPos);
2586
+ } else {
2587
+ s0 = s1;
2588
+ }
2589
+
2590
+ return s0;
2591
+ }
2592
+
2593
+ function peg$parseComment() {
2594
+ let s0, s1, s2, s3;
2595
+
2596
+ s0 = peg$currPos;
2597
+ if (input.charCodeAt(peg$currPos) === 35) {
2598
+ s1 = peg$c36;
2599
+ peg$currPos++;
2600
+ } else {
2601
+ s1 = peg$FAILED;
2602
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
2603
+ }
2604
+ if (s1 !== peg$FAILED) {
2605
+ s2 = [];
2606
+ s3 = input.charAt(peg$currPos);
2607
+ if (peg$r11.test(s3)) {
2608
+ peg$currPos++;
2609
+ } else {
2610
+ s3 = peg$FAILED;
2611
+ if (peg$silentFails === 0) { peg$fail(peg$e55); }
2612
+ }
2613
+ while (s3 !== peg$FAILED) {
2614
+ s2.push(s3);
2615
+ s3 = input.charAt(peg$currPos);
2616
+ if (peg$r11.test(s3)) {
2617
+ peg$currPos++;
2618
+ } else {
2619
+ s3 = peg$FAILED;
2620
+ if (peg$silentFails === 0) { peg$fail(peg$e55); }
2621
+ }
2622
+ }
2623
+ s1 = [s1, s2];
2624
+ s0 = s1;
2625
+ } else {
2626
+ peg$currPos = s0;
2627
+ s0 = peg$FAILED;
2628
+ }
2629
+
2630
+ return s0;
2631
+ }
2632
+
2633
+ function peg$parseNewline() {
2634
+ let s0;
2635
+
2636
+ if (input.substr(peg$currPos, 2) === peg$c37) {
2637
+ s0 = peg$c37;
2638
+ peg$currPos += 2;
2639
+ } else {
2640
+ s0 = peg$FAILED;
2641
+ if (peg$silentFails === 0) { peg$fail(peg$e56); }
2642
+ }
2643
+ if (s0 === peg$FAILED) {
2644
+ s0 = input.charAt(peg$currPos);
2645
+ if (peg$r12.test(s0)) {
2646
+ peg$currPos++;
2647
+ } else {
2648
+ s0 = peg$FAILED;
2649
+ if (peg$silentFails === 0) { peg$fail(peg$e57); }
2650
+ }
2651
+ }
2652
+
2653
+ return s0;
2654
+ }
2655
+
2656
+ function peg$parse_() {
2657
+ let s0, s1;
2658
+
2659
+ s0 = [];
2660
+ s1 = input.charAt(peg$currPos);
2661
+ if (peg$r0.test(s1)) {
2662
+ peg$currPos++;
2663
+ } else {
2664
+ s1 = peg$FAILED;
2665
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
2666
+ }
2667
+ if (s1 === peg$FAILED) {
2668
+ s1 = peg$parseNewline();
2669
+ if (s1 === peg$FAILED) {
2670
+ s1 = peg$parseComment();
2671
+ }
2672
+ }
2673
+ while (s1 !== peg$FAILED) {
2674
+ s0.push(s1);
2675
+ s1 = input.charAt(peg$currPos);
2676
+ if (peg$r0.test(s1)) {
2677
+ peg$currPos++;
2678
+ } else {
2679
+ s1 = peg$FAILED;
2680
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
2681
+ }
2682
+ if (s1 === peg$FAILED) {
2683
+ s1 = peg$parseNewline();
2684
+ if (s1 === peg$FAILED) {
2685
+ s1 = peg$parseComment();
2686
+ }
2687
+ }
2688
+ }
2689
+
2690
+ return s0;
2691
+ }
2692
+
2693
+ peg$result = peg$startRuleFunction();
2694
+
2695
+ const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length);
2696
+ function peg$throw() {
2697
+ if (peg$result !== peg$FAILED && peg$currPos < input.length) {
2698
+ peg$fail(peg$endExpectation());
2699
+ }
2700
+
2701
+ throw peg$buildStructuredError(
2702
+ peg$maxFailExpected,
2703
+ peg$maxFailPos < input.length ? peg$getUnicode(peg$maxFailPos) : null,
2704
+ peg$maxFailPos < input.length
2705
+ ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
2706
+ : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
2707
+ );
2708
+ }
2709
+ if (options.peg$library) {
2710
+ return /** @type {any} */ ({
2711
+ peg$result,
2712
+ peg$currPos,
2713
+ peg$FAILED,
2714
+ peg$maxFailExpected,
2715
+ peg$maxFailPos,
2716
+ peg$success,
2717
+ peg$throw: peg$success ? undefined : peg$throw,
2718
+ });
2719
+ }
2720
+ if (peg$success) {
2721
+ return peg$result;
2722
+ } else {
2723
+ peg$throw();
2724
+ }
2725
+ }
2726
+
2727
+ module.exports = {
2728
+ StartRules: ["Document"],
2729
+ SyntaxError: peg$SyntaxError,
2730
+ parse: peg$parse,
2731
+ };