@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 115 kB
JavaScript
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[788],{10788(t,e,n){n.d(e,{A:()=>Ze,CharStream:()=>$e,CommonTokenStream:()=>Xe,ParseTreeWalker:()=>Qe,p:()=>Je});var s={763:()=>{}},i={};function r(t){var e=i[t];if(void 0!==e)return e.exports;var n=i[t]={exports:{}};return s[t](n,n.exports,r),n.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o={};r.d(o,{MG:()=>Q,fr:()=>wt,sR:()=>Ie,Zo:()=>Le,iH:()=>be,rt:()=>Ft,jB:()=>Me,M8:()=>ue,$t:()=>Ne,aq:()=>Ce,pG:()=>vt,eP:()=>Ee,KU:()=>me,zW:()=>Oe,IX:()=>A,mY:()=>k,a7:()=>J,JG:()=>zt,ay:()=>Zt,X2:()=>ie,WU:()=>fe,Uw:()=>xe,gw:()=>Te,iX:()=>Be,re:()=>oe,Pg:()=>qe,tD:()=>le,R$:()=>se,Dj:()=>Bt,m7:()=>z,NZ:()=>F,xo:()=>M,ou:()=>l,qC:()=>He,mD:()=>f,Ay:()=>je});class l{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 a(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 n=0;n<t.length;n++)if(!(t[n]===e[n]||t[n].equals&&t[n].equals(e[n])))return!1;return!0}l.INVALID_TYPE=0,l.EPSILON=-2,l.MIN_USER_TOKEN_TYPE=1,l.EOF=-1,l.DEFAULT_CHANNEL=0,l.HIDDEN_CHANNEL=1;const h=Math.round(Math.random()*Math.pow(2,32));function c(t){if(!t)return 0;const e=typeof t,n="string"===e?t:!("object"!==e||!t.toString)&&t.toString();if(!n)return 0;let s,i;const r=3&n.length,o=n.length-r;let l=h;const a=3432918353,c=461845907;let u=0;for(;u<o;)i=255&n.charCodeAt(u)|(255&n.charCodeAt(++u))<<8|(255&n.charCodeAt(++u))<<16|(255&n.charCodeAt(++u))<<24,++u,i=(65535&i)*a+(((i>>>16)*a&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,s=5*(65535&l)+((5*(l>>>16)&65535)<<16)&4294967295,l=27492+(65535&s)+((58964+(s>>>16)&65535)<<16);switch(i=0,r){case 3:i^=(255&n.charCodeAt(u+2))<<16;case 2:i^=(255&n.charCodeAt(u+1))<<8;case 1:i^=255&n.charCodeAt(u),i=(65535&i)*a+(((i>>>16)*a&65535)<<16)&4294967295,i=i<<15|i>>>17,i=(65535&i)*c+(((i>>>16)*c&65535)<<16)&4294967295,l^=i}return l^=n.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 u{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=c(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 n=this.hash^t;n=n<<13|n>>>19,n=5*n+3864292196,this.hash=n}}}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 u;return t.update.apply(t,arguments),t.finish()}}function d(t){return t?"string"==typeof t?c(t):t.hashCode():-1}function g(t,e){return t&&t.equals?t.equals(e):t===e}function p(t){return null===t?"null":t}function f(t){return Array.isArray(t)?"["+t.map(p).join(", ")+"]":"null"}class x{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||d,this.equalsFunction=e||g}get(t){if(null==t)return t;const e=this._getBucket(t);if(!e)return null;for(const n of e)if(this.equalsFunction(n,t))return n;return null}add(t){return this.getOrAdd(t)===t}getOrAdd(t){this._expand();const e=this._getSlot(t);let n=this.buckets[e];if(!n)return n=[t],this.buckets[e]=n,this.itemCount++,t;for(const e of n)if(this.equalsFunction(e,t))return e;return n.push(t),this.itemCount++,t}has(t){return null!=this.get(t)}values(){return this.buckets.filter(t=>null!=t).flat(1)}toString(){return f(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 n=this.buckets[e];n||(n=[],this.buckets[e]=n),n.push(t)}}}class T{hashCode(){const t=new u;return this.updateHashCode(t),t.finish()}evaluate(t,e){}evalPrecedence(t,e){return this}static andContext(t,e){if(null===t||t===T.NONE)return e;if(null===e||e===T.NONE)return t;const n=new S(t,e);return 1===n.opnds.length?n.opnds[0]:n}static orContext(t,e){if(null===t)return e;if(null===e)return t;if(t===T.NONE||e===T.NONE)return T.NONE;const n=new m(t,e);return 1===n.opnds.length?n.opnds[0]:n}}class S extends T{constructor(t,e){super();const n=new x;t instanceof S?t.opnds.map(function(t){n.add(t)}):n.add(t),e instanceof S?e.opnds.map(function(t){n.add(t)}):n.add(e);const s=E(n);if(s.length>0){let t=null;s.map(function(e){(null===t||e.precedence<t.precedence)&&(t=e)}),n.add(t)}this.opnds=Array.from(n.values())}equals(t){return this===t||t instanceof S&&a(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"AND")}evaluate(t,e){for(let n=0;n<this.opnds.length;n++)if(!this.opnds[n].evaluate(t,e))return!1;return!0}evalPrecedence(t,e){let n=!1;const s=[];for(let i=0;i<this.opnds.length;i++){const r=this.opnds[i],o=r.evalPrecedence(t,e);if(n|=o!==r,null===o)return null;o!==T.NONE&&s.push(o)}if(!n)return this;if(0===s.length)return T.NONE;let i=null;return s.map(function(t){i=null===i?t:T.andContext(i,t)}),i}toString(){const t=this.opnds.map(t=>t.toString());return(t.length>3?t.slice(3):t).join("&&")}}class m extends T{constructor(t,e){super();const n=new x;t instanceof m?t.opnds.map(function(t){n.add(t)}):n.add(t),e instanceof m?e.opnds.map(function(t){n.add(t)}):n.add(e);const s=E(n);if(s.length>0){const t=s.sort(function(t,e){return t.compareTo(e)}),e=t[t.length-1];n.add(e)}this.opnds=Array.from(n.values())}equals(t){return this===t||t instanceof m&&a(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"OR")}evaluate(t,e){for(let n=0;n<this.opnds.length;n++)if(this.opnds[n].evaluate(t,e))return!0;return!1}evalPrecedence(t,e){let n=!1;const s=[];for(let i=0;i<this.opnds.length;i++){const r=this.opnds[i],o=r.evalPrecedence(t,e);if(n|=o!==r,o===T.NONE)return T.NONE;null!==o&&s.push(o)}return n?(s.length,null):this}toString(){const t=this.opnds.map(t=>t.toString());return(t.length>3?t.slice(3):t).join("||")}}function E(t){const e=[];return t.values().map(function(t){t instanceof T.PrecedencePredicate&&e.push(t)}),e}function _(t,e){if(null===t){const t={state:null,alt:null,context:null,semanticContext:null};return e&&(t.reachesIntoOuterContext=0),t}{const n={};return n.state=t.state||null,n.alt=void 0===t.alt?null:t.alt,n.context=t.context||null,n.semanticContext=t.semanticContext||null,e&&(n.reachesIntoOuterContext=t.reachesIntoOuterContext||0,n.precedenceFilterSuppressed=t.precedenceFilterSuppressed||!1),n}}class C{constructor(t,e){this.checkContext(t,e),t=_(t),e=_(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:T.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 u;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 C&&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 u;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}equalsForConfigSet(t){return this===t||t instanceof C&&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!==T.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class A{constructor(t,e){this.start=t,this.stop=e}clone(){return new A(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}}A.INVALID_INTERVAL=new A(-1,-2);class k{constructor(){this.intervals=null,this.readOnly=!1}first(t){return null===this.intervals||0===this.intervals.length?l.INVALID_TYPE:this.intervals[0].start}addOne(t){this.addInterval(new A(t,t+1))}addRange(t,e){this.addInterval(new A(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 n=this.intervals[e];if(t.stop<n.start)return void this.intervals.splice(e,0,t);if(t.stop===n.start)return void(this.intervals[e]=new A(t.start,n.stop));if(t.start<=n.stop)return this.intervals[e]=new A(Math.min(n.start,t.start),Math.max(n.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],n=this.intervals[t+1];e.stop>=n.stop?(this.intervals.splice(t+1,1),this.reduce(t)):e.stop>=n.start&&(this.intervals[t]=new A(e.start,n.stop),this.intervals.splice(t+1,1))}}complement(t,e){const n=new k;return n.addInterval(new A(t,e+1)),null!==this.intervals&&this.intervals.forEach(t=>n.removeRange(t)),n}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 n=0;n<this.intervals.length;n++){const n=this.intervals[e];if(t.stop<=n.start)return;if(t.start>n.start&&t.stop<n.stop){this.intervals[e]=new A(n.start,t.start);const s=new A(t.stop,n.stop);return void this.intervals.splice(e,0,s)}t.start<=n.start&&t.stop>=n.stop?(this.intervals.splice(e,1),e-=1):t.start<n.stop?this.intervals[e]=new A(n.start,t.start):t.stop<n.stop&&(this.intervals[e]=new A(t.stop,n.stop)),e+=1}}}removeOne(t){if(null!==this.intervals)for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];if(t<n.start)return;if(t===n.start&&t===n.stop-1)return void this.intervals.splice(e,1);if(t===n.start)return void(this.intervals[e]=new A(n.start+1,n.stop));if(t===n.stop-1)return void(this.intervals[e]=new A(n.start,n.stop-1));if(t<n.stop-1){const s=new A(n.start,t);return n.start=t+1,void this.intervals.splice(e,0,s)}}}toString(t,e,n){return t=t||null,e=e||null,n=n||!1,null===this.intervals?"{}":null!==t||null!==e?this.toTokenString(t,e):n?this.toCharString():this.toIndexString()}toCharString(){const t=[];for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];n.stop===n.start+1?n.start===l.EOF?t.push("<EOF>"):t.push("'"+String.fromCharCode(n.start)+"'"):t.push("'"+String.fromCharCode(n.start)+"'..'"+String.fromCharCode(n.stop-1)+"'")}return t.length>1?"{"+t.join(", ")+"}":t[0]}toIndexString(){const t=[];for(let e=0;e<this.intervals.length;e++){const n=this.intervals[e];n.stop===n.start+1?n.start===l.EOF?t.push("<EOF>"):t.push(n.start.toString()):t.push(n.start.toString()+".."+(n.stop-1).toString())}return t.length>1?"{"+t.join(", ")+"}":t[0]}toTokenString(t,e){const n=[];for(let s=0;s<this.intervals.length;s++){const i=this.intervals[s];for(let s=i.start;s<i.stop;s++)n.push(this.elementName(t,e,s))}return n.length>1?"{"+n.join(", ")+"}":n[0]}elementName(t,e,n){return n===l.EOF?"<EOF>":n===l.EPSILON?"<EPSILON>":t[n]||e[n]}get length(){return this.intervals.map(t=>t.length).reduce((t,e)=>t+e)}}class N{constructor(){this.atn=null,this.stateNumber=N.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 N&&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)}}N.INVALID_TYPE=0,N.BASIC=1,N.RULE_START=2,N.BLOCK_START=3,N.PLUS_BLOCK_START=4,N.STAR_BLOCK_START=5,N.TOKEN_START=6,N.RULE_STOP=7,N.BLOCK_END=8,N.STAR_LOOP_BACK=9,N.STAR_LOOP_ENTRY=10,N.PLUS_LOOP_BACK=11,N.LOOP_END=12,N.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"],N.INVALID_STATE_NUMBER=-1;class I extends N{constructor(){return super(),this.stateType=N.RULE_STOP,this}}class y{constructor(t){if(null==t)throw"target cannot be null.";this.target=t,this.isEpsilon=!1,this.label=null}}y.EPSILON=1,y.RANGE=2,y.RULE=3,y.PREDICATE=4,y.ATOM=5,y.ACTION=6,y.SET=7,y.NOT_SET=8,y.WILDCARD=9,y.PRECEDENCE=10,y.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],y.serializationTypes={EpsilonTransition:y.EPSILON,RangeTransition:y.RANGE,RuleTransition:y.RULE,PredicateTransition:y.PREDICATE,AtomTransition:y.ATOM,ActionTransition:y.ACTION,SetTransition:y.SET,NotSetTransition:y.NOT_SET,WildcardTransition:y.WILDCARD,PrecedencePredicateTransition:y.PRECEDENCE};class L extends y{constructor(t,e,n,s){super(t),this.ruleIndex=e,this.precedence=n,this.followState=s,this.serializationType=y.RULE,this.isEpsilon=!0}matches(t,e,n){return!1}}class O extends y{constructor(t,e){super(t),this.serializationType=y.SET,null!=e?this.label=e:(this.label=new k,this.label.addOne(l.INVALID_TYPE))}matches(t,e,n){return this.label.contains(t)}toString(){return this.label.toString()}}class R extends O{constructor(t,e){super(t,e),this.serializationType=y.NOT_SET}matches(t,e,n){return t>=e&&t<=n&&!super.matches(t,e,n)}toString(){return"~"+super.toString()}}class w extends y{constructor(t){super(t),this.serializationType=y.WILDCARD}matches(t,e,n){return t>=e&&t<=n}toString(){return"."}}class v extends y{constructor(t){super(t)}}class b{}class P extends b{}class D extends P{}class F extends D{get ruleContext(){throw new Error("missing interface implementation")}}class M extends D{}class U extends M{}const B={toStringTree:function(t,e,n){e=e||null,null!==(n=n||null)&&(e=n.ruleNames);let s=B.getNodeText(t,e);s=function(t){return t.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}(s);const i=t.getChildCount();if(0===i)return s;let r="("+s+" ";i>0&&(s=B.toStringTree(t.getChild(0),e),r=r.concat(s));for(let n=1;n<i;n++)s=B.toStringTree(t.getChild(n),e),r=r.concat(" "+s);return r=r.concat(")"),r},getNodeText:function(t,e,n){if(e=e||null,null!==(n=n||null)&&(e=n.ruleNames),null!==e){if(t instanceof F){const n=t.ruleContext.getAltNumber();return 0!=n?e[t.ruleIndex]+":"+n:e[t.ruleIndex]}if(t instanceof U)return t.toString();if(t instanceof M&&null!==t.symbol)return t.symbol.text}const s=t.getPayload();return s instanceof l?s.text:t.getPayload().toString()},getChildren:function(t){const e=[];for(let n=0;n<t.getChildCount();n++)e.push(t.getChild(n));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 B.findAllNodes(t,e,!0)},findAllRuleNodes:function(t,e){return B.findAllNodes(t,e,!1)},findAllNodes:function(t,e,n){const s=[];return B._findAllNodes(t,e,n,s),s},_findAllNodes:function(t,e,n,s){n&&t instanceof M?t.symbol.type===e&&s.push(t):!n&&t instanceof F&&t.ruleIndex===e&&s.push(t);for(let i=0;i<t.getChildCount();i++)B._findAllNodes(t.getChild(i),e,n,s)},descendants:function(t){let e=[t];for(let n=0;n<t.getChildCount();n++)e=e.concat(B.descendants(t.getChild(n)));return e}},V=B;class z extends F{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 A.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 V.toStringTree(this,t,e)}toString(t,e){t=t||null,e=e||null;let n=this,s="[";for(;null!==n&&n!==e;){if(null===t)n.isEmpty()||(s+=n.invokingState);else{const e=n.ruleIndex;s+=e>=0&&e<t.length?t[e]:""+e}null===n.parentCtx||null===t&&n.parentCtx.isEmpty()||(s+=" "),n=n.parentCtx}return s+="]",s}}class q{constructor(t){this.cachedHashCode=t}isEmpty(){return this===q.EMPTY}hasEmptyPath(){return this.getReturnState(this.length-1)===q.EMPTY_RETURN_STATE}hashCode(){return this.cachedHashCode}updateHashCode(t){t.update(this.cachedHashCode)}}q.EMPTY=null,q.EMPTY_RETURN_STATE=2147483647,q.globalNodeCount=1,q.id=q.globalNodeCount,q.trace_atn_sim=!1;class H extends q{constructor(t,e){const n=new u;return n.update(t,e),super(n.finish()),this.parents=t,this.returnStates=e,this}isEmpty(){return this.returnStates[0]===q.EMPTY_RETURN_STATE}getParent(t){return this.parents[t]}getReturnState(t){return this.returnStates[t]}equals(t){return this===t||t instanceof H&&this.hashCode()===t.hashCode()&&a(this.returnStates,t.returnStates)&&a(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]!==q.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 K extends q{constructor(t,e){let n=0;const s=new u;null!==t?s.update(t,e):s.update(1),n=s.finish(),super(n),this.parentCtx=t,this.returnState=e}getParent(t){return this.parentCtx}getReturnState(t){return this.returnState}equals(t){return this===t||t instanceof K&&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===q.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}get length(){return 1}static create(t,e){return e===q.EMPTY_RETURN_STATE&&null===t?q.EMPTY:new K(t,e)}}class Y extends K{constructor(){super(null,q.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(t){return null}getReturnState(t){return this.returnState}equals(t){return this===t}toString(){return"$"}}q.EMPTY=new Y;class G{constructor(t,e){this.buckets=new Array(16),this.threshold=Math.floor(12),this.itemCount=0,this.hashFunction=t||d,this.equalsFunction=e||g}set(t,e){this._expand();const n=this._getSlot(t);let s=this.buckets[n];if(!s)return s=[[t,e]],this.buckets[n]=s,this.itemCount++,e;const i=s.find(e=>this.equalsFunction(e[0],t),this);if(i){const t=i[1];return i[1]=e,t}return s.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 n=e.find(e=>this.equalsFunction(e[0],t),this);return n?n[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 n=this.buckets[e];n||(n=[],this.buckets[e]=n),n.push(t)}}}function W(t,e){if(null==e&&(e=z.EMPTY),null===e.parentCtx||e===z.EMPTY)return q.EMPTY;const n=W(t,e.parentCtx),s=t.states[e.invokingState].transitions[0];return K.create(n,s.followState.stateNumber)}function j(t,e,n){if(t.isEmpty())return t;let s=n.get(t)||null;if(null!==s)return s;if(s=e.get(t),null!==s)return n.set(t,s),s;let i=!1,r=[];for(let s=0;s<r.length;s++){const o=j(t.getParent(s),e,n);if(i||o!==t.getParent(s)){if(!i){r=[];for(let e=0;e<t.length;e++)r[e]=t.getParent(e);i=!0}r[s]=o}}if(!i)return e.add(t),n.set(t,t),t;let o=null;return o=0===r.length?q.EMPTY:1===r.length?K.create(r[0],t.getReturnState(0)):new H(r,t.returnStates),e.add(o),n.set(o,o),n.set(t,o),o}function $(t,e,n,s){if(t===e)return t;if(t instanceof K&&e instanceof K)return function(t,e,n,s){if(null!==s){let n=s.get(t,e);if(null!==n)return n;if(n=s.get(e,t),null!==n)return n}const i=function(t,e,n){if(n){if(t===q.EMPTY)return q.EMPTY;if(e===q.EMPTY)return q.EMPTY}else{if(t===q.EMPTY&&e===q.EMPTY)return q.EMPTY;if(t===q.EMPTY){const t=[e.returnState,q.EMPTY_RETURN_STATE],n=[e.parentCtx,null];return new H(n,t)}if(e===q.EMPTY){const e=[t.returnState,q.EMPTY_RETURN_STATE],n=[t.parentCtx,null];return new H(n,e)}}return null}(t,e,n);if(null!==i)return null!==s&&s.set(t,e,i),i;if(t.returnState===e.returnState){const i=$(t.parentCtx,e.parentCtx,n,s);if(i===t.parentCtx)return t;if(i===e.parentCtx)return e;const r=K.create(i,t.returnState);return null!==s&&s.set(t,e,r),r}{let n=null;if((t===e||null!==t.parentCtx&&t.parentCtx===e.parentCtx)&&(n=t.parentCtx),null!==n){const i=[t.returnState,e.returnState];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState);const r=new H([n,n],i);return null!==s&&s.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 H(r,i);return null!==s&&s.set(t,e,o),o}}(t,e,n,s);if(n){if(t instanceof Y)return t;if(e instanceof Y)return e}return t instanceof K&&(t=new H([t.getParent()],[t.returnState])),e instanceof K&&(e=new H([e.getParent()],[e.returnState])),function(t,e,n,s){if(null!==s){let n=s.get(t,e);if(null!==n)return q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n;if(n=s.get(e,t),null!==n)return q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n}let i=0,r=0,o=0,l=new Array(t.returnStates.length+e.returnStates.length).fill(0),a=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===q.EMPTY_RETURN_STATE&&null===h&&null===c||null!==h&&null!==c&&h===c?(a[o]=h,l[o]=e):(a[o]=$(h,c,n,s),l[o]=e),i+=1,r+=1}else t.returnStates[i]<e.returnStates[r]?(a[o]=h,l[o]=t.returnStates[i],i+=1):(a[o]=c,l[o]=e.returnStates[r],r+=1);o+=1}if(i<t.returnStates.length)for(let e=i;e<t.returnStates.length;e++)a[o]=t.parents[e],l[o]=t.returnStates[e],o+=1;else for(let t=r;t<e.returnStates.length;t++)a[o]=e.parents[t],l[o]=e.returnStates[t],o+=1;if(o<a.length){if(1===o){const n=K.create(a[0],l[0]);return null!==s&&s.set(t,e,n),n}a=a.slice(0,o),l=l.slice(0,o)}const h=new H(a,l);return h.equals(t)?(null!==s&&s.set(t,e,t),q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> a"),t):h.equals(e)?(null!==s&&s.set(t,e,e),q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){const e=new G;for(let n=0;n<t.length;n++){const s=t[n];e.containsKey(s)||e.set(s,s)}for(let n=0;n<t.length;n++)t[n]=e.get(t[n])}(a),null!==s&&s.set(t,e,h),q.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> "+h),h)}(t,e,n,s)}class X{constructor(){this.data=new Uint32Array(1)}set(t){X._checkIndex(t),this._resize(t),this.data[t>>>5]|=1<<t%32}get(t){X._checkIndex(t);const e=t>>>5;return!(e>=this.data.length||!(this.data[e]&1<<t%32))}clear(t){X._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 n=0;n<e;++n)this.data[n]|=t.data[n];if(this.data.length<t.data.length){this._resize((t.data.length<<5)-1);const n=t.data.length;for(let s=e;s<n;++s)this.data[s]=t.data[s]}}values(){const t=new Array(this.length);let e=0;const n=this.data.length;for(let s=0;s<n;++s){let n=this.data[s];for(;0!==n;){const i=n&-n;t[e++]=(s<<5)+X._bitCount(i-1),n^=i}}return t}minValue(){for(let t=0;t<this.data.length;++t){let e=this.data[t];if(0!==e){let n=0;for(;!(1&e);)n++,e>>=1;return n+32*t}}return 0}hashCode(){return u.hashStuff(this.values())}equals(t){return t instanceof X&&a(this.data,t.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.data.map(t=>X._bitCount(t)).reduce((t,e)=>t+e,0)}_resize(t){const e=t+32>>>5;if(e<=this.data.length)return;const n=new Uint32Array(e);n.set(this.data),n.fill(0,this.data.length),this.data=n}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 J{constructor(t){this.atn=t}getDecisionLookahead(t){if(null===t)return null;const e=t.transitions.length,n=[];for(let s=0;s<e;s++){n[s]=new k;const e=new x,i=!1;this._LOOK(t.transition(s).target,null,q.EMPTY,n[s],e,new X,i,!1),(0===n[s].length||n[s].contains(J.HIT_PRED))&&(n[s]=null)}return n}LOOK(t,e,n){const s=new k,i=null!==(n=n||null)?W(t.atn,n):null;return this._LOOK(t,e,i,s,new x,new X,!0,!0),s}_LOOK(t,e,n,s,i,r,o,a){const h=new C({state:t,alt:0,context:n},null);if(!i.has(h)){if(i.add(h),t===e){if(null===n)return void s.addOne(l.EPSILON);if(n.isEmpty()&&a)return void s.addOne(l.EOF)}if(t instanceof I){if(null===n)return void s.addOne(l.EPSILON);if(n.isEmpty()&&a)return void s.addOne(l.EOF);if(n!==q.EMPTY){const l=r.get(t.ruleIndex);try{r.clear(t.ruleIndex);for(let t=0;t<n.length;t++){const l=this.atn.states[n.getReturnState(t)];this._LOOK(l,e,n.getParent(t),s,i,r,o,a)}}finally{l&&r.set(t.ruleIndex)}return}}for(let h=0;h<t.transitions.length;h++){const c=t.transitions[h];if(c.constructor===L){if(r.get(c.target.ruleIndex))continue;const t=K.create(n,c.followState.stateNumber);try{r.set(c.target.ruleIndex),this._LOOK(c.target,e,t,s,i,r,o,a)}finally{r.clear(c.target.ruleIndex)}}else if(c instanceof v)o?this._LOOK(c.target,e,n,s,i,r,o,a):s.addOne(J.HIT_PRED);else if(c.isEpsilon)this._LOOK(c.target,e,n,s,i,r,o,a);else if(c.constructor===w)s.addRange(l.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else{let t=c.label;null!==t&&(c instanceof R&&(t=t.complement(l.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),s.addSet(t))}}}}}J.HIT_PRED=l.INVALID_TYPE;class Q{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 J(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 n=this.states[t];let s=this.nextTokens(n);if(!s.contains(l.EPSILON))return s;const i=new k;for(i.addSet(s),i.removeOne(l.EPSILON);null!==e&&e.invokingState>=0&&s.contains(l.EPSILON);){const t=this.states[e.invokingState].transitions[0];s=this.nextTokens(t.followState),i.addSet(s),i.removeOne(l.EPSILON),e=e.parentCtx}return s.contains(l.EPSILON)&&i.addOne(l.EOF),i}}Q.INVALID_ALT_NUMBER=0;class Z extends N{constructor(){super(),this.stateType=N.BASIC}}class tt extends N{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class et extends tt{constructor(){return super(),this.endState=null,this}}class nt extends N{constructor(){return super(),this.stateType=N.BLOCK_END,this.startState=null,this}}class st extends N{constructor(){return super(),this.stateType=N.LOOP_END,this.loopBackState=null,this}}class it extends N{constructor(){return super(),this.stateType=N.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class rt extends tt{constructor(){return super(),this.stateType=N.TOKEN_START,this}}class ot extends tt{constructor(){return super(),this.stateType=N.PLUS_LOOP_BACK,this}}class lt extends N{constructor(){return super(),this.stateType=N.STAR_LOOP_BACK,this}}class at extends tt{constructor(){return super(),this.stateType=N.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class ht extends et{constructor(){return super(),this.stateType=N.PLUS_BLOCK_START,this.loopBackState=null,this}}class ct extends et{constructor(){return super(),this.stateType=N.STAR_BLOCK_START,this}}class ut extends et{constructor(){return super(),this.stateType=N.BLOCK_START,this}}class dt extends y{constructor(t,e){super(t),this.label_=e,this.label=this.makeLabel(),this.serializationType=y.ATOM}makeLabel(){const t=new k;return t.addOne(this.label_),t}matches(t,e,n){return this.label_===t}toString(){return this.label_}}class gt extends y{constructor(t,e,n){super(t),this.serializationType=y.RANGE,this.start=e,this.stop=n,this.label=this.makeLabel()}makeLabel(){const t=new k;return t.addRange(this.start,this.stop),t}matches(t,e,n){return t>=this.start&&t<=this.stop}toString(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}}class pt extends y{constructor(t,e,n,s){super(t),this.serializationType=y.ACTION,this.ruleIndex=e,this.actionIndex=void 0===n?-1:n,this.isCtxDependent=void 0!==s&&s,this.isEpsilon=!0}matches(t,e,n){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}}class ft extends y{constructor(t,e){super(t),this.serializationType=y.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e}matches(t,e,n){return!1}toString(){return"epsilon"}}class xt extends T{constructor(t,e,n){super(),this.ruleIndex=void 0===t?-1:t,this.predIndex=void 0===e?-1:e,this.isCtxDependent=void 0!==n&&n}evaluate(t,e){const n=this.isCtxDependent?e:null;return t.sempred(n,this.ruleIndex,this.predIndex)}updateHashCode(t){t.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}equals(t){return this===t||t instanceof xt&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}T.NONE=new xt;class Tt extends v{constructor(t,e,n,s){super(t),this.serializationType=y.PREDICATE,this.ruleIndex=e,this.predIndex=n,this.isCtxDependent=s,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new xt(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class St extends T{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)?T.NONE:null}compareTo(t){return this.precedence-t.precedence}updateHashCode(t){t.update(this.precedence)}equals(t){return this===t||t instanceof St&&this.precedence===t.precedence}toString(){return"{"+this.precedence+">=prec}?"}}T.PrecedencePredicate=St;class mt extends v{constructor(t,e){super(t),this.serializationType=y.PRECEDENCE,this.precedence=e,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new St(this.precedence)}toString(){return this.precedence+" >= _p"}}class Et{constructor(t){void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions}}Et.defaultOptions=new Et,Et.defaultOptions.readOnly=!0;class _t{constructor(t){this.actionType=t,this.isPositionDependent=!1}hashCode(){const t=new u;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.actionType)}equals(t){return this===t}}class Ct extends _t{constructor(){super(6)}execute(t){t.skip()}toString(){return"skip"}}Ct.INSTANCE=new Ct;class At extends _t{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 At&&this.channel===t.channel}toString(){return"channel("+this.channel+")"}}class kt extends _t{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 kt&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}class Nt extends _t{constructor(){super(3)}execute(t){t.more()}toString(){return"more"}}Nt.INSTANCE=new Nt;class It extends _t{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 It&&this.type===t.type}toString(){return"type("+this.type+")"}}class yt extends _t{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 yt&&this.mode===t.mode}toString(){return"pushMode("+this.mode+")"}}class Lt extends _t{constructor(){super(4)}execute(t){t.popMode()}toString(){return"popMode"}}Lt.INSTANCE=new Lt;class Ot extends _t{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 Ot&&this.mode===t.mode}toString(){return"mode("+this.mode+")"}}function Rt(t,e){const n=[];return n[t-1]=e,n.map(function(t){return e})}class wt{constructor(t){null==t&&(t=Et.defaultOptions),this.deserializationOptions=t,this.stateFactories=null,this.actionFactories=null}deserialize(t){const e=this.reset(t);this.checkVersion(e),e&&this.skipUUID();const n=this.readATN();this.readStates(n,e),this.readRules(n,e),this.readModes(n);const s=[];return this.readSets(n,s,this.readInt.bind(this)),e&&this.readSets(n,s,this.readInt32.bind(this)),this.readEdges(n,s),this.readDecisions(n),this.readLexerActions(n,e),this.markPrecedenceDecisions(n),this.verifyATN(n),this.deserializationOptions.generateRuleBypassTransitions&&1===n.grammarType&&(this.generateRuleBypassTransitions(n),this.verifyATN(n)),n}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},n=t.split("").map(e);return n[0]=t.charCodeAt(0),this.data=n,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 Q(t,e)}readStates(t,e){let n,s,i;const r=[],o=[],l=this.readInt();for(let n=0;n<l;n++){const n=this.readInt();if(n===N.INVALID_TYPE){t.addState(null);continue}let s=this.readInt();e&&65535===s&&(s=-1);const i=this.stateFactory(n,s);if(n===N.LOOP_END){const t=this.readInt();r.push([i,t])}else if(i instanceof et){const t=this.readInt();o.push([i,t])}t.addState(i)}for(n=0;n<r.length;n++)s=r[n],s[0].loopBackState=t.states[s[1]];for(n=0;n<o.length;n++)s=o[n],s[0].endState=t.states[s[1]];let a=this.readInt();for(n=0;n<a;n++)i=this.readInt(),t.states[i].nonGreedy=!0;let h=this.readInt();for(n=0;n<h;n++)i=this.readInt(),t.states[i].isPrecedenceRule=!0}readRules(t,e){let n;const s=this.readInt();for(0===t.grammarType&&(t.ruleToTokenType=Rt(s,0)),t.ruleToStartState=Rt(s,0),n=0;n<s;n++){const s=this.readInt();if(t.ruleToStartState[n]=t.states[s],0===t.grammarType){let s=this.readInt();e&&65535===s&&(s=l.EOF),t.ruleToTokenType[n]=s}}for(t.ruleToStopState=Rt(s,0),n=0;n<t.states.length;n++){const e=t.states[n];e instanceof I&&(t.ruleToStopState[e.ruleIndex]=e,t.ruleToStartState[e.ruleIndex].stopState=e)}}readModes(t){const e=this.readInt();for(let n=0;n<e;n++){let e=this.readInt();t.modeToStartState.push(t.states[e])}}readSets(t,e,n){const s=this.readInt();for(let t=0;t<s;t++){const t=new k;e.push(t);const s=this.readInt();0!==this.readInt()&&t.addOne(-1);for(let e=0;e<s;e++){const e=n(),s=n();t.addRange(e,s)}}}readEdges(t,e){let n,s,i,r,o;const l=this.readInt();for(n=0;n<l;n++){const n=this.readInt(),s=this.readInt(),i=this.readInt(),o=this.readInt(),l=this.readInt(),a=this.readInt();r=this.edgeFactory(t,i,n,s,o,l,a,e),t.states[n].addTransition(r)}for(n=0;n<t.states.length;n++)for(i=t.states[n],s=0;s<i.transitions.length;s++){const e=i.transitions[s];if(!(e instanceof L))continue;let n=-1;t.ruleToStartState[e.target.ruleIndex].isPrecedenceRule&&0===e.precedence&&(n=e.target.ruleIndex),r=new ft(e.followState,n),t.ruleToStopState[e.target.ruleIndex].addTransition(r)}for(n=0;n<t.states.length;n++){if(i=t.states[n],i instanceof et){if(null===i.endState)throw"IllegalState";if(null!==i.endState.startState)throw"IllegalState";i.endState.startState=i}if(i instanceof ot)for(s=0;s<i.transitions.length;s++)o=i.transitions[s].target,o instanceof ht&&(o.loopBackState=i);else if(i instanceof lt)for(s=0;s<i.transitions.length;s++)o=i.transitions[s].target,o instanceof at&&(o.loopBackState=i)}}readDecisions(t){const e=this.readInt();for(let n=0;n<e;n++){const e=this.readInt(),s=t.states[e];t.decisionToState.push(s),s.decision=n}}readLexerActions(t,e){if(0===t.grammarType){const n=this.readInt();t.lexerActions=Rt(n,null);for(let s=0;s<n;s++){const n=this.readInt();let i=this.readInt();e&&65535===i&&(i=-1);let r=this.readInt();e&&65535===r&&(r=-1),t.lexerActions[s]=this.lexerActionFactory(n,i,r)}}}generateRuleBypassTransitions(t){let e;const n=t.ruleToStartState.length;for(e=0;e<n;e++)t.ruleToTokenType[e]=t.maxTokenType+e+1;for(e=0;e<n;e++)this.generateRuleBypassTransition(t,e)}generateRuleBypassTransition(t,e){let n,s;const i=new ut;i.ruleIndex=e,t.addState(i);const r=new nt;r.ruleIndex=e,t.addState(r),i.endState=r,t.defineDecisionState(i),r.startState=i;let o=null,l=null;if(t.ruleToStartState[e].isPrecedenceRule){for(l=null,n=0;n<t.states.length;n++)if(s=t.states[n],this.stateIsEndStateFor(s,e)){l=s,o=s.loopBackState.transitions[0];break}if(null===o)throw"Couldn't identify final state of the precedence rule prefix section."}else l=t.ruleToStopState[e];for(n=0;n<t.states.length;n++){s=t.states[n];for(let t=0;t<s.transitions.length;t++){const e=s.transitions[t];e!==o&&e.target===l&&(e.target=r)}}const a=t.ruleToStartState[e],h=a.transitions.length;for(;h>0;)i.addTransition(a.transitions[h-1]),a.transitions=a.transitions.slice(-1);t.ruleToStartState[e].addTransition(new ft(i)),r.addTransition(new ft(l));const c=new Z;t.addState(c),c.addTransition(new dt(r,t.ruleToTokenType[e])),i.addTransition(new ft(c))}stateIsEndStateFor(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof at))return null;const n=t.transitions[t.transitions.length-1].target;return n instanceof st&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof I?t:null}markPrecedenceDecisions(t){for(let e=0;e<t.states.length;e++){const n=t.states[e];if(n instanceof at&&t.ruleToStartState[n.ruleIndex].isPrecedenceRule){const t=n.transitions[n.transitions.length-1].target;t instanceof st&&t.epsilonOnlyTransitions&&t.transitions[0].target instanceof I&&(n.isPrecedenceDecision=!0)}}}verifyATN(t){if(this.deserializationOptions.verifyATN)for(let e=0;e<t.states.length;e++){const n=t.states[e];if(null!==n)if(this.checkCondition(n.epsilonOnlyTransitions||n.transitions.length<=1),n instanceof ht)this.checkCondition(null!==n.loopBackState);else if(n instanceof at)if(this.checkCondition(null!==n.loopBackState),this.checkCondition(2===n.transitions.length),n.transitions[0].target instanceof ct)this.checkCondition(n.transitions[1].target instanceof st),this.checkCondition(!n.nonGreedy);else{if(!(n.transitions[0].target instanceof st))throw"IllegalState";this.checkCondition(n.transitions[1].target instanceof ct),this.checkCondition(n.nonGreedy)}else n instanceof lt?(this.checkCondition(1===n.transitions.length),this.checkCondition(n.transitions[0].target instanceof at)):n instanceof st?this.checkCondition(null!==n.loopBackState):n instanceof it?this.checkCondition(null!==n.stopState):n instanceof et?this.checkCondition(null!==n.endState):n instanceof nt?this.checkCondition(null!==n.startState):n instanceof tt?this.checkCondition(n.transitions.length<=1||n.decision>=0):this.checkCondition(n.transitions.length<=1||n instanceof I)}}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,n,s,i,r,o,a){const h=t.states[s];switch(e){case y.EPSILON:return new ft(h);case y.RANGE:return new gt(h,0!==o?l.EOF:i,r);case y.RULE:return new L(t.states[i],r,o,h);case y.PREDICATE:return new Tt(h,i,r,0!==o);case y.PRECEDENCE:return new mt(h,i);case y.ATOM:return new dt(h,0!==o?l.EOF:i);case y.ACTION:return new pt(h,i,r,0!==o);case y.SET:return new O(h,a[i]);case y.NOT_SET:return new R(h,a[i]);case y.WILDCARD:return new w(h);default:throw"The specified transition type: "+e+" is not valid."}}stateFactory(t,e){if(null===this.stateFactories){const t=[];t[N.INVALID_TYPE]=null,t[N.BASIC]=()=>new Z,t[N.RULE_START]=()=>new it,t[N.BLOCK_START]=()=>new ut,t[N.PLUS_BLOCK_START]=()=>new ht,t[N.STAR_BLOCK_START]=()=>new ct,t[N.TOKEN_START]=()=>new rt,t[N.RULE_STOP]=()=>new I,t[N.BLOCK_END]=()=>new nt,t[N.STAR_LOOP_BACK]=()=>new lt,t[N.STAR_LOOP_ENTRY]=()=>new at,t[N.PLUS_LOOP_BACK]=()=>new ot,t[N.LOOP_END]=()=>new st,this.stateFactories=t}if(t>this.stateFactories.length||null===this.stateFactories[t])throw"The specified state type "+t+" is not valid.";{const n=this.stateFactories[t]();if(null!==n)return n.ruleIndex=e,n}}lexerActionFactory(t,e,n){if(null===this.actionFactories){const t=[];t[0]=(t,e)=>new At(t),t[1]=(t,e)=>new kt(t,e),t[2]=(t,e)=>new Ot(t),t[3]=(t,e)=>Nt.INSTANCE,t[4]=(t,e)=>Lt.INSTANCE,t[5]=(t,e)=>new yt(t),t[6]=(t,e)=>Ct.INSTANCE,t[7]=(t,e)=>new It(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,n)}}class vt{syntaxError(t,e,n,s,i,r){}reportAmbiguity(t,e,n,s,i,r,o){}reportAttemptingFullContext(t,e,n,s,i,r){}reportContextSensitivity(t,e,n,s,i,r){}}class bt extends vt{constructor(){super()}syntaxError(t,e,n,s,i,r){console.error("line "+n+":"+s+" "+i)}}bt.INSTANCE=new bt;class Pt extends vt{constructor(t){if(super(),null===t)throw"delegates";return this.delegates=t,this}syntaxError(t,e,n,s,i,r){this.delegates.map(o=>o.syntaxError(t,e,n,s,i,r))}reportAmbiguity(t,e,n,s,i,r,o){this.delegates.map(l=>l.reportAmbiguity(t,e,n,s,i,r,o))}reportAttemptingFullContext(t,e,n,s,i,r){this.delegates.map(o=>o.reportAttemptingFullContext(t,e,n,s,i,r))}reportContextSensitivity(t,e,n,s,i,r){this.delegates.map(o=>o.reportContextSensitivity(t,e,n,s,i,r))}}class Dt{constructor(){this._listeners=[bt.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(),n=t.length>e.length?t.length:e.length;this.tokenNames=[];for(let s=0;s<n;s++)this.tokenNames[s]=t[s]||e[s]||"<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,n){t[e]=n}),e.EOF=l.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,n){t[e]=n}),this.ruleIndexMapCache[t]=e),e}getTokenType(t){const e=this.getTokenTypeMap()[t];return void 0!==e?e:l.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===l.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 Pt(this._listeners)}sempred(t,e,n){return!0}precpred(t,e){return!0}get atn(){return this._interp.atn}get state(){return this._stateNumber}set state(t){this._stateNumber=t}}Dt.tokenTypeMapCache={},Dt.ruleIndexMapCache={};class Ft extends l{constructor(t,e,n,s,i){super(),this.source=void 0!==t?t:Ft.EMPTY_SOURCE,this.type=void 0!==e?e:null,this.channel=void 0!==n?n:l.DEFAULT_CHANNEL,this.start=void 0!==s?s:-1,this.stop=void 0!==i?i:-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 Ft(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 Ft(this.source,t,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,t===l.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}}Ft.EMPTY_SOURCE=[null,null];class Mt{}class Ut extends Mt{constructor(t){super(),this.copyText=void 0!==t&&t}create(t,e,n,s,i,r,o,l){const a=new Ft(t,e,s,i,r);return a.line=o,a.column=l,null!==n?a.text=n:this.copyText&&null!==t[1]&&(a.text=t[1].getText(i,r)),a}createThin(t,e){const n=new Ft(null,t);return n.text=e,n}}Ut.DEFAULT=new Ut;class Bt extends Error{constructor(t){super(t.message),Error.captureStackTrace&&Error.captureStackTrace(this,Bt),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 Vt extends Bt{constructor(t,e,n,s){super({message:"",recognizer:t,input:e,ctx:null}),this.startIndex=n,this.deadEndConfigs=s}toString(){let t="";return this.startIndex>=0&&this.startIndex<this.input.size&&(t=this.input.getText(new A(this.startIndex,this.startIndex))),"LexerNoViableAltException"+t}}class zt extends Dt{constructor(t){super(),this._input=t,this._factory=Ut.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=l.DEFAULT_CHANNEL,this._type=l.INVALID_TYPE,this._modeStack=[],this._mode=zt.DEFAULT_MODE,this._text=null}reset(){null!==this._input&&this._input.seek(0),this._token=null,this._type=l.INVALID_TYPE,this._channel=l.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=zt.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=l.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=l.INVALID_TYPE;let n=zt.SKIP;try{n=this._interp.match(this._input,this._mode)}catch(t){if(!(t instanceof Bt))throw console.log(t.stack),t;this.notifyListeners(t),this.recover(t)}if(this._input.LA(1)===l.EOF&&(this._hitEOF=!0),this._type===l.INVALID_TYPE&&(this._type=n),this._type===zt.SKIP){e=!0;break}if(this._type!==zt.MORE)break}if(!e)return null===this._token&&this.emit(),this._token}}finally{this._input.release(t)}}skip(){this._type=zt.SKIP}more(){this._type=zt.MORE}mode(t){console.warn("Calling deprecated method in Lexer class: mode(..