view x/static/js/972.c0d17685.chunk.js.map @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
line wrap: on
line source

{"version":3,"file":"static/js/972.c0d17685.chunk.js","mappings":"iHAcA,SAASA,EAAgBC,EAASC,EAAUC,EAAOC,GACjDC,KAAKJ,QAAWA,EAChBI,KAAKH,SAAWA,EAChBG,KAAKF,MAAWA,EAChBE,KAAKD,SAAWA,EAChBC,KAAKC,KAAW,cAEuB,mBAA5BC,MAAMC,mBACfD,MAAMC,kBAAkBH,KAAML,EAElC,EAhBA,SAAsBS,EAAOC,GAC3B,SAASC,IAASN,KAAKO,YAAcH,CAAO,CAC5CE,EAAKE,UAAYH,EAAOG,UACxBJ,EAAMI,UAAY,IAAIF,CACxB,CAcAG,CAAad,EAAiBO,OAE9BP,EAAgBe,aAAe,SAASb,EAAUC,GAChD,IAAIa,EAA2B,CACzBC,QAAS,SAASC,GAChB,MAAO,IAAOC,EAAcD,EAAYE,MAAQ,GAClD,EAEA,MAAS,SAASF,GAChB,IACIG,EADAC,EAAe,GAGnB,IAAKD,EAAI,EAAGA,EAAIH,EAAYK,MAAMC,OAAQH,IACxCC,GAAgBJ,EAAYK,MAAMF,aAAcI,MAC5CC,EAAYR,EAAYK,MAAMF,GAAG,IAAM,IAAMK,EAAYR,EAAYK,MAAMF,GAAG,IAC9EK,EAAYR,EAAYK,MAAMF,IAGpC,MAAO,KAAOH,EAAYS,SAAW,IAAM,IAAML,EAAe,GAClE,EAEAM,IAAK,SAASV,GACZ,MAAO,eACT,EAEAW,IAAK,SAASX,GACZ,MAAO,cACT,EAEAY,MAAO,SAASZ,GACd,OAAOA,EAAYa,WACrB,GAGN,SAASC,EAAIC,GACX,OAAOA,EAAGC,WAAW,GAAGC,SAAS,IAAIC,aACvC,CAEA,SAASjB,EAAckB,GACrB,OA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mB,CACrB,GAAIf,EAAW,CACb,MAAMgB,EAAMJ,OAAOG,GACnBA,EAAYH,OAAOC,MAAMG,GAAOD,EAAYC,CAC9C,MAAWnB,IACTkB,EAAYA,EAAUL,MAAM,KACY,KAApCK,EAAUA,EAAUhO,OAAS,IAC/BgO,EAAUE,MAERnB,IACFiB,EAAYA,EAAU3B,IAAIwB,UAI9BD,EAAQ9O,GAAQkP,CAClB,CACF,KACK,CACL,MAAMG,EAAa,CAAC,QAAS,aAAc,WAAY,QACvDP,EAAU1B,OAAOC,YACfzJ,EAAO2J,KAAI,CAACc,EAAGtN,IAAM,CAACsO,EAAWtO,IAAM,QAAUA,EAAGsN,MAEtDS,EAAQQ,YAAcR,EAAQQ,WAC9BR,EAAQS,UAAYT,EAAQS,SACvBR,OAAOC,MAAMD,OAAOS,WAAWV,EAAQW,WAC1CX,EAAQY,OAASZ,EAAQW,cAClBX,EAAQW,QAEM,MAAnBX,EAAQa,QAAqC,MAAnBb,EAAQa,SACpCb,EAAQc,OAASd,EAAQa,cAClBb,EAAQa,OAEnB,CAOA,OANIf,IACFE,EAAQF,SAAWA,GAErBE,EAAQc,OAAStB,EAAUQ,EAAQc,SAAqC,EAExEd,EAAQe,MAAQC,mBAAmBhB,EAAQe,OACpCf,CACT,E","sources":["../../../node_modules/@gmod/bed/src/autoSql.js","../../../node_modules/@gmod/bed/src/as/autoSqlSchemas.ts","../../../node_modules/@gmod/bed/src/defaultTypes.ts","../../../node_modules/@gmod/bed/src/util.ts","../../../node_modules/@gmod/bed/src/parser.ts"],"sourcesContent":["/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n\n\"use strict\";\n\nfunction peg$subclass(child, parent) {\n  function ctor() { this.constructor = child; }\n  ctor.prototype = parent.prototype;\n  child.prototype = new ctor();\n}\n\nfunction peg$SyntaxError(message, expected, found, location) {\n  this.message  = message;\n  this.expected = expected;\n  this.found    = found;\n  this.location = location;\n  this.name     = \"SyntaxError\";\n\n  if (typeof Error.captureStackTrace === \"function\") {\n    Error.captureStackTrace(this, peg$SyntaxError);\n  }\n}\n\npeg$subclass(peg$SyntaxError, Error);\n\npeg$SyntaxError.buildMessage = function(expected, found) {\n  var DESCRIBE_EXPECTATION_FNS = {\n        literal: function(expectation) {\n          return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n        },\n\n        \"class\": function(expectation) {\n          var escapedParts = \"\",\n              i;\n\n          for (i = 0; i < expectation.parts.length; i++) {\n            escapedParts += expectation.parts[i] instanceof Array\n              ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n              : classEscape(expectation.parts[i]);\n          }\n\n          return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n        },\n\n        any: function(expectation) {\n          return \"any character\";\n        },\n\n        end: function(expectation) {\n          return \"end of input\";\n        },\n\n        other: function(expectation) {\n          return expectation.description;\n        }\n      };\n\n  function hex(ch) {\n    return ch.charCodeAt(0).toString(16).toUpperCase();\n  }\n\n  function literalEscape(s) {\n    return s\n      .replace(/\\\\/g, '\\\\\\\\')\n      .replace(/\"/g,  '\\\\\"')\n      .replace(/\\0/g, '\\\\0')\n      .replace(/\\t/g, '\\\\t')\n      .replace(/\\n/g, '\\\\n')\n      .replace(/\\r/g, '\\\\r')\n      .replace(/[\\x00-\\x0F]/g,          function(ch) { return '\\\\x0' + hex(ch); })\n      .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x'  + hex(ch); });\n  }\n\n  function classEscape(s) {\n    return s\n      .replace(/\\\\/g, '\\\\\\\\')\n      .replace(/\\]/g, '\\\\]')\n      .replace(/\\^/g, '\\\\^')\n      .replace(/-/g,  '\\\\-')\n      .replace(/\\0/g, '\\\\0')\n      .replace(/\\t/g, '\\\\t')\n      .replace(/\\n/g, '\\\\n')\n      .replace(/\\r/g, '\\\\r')\n      .replace(/[\\x00-\\x0F]/g,          function(ch) { return '\\\\x0' + hex(ch); })\n      .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x'  + hex(ch); });\n  }\n\n  function describeExpectation(expectation) {\n    return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n  }\n\n  function describeExpected(expected) {\n    var descriptions = new Array(expected.length),\n        i, j;\n\n    for (i = 0; i < expected.length; i++) {\n      descriptions[i] = describeExpectation(expected[i]);\n    }\n\n    descriptions.sort();\n\n    if (descriptions.length > 0) {\n      for (i = 1, j = 1; i < descriptions.length; i++) {\n        if (descriptions[i - 1] !== descriptions[i]) {\n          descriptions[j] = descriptions[i];\n          j++;\n        }\n      }\n      descriptions.length = j;\n    }\n\n    switch (descriptions.length) {\n      case 1:\n        return descriptions[0];\n\n      case 2:\n        return descriptions[0] + \" or \" + descriptions[1];\n\n      default:\n        return descriptions.slice(0, -1).join(\", \")\n          + \", or \"\n          + descriptions[descriptions.length - 1];\n    }\n  }\n\n  function describeFound(found) {\n    return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n  }\n\n  return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n};\n\nfunction peg$parse(input, options) {\n  options = options !== void 0 ? options : {};\n\n  var peg$FAILED = {},\n\n      peg$startRuleFunctions = { declaration: peg$parsedeclaration },\n      peg$startRuleFunction  = peg$parsedeclaration,\n\n      peg$c0 = \"(\",\n      peg$c1 = peg$literalExpectation(\"(\", false),\n      peg$c2 = \")\",\n      peg$c3 = peg$literalExpectation(\")\", false),\n      peg$c4 = function(type, name, comment, fields) { return { type, name, comment, fields } },\n      peg$c5 = \"simple\",\n      peg$c6 = peg$literalExpectation(\"simple\", false),\n      peg$c7 = \"object\",\n      peg$c8 = peg$literalExpectation(\"object\", false),\n      peg$c9 = \"table\",\n      peg$c10 = peg$literalExpectation(\"table\", false),\n      peg$c11 = \"auto\",\n      peg$c12 = peg$literalExpectation(\"auto\", false),\n      peg$c13 = \"primary\",\n      peg$c14 = peg$literalExpectation(\"primary\", false),\n      peg$c15 = \"index\",\n      peg$c16 = peg$literalExpectation(\"index\", false),\n      peg$c17 = \"unique\",\n      peg$c18 = peg$literalExpectation(\"unique\", false),\n      peg$c19 = function(f1, w) { return w; },\n      peg$c20 = function(f1, fds) {\n            if(f1.name) {\n              fds.unshift(f1);\n            }\n            return fds;\n          },\n      peg$c21 = \"#\",\n      peg$c22 = peg$literalExpectation(\"#\", false),\n      peg$c23 = \";\",\n      peg$c24 = peg$literalExpectation(\";\", false),\n      peg$c25 = function(type, name, comment) { return { type, name, comment } },\n      peg$c26 = \"[\",\n      peg$c27 = peg$literalExpectation(\"[\", false),\n      peg$c28 = \"]\",\n      peg$c29 = peg$literalExpectation(\"]\", false),\n      peg$c30 = function(type, size, name, comment) { return { type, size, name, comment } },\n      peg$c31 = function(type, vals, name, comment) { return { type, vals, name, comment } },\n      peg$c32 = \",\",\n      peg$c33 = peg$literalExpectation(\",\", false),\n      peg$c34 = function(f1, fds) {\n              fds.unshift(f1);\n              return fds;\n          },\n      peg$c35 = \"int\",\n      peg$c36 = peg$literalExpectation(\"int\", false),\n      peg$c37 = \"uint\",\n      peg$c38 = peg$literalExpectation(\"uint\", false),\n      peg$c39 = \"short\",\n      peg$c40 = peg$literalExpectation(\"short\", false),\n      peg$c41 = \"ushort\",\n      peg$c42 = peg$literalExpectation(\"ushort\", false),\n      peg$c43 = \"byte\",\n      peg$c44 = peg$literalExpectation(\"byte\", false),\n      peg$c45 = \"ubyte\",\n      peg$c46 = peg$literalExpectation(\"ubyte\", false),\n      peg$c47 = \"float\",\n      peg$c48 = peg$literalExpectation(\"float\", false),\n      peg$c49 = \"char\",\n      peg$c50 = peg$literalExpectation(\"char\", false),\n      peg$c51 = \"string\",\n      peg$c52 = peg$literalExpectation(\"string\", false),\n      peg$c53 = \"lstring\",\n      peg$c54 = peg$literalExpectation(\"lstring\", false),\n      peg$c55 = \"enum\",\n      peg$c56 = peg$literalExpectation(\"enum\", false),\n      peg$c57 = \"double\",\n      peg$c58 = peg$literalExpectation(\"double\", false),\n      peg$c59 = \"bigint\",\n      peg$c60 = peg$literalExpectation(\"bigint\", false),\n      peg$c61 = \"set\",\n      peg$c62 = peg$literalExpectation(\"set\", false),\n      peg$c63 = function(t, n) { return t+' '+n },\n      peg$c64 = /^[a-zA-Z_]/,\n      peg$c65 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"], \"_\"], false, false),\n      peg$c66 = /^[a-zA-Z0-9_]/,\n      peg$c67 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"], [\"0\", \"9\"], \"_\"], false, false),\n      peg$c68 = function(t) { return text() },\n      peg$c69 = \"\\\"\",\n      peg$c70 = peg$literalExpectation(\"\\\"\", false),\n      peg$c71 = /^[^\"]/,\n      peg$c72 = peg$classExpectation([\"\\\"\"], true, false),\n      peg$c73 = function(t) { return t.join('') },\n      peg$c74 = /^[^\\n\\r]/,\n      peg$c75 = peg$classExpectation([\"\\n\", \"\\r\"], true, false),\n      peg$c76 = function(t) { return t.join('').replace(/^\"/,'').replace(/\"$/,'') },\n      peg$c77 = peg$otherExpectation(\"integer\"),\n      peg$c78 = /^[0-9]/,\n      peg$c79 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n      peg$c80 = function() { return parseInt(text(), 10); },\n      peg$c81 = peg$otherExpectation(\"whitespace\"),\n      peg$c82 = /^[ \\t\\n\\r]/,\n      peg$c83 = peg$classExpectation([\" \", \"\\t\", \"\\n\", \"\\r\"], false, false),\n\n      peg$currPos          = 0,\n      peg$savedPos         = 0,\n      peg$posDetailsCache  = [{ line: 1, column: 1 }],\n      peg$maxFailPos       = 0,\n      peg$maxFailExpected  = [],\n      peg$silentFails      = 0,\n\n      peg$result;\n\n  if (\"startRule\" in options) {\n    if (!(options.startRule in peg$startRuleFunctions)) {\n      throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n    }\n\n    peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n  }\n\n  function text() {\n    return input.substring(peg$savedPos, peg$currPos);\n  }\n\n  function location() {\n    return peg$computeLocation(peg$savedPos, peg$currPos);\n  }\n\n  function expected(description, location) {\n    location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n    throw peg$buildStructuredError(\n      [peg$otherExpectation(description)],\n      input.substring(peg$savedPos, peg$currPos),\n      location\n    );\n  }\n\n  function error(message, location) {\n    location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n    throw peg$buildSimpleError(message, location);\n  }\n\n  function peg$literalExpectation(text, ignoreCase) {\n    return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n  }\n\n  function peg$classExpectation(parts, inverted, ignoreCase) {\n    return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n  }\n\n  function peg$anyExpectation() {\n    return { type: \"any\" };\n  }\n\n  function peg$endExpectation() {\n    return { type: \"end\" };\n  }\n\n  function peg$otherExpectation(description) {\n    return { type: \"other\", description: description };\n  }\n\n  function peg$computePosDetails(pos) {\n    var details = peg$posDetailsCache[pos], p;\n\n    if (details) {\n      return details;\n    } else {\n      p = pos - 1;\n      while (!peg$posDetailsCache[p]) {\n        p--;\n      }\n\n      details = peg$posDetailsCache[p];\n      details = {\n        line:   details.line,\n        column: details.column\n      };\n\n      while (p < pos) {\n        if (input.charCodeAt(p) === 10) {\n          details.line++;\n          details.column = 1;\n        } else {\n          details.column++;\n        }\n\n        p++;\n      }\n\n      peg$posDetailsCache[pos] = details;\n      return details;\n    }\n  }\n\n  function peg$computeLocation(startPos, endPos) {\n    var startPosDetails = peg$computePosDetails(startPos),\n        endPosDetails   = peg$computePosDetails(endPos);\n\n    return {\n      start: {\n        offset: startPos,\n        line:   startPosDetails.line,\n        column: startPosDetails.column\n      },\n      end: {\n        offset: endPos,\n        line:   endPosDetails.line,\n        column: endPosDetails.column\n      }\n    };\n  }\n\n  function peg$fail(expected) {\n    if (peg$currPos < peg$maxFailPos) { return; }\n\n    if (peg$currPos > peg$maxFailPos) {\n      peg$maxFailPos = peg$currPos;\n      peg$maxFailExpected = [];\n    }\n\n    peg$maxFailExpected.push(expected);\n  }\n\n  function peg$buildSimpleError(message, location) {\n    return new peg$SyntaxError(message, null, null, location);\n  }\n\n  function peg$buildStructuredError(expected, found, location) {\n    return new peg$SyntaxError(\n      peg$SyntaxError.buildMessage(expected, found),\n      expected,\n      found,\n      location\n    );\n  }\n\n  function peg$parsedeclaration() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;\n\n    s0 = peg$currPos;\n    s1 = peg$parse_();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parsedeclareType();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parse_();\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parsedeclareName();\n          if (s4 !== peg$FAILED) {\n            s5 = peg$parse_();\n            if (s5 !== peg$FAILED) {\n              s6 = peg$parsecomment();\n              if (s6 !== peg$FAILED) {\n                s7 = peg$parse_();\n                if (s7 !== peg$FAILED) {\n                  if (input.charCodeAt(peg$currPos) === 40) {\n                    s8 = peg$c0;\n                    peg$currPos++;\n                  } else {\n                    s8 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c1); }\n                  }\n                  if (s8 !== peg$FAILED) {\n                    s9 = peg$parse_();\n                    if (s9 !== peg$FAILED) {\n                      s10 = peg$parsefieldList();\n                      if (s10 !== peg$FAILED) {\n                        s11 = peg$parse_();\n                        if (s11 !== peg$FAILED) {\n                          if (input.charCodeAt(peg$currPos) === 41) {\n                            s12 = peg$c2;\n                            peg$currPos++;\n                          } else {\n                            s12 = peg$FAILED;\n                            if (peg$silentFails === 0) { peg$fail(peg$c3); }\n                          }\n                          if (s12 !== peg$FAILED) {\n                            s13 = peg$parse_();\n                            if (s13 !== peg$FAILED) {\n                              peg$savedPos = s0;\n                              s1 = peg$c4(s2, s4, s6, s10);\n                              s0 = s1;\n                            } else {\n                              peg$currPos = s0;\n                              s0 = peg$FAILED;\n                            }\n                          } else {\n                            peg$currPos = s0;\n                            s0 = peg$FAILED;\n                          }\n                        } else {\n                          peg$currPos = s0;\n                          s0 = peg$FAILED;\n                        }\n                      } else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                      }\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parsedeclareType() {\n    var s0;\n\n    if (input.substr(peg$currPos, 6) === peg$c5) {\n      s0 = peg$c5;\n      peg$currPos += 6;\n    } else {\n      s0 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c6); }\n    }\n    if (s0 === peg$FAILED) {\n      if (input.substr(peg$currPos, 6) === peg$c7) {\n        s0 = peg$c7;\n        peg$currPos += 6;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c8); }\n      }\n      if (s0 === peg$FAILED) {\n        if (input.substr(peg$currPos, 5) === peg$c9) {\n          s0 = peg$c9;\n          peg$currPos += 5;\n        } else {\n          s0 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c10); }\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parsedeclareName() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$parsename();\n    if (s0 === peg$FAILED) {\n      s0 = peg$currPos;\n      s1 = peg$parsename();\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parseindexType();\n        if (s2 !== peg$FAILED) {\n          s1 = [s1, s2];\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n      if (s0 === peg$FAILED) {\n        s0 = peg$currPos;\n        s1 = peg$parsename();\n        if (s1 !== peg$FAILED) {\n          if (input.substr(peg$currPos, 4) === peg$c11) {\n            s2 = peg$c11;\n            peg$currPos += 4;\n          } else {\n            s2 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c12); }\n          }\n          if (s2 !== peg$FAILED) {\n            s1 = [s1, s2];\n            s0 = s1;\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n        if (s0 === peg$FAILED) {\n          s0 = peg$currPos;\n          s1 = peg$parsename();\n          if (s1 !== peg$FAILED) {\n            s2 = peg$parseindexType();\n            if (s2 !== peg$FAILED) {\n              if (input.substr(peg$currPos, 4) === peg$c11) {\n                s3 = peg$c11;\n                peg$currPos += 4;\n              } else {\n                s3 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$c12); }\n              }\n              if (s3 !== peg$FAILED) {\n                s1 = [s1, s2, s3];\n                s0 = s1;\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parseindexType() {\n    var s0;\n\n    if (input.substr(peg$currPos, 7) === peg$c13) {\n      s0 = peg$c13;\n      peg$currPos += 7;\n    } else {\n      s0 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c14); }\n    }\n    if (s0 === peg$FAILED) {\n      if (input.substr(peg$currPos, 5) === peg$c15) {\n        s0 = peg$c15;\n        peg$currPos += 5;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c16); }\n      }\n      if (s0 === peg$FAILED) {\n        if (input.substr(peg$currPos, 6) === peg$c17) {\n          s0 = peg$c17;\n          peg$currPos += 6;\n        } else {\n          s0 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c18); }\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parsecomment() {\n    var s0;\n\n    s0 = peg$parsenonQuotedString();\n    if (s0 === peg$FAILED) {\n      s0 = peg$parse_();\n    }\n\n    return s0;\n  }\n\n  function peg$parsefieldList() {\n    var s0, s1, s2, s3, s4, s5, s6;\n\n    s0 = peg$currPos;\n    s1 = peg$parsefield();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = [];\n        s4 = peg$currPos;\n        s5 = peg$parse_();\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parsefield();\n          if (s6 !== peg$FAILED) {\n            peg$savedPos = s4;\n            s5 = peg$c19(s1, s6);\n            s4 = s5;\n          } else {\n            peg$currPos = s4;\n            s4 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s4;\n          s4 = peg$FAILED;\n        }\n        while (s4 !== peg$FAILED) {\n          s3.push(s4);\n          s4 = peg$currPos;\n          s5 = peg$parse_();\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parsefield();\n            if (s6 !== peg$FAILED) {\n              peg$savedPos = s4;\n              s5 = peg$c19(s1, s6);\n              s4 = s5;\n            } else {\n              peg$currPos = s4;\n              s4 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s4;\n            s4 = peg$FAILED;\n          }\n        }\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            peg$savedPos = s0;\n            s1 = peg$c20(s1, s3);\n            s0 = s1;\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parsecommentStart() {\n    var s0;\n\n    if (input.charCodeAt(peg$currPos) === 35) {\n      s0 = peg$c21;\n      peg$currPos++;\n    } else {\n      s0 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c22); }\n    }\n\n    return s0;\n  }\n\n  function peg$parseinternalComment() {\n    var s0, s1, s2, s3, s4;\n\n    s0 = peg$currPos;\n    s1 = peg$parse_();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parsecommentStart();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parsenonQuotedString();\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            s1 = [s1, s2, s3, s4];\n            s0 = s1;\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parsefield() {\n    var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;\n\n    s0 = peg$currPos;\n    s1 = peg$parsefieldType();\n    if (s1 !== peg$FAILED) {\n      s2 = peg$parse_();\n      if (s2 !== peg$FAILED) {\n        s3 = peg$parsename();\n        if (s3 !== peg$FAILED) {\n          s4 = peg$parse_();\n          if (s4 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 59) {\n              s5 = peg$c23;\n              peg$currPos++;\n            } else {\n              s5 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c24); }\n            }\n            if (s5 !== peg$FAILED) {\n              s6 = peg$parse_();\n              if (s6 !== peg$FAILED) {\n                s7 = peg$parsecomment();\n                if (s7 !== peg$FAILED) {\n                  peg$savedPos = s0;\n                  s1 = peg$c25(s1, s3, s7);\n                  s0 = s1;\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    if (s0 === peg$FAILED) {\n      s0 = peg$currPos;\n      s1 = peg$parsefieldType();\n      if (s1 !== peg$FAILED) {\n        s2 = peg$parse_();\n        if (s2 !== peg$FAILED) {\n          if (input.charCodeAt(peg$currPos) === 91) {\n            s3 = peg$c26;\n            peg$currPos++;\n          } else {\n            s3 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c27); }\n          }\n          if (s3 !== peg$FAILED) {\n            s4 = peg$parse_();\n            if (s4 !== peg$FAILED) {\n              s5 = peg$parsefieldSize();\n              if (s5 !== peg$FAILED) {\n                s6 = peg$parse_();\n                if (s6 !== peg$FAILED) {\n                  if (input.charCodeAt(peg$currPos) === 93) {\n                    s7 = peg$c28;\n                    peg$currPos++;\n                  } else {\n                    s7 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c29); }\n                  }\n                  if (s7 !== peg$FAILED) {\n                    s8 = peg$parse_();\n                    if (s8 !== peg$FAILED) {\n                      s9 = peg$parsename();\n                      if (s9 !== peg$FAILED) {\n                        s10 = peg$parse_();\n                        if (s10 !== peg$FAILED) {\n                          if (input.charCodeAt(peg$currPos) === 59) {\n                            s11 = peg$c23;\n                            peg$currPos++;\n                          } else {\n                            s11 = peg$FAILED;\n                            if (peg$silentFails === 0) { peg$fail(peg$c24); }\n                          }\n                          if (s11 !== peg$FAILED) {\n                            s12 = peg$parse_();\n                            if (s12 !== peg$FAILED) {\n                              s13 = peg$parsecomment();\n                              if (s13 !== peg$FAILED) {\n                                peg$savedPos = s0;\n                                s1 = peg$c30(s1, s5, s9, s13);\n                                s0 = s1;\n                              } else {\n                                peg$currPos = s0;\n                                s0 = peg$FAILED;\n                              }\n                            } else {\n                              peg$currPos = s0;\n                              s0 = peg$FAILED;\n                            }\n                          } else {\n                            peg$currPos = s0;\n                            s0 = peg$FAILED;\n                          }\n                        } else {\n                          peg$currPos = s0;\n                          s0 = peg$FAILED;\n                        }\n                      } else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                      }\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n      if (s0 === peg$FAILED) {\n        s0 = peg$currPos;\n        s1 = peg$parsefieldType();\n        if (s1 !== peg$FAILED) {\n          s2 = peg$parse_();\n          if (s2 !== peg$FAILED) {\n            if (input.charCodeAt(peg$currPos) === 40) {\n              s3 = peg$c0;\n              peg$currPos++;\n            } else {\n              s3 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c1); }\n            }\n            if (s3 !== peg$FAILED) {\n              s4 = peg$parse_();\n              if (s4 !== peg$FAILED) {\n                s5 = peg$parsefieldValues();\n                if (s5 !== peg$FAILED) {\n                  s6 = peg$parse_();\n                  if (s6 !== peg$FAILED) {\n                    if (input.charCodeAt(peg$currPos) === 41) {\n                      s7 = peg$c2;\n                      peg$currPos++;\n                    } else {\n                      s7 = peg$FAILED;\n                      if (peg$silentFails === 0) { peg$fail(peg$c3); }\n                    }\n                    if (s7 !== peg$FAILED) {\n                      s8 = peg$parse_();\n                      if (s8 !== peg$FAILED) {\n                        s9 = peg$parsename();\n                        if (s9 !== peg$FAILED) {\n                          s10 = peg$parse_();\n                          if (s10 !== peg$FAILED) {\n                            if (input.charCodeAt(peg$currPos) === 59) {\n                              s11 = peg$c23;\n                              peg$currPos++;\n                            } else {\n                              s11 = peg$FAILED;\n                              if (peg$silentFails === 0) { peg$fail(peg$c24); }\n                            }\n                            if (s11 !== peg$FAILED) {\n                              s12 = peg$parse_();\n                              if (s12 !== peg$FAILED) {\n                                s13 = peg$parsecomment();\n                                if (s13 !== peg$FAILED) {\n                                  peg$savedPos = s0;\n                                  s1 = peg$c31(s1, s5, s9, s13);\n                                  s0 = s1;\n                                } else {\n                                  peg$currPos = s0;\n                                  s0 = peg$FAILED;\n                                }\n                              } else {\n                                peg$currPos = s0;\n                                s0 = peg$FAILED;\n                              }\n                            } else {\n                              peg$currPos = s0;\n                              s0 = peg$FAILED;\n                            }\n                          } else {\n                            peg$currPos = s0;\n                            s0 = peg$FAILED;\n                          }\n                        } else {\n                          peg$currPos = s0;\n                          s0 = peg$FAILED;\n                        }\n                      } else {\n                        peg$currPos = s0;\n                        s0 = peg$FAILED;\n                      }\n                    } else {\n                      peg$currPos = s0;\n                      s0 = peg$FAILED;\n                    }\n                  } else {\n                    peg$currPos = s0;\n                    s0 = peg$FAILED;\n                  }\n                } else {\n                  peg$currPos = s0;\n                  s0 = peg$FAILED;\n                }\n              } else {\n                peg$currPos = s0;\n                s0 = peg$FAILED;\n              }\n            } else {\n              peg$currPos = s0;\n              s0 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s0;\n            s0 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n        if (s0 === peg$FAILED) {\n          s0 = peg$parseinternalComment();\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parsefieldValues() {\n    var s0, s1, s2, s3, s4, s5, s6;\n\n    s0 = peg$currPos;\n    s1 = peg$parsename();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      s3 = peg$currPos;\n      if (input.charCodeAt(peg$currPos) === 44) {\n        s4 = peg$c32;\n        peg$currPos++;\n      } else {\n        s4 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c33); }\n      }\n      if (s4 !== peg$FAILED) {\n        s5 = peg$parse_();\n        if (s5 !== peg$FAILED) {\n          s6 = peg$parsename();\n          if (s6 !== peg$FAILED) {\n            peg$savedPos = s3;\n            s4 = peg$c19(s1, s6);\n            s3 = s4;\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s3;\n        s3 = peg$FAILED;\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        s3 = peg$currPos;\n        if (input.charCodeAt(peg$currPos) === 44) {\n          s4 = peg$c32;\n          peg$currPos++;\n        } else {\n          s4 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c33); }\n        }\n        if (s4 !== peg$FAILED) {\n          s5 = peg$parse_();\n          if (s5 !== peg$FAILED) {\n            s6 = peg$parsename();\n            if (s6 !== peg$FAILED) {\n              peg$savedPos = s3;\n              s4 = peg$c19(s1, s6);\n              s3 = s4;\n            } else {\n              peg$currPos = s3;\n              s3 = peg$FAILED;\n            }\n          } else {\n            peg$currPos = s3;\n            s3 = peg$FAILED;\n          }\n        } else {\n          peg$currPos = s3;\n          s3 = peg$FAILED;\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c34(s1, s2);\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parsefieldType() {\n    var s0, s1, s2, s3;\n\n    if (input.substr(peg$currPos, 3) === peg$c35) {\n      s0 = peg$c35;\n      peg$currPos += 3;\n    } else {\n      s0 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c36); }\n    }\n    if (s0 === peg$FAILED) {\n      if (input.substr(peg$currPos, 4) === peg$c37) {\n        s0 = peg$c37;\n        peg$currPos += 4;\n      } else {\n        s0 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c38); }\n      }\n      if (s0 === peg$FAILED) {\n        if (input.substr(peg$currPos, 5) === peg$c39) {\n          s0 = peg$c39;\n          peg$currPos += 5;\n        } else {\n          s0 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c40); }\n        }\n        if (s0 === peg$FAILED) {\n          if (input.substr(peg$currPos, 6) === peg$c41) {\n            s0 = peg$c41;\n            peg$currPos += 6;\n          } else {\n            s0 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c42); }\n          }\n          if (s0 === peg$FAILED) {\n            if (input.substr(peg$currPos, 4) === peg$c43) {\n              s0 = peg$c43;\n              peg$currPos += 4;\n            } else {\n              s0 = peg$FAILED;\n              if (peg$silentFails === 0) { peg$fail(peg$c44); }\n            }\n            if (s0 === peg$FAILED) {\n              if (input.substr(peg$currPos, 5) === peg$c45) {\n                s0 = peg$c45;\n                peg$currPos += 5;\n              } else {\n                s0 = peg$FAILED;\n                if (peg$silentFails === 0) { peg$fail(peg$c46); }\n              }\n              if (s0 === peg$FAILED) {\n                if (input.substr(peg$currPos, 5) === peg$c47) {\n                  s0 = peg$c47;\n                  peg$currPos += 5;\n                } else {\n                  s0 = peg$FAILED;\n                  if (peg$silentFails === 0) { peg$fail(peg$c48); }\n                }\n                if (s0 === peg$FAILED) {\n                  if (input.substr(peg$currPos, 4) === peg$c49) {\n                    s0 = peg$c49;\n                    peg$currPos += 4;\n                  } else {\n                    s0 = peg$FAILED;\n                    if (peg$silentFails === 0) { peg$fail(peg$c50); }\n                  }\n                  if (s0 === peg$FAILED) {\n                    if (input.substr(peg$currPos, 6) === peg$c51) {\n                      s0 = peg$c51;\n                      peg$currPos += 6;\n                    } else {\n                      s0 = peg$FAILED;\n                      if (peg$silentFails === 0) { peg$fail(peg$c52); }\n                    }\n                    if (s0 === peg$FAILED) {\n                      if (input.substr(peg$currPos, 7) === peg$c53) {\n                        s0 = peg$c53;\n                        peg$currPos += 7;\n                      } else {\n                        s0 = peg$FAILED;\n                        if (peg$silentFails === 0) { peg$fail(peg$c54); }\n                      }\n                      if (s0 === peg$FAILED) {\n                        if (input.substr(peg$currPos, 4) === peg$c55) {\n                          s0 = peg$c55;\n                          peg$currPos += 4;\n                        } else {\n                          s0 = peg$FAILED;\n                          if (peg$silentFails === 0) { peg$fail(peg$c56); }\n                        }\n                        if (s0 === peg$FAILED) {\n                          if (input.substr(peg$currPos, 6) === peg$c57) {\n                            s0 = peg$c57;\n                            peg$currPos += 6;\n                          } else {\n                            s0 = peg$FAILED;\n                            if (peg$silentFails === 0) { peg$fail(peg$c58); }\n                          }\n                          if (s0 === peg$FAILED) {\n                            if (input.substr(peg$currPos, 6) === peg$c59) {\n                              s0 = peg$c59;\n                              peg$currPos += 6;\n                            } else {\n                              s0 = peg$FAILED;\n                              if (peg$silentFails === 0) { peg$fail(peg$c60); }\n                            }\n                            if (s0 === peg$FAILED) {\n                              if (input.substr(peg$currPos, 3) === peg$c61) {\n                                s0 = peg$c61;\n                                peg$currPos += 3;\n                              } else {\n                                s0 = peg$FAILED;\n                                if (peg$silentFails === 0) { peg$fail(peg$c62); }\n                              }\n                              if (s0 === peg$FAILED) {\n                                s0 = peg$currPos;\n                                s1 = peg$parsedeclareType();\n                                if (s1 !== peg$FAILED) {\n                                  s2 = peg$parse_();\n                                  if (s2 !== peg$FAILED) {\n                                    s3 = peg$parsedeclareName();\n                                    if (s3 !== peg$FAILED) {\n                                      peg$savedPos = s0;\n                                      s1 = peg$c63(s1, s3);\n                                      s0 = s1;\n                                    } else {\n                                      peg$currPos = s0;\n                                      s0 = peg$FAILED;\n                                    }\n                                  } else {\n                                    peg$currPos = s0;\n                                    s0 = peg$FAILED;\n                                  }\n                                } else {\n                                  peg$currPos = s0;\n                                  s0 = peg$FAILED;\n                                }\n                              }\n                            }\n                          }\n                        }\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n\n    return s0;\n  }\n\n  function peg$parsefieldSize() {\n    var s0;\n\n    s0 = peg$parsenumber();\n    if (s0 === peg$FAILED) {\n      s0 = peg$parsename();\n    }\n\n    return s0;\n  }\n\n  function peg$parsename() {\n    var s0, s1, s2, s3, s4;\n\n    s0 = peg$currPos;\n    s1 = peg$currPos;\n    if (peg$c64.test(input.charAt(peg$currPos))) {\n      s2 = input.charAt(peg$currPos);\n      peg$currPos++;\n    } else {\n      s2 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c65); }\n    }\n    if (s2 !== peg$FAILED) {\n      s3 = [];\n      if (peg$c66.test(input.charAt(peg$currPos))) {\n        s4 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s4 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c67); }\n      }\n      while (s4 !== peg$FAILED) {\n        s3.push(s4);\n        if (peg$c66.test(input.charAt(peg$currPos))) {\n          s4 = input.charAt(peg$currPos);\n          peg$currPos++;\n        } else {\n          s4 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c67); }\n        }\n      }\n      if (s3 !== peg$FAILED) {\n        s2 = [s2, s3];\n        s1 = s2;\n      } else {\n        peg$currPos = s1;\n        s1 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s1;\n      s1 = peg$FAILED;\n    }\n    if (s1 !== peg$FAILED) {\n      peg$savedPos = s0;\n      s1 = peg$c68(s1);\n    }\n    s0 = s1;\n\n    return s0;\n  }\n\n  function peg$parsequotedString() {\n    var s0, s1, s2, s3;\n\n    s0 = peg$currPos;\n    if (input.charCodeAt(peg$currPos) === 34) {\n      s1 = peg$c69;\n      peg$currPos++;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c70); }\n    }\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      if (peg$c71.test(input.charAt(peg$currPos))) {\n        s3 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s3 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c72); }\n      }\n      while (s3 !== peg$FAILED) {\n        s2.push(s3);\n        if (peg$c71.test(input.charAt(peg$currPos))) {\n          s3 = input.charAt(peg$currPos);\n          peg$currPos++;\n        } else {\n          s3 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c72); }\n        }\n      }\n      if (s2 !== peg$FAILED) {\n        if (input.charCodeAt(peg$currPos) === 34) {\n          s3 = peg$c69;\n          peg$currPos++;\n        } else {\n          s3 = peg$FAILED;\n          if (peg$silentFails === 0) { peg$fail(peg$c70); }\n        }\n        if (s3 !== peg$FAILED) {\n          peg$savedPos = s0;\n          s1 = peg$c73(s2);\n          s0 = s1;\n        } else {\n          peg$currPos = s0;\n          s0 = peg$FAILED;\n        }\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n\n    return s0;\n  }\n\n  function peg$parsenonQuotedString() {\n    var s0, s1, s2;\n\n    s0 = peg$currPos;\n    s1 = [];\n    if (peg$c74.test(input.charAt(peg$currPos))) {\n      s2 = input.charAt(peg$currPos);\n      peg$currPos++;\n    } else {\n      s2 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c75); }\n    }\n    while (s2 !== peg$FAILED) {\n      s1.push(s2);\n      if (peg$c74.test(input.charAt(peg$currPos))) {\n        s2 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s2 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c75); }\n      }\n    }\n    if (s1 !== peg$FAILED) {\n      peg$savedPos = s0;\n      s1 = peg$c76(s1);\n    }\n    s0 = s1;\n\n    return s0;\n  }\n\n  function peg$parsenumber() {\n    var s0, s1, s2, s3;\n\n    peg$silentFails++;\n    s0 = peg$currPos;\n    s1 = peg$parse_();\n    if (s1 !== peg$FAILED) {\n      s2 = [];\n      if (peg$c78.test(input.charAt(peg$currPos))) {\n        s3 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s3 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c79); }\n      }\n      if (s3 !== peg$FAILED) {\n        while (s3 !== peg$FAILED) {\n          s2.push(s3);\n          if (peg$c78.test(input.charAt(peg$currPos))) {\n            s3 = input.charAt(peg$currPos);\n            peg$currPos++;\n          } else {\n            s3 = peg$FAILED;\n            if (peg$silentFails === 0) { peg$fail(peg$c79); }\n          }\n        }\n      } else {\n        s2 = peg$FAILED;\n      }\n      if (s2 !== peg$FAILED) {\n        peg$savedPos = s0;\n        s1 = peg$c80();\n        s0 = s1;\n      } else {\n        peg$currPos = s0;\n        s0 = peg$FAILED;\n      }\n    } else {\n      peg$currPos = s0;\n      s0 = peg$FAILED;\n    }\n    peg$silentFails--;\n    if (s0 === peg$FAILED) {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c77); }\n    }\n\n    return s0;\n  }\n\n  function peg$parse_() {\n    var s0, s1;\n\n    peg$silentFails++;\n    s0 = [];\n    if (peg$c82.test(input.charAt(peg$currPos))) {\n      s1 = input.charAt(peg$currPos);\n      peg$currPos++;\n    } else {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c83); }\n    }\n    while (s1 !== peg$FAILED) {\n      s0.push(s1);\n      if (peg$c82.test(input.charAt(peg$currPos))) {\n        s1 = input.charAt(peg$currPos);\n        peg$currPos++;\n      } else {\n        s1 = peg$FAILED;\n        if (peg$silentFails === 0) { peg$fail(peg$c83); }\n      }\n    }\n    peg$silentFails--;\n    if (s0 === peg$FAILED) {\n      s1 = peg$FAILED;\n      if (peg$silentFails === 0) { peg$fail(peg$c81); }\n    }\n\n    return s0;\n  }\n\n  peg$result = peg$startRuleFunction();\n\n  if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n    return peg$result;\n  } else {\n    if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n      peg$fail(peg$endExpectation());\n    }\n\n    throw peg$buildStructuredError(\n      peg$maxFailExpected,\n      peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n      peg$maxFailPos < input.length\n        ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n        : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n    );\n  }\n}\n\nmodule.exports = {\n  SyntaxError: peg$SyntaxError,\n  parse:       peg$parse\n};\n","export const bigChain = `table bigChain\n\"bigChain pairwise alignment\"\n    (\n    string chrom;       \"Reference sequence chromosome or scaffold\"\n    uint   chromStart;  \"Start position in chromosome\"\n    uint   chromEnd;    \"End position in chromosome\"\n    string name;        \"Name or ID of item, ideally both human readable and unique\"\n    uint score;         \"Score (0-1000)\"\n    char[1] strand;     \"+ or - for strand\"\n    uint tSize;         \"size of target sequence\"\n    string qName;       \"name of query sequence\"\n    uint qSize;         \"size of query sequence\"\n    uint qStart;        \"start of alignment on query sequence\"\n    uint qEnd;          \"end of alignment on query sequence\"\n    uint chainScore;    \"score from chain\"\n    )`\n\nexport const bigGenePred = `table bigGenePred\n\"bigGenePred gene models\"\n   (\n   string chrom;       \"Reference sequence chromosome or scaffold\"\n   uint   chromStart;  \"Start position in chromosome\"\n   uint   chromEnd;    \"End position in chromosome\"\n   string name;        \"Name or ID of item, ideally both human readable and unique\"\n   uint score;         \"Score (0-1000)\"\n   char[1] strand;     \"+ or - for strand\"\n   uint thickStart;    \"Start of where display should be thick (start codon)\"\n   uint thickEnd;      \"End of where display should be thick (stop codon)\"\n   uint reserved;       \"RGB value (use R,G,B string in input file)\"\n   int blockCount;     \"Number of blocks\"\n   int[blockCount] blockSizes; \"Comma separated list of block sizes\"\n   int[blockCount] chromStarts; \"Start positions relative to chromStart\"\n   string name2;       \"Alternative/human readable name\"\n   string cdsStartStat; \"Status of CDS start annotation (none, unknown, incomplete, or complete)\"\n   string cdsEndStat;   \"Status of CDS end annotation (none, unknown, incomplete, or complete)\"\n   int[blockCount] exonFrames; \"Exon frame {0,1,2}, or -1 if no frame for exon\"\n   string type;        \"Transcript type\"\n   string geneName;    \"Primary identifier for gene\"\n   string geneName2;   \"Alternative/human readable gene name\"\n   string geneType;    \"Gene type\"\n   )`\n\nexport const bigInteract = `table interact\n\"interaction between two regions\"\n    (\n    string chrom;        \"Chromosome (or contig, scaffold, etc.). For interchromosomal, use 2 records\"\n    uint chromStart;     \"Start position of lower region. For interchromosomal, set to chromStart of this region\"\n    uint chromEnd;       \"End position of upper region. For interchromosomal, set to chromEnd of this region\"\n    string name;         \"Name of item, for display.  Usually 'sourceName/targetName/exp' or empty\"\n    uint score;          \"Score (0-1000)\"\n    double value;        \"Strength of interaction or other data value. Typically basis for score\"\n    string exp;          \"Experiment name (metadata for filtering). Use . if not applicable\"\n    string color;        \"Item color.  Specified as r,g,b or hexadecimal #RRGGBB or html color name, as in //www.w3.org/TR/css3-color/#html4. Use 0 and spectrum setting to shade by score\"\n    string sourceChrom;  \"Chromosome of source region (directional) or lower region. For non-directional interchromosomal, chrom of this region.\"\n    uint sourceStart;    \"Start position in chromosome of source/lower/this region\"\n    uint sourceEnd;      \"End position in chromosome of source/lower/this region\"\n    string sourceName;   \"Identifier of source/lower/this region\"\n    string sourceStrand; \"Orientation of source/lower/this region: + or -.  Use . if not applicable\"\n    string targetChrom;  \"Chromosome of target region (directional) or upper region. For non-directional interchromosomal, chrom of other region\"\n    uint targetStart;    \"Start position in chromosome of target/upper/this region\"\n    uint targetEnd;      \"End position in chromosome of target/upper/this region\"\n    string targetName;   \"Identifier of target/upper/this region\"\n    string targetStrand; \"Orientation of target/upper/this region: + or -.  Use . if not applicable\"\n\n    )`\n\nexport const bigLink = `table bigLink\n\"bigLink pairwise alignment\"\n    (\n    string chrom;       \"Reference sequence chromosome or scaffold\"\n    uint   chromStart;  \"Start position in chromosome\"\n    uint   chromEnd;    \"End position in chromosome\"\n    string name;        \"Name or ID of item, ideally both human readable and unique\"\n    uint qStart;        \"start of alignment on query sequence\"\n    )`\n\nexport const bigMaf = `table bedMaf\n\"Bed3 with MAF block\"\n    (\n    string chrom;      \"Reference sequence chromosome or scaffold\"\n    uint   chromStart; \"Start position in chromosome\"\n    uint   chromEnd;   \"End position in chromosome\"\n    lstring mafBlock;   \"MAF block\"\n    )`\nexport const bigNarrowPeak = `table bigNarrowPeak\n\"BED6+4 Peaks of signal enrichment based on pooled, normalized (interpreted) data.\"\n(\n    string chrom;        \"Reference sequence chromosome or scaffold\"\n    uint   chromStart;   \"Start position in chromosome\"\n    uint   chromEnd;     \"End position in chromosome\"\n    string name;\t \"Name given to a region (preferably unique). Use . if no name is assigned\"\n    uint   score;        \"Indicates how dark the peak will be displayed in the browser (0-1000) \"\n    char[1]  strand;     \"+ or - or . for unknown\"\n    float  signalValue;  \"Measurement of average enrichment for the region\"\n    float  pValue;       \"Statistical significance of signal value (-log10). Set to -1 if not used.\"\n    float  qValue;       \"Statistical significance with multiple-test correction applied (FDR -log10). Set to -1 if not used.\"\n    int   peak;         \"Point-source called for this peak; 0-based offset from chromStart. Set to -1 if no point-source called.\"\n)`\nexport const bigPsl = `table bigPsl\n\"bigPsl pairwise alignment\"\n    (\n    string chrom;       \"Reference sequence chromosome or scaffold\"\n    uint   chromStart;  \"Start position in chromosome\"\n    uint   chromEnd;    \"End position in chromosome\"\n    string name;        \"Name or ID of item, ideally both human readable and unique\"\n    uint score;         \"Score (0-1000)\"\n    char[1] strand;     \"+ or - indicates whether the query aligns to the + or - strand on the reference\"\n    uint thickStart;    \"Start of where display should be thick (start codon)\"\n    uint thickEnd;      \"End of where display should be thick (stop codon)\"\n    uint reserved;       \"RGB value (use R,G,B string in input file)\"\n    int blockCount;     \"Number of blocks\"\n    int[blockCount] blockSizes; \"Comma separated list of block sizes\"\n    int[blockCount] chromStarts; \"Start positions relative to chromStart\"\n\n    uint    oChromStart;\"Start position in other chromosome\"\n    uint    oChromEnd;  \"End position in other chromosome\"\n    char[1] oStrand;    \"+ or -, - means that psl was reversed into BED-compatible coordinates\"\n    uint    oChromSize; \"Size of other chromosome.\"\n    int[blockCount] oChromStarts; \"Start positions relative to oChromStart or from oChromStart+oChromSize depending on strand\"\n\n    lstring  oSequence;  \"Sequence on other chrom (or empty)\"\n    string   oCDS;       \"CDS in NCBI format\"\n\n    uint    chromSize;\"Size of target chromosome\"\n\n    uint match;        \"Number of bases matched.\"\n    uint misMatch; \" Number of bases that don't match \"\n    uint repMatch; \" Number of bases that match but are part of repeats \"\n    uint nCount;   \" Number of 'N' bases \"\n    uint seqType;    \"0=empty, 1=nucleotide, 2=amino_acid\"\n    )`\n\nexport const defaultBedSchema = `table defaultBedSchema\n\"BED12\"\n    (\n    string chrom;      \"The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671).\"\n    uint   chromStart; \"The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0.\"\n    uint   chromEnd;   \"The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99.\"\n    string   name;   \"Defines the name of the BED line.\"\n    float   score;   \"Feature score, doesn't care about the 0-1000 limit as in bed\"\n    char   strand;   \"Defines the strand. Either '.' (=no strand) or '+' or '-'\"\n    uint thickStart; \"The starting position at which the feature is drawn thickly (for example, the start codon in gene displays). When there is no thick part, thickStart and thickEnd are usually set to the chromStart position.\"\n    uint thickEnd; \"The ending position at which the feature is drawn thickly (for example the stop codon in gene displays).\"\n    string itemRgb; \"An RGB value of the form R,G,B (e.g. 255,0,0). \"\n    uint blockCount; \" The number of blocks (exons) in the BED line.\"\n    uint[blockCount] blockSizes; \" A comma-separated list of the block sizes. The number of items in this list should correspond to blockCount.\"\n    uint[blockCount] blockStarts; \"A comma-separated list of block starts. All of the blockStart positions should be calculated relative to chromStart. The number of items in this list should correspond to blockCount.\"\n    )`\n\nexport const mafFrames = `table mafFrames\n\"codon frame assignment for MAF components\"\n    (\n    string chrom;      \"Reference sequence chromosome or scaffold\"\n    uint   chromStart; \"Start range in chromosome\"\n    uint   chromEnd;   \"End range in chromosome\"\n    string src;        \"Name of sequence source in MAF\"\n    ubyte frame;       \"frame (0,1,2) for first base(+) or last bast(-)\"\n    char[1] strand;    \"+ or -\"\n    string name;       \"Name of gene used to define frame\"\n    int    prevFramePos;  \"target position of the previous base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous\"\n    int    nextFramePos;  \"target position of the next base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous\"\n    ubyte  isExonStart;  \"does this start the CDS portion of an exon?\"\n    ubyte  isExonEnd;    \"does this end the CDS portion of an exon?\"\n    )`\n\nexport const mafSummary = `table mafSummary\n\"Positions and scores for alignment blocks\"\n    (\n    string chrom;      \"Reference sequence chromosome or scaffold\"\n    uint   chromStart; \"Start position in chromosome\"\n    uint   chromEnd;   \"End position in chromosome\"\n    string src;        \"Sequence name or database of alignment\"\n    float  score;      \"Floating point score.\"\n    char[1] leftStatus;  \"Gap/break annotation for preceding block\"\n    char[1] rightStatus; \"Gap/break annotation for following block\"\n    )`\n","import { parse } from './autoSql'\nimport { AutoSqlPreSchema } from './util'\nimport * as types from './as/autoSqlSchemas'\n\nexport default Object.fromEntries(\n  Object.entries(types).map(([key, val]) => [\n    key,\n    parse(val.trim()) as AutoSqlPreSchema,\n  ]),\n)\n","export interface AutoSqlPreSchema {\n  fields: { size: number; type: string; name: string; comment: string }[]\n}\n\n/*\n * adds some type annotations to the autoSql schema\n * for numeric fields ['uint', 'int', 'float', 'long'] \"isNumeric\" is added\n * for array types \"isArray\" is added\n * for numeric array types \"isArray\" and \"arrayIsNumeric\" is set\n *\n * @param autoSql - an autoSql schema from the peg parser\n * @return autoSql with type annotations added\n */\nexport function detectTypes(autoSql: AutoSqlPreSchema) {\n  const numericTypes = new Set(['uint', 'int', 'float', 'long'])\n  return {\n    ...autoSql,\n    fields: autoSql.fields\n      .map(autoField => ({\n        ...autoField,\n        isArray: autoField.size && autoField.type !== 'char',\n        arrayIsNumeric: autoField.size && numericTypes.has(autoField.type),\n        isNumeric: !autoField.size && numericTypes.has(autoField.type),\n      }))\n\n      // this is needed because the autoSql doesn't properly parse comments in the autoSql\n      .filter(f => !!f.name),\n  }\n}\n\nexport type AutoSqlSchema = ReturnType<typeof detectTypes>\n","import parser from './autoSql'\nimport types from './defaultTypes'\nimport { detectTypes, AutoSqlSchema, AutoSqlPreSchema } from './util'\n\nconst strandMap = { '.': 0, '-': -1, '+': 1 }\n\n// heuristic that a BED file is BED12 like...the number in col 10 is blockCount-like\nfunction isBed12Like(fields: string[]) {\n  return (\n    fields.length >= 12 &&\n    !Number.isNaN(parseInt(fields[9], 10)) &&\n    fields[10]?.split(',').filter(f => !!f).length === parseInt(fields[9], 10)\n  )\n}\nexport default class BED {\n  public autoSql: AutoSqlSchema\n\n  private attemptDefaultBed?: boolean\n\n  constructor(args: { autoSql?: string; type?: string } = {}) {\n    if (args.autoSql) {\n      this.autoSql = detectTypes(parser.parse(args.autoSql) as AutoSqlPreSchema)\n    } else if (args.type) {\n      if (!types[args.type]) {\n        throw new Error('Type not found')\n      }\n      this.autoSql = detectTypes(types[args.type])\n    } else {\n      this.autoSql = detectTypes(types.defaultBedSchema)\n      this.attemptDefaultBed = true\n    }\n  }\n\n  /*\n   * parses a line of text as a BED line with the loaded autoSql schema\n   *\n   * @param line - a BED line as tab delimited text or array\n   * @param opts - supply opts.uniqueId\n   * @return a object representing a feature\n   */\n  parseLine(line: string | string[], opts: { uniqueId?: string } = {}) {\n    const { autoSql } = this\n    const { uniqueId } = opts\n    const fields = Array.isArray(line) ? line : line.split('\\t')\n\n    let feature = {} as Record<string, any>\n    if (\n      !this.attemptDefaultBed ||\n      (this.attemptDefaultBed && isBed12Like(fields))\n    ) {\n      for (let i = 0; i < autoSql.fields.length; i++) {\n        const autoField = autoSql.fields[i]\n        let columnVal: any = fields[i]\n        const { isNumeric, isArray, arrayIsNumeric, name } = autoField\n        if (columnVal === null || columnVal === undefined) {\n          break\n        }\n        if (columnVal !== '.') {\n          if (isNumeric) {\n            const num = Number(columnVal)\n            columnVal = Number.isNaN(num) ? columnVal : num\n          } else if (isArray) {\n            columnVal = columnVal.split(',')\n            if (columnVal[columnVal.length - 1] === '') {\n              columnVal.pop()\n            }\n            if (arrayIsNumeric) {\n              columnVal = columnVal.map(Number)\n            }\n          }\n\n          feature[name] = columnVal\n        }\n      }\n    } else {\n      const fieldNames = ['chrom', 'chromStart', 'chromEnd', 'name']\n      feature = Object.fromEntries(\n        fields.map((f, i) => [fieldNames[i] || 'field' + i, f]),\n      )\n      feature.chromStart = +feature.chromStart\n      feature.chromEnd = +feature.chromEnd\n      if (!Number.isNaN(Number.parseFloat(feature.field4))) {\n        feature.score = +feature.field4\n        delete feature.field4\n      }\n      if (feature.field5 === '+' || feature.field5 === '-') {\n        feature.strand = feature.field5\n        delete feature.field5\n      }\n    }\n    if (uniqueId) {\n      feature.uniqueId = uniqueId\n    }\n    feature.strand = strandMap[feature.strand as keyof typeof strandMap] || 0\n\n    feature.chrom = decodeURIComponent(feature.chrom)\n    return feature\n  }\n}\n"],"names":["peg$SyntaxError","message","expected","found","location","this","name","Error","captureStackTrace","child","parent","ctor","constructor","prototype","peg$subclass","buildMessage","DESCRIBE_EXPECTATION_FNS","literal","expectation","literalEscape","text","i","escapedParts","parts","length","Array","classEscape","inverted","any","end","other","description","hex","ch","charCodeAt","toString","toUpperCase","s","replace","j","descriptions","type","sort","slice","join","describeExpected","describeFound","module","exports","SyntaxError","parse","input","options","peg$result","peg$FAILED","peg$startRuleFunctions","declaration","peg$parsedeclaration","peg$startRuleFunction","peg$c0","peg$c1","peg$literalExpectation","peg$c2","peg$c3","peg$c4","comment","fields","peg$c5","peg$c6","peg$c7","peg$c8","peg$c9","peg$c10","peg$c11","peg$c12","peg$c13","peg$c14","peg$c15","peg$c16","peg$c17","peg$c18","peg$c19","f1","w","peg$c20","fds","unshift","peg$c21","peg$c22","peg$c23","peg$c24","peg$c25","peg$c26","peg$c27","peg$c28","peg$c29","peg$c30","size","peg$c31","vals","peg$c32","peg$c33","peg$c34","peg$c35","peg$c36","peg$c37","peg$c38","peg$c39","peg$c40","peg$c41","peg$c42","peg$c43","peg$c44","peg$c45","peg$c46","peg$c47","peg$c48","peg$c49","peg$c50","peg$c51","peg$c52","peg$c53","peg$c54","peg$c55","peg$c56","peg$c57","peg$c58","peg$c59","peg$c60","peg$c61","peg$c62","peg$c63","t","n","peg$c64","peg$c65","peg$classExpectation","peg$c66","peg$c67","peg$c68","peg$c74","peg$c75","peg$c76","peg$c77","peg$otherExpectation","peg$c78","peg$c79","peg$c80","parseInt","peg$c81","peg$c82","peg$c83","peg$currPos","peg$savedPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","startRule","substring","ignoreCase","peg$computePosDetails","pos","p","details","peg$computeLocation","startPos","endPos","startPosDetails","endPosDetails","start","offset","peg$fail","push","s0","s2","s4","s6","s8","s10","s12","peg$parse_","peg$parsedeclareType","peg$parsedeclareName","peg$parsecomment","s1","s3","peg$parsefield","peg$parsefieldList","substr","peg$parsename","peg$parseindexType","peg$parsenonQuotedString","s5","s7","s9","s11","s13","peg$parsefieldType","test","charAt","peg$parsenumber","peg$parsefieldSize","peg$parsefieldValues","peg$parsecommentStart","peg$parseinternalComment","bigChain","bigGenePred","bigInteract","bigLink","bigMaf","bigNarrowPeak","bigPsl","defaultBedSchema","mafFrames","mafSummary","Object","fromEntries","entries","map","key","val","trim","detectTypes","autoSql","numericTypes","Set","autoField","isArray","arrayIsNumeric","has","isNumeric","filter","f","strandMap","BED","args","attemptDefaultBed","parseLine","opts","uniqueId","split","feature","Number","isNaN","isBed12Like","columnVal","num","pop","fieldNames","chromStart","chromEnd","parseFloat","field4","score","field5","strand","chrom","decodeURIComponent"],"sourceRoot":""}