import{At as e,Bt as t,C as n,Ct as r,E as i,Et as a,Ft as o,K as s,Tt as c,V as l,Z as u,_t as d,c as f,dt as p,et as m,f as h,ft as g,gt as _,h as v,l as y,m as b,p as x,pt as S,q as C,rt as w,tt as T,u as E,v as D,w as O,wt as k,y as A,yt as j,z as M,zt as N}from"./three.module-BFsVh7r1.js";var P=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),F=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION=`9.0.1`}),I=P((e,t)=>{var n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n{(function(e,n){typeof define==`function`&&define.amd?define([],n):typeof t==`object`&&t.exports?t.exports=n():e.regexpToAst=n()})(typeof self<`u`?self:e,function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);var t=this.disjunction();this.consumeChar(`/`);for(var n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case`g`:o(n,`global`);break;case`i`:o(n,`ignoreCase`);break;case`m`:o(n,`multiLine`);break;case`u`:o(n,`unicode`);break;case`y`:o(n,`sticky`);break}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}},e.prototype.disjunction=function(){var e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}},e.prototype.alternative=function(){for(var e=[],t=this.idx;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){var e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);var t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break}s(t);var n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}c()},e.prototype.quantifier=function(e){var t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:var r=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:r,atMost:r};break;case`,`:var i;this.isDigit()?(i=this.integerIncludingZero(),t={atLeast:r,atMost:i}):t={atLeast:r,atMost:1/0},this.consumeChar(`}`);break}if(e===!0&&t===void 0)return;s(t);break}if(!(e===!0&&t===void 0))return s(t),this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t},e.prototype.atom=function(){var e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),s(e),e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[i(` `),i(`\r`),i(`\u2028`),i(`\u2029`)]}},e.prototype.atomEscape=function(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.decimalEscapeAtom=function(){return{type:`GroupBackReference`,value:this.positiveInteger()}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case`d`:e=u;break;case`D`:e=u,t=!0;break;case`s`:e=f;break;case`S`:e=f,t=!0;break;case`w`:e=d;break;case`W`:e=d,t=!0;break}return s(e),{type:`Set`,value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case`f`:e=i(`\f`);break;case`n`:e=i(` `);break;case`r`:e=i(`\r`);break;case`t`:e=i(` `);break;case`v`:e=i(`\v`);break}return s(e),{type:`Character`,value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar(`c`);var e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}},e.prototype.nulCharacterAtom=function(){return this.consumeChar(`0`),{type:`Character`,value:i(`\0`)}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar(`x`),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar(`u`),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){return{type:`Character`,value:i(this.popChar())}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` `:case`\r`:case`\u2028`:case`\u2029`:case`\\`:case`]`:throw Error(`TBD`);default:return{type:`Character`,value:i(this.popChar())}}},e.prototype.characterClass=function(){var e=[],t=!1;for(this.consumeChar(`[`),this.peekChar(0)===`^`&&(this.consumeChar(`^`),t=!0);this.isClassAtom();){var n=this.classAtom();if(n.type===`Character`&&this.isRangeDash()){this.consumeChar(`-`);var r=this.classAtom();if(r.type===`Character`){if(r.value=this.input.length)throw Error(`Unexpected end of input`);this.idx++},e.prototype.loc=function(e){return{begin:e,end:this.idx}};var t=/[0-9a-fA-F]/,n=/[0-9]/,r=/[1-9]/;function i(e){return e.charCodeAt(0)}function a(e,t){e.length===void 0?t.push(e):e.forEach(function(e){t.push(e)})}function o(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t]=!0}function s(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`)}function c(){throw Error(`Internal Error - Should never get here!`)}var l,u=[];for(l=i(`0`);l<=i(`9`);l++)u.push(l);var d=[i(`_`)].concat(u);for(l=i(`a`);l<=i(`z`);l++)d.push(l);for(l=i(`A`);l<=i(`Z`);l++)d.push(l);var f=[i(` `),i(`\f`),i(` `),i(`\r`),i(` `),i(`\v`),i(` `),i(`\xA0`),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(`\u2028`),i(`\u2029`),i(` `),i(` `),i(` `),i(``)];function p(){}return p.prototype.visitChildren=function(e){for(var t in e){var n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(function(e){this.visit(e)},this):this.visit(n))}},p.prototype.visit=function(e){switch(e.type){case`Pattern`:this.visitPattern(e);break;case`Flags`:this.visitFlags(e);break;case`Disjunction`:this.visitDisjunction(e);break;case`Alternative`:this.visitAlternative(e);break;case`StartAnchor`:this.visitStartAnchor(e);break;case`EndAnchor`:this.visitEndAnchor(e);break;case`WordBoundary`:this.visitWordBoundary(e);break;case`NonWordBoundary`:this.visitNonWordBoundary(e);break;case`Lookahead`:this.visitLookahead(e);break;case`NegativeLookahead`:this.visitNegativeLookahead(e);break;case`Character`:this.visitCharacter(e);break;case`Set`:this.visitSet(e);break;case`Group`:this.visitGroup(e);break;case`GroupBackReference`:this.visitGroupBackReference(e);break;case`Quantifier`:this.visitQuantifier(e);break}this.visitChildren(e)},p.prototype.visitPattern=function(e){},p.prototype.visitFlags=function(e){},p.prototype.visitDisjunction=function(e){},p.prototype.visitAlternative=function(e){},p.prototype.visitStartAnchor=function(e){},p.prototype.visitEndAnchor=function(e){},p.prototype.visitWordBoundary=function(e){},p.prototype.visitNonWordBoundary=function(e){},p.prototype.visitLookahead=function(e){},p.prototype.visitNegativeLookahead=function(e){},p.prototype.visitCharacter=function(e){},p.prototype.visitSet=function(e){},p.prototype.visitGroup=function(e){},p.prototype.visitGroupBackReference=function(e){},p.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:p,VERSION:`0.5.0`}})}),te=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.clearRegExpParserCache=e.getRegExpAst=void 0;var t=ee(),n={},r=new t.RegExpParser;function i(e){var t=e.toString();if(n.hasOwnProperty(t))return n[t];var i=r.pattern(t);return n[t]=i,i}e.getRegExpAst=i;function a(){n={}}e.clearRegExpParserCache=a}),ne=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.canMatchCharCode=e.firstCharOptimizedIndices=e.getOptimizedStartCodesIndices=e.failedOptimizationPrefixMsg=void 0;var n=ee(),r=I(),i=te(),a=L(),o=`Complement Sets are not supported for first char optimization`;e.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: `;function s(t,a){a===void 0&&(a=!1);try{var s=i.getRegExpAst(t);return c(s.value,{},s.flags.ignoreCase)}catch(i){if(i.message===o)a&&r.PRINT_WARNING(``+e.failedOptimizationPrefixMsg+(` Unable to optimize: < `+t.toString()+` > `)+` Complement Sets cannot be automatically optimized. This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var l=``;a&&(l=` This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),r.PRINT_ERROR(e.failedOptimizationPrefixMsg+` `+(` Failed parsing: < `+t.toString()+` > `)+(` Using the regexp-to-ast library version: `+n.VERSION+` `)+` Please open an issue at: https://github.com/bd82/regexp-to-ast/issues`+l)}}return[]}e.getOptimizedStartCodesIndices=s;function c(e,t,n){switch(e.type){case`Disjunction`:for(var i=0;i=a.minOptimizationVal)for(var o=r.from>=a.minOptimizationVal?r.from:a.minOptimizationVal,s=r.to,c=a.charCodeToOptimizedIndex(o),u=a.charCodeToOptimizedIndex(s),d=c;d<=u;d++)t[d]=d}}});break;case`Group`:c(d.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}var p=d.quantifier!==void 0&&d.quantifier.atLeast===0;if(d.type===`Group`&&f(d)===!1||d.type!==`Group`&&p===!1)break}break;default:throw Error(`non exhaustive match!`)}return r.values(t)}e.firstCharOptimizedIndices=c;function l(e,t,n){var r=a.charCodeToOptimizedIndex(e);t[r]=r,n===!0&&u(e,t)}function u(e,t){var n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){var i=a.charCodeToOptimizedIndex(r.charCodeAt(0));t[i]=i}else{var o=n.toLowerCase();if(o!==n){var i=a.charCodeToOptimizedIndex(o.charCodeAt(0));t[i]=i}}}function d(e,t){return r.find(e.value,function(e){if(typeof e==`number`)return r.contains(t,e);var n=e;return r.find(t,function(e){return n.from<=e&&e<=n.to})!==void 0})}function f(e){return e.quantifier&&e.quantifier.atLeast===0?!0:e.value?r.isArray(e.value)?r.every(e.value,f):f(e.value):!1}var p=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.targetCharCodes=t,n.found=!1,n}return n.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case`Lookahead`:this.visitLookahead(t);return;case`NegativeLookahead`:this.visitNegativeLookahead(t);return}e.prototype.visitChildren.call(this,t)}},n.prototype.visitCharacter=function(e){r.contains(this.targetCharCodes,e.value)&&(this.found=!0)},n.prototype.visitSet=function(e){e.complement?d(e,this.targetCharCodes)===void 0&&(this.found=!0):d(e,this.targetCharCodes)!==void 0&&(this.found=!0)},n}(n.BaseRegExpVisitor);function m(e,t){if(t instanceof RegExp){var n=i.getRegExpAst(t),a=new p(e);return a.visit(n),a.found}else return r.find(t,function(t){return r.contains(e,t.charCodeAt(0))})!==void 0}e.canMatchCharCode=m}),L=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.charCodeToOptimizedIndex=e.minOptimizationVal=e.buildLineBreakIssueMessage=e.LineTerminatorOptimizedTester=e.isShortPattern=e.isCustomPattern=e.cloneEmptyGroups=e.performWarningRuntimeChecks=e.performRuntimeChecks=e.addStickyFlag=e.addStartOfInput=e.findUnreachablePatterns=e.findModesThatDoNotExist=e.findInvalidGroupType=e.findDuplicatePatterns=e.findUnsupportedFlags=e.findStartOfInputAnchor=e.findEmptyMatchRegExps=e.findEndOfInputAnchor=e.findInvalidPatterns=e.findMissingPatterns=e.validatePatterns=e.analyzeTokenTypes=e.enableSticky=e.disableSticky=e.SUPPORT_STICKY=e.MODES=e.DEFAULT_MODE=void 0;var n=ee(),r=re(),i=I(),a=ne(),o=te(),s=`PATTERN`;e.DEFAULT_MODE=`defaultMode`,e.MODES=`modes`,e.SUPPORT_STICKY=typeof RegExp(`(?:)`).sticky==`boolean`;function c(){e.SUPPORT_STICKY=!1}e.disableSticky=c;function l(){e.SUPPORT_STICKY=!0}e.enableSticky=l;function u(t,n){n=i.defaults(n,{useSticky:e.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,` `],tracer:function(e,t){return t()}});var o=n.tracer;o(`initCharCodeToOptimizedIndexMap`,function(){V()});var c;o(`Reject Lexer.NA`,function(){c=i.reject(t,function(e){return e[s]===r.Lexer.NA})});var l=!1,u;o(`Transform Patterns`,function(){l=!1,u=i.map(c,function(e){var t=e[s];if(i.isRegExp(t)){var r=t.source;return r.length===1&&r!==`^`&&r!==`$`&&r!==`.`&&!t.ignoreCase?r:r.length===2&&r[0]===`\\`&&!i.contains([`d`,`D`,`s`,`S`,`t`,`r`,`n`,`t`,`0`,`c`,`b`,`B`,`f`,`v`,`w`,`W`],r[1])?r[1]:n.useSticky?O(t):D(t)}else{if(i.isFunction(t))return l=!0,{exec:t};if(i.has(t,`exec`))return l=!0,t;if(typeof t==`string`){if(t.length===1)return t;var a=t.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`),o=new RegExp(a);return n.useSticky?O(o):D(o)}else throw Error(`non exhaustive match`)}})});var d,f,p,m,h;o(`misc mapping`,function(){d=i.map(c,function(e){return e.tokenTypeIdx}),f=i.map(c,function(e){var t=e.GROUP;if(t!==r.Lexer.SKIPPED){if(i.isString(t))return t;if(i.isUndefined(t))return!1;throw Error(`non exhaustive match`)}}),p=i.map(c,function(e){var t=e.LONGER_ALT;if(t)return i.indexOf(c,t)}),m=i.map(c,function(e){return e.PUSH_MODE}),h=i.map(c,function(e){return i.has(e,`POP_MODE`)})});var g;o(`Line Terminator Handling`,function(){var e=L(n.lineTerminatorCharacters);g=i.map(c,function(e){return!1}),n.positionTracking!==`onlyOffset`&&(g=i.map(c,function(t){if(i.has(t,`LINE_BREAKS`))return t.LINE_BREAKS;if(P(t,e)===!1)return a.canMatchCharCode(e,t.PATTERN)}))});var _,v,y,b;o(`Misc Mapping #2`,function(){_=i.map(c,M),v=i.map(u,N),y=i.reduce(c,function(e,t){var n=t.GROUP;return i.isString(n)&&n!==r.Lexer.SKIPPED&&(e[n]=[]),e},{}),b=i.map(u,function(e,t){return{pattern:u[t],longerAlt:p[t],canLineTerminator:g[t],isCustom:_[t],short:v[t],group:f[t],push:m[t],pop:h[t],tokenTypeIdx:d[t],tokenType:c[t]}})});var x=!0,S=[];return n.safeMode||o(`First Char Optimization`,function(){S=i.reduce(c,function(e,t,r){if(typeof t.PATTERN==`string`)R(e,B(t.PATTERN.charCodeAt(0)),b[r]);else if(i.isArray(t.START_CHARS_HINT)){var o;i.forEach(t.START_CHARS_HINT,function(t){var n=B(typeof t==`string`?t.charCodeAt(0):t);o!==n&&(o=n,R(e,n,b[r]))})}else if(i.isRegExp(t.PATTERN))if(t.PATTERN.unicode)x=!1,n.ensureOptimizations&&i.PRINT_ERROR(``+a.failedOptimizationPrefixMsg+(` Unable to analyze < `+t.PATTERN.toString()+` > pattern. `)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var s=a.getOptimizedStartCodesIndices(t.PATTERN,n.ensureOptimizations);i.isEmpty(s)&&(x=!1),i.forEach(s,function(t){R(e,t,b[r])})}else n.ensureOptimizations&&i.PRINT_ERROR(``+a.failedOptimizationPrefixMsg+(` TokenType: <`+t.name+`> is using a custom token pattern without providing parameter. `)+` This will disable the lexer's first char optimizations. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),x=!1;return e},[])}),o(`ArrayPacking`,function(){S=i.packArray(S)}),{emptyGroups:y,patternIdxToConfig:b,charCodeToPatternIdxToConfig:S,hasCustom:l,canBeOptimized:x}}e.analyzeTokenTypes=u;function d(e,t){var n=[],r=p(e);n=n.concat(r.errors);var i=m(r.valid),a=i.valid;return n=n.concat(i.errors),n=n.concat(f(a)),n=n.concat(S(a)),n=n.concat(C(a,t)),n=n.concat(w(a)),n}e.validatePatterns=d;function f(e){var t=[],n=i.filter(e,function(e){return i.isRegExp(e[s])});return t=t.concat(g(n)),t=t.concat(y(n)),t=t.concat(b(n)),t=t.concat(x(n)),t=t.concat(_(n)),t}function p(e){var t=i.filter(e,function(e){return!i.has(e,s)});return{errors:i.map(t,function(e){return{message:`Token Type: ->`+e.name+`<- missing static 'PATTERN' property`,type:r.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[e]}}),valid:i.difference(e,t)}}e.findMissingPatterns=p;function m(e){var t=i.filter(e,function(e){var t=e[s];return!i.isRegExp(t)&&!i.isFunction(t)&&!i.has(t,`exec`)&&!i.isString(t)});return{errors:i.map(t,function(e){return{message:`Token Type: ->`+e.name+`<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.`,type:r.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[e]}}),valid:i.difference(e,t)}}e.findInvalidPatterns=m;var h=/[^\\][\$]/;function g(e){var a=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.found=!1,t}return n.prototype.visitEndAnchor=function(e){this.found=!0},n}(n.BaseRegExpVisitor),c=i.filter(e,function(e){var t=e[s];try{var n=o.getRegExpAst(t),r=new a;return r.visit(n),r.found}catch{return h.test(t.source)}});return i.map(c,function(e){return{message:`Unexpected RegExp Anchor Error: Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$' See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:r.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[e]}})}e.findEndOfInputAnchor=g;function _(e){var t=i.filter(e,function(e){return e[s].test(``)});return i.map(t,function(e){return{message:`Token Type: ->`+e.name+`<- static 'PATTERN' must not match an empty string`,type:r.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[e]}})}e.findEmptyMatchRegExps=_;var v=/[^\\[][\^]|^\^/;function y(e){var a=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.found=!1,t}return n.prototype.visitStartAnchor=function(e){this.found=!0},n}(n.BaseRegExpVisitor),c=i.filter(e,function(e){var t=e[s];try{var n=o.getRegExpAst(t),r=new a;return r.visit(n),r.found}catch{return v.test(t.source)}});return i.map(c,function(e){return{message:`Unexpected RegExp Anchor Error: Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^' See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:r.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[e]}})}e.findStartOfInputAnchor=y;function b(e){var t=i.filter(e,function(e){var t=e[s];return t instanceof RegExp&&(t.multiline||t.global)});return i.map(t,function(e){return{message:`Token Type: ->`+e.name+`<- static 'PATTERN' may NOT contain global('g') or multiline('m')`,type:r.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}})}e.findUnsupportedFlags=b;function x(e){var t=[],n=i.map(e,function(n){return i.reduce(e,function(e,a){return n.PATTERN.source===a.PATTERN.source&&!i.contains(t,a)&&a.PATTERN!==r.Lexer.NA&&(t.push(a),e.push(a)),e},[])});n=i.compact(n);var a=i.filter(n,function(e){return e.length>1});return i.map(a,function(e){var t=i.map(e,function(e){return e.name});return{message:`The same RegExp pattern ->`+i.first(e).PATTERN+`<-`+(`has been used in all of the following Token Types: `+t.join(`, `)+` <-`),type:r.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}e.findDuplicatePatterns=x;function S(e){var t=i.filter(e,function(e){if(!i.has(e,`GROUP`))return!1;var t=e.GROUP;return t!==r.Lexer.SKIPPED&&t!==r.Lexer.NA&&!i.isString(t)});return i.map(t,function(e){return{message:`Token Type: ->`+e.name+`<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String`,type:r.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}})}e.findInvalidGroupType=S;function C(e,t){var n=i.filter(e,function(e){return e.PUSH_MODE!==void 0&&!i.contains(t,e.PUSH_MODE)});return i.map(n,function(e){return{message:`Token Type: ->`+e.name+`<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->`+e.PUSH_MODE+`<-which does not exist`,type:r.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}})}e.findModesThatDoNotExist=C;function w(e){var t=[],n=i.reduce(e,function(e,t,n){var a=t.PATTERN;return a===r.Lexer.NA||(i.isString(a)?e.push({str:a,idx:n,tokenType:t}):i.isRegExp(a)&&E(a)&&e.push({str:a.source,idx:n,tokenType:t})),e},[]);return i.forEach(e,function(e,a){i.forEach(n,function(n){var i=n.str,o=n.idx,s=n.tokenType;if(a`+s.name+`<- can never be matched. `+(`Because it appears AFTER the Token Type ->`+e.name+`<-`)+`in the lexer's definition. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:c,type:r.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}})}),t}e.findUnreachablePatterns=w;function T(e,t){if(i.isRegExp(t)){var n=t.exec(e);return n!==null&&n.index===0}else{if(i.isFunction(t))return t(e,0,[],{});if(i.has(t,`exec`))return t.exec(e,0,[],{});if(typeof t==`string`)return t===e;throw Error(`non exhaustive match`)}}function E(e){return i.find([`.`,`\\`,`[`,`]`,`|`,`^`,`$`,`(`,`)`,`?`,`*`,`+`,`{`],function(t){return e.source.indexOf(t)!==-1})===void 0}function D(e){var t=e.ignoreCase?`i`:``;return RegExp(`^(?:`+e.source+`)`,t)}e.addStartOfInput=D;function O(e){var t=e.ignoreCase?`iy`:`y`;return RegExp(``+e.source,t)}e.addStickyFlag=O;function k(t,n,a){var o=[];return i.has(t,e.DEFAULT_MODE)||o.push({message:`A MultiMode Lexer cannot be initialized without a <`+e.DEFAULT_MODE+`> property in its definition `,type:r.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),i.has(t,e.MODES)||o.push({message:`A MultiMode Lexer cannot be initialized without a <`+e.MODES+`> property in its definition `,type:r.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),i.has(t,e.MODES)&&i.has(t,e.DEFAULT_MODE)&&!i.has(t.modes,t.defaultMode)&&o.push({message:`A MultiMode Lexer cannot be initialized with a `+e.DEFAULT_MODE+`: <`+t.defaultMode+`>which does not exist `,type:r.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),i.has(t,e.MODES)&&i.forEach(t.modes,function(e,t){i.forEach(e,function(e,n){i.isUndefined(e)&&o.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:`+(`<`+t+`> at index: <`+n+`> `),type:r.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),o}e.performRuntimeChecks=k;function A(e,t,n){var o=[],c=!1,l=i.compact(i.flatten(i.mapValues(e.modes,function(e){return e}))),u=i.reject(l,function(e){return e[s]===r.Lexer.NA}),d=L(n);return t&&i.forEach(u,function(e){var t=P(e,d);if(t!==!1){var n={message:F(e,t),type:t.issue,tokenType:e};o.push(n)}else i.has(e,`LINE_BREAKS`)?e.LINE_BREAKS===!0&&(c=!0):a.canMatchCharCode(d,e.PATTERN)&&(c=!0)}),t&&!c&&o.push({message:`Warning: No LINE_BREAKS Found. This Lexer has been defined to track line and column information, But none of the Token Types can be identified as matching a line terminator. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS for details.`,type:r.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),o}e.performWarningRuntimeChecks=A;function j(e){var t={},n=i.keys(e);return i.forEach(n,function(n){var r=e[n];if(i.isArray(r))t[n]=[];else throw Error(`non exhaustive match`)}),t}e.cloneEmptyGroups=j;function M(e){var t=e.PATTERN;if(i.isRegExp(t))return!1;if(i.isFunction(t)||i.has(t,`exec`))return!0;if(i.isString(t))return!1;throw Error(`non exhaustive match`)}e.isCustomPattern=M;function N(e){return i.isString(e)&&e.length===1?e.charCodeAt(0):!1}e.isShortPattern=N,e.LineTerminatorOptimizedTester={test:function(e){for(var t=e.length,n=this.lastIndex;n Token Type `)+(` Root cause: `+t.errMsg+`. `)+` For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===r.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. `+(` The problem is in the <`+e.name+`> Token Type `)+` For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}e.buildLineBreakIssueMessage=F;function L(e){return i.map(e,function(e){return i.isString(e)&&e.length>0?e.charCodeAt(0):e})}function R(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}e.minOptimizationVal=256;var z=[];function B(t){return t255?255+~~(e/255):e}}}),R=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isTokenType=e.hasExtendingTokensTypesMapProperty=e.hasExtendingTokensTypesProperty=e.hasCategoriesProperty=e.hasShortKeyProperty=e.singleAssignCategoriesToksMap=e.assignCategoriesMapProp=e.assignCategoriesTokensProp=e.assignTokenDefaultProps=e.expandCategories=e.augmentTokenTypes=e.tokenIdxToClass=e.tokenShortNameIdx=e.tokenStructuredMatcherNoCategories=e.tokenStructuredMatcher=void 0;var t=I();function n(e,t){var n=e.tokenTypeIdx;return n===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[n]===!0}e.tokenStructuredMatcher=n;function r(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}e.tokenStructuredMatcherNoCategories=r,e.tokenShortNameIdx=1,e.tokenIdxToClass={};function i(e){var n=a(e);o(n),c(n),s(n),t.forEach(n,function(e){e.isParent=e.categoryMatches.length>0})}e.augmentTokenTypes=i;function a(e){for(var n=t.cloneArr(e),r=e,i=!0;i;){r=t.compact(t.flatten(t.map(r,function(e){return e.CATEGORIES})));var a=t.difference(r,n);n=n.concat(a),t.isEmpty(a)?i=!1:r=a}return n}e.expandCategories=a;function o(n){t.forEach(n,function(n){u(n)||(e.tokenIdxToClass[e.tokenShortNameIdx]=n,n.tokenTypeIdx=e.tokenShortNameIdx++),d(n)&&!t.isArray(n.CATEGORIES)&&(n.CATEGORIES=[n.CATEGORIES]),d(n)||(n.CATEGORIES=[]),f(n)||(n.categoryMatches=[]),p(n)||(n.categoryMatchesMap={})})}e.assignTokenDefaultProps=o;function s(n){t.forEach(n,function(n){n.categoryMatches=[],t.forEach(n.categoryMatchesMap,function(t,r){n.categoryMatches.push(e.tokenIdxToClass[r].tokenTypeIdx)})})}e.assignCategoriesTokensProp=s;function c(e){t.forEach(e,function(e){l([],e)})}e.assignCategoriesMapProp=c;function l(e,n){t.forEach(e,function(e){n.categoryMatchesMap[e.tokenTypeIdx]=!0}),t.forEach(n.CATEGORIES,function(r){var i=e.concat(n);t.contains(i,r)||l(i,r)})}e.singleAssignCategoriesToksMap=l;function u(e){return t.has(e,`tokenTypeIdx`)}e.hasShortKeyProperty=u;function d(e){return t.has(e,`CATEGORIES`)}e.hasCategoriesProperty=d;function f(e){return t.has(e,`categoryMatches`)}e.hasExtendingTokensTypesProperty=f;function p(e){return t.has(e,`categoryMatchesMap`)}e.hasExtendingTokensTypesMapProperty=p;function m(e){return t.has(e,`tokenTypeIdx`)}e.isTokenType=m}),z=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultLexerErrorProvider=void 0,e.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(e){return`Unable to pop Lexer Mode after encountering Token ->`+e.image+`<- The Mode Stack is empty`},buildUnexpectedCharactersMessage:function(e,t,n,r,i){return`unexpected character: ->`+e.charAt(t)+`<- at offset: `+t+`,`+(` skipped `+n+` characters.`)}}}),re=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Lexer=e.LexerDefinitionErrorType=void 0;var t=L(),n=I(),r=R(),i=z(),a=te();(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`})(e.LexerDefinitionErrorType||={});var o={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` `,`\r`],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:i.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(o),e.Lexer=function(){function e(e,i){var s=this;if(i===void 0&&(i=o),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof i==`boolean`)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. a boolean 2nd argument is no longer supported`);this.config=n.merge(o,i);var c=this.config.traceInitPerf;c===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof c==`number`&&(this.traceInitMaxIdent=c,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(`Lexer Constructor`,function(){var c,l=!0;s.TRACE_INIT(`Lexer Config handling`,function(){if(s.config.lineTerminatorsPattern===o.lineTerminatorsPattern)s.config.lineTerminatorsPattern=t.LineTerminatorOptimizedTester;else if(s.config.lineTerminatorCharacters===o.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(i.safeMode&&i.ensureOptimizations)throw Error(`"safeMode" and "ensureOptimizations" flags are mutually exclusive.`);s.trackStartLines=/full|onlyStart/i.test(s.config.positionTracking),s.trackEndLines=/full/i.test(s.config.positionTracking),n.isArray(e)?(c={modes:{}},c.modes[t.DEFAULT_MODE]=n.cloneArr(e),c[t.DEFAULT_MODE]=t.DEFAULT_MODE):(l=!1,c=n.cloneObj(e))}),s.config.skipValidations===!1&&(s.TRACE_INIT(`performRuntimeChecks`,function(){s.lexerDefinitionErrors=s.lexerDefinitionErrors.concat(t.performRuntimeChecks(c,s.trackStartLines,s.config.lineTerminatorCharacters))}),s.TRACE_INIT(`performWarningRuntimeChecks`,function(){s.lexerDefinitionWarning=s.lexerDefinitionWarning.concat(t.performWarningRuntimeChecks(c,s.trackStartLines,s.config.lineTerminatorCharacters))})),c.modes=c.modes?c.modes:{},n.forEach(c.modes,function(e,t){c.modes[t]=n.reject(e,function(e){return n.isUndefined(e)})});var u=n.keys(c.modes);if(n.forEach(c.modes,function(e,a){s.TRACE_INIT(`Mode: <`+a+`> processing`,function(){if(s.modes.push(a),s.config.skipValidations===!1&&s.TRACE_INIT(`validatePatterns`,function(){s.lexerDefinitionErrors=s.lexerDefinitionErrors.concat(t.validatePatterns(e,u))}),n.isEmpty(s.lexerDefinitionErrors)){r.augmentTokenTypes(e);var o;s.TRACE_INIT(`analyzeTokenTypes`,function(){o=t.analyzeTokenTypes(e,{lineTerminatorCharacters:s.config.lineTerminatorCharacters,positionTracking:i.positionTracking,ensureOptimizations:i.ensureOptimizations,safeMode:i.safeMode,tracer:s.TRACE_INIT.bind(s)})}),s.patternIdxToConfig[a]=o.patternIdxToConfig,s.charCodeToPatternIdxToConfig[a]=o.charCodeToPatternIdxToConfig,s.emptyGroups=n.merge(s.emptyGroups,o.emptyGroups),s.hasCustom=o.hasCustom||s.hasCustom,s.canModeBeOptimized[a]=o.canBeOptimized}})}),s.defaultMode=c.defaultMode,!n.isEmpty(s.lexerDefinitionErrors)&&!s.config.deferDefinitionErrorsHandling){var d=n.map(s.lexerDefinitionErrors,function(e){return e.message}).join(`----------------------- `);throw Error(`Errors detected in definition of Lexer: `+d)}n.forEach(s.lexerDefinitionWarning,function(e){n.PRINT_WARNING(e.message)}),s.TRACE_INIT(`Choosing sub-methods implementations`,function(){if(t.SUPPORT_STICKY?(s.chopInput=n.IDENTITY,s.match=s.matchWithTest):(s.updateLastIndex=n.NOOP,s.match=s.matchWithExec),l&&(s.handleModes=n.NOOP),s.trackStartLines===!1&&(s.computeNewColumn=n.IDENTITY),s.trackEndLines===!1&&(s.updateTokenEndLineColumnLocation=n.NOOP),/full/i.test(s.config.positionTracking))s.createTokenInstance=s.createFullToken;else if(/onlyStart/i.test(s.config.positionTracking))s.createTokenInstance=s.createStartOnlyToken;else if(/onlyOffset/i.test(s.config.positionTracking))s.createTokenInstance=s.createOffsetOnlyToken;else throw Error(`Invalid config option: "`+s.config.positionTracking+`"`);s.hasCustom?(s.addToken=s.addTokenUsingPush,s.handlePayload=s.handlePayloadWithCustom):(s.addToken=s.addTokenUsingMemberAccess,s.handlePayload=s.handlePayloadNoCustom)}),s.TRACE_INIT(`Failed Optimization Warnings`,function(){var e=n.reduce(s.canModeBeOptimized,function(e,t,n){return t===!1&&e.push(n),e},[]);if(i.ensureOptimizations&&!n.isEmpty(e))throw Error(`Lexer Modes: < `+e.join(`, `)+` > cannot be optimized. Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. Or inspect the console log for details on how to resolve these issues.`)}),s.TRACE_INIT(`clearRegExpParserCache`,function(){a.clearRegExpParserCache()}),s.TRACE_INIT(`toFastProperties`,function(){n.toFastProperties(s)})})}return e.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!n.isEmpty(this.lexerDefinitionErrors)){var r=n.map(this.lexerDefinitionErrors,function(e){return e.message}).join(`----------------------- `);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer: `+r)}return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,r){var i=this,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y=e,b=y.length,x=0,S=0,C=this.hasCustom?0:Math.floor(e.length/10),w=Array(C),T=[],E=this.trackStartLines?1:void 0,D=this.trackStartLines?1:void 0,O=t.cloneEmptyGroups(this.emptyGroups),k=this.trackStartLines,A=this.config.lineTerminatorsPattern,j=0,M=[],N=[],P=[],F=[];Object.freeze(F);var I=void 0;function ee(){return M}function te(e){var n=t.charCodeToOptimizedIndex(e),r=N[n];return r===void 0?F:r}var ne=function(e){if(P.length===1&&e.tokenType.PUSH_MODE===void 0){var t=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);T.push({offset:e.startOffset,line:e.startLine===void 0?void 0:e.startLine,column:e.startColumn===void 0?void 0:e.startColumn,length:e.image.length,message:t})}else{P.pop();var r=n.last(P);M=i.patternIdxToConfig[r],N=i.charCodeToPatternIdxToConfig[r],j=M.length;var a=i.canModeBeOptimized[r]&&i.config.safeMode===!1;I=N&&a?te:ee}};function L(e){P.push(e),N=this.charCodeToPatternIdxToConfig[e],M=this.patternIdxToConfig[e],j=M.length,j=M.length;var t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;I=N&&t?te:ee}L.call(this,r);for(var R;xl.length&&(l=s,u=d,R=U)}break}}if(l!==null){if(f=l.length,p=R.group,p!==void 0&&(m=R.tokenTypeIdx,h=this.createTokenInstance(l,x,m,R.tokenType,E,D,f),this.handlePayload(h,u),p===!1?S=this.addToken(w,S,h):O[p].push(h)),e=this.chopInput(e,f),x+=f,D=this.computeNewColumn(D,f),k===!0&&R.canLineTerminator===!0){var G=0,ie=void 0,ae=void 0;A.lastIndex=0;do ie=A.test(l),ie===!0&&(ae=A.lastIndex-1,G++);while(ie===!0);G!==0&&(E+=G,D=f-ae,this.updateTokenEndLineColumnLocation(h,p,ae,G,E,D,f))}this.handleModes(R,ne,L,h)}else{for(var K=x,oe=E,se=D,q=!1;!q&&x <`+e+`>`);var i=n.timer(t),a=i.time,o=i.value,s=a>10?console.warn:console.log;return this.traceInitIndent time: `+a+`ms`),this.traceInitIndent--,o}else return t()},e.SKIPPED=`This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.`,e.NA=/NOT_APPLICABLE/,e}()}),B=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tokenMatcher=e.createTokenInstance=e.EOF=e.createToken=e.hasTokenLabel=e.tokenName=e.tokenLabel=void 0;var t=I(),n=re(),r=R();function i(e){return o(e)?e.LABEL:e.name}e.tokenLabel=i;function a(e){return e.name}e.tokenName=a;function o(e){return t.isString(e.LABEL)&&e.LABEL!==``}e.hasTokenLabel=o;var s=`parent`,c=`categories`,l=`label`,u=`group`,d=`push_mode`,f=`pop_mode`,p=`longer_alt`,m=`line_breaks`,h=`start_chars_hint`;function g(e){return _(e)}e.createToken=g;function _(e){var n=e.pattern,i={};if(i.name=e.name,t.isUndefined(n)||(i.PATTERN=n),t.has(e,s))throw`The parent property is no longer supported. See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return t.has(e,c)&&(i.CATEGORIES=e[c]),r.augmentTokenTypes([i]),t.has(e,l)&&(i.LABEL=e[l]),t.has(e,u)&&(i.GROUP=e[u]),t.has(e,f)&&(i.POP_MODE=e[f]),t.has(e,d)&&(i.PUSH_MODE=e[d]),t.has(e,p)&&(i.LONGER_ALT=e[p]),t.has(e,m)&&(i.LINE_BREAKS=e[m]),t.has(e,h)&&(i.START_CHARS_HINT=e[h]),i}e.EOF=g({name:`EOF`,pattern:n.Lexer.NA}),r.augmentTokenTypes([e.EOF]);function v(e,t,n,r,i,a,o,s){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}e.createTokenInstance=v;function y(e,t){return r.tokenStructuredMatcher(e,t)}e.tokenMatcher=y}),V=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.serializeProduction=e.serializeGrammar=e.Terminal=e.Alternation=e.RepetitionWithSeparator=e.Repetition=e.RepetitionMandatoryWithSeparator=e.RepetitionMandatory=e.Option=e.Alternative=e.Rule=e.NonTerminal=e.AbstractProduction=void 0;var n=I(),r=B(),i=function(){function e(e){this._definition=e}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),e.prototype.accept=function(e){e.visit(this),n.forEach(this.definition,function(t){t.accept(e)})},e}();e.AbstractProduction=i;var a=function(e){t(r,e);function r(t){var r=e.call(this,[])||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return Object.defineProperty(r.prototype,"definition",{get:function(){return this.referencedRule===void 0?[]:this.referencedRule.definition},set:function(e){},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this)},r}(i);e.NonTerminal=a;var o=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.orgText=``,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Rule=o;var s=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.ignoreAmbiguities=!1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Alternative=s;var c=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Option=c;var l=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.RepetitionMandatory=l;var u=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.RepetitionMandatoryWithSeparator=u;var d=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Repetition=d;var f=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.RepetitionWithSeparator=f;var p=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,r.ignoreAmbiguities=!1,r.hasPredicates=!1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r}(i);e.Alternation=p;var m=function(){function e(e){this.idx=1,n.assign(this,n.pick(e,function(e){return e!==void 0}))}return e.prototype.accept=function(e){e.visit(this)},e}();e.Terminal=m;function h(e){return n.map(e,g)}e.serializeGrammar=h;function g(e){function t(e){return n.map(e,g)}if(e instanceof a)return{type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};if(e instanceof s)return{type:`Alternative`,definition:t(e.definition)};if(e instanceof c)return{type:`Option`,idx:e.idx,definition:t(e.definition)};if(e instanceof l)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};if(e instanceof u)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:g(new m({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof f)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:g(new m({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof d)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};if(e instanceof p)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};if(e instanceof m){var i={type:`Terminal`,name:e.terminalType.name,label:r.tokenLabel(e.terminalType),idx:e.idx},h=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(i.pattern=n.isRegExp(h)?h.source:h),i}else{if(e instanceof o)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error(`non exhaustive match`)}}e.serializeProduction=g}),H=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RestWalker=void 0;var t=I(),n=V();e.RestWalker=function(){function e(){}return e.prototype.walk=function(e,r){var i=this;r===void 0&&(r=[]),t.forEach(e.definition,function(a,o){var s=t.drop(e.definition,o+1);if(a instanceof n.NonTerminal)i.walkProdRef(a,s,r);else if(a instanceof n.Terminal)i.walkTerminal(a,s,r);else if(a instanceof n.Alternative)i.walkFlat(a,s,r);else if(a instanceof n.Option)i.walkOption(a,s,r);else if(a instanceof n.RepetitionMandatory)i.walkAtLeastOne(a,s,r);else if(a instanceof n.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(a,s,r);else if(a instanceof n.RepetitionWithSeparator)i.walkManySep(a,s,r);else if(a instanceof n.Repetition)i.walkMany(a,s,r);else if(a instanceof n.Alternation)i.walkOr(a,s,r);else throw Error(`non exhaustive match`)})},e.prototype.walkTerminal=function(e,t,n){},e.prototype.walkProdRef=function(e,t,n){},e.prototype.walkFlat=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkOption=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkAtLeastOne=function(e,t,r){var i=[new n.Option({definition:e.definition})].concat(t,r);this.walk(e,i)},e.prototype.walkAtLeastOneSep=function(e,t,n){var i=r(e,t,n);this.walk(e,i)},e.prototype.walkMany=function(e,t,r){var i=[new n.Option({definition:e.definition})].concat(t,r);this.walk(e,i)},e.prototype.walkManySep=function(e,t,n){var i=r(e,t,n);this.walk(e,i)},e.prototype.walkOr=function(e,r,i){var a=this,o=r.concat(i);t.forEach(e.definition,function(e){var t=new n.Alternative({definition:[e]});a.walk(t,o)})},e}();function r(e,t,r){return[new n.Option({definition:[new n.Terminal({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}}),U=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GAstVisitor=void 0;var t=V();e.GAstVisitor=function(){function e(){}return e.prototype.visit=function(e){var n=e;switch(n.constructor){case t.NonTerminal:return this.visitNonTerminal(n);case t.Alternative:return this.visitAlternative(n);case t.Option:return this.visitOption(n);case t.RepetitionMandatory:return this.visitRepetitionMandatory(n);case t.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(n);case t.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(n);case t.Repetition:return this.visitRepetition(n);case t.Alternation:return this.visitAlternation(n);case t.Terminal:return this.visitTerminal(n);case t.Rule:return this.visitRule(n);default:throw Error(`non exhaustive match`)}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitAlternative=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}()}),W=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.collectMethods=e.DslMethodsCollectorVisitor=e.getProductionDslName=e.isBranchingProd=e.isOptionalProd=e.isSequenceProd=void 0;var n=I(),r=V(),i=U();function a(e){return e instanceof r.Alternative||e instanceof r.Option||e instanceof r.Repetition||e instanceof r.RepetitionMandatory||e instanceof r.RepetitionMandatoryWithSeparator||e instanceof r.RepetitionWithSeparator||e instanceof r.Terminal||e instanceof r.Rule}e.isSequenceProd=a;function o(e,t){return t===void 0&&(t=[]),e instanceof r.Option||e instanceof r.Repetition||e instanceof r.RepetitionWithSeparator?!0:e instanceof r.Alternation?n.some(e.definition,function(e){return o(e,t)}):e instanceof r.NonTerminal&&n.contains(t,e)?!1:e instanceof r.AbstractProduction?(e instanceof r.NonTerminal&&t.push(e),n.every(e.definition,function(e){return o(e,t)})):!1}e.isOptionalProd=o;function s(e){return e instanceof r.Alternation}e.isBranchingProd=s;function c(e){if(e instanceof r.NonTerminal)return`SUBRULE`;if(e instanceof r.Option)return`OPTION`;if(e instanceof r.Alternation)return`OR`;if(e instanceof r.RepetitionMandatory)return`AT_LEAST_ONE`;if(e instanceof r.RepetitionMandatoryWithSeparator)return`AT_LEAST_ONE_SEP`;if(e instanceof r.RepetitionWithSeparator)return`MANY_SEP`;if(e instanceof r.Repetition)return`MANY`;if(e instanceof r.Terminal)return`CONSUME`;throw Error(`non exhaustive match`)}e.getProductionDslName=c;var l=function(e){t(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.separator=`-`,t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return r.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},r.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+`Terminal`;n.has(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},r.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+`Terminal`;n.has(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},r.prototype.visitOption=function(e){this.dslMethods.option.push(e)},r.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},r.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},r.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},r.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},r}(i.GAstVisitor);e.DslMethodsCollectorVisitor=l;var u=new l;function d(e){u.reset(),e.accept(u);var t=u.dslMethods;return u.reset(),t}e.collectMethods=d}),G=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.firstForTerminal=e.firstForBranching=e.firstForSequence=e.first=void 0;var t=I(),n=V(),r=W();function i(e){if(e instanceof n.NonTerminal)return i(e.referencedRule);if(e instanceof n.Terminal)return s(e);if(r.isSequenceProd(e))return a(e);if(r.isBranchingProd(e))return o(e);throw Error(`non exhaustive match`)}e.first=i;function a(e){for(var n=[],a=e.definition,o=0,s=a.length>o,c,l=!0;s&&l;)c=a[o],l=r.isOptionalProd(c),n=n.concat(i(c)),o+=1,s=a.length>o;return t.uniq(n)}e.firstForSequence=a;function o(e){var n=t.map(e.definition,function(e){return i(e)});return t.uniq(t.flatten(n))}e.firstForBranching=o;function s(e){return[e.terminalType]}e.firstForTerminal=s}),ie=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.IN=void 0,e.IN=`_~IN~_`}),ae=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.buildInProdFollowPrefix=e.buildBetweenProdsFollowPrefix=e.computeAllProdsFollows=e.ResyncFollowsWalker=void 0;var n=H(),r=G(),i=I(),a=ie(),o=V(),s=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.topProd=t,n.follows={},n}return n.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},n.prototype.walkTerminal=function(e,t,n){},n.prototype.walkProdRef=function(e,t,n){var i=l(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),s=new o.Alternative({definition:a}),c=r.first(s);this.follows[i]=c},n}(n.RestWalker);e.ResyncFollowsWalker=s;function c(e){var t={};return i.forEach(e,function(e){var n=new s(e).startWalking();i.assign(t,n)}),t}e.computeAllProdsFollows=c;function l(e,t){return e.name+t+a.IN}e.buildBetweenProdsFollowPrefix=l;function u(e){return e.terminalType.name+e.idx+a.IN}e.buildInProdFollowPrefix=u}),K=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGrammarValidatorErrorProvider=e.defaultGrammarResolverErrorProvider=e.defaultParserErrorProvider=void 0;var t=B(),n=I(),r=I(),i=V(),a=W();e.defaultParserErrorProvider={buildMismatchTokenMessage:function(e){var n=e.expected,r=e.actual;return e.previous,e.ruleName,`Expecting `+(t.hasTokenLabel(n)?`--> `+t.tokenLabel(n)+` <--`:`token of type --> `+n.name+` <--`)+` but found --> '`+r.image+`' <--`},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;return e.ruleName,`Redundant input, expecting EOF but found: `+t.image},buildNoViableAltMessage:function(e){var n=e.expectedPathsPerAlt,i=e.actual;e.previous;var a=e.customUserDescription;e.ruleName;var o=`Expecting: `,s=` but found: '`+r.first(i).image+`'`;if(a)return o+a+s;var c=r.reduce(n,function(e,t){return e.concat(t)},[]),l=r.map(c,function(e){return`[`+r.map(e,function(e){return t.tokenLabel(e)}).join(`, `)+`]`});return o+(`one of these possible Token sequences: `+r.map(l,function(e,t){return` `+(t+1)+`. `+e}).join(` `))+s},buildEarlyExitMessage:function(e){var n=e.expectedIterationPaths,i=e.actual,a=e.customUserDescription;e.ruleName;var o=`Expecting: `,s=` but found: '`+r.first(i).image+`'`;return a?o+a+s:o+(`expecting at least one iteration which starts with one of these possible Token sequences:: `+(`<`+r.map(n,function(e){return`[`+r.map(e,function(e){return t.tokenLabel(e)}).join(`,`)+`]`}).join(` ,`)+`>`))+s}},Object.freeze(e.defaultParserErrorProvider),e.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(e,t){return`Invalid grammar, reference to a rule which is not defined: ->`+t.nonTerminalName+`<- inside top level rule: ->`+e.name+`<-`}},e.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(e,t){function n(e){return e instanceof i.Terminal?e.terminalType.name:e instanceof i.NonTerminal?e.nonTerminalName:``}var o=e.name,s=r.first(t),c=s.idx,l=a.getProductionDslName(s),u=n(s),d=c>0,f=`->`+l+(d?c:``)+`<- `+(u?`with argument: ->`+u+`<-`:``)+` appears more than once (`+t.length+` times) in the top level rule: ->`+o+`<-. For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES `;return f=f.replace(/[ \t]+/g,` `),f=f.replace(/\s\s+/g,` `),f},buildNamespaceConflictError:function(e){return`Namespace conflict found in grammar. `+(`The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <`+e.name+`>. `)+`To resolve this make sure each Terminal and Non-Terminal names are unique This is easy to accomplish by using the convention that Terminal names start with an uppercase letter and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError:function(e){var n=r.map(e.prefixPath,function(e){return t.tokenLabel(e)}).join(`, `),i=e.alternation.idx===0?``:e.alternation.idx;return`Ambiguous alternatives: <`+e.ambiguityIndices.join(` ,`)+`> due to common lookahead prefix `+(`in inside <`+e.topLevelRule.name+`> Rule, `)+(`<`+n+`> may appears as a prefix path in all these alternatives. `)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX For Further details.`},buildAlternationAmbiguityError:function(e){var n=r.map(e.prefixPath,function(e){return t.tokenLabel(e)}).join(`, `),i=e.alternation.idx===0?``:e.alternation.idx,a=`Ambiguous Alternatives Detected: <`+e.ambiguityIndices.join(` ,`)+`> in `+(` inside <`+e.topLevelRule.name+`> Rule, `)+(`<`+n+`> may appears as a prefix path in all these alternatives. `);return a+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`,a},buildEmptyRepetitionError:function(e){var t=a.getProductionDslName(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <`+t+`> within Rule <`+e.topLevelRule.name+`> can never consume any tokens. This could lead to an infinite loop.`},buildTokenNameError:function(e){return`deprecated`},buildEmptyAlternationError:function(e){return`Ambiguous empty alternative: <`+(e.emptyChoiceIdx+1)+`>`+(` in inside <`+e.topLevelRule.name+`> Rule. `)+`Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError:function(e){return`An Alternation cannot have more than 256 alternatives: `+(` inside <`+e.topLevelRule.name+`> Rule. has `+(e.alternation.definition.length+1)+` alternatives.`)},buildLeftRecursionError:function(e){var t=e.topLevelRule.name,r=n.map(e.leftRecursionPath,function(e){return e.name}),i=t+` --> `+r.concat([t]).join(` --> `);return`Left Recursion found in grammar. `+(`rule: <`+t+`> can be invoked from itself (directly or indirectly) `)+(`without consuming any Tokens. The grammar path that causes this is: `+i+` `)+` To fix this refactor your grammar to remove the left recursion. see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`},buildInvalidRuleNameError:function(e){return`deprecated`},buildDuplicateRuleNameError:function(e){return`Duplicate definition, rule: ->`+(e.topLevelRule instanceof i.Rule?e.topLevelRule.name:e.topLevelRule)+`<- is already defined in the grammar: ->`+e.grammarName+`<-`}}}),oe=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.GastRefResolverVisitor=e.resolveGrammar=void 0;var n=Z(),r=I(),i=U();function a(e,t){var n=new o(e,t);return n.resolveRefs(),n.errors}e.resolveGrammar=a;var o=function(e){t(i,e);function i(t,n){var r=e.call(this)||this;return r.nameToTopRule=t,r.errMsgProvider=n,r.errors=[],r}return i.prototype.resolveRefs=function(){var e=this;r.forEach(r.values(this.nameToTopRule),function(t){e.currTopLevel=t,t.accept(e)})},i.prototype.visitNonTerminal=function(e){var t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{var r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:n.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},i}(i.GAstVisitor);e.GastRefResolverVisitor=o}),se=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.nextPossibleTokensAfter=e.possiblePathsFrom=e.NextTerminalAfterAtLeastOneSepWalker=e.NextTerminalAfterAtLeastOneWalker=e.NextTerminalAfterManySepWalker=e.NextTerminalAfterManyWalker=e.AbstractNextTerminalAfterProductionWalker=e.NextAfterTokenWalker=e.AbstractNextPossibleTokensWalker=void 0;var n=H(),r=I(),i=G(),a=V(),o=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.topProd=t,r.path=n,r.possibleTokTypes=[],r.nextProductionName=``,r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return n.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error(`The path does not start with the walker's top Rule!`);return this.ruleStack=r.cloneArr(this.path.ruleStack).reverse(),this.occurrenceStack=r.cloneArr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},n.prototype.walk=function(t,n){n===void 0&&(n=[]),this.found||e.prototype.walk.call(this,t,n)},n.prototype.walkProdRef=function(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}},n.prototype.updateExpectedNext=function(){r.isEmpty(this.ruleStack)?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},n}(n.RestWalker);e.AbstractNextPossibleTokensWalker=o,e.NextAfterTokenWalker=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.path=n,r.nextTerminalName=``,r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return n.prototype.walkTerminal=function(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var r=t.concat(n),o=new a.Alternative({definition:r});this.possibleTokTypes=i.first(o),this.found=!0}},n}(o);var s=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.topRule=t,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return n.prototype.startWalking=function(){return this.walk(this.topRule),this.result},n}(n.RestWalker);e.AbstractNextTerminalAfterProductionWalker=s,e.NextTerminalAfterManyWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkMany=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkMany.call(this,t,n,i)},n}(s),e.NextTerminalAfterManySepWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkManySep=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkManySep.call(this,t,n,i)},n}(s),e.NextTerminalAfterAtLeastOneWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkAtLeastOne=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOne.call(this,t,n,i)},n}(s),e.NextTerminalAfterAtLeastOneSepWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkAtLeastOneSep=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,n,i)},n}(s);function c(e,t,n){n===void 0&&(n=[]),n=r.cloneArr(n);var i=[],o=0;function s(t){return t.concat(r.drop(e,o+1))}function l(e){var r=c(s(e),t,n);return i.concat(r)}for(;n.length=0;M--){var N={idx:_,def:b.definition[M].definition.concat(r.drop(g)),ruleStack:v,occurrenceStack:y};m.push(N),m.push(c)}else if(b instanceof a.Alternative)m.push({idx:_,def:b.definition.concat(r.drop(g)),ruleStack:v,occurrenceStack:y});else if(b instanceof a.Rule)m.push(u(b,_,v,y));else throw Error(`non exhaustive match`)}}return p}e.nextPossibleTokensAfter=l;function u(e,t,n,i){var a=r.cloneArr(n);a.push(e.name);var o=r.cloneArr(i);return o.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:o}}}),q=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.areTokenCategoriesNotUsed=e.isStrictPrefixOfPath=e.containsPath=e.getLookaheadPathsForOptionalProd=e.getLookaheadPathsForOr=e.lookAheadSequenceFromAlternatives=e.buildSingleAlternativeLookaheadFunction=e.buildAlternativesLookAheadFunc=e.buildLookaheadFuncForOptionalProd=e.buildLookaheadFuncForOr=e.getProdType=e.PROD_TYPE=void 0;var n=I(),r=se(),i=H(),a=R(),o=V(),s=U(),c;(function(e){e[e.OPTION=0]=`OPTION`,e[e.REPETITION=1]=`REPETITION`,e[e.REPETITION_MANDATORY=2]=`REPETITION_MANDATORY`,e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]=`REPETITION_MANDATORY_WITH_SEPARATOR`,e[e.REPETITION_WITH_SEPARATOR=4]=`REPETITION_WITH_SEPARATOR`,e[e.ALTERNATION=5]=`ALTERNATION`})(c=e.PROD_TYPE||={});function l(e){if(e instanceof o.Option)return c.OPTION;if(e instanceof o.Repetition)return c.REPETITION;if(e instanceof o.RepetitionMandatory)return c.REPETITION_MANDATORY;if(e instanceof o.RepetitionMandatoryWithSeparator)return c.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof o.RepetitionWithSeparator)return c.REPETITION_WITH_SEPARATOR;if(e instanceof o.Alternation)return c.ALTERNATION;throw Error(`non exhaustive match`)}e.getProdType=l;function u(e,t,n,r,i,o){var s=b(e,t,n);return o(s,r,w(s)?a.tokenStructuredMatcherNoCategories:a.tokenStructuredMatcher,i)}e.buildLookaheadFuncForOr=u;function d(e,t,n,r,i,o){var s=x(e,t,i,n),c=w(s)?a.tokenStructuredMatcherNoCategories:a.tokenStructuredMatcher;return o(s[0],c,r)}e.buildLookaheadFuncForOptionalProd=d;function f(e,t,r,i){var a=e.length,o=n.every(e,function(e){return n.every(e,function(e){return e.length===1})});if(t)return function(t){for(var i=n.map(t,function(e){return e.GATE}),o=0;o{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.checkPrefixAlternativesAmbiguities=e.validateSomeNonEmptyLookaheadPath=e.validateTooManyAlts=e.RepetionCollector=e.validateAmbiguousAlternationAlternatives=e.validateEmptyOrAlternative=e.getFirstNoneTerminal=e.validateNoLeftRecursion=e.validateRuleIsOverridden=e.validateRuleDoesNotAlreadyExist=e.OccurrenceValidationCollector=e.identifyProductionForDuplicates=e.validateGrammar=void 0;var n=I(),r=I(),i=Z(),a=W(),o=q(),s=se(),c=V(),l=U();function u(e,t,i,a,o){var s=n.map(e,function(e){return d(e,a)}),c=n.map(e,function(e){return _(e,e,a)}),l=[],u=[],f=[];r.every(c,r.isEmpty)&&(l=r.map(e,function(e){return b(e,a)}),u=r.map(e,function(e){return x(e,t,a)}),f=w(e,t,a));var p=D(e,i,a),m=r.map(e,function(e){return C(e,a)}),g=r.map(e,function(t){return h(t,e,o,a)});return n.flatten(s.concat(f,c,l,u,p,m,g))}e.validateGrammar=u;function d(e,t){var r=new m;e.accept(r);var o=r.allProductions,s=n.groupBy(o,f),c=n.pick(s,function(e){return e.length>1});return n.map(n.values(c),function(r){var o=n.first(r),s=t.buildDuplicateFoundError(e,r),c=a.getProductionDslName(o),l={message:s,type:i.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:c,occurrence:o.idx},u=p(o);return u&&(l.parameter=u),l})}function f(e){return a.getProductionDslName(e)+`_#_`+e.idx+`_#_`+p(e)}e.identifyProductionForDuplicates=f;function p(e){return e instanceof c.Terminal?e.terminalType.name:e instanceof c.NonTerminal?e.nonTerminalName:``}var m=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.allProductions=[],t}return n.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},n.prototype.visitOption=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetition=function(e){this.allProductions.push(e)},n.prototype.visitAlternation=function(e){this.allProductions.push(e)},n.prototype.visitTerminal=function(e){this.allProductions.push(e)},n}(l.GAstVisitor);e.OccurrenceValidationCollector=m;function h(e,t,n,a){var o=[];if(r.reduce(t,function(t,n){return n.name===e.name?t+1:t},0)>1){var s=a.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});o.push({message:s,type:i.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e.name})}return o}e.validateRuleDoesNotAlreadyExist=h;function g(e,t,r){var a=[],o;return n.contains(t,e)||(o=`Invalid rule override, rule: ->`+e+`<- cannot be overridden in the grammar: ->`+r+`<-as it is not defined in any of the super grammars `,a.push({message:o,type:i.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:e})),a}e.validateRuleIsOverridden=g;function _(e,t,r,a){a===void 0&&(a=[]);var o=[],s=v(t.definition);if(n.isEmpty(s))return[];var c=e.name;n.contains(s,e)&&o.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:a}),type:i.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:c});var l=n.difference(s,a.concat([e])),u=n.map(l,function(t){var i=n.cloneArr(a);return i.push(t),_(e,t,r,i)});return o.concat(n.flatten(u))}e.validateNoLeftRecursion=_;function v(e){var t=[];if(n.isEmpty(e))return t;var r=n.first(e);if(r instanceof c.NonTerminal)t.push(r.referencedRule);else if(r instanceof c.Alternative||r instanceof c.Option||r instanceof c.RepetitionMandatory||r instanceof c.RepetitionMandatoryWithSeparator||r instanceof c.RepetitionWithSeparator||r instanceof c.Repetition)t=t.concat(v(r.definition));else if(r instanceof c.Alternation)t=n.flatten(n.map(r.definition,function(e){return v(e.definition)}));else if(!(r instanceof c.Terminal))throw Error(`non exhaustive match`);var i=a.isOptionalProd(r),o=e.length>1;if(i&&o){var s=n.drop(e);return t.concat(v(s))}else return t}e.getFirstNoneTerminal=v;var y=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.alternations=[],t}return n.prototype.visitAlternation=function(e){this.alternations.push(e)},n}(l.GAstVisitor);function b(e,t){var r=new y;e.accept(r);var a=r.alternations;return n.reduce(a,function(r,a){var o=n.dropRight(a.definition),c=n.map(o,function(r,o){var c=s.nextPossibleTokensAfter([r],[],null,1);return n.isEmpty(c)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:a,emptyChoiceIdx:o}),type:i.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:a.idx,alternative:o+1}:null});return r.concat(n.compact(c))},[])}e.validateEmptyOrAlternative=b;function x(e,t,i){var a=new y;e.accept(a);var s=a.alternations;return s=r.reject(s,function(e){return e.ignoreAmbiguities===!0}),n.reduce(s,function(n,r){var a=r.idx,s=r.maxLookahead||t,c=o.getLookaheadPathsForOr(a,e,s,r),l=T(c,r,e,i),u=E(c,r,e,i);return n.concat(l,u)},[])}e.validateAmbiguousAlternationAlternatives=x;var S=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.allProductions=[],t}return n.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetition=function(e){this.allProductions.push(e)},n}(l.GAstVisitor);e.RepetionCollector=S;function C(e,t){var r=new y;e.accept(r);var a=r.alternations;return n.reduce(a,function(n,r){return r.definition.length>255&&n.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:i.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}),n},[])}e.validateTooManyAlts=C;function w(e,t,n){var a=[];return r.forEach(e,function(e){var s=new S;e.accept(s);var c=s.allProductions;r.forEach(c,function(s){var c=o.getProdType(s),l=s.maxLookahead||t,u=s.idx,d=o.getLookaheadPathsForOptionalProd(u,e,c,l)[0];if(r.isEmpty(r.flatten(d))){var f=n.buildEmptyRepetitionError({topLevelRule:e,repetition:s});a.push({message:f,type:i.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),a}e.validateSomeNonEmptyLookaheadPath=w;function T(e,t,a,s){var c=[],l=r.reduce(e,function(n,i,a){return t.definition[a].ignoreAmbiguities===!0||r.forEach(i,function(i){var s=[a];r.forEach(e,function(e,n){a!==n&&o.containsPath(e,i)&&t.definition[n].ignoreAmbiguities!==!0&&s.push(n)}),s.length>1&&!o.containsPath(c,i)&&(c.push(i),n.push({alts:s,path:i}))}),n},[]);return n.map(l,function(e){var n=r.map(e.alts,function(e){return e+1});return{message:s.buildAlternationAmbiguityError({topLevelRule:a,alternation:t,ambiguityIndices:n,prefixPath:e.path}),type:i.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:a.name,occurrence:t.idx,alternatives:[e.alts]}})}function E(e,t,n,a){var s=[],c=r.reduce(e,function(e,t,n){var i=r.map(t,function(e){return{idx:n,path:e}});return e.concat(i)},[]);return r.forEach(c,function(e){if(t.definition[e.idx].ignoreAmbiguities!==!0){var l=e.idx,u=e.path,d=r.findAll(c,function(e){return t.definition[e.idx].ignoreAmbiguities!==!0&&e.idx{Object.defineProperty(e,"__esModule",{value:!0}),e.validateGrammar=e.resolveGrammar=void 0;var t=I(),n=oe(),r=ce(),i=K();function a(e){e=t.defaults(e,{errMsgProvider:i.defaultGrammarResolverErrorProvider});var r={};return t.forEach(e.rules,function(e){r[e.name]=e}),n.resolveGrammar(r,e.errMsgProvider)}e.resolveGrammar=a;function o(e){return e=t.defaults(e,{errMsgProvider:i.defaultGrammarValidatorErrorProvider}),r.validateGrammar(e.rules,e.maxLookahead,e.tokenTypes,e.errMsgProvider,e.grammarName)}e.validateGrammar=o}),ue=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EarlyExitException=e.NotAllInputParsedException=e.NoViableAltException=e.MismatchedTokenException=e.isRecognitionException=void 0;var n=I(),r=`MismatchedTokenException`,i=`NoViableAltException`,a=`EarlyExitException`,o=`NotAllInputParsedException`,s=[r,i,a,o];Object.freeze(s);function c(e){return n.contains(s,e.name)}e.isRecognitionException=c;var l=function(e){t(n,e);function n(t,n){var r=this.constructor,i=e.call(this,t)||this;return i.token=n,i.resyncedTokens=[],Object.setPrototypeOf(i,r.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,i.constructor),i}return n}(Error);e.MismatchedTokenException=function(e){t(n,e);function n(t,n,i){var a=e.call(this,t,n)||this;return a.previousToken=i,a.name=r,a}return n}(l),e.NoViableAltException=function(e){t(n,e);function n(t,n,r){var a=e.call(this,t,n)||this;return a.previousToken=r,a.name=i,a}return n}(l),e.NotAllInputParsedException=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.name=o,r}return n}(l),e.EarlyExitException=function(e){t(n,e);function n(t,n,r){var i=e.call(this,t,n)||this;return i.previousToken=r,i.name=a,i}return n}(l)}),de=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.attemptInRepetitionRecovery=e.Recoverable=e.InRuleRecoveryException=e.IN_RULE_RECOVERY_EXCEPTION=e.EOF_FOLLOW_KEY=void 0;var t=B(),n=I(),r=ue(),i=ie(),a=Z();e.EOF_FOLLOW_KEY={},e.IN_RULE_RECOVERY_EXCEPTION=`InRuleRecoveryException`;function o(t){this.name=e.IN_RULE_RECOVERY_EXCEPTION,this.message=t}e.InRuleRecoveryException=o,o.prototype=Error.prototype,e.Recoverable=function(){function c(){}return c.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=n.has(e,`recoveryEnabled`)?e.recoveryEnabled:a.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=s)},c.prototype.getTokenToInsert=function(e){var n=t.createTokenInstance(e,``,NaN,NaN,NaN,NaN,NaN,NaN);return n.isInsertedInRecovery=!0,n},c.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},c.prototype.tryInRepetitionRecovery=function(e,t,i,a){for(var o=this,s=this.findReSyncTokenType(),c=this.exportLexerState(),l=[],u=!1,d=this.LA(1),f=this.LA(1),p=function(){var e=o.LA(0),t=o.errorMessageProvider.buildMismatchTokenMessage({expected:a,actual:d,previous:e,ruleName:o.getCurrRuleFullName()}),i=new r.MismatchedTokenException(t,d,o.LA(0));i.resyncedTokens=n.dropRight(l),o.SAVE_ERROR(i)};!u;)if(this.tokenMatcher(f,a)){p();return}else if(i.call(this)){p(),e.apply(this,t);return}else this.tokenMatcher(f,s)?u=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,l));this.importLexerState(c)},c.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,n){return!(n===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},c.prototype.getFollowsForInRuleRecovery=function(e,t){var n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)},c.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new o(`sad sad panda`)},c.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},c.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var r=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||n.isEmpty(t))return!1;var i=this.LA(1);return n.find(t,function(e){return r.tokenMatcher(i,e)})!==void 0},c.prototype.canRecoverWithSingleTokenDeletion=function(e){return this.tokenMatcher(this.LA(2),e)},c.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return n.contains(r,e)},c.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),r=2;;){var i=t.tokenType;if(n.contains(e,i))return i;t=this.LA(r),r++}},c.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return e.EOF_FOLLOW_KEY;var t=this.getLastExplicitRuleShortName(),n=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:n,inRule:this.shortRuleNameToFullName(r)}},c.prototype.buildFullFollowKeyStack=function(){var t=this,r=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return n.map(r,function(n,a){return a===0?e.EOF_FOLLOW_KEY:{ruleName:t.shortRuleNameToFullName(n),idxInCallingRule:i[a],inRule:t.shortRuleNameToFullName(r[a-1])}})},c.prototype.flattenFollowSet=function(){var e=this,t=n.map(this.buildFullFollowKeyStack(),function(t){return e.getFollowSetFromFollowKey(t)});return n.flatten(t)},c.prototype.getFollowSetFromFollowKey=function(n){if(n===e.EOF_FOLLOW_KEY)return[t.EOF];var r=n.ruleName+n.idxInCallingRule+i.IN+n.inRule;return this.resyncFollows[r]},c.prototype.addToResyncTokens=function(e,n){return this.tokenMatcher(e,t.EOF)||n.push(e),n},c.prototype.reSyncTo=function(e){for(var t=[],r=this.LA(1);this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return n.dropRight(t)},c.prototype.attemptInRepetitionRecovery=function(e,t,n,r,i,a,o){},c.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:n.cloneArr(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},c.prototype.getHumanReadableRuleStack=function(){var e=this;return n.map(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},c}();function s(e,n,r,i,a,o,s){var c=this.getKeyForAutomaticLookahead(i,a),l=this.firstAfterRepMap[c];if(l===void 0){var u=this.getCurrRuleFullName(),d=this.getGAstProductions()[u];l=new o(d,a).startWalking(),this.firstAfterRepMap[c]=l}var f=l.token,p=l.occurrence,m=l.isEndOfRule;this.RULE_STACK.length===1&&m&&f===void 0&&(f=t.EOF,p=1),this.shouldInRepetitionRecoveryBeTried(f,p,s)&&this.tryInRepetitionRecovery(e,n,r,f)}e.attemptInRepetitionRecovery=s}),fe=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getKeyForAutomaticLookahead=e.AT_LEAST_ONE_SEP_IDX=e.MANY_SEP_IDX=e.AT_LEAST_ONE_IDX=e.MANY_IDX=e.OPTION_IDX=e.OR_IDX=e.BITS_FOR_ALT_IDX=e.BITS_FOR_RULE_IDX=e.BITS_FOR_OCCURRENCE_IDX=e.BITS_FOR_METHOD_TYPE=void 0,e.BITS_FOR_METHOD_TYPE=4,e.BITS_FOR_OCCURRENCE_IDX=8,e.BITS_FOR_RULE_IDX=12,e.BITS_FOR_ALT_IDX=8,e.OR_IDX=1<{Object.defineProperty(e,"__esModule",{value:!0}),e.LooksAhead=void 0;var t=q(),n=I(),r=Z(),i=fe(),a=W();e.LooksAhead=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=n.has(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:r.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=n.has(e,`maxLookahead`)?e.maxLookahead:r.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=n.isES2015MapSupported()?new Map:[],n.isES2015MapSupported()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var r=this;n.forEach(e,function(e){r.TRACE_INIT(e.name+` Rule Lookahead`,function(){var o=a.collectMethods(e),s=o.alternation,c=o.repetition,l=o.option,u=o.repetitionMandatory,d=o.repetitionMandatoryWithSeparator,f=o.repetitionWithSeparator;n.forEach(s,function(n){var o=n.idx===0?``:n.idx;r.TRACE_INIT(``+a.getProductionDslName(n)+o,function(){var a=t.buildLookaheadFuncForOr(n.idx,e,n.maxLookahead||r.maxLookahead,n.hasPredicates,r.dynamicTokensEnabled,r.lookAheadBuilderForAlternatives),o=i.getKeyForAutomaticLookahead(r.fullRuleNameToShort[e.name],i.OR_IDX,n.idx);r.setLaFuncCache(o,a)})}),n.forEach(c,function(n){r.computeLookaheadFunc(e,n.idx,i.MANY_IDX,t.PROD_TYPE.REPETITION,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(l,function(n){r.computeLookaheadFunc(e,n.idx,i.OPTION_IDX,t.PROD_TYPE.OPTION,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(u,function(n){r.computeLookaheadFunc(e,n.idx,i.AT_LEAST_ONE_IDX,t.PROD_TYPE.REPETITION_MANDATORY,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(d,function(n){r.computeLookaheadFunc(e,n.idx,i.AT_LEAST_ONE_SEP_IDX,t.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(f,function(n){r.computeLookaheadFunc(e,n.idx,i.MANY_SEP_IDX,t.PROD_TYPE.REPETITION_WITH_SEPARATOR,n.maxLookahead,a.getProductionDslName(n))})})})},e.prototype.computeLookaheadFunc=function(e,n,r,a,o,s){var c=this;this.TRACE_INIT(``+s+(n===0?``:n),function(){var s=t.buildLookaheadFuncForOptionalProd(n,e,o||c.maxLookahead,c.dynamicTokensEnabled,a,c.lookAheadBuilderForOptional),l=i.getKeyForAutomaticLookahead(c.fullRuleNameToShort[e.name],r,n);c.setLaFuncCache(l,s)})},e.prototype.lookAheadBuilderForOptional=function(e,n,r){return t.buildSingleAlternativeLookaheadFunction(e,n,r)},e.prototype.lookAheadBuilderForAlternatives=function(e,n,r,i){return t.buildAlternativesLookAheadFunc(e,n,r,i)},e.prototype.getKeyForAutomaticLookahead=function(e,t){var n=this.getLastExplicitRuleShortName();return i.getKeyForAutomaticLookahead(n,e,t)},e.prototype.getLaFuncFromCache=function(e){},e.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},e.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},e.prototype.setLaFuncCache=function(e,t){},e.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},e.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},e}()}),me=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addNoneTerminalToCst=e.addTerminalToCst=e.setNodeLocationFull=e.setNodeLocationOnlyOffset=void 0;function t(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset{Object.defineProperty(e,"__esModule",{value:!0}),e.defineNameProp=e.functionName=e.classNameFromInstance=void 0;var t=I();function n(e){return i(e.constructor)}e.classNameFromInstance=n;var r=`name`;function i(e){return e.name||`anonymous`}e.functionName=i;function a(e,n){var i=Object.getOwnPropertyDescriptor(e,r);return t.isUndefined(i)||i.configurable?(Object.defineProperty(e,r,{enumerable:!1,configurable:!0,writable:!1,value:n}),!0):!1}e.defineNameProp=a}),ge=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateRedundantMethods=e.validateMissingCstMethods=e.validateVisitor=e.CstVisitorDefinitionError=e.createBaseVisitorConstructorWithDefaults=e.createBaseSemanticVisitorConstructor=e.defaultVisit=void 0;var t=I(),n=he();function r(e,n){for(var r=t.keys(e),i=r.length,a=0;a: `+(``+i.join(` `).replace(/\n/g,` `)))}}},i.prototype.constructor=i,i._RULE_NAMES=r,i}e.createBaseSemanticVisitorConstructor=i;function a(e,i,a){var o=function(){};n.defineNameProp(o,e+`BaseSemanticsWithDefaults`);var s=Object.create(a.prototype);return t.forEach(i,function(e){s[e]=r}),o.prototype=s,o.prototype.constructor=o,o}e.createBaseVisitorConstructorWithDefaults=a;var o;(function(e){e[e.REDUNDANT_METHOD=0]=`REDUNDANT_METHOD`,e[e.MISSING_METHOD=1]=`MISSING_METHOD`})(o=e.CstVisitorDefinitionError||={});function s(e,t){var n=c(e,t),r=u(e,t);return n.concat(r)}e.validateVisitor=s;function c(e,r){var i=t.map(r,function(r){if(!t.isFunction(e[r]))return{msg:`Missing visitor method: <`+r+`> on `+n.functionName(e.constructor)+` CST Visitor.`,type:o.MISSING_METHOD,methodName:r}});return t.compact(i)}e.validateMissingCstMethods=c;var l=[`constructor`,`visit`,`validateVisitor`];function u(e,r){var i=[];for(var a in e)t.isFunction(e[a])&&!t.contains(l,a)&&!t.contains(r,a)&&i.push({msg:`Redundant visitor method: <`+a+`> on `+n.functionName(e.constructor)+` CST Visitor There is no Grammar Rule corresponding to this method's name. `,type:o.REDUNDANT_METHOD,methodName:a});return i}e.validateRedundantMethods=u}),_e=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TreeBuilder=void 0;var t=me(),n=I(),r=ge(),i=Z();e.TreeBuilder=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=n.has(e,`nodeLocationTracking`)?e.nodeLocationTracking:i.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=n.NOOP,this.cstFinallyStateUpdate=n.NOOP,this.cstPostTerminal=n.NOOP,this.cstPostNonTerminal=n.NOOP,this.cstPostRule=n.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=t.setNodeLocationFull,this.setNodeLocationFromNode=t.setNodeLocationFull,this.cstPostRule=n.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=n.NOOP,this.setNodeLocationFromNode=n.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=t.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=t.setNodeLocationOnlyOffset,this.cstPostRule=n.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=n.NOOP,this.setNodeLocationFromNode=n.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=n.NOOP,this.setNodeLocationFromNode=n.NOOP,this.cstPostRule=n.NOOP,this.setInitialNodeLocation=n.NOOP;else throw Error(`Invalid config option: "`+e.nodeLocationTracking+`"`)},e.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},e.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},e.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.cstInvocationStateUpdate=function(e,t){var n={name:e,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},e.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},e.prototype.cstPostRuleFull=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN},e.prototype.cstPostTerminal=function(e,n){var r=this.CST_STACK[this.CST_STACK.length-1];t.addTerminalToCst(r,n,e),this.setNodeLocationFromToken(r.location,n)},e.prototype.cstPostNonTerminal=function(e,n){var r=this.CST_STACK[this.CST_STACK.length-1];t.addNoneTerminalToCst(r,n,e),this.setNodeLocationFromNode(r.location,e.location)},e.prototype.getBaseCstVisitorConstructor=function(){if(n.isUndefined(this.baseCstVisitorConstructor)){var e=r.createBaseSemanticVisitorConstructor(this.className,n.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(n.isUndefined(this.baseCstVisitorWithDefaultsConstructor)){var e=r.createBaseVisitorConstructorWithDefaults(this.className,n.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},e.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},e.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},e}()}),ve=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LexerAdapter=void 0;var t=Z();e.LexerAdapter=function(){function e(){}return e.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(e.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error(`Missing invocation at the end of the Parser's constructor.`);this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),e.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):t.END_OF_FILE},e.prototype.LA=function(e){var n=this.currIdx+e;return n<0||this.tokVectorLength<=n?t.END_OF_FILE:this.tokVector[n]},e.prototype.consumeToken=function(){this.currIdx++},e.prototype.exportLexerState=function(){return this.currIdx},e.prototype.importLexerState=function(e){this.currIdx=e},e.prototype.resetLexerState=function(){this.currIdx=-1},e.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},e.prototype.getLexerPosition=function(){return this.exportLexerState()},e}()}),ye=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RecognizerApi=void 0;var t=I(),n=ue(),r=Z(),i=K(),a=ce(),o=V();e.RecognizerApi=function(){function e(){}return e.prototype.ACTION=function(e){return e.call(this)},e.prototype.consume=function(e,t,n){return this.consumeInternal(t,e,n)},e.prototype.subrule=function(e,t,n){return this.subruleInternal(t,e,n)},e.prototype.option=function(e,t){return this.optionInternal(t,e)},e.prototype.or=function(e,t){return this.orInternal(t,e)},e.prototype.many=function(e,t){return this.manyInternal(e,t)},e.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},e.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},e.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},e.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},e.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},e.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},e.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},e.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},e.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},e.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},e.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},e.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},e.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},e.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},e.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},e.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},e.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},e.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},e.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},e.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},e.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},e.prototype.OPTION=function(e){return this.optionInternal(e,0)},e.prototype.OPTION1=function(e){return this.optionInternal(e,1)},e.prototype.OPTION2=function(e){return this.optionInternal(e,2)},e.prototype.OPTION3=function(e){return this.optionInternal(e,3)},e.prototype.OPTION4=function(e){return this.optionInternal(e,4)},e.prototype.OPTION5=function(e){return this.optionInternal(e,5)},e.prototype.OPTION6=function(e){return this.optionInternal(e,6)},e.prototype.OPTION7=function(e){return this.optionInternal(e,7)},e.prototype.OPTION8=function(e){return this.optionInternal(e,8)},e.prototype.OPTION9=function(e){return this.optionInternal(e,9)},e.prototype.OR=function(e){return this.orInternal(e,0)},e.prototype.OR1=function(e){return this.orInternal(e,1)},e.prototype.OR2=function(e){return this.orInternal(e,2)},e.prototype.OR3=function(e){return this.orInternal(e,3)},e.prototype.OR4=function(e){return this.orInternal(e,4)},e.prototype.OR5=function(e){return this.orInternal(e,5)},e.prototype.OR6=function(e){return this.orInternal(e,6)},e.prototype.OR7=function(e){return this.orInternal(e,7)},e.prototype.OR8=function(e){return this.orInternal(e,8)},e.prototype.OR9=function(e){return this.orInternal(e,9)},e.prototype.MANY=function(e){this.manyInternal(0,e)},e.prototype.MANY1=function(e){this.manyInternal(1,e)},e.prototype.MANY2=function(e){this.manyInternal(2,e)},e.prototype.MANY3=function(e){this.manyInternal(3,e)},e.prototype.MANY4=function(e){this.manyInternal(4,e)},e.prototype.MANY5=function(e){this.manyInternal(5,e)},e.prototype.MANY6=function(e){this.manyInternal(6,e)},e.prototype.MANY7=function(e){this.manyInternal(7,e)},e.prototype.MANY8=function(e){this.manyInternal(8,e)},e.prototype.MANY9=function(e){this.manyInternal(9,e)},e.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},e.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},e.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},e.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},e.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},e.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},e.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},e.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},e.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},e.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},e.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},e.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},e.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},e.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},e.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},e.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},e.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},e.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},e.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},e.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},e.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},e.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},e.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},e.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},e.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},e.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},e.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},e.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},e.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},e.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},e.prototype.RULE=function(e,n,a){if(a===void 0&&(a=r.DEFAULT_RULE_CONFIG),t.contains(this.definedRulesNames,e)){var o={message:i.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:r.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(o)}this.definedRulesNames.push(e);var s=this.defineRule(e,n,a);return this[e]=s,s},e.prototype.OVERRIDE_RULE=function(e,t,n){n===void 0&&(n=r.DEFAULT_RULE_CONFIG);var i=[];i=i.concat(a.validateRuleIsOverridden(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(i);var o=this.defineRule(e,t,n);return this[e]=o,o},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var r=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(n.isRecognitionException(e))return!1;throw e}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return o.serializeGrammar(t.values(this.gastProductionsCache))},e}()}),be=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RecognizerEngine=void 0;var t=I(),n=fe(),r=ue(),i=q(),a=se(),o=Z(),s=de(),c=B(),l=R(),u=he();e.RecognizerEngine=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,n){if(this.className=u.classNameFromInstance(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=l.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},t.has(n,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 For Further details.`);if(t.isArray(e)){if(t.isEmpty(e))throw Error(`A Token Vocabulary cannot be empty. Note that the first argument for the parser constructor is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==`number`)throw Error(`The Parser constructor no longer accepts a token vector as the first argument. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 For Further details.`)}if(t.isArray(e))this.tokensMap=t.reduce(e,function(e,t){return e[t.name]=t,e},{});else if(t.has(e,`modes`)&&t.every(t.flatten(t.values(e.modes)),l.isTokenType)){var r=t.flatten(t.values(e.modes)),i=t.uniq(r);this.tokensMap=t.reduce(i,function(e,t){return e[t.name]=t,e},{})}else if(t.isObject(e))this.tokensMap=t.cloneObj(e);else throw Error(` argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition`);this.tokensMap.EOF=c.EOF;var a=t.every(t.values(e),function(e){return t.isEmpty(e.categoryMatches)});this.tokenMatcher=a?l.tokenStructuredMatcherNoCategories:l.tokenStructuredMatcher,l.augmentTokenTypes(t.values(this.tokensMap))},e.prototype.defineRule=function(e,r,i){if(this.selfAnalysisDone)throw Error(`Grammar rule <`+e+`> may not be defined after the 'performSelfAnalysis' method has been called' Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var a=t.has(i,`resyncEnabled`)?i.resyncEnabled:o.DEFAULT_RULE_CONFIG.resyncEnabled,s=t.has(i,`recoveryValueFunc`)?i.recoveryValueFunc:o.DEFAULT_RULE_CONFIG.recoveryValueFunc,c=this.ruleShortNameIdx<t},e.prototype.orInternal=function(e,r){var i=this.getKeyForAutomaticLookahead(n.OR_IDX,r),a=t.isArray(e)?e:e.DEF,o=this.getLaFuncFromCache(i).call(this,a);if(o!==void 0)return a[o].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)},e.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new r.NotAllInputParsedException(t,e))}},e.prototype.subruleInternal=function(e,t,n){var r;try{var i=n===void 0?void 0:n.ARGS;return r=e.call(this,t,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){this.subruleInternalError(t,n,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,n){throw r.isRecognitionException(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e},e.prototype.consumeInternal=function(e,t,n){var r;try{var i=this.LA(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),r=i):this.consumeInternalError(e,i,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r},e.prototype.consumeInternalError=function(e,t,n){var i,a=this.LA(0);throw i=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new r.MismatchedTokenException(i,t,a))},e.prototype.consumeInternalRecovery=function(e,t,n){if(this.recoveryEnabled&&n.name===`MismatchedTokenException`&&!this.isBackTracking()){var r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===s.IN_RULE_RECOVERY_EXCEPTION?n:e}}else throw n},e.prototype.saveRecogState=function(){var e=this.errors,n=t.cloneArr(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:n,CST_STACK:this.CST_STACK}},e.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},e.prototype.ruleInvocationStateUpdate=function(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},e.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},e.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},e.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},e.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),c.EOF)},e.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},e}()}),xe=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorHandler=void 0;var t=ue(),n=I(),r=q(),i=Z();e.ErrorHandler=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=n.has(e,`errorMessageProvider`)?e.errorMessageProvider:i.DEFAULT_PARSER_CONFIG.errorMessageProvider},e.prototype.SAVE_ERROR=function(e){if(t.isRecognitionException(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:n.cloneArr(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)},Object.defineProperty(e.prototype,"errors",{get:function(){return n.cloneArr(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,n,i){for(var a=this.getCurrRuleFullName(),o=this.getGAstProductions()[a],s=r.getLookaheadPathsForOptionalProd(e,o,n,this.maxLookahead)[0],c=[],l=1;l<=this.maxLookahead;l++)c.push(this.LA(l));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:c,previous:this.LA(0),customUserDescription:i,ruleName:a});throw this.SAVE_ERROR(new t.EarlyExitException(u,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,n){for(var i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],o=r.getLookaheadPathsForOr(e,a,this.maxLookahead),s=[],c=1;c<=this.maxLookahead;c++)s.push(this.LA(c));var l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:o,actual:s,previous:l,customUserDescription:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new t.NoViableAltException(u,this.LA(1),l))},e}()}),Se=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ContentAssist=void 0;var t=se(),n=I();e.ContentAssist=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,r){var i=this.gastProductionsCache[e];if(n.isUndefined(i))throw Error(`Rule ->`+e+`<- does not exist in this grammar.`);return t.nextPossibleTokensAfter([i],r,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var r=n.first(e.ruleStack),i=this.getGAstProductions()[r];return new t.NextAfterTokenWalker(i,e).startWalking()},e}()}),J=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GastRecorder=void 0;var t=I(),n=V(),r=re(),i=R(),a=B(),o=Z(),s=fe(),c={description:`This Object indicates the Parser is during Recording Phase`};Object.freeze(c);var l=!0,u=2**s.BITS_FOR_OCCURRENCE_IDX-1,d=a.createToken({name:`RECORDING_PHASE_TOKEN`,pattern:r.Lexer.NA});i.augmentTokenTypes([d]);var f=a.createTokenInstance(d,`This IToken indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(f);var p={name:`This CSTNode indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};e.GastRecorder=function(){function e(){}return e.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},e.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT(`Enable Recording`,function(){for(var t=function(t){var n=t>0?t:``;e[`CONSUME`+n]=function(e,n){return this.consumeInternalRecord(e,t,n)},e[`SUBRULE`+n]=function(e,n){return this.subruleInternalRecord(e,t,n)},e[`OPTION`+n]=function(e){return this.optionInternalRecord(e,t)},e[`OR`+n]=function(e){return this.orInternalRecord(e,t)},e[`MANY`+n]=function(e){this.manyInternalRecord(t,e)},e[`MANY_SEP`+n]=function(e){this.manySepFirstInternalRecord(t,e)},e[`AT_LEAST_ONE`+n]=function(e){this.atLeastOneInternalRecord(t,e)},e[`AT_LEAST_ONE_SEP`+n]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}},n=0;n<10;n++)t(n);e.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},e.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},e.option=function(e,t){return this.optionInternalRecord(t,e)},e.or=function(e,t){return this.orInternalRecord(t,e)},e.many=function(e,t){this.manyInternalRecord(e,t)},e.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},e.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT(`Deleting Recording methods`,function(){for(var t=0;t<10;t++){var n=t>0?t:``;delete e[`CONSUME`+n],delete e[`SUBRULE`+n],delete e[`OPTION`+n],delete e[`OR`+n],delete e[`MANY`+n],delete e[`MANY_SEP`+n],delete e[`AT_LEAST_ONE`+n],delete e[`AT_LEAST_ONE_SEP`+n]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},e.prototype.ACTION_RECORD=function(e){},e.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},e.prototype.LA_RECORD=function(e){return o.END_OF_FILE},e.prototype.topLevelRuleRecord=function(e,t){try{var r=new n.Rule({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(e){if(e.KNOWN_RECORDER_ERROR!==!0)try{e.message+=` This error was thrown during the "grammar recording phase" For more info see: https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw e}throw e}},e.prototype.optionInternalRecord=function(e,t){return m.call(this,n.Option,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){m.call(this,n.RepetitionMandatory,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){m.call(this,n.RepetitionMandatoryWithSeparator,t,e,l)},e.prototype.manyInternalRecord=function(e,t){m.call(this,n.Repetition,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){m.call(this,n.RepetitionWithSeparator,t,e,l)},e.prototype.orInternalRecord=function(e,t){return h.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,r,i){if(_(r),!e||t.has(e,`ruleName`)===!1){var a=Error(` argument is invalid`+(` expecting a Parser method reference but got: <`+JSON.stringify(e)+`>`)+(` inside top level rule: <`+this.recordingProdStack[0].name+`>`));throw a.KNOWN_RECORDER_ERROR=!0,a}var o=t.peek(this.recordingProdStack),s=e.ruleName,l=new n.NonTerminal({idx:r,nonTerminalName:s,referencedRule:void 0});return o.definition.push(l),this.outputCst?p:c},e.prototype.consumeInternalRecord=function(e,r,a){if(_(r),!i.hasShortKeyProperty(e)){var o=Error(` argument is invalid`+(` expecting a TokenType reference but got: <`+JSON.stringify(e)+`>`)+(` inside top level rule: <`+this.recordingProdStack[0].name+`>`));throw o.KNOWN_RECORDER_ERROR=!0,o}var s=t.peek(this.recordingProdStack),c=new n.Terminal({idx:r,terminalType:e});return s.definition.push(c),f},e}();function m(e,n,r,i){i===void 0&&(i=!1),_(r);var a=t.peek(this.recordingProdStack),o=t.isFunction(n)?n:n.DEF,s=new e({definition:[],idx:r});return i&&(s.separator=n.SEP),t.has(n,`MAX_LOOKAHEAD`)&&(s.maxLookahead=n.MAX_LOOKAHEAD),this.recordingProdStack.push(s),o.call(this),a.definition.push(s),this.recordingProdStack.pop(),c}function h(e,r){var i=this;_(r);var a=t.peek(this.recordingProdStack),o=t.isArray(e)===!1,s=o===!1?e:e.DEF,l=new n.Alternation({definition:[],idx:r,ignoreAmbiguities:o&&e.IGNORE_AMBIGUITIES===!0});return t.has(e,`MAX_LOOKAHEAD`)&&(l.maxLookahead=e.MAX_LOOKAHEAD),l.hasPredicates=t.some(s,function(e){return t.isFunction(e.GATE)}),a.definition.push(l),t.forEach(s,function(e){var r=new n.Alternative({definition:[]});l.definition.push(r),t.has(e,`IGNORE_AMBIGUITIES`)?r.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:t.has(e,`GATE`)&&(r.ignoreAmbiguities=!0),i.recordingProdStack.push(r),e.ALT.call(i),i.recordingProdStack.pop()}),c}function g(e){return e===0?``:``+e}function _(e){if(e<0||e>u){var t=Error(`Invalid DSL Method idx value: <`+e+`> `+(`Idx value must be a none negative value smaller than `+(u+1)));throw t.KNOWN_RECORDER_ERROR=!0,t}}}),Y=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PerformanceTracer=void 0;var t=I(),n=Z();e.PerformanceTracer=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if(t.has(e,`traceInitPerf`)){var r=e.traceInitPerf,i=typeof r==`number`;this.traceInitMaxIdent=i?r:1/0,this.traceInitPerf=i?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=n.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,n){if(this.traceInitPerf===!0){this.traceInitIndent++;var r=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent <`+e+`>`);var i=t.timer(n),a=i.time,o=i.value,s=a>10?console.warn:console.log;return this.traceInitIndent time: `+a+`ms`),this.traceInitIndent--,o}else return n()},e}()}),X=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.applyMixins=void 0;function t(e,t){t.forEach(function(t){var n=t.prototype;Object.getOwnPropertyNames(n).forEach(function(r){if(r!==`constructor`){var i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]}})})}e.applyMixins=t}),Z=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedActionsParser=e.CstParser=e.Parser=e.EMPTY_ALT=e.ParserDefinitionErrorType=e.DEFAULT_RULE_CONFIG=e.DEFAULT_PARSER_CONFIG=e.END_OF_FILE=void 0;var n=I(),r=ae(),i=B(),a=K(),o=le(),s=de(),c=pe(),l=_e(),u=ve(),d=ye(),f=be(),p=xe(),m=Se(),h=J(),g=Y(),_=X();e.END_OF_FILE=i.createTokenInstance(i.EOF,``,NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(e.END_OF_FILE),e.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:a.defaultParserErrorProvider,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),e.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0}),(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`})(e.ParserDefinitionErrorType||={});function v(e){return e===void 0&&(e=void 0),function(){return e}}e.EMPTY_ALT=v;var y=function(){function t(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(r),i.initLexerAdapter(),i.initLooksAhead(r),i.initRecognizerEngine(t,r),i.initRecoverable(r),i.initTreeBuilder(r),i.initContentAssist(),i.initGastRecorder(r),i.initPerformanceTracer(r),n.has(r,`ignoredIssues`))throw Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES For further details.`);this.skipValidations=n.has(r,`skipValidations`)?r.skipValidations:e.DEFAULT_PARSER_CONFIG.skipValidations}return t.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},t.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT(`performSelfAnalysis`,function(){var i;e.selfAnalysisDone=!0;var s=e.className;e.TRACE_INIT(`toFastProps`,function(){n.toFastProperties(e)}),e.TRACE_INIT(`Grammar Recording`,function(){try{e.enableRecording(),n.forEach(e.definedRulesNames,function(t){var n=e[t].originalGrammarAction,r=void 0;e.TRACE_INIT(t+` Rule`,function(){r=e.topLevelRuleRecord(t,n)}),e.gastProductionsCache[t]=r})}finally{e.disableRecording()}});var c=[];if(e.TRACE_INIT(`Grammar Resolving`,function(){c=o.resolveGrammar({rules:n.values(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(c)}),e.TRACE_INIT(`Grammar Validations`,function(){if(n.isEmpty(c)&&e.skipValidations===!1){var t=o.validateGrammar({rules:n.values(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:n.values(e.tokensMap),errMsgProvider:a.defaultGrammarValidatorErrorProvider,grammarName:s});e.definitionErrors=e.definitionErrors.concat(t)}}),n.isEmpty(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT(`computeAllProdsFollows`,function(){e.resyncFollows=r.computeAllProdsFollows(n.values(e.gastProductionsCache))}),e.TRACE_INIT(`ComputeLookaheadFunctions`,function(){e.preComputeLookaheadFunctions(n.values(e.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!n.isEmpty(e.definitionErrors))throw i=n.map(e.definitionErrors,function(e){return e.message}),Error(`Parser Definition Errors detected: `+i.join(` ------------------------------- `))})},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();e.Parser=y,_.applyMixins(y,[s.Recoverable,c.LooksAhead,l.TreeBuilder,u.LexerAdapter,f.RecognizerEngine,d.RecognizerApi,p.ErrorHandler,m.ContentAssist,h.GastRecorder,g.PerformanceTracer]),e.CstParser=function(r){t(i,r);function i(t,i){i===void 0&&(i=e.DEFAULT_PARSER_CONFIG);var a=this,o=n.cloneObj(i);return o.outputCst=!0,a=r.call(this,t,o)||this,a}return i}(y),e.EmbeddedActionsParser=function(r){t(i,r);function i(t,i){i===void 0&&(i=e.DEFAULT_PARSER_CONFIG);var a=this,o=n.cloneObj(i);return o.outputCst=!1,a=r.call(this,t,o)||this,a}return i}(y)}),Ce=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSyntaxDiagramsCode=void 0;var t=F();function n(e,n){var r=n===void 0?{}:n,i=r.resourceBase,a=i===void 0?`https://unpkg.com/chevrotain@`+t.VERSION+`/diagrams/`:i,o=r.css,s=o===void 0?`https://unpkg.com/chevrotain@`+t.VERSION+`/diagrams/diagrams.css`:o,c=` `,l=` `,u=`