@hot-updater/cloudflare 0.12.7 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4296 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import {
3
- __commonJS,
4
- __export,
5
- __reExport,
6
- __require,
7
- __toESM,
8
- createWrangler
9
- } from "../chunk-3ENNYGRH.js";
10
-
11
- // ../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/lib/parser.js
12
- var require_parser = __commonJS({
13
- "../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/lib/parser.js"(exports, module) {
14
- "use strict";
15
- module.exports = function() {
16
- function peg$subclass(child, parent) {
17
- function ctor() {
18
- this.constructor = child;
19
- }
20
- ctor.prototype = parent.prototype;
21
- child.prototype = new ctor();
22
- }
23
- function SyntaxError(message, expected, found, offset, line, column) {
24
- this.message = message;
25
- this.expected = expected;
26
- this.found = found;
27
- this.offset = offset;
28
- this.line = line;
29
- this.column = column;
30
- this.name = "SyntaxError";
31
- }
32
- peg$subclass(SyntaxError, Error);
33
- function parse(input) {
34
- var options = arguments.length > 1 ? arguments[1] : {}, peg$FAILED = {}, peg$startRuleFunctions = { start: peg$parsestart }, peg$startRuleFunction = peg$parsestart, peg$c0 = [], peg$c1 = function() {
35
- return nodes;
36
- }, peg$c2 = peg$FAILED, peg$c3 = "#", peg$c4 = { type: "literal", value: "#", description: '"#"' }, peg$c5 = void 0, peg$c6 = { type: "any", description: "any character" }, peg$c7 = "[", peg$c8 = { type: "literal", value: "[", description: '"["' }, peg$c9 = "]", peg$c10 = { type: "literal", value: "]", description: '"]"' }, peg$c11 = function(name) {
37
- addNode(node("ObjectPath", name, line, column));
38
- }, peg$c12 = function(name) {
39
- addNode(node("ArrayPath", name, line, column));
40
- }, peg$c13 = function(parts, name) {
41
- return parts.concat(name);
42
- }, peg$c14 = function(name) {
43
- return [name];
44
- }, peg$c15 = function(name) {
45
- return name;
46
- }, peg$c16 = ".", peg$c17 = { type: "literal", value: ".", description: '"."' }, peg$c18 = "=", peg$c19 = { type: "literal", value: "=", description: '"="' }, peg$c20 = function(key, value) {
47
- addNode(node("Assign", value, line, column, key));
48
- }, peg$c21 = function(chars) {
49
- return chars.join("");
50
- }, peg$c22 = function(node2) {
51
- return node2.value;
52
- }, peg$c23 = '"""', peg$c24 = { type: "literal", value: '"""', description: '"\\"\\"\\""' }, peg$c25 = null, peg$c26 = function(chars) {
53
- return node("String", chars.join(""), line, column);
54
- }, peg$c27 = '"', peg$c28 = { type: "literal", value: '"', description: '"\\""' }, peg$c29 = "'''", peg$c30 = { type: "literal", value: "'''", description: `"'''"` }, peg$c31 = "'", peg$c32 = { type: "literal", value: "'", description: `"'"` }, peg$c33 = function(char) {
55
- return char;
56
- }, peg$c34 = function(char) {
57
- return char;
58
- }, peg$c35 = "\\", peg$c36 = { type: "literal", value: "\\", description: '"\\\\"' }, peg$c37 = function() {
59
- return "";
60
- }, peg$c38 = "e", peg$c39 = { type: "literal", value: "e", description: '"e"' }, peg$c40 = "E", peg$c41 = { type: "literal", value: "E", description: '"E"' }, peg$c42 = function(left, right) {
61
- return node("Float", parseFloat(left + "e" + right), line, column);
62
- }, peg$c43 = function(text2) {
63
- return node("Float", parseFloat(text2), line, column);
64
- }, peg$c44 = "+", peg$c45 = { type: "literal", value: "+", description: '"+"' }, peg$c46 = function(digits) {
65
- return digits.join("");
66
- }, peg$c47 = "-", peg$c48 = { type: "literal", value: "-", description: '"-"' }, peg$c49 = function(digits) {
67
- return "-" + digits.join("");
68
- }, peg$c50 = function(text2) {
69
- return node("Integer", parseInt(text2, 10), line, column);
70
- }, peg$c51 = "true", peg$c52 = { type: "literal", value: "true", description: '"true"' }, peg$c53 = function() {
71
- return node("Boolean", true, line, column);
72
- }, peg$c54 = "false", peg$c55 = { type: "literal", value: "false", description: '"false"' }, peg$c56 = function() {
73
- return node("Boolean", false, line, column);
74
- }, peg$c57 = function() {
75
- return node("Array", [], line, column);
76
- }, peg$c58 = function(value) {
77
- return node("Array", value ? [value] : [], line, column);
78
- }, peg$c59 = function(values) {
79
- return node("Array", values, line, column);
80
- }, peg$c60 = function(values, value) {
81
- return node("Array", values.concat(value), line, column);
82
- }, peg$c61 = function(value) {
83
- return value;
84
- }, peg$c62 = ",", peg$c63 = { type: "literal", value: ",", description: '","' }, peg$c64 = "{", peg$c65 = { type: "literal", value: "{", description: '"{"' }, peg$c66 = "}", peg$c67 = { type: "literal", value: "}", description: '"}"' }, peg$c68 = function(values) {
85
- return node("InlineTable", values, line, column);
86
- }, peg$c69 = function(key, value) {
87
- return node("InlineTableValue", value, line, column, key);
88
- }, peg$c70 = function(digits) {
89
- return "." + digits;
90
- }, peg$c71 = function(date) {
91
- return date.join("");
92
- }, peg$c72 = ":", peg$c73 = { type: "literal", value: ":", description: '":"' }, peg$c74 = function(time) {
93
- return time.join("");
94
- }, peg$c75 = "T", peg$c76 = { type: "literal", value: "T", description: '"T"' }, peg$c77 = "Z", peg$c78 = { type: "literal", value: "Z", description: '"Z"' }, peg$c79 = function(date, time) {
95
- return node("Date", /* @__PURE__ */ new Date(date + "T" + time + "Z"), line, column);
96
- }, peg$c80 = function(date, time) {
97
- return node("Date", /* @__PURE__ */ new Date(date + "T" + time), line, column);
98
- }, peg$c81 = /^[ \t]/, peg$c82 = { type: "class", value: "[ \\t]", description: "[ \\t]" }, peg$c83 = "\n", peg$c84 = { type: "literal", value: "\n", description: '"\\n"' }, peg$c85 = "\r", peg$c86 = { type: "literal", value: "\r", description: '"\\r"' }, peg$c87 = /^[0-9a-f]/i, peg$c88 = { type: "class", value: "[0-9a-f]i", description: "[0-9a-f]i" }, peg$c89 = /^[0-9]/, peg$c90 = { type: "class", value: "[0-9]", description: "[0-9]" }, peg$c91 = "_", peg$c92 = { type: "literal", value: "_", description: '"_"' }, peg$c93 = function() {
99
- return "";
100
- }, peg$c94 = /^[A-Za-z0-9_\-]/, peg$c95 = { type: "class", value: "[A-Za-z0-9_\\-]", description: "[A-Za-z0-9_\\-]" }, peg$c96 = function(d) {
101
- return d.join("");
102
- }, peg$c97 = '\\"', peg$c98 = { type: "literal", value: '\\"', description: '"\\\\\\""' }, peg$c99 = function() {
103
- return '"';
104
- }, peg$c100 = "\\\\", peg$c101 = { type: "literal", value: "\\\\", description: '"\\\\\\\\"' }, peg$c102 = function() {
105
- return "\\";
106
- }, peg$c103 = "\\b", peg$c104 = { type: "literal", value: "\\b", description: '"\\\\b"' }, peg$c105 = function() {
107
- return "\b";
108
- }, peg$c106 = "\\t", peg$c107 = { type: "literal", value: "\\t", description: '"\\\\t"' }, peg$c108 = function() {
109
- return " ";
110
- }, peg$c109 = "\\n", peg$c110 = { type: "literal", value: "\\n", description: '"\\\\n"' }, peg$c111 = function() {
111
- return "\n";
112
- }, peg$c112 = "\\f", peg$c113 = { type: "literal", value: "\\f", description: '"\\\\f"' }, peg$c114 = function() {
113
- return "\f";
114
- }, peg$c115 = "\\r", peg$c116 = { type: "literal", value: "\\r", description: '"\\\\r"' }, peg$c117 = function() {
115
- return "\r";
116
- }, peg$c118 = "\\U", peg$c119 = { type: "literal", value: "\\U", description: '"\\\\U"' }, peg$c120 = function(digits) {
117
- return convertCodePoint(digits.join(""));
118
- }, peg$c121 = "\\u", peg$c122 = { type: "literal", value: "\\u", description: '"\\\\u"' }, peg$currPos = 0, peg$reportedPos = 0, peg$cachedPos = 0, peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$cache = {}, peg$result;
119
- if ("startRule" in options) {
120
- if (!(options.startRule in peg$startRuleFunctions)) {
121
- throw new Error(`Can't start parsing from rule "` + options.startRule + '".');
122
- }
123
- peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
124
- }
125
- function text() {
126
- return input.substring(peg$reportedPos, peg$currPos);
127
- }
128
- function offset() {
129
- return peg$reportedPos;
130
- }
131
- function line() {
132
- return peg$computePosDetails(peg$reportedPos).line;
133
- }
134
- function column() {
135
- return peg$computePosDetails(peg$reportedPos).column;
136
- }
137
- function expected(description) {
138
- throw peg$buildException(
139
- null,
140
- [{ type: "other", description }],
141
- peg$reportedPos
142
- );
143
- }
144
- function error(message) {
145
- throw peg$buildException(message, null, peg$reportedPos);
146
- }
147
- function peg$computePosDetails(pos) {
148
- function advance(details, startPos, endPos) {
149
- var p, ch;
150
- for (p = startPos; p < endPos; p++) {
151
- ch = input.charAt(p);
152
- if (ch === "\n") {
153
- if (!details.seenCR) {
154
- details.line++;
155
- }
156
- details.column = 1;
157
- details.seenCR = false;
158
- } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") {
159
- details.line++;
160
- details.column = 1;
161
- details.seenCR = true;
162
- } else {
163
- details.column++;
164
- details.seenCR = false;
165
- }
166
- }
167
- }
168
- if (peg$cachedPos !== pos) {
169
- if (peg$cachedPos > pos) {
170
- peg$cachedPos = 0;
171
- peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };
172
- }
173
- advance(peg$cachedPosDetails, peg$cachedPos, pos);
174
- peg$cachedPos = pos;
175
- }
176
- return peg$cachedPosDetails;
177
- }
178
- function peg$fail(expected2) {
179
- if (peg$currPos < peg$maxFailPos) {
180
- return;
181
- }
182
- if (peg$currPos > peg$maxFailPos) {
183
- peg$maxFailPos = peg$currPos;
184
- peg$maxFailExpected = [];
185
- }
186
- peg$maxFailExpected.push(expected2);
187
- }
188
- function peg$buildException(message, expected2, pos) {
189
- function cleanupExpected(expected3) {
190
- var i = 1;
191
- expected3.sort(function(a, b) {
192
- if (a.description < b.description) {
193
- return -1;
194
- } else if (a.description > b.description) {
195
- return 1;
196
- } else {
197
- return 0;
198
- }
199
- });
200
- while (i < expected3.length) {
201
- if (expected3[i - 1] === expected3[i]) {
202
- expected3.splice(i, 1);
203
- } else {
204
- i++;
205
- }
206
- }
207
- }
208
- function buildMessage(expected3, found2) {
209
- function stringEscape(s) {
210
- function hex(ch) {
211
- return ch.charCodeAt(0).toString(16).toUpperCase();
212
- }
213
- return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\x08/g, "\\b").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\f/g, "\\f").replace(/\r/g, "\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) {
214
- return "\\x0" + hex(ch);
215
- }).replace(/[\x10-\x1F\x80-\xFF]/g, function(ch) {
216
- return "\\x" + hex(ch);
217
- }).replace(/[\u0180-\u0FFF]/g, function(ch) {
218
- return "\\u0" + hex(ch);
219
- }).replace(/[\u1080-\uFFFF]/g, function(ch) {
220
- return "\\u" + hex(ch);
221
- });
222
- }
223
- var expectedDescs = new Array(expected3.length), expectedDesc, foundDesc, i;
224
- for (i = 0; i < expected3.length; i++) {
225
- expectedDescs[i] = expected3[i].description;
226
- }
227
- expectedDesc = expected3.length > 1 ? expectedDescs.slice(0, -1).join(", ") + " or " + expectedDescs[expected3.length - 1] : expectedDescs[0];
228
- foundDesc = found2 ? '"' + stringEscape(found2) + '"' : "end of input";
229
- return "Expected " + expectedDesc + " but " + foundDesc + " found.";
230
- }
231
- var posDetails = peg$computePosDetails(pos), found = pos < input.length ? input.charAt(pos) : null;
232
- if (expected2 !== null) {
233
- cleanupExpected(expected2);
234
- }
235
- return new SyntaxError(
236
- message !== null ? message : buildMessage(expected2, found),
237
- expected2,
238
- found,
239
- pos,
240
- posDetails.line,
241
- posDetails.column
242
- );
243
- }
244
- function peg$parsestart() {
245
- var s0, s1, s2;
246
- var key = peg$currPos * 49 + 0, cached = peg$cache[key];
247
- if (cached) {
248
- peg$currPos = cached.nextPos;
249
- return cached.result;
250
- }
251
- s0 = peg$currPos;
252
- s1 = [];
253
- s2 = peg$parseline();
254
- while (s2 !== peg$FAILED) {
255
- s1.push(s2);
256
- s2 = peg$parseline();
257
- }
258
- if (s1 !== peg$FAILED) {
259
- peg$reportedPos = s0;
260
- s1 = peg$c1();
261
- }
262
- s0 = s1;
263
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
264
- return s0;
265
- }
266
- function peg$parseline() {
267
- var s0, s1, s2, s3, s4, s5, s6;
268
- var key = peg$currPos * 49 + 1, cached = peg$cache[key];
269
- if (cached) {
270
- peg$currPos = cached.nextPos;
271
- return cached.result;
272
- }
273
- s0 = peg$currPos;
274
- s1 = [];
275
- s2 = peg$parseS();
276
- while (s2 !== peg$FAILED) {
277
- s1.push(s2);
278
- s2 = peg$parseS();
279
- }
280
- if (s1 !== peg$FAILED) {
281
- s2 = peg$parseexpression();
282
- if (s2 !== peg$FAILED) {
283
- s3 = [];
284
- s4 = peg$parseS();
285
- while (s4 !== peg$FAILED) {
286
- s3.push(s4);
287
- s4 = peg$parseS();
288
- }
289
- if (s3 !== peg$FAILED) {
290
- s4 = [];
291
- s5 = peg$parsecomment();
292
- while (s5 !== peg$FAILED) {
293
- s4.push(s5);
294
- s5 = peg$parsecomment();
295
- }
296
- if (s4 !== peg$FAILED) {
297
- s5 = [];
298
- s6 = peg$parseNL();
299
- if (s6 !== peg$FAILED) {
300
- while (s6 !== peg$FAILED) {
301
- s5.push(s6);
302
- s6 = peg$parseNL();
303
- }
304
- } else {
305
- s5 = peg$c2;
306
- }
307
- if (s5 === peg$FAILED) {
308
- s5 = peg$parseEOF();
309
- }
310
- if (s5 !== peg$FAILED) {
311
- s1 = [s1, s2, s3, s4, s5];
312
- s0 = s1;
313
- } else {
314
- peg$currPos = s0;
315
- s0 = peg$c2;
316
- }
317
- } else {
318
- peg$currPos = s0;
319
- s0 = peg$c2;
320
- }
321
- } else {
322
- peg$currPos = s0;
323
- s0 = peg$c2;
324
- }
325
- } else {
326
- peg$currPos = s0;
327
- s0 = peg$c2;
328
- }
329
- } else {
330
- peg$currPos = s0;
331
- s0 = peg$c2;
332
- }
333
- if (s0 === peg$FAILED) {
334
- s0 = peg$currPos;
335
- s1 = [];
336
- s2 = peg$parseS();
337
- if (s2 !== peg$FAILED) {
338
- while (s2 !== peg$FAILED) {
339
- s1.push(s2);
340
- s2 = peg$parseS();
341
- }
342
- } else {
343
- s1 = peg$c2;
344
- }
345
- if (s1 !== peg$FAILED) {
346
- s2 = [];
347
- s3 = peg$parseNL();
348
- if (s3 !== peg$FAILED) {
349
- while (s3 !== peg$FAILED) {
350
- s2.push(s3);
351
- s3 = peg$parseNL();
352
- }
353
- } else {
354
- s2 = peg$c2;
355
- }
356
- if (s2 === peg$FAILED) {
357
- s2 = peg$parseEOF();
358
- }
359
- if (s2 !== peg$FAILED) {
360
- s1 = [s1, s2];
361
- s0 = s1;
362
- } else {
363
- peg$currPos = s0;
364
- s0 = peg$c2;
365
- }
366
- } else {
367
- peg$currPos = s0;
368
- s0 = peg$c2;
369
- }
370
- if (s0 === peg$FAILED) {
371
- s0 = peg$parseNL();
372
- }
373
- }
374
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
375
- return s0;
376
- }
377
- function peg$parseexpression() {
378
- var s0;
379
- var key = peg$currPos * 49 + 2, cached = peg$cache[key];
380
- if (cached) {
381
- peg$currPos = cached.nextPos;
382
- return cached.result;
383
- }
384
- s0 = peg$parsecomment();
385
- if (s0 === peg$FAILED) {
386
- s0 = peg$parsepath();
387
- if (s0 === peg$FAILED) {
388
- s0 = peg$parsetablearray();
389
- if (s0 === peg$FAILED) {
390
- s0 = peg$parseassignment();
391
- }
392
- }
393
- }
394
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
395
- return s0;
396
- }
397
- function peg$parsecomment() {
398
- var s0, s1, s2, s3, s4, s5;
399
- var key = peg$currPos * 49 + 3, cached = peg$cache[key];
400
- if (cached) {
401
- peg$currPos = cached.nextPos;
402
- return cached.result;
403
- }
404
- s0 = peg$currPos;
405
- if (input.charCodeAt(peg$currPos) === 35) {
406
- s1 = peg$c3;
407
- peg$currPos++;
408
- } else {
409
- s1 = peg$FAILED;
410
- if (peg$silentFails === 0) {
411
- peg$fail(peg$c4);
412
- }
413
- }
414
- if (s1 !== peg$FAILED) {
415
- s2 = [];
416
- s3 = peg$currPos;
417
- s4 = peg$currPos;
418
- peg$silentFails++;
419
- s5 = peg$parseNL();
420
- if (s5 === peg$FAILED) {
421
- s5 = peg$parseEOF();
422
- }
423
- peg$silentFails--;
424
- if (s5 === peg$FAILED) {
425
- s4 = peg$c5;
426
- } else {
427
- peg$currPos = s4;
428
- s4 = peg$c2;
429
- }
430
- if (s4 !== peg$FAILED) {
431
- if (input.length > peg$currPos) {
432
- s5 = input.charAt(peg$currPos);
433
- peg$currPos++;
434
- } else {
435
- s5 = peg$FAILED;
436
- if (peg$silentFails === 0) {
437
- peg$fail(peg$c6);
438
- }
439
- }
440
- if (s5 !== peg$FAILED) {
441
- s4 = [s4, s5];
442
- s3 = s4;
443
- } else {
444
- peg$currPos = s3;
445
- s3 = peg$c2;
446
- }
447
- } else {
448
- peg$currPos = s3;
449
- s3 = peg$c2;
450
- }
451
- while (s3 !== peg$FAILED) {
452
- s2.push(s3);
453
- s3 = peg$currPos;
454
- s4 = peg$currPos;
455
- peg$silentFails++;
456
- s5 = peg$parseNL();
457
- if (s5 === peg$FAILED) {
458
- s5 = peg$parseEOF();
459
- }
460
- peg$silentFails--;
461
- if (s5 === peg$FAILED) {
462
- s4 = peg$c5;
463
- } else {
464
- peg$currPos = s4;
465
- s4 = peg$c2;
466
- }
467
- if (s4 !== peg$FAILED) {
468
- if (input.length > peg$currPos) {
469
- s5 = input.charAt(peg$currPos);
470
- peg$currPos++;
471
- } else {
472
- s5 = peg$FAILED;
473
- if (peg$silentFails === 0) {
474
- peg$fail(peg$c6);
475
- }
476
- }
477
- if (s5 !== peg$FAILED) {
478
- s4 = [s4, s5];
479
- s3 = s4;
480
- } else {
481
- peg$currPos = s3;
482
- s3 = peg$c2;
483
- }
484
- } else {
485
- peg$currPos = s3;
486
- s3 = peg$c2;
487
- }
488
- }
489
- if (s2 !== peg$FAILED) {
490
- s1 = [s1, s2];
491
- s0 = s1;
492
- } else {
493
- peg$currPos = s0;
494
- s0 = peg$c2;
495
- }
496
- } else {
497
- peg$currPos = s0;
498
- s0 = peg$c2;
499
- }
500
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
501
- return s0;
502
- }
503
- function peg$parsepath() {
504
- var s0, s1, s2, s3, s4, s5;
505
- var key = peg$currPos * 49 + 4, cached = peg$cache[key];
506
- if (cached) {
507
- peg$currPos = cached.nextPos;
508
- return cached.result;
509
- }
510
- s0 = peg$currPos;
511
- if (input.charCodeAt(peg$currPos) === 91) {
512
- s1 = peg$c7;
513
- peg$currPos++;
514
- } else {
515
- s1 = peg$FAILED;
516
- if (peg$silentFails === 0) {
517
- peg$fail(peg$c8);
518
- }
519
- }
520
- if (s1 !== peg$FAILED) {
521
- s2 = [];
522
- s3 = peg$parseS();
523
- while (s3 !== peg$FAILED) {
524
- s2.push(s3);
525
- s3 = peg$parseS();
526
- }
527
- if (s2 !== peg$FAILED) {
528
- s3 = peg$parsetable_key();
529
- if (s3 !== peg$FAILED) {
530
- s4 = [];
531
- s5 = peg$parseS();
532
- while (s5 !== peg$FAILED) {
533
- s4.push(s5);
534
- s5 = peg$parseS();
535
- }
536
- if (s4 !== peg$FAILED) {
537
- if (input.charCodeAt(peg$currPos) === 93) {
538
- s5 = peg$c9;
539
- peg$currPos++;
540
- } else {
541
- s5 = peg$FAILED;
542
- if (peg$silentFails === 0) {
543
- peg$fail(peg$c10);
544
- }
545
- }
546
- if (s5 !== peg$FAILED) {
547
- peg$reportedPos = s0;
548
- s1 = peg$c11(s3);
549
- s0 = s1;
550
- } else {
551
- peg$currPos = s0;
552
- s0 = peg$c2;
553
- }
554
- } else {
555
- peg$currPos = s0;
556
- s0 = peg$c2;
557
- }
558
- } else {
559
- peg$currPos = s0;
560
- s0 = peg$c2;
561
- }
562
- } else {
563
- peg$currPos = s0;
564
- s0 = peg$c2;
565
- }
566
- } else {
567
- peg$currPos = s0;
568
- s0 = peg$c2;
569
- }
570
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
571
- return s0;
572
- }
573
- function peg$parsetablearray() {
574
- var s0, s1, s2, s3, s4, s5, s6, s7;
575
- var key = peg$currPos * 49 + 5, cached = peg$cache[key];
576
- if (cached) {
577
- peg$currPos = cached.nextPos;
578
- return cached.result;
579
- }
580
- s0 = peg$currPos;
581
- if (input.charCodeAt(peg$currPos) === 91) {
582
- s1 = peg$c7;
583
- peg$currPos++;
584
- } else {
585
- s1 = peg$FAILED;
586
- if (peg$silentFails === 0) {
587
- peg$fail(peg$c8);
588
- }
589
- }
590
- if (s1 !== peg$FAILED) {
591
- if (input.charCodeAt(peg$currPos) === 91) {
592
- s2 = peg$c7;
593
- peg$currPos++;
594
- } else {
595
- s2 = peg$FAILED;
596
- if (peg$silentFails === 0) {
597
- peg$fail(peg$c8);
598
- }
599
- }
600
- if (s2 !== peg$FAILED) {
601
- s3 = [];
602
- s4 = peg$parseS();
603
- while (s4 !== peg$FAILED) {
604
- s3.push(s4);
605
- s4 = peg$parseS();
606
- }
607
- if (s3 !== peg$FAILED) {
608
- s4 = peg$parsetable_key();
609
- if (s4 !== peg$FAILED) {
610
- s5 = [];
611
- s6 = peg$parseS();
612
- while (s6 !== peg$FAILED) {
613
- s5.push(s6);
614
- s6 = peg$parseS();
615
- }
616
- if (s5 !== peg$FAILED) {
617
- if (input.charCodeAt(peg$currPos) === 93) {
618
- s6 = peg$c9;
619
- peg$currPos++;
620
- } else {
621
- s6 = peg$FAILED;
622
- if (peg$silentFails === 0) {
623
- peg$fail(peg$c10);
624
- }
625
- }
626
- if (s6 !== peg$FAILED) {
627
- if (input.charCodeAt(peg$currPos) === 93) {
628
- s7 = peg$c9;
629
- peg$currPos++;
630
- } else {
631
- s7 = peg$FAILED;
632
- if (peg$silentFails === 0) {
633
- peg$fail(peg$c10);
634
- }
635
- }
636
- if (s7 !== peg$FAILED) {
637
- peg$reportedPos = s0;
638
- s1 = peg$c12(s4);
639
- s0 = s1;
640
- } else {
641
- peg$currPos = s0;
642
- s0 = peg$c2;
643
- }
644
- } else {
645
- peg$currPos = s0;
646
- s0 = peg$c2;
647
- }
648
- } else {
649
- peg$currPos = s0;
650
- s0 = peg$c2;
651
- }
652
- } else {
653
- peg$currPos = s0;
654
- s0 = peg$c2;
655
- }
656
- } else {
657
- peg$currPos = s0;
658
- s0 = peg$c2;
659
- }
660
- } else {
661
- peg$currPos = s0;
662
- s0 = peg$c2;
663
- }
664
- } else {
665
- peg$currPos = s0;
666
- s0 = peg$c2;
667
- }
668
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
669
- return s0;
670
- }
671
- function peg$parsetable_key() {
672
- var s0, s1, s2;
673
- var key = peg$currPos * 49 + 6, cached = peg$cache[key];
674
- if (cached) {
675
- peg$currPos = cached.nextPos;
676
- return cached.result;
677
- }
678
- s0 = peg$currPos;
679
- s1 = [];
680
- s2 = peg$parsedot_ended_table_key_part();
681
- if (s2 !== peg$FAILED) {
682
- while (s2 !== peg$FAILED) {
683
- s1.push(s2);
684
- s2 = peg$parsedot_ended_table_key_part();
685
- }
686
- } else {
687
- s1 = peg$c2;
688
- }
689
- if (s1 !== peg$FAILED) {
690
- s2 = peg$parsetable_key_part();
691
- if (s2 !== peg$FAILED) {
692
- peg$reportedPos = s0;
693
- s1 = peg$c13(s1, s2);
694
- s0 = s1;
695
- } else {
696
- peg$currPos = s0;
697
- s0 = peg$c2;
698
- }
699
- } else {
700
- peg$currPos = s0;
701
- s0 = peg$c2;
702
- }
703
- if (s0 === peg$FAILED) {
704
- s0 = peg$currPos;
705
- s1 = peg$parsetable_key_part();
706
- if (s1 !== peg$FAILED) {
707
- peg$reportedPos = s0;
708
- s1 = peg$c14(s1);
709
- }
710
- s0 = s1;
711
- }
712
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
713
- return s0;
714
- }
715
- function peg$parsetable_key_part() {
716
- var s0, s1, s2, s3, s4;
717
- var key = peg$currPos * 49 + 7, cached = peg$cache[key];
718
- if (cached) {
719
- peg$currPos = cached.nextPos;
720
- return cached.result;
721
- }
722
- s0 = peg$currPos;
723
- s1 = [];
724
- s2 = peg$parseS();
725
- while (s2 !== peg$FAILED) {
726
- s1.push(s2);
727
- s2 = peg$parseS();
728
- }
729
- if (s1 !== peg$FAILED) {
730
- s2 = peg$parsekey();
731
- if (s2 !== peg$FAILED) {
732
- s3 = [];
733
- s4 = peg$parseS();
734
- while (s4 !== peg$FAILED) {
735
- s3.push(s4);
736
- s4 = peg$parseS();
737
- }
738
- if (s3 !== peg$FAILED) {
739
- peg$reportedPos = s0;
740
- s1 = peg$c15(s2);
741
- s0 = s1;
742
- } else {
743
- peg$currPos = s0;
744
- s0 = peg$c2;
745
- }
746
- } else {
747
- peg$currPos = s0;
748
- s0 = peg$c2;
749
- }
750
- } else {
751
- peg$currPos = s0;
752
- s0 = peg$c2;
753
- }
754
- if (s0 === peg$FAILED) {
755
- s0 = peg$currPos;
756
- s1 = [];
757
- s2 = peg$parseS();
758
- while (s2 !== peg$FAILED) {
759
- s1.push(s2);
760
- s2 = peg$parseS();
761
- }
762
- if (s1 !== peg$FAILED) {
763
- s2 = peg$parsequoted_key();
764
- if (s2 !== peg$FAILED) {
765
- s3 = [];
766
- s4 = peg$parseS();
767
- while (s4 !== peg$FAILED) {
768
- s3.push(s4);
769
- s4 = peg$parseS();
770
- }
771
- if (s3 !== peg$FAILED) {
772
- peg$reportedPos = s0;
773
- s1 = peg$c15(s2);
774
- s0 = s1;
775
- } else {
776
- peg$currPos = s0;
777
- s0 = peg$c2;
778
- }
779
- } else {
780
- peg$currPos = s0;
781
- s0 = peg$c2;
782
- }
783
- } else {
784
- peg$currPos = s0;
785
- s0 = peg$c2;
786
- }
787
- }
788
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
789
- return s0;
790
- }
791
- function peg$parsedot_ended_table_key_part() {
792
- var s0, s1, s2, s3, s4, s5, s6;
793
- var key = peg$currPos * 49 + 8, cached = peg$cache[key];
794
- if (cached) {
795
- peg$currPos = cached.nextPos;
796
- return cached.result;
797
- }
798
- s0 = peg$currPos;
799
- s1 = [];
800
- s2 = peg$parseS();
801
- while (s2 !== peg$FAILED) {
802
- s1.push(s2);
803
- s2 = peg$parseS();
804
- }
805
- if (s1 !== peg$FAILED) {
806
- s2 = peg$parsekey();
807
- if (s2 !== peg$FAILED) {
808
- s3 = [];
809
- s4 = peg$parseS();
810
- while (s4 !== peg$FAILED) {
811
- s3.push(s4);
812
- s4 = peg$parseS();
813
- }
814
- if (s3 !== peg$FAILED) {
815
- if (input.charCodeAt(peg$currPos) === 46) {
816
- s4 = peg$c16;
817
- peg$currPos++;
818
- } else {
819
- s4 = peg$FAILED;
820
- if (peg$silentFails === 0) {
821
- peg$fail(peg$c17);
822
- }
823
- }
824
- if (s4 !== peg$FAILED) {
825
- s5 = [];
826
- s6 = peg$parseS();
827
- while (s6 !== peg$FAILED) {
828
- s5.push(s6);
829
- s6 = peg$parseS();
830
- }
831
- if (s5 !== peg$FAILED) {
832
- peg$reportedPos = s0;
833
- s1 = peg$c15(s2);
834
- s0 = s1;
835
- } else {
836
- peg$currPos = s0;
837
- s0 = peg$c2;
838
- }
839
- } else {
840
- peg$currPos = s0;
841
- s0 = peg$c2;
842
- }
843
- } else {
844
- peg$currPos = s0;
845
- s0 = peg$c2;
846
- }
847
- } else {
848
- peg$currPos = s0;
849
- s0 = peg$c2;
850
- }
851
- } else {
852
- peg$currPos = s0;
853
- s0 = peg$c2;
854
- }
855
- if (s0 === peg$FAILED) {
856
- s0 = peg$currPos;
857
- s1 = [];
858
- s2 = peg$parseS();
859
- while (s2 !== peg$FAILED) {
860
- s1.push(s2);
861
- s2 = peg$parseS();
862
- }
863
- if (s1 !== peg$FAILED) {
864
- s2 = peg$parsequoted_key();
865
- if (s2 !== peg$FAILED) {
866
- s3 = [];
867
- s4 = peg$parseS();
868
- while (s4 !== peg$FAILED) {
869
- s3.push(s4);
870
- s4 = peg$parseS();
871
- }
872
- if (s3 !== peg$FAILED) {
873
- if (input.charCodeAt(peg$currPos) === 46) {
874
- s4 = peg$c16;
875
- peg$currPos++;
876
- } else {
877
- s4 = peg$FAILED;
878
- if (peg$silentFails === 0) {
879
- peg$fail(peg$c17);
880
- }
881
- }
882
- if (s4 !== peg$FAILED) {
883
- s5 = [];
884
- s6 = peg$parseS();
885
- while (s6 !== peg$FAILED) {
886
- s5.push(s6);
887
- s6 = peg$parseS();
888
- }
889
- if (s5 !== peg$FAILED) {
890
- peg$reportedPos = s0;
891
- s1 = peg$c15(s2);
892
- s0 = s1;
893
- } else {
894
- peg$currPos = s0;
895
- s0 = peg$c2;
896
- }
897
- } else {
898
- peg$currPos = s0;
899
- s0 = peg$c2;
900
- }
901
- } else {
902
- peg$currPos = s0;
903
- s0 = peg$c2;
904
- }
905
- } else {
906
- peg$currPos = s0;
907
- s0 = peg$c2;
908
- }
909
- } else {
910
- peg$currPos = s0;
911
- s0 = peg$c2;
912
- }
913
- }
914
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
915
- return s0;
916
- }
917
- function peg$parseassignment() {
918
- var s0, s1, s2, s3, s4, s5;
919
- var key = peg$currPos * 49 + 9, cached = peg$cache[key];
920
- if (cached) {
921
- peg$currPos = cached.nextPos;
922
- return cached.result;
923
- }
924
- s0 = peg$currPos;
925
- s1 = peg$parsekey();
926
- if (s1 !== peg$FAILED) {
927
- s2 = [];
928
- s3 = peg$parseS();
929
- while (s3 !== peg$FAILED) {
930
- s2.push(s3);
931
- s3 = peg$parseS();
932
- }
933
- if (s2 !== peg$FAILED) {
934
- if (input.charCodeAt(peg$currPos) === 61) {
935
- s3 = peg$c18;
936
- peg$currPos++;
937
- } else {
938
- s3 = peg$FAILED;
939
- if (peg$silentFails === 0) {
940
- peg$fail(peg$c19);
941
- }
942
- }
943
- if (s3 !== peg$FAILED) {
944
- s4 = [];
945
- s5 = peg$parseS();
946
- while (s5 !== peg$FAILED) {
947
- s4.push(s5);
948
- s5 = peg$parseS();
949
- }
950
- if (s4 !== peg$FAILED) {
951
- s5 = peg$parsevalue();
952
- if (s5 !== peg$FAILED) {
953
- peg$reportedPos = s0;
954
- s1 = peg$c20(s1, s5);
955
- s0 = s1;
956
- } else {
957
- peg$currPos = s0;
958
- s0 = peg$c2;
959
- }
960
- } else {
961
- peg$currPos = s0;
962
- s0 = peg$c2;
963
- }
964
- } else {
965
- peg$currPos = s0;
966
- s0 = peg$c2;
967
- }
968
- } else {
969
- peg$currPos = s0;
970
- s0 = peg$c2;
971
- }
972
- } else {
973
- peg$currPos = s0;
974
- s0 = peg$c2;
975
- }
976
- if (s0 === peg$FAILED) {
977
- s0 = peg$currPos;
978
- s1 = peg$parsequoted_key();
979
- if (s1 !== peg$FAILED) {
980
- s2 = [];
981
- s3 = peg$parseS();
982
- while (s3 !== peg$FAILED) {
983
- s2.push(s3);
984
- s3 = peg$parseS();
985
- }
986
- if (s2 !== peg$FAILED) {
987
- if (input.charCodeAt(peg$currPos) === 61) {
988
- s3 = peg$c18;
989
- peg$currPos++;
990
- } else {
991
- s3 = peg$FAILED;
992
- if (peg$silentFails === 0) {
993
- peg$fail(peg$c19);
994
- }
995
- }
996
- if (s3 !== peg$FAILED) {
997
- s4 = [];
998
- s5 = peg$parseS();
999
- while (s5 !== peg$FAILED) {
1000
- s4.push(s5);
1001
- s5 = peg$parseS();
1002
- }
1003
- if (s4 !== peg$FAILED) {
1004
- s5 = peg$parsevalue();
1005
- if (s5 !== peg$FAILED) {
1006
- peg$reportedPos = s0;
1007
- s1 = peg$c20(s1, s5);
1008
- s0 = s1;
1009
- } else {
1010
- peg$currPos = s0;
1011
- s0 = peg$c2;
1012
- }
1013
- } else {
1014
- peg$currPos = s0;
1015
- s0 = peg$c2;
1016
- }
1017
- } else {
1018
- peg$currPos = s0;
1019
- s0 = peg$c2;
1020
- }
1021
- } else {
1022
- peg$currPos = s0;
1023
- s0 = peg$c2;
1024
- }
1025
- } else {
1026
- peg$currPos = s0;
1027
- s0 = peg$c2;
1028
- }
1029
- }
1030
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1031
- return s0;
1032
- }
1033
- function peg$parsekey() {
1034
- var s0, s1, s2;
1035
- var key = peg$currPos * 49 + 10, cached = peg$cache[key];
1036
- if (cached) {
1037
- peg$currPos = cached.nextPos;
1038
- return cached.result;
1039
- }
1040
- s0 = peg$currPos;
1041
- s1 = [];
1042
- s2 = peg$parseASCII_BASIC();
1043
- if (s2 !== peg$FAILED) {
1044
- while (s2 !== peg$FAILED) {
1045
- s1.push(s2);
1046
- s2 = peg$parseASCII_BASIC();
1047
- }
1048
- } else {
1049
- s1 = peg$c2;
1050
- }
1051
- if (s1 !== peg$FAILED) {
1052
- peg$reportedPos = s0;
1053
- s1 = peg$c21(s1);
1054
- }
1055
- s0 = s1;
1056
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1057
- return s0;
1058
- }
1059
- function peg$parsequoted_key() {
1060
- var s0, s1;
1061
- var key = peg$currPos * 49 + 11, cached = peg$cache[key];
1062
- if (cached) {
1063
- peg$currPos = cached.nextPos;
1064
- return cached.result;
1065
- }
1066
- s0 = peg$currPos;
1067
- s1 = peg$parsedouble_quoted_single_line_string();
1068
- if (s1 !== peg$FAILED) {
1069
- peg$reportedPos = s0;
1070
- s1 = peg$c22(s1);
1071
- }
1072
- s0 = s1;
1073
- if (s0 === peg$FAILED) {
1074
- s0 = peg$currPos;
1075
- s1 = peg$parsesingle_quoted_single_line_string();
1076
- if (s1 !== peg$FAILED) {
1077
- peg$reportedPos = s0;
1078
- s1 = peg$c22(s1);
1079
- }
1080
- s0 = s1;
1081
- }
1082
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1083
- return s0;
1084
- }
1085
- function peg$parsevalue() {
1086
- var s0;
1087
- var key = peg$currPos * 49 + 12, cached = peg$cache[key];
1088
- if (cached) {
1089
- peg$currPos = cached.nextPos;
1090
- return cached.result;
1091
- }
1092
- s0 = peg$parsestring();
1093
- if (s0 === peg$FAILED) {
1094
- s0 = peg$parsedatetime();
1095
- if (s0 === peg$FAILED) {
1096
- s0 = peg$parsefloat();
1097
- if (s0 === peg$FAILED) {
1098
- s0 = peg$parseinteger();
1099
- if (s0 === peg$FAILED) {
1100
- s0 = peg$parseboolean();
1101
- if (s0 === peg$FAILED) {
1102
- s0 = peg$parsearray();
1103
- if (s0 === peg$FAILED) {
1104
- s0 = peg$parseinline_table();
1105
- }
1106
- }
1107
- }
1108
- }
1109
- }
1110
- }
1111
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1112
- return s0;
1113
- }
1114
- function peg$parsestring() {
1115
- var s0;
1116
- var key = peg$currPos * 49 + 13, cached = peg$cache[key];
1117
- if (cached) {
1118
- peg$currPos = cached.nextPos;
1119
- return cached.result;
1120
- }
1121
- s0 = peg$parsedouble_quoted_multiline_string();
1122
- if (s0 === peg$FAILED) {
1123
- s0 = peg$parsedouble_quoted_single_line_string();
1124
- if (s0 === peg$FAILED) {
1125
- s0 = peg$parsesingle_quoted_multiline_string();
1126
- if (s0 === peg$FAILED) {
1127
- s0 = peg$parsesingle_quoted_single_line_string();
1128
- }
1129
- }
1130
- }
1131
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1132
- return s0;
1133
- }
1134
- function peg$parsedouble_quoted_multiline_string() {
1135
- var s0, s1, s2, s3, s4;
1136
- var key = peg$currPos * 49 + 14, cached = peg$cache[key];
1137
- if (cached) {
1138
- peg$currPos = cached.nextPos;
1139
- return cached.result;
1140
- }
1141
- s0 = peg$currPos;
1142
- if (input.substr(peg$currPos, 3) === peg$c23) {
1143
- s1 = peg$c23;
1144
- peg$currPos += 3;
1145
- } else {
1146
- s1 = peg$FAILED;
1147
- if (peg$silentFails === 0) {
1148
- peg$fail(peg$c24);
1149
- }
1150
- }
1151
- if (s1 !== peg$FAILED) {
1152
- s2 = peg$parseNL();
1153
- if (s2 === peg$FAILED) {
1154
- s2 = peg$c25;
1155
- }
1156
- if (s2 !== peg$FAILED) {
1157
- s3 = [];
1158
- s4 = peg$parsemultiline_string_char();
1159
- while (s4 !== peg$FAILED) {
1160
- s3.push(s4);
1161
- s4 = peg$parsemultiline_string_char();
1162
- }
1163
- if (s3 !== peg$FAILED) {
1164
- if (input.substr(peg$currPos, 3) === peg$c23) {
1165
- s4 = peg$c23;
1166
- peg$currPos += 3;
1167
- } else {
1168
- s4 = peg$FAILED;
1169
- if (peg$silentFails === 0) {
1170
- peg$fail(peg$c24);
1171
- }
1172
- }
1173
- if (s4 !== peg$FAILED) {
1174
- peg$reportedPos = s0;
1175
- s1 = peg$c26(s3);
1176
- s0 = s1;
1177
- } else {
1178
- peg$currPos = s0;
1179
- s0 = peg$c2;
1180
- }
1181
- } else {
1182
- peg$currPos = s0;
1183
- s0 = peg$c2;
1184
- }
1185
- } else {
1186
- peg$currPos = s0;
1187
- s0 = peg$c2;
1188
- }
1189
- } else {
1190
- peg$currPos = s0;
1191
- s0 = peg$c2;
1192
- }
1193
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1194
- return s0;
1195
- }
1196
- function peg$parsedouble_quoted_single_line_string() {
1197
- var s0, s1, s2, s3;
1198
- var key = peg$currPos * 49 + 15, cached = peg$cache[key];
1199
- if (cached) {
1200
- peg$currPos = cached.nextPos;
1201
- return cached.result;
1202
- }
1203
- s0 = peg$currPos;
1204
- if (input.charCodeAt(peg$currPos) === 34) {
1205
- s1 = peg$c27;
1206
- peg$currPos++;
1207
- } else {
1208
- s1 = peg$FAILED;
1209
- if (peg$silentFails === 0) {
1210
- peg$fail(peg$c28);
1211
- }
1212
- }
1213
- if (s1 !== peg$FAILED) {
1214
- s2 = [];
1215
- s3 = peg$parsestring_char();
1216
- while (s3 !== peg$FAILED) {
1217
- s2.push(s3);
1218
- s3 = peg$parsestring_char();
1219
- }
1220
- if (s2 !== peg$FAILED) {
1221
- if (input.charCodeAt(peg$currPos) === 34) {
1222
- s3 = peg$c27;
1223
- peg$currPos++;
1224
- } else {
1225
- s3 = peg$FAILED;
1226
- if (peg$silentFails === 0) {
1227
- peg$fail(peg$c28);
1228
- }
1229
- }
1230
- if (s3 !== peg$FAILED) {
1231
- peg$reportedPos = s0;
1232
- s1 = peg$c26(s2);
1233
- s0 = s1;
1234
- } else {
1235
- peg$currPos = s0;
1236
- s0 = peg$c2;
1237
- }
1238
- } else {
1239
- peg$currPos = s0;
1240
- s0 = peg$c2;
1241
- }
1242
- } else {
1243
- peg$currPos = s0;
1244
- s0 = peg$c2;
1245
- }
1246
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1247
- return s0;
1248
- }
1249
- function peg$parsesingle_quoted_multiline_string() {
1250
- var s0, s1, s2, s3, s4;
1251
- var key = peg$currPos * 49 + 16, cached = peg$cache[key];
1252
- if (cached) {
1253
- peg$currPos = cached.nextPos;
1254
- return cached.result;
1255
- }
1256
- s0 = peg$currPos;
1257
- if (input.substr(peg$currPos, 3) === peg$c29) {
1258
- s1 = peg$c29;
1259
- peg$currPos += 3;
1260
- } else {
1261
- s1 = peg$FAILED;
1262
- if (peg$silentFails === 0) {
1263
- peg$fail(peg$c30);
1264
- }
1265
- }
1266
- if (s1 !== peg$FAILED) {
1267
- s2 = peg$parseNL();
1268
- if (s2 === peg$FAILED) {
1269
- s2 = peg$c25;
1270
- }
1271
- if (s2 !== peg$FAILED) {
1272
- s3 = [];
1273
- s4 = peg$parsemultiline_literal_char();
1274
- while (s4 !== peg$FAILED) {
1275
- s3.push(s4);
1276
- s4 = peg$parsemultiline_literal_char();
1277
- }
1278
- if (s3 !== peg$FAILED) {
1279
- if (input.substr(peg$currPos, 3) === peg$c29) {
1280
- s4 = peg$c29;
1281
- peg$currPos += 3;
1282
- } else {
1283
- s4 = peg$FAILED;
1284
- if (peg$silentFails === 0) {
1285
- peg$fail(peg$c30);
1286
- }
1287
- }
1288
- if (s4 !== peg$FAILED) {
1289
- peg$reportedPos = s0;
1290
- s1 = peg$c26(s3);
1291
- s0 = s1;
1292
- } else {
1293
- peg$currPos = s0;
1294
- s0 = peg$c2;
1295
- }
1296
- } else {
1297
- peg$currPos = s0;
1298
- s0 = peg$c2;
1299
- }
1300
- } else {
1301
- peg$currPos = s0;
1302
- s0 = peg$c2;
1303
- }
1304
- } else {
1305
- peg$currPos = s0;
1306
- s0 = peg$c2;
1307
- }
1308
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1309
- return s0;
1310
- }
1311
- function peg$parsesingle_quoted_single_line_string() {
1312
- var s0, s1, s2, s3;
1313
- var key = peg$currPos * 49 + 17, cached = peg$cache[key];
1314
- if (cached) {
1315
- peg$currPos = cached.nextPos;
1316
- return cached.result;
1317
- }
1318
- s0 = peg$currPos;
1319
- if (input.charCodeAt(peg$currPos) === 39) {
1320
- s1 = peg$c31;
1321
- peg$currPos++;
1322
- } else {
1323
- s1 = peg$FAILED;
1324
- if (peg$silentFails === 0) {
1325
- peg$fail(peg$c32);
1326
- }
1327
- }
1328
- if (s1 !== peg$FAILED) {
1329
- s2 = [];
1330
- s3 = peg$parseliteral_char();
1331
- while (s3 !== peg$FAILED) {
1332
- s2.push(s3);
1333
- s3 = peg$parseliteral_char();
1334
- }
1335
- if (s2 !== peg$FAILED) {
1336
- if (input.charCodeAt(peg$currPos) === 39) {
1337
- s3 = peg$c31;
1338
- peg$currPos++;
1339
- } else {
1340
- s3 = peg$FAILED;
1341
- if (peg$silentFails === 0) {
1342
- peg$fail(peg$c32);
1343
- }
1344
- }
1345
- if (s3 !== peg$FAILED) {
1346
- peg$reportedPos = s0;
1347
- s1 = peg$c26(s2);
1348
- s0 = s1;
1349
- } else {
1350
- peg$currPos = s0;
1351
- s0 = peg$c2;
1352
- }
1353
- } else {
1354
- peg$currPos = s0;
1355
- s0 = peg$c2;
1356
- }
1357
- } else {
1358
- peg$currPos = s0;
1359
- s0 = peg$c2;
1360
- }
1361
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1362
- return s0;
1363
- }
1364
- function peg$parsestring_char() {
1365
- var s0, s1, s2;
1366
- var key = peg$currPos * 49 + 18, cached = peg$cache[key];
1367
- if (cached) {
1368
- peg$currPos = cached.nextPos;
1369
- return cached.result;
1370
- }
1371
- s0 = peg$parseESCAPED();
1372
- if (s0 === peg$FAILED) {
1373
- s0 = peg$currPos;
1374
- s1 = peg$currPos;
1375
- peg$silentFails++;
1376
- if (input.charCodeAt(peg$currPos) === 34) {
1377
- s2 = peg$c27;
1378
- peg$currPos++;
1379
- } else {
1380
- s2 = peg$FAILED;
1381
- if (peg$silentFails === 0) {
1382
- peg$fail(peg$c28);
1383
- }
1384
- }
1385
- peg$silentFails--;
1386
- if (s2 === peg$FAILED) {
1387
- s1 = peg$c5;
1388
- } else {
1389
- peg$currPos = s1;
1390
- s1 = peg$c2;
1391
- }
1392
- if (s1 !== peg$FAILED) {
1393
- if (input.length > peg$currPos) {
1394
- s2 = input.charAt(peg$currPos);
1395
- peg$currPos++;
1396
- } else {
1397
- s2 = peg$FAILED;
1398
- if (peg$silentFails === 0) {
1399
- peg$fail(peg$c6);
1400
- }
1401
- }
1402
- if (s2 !== peg$FAILED) {
1403
- peg$reportedPos = s0;
1404
- s1 = peg$c33(s2);
1405
- s0 = s1;
1406
- } else {
1407
- peg$currPos = s0;
1408
- s0 = peg$c2;
1409
- }
1410
- } else {
1411
- peg$currPos = s0;
1412
- s0 = peg$c2;
1413
- }
1414
- }
1415
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1416
- return s0;
1417
- }
1418
- function peg$parseliteral_char() {
1419
- var s0, s1, s2;
1420
- var key = peg$currPos * 49 + 19, cached = peg$cache[key];
1421
- if (cached) {
1422
- peg$currPos = cached.nextPos;
1423
- return cached.result;
1424
- }
1425
- s0 = peg$currPos;
1426
- s1 = peg$currPos;
1427
- peg$silentFails++;
1428
- if (input.charCodeAt(peg$currPos) === 39) {
1429
- s2 = peg$c31;
1430
- peg$currPos++;
1431
- } else {
1432
- s2 = peg$FAILED;
1433
- if (peg$silentFails === 0) {
1434
- peg$fail(peg$c32);
1435
- }
1436
- }
1437
- peg$silentFails--;
1438
- if (s2 === peg$FAILED) {
1439
- s1 = peg$c5;
1440
- } else {
1441
- peg$currPos = s1;
1442
- s1 = peg$c2;
1443
- }
1444
- if (s1 !== peg$FAILED) {
1445
- if (input.length > peg$currPos) {
1446
- s2 = input.charAt(peg$currPos);
1447
- peg$currPos++;
1448
- } else {
1449
- s2 = peg$FAILED;
1450
- if (peg$silentFails === 0) {
1451
- peg$fail(peg$c6);
1452
- }
1453
- }
1454
- if (s2 !== peg$FAILED) {
1455
- peg$reportedPos = s0;
1456
- s1 = peg$c33(s2);
1457
- s0 = s1;
1458
- } else {
1459
- peg$currPos = s0;
1460
- s0 = peg$c2;
1461
- }
1462
- } else {
1463
- peg$currPos = s0;
1464
- s0 = peg$c2;
1465
- }
1466
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1467
- return s0;
1468
- }
1469
- function peg$parsemultiline_string_char() {
1470
- var s0, s1, s2;
1471
- var key = peg$currPos * 49 + 20, cached = peg$cache[key];
1472
- if (cached) {
1473
- peg$currPos = cached.nextPos;
1474
- return cached.result;
1475
- }
1476
- s0 = peg$parseESCAPED();
1477
- if (s0 === peg$FAILED) {
1478
- s0 = peg$parsemultiline_string_delim();
1479
- if (s0 === peg$FAILED) {
1480
- s0 = peg$currPos;
1481
- s1 = peg$currPos;
1482
- peg$silentFails++;
1483
- if (input.substr(peg$currPos, 3) === peg$c23) {
1484
- s2 = peg$c23;
1485
- peg$currPos += 3;
1486
- } else {
1487
- s2 = peg$FAILED;
1488
- if (peg$silentFails === 0) {
1489
- peg$fail(peg$c24);
1490
- }
1491
- }
1492
- peg$silentFails--;
1493
- if (s2 === peg$FAILED) {
1494
- s1 = peg$c5;
1495
- } else {
1496
- peg$currPos = s1;
1497
- s1 = peg$c2;
1498
- }
1499
- if (s1 !== peg$FAILED) {
1500
- if (input.length > peg$currPos) {
1501
- s2 = input.charAt(peg$currPos);
1502
- peg$currPos++;
1503
- } else {
1504
- s2 = peg$FAILED;
1505
- if (peg$silentFails === 0) {
1506
- peg$fail(peg$c6);
1507
- }
1508
- }
1509
- if (s2 !== peg$FAILED) {
1510
- peg$reportedPos = s0;
1511
- s1 = peg$c34(s2);
1512
- s0 = s1;
1513
- } else {
1514
- peg$currPos = s0;
1515
- s0 = peg$c2;
1516
- }
1517
- } else {
1518
- peg$currPos = s0;
1519
- s0 = peg$c2;
1520
- }
1521
- }
1522
- }
1523
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1524
- return s0;
1525
- }
1526
- function peg$parsemultiline_string_delim() {
1527
- var s0, s1, s2, s3, s4;
1528
- var key = peg$currPos * 49 + 21, cached = peg$cache[key];
1529
- if (cached) {
1530
- peg$currPos = cached.nextPos;
1531
- return cached.result;
1532
- }
1533
- s0 = peg$currPos;
1534
- if (input.charCodeAt(peg$currPos) === 92) {
1535
- s1 = peg$c35;
1536
- peg$currPos++;
1537
- } else {
1538
- s1 = peg$FAILED;
1539
- if (peg$silentFails === 0) {
1540
- peg$fail(peg$c36);
1541
- }
1542
- }
1543
- if (s1 !== peg$FAILED) {
1544
- s2 = peg$parseNL();
1545
- if (s2 !== peg$FAILED) {
1546
- s3 = [];
1547
- s4 = peg$parseNLS();
1548
- while (s4 !== peg$FAILED) {
1549
- s3.push(s4);
1550
- s4 = peg$parseNLS();
1551
- }
1552
- if (s3 !== peg$FAILED) {
1553
- peg$reportedPos = s0;
1554
- s1 = peg$c37();
1555
- s0 = s1;
1556
- } else {
1557
- peg$currPos = s0;
1558
- s0 = peg$c2;
1559
- }
1560
- } else {
1561
- peg$currPos = s0;
1562
- s0 = peg$c2;
1563
- }
1564
- } else {
1565
- peg$currPos = s0;
1566
- s0 = peg$c2;
1567
- }
1568
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1569
- return s0;
1570
- }
1571
- function peg$parsemultiline_literal_char() {
1572
- var s0, s1, s2;
1573
- var key = peg$currPos * 49 + 22, cached = peg$cache[key];
1574
- if (cached) {
1575
- peg$currPos = cached.nextPos;
1576
- return cached.result;
1577
- }
1578
- s0 = peg$currPos;
1579
- s1 = peg$currPos;
1580
- peg$silentFails++;
1581
- if (input.substr(peg$currPos, 3) === peg$c29) {
1582
- s2 = peg$c29;
1583
- peg$currPos += 3;
1584
- } else {
1585
- s2 = peg$FAILED;
1586
- if (peg$silentFails === 0) {
1587
- peg$fail(peg$c30);
1588
- }
1589
- }
1590
- peg$silentFails--;
1591
- if (s2 === peg$FAILED) {
1592
- s1 = peg$c5;
1593
- } else {
1594
- peg$currPos = s1;
1595
- s1 = peg$c2;
1596
- }
1597
- if (s1 !== peg$FAILED) {
1598
- if (input.length > peg$currPos) {
1599
- s2 = input.charAt(peg$currPos);
1600
- peg$currPos++;
1601
- } else {
1602
- s2 = peg$FAILED;
1603
- if (peg$silentFails === 0) {
1604
- peg$fail(peg$c6);
1605
- }
1606
- }
1607
- if (s2 !== peg$FAILED) {
1608
- peg$reportedPos = s0;
1609
- s1 = peg$c33(s2);
1610
- s0 = s1;
1611
- } else {
1612
- peg$currPos = s0;
1613
- s0 = peg$c2;
1614
- }
1615
- } else {
1616
- peg$currPos = s0;
1617
- s0 = peg$c2;
1618
- }
1619
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1620
- return s0;
1621
- }
1622
- function peg$parsefloat() {
1623
- var s0, s1, s2, s3;
1624
- var key = peg$currPos * 49 + 23, cached = peg$cache[key];
1625
- if (cached) {
1626
- peg$currPos = cached.nextPos;
1627
- return cached.result;
1628
- }
1629
- s0 = peg$currPos;
1630
- s1 = peg$parsefloat_text();
1631
- if (s1 === peg$FAILED) {
1632
- s1 = peg$parseinteger_text();
1633
- }
1634
- if (s1 !== peg$FAILED) {
1635
- if (input.charCodeAt(peg$currPos) === 101) {
1636
- s2 = peg$c38;
1637
- peg$currPos++;
1638
- } else {
1639
- s2 = peg$FAILED;
1640
- if (peg$silentFails === 0) {
1641
- peg$fail(peg$c39);
1642
- }
1643
- }
1644
- if (s2 === peg$FAILED) {
1645
- if (input.charCodeAt(peg$currPos) === 69) {
1646
- s2 = peg$c40;
1647
- peg$currPos++;
1648
- } else {
1649
- s2 = peg$FAILED;
1650
- if (peg$silentFails === 0) {
1651
- peg$fail(peg$c41);
1652
- }
1653
- }
1654
- }
1655
- if (s2 !== peg$FAILED) {
1656
- s3 = peg$parseinteger_text();
1657
- if (s3 !== peg$FAILED) {
1658
- peg$reportedPos = s0;
1659
- s1 = peg$c42(s1, s3);
1660
- s0 = s1;
1661
- } else {
1662
- peg$currPos = s0;
1663
- s0 = peg$c2;
1664
- }
1665
- } else {
1666
- peg$currPos = s0;
1667
- s0 = peg$c2;
1668
- }
1669
- } else {
1670
- peg$currPos = s0;
1671
- s0 = peg$c2;
1672
- }
1673
- if (s0 === peg$FAILED) {
1674
- s0 = peg$currPos;
1675
- s1 = peg$parsefloat_text();
1676
- if (s1 !== peg$FAILED) {
1677
- peg$reportedPos = s0;
1678
- s1 = peg$c43(s1);
1679
- }
1680
- s0 = s1;
1681
- }
1682
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1683
- return s0;
1684
- }
1685
- function peg$parsefloat_text() {
1686
- var s0, s1, s2, s3, s4, s5;
1687
- var key = peg$currPos * 49 + 24, cached = peg$cache[key];
1688
- if (cached) {
1689
- peg$currPos = cached.nextPos;
1690
- return cached.result;
1691
- }
1692
- s0 = peg$currPos;
1693
- if (input.charCodeAt(peg$currPos) === 43) {
1694
- s1 = peg$c44;
1695
- peg$currPos++;
1696
- } else {
1697
- s1 = peg$FAILED;
1698
- if (peg$silentFails === 0) {
1699
- peg$fail(peg$c45);
1700
- }
1701
- }
1702
- if (s1 === peg$FAILED) {
1703
- s1 = peg$c25;
1704
- }
1705
- if (s1 !== peg$FAILED) {
1706
- s2 = peg$currPos;
1707
- s3 = peg$parseDIGITS();
1708
- if (s3 !== peg$FAILED) {
1709
- if (input.charCodeAt(peg$currPos) === 46) {
1710
- s4 = peg$c16;
1711
- peg$currPos++;
1712
- } else {
1713
- s4 = peg$FAILED;
1714
- if (peg$silentFails === 0) {
1715
- peg$fail(peg$c17);
1716
- }
1717
- }
1718
- if (s4 !== peg$FAILED) {
1719
- s5 = peg$parseDIGITS();
1720
- if (s5 !== peg$FAILED) {
1721
- s3 = [s3, s4, s5];
1722
- s2 = s3;
1723
- } else {
1724
- peg$currPos = s2;
1725
- s2 = peg$c2;
1726
- }
1727
- } else {
1728
- peg$currPos = s2;
1729
- s2 = peg$c2;
1730
- }
1731
- } else {
1732
- peg$currPos = s2;
1733
- s2 = peg$c2;
1734
- }
1735
- if (s2 !== peg$FAILED) {
1736
- peg$reportedPos = s0;
1737
- s1 = peg$c46(s2);
1738
- s0 = s1;
1739
- } else {
1740
- peg$currPos = s0;
1741
- s0 = peg$c2;
1742
- }
1743
- } else {
1744
- peg$currPos = s0;
1745
- s0 = peg$c2;
1746
- }
1747
- if (s0 === peg$FAILED) {
1748
- s0 = peg$currPos;
1749
- if (input.charCodeAt(peg$currPos) === 45) {
1750
- s1 = peg$c47;
1751
- peg$currPos++;
1752
- } else {
1753
- s1 = peg$FAILED;
1754
- if (peg$silentFails === 0) {
1755
- peg$fail(peg$c48);
1756
- }
1757
- }
1758
- if (s1 !== peg$FAILED) {
1759
- s2 = peg$currPos;
1760
- s3 = peg$parseDIGITS();
1761
- if (s3 !== peg$FAILED) {
1762
- if (input.charCodeAt(peg$currPos) === 46) {
1763
- s4 = peg$c16;
1764
- peg$currPos++;
1765
- } else {
1766
- s4 = peg$FAILED;
1767
- if (peg$silentFails === 0) {
1768
- peg$fail(peg$c17);
1769
- }
1770
- }
1771
- if (s4 !== peg$FAILED) {
1772
- s5 = peg$parseDIGITS();
1773
- if (s5 !== peg$FAILED) {
1774
- s3 = [s3, s4, s5];
1775
- s2 = s3;
1776
- } else {
1777
- peg$currPos = s2;
1778
- s2 = peg$c2;
1779
- }
1780
- } else {
1781
- peg$currPos = s2;
1782
- s2 = peg$c2;
1783
- }
1784
- } else {
1785
- peg$currPos = s2;
1786
- s2 = peg$c2;
1787
- }
1788
- if (s2 !== peg$FAILED) {
1789
- peg$reportedPos = s0;
1790
- s1 = peg$c49(s2);
1791
- s0 = s1;
1792
- } else {
1793
- peg$currPos = s0;
1794
- s0 = peg$c2;
1795
- }
1796
- } else {
1797
- peg$currPos = s0;
1798
- s0 = peg$c2;
1799
- }
1800
- }
1801
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1802
- return s0;
1803
- }
1804
- function peg$parseinteger() {
1805
- var s0, s1;
1806
- var key = peg$currPos * 49 + 25, cached = peg$cache[key];
1807
- if (cached) {
1808
- peg$currPos = cached.nextPos;
1809
- return cached.result;
1810
- }
1811
- s0 = peg$currPos;
1812
- s1 = peg$parseinteger_text();
1813
- if (s1 !== peg$FAILED) {
1814
- peg$reportedPos = s0;
1815
- s1 = peg$c50(s1);
1816
- }
1817
- s0 = s1;
1818
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1819
- return s0;
1820
- }
1821
- function peg$parseinteger_text() {
1822
- var s0, s1, s2, s3, s4;
1823
- var key = peg$currPos * 49 + 26, cached = peg$cache[key];
1824
- if (cached) {
1825
- peg$currPos = cached.nextPos;
1826
- return cached.result;
1827
- }
1828
- s0 = peg$currPos;
1829
- if (input.charCodeAt(peg$currPos) === 43) {
1830
- s1 = peg$c44;
1831
- peg$currPos++;
1832
- } else {
1833
- s1 = peg$FAILED;
1834
- if (peg$silentFails === 0) {
1835
- peg$fail(peg$c45);
1836
- }
1837
- }
1838
- if (s1 === peg$FAILED) {
1839
- s1 = peg$c25;
1840
- }
1841
- if (s1 !== peg$FAILED) {
1842
- s2 = [];
1843
- s3 = peg$parseDIGIT_OR_UNDER();
1844
- if (s3 !== peg$FAILED) {
1845
- while (s3 !== peg$FAILED) {
1846
- s2.push(s3);
1847
- s3 = peg$parseDIGIT_OR_UNDER();
1848
- }
1849
- } else {
1850
- s2 = peg$c2;
1851
- }
1852
- if (s2 !== peg$FAILED) {
1853
- s3 = peg$currPos;
1854
- peg$silentFails++;
1855
- if (input.charCodeAt(peg$currPos) === 46) {
1856
- s4 = peg$c16;
1857
- peg$currPos++;
1858
- } else {
1859
- s4 = peg$FAILED;
1860
- if (peg$silentFails === 0) {
1861
- peg$fail(peg$c17);
1862
- }
1863
- }
1864
- peg$silentFails--;
1865
- if (s4 === peg$FAILED) {
1866
- s3 = peg$c5;
1867
- } else {
1868
- peg$currPos = s3;
1869
- s3 = peg$c2;
1870
- }
1871
- if (s3 !== peg$FAILED) {
1872
- peg$reportedPos = s0;
1873
- s1 = peg$c46(s2);
1874
- s0 = s1;
1875
- } else {
1876
- peg$currPos = s0;
1877
- s0 = peg$c2;
1878
- }
1879
- } else {
1880
- peg$currPos = s0;
1881
- s0 = peg$c2;
1882
- }
1883
- } else {
1884
- peg$currPos = s0;
1885
- s0 = peg$c2;
1886
- }
1887
- if (s0 === peg$FAILED) {
1888
- s0 = peg$currPos;
1889
- if (input.charCodeAt(peg$currPos) === 45) {
1890
- s1 = peg$c47;
1891
- peg$currPos++;
1892
- } else {
1893
- s1 = peg$FAILED;
1894
- if (peg$silentFails === 0) {
1895
- peg$fail(peg$c48);
1896
- }
1897
- }
1898
- if (s1 !== peg$FAILED) {
1899
- s2 = [];
1900
- s3 = peg$parseDIGIT_OR_UNDER();
1901
- if (s3 !== peg$FAILED) {
1902
- while (s3 !== peg$FAILED) {
1903
- s2.push(s3);
1904
- s3 = peg$parseDIGIT_OR_UNDER();
1905
- }
1906
- } else {
1907
- s2 = peg$c2;
1908
- }
1909
- if (s2 !== peg$FAILED) {
1910
- s3 = peg$currPos;
1911
- peg$silentFails++;
1912
- if (input.charCodeAt(peg$currPos) === 46) {
1913
- s4 = peg$c16;
1914
- peg$currPos++;
1915
- } else {
1916
- s4 = peg$FAILED;
1917
- if (peg$silentFails === 0) {
1918
- peg$fail(peg$c17);
1919
- }
1920
- }
1921
- peg$silentFails--;
1922
- if (s4 === peg$FAILED) {
1923
- s3 = peg$c5;
1924
- } else {
1925
- peg$currPos = s3;
1926
- s3 = peg$c2;
1927
- }
1928
- if (s3 !== peg$FAILED) {
1929
- peg$reportedPos = s0;
1930
- s1 = peg$c49(s2);
1931
- s0 = s1;
1932
- } else {
1933
- peg$currPos = s0;
1934
- s0 = peg$c2;
1935
- }
1936
- } else {
1937
- peg$currPos = s0;
1938
- s0 = peg$c2;
1939
- }
1940
- } else {
1941
- peg$currPos = s0;
1942
- s0 = peg$c2;
1943
- }
1944
- }
1945
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1946
- return s0;
1947
- }
1948
- function peg$parseboolean() {
1949
- var s0, s1;
1950
- var key = peg$currPos * 49 + 27, cached = peg$cache[key];
1951
- if (cached) {
1952
- peg$currPos = cached.nextPos;
1953
- return cached.result;
1954
- }
1955
- s0 = peg$currPos;
1956
- if (input.substr(peg$currPos, 4) === peg$c51) {
1957
- s1 = peg$c51;
1958
- peg$currPos += 4;
1959
- } else {
1960
- s1 = peg$FAILED;
1961
- if (peg$silentFails === 0) {
1962
- peg$fail(peg$c52);
1963
- }
1964
- }
1965
- if (s1 !== peg$FAILED) {
1966
- peg$reportedPos = s0;
1967
- s1 = peg$c53();
1968
- }
1969
- s0 = s1;
1970
- if (s0 === peg$FAILED) {
1971
- s0 = peg$currPos;
1972
- if (input.substr(peg$currPos, 5) === peg$c54) {
1973
- s1 = peg$c54;
1974
- peg$currPos += 5;
1975
- } else {
1976
- s1 = peg$FAILED;
1977
- if (peg$silentFails === 0) {
1978
- peg$fail(peg$c55);
1979
- }
1980
- }
1981
- if (s1 !== peg$FAILED) {
1982
- peg$reportedPos = s0;
1983
- s1 = peg$c56();
1984
- }
1985
- s0 = s1;
1986
- }
1987
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
1988
- return s0;
1989
- }
1990
- function peg$parsearray() {
1991
- var s0, s1, s2, s3, s4;
1992
- var key = peg$currPos * 49 + 28, cached = peg$cache[key];
1993
- if (cached) {
1994
- peg$currPos = cached.nextPos;
1995
- return cached.result;
1996
- }
1997
- s0 = peg$currPos;
1998
- if (input.charCodeAt(peg$currPos) === 91) {
1999
- s1 = peg$c7;
2000
- peg$currPos++;
2001
- } else {
2002
- s1 = peg$FAILED;
2003
- if (peg$silentFails === 0) {
2004
- peg$fail(peg$c8);
2005
- }
2006
- }
2007
- if (s1 !== peg$FAILED) {
2008
- s2 = [];
2009
- s3 = peg$parsearray_sep();
2010
- while (s3 !== peg$FAILED) {
2011
- s2.push(s3);
2012
- s3 = peg$parsearray_sep();
2013
- }
2014
- if (s2 !== peg$FAILED) {
2015
- if (input.charCodeAt(peg$currPos) === 93) {
2016
- s3 = peg$c9;
2017
- peg$currPos++;
2018
- } else {
2019
- s3 = peg$FAILED;
2020
- if (peg$silentFails === 0) {
2021
- peg$fail(peg$c10);
2022
- }
2023
- }
2024
- if (s3 !== peg$FAILED) {
2025
- peg$reportedPos = s0;
2026
- s1 = peg$c57();
2027
- s0 = s1;
2028
- } else {
2029
- peg$currPos = s0;
2030
- s0 = peg$c2;
2031
- }
2032
- } else {
2033
- peg$currPos = s0;
2034
- s0 = peg$c2;
2035
- }
2036
- } else {
2037
- peg$currPos = s0;
2038
- s0 = peg$c2;
2039
- }
2040
- if (s0 === peg$FAILED) {
2041
- s0 = peg$currPos;
2042
- if (input.charCodeAt(peg$currPos) === 91) {
2043
- s1 = peg$c7;
2044
- peg$currPos++;
2045
- } else {
2046
- s1 = peg$FAILED;
2047
- if (peg$silentFails === 0) {
2048
- peg$fail(peg$c8);
2049
- }
2050
- }
2051
- if (s1 !== peg$FAILED) {
2052
- s2 = peg$parsearray_value();
2053
- if (s2 === peg$FAILED) {
2054
- s2 = peg$c25;
2055
- }
2056
- if (s2 !== peg$FAILED) {
2057
- if (input.charCodeAt(peg$currPos) === 93) {
2058
- s3 = peg$c9;
2059
- peg$currPos++;
2060
- } else {
2061
- s3 = peg$FAILED;
2062
- if (peg$silentFails === 0) {
2063
- peg$fail(peg$c10);
2064
- }
2065
- }
2066
- if (s3 !== peg$FAILED) {
2067
- peg$reportedPos = s0;
2068
- s1 = peg$c58(s2);
2069
- s0 = s1;
2070
- } else {
2071
- peg$currPos = s0;
2072
- s0 = peg$c2;
2073
- }
2074
- } else {
2075
- peg$currPos = s0;
2076
- s0 = peg$c2;
2077
- }
2078
- } else {
2079
- peg$currPos = s0;
2080
- s0 = peg$c2;
2081
- }
2082
- if (s0 === peg$FAILED) {
2083
- s0 = peg$currPos;
2084
- if (input.charCodeAt(peg$currPos) === 91) {
2085
- s1 = peg$c7;
2086
- peg$currPos++;
2087
- } else {
2088
- s1 = peg$FAILED;
2089
- if (peg$silentFails === 0) {
2090
- peg$fail(peg$c8);
2091
- }
2092
- }
2093
- if (s1 !== peg$FAILED) {
2094
- s2 = [];
2095
- s3 = peg$parsearray_value_list();
2096
- if (s3 !== peg$FAILED) {
2097
- while (s3 !== peg$FAILED) {
2098
- s2.push(s3);
2099
- s3 = peg$parsearray_value_list();
2100
- }
2101
- } else {
2102
- s2 = peg$c2;
2103
- }
2104
- if (s2 !== peg$FAILED) {
2105
- if (input.charCodeAt(peg$currPos) === 93) {
2106
- s3 = peg$c9;
2107
- peg$currPos++;
2108
- } else {
2109
- s3 = peg$FAILED;
2110
- if (peg$silentFails === 0) {
2111
- peg$fail(peg$c10);
2112
- }
2113
- }
2114
- if (s3 !== peg$FAILED) {
2115
- peg$reportedPos = s0;
2116
- s1 = peg$c59(s2);
2117
- s0 = s1;
2118
- } else {
2119
- peg$currPos = s0;
2120
- s0 = peg$c2;
2121
- }
2122
- } else {
2123
- peg$currPos = s0;
2124
- s0 = peg$c2;
2125
- }
2126
- } else {
2127
- peg$currPos = s0;
2128
- s0 = peg$c2;
2129
- }
2130
- if (s0 === peg$FAILED) {
2131
- s0 = peg$currPos;
2132
- if (input.charCodeAt(peg$currPos) === 91) {
2133
- s1 = peg$c7;
2134
- peg$currPos++;
2135
- } else {
2136
- s1 = peg$FAILED;
2137
- if (peg$silentFails === 0) {
2138
- peg$fail(peg$c8);
2139
- }
2140
- }
2141
- if (s1 !== peg$FAILED) {
2142
- s2 = [];
2143
- s3 = peg$parsearray_value_list();
2144
- if (s3 !== peg$FAILED) {
2145
- while (s3 !== peg$FAILED) {
2146
- s2.push(s3);
2147
- s3 = peg$parsearray_value_list();
2148
- }
2149
- } else {
2150
- s2 = peg$c2;
2151
- }
2152
- if (s2 !== peg$FAILED) {
2153
- s3 = peg$parsearray_value();
2154
- if (s3 !== peg$FAILED) {
2155
- if (input.charCodeAt(peg$currPos) === 93) {
2156
- s4 = peg$c9;
2157
- peg$currPos++;
2158
- } else {
2159
- s4 = peg$FAILED;
2160
- if (peg$silentFails === 0) {
2161
- peg$fail(peg$c10);
2162
- }
2163
- }
2164
- if (s4 !== peg$FAILED) {
2165
- peg$reportedPos = s0;
2166
- s1 = peg$c60(s2, s3);
2167
- s0 = s1;
2168
- } else {
2169
- peg$currPos = s0;
2170
- s0 = peg$c2;
2171
- }
2172
- } else {
2173
- peg$currPos = s0;
2174
- s0 = peg$c2;
2175
- }
2176
- } else {
2177
- peg$currPos = s0;
2178
- s0 = peg$c2;
2179
- }
2180
- } else {
2181
- peg$currPos = s0;
2182
- s0 = peg$c2;
2183
- }
2184
- }
2185
- }
2186
- }
2187
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
2188
- return s0;
2189
- }
2190
- function peg$parsearray_value() {
2191
- var s0, s1, s2, s3, s4;
2192
- var key = peg$currPos * 49 + 29, cached = peg$cache[key];
2193
- if (cached) {
2194
- peg$currPos = cached.nextPos;
2195
- return cached.result;
2196
- }
2197
- s0 = peg$currPos;
2198
- s1 = [];
2199
- s2 = peg$parsearray_sep();
2200
- while (s2 !== peg$FAILED) {
2201
- s1.push(s2);
2202
- s2 = peg$parsearray_sep();
2203
- }
2204
- if (s1 !== peg$FAILED) {
2205
- s2 = peg$parsevalue();
2206
- if (s2 !== peg$FAILED) {
2207
- s3 = [];
2208
- s4 = peg$parsearray_sep();
2209
- while (s4 !== peg$FAILED) {
2210
- s3.push(s4);
2211
- s4 = peg$parsearray_sep();
2212
- }
2213
- if (s3 !== peg$FAILED) {
2214
- peg$reportedPos = s0;
2215
- s1 = peg$c61(s2);
2216
- s0 = s1;
2217
- } else {
2218
- peg$currPos = s0;
2219
- s0 = peg$c2;
2220
- }
2221
- } else {
2222
- peg$currPos = s0;
2223
- s0 = peg$c2;
2224
- }
2225
- } else {
2226
- peg$currPos = s0;
2227
- s0 = peg$c2;
2228
- }
2229
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
2230
- return s0;
2231
- }
2232
- function peg$parsearray_value_list() {
2233
- var s0, s1, s2, s3, s4, s5, s6;
2234
- var key = peg$currPos * 49 + 30, cached = peg$cache[key];
2235
- if (cached) {
2236
- peg$currPos = cached.nextPos;
2237
- return cached.result;
2238
- }
2239
- s0 = peg$currPos;
2240
- s1 = [];
2241
- s2 = peg$parsearray_sep();
2242
- while (s2 !== peg$FAILED) {
2243
- s1.push(s2);
2244
- s2 = peg$parsearray_sep();
2245
- }
2246
- if (s1 !== peg$FAILED) {
2247
- s2 = peg$parsevalue();
2248
- if (s2 !== peg$FAILED) {
2249
- s3 = [];
2250
- s4 = peg$parsearray_sep();
2251
- while (s4 !== peg$FAILED) {
2252
- s3.push(s4);
2253
- s4 = peg$parsearray_sep();
2254
- }
2255
- if (s3 !== peg$FAILED) {
2256
- if (input.charCodeAt(peg$currPos) === 44) {
2257
- s4 = peg$c62;
2258
- peg$currPos++;
2259
- } else {
2260
- s4 = peg$FAILED;
2261
- if (peg$silentFails === 0) {
2262
- peg$fail(peg$c63);
2263
- }
2264
- }
2265
- if (s4 !== peg$FAILED) {
2266
- s5 = [];
2267
- s6 = peg$parsearray_sep();
2268
- while (s6 !== peg$FAILED) {
2269
- s5.push(s6);
2270
- s6 = peg$parsearray_sep();
2271
- }
2272
- if (s5 !== peg$FAILED) {
2273
- peg$reportedPos = s0;
2274
- s1 = peg$c61(s2);
2275
- s0 = s1;
2276
- } else {
2277
- peg$currPos = s0;
2278
- s0 = peg$c2;
2279
- }
2280
- } else {
2281
- peg$currPos = s0;
2282
- s0 = peg$c2;
2283
- }
2284
- } else {
2285
- peg$currPos = s0;
2286
- s0 = peg$c2;
2287
- }
2288
- } else {
2289
- peg$currPos = s0;
2290
- s0 = peg$c2;
2291
- }
2292
- } else {
2293
- peg$currPos = s0;
2294
- s0 = peg$c2;
2295
- }
2296
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
2297
- return s0;
2298
- }
2299
- function peg$parsearray_sep() {
2300
- var s0;
2301
- var key = peg$currPos * 49 + 31, cached = peg$cache[key];
2302
- if (cached) {
2303
- peg$currPos = cached.nextPos;
2304
- return cached.result;
2305
- }
2306
- s0 = peg$parseS();
2307
- if (s0 === peg$FAILED) {
2308
- s0 = peg$parseNL();
2309
- if (s0 === peg$FAILED) {
2310
- s0 = peg$parsecomment();
2311
- }
2312
- }
2313
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
2314
- return s0;
2315
- }
2316
- function peg$parseinline_table() {
2317
- var s0, s1, s2, s3, s4, s5;
2318
- var key = peg$currPos * 49 + 32, cached = peg$cache[key];
2319
- if (cached) {
2320
- peg$currPos = cached.nextPos;
2321
- return cached.result;
2322
- }
2323
- s0 = peg$currPos;
2324
- if (input.charCodeAt(peg$currPos) === 123) {
2325
- s1 = peg$c64;
2326
- peg$currPos++;
2327
- } else {
2328
- s1 = peg$FAILED;
2329
- if (peg$silentFails === 0) {
2330
- peg$fail(peg$c65);
2331
- }
2332
- }
2333
- if (s1 !== peg$FAILED) {
2334
- s2 = [];
2335
- s3 = peg$parseS();
2336
- while (s3 !== peg$FAILED) {
2337
- s2.push(s3);
2338
- s3 = peg$parseS();
2339
- }
2340
- if (s2 !== peg$FAILED) {
2341
- s3 = [];
2342
- s4 = peg$parseinline_table_assignment();
2343
- while (s4 !== peg$FAILED) {
2344
- s3.push(s4);
2345
- s4 = peg$parseinline_table_assignment();
2346
- }
2347
- if (s3 !== peg$FAILED) {
2348
- s4 = [];
2349
- s5 = peg$parseS();
2350
- while (s5 !== peg$FAILED) {
2351
- s4.push(s5);
2352
- s5 = peg$parseS();
2353
- }
2354
- if (s4 !== peg$FAILED) {
2355
- if (input.charCodeAt(peg$currPos) === 125) {
2356
- s5 = peg$c66;
2357
- peg$currPos++;
2358
- } else {
2359
- s5 = peg$FAILED;
2360
- if (peg$silentFails === 0) {
2361
- peg$fail(peg$c67);
2362
- }
2363
- }
2364
- if (s5 !== peg$FAILED) {
2365
- peg$reportedPos = s0;
2366
- s1 = peg$c68(s3);
2367
- s0 = s1;
2368
- } else {
2369
- peg$currPos = s0;
2370
- s0 = peg$c2;
2371
- }
2372
- } else {
2373
- peg$currPos = s0;
2374
- s0 = peg$c2;
2375
- }
2376
- } else {
2377
- peg$currPos = s0;
2378
- s0 = peg$c2;
2379
- }
2380
- } else {
2381
- peg$currPos = s0;
2382
- s0 = peg$c2;
2383
- }
2384
- } else {
2385
- peg$currPos = s0;
2386
- s0 = peg$c2;
2387
- }
2388
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
2389
- return s0;
2390
- }
2391
- function peg$parseinline_table_assignment() {
2392
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
2393
- var key = peg$currPos * 49 + 33, cached = peg$cache[key];
2394
- if (cached) {
2395
- peg$currPos = cached.nextPos;
2396
- return cached.result;
2397
- }
2398
- s0 = peg$currPos;
2399
- s1 = [];
2400
- s2 = peg$parseS();
2401
- while (s2 !== peg$FAILED) {
2402
- s1.push(s2);
2403
- s2 = peg$parseS();
2404
- }
2405
- if (s1 !== peg$FAILED) {
2406
- s2 = peg$parsekey();
2407
- if (s2 !== peg$FAILED) {
2408
- s3 = [];
2409
- s4 = peg$parseS();
2410
- while (s4 !== peg$FAILED) {
2411
- s3.push(s4);
2412
- s4 = peg$parseS();
2413
- }
2414
- if (s3 !== peg$FAILED) {
2415
- if (input.charCodeAt(peg$currPos) === 61) {
2416
- s4 = peg$c18;
2417
- peg$currPos++;
2418
- } else {
2419
- s4 = peg$FAILED;
2420
- if (peg$silentFails === 0) {
2421
- peg$fail(peg$c19);
2422
- }
2423
- }
2424
- if (s4 !== peg$FAILED) {
2425
- s5 = [];
2426
- s6 = peg$parseS();
2427
- while (s6 !== peg$FAILED) {
2428
- s5.push(s6);
2429
- s6 = peg$parseS();
2430
- }
2431
- if (s5 !== peg$FAILED) {
2432
- s6 = peg$parsevalue();
2433
- if (s6 !== peg$FAILED) {
2434
- s7 = [];
2435
- s8 = peg$parseS();
2436
- while (s8 !== peg$FAILED) {
2437
- s7.push(s8);
2438
- s8 = peg$parseS();
2439
- }
2440
- if (s7 !== peg$FAILED) {
2441
- if (input.charCodeAt(peg$currPos) === 44) {
2442
- s8 = peg$c62;
2443
- peg$currPos++;
2444
- } else {
2445
- s8 = peg$FAILED;
2446
- if (peg$silentFails === 0) {
2447
- peg$fail(peg$c63);
2448
- }
2449
- }
2450
- if (s8 !== peg$FAILED) {
2451
- s9 = [];
2452
- s10 = peg$parseS();
2453
- while (s10 !== peg$FAILED) {
2454
- s9.push(s10);
2455
- s10 = peg$parseS();
2456
- }
2457
- if (s9 !== peg$FAILED) {
2458
- peg$reportedPos = s0;
2459
- s1 = peg$c69(s2, s6);
2460
- s0 = s1;
2461
- } else {
2462
- peg$currPos = s0;
2463
- s0 = peg$c2;
2464
- }
2465
- } else {
2466
- peg$currPos = s0;
2467
- s0 = peg$c2;
2468
- }
2469
- } else {
2470
- peg$currPos = s0;
2471
- s0 = peg$c2;
2472
- }
2473
- } else {
2474
- peg$currPos = s0;
2475
- s0 = peg$c2;
2476
- }
2477
- } else {
2478
- peg$currPos = s0;
2479
- s0 = peg$c2;
2480
- }
2481
- } else {
2482
- peg$currPos = s0;
2483
- s0 = peg$c2;
2484
- }
2485
- } else {
2486
- peg$currPos = s0;
2487
- s0 = peg$c2;
2488
- }
2489
- } else {
2490
- peg$currPos = s0;
2491
- s0 = peg$c2;
2492
- }
2493
- } else {
2494
- peg$currPos = s0;
2495
- s0 = peg$c2;
2496
- }
2497
- if (s0 === peg$FAILED) {
2498
- s0 = peg$currPos;
2499
- s1 = [];
2500
- s2 = peg$parseS();
2501
- while (s2 !== peg$FAILED) {
2502
- s1.push(s2);
2503
- s2 = peg$parseS();
2504
- }
2505
- if (s1 !== peg$FAILED) {
2506
- s2 = peg$parsekey();
2507
- if (s2 !== peg$FAILED) {
2508
- s3 = [];
2509
- s4 = peg$parseS();
2510
- while (s4 !== peg$FAILED) {
2511
- s3.push(s4);
2512
- s4 = peg$parseS();
2513
- }
2514
- if (s3 !== peg$FAILED) {
2515
- if (input.charCodeAt(peg$currPos) === 61) {
2516
- s4 = peg$c18;
2517
- peg$currPos++;
2518
- } else {
2519
- s4 = peg$FAILED;
2520
- if (peg$silentFails === 0) {
2521
- peg$fail(peg$c19);
2522
- }
2523
- }
2524
- if (s4 !== peg$FAILED) {
2525
- s5 = [];
2526
- s6 = peg$parseS();
2527
- while (s6 !== peg$FAILED) {
2528
- s5.push(s6);
2529
- s6 = peg$parseS();
2530
- }
2531
- if (s5 !== peg$FAILED) {
2532
- s6 = peg$parsevalue();
2533
- if (s6 !== peg$FAILED) {
2534
- peg$reportedPos = s0;
2535
- s1 = peg$c69(s2, s6);
2536
- s0 = s1;
2537
- } else {
2538
- peg$currPos = s0;
2539
- s0 = peg$c2;
2540
- }
2541
- } else {
2542
- peg$currPos = s0;
2543
- s0 = peg$c2;
2544
- }
2545
- } else {
2546
- peg$currPos = s0;
2547
- s0 = peg$c2;
2548
- }
2549
- } else {
2550
- peg$currPos = s0;
2551
- s0 = peg$c2;
2552
- }
2553
- } else {
2554
- peg$currPos = s0;
2555
- s0 = peg$c2;
2556
- }
2557
- } else {
2558
- peg$currPos = s0;
2559
- s0 = peg$c2;
2560
- }
2561
- }
2562
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
2563
- return s0;
2564
- }
2565
- function peg$parsesecfragment() {
2566
- var s0, s1, s2;
2567
- var key = peg$currPos * 49 + 34, cached = peg$cache[key];
2568
- if (cached) {
2569
- peg$currPos = cached.nextPos;
2570
- return cached.result;
2571
- }
2572
- s0 = peg$currPos;
2573
- if (input.charCodeAt(peg$currPos) === 46) {
2574
- s1 = peg$c16;
2575
- peg$currPos++;
2576
- } else {
2577
- s1 = peg$FAILED;
2578
- if (peg$silentFails === 0) {
2579
- peg$fail(peg$c17);
2580
- }
2581
- }
2582
- if (s1 !== peg$FAILED) {
2583
- s2 = peg$parseDIGITS();
2584
- if (s2 !== peg$FAILED) {
2585
- peg$reportedPos = s0;
2586
- s1 = peg$c70(s2);
2587
- s0 = s1;
2588
- } else {
2589
- peg$currPos = s0;
2590
- s0 = peg$c2;
2591
- }
2592
- } else {
2593
- peg$currPos = s0;
2594
- s0 = peg$c2;
2595
- }
2596
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
2597
- return s0;
2598
- }
2599
- function peg$parsedate() {
2600
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11;
2601
- var key = peg$currPos * 49 + 35, cached = peg$cache[key];
2602
- if (cached) {
2603
- peg$currPos = cached.nextPos;
2604
- return cached.result;
2605
- }
2606
- s0 = peg$currPos;
2607
- s1 = peg$currPos;
2608
- s2 = peg$parseDIGIT_OR_UNDER();
2609
- if (s2 !== peg$FAILED) {
2610
- s3 = peg$parseDIGIT_OR_UNDER();
2611
- if (s3 !== peg$FAILED) {
2612
- s4 = peg$parseDIGIT_OR_UNDER();
2613
- if (s4 !== peg$FAILED) {
2614
- s5 = peg$parseDIGIT_OR_UNDER();
2615
- if (s5 !== peg$FAILED) {
2616
- if (input.charCodeAt(peg$currPos) === 45) {
2617
- s6 = peg$c47;
2618
- peg$currPos++;
2619
- } else {
2620
- s6 = peg$FAILED;
2621
- if (peg$silentFails === 0) {
2622
- peg$fail(peg$c48);
2623
- }
2624
- }
2625
- if (s6 !== peg$FAILED) {
2626
- s7 = peg$parseDIGIT_OR_UNDER();
2627
- if (s7 !== peg$FAILED) {
2628
- s8 = peg$parseDIGIT_OR_UNDER();
2629
- if (s8 !== peg$FAILED) {
2630
- if (input.charCodeAt(peg$currPos) === 45) {
2631
- s9 = peg$c47;
2632
- peg$currPos++;
2633
- } else {
2634
- s9 = peg$FAILED;
2635
- if (peg$silentFails === 0) {
2636
- peg$fail(peg$c48);
2637
- }
2638
- }
2639
- if (s9 !== peg$FAILED) {
2640
- s10 = peg$parseDIGIT_OR_UNDER();
2641
- if (s10 !== peg$FAILED) {
2642
- s11 = peg$parseDIGIT_OR_UNDER();
2643
- if (s11 !== peg$FAILED) {
2644
- s2 = [s2, s3, s4, s5, s6, s7, s8, s9, s10, s11];
2645
- s1 = s2;
2646
- } else {
2647
- peg$currPos = s1;
2648
- s1 = peg$c2;
2649
- }
2650
- } else {
2651
- peg$currPos = s1;
2652
- s1 = peg$c2;
2653
- }
2654
- } else {
2655
- peg$currPos = s1;
2656
- s1 = peg$c2;
2657
- }
2658
- } else {
2659
- peg$currPos = s1;
2660
- s1 = peg$c2;
2661
- }
2662
- } else {
2663
- peg$currPos = s1;
2664
- s1 = peg$c2;
2665
- }
2666
- } else {
2667
- peg$currPos = s1;
2668
- s1 = peg$c2;
2669
- }
2670
- } else {
2671
- peg$currPos = s1;
2672
- s1 = peg$c2;
2673
- }
2674
- } else {
2675
- peg$currPos = s1;
2676
- s1 = peg$c2;
2677
- }
2678
- } else {
2679
- peg$currPos = s1;
2680
- s1 = peg$c2;
2681
- }
2682
- } else {
2683
- peg$currPos = s1;
2684
- s1 = peg$c2;
2685
- }
2686
- if (s1 !== peg$FAILED) {
2687
- peg$reportedPos = s0;
2688
- s1 = peg$c71(s1);
2689
- }
2690
- s0 = s1;
2691
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
2692
- return s0;
2693
- }
2694
- function peg$parsetime() {
2695
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
2696
- var key = peg$currPos * 49 + 36, cached = peg$cache[key];
2697
- if (cached) {
2698
- peg$currPos = cached.nextPos;
2699
- return cached.result;
2700
- }
2701
- s0 = peg$currPos;
2702
- s1 = peg$currPos;
2703
- s2 = peg$parseDIGIT_OR_UNDER();
2704
- if (s2 !== peg$FAILED) {
2705
- s3 = peg$parseDIGIT_OR_UNDER();
2706
- if (s3 !== peg$FAILED) {
2707
- if (input.charCodeAt(peg$currPos) === 58) {
2708
- s4 = peg$c72;
2709
- peg$currPos++;
2710
- } else {
2711
- s4 = peg$FAILED;
2712
- if (peg$silentFails === 0) {
2713
- peg$fail(peg$c73);
2714
- }
2715
- }
2716
- if (s4 !== peg$FAILED) {
2717
- s5 = peg$parseDIGIT_OR_UNDER();
2718
- if (s5 !== peg$FAILED) {
2719
- s6 = peg$parseDIGIT_OR_UNDER();
2720
- if (s6 !== peg$FAILED) {
2721
- if (input.charCodeAt(peg$currPos) === 58) {
2722
- s7 = peg$c72;
2723
- peg$currPos++;
2724
- } else {
2725
- s7 = peg$FAILED;
2726
- if (peg$silentFails === 0) {
2727
- peg$fail(peg$c73);
2728
- }
2729
- }
2730
- if (s7 !== peg$FAILED) {
2731
- s8 = peg$parseDIGIT_OR_UNDER();
2732
- if (s8 !== peg$FAILED) {
2733
- s9 = peg$parseDIGIT_OR_UNDER();
2734
- if (s9 !== peg$FAILED) {
2735
- s10 = peg$parsesecfragment();
2736
- if (s10 === peg$FAILED) {
2737
- s10 = peg$c25;
2738
- }
2739
- if (s10 !== peg$FAILED) {
2740
- s2 = [s2, s3, s4, s5, s6, s7, s8, s9, s10];
2741
- s1 = s2;
2742
- } else {
2743
- peg$currPos = s1;
2744
- s1 = peg$c2;
2745
- }
2746
- } else {
2747
- peg$currPos = s1;
2748
- s1 = peg$c2;
2749
- }
2750
- } else {
2751
- peg$currPos = s1;
2752
- s1 = peg$c2;
2753
- }
2754
- } else {
2755
- peg$currPos = s1;
2756
- s1 = peg$c2;
2757
- }
2758
- } else {
2759
- peg$currPos = s1;
2760
- s1 = peg$c2;
2761
- }
2762
- } else {
2763
- peg$currPos = s1;
2764
- s1 = peg$c2;
2765
- }
2766
- } else {
2767
- peg$currPos = s1;
2768
- s1 = peg$c2;
2769
- }
2770
- } else {
2771
- peg$currPos = s1;
2772
- s1 = peg$c2;
2773
- }
2774
- } else {
2775
- peg$currPos = s1;
2776
- s1 = peg$c2;
2777
- }
2778
- if (s1 !== peg$FAILED) {
2779
- peg$reportedPos = s0;
2780
- s1 = peg$c74(s1);
2781
- }
2782
- s0 = s1;
2783
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
2784
- return s0;
2785
- }
2786
- function peg$parsetime_with_offset() {
2787
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16;
2788
- var key = peg$currPos * 49 + 37, cached = peg$cache[key];
2789
- if (cached) {
2790
- peg$currPos = cached.nextPos;
2791
- return cached.result;
2792
- }
2793
- s0 = peg$currPos;
2794
- s1 = peg$currPos;
2795
- s2 = peg$parseDIGIT_OR_UNDER();
2796
- if (s2 !== peg$FAILED) {
2797
- s3 = peg$parseDIGIT_OR_UNDER();
2798
- if (s3 !== peg$FAILED) {
2799
- if (input.charCodeAt(peg$currPos) === 58) {
2800
- s4 = peg$c72;
2801
- peg$currPos++;
2802
- } else {
2803
- s4 = peg$FAILED;
2804
- if (peg$silentFails === 0) {
2805
- peg$fail(peg$c73);
2806
- }
2807
- }
2808
- if (s4 !== peg$FAILED) {
2809
- s5 = peg$parseDIGIT_OR_UNDER();
2810
- if (s5 !== peg$FAILED) {
2811
- s6 = peg$parseDIGIT_OR_UNDER();
2812
- if (s6 !== peg$FAILED) {
2813
- if (input.charCodeAt(peg$currPos) === 58) {
2814
- s7 = peg$c72;
2815
- peg$currPos++;
2816
- } else {
2817
- s7 = peg$FAILED;
2818
- if (peg$silentFails === 0) {
2819
- peg$fail(peg$c73);
2820
- }
2821
- }
2822
- if (s7 !== peg$FAILED) {
2823
- s8 = peg$parseDIGIT_OR_UNDER();
2824
- if (s8 !== peg$FAILED) {
2825
- s9 = peg$parseDIGIT_OR_UNDER();
2826
- if (s9 !== peg$FAILED) {
2827
- s10 = peg$parsesecfragment();
2828
- if (s10 === peg$FAILED) {
2829
- s10 = peg$c25;
2830
- }
2831
- if (s10 !== peg$FAILED) {
2832
- if (input.charCodeAt(peg$currPos) === 45) {
2833
- s11 = peg$c47;
2834
- peg$currPos++;
2835
- } else {
2836
- s11 = peg$FAILED;
2837
- if (peg$silentFails === 0) {
2838
- peg$fail(peg$c48);
2839
- }
2840
- }
2841
- if (s11 === peg$FAILED) {
2842
- if (input.charCodeAt(peg$currPos) === 43) {
2843
- s11 = peg$c44;
2844
- peg$currPos++;
2845
- } else {
2846
- s11 = peg$FAILED;
2847
- if (peg$silentFails === 0) {
2848
- peg$fail(peg$c45);
2849
- }
2850
- }
2851
- }
2852
- if (s11 !== peg$FAILED) {
2853
- s12 = peg$parseDIGIT_OR_UNDER();
2854
- if (s12 !== peg$FAILED) {
2855
- s13 = peg$parseDIGIT_OR_UNDER();
2856
- if (s13 !== peg$FAILED) {
2857
- if (input.charCodeAt(peg$currPos) === 58) {
2858
- s14 = peg$c72;
2859
- peg$currPos++;
2860
- } else {
2861
- s14 = peg$FAILED;
2862
- if (peg$silentFails === 0) {
2863
- peg$fail(peg$c73);
2864
- }
2865
- }
2866
- if (s14 !== peg$FAILED) {
2867
- s15 = peg$parseDIGIT_OR_UNDER();
2868
- if (s15 !== peg$FAILED) {
2869
- s16 = peg$parseDIGIT_OR_UNDER();
2870
- if (s16 !== peg$FAILED) {
2871
- s2 = [s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16];
2872
- s1 = s2;
2873
- } else {
2874
- peg$currPos = s1;
2875
- s1 = peg$c2;
2876
- }
2877
- } else {
2878
- peg$currPos = s1;
2879
- s1 = peg$c2;
2880
- }
2881
- } else {
2882
- peg$currPos = s1;
2883
- s1 = peg$c2;
2884
- }
2885
- } else {
2886
- peg$currPos = s1;
2887
- s1 = peg$c2;
2888
- }
2889
- } else {
2890
- peg$currPos = s1;
2891
- s1 = peg$c2;
2892
- }
2893
- } else {
2894
- peg$currPos = s1;
2895
- s1 = peg$c2;
2896
- }
2897
- } else {
2898
- peg$currPos = s1;
2899
- s1 = peg$c2;
2900
- }
2901
- } else {
2902
- peg$currPos = s1;
2903
- s1 = peg$c2;
2904
- }
2905
- } else {
2906
- peg$currPos = s1;
2907
- s1 = peg$c2;
2908
- }
2909
- } else {
2910
- peg$currPos = s1;
2911
- s1 = peg$c2;
2912
- }
2913
- } else {
2914
- peg$currPos = s1;
2915
- s1 = peg$c2;
2916
- }
2917
- } else {
2918
- peg$currPos = s1;
2919
- s1 = peg$c2;
2920
- }
2921
- } else {
2922
- peg$currPos = s1;
2923
- s1 = peg$c2;
2924
- }
2925
- } else {
2926
- peg$currPos = s1;
2927
- s1 = peg$c2;
2928
- }
2929
- } else {
2930
- peg$currPos = s1;
2931
- s1 = peg$c2;
2932
- }
2933
- if (s1 !== peg$FAILED) {
2934
- peg$reportedPos = s0;
2935
- s1 = peg$c74(s1);
2936
- }
2937
- s0 = s1;
2938
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
2939
- return s0;
2940
- }
2941
- function peg$parsedatetime() {
2942
- var s0, s1, s2, s3, s4;
2943
- var key = peg$currPos * 49 + 38, cached = peg$cache[key];
2944
- if (cached) {
2945
- peg$currPos = cached.nextPos;
2946
- return cached.result;
2947
- }
2948
- s0 = peg$currPos;
2949
- s1 = peg$parsedate();
2950
- if (s1 !== peg$FAILED) {
2951
- if (input.charCodeAt(peg$currPos) === 84) {
2952
- s2 = peg$c75;
2953
- peg$currPos++;
2954
- } else {
2955
- s2 = peg$FAILED;
2956
- if (peg$silentFails === 0) {
2957
- peg$fail(peg$c76);
2958
- }
2959
- }
2960
- if (s2 !== peg$FAILED) {
2961
- s3 = peg$parsetime();
2962
- if (s3 !== peg$FAILED) {
2963
- if (input.charCodeAt(peg$currPos) === 90) {
2964
- s4 = peg$c77;
2965
- peg$currPos++;
2966
- } else {
2967
- s4 = peg$FAILED;
2968
- if (peg$silentFails === 0) {
2969
- peg$fail(peg$c78);
2970
- }
2971
- }
2972
- if (s4 !== peg$FAILED) {
2973
- peg$reportedPos = s0;
2974
- s1 = peg$c79(s1, s3);
2975
- s0 = s1;
2976
- } else {
2977
- peg$currPos = s0;
2978
- s0 = peg$c2;
2979
- }
2980
- } else {
2981
- peg$currPos = s0;
2982
- s0 = peg$c2;
2983
- }
2984
- } else {
2985
- peg$currPos = s0;
2986
- s0 = peg$c2;
2987
- }
2988
- } else {
2989
- peg$currPos = s0;
2990
- s0 = peg$c2;
2991
- }
2992
- if (s0 === peg$FAILED) {
2993
- s0 = peg$currPos;
2994
- s1 = peg$parsedate();
2995
- if (s1 !== peg$FAILED) {
2996
- if (input.charCodeAt(peg$currPos) === 84) {
2997
- s2 = peg$c75;
2998
- peg$currPos++;
2999
- } else {
3000
- s2 = peg$FAILED;
3001
- if (peg$silentFails === 0) {
3002
- peg$fail(peg$c76);
3003
- }
3004
- }
3005
- if (s2 !== peg$FAILED) {
3006
- s3 = peg$parsetime_with_offset();
3007
- if (s3 !== peg$FAILED) {
3008
- peg$reportedPos = s0;
3009
- s1 = peg$c80(s1, s3);
3010
- s0 = s1;
3011
- } else {
3012
- peg$currPos = s0;
3013
- s0 = peg$c2;
3014
- }
3015
- } else {
3016
- peg$currPos = s0;
3017
- s0 = peg$c2;
3018
- }
3019
- } else {
3020
- peg$currPos = s0;
3021
- s0 = peg$c2;
3022
- }
3023
- }
3024
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3025
- return s0;
3026
- }
3027
- function peg$parseS() {
3028
- var s0;
3029
- var key = peg$currPos * 49 + 39, cached = peg$cache[key];
3030
- if (cached) {
3031
- peg$currPos = cached.nextPos;
3032
- return cached.result;
3033
- }
3034
- if (peg$c81.test(input.charAt(peg$currPos))) {
3035
- s0 = input.charAt(peg$currPos);
3036
- peg$currPos++;
3037
- } else {
3038
- s0 = peg$FAILED;
3039
- if (peg$silentFails === 0) {
3040
- peg$fail(peg$c82);
3041
- }
3042
- }
3043
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3044
- return s0;
3045
- }
3046
- function peg$parseNL() {
3047
- var s0, s1, s2;
3048
- var key = peg$currPos * 49 + 40, cached = peg$cache[key];
3049
- if (cached) {
3050
- peg$currPos = cached.nextPos;
3051
- return cached.result;
3052
- }
3053
- if (input.charCodeAt(peg$currPos) === 10) {
3054
- s0 = peg$c83;
3055
- peg$currPos++;
3056
- } else {
3057
- s0 = peg$FAILED;
3058
- if (peg$silentFails === 0) {
3059
- peg$fail(peg$c84);
3060
- }
3061
- }
3062
- if (s0 === peg$FAILED) {
3063
- s0 = peg$currPos;
3064
- if (input.charCodeAt(peg$currPos) === 13) {
3065
- s1 = peg$c85;
3066
- peg$currPos++;
3067
- } else {
3068
- s1 = peg$FAILED;
3069
- if (peg$silentFails === 0) {
3070
- peg$fail(peg$c86);
3071
- }
3072
- }
3073
- if (s1 !== peg$FAILED) {
3074
- if (input.charCodeAt(peg$currPos) === 10) {
3075
- s2 = peg$c83;
3076
- peg$currPos++;
3077
- } else {
3078
- s2 = peg$FAILED;
3079
- if (peg$silentFails === 0) {
3080
- peg$fail(peg$c84);
3081
- }
3082
- }
3083
- if (s2 !== peg$FAILED) {
3084
- s1 = [s1, s2];
3085
- s0 = s1;
3086
- } else {
3087
- peg$currPos = s0;
3088
- s0 = peg$c2;
3089
- }
3090
- } else {
3091
- peg$currPos = s0;
3092
- s0 = peg$c2;
3093
- }
3094
- }
3095
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3096
- return s0;
3097
- }
3098
- function peg$parseNLS() {
3099
- var s0;
3100
- var key = peg$currPos * 49 + 41, cached = peg$cache[key];
3101
- if (cached) {
3102
- peg$currPos = cached.nextPos;
3103
- return cached.result;
3104
- }
3105
- s0 = peg$parseNL();
3106
- if (s0 === peg$FAILED) {
3107
- s0 = peg$parseS();
3108
- }
3109
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3110
- return s0;
3111
- }
3112
- function peg$parseEOF() {
3113
- var s0, s1;
3114
- var key = peg$currPos * 49 + 42, cached = peg$cache[key];
3115
- if (cached) {
3116
- peg$currPos = cached.nextPos;
3117
- return cached.result;
3118
- }
3119
- s0 = peg$currPos;
3120
- peg$silentFails++;
3121
- if (input.length > peg$currPos) {
3122
- s1 = input.charAt(peg$currPos);
3123
- peg$currPos++;
3124
- } else {
3125
- s1 = peg$FAILED;
3126
- if (peg$silentFails === 0) {
3127
- peg$fail(peg$c6);
3128
- }
3129
- }
3130
- peg$silentFails--;
3131
- if (s1 === peg$FAILED) {
3132
- s0 = peg$c5;
3133
- } else {
3134
- peg$currPos = s0;
3135
- s0 = peg$c2;
3136
- }
3137
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3138
- return s0;
3139
- }
3140
- function peg$parseHEX() {
3141
- var s0;
3142
- var key = peg$currPos * 49 + 43, cached = peg$cache[key];
3143
- if (cached) {
3144
- peg$currPos = cached.nextPos;
3145
- return cached.result;
3146
- }
3147
- if (peg$c87.test(input.charAt(peg$currPos))) {
3148
- s0 = input.charAt(peg$currPos);
3149
- peg$currPos++;
3150
- } else {
3151
- s0 = peg$FAILED;
3152
- if (peg$silentFails === 0) {
3153
- peg$fail(peg$c88);
3154
- }
3155
- }
3156
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3157
- return s0;
3158
- }
3159
- function peg$parseDIGIT_OR_UNDER() {
3160
- var s0, s1;
3161
- var key = peg$currPos * 49 + 44, cached = peg$cache[key];
3162
- if (cached) {
3163
- peg$currPos = cached.nextPos;
3164
- return cached.result;
3165
- }
3166
- if (peg$c89.test(input.charAt(peg$currPos))) {
3167
- s0 = input.charAt(peg$currPos);
3168
- peg$currPos++;
3169
- } else {
3170
- s0 = peg$FAILED;
3171
- if (peg$silentFails === 0) {
3172
- peg$fail(peg$c90);
3173
- }
3174
- }
3175
- if (s0 === peg$FAILED) {
3176
- s0 = peg$currPos;
3177
- if (input.charCodeAt(peg$currPos) === 95) {
3178
- s1 = peg$c91;
3179
- peg$currPos++;
3180
- } else {
3181
- s1 = peg$FAILED;
3182
- if (peg$silentFails === 0) {
3183
- peg$fail(peg$c92);
3184
- }
3185
- }
3186
- if (s1 !== peg$FAILED) {
3187
- peg$reportedPos = s0;
3188
- s1 = peg$c93();
3189
- }
3190
- s0 = s1;
3191
- }
3192
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3193
- return s0;
3194
- }
3195
- function peg$parseASCII_BASIC() {
3196
- var s0;
3197
- var key = peg$currPos * 49 + 45, cached = peg$cache[key];
3198
- if (cached) {
3199
- peg$currPos = cached.nextPos;
3200
- return cached.result;
3201
- }
3202
- if (peg$c94.test(input.charAt(peg$currPos))) {
3203
- s0 = input.charAt(peg$currPos);
3204
- peg$currPos++;
3205
- } else {
3206
- s0 = peg$FAILED;
3207
- if (peg$silentFails === 0) {
3208
- peg$fail(peg$c95);
3209
- }
3210
- }
3211
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3212
- return s0;
3213
- }
3214
- function peg$parseDIGITS() {
3215
- var s0, s1, s2;
3216
- var key = peg$currPos * 49 + 46, cached = peg$cache[key];
3217
- if (cached) {
3218
- peg$currPos = cached.nextPos;
3219
- return cached.result;
3220
- }
3221
- s0 = peg$currPos;
3222
- s1 = [];
3223
- s2 = peg$parseDIGIT_OR_UNDER();
3224
- if (s2 !== peg$FAILED) {
3225
- while (s2 !== peg$FAILED) {
3226
- s1.push(s2);
3227
- s2 = peg$parseDIGIT_OR_UNDER();
3228
- }
3229
- } else {
3230
- s1 = peg$c2;
3231
- }
3232
- if (s1 !== peg$FAILED) {
3233
- peg$reportedPos = s0;
3234
- s1 = peg$c96(s1);
3235
- }
3236
- s0 = s1;
3237
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3238
- return s0;
3239
- }
3240
- function peg$parseESCAPED() {
3241
- var s0, s1;
3242
- var key = peg$currPos * 49 + 47, cached = peg$cache[key];
3243
- if (cached) {
3244
- peg$currPos = cached.nextPos;
3245
- return cached.result;
3246
- }
3247
- s0 = peg$currPos;
3248
- if (input.substr(peg$currPos, 2) === peg$c97) {
3249
- s1 = peg$c97;
3250
- peg$currPos += 2;
3251
- } else {
3252
- s1 = peg$FAILED;
3253
- if (peg$silentFails === 0) {
3254
- peg$fail(peg$c98);
3255
- }
3256
- }
3257
- if (s1 !== peg$FAILED) {
3258
- peg$reportedPos = s0;
3259
- s1 = peg$c99();
3260
- }
3261
- s0 = s1;
3262
- if (s0 === peg$FAILED) {
3263
- s0 = peg$currPos;
3264
- if (input.substr(peg$currPos, 2) === peg$c100) {
3265
- s1 = peg$c100;
3266
- peg$currPos += 2;
3267
- } else {
3268
- s1 = peg$FAILED;
3269
- if (peg$silentFails === 0) {
3270
- peg$fail(peg$c101);
3271
- }
3272
- }
3273
- if (s1 !== peg$FAILED) {
3274
- peg$reportedPos = s0;
3275
- s1 = peg$c102();
3276
- }
3277
- s0 = s1;
3278
- if (s0 === peg$FAILED) {
3279
- s0 = peg$currPos;
3280
- if (input.substr(peg$currPos, 2) === peg$c103) {
3281
- s1 = peg$c103;
3282
- peg$currPos += 2;
3283
- } else {
3284
- s1 = peg$FAILED;
3285
- if (peg$silentFails === 0) {
3286
- peg$fail(peg$c104);
3287
- }
3288
- }
3289
- if (s1 !== peg$FAILED) {
3290
- peg$reportedPos = s0;
3291
- s1 = peg$c105();
3292
- }
3293
- s0 = s1;
3294
- if (s0 === peg$FAILED) {
3295
- s0 = peg$currPos;
3296
- if (input.substr(peg$currPos, 2) === peg$c106) {
3297
- s1 = peg$c106;
3298
- peg$currPos += 2;
3299
- } else {
3300
- s1 = peg$FAILED;
3301
- if (peg$silentFails === 0) {
3302
- peg$fail(peg$c107);
3303
- }
3304
- }
3305
- if (s1 !== peg$FAILED) {
3306
- peg$reportedPos = s0;
3307
- s1 = peg$c108();
3308
- }
3309
- s0 = s1;
3310
- if (s0 === peg$FAILED) {
3311
- s0 = peg$currPos;
3312
- if (input.substr(peg$currPos, 2) === peg$c109) {
3313
- s1 = peg$c109;
3314
- peg$currPos += 2;
3315
- } else {
3316
- s1 = peg$FAILED;
3317
- if (peg$silentFails === 0) {
3318
- peg$fail(peg$c110);
3319
- }
3320
- }
3321
- if (s1 !== peg$FAILED) {
3322
- peg$reportedPos = s0;
3323
- s1 = peg$c111();
3324
- }
3325
- s0 = s1;
3326
- if (s0 === peg$FAILED) {
3327
- s0 = peg$currPos;
3328
- if (input.substr(peg$currPos, 2) === peg$c112) {
3329
- s1 = peg$c112;
3330
- peg$currPos += 2;
3331
- } else {
3332
- s1 = peg$FAILED;
3333
- if (peg$silentFails === 0) {
3334
- peg$fail(peg$c113);
3335
- }
3336
- }
3337
- if (s1 !== peg$FAILED) {
3338
- peg$reportedPos = s0;
3339
- s1 = peg$c114();
3340
- }
3341
- s0 = s1;
3342
- if (s0 === peg$FAILED) {
3343
- s0 = peg$currPos;
3344
- if (input.substr(peg$currPos, 2) === peg$c115) {
3345
- s1 = peg$c115;
3346
- peg$currPos += 2;
3347
- } else {
3348
- s1 = peg$FAILED;
3349
- if (peg$silentFails === 0) {
3350
- peg$fail(peg$c116);
3351
- }
3352
- }
3353
- if (s1 !== peg$FAILED) {
3354
- peg$reportedPos = s0;
3355
- s1 = peg$c117();
3356
- }
3357
- s0 = s1;
3358
- if (s0 === peg$FAILED) {
3359
- s0 = peg$parseESCAPED_UNICODE();
3360
- }
3361
- }
3362
- }
3363
- }
3364
- }
3365
- }
3366
- }
3367
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3368
- return s0;
3369
- }
3370
- function peg$parseESCAPED_UNICODE() {
3371
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
3372
- var key = peg$currPos * 49 + 48, cached = peg$cache[key];
3373
- if (cached) {
3374
- peg$currPos = cached.nextPos;
3375
- return cached.result;
3376
- }
3377
- s0 = peg$currPos;
3378
- if (input.substr(peg$currPos, 2) === peg$c118) {
3379
- s1 = peg$c118;
3380
- peg$currPos += 2;
3381
- } else {
3382
- s1 = peg$FAILED;
3383
- if (peg$silentFails === 0) {
3384
- peg$fail(peg$c119);
3385
- }
3386
- }
3387
- if (s1 !== peg$FAILED) {
3388
- s2 = peg$currPos;
3389
- s3 = peg$parseHEX();
3390
- if (s3 !== peg$FAILED) {
3391
- s4 = peg$parseHEX();
3392
- if (s4 !== peg$FAILED) {
3393
- s5 = peg$parseHEX();
3394
- if (s5 !== peg$FAILED) {
3395
- s6 = peg$parseHEX();
3396
- if (s6 !== peg$FAILED) {
3397
- s7 = peg$parseHEX();
3398
- if (s7 !== peg$FAILED) {
3399
- s8 = peg$parseHEX();
3400
- if (s8 !== peg$FAILED) {
3401
- s9 = peg$parseHEX();
3402
- if (s9 !== peg$FAILED) {
3403
- s10 = peg$parseHEX();
3404
- if (s10 !== peg$FAILED) {
3405
- s3 = [s3, s4, s5, s6, s7, s8, s9, s10];
3406
- s2 = s3;
3407
- } else {
3408
- peg$currPos = s2;
3409
- s2 = peg$c2;
3410
- }
3411
- } else {
3412
- peg$currPos = s2;
3413
- s2 = peg$c2;
3414
- }
3415
- } else {
3416
- peg$currPos = s2;
3417
- s2 = peg$c2;
3418
- }
3419
- } else {
3420
- peg$currPos = s2;
3421
- s2 = peg$c2;
3422
- }
3423
- } else {
3424
- peg$currPos = s2;
3425
- s2 = peg$c2;
3426
- }
3427
- } else {
3428
- peg$currPos = s2;
3429
- s2 = peg$c2;
3430
- }
3431
- } else {
3432
- peg$currPos = s2;
3433
- s2 = peg$c2;
3434
- }
3435
- } else {
3436
- peg$currPos = s2;
3437
- s2 = peg$c2;
3438
- }
3439
- if (s2 !== peg$FAILED) {
3440
- peg$reportedPos = s0;
3441
- s1 = peg$c120(s2);
3442
- s0 = s1;
3443
- } else {
3444
- peg$currPos = s0;
3445
- s0 = peg$c2;
3446
- }
3447
- } else {
3448
- peg$currPos = s0;
3449
- s0 = peg$c2;
3450
- }
3451
- if (s0 === peg$FAILED) {
3452
- s0 = peg$currPos;
3453
- if (input.substr(peg$currPos, 2) === peg$c121) {
3454
- s1 = peg$c121;
3455
- peg$currPos += 2;
3456
- } else {
3457
- s1 = peg$FAILED;
3458
- if (peg$silentFails === 0) {
3459
- peg$fail(peg$c122);
3460
- }
3461
- }
3462
- if (s1 !== peg$FAILED) {
3463
- s2 = peg$currPos;
3464
- s3 = peg$parseHEX();
3465
- if (s3 !== peg$FAILED) {
3466
- s4 = peg$parseHEX();
3467
- if (s4 !== peg$FAILED) {
3468
- s5 = peg$parseHEX();
3469
- if (s5 !== peg$FAILED) {
3470
- s6 = peg$parseHEX();
3471
- if (s6 !== peg$FAILED) {
3472
- s3 = [s3, s4, s5, s6];
3473
- s2 = s3;
3474
- } else {
3475
- peg$currPos = s2;
3476
- s2 = peg$c2;
3477
- }
3478
- } else {
3479
- peg$currPos = s2;
3480
- s2 = peg$c2;
3481
- }
3482
- } else {
3483
- peg$currPos = s2;
3484
- s2 = peg$c2;
3485
- }
3486
- } else {
3487
- peg$currPos = s2;
3488
- s2 = peg$c2;
3489
- }
3490
- if (s2 !== peg$FAILED) {
3491
- peg$reportedPos = s0;
3492
- s1 = peg$c120(s2);
3493
- s0 = s1;
3494
- } else {
3495
- peg$currPos = s0;
3496
- s0 = peg$c2;
3497
- }
3498
- } else {
3499
- peg$currPos = s0;
3500
- s0 = peg$c2;
3501
- }
3502
- }
3503
- peg$cache[key] = { nextPos: peg$currPos, result: s0 };
3504
- return s0;
3505
- }
3506
- var nodes = [];
3507
- function genError(err, line2, col) {
3508
- var ex = new Error(err);
3509
- ex.line = line2;
3510
- ex.column = col;
3511
- throw ex;
3512
- }
3513
- function addNode(node2) {
3514
- nodes.push(node2);
3515
- }
3516
- function node(type, value, line2, column2, key) {
3517
- var obj = { type, value, line: line2(), column: column2() };
3518
- if (key) obj.key = key;
3519
- return obj;
3520
- }
3521
- function convertCodePoint(str, line2, col) {
3522
- var num = parseInt("0x" + str);
3523
- if (!isFinite(num) || Math.floor(num) != num || num < 0 || num > 1114111 || num > 55295 && num < 57344) {
3524
- genError("Invalid Unicode escape code: " + str, line2, col);
3525
- } else {
3526
- return fromCodePoint(num);
3527
- }
3528
- }
3529
- function fromCodePoint() {
3530
- var MAX_SIZE = 16384;
3531
- var codeUnits = [];
3532
- var highSurrogate;
3533
- var lowSurrogate;
3534
- var index = -1;
3535
- var length = arguments.length;
3536
- if (!length) {
3537
- return "";
3538
- }
3539
- var result = "";
3540
- while (++index < length) {
3541
- var codePoint = Number(arguments[index]);
3542
- if (codePoint <= 65535) {
3543
- codeUnits.push(codePoint);
3544
- } else {
3545
- codePoint -= 65536;
3546
- highSurrogate = (codePoint >> 10) + 55296;
3547
- lowSurrogate = codePoint % 1024 + 56320;
3548
- codeUnits.push(highSurrogate, lowSurrogate);
3549
- }
3550
- if (index + 1 == length || codeUnits.length > MAX_SIZE) {
3551
- result += String.fromCharCode.apply(null, codeUnits);
3552
- codeUnits.length = 0;
3553
- }
3554
- }
3555
- return result;
3556
- }
3557
- peg$result = peg$startRuleFunction();
3558
- if (peg$result !== peg$FAILED && peg$currPos === input.length) {
3559
- return peg$result;
3560
- } else {
3561
- if (peg$result !== peg$FAILED && peg$currPos < input.length) {
3562
- peg$fail({ type: "end", description: "end of input" });
3563
- }
3564
- throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);
3565
- }
3566
- }
3567
- return {
3568
- SyntaxError,
3569
- parse
3570
- };
3571
- }();
3572
- }
3573
- });
3574
-
3575
- // ../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/lib/compiler.js
3576
- var require_compiler = __commonJS({
3577
- "../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/lib/compiler.js"(exports, module) {
3578
- "use strict";
3579
- function compile(nodes) {
3580
- var assignedPaths = [];
3581
- var valueAssignments = [];
3582
- var currentPath = "";
3583
- var data = /* @__PURE__ */ Object.create(null);
3584
- var context = data;
3585
- var arrayMode = false;
3586
- return reduce(nodes);
3587
- function reduce(nodes2) {
3588
- var node;
3589
- for (var i = 0; i < nodes2.length; i++) {
3590
- node = nodes2[i];
3591
- switch (node.type) {
3592
- case "Assign":
3593
- assign(node);
3594
- break;
3595
- case "ObjectPath":
3596
- setPath(node);
3597
- break;
3598
- case "ArrayPath":
3599
- addTableArray(node);
3600
- break;
3601
- }
3602
- }
3603
- return data;
3604
- }
3605
- function genError(err, line, col) {
3606
- var ex = new Error(err);
3607
- ex.line = line;
3608
- ex.column = col;
3609
- throw ex;
3610
- }
3611
- function assign(node) {
3612
- var key = node.key;
3613
- var value = node.value;
3614
- var line = node.line;
3615
- var column = node.column;
3616
- var fullPath;
3617
- if (currentPath) {
3618
- fullPath = currentPath + "." + key;
3619
- } else {
3620
- fullPath = key;
3621
- }
3622
- if (typeof context[key] !== "undefined") {
3623
- genError("Cannot redefine existing key '" + fullPath + "'.", line, column);
3624
- }
3625
- context[key] = reduceValueNode(value);
3626
- if (!pathAssigned(fullPath)) {
3627
- assignedPaths.push(fullPath);
3628
- valueAssignments.push(fullPath);
3629
- }
3630
- }
3631
- function pathAssigned(path2) {
3632
- return assignedPaths.indexOf(path2) !== -1;
3633
- }
3634
- function reduceValueNode(node) {
3635
- if (node.type === "Array") {
3636
- return reduceArrayWithTypeChecking(node.value);
3637
- } else if (node.type === "InlineTable") {
3638
- return reduceInlineTableNode(node.value);
3639
- } else {
3640
- return node.value;
3641
- }
3642
- }
3643
- function reduceInlineTableNode(values) {
3644
- var obj = /* @__PURE__ */ Object.create(null);
3645
- for (var i = 0; i < values.length; i++) {
3646
- var val = values[i];
3647
- if (val.value.type === "InlineTable") {
3648
- obj[val.key] = reduceInlineTableNode(val.value.value);
3649
- } else if (val.type === "InlineTableValue") {
3650
- obj[val.key] = reduceValueNode(val.value);
3651
- }
3652
- }
3653
- return obj;
3654
- }
3655
- function setPath(node) {
3656
- var path2 = node.value;
3657
- var quotedPath = path2.map(quoteDottedString).join(".");
3658
- var line = node.line;
3659
- var column = node.column;
3660
- if (pathAssigned(quotedPath)) {
3661
- genError("Cannot redefine existing key '" + path2 + "'.", line, column);
3662
- }
3663
- assignedPaths.push(quotedPath);
3664
- context = deepRef(data, path2, /* @__PURE__ */ Object.create(null), line, column);
3665
- currentPath = path2;
3666
- }
3667
- function addTableArray(node) {
3668
- var path2 = node.value;
3669
- var quotedPath = path2.map(quoteDottedString).join(".");
3670
- var line = node.line;
3671
- var column = node.column;
3672
- if (!pathAssigned(quotedPath)) {
3673
- assignedPaths.push(quotedPath);
3674
- }
3675
- assignedPaths = assignedPaths.filter(function(p) {
3676
- return p.indexOf(quotedPath) !== 0;
3677
- });
3678
- assignedPaths.push(quotedPath);
3679
- context = deepRef(data, path2, [], line, column);
3680
- currentPath = quotedPath;
3681
- if (context instanceof Array) {
3682
- var newObj = /* @__PURE__ */ Object.create(null);
3683
- context.push(newObj);
3684
- context = newObj;
3685
- } else {
3686
- genError("Cannot redefine existing key '" + path2 + "'.", line, column);
3687
- }
3688
- }
3689
- function deepRef(start, keys, value, line, column) {
3690
- var traversed = [];
3691
- var traversedPath = "";
3692
- var path2 = keys.join(".");
3693
- var ctx = start;
3694
- for (var i = 0; i < keys.length; i++) {
3695
- var key = keys[i];
3696
- traversed.push(key);
3697
- traversedPath = traversed.join(".");
3698
- if (typeof ctx[key] === "undefined") {
3699
- if (i === keys.length - 1) {
3700
- ctx[key] = value;
3701
- } else {
3702
- ctx[key] = /* @__PURE__ */ Object.create(null);
3703
- }
3704
- } else if (i !== keys.length - 1 && valueAssignments.indexOf(traversedPath) > -1) {
3705
- genError("Cannot redefine existing key '" + traversedPath + "'.", line, column);
3706
- }
3707
- ctx = ctx[key];
3708
- if (ctx instanceof Array && ctx.length && i < keys.length - 1) {
3709
- ctx = ctx[ctx.length - 1];
3710
- }
3711
- }
3712
- return ctx;
3713
- }
3714
- function reduceArrayWithTypeChecking(array) {
3715
- var firstType = null;
3716
- for (var i = 0; i < array.length; i++) {
3717
- var node = array[i];
3718
- if (firstType === null) {
3719
- firstType = node.type;
3720
- } else {
3721
- if (node.type !== firstType) {
3722
- genError("Cannot add value of type " + node.type + " to array of type " + firstType + ".", node.line, node.column);
3723
- }
3724
- }
3725
- }
3726
- return array.map(reduceValueNode);
3727
- }
3728
- function quoteDottedString(str) {
3729
- if (str.indexOf(".") > -1) {
3730
- return '"' + str + '"';
3731
- } else {
3732
- return str;
3733
- }
3734
- }
3735
- }
3736
- module.exports = {
3737
- compile
3738
- };
3739
- }
3740
- });
3741
-
3742
- // ../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/index.js
3743
- var require_toml = __commonJS({
3744
- "../../node_modules/.pnpm/toml@3.0.0/node_modules/toml/index.js"(exports, module) {
3745
- "use strict";
3746
- var parser = require_parser();
3747
- var compiler = require_compiler();
3748
- module.exports = {
3749
- parse: function(input) {
3750
- var nodes = parser.parse(input.toString());
3751
- return compiler.compile(nodes);
3752
- }
3753
- };
3754
- }
3755
- });
3756
-
3757
- // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js
3758
- var require_XDGAppPaths = __commonJS({
3759
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js"(exports) {
3760
- "use strict";
3761
- exports.__esModule = true;
3762
- exports.Adapt = void 0;
3763
- function isBoolean(t) {
3764
- return typeOf(t) === "boolean";
3765
- }
3766
- function isObject(t) {
3767
- return typeOf(t) === "object";
3768
- }
3769
- function isString(t) {
3770
- return typeOf(t) === "string";
3771
- }
3772
- function typeOf(t) {
3773
- return typeof t;
3774
- }
3775
- function Adapt(adapter_) {
3776
- var meta = adapter_.meta, path2 = adapter_.path, xdg = adapter_.xdg;
3777
- var XDGAppPaths_ = /* @__PURE__ */ function() {
3778
- function XDGAppPaths_2(options_) {
3779
- if (options_ === void 0) {
3780
- options_ = {};
3781
- }
3782
- var _a, _b, _c;
3783
- function XDGAppPaths(options2) {
3784
- if (options2 === void 0) {
3785
- options2 = {};
3786
- }
3787
- return new XDGAppPaths_2(options2);
3788
- }
3789
- var options = isObject(options_) ? options_ : { name: options_ };
3790
- var suffix = (_a = options.suffix) !== null && _a !== void 0 ? _a : "";
3791
- var isolated_ = (_b = options.isolated) !== null && _b !== void 0 ? _b : true;
3792
- var namePriorityList = [
3793
- options.name,
3794
- meta.pkgMainFilename(),
3795
- meta.mainFilename()
3796
- ];
3797
- var nameFallback = "$eval";
3798
- var name = path2.parse(((_c = namePriorityList.find(function(e) {
3799
- return isString(e);
3800
- })) !== null && _c !== void 0 ? _c : nameFallback) + suffix).name;
3801
- XDGAppPaths.$name = function $name() {
3802
- return name;
3803
- };
3804
- XDGAppPaths.$isolated = function $isolated() {
3805
- return isolated_;
3806
- };
3807
- function isIsolated(dirOptions) {
3808
- var _a2;
3809
- dirOptions = dirOptions !== null && dirOptions !== void 0 ? dirOptions : { isolated: isolated_ };
3810
- var isolated = isBoolean(dirOptions) ? dirOptions : (_a2 = dirOptions.isolated) !== null && _a2 !== void 0 ? _a2 : isolated_;
3811
- return isolated;
3812
- }
3813
- function finalPathSegment(dirOptions) {
3814
- return isIsolated(dirOptions) ? name : "";
3815
- }
3816
- XDGAppPaths.cache = function cache(dirOptions) {
3817
- return path2.join(xdg.cache(), finalPathSegment(dirOptions));
3818
- };
3819
- XDGAppPaths.config = function config(dirOptions) {
3820
- return path2.join(xdg.config(), finalPathSegment(dirOptions));
3821
- };
3822
- XDGAppPaths.data = function data(dirOptions) {
3823
- return path2.join(xdg.data(), finalPathSegment(dirOptions));
3824
- };
3825
- XDGAppPaths.runtime = function runtime(dirOptions) {
3826
- return xdg.runtime() ? path2.join(xdg.runtime(), finalPathSegment(dirOptions)) : void 0;
3827
- };
3828
- XDGAppPaths.state = function state(dirOptions) {
3829
- return path2.join(xdg.state(), finalPathSegment(dirOptions));
3830
- };
3831
- XDGAppPaths.configDirs = function configDirs(dirOptions) {
3832
- return xdg.configDirs().map(function(s) {
3833
- return path2.join(s, finalPathSegment(dirOptions));
3834
- });
3835
- };
3836
- XDGAppPaths.dataDirs = function dataDirs(dirOptions) {
3837
- return xdg.dataDirs().map(function(s) {
3838
- return path2.join(s, finalPathSegment(dirOptions));
3839
- });
3840
- };
3841
- return XDGAppPaths;
3842
- }
3843
- return XDGAppPaths_2;
3844
- }();
3845
- return { XDGAppPaths: new XDGAppPaths_() };
3846
- }
3847
- exports.Adapt = Adapt;
3848
- }
3849
- });
3850
-
3851
- // ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js
3852
- var require_XDG = __commonJS({
3853
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js"(exports) {
3854
- "use strict";
3855
- var __spreadArray = exports && exports.__spreadArray || function(to, from) {
3856
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
3857
- to[j] = from[i];
3858
- return to;
3859
- };
3860
- exports.__esModule = true;
3861
- exports.Adapt = void 0;
3862
- function Adapt(adapter_) {
3863
- var env = adapter_.env, osPaths = adapter_.osPaths, path2 = adapter_.path;
3864
- var isMacOS = /^darwin$/i.test(adapter_.process.platform);
3865
- var isWinOS = /^win/i.test(adapter_.process.platform);
3866
- function baseDir() {
3867
- return osPaths.home() || osPaths.temp();
3868
- }
3869
- function valOrPath(val, pathSegments) {
3870
- return val || path2.join.apply(path2, pathSegments);
3871
- }
3872
- var linux = function() {
3873
- var cache = function() {
3874
- return valOrPath(env.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
3875
- };
3876
- var config = function() {
3877
- return valOrPath(env.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
3878
- };
3879
- var data = function() {
3880
- return valOrPath(env.get("XDG_DATA_HOME"), [baseDir(), ".local", "share"]);
3881
- };
3882
- var runtime = function() {
3883
- return env.get("XDG_RUNTIME_DIR") || void 0;
3884
- };
3885
- var state = function() {
3886
- return valOrPath(env.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
3887
- };
3888
- return { cache, config, data, runtime, state };
3889
- };
3890
- var macos = function() {
3891
- var cache = function() {
3892
- return valOrPath(env.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
3893
- };
3894
- var config = function() {
3895
- return valOrPath(env.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
3896
- };
3897
- var data = function() {
3898
- return valOrPath(env.get("XDG_DATA_HOME"), [baseDir(), "Library", "Application Support"]);
3899
- };
3900
- var runtime = function() {
3901
- return env.get("XDG_RUNTIME_DIR") || void 0;
3902
- };
3903
- var state = function() {
3904
- return valOrPath(env.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
3905
- };
3906
- return { cache, config, data, runtime, state };
3907
- };
3908
- var windows = function() {
3909
- function appData() {
3910
- return valOrPath(env.get("APPDATA"), [baseDir(), "AppData", "Roaming"]);
3911
- }
3912
- function localAppData() {
3913
- return valOrPath(env.get("LOCALAPPDATA"), [baseDir(), "AppData", "Local"]);
3914
- }
3915
- var cache = function() {
3916
- return valOrPath(env.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
3917
- };
3918
- var config = function() {
3919
- return valOrPath(env.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
3920
- };
3921
- var data = function() {
3922
- return valOrPath(env.get("XDG_DATA_HOME"), [appData(), "xdg.data"]);
3923
- };
3924
- var runtime = function() {
3925
- return env.get("XDG_RUNTIME_DIR") || void 0;
3926
- };
3927
- var state = function() {
3928
- return valOrPath(env.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
3929
- };
3930
- return { cache, config, data, runtime, state };
3931
- };
3932
- var XDG_ = /* @__PURE__ */ function() {
3933
- function XDG_2() {
3934
- function XDG() {
3935
- return new XDG_2();
3936
- }
3937
- var extension = isMacOS ? macos() : isWinOS ? windows() : linux();
3938
- XDG.cache = extension.cache;
3939
- XDG.config = extension.config;
3940
- XDG.data = extension.data;
3941
- XDG.runtime = extension.runtime;
3942
- XDG.state = extension.state;
3943
- XDG.configDirs = function configDirs() {
3944
- var pathList = env.get("XDG_CONFIG_DIRS");
3945
- return __spreadArray([extension.config()], pathList ? pathList.split(path2.delimiter) : []);
3946
- };
3947
- XDG.dataDirs = function dataDirs() {
3948
- var pathList = env.get("XDG_DATA_DIRS");
3949
- return __spreadArray([extension.data()], pathList ? pathList.split(path2.delimiter) : []);
3950
- };
3951
- return XDG;
3952
- }
3953
- return XDG_2;
3954
- }();
3955
- return { XDG: new XDG_() };
3956
- }
3957
- exports.Adapt = Adapt;
3958
- }
3959
- });
3960
-
3961
- // ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js
3962
- var require_OSPaths = __commonJS({
3963
- "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js"(exports) {
3964
- "use strict";
3965
- var __spreadArray = exports && exports.__spreadArray || function(to, from) {
3966
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
3967
- to[j] = from[i];
3968
- return to;
3969
- };
3970
- exports.__esModule = true;
3971
- exports.Adapt = void 0;
3972
- function isEmpty(s) {
3973
- return !s;
3974
- }
3975
- function Adapt(adapter_) {
3976
- var env = adapter_.env, os2 = adapter_.os, path2 = adapter_.path;
3977
- var isWinOS = /^win/i.test(adapter_.process.platform);
3978
- function normalizePath(path_) {
3979
- return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
3980
- }
3981
- function home() {
3982
- var posix = function() {
3983
- return normalizePath((typeof os2.homedir === "function" ? os2.homedir() : void 0) || env.get("HOME"));
3984
- };
3985
- var windows = function() {
3986
- var priorityList = [
3987
- typeof os2.homedir === "function" ? os2.homedir() : void 0,
3988
- env.get("USERPROFILE"),
3989
- env.get("HOME"),
3990
- env.get("HOMEDRIVE") || env.get("HOMEPATH") ? path2.join(env.get("HOMEDRIVE") || "", env.get("HOMEPATH") || "") : void 0
3991
- ];
3992
- return normalizePath(priorityList.find(function(v) {
3993
- return !isEmpty(v);
3994
- }));
3995
- };
3996
- return isWinOS ? windows() : posix();
3997
- }
3998
- function temp() {
3999
- function joinPathToBase(base, segments) {
4000
- return base ? path2.join.apply(path2, __spreadArray([base], segments)) : void 0;
4001
- }
4002
- function posix() {
4003
- var fallback = "/tmp";
4004
- var priorityList = [
4005
- typeof os2.tmpdir === "function" ? os2.tmpdir() : void 0,
4006
- env.get("TMPDIR"),
4007
- env.get("TEMP"),
4008
- env.get("TMP")
4009
- ];
4010
- return normalizePath(priorityList.find(function(v) {
4011
- return !isEmpty(v);
4012
- })) || fallback;
4013
- }
4014
- function windows() {
4015
- var fallback = "C:\\Temp";
4016
- var priorityListLazy = [
4017
- typeof os2.tmpdir === "function" ? os2.tmpdir : function() {
4018
- return void 0;
4019
- },
4020
- function() {
4021
- return env.get("TEMP");
4022
- },
4023
- function() {
4024
- return env.get("TMP");
4025
- },
4026
- function() {
4027
- return joinPathToBase(env.get("LOCALAPPDATA"), ["Temp"]);
4028
- },
4029
- function() {
4030
- return joinPathToBase(home(), ["AppData", "Local", "Temp"]);
4031
- },
4032
- function() {
4033
- return joinPathToBase(env.get("ALLUSERSPROFILE"), ["Temp"]);
4034
- },
4035
- function() {
4036
- return joinPathToBase(env.get("SystemRoot"), ["Temp"]);
4037
- },
4038
- function() {
4039
- return joinPathToBase(env.get("windir"), ["Temp"]);
4040
- },
4041
- function() {
4042
- return joinPathToBase(env.get("SystemDrive"), ["\\", "Temp"]);
4043
- }
4044
- ];
4045
- var v = priorityListLazy.find(function(v2) {
4046
- return v2 && !isEmpty(v2());
4047
- });
4048
- return v && normalizePath(v()) || fallback;
4049
- }
4050
- return isWinOS ? windows() : posix();
4051
- }
4052
- var OSPaths_ = /* @__PURE__ */ function() {
4053
- function OSPaths_2() {
4054
- function OSPaths() {
4055
- return new OSPaths_2();
4056
- }
4057
- OSPaths.home = home;
4058
- OSPaths.temp = temp;
4059
- return OSPaths;
4060
- }
4061
- return OSPaths_2;
4062
- }();
4063
- return { OSPaths: new OSPaths_() };
4064
- }
4065
- exports.Adapt = Adapt;
4066
- }
4067
- });
4068
-
4069
- // ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js
4070
- var require_node = __commonJS({
4071
- "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js"(exports) {
4072
- "use strict";
4073
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
4074
- if (k2 === void 0) k2 = k;
4075
- Object.defineProperty(o, k2, { enumerable: true, get: function() {
4076
- return m[k];
4077
- } });
4078
- } : function(o, m, k, k2) {
4079
- if (k2 === void 0) k2 = k;
4080
- o[k2] = m[k];
4081
- });
4082
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
4083
- Object.defineProperty(o, "default", { enumerable: true, value: v });
4084
- } : function(o, v) {
4085
- o["default"] = v;
4086
- });
4087
- var __importStar = exports && exports.__importStar || function(mod) {
4088
- if (mod && mod.__esModule) return mod;
4089
- var result = {};
4090
- if (mod != null) {
4091
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4092
- }
4093
- __setModuleDefault(result, mod);
4094
- return result;
4095
- };
4096
- exports.__esModule = true;
4097
- exports.adapter = void 0;
4098
- var os2 = __importStar(__require("os"));
4099
- var path2 = __importStar(__require("path"));
4100
- exports.adapter = {
4101
- atImportPermissions: { env: true },
4102
- env: {
4103
- get: function(s) {
4104
- return process.env[s];
4105
- }
4106
- },
4107
- os: os2,
4108
- path: path2,
4109
- process
4110
- };
4111
- }
4112
- });
4113
-
4114
- // ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js
4115
- var require_mod_cjs = __commonJS({
4116
- "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js"(exports, module) {
4117
- "use strict";
4118
- var OSPaths_js_1 = require_OSPaths();
4119
- var node_js_1 = require_node();
4120
- module.exports = OSPaths_js_1.Adapt(node_js_1.adapter).OSPaths;
4121
- }
4122
- });
4123
-
4124
- // ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js
4125
- var require_node2 = __commonJS({
4126
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js"(exports) {
4127
- "use strict";
4128
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
4129
- if (k2 === void 0) k2 = k;
4130
- Object.defineProperty(o, k2, { enumerable: true, get: function() {
4131
- return m[k];
4132
- } });
4133
- } : function(o, m, k, k2) {
4134
- if (k2 === void 0) k2 = k;
4135
- o[k2] = m[k];
4136
- });
4137
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
4138
- Object.defineProperty(o, "default", { enumerable: true, value: v });
4139
- } : function(o, v) {
4140
- o["default"] = v;
4141
- });
4142
- var __importStar = exports && exports.__importStar || function(mod) {
4143
- if (mod && mod.__esModule) return mod;
4144
- var result = {};
4145
- if (mod != null) {
4146
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4147
- }
4148
- __setModuleDefault(result, mod);
4149
- return result;
4150
- };
4151
- var __importDefault = exports && exports.__importDefault || function(mod) {
4152
- return mod && mod.__esModule ? mod : { "default": mod };
4153
- };
4154
- exports.__esModule = true;
4155
- exports.adapter = void 0;
4156
- var path2 = __importStar(__require("path"));
4157
- var os_paths_1 = __importDefault(require_mod_cjs());
4158
- exports.adapter = {
4159
- atImportPermissions: { env: true },
4160
- env: {
4161
- get: function(s) {
4162
- return process.env[s];
4163
- }
4164
- },
4165
- osPaths: os_paths_1["default"],
4166
- path: path2,
4167
- process
4168
- };
4169
- }
4170
- });
4171
-
4172
- // ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js
4173
- var require_mod_cjs2 = __commonJS({
4174
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js"(exports, module) {
4175
- "use strict";
4176
- var XDG_js_1 = require_XDG();
4177
- var node_js_1 = require_node2();
4178
- module.exports = XDG_js_1.Adapt(node_js_1.adapter).XDG;
4179
- }
4180
- });
4181
-
4182
- // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js
4183
- var require_node3 = __commonJS({
4184
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js"(exports) {
4185
- "use strict";
4186
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
4187
- if (k2 === void 0) k2 = k;
4188
- Object.defineProperty(o, k2, { enumerable: true, get: function() {
4189
- return m[k];
4190
- } });
4191
- } : function(o, m, k, k2) {
4192
- if (k2 === void 0) k2 = k;
4193
- o[k2] = m[k];
4194
- });
4195
- var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
4196
- Object.defineProperty(o, "default", { enumerable: true, value: v });
4197
- } : function(o, v) {
4198
- o["default"] = v;
4199
- });
4200
- var __importStar = exports && exports.__importStar || function(mod) {
4201
- if (mod && mod.__esModule) return mod;
4202
- var result = {};
4203
- if (mod != null) {
4204
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
4205
- }
4206
- __setModuleDefault(result, mod);
4207
- return result;
4208
- };
4209
- var __importDefault = exports && exports.__importDefault || function(mod) {
4210
- return mod && mod.__esModule ? mod : { "default": mod };
4211
- };
4212
- exports.__esModule = true;
4213
- exports.adapter = void 0;
4214
- var path2 = __importStar(__require("path"));
4215
- var xdg_portable_1 = __importDefault(require_mod_cjs2());
4216
- exports.adapter = {
4217
- atImportPermissions: { env: true, read: true },
4218
- meta: {
4219
- mainFilename: function() {
4220
- var requireMain = typeof __require !== "undefined" && __require !== null && __require.main ? __require.main : { filename: void 0 };
4221
- var requireMainFilename = requireMain.filename;
4222
- var filename = (requireMainFilename !== process.execArgv[0] ? requireMainFilename : void 0) || (typeof process._eval === "undefined" ? process.argv[1] : void 0);
4223
- return filename;
4224
- },
4225
- pkgMainFilename: function() {
4226
- return process.pkg ? process.execPath : void 0;
4227
- }
4228
- },
4229
- path: path2,
4230
- process,
4231
- xdg: xdg_portable_1["default"]
4232
- };
4233
- }
4234
- });
4235
-
4236
- // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js
4237
- var require_mod_cjs3 = __commonJS({
4238
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js"(exports, module) {
4239
- "use strict";
4240
- var XDGAppPaths_js_1 = require_XDGAppPaths();
4241
- var node_js_1 = require_node3();
4242
- module.exports = XDGAppPaths_js_1.Adapt(node_js_1.adapter).XDGAppPaths;
4243
- }
4244
- });
4245
-
4246
- // src/utils/getWranglerLoginAuthToken.ts
4247
- var import_toml = __toESM(require_toml(), 1);
4248
- import fs from "fs";
4249
- import os from "os";
4250
- import path from "path";
4251
-
4252
- // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/esm-wrapper/mod.esm.js
4253
- var mod_esm_exports = {};
4254
- __export(mod_esm_exports, {
4255
- default: () => mod_esm_default
4256
- });
4257
- var import_mod_cjs = __toESM(require_mod_cjs3(), 1);
4258
- __reExport(mod_esm_exports, __toESM(require_mod_cjs3(), 1));
4259
- var mod_esm_default = import_mod_cjs.default;
4260
-
4261
- // src/utils/getWranglerLoginAuthToken.ts
4262
- var isDirectory = (configPath) => {
4263
- try {
4264
- return fs.statSync(configPath).isDirectory();
4265
- } catch (error) {
4266
- return false;
4267
- }
4268
- };
4269
- var getGlobalWranglerConfigPath = () => {
4270
- const configDir = mod_esm_default(".wrangler").config();
4271
- const legacyConfigDir = path.join(os.homedir(), ".wrangler");
4272
- if (isDirectory(legacyConfigDir)) {
4273
- return legacyConfigDir;
4274
- }
4275
- return configDir;
4276
- };
4277
- var getWranglerLoginAuthToken = () => {
4278
- try {
4279
- const wranglerConfigPath = getGlobalWranglerConfigPath();
4280
- const wranglerConfig = fs.readFileSync(
4281
- path.join(wranglerConfigPath, "config", "default.toml"),
4282
- "utf8"
4283
- );
4284
- return import_toml.default.parse(wranglerConfig);
4285
- } catch (error) {
4286
- return null;
4287
- }
4288
- };
4289
-
4290
- // src/utils/index.ts
4291
- import { Cloudflare } from "cloudflare";
4292
- export {
4293
- Cloudflare,
4294
- createWrangler,
4295
- getWranglerLoginAuthToken
4296
- };