atsds-bnf 0.0.7 → 0.0.9-alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t={763:()=>{}},e={};function s(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,s),r.exports}s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n={};s.d(n,{MG:()=>j,fr:()=>kt,sR:()=>Ae,Zo:()=>ye,iH:()=>we,rt:()=>Pt,jB:()=>be,M8:()=>le,$t:()=>Ce,aq:()=>me,pG:()=>vt,eP:()=>_e,KU:()=>xe,zW:()=>Le,IX:()=>E,mY:()=>S,a7:()=>$,JG:()=>Ut,ay:()=>Xt,X2:()=>ee,WU:()=>de,Uw:()=>pe,gw:()=>ge,iX:()=>De,re:()=>ne,Pg:()=>He,tD:()=>ie,R$:()=>te,Dj:()=>Dt,m7:()=>U,NZ:()=>P,xo:()=>b,ou:()=>i,qC:()=>Be,mD:()=>d,Ay:()=>Ke});class i{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(t){this._text=t}}function r(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!(t[s]===e[s]||t[s].equals&&t[s].equals(e[s])))return!1;return!0}i.INVALID_TYPE=0,i.EPSILON=-2,i.MIN_USER_TOKEN_TYPE=1,i.EOF=-1,i.DEFAULT_CHANNEL=0,i.HIDDEN_CHANNEL=1;const o=Math.round(Math.random()*Math.pow(2,32));function a(t){if(!t)return 0;const e=typeof t,s="string"===e?t:!("object"!==e||!t.toString)&&t.toString();if(!s)return 0;let n,i;const r=3&s.length,a=s.length-r;let l=o;const h=3432918353,c=461845907;let u=0;for(;u<a;)i=255&s.charCodeAt(u)|(255&s.charCodeAt(++u))<<8|(255&s.charCodeAt(++u))<<16|(255&s.charCodeAt(++u))<<24,++u,i=(65535&i)*h+(((i>>>16)*h&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,l^=i,l=l<<13|l>>>19,n=5*(65535&l)+((5*(l>>>16)&65535)<<16)&4294967295,l=27492+(65535&n)+((58964+(n>>>16)&65535)<<16);switch(i=0,r){case 3:i^=(255&s.charCodeAt(u+2))<<16;case 2:i^=(255&s.charCodeAt(u+1))<<8;case 1:i^=255&s.charCodeAt(u),i=(65535&i)*h+(((i>>>16)*h&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,l^=i}return l^=s.length,l^=l>>>16,l=2246822507*(65535&l)+((2246822507*(l>>>16)&65535)<<16)&4294967295,l^=l>>>13,l=3266489909*(65535&l)+((3266489909*(l>>>16)&65535)<<16)&4294967295,l^=l>>>16,l>>>0}class l{constructor(){this.count=0,this.hash=0}update(){for(let t=0;t<arguments.length;t++){const e=arguments[t];if(null!=e)if(Array.isArray(e))this.update.apply(this,e);else{let t=0;switch(typeof e){case"undefined":case"function":continue;case"number":case"boolean":t=e;break;case"string":t=a(e);break;default:e.updateHashCode?e.updateHashCode(this):console.log("No updateHashCode for "+e.toString());continue}t*=3432918353,t=t<<15|t>>>17,t*=461845907,this.count=this.count+1;let s=this.hash^t;s=s<<13|s>>>19,s=5*s+3864292196,this.hash=s}}}finish(){let t=this.hash^4*this.count;return t^=t>>>16,t*=2246822507,t^=t>>>13,t*=3266489909,t^=t>>>16,t}static hashStuff(){const t=new l;return t.update.apply(t,arguments),t.finish()}}function h(t){return t?"string"==typeof t?a(t):t.hashCode():-1}function c(t,e){return t&&t.equals?t.equals(e):t===e}function u(t){return null===t?"null":t}function d(t){return Array.isArray(t)?"["+t.map(u).join(", ")+"]":"null"}class p{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||h,this.equalsFunction=e||c}get(t){if(null==t)return t;const e=this._getBucket(t);if(!e)return null;for(const s of e)if(this.equalsFunction(s,t))return s;return null}add(t){return this.getOrAdd(t)===t}getOrAdd(t){this._expand();const e=this._getSlot(t);let s=this.buckets[e];if(!s)return s=[t],this.buckets[e]=s,this.itemCount++,t;for(const e of s)if(this.equalsFunction(e,t))return e;return s.push(t),this.itemCount++,t}has(t){return null!=this.get(t)}values(){return this.buckets.filter(t=>null!=t).flat(1)}toString(){return d(this.values())}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t);let s=this.buckets[e];s||(s=[],this.buckets[e]=s),s.push(t)}}}class g{hashCode(){const t=new l;return this.updateHashCode(t),t.finish()}evaluate(t,e){}evalPrecedence(t,e){return this}static andContext(t,e){if(null===t||t===g.NONE)return e;if(null===e||e===g.NONE)return t;const s=new f(t,e);return 1===s.opnds.length?s.opnds[0]:s}static orContext(t,e){if(null===t)return e;if(null===e)return t;if(t===g.NONE||e===g.NONE)return g.NONE;const s=new x(t,e);return 1===s.opnds.length?s.opnds[0]:s}}class f extends g{constructor(t,e){super();const s=new p;t instanceof f?t.opnds.map(function(t){s.add(t)}):s.add(t),e instanceof f?e.opnds.map(function(t){s.add(t)}):s.add(e);const n=_(s);if(n.length>0){let t=null;n.map(function(e){(null===t||e.precedence<t.precedence)&&(t=e)}),s.add(t)}this.opnds=Array.from(s.values())}equals(t){return this===t||t instanceof f&&r(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"AND")}evaluate(t,e){for(let s=0;s<this.opnds.length;s++)if(!this.opnds[s].evaluate(t,e))return!1;return!0}evalPrecedence(t,e){let s=!1;const n=[];for(let i=0;i<this.opnds.length;i++){const r=this.opnds[i],o=r.evalPrecedence(t,e);if(s|=o!==r,null===o)return null;o!==g.NONE&&n.push(o)}if(!s)return this;if(0===n.length)return g.NONE;let i=null;return n.map(function(t){i=null===i?t:g.andContext(i,t)}),i}toString(){const t=this.opnds.map(t=>t.toString());return(t.length>3?t.slice(3):t).join("&&")}}class x extends g{constructor(t,e){super();const s=new p;t instanceof x?t.opnds.map(function(t){s.add(t)}):s.add(t),e instanceof x?e.opnds.map(function(t){s.add(t)}):s.add(e);const n=_(s);if(n.length>0){const t=n.sort(function(t,e){return t.compareTo(e)}),e=t[t.length-1];s.add(e)}this.opnds=Array.from(s.values())}equals(t){return this===t||t instanceof x&&r(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"OR")}evaluate(t,e){for(let s=0;s<this.opnds.length;s++)if(this.opnds[s].evaluate(t,e))return!0;return!1}evalPrecedence(t,e){let s=!1;const n=[];for(let i=0;i<this.opnds.length;i++){const r=this.opnds[i],o=r.evalPrecedence(t,e);if(s|=o!==r,o===g.NONE)return g.NONE;null!==o&&n.push(o)}return s?(n.length,null):this}toString(){const t=this.opnds.map(t=>t.toString());return(t.length>3?t.slice(3):t).join("||")}}function _(t){const e=[];return t.values().map(function(t){t instanceof g.PrecedencePredicate&&e.push(t)}),e}function T(t,e){if(null===t){const t={state:null,alt:null,context:null,semanticContext:null};return e&&(t.reachesIntoOuterContext=0),t}{const s={};return s.state=t.state||null,s.alt=void 0===t.alt?null:t.alt,s.context=t.context||null,s.semanticContext=t.semanticContext||null,e&&(s.reachesIntoOuterContext=t.reachesIntoOuterContext||0,s.precedenceFilterSuppressed=t.precedenceFilterSuppressed||!1),s}}class m{constructor(t,e){this.checkContext(t,e),t=T(t),e=T(e,!0),this.state=null!==t.state?t.state:e.state,this.alt=null!==t.alt?t.alt:e.alt,this.context=null!==t.context?t.context:e.context,this.semanticContext=null!==t.semanticContext?t.semanticContext:null!==e.semanticContext?e.semanticContext:g.NONE,this.reachesIntoOuterContext=e.reachesIntoOuterContext,this.precedenceFilterSuppressed=e.precedenceFilterSuppressed}checkContext(t,e){null!==t.context&&void 0!==t.context||null!==e&&null!==e.context&&void 0!==e.context||(this.context=null)}hashCode(){const t=new l;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)}equals(t){return this===t||t instanceof m&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&(null===this.context?null===t.context:this.context.equals(t.context))&&this.semanticContext.equals(t.semanticContext)&&this.precedenceFilterSuppressed===t.precedenceFilterSuppressed}hashCodeForConfigSet(){const t=new l;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}equalsForConfigSet(t){return this===t||t instanceof m&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&this.semanticContext.equals(t.semanticContext)}toString(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==g.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class E{constructor(t,e){this.start=t,this.stop=e}clone(){return new E(this.start,this.stop)}contains(t){return t>=this.start&&t<this.stop}toString(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()}get length(){return this.stop-this.start}}E.INVALID_INTERVAL=new E(-1,-2);class S{constructor(){this.intervals=null,this.readOnly=!1}first(t){return null===this.intervals||0===this.intervals.length?i.INVALID_TYPE:this.intervals[0].start}addOne(t){this.addInterval(new E(t,t+1))}addRange(t,e){this.addInterval(new E(t,e+1))}addInterval(t){if(null===this.intervals)this.intervals=[],this.intervals.push(t.clone());else{for(let e=0;e<this.intervals.length;e++){const s=this.intervals[e];if(t.stop<s.start)return void this.intervals.splice(e,0,t);if(t.stop===s.start)return void(this.intervals[e]=new E(t.start,s.stop));if(t.start<=s.stop)return this.intervals[e]=new E(Math.min(s.start,t.start),Math.max(s.stop,t.stop)),void this.reduce(e)}this.intervals.push(t.clone())}}addSet(t){return null!==t.intervals&&t.intervals.forEach(t=>this.addInterval(t),this),this}reduce(t){if(t<this.intervals.length-1){const e=this.intervals[t],s=this.intervals[t+1];e.stop>=s.stop?(this.intervals.splice(t+1,1),this.reduce(t)):e.stop>=s.start&&(this.intervals[t]=new E(e.start,s.stop),this.intervals.splice(t+1,1))}}complement(t,e){const s=new S;return s.addInterval(new E(t,e+1)),null!==this.intervals&&this.intervals.forEach(t=>s.removeRange(t)),s}contains(t){if(null===this.intervals)return!1;for(let e=0;e<this.intervals.length;e++)if(this.intervals[e].contains(t))return!0;return!1}removeRange(t){if(t.start===t.stop-1)this.removeOne(t.start);else if(null!==this.intervals){let e=0;for(let s=0;s<this.intervals.length;s++){const s=this.intervals[e];if(t.stop<=s.start)return;if(t.start>s.start&&t.stop<s.stop){this.intervals[e]=new E(s.start,t.start);const n=new E(t.stop,s.stop);return void this.intervals.splice(e,0,n)}t.start<=s.start&&t.stop>=s.stop?(this.intervals.splice(e,1),e-=1):t.start<s.stop?this.intervals[e]=new E(s.start,t.start):t.stop<s.stop&&(this.intervals[e]=new E(t.stop,s.stop)),e+=1}}}removeOne(t){if(null!==this.intervals)for(let e=0;e<this.intervals.length;e++){const s=this.intervals[e];if(t<s.start)return;if(t===s.start&&t===s.stop-1)return void this.intervals.splice(e,1);if(t===s.start)return void(this.intervals[e]=new E(s.start+1,s.stop));if(t===s.stop-1)return void(this.intervals[e]=new E(s.start,s.stop-1));if(t<s.stop-1){const n=new E(s.start,t);return s.start=t+1,void this.intervals.splice(e,0,n)}}}toString(t,e,s){return t=t||null,e=e||null,s=s||!1,null===this.intervals?"{}":null!==t||null!==e?this.toTokenString(t,e):s?this.toCharString():this.toIndexString()}toCharString(){const t=[];for(let e=0;e<this.intervals.length;e++){const s=this.intervals[e];s.stop===s.start+1?s.start===i.EOF?t.push("<EOF>"):t.push("'"+String.fromCharCode(s.start)+"'"):t.push("'"+String.fromCharCode(s.start)+"'..'"+String.fromCharCode(s.stop-1)+"'")}return t.length>1?"{"+t.join(", ")+"}":t[0]}toIndexString(){const t=[];for(let e=0;e<this.intervals.length;e++){const s=this.intervals[e];s.stop===s.start+1?s.start===i.EOF?t.push("<EOF>"):t.push(s.start.toString()):t.push(s.start.toString()+".."+(s.stop-1).toString())}return t.length>1?"{"+t.join(", ")+"}":t[0]}toTokenString(t,e){const s=[];for(let n=0;n<this.intervals.length;n++){const i=this.intervals[n];for(let n=i.start;n<i.stop;n++)s.push(this.elementName(t,e,n))}return s.length>1?"{"+s.join(", ")+"}":s[0]}elementName(t,e,s){return s===i.EOF?"<EOF>":s===i.EPSILON?"<EPSILON>":t[s]||e[s]}get length(){return this.intervals.map(t=>t.length).reduce((t,e)=>t+e)}}class C{constructor(){this.atn=null,this.stateNumber=C.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null}toString(){return this.stateNumber}equals(t){return t instanceof C&&this.stateNumber===t.stateNumber}isNonGreedyExitState(){return!1}addTransition(t,e){void 0===e&&(e=-1),0===this.transitions.length?this.epsilonOnlyTransitions=t.isEpsilon:this.epsilonOnlyTransitions!==t.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===e?this.transitions.push(t):this.transitions.splice(e,1,t)}}C.INVALID_TYPE=0,C.BASIC=1,C.RULE_START=2,C.BLOCK_START=3,C.PLUS_BLOCK_START=4,C.STAR_BLOCK_START=5,C.TOKEN_START=6,C.RULE_STOP=7,C.BLOCK_END=8,C.STAR_LOOP_BACK=9,C.STAR_LOOP_ENTRY=10,C.PLUS_LOOP_BACK=11,C.LOOP_END=12,C.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],C.INVALID_STATE_NUMBER=-1;class A extends C{constructor(){return super(),this.stateType=C.RULE_STOP,this}}class N{constructor(t){if(null==t)throw"target cannot be null.";this.target=t,this.isEpsilon=!1,this.label=null}}N.EPSILON=1,N.RANGE=2,N.RULE=3,N.PREDICATE=4,N.ATOM=5,N.ACTION=6,N.SET=7,N.NOT_SET=8,N.WILDCARD=9,N.PRECEDENCE=10,N.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],N.serializationTypes={EpsilonTransition:N.EPSILON,RangeTransition:N.RANGE,RuleTransition:N.RULE,PredicateTransition:N.PREDICATE,AtomTransition:N.ATOM,ActionTransition:N.ACTION,SetTransition:N.SET,NotSetTransition:N.NOT_SET,WildcardTransition:N.WILDCARD,PrecedencePredicateTransition:N.PRECEDENCE};class y extends N{constructor(t,e,s,n){super(t),this.ruleIndex=e,this.precedence=s,this.followState=n,this.serializationType=N.RULE,this.isEpsilon=!0}matches(t,e,s){return!1}}class L extends N{constructor(t,e){super(t),this.serializationType=N.SET,null!=e?this.label=e:(this.label=new S,this.label.addOne(i.INVALID_TYPE))}matches(t,e,s){return this.label.contains(t)}toString(){return this.label.toString()}}class I extends L{constructor(t,e){super(t,e),this.serializationType=N.NOT_SET}matches(t,e,s){return t>=e&&t<=s&&!super.matches(t,e,s)}toString(){return"~"+super.toString()}}class k extends N{constructor(t){super(t),this.serializationType=N.WILDCARD}matches(t,e,s){return t>=e&&t<=s}toString(){return"."}}class v extends N{constructor(t){super(t)}}class w{}class R extends w{}class O extends R{}class P extends O{get ruleContext(){throw new Error("missing interface implementation")}}class b extends O{}class F extends b{}const D={toStringTree:function(t,e,s){e=e||null,null!==(s=s||null)&&(e=s.ruleNames);let n=D.getNodeText(t,e);n=function(t){return t.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}(n);const i=t.getChildCount();if(0===i)return n;let r="("+n+" ";i>0&&(n=D.toStringTree(t.getChild(0),e),r=r.concat(n));for(let s=1;s<i;s++)n=D.toStringTree(t.getChild(s),e),r=r.concat(" "+n);return r=r.concat(")"),r},getNodeText:function(t,e,s){if(e=e||null,null!==(s=s||null)&&(e=s.ruleNames),null!==e){if(t instanceof P){const s=t.ruleContext.getAltNumber();return 0!=s?e[t.ruleIndex]+":"+s:e[t.ruleIndex]}if(t instanceof F)return t.toString();if(t instanceof b&&null!==t.symbol)return t.symbol.text}const n=t.getPayload();return n instanceof i?n.text:t.getPayload().toString()},getChildren:function(t){const e=[];for(let s=0;s<t.getChildCount();s++)e.push(t.getChild(s));return e},getAncestors:function(t){let e=[];for(t=t.getParent();null!==t;)e=[t].concat(e),t=t.getParent();return e},findAllTokenNodes:function(t,e){return D.findAllNodes(t,e,!0)},findAllRuleNodes:function(t,e){return D.findAllNodes(t,e,!1)},findAllNodes:function(t,e,s){const n=[];return D._findAllNodes(t,e,s,n),n},_findAllNodes:function(t,e,s,n){s&&t instanceof b?t.symbol.type===e&&n.push(t):!s&&t instanceof P&&t.ruleIndex===e&&n.push(t);for(let i=0;i<t.getChildCount();i++)D._findAllNodes(t.getChild(i),e,s,n)},descendants:function(t){let e=[t];for(let s=0;s<t.getChildCount();s++)e=e.concat(D.descendants(t.getChild(s)));return e}},M=D;class U extends P{constructor(t,e){super(),this.parentCtx=t||null,this.invokingState=e||-1}depth(){let t=0,e=this;for(;null!==e;)e=e.parentCtx,t+=1;return t}isEmpty(){return-1===this.invokingState}getSourceInterval(){return E.INVALID_INTERVAL}get ruleContext(){return this}getPayload(){return this}getText(){return 0===this.getChildCount()?"":this.children.map(function(t){return t.getText()}).join("")}getAltNumber(){return 0}setAltNumber(t){}getChild(t){return null}getChildCount(){return 0}accept(t){return t.visitChildren(this)}toStringTree(t,e){return M.toStringTree(this,t,e)}toString(t,e){t=t||null,e=e||null;let s=this,n="[";for(;null!==s&&s!==e;){if(null===t)s.isEmpty()||(n+=s.invokingState);else{const e=s.ruleIndex;n+=e>=0&&e<t.length?t[e]:""+e}null===s.parentCtx||null===t&&s.parentCtx.isEmpty()||(n+=" "),s=s.parentCtx}return n+="]",n}}class H{constructor(t){this.cachedHashCode=t}isEmpty(){return this===H.EMPTY}hasEmptyPath(){return this.getReturnState(this.length-1)===H.EMPTY_RETURN_STATE}hashCode(){return this.cachedHashCode}updateHashCode(t){t.update(this.cachedHashCode)}}H.EMPTY=null,H.EMPTY_RETURN_STATE=2147483647,H.globalNodeCount=1,H.id=H.globalNodeCount,H.trace_atn_sim=!1;class B extends H{constructor(t,e){const s=new l;return s.update(t,e),super(s.finish()),this.parents=t,this.returnStates=e,this}isEmpty(){return this.returnStates[0]===H.EMPTY_RETURN_STATE}getParent(t){return this.parents[t]}getReturnState(t){return this.returnStates[t]}equals(t){return this===t||t instanceof B&&this.hashCode()===t.hashCode()&&r(this.returnStates,t.returnStates)&&r(this.parents,t.parents)}toString(){if(this.isEmpty())return"[]";{let t="[";for(let e=0;e<this.returnStates.length;e++)e>0&&(t+=", "),this.returnStates[e]!==H.EMPTY_RETURN_STATE?(t+=this.returnStates[e],null!==this.parents[e]?t=t+" "+this.parents[e]:t+="null"):t+="$";return t+"]"}}get length(){return this.returnStates.length}}class V extends H{constructor(t,e){let s=0;const n=new l;null!==t?n.update(t,e):n.update(1),s=n.finish(),super(s),this.parentCtx=t,this.returnState=e}getParent(t){return this.parentCtx}getReturnState(t){return this.returnState}equals(t){return this===t||t instanceof V&&this.hashCode()===t.hashCode()&&this.returnState===t.returnState&&(null==this.parentCtx?null==t.parentCtx:this.parentCtx.equals(t.parentCtx))}toString(){const t=null===this.parentCtx?"":this.parentCtx.toString();return 0===t.length?this.returnState===H.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}get length(){return 1}static create(t,e){return e===H.EMPTY_RETURN_STATE&&null===t?H.EMPTY:new V(t,e)}}class z extends V{constructor(){super(null,H.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(t){return null}getReturnState(t){return this.returnState}equals(t){return this===t}toString(){return"$"}}H.EMPTY=new z;class Y{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||h,this.equalsFunction=e||c}set(t,e){this._expand();const s=this._getSlot(t);let n=this.buckets[s];if(!n)return n=[[t,e]],this.buckets[s]=n,this.itemCount++,e;const i=n.find(e=>this.equalsFunction(e[0],t),this);if(i){const t=i[1];return i[1]=e,t}return n.push([t,e]),this.itemCount++,e}containsKey(t){const e=this._getBucket(t);return!!e&&!!e.find(e=>this.equalsFunction(e[0],t),this)}get(t){const e=this._getBucket(t);if(!e)return null;const s=e.find(e=>this.equalsFunction(e[0],t),this);return s?s[1]:null}entries(){return this.buckets.filter(t=>null!=t).flat(1)}getKeys(){return this.entries().map(t=>t[0])}getValues(){return this.entries().map(t=>t[1])}toString(){return"["+this.entries().map(t=>"{"+t[0]+":"+t[1]+"}").join(", ")+"]"}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t[0]);let s=this.buckets[e];s||(s=[],this.buckets[e]=s),s.push(t)}}}function q(t,e){if(null==e&&(e=U.EMPTY),null===e.parentCtx||e===U.EMPTY)return H.EMPTY;const s=q(t,e.parentCtx),n=t.states[e.invokingState].transitions[0];return V.create(s,n.followState.stateNumber)}function K(t,e,s){if(t.isEmpty())return t;let n=s.get(t)||null;if(null!==n)return n;if(n=e.get(t),null!==n)return s.set(t,n),n;let i=!1,r=[];for(let n=0;n<r.length;n++){const o=K(t.getParent(n),e,s);if(i||o!==t.getParent(n)){if(!i){r=[];for(let e=0;e<t.length;e++)r[e]=t.getParent(e);i=!0}r[n]=o}}if(!i)return e.add(t),s.set(t,t),t;let o=null;return o=0===r.length?H.EMPTY:1===r.length?V.create(r[0],t.getReturnState(0)):new B(r,t.returnStates),e.add(o),s.set(o,o),s.set(t,o),o}function W(t,e,s,n){if(t===e)return t;if(t instanceof V&&e instanceof V)return function(t,e,s,n){if(null!==n){let s=n.get(t,e);if(null!==s)return s;if(s=n.get(e,t),null!==s)return s}const i=function(t,e,s){if(s){if(t===H.EMPTY)return H.EMPTY;if(e===H.EMPTY)return H.EMPTY}else{if(t===H.EMPTY&&e===H.EMPTY)return H.EMPTY;if(t===H.EMPTY){const t=[e.returnState,H.EMPTY_RETURN_STATE],s=[e.parentCtx,null];return new B(s,t)}if(e===H.EMPTY){const e=[t.returnState,H.EMPTY_RETURN_STATE],s=[t.parentCtx,null];return new B(s,e)}}return null}(t,e,s);if(null!==i)return null!==n&&n.set(t,e,i),i;if(t.returnState===e.returnState){const i=W(t.parentCtx,e.parentCtx,s,n);if(i===t.parentCtx)return t;if(i===e.parentCtx)return e;const r=V.create(i,t.returnState);return null!==n&&n.set(t,e,r),r}{let s=null;if((t===e||null!==t.parentCtx&&t.parentCtx===e.parentCtx)&&(s=t.parentCtx),null!==s){const i=[t.returnState,e.returnState];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState);const r=new B([s,s],i);return null!==n&&n.set(t,e,r),r}const i=[t.returnState,e.returnState];let r=[t.parentCtx,e.parentCtx];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState,r=[e.parentCtx,t.parentCtx]);const o=new B(r,i);return null!==n&&n.set(t,e,o),o}}(t,e,s,n);if(s){if(t instanceof z)return t;if(e instanceof z)return e}return t instanceof V&&(t=new B([t.getParent()],[t.returnState])),e instanceof V&&(e=new B([e.getParent()],[e.returnState])),function(t,e,s,n){if(null!==n){let s=n.get(t,e);if(null!==s)return H.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),s;if(s=n.get(e,t),null!==s)return H.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),s}let i=0,r=0,o=0,a=new Array(t.returnStates.length+e.returnStates.length).fill(0),l=new Array(t.returnStates.length+e.returnStates.length).fill(null);for(;i<t.returnStates.length&&r<e.returnStates.length;){const h=t.parents[i],c=e.parents[r];if(t.returnStates[i]===e.returnStates[r]){const e=t.returnStates[i];e===H.EMPTY_RETURN_STATE&&null===h&&null===c||null!==h&&null!==c&&h===c?(l[o]=h,a[o]=e):(l[o]=W(h,c,s,n),a[o]=e),i+=1,r+=1}else t.returnStates[i]<e.returnStates[r]?(l[o]=h,a[o]=t.returnStates[i],i+=1):(l[o]=c,a[o]=e.returnStates[r],r+=1);o+=1}if(i<t.returnStates.length)for(let e=i;e<t.returnStates.length;e++)l[o]=t.parents[e],a[o]=t.returnStates[e],o+=1;else for(let t=r;t<e.returnStates.length;t++)l[o]=e.parents[t],a[o]=e.returnStates[t],o+=1;if(o<l.length){if(1===o){const s=V.create(l[0],a[0]);return null!==n&&n.set(t,e,s),s}l=l.slice(0,o),a=a.slice(0,o)}const h=new B(l,a);return h.equals(t)?(null!==n&&n.set(t,e,t),H.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> a"),t):h.equals(e)?(null!==n&&n.set(t,e,e),H.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){const e=new Y;for(let s=0;s<t.length;s++){const n=t[s];e.containsKey(n)||e.set(n,n)}for(let s=0;s<t.length;s++)t[s]=e.get(t[s])}(l),null!==n&&n.set(t,e,h),H.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> "+h),h)}(t,e,s,n)}class G{constructor(){this.data=new Uint32Array(1)}set(t){G._checkIndex(t),this._resize(t),this.data[t>>>5]|=1<<t%32}get(t){G._checkIndex(t);const e=t>>>5;return!(e>=this.data.length||!(this.data[e]&1<<t%32))}clear(t){G._checkIndex(t);const e=t>>>5;e<this.data.length&&(this.data[e]&=~(1<<t))}or(t){const e=Math.min(this.data.length,t.data.length);for(let s=0;s<e;++s)this.data[s]|=t.data[s];if(this.data.length<t.data.length){this._resize((t.data.length<<5)-1);const s=t.data.length;for(let n=e;n<s;++n)this.data[n]=t.data[n]}}values(){const t=new Array(this.length);let e=0;const s=this.data.length;for(let n=0;n<s;++n){let s=this.data[n];for(;0!==s;){const i=s&-s;t[e++]=(n<<5)+G._bitCount(i-1),s^=i}}return t}minValue(){for(let t=0;t<this.data.length;++t){let e=this.data[t];if(0!==e){let s=0;for(;!(1&e);)s++,e>>=1;return s+32*t}}return 0}hashCode(){return l.hashStuff(this.values())}equals(t){return t instanceof G&&r(this.data,t.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.data.map(t=>G._bitCount(t)).reduce((t,e)=>t+e,0)}_resize(t){const e=t+32>>>5;if(e<=this.data.length)return;const s=new Uint32Array(e);s.set(this.data),s.fill(0,this.data.length),this.data=s}static _checkIndex(t){if(t<0)throw new RangeError("index cannot be negative")}static _bitCount(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,0+(t+=t>>16)&63}}class ${constructor(t){this.atn=t}getDecisionLookahead(t){if(null===t)return null;const e=t.transitions.length,s=[];for(let n=0;n<e;n++){s[n]=new S;const e=new p,i=!1;this._LOOK(t.transition(n).target,null,H.EMPTY,s[n],e,new G,i,!1),(0===s[n].length||s[n].contains($.HIT_PRED))&&(s[n]=null)}return s}LOOK(t,e,s){const n=new S,i=null!==(s=s||null)?q(t.atn,s):null;return this._LOOK(t,e,i,n,new p,new G,!0,!0),n}_LOOK(t,e,s,n,r,o,a,l){const h=new m({state:t,alt:0,context:s},null);if(!r.has(h)){if(r.add(h),t===e){if(null===s)return void n.addOne(i.EPSILON);if(s.isEmpty()&&l)return void n.addOne(i.EOF)}if(t instanceof A){if(null===s)return void n.addOne(i.EPSILON);if(s.isEmpty()&&l)return void n.addOne(i.EOF);if(s!==H.EMPTY){const i=o.get(t.ruleIndex);try{o.clear(t.ruleIndex);for(let t=0;t<s.length;t++){const i=this.atn.states[s.getReturnState(t)];this._LOOK(i,e,s.getParent(t),n,r,o,a,l)}}finally{i&&o.set(t.ruleIndex)}return}}for(let h=0;h<t.transitions.length;h++){const c=t.transitions[h];if(c.constructor===y){if(o.get(c.target.ruleIndex))continue;const t=V.create(s,c.followState.stateNumber);try{o.set(c.target.ruleIndex),this._LOOK(c.target,e,t,n,r,o,a,l)}finally{o.clear(c.target.ruleIndex)}}else if(c instanceof v)a?this._LOOK(c.target,e,s,n,r,o,a,l):n.addOne($.HIT_PRED);else if(c.isEpsilon)this._LOOK(c.target,e,s,n,r,o,a,l);else if(c.constructor===k)n.addRange(i.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else{let t=c.label;null!==t&&(c instanceof I&&(t=t.complement(i.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),n.addSet(t))}}}}}$.HIT_PRED=i.INVALID_TYPE;class j{constructor(t,e){this.grammarType=t,this.maxTokenType=e,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[]}nextTokensInContext(t,e){return new $(this).LOOK(t,null,e)}nextTokensNoContext(t){return null!==t.nextTokenWithinRule||(t.nextTokenWithinRule=this.nextTokensInContext(t,null),t.nextTokenWithinRule.readOnly=!0),t.nextTokenWithinRule}nextTokens(t,e){return void 0===e?this.nextTokensNoContext(t):this.nextTokensInContext(t,e)}addState(t){null!==t&&(t.atn=this,t.stateNumber=this.states.length),this.states.push(t)}removeState(t){this.states[t.stateNumber]=null}defineDecisionState(t){return this.decisionToState.push(t),t.decision=this.decisionToState.length-1,t.decision}getDecisionState(t){return 0===this.decisionToState.length?null:this.decisionToState[t]}getExpectedTokens(t,e){if(t<0||t>=this.states.length)throw"Invalid state number.";const s=this.states[t];let n=this.nextTokens(s);if(!n.contains(i.EPSILON))return n;const r=new S;for(r.addSet(n),r.removeOne(i.EPSILON);null!==e&&e.invokingState>=0&&n.contains(i.EPSILON);){const t=this.states[e.invokingState].transitions[0];n=this.nextTokens(t.followState),r.addSet(n),r.removeOne(i.EPSILON),e=e.parentCtx}return n.contains(i.EPSILON)&&r.addOne(i.EOF),r}}j.INVALID_ALT_NUMBER=0;class X extends C{constructor(){super(),this.stateType=C.BASIC}}class J extends C{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class Q extends J{constructor(){return super(),this.endState=null,this}}class Z extends C{constructor(){return super(),this.stateType=C.BLOCK_END,this.startState=null,this}}class tt extends C{constructor(){return super(),this.stateType=C.LOOP_END,this.loopBackState=null,this}}class et extends C{constructor(){return super(),this.stateType=C.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class st extends J{constructor(){return super(),this.stateType=C.TOKEN_START,this}}class nt extends J{constructor(){return super(),this.stateType=C.PLUS_LOOP_BACK,this}}class it extends C{constructor(){return super(),this.stateType=C.STAR_LOOP_BACK,this}}class rt extends J{constructor(){return super(),this.stateType=C.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class ot extends Q{constructor(){return super(),this.stateType=C.PLUS_BLOCK_START,this.loopBackState=null,this}}class at extends Q{constructor(){return super(),this.stateType=C.STAR_BLOCK_START,this}}class lt extends Q{constructor(){return super(),this.stateType=C.BLOCK_START,this}}class ht extends N{constructor(t,e){super(t),this.label_=e,this.label=this.makeLabel(),this.serializationType=N.ATOM}makeLabel(){const t=new S;return t.addOne(this.label_),t}matches(t,e,s){return this.label_===t}toString(){return this.label_}}class ct extends N{constructor(t,e,s){super(t),this.serializationType=N.RANGE,this.start=e,this.stop=s,this.label=this.makeLabel()}makeLabel(){const t=new S;return t.addRange(this.start,this.stop),t}matches(t,e,s){return t>=this.start&&t<=this.stop}toString(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}}class ut extends N{constructor(t,e,s,n){super(t),this.serializationType=N.ACTION,this.ruleIndex=e,this.actionIndex=void 0===s?-1:s,this.isCtxDependent=void 0!==n&&n,this.isEpsilon=!0}matches(t,e,s){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}}class dt extends N{constructor(t,e){super(t),this.serializationType=N.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e}matches(t,e,s){return!1}toString(){return"epsilon"}}class pt extends g{constructor(t,e,s){super(),this.ruleIndex=void 0===t?-1:t,this.predIndex=void 0===e?-1:e,this.isCtxDependent=void 0!==s&&s}evaluate(t,e){const s=this.isCtxDependent?e:null;return t.sempred(s,this.ruleIndex,this.predIndex)}updateHashCode(t){t.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}equals(t){return this===t||t instanceof pt&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}g.NONE=new pt;class gt extends v{constructor(t,e,s,n){super(t),this.serializationType=N.PREDICATE,this.ruleIndex=e,this.predIndex=s,this.isCtxDependent=n,this.isEpsilon=!0}matches(t,e,s){return!1}getPredicate(){return new pt(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class ft extends g{constructor(t){super(),this.precedence=void 0===t?0:t}evaluate(t,e){return t.precpred(e,this.precedence)}evalPrecedence(t,e){return t.precpred(e,this.precedence)?g.NONE:null}compareTo(t){return this.precedence-t.precedence}updateHashCode(t){t.update(this.precedence)}equals(t){return this===t||t instanceof ft&&this.precedence===t.precedence}toString(){return"{"+this.precedence+">=prec}?"}}g.PrecedencePredicate=ft;class xt extends v{constructor(t,e){super(t),this.serializationType=N.PRECEDENCE,this.precedence=e,this.isEpsilon=!0}matches(t,e,s){return!1}getPredicate(){return new ft(this.precedence)}toString(){return this.precedence+" >= _p"}}class _t{constructor(t){void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions}}_t.defaultOptions=new _t,_t.defaultOptions.readOnly=!0;class Tt{constructor(t){this.actionType=t,this.isPositionDependent=!1}hashCode(){const t=new l;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.actionType)}equals(t){return this===t}}class mt extends Tt{constructor(){super(6)}execute(t){t.skip()}toString(){return"skip"}}mt.INSTANCE=new mt;class Et extends Tt{constructor(t){super(0),this.channel=t}execute(t){t._channel=this.channel}updateHashCode(t){t.update(this.actionType,this.channel)}equals(t){return this===t||t instanceof Et&&this.channel===t.channel}toString(){return"channel("+this.channel+")"}}class St extends Tt{constructor(t,e){super(1),this.ruleIndex=t,this.actionIndex=e,this.isPositionDependent=!0}execute(t){t.action(null,this.ruleIndex,this.actionIndex)}updateHashCode(t){t.update(this.actionType,this.ruleIndex,this.actionIndex)}equals(t){return this===t||t instanceof St&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}class Ct extends Tt{constructor(){super(3)}execute(t){t.more()}toString(){return"more"}}Ct.INSTANCE=new Ct;class At extends Tt{constructor(t){super(7),this.type=t}execute(t){t.type=this.type}updateHashCode(t){t.update(this.actionType,this.type)}equals(t){return this===t||t instanceof At&&this.type===t.type}toString(){return"type("+this.type+")"}}class Nt extends Tt{constructor(t){super(5),this.mode=t}execute(t){t.pushMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Nt&&this.mode===t.mode}toString(){return"pushMode("+this.mode+")"}}class yt extends Tt{constructor(){super(4)}execute(t){t.popMode()}toString(){return"popMode"}}yt.INSTANCE=new yt;class Lt extends Tt{constructor(t){super(2),this.mode=t}execute(t){t.setMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Lt&&this.mode===t.mode}toString(){return"mode("+this.mode+")"}}function It(t,e){const s=[];return s[t-1]=e,s.map(function(t){return e})}class kt{constructor(t){null==t&&(t=_t.defaultOptions),this.deserializationOptions=t,this.stateFactories=null,this.actionFactories=null}deserialize(t){const e=this.reset(t);this.checkVersion(e),e&&this.skipUUID();const s=this.readATN();this.readStates(s,e),this.readRules(s,e),this.readModes(s);const n=[];return this.readSets(s,n,this.readInt.bind(this)),e&&this.readSets(s,n,this.readInt32.bind(this)),this.readEdges(s,n),this.readDecisions(s),this.readLexerActions(s,e),this.markPrecedenceDecisions(s),this.verifyATN(s),this.deserializationOptions.generateRuleBypassTransitions&&1===s.grammarType&&(this.generateRuleBypassTransitions(s),this.verifyATN(s)),s}reset(t){if(3===(t.charCodeAt?t.charCodeAt(0):t[0])){const e=function(t){const e=t.charCodeAt(0);return e>1?e-2:e+65534},s=t.split("").map(e);return s[0]=t.charCodeAt(0),this.data=s,this.pos=0,!0}return this.data=t,this.pos=0,!1}skipUUID(){let t=0;for(;t++<8;)this.readInt()}checkVersion(t){const e=this.readInt();if(!t&&4!==e)throw"Could not deserialize ATN with version "+e+" (expected 4)."}readATN(){const t=this.readInt(),e=this.readInt();return new j(t,e)}readStates(t,e){let s,n,i;const r=[],o=[],a=this.readInt();for(let s=0;s<a;s++){const s=this.readInt();if(s===C.INVALID_TYPE){t.addState(null);continue}let n=this.readInt();e&&65535===n&&(n=-1);const i=this.stateFactory(s,n);if(s===C.LOOP_END){const t=this.readInt();r.push([i,t])}else if(i instanceof Q){const t=this.readInt();o.push([i,t])}t.addState(i)}for(s=0;s<r.length;s++)n=r[s],n[0].loopBackState=t.states[n[1]];for(s=0;s<o.length;s++)n=o[s],n[0].endState=t.states[n[1]];let l=this.readInt();for(s=0;s<l;s++)i=this.readInt(),t.states[i].nonGreedy=!0;let h=this.readInt();for(s=0;s<h;s++)i=this.readInt(),t.states[i].isPrecedenceRule=!0}readRules(t,e){let s;const n=this.readInt();for(0===t.grammarType&&(t.ruleToTokenType=It(n,0)),t.ruleToStartState=It(n,0),s=0;s<n;s++){const n=this.readInt();if(t.ruleToStartState[s]=t.states[n],0===t.grammarType){let n=this.readInt();e&&65535===n&&(n=i.EOF),t.ruleToTokenType[s]=n}}for(t.ruleToStopState=It(n,0),s=0;s<t.states.length;s++){const e=t.states[s];e instanceof A&&(t.ruleToStopState[e.ruleIndex]=e,t.ruleToStartState[e.ruleIndex].stopState=e)}}readModes(t){const e=this.readInt();for(let s=0;s<e;s++){let e=this.readInt();t.modeToStartState.push(t.states[e])}}readSets(t,e,s){const n=this.readInt();for(let t=0;t<n;t++){const t=new S;e.push(t);const n=this.readInt();0!==this.readInt()&&t.addOne(-1);for(let e=0;e<n;e++){const e=s(),n=s();t.addRange(e,n)}}}readEdges(t,e){let s,n,i,r,o;const a=this.readInt();for(s=0;s<a;s++){const s=this.readInt(),n=this.readInt(),i=this.readInt(),o=this.readInt(),a=this.readInt(),l=this.readInt();r=this.edgeFactory(t,i,s,n,o,a,l,e),t.states[s].addTransition(r)}for(s=0;s<t.states.length;s++)for(i=t.states[s],n=0;n<i.transitions.length;n++){const e=i.transitions[n];if(!(e instanceof y))continue;let s=-1;t.ruleToStartState[e.target.ruleIndex].isPrecedenceRule&&0===e.precedence&&(s=e.target.ruleIndex),r=new dt(e.followState,s),t.ruleToStopState[e.target.ruleIndex].addTransition(r)}for(s=0;s<t.states.length;s++){if(i=t.states[s],i instanceof Q){if(null===i.endState)throw"IllegalState";if(null!==i.endState.startState)throw"IllegalState";i.endState.startState=i}if(i instanceof nt)for(n=0;n<i.transitions.length;n++)o=i.transitions[n].target,o instanceof ot&&(o.loopBackState=i);else if(i instanceof it)for(n=0;n<i.transitions.length;n++)o=i.transitions[n].target,o instanceof rt&&(o.loopBackState=i)}}readDecisions(t){const e=this.readInt();for(let s=0;s<e;s++){const e=this.readInt(),n=t.states[e];t.decisionToState.push(n),n.decision=s}}readLexerActions(t,e){if(0===t.grammarType){const s=this.readInt();t.lexerActions=It(s,null);for(let n=0;n<s;n++){const s=this.readInt();let i=this.readInt();e&&65535===i&&(i=-1);let r=this.readInt();e&&65535===r&&(r=-1),t.lexerActions[n]=this.lexerActionFactory(s,i,r)}}}generateRuleBypassTransitions(t){let e;const s=t.ruleToStartState.length;for(e=0;e<s;e++)t.ruleToTokenType[e]=t.maxTokenType+e+1;for(e=0;e<s;e++)this.generateRuleBypassTransition(t,e)}generateRuleBypassTransition(t,e){let s,n;const i=new lt;i.ruleIndex=e,t.addState(i);const r=new Z;r.ruleIndex=e,t.addState(r),i.endState=r,t.defineDecisionState(i),r.startState=i;let o=null,a=null;if(t.ruleToStartState[e].isPrecedenceRule){for(a=null,s=0;s<t.states.length;s++)if(n=t.states[s],this.stateIsEndStateFor(n,e)){a=n,o=n.loopBackState.transitions[0];break}if(null===o)throw"Couldn't identify final state of the precedence rule prefix section."}else a=t.ruleToStopState[e];for(s=0;s<t.states.length;s++){n=t.states[s];for(let t=0;t<n.transitions.length;t++){const e=n.transitions[t];e!==o&&e.target===a&&(e.target=r)}}const l=t.ruleToStartState[e],h=l.transitions.length;for(;h>0;)i.addTransition(l.transitions[h-1]),l.transitions=l.transitions.slice(-1);t.ruleToStartState[e].addTransition(new dt(i)),r.addTransition(new dt(a));const c=new X;t.addState(c),c.addTransition(new ht(r,t.ruleToTokenType[e])),i.addTransition(new dt(c))}stateIsEndStateFor(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof rt))return null;const s=t.transitions[t.transitions.length-1].target;return s instanceof tt&&s.epsilonOnlyTransitions&&s.transitions[0].target instanceof A?t:null}markPrecedenceDecisions(t){for(let e=0;e<t.states.length;e++){const s=t.states[e];if(s instanceof rt&&t.ruleToStartState[s.ruleIndex].isPrecedenceRule){const t=s.transitions[s.transitions.length-1].target;t instanceof tt&&t.epsilonOnlyTransitions&&t.transitions[0].target instanceof A&&(s.isPrecedenceDecision=!0)}}}verifyATN(t){if(this.deserializationOptions.verifyATN)for(let e=0;e<t.states.length;e++){const s=t.states[e];if(null!==s)if(this.checkCondition(s.epsilonOnlyTransitions||s.transitions.length<=1),s instanceof ot)this.checkCondition(null!==s.loopBackState);else if(s instanceof rt)if(this.checkCondition(null!==s.loopBackState),this.checkCondition(2===s.transitions.length),s.transitions[0].target instanceof at)this.checkCondition(s.transitions[1].target instanceof tt),this.checkCondition(!s.nonGreedy);else{if(!(s.transitions[0].target instanceof tt))throw"IllegalState";this.checkCondition(s.transitions[1].target instanceof at),this.checkCondition(s.nonGreedy)}else s instanceof it?(this.checkCondition(1===s.transitions.length),this.checkCondition(s.transitions[0].target instanceof rt)):s instanceof tt?this.checkCondition(null!==s.loopBackState):s instanceof et?this.checkCondition(null!==s.stopState):s instanceof Q?this.checkCondition(null!==s.endState):s instanceof Z?this.checkCondition(null!==s.startState):s instanceof J?this.checkCondition(s.transitions.length<=1||s.decision>=0):this.checkCondition(s.transitions.length<=1||s instanceof A)}}checkCondition(t,e){if(!t)throw null==e&&(e="IllegalState"),e}readInt(){return this.data[this.pos++]}readInt32(){return this.readInt()|this.readInt()<<16}edgeFactory(t,e,s,n,r,o,a,l){const h=t.states[n];switch(e){case N.EPSILON:return new dt(h);case N.RANGE:return new ct(h,0!==a?i.EOF:r,o);case N.RULE:return new y(t.states[r],o,a,h);case N.PREDICATE:return new gt(h,r,o,0!==a);case N.PRECEDENCE:return new xt(h,r);case N.ATOM:return new ht(h,0!==a?i.EOF:r);case N.ACTION:return new ut(h,r,o,0!==a);case N.SET:return new L(h,l[r]);case N.NOT_SET:return new I(h,l[r]);case N.WILDCARD:return new k(h);default:throw"The specified transition type: "+e+" is not valid."}}stateFactory(t,e){if(null===this.stateFactories){const t=[];t[C.INVALID_TYPE]=null,t[C.BASIC]=()=>new X,t[C.RULE_START]=()=>new et,t[C.BLOCK_START]=()=>new lt,t[C.PLUS_BLOCK_START]=()=>new ot,t[C.STAR_BLOCK_START]=()=>new at,t[C.TOKEN_START]=()=>new st,t[C.RULE_STOP]=()=>new A,t[C.BLOCK_END]=()=>new Z,t[C.STAR_LOOP_BACK]=()=>new it,t[C.STAR_LOOP_ENTRY]=()=>new rt,t[C.PLUS_LOOP_BACK]=()=>new nt,t[C.LOOP_END]=()=>new tt,this.stateFactories=t}if(t>this.stateFactories.length||null===this.stateFactories[t])throw"The specified state type "+t+" is not valid.";{const s=this.stateFactories[t]();if(null!==s)return s.ruleIndex=e,s}}lexerActionFactory(t,e,s){if(null===this.actionFactories){const t=[];t[0]=(t,e)=>new Et(t),t[1]=(t,e)=>new St(t,e),t[2]=(t,e)=>new Lt(t),t[3]=(t,e)=>Ct.INSTANCE,t[4]=(t,e)=>yt.INSTANCE,t[5]=(t,e)=>new Nt(t),t[6]=(t,e)=>mt.INSTANCE,t[7]=(t,e)=>new At(t),this.actionFactories=t}if(t>this.actionFactories.length||null===this.actionFactories[t])throw"The specified lexer action type "+t+" is not valid.";return this.actionFactories[t](e,s)}}class vt{syntaxError(t,e,s,n,i,r){}reportAmbiguity(t,e,s,n,i,r,o){}reportAttemptingFullContext(t,e,s,n,i,r){}reportContextSensitivity(t,e,s,n,i,r){}}class wt extends vt{constructor(){super()}syntaxError(t,e,s,n,i,r){console.error("line "+s+":"+n+" "+i)}}wt.INSTANCE=new wt;class Rt extends vt{constructor(t){if(super(),null===t)throw"delegates";return this.delegates=t,this}syntaxError(t,e,s,n,i,r){this.delegates.map(o=>o.syntaxError(t,e,s,n,i,r))}reportAmbiguity(t,e,s,n,i,r,o){this.delegates.map(a=>a.reportAmbiguity(t,e,s,n,i,r,o))}reportAttemptingFullContext(t,e,s,n,i,r){this.delegates.map(o=>o.reportAttemptingFullContext(t,e,s,n,i,r))}reportContextSensitivity(t,e,s,n,i,r){this.delegates.map(o=>o.reportContextSensitivity(t,e,s,n,i,r))}}class Ot{constructor(){this._listeners=[wt.INSTANCE],this._interp=null,this._stateNumber=-1}checkVersion(t){const e="4.13.2";e!==t&&console.log("ANTLR runtime and generated code versions disagree: "+e+"!="+t)}addErrorListener(t){this._listeners.push(t)}removeErrorListeners(){this._listeners=[]}getLiteralNames(){return Object.getPrototypeOf(this).constructor.literalNames||[]}getSymbolicNames(){return Object.getPrototypeOf(this).constructor.symbolicNames||[]}getTokenNames(){if(!this.tokenNames){const t=this.getLiteralNames(),e=this.getSymbolicNames(),s=t.length>e.length?t.length:e.length;this.tokenNames=[];for(let n=0;n<s;n++)this.tokenNames[n]=t[n]||e[n]||"<INVALID"}return this.tokenNames}getTokenTypeMap(){const t=this.getTokenNames();if(null===t)throw"The current recognizer does not provide a list of token names.";let e=this.tokenTypeMapCache[t];return void 0===e&&(e=t.reduce(function(t,e,s){t[e]=s}),e.EOF=i.EOF,this.tokenTypeMapCache[t]=e),e}getRuleIndexMap(){const t=this.ruleNames;if(null===t)throw"The current recognizer does not provide a list of rule names.";let e=this.ruleIndexMapCache[t];return void 0===e&&(e=t.reduce(function(t,e,s){t[e]=s}),this.ruleIndexMapCache[t]=e),e}getTokenType(t){const e=this.getTokenTypeMap()[t];return void 0!==e?e:i.INVALID_TYPE}getErrorHeader(t){return"line "+t.getOffendingToken().line+":"+t.getOffendingToken().column}getTokenErrorDisplay(t){if(null===t)return"<no token>";let e=t.text;return null===e&&(e=t.type===i.EOF?"<EOF>":"<"+t.type+">"),e=e.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+e+"'"}getErrorListenerDispatch(){return console.warn("Calling deprecated method in Recognizer class: getErrorListenerDispatch()"),this.getErrorListener()}getErrorListener(){return new Rt(this._listeners)}sempred(t,e,s){return!0}precpred(t,e){return!0}get atn(){return this._interp.atn}get state(){return this._stateNumber}set state(t){this._stateNumber=t}}Ot.tokenTypeMapCache={},Ot.ruleIndexMapCache={};class Pt extends i{constructor(t,e,s,n,r){super(),this.source=void 0!==t?t:Pt.EMPTY_SOURCE,this.type=void 0!==e?e:null,this.channel=void 0!==s?s:i.DEFAULT_CHANNEL,this.start=void 0!==n?n:-1,this.stop=void 0!==r?r:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=t[0].line,this.column=t[0].column):this.column=-1}clone(){const t=new Pt(this.source,this.type,this.channel,this.start,this.stop);return t.tokenIndex=this.tokenIndex,t.line=this.line,t.column=this.column,t.text=this.text,t}cloneWithType(t){const e=new Pt(this.source,t,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,t===i.EOF&&(e.text=""),e}toString(){let t=this.text;return t=null!==t?t.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"<no text>","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+t+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(null!==this._text)return this._text;const t=this.getInputStream();if(null===t)return null;const e=t.size;return this.start<e&&this.stop<e?t.getText(this.start,this.stop):"<EOF>"}set text(t){this._text=t}}Pt.EMPTY_SOURCE=[null,null];class bt{}class Ft extends bt{constructor(t){super(),this.copyText=void 0!==t&&t}create(t,e,s,n,i,r,o,a){const l=new Pt(t,e,n,i,r);return l.line=o,l.column=a,null!==s?l.text=s:this.copyText&&null!==t[1]&&(l.text=t[1].getText(i,r)),l}createThin(t,e){const s=new Pt(null,t);return s.text=e,s}}Ft.DEFAULT=new Ft;class Dt extends Error{constructor(t){super(t.message),Error.captureStackTrace&&Error.captureStackTrace(this,Dt),this.message=t.message,this.recognizer=t.recognizer,this.input=t.input,this.ctx=t.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state)}getExpectedTokens(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}}class Mt extends Dt{constructor(t,e,s,n){super({message:"",recognizer:t,input:e,ctx:null}),this.startIndex=s,this.deadEndConfigs=n}toString(){let t="";return this.startIndex>=0&&this.startIndex<this.input.size&&(t=this.input.getText(new E(this.startIndex,this.startIndex))),"LexerNoViableAltException"+t}}class Ut extends Ot{constructor(t){super(),this._input=t,this._factory=Ft.DEFAULT,this._tokenFactorySourcePair=[this,t],this._interp=null,this._token=null,this._tokenStartCharIndex=-1,this._tokenStartLine=-1,this._tokenStartColumn=-1,this._hitEOF=!1,this._channel=i.DEFAULT_CHANNEL,this._type=i.INVALID_TYPE,this._modeStack=[],this._mode=Ut.DEFAULT_MODE,this._text=null}reset(){null!==this._input&&this._input.seek(0),this._token=null,this._type=i.INVALID_TYPE,this._channel=i.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=Ut.DEFAULT_MODE,this._modeStack=[],this._interp.reset()}nextToken(){if(null===this._input)throw"nextToken requires a non-null input stream.";const t=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=i.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;let e=!1;for(;;){this._type=i.INVALID_TYPE;let s=Ut.SKIP;try{s=this._interp.match(this._input,this._mode)}catch(t){if(!(t instanceof Dt))throw console.log(t.stack),t;this.notifyListeners(t),this.recover(t)}if(this._input.LA(1)===i.EOF&&(this._hitEOF=!0),this._type===i.INVALID_TYPE&&(this._type=s),this._type===Ut.SKIP){e=!0;break}if(this._type!==Ut.MORE)break}if(!e)return null===this._token&&this.emit(),this._token}}finally{this._input.release(t)}}skip(){this._type=Ut.SKIP}more(){this._type=Ut.MORE}mode(t){console.warn("Calling deprecated method in Lexer class: mode(...)"),this.setMode(t)}setMode(t){this._mode=t}getMode(){return this._mode}getModeStack(){return this._modeStack}pushMode(t){this._interp.debug&&console.log("pushMode "+t),this._modeStack.push(this._mode),this.setMode(t)}popMode(){if(0===this._modeStack.length)throw"Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.setMode(this._modeStack.pop()),this._mode}emitToken(t){this._token=t}emit(){const t=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(t),t}emitEOF(){const t=this.column,e=this.line,s=this._factory.create(this._tokenFactorySourcePair,i.EOF,null,i.DEFAULT_CHANNEL,this._input.index,this._input.index-1,e,t);return this.emitToken(s),s}getCharIndex(){return this._input.index}getAllTokens(){const t=[];let e=this.nextToken();for(;e.type!==i.EOF;)t.push(e),e=this.nextToken();return t}notifyListeners(t){const e=this._tokenStartCharIndex,s=this._input.index,n=this._input.getText(e,s),i="token recognition error at: '"+this.getErrorDisplay(n)+"'";this.getErrorListener().syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,i,t)}getErrorDisplay(t){const e=[];for(let s=0;s<t.length;s++)e.push(t[s]);return e.join("")}getErrorDisplayForChar(t){return t.charCodeAt(0)===i.EOF?"<EOF>":"\n"===t?"\\n":"\t"===t?"\\t":"\r"===t?"\\r":t}getCharErrorDisplay(t){return"'"+this.getErrorDisplayForChar(t)+"'"}recover(t){this._input.LA(1)!==i.EOF&&(t instanceof Mt?this._interp.consume(this._input):this._input.consume())}get inputStream(){return this._input}set inputStream(t){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=t,this._tokenFactorySourcePair=[this,this._input]}get sourceName(){return this._input.sourceName}get type(){return this._type}set type(t){this._type=t}get line(){return this._interp.line}set line(t){this._interp.line=t}get column(){return this._interp.column}set column(t){this._interp.column=t}get text(){return null!==this._text?this._text:this._interp.getText(this._input)}set text(t){this._text=t}}function Ht(t){return t.hashCodeForConfigSet()}function Bt(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}Ut.DEFAULT_MODE=0,Ut.MORE=-2,Ut.SKIP=-3,Ut.DEFAULT_TOKEN_CHANNEL=i.DEFAULT_CHANNEL,Ut.HIDDEN=i.HIDDEN_CHANNEL,Ut.MIN_CHAR_VALUE=0,Ut.MAX_CHAR_VALUE=1114111;class Vt{constructor(t){this.configLookup=new p(Ht,Bt),this.fullCtx=void 0===t||t,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1}add(t,e){if(void 0===e&&(e=null),this.readOnly)throw"This set is readonly";t.semanticContext!==g.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);const s=this.configLookup.getOrAdd(t);if(s===t)return this.cachedHashCode=-1,this.configs.push(t),!0;const n=!this.fullCtx,i=W(s.context,t.context,n,e);return s.reachesIntoOuterContext=Math.max(s.reachesIntoOuterContext,t.reachesIntoOuterContext),t.precedenceFilterSuppressed&&(s.precedenceFilterSuppressed=!0),s.context=i,!0}getStates(){const t=new p;for(let e=0;e<this.configs.length;e++)t.add(this.configs[e].state);return t}getPredicates(){const t=[];for(let e=0;e<this.configs.length;e++){const s=this.configs[e].semanticContext;s!==g.NONE&&t.push(s.semanticContext)}return t}optimizeConfigs(t){if(this.readOnly)throw"This set is readonly";if(0!==this.configLookup.length)for(let e=0;e<this.configs.length;e++){const s=this.configs[e];s.context=t.getCachedContext(s.context)}}addAll(t){for(let e=0;e<t.length;e++)this.add(t[e]);return!1}equals(t){return this===t||t instanceof Vt&&r(this.configs,t.configs)&&this.fullCtx===t.fullCtx&&this.uniqueAlt===t.uniqueAlt&&this.conflictingAlts===t.conflictingAlts&&this.hasSemanticContext===t.hasSemanticContext&&this.dipsIntoOuterContext===t.dipsIntoOuterContext}hashCode(){const t=new l;return t.update(this.configs),t.finish()}updateHashCode(t){this.readOnly?(-1===this.cachedHashCode&&(this.cachedHashCode=this.hashCode()),t.update(this.cachedHashCode)):t.update(this.hashCode())}isEmpty(){return 0===this.configs.length}contains(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.contains(t)}containsFast(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.containsFast(t)}clear(){if(this.readOnly)throw"This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new p}setReadonly(t){this.readOnly=t,t&&(this.configLookup=null)}toString(){return d(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==j.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(null!==this.conflictingAlts?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")}get items(){return this.configs}get length(){return this.configs.length}}class zt{constructor(t,e){return null===t&&(t=-1),null===e&&(e=new Vt),this.stateNumber=t,this.configs=e,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}getAltSet(){const t=new p;if(null!==this.configs)for(let e=0;e<this.configs.length;e++){const s=this.configs[e];t.add(s.alt)}return 0===t.length?null:t}equals(t){return this===t||t instanceof zt&&this.configs.equals(t.configs)}toString(){let t=this.stateNumber+":"+this.configs;return this.isAcceptState&&(t+="=>",null!==this.predicates?t+=this.predicates:t+=this.prediction),t}hashCode(){const t=new l;return t.update(this.configs),t.finish()}}class Yt{constructor(t,e){return this.atn=t,this.sharedContextCache=e,this}getCachedContext(t){if(null===this.sharedContextCache)return t;const e=new Y;return K(t,this.sharedContextCache,e)}}Yt.ERROR=new zt(2147483647,new Vt);class qt extends Vt{constructor(){super(),this.configLookup=new p}}class Kt extends m{constructor(t,e){super(t,e);const s=t.lexerActionExecutor||null;return this.lexerActionExecutor=s||(null!==e?e.lexerActionExecutor:null),this.passedThroughNonGreedyDecision=null!==e&&this.checkNonGreedyDecision(e,this.state),this.hashCodeForConfigSet=Kt.prototype.hashCode,this.equalsForConfigSet=Kt.prototype.equals,this}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor)}equals(t){return this===t||t instanceof Kt&&this.passedThroughNonGreedyDecision===t.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(t.lexerActionExecutor):!t.lexerActionExecutor)&&super.equals(t)}checkNonGreedyDecision(t,e){return t.passedThroughNonGreedyDecision||e instanceof J&&e.nonGreedy}}class Wt extends Tt{constructor(t,e){super(e.actionType),this.offset=t,this.action=e,this.isPositionDependent=!0}execute(t){this.action.execute(t)}updateHashCode(t){t.update(this.actionType,this.offset,this.action)}equals(t){return this===t||t instanceof Wt&&this.offset===t.offset&&this.action===t.action}}class Gt{constructor(t){return this.lexerActions=null===t?[]:t,this.cachedHashCode=l.hashStuff(t),this}fixOffsetBeforeMatch(t){let e=null;for(let s=0;s<this.lexerActions.length;s++)!this.lexerActions[s].isPositionDependent||this.lexerActions[s]instanceof Wt||(null===e&&(e=this.lexerActions.concat([])),e[s]=new Wt(t,this.lexerActions[s]));return null===e?this:new Gt(e)}execute(t,e,s){let n=!1;const i=e.index;try{for(let r=0;r<this.lexerActions.length;r++){let o=this.lexerActions[r];if(o instanceof Wt){const t=o.offset;e.seek(s+t),o=o.action,n=s+t!==i}else o.isPositionDependent&&(e.seek(i),n=!1);o.execute(t)}}finally{n&&e.seek(i)}}hashCode(){return this.cachedHashCode}updateHashCode(t){t.update(this.cachedHashCode)}equals(t){if(this===t)return!0;if(t instanceof Gt){if(this.cachedHashCode!=t.cachedHashCode)return!1;if(this.lexerActions.length!=t.lexerActions.length)return!1;{const e=this.lexerActions.length;for(let s=0;s<e;++s)if(!this.lexerActions[s].equals(t.lexerActions[s]))return!1;return!0}}return!1}static append(t,e){if(null===t)return new Gt([e]);const s=t.lexerActions.concat([e]);return new Gt(s)}}function $t(t){t.index=-1,t.line=0,t.column=-1,t.dfaState=null}class jt{constructor(){$t(this)}reset(){$t(this)}}class Xt extends Yt{constructor(t,e,s,n){super(e,n),this.decisionToDFA=s,this.recog=t,this.startIndex=-1,this.line=1,this.column=0,this.mode=Ut.DEFAULT_MODE,this.prevAccept=new jt}copyState(t){this.column=t.column,this.line=t.line,this.mode=t.mode,this.startIndex=t.startIndex}match(t,e){this.mode=e;const s=t.mark();try{this.startIndex=t.index,this.prevAccept.reset();const s=this.decisionToDFA[e];return null===s.s0?this.matchATN(t):this.execATN(t,s.s0)}finally{t.release(s)}}reset(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=Ut.DEFAULT_MODE}matchATN(t){const e=this.atn.modeToStartState[this.mode];Xt.debug&&console.log("matchATN mode "+this.mode+" start: "+e);const s=this.mode,n=this.computeStartState(t,e),i=n.hasSemanticContext;n.hasSemanticContext=!1;const r=this.addDFAState(n);i||(this.decisionToDFA[this.mode].s0=r);const o=this.execATN(t,r);return Xt.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[s].toLexerString()),o}execATN(t,e){Xt.debug&&console.log("start state closure="+e.configs),e.isAcceptState&&this.captureSimState(this.prevAccept,t,e);let s=t.LA(1),n=e;for(;;){Xt.debug&&console.log("execATN loop starting closure: "+n.configs);let e=this.getExistingTargetState(n,s);if(null===e&&(e=this.computeTargetState(t,n,s)),e===Yt.ERROR)break;if(s!==i.EOF&&this.consume(t),e.isAcceptState&&(this.captureSimState(this.prevAccept,t,e),s===i.EOF))break;s=t.LA(1),n=e}return this.failOrAccept(this.prevAccept,t,n.configs,s)}getExistingTargetState(t,e){if(null===t.edges||e<Xt.MIN_DFA_EDGE||e>Xt.MAX_DFA_EDGE)return null;let s=t.edges[e-Xt.MIN_DFA_EDGE];return void 0===s&&(s=null),Xt.debug&&null!==s&&console.log("reuse state "+t.stateNumber+" edge to "+s.stateNumber),s}computeTargetState(t,e,s){const n=new qt;return this.getReachableConfigSet(t,e.configs,n,s),0===n.items.length?(n.hasSemanticContext||this.addDFAEdge(e,s,Yt.ERROR),Yt.ERROR):this.addDFAEdge(e,s,null,n)}failOrAccept(t,e,s,n){if(null!==this.prevAccept.dfaState){const s=t.dfaState.lexerActionExecutor;return this.accept(e,s,this.startIndex,t.index,t.line,t.column),t.dfaState.prediction}if(n===i.EOF&&e.index===this.startIndex)return i.EOF;throw new Mt(this.recog,e,this.startIndex,s)}getReachableConfigSet(t,e,s,n){let r=j.INVALID_ALT_NUMBER;for(let o=0;o<e.items.length;o++){const a=e.items[o],l=a.alt===r;if(!l||!a.passedThroughNonGreedyDecision){Xt.debug&&console.log("testing %s at %s\n",this.getTokenName(n),a.toString(this.recog,!0));for(let e=0;e<a.state.transitions.length;e++){const o=a.state.transitions[e],h=this.getReachableTarget(o,n);if(null!==h){let e=a.lexerActionExecutor;null!==e&&(e=e.fixOffsetBeforeMatch(t.index-this.startIndex));const o=n===i.EOF,c=new Kt({state:h,lexerActionExecutor:e},a);this.closure(t,c,s,l,!0,o)&&(r=a.alt)}}}}}accept(t,e,s,n,i,r){Xt.debug&&console.log("ACTION %s\n",e),t.seek(n),this.line=i,this.column=r,null!==e&&null!==this.recog&&e.execute(this.recog,t,s)}getReachableTarget(t,e){return t.matches(e,0,Ut.MAX_CHAR_VALUE)?t.target:null}computeStartState(t,e){const s=H.EMPTY,n=new qt;for(let i=0;i<e.transitions.length;i++){const r=e.transitions[i].target,o=new Kt({state:r,alt:i+1,context:s},null);this.closure(t,o,n,!1,!1,!1)}return n}closure(t,e,s,n,i,r){let o=null;if(Xt.debug&&console.log("closure("+e.toString(this.recog,!0)+")"),e.state instanceof A){if(Xt.debug&&(null!==this.recog?console.log("closure at %s rule stop %s\n",this.recog.ruleNames[e.state.ruleIndex],e):console.log("closure at rule stop %s\n",e)),null===e.context||e.context.hasEmptyPath()){if(null===e.context||e.context.isEmpty())return s.add(e),!0;s.add(new Kt({state:e.state,context:H.EMPTY},e)),n=!0}if(null!==e.context&&!e.context.isEmpty())for(let a=0;a<e.context.length;a++)if(e.context.getReturnState(a)!==H.EMPTY_RETURN_STATE){const l=e.context.getParent(a),h=this.atn.states[e.context.getReturnState(a)];o=new Kt({state:h,context:l},e),n=this.closure(t,o,s,n,i,r)}return n}e.state.epsilonOnlyTransitions||n&&e.passedThroughNonGreedyDecision||s.add(e);for(let a=0;a<e.state.transitions.length;a++){const l=e.state.transitions[a];o=this.getEpsilonTarget(t,e,l,s,i,r),null!==o&&(n=this.closure(t,o,s,n,i,r))}return n}getEpsilonTarget(t,e,s,n,r,o){let a=null;if(s.serializationType===N.RULE){const t=V.create(e.context,s.followState.stateNumber);a=new Kt({state:s.target,context:t},e)}else{if(s.serializationType===N.PRECEDENCE)throw"Precedence predicates are not supported in lexers.";if(s.serializationType===N.PREDICATE)Xt.debug&&console.log("EVAL rule "+s.ruleIndex+":"+s.predIndex),n.hasSemanticContext=!0,this.evaluatePredicate(t,s.ruleIndex,s.predIndex,r)&&(a=new Kt({state:s.target},e));else if(s.serializationType===N.ACTION)if(null===e.context||e.context.hasEmptyPath()){const t=Gt.append(e.lexerActionExecutor,this.atn.lexerActions[s.actionIndex]);a=new Kt({state:s.target,lexerActionExecutor:t},e)}else a=new Kt({state:s.target},e);else s.serializationType===N.EPSILON?a=new Kt({state:s.target},e):s.serializationType!==N.ATOM&&s.serializationType!==N.RANGE&&s.serializationType!==N.SET||o&&s.matches(i.EOF,0,Ut.MAX_CHAR_VALUE)&&(a=new Kt({state:s.target},e))}return a}evaluatePredicate(t,e,s,n){if(null===this.recog)return!0;if(!n)return this.recog.sempred(null,e,s);const i=this.column,r=this.line,o=t.index,a=t.mark();try{return this.consume(t),this.recog.sempred(null,e,s)}finally{this.column=i,this.line=r,t.seek(o),t.release(a)}}captureSimState(t,e,s){t.index=e.index,t.line=this.line,t.column=this.column,t.dfaState=s}addDFAEdge(t,e,s,n){if(void 0===s&&(s=null),void 0===n&&(n=null),null===s&&null!==n){const t=n.hasSemanticContext;if(n.hasSemanticContext=!1,s=this.addDFAState(n),t)return s}return e<Xt.MIN_DFA_EDGE||e>Xt.MAX_DFA_EDGE||(Xt.debug&&console.log("EDGE "+t+" -> "+s+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-Xt.MIN_DFA_EDGE]=s),s}addDFAState(t){const e=new zt(null,t);let s=null;for(let e=0;e<t.items.length;e++){const n=t.items[e];if(n.state instanceof A){s=n;break}}null!==s&&(e.isAcceptState=!0,e.lexerActionExecutor=s.lexerActionExecutor,e.prediction=this.atn.ruleToTokenType[s.state.ruleIndex]);const n=this.decisionToDFA[this.mode],i=n.states.get(e);if(null!==i)return i;const r=e;return r.stateNumber=n.states.length,t.setReadonly(!0),r.configs=t,n.states.add(r),r}getDFA(t){return this.decisionToDFA[t]}getText(t){return t.getText(this.startIndex,t.index-1)}consume(t){t.LA(1)==="\n".charCodeAt(0)?(this.line+=1,this.column=0):this.column+=1,t.consume()}getTokenName(t){return-1===t?"EOF":"'"+String.fromCharCode(t)+"'"}}Xt.debug=!1,Xt.dfa_debug=!1,Xt.MIN_DFA_EDGE=0,Xt.MAX_DFA_EDGE=127;class Jt{constructor(t,e){this.alt=e,this.pred=t}toString(){return"("+this.pred+", "+this.alt+")"}}class Qt{constructor(){this.data={}}get(t){return this.data["k-"+t]||null}set(t,e){this.data["k-"+t]=e}values(){return Object.keys(this.data).filter(t=>t.startsWith("k-")).map(t=>this.data[t],this)}}const Zt={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(t,e){if(Zt.allConfigsInRuleStopStates(e))return!0;if(t===Zt.SLL&&e.hasSemanticContext){const t=new Vt;for(let s=0;s<e.items.length;s++){let n=e.items[s];n=new m({semanticContext:g.NONE},n),t.add(n)}e=t}const s=Zt.getConflictingAltSubsets(e);return Zt.hasConflictingAltSet(s)&&!Zt.hasStateAssociatedWithOneAlt(e)},hasConfigInRuleStopState:function(t){for(let e=0;e<t.items.length;e++)if(t.items[e].state instanceof A)return!0;return!1},allConfigsInRuleStopStates:function(t){for(let e=0;e<t.items.length;e++)if(!(t.items[e].state instanceof A))return!1;return!0},resolvesToJustOneViableAlt:function(t){return Zt.getSingleViableAlt(t)},allSubsetsConflict:function(t){return!Zt.hasNonConflictingAltSet(t)},hasNonConflictingAltSet:function(t){for(let e=0;e<t.length;e++)if(1===t[e].length)return!0;return!1},hasConflictingAltSet:function(t){for(let e=0;e<t.length;e++)if(t[e].length>1)return!0;return!1},allSubsetsEqual:function(t){let e=null;for(let s=0;s<t.length;s++){const n=t[s];if(null===e)e=n;else if(n!==e)return!1}return!0},getUniqueAlt:function(t){const e=Zt.getAlts(t);return 1===e.length?e.minValue():j.INVALID_ALT_NUMBER},getAlts:function(t){const e=new G;return t.map(function(t){e.or(t)}),e},getConflictingAltSubsets:function(t){const e=new Y;return e.hashFunction=function(t){l.hashStuff(t.state.stateNumber,t.context)},e.equalsFunction=function(t,e){return t.state.stateNumber===e.state.stateNumber&&t.context.equals(e.context)},t.items.map(function(t){let s=e.get(t);null===s&&(s=new G,e.set(t,s)),s.set(t.alt)}),e.getValues()},getStateToAltMap:function(t){const e=new Qt;return t.items.map(function(t){let s=e.get(t.state);null===s&&(s=new G,e.set(t.state,s)),s.set(t.alt)}),e},hasStateAssociatedWithOneAlt:function(t){const e=Zt.getStateToAltMap(t).values();for(let t=0;t<e.length;t++)if(1===e[t].length)return!0;return!1},getSingleViableAlt:function(t){let e=null;for(let s=0;s<t.length;s++){const n=t[s].minValue();if(null===e)e=n;else if(e!==n)return j.INVALID_ALT_NUMBER}return e}},te=Zt;class ee extends Dt{constructor(t,e,s,n,i,r){r=r||t._ctx,n=n||t.getCurrentToken(),s=s||t.getCurrentToken(),e=e||t.getInputStream(),super({message:"",recognizer:t,input:e,ctx:r}),this.deadEndConfigs=i,this.startToken=s,this.offendingToken=n}}class se{constructor(t){this.defaultMapCtor=t||Y,this.cacheMap=new this.defaultMapCtor}get(t,e){const s=this.cacheMap.get(t)||null;return null===s?null:s.get(e)||null}set(t,e,s){let n=this.cacheMap.get(t)||null;null===n&&(n=new this.defaultMapCtor,this.cacheMap.set(t,n)),n.set(e,s)}}class ne extends Yt{constructor(t,e,s,n){super(e,n),this.parser=t,this.decisionToDFA=s,this.predictionMode=te.LL,this._input=null,this._startIndex=0,this._outerContext=null,this._dfa=null,this.mergeCache=null,this.debug=!1,this.debug_closure=!1,this.debug_add=!1,this.trace_atn_sim=!1,this.dfa_debug=!1,this.retry_debug=!1}reset(){}adaptivePredict(t,e,s){(this.debug||this.trace_atn_sim)&&console.log("adaptivePredict decision "+e+" exec LA(1)=="+this.getLookaheadName(t)+" line "+t.LT(1).line+":"+t.LT(1).column),this._input=t,this._startIndex=t.index,this._outerContext=s;const n=this.decisionToDFA[e];this._dfa=n;const i=t.mark(),r=t.index;try{let e;if(e=n.precedenceDfa?n.getPrecedenceStartState(this.parser.getPrecedence()):n.s0,null===e){null===s&&(s=U.EMPTY),this.debug&&console.log("predictATN decision "+n.decision+" exec LA(1)=="+this.getLookaheadName(t)+", outerContext="+s.toString(this.parser.ruleNames));const i=!1;let r=this.computeStartState(n.atnStartState,U.EMPTY,i);n.precedenceDfa?(n.s0.configs=r,r=this.applyPrecedenceFilter(r),e=this.addDFAState(n,new zt(null,r)),n.setPrecedenceStartState(this.parser.getPrecedence(),e)):(e=this.addDFAState(n,new zt(null,r)),n.s0=e)}const i=this.execATN(n,e,t,r,s);return this.debug&&console.log("DFA after predictATN: "+n.toString(this.parser.literalNames,this.parser.symbolicNames)),i}finally{this._dfa=null,this.mergeCache=null,t.seek(r),t.release(i)}}execATN(t,e,s,n,r){let o;(this.debug||this.trace_atn_sim)&&console.log("execATN decision "+t.decision+", DFA state "+e+", LA(1)=="+this.getLookaheadName(s)+" line "+s.LT(1).line+":"+s.LT(1).column);let a=e;this.debug&&console.log("s0 = "+e);let l=s.LA(1);for(;;){let e=this.getExistingTargetState(a,l);if(null===e&&(e=this.computeTargetState(t,a,l)),e===Yt.ERROR){const t=this.noViableAlt(s,r,a.configs,n);if(s.seek(n),o=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(a.configs,r),o!==j.INVALID_ALT_NUMBER)return o;throw t}if(e.requiresFullContext&&this.predictionMode!==te.SLL){let i=null;if(null!==e.predicates){this.debug&&console.log("DFA state has preds in DFA sim LL failover");const t=s.index;if(t!==n&&s.seek(n),i=this.evalSemanticContext(e.predicates,r,!0),1===i.length)return this.debug&&console.log("Full LL avoided"),i.minValue();t!==n&&s.seek(t)}this.dfa_debug&&console.log("ctx sensitive state "+r+" in "+e);const a=!0,l=this.computeStartState(t.atnStartState,r,a);return this.reportAttemptingFullContext(t,i,e.configs,n,s.index),o=this.execATNWithFullContext(t,e,l,s,n,r),o}if(e.isAcceptState){if(null===e.predicates)return e.prediction;const i=s.index;s.seek(n);const o=this.evalSemanticContext(e.predicates,r,!0);if(0===o.length)throw this.noViableAlt(s,r,e.configs,n);return 1===o.length||this.reportAmbiguity(t,e,n,i,!1,o,e.configs),o.minValue()}a=e,l!==i.EOF&&(s.consume(),l=s.LA(1))}}getExistingTargetState(t,e){const s=t.edges;return null===s?null:s[e+1]||null}computeTargetState(t,e,s){const n=this.computeReachSet(e.configs,s,!1);if(null===n)return this.addDFAEdge(t,e,s,Yt.ERROR),Yt.ERROR;let i=new zt(null,n);const r=this.getUniqueAlt(n);if(this.debug){const t=te.getConflictingAltSubsets(n);console.log("SLL altSubSets="+d(t)+", configs="+n+", predict="+r+", allSubsetsConflict="+te.allSubsetsConflict(t)+", conflictingAlts="+this.getConflictingAlts(n))}return r!==j.INVALID_ALT_NUMBER?(i.isAcceptState=!0,i.configs.uniqueAlt=r,i.prediction=r):te.hasSLLConflictTerminatingPrediction(this.predictionMode,n)&&(i.configs.conflictingAlts=this.getConflictingAlts(n),i.requiresFullContext=!0,i.isAcceptState=!0,i.prediction=i.configs.conflictingAlts.minValue()),i.isAcceptState&&i.configs.hasSemanticContext&&(this.predicateDFAState(i,this.atn.getDecisionState(t.decision)),null!==i.predicates&&(i.prediction=j.INVALID_ALT_NUMBER)),i=this.addDFAEdge(t,e,s,i),i}predicateDFAState(t,e){const s=e.transitions.length,n=this.getConflictingAltsOrUniqueAlt(t.configs),i=this.getPredsForAmbigAlts(n,t.configs,s);null!==i?(t.predicates=this.getPredicatePredictions(n,i),t.prediction=j.INVALID_ALT_NUMBER):t.prediction=n.minValue()}execATNWithFullContext(t,e,s,n,r,o){(this.debug||this.trace_atn_sim)&&console.log("execATNWithFullContext "+s);let a,l=!1,h=s;n.seek(r);let c=n.LA(1),u=-1;for(;;){if(a=this.computeReachSet(h,c,!0),null===a){const t=this.noViableAlt(n,o,h,r);n.seek(r);const e=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(h,o);if(e!==j.INVALID_ALT_NUMBER)return e;throw t}const t=te.getConflictingAltSubsets(a);if(this.debug&&console.log("LL altSubSets="+t+", predict="+te.getUniqueAlt(t)+", resolvesToJustOneViableAlt="+te.resolvesToJustOneViableAlt(t)),a.uniqueAlt=this.getUniqueAlt(a),a.uniqueAlt!==j.INVALID_ALT_NUMBER){u=a.uniqueAlt;break}if(this.predictionMode!==te.LL_EXACT_AMBIG_DETECTION){if(u=te.resolvesToJustOneViableAlt(t),u!==j.INVALID_ALT_NUMBER)break}else if(te.allSubsetsConflict(t)&&te.allSubsetsEqual(t)){l=!0,u=te.getSingleViableAlt(t);break}h=a,c!==i.EOF&&(n.consume(),c=n.LA(1))}return a.uniqueAlt!==j.INVALID_ALT_NUMBER?(this.reportContextSensitivity(t,u,a,r,n.index),u):(this.reportAmbiguity(t,e,r,n.index,l,null,a),u)}computeReachSet(t,e,s){this.debug&&console.log("in computeReachSet, starting closure: "+t),null===this.mergeCache&&(this.mergeCache=new se);const n=new Vt(s);let r=null;for(let o=0;o<t.items.length;o++){const a=t.items[o];if(this.debug&&console.log("testing "+this.getTokenName(e)+" at "+a),a.state instanceof A)(s||e===i.EOF)&&(null===r&&(r=[]),r.push(a),this.debug_add&&console.log("added "+a+" to skippedStopStates"));else for(let t=0;t<a.state.transitions.length;t++){const s=a.state.transitions[t],i=this.getReachableTarget(s,e);if(null!==i){const t=new m({state:i},a);n.add(t,this.mergeCache),this.debug_add&&console.log("added "+t+" to intermediate")}}}let o=null;if(null===r&&e!==i.EOF&&(1===n.items.length||this.getUniqueAlt(n)!==j.INVALID_ALT_NUMBER)&&(o=n),null===o){o=new Vt(s);const t=new p,r=e===i.EOF;for(let e=0;e<n.items.length;e++)this.closure(n.items[e],o,t,!1,s,r)}if(e===i.EOF&&(o=this.removeAllConfigsNotInRuleStopState(o,o===n)),!(null===r||s&&te.hasConfigInRuleStopState(o)))for(let t=0;t<r.length;t++)o.add(r[t],this.mergeCache);return this.trace_atn_sim&&console.log("computeReachSet "+t+" -> "+o),0===o.items.length?null:o}removeAllConfigsNotInRuleStopState(t,e){if(te.allConfigsInRuleStopStates(t))return t;const s=new Vt(t.fullCtx);for(let n=0;n<t.items.length;n++){const r=t.items[n];if(r.state instanceof A)s.add(r,this.mergeCache);else if(e&&r.state.epsilonOnlyTransitions&&this.atn.nextTokens(r.state).contains(i.EPSILON)){const t=this.atn.ruleToStopState[r.state.ruleIndex];s.add(new m({state:t},r),this.mergeCache)}}return s}computeStartState(t,e,s){const n=q(this.atn,e),i=new Vt(s);this.trace_atn_sim&&console.log("computeStartState from ATN state "+t+" initialContext="+n.toString(this.parser));for(let e=0;e<t.transitions.length;e++){const r=t.transitions[e].target,o=new m({state:r,alt:e+1,context:n},null),a=new p;this.closure(o,i,a,!0,s,!1)}return i}applyPrecedenceFilter(t){let e;const s=[],n=new Vt(t.fullCtx);for(let i=0;i<t.items.length;i++){if(e=t.items[i],1!==e.alt)continue;const r=e.semanticContext.evalPrecedence(this.parser,this._outerContext);null!==r&&(s[e.state.stateNumber]=e.context,r!==e.semanticContext?n.add(new m({semanticContext:r},e),this.mergeCache):n.add(e,this.mergeCache))}for(let i=0;i<t.items.length;i++)if(e=t.items[i],1!==e.alt){if(!e.precedenceFilterSuppressed){const t=s[e.state.stateNumber]||null;if(null!==t&&t.equals(e.context))continue}n.add(e,this.mergeCache)}return n}getReachableTarget(t,e){return t.matches(e,0,this.atn.maxTokenType)?t.target:null}getPredsForAmbigAlts(t,e,s){let n=[];for(let s=0;s<e.items.length;s++){const i=e.items[s];t.get(i.alt)&&(n[i.alt]=g.orContext(n[i.alt]||null,i.semanticContext))}let i=0;for(let t=1;t<s+1;t++){const e=n[t]||null;null===e?n[t]=g.NONE:e!==g.NONE&&(i+=1)}return 0===i&&(n=null),this.debug&&console.log("getPredsForAmbigAlts result "+d(n)),n}getPredicatePredictions(t,e){const s=[];let n=!1;for(let i=1;i<e.length;i++){const r=e[i];null!==t&&t.get(i)&&s.push(new Jt(r,i)),r!==g.NONE&&(n=!0)}return n?s:null}getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(t,e){const s=this.splitAccordingToSemanticValidity(t,e),n=s[0],i=s[1];let r=this.getAltThatFinishedDecisionEntryRule(n);return r!==j.INVALID_ALT_NUMBER||i.items.length>0&&(r=this.getAltThatFinishedDecisionEntryRule(i),r!==j.INVALID_ALT_NUMBER)?r:j.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(t){const e=[];for(let s=0;s<t.items.length;s++){const n=t.items[s];(n.reachesIntoOuterContext>0||n.state instanceof A&&n.context.hasEmptyPath())&&e.indexOf(n.alt)<0&&e.push(n.alt)}return 0===e.length?j.INVALID_ALT_NUMBER:Math.min.apply(null,e)}splitAccordingToSemanticValidity(t,e){const s=new Vt(t.fullCtx),n=new Vt(t.fullCtx);for(let i=0;i<t.items.length;i++){const r=t.items[i];r.semanticContext!==g.NONE?r.semanticContext.evaluate(this.parser,e)?s.add(r):n.add(r):s.add(r)}return[s,n]}evalSemanticContext(t,e,s){const n=new G;for(let i=0;i<t.length;i++){const r=t[i];if(r.pred===g.NONE){if(n.set(r.alt),!s)break;continue}const o=r.pred.evaluate(this.parser,e);if((this.debug||this.dfa_debug)&&console.log("eval pred "+r+"="+o),o&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+r.alt),n.set(r.alt),!s))break}return n}closure(t,e,s,n,i,r){this.closureCheckingStopState(t,e,s,n,i,0,r)}closureCheckingStopState(t,e,s,n,i,r,o){if((this.trace_atn_sim||this.debug_closure)&&console.log("closure("+t.toString(this.parser,!0)+")"),t.state instanceof A){if(!t.context.isEmpty()){for(let a=0;a<t.context.length;a++){if(t.context.getReturnState(a)===H.EMPTY_RETURN_STATE){if(i){e.add(new m({state:t.state,context:H.EMPTY},t),this.mergeCache);continue}this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex)),this.closure_(t,e,s,n,i,r,o);continue}const l=this.atn.states[t.context.getReturnState(a)],h=t.context.getParent(a),c={state:l,alt:t.alt,context:h,semanticContext:t.semanticContext},u=new m(c,null);u.reachesIntoOuterContext=t.reachesIntoOuterContext,this.closureCheckingStopState(u,e,s,n,i,r-1,o)}return}if(i)return void e.add(t,this.mergeCache);this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex))}this.closure_(t,e,s,n,i,r,o)}closure_(t,e,s,n,i,r,o){const a=t.state;a.epsilonOnlyTransitions||e.add(t,this.mergeCache);for(let l=0;l<a.transitions.length;l++){if(0===l&&this.canDropLoopEntryEdgeInLeftRecursiveRule(t))continue;const h=a.transitions[l],c=n&&!(h instanceof ut),u=this.getEpsilonTarget(t,h,c,0===r,i,o);if(null!==u){let n=r;if(t.state instanceof A){if(null!==this._dfa&&this._dfa.precedenceDfa&&h.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(u.precedenceFilterSuppressed=!0),u.reachesIntoOuterContext+=1,s.getOrAdd(u)!==u)continue;e.dipsIntoOuterContext=!0,n-=1,this.debug&&console.log("dips into outer ctx: "+u)}else{if(!h.isEpsilon&&s.getOrAdd(u)!==u)continue;h instanceof y&&n>=0&&(n+=1)}this.closureCheckingStopState(u,e,s,c,i,n,o)}}}canDropLoopEntryEdgeInLeftRecursiveRule(t){const e=t.state;if(e.stateType!==C.STAR_LOOP_ENTRY)return!1;if(e.stateType!==C.STAR_LOOP_ENTRY||!e.isPrecedenceDecision||t.context.isEmpty()||t.context.hasEmptyPath())return!1;const s=t.context.length;for(let n=0;n<s;n++)if(this.atn.states[t.context.getReturnState(n)].ruleIndex!==e.ruleIndex)return!1;const n=e.transitions[0].target.endState.stateNumber,i=this.atn.states[n];for(let n=0;n<s;n++){const s=t.context.getReturnState(n),r=this.atn.states[s];if(1!==r.transitions.length||!r.transitions[0].isEpsilon)return!1;const o=r.transitions[0].target;if(!(r.stateType===C.BLOCK_END&&o===e||r===i||o===i||o.stateType===C.BLOCK_END&&1===o.transitions.length&&o.transitions[0].isEpsilon&&o.transitions[0].target===e))return!1}return!0}getRuleName(t){return null!==this.parser&&t>=0?this.parser.ruleNames[t]:"<rule "+t+">"}getEpsilonTarget(t,e,s,n,r,o){switch(e.serializationType){case N.RULE:return this.ruleTransition(t,e);case N.PRECEDENCE:return this.precedenceTransition(t,e,s,n,r);case N.PREDICATE:return this.predTransition(t,e,s,n,r);case N.ACTION:return this.actionTransition(t,e);case N.EPSILON:return new m({state:e.target},t);case N.ATOM:case N.RANGE:case N.SET:return o&&e.matches(i.EOF,0,1)?new m({state:e.target},t):null;default:return null}}actionTransition(t,e){if(this.debug){const t=-1===e.actionIndex?65535:e.actionIndex;console.log("ACTION edge "+e.ruleIndex+":"+t)}return new m({state:e.target},t)}precedenceTransition(t,e,s,n,i){this.debug&&(console.log("PRED (collectPredicates="+s+") "+e.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+d(this.parser.getRuleInvocationStack())));let r=null;if(s&&n)if(i){const s=this._input.index;this._input.seek(this._startIndex);const n=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(s),n&&(r=new m({state:e.target},t))}else{const s=g.andContext(t.semanticContext,e.getPredicate());r=new m({state:e.target,semanticContext:s},t)}else r=new m({state:e.target},t);return this.debug&&console.log("config from pred transition="+r),r}predTransition(t,e,s,n,i){this.debug&&(console.log("PRED (collectPredicates="+s+") "+e.ruleIndex+":"+e.predIndex+", ctx dependent="+e.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+d(this.parser.getRuleInvocationStack())));let r=null;if(s&&(e.isCtxDependent&&n||!e.isCtxDependent))if(i){const s=this._input.index;this._input.seek(this._startIndex);const n=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(s),n&&(r=new m({state:e.target},t))}else{const s=g.andContext(t.semanticContext,e.getPredicate());r=new m({state:e.target,semanticContext:s},t)}else r=new m({state:e.target},t);return this.debug&&console.log("config from pred transition="+r),r}ruleTransition(t,e){this.debug&&console.log("CALL rule "+this.getRuleName(e.target.ruleIndex)+", ctx="+t.context);const s=e.followState,n=V.create(t.context,s.stateNumber);return new m({state:e.target,context:n},t)}getConflictingAlts(t){const e=te.getConflictingAltSubsets(t);return te.getAlts(e)}getConflictingAltsOrUniqueAlt(t){let e=null;return t.uniqueAlt!==j.INVALID_ALT_NUMBER?(e=new G,e.set(t.uniqueAlt)):e=t.conflictingAlts,e}getTokenName(t){if(t===i.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(t>=this.parser.literalNames.length&&t>=this.parser.symbolicNames.length))return(this.parser.literalNames[t]||this.parser.symbolicNames[t])+"<"+t+">";console.log(t+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+t}getLookaheadName(t){return this.getTokenName(t.LA(1))}dumpDeadEndConfigs(t){console.log("dead end configs: ");const e=t.getDeadEndConfigs();for(let t=0;t<e.length;t++){const s=e[t];let n="no edges";if(s.state.transitions.length>0){const t=s.state.transitions[0];t instanceof ht?n="Atom "+this.getTokenName(t.label):t instanceof L&&(n=(t instanceof I?"~":"")+"Set "+t.set)}console.error(s.toString(this.parser,!0)+":"+n)}}noViableAlt(t,e,s,n){return new ee(this.parser,t,t.get(n),t.LT(1),s,e)}getUniqueAlt(t){let e=j.INVALID_ALT_NUMBER;for(let s=0;s<t.items.length;s++){const n=t.items[s];if(e===j.INVALID_ALT_NUMBER)e=n.alt;else if(n.alt!==e)return j.INVALID_ALT_NUMBER}return e}addDFAEdge(t,e,s,n){if(this.debug&&console.log("EDGE "+e+" -> "+n+" upon "+this.getTokenName(s)),null===n)return null;if(n=this.addDFAState(t,n),null===e||s<-1||s>this.atn.maxTokenType)return n;if(null===e.edges&&(e.edges=[]),e.edges[s+1]=n,this.debug){const e=null===this.parser?null:this.parser.literalNames,s=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+t.toString(e,s))}return n}addDFAState(t,e){if(e===Yt.ERROR)return e;const s=t.states.get(e);return null!==s?(this.trace_atn_sim&&console.log("addDFAState "+e+" exists"),s):(e.stateNumber=t.states.length,e.configs.readOnly||(e.configs.optimizeConfigs(this),e.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+e),t.states.add(e),this.debug&&console.log("adding new DFA state: "+e),e)}reportAttemptingFullContext(t,e,s,n,i){if(this.debug||this.retry_debug){const e=new E(n,i+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+s+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportAttemptingFullContext(this.parser,t,n,i,e,s)}reportContextSensitivity(t,e,s,n,i){if(this.debug||this.retry_debug){const e=new E(n,i+1);console.log("reportContextSensitivity decision="+t.decision+":"+s+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportContextSensitivity(this.parser,t,n,i,e,s)}reportAmbiguity(t,e,s,n,i,r,o){if(this.debug||this.retry_debug){const t=new E(s,n+1);console.log("reportAmbiguity "+r+":"+o+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListener().reportAmbiguity(this.parser,t,s,n,i,r,o)}}class ie{constructor(){this.cache=new Y}add(t){if(t===H.EMPTY)return H.EMPTY;const e=this.cache.get(t)||null;return null!==e?e:(this.cache.set(t,t),t)}get(t){return this.cache.get(t)||null}get length(){return this.cache.length}}const re={ATN:j,ATNDeserializer:kt,LexerATNSimulator:Xt,ParserATNSimulator:ne,PredictionMode:te,PredictionContextCache:ie};class oe{constructor(t,e,s){this.dfa=t,this.literalNames=e||[],this.symbolicNames=s||[]}toString(){if(null===this.dfa.s0)return null;let t="";const e=this.dfa.sortedStates();for(let s=0;s<e.length;s++){const n=e[s];if(null!==n.edges){const e=n.edges.length;for(let s=0;s<e;s++){const e=n.edges[s]||null;null!==e&&2147483647!==e.stateNumber&&(t=t.concat(this.getStateString(n)),t=t.concat("-"),t=t.concat(this.getEdgeLabel(s)),t=t.concat("->"),t=t.concat(this.getStateString(e)),t=t.concat("\n"))}}}return 0===t.length?null:t}getEdgeLabel(t){return 0===t?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[t-1]||this.symbolicNames[t-1]:String.fromCharCode(t-1)}getStateString(t){const e=(t.isAcceptState?":":"")+"s"+t.stateNumber+(t.requiresFullContext?"^":"");return t.isAcceptState?null!==t.predicates?e+"=>"+d(t.predicates):e+"=>"+t.prediction.toString():e}}class ae extends oe{constructor(t){super(t,null)}getEdgeLabel(t){return"'"+String.fromCharCode(t)+"'"}}class le{constructor(t,e){if(void 0===e&&(e=0),this.atnStartState=t,this.decision=e,this._states=new p,this.s0=null,this.precedenceDfa=!1,t instanceof rt&&t.isPrecedenceDecision){this.precedenceDfa=!0;const t=new zt(null,new Vt);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}}getPrecedenceStartState(t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return t<0||t>=this.s0.edges.length?null:this.s0.edges[t]||null}setPrecedenceStartState(t,e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";t<0||(this.s0.edges[t]=e)}setPrecedenceDfa(t){if(this.precedenceDfa!==t){if(this._states=new p,t){const t=new zt(null,new Vt);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}else this.s0=null;this.precedenceDfa=t}}sortedStates(){return this._states.values().sort(function(t,e){return t.stateNumber-e.stateNumber})}toString(t,e){return t=t||null,e=e||null,null===this.s0?"":new oe(this,t,e).toString()}toLexerString(){return null===this.s0?"":new ae(this).toString()}get states(){return this._states}}const he={DFA:le,DFASerializer:oe,LexerDFASerializer:ae,PredPrediction:Jt},ce={PredictionContext:H},ue={Interval:E,IntervalSet:S};class de{visitTerminal(t){}visitErrorNode(t){}enterEveryRule(t){}exitEveryRule(t){}}class pe{visit(t){return Array.isArray(t)?t.map(function(t){return t.accept(this)},this):t.accept(this)}visitChildren(t){return t.children?this.visit(t.children):null}visitTerminal(t){}visitErrorNode(t){}}class ge{walk(t,e){if(e instanceof F||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof b)t.visitTerminal(e);else{this.enterRule(t,e);for(let s=0;s<e.getChildCount();s++){const n=e.getChild(s);this.walk(t,n)}this.exitRule(t,e)}}enterRule(t,e){const s=e.ruleContext;t.enterEveryRule(s),s.enterRule(t)}exitRule(t,e){const s=e.ruleContext;s.exitRule(t),t.exitEveryRule(s)}}ge.DEFAULT=new ge;const fe={Trees:M,RuleNode:P,ErrorNode:F,TerminalNode:b,ParseTreeListener:de,ParseTreeVisitor:pe,ParseTreeWalker:ge};class xe extends Dt{constructor(t){super({message:"",recognizer:t,input:t.getInputStream(),ctx:t._ctx}),this.offendingToken=t.getCurrentToken()}}class _e extends Dt{constructor(t,e,s){super({message:Te(e,s||null),recognizer:t,input:t.getInputStream(),ctx:t._ctx});const n=t._interp.atn.states[t.state].transitions[0];n instanceof gt?(this.ruleIndex=n.ruleIndex,this.predicateIndex=n.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=e,this.offendingToken=t.getCurrentToken()}}function Te(t,e){return null!==e?e:"failed predicate: {"+t+"}?"}class me extends vt{constructor(t){super(),t=t||!0,this.exactOnly=t}reportAmbiguity(t,e,s,n,i,r,o){if(this.exactOnly&&!i)return;const a="reportAmbiguity d="+this.getDecisionDescription(t,e)+": ambigAlts="+this.getConflictingAlts(r,o)+", input='"+t.getTokenStream().getText(new E(s,n))+"'";t.notifyErrorListeners(a)}reportAttemptingFullContext(t,e,s,n,i,r){const o="reportAttemptingFullContext d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new E(s,n))+"'";t.notifyErrorListeners(o)}reportContextSensitivity(t,e,s,n,i,r){const o="reportContextSensitivity d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new E(s,n))+"'";t.notifyErrorListeners(o)}getDecisionDescription(t,e){const s=e.decision,n=e.atnStartState.ruleIndex,i=t.ruleNames;if(n<0||n>=i.length)return""+s;const r=i[n]||null;return null===r||0===r.length?""+s:`${s} (${r})`}getConflictingAlts(t,e){if(null!==t)return t;const s=new G;for(let t=0;t<e.items.length;t++)s.set(e.items[t].alt);return`{${s.values().join(", ")}}`}}class Ee extends Error{constructor(){super(),Error.captureStackTrace(this,Ee)}}class Se{reset(t){}recoverInline(t){}recover(t,e){}sync(t){}inErrorRecoveryMode(t){}reportError(t){}}class Ce extends Se{constructor(){super(),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this.nextTokensContext=null,this.nextTokenState=0}reset(t){this.endErrorCondition(t)}beginErrorCondition(t){this.errorRecoveryMode=!0}inErrorRecoveryMode(t){return this.errorRecoveryMode}endErrorCondition(t){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1}reportMatch(t){this.endErrorCondition(t)}reportError(t,e){this.inErrorRecoveryMode(t)||(this.beginErrorCondition(t),e instanceof ee?this.reportNoViableAlternative(t,e):e instanceof xe?this.reportInputMismatch(t,e):e instanceof _e?this.reportFailedPredicate(t,e):(console.log("unknown recognition error type: "+e.constructor.name),console.log(e.stack),t.notifyErrorListeners(e.getOffendingToken(),e.getMessage(),e)))}recover(t,e){this.lastErrorIndex===t.getInputStream().index&&null!==this.lastErrorStates&&this.lastErrorStates.indexOf(t.state)>=0&&t.consume(),this.lastErrorIndex=t._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(t.state);const s=this.getErrorRecoverySet(t);this.consumeUntil(t,s)}sync(t){if(this.inErrorRecoveryMode(t))return;const e=t._interp.atn.states[t.state],s=t.getTokenStream().LA(1),n=t.atn.nextTokens(e);if(n.contains(s))return this.nextTokensContext=null,void(this.nextTokenState=C.INVALID_STATE_NUMBER);if(n.contains(i.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=t._ctx,this.nextTokensState=t._stateNumber);else switch(e.stateType){case C.BLOCK_START:case C.STAR_BLOCK_START:case C.PLUS_BLOCK_START:case C.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(t))return;throw new xe(t);case C.PLUS_LOOP_BACK:case C.STAR_LOOP_BACK:{this.reportUnwantedToken(t);const e=new S;e.addSet(t.getExpectedTokens());const s=e.addSet(this.getErrorRecoverySet(t));this.consumeUntil(t,s)}}}reportNoViableAlternative(t,e){const s=t.getTokenStream();let n;n=null!==s?e.startToken.type===i.EOF?"<EOF>":s.getText(new E(e.startToken.tokenIndex,e.offendingToken.tokenIndex)):"<unknown input>";const r="no viable alternative at input "+this.escapeWSAndQuote(n);t.notifyErrorListeners(r,e.offendingToken,e)}reportInputMismatch(t,e){const s="mismatched input "+this.getTokenErrorDisplay(e.offendingToken)+" expecting "+e.getExpectedTokens().toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(s,e.offendingToken,e)}reportFailedPredicate(t,e){const s="rule "+t.ruleNames[t._ctx.ruleIndex]+" "+e.message;t.notifyErrorListeners(s,e.offendingToken,e)}reportUnwantedToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),s="extraneous input "+this.getTokenErrorDisplay(e)+" expecting "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(s,e,null)}reportMissingToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),s="missing "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames)+" at "+this.getTokenErrorDisplay(e);t.notifyErrorListeners(s,e,null)}recoverInline(t){const e=this.singleTokenDeletion(t);if(null!==e)return t.consume(),e;if(this.singleTokenInsertion(t))return this.getMissingSymbol(t);throw new xe(t)}singleTokenInsertion(t){const e=t.getTokenStream().LA(1),s=t._interp.atn,n=s.states[t.state].transitions[0].target;return!!s.nextTokens(n,t._ctx).contains(e)&&(this.reportMissingToken(t),!0)}singleTokenDeletion(t){const e=t.getTokenStream().LA(2);if(this.getExpectedTokens(t).contains(e)){this.reportUnwantedToken(t),t.consume();const e=t.getCurrentToken();return this.reportMatch(t),e}return null}getMissingSymbol(t){const e=t.getCurrentToken(),s=this.getExpectedTokens(t).first();let n;n=s===i.EOF?"<missing EOF>":"<missing "+t.literalNames[s]+">";let r=e;const o=t.getTokenStream().LT(-1);return r.type===i.EOF&&null!==o&&(r=o),t.getTokenFactory().create(r.source,s,n,i.DEFAULT_CHANNEL,-1,-1,r.line,r.column)}getExpectedTokens(t){return t.getExpectedTokens()}getTokenErrorDisplay(t){if(null===t)return"<no token>";let e=t.text;return null===e&&(e=t.type===i.EOF?"<EOF>":"<"+t.type+">"),this.escapeWSAndQuote(e)}escapeWSAndQuote(t){return"'"+(t=(t=(t=t.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}getErrorRecoverySet(t){const e=t._interp.atn;let s=t._ctx;const n=new S;for(;null!==s&&s.invokingState>=0;){const t=e.states[s.invokingState].transitions[0],i=e.nextTokens(t.followState);n.addSet(i),s=s.parentCtx}return n.removeOne(i.EPSILON),n}consumeUntil(t,e){let s=t.getTokenStream().LA(1);for(;s!==i.EOF&&!e.contains(s);)t.consume(),s=t.getTokenStream().LA(1)}}class Ae extends Ce{constructor(){super()}recover(t,e){let s=t._ctx;for(;null!==s;)s.exception=e,s=s.parentCtx;throw new Ee(e)}recoverInline(t){this.recover(t,new xe(t))}sync(t){}}const Ne={RecognitionException:Dt,NoViableAltException:ee,LexerNoViableAltException:Mt,InputMismatchException:xe,FailedPredicateException:_e,DiagnosticErrorListener:me,BailErrorStrategy:Ae,DefaultErrorStrategy:Ce,ErrorListener:vt};class ye{constructor(t,e){if(this.name="<empty>",this.strdata=t,this.decodeToUnicodeCodePoints=e||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let t=0;t<this.strdata.length;){const e=this.strdata.codePointAt(t);this.data.push(e),t+=e<=65535?1:2}else{this.data=new Array(this.strdata.length);for(let t=0;t<this.strdata.length;t++)this.data[t]=this.strdata.charCodeAt(t)}this._size=this.data.length}reset(){this._index=0}consume(){if(this._index>=this._size)throw"cannot consume EOF";this._index+=1}LA(t){if(0===t)return 0;t<0&&(t+=1);const e=this._index+t-1;return e<0||e>=this._size?i.EOF:this.data[e]}LT(t){return this.LA(t)}mark(){return-1}release(t){}seek(t){t<=this._index?this._index=t:this._index=Math.min(t,this._size)}getText(t,e){if(e>=this._size&&(e=this._size-1),t>=this._size)return"";if(this.decodeToUnicodeCodePoints){let s="";for(let n=t;n<=e;n++)s+=String.fromCodePoint(this.data[n]);return s}return this.strdata.slice(t,e+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}}class Le extends ye{constructor(t,e){super(t,e)}}var Ie=s(763);const ke="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;class ve extends Le{static fromPath(t,e,s){if(!ke)throw new Error("FileStream is only available when running in Node!");Ie.readFile(t,e,function(t,e){let n=null;null!==e&&(n=new ye(e,!0)),s(t,n)})}constructor(t,e,s){if(!ke)throw new Error("FileStream is only available when running in Node!");super(Ie.readFileSync(t,e||"utf-8"),s),this.fileName=t}}const we={fromString:function(t){return new ye(t,!0)},fromBlob:function(t,e,s,n){const i=new window.FileReader;i.onload=function(t){const e=new ye(t.target.result,!0);s(e)},i.onerror=n,i.readAsText(t,e)},fromBuffer:function(t,e){return new ye(t.toString(e),!0)},fromPath:function(t,e,s){ve.fromPath(t,e,s)},fromPathSync:function(t,e){return new ve(t,e)}},Re={arrayToString:d,stringToCharArray:function(t){let e=new Uint16Array(t.length);for(let s=0;s<t.length;s++)e[s]=t.charCodeAt(s);return e}};class Oe{}class Pe extends Oe{constructor(t){super(),this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}mark(){return 0}release(t){}reset(){this.seek(0)}seek(t){this.lazyInit(),this.index=this.adjustSeekIndex(t)}get size(){return this.tokens.length}get(t){return this.lazyInit(),this.tokens[t]}consume(){let t=!1;if(t=this.index>=0&&(this.fetchedEOF?this.index<this.tokens.length-1:this.index<this.tokens.length),!t&&this.LA(1)===i.EOF)throw"cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1))}sync(t){const e=t-this.tokens.length+1;return!(e>0)||this.fetch(e)>=e}fetch(t){if(this.fetchedEOF)return 0;for(let e=0;e<t;e++){const t=this.tokenSource.nextToken();if(t.tokenIndex=this.tokens.length,this.tokens.push(t),t.type===i.EOF)return this.fetchedEOF=!0,e+1}return t}getTokens(t,e,s){if(void 0===s&&(s=null),t<0||e<0)return null;this.lazyInit();const n=[];e>=this.tokens.length&&(e=this.tokens.length-1);for(let r=t;r<e;r++){const t=this.tokens[r];if(t.type===i.EOF)break;(null===s||s.contains(t.type))&&n.push(t)}return n}LA(t){return this.LT(t).type}LB(t){return this.index-t<0?null:this.tokens[this.index-t]}LT(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);const e=this.index+t-1;return this.sync(e),e>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[e]}adjustSeekIndex(t){return t}lazyInit(){-1===this.index&&this.setup()}setup(){this.sync(0),this.index=this.adjustSeekIndex(0)}setTokenSource(t){this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}nextTokenOnChannel(t,e){if(this.sync(t),t>=this.tokens.length)return-1;let s=this.tokens[t];for(;s.channel!==e;){if(s.type===i.EOF)return-1;t+=1,this.sync(t),s=this.tokens[t]}return t}previousTokenOnChannel(t,e){for(;t>=0&&this.tokens[t].channel!==e;)t-=1;return t}getHiddenTokensToRight(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const s=this.nextTokenOnChannel(t+1,Ut.DEFAULT_TOKEN_CHANNEL),n=t+1,i=-1===s?this.tokens.length-1:s;return this.filterForChannel(n,i,e)}getHiddenTokensToLeft(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const s=this.previousTokenOnChannel(t-1,Ut.DEFAULT_TOKEN_CHANNEL);if(s===t-1)return null;const n=s+1,i=t-1;return this.filterForChannel(n,i,e)}filterForChannel(t,e,s){const n=[];for(let i=t;i<e+1;i++){const t=this.tokens[i];-1===s?t.channel!==Ut.DEFAULT_TOKEN_CHANNEL&&n.push(t):t.channel===s&&n.push(t)}return 0===n.length?null:n}getSourceName(){return this.tokenSource.getSourceName()}getText(t){this.lazyInit(),this.fill(),t||(t=new E(0,this.tokens.length-1));let e=t.start;e instanceof i&&(e=e.tokenIndex);let s=t.stop;if(s instanceof i&&(s=s.tokenIndex),null===e||null===s||e<0||s<0)return"";s>=this.tokens.length&&(s=this.tokens.length-1);let n="";for(let t=e;t<s+1;t++){const e=this.tokens[t];if(e.type===i.EOF)break;n+=e.text}return n}fill(){for(this.lazyInit();1e3===this.fetch(1e3););}}Object.defineProperty(Pe,"size",{get:function(){return this.tokens.length}});class be extends Pe{constructor(t,e){super(t),this.channel=void 0===e?i.DEFAULT_CHANNEL:e}adjustSeekIndex(t){return this.nextTokenOnChannel(t,this.channel)}LB(t){if(0===t||this.index-t<0)return null;let e=this.index,s=1;for(;s<=t;)e=this.previousTokenOnChannel(e-1,this.channel),s+=1;return e<0?null:this.tokens[e]}LT(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);let e=this.index,s=1;for(;s<t;)this.sync(e+1)&&(e=this.nextTokenOnChannel(e+1,this.channel)),s+=1;return this.tokens[e]}getNumberOfOnChannelTokens(){let t=0;this.fill();for(let e=0;e<this.tokens.length;e++){const s=this.tokens[e];if(s.channel===this.channel&&(t+=1),s.type===i.EOF)break}return t}}class Fe extends de{constructor(t){super(),this.parser=t}enterEveryRule(t){console.log("enter "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}visitTerminal(t){console.log("consume "+t.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])}exitEveryRule(t){console.log("exit "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}}class De extends Ot{constructor(t){super(),this._input=null,this._errHandler=new Ce,this._precedenceStack=[],this._precedenceStack.push(0),this._ctx=null,this.buildParseTrees=!0,this._tracer=null,this._parseListeners=null,this._syntaxErrors=0,this.setInputStream(t)}reset(){null!==this._input&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),null!==this._interp&&this._interp.reset()}match(t){let e=this.getCurrentToken();return e.type===t?(this._errHandler.reportMatch(this),this.consume()):(e=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===e.tokenIndex&&this._ctx.addErrorNode(e)),e}matchWildcard(){let t=this.getCurrentToken();return t.type>0?(this._errHandler.reportMatch(this),this.consume()):(t=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===t.tokenIndex&&this._ctx.addErrorNode(t)),t}getParseListeners(){return this._parseListeners||[]}addParseListener(t){if(null===t)throw"listener";null===this._parseListeners&&(this._parseListeners=[]),this._parseListeners.push(t)}removeParseListener(t){if(null!==this._parseListeners){const e=this._parseListeners.indexOf(t);e>=0&&this._parseListeners.splice(e,1),0===this._parseListeners.length&&(this._parseListeners=null)}}removeParseListeners(){this._parseListeners=null}triggerEnterRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.forEach(function(e){e.enterEveryRule(t),t.enterRule(e)})}}triggerExitRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.slice(0).reverse().forEach(function(e){t.exitRule(e),e.exitEveryRule(t)})}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(t){this._input.tokenSource._factory=t}getATNWithBypassAlts(){const t=this.getSerializedATN();if(null===t)throw"The current parser does not support an ATN with bypass alternatives.";let e=this.bypassAltsAtnCache[t];if(null===e){const s=new _t;s.generateRuleBypassTransitions=!0,e=new kt(s).deserialize(t),this.bypassAltsAtnCache[t]=e}return e}getInputStream(){return this.getTokenStream()}setInputStream(t){this.setTokenStream(t)}getTokenStream(){return this._input}setTokenStream(t){this._input=null,this.reset(),this._input=t}get syntaxErrorsCount(){return this._syntaxErrors}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(t,e,s){s=s||null,null===(e=e||null)&&(e=this.getCurrentToken()),this._syntaxErrors+=1;const n=e.line,i=e.column;this.getErrorListener().syntaxError(this,e,n,i,t,s)}consume(){const t=this.getCurrentToken();t.type!==i.EOF&&this.getInputStream().consume();const e=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||e){let s;s=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(t):this._ctx.addTokenNode(t),s.invokingState=this.state,e&&this._parseListeners.forEach(function(t){s instanceof F||void 0!==s.isErrorNode&&s.isErrorNode()?t.visitErrorNode(s):s instanceof b&&t.visitTerminal(s)})}return t}addContextToParseTree(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)}enterRule(t,e,s){this.state=e,this._ctx=t,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this._ctx.stop=this._input.LT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx}enterOuterAlt(t,e){t.setAltNumber(e),this.buildParseTrees&&this._ctx!==t&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(t)),this._ctx=t}getPrecedence(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(t,e,s,n){this.state=e,this._precedenceStack.push(n),this._ctx=t,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(t,e,s){const n=this._ctx;n.parentCtx=t,n.invokingState=e,n.stop=this._input.LT(-1),this._ctx=t,this._ctx.start=n.start,this.buildParseTrees&&this._ctx.addChild(n),this.triggerEnterRuleEvent()}unrollRecursionContexts(t){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);const e=this._ctx,s=this.getParseListeners();if(null!==s&&s.length>0)for(;this._ctx!==t;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=t;e.parentCtx=t,this.buildParseTrees&&null!==t&&t.addChild(e)}getInvokingContext(t){let e=this._ctx;for(;null!==e;){if(e.ruleIndex===t)return e;e=e.parentCtx}return null}precpred(t,e){return e>=this._precedenceStack[this._precedenceStack.length-1]}inContext(t){return!1}isExpectedToken(t){const e=this._interp.atn;let s=this._ctx;const n=e.states[this.state];let r=e.nextTokens(n);if(r.contains(t))return!0;if(!r.contains(i.EPSILON))return!1;for(;null!==s&&s.invokingState>=0&&r.contains(i.EPSILON);){const n=e.states[s.invokingState].transitions[0];if(r=e.nextTokens(n.followState),r.contains(t))return!0;s=s.parentCtx}return!(!r.contains(i.EPSILON)||t!==i.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){const t=this._interp.atn,e=t.states[this.state];return t.nextTokens(e)}getRuleIndex(t){const e=this.getRuleIndexMap()[t];return null!==e?e:-1}getRuleInvocationStack(t){null===(t=t||null)&&(t=this._ctx);const e=[];for(;null!==t;){const s=t.ruleIndex;s<0?e.push("n/a"):e.push(this.ruleNames[s]),t=t.parentCtx}return e}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let t=!1;for(let e=0;e<this._interp.decisionToDFA.length;e++){const s=this._interp.decisionToDFA[e];s.states.length>0&&(t&&console.log(),this.printer.println("Decision "+s.decision+":"),this.printer.print(s.toString(this.literalNames,this.symbolicNames)),t=!0)}}getSourceName(){return this._input.getSourceName()}setTrace(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new Fe(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}De.bypassAltsAtnCache={};class Me extends b{constructor(t){super(),this.parentCtx=null,this.symbol=t}getChild(t){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(null===this.symbol)return E.INVALID_INTERVAL;const t=this.symbol.tokenIndex;return new E(t,t)}getChildCount(){return 0}accept(t){return t.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===i.EOF?"<EOF>":this.symbol.text}}class Ue extends Me{constructor(t){super(t)}isErrorNode(){return!0}accept(t){return t.visitErrorNode(this)}}class He extends U{constructor(t,e){super(t,e),this.children=null,this.start=null,this.stop=null,this.exception=null}copyFrom(t){this.parentCtx=t.parentCtx,this.invokingState=t.invokingState,this.children=null,this.start=t.start,this.stop=t.stop,t.children&&(this.children=[],t.children.map(function(t){t instanceof Ue&&(this.children.push(t),t.parentCtx=this)},this))}enterRule(t){}exitRule(t){}addChild(t){return null===this.children&&(this.children=[]),this.children.push(t),t}removeLastChild(){null!==this.children&&this.children.pop()}addTokenNode(t){const e=new Me(t);return this.addChild(e),e.parentCtx=this,e}addErrorNode(t){const e=new Ue(t);return this.addChild(e),e.parentCtx=this,e}getChild(t,e){if(e=e||null,null===this.children||t<0||t>=this.children.length)return null;if(null===e)return this.children[t];for(let s=0;s<this.children.length;s++){const n=this.children[s];if(n instanceof e){if(0===t)return n;t-=1}}return null}getToken(t,e){if(null===this.children||e<0||e>=this.children.length)return null;for(let s=0;s<this.children.length;s++){const n=this.children[s];if(n instanceof b&&n.symbol.type===t){if(0===e)return n;e-=1}}return null}getTokens(t){if(null===this.children)return[];{const e=[];for(let s=0;s<this.children.length;s++){const n=this.children[s];n instanceof b&&n.symbol.type===t&&e.push(n)}return e}}getTypedRuleContext(t,e){return this.getChild(e,t)}getTypedRuleContexts(t){if(null===this.children)return[];{const e=[];for(let s=0;s<this.children.length;s++){const n=this.children[s];n instanceof t&&e.push(n)}return e}}getChildCount(){return null===this.children?0:this.children.length}getSourceInterval(){return null===this.start||null===this.stop?E.INVALID_INTERVAL:new E(this.start.tokenIndex,this.stop.tokenIndex)}}U.EMPTY=new He;class Be{static DEFAULT_PROGRAM_NAME="default";constructor(t){this.tokens=t,this.programs=new Map}getTokenStream(){return this.tokens}insertAfter(t,e){let s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Be.DEFAULT_PROGRAM_NAME;s="number"==typeof t?t:t.tokenIndex;let i=this.getProgram(n),r=new Ye(this.tokens,s,i.length,e);i.push(r)}insertBefore(t,e){let s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Be.DEFAULT_PROGRAM_NAME;s="number"==typeof t?t:t.tokenIndex;const i=this.getProgram(n),r=new ze(this.tokens,s,i.length,e);i.push(r)}replaceSingle(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Be.DEFAULT_PROGRAM_NAME;this.replace(t,t,e,s)}replace(t,e,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Be.DEFAULT_PROGRAM_NAME;if("number"!=typeof t&&(t=t.tokenIndex),"number"!=typeof e&&(e=e.tokenIndex),t>e||t<0||e<0||e>=this.tokens.size)throw new RangeError(`replace: range invalid: ${t}..${e}(size=${this.tokens.size})`);let i=this.getProgram(n),r=new qe(this.tokens,t,e,i.length,s);i.push(r)}delete(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Be.DEFAULT_PROGRAM_NAME;void 0===e&&(e=t),this.replace(t,e,null,s)}getProgram(t){let e=this.programs.get(t);return null==e&&(e=this.initializeProgram(t)),e}initializeProgram(t){const e=[];return this.programs.set(t,e),e}getText(t){let e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Be.DEFAULT_PROGRAM_NAME;e=t instanceof E?t:new E(0,this.tokens.size-1),"string"==typeof t&&(s=t);const n=this.programs.get(s);let r=e.start,o=e.stop;if(o>this.tokens.size-1&&(o=this.tokens.size-1),r<0&&(r=0),null==n||0===n.length)return this.tokens.getText(new E(r,o));let a=[],l=this.reduceToSingleOperationPerIndex(n),h=r;for(;h<=o&&h<this.tokens.size;){let t=l.get(h);l.delete(h);let e=this.tokens.get(h);null==t?(e.type!==i.EOF&&a.push(String(e.text)),h++):h=t.execute(a)}if(o===this.tokens.size-1)for(const t of l.values())t.index>=this.tokens.size-1&&a.push(t.text.toString());return a.join("")}reduceToSingleOperationPerIndex(t){for(let e=0;e<t.length;e++){let s=t[e];if(null==s)continue;if(!(s instanceof qe))continue;let n=s,i=this.getKindOfOps(t,ze,e);for(let e of i)e.index===n.index?(t[e.instructionIndex]=void 0,n.text=e.text.toString()+(null!=n.text?n.text.toString():"")):e.index>n.index&&e.index<=n.lastIndex&&(t[e.instructionIndex]=void 0);let r=this.getKindOfOps(t,qe,e);for(let e of r){if(e.index>=n.index&&e.lastIndex<=n.lastIndex){t[e.instructionIndex]=void 0;continue}let s=e.lastIndex<n.index||e.index>n.lastIndex;if(null!=e.text||null!=n.text||s){if(!s)throw new Error(`replace op boundaries of ${n} overlap with previous ${e}`)}else t[e.instructionIndex]=void 0,n.index=Math.min(e.index,n.index),n.lastIndex=Math.max(e.lastIndex,n.lastIndex)}}for(let e=0;e<t.length;e++){let s=t[e];if(null==s)continue;if(!(s instanceof ze))continue;let n=s,i=this.getKindOfOps(t,ze,e);for(let e of i)e.index===n.index&&(e instanceof Ye?(n.text=this.catOpText(e.text,n.text),t[e.instructionIndex]=void 0):e instanceof ze&&(n.text=this.catOpText(n.text,e.text),t[e.instructionIndex]=void 0));let r=this.getKindOfOps(t,qe,e);for(let s of r)if(n.index!==s.index){if(n.index>=s.index&&n.index<=s.lastIndex)throw new Error(`insert op ${n} within boundaries of previous ${s}`)}else s.text=this.catOpText(n.text,s.text),t[e]=void 0}let e=new Map;for(let s of t)if(null!=s){if(null!=e.get(s.index))throw new Error("should only be one op per index");e.set(s.index,s)}return e}catOpText(t,e){let s="",n="";return null!=t&&(s=t.toString()),null!=e&&(n=e.toString()),s+n}getKindOfOps(t,e,s){return t.slice(0,s).filter(t=>t&&t instanceof e)}}class Ve{constructor(t,e,s,n){this.tokens=t,this.instructionIndex=s,this.index=e,this.text=void 0===n?"":n}toString(){let t=this.constructor.name;const e=t.indexOf("$");return t=t.substring(e+1,t.length),"<"+t+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}class ze extends Ve{constructor(t,e,s,n){super(t,e,s,n)}execute(t){return this.text&&t.push(this.text.toString()),this.tokens.get(this.index).type!==i.EOF&&t.push(String(this.tokens.get(this.index).text)),this.index+1}}class Ye extends ze{constructor(t,e,s,n){super(t,e+1,s,n)}}class qe extends Ve{constructor(t,e,s,n,i){super(t,e,n,i),this.lastIndex=s}execute(t){return this.text&&t.push(this.text.toString()),this.lastIndex+1}toString(){return null==this.text?"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">":"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}}const Ke={atn:re,dfa:he,context:ce,misc:ue,tree:fe,error:Ne,Token:i,CommonToken:Pt,CharStreams:we,CharStream:ye,InputStream:Le,CommonTokenStream:be,Lexer:Ut,Parser:De,ParserRuleContext:He,Interval:E,IntervalSet:S,LL1Analyzer:$,Utils:Re,TokenStreamRewriter:Be};var We=n.jB,Ge=n.pG,$e=n.zW,je=n.Ay;const Xe=(new je.atn.ATNDeserializer).deserialize([4,0,34,165,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,1,0,1,0,1,1,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17,1,17,1,18,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,30,4,30,142,8,30,11,30,12,30,143,1,30,1,30,1,31,1,31,1,31,1,31,5,31,152,8,31,10,31,12,31,155,9,31,1,31,1,31,1,32,1,32,1,33,4,33,162,8,33,11,33,12,33,163,0,0,34,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,1,0,3,2,0,9,9,32,32,2,0,10,10,13,13,7,0,9,10,13,13,32,32,40,41,44,44,91,91,93,93,167,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,1,69,1,0,0,0,3,71,1,0,0,0,5,74,1,0,0,0,7,76,1,0,0,0,9,78,1,0,0,0,11,81,1,0,0,0,13,83,1,0,0,0,15,85,1,0,0,0,17,87,1,0,0,0,19,89,1,0,0,0,21,91,1,0,0,0,23,93,1,0,0,0,25,95,1,0,0,0,27,97,1,0,0,0,29,99,1,0,0,0,31,102,1,0,0,0,33,104,1,0,0,0,35,106,1,0,0,0,37,109,1,0,0,0,39,112,1,0,0,0,41,114,1,0,0,0,43,116,1,0,0,0,45,119,1,0,0,0,47,122,1,0,0,0,49,125,1,0,0,0,51,128,1,0,0,0,53,130,1,0,0,0,55,132,1,0,0,0,57,135,1,0,0,0,59,138,1,0,0,0,61,141,1,0,0,0,63,147,1,0,0,0,65,158,1,0,0,0,67,161,1,0,0,0,69,70,5,44,0,0,70,2,1,0,0,0,71,72,5,45,0,0,72,73,5,62,0,0,73,4,1,0,0,0,74,75,5,40,0,0,75,6,1,0,0,0,76,77,5,41,0,0,77,8,1,0,0,0,78,79,5,58,0,0,79,80,5,58,0,0,80,10,1,0,0,0,81,82,5,46,0,0,82,12,1,0,0,0,83,84,5,91,0,0,84,14,1,0,0,0,85,86,5,93,0,0,86,16,1,0,0,0,87,88,5,126,0,0,88,18,1,0,0,0,89,90,5,33,0,0,90,20,1,0,0,0,91,92,5,45,0,0,92,22,1,0,0,0,93,94,5,43,0,0,94,24,1,0,0,0,95,96,5,38,0,0,96,26,1,0,0,0,97,98,5,42,0,0,98,28,1,0,0,0,99,100,5,46,0,0,100,101,5,42,0,0,101,30,1,0,0,0,102,103,5,47,0,0,103,32,1,0,0,0,104,105,5,37,0,0,105,34,1,0,0,0,106,107,5,60,0,0,107,108,5,60,0,0,108,36,1,0,0,0,109,110,5,62,0,0,110,111,5,62,0,0,111,38,1,0,0,0,112,113,5,60,0,0,113,40,1,0,0,0,114,115,5,62,0,0,115,42,1,0,0,0,116,117,5,60,0,0,117,118,5,61,0,0,118,44,1,0,0,0,119,120,5,62,0,0,120,121,5,61,0,0,121,46,1,0,0,0,122,123,5,61,0,0,123,124,5,61,0,0,124,48,1,0,0,0,125,126,5,33,0,0,126,127,5,61,0,0,127,50,1,0,0,0,128,129,5,94,0,0,129,52,1,0,0,0,130,131,5,124,0,0,131,54,1,0,0,0,132,133,5,38,0,0,133,134,5,38,0,0,134,56,1,0,0,0,135,136,5,124,0,0,136,137,5,124,0,0,137,58,1,0,0,0,138,139,5,61,0,0,139,60,1,0,0,0,140,142,7,0,0,0,141,140,1,0,0,0,142,143,1,0,0,0,143,141,1,0,0,0,143,144,1,0,0,0,144,145,1,0,0,0,145,146,6,30,0,0,146,62,1,0,0,0,147,148,5,47,0,0,148,149,5,47,0,0,149,153,1,0,0,0,150,152,8,1,0,0,151,150,1,0,0,0,152,155,1,0,0,0,153,151,1,0,0,0,153,154,1,0,0,0,154,156,1,0,0,0,155,153,1,0,0,0,156,157,6,31,0,0,157,64,1,0,0,0,158,159,7,1,0,0,159,66,1,0,0,0,160,162,8,2,0,0,161,160,1,0,0,0,162,163,1,0,0,0,163,161,1,0,0,0,163,164,1,0,0,0,164,68,1,0,0,0,4,0,143,153,163,1,6,0,0]),Je=Xe.decisionToState.map((t,e)=>new je.dfa.DFA(t,e));class Qe extends je.Lexer{static grammarFileName="Dsp.g4";static channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];static modeNames=["DEFAULT_MODE"];static literalNames=[null,"','","'->'","'('","')'","'::'","'.'","'['","']'","'~'","'!'","'-'","'+'","'&'","'*'","'.*'","'/'","'%'","'<<'","'>>'","'<'","'>'","'<='","'>='","'=='","'!='","'^'","'|'","'&&'","'||'","'='"];static symbolicNames=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"WHITESPACE","COMMENT","NEWLINE","SYMBOL"];static ruleNames=["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","T__29","WHITESPACE","COMMENT","NEWLINE","SYMBOL"];constructor(t){super(t),this._interp=new je.atn.LexerATNSimulator(this,Xe,Je,new je.atn.PredictionContextCache)}}Qe.EOF=je.Token.EOF,Qe.T__0=1,Qe.T__1=2,Qe.T__2=3,Qe.T__3=4,Qe.T__4=5,Qe.T__5=6,Qe.T__6=7,Qe.T__7=8,Qe.T__8=9,Qe.T__9=10,Qe.T__10=11,Qe.T__11=12,Qe.T__12=13,Qe.T__13=14,Qe.T__14=15,Qe.T__15=16,Qe.T__16=17,Qe.T__17=18,Qe.T__18=19,Qe.T__19=20,Qe.T__20=21,Qe.T__21=22,Qe.T__22=23,Qe.T__23=24,Qe.T__24=25,Qe.T__25=26,Qe.T__26=27,Qe.T__27=28,Qe.T__28=29,Qe.T__29=30,Qe.WHITESPACE=31,Qe.COMMENT=32,Qe.NEWLINE=33,Qe.SYMBOL=34;class Ze extends je.tree.ParseTreeVisitor{visitRule_pool(t){return this.visitChildren(t)}visitRule(t){return this.visitChildren(t)}visitSymbol(t){return this.visitChildren(t)}visitParentheses(t){return this.visitChildren(t)}visitSubscript(t){return this.visitChildren(t)}visitBinary(t){return this.visitChildren(t)}visitFunction(t){return this.visitChildren(t)}visitUnary(t){return this.visitChildren(t)}}const ts=(new je.atn.ATNDeserializer).deserialize([4,1,34,132,2,0,7,0,2,1,7,1,2,2,7,2,1,0,5,0,8,8,0,10,0,12,0,11,9,0,1,0,1,0,4,0,15,8,0,11,0,12,0,16,1,0,5,0,20,8,0,10,0,12,0,23,9,0,3,0,25,8,0,1,0,5,0,28,8,0,10,0,12,0,31,9,0,1,0,1,0,1,1,1,1,1,1,1,1,5,1,39,8,1,10,1,12,1,42,9,1,3,1,44,8,1,1,1,1,1,3,1,48,8,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,58,8,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,5,2,107,8,2,10,2,12,2,110,9,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,5,2,119,8,2,10,2,12,2,122,9,2,3,2,124,8,2,1,2,5,2,127,8,2,10,2,12,2,130,9,2,1,2,0,1,4,3,0,2,4,0,6,1,0,9,14,2,0,14,14,16,17,1,0,11,12,1,0,18,19,1,0,20,23,1,0,24,25,157,0,9,1,0,0,0,2,47,1,0,0,0,4,57,1,0,0,0,6,8,5,33,0,0,7,6,1,0,0,0,8,11,1,0,0,0,9,7,1,0,0,0,9,10,1,0,0,0,10,24,1,0,0,0,11,9,1,0,0,0,12,21,3,2,1,0,13,15,5,33,0,0,14,13,1,0,0,0,15,16,1,0,0,0,16,14,1,0,0,0,16,17,1,0,0,0,17,18,1,0,0,0,18,20,3,2,1,0,19,14,1,0,0,0,20,23,1,0,0,0,21,19,1,0,0,0,21,22,1,0,0,0,22,25,1,0,0,0,23,21,1,0,0,0,24,12,1,0,0,0,24,25,1,0,0,0,25,29,1,0,0,0,26,28,5,33,0,0,27,26,1,0,0,0,28,31,1,0,0,0,29,27,1,0,0,0,29,30,1,0,0,0,30,32,1,0,0,0,31,29,1,0,0,0,32,33,5,0,0,1,33,1,1,0,0,0,34,48,3,4,2,0,35,40,3,4,2,0,36,37,5,1,0,0,37,39,3,4,2,0,38,36,1,0,0,0,39,42,1,0,0,0,40,38,1,0,0,0,40,41,1,0,0,0,41,44,1,0,0,0,42,40,1,0,0,0,43,35,1,0,0,0,43,44,1,0,0,0,44,45,1,0,0,0,45,46,5,2,0,0,46,48,3,4,2,0,47,34,1,0,0,0,47,43,1,0,0,0,48,3,1,0,0,0,49,50,6,2,-1,0,50,58,5,34,0,0,51,52,5,3,0,0,52,53,3,4,2,0,53,54,5,4,0,0,54,58,1,0,0,0,55,56,7,0,0,0,56,58,3,4,2,13,57,49,1,0,0,0,57,51,1,0,0,0,57,55,1,0,0,0,58,128,1,0,0,0,59,60,10,17,0,0,60,61,5,5,0,0,61,127,3,4,2,18,62,63,10,16,0,0,63,64,5,6,0,0,64,127,3,4,2,17,65,66,10,12,0,0,66,67,5,15,0,0,67,127,3,4,2,13,68,69,10,11,0,0,69,70,7,1,0,0,70,127,3,4,2,12,71,72,10,10,0,0,72,73,7,2,0,0,73,127,3,4,2,11,74,75,10,9,0,0,75,76,7,3,0,0,76,127,3,4,2,10,77,78,10,8,0,0,78,79,7,4,0,0,79,127,3,4,2,9,80,81,10,7,0,0,81,82,7,5,0,0,82,127,3,4,2,8,83,84,10,6,0,0,84,85,5,13,0,0,85,127,3,4,2,7,86,87,10,5,0,0,87,88,5,26,0,0,88,127,3,4,2,6,89,90,10,4,0,0,90,91,5,27,0,0,91,127,3,4,2,5,92,93,10,3,0,0,93,94,5,28,0,0,94,127,3,4,2,4,95,96,10,2,0,0,96,97,5,29,0,0,97,127,3,4,2,3,98,99,10,1,0,0,99,100,5,30,0,0,100,127,3,4,2,2,101,102,10,15,0,0,102,103,5,7,0,0,103,108,3,4,2,0,104,105,5,1,0,0,105,107,3,4,2,0,106,104,1,0,0,0,107,110,1,0,0,0,108,106,1,0,0,0,108,109,1,0,0,0,109,111,1,0,0,0,110,108,1,0,0,0,111,112,5,8,0,0,112,127,1,0,0,0,113,114,10,14,0,0,114,123,5,3,0,0,115,120,3,4,2,0,116,117,5,1,0,0,117,119,3,4,2,0,118,116,1,0,0,0,119,122,1,0,0,0,120,118,1,0,0,0,120,121,1,0,0,0,121,124,1,0,0,0,122,120,1,0,0,0,123,115,1,0,0,0,123,124,1,0,0,0,124,125,1,0,0,0,125,127,5,4,0,0,126,59,1,0,0,0,126,62,1,0,0,0,126,65,1,0,0,0,126,68,1,0,0,0,126,71,1,0,0,0,126,74,1,0,0,0,126,77,1,0,0,0,126,80,1,0,0,0,126,83,1,0,0,0,126,86,1,0,0,0,126,89,1,0,0,0,126,92,1,0,0,0,126,95,1,0,0,0,126,98,1,0,0,0,126,101,1,0,0,0,126,113,1,0,0,0,127,130,1,0,0,0,128,126,1,0,0,0,128,129,1,0,0,0,129,5,1,0,0,0,130,128,1,0,0,0,14,9,16,21,24,29,40,43,47,57,108,120,123,126,128]),es=ts.decisionToState.map((t,e)=>new je.dfa.DFA(t,e)),ss=new je.atn.PredictionContextCache;class ns extends je.Parser{static grammarFileName="Dsp.g4";static literalNames=[null,"','","'->'","'('","')'","'::'","'.'","'['","']'","'~'","'!'","'-'","'+'","'&'","'*'","'.*'","'/'","'%'","'<<'","'>>'","'<'","'>'","'<='","'>='","'=='","'!='","'^'","'|'","'&&'","'||'","'='"];static symbolicNames=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"WHITESPACE","COMMENT","NEWLINE","SYMBOL"];static ruleNames=["rule_pool","rule","term"];constructor(t){super(t),this._interp=new je.atn.ParserATNSimulator(this,ts,es,ss),this.ruleNames=ns.ruleNames,this.literalNames=ns.literalNames,this.symbolicNames=ns.symbolicNames}sempred(t,e,s){if(2===e)return this.term_sempred(t,s);throw"No predicate with index:"+e}term_sempred(t,e){switch(e){case 0:return this.precpred(this._ctx,17);case 1:return this.precpred(this._ctx,16);case 2:return this.precpred(this._ctx,12);case 3:return this.precpred(this._ctx,11);case 4:return this.precpred(this._ctx,10);case 5:return this.precpred(this._ctx,9);case 6:return this.precpred(this._ctx,8);case 7:return this.precpred(this._ctx,7);case 8:return this.precpred(this._ctx,6);case 9:return this.precpred(this._ctx,5);case 10:return this.precpred(this._ctx,4);case 11:return this.precpred(this._ctx,3);case 12:return this.precpred(this._ctx,2);case 13:return this.precpred(this._ctx,1);case 14:return this.precpred(this._ctx,15);case 15:return this.precpred(this._ctx,14);default:throw"No predicate with index:"+e}}rule_pool(){let t=new is(this,this._ctx,this.state);this.enterRule(t,0,ns.RULE_rule_pool);var e=0;try{this.enterOuterAlt(t,1),this.state=9,this._errHandler.sync(this);for(var s=this._interp.adaptivePredict(this._input,0,this._ctx);2!=s&&s!=je.atn.ATN.INVALID_ALT_NUMBER;)1===s&&(this.state=6,this.match(ns.NEWLINE)),this.state=11,this._errHandler.sync(this),s=this._interp.adaptivePredict(this._input,0,this._ctx);if(this.state=24,this._errHandler.sync(this),!(-32&(e=this._input.LA(1)))&&1<<e&32268||34===e){this.state=12,this.rule_(),this.state=21,this._errHandler.sync(this);for(s=this._interp.adaptivePredict(this._input,2,this._ctx);2!=s&&s!=je.atn.ATN.INVALID_ALT_NUMBER;){if(1===s){this.state=14,this._errHandler.sync(this),e=this._input.LA(1);do{this.state=13,this.match(ns.NEWLINE),this.state=16,this._errHandler.sync(this),e=this._input.LA(1)}while(33===e);this.state=18,this.rule_()}this.state=23,this._errHandler.sync(this),s=this._interp.adaptivePredict(this._input,2,this._ctx)}}for(this.state=29,this._errHandler.sync(this),e=this._input.LA(1);33===e;)this.state=26,this.match(ns.NEWLINE),this.state=31,this._errHandler.sync(this),e=this._input.LA(1);this.state=32,this.match(ns.EOF)}catch(e){if(!(e instanceof je.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}rule_(){let t=new rs(this,this._ctx,this.state);this.enterRule(t,2,ns.RULE_rule);var e=0;try{switch(this.state=47,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,7,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=34,this.term(0);break;case 2:if(this.enterOuterAlt(t,2),this.state=43,this._errHandler.sync(this),!((e=this._input.LA(1))-3&-32)&&1<<e-3&2147487681)for(this.state=35,this.term(0),this.state=40,this._errHandler.sync(this),e=this._input.LA(1);1===e;)this.state=36,this.match(ns.T__0),this.state=37,this.term(0),this.state=42,this._errHandler.sync(this),e=this._input.LA(1);this.state=45,this.match(ns.T__1),this.state=46,this.term(0)}}catch(e){if(!(e instanceof je.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}term(t){void 0===t&&(t=0);const e=this._ctx,s=this.state;let n=new os(this,this._ctx,s),i=n;this.enterRecursionRule(n,4,ns.RULE_term,t);var r=0;try{switch(this.enterOuterAlt(n,1),this.state=57,this._errHandler.sync(this),this._input.LA(1)){case 34:n=new as(this,n),this._ctx=n,i=n,this.state=50,this.match(ns.SYMBOL);break;case 3:n=new ls(this,n),this._ctx=n,i=n,this.state=51,this.match(ns.T__2),this.state=52,this.term(0),this.state=53,this.match(ns.T__3);break;case 9:case 10:case 11:case 12:case 13:case 14:n=new ds(this,n),this._ctx=n,i=n,this.state=55,-32&(r=this._input.LA(1))||!(1<<r&32256)?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=56,this.term(13);break;default:throw new je.error.NoViableAltException(this)}this._ctx.stop=this._input.LT(-1),this.state=128,this._errHandler.sync(this);for(var o=this._interp.adaptivePredict(this._input,13,this._ctx);2!=o&&o!=je.atn.ATN.INVALID_ALT_NUMBER;){if(1===o)switch(null!==this._parseListeners&&this.triggerExitRuleEvent(),i=n,this.state=126,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,12,this._ctx)){case 1:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=59,!this.precpred(this._ctx,17))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 17)");this.state=60,this.match(ns.T__4),this.state=61,this.term(18);break;case 2:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=62,!this.precpred(this._ctx,16))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 16)");this.state=63,this.match(ns.T__5),this.state=64,this.term(17);break;case 3:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=65,!this.precpred(this._ctx,12))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 12)");this.state=66,this.match(ns.T__14),this.state=67,this.term(13);break;case 4:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=68,!this.precpred(this._ctx,11))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 11)");this.state=69,-32&(r=this._input.LA(1))||!(1<<r&212992)?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=70,this.term(12);break;case 5:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=71,!this.precpred(this._ctx,10))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 10)");this.state=72,11!==(r=this._input.LA(1))&&12!==r?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=73,this.term(11);break;case 6:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=74,!this.precpred(this._ctx,9))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 9)");this.state=75,18!==(r=this._input.LA(1))&&19!==r?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=76,this.term(10);break;case 7:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=77,!this.precpred(this._ctx,8))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 8)");this.state=78,-32&(r=this._input.LA(1))||!(1<<r&15728640)?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=79,this.term(9);break;case 8:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=80,!this.precpred(this._ctx,7))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 7)");this.state=81,24!==(r=this._input.LA(1))&&25!==r?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=82,this.term(8);break;case 9:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=83,!this.precpred(this._ctx,6))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 6)");this.state=84,this.match(ns.T__12),this.state=85,this.term(7);break;case 10:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=86,!this.precpred(this._ctx,5))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 5)");this.state=87,this.match(ns.T__25),this.state=88,this.term(6);break;case 11:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=89,!this.precpred(this._ctx,4))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 4)");this.state=90,this.match(ns.T__26),this.state=91,this.term(5);break;case 12:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=92,!this.precpred(this._ctx,3))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 3)");this.state=93,this.match(ns.T__27),this.state=94,this.term(4);break;case 13:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=95,!this.precpred(this._ctx,2))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 2)");this.state=96,this.match(ns.T__28),this.state=97,this.term(3);break;case 14:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=98,!this.precpred(this._ctx,1))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 1)");this.state=99,this.match(ns.T__29),this.state=100,this.term(2);break;case 15:if(n=new hs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=101,!this.precpred(this._ctx,15))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 15)");for(this.state=102,this.match(ns.T__6),this.state=103,this.term(0),this.state=108,this._errHandler.sync(this),r=this._input.LA(1);1===r;)this.state=104,this.match(ns.T__0),this.state=105,this.term(0),this.state=110,this._errHandler.sync(this),r=this._input.LA(1);this.state=111,this.match(ns.T__7);break;case 16:if(n=new us(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=113,!this.precpred(this._ctx,14))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 14)");if(this.state=114,this.match(ns.T__2),this.state=123,this._errHandler.sync(this),!((r=this._input.LA(1))-3&-32)&&1<<r-3&2147487681)for(this.state=115,this.term(0),this.state=120,this._errHandler.sync(this),r=this._input.LA(1);1===r;)this.state=116,this.match(ns.T__0),this.state=117,this.term(0),this.state=122,this._errHandler.sync(this),r=this._input.LA(1);this.state=125,this.match(ns.T__3)}this.state=130,this._errHandler.sync(this),o=this._interp.adaptivePredict(this._input,13,this._ctx)}}catch(t){if(!(t instanceof je.error.RecognitionException))throw t;n.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.unrollRecursionContexts(e)}return n}}ns.EOF=je.Token.EOF,ns.T__0=1,ns.T__1=2,ns.T__2=3,ns.T__3=4,ns.T__4=5,ns.T__5=6,ns.T__6=7,ns.T__7=8,ns.T__8=9,ns.T__9=10,ns.T__10=11,ns.T__11=12,ns.T__12=13,ns.T__13=14,ns.T__14=15,ns.T__15=16,ns.T__16=17,ns.T__17=18,ns.T__18=19,ns.T__19=20,ns.T__20=21,ns.T__21=22,ns.T__22=23,ns.T__23=24,ns.T__24=25,ns.T__25=26,ns.T__26=27,ns.T__27=28,ns.T__28=29,ns.T__29=30,ns.WHITESPACE=31,ns.COMMENT=32,ns.NEWLINE=33,ns.SYMBOL=34,ns.RULE_rule_pool=0,ns.RULE_rule=1,ns.RULE_term=2;let is=class extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=ns.RULE_rule_pool}EOF(){return this.getToken(ns.EOF,0)}NEWLINE=function(t){return void 0===t&&(t=null),null===t?this.getTokens(ns.NEWLINE):this.getToken(ns.NEWLINE,t)};rule_=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(rs):this.getTypedRuleContext(rs,t)};accept(t){return t instanceof Ze?t.visitRule_pool(this):t.visitChildren(this)}},rs=class extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=ns.RULE_rule}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(os):this.getTypedRuleContext(os,t)};accept(t){return t instanceof Ze?t.visitRule(this):t.visitChildren(this)}},os=class extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=ns.RULE_term}copyFrom(t){super.copyFrom(t)}},as=class extends os{constructor(t,e){super(t),super.copyFrom(e)}SYMBOL(){return this.getToken(ns.SYMBOL,0)}accept(t){return t instanceof Ze?t.visitSymbol(this):t.visitChildren(this)}};ns.SymbolContext=as;class ls extends os{constructor(t,e){super(t),super.copyFrom(e)}term(){return this.getTypedRuleContext(os,0)}accept(t){return t instanceof Ze?t.visitParentheses(this):t.visitChildren(this)}}ns.ParenthesesContext=ls;let hs=class extends os{constructor(t,e){super(t),super.copyFrom(e)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(os):this.getTypedRuleContext(os,t)};accept(t){return t instanceof Ze?t.visitSubscript(this):t.visitChildren(this)}};ns.SubscriptContext=hs;let cs=class extends os{constructor(t,e){super(t),super.copyFrom(e)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(os):this.getTypedRuleContext(os,t)};accept(t){return t instanceof Ze?t.visitBinary(this):t.visitChildren(this)}};ns.BinaryContext=cs;let us=class extends os{constructor(t,e){super(t),super.copyFrom(e)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(os):this.getTypedRuleContext(os,t)};accept(t){return t instanceof Ze?t.visitFunction(this):t.visitChildren(this)}};ns.FunctionContext=us;let ds=class extends os{constructor(t,e){super(t),super.copyFrom(e)}term(){return this.getTypedRuleContext(os,0)}accept(t){return t instanceof Ze?t.visitUnary(this):t.visitChildren(this)}};ns.UnaryContext=ds,ns.Rule_poolContext=is,ns.RuleContext=rs,ns.TermContext=os;const ps=(new je.atn.ATNDeserializer).deserialize([4,0,10,93,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,5,5,64,8,5,10,5,12,5,67,9,5,1,6,4,6,70,8,6,11,6,12,6,71,1,6,1,6,1,7,1,7,1,7,1,7,5,7,80,8,7,10,7,12,7,83,9,7,1,7,1,7,1,8,1,8,1,9,4,9,90,8,9,11,9,12,9,91,0,0,10,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,1,0,3,2,0,9,9,32,32,2,0,10,10,13,13,7,0,9,10,13,13,32,32,40,41,44,44,91,91,93,93,96,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,1,21,1,0,0,0,3,32,1,0,0,0,5,34,1,0,0,0,7,44,1,0,0,0,9,51,1,0,0,0,11,59,1,0,0,0,13,69,1,0,0,0,15,75,1,0,0,0,17,86,1,0,0,0,19,89,1,0,0,0,21,22,5,40,0,0,22,23,5,115,0,0,23,24,5,117,0,0,24,25,5,98,0,0,25,26,5,115,0,0,26,27,5,99,0,0,27,28,5,114,0,0,28,29,5,105,0,0,29,30,5,112,0,0,30,31,5,116,0,0,31,2,1,0,0,0,32,33,5,41,0,0,33,4,1,0,0,0,34,35,5,40,0,0,35,36,5,102,0,0,36,37,5,117,0,0,37,38,5,110,0,0,38,39,5,99,0,0,39,40,5,116,0,0,40,41,5,105,0,0,41,42,5,111,0,0,42,43,5,110,0,0,43,6,1,0,0,0,44,45,5,40,0,0,45,46,5,117,0,0,46,47,5,110,0,0,47,48,5,97,0,0,48,49,5,114,0,0,49,50,5,121,0,0,50,8,1,0,0,0,51,52,5,40,0,0,52,53,5,98,0,0,53,54,5,105,0,0,54,55,5,110,0,0,55,56,5,97,0,0,56,57,5,114,0,0,57,58,5,121,0,0,58,10,1,0,0,0,59,60,5,45,0,0,60,61,5,45,0,0,61,65,1,0,0,0,62,64,5,45,0,0,63,62,1,0,0,0,64,67,1,0,0,0,65,63,1,0,0,0,65,66,1,0,0,0,66,12,1,0,0,0,67,65,1,0,0,0,68,70,7,0,0,0,69,68,1,0,0,0,70,71,1,0,0,0,71,69,1,0,0,0,71,72,1,0,0,0,72,73,1,0,0,0,73,74,6,6,0,0,74,14,1,0,0,0,75,76,5,47,0,0,76,77,5,47,0,0,77,81,1,0,0,0,78,80,8,1,0,0,79,78,1,0,0,0,80,83,1,0,0,0,81,79,1,0,0,0,81,82,1,0,0,0,82,84,1,0,0,0,83,81,1,0,0,0,84,85,6,7,0,0,85,16,1,0,0,0,86,87,7,1,0,0,87,18,1,0,0,0,88,90,8,2,0,0,89,88,1,0,0,0,90,91,1,0,0,0,91,89,1,0,0,0,91,92,1,0,0,0,92,20,1,0,0,0,5,0,65,71,81,91,1,6,0,0]),gs=ps.decisionToState.map((t,e)=>new je.dfa.DFA(t,e));class fs extends je.Lexer{static grammarFileName="Ds.g4";static channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];static modeNames=["DEFAULT_MODE"];static literalNames=[null,"'(subscript'","')'","'(function'","'(unary'","'(binary'"];static symbolicNames=[null,null,null,null,null,null,"RULE","WHITESPACE","COMMENT","NEWLINE","SYMBOL"];static ruleNames=["T__0","T__1","T__2","T__3","T__4","RULE","WHITESPACE","COMMENT","NEWLINE","SYMBOL"];constructor(t){super(t),this._interp=new je.atn.LexerATNSimulator(this,ps,gs,new je.atn.PredictionContextCache)}}fs.EOF=je.Token.EOF,fs.T__0=1,fs.T__1=2,fs.T__2=3,fs.T__3=4,fs.T__4=5,fs.RULE=6,fs.WHITESPACE=7,fs.COMMENT=8,fs.NEWLINE=9,fs.SYMBOL=10;class xs extends je.tree.ParseTreeVisitor{visitRule_pool(t){return this.visitChildren(t)}visitRule(t){return this.visitChildren(t)}visitSymbol(t){return this.visitChildren(t)}visitSubscript(t){return this.visitChildren(t)}visitFunction(t){return this.visitChildren(t)}visitUnary(t){return this.visitChildren(t)}visitBinary(t){return this.visitChildren(t)}}const _s=(new je.atn.ATNDeserializer).deserialize([4,1,10,80,2,0,7,0,2,1,7,1,2,2,7,2,1,0,5,0,8,8,0,10,0,12,0,11,9,0,1,0,1,0,4,0,15,8,0,11,0,12,0,16,1,0,5,0,20,8,0,10,0,12,0,23,9,0,3,0,25,8,0,1,0,5,0,28,8,0,10,0,12,0,31,9,0,1,0,1,0,1,1,1,1,4,1,37,8,1,11,1,12,1,38,5,1,41,8,1,10,1,12,1,44,9,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,5,2,53,8,2,10,2,12,2,56,9,2,1,2,1,2,1,2,5,2,61,8,2,10,2,12,2,64,9,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,78,8,2,1,2,0,0,3,0,2,4,0,0,89,0,9,1,0,0,0,2,42,1,0,0,0,4,77,1,0,0,0,6,8,5,9,0,0,7,6,1,0,0,0,8,11,1,0,0,0,9,7,1,0,0,0,9,10,1,0,0,0,10,24,1,0,0,0,11,9,1,0,0,0,12,21,3,2,1,0,13,15,5,9,0,0,14,13,1,0,0,0,15,16,1,0,0,0,16,14,1,0,0,0,16,17,1,0,0,0,17,18,1,0,0,0,18,20,3,2,1,0,19,14,1,0,0,0,20,23,1,0,0,0,21,19,1,0,0,0,21,22,1,0,0,0,22,25,1,0,0,0,23,21,1,0,0,0,24,12,1,0,0,0,24,25,1,0,0,0,25,29,1,0,0,0,26,28,5,9,0,0,27,26,1,0,0,0,28,31,1,0,0,0,29,27,1,0,0,0,29,30,1,0,0,0,30,32,1,0,0,0,31,29,1,0,0,0,32,33,5,0,0,1,33,1,1,0,0,0,34,36,3,4,2,0,35,37,5,9,0,0,36,35,1,0,0,0,37,38,1,0,0,0,38,36,1,0,0,0,38,39,1,0,0,0,39,41,1,0,0,0,40,34,1,0,0,0,41,44,1,0,0,0,42,40,1,0,0,0,42,43,1,0,0,0,43,45,1,0,0,0,44,42,1,0,0,0,45,46,5,6,0,0,46,47,5,9,0,0,47,48,3,4,2,0,48,3,1,0,0,0,49,78,5,10,0,0,50,54,5,1,0,0,51,53,3,4,2,0,52,51,1,0,0,0,53,56,1,0,0,0,54,52,1,0,0,0,54,55,1,0,0,0,55,57,1,0,0,0,56,54,1,0,0,0,57,78,5,2,0,0,58,62,5,3,0,0,59,61,3,4,2,0,60,59,1,0,0,0,61,64,1,0,0,0,62,60,1,0,0,0,62,63,1,0,0,0,63,65,1,0,0,0,64,62,1,0,0,0,65,78,5,2,0,0,66,67,5,4,0,0,67,68,5,10,0,0,68,69,3,4,2,0,69,70,5,2,0,0,70,78,1,0,0,0,71,72,5,5,0,0,72,73,5,10,0,0,73,74,3,4,2,0,74,75,3,4,2,0,75,76,5,2,0,0,76,78,1,0,0,0,77,49,1,0,0,0,77,50,1,0,0,0,77,58,1,0,0,0,77,66,1,0,0,0,77,71,1,0,0,0,78,5,1,0,0,0,10,9,16,21,24,29,38,42,54,62,77]),Ts=_s.decisionToState.map((t,e)=>new je.dfa.DFA(t,e)),ms=new je.atn.PredictionContextCache;class Es extends je.Parser{static grammarFileName="Ds.g4";static literalNames=[null,"'(subscript'","')'","'(function'","'(unary'","'(binary'"];static symbolicNames=[null,null,null,null,null,null,"RULE","WHITESPACE","COMMENT","NEWLINE","SYMBOL"];static ruleNames=["rule_pool","rule","term"];constructor(t){super(t),this._interp=new je.atn.ParserATNSimulator(this,_s,Ts,ms),this.ruleNames=Es.ruleNames,this.literalNames=Es.literalNames,this.symbolicNames=Es.symbolicNames}rule_pool(){let t=new Ss(this,this._ctx,this.state);this.enterRule(t,0,Es.RULE_rule_pool);var e=0;try{this.enterOuterAlt(t,1),this.state=9,this._errHandler.sync(this);for(var s=this._interp.adaptivePredict(this._input,0,this._ctx);2!=s&&s!=je.atn.ATN.INVALID_ALT_NUMBER;)1===s&&(this.state=6,this.match(Es.NEWLINE)),this.state=11,this._errHandler.sync(this),s=this._interp.adaptivePredict(this._input,0,this._ctx);if(this.state=24,this._errHandler.sync(this),!(-32&(e=this._input.LA(1)))&&1<<e&1146){this.state=12,this.rule_(),this.state=21,this._errHandler.sync(this);for(s=this._interp.adaptivePredict(this._input,2,this._ctx);2!=s&&s!=je.atn.ATN.INVALID_ALT_NUMBER;){if(1===s){this.state=14,this._errHandler.sync(this),e=this._input.LA(1);do{this.state=13,this.match(Es.NEWLINE),this.state=16,this._errHandler.sync(this),e=this._input.LA(1)}while(9===e);this.state=18,this.rule_()}this.state=23,this._errHandler.sync(this),s=this._interp.adaptivePredict(this._input,2,this._ctx)}}for(this.state=29,this._errHandler.sync(this),e=this._input.LA(1);9===e;)this.state=26,this.match(Es.NEWLINE),this.state=31,this._errHandler.sync(this),e=this._input.LA(1);this.state=32,this.match(Es.EOF)}catch(e){if(!(e instanceof je.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}rule_(){let t=new Cs(this,this._ctx,this.state);this.enterRule(t,2,Es.RULE_rule);var e=0;try{for(this.enterOuterAlt(t,1),this.state=42,this._errHandler.sync(this),e=this._input.LA(1);!(-32&e)&&1<<e&1082;){this.state=34,this.term(),this.state=36,this._errHandler.sync(this),e=this._input.LA(1);do{this.state=35,this.match(Es.NEWLINE),this.state=38,this._errHandler.sync(this),e=this._input.LA(1)}while(9===e);this.state=44,this._errHandler.sync(this),e=this._input.LA(1)}this.state=45,this.match(Es.RULE),this.state=46,this.match(Es.NEWLINE),this.state=47,this.term()}catch(e){if(!(e instanceof je.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}term(){let t=new As(this,this._ctx,this.state);this.enterRule(t,4,Es.RULE_term);var e=0;try{switch(this.state=77,this._errHandler.sync(this),this._input.LA(1)){case 10:t=new Ns(this,t),this.enterOuterAlt(t,1),this.state=49,this.match(Es.SYMBOL);break;case 1:for(t=new ys(this,t),this.enterOuterAlt(t,2),this.state=50,this.match(Es.T__0),this.state=54,this._errHandler.sync(this),e=this._input.LA(1);!(-32&e)&&1<<e&1082;)this.state=51,this.term(),this.state=56,this._errHandler.sync(this),e=this._input.LA(1);this.state=57,this.match(Es.T__1);break;case 3:for(t=new Ls(this,t),this.enterOuterAlt(t,3),this.state=58,this.match(Es.T__2),this.state=62,this._errHandler.sync(this),e=this._input.LA(1);!(-32&e)&&1<<e&1082;)this.state=59,this.term(),this.state=64,this._errHandler.sync(this),e=this._input.LA(1);this.state=65,this.match(Es.T__1);break;case 4:t=new ks(this,t),this.enterOuterAlt(t,4),this.state=66,this.match(Es.T__3),this.state=67,this.match(Es.SYMBOL),this.state=68,this.term(),this.state=69,this.match(Es.T__1);break;case 5:t=new Is(this,t),this.enterOuterAlt(t,5),this.state=71,this.match(Es.T__4),this.state=72,this.match(Es.SYMBOL),this.state=73,this.term(),this.state=74,this.term(),this.state=75,this.match(Es.T__1);break;default:throw new je.error.NoViableAltException(this)}}catch(e){if(!(e instanceof je.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}}Es.EOF=je.Token.EOF,Es.T__0=1,Es.T__1=2,Es.T__2=3,Es.T__3=4,Es.T__4=5,Es.RULE=6,Es.WHITESPACE=7,Es.COMMENT=8,Es.NEWLINE=9,Es.SYMBOL=10,Es.RULE_rule_pool=0,Es.RULE_rule=1,Es.RULE_term=2;class Ss extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=Es.RULE_rule_pool}EOF(){return this.getToken(Es.EOF,0)}NEWLINE=function(t){return void 0===t&&(t=null),null===t?this.getTokens(Es.NEWLINE):this.getToken(Es.NEWLINE,t)};rule_=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Cs):this.getTypedRuleContext(Cs,t)};accept(t){return t instanceof xs?t.visitRule_pool(this):t.visitChildren(this)}}class Cs extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=Es.RULE_rule}RULE(){return this.getToken(Es.RULE,0)}NEWLINE=function(t){return void 0===t&&(t=null),null===t?this.getTokens(Es.NEWLINE):this.getToken(Es.NEWLINE,t)};term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(As):this.getTypedRuleContext(As,t)};accept(t){return t instanceof xs?t.visitRule(this):t.visitChildren(this)}}class As extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=Es.RULE_term}copyFrom(t){super.copyFrom(t)}}class Ns extends As{constructor(t,e){super(t),super.copyFrom(e)}SYMBOL(){return this.getToken(Es.SYMBOL,0)}accept(t){return t instanceof xs?t.visitSymbol(this):t.visitChildren(this)}}Es.SymbolContext=Ns;class ys extends As{constructor(t,e){super(t),super.copyFrom(e)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(As):this.getTypedRuleContext(As,t)};accept(t){return t instanceof xs?t.visitSubscript(this):t.visitChildren(this)}}Es.SubscriptContext=ys;class Ls extends As{constructor(t,e){super(t),super.copyFrom(e)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(As):this.getTypedRuleContext(As,t)};accept(t){return t instanceof xs?t.visitFunction(this):t.visitChildren(this)}}Es.FunctionContext=Ls;class Is extends As{constructor(t,e){super(t),super.copyFrom(e)}SYMBOL(){return this.getToken(Es.SYMBOL,0)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(As):this.getTypedRuleContext(As,t)};accept(t){return t instanceof xs?t.visitBinary(this):t.visitChildren(this)}}Es.BinaryContext=Is;class ks extends As{constructor(t,e){super(t),super.copyFrom(e)}SYMBOL(){return this.getToken(Es.SYMBOL,0)}term(){return this.getTypedRuleContext(As,0)}accept(t){return t instanceof xs?t.visitUnary(this):t.visitChildren(this)}}Es.UnaryContext=ks,Es.Rule_poolContext=Ss,Es.RuleContext=Cs,Es.TermContext=As;class vs extends Ge{syntaxError(t,e,s,n,i,r){throw new Error(`line ${s}:${n} ${i}`)}}class ws extends Ze{visitRule_pool(t){return t.rule_().map(t=>this.visit(t)).join("\n\n")}visitRule(t){const e=t.term().map(t=>this.visit(t));if(1===e.length)return`----\n${e[0]}`;{const t=e.pop(),s=Math.max(...e.map(t=>t.length));return e.push("-".repeat(Math.max(s,4))),e.push(t),e.join("\n")}}visitSymbol(t){return t.SYMBOL().getText()}visitParentheses(t){return this.visit(t.term())}visitSubscript(t){return`(subscript ${t.term().map(t=>this.visit(t)).join(" ")})`}visitFunction(t){return`(function ${t.term().map(t=>this.visit(t)).join(" ")})`}visitUnary(t){return`(unary ${t.getChild(0).getText()} ${this.visit(t.term())})`}visitBinary(t){return`(binary ${t.getChild(1).getText()} ${this.visit(t.term(0))} ${this.visit(t.term(1))})`}}class Rs extends xs{visitRule_pool(t){return t.rule_().map(t=>this.visit(t)).join("\n")}visitRule(t){const e=t.term().map(t=>this.visit(t)),s=e.pop();return e.join(", ")+" -> "+s}visitSymbol(t){return t.SYMBOL().getText()}visitSubscript(t){return`${this.visit(t.term(0))}[${t.term().slice(1).map(t=>this.visit(t)).join(", ")}]`}visitFunction(t){return`${this.visit(t.term(0))}(${t.term().slice(1).map(t=>this.visit(t)).join(", ")})`}visitUnary(t){return`(${t.getChild(1).getText()} ${this.visit(t.term())})`}visitBinary(t){return`(${this.visit(t.term(0))} ${t.getChild(1).getText()} ${this.visit(t.term(1))})`}}function Os(t){const e=new $e(t),s=new Qe(e);s.removeErrorListeners(),s.addErrorListener(new vs);const n=new We(s),i=new ns(n);i.removeErrorListeners(),i.addErrorListener(new vs);const r=i.rule_pool();return(new ws).visit(r)}function Ps(t){const e=new $e(t),s=new fs(e);s.removeErrorListeners(),s.addErrorListener(new vs);const n=new We(s),i=new Es(n);i.removeErrorListeners(),i.addErrorListener(new vs);const r=i.rule_pool();return(new Rs).visit(r)}export{Os as parse,Ps as unparse};
|
|
1
|
+
var t={763:()=>{}},e={};function s(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,s),r.exports}s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var n={};s.d(n,{MG:()=>j,fr:()=>kt,sR:()=>Ae,Zo:()=>ye,iH:()=>we,rt:()=>Pt,jB:()=>be,M8:()=>le,$t:()=>Ce,aq:()=>me,pG:()=>vt,eP:()=>_e,KU:()=>xe,zW:()=>Le,IX:()=>E,mY:()=>S,a7:()=>$,JG:()=>Ut,ay:()=>Xt,X2:()=>ee,WU:()=>de,Uw:()=>pe,gw:()=>ge,iX:()=>De,re:()=>ne,Pg:()=>He,tD:()=>ie,R$:()=>te,Dj:()=>Dt,m7:()=>U,NZ:()=>P,xo:()=>b,ou:()=>i,qC:()=>Be,mD:()=>d,Ay:()=>Ke});class i{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(t){this._text=t}}function r(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!(t[s]===e[s]||t[s].equals&&t[s].equals(e[s])))return!1;return!0}i.INVALID_TYPE=0,i.EPSILON=-2,i.MIN_USER_TOKEN_TYPE=1,i.EOF=-1,i.DEFAULT_CHANNEL=0,i.HIDDEN_CHANNEL=1;const o=Math.round(Math.random()*Math.pow(2,32));function a(t){if(!t)return 0;const e=typeof t,s="string"===e?t:!("object"!==e||!t.toString)&&t.toString();if(!s)return 0;let n,i;const r=3&s.length,a=s.length-r;let l=o;const h=3432918353,c=461845907;let u=0;for(;u<a;)i=255&s.charCodeAt(u)|(255&s.charCodeAt(++u))<<8|(255&s.charCodeAt(++u))<<16|(255&s.charCodeAt(++u))<<24,++u,i=(65535&i)*h+(((i>>>16)*h&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,l^=i,l=l<<13|l>>>19,n=5*(65535&l)+((5*(l>>>16)&65535)<<16)&4294967295,l=27492+(65535&n)+((58964+(n>>>16)&65535)<<16);switch(i=0,r){case 3:i^=(255&s.charCodeAt(u+2))<<16;case 2:i^=(255&s.charCodeAt(u+1))<<8;case 1:i^=255&s.charCodeAt(u),i=(65535&i)*h+(((i>>>16)*h&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,l^=i}return l^=s.length,l^=l>>>16,l=2246822507*(65535&l)+((2246822507*(l>>>16)&65535)<<16)&4294967295,l^=l>>>13,l=3266489909*(65535&l)+((3266489909*(l>>>16)&65535)<<16)&4294967295,l^=l>>>16,l>>>0}class l{constructor(){this.count=0,this.hash=0}update(){for(let t=0;t<arguments.length;t++){const e=arguments[t];if(null!=e)if(Array.isArray(e))this.update.apply(this,e);else{let t=0;switch(typeof e){case"undefined":case"function":continue;case"number":case"boolean":t=e;break;case"string":t=a(e);break;default:e.updateHashCode?e.updateHashCode(this):console.log("No updateHashCode for "+e.toString());continue}t*=3432918353,t=t<<15|t>>>17,t*=461845907,this.count=this.count+1;let s=this.hash^t;s=s<<13|s>>>19,s=5*s+3864292196,this.hash=s}}}finish(){let t=this.hash^4*this.count;return t^=t>>>16,t*=2246822507,t^=t>>>13,t*=3266489909,t^=t>>>16,t}static hashStuff(){const t=new l;return t.update.apply(t,arguments),t.finish()}}function h(t){return t?"string"==typeof t?a(t):t.hashCode():-1}function c(t,e){return t&&t.equals?t.equals(e):t===e}function u(t){return null===t?"null":t}function d(t){return Array.isArray(t)?"["+t.map(u).join(", ")+"]":"null"}class p{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||h,this.equalsFunction=e||c}get(t){if(null==t)return t;const e=this._getBucket(t);if(!e)return null;for(const s of e)if(this.equalsFunction(s,t))return s;return null}add(t){return this.getOrAdd(t)===t}getOrAdd(t){this._expand();const e=this._getSlot(t);let s=this.buckets[e];if(!s)return s=[t],this.buckets[e]=s,this.itemCount++,t;for(const e of s)if(this.equalsFunction(e,t))return e;return s.push(t),this.itemCount++,t}has(t){return null!=this.get(t)}values(){return this.buckets.filter(t=>null!=t).flat(1)}toString(){return d(this.values())}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t);let s=this.buckets[e];s||(s=[],this.buckets[e]=s),s.push(t)}}}class g{hashCode(){const t=new l;return this.updateHashCode(t),t.finish()}evaluate(t,e){}evalPrecedence(t,e){return this}static andContext(t,e){if(null===t||t===g.NONE)return e;if(null===e||e===g.NONE)return t;const s=new f(t,e);return 1===s.opnds.length?s.opnds[0]:s}static orContext(t,e){if(null===t)return e;if(null===e)return t;if(t===g.NONE||e===g.NONE)return g.NONE;const s=new x(t,e);return 1===s.opnds.length?s.opnds[0]:s}}class f extends g{constructor(t,e){super();const s=new p;t instanceof f?t.opnds.map(function(t){s.add(t)}):s.add(t),e instanceof f?e.opnds.map(function(t){s.add(t)}):s.add(e);const n=_(s);if(n.length>0){let t=null;n.map(function(e){(null===t||e.precedence<t.precedence)&&(t=e)}),s.add(t)}this.opnds=Array.from(s.values())}equals(t){return this===t||t instanceof f&&r(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"AND")}evaluate(t,e){for(let s=0;s<this.opnds.length;s++)if(!this.opnds[s].evaluate(t,e))return!1;return!0}evalPrecedence(t,e){let s=!1;const n=[];for(let i=0;i<this.opnds.length;i++){const r=this.opnds[i],o=r.evalPrecedence(t,e);if(s|=o!==r,null===o)return null;o!==g.NONE&&n.push(o)}if(!s)return this;if(0===n.length)return g.NONE;let i=null;return n.map(function(t){i=null===i?t:g.andContext(i,t)}),i}toString(){const t=this.opnds.map(t=>t.toString());return(t.length>3?t.slice(3):t).join("&&")}}class x extends g{constructor(t,e){super();const s=new p;t instanceof x?t.opnds.map(function(t){s.add(t)}):s.add(t),e instanceof x?e.opnds.map(function(t){s.add(t)}):s.add(e);const n=_(s);if(n.length>0){const t=n.sort(function(t,e){return t.compareTo(e)}),e=t[t.length-1];s.add(e)}this.opnds=Array.from(s.values())}equals(t){return this===t||t instanceof x&&r(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"OR")}evaluate(t,e){for(let s=0;s<this.opnds.length;s++)if(this.opnds[s].evaluate(t,e))return!0;return!1}evalPrecedence(t,e){let s=!1;const n=[];for(let i=0;i<this.opnds.length;i++){const r=this.opnds[i],o=r.evalPrecedence(t,e);if(s|=o!==r,o===g.NONE)return g.NONE;null!==o&&n.push(o)}return s?(n.length,null):this}toString(){const t=this.opnds.map(t=>t.toString());return(t.length>3?t.slice(3):t).join("||")}}function _(t){const e=[];return t.values().map(function(t){t instanceof g.PrecedencePredicate&&e.push(t)}),e}function T(t,e){if(null===t){const t={state:null,alt:null,context:null,semanticContext:null};return e&&(t.reachesIntoOuterContext=0),t}{const s={};return s.state=t.state||null,s.alt=void 0===t.alt?null:t.alt,s.context=t.context||null,s.semanticContext=t.semanticContext||null,e&&(s.reachesIntoOuterContext=t.reachesIntoOuterContext||0,s.precedenceFilterSuppressed=t.precedenceFilterSuppressed||!1),s}}class m{constructor(t,e){this.checkContext(t,e),t=T(t),e=T(e,!0),this.state=null!==t.state?t.state:e.state,this.alt=null!==t.alt?t.alt:e.alt,this.context=null!==t.context?t.context:e.context,this.semanticContext=null!==t.semanticContext?t.semanticContext:null!==e.semanticContext?e.semanticContext:g.NONE,this.reachesIntoOuterContext=e.reachesIntoOuterContext,this.precedenceFilterSuppressed=e.precedenceFilterSuppressed}checkContext(t,e){null!==t.context&&void 0!==t.context||null!==e&&null!==e.context&&void 0!==e.context||(this.context=null)}hashCode(){const t=new l;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)}equals(t){return this===t||t instanceof m&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&(null===this.context?null===t.context:this.context.equals(t.context))&&this.semanticContext.equals(t.semanticContext)&&this.precedenceFilterSuppressed===t.precedenceFilterSuppressed}hashCodeForConfigSet(){const t=new l;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}equalsForConfigSet(t){return this===t||t instanceof m&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&this.semanticContext.equals(t.semanticContext)}toString(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==g.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class E{constructor(t,e){this.start=t,this.stop=e}clone(){return new E(this.start,this.stop)}contains(t){return t>=this.start&&t<this.stop}toString(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()}get length(){return this.stop-this.start}}E.INVALID_INTERVAL=new E(-1,-2);class S{constructor(){this.intervals=null,this.readOnly=!1}first(t){return null===this.intervals||0===this.intervals.length?i.INVALID_TYPE:this.intervals[0].start}addOne(t){this.addInterval(new E(t,t+1))}addRange(t,e){this.addInterval(new E(t,e+1))}addInterval(t){if(null===this.intervals)this.intervals=[],this.intervals.push(t.clone());else{for(let e=0;e<this.intervals.length;e++){const s=this.intervals[e];if(t.stop<s.start)return void this.intervals.splice(e,0,t);if(t.stop===s.start)return void(this.intervals[e]=new E(t.start,s.stop));if(t.start<=s.stop)return this.intervals[e]=new E(Math.min(s.start,t.start),Math.max(s.stop,t.stop)),void this.reduce(e)}this.intervals.push(t.clone())}}addSet(t){return null!==t.intervals&&t.intervals.forEach(t=>this.addInterval(t),this),this}reduce(t){if(t<this.intervals.length-1){const e=this.intervals[t],s=this.intervals[t+1];e.stop>=s.stop?(this.intervals.splice(t+1,1),this.reduce(t)):e.stop>=s.start&&(this.intervals[t]=new E(e.start,s.stop),this.intervals.splice(t+1,1))}}complement(t,e){const s=new S;return s.addInterval(new E(t,e+1)),null!==this.intervals&&this.intervals.forEach(t=>s.removeRange(t)),s}contains(t){if(null===this.intervals)return!1;for(let e=0;e<this.intervals.length;e++)if(this.intervals[e].contains(t))return!0;return!1}removeRange(t){if(t.start===t.stop-1)this.removeOne(t.start);else if(null!==this.intervals){let e=0;for(let s=0;s<this.intervals.length;s++){const s=this.intervals[e];if(t.stop<=s.start)return;if(t.start>s.start&&t.stop<s.stop){this.intervals[e]=new E(s.start,t.start);const n=new E(t.stop,s.stop);return void this.intervals.splice(e,0,n)}t.start<=s.start&&t.stop>=s.stop?(this.intervals.splice(e,1),e-=1):t.start<s.stop?this.intervals[e]=new E(s.start,t.start):t.stop<s.stop&&(this.intervals[e]=new E(t.stop,s.stop)),e+=1}}}removeOne(t){if(null!==this.intervals)for(let e=0;e<this.intervals.length;e++){const s=this.intervals[e];if(t<s.start)return;if(t===s.start&&t===s.stop-1)return void this.intervals.splice(e,1);if(t===s.start)return void(this.intervals[e]=new E(s.start+1,s.stop));if(t===s.stop-1)return void(this.intervals[e]=new E(s.start,s.stop-1));if(t<s.stop-1){const n=new E(s.start,t);return s.start=t+1,void this.intervals.splice(e,0,n)}}}toString(t,e,s){return t=t||null,e=e||null,s=s||!1,null===this.intervals?"{}":null!==t||null!==e?this.toTokenString(t,e):s?this.toCharString():this.toIndexString()}toCharString(){const t=[];for(let e=0;e<this.intervals.length;e++){const s=this.intervals[e];s.stop===s.start+1?s.start===i.EOF?t.push("<EOF>"):t.push("'"+String.fromCharCode(s.start)+"'"):t.push("'"+String.fromCharCode(s.start)+"'..'"+String.fromCharCode(s.stop-1)+"'")}return t.length>1?"{"+t.join(", ")+"}":t[0]}toIndexString(){const t=[];for(let e=0;e<this.intervals.length;e++){const s=this.intervals[e];s.stop===s.start+1?s.start===i.EOF?t.push("<EOF>"):t.push(s.start.toString()):t.push(s.start.toString()+".."+(s.stop-1).toString())}return t.length>1?"{"+t.join(", ")+"}":t[0]}toTokenString(t,e){const s=[];for(let n=0;n<this.intervals.length;n++){const i=this.intervals[n];for(let n=i.start;n<i.stop;n++)s.push(this.elementName(t,e,n))}return s.length>1?"{"+s.join(", ")+"}":s[0]}elementName(t,e,s){return s===i.EOF?"<EOF>":s===i.EPSILON?"<EPSILON>":t[s]||e[s]}get length(){return this.intervals.map(t=>t.length).reduce((t,e)=>t+e)}}class C{constructor(){this.atn=null,this.stateNumber=C.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null}toString(){return this.stateNumber}equals(t){return t instanceof C&&this.stateNumber===t.stateNumber}isNonGreedyExitState(){return!1}addTransition(t,e){void 0===e&&(e=-1),0===this.transitions.length?this.epsilonOnlyTransitions=t.isEpsilon:this.epsilonOnlyTransitions!==t.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===e?this.transitions.push(t):this.transitions.splice(e,1,t)}}C.INVALID_TYPE=0,C.BASIC=1,C.RULE_START=2,C.BLOCK_START=3,C.PLUS_BLOCK_START=4,C.STAR_BLOCK_START=5,C.TOKEN_START=6,C.RULE_STOP=7,C.BLOCK_END=8,C.STAR_LOOP_BACK=9,C.STAR_LOOP_ENTRY=10,C.PLUS_LOOP_BACK=11,C.LOOP_END=12,C.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],C.INVALID_STATE_NUMBER=-1;class A extends C{constructor(){return super(),this.stateType=C.RULE_STOP,this}}class N{constructor(t){if(null==t)throw"target cannot be null.";this.target=t,this.isEpsilon=!1,this.label=null}}N.EPSILON=1,N.RANGE=2,N.RULE=3,N.PREDICATE=4,N.ATOM=5,N.ACTION=6,N.SET=7,N.NOT_SET=8,N.WILDCARD=9,N.PRECEDENCE=10,N.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],N.serializationTypes={EpsilonTransition:N.EPSILON,RangeTransition:N.RANGE,RuleTransition:N.RULE,PredicateTransition:N.PREDICATE,AtomTransition:N.ATOM,ActionTransition:N.ACTION,SetTransition:N.SET,NotSetTransition:N.NOT_SET,WildcardTransition:N.WILDCARD,PrecedencePredicateTransition:N.PRECEDENCE};class y extends N{constructor(t,e,s,n){super(t),this.ruleIndex=e,this.precedence=s,this.followState=n,this.serializationType=N.RULE,this.isEpsilon=!0}matches(t,e,s){return!1}}class L extends N{constructor(t,e){super(t),this.serializationType=N.SET,null!=e?this.label=e:(this.label=new S,this.label.addOne(i.INVALID_TYPE))}matches(t,e,s){return this.label.contains(t)}toString(){return this.label.toString()}}class I extends L{constructor(t,e){super(t,e),this.serializationType=N.NOT_SET}matches(t,e,s){return t>=e&&t<=s&&!super.matches(t,e,s)}toString(){return"~"+super.toString()}}class k extends N{constructor(t){super(t),this.serializationType=N.WILDCARD}matches(t,e,s){return t>=e&&t<=s}toString(){return"."}}class v extends N{constructor(t){super(t)}}class w{}class R extends w{}class O extends R{}class P extends O{get ruleContext(){throw new Error("missing interface implementation")}}class b extends O{}class F extends b{}const D={toStringTree:function(t,e,s){e=e||null,null!==(s=s||null)&&(e=s.ruleNames);let n=D.getNodeText(t,e);n=function(t){return t.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}(n);const i=t.getChildCount();if(0===i)return n;let r="("+n+" ";i>0&&(n=D.toStringTree(t.getChild(0),e),r=r.concat(n));for(let s=1;s<i;s++)n=D.toStringTree(t.getChild(s),e),r=r.concat(" "+n);return r=r.concat(")"),r},getNodeText:function(t,e,s){if(e=e||null,null!==(s=s||null)&&(e=s.ruleNames),null!==e){if(t instanceof P){const s=t.ruleContext.getAltNumber();return 0!=s?e[t.ruleIndex]+":"+s:e[t.ruleIndex]}if(t instanceof F)return t.toString();if(t instanceof b&&null!==t.symbol)return t.symbol.text}const n=t.getPayload();return n instanceof i?n.text:t.getPayload().toString()},getChildren:function(t){const e=[];for(let s=0;s<t.getChildCount();s++)e.push(t.getChild(s));return e},getAncestors:function(t){let e=[];for(t=t.getParent();null!==t;)e=[t].concat(e),t=t.getParent();return e},findAllTokenNodes:function(t,e){return D.findAllNodes(t,e,!0)},findAllRuleNodes:function(t,e){return D.findAllNodes(t,e,!1)},findAllNodes:function(t,e,s){const n=[];return D._findAllNodes(t,e,s,n),n},_findAllNodes:function(t,e,s,n){s&&t instanceof b?t.symbol.type===e&&n.push(t):!s&&t instanceof P&&t.ruleIndex===e&&n.push(t);for(let i=0;i<t.getChildCount();i++)D._findAllNodes(t.getChild(i),e,s,n)},descendants:function(t){let e=[t];for(let s=0;s<t.getChildCount();s++)e=e.concat(D.descendants(t.getChild(s)));return e}},M=D;class U extends P{constructor(t,e){super(),this.parentCtx=t||null,this.invokingState=e||-1}depth(){let t=0,e=this;for(;null!==e;)e=e.parentCtx,t+=1;return t}isEmpty(){return-1===this.invokingState}getSourceInterval(){return E.INVALID_INTERVAL}get ruleContext(){return this}getPayload(){return this}getText(){return 0===this.getChildCount()?"":this.children.map(function(t){return t.getText()}).join("")}getAltNumber(){return 0}setAltNumber(t){}getChild(t){return null}getChildCount(){return 0}accept(t){return t.visitChildren(this)}toStringTree(t,e){return M.toStringTree(this,t,e)}toString(t,e){t=t||null,e=e||null;let s=this,n="[";for(;null!==s&&s!==e;){if(null===t)s.isEmpty()||(n+=s.invokingState);else{const e=s.ruleIndex;n+=e>=0&&e<t.length?t[e]:""+e}null===s.parentCtx||null===t&&s.parentCtx.isEmpty()||(n+=" "),s=s.parentCtx}return n+="]",n}}class H{constructor(t){this.cachedHashCode=t}isEmpty(){return this===H.EMPTY}hasEmptyPath(){return this.getReturnState(this.length-1)===H.EMPTY_RETURN_STATE}hashCode(){return this.cachedHashCode}updateHashCode(t){t.update(this.cachedHashCode)}}H.EMPTY=null,H.EMPTY_RETURN_STATE=2147483647,H.globalNodeCount=1,H.id=H.globalNodeCount,H.trace_atn_sim=!1;class B extends H{constructor(t,e){const s=new l;return s.update(t,e),super(s.finish()),this.parents=t,this.returnStates=e,this}isEmpty(){return this.returnStates[0]===H.EMPTY_RETURN_STATE}getParent(t){return this.parents[t]}getReturnState(t){return this.returnStates[t]}equals(t){return this===t||t instanceof B&&this.hashCode()===t.hashCode()&&r(this.returnStates,t.returnStates)&&r(this.parents,t.parents)}toString(){if(this.isEmpty())return"[]";{let t="[";for(let e=0;e<this.returnStates.length;e++)e>0&&(t+=", "),this.returnStates[e]!==H.EMPTY_RETURN_STATE?(t+=this.returnStates[e],null!==this.parents[e]?t=t+" "+this.parents[e]:t+="null"):t+="$";return t+"]"}}get length(){return this.returnStates.length}}class V extends H{constructor(t,e){let s=0;const n=new l;null!==t?n.update(t,e):n.update(1),s=n.finish(),super(s),this.parentCtx=t,this.returnState=e}getParent(t){return this.parentCtx}getReturnState(t){return this.returnState}equals(t){return this===t||t instanceof V&&this.hashCode()===t.hashCode()&&this.returnState===t.returnState&&(null==this.parentCtx?null==t.parentCtx:this.parentCtx.equals(t.parentCtx))}toString(){const t=null===this.parentCtx?"":this.parentCtx.toString();return 0===t.length?this.returnState===H.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}get length(){return 1}static create(t,e){return e===H.EMPTY_RETURN_STATE&&null===t?H.EMPTY:new V(t,e)}}class z extends V{constructor(){super(null,H.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(t){return null}getReturnState(t){return this.returnState}equals(t){return this===t}toString(){return"$"}}H.EMPTY=new z;class Y{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||h,this.equalsFunction=e||c}set(t,e){this._expand();const s=this._getSlot(t);let n=this.buckets[s];if(!n)return n=[[t,e]],this.buckets[s]=n,this.itemCount++,e;const i=n.find(e=>this.equalsFunction(e[0],t),this);if(i){const t=i[1];return i[1]=e,t}return n.push([t,e]),this.itemCount++,e}containsKey(t){const e=this._getBucket(t);return!!e&&!!e.find(e=>this.equalsFunction(e[0],t),this)}get(t){const e=this._getBucket(t);if(!e)return null;const s=e.find(e=>this.equalsFunction(e[0],t),this);return s?s[1]:null}entries(){return this.buckets.filter(t=>null!=t).flat(1)}getKeys(){return this.entries().map(t=>t[0])}getValues(){return this.entries().map(t=>t[1])}toString(){return"["+this.entries().map(t=>"{"+t[0]+":"+t[1]+"}").join(", ")+"]"}get length(){return this.itemCount}_getSlot(t){return this.hashFunction(t)&this.buckets.length-1}_getBucket(t){return this.buckets[this._getSlot(t)]}_expand(){if(this.itemCount<=this.threshold)return;const t=this.buckets,e=2*this.buckets.length;this.buckets=new Array(e),this.threshold=Math.floor(.75*e);for(const e of t)if(e)for(const t of e){const e=this._getSlot(t[0]);let s=this.buckets[e];s||(s=[],this.buckets[e]=s),s.push(t)}}}function q(t,e){if(null==e&&(e=U.EMPTY),null===e.parentCtx||e===U.EMPTY)return H.EMPTY;const s=q(t,e.parentCtx),n=t.states[e.invokingState].transitions[0];return V.create(s,n.followState.stateNumber)}function K(t,e,s){if(t.isEmpty())return t;let n=s.get(t)||null;if(null!==n)return n;if(n=e.get(t),null!==n)return s.set(t,n),n;let i=!1,r=[];for(let n=0;n<r.length;n++){const o=K(t.getParent(n),e,s);if(i||o!==t.getParent(n)){if(!i){r=[];for(let e=0;e<t.length;e++)r[e]=t.getParent(e);i=!0}r[n]=o}}if(!i)return e.add(t),s.set(t,t),t;let o=null;return o=0===r.length?H.EMPTY:1===r.length?V.create(r[0],t.getReturnState(0)):new B(r,t.returnStates),e.add(o),s.set(o,o),s.set(t,o),o}function W(t,e,s,n){if(t===e)return t;if(t instanceof V&&e instanceof V)return function(t,e,s,n){if(null!==n){let s=n.get(t,e);if(null!==s)return s;if(s=n.get(e,t),null!==s)return s}const i=function(t,e,s){if(s){if(t===H.EMPTY)return H.EMPTY;if(e===H.EMPTY)return H.EMPTY}else{if(t===H.EMPTY&&e===H.EMPTY)return H.EMPTY;if(t===H.EMPTY){const t=[e.returnState,H.EMPTY_RETURN_STATE],s=[e.parentCtx,null];return new B(s,t)}if(e===H.EMPTY){const e=[t.returnState,H.EMPTY_RETURN_STATE],s=[t.parentCtx,null];return new B(s,e)}}return null}(t,e,s);if(null!==i)return null!==n&&n.set(t,e,i),i;if(t.returnState===e.returnState){const i=W(t.parentCtx,e.parentCtx,s,n);if(i===t.parentCtx)return t;if(i===e.parentCtx)return e;const r=V.create(i,t.returnState);return null!==n&&n.set(t,e,r),r}{let s=null;if((t===e||null!==t.parentCtx&&t.parentCtx===e.parentCtx)&&(s=t.parentCtx),null!==s){const i=[t.returnState,e.returnState];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState);const r=new B([s,s],i);return null!==n&&n.set(t,e,r),r}const i=[t.returnState,e.returnState];let r=[t.parentCtx,e.parentCtx];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState,r=[e.parentCtx,t.parentCtx]);const o=new B(r,i);return null!==n&&n.set(t,e,o),o}}(t,e,s,n);if(s){if(t instanceof z)return t;if(e instanceof z)return e}return t instanceof V&&(t=new B([t.getParent()],[t.returnState])),e instanceof V&&(e=new B([e.getParent()],[e.returnState])),function(t,e,s,n){if(null!==n){let s=n.get(t,e);if(null!==s)return H.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),s;if(s=n.get(e,t),null!==s)return H.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),s}let i=0,r=0,o=0,a=new Array(t.returnStates.length+e.returnStates.length).fill(0),l=new Array(t.returnStates.length+e.returnStates.length).fill(null);for(;i<t.returnStates.length&&r<e.returnStates.length;){const h=t.parents[i],c=e.parents[r];if(t.returnStates[i]===e.returnStates[r]){const e=t.returnStates[i];e===H.EMPTY_RETURN_STATE&&null===h&&null===c||null!==h&&null!==c&&h===c?(l[o]=h,a[o]=e):(l[o]=W(h,c,s,n),a[o]=e),i+=1,r+=1}else t.returnStates[i]<e.returnStates[r]?(l[o]=h,a[o]=t.returnStates[i],i+=1):(l[o]=c,a[o]=e.returnStates[r],r+=1);o+=1}if(i<t.returnStates.length)for(let e=i;e<t.returnStates.length;e++)l[o]=t.parents[e],a[o]=t.returnStates[e],o+=1;else for(let t=r;t<e.returnStates.length;t++)l[o]=e.parents[t],a[o]=e.returnStates[t],o+=1;if(o<l.length){if(1===o){const s=V.create(l[0],a[0]);return null!==n&&n.set(t,e,s),s}l=l.slice(0,o),a=a.slice(0,o)}const h=new B(l,a);return h.equals(t)?(null!==n&&n.set(t,e,t),H.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> a"),t):h.equals(e)?(null!==n&&n.set(t,e,e),H.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){const e=new Y;for(let s=0;s<t.length;s++){const n=t[s];e.containsKey(n)||e.set(n,n)}for(let s=0;s<t.length;s++)t[s]=e.get(t[s])}(l),null!==n&&n.set(t,e,h),H.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> "+h),h)}(t,e,s,n)}class G{constructor(){this.data=new Uint32Array(1)}set(t){G._checkIndex(t),this._resize(t),this.data[t>>>5]|=1<<t%32}get(t){G._checkIndex(t);const e=t>>>5;return!(e>=this.data.length||!(this.data[e]&1<<t%32))}clear(t){G._checkIndex(t);const e=t>>>5;e<this.data.length&&(this.data[e]&=~(1<<t))}or(t){const e=Math.min(this.data.length,t.data.length);for(let s=0;s<e;++s)this.data[s]|=t.data[s];if(this.data.length<t.data.length){this._resize((t.data.length<<5)-1);const s=t.data.length;for(let n=e;n<s;++n)this.data[n]=t.data[n]}}values(){const t=new Array(this.length);let e=0;const s=this.data.length;for(let n=0;n<s;++n){let s=this.data[n];for(;0!==s;){const i=s&-s;t[e++]=(n<<5)+G._bitCount(i-1),s^=i}}return t}minValue(){for(let t=0;t<this.data.length;++t){let e=this.data[t];if(0!==e){let s=0;for(;!(1&e);)s++,e>>=1;return s+32*t}}return 0}hashCode(){return l.hashStuff(this.values())}equals(t){return t instanceof G&&r(this.data,t.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.data.map(t=>G._bitCount(t)).reduce((t,e)=>t+e,0)}_resize(t){const e=t+32>>>5;if(e<=this.data.length)return;const s=new Uint32Array(e);s.set(this.data),s.fill(0,this.data.length),this.data=s}static _checkIndex(t){if(t<0)throw new RangeError("index cannot be negative")}static _bitCount(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,0+(t+=t>>16)&63}}class ${constructor(t){this.atn=t}getDecisionLookahead(t){if(null===t)return null;const e=t.transitions.length,s=[];for(let n=0;n<e;n++){s[n]=new S;const e=new p,i=!1;this._LOOK(t.transition(n).target,null,H.EMPTY,s[n],e,new G,i,!1),(0===s[n].length||s[n].contains($.HIT_PRED))&&(s[n]=null)}return s}LOOK(t,e,s){const n=new S,i=null!==(s=s||null)?q(t.atn,s):null;return this._LOOK(t,e,i,n,new p,new G,!0,!0),n}_LOOK(t,e,s,n,r,o,a,l){const h=new m({state:t,alt:0,context:s},null);if(!r.has(h)){if(r.add(h),t===e){if(null===s)return void n.addOne(i.EPSILON);if(s.isEmpty()&&l)return void n.addOne(i.EOF)}if(t instanceof A){if(null===s)return void n.addOne(i.EPSILON);if(s.isEmpty()&&l)return void n.addOne(i.EOF);if(s!==H.EMPTY){const i=o.get(t.ruleIndex);try{o.clear(t.ruleIndex);for(let t=0;t<s.length;t++){const i=this.atn.states[s.getReturnState(t)];this._LOOK(i,e,s.getParent(t),n,r,o,a,l)}}finally{i&&o.set(t.ruleIndex)}return}}for(let h=0;h<t.transitions.length;h++){const c=t.transitions[h];if(c.constructor===y){if(o.get(c.target.ruleIndex))continue;const t=V.create(s,c.followState.stateNumber);try{o.set(c.target.ruleIndex),this._LOOK(c.target,e,t,n,r,o,a,l)}finally{o.clear(c.target.ruleIndex)}}else if(c instanceof v)a?this._LOOK(c.target,e,s,n,r,o,a,l):n.addOne($.HIT_PRED);else if(c.isEpsilon)this._LOOK(c.target,e,s,n,r,o,a,l);else if(c.constructor===k)n.addRange(i.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else{let t=c.label;null!==t&&(c instanceof I&&(t=t.complement(i.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),n.addSet(t))}}}}}$.HIT_PRED=i.INVALID_TYPE;class j{constructor(t,e){this.grammarType=t,this.maxTokenType=e,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[]}nextTokensInContext(t,e){return new $(this).LOOK(t,null,e)}nextTokensNoContext(t){return null!==t.nextTokenWithinRule||(t.nextTokenWithinRule=this.nextTokensInContext(t,null),t.nextTokenWithinRule.readOnly=!0),t.nextTokenWithinRule}nextTokens(t,e){return void 0===e?this.nextTokensNoContext(t):this.nextTokensInContext(t,e)}addState(t){null!==t&&(t.atn=this,t.stateNumber=this.states.length),this.states.push(t)}removeState(t){this.states[t.stateNumber]=null}defineDecisionState(t){return this.decisionToState.push(t),t.decision=this.decisionToState.length-1,t.decision}getDecisionState(t){return 0===this.decisionToState.length?null:this.decisionToState[t]}getExpectedTokens(t,e){if(t<0||t>=this.states.length)throw"Invalid state number.";const s=this.states[t];let n=this.nextTokens(s);if(!n.contains(i.EPSILON))return n;const r=new S;for(r.addSet(n),r.removeOne(i.EPSILON);null!==e&&e.invokingState>=0&&n.contains(i.EPSILON);){const t=this.states[e.invokingState].transitions[0];n=this.nextTokens(t.followState),r.addSet(n),r.removeOne(i.EPSILON),e=e.parentCtx}return n.contains(i.EPSILON)&&r.addOne(i.EOF),r}}j.INVALID_ALT_NUMBER=0;class X extends C{constructor(){super(),this.stateType=C.BASIC}}class J extends C{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class Q extends J{constructor(){return super(),this.endState=null,this}}class Z extends C{constructor(){return super(),this.stateType=C.BLOCK_END,this.startState=null,this}}class tt extends C{constructor(){return super(),this.stateType=C.LOOP_END,this.loopBackState=null,this}}class et extends C{constructor(){return super(),this.stateType=C.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class st extends J{constructor(){return super(),this.stateType=C.TOKEN_START,this}}class nt extends J{constructor(){return super(),this.stateType=C.PLUS_LOOP_BACK,this}}class it extends C{constructor(){return super(),this.stateType=C.STAR_LOOP_BACK,this}}class rt extends J{constructor(){return super(),this.stateType=C.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class ot extends Q{constructor(){return super(),this.stateType=C.PLUS_BLOCK_START,this.loopBackState=null,this}}class at extends Q{constructor(){return super(),this.stateType=C.STAR_BLOCK_START,this}}class lt extends Q{constructor(){return super(),this.stateType=C.BLOCK_START,this}}class ht extends N{constructor(t,e){super(t),this.label_=e,this.label=this.makeLabel(),this.serializationType=N.ATOM}makeLabel(){const t=new S;return t.addOne(this.label_),t}matches(t,e,s){return this.label_===t}toString(){return this.label_}}class ct extends N{constructor(t,e,s){super(t),this.serializationType=N.RANGE,this.start=e,this.stop=s,this.label=this.makeLabel()}makeLabel(){const t=new S;return t.addRange(this.start,this.stop),t}matches(t,e,s){return t>=this.start&&t<=this.stop}toString(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}}class ut extends N{constructor(t,e,s,n){super(t),this.serializationType=N.ACTION,this.ruleIndex=e,this.actionIndex=void 0===s?-1:s,this.isCtxDependent=void 0!==n&&n,this.isEpsilon=!0}matches(t,e,s){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}}class dt extends N{constructor(t,e){super(t),this.serializationType=N.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e}matches(t,e,s){return!1}toString(){return"epsilon"}}class pt extends g{constructor(t,e,s){super(),this.ruleIndex=void 0===t?-1:t,this.predIndex=void 0===e?-1:e,this.isCtxDependent=void 0!==s&&s}evaluate(t,e){const s=this.isCtxDependent?e:null;return t.sempred(s,this.ruleIndex,this.predIndex)}updateHashCode(t){t.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}equals(t){return this===t||t instanceof pt&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}g.NONE=new pt;class gt extends v{constructor(t,e,s,n){super(t),this.serializationType=N.PREDICATE,this.ruleIndex=e,this.predIndex=s,this.isCtxDependent=n,this.isEpsilon=!0}matches(t,e,s){return!1}getPredicate(){return new pt(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class ft extends g{constructor(t){super(),this.precedence=void 0===t?0:t}evaluate(t,e){return t.precpred(e,this.precedence)}evalPrecedence(t,e){return t.precpred(e,this.precedence)?g.NONE:null}compareTo(t){return this.precedence-t.precedence}updateHashCode(t){t.update(this.precedence)}equals(t){return this===t||t instanceof ft&&this.precedence===t.precedence}toString(){return"{"+this.precedence+">=prec}?"}}g.PrecedencePredicate=ft;class xt extends v{constructor(t,e){super(t),this.serializationType=N.PRECEDENCE,this.precedence=e,this.isEpsilon=!0}matches(t,e,s){return!1}getPredicate(){return new ft(this.precedence)}toString(){return this.precedence+" >= _p"}}class _t{constructor(t){void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions}}_t.defaultOptions=new _t,_t.defaultOptions.readOnly=!0;class Tt{constructor(t){this.actionType=t,this.isPositionDependent=!1}hashCode(){const t=new l;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.actionType)}equals(t){return this===t}}class mt extends Tt{constructor(){super(6)}execute(t){t.skip()}toString(){return"skip"}}mt.INSTANCE=new mt;class Et extends Tt{constructor(t){super(0),this.channel=t}execute(t){t._channel=this.channel}updateHashCode(t){t.update(this.actionType,this.channel)}equals(t){return this===t||t instanceof Et&&this.channel===t.channel}toString(){return"channel("+this.channel+")"}}class St extends Tt{constructor(t,e){super(1),this.ruleIndex=t,this.actionIndex=e,this.isPositionDependent=!0}execute(t){t.action(null,this.ruleIndex,this.actionIndex)}updateHashCode(t){t.update(this.actionType,this.ruleIndex,this.actionIndex)}equals(t){return this===t||t instanceof St&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}class Ct extends Tt{constructor(){super(3)}execute(t){t.more()}toString(){return"more"}}Ct.INSTANCE=new Ct;class At extends Tt{constructor(t){super(7),this.type=t}execute(t){t.type=this.type}updateHashCode(t){t.update(this.actionType,this.type)}equals(t){return this===t||t instanceof At&&this.type===t.type}toString(){return"type("+this.type+")"}}class Nt extends Tt{constructor(t){super(5),this.mode=t}execute(t){t.pushMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Nt&&this.mode===t.mode}toString(){return"pushMode("+this.mode+")"}}class yt extends Tt{constructor(){super(4)}execute(t){t.popMode()}toString(){return"popMode"}}yt.INSTANCE=new yt;class Lt extends Tt{constructor(t){super(2),this.mode=t}execute(t){t.setMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Lt&&this.mode===t.mode}toString(){return"mode("+this.mode+")"}}function It(t,e){const s=[];return s[t-1]=e,s.map(function(t){return e})}class kt{constructor(t){null==t&&(t=_t.defaultOptions),this.deserializationOptions=t,this.stateFactories=null,this.actionFactories=null}deserialize(t){const e=this.reset(t);this.checkVersion(e),e&&this.skipUUID();const s=this.readATN();this.readStates(s,e),this.readRules(s,e),this.readModes(s);const n=[];return this.readSets(s,n,this.readInt.bind(this)),e&&this.readSets(s,n,this.readInt32.bind(this)),this.readEdges(s,n),this.readDecisions(s),this.readLexerActions(s,e),this.markPrecedenceDecisions(s),this.verifyATN(s),this.deserializationOptions.generateRuleBypassTransitions&&1===s.grammarType&&(this.generateRuleBypassTransitions(s),this.verifyATN(s)),s}reset(t){if(3===(t.charCodeAt?t.charCodeAt(0):t[0])){const e=function(t){const e=t.charCodeAt(0);return e>1?e-2:e+65534},s=t.split("").map(e);return s[0]=t.charCodeAt(0),this.data=s,this.pos=0,!0}return this.data=t,this.pos=0,!1}skipUUID(){let t=0;for(;t++<8;)this.readInt()}checkVersion(t){const e=this.readInt();if(!t&&4!==e)throw"Could not deserialize ATN with version "+e+" (expected 4)."}readATN(){const t=this.readInt(),e=this.readInt();return new j(t,e)}readStates(t,e){let s,n,i;const r=[],o=[],a=this.readInt();for(let s=0;s<a;s++){const s=this.readInt();if(s===C.INVALID_TYPE){t.addState(null);continue}let n=this.readInt();e&&65535===n&&(n=-1);const i=this.stateFactory(s,n);if(s===C.LOOP_END){const t=this.readInt();r.push([i,t])}else if(i instanceof Q){const t=this.readInt();o.push([i,t])}t.addState(i)}for(s=0;s<r.length;s++)n=r[s],n[0].loopBackState=t.states[n[1]];for(s=0;s<o.length;s++)n=o[s],n[0].endState=t.states[n[1]];let l=this.readInt();for(s=0;s<l;s++)i=this.readInt(),t.states[i].nonGreedy=!0;let h=this.readInt();for(s=0;s<h;s++)i=this.readInt(),t.states[i].isPrecedenceRule=!0}readRules(t,e){let s;const n=this.readInt();for(0===t.grammarType&&(t.ruleToTokenType=It(n,0)),t.ruleToStartState=It(n,0),s=0;s<n;s++){const n=this.readInt();if(t.ruleToStartState[s]=t.states[n],0===t.grammarType){let n=this.readInt();e&&65535===n&&(n=i.EOF),t.ruleToTokenType[s]=n}}for(t.ruleToStopState=It(n,0),s=0;s<t.states.length;s++){const e=t.states[s];e instanceof A&&(t.ruleToStopState[e.ruleIndex]=e,t.ruleToStartState[e.ruleIndex].stopState=e)}}readModes(t){const e=this.readInt();for(let s=0;s<e;s++){let e=this.readInt();t.modeToStartState.push(t.states[e])}}readSets(t,e,s){const n=this.readInt();for(let t=0;t<n;t++){const t=new S;e.push(t);const n=this.readInt();0!==this.readInt()&&t.addOne(-1);for(let e=0;e<n;e++){const e=s(),n=s();t.addRange(e,n)}}}readEdges(t,e){let s,n,i,r,o;const a=this.readInt();for(s=0;s<a;s++){const s=this.readInt(),n=this.readInt(),i=this.readInt(),o=this.readInt(),a=this.readInt(),l=this.readInt();r=this.edgeFactory(t,i,s,n,o,a,l,e),t.states[s].addTransition(r)}for(s=0;s<t.states.length;s++)for(i=t.states[s],n=0;n<i.transitions.length;n++){const e=i.transitions[n];if(!(e instanceof y))continue;let s=-1;t.ruleToStartState[e.target.ruleIndex].isPrecedenceRule&&0===e.precedence&&(s=e.target.ruleIndex),r=new dt(e.followState,s),t.ruleToStopState[e.target.ruleIndex].addTransition(r)}for(s=0;s<t.states.length;s++){if(i=t.states[s],i instanceof Q){if(null===i.endState)throw"IllegalState";if(null!==i.endState.startState)throw"IllegalState";i.endState.startState=i}if(i instanceof nt)for(n=0;n<i.transitions.length;n++)o=i.transitions[n].target,o instanceof ot&&(o.loopBackState=i);else if(i instanceof it)for(n=0;n<i.transitions.length;n++)o=i.transitions[n].target,o instanceof rt&&(o.loopBackState=i)}}readDecisions(t){const e=this.readInt();for(let s=0;s<e;s++){const e=this.readInt(),n=t.states[e];t.decisionToState.push(n),n.decision=s}}readLexerActions(t,e){if(0===t.grammarType){const s=this.readInt();t.lexerActions=It(s,null);for(let n=0;n<s;n++){const s=this.readInt();let i=this.readInt();e&&65535===i&&(i=-1);let r=this.readInt();e&&65535===r&&(r=-1),t.lexerActions[n]=this.lexerActionFactory(s,i,r)}}}generateRuleBypassTransitions(t){let e;const s=t.ruleToStartState.length;for(e=0;e<s;e++)t.ruleToTokenType[e]=t.maxTokenType+e+1;for(e=0;e<s;e++)this.generateRuleBypassTransition(t,e)}generateRuleBypassTransition(t,e){let s,n;const i=new lt;i.ruleIndex=e,t.addState(i);const r=new Z;r.ruleIndex=e,t.addState(r),i.endState=r,t.defineDecisionState(i),r.startState=i;let o=null,a=null;if(t.ruleToStartState[e].isPrecedenceRule){for(a=null,s=0;s<t.states.length;s++)if(n=t.states[s],this.stateIsEndStateFor(n,e)){a=n,o=n.loopBackState.transitions[0];break}if(null===o)throw"Couldn't identify final state of the precedence rule prefix section."}else a=t.ruleToStopState[e];for(s=0;s<t.states.length;s++){n=t.states[s];for(let t=0;t<n.transitions.length;t++){const e=n.transitions[t];e!==o&&e.target===a&&(e.target=r)}}const l=t.ruleToStartState[e],h=l.transitions.length;for(;h>0;)i.addTransition(l.transitions[h-1]),l.transitions=l.transitions.slice(-1);t.ruleToStartState[e].addTransition(new dt(i)),r.addTransition(new dt(a));const c=new X;t.addState(c),c.addTransition(new ht(r,t.ruleToTokenType[e])),i.addTransition(new dt(c))}stateIsEndStateFor(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof rt))return null;const s=t.transitions[t.transitions.length-1].target;return s instanceof tt&&s.epsilonOnlyTransitions&&s.transitions[0].target instanceof A?t:null}markPrecedenceDecisions(t){for(let e=0;e<t.states.length;e++){const s=t.states[e];if(s instanceof rt&&t.ruleToStartState[s.ruleIndex].isPrecedenceRule){const t=s.transitions[s.transitions.length-1].target;t instanceof tt&&t.epsilonOnlyTransitions&&t.transitions[0].target instanceof A&&(s.isPrecedenceDecision=!0)}}}verifyATN(t){if(this.deserializationOptions.verifyATN)for(let e=0;e<t.states.length;e++){const s=t.states[e];if(null!==s)if(this.checkCondition(s.epsilonOnlyTransitions||s.transitions.length<=1),s instanceof ot)this.checkCondition(null!==s.loopBackState);else if(s instanceof rt)if(this.checkCondition(null!==s.loopBackState),this.checkCondition(2===s.transitions.length),s.transitions[0].target instanceof at)this.checkCondition(s.transitions[1].target instanceof tt),this.checkCondition(!s.nonGreedy);else{if(!(s.transitions[0].target instanceof tt))throw"IllegalState";this.checkCondition(s.transitions[1].target instanceof at),this.checkCondition(s.nonGreedy)}else s instanceof it?(this.checkCondition(1===s.transitions.length),this.checkCondition(s.transitions[0].target instanceof rt)):s instanceof tt?this.checkCondition(null!==s.loopBackState):s instanceof et?this.checkCondition(null!==s.stopState):s instanceof Q?this.checkCondition(null!==s.endState):s instanceof Z?this.checkCondition(null!==s.startState):s instanceof J?this.checkCondition(s.transitions.length<=1||s.decision>=0):this.checkCondition(s.transitions.length<=1||s instanceof A)}}checkCondition(t,e){if(!t)throw null==e&&(e="IllegalState"),e}readInt(){return this.data[this.pos++]}readInt32(){return this.readInt()|this.readInt()<<16}edgeFactory(t,e,s,n,r,o,a,l){const h=t.states[n];switch(e){case N.EPSILON:return new dt(h);case N.RANGE:return new ct(h,0!==a?i.EOF:r,o);case N.RULE:return new y(t.states[r],o,a,h);case N.PREDICATE:return new gt(h,r,o,0!==a);case N.PRECEDENCE:return new xt(h,r);case N.ATOM:return new ht(h,0!==a?i.EOF:r);case N.ACTION:return new ut(h,r,o,0!==a);case N.SET:return new L(h,l[r]);case N.NOT_SET:return new I(h,l[r]);case N.WILDCARD:return new k(h);default:throw"The specified transition type: "+e+" is not valid."}}stateFactory(t,e){if(null===this.stateFactories){const t=[];t[C.INVALID_TYPE]=null,t[C.BASIC]=()=>new X,t[C.RULE_START]=()=>new et,t[C.BLOCK_START]=()=>new lt,t[C.PLUS_BLOCK_START]=()=>new ot,t[C.STAR_BLOCK_START]=()=>new at,t[C.TOKEN_START]=()=>new st,t[C.RULE_STOP]=()=>new A,t[C.BLOCK_END]=()=>new Z,t[C.STAR_LOOP_BACK]=()=>new it,t[C.STAR_LOOP_ENTRY]=()=>new rt,t[C.PLUS_LOOP_BACK]=()=>new nt,t[C.LOOP_END]=()=>new tt,this.stateFactories=t}if(t>this.stateFactories.length||null===this.stateFactories[t])throw"The specified state type "+t+" is not valid.";{const s=this.stateFactories[t]();if(null!==s)return s.ruleIndex=e,s}}lexerActionFactory(t,e,s){if(null===this.actionFactories){const t=[];t[0]=(t,e)=>new Et(t),t[1]=(t,e)=>new St(t,e),t[2]=(t,e)=>new Lt(t),t[3]=(t,e)=>Ct.INSTANCE,t[4]=(t,e)=>yt.INSTANCE,t[5]=(t,e)=>new Nt(t),t[6]=(t,e)=>mt.INSTANCE,t[7]=(t,e)=>new At(t),this.actionFactories=t}if(t>this.actionFactories.length||null===this.actionFactories[t])throw"The specified lexer action type "+t+" is not valid.";return this.actionFactories[t](e,s)}}class vt{syntaxError(t,e,s,n,i,r){}reportAmbiguity(t,e,s,n,i,r,o){}reportAttemptingFullContext(t,e,s,n,i,r){}reportContextSensitivity(t,e,s,n,i,r){}}class wt extends vt{constructor(){super()}syntaxError(t,e,s,n,i,r){console.error("line "+s+":"+n+" "+i)}}wt.INSTANCE=new wt;class Rt extends vt{constructor(t){if(super(),null===t)throw"delegates";return this.delegates=t,this}syntaxError(t,e,s,n,i,r){this.delegates.map(o=>o.syntaxError(t,e,s,n,i,r))}reportAmbiguity(t,e,s,n,i,r,o){this.delegates.map(a=>a.reportAmbiguity(t,e,s,n,i,r,o))}reportAttemptingFullContext(t,e,s,n,i,r){this.delegates.map(o=>o.reportAttemptingFullContext(t,e,s,n,i,r))}reportContextSensitivity(t,e,s,n,i,r){this.delegates.map(o=>o.reportContextSensitivity(t,e,s,n,i,r))}}class Ot{constructor(){this._listeners=[wt.INSTANCE],this._interp=null,this._stateNumber=-1}checkVersion(t){const e="4.13.2";e!==t&&console.log("ANTLR runtime and generated code versions disagree: "+e+"!="+t)}addErrorListener(t){this._listeners.push(t)}removeErrorListeners(){this._listeners=[]}getLiteralNames(){return Object.getPrototypeOf(this).constructor.literalNames||[]}getSymbolicNames(){return Object.getPrototypeOf(this).constructor.symbolicNames||[]}getTokenNames(){if(!this.tokenNames){const t=this.getLiteralNames(),e=this.getSymbolicNames(),s=t.length>e.length?t.length:e.length;this.tokenNames=[];for(let n=0;n<s;n++)this.tokenNames[n]=t[n]||e[n]||"<INVALID"}return this.tokenNames}getTokenTypeMap(){const t=this.getTokenNames();if(null===t)throw"The current recognizer does not provide a list of token names.";let e=this.tokenTypeMapCache[t];return void 0===e&&(e=t.reduce(function(t,e,s){t[e]=s}),e.EOF=i.EOF,this.tokenTypeMapCache[t]=e),e}getRuleIndexMap(){const t=this.ruleNames;if(null===t)throw"The current recognizer does not provide a list of rule names.";let e=this.ruleIndexMapCache[t];return void 0===e&&(e=t.reduce(function(t,e,s){t[e]=s}),this.ruleIndexMapCache[t]=e),e}getTokenType(t){const e=this.getTokenTypeMap()[t];return void 0!==e?e:i.INVALID_TYPE}getErrorHeader(t){return"line "+t.getOffendingToken().line+":"+t.getOffendingToken().column}getTokenErrorDisplay(t){if(null===t)return"<no token>";let e=t.text;return null===e&&(e=t.type===i.EOF?"<EOF>":"<"+t.type+">"),e=e.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+e+"'"}getErrorListenerDispatch(){return console.warn("Calling deprecated method in Recognizer class: getErrorListenerDispatch()"),this.getErrorListener()}getErrorListener(){return new Rt(this._listeners)}sempred(t,e,s){return!0}precpred(t,e){return!0}get atn(){return this._interp.atn}get state(){return this._stateNumber}set state(t){this._stateNumber=t}}Ot.tokenTypeMapCache={},Ot.ruleIndexMapCache={};class Pt extends i{constructor(t,e,s,n,r){super(),this.source=void 0!==t?t:Pt.EMPTY_SOURCE,this.type=void 0!==e?e:null,this.channel=void 0!==s?s:i.DEFAULT_CHANNEL,this.start=void 0!==n?n:-1,this.stop=void 0!==r?r:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=t[0].line,this.column=t[0].column):this.column=-1}clone(){const t=new Pt(this.source,this.type,this.channel,this.start,this.stop);return t.tokenIndex=this.tokenIndex,t.line=this.line,t.column=this.column,t.text=this.text,t}cloneWithType(t){const e=new Pt(this.source,t,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,t===i.EOF&&(e.text=""),e}toString(){let t=this.text;return t=null!==t?t.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"<no text>","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+t+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(null!==this._text)return this._text;const t=this.getInputStream();if(null===t)return null;const e=t.size;return this.start<e&&this.stop<e?t.getText(this.start,this.stop):"<EOF>"}set text(t){this._text=t}}Pt.EMPTY_SOURCE=[null,null];class bt{}class Ft extends bt{constructor(t){super(),this.copyText=void 0!==t&&t}create(t,e,s,n,i,r,o,a){const l=new Pt(t,e,n,i,r);return l.line=o,l.column=a,null!==s?l.text=s:this.copyText&&null!==t[1]&&(l.text=t[1].getText(i,r)),l}createThin(t,e){const s=new Pt(null,t);return s.text=e,s}}Ft.DEFAULT=new Ft;class Dt extends Error{constructor(t){super(t.message),Error.captureStackTrace&&Error.captureStackTrace(this,Dt),this.message=t.message,this.recognizer=t.recognizer,this.input=t.input,this.ctx=t.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state)}getExpectedTokens(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}}class Mt extends Dt{constructor(t,e,s,n){super({message:"",recognizer:t,input:e,ctx:null}),this.startIndex=s,this.deadEndConfigs=n}toString(){let t="";return this.startIndex>=0&&this.startIndex<this.input.size&&(t=this.input.getText(new E(this.startIndex,this.startIndex))),"LexerNoViableAltException"+t}}class Ut extends Ot{constructor(t){super(),this._input=t,this._factory=Ft.DEFAULT,this._tokenFactorySourcePair=[this,t],this._interp=null,this._token=null,this._tokenStartCharIndex=-1,this._tokenStartLine=-1,this._tokenStartColumn=-1,this._hitEOF=!1,this._channel=i.DEFAULT_CHANNEL,this._type=i.INVALID_TYPE,this._modeStack=[],this._mode=Ut.DEFAULT_MODE,this._text=null}reset(){null!==this._input&&this._input.seek(0),this._token=null,this._type=i.INVALID_TYPE,this._channel=i.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=Ut.DEFAULT_MODE,this._modeStack=[],this._interp.reset()}nextToken(){if(null===this._input)throw"nextToken requires a non-null input stream.";const t=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=i.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;let e=!1;for(;;){this._type=i.INVALID_TYPE;let s=Ut.SKIP;try{s=this._interp.match(this._input,this._mode)}catch(t){if(!(t instanceof Dt))throw console.log(t.stack),t;this.notifyListeners(t),this.recover(t)}if(this._input.LA(1)===i.EOF&&(this._hitEOF=!0),this._type===i.INVALID_TYPE&&(this._type=s),this._type===Ut.SKIP){e=!0;break}if(this._type!==Ut.MORE)break}if(!e)return null===this._token&&this.emit(),this._token}}finally{this._input.release(t)}}skip(){this._type=Ut.SKIP}more(){this._type=Ut.MORE}mode(t){console.warn("Calling deprecated method in Lexer class: mode(...)"),this.setMode(t)}setMode(t){this._mode=t}getMode(){return this._mode}getModeStack(){return this._modeStack}pushMode(t){this._interp.debug&&console.log("pushMode "+t),this._modeStack.push(this._mode),this.setMode(t)}popMode(){if(0===this._modeStack.length)throw"Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.setMode(this._modeStack.pop()),this._mode}emitToken(t){this._token=t}emit(){const t=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(t),t}emitEOF(){const t=this.column,e=this.line,s=this._factory.create(this._tokenFactorySourcePair,i.EOF,null,i.DEFAULT_CHANNEL,this._input.index,this._input.index-1,e,t);return this.emitToken(s),s}getCharIndex(){return this._input.index}getAllTokens(){const t=[];let e=this.nextToken();for(;e.type!==i.EOF;)t.push(e),e=this.nextToken();return t}notifyListeners(t){const e=this._tokenStartCharIndex,s=this._input.index,n=this._input.getText(e,s),i="token recognition error at: '"+this.getErrorDisplay(n)+"'";this.getErrorListener().syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,i,t)}getErrorDisplay(t){const e=[];for(let s=0;s<t.length;s++)e.push(t[s]);return e.join("")}getErrorDisplayForChar(t){return t.charCodeAt(0)===i.EOF?"<EOF>":"\n"===t?"\\n":"\t"===t?"\\t":"\r"===t?"\\r":t}getCharErrorDisplay(t){return"'"+this.getErrorDisplayForChar(t)+"'"}recover(t){this._input.LA(1)!==i.EOF&&(t instanceof Mt?this._interp.consume(this._input):this._input.consume())}get inputStream(){return this._input}set inputStream(t){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=t,this._tokenFactorySourcePair=[this,this._input]}get sourceName(){return this._input.sourceName}get type(){return this._type}set type(t){this._type=t}get line(){return this._interp.line}set line(t){this._interp.line=t}get column(){return this._interp.column}set column(t){this._interp.column=t}get text(){return null!==this._text?this._text:this._interp.getText(this._input)}set text(t){this._text=t}}function Ht(t){return t.hashCodeForConfigSet()}function Bt(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}Ut.DEFAULT_MODE=0,Ut.MORE=-2,Ut.SKIP=-3,Ut.DEFAULT_TOKEN_CHANNEL=i.DEFAULT_CHANNEL,Ut.HIDDEN=i.HIDDEN_CHANNEL,Ut.MIN_CHAR_VALUE=0,Ut.MAX_CHAR_VALUE=1114111;class Vt{constructor(t){this.configLookup=new p(Ht,Bt),this.fullCtx=void 0===t||t,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1}add(t,e){if(void 0===e&&(e=null),this.readOnly)throw"This set is readonly";t.semanticContext!==g.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);const s=this.configLookup.getOrAdd(t);if(s===t)return this.cachedHashCode=-1,this.configs.push(t),!0;const n=!this.fullCtx,i=W(s.context,t.context,n,e);return s.reachesIntoOuterContext=Math.max(s.reachesIntoOuterContext,t.reachesIntoOuterContext),t.precedenceFilterSuppressed&&(s.precedenceFilterSuppressed=!0),s.context=i,!0}getStates(){const t=new p;for(let e=0;e<this.configs.length;e++)t.add(this.configs[e].state);return t}getPredicates(){const t=[];for(let e=0;e<this.configs.length;e++){const s=this.configs[e].semanticContext;s!==g.NONE&&t.push(s.semanticContext)}return t}optimizeConfigs(t){if(this.readOnly)throw"This set is readonly";if(0!==this.configLookup.length)for(let e=0;e<this.configs.length;e++){const s=this.configs[e];s.context=t.getCachedContext(s.context)}}addAll(t){for(let e=0;e<t.length;e++)this.add(t[e]);return!1}equals(t){return this===t||t instanceof Vt&&r(this.configs,t.configs)&&this.fullCtx===t.fullCtx&&this.uniqueAlt===t.uniqueAlt&&this.conflictingAlts===t.conflictingAlts&&this.hasSemanticContext===t.hasSemanticContext&&this.dipsIntoOuterContext===t.dipsIntoOuterContext}hashCode(){const t=new l;return t.update(this.configs),t.finish()}updateHashCode(t){this.readOnly?(-1===this.cachedHashCode&&(this.cachedHashCode=this.hashCode()),t.update(this.cachedHashCode)):t.update(this.hashCode())}isEmpty(){return 0===this.configs.length}contains(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.contains(t)}containsFast(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.containsFast(t)}clear(){if(this.readOnly)throw"This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new p}setReadonly(t){this.readOnly=t,t&&(this.configLookup=null)}toString(){return d(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==j.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(null!==this.conflictingAlts?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")}get items(){return this.configs}get length(){return this.configs.length}}class zt{constructor(t,e){return null===t&&(t=-1),null===e&&(e=new Vt),this.stateNumber=t,this.configs=e,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}getAltSet(){const t=new p;if(null!==this.configs)for(let e=0;e<this.configs.length;e++){const s=this.configs[e];t.add(s.alt)}return 0===t.length?null:t}equals(t){return this===t||t instanceof zt&&this.configs.equals(t.configs)}toString(){let t=this.stateNumber+":"+this.configs;return this.isAcceptState&&(t+="=>",null!==this.predicates?t+=this.predicates:t+=this.prediction),t}hashCode(){const t=new l;return t.update(this.configs),t.finish()}}class Yt{constructor(t,e){return this.atn=t,this.sharedContextCache=e,this}getCachedContext(t){if(null===this.sharedContextCache)return t;const e=new Y;return K(t,this.sharedContextCache,e)}}Yt.ERROR=new zt(2147483647,new Vt);class qt extends Vt{constructor(){super(),this.configLookup=new p}}class Kt extends m{constructor(t,e){super(t,e);const s=t.lexerActionExecutor||null;return this.lexerActionExecutor=s||(null!==e?e.lexerActionExecutor:null),this.passedThroughNonGreedyDecision=null!==e&&this.checkNonGreedyDecision(e,this.state),this.hashCodeForConfigSet=Kt.prototype.hashCode,this.equalsForConfigSet=Kt.prototype.equals,this}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor)}equals(t){return this===t||t instanceof Kt&&this.passedThroughNonGreedyDecision===t.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(t.lexerActionExecutor):!t.lexerActionExecutor)&&super.equals(t)}checkNonGreedyDecision(t,e){return t.passedThroughNonGreedyDecision||e instanceof J&&e.nonGreedy}}class Wt extends Tt{constructor(t,e){super(e.actionType),this.offset=t,this.action=e,this.isPositionDependent=!0}execute(t){this.action.execute(t)}updateHashCode(t){t.update(this.actionType,this.offset,this.action)}equals(t){return this===t||t instanceof Wt&&this.offset===t.offset&&this.action===t.action}}class Gt{constructor(t){return this.lexerActions=null===t?[]:t,this.cachedHashCode=l.hashStuff(t),this}fixOffsetBeforeMatch(t){let e=null;for(let s=0;s<this.lexerActions.length;s++)!this.lexerActions[s].isPositionDependent||this.lexerActions[s]instanceof Wt||(null===e&&(e=this.lexerActions.concat([])),e[s]=new Wt(t,this.lexerActions[s]));return null===e?this:new Gt(e)}execute(t,e,s){let n=!1;const i=e.index;try{for(let r=0;r<this.lexerActions.length;r++){let o=this.lexerActions[r];if(o instanceof Wt){const t=o.offset;e.seek(s+t),o=o.action,n=s+t!==i}else o.isPositionDependent&&(e.seek(i),n=!1);o.execute(t)}}finally{n&&e.seek(i)}}hashCode(){return this.cachedHashCode}updateHashCode(t){t.update(this.cachedHashCode)}equals(t){if(this===t)return!0;if(t instanceof Gt){if(this.cachedHashCode!=t.cachedHashCode)return!1;if(this.lexerActions.length!=t.lexerActions.length)return!1;{const e=this.lexerActions.length;for(let s=0;s<e;++s)if(!this.lexerActions[s].equals(t.lexerActions[s]))return!1;return!0}}return!1}static append(t,e){if(null===t)return new Gt([e]);const s=t.lexerActions.concat([e]);return new Gt(s)}}function $t(t){t.index=-1,t.line=0,t.column=-1,t.dfaState=null}class jt{constructor(){$t(this)}reset(){$t(this)}}class Xt extends Yt{constructor(t,e,s,n){super(e,n),this.decisionToDFA=s,this.recog=t,this.startIndex=-1,this.line=1,this.column=0,this.mode=Ut.DEFAULT_MODE,this.prevAccept=new jt}copyState(t){this.column=t.column,this.line=t.line,this.mode=t.mode,this.startIndex=t.startIndex}match(t,e){this.mode=e;const s=t.mark();try{this.startIndex=t.index,this.prevAccept.reset();const s=this.decisionToDFA[e];return null===s.s0?this.matchATN(t):this.execATN(t,s.s0)}finally{t.release(s)}}reset(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=Ut.DEFAULT_MODE}matchATN(t){const e=this.atn.modeToStartState[this.mode];Xt.debug&&console.log("matchATN mode "+this.mode+" start: "+e);const s=this.mode,n=this.computeStartState(t,e),i=n.hasSemanticContext;n.hasSemanticContext=!1;const r=this.addDFAState(n);i||(this.decisionToDFA[this.mode].s0=r);const o=this.execATN(t,r);return Xt.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[s].toLexerString()),o}execATN(t,e){Xt.debug&&console.log("start state closure="+e.configs),e.isAcceptState&&this.captureSimState(this.prevAccept,t,e);let s=t.LA(1),n=e;for(;;){Xt.debug&&console.log("execATN loop starting closure: "+n.configs);let e=this.getExistingTargetState(n,s);if(null===e&&(e=this.computeTargetState(t,n,s)),e===Yt.ERROR)break;if(s!==i.EOF&&this.consume(t),e.isAcceptState&&(this.captureSimState(this.prevAccept,t,e),s===i.EOF))break;s=t.LA(1),n=e}return this.failOrAccept(this.prevAccept,t,n.configs,s)}getExistingTargetState(t,e){if(null===t.edges||e<Xt.MIN_DFA_EDGE||e>Xt.MAX_DFA_EDGE)return null;let s=t.edges[e-Xt.MIN_DFA_EDGE];return void 0===s&&(s=null),Xt.debug&&null!==s&&console.log("reuse state "+t.stateNumber+" edge to "+s.stateNumber),s}computeTargetState(t,e,s){const n=new qt;return this.getReachableConfigSet(t,e.configs,n,s),0===n.items.length?(n.hasSemanticContext||this.addDFAEdge(e,s,Yt.ERROR),Yt.ERROR):this.addDFAEdge(e,s,null,n)}failOrAccept(t,e,s,n){if(null!==this.prevAccept.dfaState){const s=t.dfaState.lexerActionExecutor;return this.accept(e,s,this.startIndex,t.index,t.line,t.column),t.dfaState.prediction}if(n===i.EOF&&e.index===this.startIndex)return i.EOF;throw new Mt(this.recog,e,this.startIndex,s)}getReachableConfigSet(t,e,s,n){let r=j.INVALID_ALT_NUMBER;for(let o=0;o<e.items.length;o++){const a=e.items[o],l=a.alt===r;if(!l||!a.passedThroughNonGreedyDecision){Xt.debug&&console.log("testing %s at %s\n",this.getTokenName(n),a.toString(this.recog,!0));for(let e=0;e<a.state.transitions.length;e++){const o=a.state.transitions[e],h=this.getReachableTarget(o,n);if(null!==h){let e=a.lexerActionExecutor;null!==e&&(e=e.fixOffsetBeforeMatch(t.index-this.startIndex));const o=n===i.EOF,c=new Kt({state:h,lexerActionExecutor:e},a);this.closure(t,c,s,l,!0,o)&&(r=a.alt)}}}}}accept(t,e,s,n,i,r){Xt.debug&&console.log("ACTION %s\n",e),t.seek(n),this.line=i,this.column=r,null!==e&&null!==this.recog&&e.execute(this.recog,t,s)}getReachableTarget(t,e){return t.matches(e,0,Ut.MAX_CHAR_VALUE)?t.target:null}computeStartState(t,e){const s=H.EMPTY,n=new qt;for(let i=0;i<e.transitions.length;i++){const r=e.transitions[i].target,o=new Kt({state:r,alt:i+1,context:s},null);this.closure(t,o,n,!1,!1,!1)}return n}closure(t,e,s,n,i,r){let o=null;if(Xt.debug&&console.log("closure("+e.toString(this.recog,!0)+")"),e.state instanceof A){if(Xt.debug&&(null!==this.recog?console.log("closure at %s rule stop %s\n",this.recog.ruleNames[e.state.ruleIndex],e):console.log("closure at rule stop %s\n",e)),null===e.context||e.context.hasEmptyPath()){if(null===e.context||e.context.isEmpty())return s.add(e),!0;s.add(new Kt({state:e.state,context:H.EMPTY},e)),n=!0}if(null!==e.context&&!e.context.isEmpty())for(let a=0;a<e.context.length;a++)if(e.context.getReturnState(a)!==H.EMPTY_RETURN_STATE){const l=e.context.getParent(a),h=this.atn.states[e.context.getReturnState(a)];o=new Kt({state:h,context:l},e),n=this.closure(t,o,s,n,i,r)}return n}e.state.epsilonOnlyTransitions||n&&e.passedThroughNonGreedyDecision||s.add(e);for(let a=0;a<e.state.transitions.length;a++){const l=e.state.transitions[a];o=this.getEpsilonTarget(t,e,l,s,i,r),null!==o&&(n=this.closure(t,o,s,n,i,r))}return n}getEpsilonTarget(t,e,s,n,r,o){let a=null;if(s.serializationType===N.RULE){const t=V.create(e.context,s.followState.stateNumber);a=new Kt({state:s.target,context:t},e)}else{if(s.serializationType===N.PRECEDENCE)throw"Precedence predicates are not supported in lexers.";if(s.serializationType===N.PREDICATE)Xt.debug&&console.log("EVAL rule "+s.ruleIndex+":"+s.predIndex),n.hasSemanticContext=!0,this.evaluatePredicate(t,s.ruleIndex,s.predIndex,r)&&(a=new Kt({state:s.target},e));else if(s.serializationType===N.ACTION)if(null===e.context||e.context.hasEmptyPath()){const t=Gt.append(e.lexerActionExecutor,this.atn.lexerActions[s.actionIndex]);a=new Kt({state:s.target,lexerActionExecutor:t},e)}else a=new Kt({state:s.target},e);else s.serializationType===N.EPSILON?a=new Kt({state:s.target},e):s.serializationType!==N.ATOM&&s.serializationType!==N.RANGE&&s.serializationType!==N.SET||o&&s.matches(i.EOF,0,Ut.MAX_CHAR_VALUE)&&(a=new Kt({state:s.target},e))}return a}evaluatePredicate(t,e,s,n){if(null===this.recog)return!0;if(!n)return this.recog.sempred(null,e,s);const i=this.column,r=this.line,o=t.index,a=t.mark();try{return this.consume(t),this.recog.sempred(null,e,s)}finally{this.column=i,this.line=r,t.seek(o),t.release(a)}}captureSimState(t,e,s){t.index=e.index,t.line=this.line,t.column=this.column,t.dfaState=s}addDFAEdge(t,e,s,n){if(void 0===s&&(s=null),void 0===n&&(n=null),null===s&&null!==n){const t=n.hasSemanticContext;if(n.hasSemanticContext=!1,s=this.addDFAState(n),t)return s}return e<Xt.MIN_DFA_EDGE||e>Xt.MAX_DFA_EDGE||(Xt.debug&&console.log("EDGE "+t+" -> "+s+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-Xt.MIN_DFA_EDGE]=s),s}addDFAState(t){const e=new zt(null,t);let s=null;for(let e=0;e<t.items.length;e++){const n=t.items[e];if(n.state instanceof A){s=n;break}}null!==s&&(e.isAcceptState=!0,e.lexerActionExecutor=s.lexerActionExecutor,e.prediction=this.atn.ruleToTokenType[s.state.ruleIndex]);const n=this.decisionToDFA[this.mode],i=n.states.get(e);if(null!==i)return i;const r=e;return r.stateNumber=n.states.length,t.setReadonly(!0),r.configs=t,n.states.add(r),r}getDFA(t){return this.decisionToDFA[t]}getText(t){return t.getText(this.startIndex,t.index-1)}consume(t){t.LA(1)==="\n".charCodeAt(0)?(this.line+=1,this.column=0):this.column+=1,t.consume()}getTokenName(t){return-1===t?"EOF":"'"+String.fromCharCode(t)+"'"}}Xt.debug=!1,Xt.dfa_debug=!1,Xt.MIN_DFA_EDGE=0,Xt.MAX_DFA_EDGE=127;class Jt{constructor(t,e){this.alt=e,this.pred=t}toString(){return"("+this.pred+", "+this.alt+")"}}class Qt{constructor(){this.data={}}get(t){return this.data["k-"+t]||null}set(t,e){this.data["k-"+t]=e}values(){return Object.keys(this.data).filter(t=>t.startsWith("k-")).map(t=>this.data[t],this)}}const Zt={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(t,e){if(Zt.allConfigsInRuleStopStates(e))return!0;if(t===Zt.SLL&&e.hasSemanticContext){const t=new Vt;for(let s=0;s<e.items.length;s++){let n=e.items[s];n=new m({semanticContext:g.NONE},n),t.add(n)}e=t}const s=Zt.getConflictingAltSubsets(e);return Zt.hasConflictingAltSet(s)&&!Zt.hasStateAssociatedWithOneAlt(e)},hasConfigInRuleStopState:function(t){for(let e=0;e<t.items.length;e++)if(t.items[e].state instanceof A)return!0;return!1},allConfigsInRuleStopStates:function(t){for(let e=0;e<t.items.length;e++)if(!(t.items[e].state instanceof A))return!1;return!0},resolvesToJustOneViableAlt:function(t){return Zt.getSingleViableAlt(t)},allSubsetsConflict:function(t){return!Zt.hasNonConflictingAltSet(t)},hasNonConflictingAltSet:function(t){for(let e=0;e<t.length;e++)if(1===t[e].length)return!0;return!1},hasConflictingAltSet:function(t){for(let e=0;e<t.length;e++)if(t[e].length>1)return!0;return!1},allSubsetsEqual:function(t){let e=null;for(let s=0;s<t.length;s++){const n=t[s];if(null===e)e=n;else if(n!==e)return!1}return!0},getUniqueAlt:function(t){const e=Zt.getAlts(t);return 1===e.length?e.minValue():j.INVALID_ALT_NUMBER},getAlts:function(t){const e=new G;return t.map(function(t){e.or(t)}),e},getConflictingAltSubsets:function(t){const e=new Y;return e.hashFunction=function(t){l.hashStuff(t.state.stateNumber,t.context)},e.equalsFunction=function(t,e){return t.state.stateNumber===e.state.stateNumber&&t.context.equals(e.context)},t.items.map(function(t){let s=e.get(t);null===s&&(s=new G,e.set(t,s)),s.set(t.alt)}),e.getValues()},getStateToAltMap:function(t){const e=new Qt;return t.items.map(function(t){let s=e.get(t.state);null===s&&(s=new G,e.set(t.state,s)),s.set(t.alt)}),e},hasStateAssociatedWithOneAlt:function(t){const e=Zt.getStateToAltMap(t).values();for(let t=0;t<e.length;t++)if(1===e[t].length)return!0;return!1},getSingleViableAlt:function(t){let e=null;for(let s=0;s<t.length;s++){const n=t[s].minValue();if(null===e)e=n;else if(e!==n)return j.INVALID_ALT_NUMBER}return e}},te=Zt;class ee extends Dt{constructor(t,e,s,n,i,r){r=r||t._ctx,n=n||t.getCurrentToken(),s=s||t.getCurrentToken(),e=e||t.getInputStream(),super({message:"",recognizer:t,input:e,ctx:r}),this.deadEndConfigs=i,this.startToken=s,this.offendingToken=n}}class se{constructor(t){this.defaultMapCtor=t||Y,this.cacheMap=new this.defaultMapCtor}get(t,e){const s=this.cacheMap.get(t)||null;return null===s?null:s.get(e)||null}set(t,e,s){let n=this.cacheMap.get(t)||null;null===n&&(n=new this.defaultMapCtor,this.cacheMap.set(t,n)),n.set(e,s)}}class ne extends Yt{constructor(t,e,s,n){super(e,n),this.parser=t,this.decisionToDFA=s,this.predictionMode=te.LL,this._input=null,this._startIndex=0,this._outerContext=null,this._dfa=null,this.mergeCache=null,this.debug=!1,this.debug_closure=!1,this.debug_add=!1,this.trace_atn_sim=!1,this.dfa_debug=!1,this.retry_debug=!1}reset(){}adaptivePredict(t,e,s){(this.debug||this.trace_atn_sim)&&console.log("adaptivePredict decision "+e+" exec LA(1)=="+this.getLookaheadName(t)+" line "+t.LT(1).line+":"+t.LT(1).column),this._input=t,this._startIndex=t.index,this._outerContext=s;const n=this.decisionToDFA[e];this._dfa=n;const i=t.mark(),r=t.index;try{let e;if(e=n.precedenceDfa?n.getPrecedenceStartState(this.parser.getPrecedence()):n.s0,null===e){null===s&&(s=U.EMPTY),this.debug&&console.log("predictATN decision "+n.decision+" exec LA(1)=="+this.getLookaheadName(t)+", outerContext="+s.toString(this.parser.ruleNames));const i=!1;let r=this.computeStartState(n.atnStartState,U.EMPTY,i);n.precedenceDfa?(n.s0.configs=r,r=this.applyPrecedenceFilter(r),e=this.addDFAState(n,new zt(null,r)),n.setPrecedenceStartState(this.parser.getPrecedence(),e)):(e=this.addDFAState(n,new zt(null,r)),n.s0=e)}const i=this.execATN(n,e,t,r,s);return this.debug&&console.log("DFA after predictATN: "+n.toString(this.parser.literalNames,this.parser.symbolicNames)),i}finally{this._dfa=null,this.mergeCache=null,t.seek(r),t.release(i)}}execATN(t,e,s,n,r){let o;(this.debug||this.trace_atn_sim)&&console.log("execATN decision "+t.decision+", DFA state "+e+", LA(1)=="+this.getLookaheadName(s)+" line "+s.LT(1).line+":"+s.LT(1).column);let a=e;this.debug&&console.log("s0 = "+e);let l=s.LA(1);for(;;){let e=this.getExistingTargetState(a,l);if(null===e&&(e=this.computeTargetState(t,a,l)),e===Yt.ERROR){const t=this.noViableAlt(s,r,a.configs,n);if(s.seek(n),o=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(a.configs,r),o!==j.INVALID_ALT_NUMBER)return o;throw t}if(e.requiresFullContext&&this.predictionMode!==te.SLL){let i=null;if(null!==e.predicates){this.debug&&console.log("DFA state has preds in DFA sim LL failover");const t=s.index;if(t!==n&&s.seek(n),i=this.evalSemanticContext(e.predicates,r,!0),1===i.length)return this.debug&&console.log("Full LL avoided"),i.minValue();t!==n&&s.seek(t)}this.dfa_debug&&console.log("ctx sensitive state "+r+" in "+e);const a=!0,l=this.computeStartState(t.atnStartState,r,a);return this.reportAttemptingFullContext(t,i,e.configs,n,s.index),o=this.execATNWithFullContext(t,e,l,s,n,r),o}if(e.isAcceptState){if(null===e.predicates)return e.prediction;const i=s.index;s.seek(n);const o=this.evalSemanticContext(e.predicates,r,!0);if(0===o.length)throw this.noViableAlt(s,r,e.configs,n);return 1===o.length||this.reportAmbiguity(t,e,n,i,!1,o,e.configs),o.minValue()}a=e,l!==i.EOF&&(s.consume(),l=s.LA(1))}}getExistingTargetState(t,e){const s=t.edges;return null===s?null:s[e+1]||null}computeTargetState(t,e,s){const n=this.computeReachSet(e.configs,s,!1);if(null===n)return this.addDFAEdge(t,e,s,Yt.ERROR),Yt.ERROR;let i=new zt(null,n);const r=this.getUniqueAlt(n);if(this.debug){const t=te.getConflictingAltSubsets(n);console.log("SLL altSubSets="+d(t)+", configs="+n+", predict="+r+", allSubsetsConflict="+te.allSubsetsConflict(t)+", conflictingAlts="+this.getConflictingAlts(n))}return r!==j.INVALID_ALT_NUMBER?(i.isAcceptState=!0,i.configs.uniqueAlt=r,i.prediction=r):te.hasSLLConflictTerminatingPrediction(this.predictionMode,n)&&(i.configs.conflictingAlts=this.getConflictingAlts(n),i.requiresFullContext=!0,i.isAcceptState=!0,i.prediction=i.configs.conflictingAlts.minValue()),i.isAcceptState&&i.configs.hasSemanticContext&&(this.predicateDFAState(i,this.atn.getDecisionState(t.decision)),null!==i.predicates&&(i.prediction=j.INVALID_ALT_NUMBER)),i=this.addDFAEdge(t,e,s,i),i}predicateDFAState(t,e){const s=e.transitions.length,n=this.getConflictingAltsOrUniqueAlt(t.configs),i=this.getPredsForAmbigAlts(n,t.configs,s);null!==i?(t.predicates=this.getPredicatePredictions(n,i),t.prediction=j.INVALID_ALT_NUMBER):t.prediction=n.minValue()}execATNWithFullContext(t,e,s,n,r,o){(this.debug||this.trace_atn_sim)&&console.log("execATNWithFullContext "+s);let a,l=!1,h=s;n.seek(r);let c=n.LA(1),u=-1;for(;;){if(a=this.computeReachSet(h,c,!0),null===a){const t=this.noViableAlt(n,o,h,r);n.seek(r);const e=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(h,o);if(e!==j.INVALID_ALT_NUMBER)return e;throw t}const t=te.getConflictingAltSubsets(a);if(this.debug&&console.log("LL altSubSets="+t+", predict="+te.getUniqueAlt(t)+", resolvesToJustOneViableAlt="+te.resolvesToJustOneViableAlt(t)),a.uniqueAlt=this.getUniqueAlt(a),a.uniqueAlt!==j.INVALID_ALT_NUMBER){u=a.uniqueAlt;break}if(this.predictionMode!==te.LL_EXACT_AMBIG_DETECTION){if(u=te.resolvesToJustOneViableAlt(t),u!==j.INVALID_ALT_NUMBER)break}else if(te.allSubsetsConflict(t)&&te.allSubsetsEqual(t)){l=!0,u=te.getSingleViableAlt(t);break}h=a,c!==i.EOF&&(n.consume(),c=n.LA(1))}return a.uniqueAlt!==j.INVALID_ALT_NUMBER?(this.reportContextSensitivity(t,u,a,r,n.index),u):(this.reportAmbiguity(t,e,r,n.index,l,null,a),u)}computeReachSet(t,e,s){this.debug&&console.log("in computeReachSet, starting closure: "+t),null===this.mergeCache&&(this.mergeCache=new se);const n=new Vt(s);let r=null;for(let o=0;o<t.items.length;o++){const a=t.items[o];if(this.debug&&console.log("testing "+this.getTokenName(e)+" at "+a),a.state instanceof A)(s||e===i.EOF)&&(null===r&&(r=[]),r.push(a),this.debug_add&&console.log("added "+a+" to skippedStopStates"));else for(let t=0;t<a.state.transitions.length;t++){const s=a.state.transitions[t],i=this.getReachableTarget(s,e);if(null!==i){const t=new m({state:i},a);n.add(t,this.mergeCache),this.debug_add&&console.log("added "+t+" to intermediate")}}}let o=null;if(null===r&&e!==i.EOF&&(1===n.items.length||this.getUniqueAlt(n)!==j.INVALID_ALT_NUMBER)&&(o=n),null===o){o=new Vt(s);const t=new p,r=e===i.EOF;for(let e=0;e<n.items.length;e++)this.closure(n.items[e],o,t,!1,s,r)}if(e===i.EOF&&(o=this.removeAllConfigsNotInRuleStopState(o,o===n)),!(null===r||s&&te.hasConfigInRuleStopState(o)))for(let t=0;t<r.length;t++)o.add(r[t],this.mergeCache);return this.trace_atn_sim&&console.log("computeReachSet "+t+" -> "+o),0===o.items.length?null:o}removeAllConfigsNotInRuleStopState(t,e){if(te.allConfigsInRuleStopStates(t))return t;const s=new Vt(t.fullCtx);for(let n=0;n<t.items.length;n++){const r=t.items[n];if(r.state instanceof A)s.add(r,this.mergeCache);else if(e&&r.state.epsilonOnlyTransitions&&this.atn.nextTokens(r.state).contains(i.EPSILON)){const t=this.atn.ruleToStopState[r.state.ruleIndex];s.add(new m({state:t},r),this.mergeCache)}}return s}computeStartState(t,e,s){const n=q(this.atn,e),i=new Vt(s);this.trace_atn_sim&&console.log("computeStartState from ATN state "+t+" initialContext="+n.toString(this.parser));for(let e=0;e<t.transitions.length;e++){const r=t.transitions[e].target,o=new m({state:r,alt:e+1,context:n},null),a=new p;this.closure(o,i,a,!0,s,!1)}return i}applyPrecedenceFilter(t){let e;const s=[],n=new Vt(t.fullCtx);for(let i=0;i<t.items.length;i++){if(e=t.items[i],1!==e.alt)continue;const r=e.semanticContext.evalPrecedence(this.parser,this._outerContext);null!==r&&(s[e.state.stateNumber]=e.context,r!==e.semanticContext?n.add(new m({semanticContext:r},e),this.mergeCache):n.add(e,this.mergeCache))}for(let i=0;i<t.items.length;i++)if(e=t.items[i],1!==e.alt){if(!e.precedenceFilterSuppressed){const t=s[e.state.stateNumber]||null;if(null!==t&&t.equals(e.context))continue}n.add(e,this.mergeCache)}return n}getReachableTarget(t,e){return t.matches(e,0,this.atn.maxTokenType)?t.target:null}getPredsForAmbigAlts(t,e,s){let n=[];for(let s=0;s<e.items.length;s++){const i=e.items[s];t.get(i.alt)&&(n[i.alt]=g.orContext(n[i.alt]||null,i.semanticContext))}let i=0;for(let t=1;t<s+1;t++){const e=n[t]||null;null===e?n[t]=g.NONE:e!==g.NONE&&(i+=1)}return 0===i&&(n=null),this.debug&&console.log("getPredsForAmbigAlts result "+d(n)),n}getPredicatePredictions(t,e){const s=[];let n=!1;for(let i=1;i<e.length;i++){const r=e[i];null!==t&&t.get(i)&&s.push(new Jt(r,i)),r!==g.NONE&&(n=!0)}return n?s:null}getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(t,e){const s=this.splitAccordingToSemanticValidity(t,e),n=s[0],i=s[1];let r=this.getAltThatFinishedDecisionEntryRule(n);return r!==j.INVALID_ALT_NUMBER||i.items.length>0&&(r=this.getAltThatFinishedDecisionEntryRule(i),r!==j.INVALID_ALT_NUMBER)?r:j.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(t){const e=[];for(let s=0;s<t.items.length;s++){const n=t.items[s];(n.reachesIntoOuterContext>0||n.state instanceof A&&n.context.hasEmptyPath())&&e.indexOf(n.alt)<0&&e.push(n.alt)}return 0===e.length?j.INVALID_ALT_NUMBER:Math.min.apply(null,e)}splitAccordingToSemanticValidity(t,e){const s=new Vt(t.fullCtx),n=new Vt(t.fullCtx);for(let i=0;i<t.items.length;i++){const r=t.items[i];r.semanticContext!==g.NONE?r.semanticContext.evaluate(this.parser,e)?s.add(r):n.add(r):s.add(r)}return[s,n]}evalSemanticContext(t,e,s){const n=new G;for(let i=0;i<t.length;i++){const r=t[i];if(r.pred===g.NONE){if(n.set(r.alt),!s)break;continue}const o=r.pred.evaluate(this.parser,e);if((this.debug||this.dfa_debug)&&console.log("eval pred "+r+"="+o),o&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+r.alt),n.set(r.alt),!s))break}return n}closure(t,e,s,n,i,r){this.closureCheckingStopState(t,e,s,n,i,0,r)}closureCheckingStopState(t,e,s,n,i,r,o){if((this.trace_atn_sim||this.debug_closure)&&console.log("closure("+t.toString(this.parser,!0)+")"),t.state instanceof A){if(!t.context.isEmpty()){for(let a=0;a<t.context.length;a++){if(t.context.getReturnState(a)===H.EMPTY_RETURN_STATE){if(i){e.add(new m({state:t.state,context:H.EMPTY},t),this.mergeCache);continue}this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex)),this.closure_(t,e,s,n,i,r,o);continue}const l=this.atn.states[t.context.getReturnState(a)],h=t.context.getParent(a),c={state:l,alt:t.alt,context:h,semanticContext:t.semanticContext},u=new m(c,null);u.reachesIntoOuterContext=t.reachesIntoOuterContext,this.closureCheckingStopState(u,e,s,n,i,r-1,o)}return}if(i)return void e.add(t,this.mergeCache);this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex))}this.closure_(t,e,s,n,i,r,o)}closure_(t,e,s,n,i,r,o){const a=t.state;a.epsilonOnlyTransitions||e.add(t,this.mergeCache);for(let l=0;l<a.transitions.length;l++){if(0===l&&this.canDropLoopEntryEdgeInLeftRecursiveRule(t))continue;const h=a.transitions[l],c=n&&!(h instanceof ut),u=this.getEpsilonTarget(t,h,c,0===r,i,o);if(null!==u){let n=r;if(t.state instanceof A){if(null!==this._dfa&&this._dfa.precedenceDfa&&h.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(u.precedenceFilterSuppressed=!0),u.reachesIntoOuterContext+=1,s.getOrAdd(u)!==u)continue;e.dipsIntoOuterContext=!0,n-=1,this.debug&&console.log("dips into outer ctx: "+u)}else{if(!h.isEpsilon&&s.getOrAdd(u)!==u)continue;h instanceof y&&n>=0&&(n+=1)}this.closureCheckingStopState(u,e,s,c,i,n,o)}}}canDropLoopEntryEdgeInLeftRecursiveRule(t){const e=t.state;if(e.stateType!==C.STAR_LOOP_ENTRY)return!1;if(e.stateType!==C.STAR_LOOP_ENTRY||!e.isPrecedenceDecision||t.context.isEmpty()||t.context.hasEmptyPath())return!1;const s=t.context.length;for(let n=0;n<s;n++)if(this.atn.states[t.context.getReturnState(n)].ruleIndex!==e.ruleIndex)return!1;const n=e.transitions[0].target.endState.stateNumber,i=this.atn.states[n];for(let n=0;n<s;n++){const s=t.context.getReturnState(n),r=this.atn.states[s];if(1!==r.transitions.length||!r.transitions[0].isEpsilon)return!1;const o=r.transitions[0].target;if(!(r.stateType===C.BLOCK_END&&o===e||r===i||o===i||o.stateType===C.BLOCK_END&&1===o.transitions.length&&o.transitions[0].isEpsilon&&o.transitions[0].target===e))return!1}return!0}getRuleName(t){return null!==this.parser&&t>=0?this.parser.ruleNames[t]:"<rule "+t+">"}getEpsilonTarget(t,e,s,n,r,o){switch(e.serializationType){case N.RULE:return this.ruleTransition(t,e);case N.PRECEDENCE:return this.precedenceTransition(t,e,s,n,r);case N.PREDICATE:return this.predTransition(t,e,s,n,r);case N.ACTION:return this.actionTransition(t,e);case N.EPSILON:return new m({state:e.target},t);case N.ATOM:case N.RANGE:case N.SET:return o&&e.matches(i.EOF,0,1)?new m({state:e.target},t):null;default:return null}}actionTransition(t,e){if(this.debug){const t=-1===e.actionIndex?65535:e.actionIndex;console.log("ACTION edge "+e.ruleIndex+":"+t)}return new m({state:e.target},t)}precedenceTransition(t,e,s,n,i){this.debug&&(console.log("PRED (collectPredicates="+s+") "+e.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+d(this.parser.getRuleInvocationStack())));let r=null;if(s&&n)if(i){const s=this._input.index;this._input.seek(this._startIndex);const n=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(s),n&&(r=new m({state:e.target},t))}else{const s=g.andContext(t.semanticContext,e.getPredicate());r=new m({state:e.target,semanticContext:s},t)}else r=new m({state:e.target},t);return this.debug&&console.log("config from pred transition="+r),r}predTransition(t,e,s,n,i){this.debug&&(console.log("PRED (collectPredicates="+s+") "+e.ruleIndex+":"+e.predIndex+", ctx dependent="+e.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+d(this.parser.getRuleInvocationStack())));let r=null;if(s&&(e.isCtxDependent&&n||!e.isCtxDependent))if(i){const s=this._input.index;this._input.seek(this._startIndex);const n=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(s),n&&(r=new m({state:e.target},t))}else{const s=g.andContext(t.semanticContext,e.getPredicate());r=new m({state:e.target,semanticContext:s},t)}else r=new m({state:e.target},t);return this.debug&&console.log("config from pred transition="+r),r}ruleTransition(t,e){this.debug&&console.log("CALL rule "+this.getRuleName(e.target.ruleIndex)+", ctx="+t.context);const s=e.followState,n=V.create(t.context,s.stateNumber);return new m({state:e.target,context:n},t)}getConflictingAlts(t){const e=te.getConflictingAltSubsets(t);return te.getAlts(e)}getConflictingAltsOrUniqueAlt(t){let e=null;return t.uniqueAlt!==j.INVALID_ALT_NUMBER?(e=new G,e.set(t.uniqueAlt)):e=t.conflictingAlts,e}getTokenName(t){if(t===i.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(t>=this.parser.literalNames.length&&t>=this.parser.symbolicNames.length))return(this.parser.literalNames[t]||this.parser.symbolicNames[t])+"<"+t+">";console.log(t+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+t}getLookaheadName(t){return this.getTokenName(t.LA(1))}dumpDeadEndConfigs(t){console.log("dead end configs: ");const e=t.getDeadEndConfigs();for(let t=0;t<e.length;t++){const s=e[t];let n="no edges";if(s.state.transitions.length>0){const t=s.state.transitions[0];t instanceof ht?n="Atom "+this.getTokenName(t.label):t instanceof L&&(n=(t instanceof I?"~":"")+"Set "+t.set)}console.error(s.toString(this.parser,!0)+":"+n)}}noViableAlt(t,e,s,n){return new ee(this.parser,t,t.get(n),t.LT(1),s,e)}getUniqueAlt(t){let e=j.INVALID_ALT_NUMBER;for(let s=0;s<t.items.length;s++){const n=t.items[s];if(e===j.INVALID_ALT_NUMBER)e=n.alt;else if(n.alt!==e)return j.INVALID_ALT_NUMBER}return e}addDFAEdge(t,e,s,n){if(this.debug&&console.log("EDGE "+e+" -> "+n+" upon "+this.getTokenName(s)),null===n)return null;if(n=this.addDFAState(t,n),null===e||s<-1||s>this.atn.maxTokenType)return n;if(null===e.edges&&(e.edges=[]),e.edges[s+1]=n,this.debug){const e=null===this.parser?null:this.parser.literalNames,s=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+t.toString(e,s))}return n}addDFAState(t,e){if(e===Yt.ERROR)return e;const s=t.states.get(e);return null!==s?(this.trace_atn_sim&&console.log("addDFAState "+e+" exists"),s):(e.stateNumber=t.states.length,e.configs.readOnly||(e.configs.optimizeConfigs(this),e.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+e),t.states.add(e),this.debug&&console.log("adding new DFA state: "+e),e)}reportAttemptingFullContext(t,e,s,n,i){if(this.debug||this.retry_debug){const e=new E(n,i+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+s+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportAttemptingFullContext(this.parser,t,n,i,e,s)}reportContextSensitivity(t,e,s,n,i){if(this.debug||this.retry_debug){const e=new E(n,i+1);console.log("reportContextSensitivity decision="+t.decision+":"+s+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListener().reportContextSensitivity(this.parser,t,n,i,e,s)}reportAmbiguity(t,e,s,n,i,r,o){if(this.debug||this.retry_debug){const t=new E(s,n+1);console.log("reportAmbiguity "+r+":"+o+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListener().reportAmbiguity(this.parser,t,s,n,i,r,o)}}class ie{constructor(){this.cache=new Y}add(t){if(t===H.EMPTY)return H.EMPTY;const e=this.cache.get(t)||null;return null!==e?e:(this.cache.set(t,t),t)}get(t){return this.cache.get(t)||null}get length(){return this.cache.length}}const re={ATN:j,ATNDeserializer:kt,LexerATNSimulator:Xt,ParserATNSimulator:ne,PredictionMode:te,PredictionContextCache:ie};class oe{constructor(t,e,s){this.dfa=t,this.literalNames=e||[],this.symbolicNames=s||[]}toString(){if(null===this.dfa.s0)return null;let t="";const e=this.dfa.sortedStates();for(let s=0;s<e.length;s++){const n=e[s];if(null!==n.edges){const e=n.edges.length;for(let s=0;s<e;s++){const e=n.edges[s]||null;null!==e&&2147483647!==e.stateNumber&&(t=t.concat(this.getStateString(n)),t=t.concat("-"),t=t.concat(this.getEdgeLabel(s)),t=t.concat("->"),t=t.concat(this.getStateString(e)),t=t.concat("\n"))}}}return 0===t.length?null:t}getEdgeLabel(t){return 0===t?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[t-1]||this.symbolicNames[t-1]:String.fromCharCode(t-1)}getStateString(t){const e=(t.isAcceptState?":":"")+"s"+t.stateNumber+(t.requiresFullContext?"^":"");return t.isAcceptState?null!==t.predicates?e+"=>"+d(t.predicates):e+"=>"+t.prediction.toString():e}}class ae extends oe{constructor(t){super(t,null)}getEdgeLabel(t){return"'"+String.fromCharCode(t)+"'"}}class le{constructor(t,e){if(void 0===e&&(e=0),this.atnStartState=t,this.decision=e,this._states=new p,this.s0=null,this.precedenceDfa=!1,t instanceof rt&&t.isPrecedenceDecision){this.precedenceDfa=!0;const t=new zt(null,new Vt);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}}getPrecedenceStartState(t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return t<0||t>=this.s0.edges.length?null:this.s0.edges[t]||null}setPrecedenceStartState(t,e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";t<0||(this.s0.edges[t]=e)}setPrecedenceDfa(t){if(this.precedenceDfa!==t){if(this._states=new p,t){const t=new zt(null,new Vt);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}else this.s0=null;this.precedenceDfa=t}}sortedStates(){return this._states.values().sort(function(t,e){return t.stateNumber-e.stateNumber})}toString(t,e){return t=t||null,e=e||null,null===this.s0?"":new oe(this,t,e).toString()}toLexerString(){return null===this.s0?"":new ae(this).toString()}get states(){return this._states}}const he={DFA:le,DFASerializer:oe,LexerDFASerializer:ae,PredPrediction:Jt},ce={PredictionContext:H},ue={Interval:E,IntervalSet:S};class de{visitTerminal(t){}visitErrorNode(t){}enterEveryRule(t){}exitEveryRule(t){}}class pe{visit(t){return Array.isArray(t)?t.map(function(t){return t.accept(this)},this):t.accept(this)}visitChildren(t){return t.children?this.visit(t.children):null}visitTerminal(t){}visitErrorNode(t){}}class ge{walk(t,e){if(e instanceof F||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof b)t.visitTerminal(e);else{this.enterRule(t,e);for(let s=0;s<e.getChildCount();s++){const n=e.getChild(s);this.walk(t,n)}this.exitRule(t,e)}}enterRule(t,e){const s=e.ruleContext;t.enterEveryRule(s),s.enterRule(t)}exitRule(t,e){const s=e.ruleContext;s.exitRule(t),t.exitEveryRule(s)}}ge.DEFAULT=new ge;const fe={Trees:M,RuleNode:P,ErrorNode:F,TerminalNode:b,ParseTreeListener:de,ParseTreeVisitor:pe,ParseTreeWalker:ge};class xe extends Dt{constructor(t){super({message:"",recognizer:t,input:t.getInputStream(),ctx:t._ctx}),this.offendingToken=t.getCurrentToken()}}class _e extends Dt{constructor(t,e,s){super({message:Te(e,s||null),recognizer:t,input:t.getInputStream(),ctx:t._ctx});const n=t._interp.atn.states[t.state].transitions[0];n instanceof gt?(this.ruleIndex=n.ruleIndex,this.predicateIndex=n.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=e,this.offendingToken=t.getCurrentToken()}}function Te(t,e){return null!==e?e:"failed predicate: {"+t+"}?"}class me extends vt{constructor(t){super(),t=t||!0,this.exactOnly=t}reportAmbiguity(t,e,s,n,i,r,o){if(this.exactOnly&&!i)return;const a="reportAmbiguity d="+this.getDecisionDescription(t,e)+": ambigAlts="+this.getConflictingAlts(r,o)+", input='"+t.getTokenStream().getText(new E(s,n))+"'";t.notifyErrorListeners(a)}reportAttemptingFullContext(t,e,s,n,i,r){const o="reportAttemptingFullContext d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new E(s,n))+"'";t.notifyErrorListeners(o)}reportContextSensitivity(t,e,s,n,i,r){const o="reportContextSensitivity d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new E(s,n))+"'";t.notifyErrorListeners(o)}getDecisionDescription(t,e){const s=e.decision,n=e.atnStartState.ruleIndex,i=t.ruleNames;if(n<0||n>=i.length)return""+s;const r=i[n]||null;return null===r||0===r.length?""+s:`${s} (${r})`}getConflictingAlts(t,e){if(null!==t)return t;const s=new G;for(let t=0;t<e.items.length;t++)s.set(e.items[t].alt);return`{${s.values().join(", ")}}`}}class Ee extends Error{constructor(){super(),Error.captureStackTrace(this,Ee)}}class Se{reset(t){}recoverInline(t){}recover(t,e){}sync(t){}inErrorRecoveryMode(t){}reportError(t){}}class Ce extends Se{constructor(){super(),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this.nextTokensContext=null,this.nextTokenState=0}reset(t){this.endErrorCondition(t)}beginErrorCondition(t){this.errorRecoveryMode=!0}inErrorRecoveryMode(t){return this.errorRecoveryMode}endErrorCondition(t){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1}reportMatch(t){this.endErrorCondition(t)}reportError(t,e){this.inErrorRecoveryMode(t)||(this.beginErrorCondition(t),e instanceof ee?this.reportNoViableAlternative(t,e):e instanceof xe?this.reportInputMismatch(t,e):e instanceof _e?this.reportFailedPredicate(t,e):(console.log("unknown recognition error type: "+e.constructor.name),console.log(e.stack),t.notifyErrorListeners(e.getOffendingToken(),e.getMessage(),e)))}recover(t,e){this.lastErrorIndex===t.getInputStream().index&&null!==this.lastErrorStates&&this.lastErrorStates.indexOf(t.state)>=0&&t.consume(),this.lastErrorIndex=t._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(t.state);const s=this.getErrorRecoverySet(t);this.consumeUntil(t,s)}sync(t){if(this.inErrorRecoveryMode(t))return;const e=t._interp.atn.states[t.state],s=t.getTokenStream().LA(1),n=t.atn.nextTokens(e);if(n.contains(s))return this.nextTokensContext=null,void(this.nextTokenState=C.INVALID_STATE_NUMBER);if(n.contains(i.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=t._ctx,this.nextTokensState=t._stateNumber);else switch(e.stateType){case C.BLOCK_START:case C.STAR_BLOCK_START:case C.PLUS_BLOCK_START:case C.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(t))return;throw new xe(t);case C.PLUS_LOOP_BACK:case C.STAR_LOOP_BACK:{this.reportUnwantedToken(t);const e=new S;e.addSet(t.getExpectedTokens());const s=e.addSet(this.getErrorRecoverySet(t));this.consumeUntil(t,s)}}}reportNoViableAlternative(t,e){const s=t.getTokenStream();let n;n=null!==s?e.startToken.type===i.EOF?"<EOF>":s.getText(new E(e.startToken.tokenIndex,e.offendingToken.tokenIndex)):"<unknown input>";const r="no viable alternative at input "+this.escapeWSAndQuote(n);t.notifyErrorListeners(r,e.offendingToken,e)}reportInputMismatch(t,e){const s="mismatched input "+this.getTokenErrorDisplay(e.offendingToken)+" expecting "+e.getExpectedTokens().toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(s,e.offendingToken,e)}reportFailedPredicate(t,e){const s="rule "+t.ruleNames[t._ctx.ruleIndex]+" "+e.message;t.notifyErrorListeners(s,e.offendingToken,e)}reportUnwantedToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),s="extraneous input "+this.getTokenErrorDisplay(e)+" expecting "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(s,e,null)}reportMissingToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),s="missing "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames)+" at "+this.getTokenErrorDisplay(e);t.notifyErrorListeners(s,e,null)}recoverInline(t){const e=this.singleTokenDeletion(t);if(null!==e)return t.consume(),e;if(this.singleTokenInsertion(t))return this.getMissingSymbol(t);throw new xe(t)}singleTokenInsertion(t){const e=t.getTokenStream().LA(1),s=t._interp.atn,n=s.states[t.state].transitions[0].target;return!!s.nextTokens(n,t._ctx).contains(e)&&(this.reportMissingToken(t),!0)}singleTokenDeletion(t){const e=t.getTokenStream().LA(2);if(this.getExpectedTokens(t).contains(e)){this.reportUnwantedToken(t),t.consume();const e=t.getCurrentToken();return this.reportMatch(t),e}return null}getMissingSymbol(t){const e=t.getCurrentToken(),s=this.getExpectedTokens(t).first();let n;n=s===i.EOF?"<missing EOF>":"<missing "+t.literalNames[s]+">";let r=e;const o=t.getTokenStream().LT(-1);return r.type===i.EOF&&null!==o&&(r=o),t.getTokenFactory().create(r.source,s,n,i.DEFAULT_CHANNEL,-1,-1,r.line,r.column)}getExpectedTokens(t){return t.getExpectedTokens()}getTokenErrorDisplay(t){if(null===t)return"<no token>";let e=t.text;return null===e&&(e=t.type===i.EOF?"<EOF>":"<"+t.type+">"),this.escapeWSAndQuote(e)}escapeWSAndQuote(t){return"'"+(t=(t=(t=t.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}getErrorRecoverySet(t){const e=t._interp.atn;let s=t._ctx;const n=new S;for(;null!==s&&s.invokingState>=0;){const t=e.states[s.invokingState].transitions[0],i=e.nextTokens(t.followState);n.addSet(i),s=s.parentCtx}return n.removeOne(i.EPSILON),n}consumeUntil(t,e){let s=t.getTokenStream().LA(1);for(;s!==i.EOF&&!e.contains(s);)t.consume(),s=t.getTokenStream().LA(1)}}class Ae extends Ce{constructor(){super()}recover(t,e){let s=t._ctx;for(;null!==s;)s.exception=e,s=s.parentCtx;throw new Ee(e)}recoverInline(t){this.recover(t,new xe(t))}sync(t){}}const Ne={RecognitionException:Dt,NoViableAltException:ee,LexerNoViableAltException:Mt,InputMismatchException:xe,FailedPredicateException:_e,DiagnosticErrorListener:me,BailErrorStrategy:Ae,DefaultErrorStrategy:Ce,ErrorListener:vt};class ye{constructor(t,e){if(this.name="<empty>",this.strdata=t,this.decodeToUnicodeCodePoints=e||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let t=0;t<this.strdata.length;){const e=this.strdata.codePointAt(t);this.data.push(e),t+=e<=65535?1:2}else{this.data=new Array(this.strdata.length);for(let t=0;t<this.strdata.length;t++)this.data[t]=this.strdata.charCodeAt(t)}this._size=this.data.length}reset(){this._index=0}consume(){if(this._index>=this._size)throw"cannot consume EOF";this._index+=1}LA(t){if(0===t)return 0;t<0&&(t+=1);const e=this._index+t-1;return e<0||e>=this._size?i.EOF:this.data[e]}LT(t){return this.LA(t)}mark(){return-1}release(t){}seek(t){t<=this._index?this._index=t:this._index=Math.min(t,this._size)}getText(t,e){if(e>=this._size&&(e=this._size-1),t>=this._size)return"";if(this.decodeToUnicodeCodePoints){let s="";for(let n=t;n<=e;n++)s+=String.fromCodePoint(this.data[n]);return s}return this.strdata.slice(t,e+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}}class Le extends ye{constructor(t,e){super(t,e)}}var Ie=s(763);const ke="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;class ve extends Le{static fromPath(t,e,s){if(!ke)throw new Error("FileStream is only available when running in Node!");Ie.readFile(t,e,function(t,e){let n=null;null!==e&&(n=new ye(e,!0)),s(t,n)})}constructor(t,e,s){if(!ke)throw new Error("FileStream is only available when running in Node!");super(Ie.readFileSync(t,e||"utf-8"),s),this.fileName=t}}const we={fromString:function(t){return new ye(t,!0)},fromBlob:function(t,e,s,n){const i=new window.FileReader;i.onload=function(t){const e=new ye(t.target.result,!0);s(e)},i.onerror=n,i.readAsText(t,e)},fromBuffer:function(t,e){return new ye(t.toString(e),!0)},fromPath:function(t,e,s){ve.fromPath(t,e,s)},fromPathSync:function(t,e){return new ve(t,e)}},Re={arrayToString:d,stringToCharArray:function(t){let e=new Uint16Array(t.length);for(let s=0;s<t.length;s++)e[s]=t.charCodeAt(s);return e}};class Oe{}class Pe extends Oe{constructor(t){super(),this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}mark(){return 0}release(t){}reset(){this.seek(0)}seek(t){this.lazyInit(),this.index=this.adjustSeekIndex(t)}get size(){return this.tokens.length}get(t){return this.lazyInit(),this.tokens[t]}consume(){let t=!1;if(t=this.index>=0&&(this.fetchedEOF?this.index<this.tokens.length-1:this.index<this.tokens.length),!t&&this.LA(1)===i.EOF)throw"cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1))}sync(t){const e=t-this.tokens.length+1;return!(e>0)||this.fetch(e)>=e}fetch(t){if(this.fetchedEOF)return 0;for(let e=0;e<t;e++){const t=this.tokenSource.nextToken();if(t.tokenIndex=this.tokens.length,this.tokens.push(t),t.type===i.EOF)return this.fetchedEOF=!0,e+1}return t}getTokens(t,e,s){if(void 0===s&&(s=null),t<0||e<0)return null;this.lazyInit();const n=[];e>=this.tokens.length&&(e=this.tokens.length-1);for(let r=t;r<e;r++){const t=this.tokens[r];if(t.type===i.EOF)break;(null===s||s.contains(t.type))&&n.push(t)}return n}LA(t){return this.LT(t).type}LB(t){return this.index-t<0?null:this.tokens[this.index-t]}LT(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);const e=this.index+t-1;return this.sync(e),e>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[e]}adjustSeekIndex(t){return t}lazyInit(){-1===this.index&&this.setup()}setup(){this.sync(0),this.index=this.adjustSeekIndex(0)}setTokenSource(t){this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}nextTokenOnChannel(t,e){if(this.sync(t),t>=this.tokens.length)return-1;let s=this.tokens[t];for(;s.channel!==e;){if(s.type===i.EOF)return-1;t+=1,this.sync(t),s=this.tokens[t]}return t}previousTokenOnChannel(t,e){for(;t>=0&&this.tokens[t].channel!==e;)t-=1;return t}getHiddenTokensToRight(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const s=this.nextTokenOnChannel(t+1,Ut.DEFAULT_TOKEN_CHANNEL),n=t+1,i=-1===s?this.tokens.length-1:s;return this.filterForChannel(n,i,e)}getHiddenTokensToLeft(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const s=this.previousTokenOnChannel(t-1,Ut.DEFAULT_TOKEN_CHANNEL);if(s===t-1)return null;const n=s+1,i=t-1;return this.filterForChannel(n,i,e)}filterForChannel(t,e,s){const n=[];for(let i=t;i<e+1;i++){const t=this.tokens[i];-1===s?t.channel!==Ut.DEFAULT_TOKEN_CHANNEL&&n.push(t):t.channel===s&&n.push(t)}return 0===n.length?null:n}getSourceName(){return this.tokenSource.getSourceName()}getText(t){this.lazyInit(),this.fill(),t||(t=new E(0,this.tokens.length-1));let e=t.start;e instanceof i&&(e=e.tokenIndex);let s=t.stop;if(s instanceof i&&(s=s.tokenIndex),null===e||null===s||e<0||s<0)return"";s>=this.tokens.length&&(s=this.tokens.length-1);let n="";for(let t=e;t<s+1;t++){const e=this.tokens[t];if(e.type===i.EOF)break;n+=e.text}return n}fill(){for(this.lazyInit();1e3===this.fetch(1e3););}}Object.defineProperty(Pe,"size",{get:function(){return this.tokens.length}});class be extends Pe{constructor(t,e){super(t),this.channel=void 0===e?i.DEFAULT_CHANNEL:e}adjustSeekIndex(t){return this.nextTokenOnChannel(t,this.channel)}LB(t){if(0===t||this.index-t<0)return null;let e=this.index,s=1;for(;s<=t;)e=this.previousTokenOnChannel(e-1,this.channel),s+=1;return e<0?null:this.tokens[e]}LT(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);let e=this.index,s=1;for(;s<t;)this.sync(e+1)&&(e=this.nextTokenOnChannel(e+1,this.channel)),s+=1;return this.tokens[e]}getNumberOfOnChannelTokens(){let t=0;this.fill();for(let e=0;e<this.tokens.length;e++){const s=this.tokens[e];if(s.channel===this.channel&&(t+=1),s.type===i.EOF)break}return t}}class Fe extends de{constructor(t){super(),this.parser=t}enterEveryRule(t){console.log("enter "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}visitTerminal(t){console.log("consume "+t.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])}exitEveryRule(t){console.log("exit "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}}class De extends Ot{constructor(t){super(),this._input=null,this._errHandler=new Ce,this._precedenceStack=[],this._precedenceStack.push(0),this._ctx=null,this.buildParseTrees=!0,this._tracer=null,this._parseListeners=null,this._syntaxErrors=0,this.setInputStream(t)}reset(){null!==this._input&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),null!==this._interp&&this._interp.reset()}match(t){let e=this.getCurrentToken();return e.type===t?(this._errHandler.reportMatch(this),this.consume()):(e=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===e.tokenIndex&&this._ctx.addErrorNode(e)),e}matchWildcard(){let t=this.getCurrentToken();return t.type>0?(this._errHandler.reportMatch(this),this.consume()):(t=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===t.tokenIndex&&this._ctx.addErrorNode(t)),t}getParseListeners(){return this._parseListeners||[]}addParseListener(t){if(null===t)throw"listener";null===this._parseListeners&&(this._parseListeners=[]),this._parseListeners.push(t)}removeParseListener(t){if(null!==this._parseListeners){const e=this._parseListeners.indexOf(t);e>=0&&this._parseListeners.splice(e,1),0===this._parseListeners.length&&(this._parseListeners=null)}}removeParseListeners(){this._parseListeners=null}triggerEnterRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.forEach(function(e){e.enterEveryRule(t),t.enterRule(e)})}}triggerExitRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.slice(0).reverse().forEach(function(e){t.exitRule(e),e.exitEveryRule(t)})}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(t){this._input.tokenSource._factory=t}getATNWithBypassAlts(){const t=this.getSerializedATN();if(null===t)throw"The current parser does not support an ATN with bypass alternatives.";let e=this.bypassAltsAtnCache[t];if(null===e){const s=new _t;s.generateRuleBypassTransitions=!0,e=new kt(s).deserialize(t),this.bypassAltsAtnCache[t]=e}return e}getInputStream(){return this.getTokenStream()}setInputStream(t){this.setTokenStream(t)}getTokenStream(){return this._input}setTokenStream(t){this._input=null,this.reset(),this._input=t}get syntaxErrorsCount(){return this._syntaxErrors}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(t,e,s){s=s||null,null===(e=e||null)&&(e=this.getCurrentToken()),this._syntaxErrors+=1;const n=e.line,i=e.column;this.getErrorListener().syntaxError(this,e,n,i,t,s)}consume(){const t=this.getCurrentToken();t.type!==i.EOF&&this.getInputStream().consume();const e=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||e){let s;s=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(t):this._ctx.addTokenNode(t),s.invokingState=this.state,e&&this._parseListeners.forEach(function(t){s instanceof F||void 0!==s.isErrorNode&&s.isErrorNode()?t.visitErrorNode(s):s instanceof b&&t.visitTerminal(s)})}return t}addContextToParseTree(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)}enterRule(t,e,s){this.state=e,this._ctx=t,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this._ctx.stop=this._input.LT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx}enterOuterAlt(t,e){t.setAltNumber(e),this.buildParseTrees&&this._ctx!==t&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(t)),this._ctx=t}getPrecedence(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(t,e,s,n){this.state=e,this._precedenceStack.push(n),this._ctx=t,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(t,e,s){const n=this._ctx;n.parentCtx=t,n.invokingState=e,n.stop=this._input.LT(-1),this._ctx=t,this._ctx.start=n.start,this.buildParseTrees&&this._ctx.addChild(n),this.triggerEnterRuleEvent()}unrollRecursionContexts(t){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);const e=this._ctx,s=this.getParseListeners();if(null!==s&&s.length>0)for(;this._ctx!==t;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=t;e.parentCtx=t,this.buildParseTrees&&null!==t&&t.addChild(e)}getInvokingContext(t){let e=this._ctx;for(;null!==e;){if(e.ruleIndex===t)return e;e=e.parentCtx}return null}precpred(t,e){return e>=this._precedenceStack[this._precedenceStack.length-1]}inContext(t){return!1}isExpectedToken(t){const e=this._interp.atn;let s=this._ctx;const n=e.states[this.state];let r=e.nextTokens(n);if(r.contains(t))return!0;if(!r.contains(i.EPSILON))return!1;for(;null!==s&&s.invokingState>=0&&r.contains(i.EPSILON);){const n=e.states[s.invokingState].transitions[0];if(r=e.nextTokens(n.followState),r.contains(t))return!0;s=s.parentCtx}return!(!r.contains(i.EPSILON)||t!==i.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){const t=this._interp.atn,e=t.states[this.state];return t.nextTokens(e)}getRuleIndex(t){const e=this.getRuleIndexMap()[t];return null!==e?e:-1}getRuleInvocationStack(t){null===(t=t||null)&&(t=this._ctx);const e=[];for(;null!==t;){const s=t.ruleIndex;s<0?e.push("n/a"):e.push(this.ruleNames[s]),t=t.parentCtx}return e}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let t=!1;for(let e=0;e<this._interp.decisionToDFA.length;e++){const s=this._interp.decisionToDFA[e];s.states.length>0&&(t&&console.log(),this.printer.println("Decision "+s.decision+":"),this.printer.print(s.toString(this.literalNames,this.symbolicNames)),t=!0)}}getSourceName(){return this._input.getSourceName()}setTrace(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new Fe(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}De.bypassAltsAtnCache={};class Me extends b{constructor(t){super(),this.parentCtx=null,this.symbol=t}getChild(t){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(null===this.symbol)return E.INVALID_INTERVAL;const t=this.symbol.tokenIndex;return new E(t,t)}getChildCount(){return 0}accept(t){return t.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===i.EOF?"<EOF>":this.symbol.text}}class Ue extends Me{constructor(t){super(t)}isErrorNode(){return!0}accept(t){return t.visitErrorNode(this)}}class He extends U{constructor(t,e){super(t,e),this.children=null,this.start=null,this.stop=null,this.exception=null}copyFrom(t){this.parentCtx=t.parentCtx,this.invokingState=t.invokingState,this.children=null,this.start=t.start,this.stop=t.stop,t.children&&(this.children=[],t.children.map(function(t){t instanceof Ue&&(this.children.push(t),t.parentCtx=this)},this))}enterRule(t){}exitRule(t){}addChild(t){return null===this.children&&(this.children=[]),this.children.push(t),t}removeLastChild(){null!==this.children&&this.children.pop()}addTokenNode(t){const e=new Me(t);return this.addChild(e),e.parentCtx=this,e}addErrorNode(t){const e=new Ue(t);return this.addChild(e),e.parentCtx=this,e}getChild(t,e){if(e=e||null,null===this.children||t<0||t>=this.children.length)return null;if(null===e)return this.children[t];for(let s=0;s<this.children.length;s++){const n=this.children[s];if(n instanceof e){if(0===t)return n;t-=1}}return null}getToken(t,e){if(null===this.children||e<0||e>=this.children.length)return null;for(let s=0;s<this.children.length;s++){const n=this.children[s];if(n instanceof b&&n.symbol.type===t){if(0===e)return n;e-=1}}return null}getTokens(t){if(null===this.children)return[];{const e=[];for(let s=0;s<this.children.length;s++){const n=this.children[s];n instanceof b&&n.symbol.type===t&&e.push(n)}return e}}getTypedRuleContext(t,e){return this.getChild(e,t)}getTypedRuleContexts(t){if(null===this.children)return[];{const e=[];for(let s=0;s<this.children.length;s++){const n=this.children[s];n instanceof t&&e.push(n)}return e}}getChildCount(){return null===this.children?0:this.children.length}getSourceInterval(){return null===this.start||null===this.stop?E.INVALID_INTERVAL:new E(this.start.tokenIndex,this.stop.tokenIndex)}}U.EMPTY=new He;class Be{static DEFAULT_PROGRAM_NAME="default";constructor(t){this.tokens=t,this.programs=new Map}getTokenStream(){return this.tokens}insertAfter(t,e){let s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Be.DEFAULT_PROGRAM_NAME;s="number"==typeof t?t:t.tokenIndex;let i=this.getProgram(n),r=new Ye(this.tokens,s,i.length,e);i.push(r)}insertBefore(t,e){let s,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Be.DEFAULT_PROGRAM_NAME;s="number"==typeof t?t:t.tokenIndex;const i=this.getProgram(n),r=new ze(this.tokens,s,i.length,e);i.push(r)}replaceSingle(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Be.DEFAULT_PROGRAM_NAME;this.replace(t,t,e,s)}replace(t,e,s){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Be.DEFAULT_PROGRAM_NAME;if("number"!=typeof t&&(t=t.tokenIndex),"number"!=typeof e&&(e=e.tokenIndex),t>e||t<0||e<0||e>=this.tokens.size)throw new RangeError(`replace: range invalid: ${t}..${e}(size=${this.tokens.size})`);let i=this.getProgram(n),r=new qe(this.tokens,t,e,i.length,s);i.push(r)}delete(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Be.DEFAULT_PROGRAM_NAME;void 0===e&&(e=t),this.replace(t,e,null,s)}getProgram(t){let e=this.programs.get(t);return null==e&&(e=this.initializeProgram(t)),e}initializeProgram(t){const e=[];return this.programs.set(t,e),e}getText(t){let e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Be.DEFAULT_PROGRAM_NAME;e=t instanceof E?t:new E(0,this.tokens.size-1),"string"==typeof t&&(s=t);const n=this.programs.get(s);let r=e.start,o=e.stop;if(o>this.tokens.size-1&&(o=this.tokens.size-1),r<0&&(r=0),null==n||0===n.length)return this.tokens.getText(new E(r,o));let a=[],l=this.reduceToSingleOperationPerIndex(n),h=r;for(;h<=o&&h<this.tokens.size;){let t=l.get(h);l.delete(h);let e=this.tokens.get(h);null==t?(e.type!==i.EOF&&a.push(String(e.text)),h++):h=t.execute(a)}if(o===this.tokens.size-1)for(const t of l.values())t.index>=this.tokens.size-1&&a.push(t.text.toString());return a.join("")}reduceToSingleOperationPerIndex(t){for(let e=0;e<t.length;e++){let s=t[e];if(null==s)continue;if(!(s instanceof qe))continue;let n=s,i=this.getKindOfOps(t,ze,e);for(let e of i)e.index===n.index?(t[e.instructionIndex]=void 0,n.text=e.text.toString()+(null!=n.text?n.text.toString():"")):e.index>n.index&&e.index<=n.lastIndex&&(t[e.instructionIndex]=void 0);let r=this.getKindOfOps(t,qe,e);for(let e of r){if(e.index>=n.index&&e.lastIndex<=n.lastIndex){t[e.instructionIndex]=void 0;continue}let s=e.lastIndex<n.index||e.index>n.lastIndex;if(null!=e.text||null!=n.text||s){if(!s)throw new Error(`replace op boundaries of ${n} overlap with previous ${e}`)}else t[e.instructionIndex]=void 0,n.index=Math.min(e.index,n.index),n.lastIndex=Math.max(e.lastIndex,n.lastIndex)}}for(let e=0;e<t.length;e++){let s=t[e];if(null==s)continue;if(!(s instanceof ze))continue;let n=s,i=this.getKindOfOps(t,ze,e);for(let e of i)e.index===n.index&&(e instanceof Ye?(n.text=this.catOpText(e.text,n.text),t[e.instructionIndex]=void 0):e instanceof ze&&(n.text=this.catOpText(n.text,e.text),t[e.instructionIndex]=void 0));let r=this.getKindOfOps(t,qe,e);for(let s of r)if(n.index!==s.index){if(n.index>=s.index&&n.index<=s.lastIndex)throw new Error(`insert op ${n} within boundaries of previous ${s}`)}else s.text=this.catOpText(n.text,s.text),t[e]=void 0}let e=new Map;for(let s of t)if(null!=s){if(null!=e.get(s.index))throw new Error("should only be one op per index");e.set(s.index,s)}return e}catOpText(t,e){let s="",n="";return null!=t&&(s=t.toString()),null!=e&&(n=e.toString()),s+n}getKindOfOps(t,e,s){return t.slice(0,s).filter(t=>t&&t instanceof e)}}class Ve{constructor(t,e,s,n){this.tokens=t,this.instructionIndex=s,this.index=e,this.text=void 0===n?"":n}toString(){let t=this.constructor.name;const e=t.indexOf("$");return t=t.substring(e+1,t.length),"<"+t+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}class ze extends Ve{constructor(t,e,s,n){super(t,e,s,n)}execute(t){return this.text&&t.push(this.text.toString()),this.tokens.get(this.index).type!==i.EOF&&t.push(String(this.tokens.get(this.index).text)),this.index+1}}class Ye extends ze{constructor(t,e,s,n){super(t,e+1,s,n)}}class qe extends Ve{constructor(t,e,s,n,i){super(t,e,n,i),this.lastIndex=s}execute(t){return this.text&&t.push(this.text.toString()),this.lastIndex+1}toString(){return null==this.text?"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">":"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}}const Ke={atn:re,dfa:he,context:ce,misc:ue,tree:fe,error:Ne,Token:i,CommonToken:Pt,CharStreams:we,CharStream:ye,InputStream:Le,CommonTokenStream:be,Lexer:Ut,Parser:De,ParserRuleContext:He,Interval:E,IntervalSet:S,LL1Analyzer:$,Utils:Re,TokenStreamRewriter:Be};var We=n.jB,Ge=n.pG,$e=n.zW,je=n.Ay;const Xe=(new je.atn.ATNDeserializer).deserialize([4,0,34,165,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,1,0,1,0,1,1,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17,1,17,1,18,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,30,4,30,142,8,30,11,30,12,30,143,1,30,1,30,1,31,1,31,1,31,1,31,5,31,152,8,31,10,31,12,31,155,9,31,1,31,1,31,1,32,1,32,1,33,4,33,162,8,33,11,33,12,33,163,0,0,34,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,1,0,3,2,0,9,9,32,32,2,0,10,10,13,13,7,0,9,10,13,13,32,32,40,41,44,44,91,91,93,93,167,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,1,69,1,0,0,0,3,71,1,0,0,0,5,74,1,0,0,0,7,76,1,0,0,0,9,78,1,0,0,0,11,81,1,0,0,0,13,83,1,0,0,0,15,85,1,0,0,0,17,87,1,0,0,0,19,89,1,0,0,0,21,91,1,0,0,0,23,93,1,0,0,0,25,95,1,0,0,0,27,97,1,0,0,0,29,99,1,0,0,0,31,102,1,0,0,0,33,104,1,0,0,0,35,106,1,0,0,0,37,109,1,0,0,0,39,112,1,0,0,0,41,114,1,0,0,0,43,116,1,0,0,0,45,119,1,0,0,0,47,122,1,0,0,0,49,125,1,0,0,0,51,128,1,0,0,0,53,130,1,0,0,0,55,132,1,0,0,0,57,135,1,0,0,0,59,138,1,0,0,0,61,141,1,0,0,0,63,147,1,0,0,0,65,158,1,0,0,0,67,161,1,0,0,0,69,70,5,44,0,0,70,2,1,0,0,0,71,72,5,45,0,0,72,73,5,62,0,0,73,4,1,0,0,0,74,75,5,40,0,0,75,6,1,0,0,0,76,77,5,41,0,0,77,8,1,0,0,0,78,79,5,58,0,0,79,80,5,58,0,0,80,10,1,0,0,0,81,82,5,46,0,0,82,12,1,0,0,0,83,84,5,91,0,0,84,14,1,0,0,0,85,86,5,93,0,0,86,16,1,0,0,0,87,88,5,126,0,0,88,18,1,0,0,0,89,90,5,33,0,0,90,20,1,0,0,0,91,92,5,45,0,0,92,22,1,0,0,0,93,94,5,43,0,0,94,24,1,0,0,0,95,96,5,38,0,0,96,26,1,0,0,0,97,98,5,42,0,0,98,28,1,0,0,0,99,100,5,46,0,0,100,101,5,42,0,0,101,30,1,0,0,0,102,103,5,47,0,0,103,32,1,0,0,0,104,105,5,37,0,0,105,34,1,0,0,0,106,107,5,60,0,0,107,108,5,60,0,0,108,36,1,0,0,0,109,110,5,62,0,0,110,111,5,62,0,0,111,38,1,0,0,0,112,113,5,60,0,0,113,40,1,0,0,0,114,115,5,62,0,0,115,42,1,0,0,0,116,117,5,60,0,0,117,118,5,61,0,0,118,44,1,0,0,0,119,120,5,62,0,0,120,121,5,61,0,0,121,46,1,0,0,0,122,123,5,61,0,0,123,124,5,61,0,0,124,48,1,0,0,0,125,126,5,33,0,0,126,127,5,61,0,0,127,50,1,0,0,0,128,129,5,94,0,0,129,52,1,0,0,0,130,131,5,124,0,0,131,54,1,0,0,0,132,133,5,38,0,0,133,134,5,38,0,0,134,56,1,0,0,0,135,136,5,124,0,0,136,137,5,124,0,0,137,58,1,0,0,0,138,139,5,61,0,0,139,60,1,0,0,0,140,142,7,0,0,0,141,140,1,0,0,0,142,143,1,0,0,0,143,141,1,0,0,0,143,144,1,0,0,0,144,145,1,0,0,0,145,146,6,30,0,0,146,62,1,0,0,0,147,148,5,47,0,0,148,149,5,47,0,0,149,153,1,0,0,0,150,152,8,1,0,0,151,150,1,0,0,0,152,155,1,0,0,0,153,151,1,0,0,0,153,154,1,0,0,0,154,156,1,0,0,0,155,153,1,0,0,0,156,157,6,31,0,0,157,64,1,0,0,0,158,159,7,1,0,0,159,66,1,0,0,0,160,162,8,2,0,0,161,160,1,0,0,0,162,163,1,0,0,0,163,161,1,0,0,0,163,164,1,0,0,0,164,68,1,0,0,0,4,0,143,153,163,1,6,0,0]),Je=Xe.decisionToState.map((t,e)=>new je.dfa.DFA(t,e));class Qe extends je.Lexer{static grammarFileName="Dsp.g4";static channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];static modeNames=["DEFAULT_MODE"];static literalNames=[null,"','","'->'","'('","')'","'::'","'.'","'['","']'","'~'","'!'","'-'","'+'","'&'","'*'","'.*'","'/'","'%'","'<<'","'>>'","'<'","'>'","'<='","'>='","'=='","'!='","'^'","'|'","'&&'","'||'","'='"];static symbolicNames=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"WHITESPACE","COMMENT","NEWLINE","SYMBOL"];static ruleNames=["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","T__29","WHITESPACE","COMMENT","NEWLINE","SYMBOL"];constructor(t){super(t),this._interp=new je.atn.LexerATNSimulator(this,Xe,Je,new je.atn.PredictionContextCache)}}Qe.EOF=je.Token.EOF,Qe.T__0=1,Qe.T__1=2,Qe.T__2=3,Qe.T__3=4,Qe.T__4=5,Qe.T__5=6,Qe.T__6=7,Qe.T__7=8,Qe.T__8=9,Qe.T__9=10,Qe.T__10=11,Qe.T__11=12,Qe.T__12=13,Qe.T__13=14,Qe.T__14=15,Qe.T__15=16,Qe.T__16=17,Qe.T__17=18,Qe.T__18=19,Qe.T__19=20,Qe.T__20=21,Qe.T__21=22,Qe.T__22=23,Qe.T__23=24,Qe.T__24=25,Qe.T__25=26,Qe.T__26=27,Qe.T__27=28,Qe.T__28=29,Qe.T__29=30,Qe.WHITESPACE=31,Qe.COMMENT=32,Qe.NEWLINE=33,Qe.SYMBOL=34;class Ze extends je.tree.ParseTreeVisitor{visitRule_pool(t){return this.visitChildren(t)}visitRule(t){return this.visitChildren(t)}visitSymbol(t){return this.visitChildren(t)}visitParentheses(t){return this.visitChildren(t)}visitSubscript(t){return this.visitChildren(t)}visitBinary(t){return this.visitChildren(t)}visitFunction(t){return this.visitChildren(t)}visitUnary(t){return this.visitChildren(t)}}const ts=(new je.atn.ATNDeserializer).deserialize([4,1,34,132,2,0,7,0,2,1,7,1,2,2,7,2,1,0,5,0,8,8,0,10,0,12,0,11,9,0,1,0,1,0,4,0,15,8,0,11,0,12,0,16,1,0,5,0,20,8,0,10,0,12,0,23,9,0,3,0,25,8,0,1,0,5,0,28,8,0,10,0,12,0,31,9,0,1,0,1,0,1,1,1,1,1,1,1,1,5,1,39,8,1,10,1,12,1,42,9,1,3,1,44,8,1,1,1,1,1,3,1,48,8,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,58,8,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,5,2,107,8,2,10,2,12,2,110,9,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,5,2,119,8,2,10,2,12,2,122,9,2,3,2,124,8,2,1,2,5,2,127,8,2,10,2,12,2,130,9,2,1,2,0,1,4,3,0,2,4,0,6,1,0,9,14,2,0,14,14,16,17,1,0,11,12,1,0,18,19,1,0,20,23,1,0,24,25,157,0,9,1,0,0,0,2,47,1,0,0,0,4,57,1,0,0,0,6,8,5,33,0,0,7,6,1,0,0,0,8,11,1,0,0,0,9,7,1,0,0,0,9,10,1,0,0,0,10,24,1,0,0,0,11,9,1,0,0,0,12,21,3,2,1,0,13,15,5,33,0,0,14,13,1,0,0,0,15,16,1,0,0,0,16,14,1,0,0,0,16,17,1,0,0,0,17,18,1,0,0,0,18,20,3,2,1,0,19,14,1,0,0,0,20,23,1,0,0,0,21,19,1,0,0,0,21,22,1,0,0,0,22,25,1,0,0,0,23,21,1,0,0,0,24,12,1,0,0,0,24,25,1,0,0,0,25,29,1,0,0,0,26,28,5,33,0,0,27,26,1,0,0,0,28,31,1,0,0,0,29,27,1,0,0,0,29,30,1,0,0,0,30,32,1,0,0,0,31,29,1,0,0,0,32,33,5,0,0,1,33,1,1,0,0,0,34,48,3,4,2,0,35,40,3,4,2,0,36,37,5,1,0,0,37,39,3,4,2,0,38,36,1,0,0,0,39,42,1,0,0,0,40,38,1,0,0,0,40,41,1,0,0,0,41,44,1,0,0,0,42,40,1,0,0,0,43,35,1,0,0,0,43,44,1,0,0,0,44,45,1,0,0,0,45,46,5,2,0,0,46,48,3,4,2,0,47,34,1,0,0,0,47,43,1,0,0,0,48,3,1,0,0,0,49,50,6,2,-1,0,50,58,5,34,0,0,51,52,5,3,0,0,52,53,3,4,2,0,53,54,5,4,0,0,54,58,1,0,0,0,55,56,7,0,0,0,56,58,3,4,2,13,57,49,1,0,0,0,57,51,1,0,0,0,57,55,1,0,0,0,58,128,1,0,0,0,59,60,10,17,0,0,60,61,5,5,0,0,61,127,3,4,2,18,62,63,10,16,0,0,63,64,5,6,0,0,64,127,3,4,2,17,65,66,10,12,0,0,66,67,5,15,0,0,67,127,3,4,2,13,68,69,10,11,0,0,69,70,7,1,0,0,70,127,3,4,2,12,71,72,10,10,0,0,72,73,7,2,0,0,73,127,3,4,2,11,74,75,10,9,0,0,75,76,7,3,0,0,76,127,3,4,2,10,77,78,10,8,0,0,78,79,7,4,0,0,79,127,3,4,2,9,80,81,10,7,0,0,81,82,7,5,0,0,82,127,3,4,2,8,83,84,10,6,0,0,84,85,5,13,0,0,85,127,3,4,2,7,86,87,10,5,0,0,87,88,5,26,0,0,88,127,3,4,2,6,89,90,10,4,0,0,90,91,5,27,0,0,91,127,3,4,2,5,92,93,10,3,0,0,93,94,5,28,0,0,94,127,3,4,2,4,95,96,10,2,0,0,96,97,5,29,0,0,97,127,3,4,2,3,98,99,10,1,0,0,99,100,5,30,0,0,100,127,3,4,2,2,101,102,10,15,0,0,102,103,5,7,0,0,103,108,3,4,2,0,104,105,5,1,0,0,105,107,3,4,2,0,106,104,1,0,0,0,107,110,1,0,0,0,108,106,1,0,0,0,108,109,1,0,0,0,109,111,1,0,0,0,110,108,1,0,0,0,111,112,5,8,0,0,112,127,1,0,0,0,113,114,10,14,0,0,114,123,5,3,0,0,115,120,3,4,2,0,116,117,5,1,0,0,117,119,3,4,2,0,118,116,1,0,0,0,119,122,1,0,0,0,120,118,1,0,0,0,120,121,1,0,0,0,121,124,1,0,0,0,122,120,1,0,0,0,123,115,1,0,0,0,123,124,1,0,0,0,124,125,1,0,0,0,125,127,5,4,0,0,126,59,1,0,0,0,126,62,1,0,0,0,126,65,1,0,0,0,126,68,1,0,0,0,126,71,1,0,0,0,126,74,1,0,0,0,126,77,1,0,0,0,126,80,1,0,0,0,126,83,1,0,0,0,126,86,1,0,0,0,126,89,1,0,0,0,126,92,1,0,0,0,126,95,1,0,0,0,126,98,1,0,0,0,126,101,1,0,0,0,126,113,1,0,0,0,127,130,1,0,0,0,128,126,1,0,0,0,128,129,1,0,0,0,129,5,1,0,0,0,130,128,1,0,0,0,14,9,16,21,24,29,40,43,47,57,108,120,123,126,128]),es=ts.decisionToState.map((t,e)=>new je.dfa.DFA(t,e)),ss=new je.atn.PredictionContextCache;class ns extends je.Parser{static grammarFileName="Dsp.g4";static literalNames=[null,"','","'->'","'('","')'","'::'","'.'","'['","']'","'~'","'!'","'-'","'+'","'&'","'*'","'.*'","'/'","'%'","'<<'","'>>'","'<'","'>'","'<='","'>='","'=='","'!='","'^'","'|'","'&&'","'||'","'='"];static symbolicNames=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"WHITESPACE","COMMENT","NEWLINE","SYMBOL"];static ruleNames=["rule_pool","rule","term"];constructor(t){super(t),this._interp=new je.atn.ParserATNSimulator(this,ts,es,ss),this.ruleNames=ns.ruleNames,this.literalNames=ns.literalNames,this.symbolicNames=ns.symbolicNames}sempred(t,e,s){if(2===e)return this.term_sempred(t,s);throw"No predicate with index:"+e}term_sempred(t,e){switch(e){case 0:return this.precpred(this._ctx,17);case 1:return this.precpred(this._ctx,16);case 2:return this.precpred(this._ctx,12);case 3:return this.precpred(this._ctx,11);case 4:return this.precpred(this._ctx,10);case 5:return this.precpred(this._ctx,9);case 6:return this.precpred(this._ctx,8);case 7:return this.precpred(this._ctx,7);case 8:return this.precpred(this._ctx,6);case 9:return this.precpred(this._ctx,5);case 10:return this.precpred(this._ctx,4);case 11:return this.precpred(this._ctx,3);case 12:return this.precpred(this._ctx,2);case 13:return this.precpred(this._ctx,1);case 14:return this.precpred(this._ctx,15);case 15:return this.precpred(this._ctx,14);default:throw"No predicate with index:"+e}}rule_pool(){let t=new is(this,this._ctx,this.state);this.enterRule(t,0,ns.RULE_rule_pool);var e=0;try{this.enterOuterAlt(t,1),this.state=9,this._errHandler.sync(this);for(var s=this._interp.adaptivePredict(this._input,0,this._ctx);2!=s&&s!=je.atn.ATN.INVALID_ALT_NUMBER;)1===s&&(this.state=6,this.match(ns.NEWLINE)),this.state=11,this._errHandler.sync(this),s=this._interp.adaptivePredict(this._input,0,this._ctx);if(this.state=24,this._errHandler.sync(this),!(-32&(e=this._input.LA(1)))&&1<<e&32268||34===e){this.state=12,this.rule_(),this.state=21,this._errHandler.sync(this);for(s=this._interp.adaptivePredict(this._input,2,this._ctx);2!=s&&s!=je.atn.ATN.INVALID_ALT_NUMBER;){if(1===s){this.state=14,this._errHandler.sync(this),e=this._input.LA(1);do{this.state=13,this.match(ns.NEWLINE),this.state=16,this._errHandler.sync(this),e=this._input.LA(1)}while(33===e);this.state=18,this.rule_()}this.state=23,this._errHandler.sync(this),s=this._interp.adaptivePredict(this._input,2,this._ctx)}}for(this.state=29,this._errHandler.sync(this),e=this._input.LA(1);33===e;)this.state=26,this.match(ns.NEWLINE),this.state=31,this._errHandler.sync(this),e=this._input.LA(1);this.state=32,this.match(ns.EOF)}catch(e){if(!(e instanceof je.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}rule_(){let t=new rs(this,this._ctx,this.state);this.enterRule(t,2,ns.RULE_rule);var e=0;try{switch(this.state=47,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,7,this._ctx)){case 1:this.enterOuterAlt(t,1),this.state=34,this.term(0);break;case 2:if(this.enterOuterAlt(t,2),this.state=43,this._errHandler.sync(this),!((e=this._input.LA(1))-3&-32)&&1<<e-3&2147487681)for(this.state=35,this.term(0),this.state=40,this._errHandler.sync(this),e=this._input.LA(1);1===e;)this.state=36,this.match(ns.T__0),this.state=37,this.term(0),this.state=42,this._errHandler.sync(this),e=this._input.LA(1);this.state=45,this.match(ns.T__1),this.state=46,this.term(0)}}catch(e){if(!(e instanceof je.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}term(t){void 0===t&&(t=0);const e=this._ctx,s=this.state;let n=new os(this,this._ctx,s),i=n;this.enterRecursionRule(n,4,ns.RULE_term,t);var r=0;try{switch(this.enterOuterAlt(n,1),this.state=57,this._errHandler.sync(this),this._input.LA(1)){case 34:n=new as(this,n),this._ctx=n,i=n,this.state=50,this.match(ns.SYMBOL);break;case 3:n=new ls(this,n),this._ctx=n,i=n,this.state=51,this.match(ns.T__2),this.state=52,this.term(0),this.state=53,this.match(ns.T__3);break;case 9:case 10:case 11:case 12:case 13:case 14:n=new ds(this,n),this._ctx=n,i=n,this.state=55,-32&(r=this._input.LA(1))||!(1<<r&32256)?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=56,this.term(13);break;default:throw new je.error.NoViableAltException(this)}this._ctx.stop=this._input.LT(-1),this.state=128,this._errHandler.sync(this);for(var o=this._interp.adaptivePredict(this._input,13,this._ctx);2!=o&&o!=je.atn.ATN.INVALID_ALT_NUMBER;){if(1===o)switch(null!==this._parseListeners&&this.triggerExitRuleEvent(),i=n,this.state=126,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,12,this._ctx)){case 1:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=59,!this.precpred(this._ctx,17))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 17)");this.state=60,this.match(ns.T__4),this.state=61,this.term(18);break;case 2:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=62,!this.precpred(this._ctx,16))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 16)");this.state=63,this.match(ns.T__5),this.state=64,this.term(17);break;case 3:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=65,!this.precpred(this._ctx,12))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 12)");this.state=66,this.match(ns.T__14),this.state=67,this.term(13);break;case 4:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=68,!this.precpred(this._ctx,11))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 11)");this.state=69,-32&(r=this._input.LA(1))||!(1<<r&212992)?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=70,this.term(12);break;case 5:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=71,!this.precpred(this._ctx,10))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 10)");this.state=72,11!==(r=this._input.LA(1))&&12!==r?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=73,this.term(11);break;case 6:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=74,!this.precpred(this._ctx,9))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 9)");this.state=75,18!==(r=this._input.LA(1))&&19!==r?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=76,this.term(10);break;case 7:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=77,!this.precpred(this._ctx,8))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 8)");this.state=78,-32&(r=this._input.LA(1))||!(1<<r&15728640)?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=79,this.term(9);break;case 8:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=80,!this.precpred(this._ctx,7))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 7)");this.state=81,24!==(r=this._input.LA(1))&&25!==r?this._errHandler.recoverInline(this):(this._errHandler.reportMatch(this),this.consume()),this.state=82,this.term(8);break;case 9:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=83,!this.precpred(this._ctx,6))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 6)");this.state=84,this.match(ns.T__12),this.state=85,this.term(7);break;case 10:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=86,!this.precpred(this._ctx,5))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 5)");this.state=87,this.match(ns.T__25),this.state=88,this.term(6);break;case 11:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=89,!this.precpred(this._ctx,4))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 4)");this.state=90,this.match(ns.T__26),this.state=91,this.term(5);break;case 12:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=92,!this.precpred(this._ctx,3))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 3)");this.state=93,this.match(ns.T__27),this.state=94,this.term(4);break;case 13:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=95,!this.precpred(this._ctx,2))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 2)");this.state=96,this.match(ns.T__28),this.state=97,this.term(3);break;case 14:if(n=new cs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=98,!this.precpred(this._ctx,1))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 1)");this.state=99,this.match(ns.T__29),this.state=100,this.term(2);break;case 15:if(n=new hs(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=101,!this.precpred(this._ctx,15))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 15)");for(this.state=102,this.match(ns.T__6),this.state=103,this.term(0),this.state=108,this._errHandler.sync(this),r=this._input.LA(1);1===r;)this.state=104,this.match(ns.T__0),this.state=105,this.term(0),this.state=110,this._errHandler.sync(this),r=this._input.LA(1);this.state=111,this.match(ns.T__7);break;case 16:if(n=new us(this,new os(this,e,s)),this.pushNewRecursionContext(n,4,ns.RULE_term),this.state=113,!this.precpred(this._ctx,14))throw new je.error.FailedPredicateException(this,"this.precpred(this._ctx, 14)");if(this.state=114,this.match(ns.T__2),this.state=123,this._errHandler.sync(this),!((r=this._input.LA(1))-3&-32)&&1<<r-3&2147487681)for(this.state=115,this.term(0),this.state=120,this._errHandler.sync(this),r=this._input.LA(1);1===r;)this.state=116,this.match(ns.T__0),this.state=117,this.term(0),this.state=122,this._errHandler.sync(this),r=this._input.LA(1);this.state=125,this.match(ns.T__3)}this.state=130,this._errHandler.sync(this),o=this._interp.adaptivePredict(this._input,13,this._ctx)}}catch(t){if(!(t instanceof je.error.RecognitionException))throw t;n.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.unrollRecursionContexts(e)}return n}}ns.EOF=je.Token.EOF,ns.T__0=1,ns.T__1=2,ns.T__2=3,ns.T__3=4,ns.T__4=5,ns.T__5=6,ns.T__6=7,ns.T__7=8,ns.T__8=9,ns.T__9=10,ns.T__10=11,ns.T__11=12,ns.T__12=13,ns.T__13=14,ns.T__14=15,ns.T__15=16,ns.T__16=17,ns.T__17=18,ns.T__18=19,ns.T__19=20,ns.T__20=21,ns.T__21=22,ns.T__22=23,ns.T__23=24,ns.T__24=25,ns.T__25=26,ns.T__26=27,ns.T__27=28,ns.T__28=29,ns.T__29=30,ns.WHITESPACE=31,ns.COMMENT=32,ns.NEWLINE=33,ns.SYMBOL=34,ns.RULE_rule_pool=0,ns.RULE_rule=1,ns.RULE_term=2;let is=class extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=ns.RULE_rule_pool}EOF(){return this.getToken(ns.EOF,0)}NEWLINE=function(t){return void 0===t&&(t=null),null===t?this.getTokens(ns.NEWLINE):this.getToken(ns.NEWLINE,t)};rule_=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(rs):this.getTypedRuleContext(rs,t)};accept(t){return t instanceof Ze?t.visitRule_pool(this):t.visitChildren(this)}},rs=class extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=ns.RULE_rule}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(os):this.getTypedRuleContext(os,t)};accept(t){return t instanceof Ze?t.visitRule(this):t.visitChildren(this)}},os=class extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=ns.RULE_term}copyFrom(t){super.copyFrom(t)}},as=class extends os{constructor(t,e){super(t),super.copyFrom(e)}SYMBOL(){return this.getToken(ns.SYMBOL,0)}accept(t){return t instanceof Ze?t.visitSymbol(this):t.visitChildren(this)}};ns.SymbolContext=as;class ls extends os{constructor(t,e){super(t),super.copyFrom(e)}term(){return this.getTypedRuleContext(os,0)}accept(t){return t instanceof Ze?t.visitParentheses(this):t.visitChildren(this)}}ns.ParenthesesContext=ls;let hs=class extends os{constructor(t,e){super(t),super.copyFrom(e)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(os):this.getTypedRuleContext(os,t)};accept(t){return t instanceof Ze?t.visitSubscript(this):t.visitChildren(this)}};ns.SubscriptContext=hs;let cs=class extends os{constructor(t,e){super(t),super.copyFrom(e)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(os):this.getTypedRuleContext(os,t)};accept(t){return t instanceof Ze?t.visitBinary(this):t.visitChildren(this)}};ns.BinaryContext=cs;let us=class extends os{constructor(t,e){super(t),super.copyFrom(e)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(os):this.getTypedRuleContext(os,t)};accept(t){return t instanceof Ze?t.visitFunction(this):t.visitChildren(this)}};ns.FunctionContext=us;let ds=class extends os{constructor(t,e){super(t),super.copyFrom(e)}term(){return this.getTypedRuleContext(os,0)}accept(t){return t instanceof Ze?t.visitUnary(this):t.visitChildren(this)}};ns.UnaryContext=ds,ns.Rule_poolContext=is,ns.RuleContext=rs,ns.TermContext=os;const ps=(new je.atn.ATNDeserializer).deserialize([4,0,10,93,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,5,5,64,8,5,10,5,12,5,67,9,5,1,6,4,6,70,8,6,11,6,12,6,71,1,6,1,6,1,7,1,7,1,7,1,7,5,7,80,8,7,10,7,12,7,83,9,7,1,7,1,7,1,8,1,8,1,9,4,9,90,8,9,11,9,12,9,91,0,0,10,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,1,0,3,2,0,9,9,32,32,2,0,10,10,13,13,7,0,9,10,13,13,32,32,40,41,44,44,91,91,93,93,96,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,1,21,1,0,0,0,3,32,1,0,0,0,5,34,1,0,0,0,7,44,1,0,0,0,9,51,1,0,0,0,11,59,1,0,0,0,13,69,1,0,0,0,15,75,1,0,0,0,17,86,1,0,0,0,19,89,1,0,0,0,21,22,5,40,0,0,22,23,5,115,0,0,23,24,5,117,0,0,24,25,5,98,0,0,25,26,5,115,0,0,26,27,5,99,0,0,27,28,5,114,0,0,28,29,5,105,0,0,29,30,5,112,0,0,30,31,5,116,0,0,31,2,1,0,0,0,32,33,5,41,0,0,33,4,1,0,0,0,34,35,5,40,0,0,35,36,5,102,0,0,36,37,5,117,0,0,37,38,5,110,0,0,38,39,5,99,0,0,39,40,5,116,0,0,40,41,5,105,0,0,41,42,5,111,0,0,42,43,5,110,0,0,43,6,1,0,0,0,44,45,5,40,0,0,45,46,5,117,0,0,46,47,5,110,0,0,47,48,5,97,0,0,48,49,5,114,0,0,49,50,5,121,0,0,50,8,1,0,0,0,51,52,5,40,0,0,52,53,5,98,0,0,53,54,5,105,0,0,54,55,5,110,0,0,55,56,5,97,0,0,56,57,5,114,0,0,57,58,5,121,0,0,58,10,1,0,0,0,59,60,5,45,0,0,60,61,5,45,0,0,61,65,1,0,0,0,62,64,5,45,0,0,63,62,1,0,0,0,64,67,1,0,0,0,65,63,1,0,0,0,65,66,1,0,0,0,66,12,1,0,0,0,67,65,1,0,0,0,68,70,7,0,0,0,69,68,1,0,0,0,70,71,1,0,0,0,71,69,1,0,0,0,71,72,1,0,0,0,72,73,1,0,0,0,73,74,6,6,0,0,74,14,1,0,0,0,75,76,5,47,0,0,76,77,5,47,0,0,77,81,1,0,0,0,78,80,8,1,0,0,79,78,1,0,0,0,80,83,1,0,0,0,81,79,1,0,0,0,81,82,1,0,0,0,82,84,1,0,0,0,83,81,1,0,0,0,84,85,6,7,0,0,85,16,1,0,0,0,86,87,7,1,0,0,87,18,1,0,0,0,88,90,8,2,0,0,89,88,1,0,0,0,90,91,1,0,0,0,91,89,1,0,0,0,91,92,1,0,0,0,92,20,1,0,0,0,5,0,65,71,81,91,1,6,0,0]),gs=ps.decisionToState.map((t,e)=>new je.dfa.DFA(t,e));class fs extends je.Lexer{static grammarFileName="Ds.g4";static channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];static modeNames=["DEFAULT_MODE"];static literalNames=[null,"'(subscript'","')'","'(function'","'(unary'","'(binary'"];static symbolicNames=[null,null,null,null,null,null,"RULE","WHITESPACE","COMMENT","NEWLINE","SYMBOL"];static ruleNames=["T__0","T__1","T__2","T__3","T__4","RULE","WHITESPACE","COMMENT","NEWLINE","SYMBOL"];constructor(t){super(t),this._interp=new je.atn.LexerATNSimulator(this,ps,gs,new je.atn.PredictionContextCache)}}fs.EOF=je.Token.EOF,fs.T__0=1,fs.T__1=2,fs.T__2=3,fs.T__3=4,fs.T__4=5,fs.RULE=6,fs.WHITESPACE=7,fs.COMMENT=8,fs.NEWLINE=9,fs.SYMBOL=10;class xs extends je.tree.ParseTreeVisitor{visitRule_pool(t){return this.visitChildren(t)}visitRule(t){return this.visitChildren(t)}visitSymbol(t){return this.visitChildren(t)}visitSubscript(t){return this.visitChildren(t)}visitFunction(t){return this.visitChildren(t)}visitUnary(t){return this.visitChildren(t)}visitBinary(t){return this.visitChildren(t)}}const _s=(new je.atn.ATNDeserializer).deserialize([4,1,10,80,2,0,7,0,2,1,7,1,2,2,7,2,1,0,5,0,8,8,0,10,0,12,0,11,9,0,1,0,1,0,4,0,15,8,0,11,0,12,0,16,1,0,5,0,20,8,0,10,0,12,0,23,9,0,3,0,25,8,0,1,0,5,0,28,8,0,10,0,12,0,31,9,0,1,0,1,0,1,1,1,1,4,1,37,8,1,11,1,12,1,38,5,1,41,8,1,10,1,12,1,44,9,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,5,2,53,8,2,10,2,12,2,56,9,2,1,2,1,2,1,2,5,2,61,8,2,10,2,12,2,64,9,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,78,8,2,1,2,0,0,3,0,2,4,0,0,89,0,9,1,0,0,0,2,42,1,0,0,0,4,77,1,0,0,0,6,8,5,9,0,0,7,6,1,0,0,0,8,11,1,0,0,0,9,7,1,0,0,0,9,10,1,0,0,0,10,24,1,0,0,0,11,9,1,0,0,0,12,21,3,2,1,0,13,15,5,9,0,0,14,13,1,0,0,0,15,16,1,0,0,0,16,14,1,0,0,0,16,17,1,0,0,0,17,18,1,0,0,0,18,20,3,2,1,0,19,14,1,0,0,0,20,23,1,0,0,0,21,19,1,0,0,0,21,22,1,0,0,0,22,25,1,0,0,0,23,21,1,0,0,0,24,12,1,0,0,0,24,25,1,0,0,0,25,29,1,0,0,0,26,28,5,9,0,0,27,26,1,0,0,0,28,31,1,0,0,0,29,27,1,0,0,0,29,30,1,0,0,0,30,32,1,0,0,0,31,29,1,0,0,0,32,33,5,0,0,1,33,1,1,0,0,0,34,36,3,4,2,0,35,37,5,9,0,0,36,35,1,0,0,0,37,38,1,0,0,0,38,36,1,0,0,0,38,39,1,0,0,0,39,41,1,0,0,0,40,34,1,0,0,0,41,44,1,0,0,0,42,40,1,0,0,0,42,43,1,0,0,0,43,45,1,0,0,0,44,42,1,0,0,0,45,46,5,6,0,0,46,47,5,9,0,0,47,48,3,4,2,0,48,3,1,0,0,0,49,78,5,10,0,0,50,54,5,1,0,0,51,53,3,4,2,0,52,51,1,0,0,0,53,56,1,0,0,0,54,52,1,0,0,0,54,55,1,0,0,0,55,57,1,0,0,0,56,54,1,0,0,0,57,78,5,2,0,0,58,62,5,3,0,0,59,61,3,4,2,0,60,59,1,0,0,0,61,64,1,0,0,0,62,60,1,0,0,0,62,63,1,0,0,0,63,65,1,0,0,0,64,62,1,0,0,0,65,78,5,2,0,0,66,67,5,4,0,0,67,68,5,10,0,0,68,69,3,4,2,0,69,70,5,2,0,0,70,78,1,0,0,0,71,72,5,5,0,0,72,73,5,10,0,0,73,74,3,4,2,0,74,75,3,4,2,0,75,76,5,2,0,0,76,78,1,0,0,0,77,49,1,0,0,0,77,50,1,0,0,0,77,58,1,0,0,0,77,66,1,0,0,0,77,71,1,0,0,0,78,5,1,0,0,0,10,9,16,21,24,29,38,42,54,62,77]),Ts=_s.decisionToState.map((t,e)=>new je.dfa.DFA(t,e)),ms=new je.atn.PredictionContextCache;class Es extends je.Parser{static grammarFileName="Ds.g4";static literalNames=[null,"'(subscript'","')'","'(function'","'(unary'","'(binary'"];static symbolicNames=[null,null,null,null,null,null,"RULE","WHITESPACE","COMMENT","NEWLINE","SYMBOL"];static ruleNames=["rule_pool","rule","term"];constructor(t){super(t),this._interp=new je.atn.ParserATNSimulator(this,_s,Ts,ms),this.ruleNames=Es.ruleNames,this.literalNames=Es.literalNames,this.symbolicNames=Es.symbolicNames}rule_pool(){let t=new Ss(this,this._ctx,this.state);this.enterRule(t,0,Es.RULE_rule_pool);var e=0;try{this.enterOuterAlt(t,1),this.state=9,this._errHandler.sync(this);for(var s=this._interp.adaptivePredict(this._input,0,this._ctx);2!=s&&s!=je.atn.ATN.INVALID_ALT_NUMBER;)1===s&&(this.state=6,this.match(Es.NEWLINE)),this.state=11,this._errHandler.sync(this),s=this._interp.adaptivePredict(this._input,0,this._ctx);if(this.state=24,this._errHandler.sync(this),!(-32&(e=this._input.LA(1)))&&1<<e&1146){this.state=12,this.rule_(),this.state=21,this._errHandler.sync(this);for(s=this._interp.adaptivePredict(this._input,2,this._ctx);2!=s&&s!=je.atn.ATN.INVALID_ALT_NUMBER;){if(1===s){this.state=14,this._errHandler.sync(this),e=this._input.LA(1);do{this.state=13,this.match(Es.NEWLINE),this.state=16,this._errHandler.sync(this),e=this._input.LA(1)}while(9===e);this.state=18,this.rule_()}this.state=23,this._errHandler.sync(this),s=this._interp.adaptivePredict(this._input,2,this._ctx)}}for(this.state=29,this._errHandler.sync(this),e=this._input.LA(1);9===e;)this.state=26,this.match(Es.NEWLINE),this.state=31,this._errHandler.sync(this),e=this._input.LA(1);this.state=32,this.match(Es.EOF)}catch(e){if(!(e instanceof je.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}rule_(){let t=new Cs(this,this._ctx,this.state);this.enterRule(t,2,Es.RULE_rule);var e=0;try{for(this.enterOuterAlt(t,1),this.state=42,this._errHandler.sync(this),e=this._input.LA(1);!(-32&e)&&1<<e&1082;){this.state=34,this.term(),this.state=36,this._errHandler.sync(this),e=this._input.LA(1);do{this.state=35,this.match(Es.NEWLINE),this.state=38,this._errHandler.sync(this),e=this._input.LA(1)}while(9===e);this.state=44,this._errHandler.sync(this),e=this._input.LA(1)}this.state=45,this.match(Es.RULE),this.state=46,this.match(Es.NEWLINE),this.state=47,this.term()}catch(e){if(!(e instanceof je.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}term(){let t=new As(this,this._ctx,this.state);this.enterRule(t,4,Es.RULE_term);var e=0;try{switch(this.state=77,this._errHandler.sync(this),this._input.LA(1)){case 10:t=new Ns(this,t),this.enterOuterAlt(t,1),this.state=49,this.match(Es.SYMBOL);break;case 1:for(t=new ys(this,t),this.enterOuterAlt(t,2),this.state=50,this.match(Es.T__0),this.state=54,this._errHandler.sync(this),e=this._input.LA(1);!(-32&e)&&1<<e&1082;)this.state=51,this.term(),this.state=56,this._errHandler.sync(this),e=this._input.LA(1);this.state=57,this.match(Es.T__1);break;case 3:for(t=new Ls(this,t),this.enterOuterAlt(t,3),this.state=58,this.match(Es.T__2),this.state=62,this._errHandler.sync(this),e=this._input.LA(1);!(-32&e)&&1<<e&1082;)this.state=59,this.term(),this.state=64,this._errHandler.sync(this),e=this._input.LA(1);this.state=65,this.match(Es.T__1);break;case 4:t=new ks(this,t),this.enterOuterAlt(t,4),this.state=66,this.match(Es.T__3),this.state=67,this.match(Es.SYMBOL),this.state=68,this.term(),this.state=69,this.match(Es.T__1);break;case 5:t=new Is(this,t),this.enterOuterAlt(t,5),this.state=71,this.match(Es.T__4),this.state=72,this.match(Es.SYMBOL),this.state=73,this.term(),this.state=74,this.term(),this.state=75,this.match(Es.T__1);break;default:throw new je.error.NoViableAltException(this)}}catch(e){if(!(e instanceof je.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}}Es.EOF=je.Token.EOF,Es.T__0=1,Es.T__1=2,Es.T__2=3,Es.T__3=4,Es.T__4=5,Es.RULE=6,Es.WHITESPACE=7,Es.COMMENT=8,Es.NEWLINE=9,Es.SYMBOL=10,Es.RULE_rule_pool=0,Es.RULE_rule=1,Es.RULE_term=2;class Ss extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=Es.RULE_rule_pool}EOF(){return this.getToken(Es.EOF,0)}NEWLINE=function(t){return void 0===t&&(t=null),null===t?this.getTokens(Es.NEWLINE):this.getToken(Es.NEWLINE,t)};rule_=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Cs):this.getTypedRuleContext(Cs,t)};accept(t){return t instanceof xs?t.visitRule_pool(this):t.visitChildren(this)}}class Cs extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=Es.RULE_rule}RULE(){return this.getToken(Es.RULE,0)}NEWLINE=function(t){return void 0===t&&(t=null),null===t?this.getTokens(Es.NEWLINE):this.getToken(Es.NEWLINE,t)};term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(As):this.getTypedRuleContext(As,t)};accept(t){return t instanceof xs?t.visitRule(this):t.visitChildren(this)}}class As extends je.ParserRuleContext{constructor(t,e,s){void 0===e&&(e=null),null==s&&(s=-1),super(e,s),this.parser=t,this.ruleIndex=Es.RULE_term}copyFrom(t){super.copyFrom(t)}}class Ns extends As{constructor(t,e){super(t),super.copyFrom(e)}SYMBOL(){return this.getToken(Es.SYMBOL,0)}accept(t){return t instanceof xs?t.visitSymbol(this):t.visitChildren(this)}}Es.SymbolContext=Ns;class ys extends As{constructor(t,e){super(t),super.copyFrom(e)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(As):this.getTypedRuleContext(As,t)};accept(t){return t instanceof xs?t.visitSubscript(this):t.visitChildren(this)}}Es.SubscriptContext=ys;class Ls extends As{constructor(t,e){super(t),super.copyFrom(e)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(As):this.getTypedRuleContext(As,t)};accept(t){return t instanceof xs?t.visitFunction(this):t.visitChildren(this)}}Es.FunctionContext=Ls;class Is extends As{constructor(t,e){super(t),super.copyFrom(e)}SYMBOL(){return this.getToken(Es.SYMBOL,0)}term=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(As):this.getTypedRuleContext(As,t)};accept(t){return t instanceof xs?t.visitBinary(this):t.visitChildren(this)}}Es.BinaryContext=Is;class ks extends As{constructor(t,e){super(t),super.copyFrom(e)}SYMBOL(){return this.getToken(Es.SYMBOL,0)}term(){return this.getTypedRuleContext(As,0)}accept(t){return t instanceof xs?t.visitUnary(this):t.visitChildren(this)}}Es.UnaryContext=ks,Es.Rule_poolContext=Ss,Es.RuleContext=Cs,Es.TermContext=As;class vs extends Ge{syntaxError(t,e,s,n,i,r){throw new Error(`line ${s}:${n} ${i}`)}}class ws extends Ze{visitRule_pool(t){return t.rule_().map(t=>this.visit(t)).join("\n\n")}visitRule(t){const e=t.term().map(t=>this.visit(t));if(1===e.length)return`----\n${e[0]}\n`;{const t=e.pop(),s=Math.max(...e.map(t=>t.length));return e.push("-".repeat(Math.max(s,4))),e.push(t),e.push(""),e.join("\n")}}visitSymbol(t){return t.SYMBOL().getText()}visitParentheses(t){return this.visit(t.term())}visitSubscript(t){return`(subscript ${t.term().map(t=>this.visit(t)).join(" ")})`}visitFunction(t){return`(function ${t.term().map(t=>this.visit(t)).join(" ")})`}visitUnary(t){return`(unary ${t.getChild(0).getText()} ${this.visit(t.term())})`}visitBinary(t){return`(binary ${t.getChild(1).getText()} ${this.visit(t.term(0))} ${this.visit(t.term(1))})`}}class Rs extends xs{visitRule_pool(t){return t.rule_().map(t=>this.visit(t)).join("\n")}visitRule(t){const e=t.term().map(t=>this.visit(t)),s=e.pop();return`${e.join(", ")} -> ${s}`}visitSymbol(t){return t.SYMBOL().getText()}visitSubscript(t){return`${this.visit(t.term(0))}[${t.term().slice(1).map(t=>this.visit(t)).join(", ")}]`}visitFunction(t){return`${this.visit(t.term(0))}(${t.term().slice(1).map(t=>this.visit(t)).join(", ")})`}visitUnary(t){return`(${t.getChild(1).getText()} ${this.visit(t.term())})`}visitBinary(t){return`(${this.visit(t.term(0))} ${t.getChild(1).getText()} ${this.visit(t.term(1))})`}}function Os(t){const e=new $e(t),s=new Qe(e);s.removeErrorListeners(),s.addErrorListener(new vs);const n=new We(s),i=new ns(n);i.removeErrorListeners(),i.addErrorListener(new vs);const r=i.rule_pool();return(new ws).visit(r)}function Ps(t){const e=new $e(t),s=new fs(e);s.removeErrorListeners(),s.addErrorListener(new vs);const n=new We(s),i=new Es(n);i.removeErrorListeners(),i.addErrorListener(new vs);const r=i.rule_pool();return(new Rs).visit(r)}export{Os as parse,Ps as unparse};
|
package/package.json
CHANGED