Fix error that occurs when parsing TOML files that use dotted keys (#444)

190c3a5 · Mitchell Henke · 2026-03-30 09:53

5 files +1137 -4080
Message
{commit_body(@commit)}

Files changed

modified dist/index.js
+1131 −4069
@@ -19925,4072 +19925,6 @@ const validRange = (range, options) => {
19925 19925 module.exports = validRange
19926 19926
19927 19927
19928 /***/ }),
19929
19930 /***/ 2132:
19931 /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
19932
19933 var parser = __nccwpck_require__(4613);
19934 var compiler = __nccwpck_require__(4763);
19935
19936 module.exports = {
19937 parse: function(input) {
19938 var nodes = parser.parse(input.toString());
19939 return compiler.compile(nodes);
19940 }
19941 };
19942
19943
19944 /***/ }),
19945
19946 /***/ 4763:
19947 /***/ ((module) => {
19948
19949
19950 function compile(nodes) {
19951 var assignedPaths = [];
19952 var valueAssignments = [];
19953 var currentPath = "";
19954 var data = Object.create(null);
19955 var context = data;
19956 var arrayMode = false;
19957
19958 return reduce(nodes);
19959
19960 function reduce(nodes) {
19961 var node;
19962 for (var i = 0; i < nodes.length; i++) {
19963 node = nodes[i];
19964 switch (node.type) {
19965 case "Assign":
19966 assign(node);
19967 break;
19968 case "ObjectPath":
19969 setPath(node);
19970 break;
19971 case "ArrayPath":
19972 addTableArray(node);
19973 break;
19974 }
19975 }
19976
19977 return data;
19978 }
19979
19980 function genError(err, line, col) {
19981 var ex = new Error(err);
19982 ex.line = line;
19983 ex.column = col;
19984 throw ex;
19985 }
19986
19987 function assign(node) {
19988 var key = node.key;
19989 var value = node.value;
19990 var line = node.line;
19991 var column = node.column;
19992
19993 var fullPath;
19994 if (currentPath) {
19995 fullPath = currentPath + "." + key;
19996 } else {
19997 fullPath = key;
19998 }
19999 if (typeof context[key] !== "undefined") {
20000 genError("Cannot redefine existing key '" + fullPath + "'.", line, column);
20001 }
20002
20003 context[key] = reduceValueNode(value);
20004
20005 if (!pathAssigned(fullPath)) {
20006 assignedPaths.push(fullPath);
20007 valueAssignments.push(fullPath);
20008 }
20009 }
20010
20011
20012 function pathAssigned(path) {
20013 return assignedPaths.indexOf(path) !== -1;
20014 }
20015
20016 function reduceValueNode(node) {
20017 if (node.type === "Array") {
20018 return reduceArrayWithTypeChecking(node.value);
20019 } else if (node.type === "InlineTable") {
20020 return reduceInlineTableNode(node.value);
20021 } else {
20022 return node.value;
20023 }
20024 }
20025
20026 function reduceInlineTableNode(values) {
20027 var obj = Object.create(null);
20028 for (var i = 0; i < values.length; i++) {
20029 var val = values[i];
20030 if (val.value.type === "InlineTable") {
20031 obj[val.key] = reduceInlineTableNode(val.value.value);
20032 } else if (val.type === "InlineTableValue") {
20033 obj[val.key] = reduceValueNode(val.value);
20034 }
20035 }
20036
20037 return obj;
20038 }
20039
20040 function setPath(node) {
20041 var path = node.value;
20042 var quotedPath = path.map(quoteDottedString).join(".");
20043 var line = node.line;
20044 var column = node.column;
20045
20046 if (pathAssigned(quotedPath)) {
20047 genError("Cannot redefine existing key '" + path + "'.", line, column);
20048 }
20049 assignedPaths.push(quotedPath);
20050 context = deepRef(data, path, Object.create(null), line, column);
20051 currentPath = path;
20052 }
20053
20054 function addTableArray(node) {
20055 var path = node.value;
20056 var quotedPath = path.map(quoteDottedString).join(".");
20057 var line = node.line;
20058 var column = node.column;
20059
20060 if (!pathAssigned(quotedPath)) {
20061 assignedPaths.push(quotedPath);
20062 }
20063 assignedPaths = assignedPaths.filter(function(p) {
20064 return p.indexOf(quotedPath) !== 0;
20065 });
20066 assignedPaths.push(quotedPath);
20067 context = deepRef(data, path, [], line, column);
20068 currentPath = quotedPath;
20069
20070 if (context instanceof Array) {
20071 var newObj = Object.create(null);
20072 context.push(newObj);
20073 context = newObj;
20074 } else {
20075 genError("Cannot redefine existing key '" + path + "'.", line, column);
20076 }
20077 }
20078
20079 // Given a path 'a.b.c', create (as necessary) `start.a`,
20080 // `start.a.b`, and `start.a.b.c`, assigning `value` to `start.a.b.c`.
20081 // If `a` or `b` are arrays and have items in them, the last item in the
20082 // array is used as the context for the next sub-path.
20083 function deepRef(start, keys, value, line, column) {
20084 var traversed = [];
20085 var traversedPath = "";
20086 var path = keys.join(".");
20087 var ctx = start;
20088
20089 for (var i = 0; i < keys.length; i++) {
20090 var key = keys[i];
20091 traversed.push(key);
20092 traversedPath = traversed.join(".");
20093 if (typeof ctx[key] === "undefined") {
20094 if (i === keys.length - 1) {
20095 ctx[key] = value;
20096 } else {
20097 ctx[key] = Object.create(null);
20098 }
20099 } else if (i !== keys.length - 1 && valueAssignments.indexOf(traversedPath) > -1) {
20100 // already a non-object value at key, can't be used as part of a new path
20101 genError("Cannot redefine existing key '" + traversedPath + "'.", line, column);
20102 }
20103
20104 ctx = ctx[key];
20105 if (ctx instanceof Array && ctx.length && i < keys.length - 1) {
20106 ctx = ctx[ctx.length - 1];
20107 }
20108 }
20109
20110 return ctx;
20111 }
20112
20113 function reduceArrayWithTypeChecking(array) {
20114 // Ensure that all items in the array are of the same type
20115 var firstType = null;
20116 for (var i = 0; i < array.length; i++) {
20117 var node = array[i];
20118 if (firstType === null) {
20119 firstType = node.type;
20120 } else {
20121 if (node.type !== firstType) {
20122 genError("Cannot add value of type " + node.type + " to array of type " +
20123 firstType + ".", node.line, node.column);
20124 }
20125 }
20126 }
20127
20128 // Recursively reduce array of nodes into array of the nodes' values
20129 return array.map(reduceValueNode);
20130 }
20131
20132 function quoteDottedString(str) {
20133 if (str.indexOf(".") > -1) {
20134 return "\"" + str + "\"";
20135 } else {
20136 return str;
20137 }
20138 }
20139 }
20140
20141 module.exports = {
20142 compile: compile
20143 };
20144
20145
20146 /***/ }),
20147
20148 /***/ 4613:
20149 /***/ ((module) => {
20150
20151 module.exports = (function() {
20152 /*
20153 * Generated by PEG.js 0.8.0.
20154 *
20155 * http://pegjs.majda.cz/
20156 */
20157
20158 function peg$subclass(child, parent) {
20159 function ctor() { this.constructor = child; }
20160 ctor.prototype = parent.prototype;
20161 child.prototype = new ctor();
20162 }
20163
20164 function SyntaxError(message, expected, found, offset, line, column) {
20165 this.message = message;
20166 this.expected = expected;
20167 this.found = found;
20168 this.offset = offset;
20169 this.line = line;
20170 this.column = column;
20171
20172 this.name = "SyntaxError";
20173 }
20174
20175 peg$subclass(SyntaxError, Error);
20176
20177 function parse(input) {
20178 var options = arguments.length > 1 ? arguments[1] : {},
20179
20180 peg$FAILED = {},
20181
20182 peg$startRuleFunctions = { start: peg$parsestart },
20183 peg$startRuleFunction = peg$parsestart,
20184
20185 peg$c0 = [],
20186 peg$c1 = function() { return nodes },
20187 peg$c2 = peg$FAILED,
20188 peg$c3 = "#",
20189 peg$c4 = { type: "literal", value: "#", description: "\"#\"" },
20190 peg$c5 = void 0,
20191 peg$c6 = { type: "any", description: "any character" },
20192 peg$c7 = "[",
20193 peg$c8 = { type: "literal", value: "[", description: "\"[\"" },
20194 peg$c9 = "]",
20195 peg$c10 = { type: "literal", value: "]", description: "\"]\"" },
20196 peg$c11 = function(name) { addNode(node('ObjectPath', name, line, column)) },
20197 peg$c12 = function(name) { addNode(node('ArrayPath', name, line, column)) },
20198 peg$c13 = function(parts, name) { return parts.concat(name) },
20199 peg$c14 = function(name) { return [name] },
20200 peg$c15 = function(name) { return name },
20201 peg$c16 = ".",
20202 peg$c17 = { type: "literal", value: ".", description: "\".\"" },
20203 peg$c18 = "=",
20204 peg$c19 = { type: "literal", value: "=", description: "\"=\"" },
20205 peg$c20 = function(key, value) { addNode(node('Assign', value, line, column, key)) },
20206 peg$c21 = function(chars) { return chars.join('') },
20207 peg$c22 = function(node) { return node.value },
20208 peg$c23 = "\"\"\"",
20209 peg$c24 = { type: "literal", value: "\"\"\"", description: "\"\\\"\\\"\\\"\"" },
20210 peg$c25 = null,
20211 peg$c26 = function(chars) { return node('String', chars.join(''), line, column) },
20212 peg$c27 = "\"",
20213 peg$c28 = { type: "literal", value: "\"", description: "\"\\\"\"" },
20214 peg$c29 = "'''",
20215 peg$c30 = { type: "literal", value: "'''", description: "\"'''\"" },
20216 peg$c31 = "'",
20217 peg$c32 = { type: "literal", value: "'", description: "\"'\"" },
20218 peg$c33 = function(char) { return char },
20219 peg$c34 = function(char) { return char},
20220 peg$c35 = "\\",
20221 peg$c36 = { type: "literal", value: "\\", description: "\"\\\\\"" },
20222 peg$c37 = function() { return '' },
20223 peg$c38 = "e",
20224 peg$c39 = { type: "literal", value: "e", description: "\"e\"" },
20225 peg$c40 = "E",
20226 peg$c41 = { type: "literal", value: "E", description: "\"E\"" },
20227 peg$c42 = function(left, right) { return node('Float', parseFloat(left + 'e' + right), line, column) },
20228 peg$c43 = function(text) { return node('Float', parseFloat(text), line, column) },
20229 peg$c44 = "+",
20230 peg$c45 = { type: "literal", value: "+", description: "\"+\"" },
20231 peg$c46 = function(digits) { return digits.join('') },
20232 peg$c47 = "-",
20233 peg$c48 = { type: "literal", value: "-", description: "\"-\"" },
20234 peg$c49 = function(digits) { return '-' + digits.join('') },
20235 peg$c50 = function(text) { return node('Integer', parseInt(text, 10), line, column) },
20236 peg$c51 = "true",
20237 peg$c52 = { type: "literal", value: "true", description: "\"true\"" },
20238 peg$c53 = function() { return node('Boolean', true, line, column) },
20239 peg$c54 = "false",
20240 peg$c55 = { type: "literal", value: "false", description: "\"false\"" },
20241 peg$c56 = function() { return node('Boolean', false, line, column) },
20242 peg$c57 = function() { return node('Array', [], line, column) },
20243 peg$c58 = function(value) { return node('Array', value ? [value] : [], line, column) },
20244 peg$c59 = function(values) { return node('Array', values, line, column) },
20245 peg$c60 = function(values, value) { return node('Array', values.concat(value), line, column) },
20246 peg$c61 = function(value) { return value },
20247 peg$c62 = ",",
20248 peg$c63 = { type: "literal", value: ",", description: "\",\"" },
20249 peg$c64 = "{",
20250 peg$c65 = { type: "literal", value: "{", description: "\"{\"" },
20251 peg$c66 = "}",
20252 peg$c67 = { type: "literal", value: "}", description: "\"}\"" },
20253 peg$c68 = function(values) { return node('InlineTable', values, line, column) },
20254 peg$c69 = function(key, value) { return node('InlineTableValue', value, line, column, key) },
20255 peg$c70 = function(digits) { return "." + digits },
20256 peg$c71 = function(date) { return date.join('') },
20257 peg$c72 = ":",
20258 peg$c73 = { type: "literal", value: ":", description: "\":\"" },
20259 peg$c74 = function(time) { return time.join('') },
20260 peg$c75 = "T",
20261 peg$c76 = { type: "literal", value: "T", description: "\"T\"" },
20262 peg$c77 = "Z",
20263 peg$c78 = { type: "literal", value: "Z", description: "\"Z\"" },
20264 peg$c79 = function(date, time) { return node('Date', new Date(date + "T" + time + "Z"), line, column) },
20265 peg$c80 = function(date, time) { return node('Date', new Date(date + "T" + time), line, column) },
20266 peg$c81 = /^[ \t]/,
20267 peg$c82 = { type: "class", value: "[ \\t]", description: "[ \\t]" },
20268 peg$c83 = "\n",
20269 peg$c84 = { type: "literal", value: "\n", description: "\"\\n\"" },
20270 peg$c85 = "\r",
20271 peg$c86 = { type: "literal", value: "\r", description: "\"\\r\"" },
20272 peg$c87 = /^[0-9a-f]/i,
20273 peg$c88 = { type: "class", value: "[0-9a-f]i", description: "[0-9a-f]i" },
20274 peg$c89 = /^[0-9]/,
20275 peg$c90 = { type: "class", value: "[0-9]", description: "[0-9]" },
20276 peg$c91 = "_",
20277 peg$c92 = { type: "literal", value: "_", description: "\"_\"" },
20278 peg$c93 = function() { return "" },
20279 peg$c94 = /^[A-Za-z0-9_\-]/,
20280 peg$c95 = { type: "class", value: "[A-Za-z0-9_\\-]", description: "[A-Za-z0-9_\\-]" },
20281 peg$c96 = function(d) { return d.join('') },
20282 peg$c97 = "\\\"",
20283 peg$c98 = { type: "literal", value: "\\\"", description: "\"\\\\\\\"\"" },
20284 peg$c99 = function() { return '"' },
20285 peg$c100 = "\\\\",
20286 peg$c101 = { type: "literal", value: "\\\\", description: "\"\\\\\\\\\"" },
20287 peg$c102 = function() { return '\\' },
20288 peg$c103 = "\\b",
20289 peg$c104 = { type: "literal", value: "\\b", description: "\"\\\\b\"" },
20290 peg$c105 = function() { return '\b' },
20291 peg$c106 = "\\t",
20292 peg$c107 = { type: "literal", value: "\\t", description: "\"\\\\t\"" },
20293 peg$c108 = function() { return '\t' },
20294 peg$c109 = "\\n",
20295 peg$c110 = { type: "literal", value: "\\n", description: "\"\\\\n\"" },
20296 peg$c111 = function() { return '\n' },
20297 peg$c112 = "\\f",
20298 peg$c113 = { type: "literal", value: "\\f", description: "\"\\\\f\"" },
20299 peg$c114 = function() { return '\f' },
20300 peg$c115 = "\\r",
20301 peg$c116 = { type: "literal", value: "\\r", description: "\"\\\\r\"" },
20302 peg$c117 = function() { return '\r' },
20303 peg$c118 = "\\U",
20304 peg$c119 = { type: "literal", value: "\\U", description: "\"\\\\U\"" },
20305 peg$c120 = function(digits) { return convertCodePoint(digits.join('')) },
20306 peg$c121 = "\\u",
20307 peg$c122 = { type: "literal", value: "\\u", description: "\"\\\\u\"" },
20308
20309 peg$currPos = 0,
20310 peg$reportedPos = 0,
20311 peg$cachedPos = 0,
20312 peg$cachedPosDetails = { line: 1, column: 1, seenCR: false },
20313 peg$maxFailPos = 0,
20314 peg$maxFailExpected = [],
20315 peg$silentFails = 0,
20316
20317 peg$cache = {},
20318 peg$result;
20319
20320 if ("startRule" in options) {
20321 if (!(options.startRule in peg$startRuleFunctions)) {
20322 throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
20323 }
20324
20325 peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
20326 }
20327
20328 function text() {
20329 return input.substring(peg$reportedPos, peg$currPos);
20330 }
20331
20332 function offset() {
20333 return peg$reportedPos;
20334 }
20335
20336 function line() {
20337 return peg$computePosDetails(peg$reportedPos).line;
20338 }
20339
20340 function column() {
20341 return peg$computePosDetails(peg$reportedPos).column;
20342 }
20343
20344 function expected(description) {
20345 throw peg$buildException(
20346 null,
20347 [{ type: "other", description: description }],
20348 peg$reportedPos
20349 );
20350 }
20351
20352 function error(message) {
20353 throw peg$buildException(message, null, peg$reportedPos);
20354 }
20355
20356 function peg$computePosDetails(pos) {
20357 function advance(details, startPos, endPos) {
20358 var p, ch;
20359
20360 for (p = startPos; p < endPos; p++) {
20361 ch = input.charAt(p);
20362 if (ch === "\n") {
20363 if (!details.seenCR) { details.line++; }
20364 details.column = 1;
20365 details.seenCR = false;
20366 } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") {
20367 details.line++;
20368 details.column = 1;
20369 details.seenCR = true;
20370 } else {
20371 details.column++;
20372 details.seenCR = false;
20373 }
20374 }
20375 }
20376
20377 if (peg$cachedPos !== pos) {
20378 if (peg$cachedPos > pos) {
20379 peg$cachedPos = 0;
20380 peg$cachedPosDetails = { line: 1, column: 1, seenCR: false };
20381 }
20382 advance(peg$cachedPosDetails, peg$cachedPos, pos);
20383 peg$cachedPos = pos;
20384 }
20385
20386 return peg$cachedPosDetails;
20387 }
20388
20389 function peg$fail(expected) {
20390 if (peg$currPos < peg$maxFailPos) { return; }
20391
20392 if (peg$currPos > peg$maxFailPos) {
20393 peg$maxFailPos = peg$currPos;
20394 peg$maxFailExpected = [];
20395 }
20396
20397 peg$maxFailExpected.push(expected);
20398 }
20399
20400 function peg$buildException(message, expected, pos) {
20401 function cleanupExpected(expected) {
20402 var i = 1;
20403
20404 expected.sort(function(a, b) {
20405 if (a.description < b.description) {
20406 return -1;
20407 } else if (a.description > b.description) {
20408 return 1;
20409 } else {
20410 return 0;
20411 }
20412 });
20413
20414 while (i < expected.length) {
20415 if (expected[i - 1] === expected[i]) {
20416 expected.splice(i, 1);
20417 } else {
20418 i++;
20419 }
20420 }
20421 }
20422
20423 function buildMessage(expected, found) {
20424 function stringEscape(s) {
20425 function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }
20426
20427 return s
20428 .replace(/\\/g, '\\\\')
20429 .replace(/"/g, '\\"')
20430 .replace(/\x08/g, '\\b')
20431 .replace(/\t/g, '\\t')
20432 .replace(/\n/g, '\\n')
20433 .replace(/\f/g, '\\f')
20434 .replace(/\r/g, '\\r')
20435 .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
20436 .replace(/[\x10-\x1F\x80-\xFF]/g, function(ch) { return '\\x' + hex(ch); })
20437 .replace(/[\u0180-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); })
20438 .replace(/[\u1080-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); });
20439 }
20440
20441 var expectedDescs = new Array(expected.length),
20442 expectedDesc, foundDesc, i;
20443
20444 for (i = 0; i < expected.length; i++) {
20445 expectedDescs[i] = expected[i].description;
20446 }
20447
20448 expectedDesc = expected.length > 1
20449 ? expectedDescs.slice(0, -1).join(", ")
20450 + " or "
20451 + expectedDescs[expected.length - 1]
20452 : expectedDescs[0];
20453
20454 foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input";
20455
20456 return "Expected " + expectedDesc + " but " + foundDesc + " found.";
20457 }
20458
20459 var posDetails = peg$computePosDetails(pos),
20460 found = pos < input.length ? input.charAt(pos) : null;
20461
20462 if (expected !== null) {
20463 cleanupExpected(expected);
20464 }
20465
20466 return new SyntaxError(
20467 message !== null ? message : buildMessage(expected, found),
20468 expected,
20469 found,
20470 pos,
20471 posDetails.line,
20472 posDetails.column
20473 );
20474 }
20475
20476 function peg$parsestart() {
20477 var s0, s1, s2;
20478
20479 var key = peg$currPos * 49 + 0,
20480 cached = peg$cache[key];
20481
20482 if (cached) {
20483 peg$currPos = cached.nextPos;
20484 return cached.result;
20485 }
20486
20487 s0 = peg$currPos;
20488 s1 = [];
20489 s2 = peg$parseline();
20490 while (s2 !== peg$FAILED) {
20491 s1.push(s2);
20492 s2 = peg$parseline();
20493 }
20494 if (s1 !== peg$FAILED) {
20495 peg$reportedPos = s0;
20496 s1 = peg$c1();
20497 }
20498 s0 = s1;
20499
20500 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
20501
20502 return s0;
20503 }
20504
20505 function peg$parseline() {
20506 var s0, s1, s2, s3, s4, s5, s6;
20507
20508 var key = peg$currPos * 49 + 1,
20509 cached = peg$cache[key];
20510
20511 if (cached) {
20512 peg$currPos = cached.nextPos;
20513 return cached.result;
20514 }
20515
20516 s0 = peg$currPos;
20517 s1 = [];
20518 s2 = peg$parseS();
20519 while (s2 !== peg$FAILED) {
20520 s1.push(s2);
20521 s2 = peg$parseS();
20522 }
20523 if (s1 !== peg$FAILED) {
20524 s2 = peg$parseexpression();
20525 if (s2 !== peg$FAILED) {
20526 s3 = [];
20527 s4 = peg$parseS();
20528 while (s4 !== peg$FAILED) {
20529 s3.push(s4);
20530 s4 = peg$parseS();
20531 }
20532 if (s3 !== peg$FAILED) {
20533 s4 = [];
20534 s5 = peg$parsecomment();
20535 while (s5 !== peg$FAILED) {
20536 s4.push(s5);
20537 s5 = peg$parsecomment();
20538 }
20539 if (s4 !== peg$FAILED) {
20540 s5 = [];
20541 s6 = peg$parseNL();
20542 if (s6 !== peg$FAILED) {
20543 while (s6 !== peg$FAILED) {
20544 s5.push(s6);
20545 s6 = peg$parseNL();
20546 }
20547 } else {
20548 s5 = peg$c2;
20549 }
20550 if (s5 === peg$FAILED) {
20551 s5 = peg$parseEOF();
20552 }
20553 if (s5 !== peg$FAILED) {
20554 s1 = [s1, s2, s3, s4, s5];
20555 s0 = s1;
20556 } else {
20557 peg$currPos = s0;
20558 s0 = peg$c2;
20559 }
20560 } else {
20561 peg$currPos = s0;
20562 s0 = peg$c2;
20563 }
20564 } else {
20565 peg$currPos = s0;
20566 s0 = peg$c2;
20567 }
20568 } else {
20569 peg$currPos = s0;
20570 s0 = peg$c2;
20571 }
20572 } else {
20573 peg$currPos = s0;
20574 s0 = peg$c2;
20575 }
20576 if (s0 === peg$FAILED) {
20577 s0 = peg$currPos;
20578 s1 = [];
20579 s2 = peg$parseS();
20580 if (s2 !== peg$FAILED) {
20581 while (s2 !== peg$FAILED) {
20582 s1.push(s2);
20583 s2 = peg$parseS();
20584 }
20585 } else {
20586 s1 = peg$c2;
20587 }
20588 if (s1 !== peg$FAILED) {
20589 s2 = [];
20590 s3 = peg$parseNL();
20591 if (s3 !== peg$FAILED) {
20592 while (s3 !== peg$FAILED) {
20593 s2.push(s3);
20594 s3 = peg$parseNL();
20595 }
20596 } else {
20597 s2 = peg$c2;
20598 }
20599 if (s2 === peg$FAILED) {
20600 s2 = peg$parseEOF();
20601 }
20602 if (s2 !== peg$FAILED) {
20603 s1 = [s1, s2];
20604 s0 = s1;
20605 } else {
20606 peg$currPos = s0;
20607 s0 = peg$c2;
20608 }
20609 } else {
20610 peg$currPos = s0;
20611 s0 = peg$c2;
20612 }
20613 if (s0 === peg$FAILED) {
20614 s0 = peg$parseNL();
20615 }
20616 }
20617
20618 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
20619
20620 return s0;
20621 }
20622
20623 function peg$parseexpression() {
20624 var s0;
20625
20626 var key = peg$currPos * 49 + 2,
20627 cached = peg$cache[key];
20628
20629 if (cached) {
20630 peg$currPos = cached.nextPos;
20631 return cached.result;
20632 }
20633
20634 s0 = peg$parsecomment();
20635 if (s0 === peg$FAILED) {
20636 s0 = peg$parsepath();
20637 if (s0 === peg$FAILED) {
20638 s0 = peg$parsetablearray();
20639 if (s0 === peg$FAILED) {
20640 s0 = peg$parseassignment();
20641 }
20642 }
20643 }
20644
20645 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
20646
20647 return s0;
20648 }
20649
20650 function peg$parsecomment() {
20651 var s0, s1, s2, s3, s4, s5;
20652
20653 var key = peg$currPos * 49 + 3,
20654 cached = peg$cache[key];
20655
20656 if (cached) {
20657 peg$currPos = cached.nextPos;
20658 return cached.result;
20659 }
20660
20661 s0 = peg$currPos;
20662 if (input.charCodeAt(peg$currPos) === 35) {
20663 s1 = peg$c3;
20664 peg$currPos++;
20665 } else {
20666 s1 = peg$FAILED;
20667 if (peg$silentFails === 0) { peg$fail(peg$c4); }
20668 }
20669 if (s1 !== peg$FAILED) {
20670 s2 = [];
20671 s3 = peg$currPos;
20672 s4 = peg$currPos;
20673 peg$silentFails++;
20674 s5 = peg$parseNL();
20675 if (s5 === peg$FAILED) {
20676 s5 = peg$parseEOF();
20677 }
20678 peg$silentFails--;
20679 if (s5 === peg$FAILED) {
20680 s4 = peg$c5;
20681 } else {
20682 peg$currPos = s4;
20683 s4 = peg$c2;
20684 }
20685 if (s4 !== peg$FAILED) {
20686 if (input.length > peg$currPos) {
20687 s5 = input.charAt(peg$currPos);
20688 peg$currPos++;
20689 } else {
20690 s5 = peg$FAILED;
20691 if (peg$silentFails === 0) { peg$fail(peg$c6); }
20692 }
20693 if (s5 !== peg$FAILED) {
20694 s4 = [s4, s5];
20695 s3 = s4;
20696 } else {
20697 peg$currPos = s3;
20698 s3 = peg$c2;
20699 }
20700 } else {
20701 peg$currPos = s3;
20702 s3 = peg$c2;
20703 }
20704 while (s3 !== peg$FAILED) {
20705 s2.push(s3);
20706 s3 = peg$currPos;
20707 s4 = peg$currPos;
20708 peg$silentFails++;
20709 s5 = peg$parseNL();
20710 if (s5 === peg$FAILED) {
20711 s5 = peg$parseEOF();
20712 }
20713 peg$silentFails--;
20714 if (s5 === peg$FAILED) {
20715 s4 = peg$c5;
20716 } else {
20717 peg$currPos = s4;
20718 s4 = peg$c2;
20719 }
20720 if (s4 !== peg$FAILED) {
20721 if (input.length > peg$currPos) {
20722 s5 = input.charAt(peg$currPos);
20723 peg$currPos++;
20724 } else {
20725 s5 = peg$FAILED;
20726 if (peg$silentFails === 0) { peg$fail(peg$c6); }
20727 }
20728 if (s5 !== peg$FAILED) {
20729 s4 = [s4, s5];
20730 s3 = s4;
20731 } else {
20732 peg$currPos = s3;
20733 s3 = peg$c2;
20734 }
20735 } else {
20736 peg$currPos = s3;
20737 s3 = peg$c2;
20738 }
20739 }
20740 if (s2 !== peg$FAILED) {
20741 s1 = [s1, s2];
20742 s0 = s1;
20743 } else {
20744 peg$currPos = s0;
20745 s0 = peg$c2;
20746 }
20747 } else {
20748 peg$currPos = s0;
20749 s0 = peg$c2;
20750 }
20751
20752 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
20753
20754 return s0;
20755 }
20756
20757 function peg$parsepath() {
20758 var s0, s1, s2, s3, s4, s5;
20759
20760 var key = peg$currPos * 49 + 4,
20761 cached = peg$cache[key];
20762
20763 if (cached) {
20764 peg$currPos = cached.nextPos;
20765 return cached.result;
20766 }
20767
20768 s0 = peg$currPos;
20769 if (input.charCodeAt(peg$currPos) === 91) {
20770 s1 = peg$c7;
20771 peg$currPos++;
20772 } else {
20773 s1 = peg$FAILED;
20774 if (peg$silentFails === 0) { peg$fail(peg$c8); }
20775 }
20776 if (s1 !== peg$FAILED) {
20777 s2 = [];
20778 s3 = peg$parseS();
20779 while (s3 !== peg$FAILED) {
20780 s2.push(s3);
20781 s3 = peg$parseS();
20782 }
20783 if (s2 !== peg$FAILED) {
20784 s3 = peg$parsetable_key();
20785 if (s3 !== peg$FAILED) {
20786 s4 = [];
20787 s5 = peg$parseS();
20788 while (s5 !== peg$FAILED) {
20789 s4.push(s5);
20790 s5 = peg$parseS();
20791 }
20792 if (s4 !== peg$FAILED) {
20793 if (input.charCodeAt(peg$currPos) === 93) {
20794 s5 = peg$c9;
20795 peg$currPos++;
20796 } else {
20797 s5 = peg$FAILED;
20798 if (peg$silentFails === 0) { peg$fail(peg$c10); }
20799 }
20800 if (s5 !== peg$FAILED) {
20801 peg$reportedPos = s0;
20802 s1 = peg$c11(s3);
20803 s0 = s1;
20804 } else {
20805 peg$currPos = s0;
20806 s0 = peg$c2;
20807 }
20808 } else {
20809 peg$currPos = s0;
20810 s0 = peg$c2;
20811 }
20812 } else {
20813 peg$currPos = s0;
20814 s0 = peg$c2;
20815 }
20816 } else {
20817 peg$currPos = s0;
20818 s0 = peg$c2;
20819 }
20820 } else {
20821 peg$currPos = s0;
20822 s0 = peg$c2;
20823 }
20824
20825 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
20826
20827 return s0;
20828 }
20829
20830 function peg$parsetablearray() {
20831 var s0, s1, s2, s3, s4, s5, s6, s7;
20832
20833 var key = peg$currPos * 49 + 5,
20834 cached = peg$cache[key];
20835
20836 if (cached) {
20837 peg$currPos = cached.nextPos;
20838 return cached.result;
20839 }
20840
20841 s0 = peg$currPos;
20842 if (input.charCodeAt(peg$currPos) === 91) {
20843 s1 = peg$c7;
20844 peg$currPos++;
20845 } else {
20846 s1 = peg$FAILED;
20847 if (peg$silentFails === 0) { peg$fail(peg$c8); }
20848 }
20849 if (s1 !== peg$FAILED) {
20850 if (input.charCodeAt(peg$currPos) === 91) {
20851 s2 = peg$c7;
20852 peg$currPos++;
20853 } else {
20854 s2 = peg$FAILED;
20855 if (peg$silentFails === 0) { peg$fail(peg$c8); }
20856 }
20857 if (s2 !== peg$FAILED) {
20858 s3 = [];
20859 s4 = peg$parseS();
20860 while (s4 !== peg$FAILED) {
20861 s3.push(s4);
20862 s4 = peg$parseS();
20863 }
20864 if (s3 !== peg$FAILED) {
20865 s4 = peg$parsetable_key();
20866 if (s4 !== peg$FAILED) {
20867 s5 = [];
20868 s6 = peg$parseS();
20869 while (s6 !== peg$FAILED) {
20870 s5.push(s6);
20871 s6 = peg$parseS();
20872 }
20873 if (s5 !== peg$FAILED) {
20874 if (input.charCodeAt(peg$currPos) === 93) {
20875 s6 = peg$c9;
20876 peg$currPos++;
20877 } else {
20878 s6 = peg$FAILED;
20879 if (peg$silentFails === 0) { peg$fail(peg$c10); }
20880 }
20881 if (s6 !== peg$FAILED) {
20882 if (input.charCodeAt(peg$currPos) === 93) {
20883 s7 = peg$c9;
20884 peg$currPos++;
20885 } else {
20886 s7 = peg$FAILED;
20887 if (peg$silentFails === 0) { peg$fail(peg$c10); }
20888 }
20889 if (s7 !== peg$FAILED) {
20890 peg$reportedPos = s0;
20891 s1 = peg$c12(s4);
20892 s0 = s1;
20893 } else {
20894 peg$currPos = s0;
20895 s0 = peg$c2;
20896 }
20897 } else {
20898 peg$currPos = s0;
20899 s0 = peg$c2;
20900 }
20901 } else {
20902 peg$currPos = s0;
20903 s0 = peg$c2;
20904 }
20905 } else {
20906 peg$currPos = s0;
20907 s0 = peg$c2;
20908 }
20909 } else {
20910 peg$currPos = s0;
20911 s0 = peg$c2;
20912 }
20913 } else {
20914 peg$currPos = s0;
20915 s0 = peg$c2;
20916 }
20917 } else {
20918 peg$currPos = s0;
20919 s0 = peg$c2;
20920 }
20921
20922 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
20923
20924 return s0;
20925 }
20926
20927 function peg$parsetable_key() {
20928 var s0, s1, s2;
20929
20930 var key = peg$currPos * 49 + 6,
20931 cached = peg$cache[key];
20932
20933 if (cached) {
20934 peg$currPos = cached.nextPos;
20935 return cached.result;
20936 }
20937
20938 s0 = peg$currPos;
20939 s1 = [];
20940 s2 = peg$parsedot_ended_table_key_part();
20941 if (s2 !== peg$FAILED) {
20942 while (s2 !== peg$FAILED) {
20943 s1.push(s2);
20944 s2 = peg$parsedot_ended_table_key_part();
20945 }
20946 } else {
20947 s1 = peg$c2;
20948 }
20949 if (s1 !== peg$FAILED) {
20950 s2 = peg$parsetable_key_part();
20951 if (s2 !== peg$FAILED) {
20952 peg$reportedPos = s0;
20953 s1 = peg$c13(s1, s2);
20954 s0 = s1;
20955 } else {
20956 peg$currPos = s0;
20957 s0 = peg$c2;
20958 }
20959 } else {
20960 peg$currPos = s0;
20961 s0 = peg$c2;
20962 }
20963 if (s0 === peg$FAILED) {
20964 s0 = peg$currPos;
20965 s1 = peg$parsetable_key_part();
20966 if (s1 !== peg$FAILED) {
20967 peg$reportedPos = s0;
20968 s1 = peg$c14(s1);
20969 }
20970 s0 = s1;
20971 }
20972
20973 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
20974
20975 return s0;
20976 }
20977
20978 function peg$parsetable_key_part() {
20979 var s0, s1, s2, s3, s4;
20980
20981 var key = peg$currPos * 49 + 7,
20982 cached = peg$cache[key];
20983
20984 if (cached) {
20985 peg$currPos = cached.nextPos;
20986 return cached.result;
20987 }
20988
20989 s0 = peg$currPos;
20990 s1 = [];
20991 s2 = peg$parseS();
20992 while (s2 !== peg$FAILED) {
20993 s1.push(s2);
20994 s2 = peg$parseS();
20995 }
20996 if (s1 !== peg$FAILED) {
20997 s2 = peg$parsekey();
20998 if (s2 !== peg$FAILED) {
20999 s3 = [];
21000 s4 = peg$parseS();
21001 while (s4 !== peg$FAILED) {
21002 s3.push(s4);
21003 s4 = peg$parseS();
21004 }
21005 if (s3 !== peg$FAILED) {
21006 peg$reportedPos = s0;
21007 s1 = peg$c15(s2);
21008 s0 = s1;
21009 } else {
21010 peg$currPos = s0;
21011 s0 = peg$c2;
21012 }
21013 } else {
21014 peg$currPos = s0;
21015 s0 = peg$c2;
21016 }
21017 } else {
21018 peg$currPos = s0;
21019 s0 = peg$c2;
21020 }
21021 if (s0 === peg$FAILED) {
21022 s0 = peg$currPos;
21023 s1 = [];
21024 s2 = peg$parseS();
21025 while (s2 !== peg$FAILED) {
21026 s1.push(s2);
21027 s2 = peg$parseS();
21028 }
21029 if (s1 !== peg$FAILED) {
21030 s2 = peg$parsequoted_key();
21031 if (s2 !== peg$FAILED) {
21032 s3 = [];
21033 s4 = peg$parseS();
21034 while (s4 !== peg$FAILED) {
21035 s3.push(s4);
21036 s4 = peg$parseS();
21037 }
21038 if (s3 !== peg$FAILED) {
21039 peg$reportedPos = s0;
21040 s1 = peg$c15(s2);
21041 s0 = s1;
21042 } else {
21043 peg$currPos = s0;
21044 s0 = peg$c2;
21045 }
21046 } else {
21047 peg$currPos = s0;
21048 s0 = peg$c2;
21049 }
21050 } else {
21051 peg$currPos = s0;
21052 s0 = peg$c2;
21053 }
21054 }
21055
21056 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21057
21058 return s0;
21059 }
21060
21061 function peg$parsedot_ended_table_key_part() {
21062 var s0, s1, s2, s3, s4, s5, s6;
21063
21064 var key = peg$currPos * 49 + 8,
21065 cached = peg$cache[key];
21066
21067 if (cached) {
21068 peg$currPos = cached.nextPos;
21069 return cached.result;
21070 }
21071
21072 s0 = peg$currPos;
21073 s1 = [];
21074 s2 = peg$parseS();
21075 while (s2 !== peg$FAILED) {
21076 s1.push(s2);
21077 s2 = peg$parseS();
21078 }
21079 if (s1 !== peg$FAILED) {
21080 s2 = peg$parsekey();
21081 if (s2 !== peg$FAILED) {
21082 s3 = [];
21083 s4 = peg$parseS();
21084 while (s4 !== peg$FAILED) {
21085 s3.push(s4);
21086 s4 = peg$parseS();
21087 }
21088 if (s3 !== peg$FAILED) {
21089 if (input.charCodeAt(peg$currPos) === 46) {
21090 s4 = peg$c16;
21091 peg$currPos++;
21092 } else {
21093 s4 = peg$FAILED;
21094 if (peg$silentFails === 0) { peg$fail(peg$c17); }
21095 }
21096 if (s4 !== peg$FAILED) {
21097 s5 = [];
21098 s6 = peg$parseS();
21099 while (s6 !== peg$FAILED) {
21100 s5.push(s6);
21101 s6 = peg$parseS();
21102 }
21103 if (s5 !== peg$FAILED) {
21104 peg$reportedPos = s0;
21105 s1 = peg$c15(s2);
21106 s0 = s1;
21107 } else {
21108 peg$currPos = s0;
21109 s0 = peg$c2;
21110 }
21111 } else {
21112 peg$currPos = s0;
21113 s0 = peg$c2;
21114 }
21115 } else {
21116 peg$currPos = s0;
21117 s0 = peg$c2;
21118 }
21119 } else {
21120 peg$currPos = s0;
21121 s0 = peg$c2;
21122 }
21123 } else {
21124 peg$currPos = s0;
21125 s0 = peg$c2;
21126 }
21127 if (s0 === peg$FAILED) {
21128 s0 = peg$currPos;
21129 s1 = [];
21130 s2 = peg$parseS();
21131 while (s2 !== peg$FAILED) {
21132 s1.push(s2);
21133 s2 = peg$parseS();
21134 }
21135 if (s1 !== peg$FAILED) {
21136 s2 = peg$parsequoted_key();
21137 if (s2 !== peg$FAILED) {
21138 s3 = [];
21139 s4 = peg$parseS();
21140 while (s4 !== peg$FAILED) {
21141 s3.push(s4);
21142 s4 = peg$parseS();
21143 }
21144 if (s3 !== peg$FAILED) {
21145 if (input.charCodeAt(peg$currPos) === 46) {
21146 s4 = peg$c16;
21147 peg$currPos++;
21148 } else {
21149 s4 = peg$FAILED;
21150 if (peg$silentFails === 0) { peg$fail(peg$c17); }
21151 }
21152 if (s4 !== peg$FAILED) {
21153 s5 = [];
21154 s6 = peg$parseS();
21155 while (s6 !== peg$FAILED) {
21156 s5.push(s6);
21157 s6 = peg$parseS();
21158 }
21159 if (s5 !== peg$FAILED) {
21160 peg$reportedPos = s0;
21161 s1 = peg$c15(s2);
21162 s0 = s1;
21163 } else {
21164 peg$currPos = s0;
21165 s0 = peg$c2;
21166 }
21167 } else {
21168 peg$currPos = s0;
21169 s0 = peg$c2;
21170 }
21171 } else {
21172 peg$currPos = s0;
21173 s0 = peg$c2;
21174 }
21175 } else {
21176 peg$currPos = s0;
21177 s0 = peg$c2;
21178 }
21179 } else {
21180 peg$currPos = s0;
21181 s0 = peg$c2;
21182 }
21183 }
21184
21185 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21186
21187 return s0;
21188 }
21189
21190 function peg$parseassignment() {
21191 var s0, s1, s2, s3, s4, s5;
21192
21193 var key = peg$currPos * 49 + 9,
21194 cached = peg$cache[key];
21195
21196 if (cached) {
21197 peg$currPos = cached.nextPos;
21198 return cached.result;
21199 }
21200
21201 s0 = peg$currPos;
21202 s1 = peg$parsekey();
21203 if (s1 !== peg$FAILED) {
21204 s2 = [];
21205 s3 = peg$parseS();
21206 while (s3 !== peg$FAILED) {
21207 s2.push(s3);
21208 s3 = peg$parseS();
21209 }
21210 if (s2 !== peg$FAILED) {
21211 if (input.charCodeAt(peg$currPos) === 61) {
21212 s3 = peg$c18;
21213 peg$currPos++;
21214 } else {
21215 s3 = peg$FAILED;
21216 if (peg$silentFails === 0) { peg$fail(peg$c19); }
21217 }
21218 if (s3 !== peg$FAILED) {
21219 s4 = [];
21220 s5 = peg$parseS();
21221 while (s5 !== peg$FAILED) {
21222 s4.push(s5);
21223 s5 = peg$parseS();
21224 }
21225 if (s4 !== peg$FAILED) {
21226 s5 = peg$parsevalue();
21227 if (s5 !== peg$FAILED) {
21228 peg$reportedPos = s0;
21229 s1 = peg$c20(s1, s5);
21230 s0 = s1;
21231 } else {
21232 peg$currPos = s0;
21233 s0 = peg$c2;
21234 }
21235 } else {
21236 peg$currPos = s0;
21237 s0 = peg$c2;
21238 }
21239 } else {
21240 peg$currPos = s0;
21241 s0 = peg$c2;
21242 }
21243 } else {
21244 peg$currPos = s0;
21245 s0 = peg$c2;
21246 }
21247 } else {
21248 peg$currPos = s0;
21249 s0 = peg$c2;
21250 }
21251 if (s0 === peg$FAILED) {
21252 s0 = peg$currPos;
21253 s1 = peg$parsequoted_key();
21254 if (s1 !== peg$FAILED) {
21255 s2 = [];
21256 s3 = peg$parseS();
21257 while (s3 !== peg$FAILED) {
21258 s2.push(s3);
21259 s3 = peg$parseS();
21260 }
21261 if (s2 !== peg$FAILED) {
21262 if (input.charCodeAt(peg$currPos) === 61) {
21263 s3 = peg$c18;
21264 peg$currPos++;
21265 } else {
21266 s3 = peg$FAILED;
21267 if (peg$silentFails === 0) { peg$fail(peg$c19); }
21268 }
21269 if (s3 !== peg$FAILED) {
21270 s4 = [];
21271 s5 = peg$parseS();
21272 while (s5 !== peg$FAILED) {
21273 s4.push(s5);
21274 s5 = peg$parseS();
21275 }
21276 if (s4 !== peg$FAILED) {
21277 s5 = peg$parsevalue();
21278 if (s5 !== peg$FAILED) {
21279 peg$reportedPos = s0;
21280 s1 = peg$c20(s1, s5);
21281 s0 = s1;
21282 } else {
21283 peg$currPos = s0;
21284 s0 = peg$c2;
21285 }
21286 } else {
21287 peg$currPos = s0;
21288 s0 = peg$c2;
21289 }
21290 } else {
21291 peg$currPos = s0;
21292 s0 = peg$c2;
21293 }
21294 } else {
21295 peg$currPos = s0;
21296 s0 = peg$c2;
21297 }
21298 } else {
21299 peg$currPos = s0;
21300 s0 = peg$c2;
21301 }
21302 }
21303
21304 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21305
21306 return s0;
21307 }
21308
21309 function peg$parsekey() {
21310 var s0, s1, s2;
21311
21312 var key = peg$currPos * 49 + 10,
21313 cached = peg$cache[key];
21314
21315 if (cached) {
21316 peg$currPos = cached.nextPos;
21317 return cached.result;
21318 }
21319
21320 s0 = peg$currPos;
21321 s1 = [];
21322 s2 = peg$parseASCII_BASIC();
21323 if (s2 !== peg$FAILED) {
21324 while (s2 !== peg$FAILED) {
21325 s1.push(s2);
21326 s2 = peg$parseASCII_BASIC();
21327 }
21328 } else {
21329 s1 = peg$c2;
21330 }
21331 if (s1 !== peg$FAILED) {
21332 peg$reportedPos = s0;
21333 s1 = peg$c21(s1);
21334 }
21335 s0 = s1;
21336
21337 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21338
21339 return s0;
21340 }
21341
21342 function peg$parsequoted_key() {
21343 var s0, s1;
21344
21345 var key = peg$currPos * 49 + 11,
21346 cached = peg$cache[key];
21347
21348 if (cached) {
21349 peg$currPos = cached.nextPos;
21350 return cached.result;
21351 }
21352
21353 s0 = peg$currPos;
21354 s1 = peg$parsedouble_quoted_single_line_string();
21355 if (s1 !== peg$FAILED) {
21356 peg$reportedPos = s0;
21357 s1 = peg$c22(s1);
21358 }
21359 s0 = s1;
21360 if (s0 === peg$FAILED) {
21361 s0 = peg$currPos;
21362 s1 = peg$parsesingle_quoted_single_line_string();
21363 if (s1 !== peg$FAILED) {
21364 peg$reportedPos = s0;
21365 s1 = peg$c22(s1);
21366 }
21367 s0 = s1;
21368 }
21369
21370 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21371
21372 return s0;
21373 }
21374
21375 function peg$parsevalue() {
21376 var s0;
21377
21378 var key = peg$currPos * 49 + 12,
21379 cached = peg$cache[key];
21380
21381 if (cached) {
21382 peg$currPos = cached.nextPos;
21383 return cached.result;
21384 }
21385
21386 s0 = peg$parsestring();
21387 if (s0 === peg$FAILED) {
21388 s0 = peg$parsedatetime();
21389 if (s0 === peg$FAILED) {
21390 s0 = peg$parsefloat();
21391 if (s0 === peg$FAILED) {
21392 s0 = peg$parseinteger();
21393 if (s0 === peg$FAILED) {
21394 s0 = peg$parseboolean();
21395 if (s0 === peg$FAILED) {
21396 s0 = peg$parsearray();
21397 if (s0 === peg$FAILED) {
21398 s0 = peg$parseinline_table();
21399 }
21400 }
21401 }
21402 }
21403 }
21404 }
21405
21406 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21407
21408 return s0;
21409 }
21410
21411 function peg$parsestring() {
21412 var s0;
21413
21414 var key = peg$currPos * 49 + 13,
21415 cached = peg$cache[key];
21416
21417 if (cached) {
21418 peg$currPos = cached.nextPos;
21419 return cached.result;
21420 }
21421
21422 s0 = peg$parsedouble_quoted_multiline_string();
21423 if (s0 === peg$FAILED) {
21424 s0 = peg$parsedouble_quoted_single_line_string();
21425 if (s0 === peg$FAILED) {
21426 s0 = peg$parsesingle_quoted_multiline_string();
21427 if (s0 === peg$FAILED) {
21428 s0 = peg$parsesingle_quoted_single_line_string();
21429 }
21430 }
21431 }
21432
21433 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21434
21435 return s0;
21436 }
21437
21438 function peg$parsedouble_quoted_multiline_string() {
21439 var s0, s1, s2, s3, s4;
21440
21441 var key = peg$currPos * 49 + 14,
21442 cached = peg$cache[key];
21443
21444 if (cached) {
21445 peg$currPos = cached.nextPos;
21446 return cached.result;
21447 }
21448
21449 s0 = peg$currPos;
21450 if (input.substr(peg$currPos, 3) === peg$c23) {
21451 s1 = peg$c23;
21452 peg$currPos += 3;
21453 } else {
21454 s1 = peg$FAILED;
21455 if (peg$silentFails === 0) { peg$fail(peg$c24); }
21456 }
21457 if (s1 !== peg$FAILED) {
21458 s2 = peg$parseNL();
21459 if (s2 === peg$FAILED) {
21460 s2 = peg$c25;
21461 }
21462 if (s2 !== peg$FAILED) {
21463 s3 = [];
21464 s4 = peg$parsemultiline_string_char();
21465 while (s4 !== peg$FAILED) {
21466 s3.push(s4);
21467 s4 = peg$parsemultiline_string_char();
21468 }
21469 if (s3 !== peg$FAILED) {
21470 if (input.substr(peg$currPos, 3) === peg$c23) {
21471 s4 = peg$c23;
21472 peg$currPos += 3;
21473 } else {
21474 s4 = peg$FAILED;
21475 if (peg$silentFails === 0) { peg$fail(peg$c24); }
21476 }
21477 if (s4 !== peg$FAILED) {
21478 peg$reportedPos = s0;
21479 s1 = peg$c26(s3);
21480 s0 = s1;
21481 } else {
21482 peg$currPos = s0;
21483 s0 = peg$c2;
21484 }
21485 } else {
21486 peg$currPos = s0;
21487 s0 = peg$c2;
21488 }
21489 } else {
21490 peg$currPos = s0;
21491 s0 = peg$c2;
21492 }
21493 } else {
21494 peg$currPos = s0;
21495 s0 = peg$c2;
21496 }
21497
21498 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21499
21500 return s0;
21501 }
21502
21503 function peg$parsedouble_quoted_single_line_string() {
21504 var s0, s1, s2, s3;
21505
21506 var key = peg$currPos * 49 + 15,
21507 cached = peg$cache[key];
21508
21509 if (cached) {
21510 peg$currPos = cached.nextPos;
21511 return cached.result;
21512 }
21513
21514 s0 = peg$currPos;
21515 if (input.charCodeAt(peg$currPos) === 34) {
21516 s1 = peg$c27;
21517 peg$currPos++;
21518 } else {
21519 s1 = peg$FAILED;
21520 if (peg$silentFails === 0) { peg$fail(peg$c28); }
21521 }
21522 if (s1 !== peg$FAILED) {
21523 s2 = [];
21524 s3 = peg$parsestring_char();
21525 while (s3 !== peg$FAILED) {
21526 s2.push(s3);
21527 s3 = peg$parsestring_char();
21528 }
21529 if (s2 !== peg$FAILED) {
21530 if (input.charCodeAt(peg$currPos) === 34) {
21531 s3 = peg$c27;
21532 peg$currPos++;
21533 } else {
21534 s3 = peg$FAILED;
21535 if (peg$silentFails === 0) { peg$fail(peg$c28); }
21536 }
21537 if (s3 !== peg$FAILED) {
21538 peg$reportedPos = s0;
21539 s1 = peg$c26(s2);
21540 s0 = s1;
21541 } else {
21542 peg$currPos = s0;
21543 s0 = peg$c2;
21544 }
21545 } else {
21546 peg$currPos = s0;
21547 s0 = peg$c2;
21548 }
21549 } else {
21550 peg$currPos = s0;
21551 s0 = peg$c2;
21552 }
21553
21554 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21555
21556 return s0;
21557 }
21558
21559 function peg$parsesingle_quoted_multiline_string() {
21560 var s0, s1, s2, s3, s4;
21561
21562 var key = peg$currPos * 49 + 16,
21563 cached = peg$cache[key];
21564
21565 if (cached) {
21566 peg$currPos = cached.nextPos;
21567 return cached.result;
21568 }
21569
21570 s0 = peg$currPos;
21571 if (input.substr(peg$currPos, 3) === peg$c29) {
21572 s1 = peg$c29;
21573 peg$currPos += 3;
21574 } else {
21575 s1 = peg$FAILED;
21576 if (peg$silentFails === 0) { peg$fail(peg$c30); }
21577 }
21578 if (s1 !== peg$FAILED) {
21579 s2 = peg$parseNL();
21580 if (s2 === peg$FAILED) {
21581 s2 = peg$c25;
21582 }
21583 if (s2 !== peg$FAILED) {
21584 s3 = [];
21585 s4 = peg$parsemultiline_literal_char();
21586 while (s4 !== peg$FAILED) {
21587 s3.push(s4);
21588 s4 = peg$parsemultiline_literal_char();
21589 }
21590 if (s3 !== peg$FAILED) {
21591 if (input.substr(peg$currPos, 3) === peg$c29) {
21592 s4 = peg$c29;
21593 peg$currPos += 3;
21594 } else {
21595 s4 = peg$FAILED;
21596 if (peg$silentFails === 0) { peg$fail(peg$c30); }
21597 }
21598 if (s4 !== peg$FAILED) {
21599 peg$reportedPos = s0;
21600 s1 = peg$c26(s3);
21601 s0 = s1;
21602 } else {
21603 peg$currPos = s0;
21604 s0 = peg$c2;
21605 }
21606 } else {
21607 peg$currPos = s0;
21608 s0 = peg$c2;
21609 }
21610 } else {
21611 peg$currPos = s0;
21612 s0 = peg$c2;
21613 }
21614 } else {
21615 peg$currPos = s0;
21616 s0 = peg$c2;
21617 }
21618
21619 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21620
21621 return s0;
21622 }
21623
21624 function peg$parsesingle_quoted_single_line_string() {
21625 var s0, s1, s2, s3;
21626
21627 var key = peg$currPos * 49 + 17,
21628 cached = peg$cache[key];
21629
21630 if (cached) {
21631 peg$currPos = cached.nextPos;
21632 return cached.result;
21633 }
21634
21635 s0 = peg$currPos;
21636 if (input.charCodeAt(peg$currPos) === 39) {
21637 s1 = peg$c31;
21638 peg$currPos++;
21639 } else {
21640 s1 = peg$FAILED;
21641 if (peg$silentFails === 0) { peg$fail(peg$c32); }
21642 }
21643 if (s1 !== peg$FAILED) {
21644 s2 = [];
21645 s3 = peg$parseliteral_char();
21646 while (s3 !== peg$FAILED) {
21647 s2.push(s3);
21648 s3 = peg$parseliteral_char();
21649 }
21650 if (s2 !== peg$FAILED) {
21651 if (input.charCodeAt(peg$currPos) === 39) {
21652 s3 = peg$c31;
21653 peg$currPos++;
21654 } else {
21655 s3 = peg$FAILED;
21656 if (peg$silentFails === 0) { peg$fail(peg$c32); }
21657 }
21658 if (s3 !== peg$FAILED) {
21659 peg$reportedPos = s0;
21660 s1 = peg$c26(s2);
21661 s0 = s1;
21662 } else {
21663 peg$currPos = s0;
21664 s0 = peg$c2;
21665 }
21666 } else {
21667 peg$currPos = s0;
21668 s0 = peg$c2;
21669 }
21670 } else {
21671 peg$currPos = s0;
21672 s0 = peg$c2;
21673 }
21674
21675 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21676
21677 return s0;
21678 }
21679
21680 function peg$parsestring_char() {
21681 var s0, s1, s2;
21682
21683 var key = peg$currPos * 49 + 18,
21684 cached = peg$cache[key];
21685
21686 if (cached) {
21687 peg$currPos = cached.nextPos;
21688 return cached.result;
21689 }
21690
21691 s0 = peg$parseESCAPED();
21692 if (s0 === peg$FAILED) {
21693 s0 = peg$currPos;
21694 s1 = peg$currPos;
21695 peg$silentFails++;
21696 if (input.charCodeAt(peg$currPos) === 34) {
21697 s2 = peg$c27;
21698 peg$currPos++;
21699 } else {
21700 s2 = peg$FAILED;
21701 if (peg$silentFails === 0) { peg$fail(peg$c28); }
21702 }
21703 peg$silentFails--;
21704 if (s2 === peg$FAILED) {
21705 s1 = peg$c5;
21706 } else {
21707 peg$currPos = s1;
21708 s1 = peg$c2;
21709 }
21710 if (s1 !== peg$FAILED) {
21711 if (input.length > peg$currPos) {
21712 s2 = input.charAt(peg$currPos);
21713 peg$currPos++;
21714 } else {
21715 s2 = peg$FAILED;
21716 if (peg$silentFails === 0) { peg$fail(peg$c6); }
21717 }
21718 if (s2 !== peg$FAILED) {
21719 peg$reportedPos = s0;
21720 s1 = peg$c33(s2);
21721 s0 = s1;
21722 } else {
21723 peg$currPos = s0;
21724 s0 = peg$c2;
21725 }
21726 } else {
21727 peg$currPos = s0;
21728 s0 = peg$c2;
21729 }
21730 }
21731
21732 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21733
21734 return s0;
21735 }
21736
21737 function peg$parseliteral_char() {
21738 var s0, s1, s2;
21739
21740 var key = peg$currPos * 49 + 19,
21741 cached = peg$cache[key];
21742
21743 if (cached) {
21744 peg$currPos = cached.nextPos;
21745 return cached.result;
21746 }
21747
21748 s0 = peg$currPos;
21749 s1 = peg$currPos;
21750 peg$silentFails++;
21751 if (input.charCodeAt(peg$currPos) === 39) {
21752 s2 = peg$c31;
21753 peg$currPos++;
21754 } else {
21755 s2 = peg$FAILED;
21756 if (peg$silentFails === 0) { peg$fail(peg$c32); }
21757 }
21758 peg$silentFails--;
21759 if (s2 === peg$FAILED) {
21760 s1 = peg$c5;
21761 } else {
21762 peg$currPos = s1;
21763 s1 = peg$c2;
21764 }
21765 if (s1 !== peg$FAILED) {
21766 if (input.length > peg$currPos) {
21767 s2 = input.charAt(peg$currPos);
21768 peg$currPos++;
21769 } else {
21770 s2 = peg$FAILED;
21771 if (peg$silentFails === 0) { peg$fail(peg$c6); }
21772 }
21773 if (s2 !== peg$FAILED) {
21774 peg$reportedPos = s0;
21775 s1 = peg$c33(s2);
21776 s0 = s1;
21777 } else {
21778 peg$currPos = s0;
21779 s0 = peg$c2;
21780 }
21781 } else {
21782 peg$currPos = s0;
21783 s0 = peg$c2;
21784 }
21785
21786 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21787
21788 return s0;
21789 }
21790
21791 function peg$parsemultiline_string_char() {
21792 var s0, s1, s2;
21793
21794 var key = peg$currPos * 49 + 20,
21795 cached = peg$cache[key];
21796
21797 if (cached) {
21798 peg$currPos = cached.nextPos;
21799 return cached.result;
21800 }
21801
21802 s0 = peg$parseESCAPED();
21803 if (s0 === peg$FAILED) {
21804 s0 = peg$parsemultiline_string_delim();
21805 if (s0 === peg$FAILED) {
21806 s0 = peg$currPos;
21807 s1 = peg$currPos;
21808 peg$silentFails++;
21809 if (input.substr(peg$currPos, 3) === peg$c23) {
21810 s2 = peg$c23;
21811 peg$currPos += 3;
21812 } else {
21813 s2 = peg$FAILED;
21814 if (peg$silentFails === 0) { peg$fail(peg$c24); }
21815 }
21816 peg$silentFails--;
21817 if (s2 === peg$FAILED) {
21818 s1 = peg$c5;
21819 } else {
21820 peg$currPos = s1;
21821 s1 = peg$c2;
21822 }
21823 if (s1 !== peg$FAILED) {
21824 if (input.length > peg$currPos) {
21825 s2 = input.charAt(peg$currPos);
21826 peg$currPos++;
21827 } else {
21828 s2 = peg$FAILED;
21829 if (peg$silentFails === 0) { peg$fail(peg$c6); }
21830 }
21831 if (s2 !== peg$FAILED) {
21832 peg$reportedPos = s0;
21833 s1 = peg$c34(s2);
21834 s0 = s1;
21835 } else {
21836 peg$currPos = s0;
21837 s0 = peg$c2;
21838 }
21839 } else {
21840 peg$currPos = s0;
21841 s0 = peg$c2;
21842 }
21843 }
21844 }
21845
21846 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21847
21848 return s0;
21849 }
21850
21851 function peg$parsemultiline_string_delim() {
21852 var s0, s1, s2, s3, s4;
21853
21854 var key = peg$currPos * 49 + 21,
21855 cached = peg$cache[key];
21856
21857 if (cached) {
21858 peg$currPos = cached.nextPos;
21859 return cached.result;
21860 }
21861
21862 s0 = peg$currPos;
21863 if (input.charCodeAt(peg$currPos) === 92) {
21864 s1 = peg$c35;
21865 peg$currPos++;
21866 } else {
21867 s1 = peg$FAILED;
21868 if (peg$silentFails === 0) { peg$fail(peg$c36); }
21869 }
21870 if (s1 !== peg$FAILED) {
21871 s2 = peg$parseNL();
21872 if (s2 !== peg$FAILED) {
21873 s3 = [];
21874 s4 = peg$parseNLS();
21875 while (s4 !== peg$FAILED) {
21876 s3.push(s4);
21877 s4 = peg$parseNLS();
21878 }
21879 if (s3 !== peg$FAILED) {
21880 peg$reportedPos = s0;
21881 s1 = peg$c37();
21882 s0 = s1;
21883 } else {
21884 peg$currPos = s0;
21885 s0 = peg$c2;
21886 }
21887 } else {
21888 peg$currPos = s0;
21889 s0 = peg$c2;
21890 }
21891 } else {
21892 peg$currPos = s0;
21893 s0 = peg$c2;
21894 }
21895
21896 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21897
21898 return s0;
21899 }
21900
21901 function peg$parsemultiline_literal_char() {
21902 var s0, s1, s2;
21903
21904 var key = peg$currPos * 49 + 22,
21905 cached = peg$cache[key];
21906
21907 if (cached) {
21908 peg$currPos = cached.nextPos;
21909 return cached.result;
21910 }
21911
21912 s0 = peg$currPos;
21913 s1 = peg$currPos;
21914 peg$silentFails++;
21915 if (input.substr(peg$currPos, 3) === peg$c29) {
21916 s2 = peg$c29;
21917 peg$currPos += 3;
21918 } else {
21919 s2 = peg$FAILED;
21920 if (peg$silentFails === 0) { peg$fail(peg$c30); }
21921 }
21922 peg$silentFails--;
21923 if (s2 === peg$FAILED) {
21924 s1 = peg$c5;
21925 } else {
21926 peg$currPos = s1;
21927 s1 = peg$c2;
21928 }
21929 if (s1 !== peg$FAILED) {
21930 if (input.length > peg$currPos) {
21931 s2 = input.charAt(peg$currPos);
21932 peg$currPos++;
21933 } else {
21934 s2 = peg$FAILED;
21935 if (peg$silentFails === 0) { peg$fail(peg$c6); }
21936 }
21937 if (s2 !== peg$FAILED) {
21938 peg$reportedPos = s0;
21939 s1 = peg$c33(s2);
21940 s0 = s1;
21941 } else {
21942 peg$currPos = s0;
21943 s0 = peg$c2;
21944 }
21945 } else {
21946 peg$currPos = s0;
21947 s0 = peg$c2;
21948 }
21949
21950 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
21951
21952 return s0;
21953 }
21954
21955 function peg$parsefloat() {
21956 var s0, s1, s2, s3;
21957
21958 var key = peg$currPos * 49 + 23,
21959 cached = peg$cache[key];
21960
21961 if (cached) {
21962 peg$currPos = cached.nextPos;
21963 return cached.result;
21964 }
21965
21966 s0 = peg$currPos;
21967 s1 = peg$parsefloat_text();
21968 if (s1 === peg$FAILED) {
21969 s1 = peg$parseinteger_text();
21970 }
21971 if (s1 !== peg$FAILED) {
21972 if (input.charCodeAt(peg$currPos) === 101) {
21973 s2 = peg$c38;
21974 peg$currPos++;
21975 } else {
21976 s2 = peg$FAILED;
21977 if (peg$silentFails === 0) { peg$fail(peg$c39); }
21978 }
21979 if (s2 === peg$FAILED) {
21980 if (input.charCodeAt(peg$currPos) === 69) {
21981 s2 = peg$c40;
21982 peg$currPos++;
21983 } else {
21984 s2 = peg$FAILED;
21985 if (peg$silentFails === 0) { peg$fail(peg$c41); }
21986 }
21987 }
21988 if (s2 !== peg$FAILED) {
21989 s3 = peg$parseinteger_text();
21990 if (s3 !== peg$FAILED) {
21991 peg$reportedPos = s0;
21992 s1 = peg$c42(s1, s3);
21993 s0 = s1;
21994 } else {
21995 peg$currPos = s0;
21996 s0 = peg$c2;
21997 }
21998 } else {
21999 peg$currPos = s0;
22000 s0 = peg$c2;
22001 }
22002 } else {
22003 peg$currPos = s0;
22004 s0 = peg$c2;
22005 }
22006 if (s0 === peg$FAILED) {
22007 s0 = peg$currPos;
22008 s1 = peg$parsefloat_text();
22009 if (s1 !== peg$FAILED) {
22010 peg$reportedPos = s0;
22011 s1 = peg$c43(s1);
22012 }
22013 s0 = s1;
22014 }
22015
22016 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22017
22018 return s0;
22019 }
22020
22021 function peg$parsefloat_text() {
22022 var s0, s1, s2, s3, s4, s5;
22023
22024 var key = peg$currPos * 49 + 24,
22025 cached = peg$cache[key];
22026
22027 if (cached) {
22028 peg$currPos = cached.nextPos;
22029 return cached.result;
22030 }
22031
22032 s0 = peg$currPos;
22033 if (input.charCodeAt(peg$currPos) === 43) {
22034 s1 = peg$c44;
22035 peg$currPos++;
22036 } else {
22037 s1 = peg$FAILED;
22038 if (peg$silentFails === 0) { peg$fail(peg$c45); }
22039 }
22040 if (s1 === peg$FAILED) {
22041 s1 = peg$c25;
22042 }
22043 if (s1 !== peg$FAILED) {
22044 s2 = peg$currPos;
22045 s3 = peg$parseDIGITS();
22046 if (s3 !== peg$FAILED) {
22047 if (input.charCodeAt(peg$currPos) === 46) {
22048 s4 = peg$c16;
22049 peg$currPos++;
22050 } else {
22051 s4 = peg$FAILED;
22052 if (peg$silentFails === 0) { peg$fail(peg$c17); }
22053 }
22054 if (s4 !== peg$FAILED) {
22055 s5 = peg$parseDIGITS();
22056 if (s5 !== peg$FAILED) {
22057 s3 = [s3, s4, s5];
22058 s2 = s3;
22059 } else {
22060 peg$currPos = s2;
22061 s2 = peg$c2;
22062 }
22063 } else {
22064 peg$currPos = s2;
22065 s2 = peg$c2;
22066 }
22067 } else {
22068 peg$currPos = s2;
22069 s2 = peg$c2;
22070 }
22071 if (s2 !== peg$FAILED) {
22072 peg$reportedPos = s0;
22073 s1 = peg$c46(s2);
22074 s0 = s1;
22075 } else {
22076 peg$currPos = s0;
22077 s0 = peg$c2;
22078 }
22079 } else {
22080 peg$currPos = s0;
22081 s0 = peg$c2;
22082 }
22083 if (s0 === peg$FAILED) {
22084 s0 = peg$currPos;
22085 if (input.charCodeAt(peg$currPos) === 45) {
22086 s1 = peg$c47;
22087 peg$currPos++;
22088 } else {
22089 s1 = peg$FAILED;
22090 if (peg$silentFails === 0) { peg$fail(peg$c48); }
22091 }
22092 if (s1 !== peg$FAILED) {
22093 s2 = peg$currPos;
22094 s3 = peg$parseDIGITS();
22095 if (s3 !== peg$FAILED) {
22096 if (input.charCodeAt(peg$currPos) === 46) {
22097 s4 = peg$c16;
22098 peg$currPos++;
22099 } else {
22100 s4 = peg$FAILED;
22101 if (peg$silentFails === 0) { peg$fail(peg$c17); }
22102 }
22103 if (s4 !== peg$FAILED) {
22104 s5 = peg$parseDIGITS();
22105 if (s5 !== peg$FAILED) {
22106 s3 = [s3, s4, s5];
22107 s2 = s3;
22108 } else {
22109 peg$currPos = s2;
22110 s2 = peg$c2;
22111 }
22112 } else {
22113 peg$currPos = s2;
22114 s2 = peg$c2;
22115 }
22116 } else {
22117 peg$currPos = s2;
22118 s2 = peg$c2;
22119 }
22120 if (s2 !== peg$FAILED) {
22121 peg$reportedPos = s0;
22122 s1 = peg$c49(s2);
22123 s0 = s1;
22124 } else {
22125 peg$currPos = s0;
22126 s0 = peg$c2;
22127 }
22128 } else {
22129 peg$currPos = s0;
22130 s0 = peg$c2;
22131 }
22132 }
22133
22134 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22135
22136 return s0;
22137 }
22138
22139 function peg$parseinteger() {
22140 var s0, s1;
22141
22142 var key = peg$currPos * 49 + 25,
22143 cached = peg$cache[key];
22144
22145 if (cached) {
22146 peg$currPos = cached.nextPos;
22147 return cached.result;
22148 }
22149
22150 s0 = peg$currPos;
22151 s1 = peg$parseinteger_text();
22152 if (s1 !== peg$FAILED) {
22153 peg$reportedPos = s0;
22154 s1 = peg$c50(s1);
22155 }
22156 s0 = s1;
22157
22158 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22159
22160 return s0;
22161 }
22162
22163 function peg$parseinteger_text() {
22164 var s0, s1, s2, s3, s4;
22165
22166 var key = peg$currPos * 49 + 26,
22167 cached = peg$cache[key];
22168
22169 if (cached) {
22170 peg$currPos = cached.nextPos;
22171 return cached.result;
22172 }
22173
22174 s0 = peg$currPos;
22175 if (input.charCodeAt(peg$currPos) === 43) {
22176 s1 = peg$c44;
22177 peg$currPos++;
22178 } else {
22179 s1 = peg$FAILED;
22180 if (peg$silentFails === 0) { peg$fail(peg$c45); }
22181 }
22182 if (s1 === peg$FAILED) {
22183 s1 = peg$c25;
22184 }
22185 if (s1 !== peg$FAILED) {
22186 s2 = [];
22187 s3 = peg$parseDIGIT_OR_UNDER();
22188 if (s3 !== peg$FAILED) {
22189 while (s3 !== peg$FAILED) {
22190 s2.push(s3);
22191 s3 = peg$parseDIGIT_OR_UNDER();
22192 }
22193 } else {
22194 s2 = peg$c2;
22195 }
22196 if (s2 !== peg$FAILED) {
22197 s3 = peg$currPos;
22198 peg$silentFails++;
22199 if (input.charCodeAt(peg$currPos) === 46) {
22200 s4 = peg$c16;
22201 peg$currPos++;
22202 } else {
22203 s4 = peg$FAILED;
22204 if (peg$silentFails === 0) { peg$fail(peg$c17); }
22205 }
22206 peg$silentFails--;
22207 if (s4 === peg$FAILED) {
22208 s3 = peg$c5;
22209 } else {
22210 peg$currPos = s3;
22211 s3 = peg$c2;
22212 }
22213 if (s3 !== peg$FAILED) {
22214 peg$reportedPos = s0;
22215 s1 = peg$c46(s2);
22216 s0 = s1;
22217 } else {
22218 peg$currPos = s0;
22219 s0 = peg$c2;
22220 }
22221 } else {
22222 peg$currPos = s0;
22223 s0 = peg$c2;
22224 }
22225 } else {
22226 peg$currPos = s0;
22227 s0 = peg$c2;
22228 }
22229 if (s0 === peg$FAILED) {
22230 s0 = peg$currPos;
22231 if (input.charCodeAt(peg$currPos) === 45) {
22232 s1 = peg$c47;
22233 peg$currPos++;
22234 } else {
22235 s1 = peg$FAILED;
22236 if (peg$silentFails === 0) { peg$fail(peg$c48); }
22237 }
22238 if (s1 !== peg$FAILED) {
22239 s2 = [];
22240 s3 = peg$parseDIGIT_OR_UNDER();
22241 if (s3 !== peg$FAILED) {
22242 while (s3 !== peg$FAILED) {
22243 s2.push(s3);
22244 s3 = peg$parseDIGIT_OR_UNDER();
22245 }
22246 } else {
22247 s2 = peg$c2;
22248 }
22249 if (s2 !== peg$FAILED) {
22250 s3 = peg$currPos;
22251 peg$silentFails++;
22252 if (input.charCodeAt(peg$currPos) === 46) {
22253 s4 = peg$c16;
22254 peg$currPos++;
22255 } else {
22256 s4 = peg$FAILED;
22257 if (peg$silentFails === 0) { peg$fail(peg$c17); }
22258 }
22259 peg$silentFails--;
22260 if (s4 === peg$FAILED) {
22261 s3 = peg$c5;
22262 } else {
22263 peg$currPos = s3;
22264 s3 = peg$c2;
22265 }
22266 if (s3 !== peg$FAILED) {
22267 peg$reportedPos = s0;
22268 s1 = peg$c49(s2);
22269 s0 = s1;
22270 } else {
22271 peg$currPos = s0;
22272 s0 = peg$c2;
22273 }
22274 } else {
22275 peg$currPos = s0;
22276 s0 = peg$c2;
22277 }
22278 } else {
22279 peg$currPos = s0;
22280 s0 = peg$c2;
22281 }
22282 }
22283
22284 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22285
22286 return s0;
22287 }
22288
22289 function peg$parseboolean() {
22290 var s0, s1;
22291
22292 var key = peg$currPos * 49 + 27,
22293 cached = peg$cache[key];
22294
22295 if (cached) {
22296 peg$currPos = cached.nextPos;
22297 return cached.result;
22298 }
22299
22300 s0 = peg$currPos;
22301 if (input.substr(peg$currPos, 4) === peg$c51) {
22302 s1 = peg$c51;
22303 peg$currPos += 4;
22304 } else {
22305 s1 = peg$FAILED;
22306 if (peg$silentFails === 0) { peg$fail(peg$c52); }
22307 }
22308 if (s1 !== peg$FAILED) {
22309 peg$reportedPos = s0;
22310 s1 = peg$c53();
22311 }
22312 s0 = s1;
22313 if (s0 === peg$FAILED) {
22314 s0 = peg$currPos;
22315 if (input.substr(peg$currPos, 5) === peg$c54) {
22316 s1 = peg$c54;
22317 peg$currPos += 5;
22318 } else {
22319 s1 = peg$FAILED;
22320 if (peg$silentFails === 0) { peg$fail(peg$c55); }
22321 }
22322 if (s1 !== peg$FAILED) {
22323 peg$reportedPos = s0;
22324 s1 = peg$c56();
22325 }
22326 s0 = s1;
22327 }
22328
22329 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22330
22331 return s0;
22332 }
22333
22334 function peg$parsearray() {
22335 var s0, s1, s2, s3, s4;
22336
22337 var key = peg$currPos * 49 + 28,
22338 cached = peg$cache[key];
22339
22340 if (cached) {
22341 peg$currPos = cached.nextPos;
22342 return cached.result;
22343 }
22344
22345 s0 = peg$currPos;
22346 if (input.charCodeAt(peg$currPos) === 91) {
22347 s1 = peg$c7;
22348 peg$currPos++;
22349 } else {
22350 s1 = peg$FAILED;
22351 if (peg$silentFails === 0) { peg$fail(peg$c8); }
22352 }
22353 if (s1 !== peg$FAILED) {
22354 s2 = [];
22355 s3 = peg$parsearray_sep();
22356 while (s3 !== peg$FAILED) {
22357 s2.push(s3);
22358 s3 = peg$parsearray_sep();
22359 }
22360 if (s2 !== peg$FAILED) {
22361 if (input.charCodeAt(peg$currPos) === 93) {
22362 s3 = peg$c9;
22363 peg$currPos++;
22364 } else {
22365 s3 = peg$FAILED;
22366 if (peg$silentFails === 0) { peg$fail(peg$c10); }
22367 }
22368 if (s3 !== peg$FAILED) {
22369 peg$reportedPos = s0;
22370 s1 = peg$c57();
22371 s0 = s1;
22372 } else {
22373 peg$currPos = s0;
22374 s0 = peg$c2;
22375 }
22376 } else {
22377 peg$currPos = s0;
22378 s0 = peg$c2;
22379 }
22380 } else {
22381 peg$currPos = s0;
22382 s0 = peg$c2;
22383 }
22384 if (s0 === peg$FAILED) {
22385 s0 = peg$currPos;
22386 if (input.charCodeAt(peg$currPos) === 91) {
22387 s1 = peg$c7;
22388 peg$currPos++;
22389 } else {
22390 s1 = peg$FAILED;
22391 if (peg$silentFails === 0) { peg$fail(peg$c8); }
22392 }
22393 if (s1 !== peg$FAILED) {
22394 s2 = peg$parsearray_value();
22395 if (s2 === peg$FAILED) {
22396 s2 = peg$c25;
22397 }
22398 if (s2 !== peg$FAILED) {
22399 if (input.charCodeAt(peg$currPos) === 93) {
22400 s3 = peg$c9;
22401 peg$currPos++;
22402 } else {
22403 s3 = peg$FAILED;
22404 if (peg$silentFails === 0) { peg$fail(peg$c10); }
22405 }
22406 if (s3 !== peg$FAILED) {
22407 peg$reportedPos = s0;
22408 s1 = peg$c58(s2);
22409 s0 = s1;
22410 } else {
22411 peg$currPos = s0;
22412 s0 = peg$c2;
22413 }
22414 } else {
22415 peg$currPos = s0;
22416 s0 = peg$c2;
22417 }
22418 } else {
22419 peg$currPos = s0;
22420 s0 = peg$c2;
22421 }
22422 if (s0 === peg$FAILED) {
22423 s0 = peg$currPos;
22424 if (input.charCodeAt(peg$currPos) === 91) {
22425 s1 = peg$c7;
22426 peg$currPos++;
22427 } else {
22428 s1 = peg$FAILED;
22429 if (peg$silentFails === 0) { peg$fail(peg$c8); }
22430 }
22431 if (s1 !== peg$FAILED) {
22432 s2 = [];
22433 s3 = peg$parsearray_value_list();
22434 if (s3 !== peg$FAILED) {
22435 while (s3 !== peg$FAILED) {
22436 s2.push(s3);
22437 s3 = peg$parsearray_value_list();
22438 }
22439 } else {
22440 s2 = peg$c2;
22441 }
22442 if (s2 !== peg$FAILED) {
22443 if (input.charCodeAt(peg$currPos) === 93) {
22444 s3 = peg$c9;
22445 peg$currPos++;
22446 } else {
22447 s3 = peg$FAILED;
22448 if (peg$silentFails === 0) { peg$fail(peg$c10); }
22449 }
22450 if (s3 !== peg$FAILED) {
22451 peg$reportedPos = s0;
22452 s1 = peg$c59(s2);
22453 s0 = s1;
22454 } else {
22455 peg$currPos = s0;
22456 s0 = peg$c2;
22457 }
22458 } else {
22459 peg$currPos = s0;
22460 s0 = peg$c2;
22461 }
22462 } else {
22463 peg$currPos = s0;
22464 s0 = peg$c2;
22465 }
22466 if (s0 === peg$FAILED) {
22467 s0 = peg$currPos;
22468 if (input.charCodeAt(peg$currPos) === 91) {
22469 s1 = peg$c7;
22470 peg$currPos++;
22471 } else {
22472 s1 = peg$FAILED;
22473 if (peg$silentFails === 0) { peg$fail(peg$c8); }
22474 }
22475 if (s1 !== peg$FAILED) {
22476 s2 = [];
22477 s3 = peg$parsearray_value_list();
22478 if (s3 !== peg$FAILED) {
22479 while (s3 !== peg$FAILED) {
22480 s2.push(s3);
22481 s3 = peg$parsearray_value_list();
22482 }
22483 } else {
22484 s2 = peg$c2;
22485 }
22486 if (s2 !== peg$FAILED) {
22487 s3 = peg$parsearray_value();
22488 if (s3 !== peg$FAILED) {
22489 if (input.charCodeAt(peg$currPos) === 93) {
22490 s4 = peg$c9;
22491 peg$currPos++;
22492 } else {
22493 s4 = peg$FAILED;
22494 if (peg$silentFails === 0) { peg$fail(peg$c10); }
22495 }
22496 if (s4 !== peg$FAILED) {
22497 peg$reportedPos = s0;
22498 s1 = peg$c60(s2, s3);
22499 s0 = s1;
22500 } else {
22501 peg$currPos = s0;
22502 s0 = peg$c2;
22503 }
22504 } else {
22505 peg$currPos = s0;
22506 s0 = peg$c2;
22507 }
22508 } else {
22509 peg$currPos = s0;
22510 s0 = peg$c2;
22511 }
22512 } else {
22513 peg$currPos = s0;
22514 s0 = peg$c2;
22515 }
22516 }
22517 }
22518 }
22519
22520 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22521
22522 return s0;
22523 }
22524
22525 function peg$parsearray_value() {
22526 var s0, s1, s2, s3, s4;
22527
22528 var key = peg$currPos * 49 + 29,
22529 cached = peg$cache[key];
22530
22531 if (cached) {
22532 peg$currPos = cached.nextPos;
22533 return cached.result;
22534 }
22535
22536 s0 = peg$currPos;
22537 s1 = [];
22538 s2 = peg$parsearray_sep();
22539 while (s2 !== peg$FAILED) {
22540 s1.push(s2);
22541 s2 = peg$parsearray_sep();
22542 }
22543 if (s1 !== peg$FAILED) {
22544 s2 = peg$parsevalue();
22545 if (s2 !== peg$FAILED) {
22546 s3 = [];
22547 s4 = peg$parsearray_sep();
22548 while (s4 !== peg$FAILED) {
22549 s3.push(s4);
22550 s4 = peg$parsearray_sep();
22551 }
22552 if (s3 !== peg$FAILED) {
22553 peg$reportedPos = s0;
22554 s1 = peg$c61(s2);
22555 s0 = s1;
22556 } else {
22557 peg$currPos = s0;
22558 s0 = peg$c2;
22559 }
22560 } else {
22561 peg$currPos = s0;
22562 s0 = peg$c2;
22563 }
22564 } else {
22565 peg$currPos = s0;
22566 s0 = peg$c2;
22567 }
22568
22569 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22570
22571 return s0;
22572 }
22573
22574 function peg$parsearray_value_list() {
22575 var s0, s1, s2, s3, s4, s5, s6;
22576
22577 var key = peg$currPos * 49 + 30,
22578 cached = peg$cache[key];
22579
22580 if (cached) {
22581 peg$currPos = cached.nextPos;
22582 return cached.result;
22583 }
22584
22585 s0 = peg$currPos;
22586 s1 = [];
22587 s2 = peg$parsearray_sep();
22588 while (s2 !== peg$FAILED) {
22589 s1.push(s2);
22590 s2 = peg$parsearray_sep();
22591 }
22592 if (s1 !== peg$FAILED) {
22593 s2 = peg$parsevalue();
22594 if (s2 !== peg$FAILED) {
22595 s3 = [];
22596 s4 = peg$parsearray_sep();
22597 while (s4 !== peg$FAILED) {
22598 s3.push(s4);
22599 s4 = peg$parsearray_sep();
22600 }
22601 if (s3 !== peg$FAILED) {
22602 if (input.charCodeAt(peg$currPos) === 44) {
22603 s4 = peg$c62;
22604 peg$currPos++;
22605 } else {
22606 s4 = peg$FAILED;
22607 if (peg$silentFails === 0) { peg$fail(peg$c63); }
22608 }
22609 if (s4 !== peg$FAILED) {
22610 s5 = [];
22611 s6 = peg$parsearray_sep();
22612 while (s6 !== peg$FAILED) {
22613 s5.push(s6);
22614 s6 = peg$parsearray_sep();
22615 }
22616 if (s5 !== peg$FAILED) {
22617 peg$reportedPos = s0;
22618 s1 = peg$c61(s2);
22619 s0 = s1;
22620 } else {
22621 peg$currPos = s0;
22622 s0 = peg$c2;
22623 }
22624 } else {
22625 peg$currPos = s0;
22626 s0 = peg$c2;
22627 }
22628 } else {
22629 peg$currPos = s0;
22630 s0 = peg$c2;
22631 }
22632 } else {
22633 peg$currPos = s0;
22634 s0 = peg$c2;
22635 }
22636 } else {
22637 peg$currPos = s0;
22638 s0 = peg$c2;
22639 }
22640
22641 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22642
22643 return s0;
22644 }
22645
22646 function peg$parsearray_sep() {
22647 var s0;
22648
22649 var key = peg$currPos * 49 + 31,
22650 cached = peg$cache[key];
22651
22652 if (cached) {
22653 peg$currPos = cached.nextPos;
22654 return cached.result;
22655 }
22656
22657 s0 = peg$parseS();
22658 if (s0 === peg$FAILED) {
22659 s0 = peg$parseNL();
22660 if (s0 === peg$FAILED) {
22661 s0 = peg$parsecomment();
22662 }
22663 }
22664
22665 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22666
22667 return s0;
22668 }
22669
22670 function peg$parseinline_table() {
22671 var s0, s1, s2, s3, s4, s5;
22672
22673 var key = peg$currPos * 49 + 32,
22674 cached = peg$cache[key];
22675
22676 if (cached) {
22677 peg$currPos = cached.nextPos;
22678 return cached.result;
22679 }
22680
22681 s0 = peg$currPos;
22682 if (input.charCodeAt(peg$currPos) === 123) {
22683 s1 = peg$c64;
22684 peg$currPos++;
22685 } else {
22686 s1 = peg$FAILED;
22687 if (peg$silentFails === 0) { peg$fail(peg$c65); }
22688 }
22689 if (s1 !== peg$FAILED) {
22690 s2 = [];
22691 s3 = peg$parseS();
22692 while (s3 !== peg$FAILED) {
22693 s2.push(s3);
22694 s3 = peg$parseS();
22695 }
22696 if (s2 !== peg$FAILED) {
22697 s3 = [];
22698 s4 = peg$parseinline_table_assignment();
22699 while (s4 !== peg$FAILED) {
22700 s3.push(s4);
22701 s4 = peg$parseinline_table_assignment();
22702 }
22703 if (s3 !== peg$FAILED) {
22704 s4 = [];
22705 s5 = peg$parseS();
22706 while (s5 !== peg$FAILED) {
22707 s4.push(s5);
22708 s5 = peg$parseS();
22709 }
22710 if (s4 !== peg$FAILED) {
22711 if (input.charCodeAt(peg$currPos) === 125) {
22712 s5 = peg$c66;
22713 peg$currPos++;
22714 } else {
22715 s5 = peg$FAILED;
22716 if (peg$silentFails === 0) { peg$fail(peg$c67); }
22717 }
22718 if (s5 !== peg$FAILED) {
22719 peg$reportedPos = s0;
22720 s1 = peg$c68(s3);
22721 s0 = s1;
22722 } else {
22723 peg$currPos = s0;
22724 s0 = peg$c2;
22725 }
22726 } else {
22727 peg$currPos = s0;
22728 s0 = peg$c2;
22729 }
22730 } else {
22731 peg$currPos = s0;
22732 s0 = peg$c2;
22733 }
22734 } else {
22735 peg$currPos = s0;
22736 s0 = peg$c2;
22737 }
22738 } else {
22739 peg$currPos = s0;
22740 s0 = peg$c2;
22741 }
22742
22743 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22744
22745 return s0;
22746 }
22747
22748 function peg$parseinline_table_assignment() {
22749 var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
22750
22751 var key = peg$currPos * 49 + 33,
22752 cached = peg$cache[key];
22753
22754 if (cached) {
22755 peg$currPos = cached.nextPos;
22756 return cached.result;
22757 }
22758
22759 s0 = peg$currPos;
22760 s1 = [];
22761 s2 = peg$parseS();
22762 while (s2 !== peg$FAILED) {
22763 s1.push(s2);
22764 s2 = peg$parseS();
22765 }
22766 if (s1 !== peg$FAILED) {
22767 s2 = peg$parsekey();
22768 if (s2 !== peg$FAILED) {
22769 s3 = [];
22770 s4 = peg$parseS();
22771 while (s4 !== peg$FAILED) {
22772 s3.push(s4);
22773 s4 = peg$parseS();
22774 }
22775 if (s3 !== peg$FAILED) {
22776 if (input.charCodeAt(peg$currPos) === 61) {
22777 s4 = peg$c18;
22778 peg$currPos++;
22779 } else {
22780 s4 = peg$FAILED;
22781 if (peg$silentFails === 0) { peg$fail(peg$c19); }
22782 }
22783 if (s4 !== peg$FAILED) {
22784 s5 = [];
22785 s6 = peg$parseS();
22786 while (s6 !== peg$FAILED) {
22787 s5.push(s6);
22788 s6 = peg$parseS();
22789 }
22790 if (s5 !== peg$FAILED) {
22791 s6 = peg$parsevalue();
22792 if (s6 !== peg$FAILED) {
22793 s7 = [];
22794 s8 = peg$parseS();
22795 while (s8 !== peg$FAILED) {
22796 s7.push(s8);
22797 s8 = peg$parseS();
22798 }
22799 if (s7 !== peg$FAILED) {
22800 if (input.charCodeAt(peg$currPos) === 44) {
22801 s8 = peg$c62;
22802 peg$currPos++;
22803 } else {
22804 s8 = peg$FAILED;
22805 if (peg$silentFails === 0) { peg$fail(peg$c63); }
22806 }
22807 if (s8 !== peg$FAILED) {
22808 s9 = [];
22809 s10 = peg$parseS();
22810 while (s10 !== peg$FAILED) {
22811 s9.push(s10);
22812 s10 = peg$parseS();
22813 }
22814 if (s9 !== peg$FAILED) {
22815 peg$reportedPos = s0;
22816 s1 = peg$c69(s2, s6);
22817 s0 = s1;
22818 } else {
22819 peg$currPos = s0;
22820 s0 = peg$c2;
22821 }
22822 } else {
22823 peg$currPos = s0;
22824 s0 = peg$c2;
22825 }
22826 } else {
22827 peg$currPos = s0;
22828 s0 = peg$c2;
22829 }
22830 } else {
22831 peg$currPos = s0;
22832 s0 = peg$c2;
22833 }
22834 } else {
22835 peg$currPos = s0;
22836 s0 = peg$c2;
22837 }
22838 } else {
22839 peg$currPos = s0;
22840 s0 = peg$c2;
22841 }
22842 } else {
22843 peg$currPos = s0;
22844 s0 = peg$c2;
22845 }
22846 } else {
22847 peg$currPos = s0;
22848 s0 = peg$c2;
22849 }
22850 } else {
22851 peg$currPos = s0;
22852 s0 = peg$c2;
22853 }
22854 if (s0 === peg$FAILED) {
22855 s0 = peg$currPos;
22856 s1 = [];
22857 s2 = peg$parseS();
22858 while (s2 !== peg$FAILED) {
22859 s1.push(s2);
22860 s2 = peg$parseS();
22861 }
22862 if (s1 !== peg$FAILED) {
22863 s2 = peg$parsekey();
22864 if (s2 !== peg$FAILED) {
22865 s3 = [];
22866 s4 = peg$parseS();
22867 while (s4 !== peg$FAILED) {
22868 s3.push(s4);
22869 s4 = peg$parseS();
22870 }
22871 if (s3 !== peg$FAILED) {
22872 if (input.charCodeAt(peg$currPos) === 61) {
22873 s4 = peg$c18;
22874 peg$currPos++;
22875 } else {
22876 s4 = peg$FAILED;
22877 if (peg$silentFails === 0) { peg$fail(peg$c19); }
22878 }
22879 if (s4 !== peg$FAILED) {
22880 s5 = [];
22881 s6 = peg$parseS();
22882 while (s6 !== peg$FAILED) {
22883 s5.push(s6);
22884 s6 = peg$parseS();
22885 }
22886 if (s5 !== peg$FAILED) {
22887 s6 = peg$parsevalue();
22888 if (s6 !== peg$FAILED) {
22889 peg$reportedPos = s0;
22890 s1 = peg$c69(s2, s6);
22891 s0 = s1;
22892 } else {
22893 peg$currPos = s0;
22894 s0 = peg$c2;
22895 }
22896 } else {
22897 peg$currPos = s0;
22898 s0 = peg$c2;
22899 }
22900 } else {
22901 peg$currPos = s0;
22902 s0 = peg$c2;
22903 }
22904 } else {
22905 peg$currPos = s0;
22906 s0 = peg$c2;
22907 }
22908 } else {
22909 peg$currPos = s0;
22910 s0 = peg$c2;
22911 }
22912 } else {
22913 peg$currPos = s0;
22914 s0 = peg$c2;
22915 }
22916 }
22917
22918 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22919
22920 return s0;
22921 }
22922
22923 function peg$parsesecfragment() {
22924 var s0, s1, s2;
22925
22926 var key = peg$currPos * 49 + 34,
22927 cached = peg$cache[key];
22928
22929 if (cached) {
22930 peg$currPos = cached.nextPos;
22931 return cached.result;
22932 }
22933
22934 s0 = peg$currPos;
22935 if (input.charCodeAt(peg$currPos) === 46) {
22936 s1 = peg$c16;
22937 peg$currPos++;
22938 } else {
22939 s1 = peg$FAILED;
22940 if (peg$silentFails === 0) { peg$fail(peg$c17); }
22941 }
22942 if (s1 !== peg$FAILED) {
22943 s2 = peg$parseDIGITS();
22944 if (s2 !== peg$FAILED) {
22945 peg$reportedPos = s0;
22946 s1 = peg$c70(s2);
22947 s0 = s1;
22948 } else {
22949 peg$currPos = s0;
22950 s0 = peg$c2;
22951 }
22952 } else {
22953 peg$currPos = s0;
22954 s0 = peg$c2;
22955 }
22956
22957 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
22958
22959 return s0;
22960 }
22961
22962 function peg$parsedate() {
22963 var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11;
22964
22965 var key = peg$currPos * 49 + 35,
22966 cached = peg$cache[key];
22967
22968 if (cached) {
22969 peg$currPos = cached.nextPos;
22970 return cached.result;
22971 }
22972
22973 s0 = peg$currPos;
22974 s1 = peg$currPos;
22975 s2 = peg$parseDIGIT_OR_UNDER();
22976 if (s2 !== peg$FAILED) {
22977 s3 = peg$parseDIGIT_OR_UNDER();
22978 if (s3 !== peg$FAILED) {
22979 s4 = peg$parseDIGIT_OR_UNDER();
22980 if (s4 !== peg$FAILED) {
22981 s5 = peg$parseDIGIT_OR_UNDER();
22982 if (s5 !== peg$FAILED) {
22983 if (input.charCodeAt(peg$currPos) === 45) {
22984 s6 = peg$c47;
22985 peg$currPos++;
22986 } else {
22987 s6 = peg$FAILED;
22988 if (peg$silentFails === 0) { peg$fail(peg$c48); }
22989 }
22990 if (s6 !== peg$FAILED) {
22991 s7 = peg$parseDIGIT_OR_UNDER();
22992 if (s7 !== peg$FAILED) {
22993 s8 = peg$parseDIGIT_OR_UNDER();
22994 if (s8 !== peg$FAILED) {
22995 if (input.charCodeAt(peg$currPos) === 45) {
22996 s9 = peg$c47;
22997 peg$currPos++;
22998 } else {
22999 s9 = peg$FAILED;
23000 if (peg$silentFails === 0) { peg$fail(peg$c48); }
23001 }
23002 if (s9 !== peg$FAILED) {
23003 s10 = peg$parseDIGIT_OR_UNDER();
23004 if (s10 !== peg$FAILED) {
23005 s11 = peg$parseDIGIT_OR_UNDER();
23006 if (s11 !== peg$FAILED) {
23007 s2 = [s2, s3, s4, s5, s6, s7, s8, s9, s10, s11];
23008 s1 = s2;
23009 } else {
23010 peg$currPos = s1;
23011 s1 = peg$c2;
23012 }
23013 } else {
23014 peg$currPos = s1;
23015 s1 = peg$c2;
23016 }
23017 } else {
23018 peg$currPos = s1;
23019 s1 = peg$c2;
23020 }
23021 } else {
23022 peg$currPos = s1;
23023 s1 = peg$c2;
23024 }
23025 } else {
23026 peg$currPos = s1;
23027 s1 = peg$c2;
23028 }
23029 } else {
23030 peg$currPos = s1;
23031 s1 = peg$c2;
23032 }
23033 } else {
23034 peg$currPos = s1;
23035 s1 = peg$c2;
23036 }
23037 } else {
23038 peg$currPos = s1;
23039 s1 = peg$c2;
23040 }
23041 } else {
23042 peg$currPos = s1;
23043 s1 = peg$c2;
23044 }
23045 } else {
23046 peg$currPos = s1;
23047 s1 = peg$c2;
23048 }
23049 if (s1 !== peg$FAILED) {
23050 peg$reportedPos = s0;
23051 s1 = peg$c71(s1);
23052 }
23053 s0 = s1;
23054
23055 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23056
23057 return s0;
23058 }
23059
23060 function peg$parsetime() {
23061 var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
23062
23063 var key = peg$currPos * 49 + 36,
23064 cached = peg$cache[key];
23065
23066 if (cached) {
23067 peg$currPos = cached.nextPos;
23068 return cached.result;
23069 }
23070
23071 s0 = peg$currPos;
23072 s1 = peg$currPos;
23073 s2 = peg$parseDIGIT_OR_UNDER();
23074 if (s2 !== peg$FAILED) {
23075 s3 = peg$parseDIGIT_OR_UNDER();
23076 if (s3 !== peg$FAILED) {
23077 if (input.charCodeAt(peg$currPos) === 58) {
23078 s4 = peg$c72;
23079 peg$currPos++;
23080 } else {
23081 s4 = peg$FAILED;
23082 if (peg$silentFails === 0) { peg$fail(peg$c73); }
23083 }
23084 if (s4 !== peg$FAILED) {
23085 s5 = peg$parseDIGIT_OR_UNDER();
23086 if (s5 !== peg$FAILED) {
23087 s6 = peg$parseDIGIT_OR_UNDER();
23088 if (s6 !== peg$FAILED) {
23089 if (input.charCodeAt(peg$currPos) === 58) {
23090 s7 = peg$c72;
23091 peg$currPos++;
23092 } else {
23093 s7 = peg$FAILED;
23094 if (peg$silentFails === 0) { peg$fail(peg$c73); }
23095 }
23096 if (s7 !== peg$FAILED) {
23097 s8 = peg$parseDIGIT_OR_UNDER();
23098 if (s8 !== peg$FAILED) {
23099 s9 = peg$parseDIGIT_OR_UNDER();
23100 if (s9 !== peg$FAILED) {
23101 s10 = peg$parsesecfragment();
23102 if (s10 === peg$FAILED) {
23103 s10 = peg$c25;
23104 }
23105 if (s10 !== peg$FAILED) {
23106 s2 = [s2, s3, s4, s5, s6, s7, s8, s9, s10];
23107 s1 = s2;
23108 } else {
23109 peg$currPos = s1;
23110 s1 = peg$c2;
23111 }
23112 } else {
23113 peg$currPos = s1;
23114 s1 = peg$c2;
23115 }
23116 } else {
23117 peg$currPos = s1;
23118 s1 = peg$c2;
23119 }
23120 } else {
23121 peg$currPos = s1;
23122 s1 = peg$c2;
23123 }
23124 } else {
23125 peg$currPos = s1;
23126 s1 = peg$c2;
23127 }
23128 } else {
23129 peg$currPos = s1;
23130 s1 = peg$c2;
23131 }
23132 } else {
23133 peg$currPos = s1;
23134 s1 = peg$c2;
23135 }
23136 } else {
23137 peg$currPos = s1;
23138 s1 = peg$c2;
23139 }
23140 } else {
23141 peg$currPos = s1;
23142 s1 = peg$c2;
23143 }
23144 if (s1 !== peg$FAILED) {
23145 peg$reportedPos = s0;
23146 s1 = peg$c74(s1);
23147 }
23148 s0 = s1;
23149
23150 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23151
23152 return s0;
23153 }
23154
23155 function peg$parsetime_with_offset() {
23156 var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16;
23157
23158 var key = peg$currPos * 49 + 37,
23159 cached = peg$cache[key];
23160
23161 if (cached) {
23162 peg$currPos = cached.nextPos;
23163 return cached.result;
23164 }
23165
23166 s0 = peg$currPos;
23167 s1 = peg$currPos;
23168 s2 = peg$parseDIGIT_OR_UNDER();
23169 if (s2 !== peg$FAILED) {
23170 s3 = peg$parseDIGIT_OR_UNDER();
23171 if (s3 !== peg$FAILED) {
23172 if (input.charCodeAt(peg$currPos) === 58) {
23173 s4 = peg$c72;
23174 peg$currPos++;
23175 } else {
23176 s4 = peg$FAILED;
23177 if (peg$silentFails === 0) { peg$fail(peg$c73); }
23178 }
23179 if (s4 !== peg$FAILED) {
23180 s5 = peg$parseDIGIT_OR_UNDER();
23181 if (s5 !== peg$FAILED) {
23182 s6 = peg$parseDIGIT_OR_UNDER();
23183 if (s6 !== peg$FAILED) {
23184 if (input.charCodeAt(peg$currPos) === 58) {
23185 s7 = peg$c72;
23186 peg$currPos++;
23187 } else {
23188 s7 = peg$FAILED;
23189 if (peg$silentFails === 0) { peg$fail(peg$c73); }
23190 }
23191 if (s7 !== peg$FAILED) {
23192 s8 = peg$parseDIGIT_OR_UNDER();
23193 if (s8 !== peg$FAILED) {
23194 s9 = peg$parseDIGIT_OR_UNDER();
23195 if (s9 !== peg$FAILED) {
23196 s10 = peg$parsesecfragment();
23197 if (s10 === peg$FAILED) {
23198 s10 = peg$c25;
23199 }
23200 if (s10 !== peg$FAILED) {
23201 if (input.charCodeAt(peg$currPos) === 45) {
23202 s11 = peg$c47;
23203 peg$currPos++;
23204 } else {
23205 s11 = peg$FAILED;
23206 if (peg$silentFails === 0) { peg$fail(peg$c48); }
23207 }
23208 if (s11 === peg$FAILED) {
23209 if (input.charCodeAt(peg$currPos) === 43) {
23210 s11 = peg$c44;
23211 peg$currPos++;
23212 } else {
23213 s11 = peg$FAILED;
23214 if (peg$silentFails === 0) { peg$fail(peg$c45); }
23215 }
23216 }
23217 if (s11 !== peg$FAILED) {
23218 s12 = peg$parseDIGIT_OR_UNDER();
23219 if (s12 !== peg$FAILED) {
23220 s13 = peg$parseDIGIT_OR_UNDER();
23221 if (s13 !== peg$FAILED) {
23222 if (input.charCodeAt(peg$currPos) === 58) {
23223 s14 = peg$c72;
23224 peg$currPos++;
23225 } else {
23226 s14 = peg$FAILED;
23227 if (peg$silentFails === 0) { peg$fail(peg$c73); }
23228 }
23229 if (s14 !== peg$FAILED) {
23230 s15 = peg$parseDIGIT_OR_UNDER();
23231 if (s15 !== peg$FAILED) {
23232 s16 = peg$parseDIGIT_OR_UNDER();
23233 if (s16 !== peg$FAILED) {
23234 s2 = [s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16];
23235 s1 = s2;
23236 } else {
23237 peg$currPos = s1;
23238 s1 = peg$c2;
23239 }
23240 } else {
23241 peg$currPos = s1;
23242 s1 = peg$c2;
23243 }
23244 } else {
23245 peg$currPos = s1;
23246 s1 = peg$c2;
23247 }
23248 } else {
23249 peg$currPos = s1;
23250 s1 = peg$c2;
23251 }
23252 } else {
23253 peg$currPos = s1;
23254 s1 = peg$c2;
23255 }
23256 } else {
23257 peg$currPos = s1;
23258 s1 = peg$c2;
23259 }
23260 } else {
23261 peg$currPos = s1;
23262 s1 = peg$c2;
23263 }
23264 } else {
23265 peg$currPos = s1;
23266 s1 = peg$c2;
23267 }
23268 } else {
23269 peg$currPos = s1;
23270 s1 = peg$c2;
23271 }
23272 } else {
23273 peg$currPos = s1;
23274 s1 = peg$c2;
23275 }
23276 } else {
23277 peg$currPos = s1;
23278 s1 = peg$c2;
23279 }
23280 } else {
23281 peg$currPos = s1;
23282 s1 = peg$c2;
23283 }
23284 } else {
23285 peg$currPos = s1;
23286 s1 = peg$c2;
23287 }
23288 } else {
23289 peg$currPos = s1;
23290 s1 = peg$c2;
23291 }
23292 } else {
23293 peg$currPos = s1;
23294 s1 = peg$c2;
23295 }
23296 if (s1 !== peg$FAILED) {
23297 peg$reportedPos = s0;
23298 s1 = peg$c74(s1);
23299 }
23300 s0 = s1;
23301
23302 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23303
23304 return s0;
23305 }
23306
23307 function peg$parsedatetime() {
23308 var s0, s1, s2, s3, s4;
23309
23310 var key = peg$currPos * 49 + 38,
23311 cached = peg$cache[key];
23312
23313 if (cached) {
23314 peg$currPos = cached.nextPos;
23315 return cached.result;
23316 }
23317
23318 s0 = peg$currPos;
23319 s1 = peg$parsedate();
23320 if (s1 !== peg$FAILED) {
23321 if (input.charCodeAt(peg$currPos) === 84) {
23322 s2 = peg$c75;
23323 peg$currPos++;
23324 } else {
23325 s2 = peg$FAILED;
23326 if (peg$silentFails === 0) { peg$fail(peg$c76); }
23327 }
23328 if (s2 !== peg$FAILED) {
23329 s3 = peg$parsetime();
23330 if (s3 !== peg$FAILED) {
23331 if (input.charCodeAt(peg$currPos) === 90) {
23332 s4 = peg$c77;
23333 peg$currPos++;
23334 } else {
23335 s4 = peg$FAILED;
23336 if (peg$silentFails === 0) { peg$fail(peg$c78); }
23337 }
23338 if (s4 !== peg$FAILED) {
23339 peg$reportedPos = s0;
23340 s1 = peg$c79(s1, s3);
23341 s0 = s1;
23342 } else {
23343 peg$currPos = s0;
23344 s0 = peg$c2;
23345 }
23346 } else {
23347 peg$currPos = s0;
23348 s0 = peg$c2;
23349 }
23350 } else {
23351 peg$currPos = s0;
23352 s0 = peg$c2;
23353 }
23354 } else {
23355 peg$currPos = s0;
23356 s0 = peg$c2;
23357 }
23358 if (s0 === peg$FAILED) {
23359 s0 = peg$currPos;
23360 s1 = peg$parsedate();
23361 if (s1 !== peg$FAILED) {
23362 if (input.charCodeAt(peg$currPos) === 84) {
23363 s2 = peg$c75;
23364 peg$currPos++;
23365 } else {
23366 s2 = peg$FAILED;
23367 if (peg$silentFails === 0) { peg$fail(peg$c76); }
23368 }
23369 if (s2 !== peg$FAILED) {
23370 s3 = peg$parsetime_with_offset();
23371 if (s3 !== peg$FAILED) {
23372 peg$reportedPos = s0;
23373 s1 = peg$c80(s1, s3);
23374 s0 = s1;
23375 } else {
23376 peg$currPos = s0;
23377 s0 = peg$c2;
23378 }
23379 } else {
23380 peg$currPos = s0;
23381 s0 = peg$c2;
23382 }
23383 } else {
23384 peg$currPos = s0;
23385 s0 = peg$c2;
23386 }
23387 }
23388
23389 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23390
23391 return s0;
23392 }
23393
23394 function peg$parseS() {
23395 var s0;
23396
23397 var key = peg$currPos * 49 + 39,
23398 cached = peg$cache[key];
23399
23400 if (cached) {
23401 peg$currPos = cached.nextPos;
23402 return cached.result;
23403 }
23404
23405 if (peg$c81.test(input.charAt(peg$currPos))) {
23406 s0 = input.charAt(peg$currPos);
23407 peg$currPos++;
23408 } else {
23409 s0 = peg$FAILED;
23410 if (peg$silentFails === 0) { peg$fail(peg$c82); }
23411 }
23412
23413 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23414
23415 return s0;
23416 }
23417
23418 function peg$parseNL() {
23419 var s0, s1, s2;
23420
23421 var key = peg$currPos * 49 + 40,
23422 cached = peg$cache[key];
23423
23424 if (cached) {
23425 peg$currPos = cached.nextPos;
23426 return cached.result;
23427 }
23428
23429 if (input.charCodeAt(peg$currPos) === 10) {
23430 s0 = peg$c83;
23431 peg$currPos++;
23432 } else {
23433 s0 = peg$FAILED;
23434 if (peg$silentFails === 0) { peg$fail(peg$c84); }
23435 }
23436 if (s0 === peg$FAILED) {
23437 s0 = peg$currPos;
23438 if (input.charCodeAt(peg$currPos) === 13) {
23439 s1 = peg$c85;
23440 peg$currPos++;
23441 } else {
23442 s1 = peg$FAILED;
23443 if (peg$silentFails === 0) { peg$fail(peg$c86); }
23444 }
23445 if (s1 !== peg$FAILED) {
23446 if (input.charCodeAt(peg$currPos) === 10) {
23447 s2 = peg$c83;
23448 peg$currPos++;
23449 } else {
23450 s2 = peg$FAILED;
23451 if (peg$silentFails === 0) { peg$fail(peg$c84); }
23452 }
23453 if (s2 !== peg$FAILED) {
23454 s1 = [s1, s2];
23455 s0 = s1;
23456 } else {
23457 peg$currPos = s0;
23458 s0 = peg$c2;
23459 }
23460 } else {
23461 peg$currPos = s0;
23462 s0 = peg$c2;
23463 }
23464 }
23465
23466 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23467
23468 return s0;
23469 }
23470
23471 function peg$parseNLS() {
23472 var s0;
23473
23474 var key = peg$currPos * 49 + 41,
23475 cached = peg$cache[key];
23476
23477 if (cached) {
23478 peg$currPos = cached.nextPos;
23479 return cached.result;
23480 }
23481
23482 s0 = peg$parseNL();
23483 if (s0 === peg$FAILED) {
23484 s0 = peg$parseS();
23485 }
23486
23487 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23488
23489 return s0;
23490 }
23491
23492 function peg$parseEOF() {
23493 var s0, s1;
23494
23495 var key = peg$currPos * 49 + 42,
23496 cached = peg$cache[key];
23497
23498 if (cached) {
23499 peg$currPos = cached.nextPos;
23500 return cached.result;
23501 }
23502
23503 s0 = peg$currPos;
23504 peg$silentFails++;
23505 if (input.length > peg$currPos) {
23506 s1 = input.charAt(peg$currPos);
23507 peg$currPos++;
23508 } else {
23509 s1 = peg$FAILED;
23510 if (peg$silentFails === 0) { peg$fail(peg$c6); }
23511 }
23512 peg$silentFails--;
23513 if (s1 === peg$FAILED) {
23514 s0 = peg$c5;
23515 } else {
23516 peg$currPos = s0;
23517 s0 = peg$c2;
23518 }
23519
23520 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23521
23522 return s0;
23523 }
23524
23525 function peg$parseHEX() {
23526 var s0;
23527
23528 var key = peg$currPos * 49 + 43,
23529 cached = peg$cache[key];
23530
23531 if (cached) {
23532 peg$currPos = cached.nextPos;
23533 return cached.result;
23534 }
23535
23536 if (peg$c87.test(input.charAt(peg$currPos))) {
23537 s0 = input.charAt(peg$currPos);
23538 peg$currPos++;
23539 } else {
23540 s0 = peg$FAILED;
23541 if (peg$silentFails === 0) { peg$fail(peg$c88); }
23542 }
23543
23544 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23545
23546 return s0;
23547 }
23548
23549 function peg$parseDIGIT_OR_UNDER() {
23550 var s0, s1;
23551
23552 var key = peg$currPos * 49 + 44,
23553 cached = peg$cache[key];
23554
23555 if (cached) {
23556 peg$currPos = cached.nextPos;
23557 return cached.result;
23558 }
23559
23560 if (peg$c89.test(input.charAt(peg$currPos))) {
23561 s0 = input.charAt(peg$currPos);
23562 peg$currPos++;
23563 } else {
23564 s0 = peg$FAILED;
23565 if (peg$silentFails === 0) { peg$fail(peg$c90); }
23566 }
23567 if (s0 === peg$FAILED) {
23568 s0 = peg$currPos;
23569 if (input.charCodeAt(peg$currPos) === 95) {
23570 s1 = peg$c91;
23571 peg$currPos++;
23572 } else {
23573 s1 = peg$FAILED;
23574 if (peg$silentFails === 0) { peg$fail(peg$c92); }
23575 }
23576 if (s1 !== peg$FAILED) {
23577 peg$reportedPos = s0;
23578 s1 = peg$c93();
23579 }
23580 s0 = s1;
23581 }
23582
23583 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23584
23585 return s0;
23586 }
23587
23588 function peg$parseASCII_BASIC() {
23589 var s0;
23590
23591 var key = peg$currPos * 49 + 45,
23592 cached = peg$cache[key];
23593
23594 if (cached) {
23595 peg$currPos = cached.nextPos;
23596 return cached.result;
23597 }
23598
23599 if (peg$c94.test(input.charAt(peg$currPos))) {
23600 s0 = input.charAt(peg$currPos);
23601 peg$currPos++;
23602 } else {
23603 s0 = peg$FAILED;
23604 if (peg$silentFails === 0) { peg$fail(peg$c95); }
23605 }
23606
23607 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23608
23609 return s0;
23610 }
23611
23612 function peg$parseDIGITS() {
23613 var s0, s1, s2;
23614
23615 var key = peg$currPos * 49 + 46,
23616 cached = peg$cache[key];
23617
23618 if (cached) {
23619 peg$currPos = cached.nextPos;
23620 return cached.result;
23621 }
23622
23623 s0 = peg$currPos;
23624 s1 = [];
23625 s2 = peg$parseDIGIT_OR_UNDER();
23626 if (s2 !== peg$FAILED) {
23627 while (s2 !== peg$FAILED) {
23628 s1.push(s2);
23629 s2 = peg$parseDIGIT_OR_UNDER();
23630 }
23631 } else {
23632 s1 = peg$c2;
23633 }
23634 if (s1 !== peg$FAILED) {
23635 peg$reportedPos = s0;
23636 s1 = peg$c96(s1);
23637 }
23638 s0 = s1;
23639
23640 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23641
23642 return s0;
23643 }
23644
23645 function peg$parseESCAPED() {
23646 var s0, s1;
23647
23648 var key = peg$currPos * 49 + 47,
23649 cached = peg$cache[key];
23650
23651 if (cached) {
23652 peg$currPos = cached.nextPos;
23653 return cached.result;
23654 }
23655
23656 s0 = peg$currPos;
23657 if (input.substr(peg$currPos, 2) === peg$c97) {
23658 s1 = peg$c97;
23659 peg$currPos += 2;
23660 } else {
23661 s1 = peg$FAILED;
23662 if (peg$silentFails === 0) { peg$fail(peg$c98); }
23663 }
23664 if (s1 !== peg$FAILED) {
23665 peg$reportedPos = s0;
23666 s1 = peg$c99();
23667 }
23668 s0 = s1;
23669 if (s0 === peg$FAILED) {
23670 s0 = peg$currPos;
23671 if (input.substr(peg$currPos, 2) === peg$c100) {
23672 s1 = peg$c100;
23673 peg$currPos += 2;
23674 } else {
23675 s1 = peg$FAILED;
23676 if (peg$silentFails === 0) { peg$fail(peg$c101); }
23677 }
23678 if (s1 !== peg$FAILED) {
23679 peg$reportedPos = s0;
23680 s1 = peg$c102();
23681 }
23682 s0 = s1;
23683 if (s0 === peg$FAILED) {
23684 s0 = peg$currPos;
23685 if (input.substr(peg$currPos, 2) === peg$c103) {
23686 s1 = peg$c103;
23687 peg$currPos += 2;
23688 } else {
23689 s1 = peg$FAILED;
23690 if (peg$silentFails === 0) { peg$fail(peg$c104); }
23691 }
23692 if (s1 !== peg$FAILED) {
23693 peg$reportedPos = s0;
23694 s1 = peg$c105();
23695 }
23696 s0 = s1;
23697 if (s0 === peg$FAILED) {
23698 s0 = peg$currPos;
23699 if (input.substr(peg$currPos, 2) === peg$c106) {
23700 s1 = peg$c106;
23701 peg$currPos += 2;
23702 } else {
23703 s1 = peg$FAILED;
23704 if (peg$silentFails === 0) { peg$fail(peg$c107); }
23705 }
23706 if (s1 !== peg$FAILED) {
23707 peg$reportedPos = s0;
23708 s1 = peg$c108();
23709 }
23710 s0 = s1;
23711 if (s0 === peg$FAILED) {
23712 s0 = peg$currPos;
23713 if (input.substr(peg$currPos, 2) === peg$c109) {
23714 s1 = peg$c109;
23715 peg$currPos += 2;
23716 } else {
23717 s1 = peg$FAILED;
23718 if (peg$silentFails === 0) { peg$fail(peg$c110); }
23719 }
23720 if (s1 !== peg$FAILED) {
23721 peg$reportedPos = s0;
23722 s1 = peg$c111();
23723 }
23724 s0 = s1;
23725 if (s0 === peg$FAILED) {
23726 s0 = peg$currPos;
23727 if (input.substr(peg$currPos, 2) === peg$c112) {
23728 s1 = peg$c112;
23729 peg$currPos += 2;
23730 } else {
23731 s1 = peg$FAILED;
23732 if (peg$silentFails === 0) { peg$fail(peg$c113); }
23733 }
23734 if (s1 !== peg$FAILED) {
23735 peg$reportedPos = s0;
23736 s1 = peg$c114();
23737 }
23738 s0 = s1;
23739 if (s0 === peg$FAILED) {
23740 s0 = peg$currPos;
23741 if (input.substr(peg$currPos, 2) === peg$c115) {
23742 s1 = peg$c115;
23743 peg$currPos += 2;
23744 } else {
23745 s1 = peg$FAILED;
23746 if (peg$silentFails === 0) { peg$fail(peg$c116); }
23747 }
23748 if (s1 !== peg$FAILED) {
23749 peg$reportedPos = s0;
23750 s1 = peg$c117();
23751 }
23752 s0 = s1;
23753 if (s0 === peg$FAILED) {
23754 s0 = peg$parseESCAPED_UNICODE();
23755 }
23756 }
23757 }
23758 }
23759 }
23760 }
23761 }
23762
23763 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23764
23765 return s0;
23766 }
23767
23768 function peg$parseESCAPED_UNICODE() {
23769 var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
23770
23771 var key = peg$currPos * 49 + 48,
23772 cached = peg$cache[key];
23773
23774 if (cached) {
23775 peg$currPos = cached.nextPos;
23776 return cached.result;
23777 }
23778
23779 s0 = peg$currPos;
23780 if (input.substr(peg$currPos, 2) === peg$c118) {
23781 s1 = peg$c118;
23782 peg$currPos += 2;
23783 } else {
23784 s1 = peg$FAILED;
23785 if (peg$silentFails === 0) { peg$fail(peg$c119); }
23786 }
23787 if (s1 !== peg$FAILED) {
23788 s2 = peg$currPos;
23789 s3 = peg$parseHEX();
23790 if (s3 !== peg$FAILED) {
23791 s4 = peg$parseHEX();
23792 if (s4 !== peg$FAILED) {
23793 s5 = peg$parseHEX();
23794 if (s5 !== peg$FAILED) {
23795 s6 = peg$parseHEX();
23796 if (s6 !== peg$FAILED) {
23797 s7 = peg$parseHEX();
23798 if (s7 !== peg$FAILED) {
23799 s8 = peg$parseHEX();
23800 if (s8 !== peg$FAILED) {
23801 s9 = peg$parseHEX();
23802 if (s9 !== peg$FAILED) {
23803 s10 = peg$parseHEX();
23804 if (s10 !== peg$FAILED) {
23805 s3 = [s3, s4, s5, s6, s7, s8, s9, s10];
23806 s2 = s3;
23807 } else {
23808 peg$currPos = s2;
23809 s2 = peg$c2;
23810 }
23811 } else {
23812 peg$currPos = s2;
23813 s2 = peg$c2;
23814 }
23815 } else {
23816 peg$currPos = s2;
23817 s2 = peg$c2;
23818 }
23819 } else {
23820 peg$currPos = s2;
23821 s2 = peg$c2;
23822 }
23823 } else {
23824 peg$currPos = s2;
23825 s2 = peg$c2;
23826 }
23827 } else {
23828 peg$currPos = s2;
23829 s2 = peg$c2;
23830 }
23831 } else {
23832 peg$currPos = s2;
23833 s2 = peg$c2;
23834 }
23835 } else {
23836 peg$currPos = s2;
23837 s2 = peg$c2;
23838 }
23839 if (s2 !== peg$FAILED) {
23840 peg$reportedPos = s0;
23841 s1 = peg$c120(s2);
23842 s0 = s1;
23843 } else {
23844 peg$currPos = s0;
23845 s0 = peg$c2;
23846 }
23847 } else {
23848 peg$currPos = s0;
23849 s0 = peg$c2;
23850 }
23851 if (s0 === peg$FAILED) {
23852 s0 = peg$currPos;
23853 if (input.substr(peg$currPos, 2) === peg$c121) {
23854 s1 = peg$c121;
23855 peg$currPos += 2;
23856 } else {
23857 s1 = peg$FAILED;
23858 if (peg$silentFails === 0) { peg$fail(peg$c122); }
23859 }
23860 if (s1 !== peg$FAILED) {
23861 s2 = peg$currPos;
23862 s3 = peg$parseHEX();
23863 if (s3 !== peg$FAILED) {
23864 s4 = peg$parseHEX();
23865 if (s4 !== peg$FAILED) {
23866 s5 = peg$parseHEX();
23867 if (s5 !== peg$FAILED) {
23868 s6 = peg$parseHEX();
23869 if (s6 !== peg$FAILED) {
23870 s3 = [s3, s4, s5, s6];
23871 s2 = s3;
23872 } else {
23873 peg$currPos = s2;
23874 s2 = peg$c2;
23875 }
23876 } else {
23877 peg$currPos = s2;
23878 s2 = peg$c2;
23879 }
23880 } else {
23881 peg$currPos = s2;
23882 s2 = peg$c2;
23883 }
23884 } else {
23885 peg$currPos = s2;
23886 s2 = peg$c2;
23887 }
23888 if (s2 !== peg$FAILED) {
23889 peg$reportedPos = s0;
23890 s1 = peg$c120(s2);
23891 s0 = s1;
23892 } else {
23893 peg$currPos = s0;
23894 s0 = peg$c2;
23895 }
23896 } else {
23897 peg$currPos = s0;
23898 s0 = peg$c2;
23899 }
23900 }
23901
23902 peg$cache[key] = { nextPos: peg$currPos, result: s0 };
23903
23904 return s0;
23905 }
23906
23907
23908 var nodes = [];
23909
23910 function genError(err, line, col) {
23911 var ex = new Error(err);
23912 ex.line = line;
23913 ex.column = col;
23914 throw ex;
23915 }
23916
23917 function addNode(node) {
23918 nodes.push(node);
23919 }
23920
23921 function node(type, value, line, column, key) {
23922 var obj = { type: type, value: value, line: line(), column: column() };
23923 if (key) obj.key = key;
23924 return obj;
23925 }
23926
23927 function convertCodePoint(str, line, col) {
23928 var num = parseInt("0x" + str);
23929
23930 if (
23931 !isFinite(num) ||
23932 Math.floor(num) != num ||
23933 num < 0 ||
23934 num > 0x10FFFF ||
23935 (num > 0xD7FF && num < 0xE000)
23936 ) {
23937 genError("Invalid Unicode escape code: " + str, line, col);
23938 } else {
23939 return fromCodePoint(num);
23940 }
23941 }
23942
23943 function fromCodePoint() {
23944 var MAX_SIZE = 0x4000;
23945 var codeUnits = [];
23946 var highSurrogate;
23947 var lowSurrogate;
23948 var index = -1;
23949 var length = arguments.length;
23950 if (!length) {
23951 return '';
23952 }
23953 var result = '';
23954 while (++index < length) {
23955 var codePoint = Number(arguments[index]);
23956 if (codePoint <= 0xFFFF) { // BMP code point
23957 codeUnits.push(codePoint);
23958 } else { // Astral code point; split in surrogate halves
23959 // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
23960 codePoint -= 0x10000;
23961 highSurrogate = (codePoint >> 10) + 0xD800;
23962 lowSurrogate = (codePoint % 0x400) + 0xDC00;
23963 codeUnits.push(highSurrogate, lowSurrogate);
23964 }
23965 if (index + 1 == length || codeUnits.length > MAX_SIZE) {
23966 result += String.fromCharCode.apply(null, codeUnits);
23967 codeUnits.length = 0;
23968 }
23969 }
23970 return result;
23971 }
23972
23973
23974 peg$result = peg$startRuleFunction();
23975
23976 if (peg$result !== peg$FAILED && peg$currPos === input.length) {
23977 return peg$result;
23978 } else {
23979 if (peg$result !== peg$FAILED && peg$currPos < input.length) {
23980 peg$fail({ type: "end", description: "end of input" });
23981 }
23982
23983 throw peg$buildException(null, peg$maxFailExpected, peg$maxFailPos);
23984 }
23985 }
23986
23987 return {
23988 SyntaxError: SyntaxError,
23989 parse: parse
23990 };
23991 })();
23992
23993
23994 19928 /***/ }),
23995 19929
23996 19930 /***/ 770:
@@ -57628,8 +53562,1136 @@ const parse = function (data, opts = {}) {
57628 53562
57629 53563 // EXTERNAL MODULE: ./node_modules/lodash/lodash.js
57630 53564 var lodash = __nccwpck_require__(2356);
57631 // EXTERNAL MODULE: ./node_modules/toml/index.js
57632 var toml = __nccwpck_require__(2132);
53565 +;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/error.js
53566 +/*!
53567 + * Copyright (c) Squirrel Chat et al., All rights reserved.
53568 + * SPDX-License-Identifier: BSD-3-Clause
53569 + *
53570 + * Redistribution and use in source and binary forms, with or without
53571 + * modification, are permitted provided that the following conditions are met:
53572 + *
53573 + * 1. Redistributions of source code must retain the above copyright notice, this
53574 + * list of conditions and the following disclaimer.
53575 + * 2. Redistributions in binary form must reproduce the above copyright notice,
53576 + * this list of conditions and the following disclaimer in the
53577 + * documentation and/or other materials provided with the distribution.
53578 + * 3. Neither the name of the copyright holder nor the names of its contributors
53579 + * may be used to endorse or promote products derived from this software without
53580 + * specific prior written permission.
53581 + *
53582 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
53583 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
53584 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
53585 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
53586 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53587 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
53588 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
53589 + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
53590 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53591 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53592 + */
53593 +function getLineColFromPtr(string, ptr) {
53594 + let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
53595 + return [lines.length, lines.pop().length + 1];
53596 +}
53597 +function makeCodeBlock(string, line, column) {
53598 + let lines = string.split(/\r\n|\n|\r/g);
53599 + let codeblock = '';
53600 + let numberLen = (Math.log10(line + 1) | 0) + 1;
53601 + for (let i = line - 1; i <= line + 1; i++) {
53602 + let l = lines[i - 1];
53603 + if (!l)
53604 + continue;
53605 + codeblock += i.toString().padEnd(numberLen, ' ');
53606 + codeblock += ': ';
53607 + codeblock += l;
53608 + codeblock += '\n';
53609 + if (i === line) {
53610 + codeblock += ' '.repeat(numberLen + column + 2);
53611 + codeblock += '^\n';
53612 + }
53613 + }
53614 + return codeblock;
53615 +}
53616 +class TomlError extends Error {
53617 + line;
53618 + column;
53619 + codeblock;
53620 + constructor(message, options) {
53621 + const [line, column] = getLineColFromPtr(options.toml, options.ptr);
53622 + const codeblock = makeCodeBlock(options.toml, line, column);
53623 + super(`Invalid TOML document: ${message}\n\n${codeblock}`, options);
53624 + this.line = line;
53625 + this.column = column;
53626 + this.codeblock = codeblock;
53627 + }
53628 +}
53629 +
53630 +;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/util.js
53631 +/*!
53632 + * Copyright (c) Squirrel Chat et al., All rights reserved.
53633 + * SPDX-License-Identifier: BSD-3-Clause
53634 + *
53635 + * Redistribution and use in source and binary forms, with or without
53636 + * modification, are permitted provided that the following conditions are met:
53637 + *
53638 + * 1. Redistributions of source code must retain the above copyright notice, this
53639 + * list of conditions and the following disclaimer.
53640 + * 2. Redistributions in binary form must reproduce the above copyright notice,
53641 + * this list of conditions and the following disclaimer in the
53642 + * documentation and/or other materials provided with the distribution.
53643 + * 3. Neither the name of the copyright holder nor the names of its contributors
53644 + * may be used to endorse or promote products derived from this software without
53645 + * specific prior written permission.
53646 + *
53647 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
53648 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
53649 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
53650 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
53651 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53652 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
53653 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
53654 + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
53655 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53656 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53657 + */
53658 +
53659 +function isEscaped(str, ptr) {
53660 + let i = 0;
53661 + while (str[ptr - ++i] === '\\')
53662 + ;
53663 + return --i && (i % 2);
53664 +}
53665 +function indexOfNewline(str, start = 0, end = str.length) {
53666 + let idx = str.indexOf('\n', start);
53667 + if (str[idx - 1] === '\r')
53668 + idx--;
53669 + return idx <= end ? idx : -1;
53670 +}
53671 +function skipComment(str, ptr) {
53672 + for (let i = ptr; i < str.length; i++) {
53673 + let c = str[i];
53674 + if (c === '\n')
53675 + return i;
53676 + if (c === '\r' && str[i + 1] === '\n')
53677 + return i + 1;
53678 + if ((c < '\x20' && c !== '\t') || c === '\x7f') {
53679 + throw new TomlError('control characters are not allowed in comments', {
53680 + toml: str,
53681 + ptr: ptr,
53682 + });
53683 + }
53684 + }
53685 + return str.length;
53686 +}
53687 +function skipVoid(str, ptr, banNewLines, banComments) {
53688 + let c;
53689 + while (1) {
53690 + while ((c = str[ptr]) === ' ' || c === '\t' || (!banNewLines && (c === '\n' || c === '\r' && str[ptr + 1] === '\n')))
53691 + ptr++;
53692 + // Tucking the return statement here would save 5 characters >:)
53693 + // But TypeScript fails to detect there is no way to exit the loop so it complains about the lack of final return
53694 + if (banComments || c !== '#')
53695 + break;
53696 + ptr = skipComment(str, ptr);
53697 + }
53698 + return ptr;
53699 +}
53700 +function skipUntil(str, ptr, sep, end, banNewLines = false) {
53701 + if (!end) {
53702 + ptr = indexOfNewline(str, ptr);
53703 + return ptr < 0 ? str.length : ptr;
53704 + }
53705 + for (let i = ptr; i < str.length; i++) {
53706 + let c = str[i];
53707 + if (c === '#') {
53708 + i = indexOfNewline(str, i);
53709 + }
53710 + else if (c === sep) {
53711 + return i + 1;
53712 + }
53713 + else if (c === end || (banNewLines && (c === '\n' || (c === '\r' && str[i + 1] === '\n')))) {
53714 + return i;
53715 + }
53716 + }
53717 + throw new TomlError('cannot find end of structure', {
53718 + toml: str,
53719 + ptr: ptr
53720 + });
53721 +}
53722 +function getStringEnd(str, seek) {
53723 + let first = str[seek];
53724 + let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2]
53725 + ? str.slice(seek, seek + 3)
53726 + : first;
53727 + seek += target.length - 1;
53728 + do
53729 + seek = str.indexOf(target, ++seek);
53730 + while (seek > -1 && first !== "'" && isEscaped(str, seek));
53731 + if (seek > -1) {
53732 + seek += target.length;
53733 + if (target.length > 1) {
53734 + if (str[seek] === first)
53735 + seek++;
53736 + if (str[seek] === first)
53737 + seek++;
53738 + }
53739 + }
53740 + return seek;
53741 +}
53742 +
53743 +;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/date.js
53744 +/*!
53745 + * Copyright (c) Squirrel Chat et al., All rights reserved.
53746 + * SPDX-License-Identifier: BSD-3-Clause
53747 + *
53748 + * Redistribution and use in source and binary forms, with or without
53749 + * modification, are permitted provided that the following conditions are met:
53750 + *
53751 + * 1. Redistributions of source code must retain the above copyright notice, this
53752 + * list of conditions and the following disclaimer.
53753 + * 2. Redistributions in binary form must reproduce the above copyright notice,
53754 + * this list of conditions and the following disclaimer in the
53755 + * documentation and/or other materials provided with the distribution.
53756 + * 3. Neither the name of the copyright holder nor the names of its contributors
53757 + * may be used to endorse or promote products derived from this software without
53758 + * specific prior written permission.
53759 + *
53760 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
53761 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
53762 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
53763 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
53764 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53765 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
53766 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
53767 + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
53768 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53769 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53770 + */
53771 +let DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
53772 +class TomlDate extends Date {
53773 + #hasDate = false;
53774 + #hasTime = false;
53775 + #offset = null;
53776 + constructor(date) {
53777 + let hasDate = true;
53778 + let hasTime = true;
53779 + let offset = 'Z';
53780 + if (typeof date === 'string') {
53781 + let match = date.match(DATE_TIME_RE);
53782 + if (match) {
53783 + if (!match[1]) {
53784 + hasDate = false;
53785 + date = `0000-01-01T${date}`;
53786 + }
53787 + hasTime = !!match[2];
53788 + // Make sure to use T instead of a space. Breaks in case of extreme values otherwise.
53789 + hasTime && date[10] === ' ' && (date = date.replace(' ', 'T'));
53790 + // Do not allow rollover hours.
53791 + if (match[2] && +match[2] > 23) {
53792 + date = '';
53793 + }
53794 + else {
53795 + offset = match[3] || null;
53796 + date = date.toUpperCase();
53797 + if (!offset && hasTime)
53798 + date += 'Z';
53799 + }
53800 + }
53801 + else {
53802 + date = '';
53803 + }
53804 + }
53805 + super(date);
53806 + if (!isNaN(this.getTime())) {
53807 + this.#hasDate = hasDate;
53808 + this.#hasTime = hasTime;
53809 + this.#offset = offset;
53810 + }
53811 + }
53812 + isDateTime() {
53813 + return this.#hasDate && this.#hasTime;
53814 + }
53815 + isLocal() {
53816 + return !this.#hasDate || !this.#hasTime || !this.#offset;
53817 + }
53818 + isDate() {
53819 + return this.#hasDate && !this.#hasTime;
53820 + }
53821 + isTime() {
53822 + return this.#hasTime && !this.#hasDate;
53823 + }
53824 + isValid() {
53825 + return this.#hasDate || this.#hasTime;
53826 + }
53827 + toISOString() {
53828 + let iso = super.toISOString();
53829 + // Local Date
53830 + if (this.isDate())
53831 + return iso.slice(0, 10);
53832 + // Local Time
53833 + if (this.isTime())
53834 + return iso.slice(11, 23);
53835 + // Local DateTime
53836 + if (this.#offset === null)
53837 + return iso.slice(0, -1);
53838 + // Offset DateTime
53839 + if (this.#offset === 'Z')
53840 + return iso;
53841 + // This part is quite annoying: JS strips the original timezone from the ISO string representation
53842 + // Instead of using a "modified" date and "Z", we restore the representation "as authored"
53843 + let offset = (+(this.#offset.slice(1, 3)) * 60) + +(this.#offset.slice(4, 6));
53844 + offset = this.#offset[0] === '-' ? offset : -offset;
53845 + let offsetDate = new Date(this.getTime() - (offset * 60e3));
53846 + return offsetDate.toISOString().slice(0, -1) + this.#offset;
53847 + }
53848 + static wrapAsOffsetDateTime(jsDate, offset = 'Z') {
53849 + let date = new TomlDate(jsDate);
53850 + date.#offset = offset;
53851 + return date;
53852 + }
53853 + static wrapAsLocalDateTime(jsDate) {
53854 + let date = new TomlDate(jsDate);
53855 + date.#offset = null;
53856 + return date;
53857 + }
53858 + static wrapAsLocalDate(jsDate) {
53859 + let date = new TomlDate(jsDate);
53860 + date.#hasTime = false;
53861 + date.#offset = null;
53862 + return date;
53863 + }
53864 + static wrapAsLocalTime(jsDate) {
53865 + let date = new TomlDate(jsDate);
53866 + date.#hasDate = false;
53867 + date.#offset = null;
53868 + return date;
53869 + }
53870 +}
53871 +
53872 +;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/primitive.js
53873 +/*!
53874 + * Copyright (c) Squirrel Chat et al., All rights reserved.
53875 + * SPDX-License-Identifier: BSD-3-Clause
53876 + *
53877 + * Redistribution and use in source and binary forms, with or without
53878 + * modification, are permitted provided that the following conditions are met:
53879 + *
53880 + * 1. Redistributions of source code must retain the above copyright notice, this
53881 + * list of conditions and the following disclaimer.
53882 + * 2. Redistributions in binary form must reproduce the above copyright notice,
53883 + * this list of conditions and the following disclaimer in the
53884 + * documentation and/or other materials provided with the distribution.
53885 + * 3. Neither the name of the copyright holder nor the names of its contributors
53886 + * may be used to endorse or promote products derived from this software without
53887 + * specific prior written permission.
53888 + *
53889 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
53890 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
53891 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
53892 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
53893 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53894 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
53895 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
53896 + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
53897 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53898 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53899 + */
53900 +
53901 +
53902 +
53903 +let INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
53904 +let FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
53905 +let LEADING_ZERO = /^[+-]?0[0-9_]/;
53906 +let ESCAPE_REGEX = /^[0-9a-f]{2,8}$/i;
53907 +let ESC_MAP = {
53908 + b: '\b',
53909 + t: '\t',
53910 + n: '\n',
53911 + f: '\f',
53912 + r: '\r',
53913 + e: '\x1b',
53914 + '"': '"',
53915 + '\\': '\\',
53916 +};
53917 +function parseString(str, ptr = 0, endPtr = str.length) {
53918 + let isLiteral = str[ptr] === '\'';
53919 + let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
53920 + if (isMultiline) {
53921 + endPtr -= 2;
53922 + if (str[ptr += 2] === '\r')
53923 + ptr++;
53924 + if (str[ptr] === '\n')
53925 + ptr++;
53926 + }
53927 + let tmp = 0;
53928 + let isEscape;
53929 + let parsed = '';
53930 + let sliceStart = ptr;
53931 + while (ptr < endPtr - 1) {
53932 + let c = str[ptr++];
53933 + if (c === '\n' || (c === '\r' && str[ptr] === '\n')) {
53934 + if (!isMultiline) {
53935 + throw new TomlError('newlines are not allowed in strings', {
53936 + toml: str,
53937 + ptr: ptr - 1,
53938 + });
53939 + }
53940 + }
53941 + else if ((c < '\x20' && c !== '\t') || c === '\x7f') {
53942 + throw new TomlError('control characters are not allowed in strings', {
53943 + toml: str,
53944 + ptr: ptr - 1,
53945 + });
53946 + }
53947 + if (isEscape) {
53948 + isEscape = false;
53949 + if (c === 'x' || c === 'u' || c === 'U') {
53950 + // Unicode escape
53951 + let code = str.slice(ptr, (ptr += (c === 'x' ? 2 : c === 'u' ? 4 : 8)));
53952 + if (!ESCAPE_REGEX.test(code)) {
53953 + throw new TomlError('invalid unicode escape', {
53954 + toml: str,
53955 + ptr: tmp,
53956 + });
53957 + }
53958 + try {
53959 + parsed += String.fromCodePoint(parseInt(code, 16));
53960 + }
53961 + catch {
53962 + throw new TomlError('invalid unicode escape', {
53963 + toml: str,
53964 + ptr: tmp,
53965 + });
53966 + }
53967 + }
53968 + else if (isMultiline && (c === '\n' || c === ' ' || c === '\t' || c === '\r')) {
53969 + // Multiline escape
53970 + ptr = skipVoid(str, ptr - 1, true);
53971 + if (str[ptr] !== '\n' && str[ptr] !== '\r') {
53972 + throw new TomlError('invalid escape: only line-ending whitespace may be escaped', {
53973 + toml: str,
53974 + ptr: tmp,
53975 + });
53976 + }
53977 + ptr = skipVoid(str, ptr);
53978 + }
53979 + else if (c in ESC_MAP) {
53980 + // Classic escape
53981 + parsed += ESC_MAP[c];
53982 + }
53983 + else {
53984 + throw new TomlError('unrecognized escape sequence', {
53985 + toml: str,
53986 + ptr: tmp,
53987 + });
53988 + }
53989 + sliceStart = ptr;
53990 + }
53991 + else if (!isLiteral && c === '\\') {
53992 + tmp = ptr - 1;
53993 + isEscape = true;
53994 + parsed += str.slice(sliceStart, tmp);
53995 + }
53996 + }
53997 + return parsed + str.slice(sliceStart, endPtr - 1);
53998 +}
53999 +function parseValue(value, toml, ptr, integersAsBigInt) {
54000 + // Constant values
54001 + if (value === 'true')
54002 + return true;
54003 + if (value === 'false')
54004 + return false;
54005 + if (value === '-inf')
54006 + return -Infinity;
54007 + if (value === 'inf' || value === '+inf')
54008 + return Infinity;
54009 + if (value === 'nan' || value === '+nan' || value === '-nan')
54010 + return NaN;
54011 + // Avoid FP representation of -0
54012 + if (value === '-0')
54013 + return integersAsBigInt ? 0n : 0;
54014 + // Numbers
54015 + let isInt = INT_REGEX.test(value);
54016 + if (isInt || FLOAT_REGEX.test(value)) {
54017 + if (LEADING_ZERO.test(value)) {
54018 + throw new TomlError('leading zeroes are not allowed', {
54019 + toml: toml,
54020 + ptr: ptr,
54021 + });
54022 + }
54023 + value = value.replace(/_/g, '');
54024 + let numeric = +value;
54025 + if (isNaN(numeric)) {
54026 + throw new TomlError('invalid number', {
54027 + toml: toml,
54028 + ptr: ptr,
54029 + });
54030 + }
54031 + if (isInt) {
54032 + if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
54033 + throw new TomlError('integer value cannot be represented losslessly', {
54034 + toml: toml,
54035 + ptr: ptr,
54036 + });
54037 + }
54038 + if (isInt || integersAsBigInt === true)
54039 + numeric = BigInt(value);
54040 + }
54041 + return numeric;
54042 + }
54043 + const date = new TomlDate(value);
54044 + if (!date.isValid()) {
54045 + throw new TomlError('invalid value', {
54046 + toml: toml,
54047 + ptr: ptr,
54048 + });
54049 + }
54050 + return date;
54051 +}
54052 +
54053 +;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/extract.js
54054 +/*!
54055 + * Copyright (c) Squirrel Chat et al., All rights reserved.
54056 + * SPDX-License-Identifier: BSD-3-Clause
54057 + *
54058 + * Redistribution and use in source and binary forms, with or without
54059 + * modification, are permitted provided that the following conditions are met:
54060 + *
54061 + * 1. Redistributions of source code must retain the above copyright notice, this
54062 + * list of conditions and the following disclaimer.
54063 + * 2. Redistributions in binary form must reproduce the above copyright notice,
54064 + * this list of conditions and the following disclaimer in the
54065 + * documentation and/or other materials provided with the distribution.
54066 + * 3. Neither the name of the copyright holder nor the names of its contributors
54067 + * may be used to endorse or promote products derived from this software without
54068 + * specific prior written permission.
54069 + *
54070 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
54071 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
54072 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
54073 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
54074 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54075 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54076 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
54077 + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
54078 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54079 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54080 + */
54081 +
54082 +
54083 +
54084 +
54085 +function sliceAndTrimEndOf(str, startPtr, endPtr) {
54086 + let value = str.slice(startPtr, endPtr);
54087 + let commentIdx = value.indexOf('#');
54088 + if (commentIdx > -1) {
54089 + // The call to skipComment allows to "validate" the comment
54090 + // (absence of control characters)
54091 + skipComment(str, commentIdx);
54092 + value = value.slice(0, commentIdx);
54093 + }
54094 + return [value.trimEnd(), commentIdx];
54095 +}
54096 +function extractValue(str, ptr, end, depth, integersAsBigInt) {
54097 + if (depth === 0) {
54098 + throw new TomlError('document contains excessively nested structures. aborting.', {
54099 + toml: str,
54100 + ptr: ptr
54101 + });
54102 + }
54103 + let c = str[ptr];
54104 + if (c === '[' || c === '{') {
54105 + let [value, endPtr] = c === '['
54106 + ? parseArray(str, ptr, depth, integersAsBigInt)
54107 + : parseInlineTable(str, ptr, depth, integersAsBigInt);
54108 + if (end) {
54109 + endPtr = skipVoid(str, endPtr);
54110 + if (str[endPtr] === ',')
54111 + endPtr++;
54112 + else if (str[endPtr] !== end) {
54113 + throw new TomlError('expected comma or end of structure', {
54114 + toml: str,
54115 + ptr: endPtr,
54116 + });
54117 + }
54118 + }
54119 + return [value, endPtr];
54120 + }
54121 + let endPtr;
54122 + if (c === '"' || c === "'") {
54123 + endPtr = getStringEnd(str, ptr);
54124 + let parsed = parseString(str, ptr, endPtr);
54125 + if (end) {
54126 + endPtr = skipVoid(str, endPtr);
54127 + if (str[endPtr] && str[endPtr] !== ',' && str[endPtr] !== end && str[endPtr] !== '\n' && str[endPtr] !== '\r') {
54128 + throw new TomlError('unexpected character encountered', {
54129 + toml: str,
54130 + ptr: endPtr,
54131 + });
54132 + }
54133 + endPtr += (+(str[endPtr] === ','));
54134 + }
54135 + return [parsed, endPtr];
54136 + }
54137 + endPtr = skipUntil(str, ptr, ',', end);
54138 + let slice = sliceAndTrimEndOf(str, ptr, endPtr - (+(str[endPtr - 1] === ',')));
54139 + if (!slice[0]) {
54140 + throw new TomlError('incomplete key-value declaration: no value specified', {
54141 + toml: str,
54142 + ptr: ptr
54143 + });
54144 + }
54145 + if (end && slice[1] > -1) {
54146 + endPtr = skipVoid(str, ptr + slice[1]);
54147 + endPtr += +(str[endPtr] === ',');
54148 + }
54149 + return [
54150 + parseValue(slice[0], str, ptr, integersAsBigInt),
54151 + endPtr,
54152 + ];
54153 +}
54154 +
54155 +;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/struct.js
54156 +/*!
54157 + * Copyright (c) Squirrel Chat et al., All rights reserved.
54158 + * SPDX-License-Identifier: BSD-3-Clause
54159 + *
54160 + * Redistribution and use in source and binary forms, with or without
54161 + * modification, are permitted provided that the following conditions are met:
54162 + *
54163 + * 1. Redistributions of source code must retain the above copyright notice, this
54164 + * list of conditions and the following disclaimer.
54165 + * 2. Redistributions in binary form must reproduce the above copyright notice,
54166 + * this list of conditions and the following disclaimer in the
54167 + * documentation and/or other materials provided with the distribution.
54168 + * 3. Neither the name of the copyright holder nor the names of its contributors
54169 + * may be used to endorse or promote products derived from this software without
54170 + * specific prior written permission.
54171 + *
54172 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
54173 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
54174 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
54175 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
54176 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54177 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54178 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
54179 + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
54180 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54181 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54182 + */
54183 +
54184 +
54185 +
54186 +
54187 +let KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
54188 +function parseKey(str, ptr, end = '=') {
54189 + let dot = ptr - 1;
54190 + let parsed = [];
54191 + let endPtr = str.indexOf(end, ptr);
54192 + if (endPtr < 0) {
54193 + throw new TomlError('incomplete key-value: cannot find end of key', {
54194 + toml: str,
54195 + ptr: ptr,
54196 + });
54197 + }
54198 + do {
54199 + let c = str[ptr = ++dot];
54200 + // If it's whitespace, ignore
54201 + if (c !== ' ' && c !== '\t') {
54202 + // If it's a string
54203 + if (c === '"' || c === '\'') {
54204 + if (c === str[ptr + 1] && c === str[ptr + 2]) {
54205 + throw new TomlError('multiline strings are not allowed in keys', {
54206 + toml: str,
54207 + ptr: ptr,
54208 + });
54209 + }
54210 + let eos = getStringEnd(str, ptr);
54211 + if (eos < 0) {
54212 + throw new TomlError('unfinished string encountered', {
54213 + toml: str,
54214 + ptr: ptr,
54215 + });
54216 + }
54217 + dot = str.indexOf('.', eos);
54218 + let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
54219 + let newLine = indexOfNewline(strEnd);
54220 + if (newLine > -1) {
54221 + throw new TomlError('newlines are not allowed in keys', {
54222 + toml: str,
54223 + ptr: ptr + dot + newLine,
54224 + });
54225 + }
54226 + if (strEnd.trimStart()) {
54227 + throw new TomlError('found extra tokens after the string part', {
54228 + toml: str,
54229 + ptr: eos,
54230 + });
54231 + }
54232 + if (endPtr < eos) {
54233 + endPtr = str.indexOf(end, eos);
54234 + if (endPtr < 0) {
54235 + throw new TomlError('incomplete key-value: cannot find end of key', {
54236 + toml: str,
54237 + ptr: ptr,
54238 + });
54239 + }
54240 + }
54241 + parsed.push(parseString(str, ptr, eos));
54242 + }
54243 + else {
54244 + // Normal raw key part consumption and validation
54245 + dot = str.indexOf('.', ptr);
54246 + let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
54247 + if (!KEY_PART_RE.test(part)) {
54248 + throw new TomlError('only letter, numbers, dashes and underscores are allowed in keys', {
54249 + toml: str,
54250 + ptr: ptr,
54251 + });
54252 + }
54253 + parsed.push(part.trimEnd());
54254 + }
54255 + }
54256 + // Until there's no more dot
54257 + } while (dot + 1 && dot < endPtr);
54258 + return [parsed, skipVoid(str, endPtr + 1, true, true)];
54259 +}
54260 +function parseInlineTable(str, ptr, depth, integersAsBigInt) {
54261 + let res = {};
54262 + let seen = new Set();
54263 + let c;
54264 + ptr++;
54265 + while ((c = str[ptr++]) !== '}' && c) {
54266 + if (c === ',') {
54267 + throw new TomlError('expected value, found comma', {
54268 + toml: str,
54269 + ptr: ptr - 1,
54270 + });
54271 + }
54272 + else if (c === '#')
54273 + ptr = skipComment(str, ptr);
54274 + else if (c !== ' ' && c !== '\t' && c !== '\n' && c !== '\r') {
54275 + let k;
54276 + let t = res;
54277 + let hasOwn = false;
54278 + let [key, keyEndPtr] = parseKey(str, ptr - 1);
54279 + for (let i = 0; i < key.length; i++) {
54280 + if (i)
54281 + t = hasOwn ? t[k] : (t[k] = {});
54282 + k = key[i];
54283 + if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== 'object' || seen.has(t[k]))) {
54284 + throw new TomlError('trying to redefine an already defined value', {
54285 + toml: str,
54286 + ptr: ptr,
54287 + });
54288 + }
54289 + if (!hasOwn && k === '__proto__') {
54290 + Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
54291 + }
54292 + }
54293 + if (hasOwn) {
54294 + throw new TomlError('trying to redefine an already defined value', {
54295 + toml: str,
54296 + ptr: ptr,
54297 + });
54298 + }
54299 + let [value, valueEndPtr] = extractValue(str, keyEndPtr, '}', depth - 1, integersAsBigInt);
54300 + seen.add(value);
54301 + t[k] = value;
54302 + ptr = valueEndPtr;
54303 + }
54304 + }
54305 + if (!c) {
54306 + throw new TomlError('unfinished table encountered', {
54307 + toml: str,
54308 + ptr: ptr,
54309 + });
54310 + }
54311 + return [res, ptr];
54312 +}
54313 +function parseArray(str, ptr, depth, integersAsBigInt) {
54314 + let res = [];
54315 + let c;
54316 + ptr++;
54317 + while ((c = str[ptr++]) !== ']' && c) {
54318 + if (c === ',') {
54319 + throw new TomlError('expected value, found comma', {
54320 + toml: str,
54321 + ptr: ptr - 1,
54322 + });
54323 + }
54324 + else if (c === '#')
54325 + ptr = skipComment(str, ptr);
54326 + else if (c !== ' ' && c !== '\t' && c !== '\n' && c !== '\r') {
54327 + let e = extractValue(str, ptr - 1, ']', depth - 1, integersAsBigInt);
54328 + res.push(e[0]);
54329 + ptr = e[1];
54330 + }
54331 + }
54332 + if (!c) {
54333 + throw new TomlError('unfinished array encountered', {
54334 + toml: str,
54335 + ptr: ptr,
54336 + });
54337 + }
54338 + return [res, ptr];
54339 +}
54340 +
54341 +;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/parse.js
54342 +/*!
54343 + * Copyright (c) Squirrel Chat et al., All rights reserved.
54344 + * SPDX-License-Identifier: BSD-3-Clause
54345 + *
54346 + * Redistribution and use in source and binary forms, with or without
54347 + * modification, are permitted provided that the following conditions are met:
54348 + *
54349 + * 1. Redistributions of source code must retain the above copyright notice, this
54350 + * list of conditions and the following disclaimer.
54351 + * 2. Redistributions in binary form must reproduce the above copyright notice,
54352 + * this list of conditions and the following disclaimer in the
54353 + * documentation and/or other materials provided with the distribution.
54354 + * 3. Neither the name of the copyright holder nor the names of its contributors
54355 + * may be used to endorse or promote products derived from this software without
54356 + * specific prior written permission.
54357 + *
54358 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
54359 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
54360 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
54361 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
54362 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54363 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54364 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
54365 + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
54366 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54367 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54368 + */
54369 +
54370 +
54371 +
54372 +
54373 +function peekTable(key, table, meta, type) {
54374 + let t = table;
54375 + let m = meta;
54376 + let k;
54377 + let hasOwn = false;
54378 + let state;
54379 + for (let i = 0; i < key.length; i++) {
54380 + if (i) {
54381 + t = hasOwn ? t[k] : (t[k] = {});
54382 + m = (state = m[k]).c;
54383 + if (type === 0 /* Type.DOTTED */ && (state.t === 1 /* Type.EXPLICIT */ || state.t === 2 /* Type.ARRAY */)) {
54384 + return null;
54385 + }
54386 + if (state.t === 2 /* Type.ARRAY */) {
54387 + let l = t.length - 1;
54388 + t = t[l];
54389 + m = m[l].c;
54390 + }
54391 + }
54392 + k = key[i];
54393 + if ((hasOwn = Object.hasOwn(t, k)) && m[k]?.t === 0 /* Type.DOTTED */ && m[k]?.d) {
54394 + return null;
54395 + }
54396 + if (!hasOwn) {
54397 + if (k === '__proto__') {
54398 + Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
54399 + Object.defineProperty(m, k, { enumerable: true, configurable: true, writable: true });
54400 + }
54401 + m[k] = {
54402 + t: i < key.length - 1 && type === 2 /* Type.ARRAY */
54403 + ? 3 /* Type.ARRAY_DOTTED */
54404 + : type,
54405 + d: false,
54406 + i: 0,
54407 + c: {},
54408 + };
54409 + }
54410 + }
54411 + state = m[k];
54412 + if (state.t !== type && !(type === 1 /* Type.EXPLICIT */ && state.t === 3 /* Type.ARRAY_DOTTED */)) {
54413 + // Bad key type!
54414 + return null;
54415 + }
54416 + if (type === 2 /* Type.ARRAY */) {
54417 + if (!state.d) {
54418 + state.d = true;
54419 + t[k] = [];
54420 + }
54421 + t[k].push(t = {});
54422 + state.c[state.i++] = (state = { t: 1 /* Type.EXPLICIT */, d: false, i: 0, c: {} });
54423 + }
54424 + if (state.d) {
54425 + // Redefining a table!
54426 + return null;
54427 + }
54428 + state.d = true;
54429 + if (type === 1 /* Type.EXPLICIT */) {
54430 + t = hasOwn ? t[k] : (t[k] = {});
54431 + }
54432 + else if (type === 0 /* Type.DOTTED */ && hasOwn) {
54433 + return null;
54434 + }
54435 + return [k, t, state.c];
54436 +}
54437 +function parse_parse(toml, { maxDepth = 1000, integersAsBigInt } = {}) {
54438 + let res = {};
54439 + let meta = {};
54440 + let tbl = res;
54441 + let m = meta;
54442 + for (let ptr = skipVoid(toml, 0); ptr < toml.length;) {
54443 + if (toml[ptr] === '[') {
54444 + let isTableArray = toml[++ptr] === '[';
54445 + let k = parseKey(toml, ptr += +isTableArray, ']');
54446 + if (isTableArray) {
54447 + if (toml[k[1] - 1] !== ']') {
54448 + throw new TomlError('expected end of table declaration', {
54449 + toml: toml,
54450 + ptr: k[1] - 1,
54451 + });
54452 + }
54453 + k[1]++;
54454 + }
54455 + let p = peekTable(k[0], res, meta, isTableArray ? 2 /* Type.ARRAY */ : 1 /* Type.EXPLICIT */);
54456 + if (!p) {
54457 + throw new TomlError('trying to redefine an already defined table or value', {
54458 + toml: toml,
54459 + ptr: ptr,
54460 + });
54461 + }
54462 + m = p[2];
54463 + tbl = p[1];
54464 + ptr = k[1];
54465 + }
54466 + else {
54467 + let k = parseKey(toml, ptr);
54468 + let p = peekTable(k[0], tbl, m, 0 /* Type.DOTTED */);
54469 + if (!p) {
54470 + throw new TomlError('trying to redefine an already defined table or value', {
54471 + toml: toml,
54472 + ptr: ptr,
54473 + });
54474 + }
54475 + let v = extractValue(toml, k[1], void 0, maxDepth, integersAsBigInt);
54476 + p[1][p[0]] = v[0];
54477 + ptr = v[1];
54478 + }
54479 + ptr = skipVoid(toml, ptr, true);
54480 + if (toml[ptr] && toml[ptr] !== '\n' && toml[ptr] !== '\r') {
54481 + throw new TomlError('each key-value declaration must be followed by an end-of-line', {
54482 + toml: toml,
54483 + ptr: ptr
54484 + });
54485 + }
54486 + ptr = skipVoid(toml, ptr);
54487 + }
54488 + return res;
54489 +}
54490 +
54491 +;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/stringify.js
54492 +/*!
54493 + * Copyright (c) Squirrel Chat et al., All rights reserved.
54494 + * SPDX-License-Identifier: BSD-3-Clause
54495 + *
54496 + * Redistribution and use in source and binary forms, with or without
54497 + * modification, are permitted provided that the following conditions are met:
54498 + *
54499 + * 1. Redistributions of source code must retain the above copyright notice, this
54500 + * list of conditions and the following disclaimer.
54501 + * 2. Redistributions in binary form must reproduce the above copyright notice,
54502 + * this list of conditions and the following disclaimer in the
54503 + * documentation and/or other materials provided with the distribution.
54504 + * 3. Neither the name of the copyright holder nor the names of its contributors
54505 + * may be used to endorse or promote products derived from this software without
54506 + * specific prior written permission.
54507 + *
54508 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
54509 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
54510 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
54511 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
54512 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54513 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54514 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
54515 + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
54516 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54517 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54518 + */
54519 +let BARE_KEY = /^[a-z0-9-_]+$/i;
54520 +function extendedTypeOf(obj) {
54521 + let type = typeof obj;
54522 + if (type === 'object') {
54523 + if (Array.isArray(obj))
54524 + return 'array';
54525 + if (obj instanceof Date)
54526 + return 'date';
54527 + }
54528 + return type;
54529 +}
54530 +function isArrayOfTables(obj) {
54531 + for (let i = 0; i < obj.length; i++) {
54532 + if (extendedTypeOf(obj[i]) !== 'object')
54533 + return false;
54534 + }
54535 + return obj.length != 0;
54536 +}
54537 +function formatString(s) {
54538 + return JSON.stringify(s).replace(/\x7f/g, '\\u007f');
54539 +}
54540 +function stringifyValue(val, type, depth, numberAsFloat) {
54541 + if (depth === 0) {
54542 + throw new Error('Could not stringify the object: maximum object depth exceeded');
54543 + }
54544 + if (type === 'number') {
54545 + if (isNaN(val))
54546 + return 'nan';
54547 + if (val === Infinity)
54548 + return 'inf';
54549 + if (val === -Infinity)
54550 + return '-inf';
54551 + if (numberAsFloat && Number.isInteger(val))
54552 + return val.toFixed(1);
54553 + return val.toString();
54554 + }
54555 + if (type === 'bigint' || type === 'boolean') {
54556 + return val.toString();
54557 + }
54558 + if (type === 'string') {
54559 + return formatString(val);
54560 + }
54561 + if (type === 'date') {
54562 + if (isNaN(val.getTime())) {
54563 + throw new TypeError('cannot serialize invalid date');
54564 + }
54565 + return val.toISOString();
54566 + }
54567 + if (type === 'object') {
54568 + return stringifyInlineTable(val, depth, numberAsFloat);
54569 + }
54570 + if (type === 'array') {
54571 + return stringifyArray(val, depth, numberAsFloat);
54572 + }
54573 +}
54574 +function stringifyInlineTable(obj, depth, numberAsFloat) {
54575 + let keys = Object.keys(obj);
54576 + if (keys.length === 0)
54577 + return '{}';
54578 + let res = '{ ';
54579 + for (let i = 0; i < keys.length; i++) {
54580 + let k = keys[i];
54581 + if (i)
54582 + res += ', ';
54583 + res += BARE_KEY.test(k) ? k : formatString(k);
54584 + res += ' = ';
54585 + res += stringifyValue(obj[k], extendedTypeOf(obj[k]), depth - 1, numberAsFloat);
54586 + }
54587 + return res + ' }';
54588 +}
54589 +function stringifyArray(array, depth, numberAsFloat) {
54590 + if (array.length === 0)
54591 + return '[]';
54592 + let res = '[ ';
54593 + for (let i = 0; i < array.length; i++) {
54594 + if (i)
54595 + res += ', ';
54596 + if (array[i] === null || array[i] === void 0) {
54597 + throw new TypeError('arrays cannot contain null or undefined values');
54598 + }
54599 + res += stringifyValue(array[i], extendedTypeOf(array[i]), depth - 1, numberAsFloat);
54600 + }
54601 + return res + ' ]';
54602 +}
54603 +function stringifyArrayTable(array, key, depth, numberAsFloat) {
54604 + if (depth === 0) {
54605 + throw new Error('Could not stringify the object: maximum object depth exceeded');
54606 + }
54607 + let res = '';
54608 + for (let i = 0; i < array.length; i++) {
54609 + res += `${res && '\n'}[[${key}]]\n`;
54610 + res += stringifyTable(0, array[i], key, depth, numberAsFloat);
54611 + }
54612 + return res;
54613 +}
54614 +function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat) {
54615 + if (depth === 0) {
54616 + throw new Error('Could not stringify the object: maximum object depth exceeded');
54617 + }
54618 + let preamble = '';
54619 + let tables = '';
54620 + let keys = Object.keys(obj);
54621 + for (let i = 0; i < keys.length; i++) {
54622 + let k = keys[i];
54623 + if (obj[k] !== null && obj[k] !== void 0) {
54624 + let type = extendedTypeOf(obj[k]);
54625 + if (type === 'symbol' || type === 'function') {
54626 + throw new TypeError(`cannot serialize values of type '${type}'`);
54627 + }
54628 + let key = BARE_KEY.test(k) ? k : formatString(k);
54629 + if (type === 'array' && isArrayOfTables(obj[k])) {
54630 + tables += (tables && '\n') + stringifyArrayTable(obj[k], prefix ? `${prefix}.${key}` : key, depth - 1, numberAsFloat);
54631 + }
54632 + else if (type === 'object') {
54633 + let tblKey = prefix ? `${prefix}.${key}` : key;
54634 + tables += (tables && '\n') + stringifyTable(tblKey, obj[k], tblKey, depth - 1, numberAsFloat);
54635 + }
54636 + else {
54637 + preamble += key;
54638 + preamble += ' = ';
54639 + preamble += stringifyValue(obj[k], type, depth, numberAsFloat);
54640 + preamble += '\n';
54641 + }
54642 + }
54643 + }
54644 + if (tableKey && (preamble || !tables)) // Create table only if necessary
54645 + preamble = preamble ? `[${tableKey}]\n${preamble}` : `[${tableKey}]`;
54646 + return preamble && tables
54647 + ? `${preamble}\n${tables}`
54648 + : preamble || tables;
54649 +}
54650 +function stringify(obj, { maxDepth = 1000, numbersAsFloat = false } = {}) {
54651 + if (extendedTypeOf(obj) !== 'object') {
54652 + throw new TypeError('stringify can only be called with an object');
54653 + }
54654 + let str = stringifyTable(0, obj, '', maxDepth, numbersAsFloat);
54655 + if (str[str.length - 1] !== '\n')
54656 + return str + '\n';
54657 + return str;
54658 +}
54659 +
54660 +;// CONCATENATED MODULE: ./node_modules/smol-toml/dist/index.js
54661 +/*!
54662 + * Copyright (c) Squirrel Chat et al., All rights reserved.
54663 + * SPDX-License-Identifier: BSD-3-Clause
54664 + *
54665 + * Redistribution and use in source and binary forms, with or without
54666 + * modification, are permitted provided that the following conditions are met:
54667 + *
54668 + * 1. Redistributions of source code must retain the above copyright notice, this
54669 + * list of conditions and the following disclaimer.
54670 + * 2. Redistributions in binary form must reproduce the above copyright notice,
54671 + * this list of conditions and the following disclaimer in the
54672 + * documentation and/or other materials provided with the distribution.
54673 + * 3. Neither the name of the copyright holder nor the names of its contributors
54674 + * may be used to endorse or promote products derived from this software without
54675 + * specific prior written permission.
54676 + *
54677 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
54678 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
54679 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
54680 + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
54681 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54682 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54683 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
54684 + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
54685 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54686 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54687 + */
54688 +
54689 +
54690 +
54691 +
54692 +/* harmony default export */ const dist = ({ parse: parse_parse, stringify: stringify, TomlDate: TomlDate, TomlError: TomlError });
54693 +
54694 +
57633 54695 ;// CONCATENATED MODULE: ./src/setup-beam.js
57634 54696
57635 54697
@@ -58469,7 +55531,7 @@ function parseToolVersionsFile(versionFilePath) {
58469 55531 function parseMiseTomlFile(versionFilePath) {
58470 55532 const appVersions = new Map()
58471 55533 const miseToml = external_node_fs_namespaceObject.readFileSync(versionFilePath, 'utf8')
58472 const miseTomlParsed = toml.parse(miseToml)
55534 + const miseTomlParsed = dist.parse(miseToml)
58473 55535 for (const app in miseTomlParsed.tools) {
58474 55536 if (APPS.includes(app)) {
58475 55537 const appVersion = miseTomlParsed.tools[app]
modified package-lock.json
+1 −8
@@ -13,7 +13,7 @@
13 13 "csv-parse": "6.2.1",
14 14 "lodash": "4.17.23",
15 15 "semver": "7.7.4",
16 "toml": "3.0.0"
16 + "smol-toml": "1.6.1"
17 17 },
18 18 "devDependencies": {
19 19 "@eslint/js": "10.0.1",
@@ -3315,7 +3315,6 @@
3315 3315 "version": "1.6.1",
3316 3316 "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz",
3317 3317 "integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==",
3318 "dev": true,
3319 3318 "license": "BSD-3-Clause",
3320 3319 "engines": {
3321 3320 "node": ">= 18"
@@ -3531,12 +3530,6 @@
3531 3530 "url": "https://github.com/sponsors/Borewit"
3532 3531 }
3533 3532 },
3534 "node_modules/toml": {
3535 "version": "3.0.0",
3536 "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz",
3537 "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==",
3538 "license": "MIT"
3539 },
3540 3533 "node_modules/tslib": {
3541 3534 "version": "2.8.1",
3542 3535 "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
modified package.json
+1 −1
@@ -23,7 +23,7 @@
23 23 "csv-parse": "6.2.1",
24 24 "lodash": "4.17.23",
25 25 "semver": "7.7.4",
26 "toml": "3.0.0"
26 + "smol-toml": "1.6.1"
27 27 },
28 28 "devDependencies": {
29 29 "@eslint/js": "10.0.1",
modified src/setup-beam.js
+1 −1
@@ -8,7 +8,7 @@ import * as tc from '@actions/tool-cache'
8 8 import * as semver from 'semver'
9 9 import * as csv from 'csv-parse/sync'
10 10 import _ from 'lodash'
11 import toml from 'toml'
11 +import toml from 'smol-toml'
12 12
13 13 const __dirname = path.dirname(fileURLToPath(import.meta.url))
14 14
modified test/setup-beam.test.js
+3 −1
@@ -1040,7 +1040,9 @@ describe('mise.toml file', () => {
1040 1040 "erlang" = "${erlang}"
1041 1041 elixir = { version = "${elixir}", postinstall="mix deps.get" } # comment, with space and ref:
1042 1042 "not-gleam" = 0.23 # not picked up
1043 "gleam" = "${gleam}" \n`
1043 +"gleam" = "${gleam}"
1044 +[env]
1045 +_.file = ".env"\n`
1044 1046 const filename = 'test/mise.toml'
1045 1047 if (process.platform === 'win32') {
1046 1048 // Force \r\n to test in Windows

Parents: 92dab89