@malloy-publisher/server 0.0.173 → 0.0.175

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.
@@ -1,4 +1,4 @@
1
- import{V as I0,W as Mp}from"./index-CGKwxuak.js";function qp(a,d){for(var y=0;y<d.length;y++){const m=d[y];if(typeof m!="string"&&!Array.isArray(m)){for(const h in m)if(h!=="default"&&!(h in a)){const u=Object.getOwnPropertyDescriptor(m,h);u&&Object.defineProperty(a,h,u.get?u:{enumerable:!0,get:()=>m[h]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var mo={},Cr={},Xe={},Ma;function pe(){if(Ma)return Xe;Ma=1;/*!
1
+ import{V as I0,W as Mp}from"./index-ZpoRvcIi.js";function qp(a,d){for(var y=0;y<d.length;y++){const m=d[y];if(typeof m!="string"&&!Array.isArray(m)){for(const h in m)if(h!=="default"&&!(h in a)){const u=Object.getOwnPropertyDescriptor(m,h);u&&Object.defineProperty(a,h,u.get?u:{enumerable:!0,get:()=>m[h]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var mo={},Cr={},Xe={},Ma;function pe(){if(Ma)return Xe;Ma=1;/*!
2
2
  * Copyright 2016 The ANTLR Project. All rights reserved.
3
3
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4
4
  */Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.SuppressWarnings=Xe.Override=Xe.Nullable=Xe.NotNull=void 0;function a(h,u,r){}Xe.NotNull=a;function d(h,u,r){}Xe.Nullable=d;function y(h,u,r){}Xe.Override=y;function m(h){return(u,r,o)=>{}}return Xe.SuppressWarnings=m,Xe}var Or={},Dr={},qa;function Ve(){if(qa)return Dr;qa=1;/*!
@@ -22,13 +22,7 @@ import{V as I0,W as Mp}from"./index-CGKwxuak.js";function qp(a,d){for(var y=0;y<
22
22
  */Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.RuleNode=void 0;let a=class{};return Kn.RuleNode=a,Kn}var Ha;function jp(){return Ha||(Ha=1,(function(a){/*!
23
23
  * Copyright 2016 The ANTLR Project. All rights reserved.
24
24
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
25
- */Object.defineProperty(a,"__esModule",{value:!0}),a.ParseTreeWalker=void 0;const d=Ri(),y=_r(),m=Pi();class h{walk(r,o){let t=[],i=[],e=o,s=0;for(;e;){if(e instanceof d.ErrorNode?r.visitErrorNode&&r.visitErrorNode(e):e instanceof y.TerminalNode?r.visitTerminal&&r.visitTerminal(e):this.enterRule(r,e),e.childCount>0){t.push(e),i.push(s),s=0,e=e.getChild(0);continue}do{if(e instanceof m.RuleNode&&this.exitRule(r,e),t.length===0){e=void 0,s=0;break}let l=t[t.length-1];if(s++,e=s<l.childCount?l.getChild(s):void 0,e)break;e=t.pop(),s=i.pop()}while(e)}}enterRule(r,o){let t=o.ruleContext;r.enterEveryRule&&r.enterEveryRule(t),t.enterRule(r)}exitRule(r,o){let t=o.ruleContext;t.exitRule(r),r.exitEveryRule&&r.exitEveryRule(t)}}a.ParseTreeWalker=h,(function(u){u.DEFAULT=new u})(h=a.ParseTreeWalker||(a.ParseTreeWalker={}))})(mo)),mo}var wr={},_o={},Ga;function $p(){if(Ga)return _o;Ga=1;/*!
26
- * Copyright 2016 The ANTLR Project. All rights reserved.
27
- * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
28
- */return Object.defineProperty(_o,"__esModule",{value:!0}),_o}var Ao={},Ya;function Up(){if(Ya)return Ao;Ya=1;/*!
29
- * Copyright 2016 The ANTLR Project. All rights reserved.
30
- * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
31
- */return Object.defineProperty(Ao,"__esModule",{value:!0}),Ao}var Rr={},vo={exports:{}},Eo={},So={},To={},bo,Wa;function ha(){return Wa||(Wa=1,bo=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var d={},y=Symbol("test"),m=Object(y);if(typeof y=="string"||Object.prototype.toString.call(y)!=="[object Symbol]"||Object.prototype.toString.call(m)!=="[object Symbol]")return!1;var h=42;d[y]=h;for(var u in d)return!1;if(typeof Object.keys=="function"&&Object.keys(d).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(d).length!==0)return!1;var r=Object.getOwnPropertySymbols(d);if(r.length!==1||r[0]!==y||!Object.prototype.propertyIsEnumerable.call(d,y))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(d,y);if(o.value!==h||o.enumerable!==!0)return!1}return!0}),bo}var No,Qa;function Zi(){if(Qa)return No;Qa=1;var a=ha();return No=function(){return a()&&!!Symbol.toStringTag},No}var Co,Xa;function xa(){return Xa||(Xa=1,Co=Object),Co}var Oo,Ka;function Vp(){return Ka||(Ka=1,Oo=Error),Oo}var Do,Ja;function zp(){return Ja||(Ja=1,Do=EvalError),Do}var wo,Za;function Hp(){return Za||(Za=1,wo=RangeError),wo}var Ro,eu;function Gp(){return eu||(eu=1,Ro=ReferenceError),Ro}var Po,tu;function L0(){return tu||(tu=1,Po=SyntaxError),Po}var Fo,ru;function Fi(){return ru||(ru=1,Fo=TypeError),Fo}var Io,nu;function Yp(){return nu||(nu=1,Io=URIError),Io}var Lo,iu;function Wp(){return iu||(iu=1,Lo=Math.abs),Lo}var Bo,ou;function Qp(){return ou||(ou=1,Bo=Math.floor),Bo}var ko,su;function Xp(){return su||(su=1,ko=Math.max),ko}var Mo,au;function Kp(){return au||(au=1,Mo=Math.min),Mo}var qo,uu;function Jp(){return uu||(uu=1,qo=Math.pow),qo}var jo,lu;function Zp(){return lu||(lu=1,jo=Math.round),jo}var $o,cu;function eh(){return cu||(cu=1,$o=Number.isNaN||function(d){return d!==d}),$o}var Uo,fu;function th(){if(fu)return Uo;fu=1;var a=eh();return Uo=function(y){return a(y)||y===0?y:y<0?-1:1},Uo}var Vo,pu;function rh(){return pu||(pu=1,Vo=Object.getOwnPropertyDescriptor),Vo}var zo,hu;function zn(){if(hu)return zo;hu=1;var a=rh();if(a)try{a([],"length")}catch{a=null}return zo=a,zo}var Ho,xu;function eo(){if(xu)return Ho;xu=1;var a=Object.defineProperty||!1;if(a)try{a({},"a",{value:1})}catch{a=!1}return Ho=a,Ho}var Go,du;function nh(){if(du)return Go;du=1;var a=typeof Symbol<"u"&&Symbol,d=ha();return Go=function(){return typeof a!="function"||typeof Symbol!="function"||typeof a("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:d()},Go}var Yo,mu;function B0(){return mu||(mu=1,Yo=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Yo}var Wo,yu;function k0(){if(yu)return Wo;yu=1;var a=xa();return Wo=a.getPrototypeOf||null,Wo}var Qo,gu;function ih(){if(gu)return Qo;gu=1;var a="Function.prototype.bind called on incompatible ",d=Object.prototype.toString,y=Math.max,m="[object Function]",h=function(t,i){for(var e=[],s=0;s<t.length;s+=1)e[s]=t[s];for(var l=0;l<i.length;l+=1)e[l+t.length]=i[l];return e},u=function(t,i){for(var e=[],s=i,l=0;s<t.length;s+=1,l+=1)e[l]=t[s];return e},r=function(o,t){for(var i="",e=0;e<o.length;e+=1)i+=o[e],e+1<o.length&&(i+=t);return i};return Qo=function(t){var i=this;if(typeof i!="function"||d.apply(i)!==m)throw new TypeError(a+i);for(var e=u(arguments,1),s,l=function(){if(this instanceof s){var g=i.apply(this,h(e,arguments));return Object(g)===g?g:this}return i.apply(t,h(e,arguments))},c=y(0,i.length-e.length),p=[],v=0;v<c;v++)p[v]="$"+v;if(s=Function("binder","return function ("+r(p,",")+"){ return binder.apply(this,arguments); }")(l),i.prototype){var x=function(){};x.prototype=i.prototype,s.prototype=new x,x.prototype=null}return s},Qo}var Xo,_u;function Ii(){if(_u)return Xo;_u=1;var a=ih();return Xo=Function.prototype.bind||a,Xo}var Ko,Au;function da(){return Au||(Au=1,Ko=Function.prototype.call),Ko}var Jo,vu;function ma(){return vu||(vu=1,Jo=Function.prototype.apply),Jo}var Zo,Eu;function oh(){return Eu||(Eu=1,Zo=typeof Reflect<"u"&&Reflect&&Reflect.apply),Zo}var es,Su;function M0(){if(Su)return es;Su=1;var a=Ii(),d=ma(),y=da(),m=oh();return es=m||a.call(y,d),es}var ts,Tu;function ya(){if(Tu)return ts;Tu=1;var a=Ii(),d=Fi(),y=da(),m=M0();return ts=function(u){if(u.length<1||typeof u[0]!="function")throw new d("a function is required");return m(a,y,u)},ts}var rs,bu;function sh(){if(bu)return rs;bu=1;var a=ya(),d=zn(),y;try{y=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var m=!!y&&d&&d(Object.prototype,"__proto__"),h=Object,u=h.getPrototypeOf;return rs=m&&typeof m.get=="function"?a([m.get]):typeof u=="function"?function(o){return u(o==null?o:h(o))}:!1,rs}var ns,Nu;function ga(){if(Nu)return ns;Nu=1;var a=B0(),d=k0(),y=sh();return ns=a?function(h){return a(h)}:d?function(h){if(!h||typeof h!="object"&&typeof h!="function")throw new TypeError("getProto: not an object");return d(h)}:y?function(h){return y(h)}:null,ns}var is,Cu;function q0(){if(Cu)return is;Cu=1;var a=Function.prototype.call,d=Object.prototype.hasOwnProperty,y=Ii();return is=y.call(a,d),is}var os,Ou;function _a(){if(Ou)return os;Ou=1;var a,d=xa(),y=Vp(),m=zp(),h=Hp(),u=Gp(),r=L0(),o=Fi(),t=Yp(),i=Wp(),e=Qp(),s=Xp(),l=Kp(),c=Jp(),p=Zp(),v=th(),x=Function,g=function(R){try{return x('"use strict"; return ('+R+").constructor;")()}catch{}},_=zn(),A=eo(),E=function(){throw new o},N=_?(function(){try{return arguments.callee,E}catch{try{return _(arguments,"callee").get}catch{return E}}})():E,b=nh()(),w=ga(),P=k0(),j=B0(),W=ma(),L=da(),$={},Q=typeof Uint8Array>"u"||!w?a:w(Uint8Array),ee={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":b&&w?w([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":$,"%AsyncGenerator%":$,"%AsyncGeneratorFunction%":$,"%AsyncIteratorPrototype%":$,"%Atomics%":typeof Atomics>"u"?a:Atomics,"%BigInt%":typeof BigInt>"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":y,"%eval%":eval,"%EvalError%":m,"%Float16Array%":typeof Float16Array>"u"?a:Float16Array,"%Float32Array%":typeof Float32Array>"u"?a:Float32Array,"%Float64Array%":typeof Float64Array>"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?a:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":$,"%Int8Array%":typeof Int8Array>"u"?a:Int8Array,"%Int16Array%":typeof Int16Array>"u"?a:Int16Array,"%Int32Array%":typeof Int32Array>"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":b&&w?w(w([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map>"u"?a:Map,"%MapIteratorPrototype%":typeof Map>"u"||!b||!w?a:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":d,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?a:Promise,"%Proxy%":typeof Proxy>"u"?a:Proxy,"%RangeError%":h,"%ReferenceError%":u,"%Reflect%":typeof Reflect>"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?a:Set,"%SetIteratorPrototype%":typeof Set>"u"||!b||!w?a:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":b&&w?w(""[Symbol.iterator]()):a,"%Symbol%":b?Symbol:a,"%SyntaxError%":r,"%ThrowTypeError%":N,"%TypedArray%":Q,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?a:Uint32Array,"%URIError%":t,"%WeakMap%":typeof WeakMap>"u"?a:WeakMap,"%WeakRef%":typeof WeakRef>"u"?a:WeakRef,"%WeakSet%":typeof WeakSet>"u"?a:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":W,"%Object.defineProperty%":A,"%Object.getPrototypeOf%":P,"%Math.abs%":i,"%Math.floor%":e,"%Math.max%":s,"%Math.min%":l,"%Math.pow%":c,"%Math.round%":p,"%Math.sign%":v,"%Reflect.getPrototypeOf%":j};if(w)try{null.error}catch(R){var I=w(w(R));ee["%Error.prototype%"]=I}var X=function R(q){var H;if(q==="%AsyncFunction%")H=g("async function () {}");else if(q==="%GeneratorFunction%")H=g("function* () {}");else if(q==="%AsyncGeneratorFunction%")H=g("async function* () {}");else if(q==="%AsyncGenerator%"){var J=R("%AsyncGeneratorFunction%");J&&(H=J.prototype)}else if(q==="%AsyncIteratorPrototype%"){var M=R("%AsyncGenerator%");M&&w&&(H=w(M.prototype))}return ee[q]=H,H},ie={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ce=Ii(),oe=q0(),te=ce.call(L,Array.prototype.concat),B=ce.call(W,Array.prototype.splice),G=ce.call(L,String.prototype.replace),O=ce.call(L,String.prototype.slice),C=ce.call(L,RegExp.prototype.exec),D=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,k=function(q){var H=O(q,0,1),J=O(q,-1);if(H==="%"&&J!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(J==="%"&&H!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var M=[];return G(q,D,function(V,Z,se,fe){M[M.length]=se?G(fe,F,"$1"):Z||V}),M},T=function(q,H){var J=q,M;if(oe(ie,J)&&(M=ie[J],J="%"+M[0]+"%"),oe(ee,J)){var V=ee[J];if(V===$&&(V=X(J)),typeof V>"u"&&!H)throw new o("intrinsic "+q+" exists, but is not available. Please file an issue!");return{alias:M,name:J,value:V}}throw new r("intrinsic "+q+" does not exist!")};return os=function(q,H){if(typeof q!="string"||q.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof H!="boolean")throw new o('"allowMissing" argument must be a boolean');if(C(/^%?[^%]*%?$/,q)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var J=k(q),M=J.length>0?J[0]:"",V=T("%"+M+"%",H),Z=V.name,se=V.value,fe=!1,he=V.alias;he&&(M=he[0],B(J,te([0,1],he)));for(var K=1,ae=!0;K<J.length;K+=1){var de=J[K],Ce=O(de,0,1),Re=O(de,-1);if((Ce==='"'||Ce==="'"||Ce==="`"||Re==='"'||Re==="'"||Re==="`")&&Ce!==Re)throw new r("property names with quotes must have matching quotes");if((de==="constructor"||!ae)&&(fe=!0),M+="."+de,Z="%"+M+"%",oe(ee,Z))se=ee[Z];else if(se!=null){if(!(de in se)){if(!H)throw new o("base intrinsic for "+q+" exists, but the property is not available.");return}if(_&&K+1>=J.length){var Y=_(se,de);ae=!!Y,ae&&"get"in Y&&!("originalValue"in Y.get)?se=Y.get:se=se[de]}else ae=oe(se,de),se=se[de];ae&&!fe&&(ee[Z]=se)}}return se},os}var ss,Du;function Hn(){if(Du)return ss;Du=1;var a=_a(),d=ya(),y=d([a("%String.prototype.indexOf%")]);return ss=function(h,u){var r=a(h,!!u);return typeof r=="function"&&y(h,".prototype.")>-1?d([r]):r},ss}var as,wu;function ah(){if(wu)return as;wu=1;var a=Zi()(),d=Hn(),y=d("Object.prototype.toString"),m=function(o){return a&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:y(o)==="[object Arguments]"},h=function(o){return m(o)?!0:o!==null&&typeof o=="object"&&"length"in o&&typeof o.length=="number"&&o.length>=0&&y(o)!=="[object Array]"&&"callee"in o&&y(o.callee)==="[object Function]"},u=(function(){return m(arguments)})();return m.isLegacyArguments=h,as=u?m:h,as}var us,Ru;function uh(){if(Ru)return us;Ru=1;var a=Hn(),d=Zi()(),y=q0(),m=zn(),h;if(d){var u=a("RegExp.prototype.exec"),r={},o=function(){throw r},t={toString:o,valueOf:o};typeof Symbol.toPrimitive=="symbol"&&(t[Symbol.toPrimitive]=o),h=function(l){if(!l||typeof l!="object")return!1;var c=m(l,"lastIndex"),p=c&&y(c,"value");if(!p)return!1;try{u(l,t)}catch(v){return v===r}}}else{var i=a("Object.prototype.toString"),e="[object RegExp]";h=function(l){return!l||typeof l!="object"&&typeof l!="function"?!1:i(l)===e}}return us=h,us}var ls,Pu;function lh(){if(Pu)return ls;Pu=1;var a=Hn(),d=uh(),y=a("RegExp.prototype.exec"),m=Fi();return ls=function(u){if(!d(u))throw new m("`regex` must be a RegExp");return function(o){return y(u,o)!==null}},ls}var cs,Fu;function ch(){if(Fu)return cs;Fu=1;var a=Hn(),d=lh(),y=d(/^\s*(?:function)?\*/),m=Zi()(),h=ga(),u=a("Object.prototype.toString"),r=a("Function.prototype.toString"),o=function(){if(!m)return!1;try{return Function("return function*() {}")()}catch{}},t;return cs=function(e){if(typeof e!="function")return!1;if(y(r(e)))return!0;if(!m){var s=u(e);return s==="[object GeneratorFunction]"}if(!h)return!1;if(typeof t>"u"){var l=o();t=l?h(l):!1}return h(e)===t},cs}var fs,Iu;function fh(){if(Iu)return fs;Iu=1;var a=Function.prototype.toString,d=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,y,m;if(typeof d=="function"&&typeof Object.defineProperty=="function")try{y=Object.defineProperty({},"length",{get:function(){throw m}}),m={},d(function(){throw 42},null,y)}catch(_){_!==m&&(d=null)}else d=null;var h=/^\s*class\b/,u=function(A){try{var E=a.call(A);return h.test(E)}catch{return!1}},r=function(A){try{return u(A)?!1:(a.call(A),!0)}catch{return!1}},o=Object.prototype.toString,t="[object Object]",i="[object Function]",e="[object GeneratorFunction]",s="[object HTMLAllCollection]",l="[object HTML document.all class]",c="[object HTMLCollection]",p=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),x=function(){return!1};if(typeof document=="object"){var g=document.all;o.call(g)===o.call(document.all)&&(x=function(A){if((v||!A)&&(typeof A>"u"||typeof A=="object"))try{var E=o.call(A);return(E===s||E===l||E===c||E===t)&&A("")==null}catch{}return!1})}return fs=d?function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;try{d(A,null,y)}catch(E){if(E!==m)return!1}return!u(A)&&r(A)}:function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(p)return r(A);if(u(A))return!1;var E=o.call(A);return E!==i&&E!==e&&!/^\[object HTML/.test(E)?!1:r(A)},fs}var ps,Lu;function ph(){if(Lu)return ps;Lu=1;var a=fh(),d=Object.prototype.toString,y=Object.prototype.hasOwnProperty,m=function(t,i,e){for(var s=0,l=t.length;s<l;s++)y.call(t,s)&&(e==null?i(t[s],s,t):i.call(e,t[s],s,t))},h=function(t,i,e){for(var s=0,l=t.length;s<l;s++)e==null?i(t.charAt(s),s,t):i.call(e,t.charAt(s),s,t)},u=function(t,i,e){for(var s in t)y.call(t,s)&&(e==null?i(t[s],s,t):i.call(e,t[s],s,t))};function r(o){return d.call(o)==="[object Array]"}return ps=function(t,i,e){if(!a(i))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=e),r(t)?m(t,i,s):typeof t=="string"?h(t,i,s):u(t,i,s)},ps}var hs,Bu;function hh(){return Bu||(Bu=1,hs=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),hs}var xs,ku;function xh(){if(ku)return xs;ku=1;var a=hh(),d=typeof globalThis>"u"?I0:globalThis;return xs=function(){for(var m=[],h=0;h<a.length;h++)typeof d[a[h]]=="function"&&(m[m.length]=a[h]);return m},xs}var ds={exports:{}},ms,Mu;function j0(){if(Mu)return ms;Mu=1;var a=eo(),d=L0(),y=Fi(),m=zn();return ms=function(u,r,o){if(!u||typeof u!="object"&&typeof u!="function")throw new y("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new y("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new y("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new y("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new y("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new y("`loose`, if provided, must be a boolean");var t=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,e=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!m&&m(u,r);if(a)a(u,r,{configurable:e===null&&l?l.configurable:!e,enumerable:t===null&&l?l.enumerable:!t,value:o,writable:i===null&&l?l.writable:!i});else if(s||!t&&!i&&!e)u[r]=o;else throw new d("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ms}var ys,qu;function $0(){if(qu)return ys;qu=1;var a=eo(),d=function(){return!!a};return d.hasArrayLengthDefineBug=function(){if(!a)return null;try{return a([],"length",{value:1}).length!==1}catch{return!0}},ys=d,ys}var gs,ju;function dh(){if(ju)return gs;ju=1;var a=_a(),d=j0(),y=$0()(),m=zn(),h=Fi(),u=a("%Math.floor%");return gs=function(o,t){if(typeof o!="function")throw new h("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||u(t)!==t)throw new h("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],e=!0,s=!0;if("length"in o&&m){var l=m(o,"length");l&&!l.configurable&&(e=!1),l&&!l.writable&&(s=!1)}return(e||s||!i)&&(y?d(o,"length",t,!0,!0):d(o,"length",t)),o},gs}var _s,$u;function mh(){if($u)return _s;$u=1;var a=Ii(),d=ma(),y=M0();return _s=function(){return y(a,d,arguments)},_s}var Uu;function to(){return Uu||(Uu=1,(function(a){var d=dh(),y=eo(),m=ya(),h=mh();a.exports=function(r){var o=m(arguments),t=r.length-(arguments.length-1);return d(o,1+(t>0?t:0),!0)},y?y(a.exports,"apply",{value:h}):a.exports.apply=h})(ds)),ds.exports}var As,Vu;function U0(){if(Vu)return As;Vu=1;var a=ph(),d=xh(),y=to(),m=Hn(),h=zn(),u=ga(),r=m("Object.prototype.toString"),o=Zi()(),t=typeof globalThis>"u"?I0:globalThis,i=d(),e=m("String.prototype.slice"),s=m("Array.prototype.indexOf",!0)||function(x,g){for(var _=0;_<x.length;_+=1)if(x[_]===g)return _;return-1},l={__proto__:null};o&&h&&u?a(i,function(v){var x=new t[v];if(Symbol.toStringTag in x&&u){var g=u(x),_=h(g,Symbol.toStringTag);if(!_&&g){var A=u(g);_=h(A,Symbol.toStringTag)}l["$"+v]=y(_.get)}}):a(i,function(v){var x=new t[v],g=x.slice||x.set;g&&(l["$"+v]=y(g))});var c=function(x){var g=!1;return a(l,function(_,A){if(!g)try{"$"+_(x)===A&&(g=e(A,1))}catch{}}),g},p=function(x){var g=!1;return a(l,function(_,A){if(!g)try{_(x),g=e(A,1)}catch{}}),g};return As=function(x){if(!x||typeof x!="object")return!1;if(!o){var g=e(r(x),8,-1);return s(i,g)>-1?g:g!=="Object"?!1:p(x)}return h?c(x):null},As}var vs,zu;function yh(){if(zu)return vs;zu=1;var a=U0();return vs=function(y){return!!a(y)},vs}var Hu;function gh(){return Hu||(Hu=1,(function(a){var d=ah(),y=ch(),m=U0(),h=yh();function u(K){return K.call.bind(K)}var r=typeof BigInt<"u",o=typeof Symbol<"u",t=u(Object.prototype.toString),i=u(Number.prototype.valueOf),e=u(String.prototype.valueOf),s=u(Boolean.prototype.valueOf);if(r)var l=u(BigInt.prototype.valueOf);if(o)var c=u(Symbol.prototype.valueOf);function p(K,ae){if(typeof K!="object")return!1;try{return ae(K),!0}catch{return!1}}a.isArgumentsObject=d,a.isGeneratorFunction=y,a.isTypedArray=h;function v(K){return typeof Promise<"u"&&K instanceof Promise||K!==null&&typeof K=="object"&&typeof K.then=="function"&&typeof K.catch=="function"}a.isPromise=v;function x(K){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(K):h(K)||O(K)}a.isArrayBufferView=x;function g(K){return m(K)==="Uint8Array"}a.isUint8Array=g;function _(K){return m(K)==="Uint8ClampedArray"}a.isUint8ClampedArray=_;function A(K){return m(K)==="Uint16Array"}a.isUint16Array=A;function E(K){return m(K)==="Uint32Array"}a.isUint32Array=E;function N(K){return m(K)==="Int8Array"}a.isInt8Array=N;function b(K){return m(K)==="Int16Array"}a.isInt16Array=b;function w(K){return m(K)==="Int32Array"}a.isInt32Array=w;function P(K){return m(K)==="Float32Array"}a.isFloat32Array=P;function j(K){return m(K)==="Float64Array"}a.isFloat64Array=j;function W(K){return m(K)==="BigInt64Array"}a.isBigInt64Array=W;function L(K){return m(K)==="BigUint64Array"}a.isBigUint64Array=L;function $(K){return t(K)==="[object Map]"}$.working=typeof Map<"u"&&$(new Map);function Q(K){return typeof Map>"u"?!1:$.working?$(K):K instanceof Map}a.isMap=Q;function ee(K){return t(K)==="[object Set]"}ee.working=typeof Set<"u"&&ee(new Set);function I(K){return typeof Set>"u"?!1:ee.working?ee(K):K instanceof Set}a.isSet=I;function X(K){return t(K)==="[object WeakMap]"}X.working=typeof WeakMap<"u"&&X(new WeakMap);function ie(K){return typeof WeakMap>"u"?!1:X.working?X(K):K instanceof WeakMap}a.isWeakMap=ie;function ce(K){return t(K)==="[object WeakSet]"}ce.working=typeof WeakSet<"u"&&ce(new WeakSet);function oe(K){return ce(K)}a.isWeakSet=oe;function te(K){return t(K)==="[object ArrayBuffer]"}te.working=typeof ArrayBuffer<"u"&&te(new ArrayBuffer);function B(K){return typeof ArrayBuffer>"u"?!1:te.working?te(K):K instanceof ArrayBuffer}a.isArrayBuffer=B;function G(K){return t(K)==="[object DataView]"}G.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&G(new DataView(new ArrayBuffer(1),0,1));function O(K){return typeof DataView>"u"?!1:G.working?G(K):K instanceof DataView}a.isDataView=O;var C=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function D(K){return t(K)==="[object SharedArrayBuffer]"}function F(K){return typeof C>"u"?!1:(typeof D.working>"u"&&(D.working=D(new C)),D.working?D(K):K instanceof C)}a.isSharedArrayBuffer=F;function k(K){return t(K)==="[object AsyncFunction]"}a.isAsyncFunction=k;function T(K){return t(K)==="[object Map Iterator]"}a.isMapIterator=T;function R(K){return t(K)==="[object Set Iterator]"}a.isSetIterator=R;function q(K){return t(K)==="[object Generator]"}a.isGeneratorObject=q;function H(K){return t(K)==="[object WebAssembly.Module]"}a.isWebAssemblyCompiledModule=H;function J(K){return p(K,i)}a.isNumberObject=J;function M(K){return p(K,e)}a.isStringObject=M;function V(K){return p(K,s)}a.isBooleanObject=V;function Z(K){return r&&p(K,l)}a.isBigIntObject=Z;function se(K){return o&&p(K,c)}a.isSymbolObject=se;function fe(K){return J(K)||M(K)||V(K)||Z(K)||se(K)}a.isBoxedPrimitive=fe;function he(K){return typeof Uint8Array<"u"&&(B(K)||F(K))}a.isAnyArrayBuffer=he,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(K){Object.defineProperty(a,K,{enumerable:!1,value:function(){throw new Error(K+" is not supported in userland")}})})})(To)),To}var Es,Gu;function _h(){return Gu||(Gu=1,Es=function(d){return d&&typeof d=="object"&&typeof d.copy=="function"&&typeof d.fill=="function"&&typeof d.readUInt8=="function"}),Es}var Ui={exports:{}},Yu;function Ah(){return Yu||(Yu=1,typeof Object.create=="function"?Ui.exports=function(d,y){y&&(d.super_=y,d.prototype=Object.create(y.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}))}:Ui.exports=function(d,y){if(y){d.super_=y;var m=function(){};m.prototype=y.prototype,d.prototype=new m,d.prototype.constructor=d}}),Ui.exports}var Wu;function Vn(){return Wu||(Wu=1,(function(a){var d=Object.getOwnPropertyDescriptors||function(G){for(var O=Object.keys(G),C={},D=0;D<O.length;D++)C[O[D]]=Object.getOwnPropertyDescriptor(G,O[D]);return C},y=/%[sdj%]/g;a.format=function(B){if(!E(B)){for(var G=[],O=0;O<arguments.length;O++)G.push(u(arguments[O]));return G.join(" ")}for(var O=1,C=arguments,D=C.length,F=String(B).replace(y,function(T){if(T==="%%")return"%";if(O>=D)return T;switch(T){case"%s":return String(C[O++]);case"%d":return Number(C[O++]);case"%j":try{return JSON.stringify(C[O++])}catch{return"[Circular]"}default:return T}}),k=C[O];O<D;k=C[++O])g(k)||!P(k)?F+=" "+k:F+=" "+u(k);return F},a.deprecate=function(B,G){if(typeof process<"u"&&process.noDeprecation===!0)return B;if(typeof process>"u")return function(){return a.deprecate(B,G).apply(this,arguments)};var O=!1;function C(){if(!O){if(process.throwDeprecation)throw new Error(G);process.traceDeprecation?console.trace(G):console.error(G),O=!0}return B.apply(this,arguments)}return C};var m={},h=/^$/;a.debuglog=function(B){if(B=B.toUpperCase(),!m[B])if(h.test(B)){var G=process.pid;m[B]=function(){var O=a.format.apply(a,arguments);console.error("%s %d: %s",B,G,O)}}else m[B]=function(){};return m[B]};function u(B,G){var O={seen:[],stylize:o};return arguments.length>=3&&(O.depth=arguments[2]),arguments.length>=4&&(O.colors=arguments[3]),x(G)?O.showHidden=G:G&&a._extend(O,G),b(O.showHidden)&&(O.showHidden=!1),b(O.depth)&&(O.depth=2),b(O.colors)&&(O.colors=!1),b(O.customInspect)&&(O.customInspect=!0),O.colors&&(O.stylize=r),i(O,B,O.depth)}a.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(B,G){var O=u.styles[G];return O?"\x1B["+u.colors[O][0]+"m"+B+"\x1B["+u.colors[O][1]+"m":B}function o(B,G){return B}function t(B){var G={};return B.forEach(function(O,C){G[O]=!0}),G}function i(B,G,O){if(B.customInspect&&G&&L(G.inspect)&&G.inspect!==a.inspect&&!(G.constructor&&G.constructor.prototype===G)){var C=G.inspect(O,B);return E(C)||(C=i(B,C,O)),C}var D=e(B,G);if(D)return D;var F=Object.keys(G),k=t(F);if(B.showHidden&&(F=Object.getOwnPropertyNames(G)),W(G)&&(F.indexOf("message")>=0||F.indexOf("description")>=0))return s(G);if(F.length===0){if(L(G)){var T=G.name?": "+G.name:"";return B.stylize("[Function"+T+"]","special")}if(w(G))return B.stylize(RegExp.prototype.toString.call(G),"regexp");if(j(G))return B.stylize(Date.prototype.toString.call(G),"date");if(W(G))return s(G)}var R="",q=!1,H=["{","}"];if(v(G)&&(q=!0,H=["[","]"]),L(G)){var J=G.name?": "+G.name:"";R=" [Function"+J+"]"}if(w(G)&&(R=" "+RegExp.prototype.toString.call(G)),j(G)&&(R=" "+Date.prototype.toUTCString.call(G)),W(G)&&(R=" "+s(G)),F.length===0&&(!q||G.length==0))return H[0]+R+H[1];if(O<0)return w(G)?B.stylize(RegExp.prototype.toString.call(G),"regexp"):B.stylize("[Object]","special");B.seen.push(G);var M;return q?M=l(B,G,O,k,F):M=F.map(function(V){return c(B,G,O,k,V,q)}),B.seen.pop(),p(M,R,H)}function e(B,G){if(b(G))return B.stylize("undefined","undefined");if(E(G)){var O="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(O,"string")}if(A(G))return B.stylize(""+G,"number");if(x(G))return B.stylize(""+G,"boolean");if(g(G))return B.stylize("null","null")}function s(B){return"["+Error.prototype.toString.call(B)+"]"}function l(B,G,O,C,D){for(var F=[],k=0,T=G.length;k<T;++k)ie(G,String(k))?F.push(c(B,G,O,C,String(k),!0)):F.push("");return D.forEach(function(R){R.match(/^\d+$/)||F.push(c(B,G,O,C,R,!0))}),F}function c(B,G,O,C,D,F){var k,T,R;if(R=Object.getOwnPropertyDescriptor(G,D)||{value:G[D]},R.get?R.set?T=B.stylize("[Getter/Setter]","special"):T=B.stylize("[Getter]","special"):R.set&&(T=B.stylize("[Setter]","special")),ie(C,D)||(k="["+D+"]"),T||(B.seen.indexOf(R.value)<0?(g(O)?T=i(B,R.value,null):T=i(B,R.value,O-1),T.indexOf(`
25
+ */Object.defineProperty(a,"__esModule",{value:!0}),a.ParseTreeWalker=void 0;const d=Ri(),y=_r(),m=Pi();class h{walk(r,o){let t=[],i=[],e=o,s=0;for(;e;){if(e instanceof d.ErrorNode?r.visitErrorNode&&r.visitErrorNode(e):e instanceof y.TerminalNode?r.visitTerminal&&r.visitTerminal(e):this.enterRule(r,e),e.childCount>0){t.push(e),i.push(s),s=0,e=e.getChild(0);continue}do{if(e instanceof m.RuleNode&&this.exitRule(r,e),t.length===0){e=void 0,s=0;break}let l=t[t.length-1];if(s++,e=s<l.childCount?l.getChild(s):void 0,e)break;e=t.pop(),s=i.pop()}while(e)}}enterRule(r,o){let t=o.ruleContext;r.enterEveryRule&&r.enterEveryRule(t),t.enterRule(r)}exitRule(r,o){let t=o.ruleContext;t.exitRule(r),r.exitEveryRule&&r.exitEveryRule(t)}}a.ParseTreeWalker=h,(function(u){u.DEFAULT=new u})(h=a.ParseTreeWalker||(a.ParseTreeWalker={}))})(mo)),mo}var wr={},Jn={},ct={},_o={exports:{}},Ao={},vo={},Eo={},So,Ga;function ha(){return Ga||(Ga=1,So=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var d={},y=Symbol("test"),m=Object(y);if(typeof y=="string"||Object.prototype.toString.call(y)!=="[object Symbol]"||Object.prototype.toString.call(m)!=="[object Symbol]")return!1;var h=42;d[y]=h;for(var u in d)return!1;if(typeof Object.keys=="function"&&Object.keys(d).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(d).length!==0)return!1;var r=Object.getOwnPropertySymbols(d);if(r.length!==1||r[0]!==y||!Object.prototype.propertyIsEnumerable.call(d,y))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(d,y);if(o.value!==h||o.enumerable!==!0)return!1}return!0}),So}var To,Ya;function Zi(){if(Ya)return To;Ya=1;var a=ha();return To=function(){return a()&&!!Symbol.toStringTag},To}var bo,Wa;function xa(){return Wa||(Wa=1,bo=Object),bo}var No,Qa;function $p(){return Qa||(Qa=1,No=Error),No}var Co,Xa;function Up(){return Xa||(Xa=1,Co=EvalError),Co}var Oo,Ka;function Vp(){return Ka||(Ka=1,Oo=RangeError),Oo}var Do,Ja;function zp(){return Ja||(Ja=1,Do=ReferenceError),Do}var wo,Za;function L0(){return Za||(Za=1,wo=SyntaxError),wo}var Ro,eu;function Fi(){return eu||(eu=1,Ro=TypeError),Ro}var Po,tu;function Hp(){return tu||(tu=1,Po=URIError),Po}var Fo,ru;function Gp(){return ru||(ru=1,Fo=Math.abs),Fo}var Io,nu;function Yp(){return nu||(nu=1,Io=Math.floor),Io}var Lo,iu;function Wp(){return iu||(iu=1,Lo=Math.max),Lo}var Bo,ou;function Qp(){return ou||(ou=1,Bo=Math.min),Bo}var ko,su;function Xp(){return su||(su=1,ko=Math.pow),ko}var Mo,au;function Kp(){return au||(au=1,Mo=Math.round),Mo}var qo,uu;function Jp(){return uu||(uu=1,qo=Number.isNaN||function(d){return d!==d}),qo}var jo,lu;function Zp(){if(lu)return jo;lu=1;var a=Jp();return jo=function(y){return a(y)||y===0?y:y<0?-1:1},jo}var $o,cu;function eh(){return cu||(cu=1,$o=Object.getOwnPropertyDescriptor),$o}var Uo,fu;function zn(){if(fu)return Uo;fu=1;var a=eh();if(a)try{a([],"length")}catch{a=null}return Uo=a,Uo}var Vo,pu;function eo(){if(pu)return Vo;pu=1;var a=Object.defineProperty||!1;if(a)try{a({},"a",{value:1})}catch{a=!1}return Vo=a,Vo}var zo,hu;function th(){if(hu)return zo;hu=1;var a=typeof Symbol<"u"&&Symbol,d=ha();return zo=function(){return typeof a!="function"||typeof Symbol!="function"||typeof a("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:d()},zo}var Ho,xu;function B0(){return xu||(xu=1,Ho=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ho}var Go,du;function k0(){if(du)return Go;du=1;var a=xa();return Go=a.getPrototypeOf||null,Go}var Yo,mu;function rh(){if(mu)return Yo;mu=1;var a="Function.prototype.bind called on incompatible ",d=Object.prototype.toString,y=Math.max,m="[object Function]",h=function(t,i){for(var e=[],s=0;s<t.length;s+=1)e[s]=t[s];for(var l=0;l<i.length;l+=1)e[l+t.length]=i[l];return e},u=function(t,i){for(var e=[],s=i,l=0;s<t.length;s+=1,l+=1)e[l]=t[s];return e},r=function(o,t){for(var i="",e=0;e<o.length;e+=1)i+=o[e],e+1<o.length&&(i+=t);return i};return Yo=function(t){var i=this;if(typeof i!="function"||d.apply(i)!==m)throw new TypeError(a+i);for(var e=u(arguments,1),s,l=function(){if(this instanceof s){var g=i.apply(this,h(e,arguments));return Object(g)===g?g:this}return i.apply(t,h(e,arguments))},c=y(0,i.length-e.length),p=[],v=0;v<c;v++)p[v]="$"+v;if(s=Function("binder","return function ("+r(p,",")+"){ return binder.apply(this,arguments); }")(l),i.prototype){var x=function(){};x.prototype=i.prototype,s.prototype=new x,x.prototype=null}return s},Yo}var Wo,yu;function Ii(){if(yu)return Wo;yu=1;var a=rh();return Wo=Function.prototype.bind||a,Wo}var Qo,gu;function da(){return gu||(gu=1,Qo=Function.prototype.call),Qo}var Xo,_u;function ma(){return _u||(_u=1,Xo=Function.prototype.apply),Xo}var Ko,Au;function nh(){return Au||(Au=1,Ko=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ko}var Jo,vu;function M0(){if(vu)return Jo;vu=1;var a=Ii(),d=ma(),y=da(),m=nh();return Jo=m||a.call(y,d),Jo}var Zo,Eu;function ya(){if(Eu)return Zo;Eu=1;var a=Ii(),d=Fi(),y=da(),m=M0();return Zo=function(u){if(u.length<1||typeof u[0]!="function")throw new d("a function is required");return m(a,y,u)},Zo}var es,Su;function ih(){if(Su)return es;Su=1;var a=ya(),d=zn(),y;try{y=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var m=!!y&&d&&d(Object.prototype,"__proto__"),h=Object,u=h.getPrototypeOf;return es=m&&typeof m.get=="function"?a([m.get]):typeof u=="function"?function(o){return u(o==null?o:h(o))}:!1,es}var ts,Tu;function ga(){if(Tu)return ts;Tu=1;var a=B0(),d=k0(),y=ih();return ts=a?function(h){return a(h)}:d?function(h){if(!h||typeof h!="object"&&typeof h!="function")throw new TypeError("getProto: not an object");return d(h)}:y?function(h){return y(h)}:null,ts}var rs,bu;function q0(){if(bu)return rs;bu=1;var a=Function.prototype.call,d=Object.prototype.hasOwnProperty,y=Ii();return rs=y.call(a,d),rs}var ns,Nu;function _a(){if(Nu)return ns;Nu=1;var a,d=xa(),y=$p(),m=Up(),h=Vp(),u=zp(),r=L0(),o=Fi(),t=Hp(),i=Gp(),e=Yp(),s=Wp(),l=Qp(),c=Xp(),p=Kp(),v=Zp(),x=Function,g=function(R){try{return x('"use strict"; return ('+R+").constructor;")()}catch{}},_=zn(),A=eo(),E=function(){throw new o},N=_?(function(){try{return arguments.callee,E}catch{try{return _(arguments,"callee").get}catch{return E}}})():E,b=th()(),w=ga(),P=k0(),j=B0(),W=ma(),L=da(),$={},Q=typeof Uint8Array>"u"||!w?a:w(Uint8Array),ee={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":b&&w?w([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":$,"%AsyncGenerator%":$,"%AsyncGeneratorFunction%":$,"%AsyncIteratorPrototype%":$,"%Atomics%":typeof Atomics>"u"?a:Atomics,"%BigInt%":typeof BigInt>"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":y,"%eval%":eval,"%EvalError%":m,"%Float16Array%":typeof Float16Array>"u"?a:Float16Array,"%Float32Array%":typeof Float32Array>"u"?a:Float32Array,"%Float64Array%":typeof Float64Array>"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?a:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":$,"%Int8Array%":typeof Int8Array>"u"?a:Int8Array,"%Int16Array%":typeof Int16Array>"u"?a:Int16Array,"%Int32Array%":typeof Int32Array>"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":b&&w?w(w([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map>"u"?a:Map,"%MapIteratorPrototype%":typeof Map>"u"||!b||!w?a:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":d,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?a:Promise,"%Proxy%":typeof Proxy>"u"?a:Proxy,"%RangeError%":h,"%ReferenceError%":u,"%Reflect%":typeof Reflect>"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?a:Set,"%SetIteratorPrototype%":typeof Set>"u"||!b||!w?a:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":b&&w?w(""[Symbol.iterator]()):a,"%Symbol%":b?Symbol:a,"%SyntaxError%":r,"%ThrowTypeError%":N,"%TypedArray%":Q,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?a:Uint32Array,"%URIError%":t,"%WeakMap%":typeof WeakMap>"u"?a:WeakMap,"%WeakRef%":typeof WeakRef>"u"?a:WeakRef,"%WeakSet%":typeof WeakSet>"u"?a:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":W,"%Object.defineProperty%":A,"%Object.getPrototypeOf%":P,"%Math.abs%":i,"%Math.floor%":e,"%Math.max%":s,"%Math.min%":l,"%Math.pow%":c,"%Math.round%":p,"%Math.sign%":v,"%Reflect.getPrototypeOf%":j};if(w)try{null.error}catch(R){var I=w(w(R));ee["%Error.prototype%"]=I}var X=function R(q){var H;if(q==="%AsyncFunction%")H=g("async function () {}");else if(q==="%GeneratorFunction%")H=g("function* () {}");else if(q==="%AsyncGeneratorFunction%")H=g("async function* () {}");else if(q==="%AsyncGenerator%"){var J=R("%AsyncGeneratorFunction%");J&&(H=J.prototype)}else if(q==="%AsyncIteratorPrototype%"){var M=R("%AsyncGenerator%");M&&w&&(H=w(M.prototype))}return ee[q]=H,H},ie={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ce=Ii(),oe=q0(),te=ce.call(L,Array.prototype.concat),B=ce.call(W,Array.prototype.splice),G=ce.call(L,String.prototype.replace),O=ce.call(L,String.prototype.slice),C=ce.call(L,RegExp.prototype.exec),D=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,k=function(q){var H=O(q,0,1),J=O(q,-1);if(H==="%"&&J!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(J==="%"&&H!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var M=[];return G(q,D,function(V,Z,se,fe){M[M.length]=se?G(fe,F,"$1"):Z||V}),M},T=function(q,H){var J=q,M;if(oe(ie,J)&&(M=ie[J],J="%"+M[0]+"%"),oe(ee,J)){var V=ee[J];if(V===$&&(V=X(J)),typeof V>"u"&&!H)throw new o("intrinsic "+q+" exists, but is not available. Please file an issue!");return{alias:M,name:J,value:V}}throw new r("intrinsic "+q+" does not exist!")};return ns=function(q,H){if(typeof q!="string"||q.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof H!="boolean")throw new o('"allowMissing" argument must be a boolean');if(C(/^%?[^%]*%?$/,q)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var J=k(q),M=J.length>0?J[0]:"",V=T("%"+M+"%",H),Z=V.name,se=V.value,fe=!1,he=V.alias;he&&(M=he[0],B(J,te([0,1],he)));for(var K=1,ae=!0;K<J.length;K+=1){var de=J[K],Ce=O(de,0,1),Re=O(de,-1);if((Ce==='"'||Ce==="'"||Ce==="`"||Re==='"'||Re==="'"||Re==="`")&&Ce!==Re)throw new r("property names with quotes must have matching quotes");if((de==="constructor"||!ae)&&(fe=!0),M+="."+de,Z="%"+M+"%",oe(ee,Z))se=ee[Z];else if(se!=null){if(!(de in se)){if(!H)throw new o("base intrinsic for "+q+" exists, but the property is not available.");return}if(_&&K+1>=J.length){var Y=_(se,de);ae=!!Y,ae&&"get"in Y&&!("originalValue"in Y.get)?se=Y.get:se=se[de]}else ae=oe(se,de),se=se[de];ae&&!fe&&(ee[Z]=se)}}return se},ns}var is,Cu;function Hn(){if(Cu)return is;Cu=1;var a=_a(),d=ya(),y=d([a("%String.prototype.indexOf%")]);return is=function(h,u){var r=a(h,!!u);return typeof r=="function"&&y(h,".prototype.")>-1?d([r]):r},is}var os,Ou;function oh(){if(Ou)return os;Ou=1;var a=Zi()(),d=Hn(),y=d("Object.prototype.toString"),m=function(o){return a&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:y(o)==="[object Arguments]"},h=function(o){return m(o)?!0:o!==null&&typeof o=="object"&&"length"in o&&typeof o.length=="number"&&o.length>=0&&y(o)!=="[object Array]"&&"callee"in o&&y(o.callee)==="[object Function]"},u=(function(){return m(arguments)})();return m.isLegacyArguments=h,os=u?m:h,os}var ss,Du;function sh(){if(Du)return ss;Du=1;var a=Hn(),d=Zi()(),y=q0(),m=zn(),h;if(d){var u=a("RegExp.prototype.exec"),r={},o=function(){throw r},t={toString:o,valueOf:o};typeof Symbol.toPrimitive=="symbol"&&(t[Symbol.toPrimitive]=o),h=function(l){if(!l||typeof l!="object")return!1;var c=m(l,"lastIndex"),p=c&&y(c,"value");if(!p)return!1;try{u(l,t)}catch(v){return v===r}}}else{var i=a("Object.prototype.toString"),e="[object RegExp]";h=function(l){return!l||typeof l!="object"&&typeof l!="function"?!1:i(l)===e}}return ss=h,ss}var as,wu;function ah(){if(wu)return as;wu=1;var a=Hn(),d=sh(),y=a("RegExp.prototype.exec"),m=Fi();return as=function(u){if(!d(u))throw new m("`regex` must be a RegExp");return function(o){return y(u,o)!==null}},as}var us,Ru;function uh(){if(Ru)return us;Ru=1;var a=Hn(),d=ah(),y=d(/^\s*(?:function)?\*/),m=Zi()(),h=ga(),u=a("Object.prototype.toString"),r=a("Function.prototype.toString"),o=function(){if(!m)return!1;try{return Function("return function*() {}")()}catch{}},t;return us=function(e){if(typeof e!="function")return!1;if(y(r(e)))return!0;if(!m){var s=u(e);return s==="[object GeneratorFunction]"}if(!h)return!1;if(typeof t>"u"){var l=o();t=l?h(l):!1}return h(e)===t},us}var ls,Pu;function lh(){if(Pu)return ls;Pu=1;var a=Function.prototype.toString,d=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,y,m;if(typeof d=="function"&&typeof Object.defineProperty=="function")try{y=Object.defineProperty({},"length",{get:function(){throw m}}),m={},d(function(){throw 42},null,y)}catch(_){_!==m&&(d=null)}else d=null;var h=/^\s*class\b/,u=function(A){try{var E=a.call(A);return h.test(E)}catch{return!1}},r=function(A){try{return u(A)?!1:(a.call(A),!0)}catch{return!1}},o=Object.prototype.toString,t="[object Object]",i="[object Function]",e="[object GeneratorFunction]",s="[object HTMLAllCollection]",l="[object HTML document.all class]",c="[object HTMLCollection]",p=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),x=function(){return!1};if(typeof document=="object"){var g=document.all;o.call(g)===o.call(document.all)&&(x=function(A){if((v||!A)&&(typeof A>"u"||typeof A=="object"))try{var E=o.call(A);return(E===s||E===l||E===c||E===t)&&A("")==null}catch{}return!1})}return ls=d?function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;try{d(A,null,y)}catch(E){if(E!==m)return!1}return!u(A)&&r(A)}:function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(p)return r(A);if(u(A))return!1;var E=o.call(A);return E!==i&&E!==e&&!/^\[object HTML/.test(E)?!1:r(A)},ls}var cs,Fu;function ch(){if(Fu)return cs;Fu=1;var a=lh(),d=Object.prototype.toString,y=Object.prototype.hasOwnProperty,m=function(t,i,e){for(var s=0,l=t.length;s<l;s++)y.call(t,s)&&(e==null?i(t[s],s,t):i.call(e,t[s],s,t))},h=function(t,i,e){for(var s=0,l=t.length;s<l;s++)e==null?i(t.charAt(s),s,t):i.call(e,t.charAt(s),s,t)},u=function(t,i,e){for(var s in t)y.call(t,s)&&(e==null?i(t[s],s,t):i.call(e,t[s],s,t))};function r(o){return d.call(o)==="[object Array]"}return cs=function(t,i,e){if(!a(i))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=e),r(t)?m(t,i,s):typeof t=="string"?h(t,i,s):u(t,i,s)},cs}var fs,Iu;function fh(){return Iu||(Iu=1,fs=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),fs}var ps,Lu;function ph(){if(Lu)return ps;Lu=1;var a=fh(),d=typeof globalThis>"u"?I0:globalThis;return ps=function(){for(var m=[],h=0;h<a.length;h++)typeof d[a[h]]=="function"&&(m[m.length]=a[h]);return m},ps}var hs={exports:{}},xs,Bu;function j0(){if(Bu)return xs;Bu=1;var a=eo(),d=L0(),y=Fi(),m=zn();return xs=function(u,r,o){if(!u||typeof u!="object"&&typeof u!="function")throw new y("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new y("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new y("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new y("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new y("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new y("`loose`, if provided, must be a boolean");var t=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,e=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!m&&m(u,r);if(a)a(u,r,{configurable:e===null&&l?l.configurable:!e,enumerable:t===null&&l?l.enumerable:!t,value:o,writable:i===null&&l?l.writable:!i});else if(s||!t&&!i&&!e)u[r]=o;else throw new d("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},xs}var ds,ku;function $0(){if(ku)return ds;ku=1;var a=eo(),d=function(){return!!a};return d.hasArrayLengthDefineBug=function(){if(!a)return null;try{return a([],"length",{value:1}).length!==1}catch{return!0}},ds=d,ds}var ms,Mu;function hh(){if(Mu)return ms;Mu=1;var a=_a(),d=j0(),y=$0()(),m=zn(),h=Fi(),u=a("%Math.floor%");return ms=function(o,t){if(typeof o!="function")throw new h("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||u(t)!==t)throw new h("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],e=!0,s=!0;if("length"in o&&m){var l=m(o,"length");l&&!l.configurable&&(e=!1),l&&!l.writable&&(s=!1)}return(e||s||!i)&&(y?d(o,"length",t,!0,!0):d(o,"length",t)),o},ms}var ys,qu;function xh(){if(qu)return ys;qu=1;var a=Ii(),d=ma(),y=M0();return ys=function(){return y(a,d,arguments)},ys}var ju;function to(){return ju||(ju=1,(function(a){var d=hh(),y=eo(),m=ya(),h=xh();a.exports=function(r){var o=m(arguments),t=r.length-(arguments.length-1);return d(o,1+(t>0?t:0),!0)},y?y(a.exports,"apply",{value:h}):a.exports.apply=h})(hs)),hs.exports}var gs,$u;function U0(){if($u)return gs;$u=1;var a=ch(),d=ph(),y=to(),m=Hn(),h=zn(),u=ga(),r=m("Object.prototype.toString"),o=Zi()(),t=typeof globalThis>"u"?I0:globalThis,i=d(),e=m("String.prototype.slice"),s=m("Array.prototype.indexOf",!0)||function(x,g){for(var _=0;_<x.length;_+=1)if(x[_]===g)return _;return-1},l={__proto__:null};o&&h&&u?a(i,function(v){var x=new t[v];if(Symbol.toStringTag in x&&u){var g=u(x),_=h(g,Symbol.toStringTag);if(!_&&g){var A=u(g);_=h(A,Symbol.toStringTag)}l["$"+v]=y(_.get)}}):a(i,function(v){var x=new t[v],g=x.slice||x.set;g&&(l["$"+v]=y(g))});var c=function(x){var g=!1;return a(l,function(_,A){if(!g)try{"$"+_(x)===A&&(g=e(A,1))}catch{}}),g},p=function(x){var g=!1;return a(l,function(_,A){if(!g)try{_(x),g=e(A,1)}catch{}}),g};return gs=function(x){if(!x||typeof x!="object")return!1;if(!o){var g=e(r(x),8,-1);return s(i,g)>-1?g:g!=="Object"?!1:p(x)}return h?c(x):null},gs}var _s,Uu;function dh(){if(Uu)return _s;Uu=1;var a=U0();return _s=function(y){return!!a(y)},_s}var Vu;function mh(){return Vu||(Vu=1,(function(a){var d=oh(),y=uh(),m=U0(),h=dh();function u(K){return K.call.bind(K)}var r=typeof BigInt<"u",o=typeof Symbol<"u",t=u(Object.prototype.toString),i=u(Number.prototype.valueOf),e=u(String.prototype.valueOf),s=u(Boolean.prototype.valueOf);if(r)var l=u(BigInt.prototype.valueOf);if(o)var c=u(Symbol.prototype.valueOf);function p(K,ae){if(typeof K!="object")return!1;try{return ae(K),!0}catch{return!1}}a.isArgumentsObject=d,a.isGeneratorFunction=y,a.isTypedArray=h;function v(K){return typeof Promise<"u"&&K instanceof Promise||K!==null&&typeof K=="object"&&typeof K.then=="function"&&typeof K.catch=="function"}a.isPromise=v;function x(K){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(K):h(K)||O(K)}a.isArrayBufferView=x;function g(K){return m(K)==="Uint8Array"}a.isUint8Array=g;function _(K){return m(K)==="Uint8ClampedArray"}a.isUint8ClampedArray=_;function A(K){return m(K)==="Uint16Array"}a.isUint16Array=A;function E(K){return m(K)==="Uint32Array"}a.isUint32Array=E;function N(K){return m(K)==="Int8Array"}a.isInt8Array=N;function b(K){return m(K)==="Int16Array"}a.isInt16Array=b;function w(K){return m(K)==="Int32Array"}a.isInt32Array=w;function P(K){return m(K)==="Float32Array"}a.isFloat32Array=P;function j(K){return m(K)==="Float64Array"}a.isFloat64Array=j;function W(K){return m(K)==="BigInt64Array"}a.isBigInt64Array=W;function L(K){return m(K)==="BigUint64Array"}a.isBigUint64Array=L;function $(K){return t(K)==="[object Map]"}$.working=typeof Map<"u"&&$(new Map);function Q(K){return typeof Map>"u"?!1:$.working?$(K):K instanceof Map}a.isMap=Q;function ee(K){return t(K)==="[object Set]"}ee.working=typeof Set<"u"&&ee(new Set);function I(K){return typeof Set>"u"?!1:ee.working?ee(K):K instanceof Set}a.isSet=I;function X(K){return t(K)==="[object WeakMap]"}X.working=typeof WeakMap<"u"&&X(new WeakMap);function ie(K){return typeof WeakMap>"u"?!1:X.working?X(K):K instanceof WeakMap}a.isWeakMap=ie;function ce(K){return t(K)==="[object WeakSet]"}ce.working=typeof WeakSet<"u"&&ce(new WeakSet);function oe(K){return ce(K)}a.isWeakSet=oe;function te(K){return t(K)==="[object ArrayBuffer]"}te.working=typeof ArrayBuffer<"u"&&te(new ArrayBuffer);function B(K){return typeof ArrayBuffer>"u"?!1:te.working?te(K):K instanceof ArrayBuffer}a.isArrayBuffer=B;function G(K){return t(K)==="[object DataView]"}G.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&G(new DataView(new ArrayBuffer(1),0,1));function O(K){return typeof DataView>"u"?!1:G.working?G(K):K instanceof DataView}a.isDataView=O;var C=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function D(K){return t(K)==="[object SharedArrayBuffer]"}function F(K){return typeof C>"u"?!1:(typeof D.working>"u"&&(D.working=D(new C)),D.working?D(K):K instanceof C)}a.isSharedArrayBuffer=F;function k(K){return t(K)==="[object AsyncFunction]"}a.isAsyncFunction=k;function T(K){return t(K)==="[object Map Iterator]"}a.isMapIterator=T;function R(K){return t(K)==="[object Set Iterator]"}a.isSetIterator=R;function q(K){return t(K)==="[object Generator]"}a.isGeneratorObject=q;function H(K){return t(K)==="[object WebAssembly.Module]"}a.isWebAssemblyCompiledModule=H;function J(K){return p(K,i)}a.isNumberObject=J;function M(K){return p(K,e)}a.isStringObject=M;function V(K){return p(K,s)}a.isBooleanObject=V;function Z(K){return r&&p(K,l)}a.isBigIntObject=Z;function se(K){return o&&p(K,c)}a.isSymbolObject=se;function fe(K){return J(K)||M(K)||V(K)||Z(K)||se(K)}a.isBoxedPrimitive=fe;function he(K){return typeof Uint8Array<"u"&&(B(K)||F(K))}a.isAnyArrayBuffer=he,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(K){Object.defineProperty(a,K,{enumerable:!1,value:function(){throw new Error(K+" is not supported in userland")}})})})(Eo)),Eo}var As,zu;function yh(){return zu||(zu=1,As=function(d){return d&&typeof d=="object"&&typeof d.copy=="function"&&typeof d.fill=="function"&&typeof d.readUInt8=="function"}),As}var Ui={exports:{}},Hu;function gh(){return Hu||(Hu=1,typeof Object.create=="function"?Ui.exports=function(d,y){y&&(d.super_=y,d.prototype=Object.create(y.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}))}:Ui.exports=function(d,y){if(y){d.super_=y;var m=function(){};m.prototype=y.prototype,d.prototype=new m,d.prototype.constructor=d}}),Ui.exports}var Gu;function Vn(){return Gu||(Gu=1,(function(a){var d=Object.getOwnPropertyDescriptors||function(G){for(var O=Object.keys(G),C={},D=0;D<O.length;D++)C[O[D]]=Object.getOwnPropertyDescriptor(G,O[D]);return C},y=/%[sdj%]/g;a.format=function(B){if(!E(B)){for(var G=[],O=0;O<arguments.length;O++)G.push(u(arguments[O]));return G.join(" ")}for(var O=1,C=arguments,D=C.length,F=String(B).replace(y,function(T){if(T==="%%")return"%";if(O>=D)return T;switch(T){case"%s":return String(C[O++]);case"%d":return Number(C[O++]);case"%j":try{return JSON.stringify(C[O++])}catch{return"[Circular]"}default:return T}}),k=C[O];O<D;k=C[++O])g(k)||!P(k)?F+=" "+k:F+=" "+u(k);return F},a.deprecate=function(B,G){if(typeof process<"u"&&process.noDeprecation===!0)return B;if(typeof process>"u")return function(){return a.deprecate(B,G).apply(this,arguments)};var O=!1;function C(){if(!O){if(process.throwDeprecation)throw new Error(G);process.traceDeprecation?console.trace(G):console.error(G),O=!0}return B.apply(this,arguments)}return C};var m={},h=/^$/;a.debuglog=function(B){if(B=B.toUpperCase(),!m[B])if(h.test(B)){var G=process.pid;m[B]=function(){var O=a.format.apply(a,arguments);console.error("%s %d: %s",B,G,O)}}else m[B]=function(){};return m[B]};function u(B,G){var O={seen:[],stylize:o};return arguments.length>=3&&(O.depth=arguments[2]),arguments.length>=4&&(O.colors=arguments[3]),x(G)?O.showHidden=G:G&&a._extend(O,G),b(O.showHidden)&&(O.showHidden=!1),b(O.depth)&&(O.depth=2),b(O.colors)&&(O.colors=!1),b(O.customInspect)&&(O.customInspect=!0),O.colors&&(O.stylize=r),i(O,B,O.depth)}a.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(B,G){var O=u.styles[G];return O?"\x1B["+u.colors[O][0]+"m"+B+"\x1B["+u.colors[O][1]+"m":B}function o(B,G){return B}function t(B){var G={};return B.forEach(function(O,C){G[O]=!0}),G}function i(B,G,O){if(B.customInspect&&G&&L(G.inspect)&&G.inspect!==a.inspect&&!(G.constructor&&G.constructor.prototype===G)){var C=G.inspect(O,B);return E(C)||(C=i(B,C,O)),C}var D=e(B,G);if(D)return D;var F=Object.keys(G),k=t(F);if(B.showHidden&&(F=Object.getOwnPropertyNames(G)),W(G)&&(F.indexOf("message")>=0||F.indexOf("description")>=0))return s(G);if(F.length===0){if(L(G)){var T=G.name?": "+G.name:"";return B.stylize("[Function"+T+"]","special")}if(w(G))return B.stylize(RegExp.prototype.toString.call(G),"regexp");if(j(G))return B.stylize(Date.prototype.toString.call(G),"date");if(W(G))return s(G)}var R="",q=!1,H=["{","}"];if(v(G)&&(q=!0,H=["[","]"]),L(G)){var J=G.name?": "+G.name:"";R=" [Function"+J+"]"}if(w(G)&&(R=" "+RegExp.prototype.toString.call(G)),j(G)&&(R=" "+Date.prototype.toUTCString.call(G)),W(G)&&(R=" "+s(G)),F.length===0&&(!q||G.length==0))return H[0]+R+H[1];if(O<0)return w(G)?B.stylize(RegExp.prototype.toString.call(G),"regexp"):B.stylize("[Object]","special");B.seen.push(G);var M;return q?M=l(B,G,O,k,F):M=F.map(function(V){return c(B,G,O,k,V,q)}),B.seen.pop(),p(M,R,H)}function e(B,G){if(b(G))return B.stylize("undefined","undefined");if(E(G)){var O="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(O,"string")}if(A(G))return B.stylize(""+G,"number");if(x(G))return B.stylize(""+G,"boolean");if(g(G))return B.stylize("null","null")}function s(B){return"["+Error.prototype.toString.call(B)+"]"}function l(B,G,O,C,D){for(var F=[],k=0,T=G.length;k<T;++k)ie(G,String(k))?F.push(c(B,G,O,C,String(k),!0)):F.push("");return D.forEach(function(R){R.match(/^\d+$/)||F.push(c(B,G,O,C,R,!0))}),F}function c(B,G,O,C,D,F){var k,T,R;if(R=Object.getOwnPropertyDescriptor(G,D)||{value:G[D]},R.get?R.set?T=B.stylize("[Getter/Setter]","special"):T=B.stylize("[Getter]","special"):R.set&&(T=B.stylize("[Setter]","special")),ie(C,D)||(k="["+D+"]"),T||(B.seen.indexOf(R.value)<0?(g(O)?T=i(B,R.value,null):T=i(B,R.value,O-1),T.indexOf(`
32
26
  `)>-1&&(F?T=T.split(`
33
27
  `).map(function(q){return" "+q}).join(`
34
28
  `).slice(2):T=`
@@ -37,7 +31,7 @@ import{V as I0,W as Mp}from"./index-CGKwxuak.js";function qp(a,d){for(var y=0;y<
37
31
  `))):T=B.stylize("[Circular]","special")),b(k)){if(F&&D.match(/^\d+$/))return T;k=JSON.stringify(""+D),k.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(k=k.slice(1,-1),k=B.stylize(k,"name")):(k=k.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),k=B.stylize(k,"string"))}return k+": "+T}function p(B,G,O){var C=B.reduce(function(D,F){return F.indexOf(`
38
32
  `)>=0,D+F.replace(/\u001b\[\d\d?m/g,"").length+1},0);return C>60?O[0]+(G===""?"":G+`
39
33
  `)+" "+B.join(`,
40
- `)+" "+O[1]:O[0]+G+" "+B.join(", ")+" "+O[1]}a.types=gh();function v(B){return Array.isArray(B)}a.isArray=v;function x(B){return typeof B=="boolean"}a.isBoolean=x;function g(B){return B===null}a.isNull=g;function _(B){return B==null}a.isNullOrUndefined=_;function A(B){return typeof B=="number"}a.isNumber=A;function E(B){return typeof B=="string"}a.isString=E;function N(B){return typeof B=="symbol"}a.isSymbol=N;function b(B){return B===void 0}a.isUndefined=b;function w(B){return P(B)&&Q(B)==="[object RegExp]"}a.isRegExp=w,a.types.isRegExp=w;function P(B){return typeof B=="object"&&B!==null}a.isObject=P;function j(B){return P(B)&&Q(B)==="[object Date]"}a.isDate=j,a.types.isDate=j;function W(B){return P(B)&&(Q(B)==="[object Error]"||B instanceof Error)}a.isError=W,a.types.isNativeError=W;function L(B){return typeof B=="function"}a.isFunction=L;function $(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}a.isPrimitive=$,a.isBuffer=_h();function Q(B){return Object.prototype.toString.call(B)}function ee(B){return B<10?"0"+B.toString(10):B.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function X(){var B=new Date,G=[ee(B.getHours()),ee(B.getMinutes()),ee(B.getSeconds())].join(":");return[B.getDate(),I[B.getMonth()],G].join(" ")}a.log=function(){console.log("%s - %s",X(),a.format.apply(a,arguments))},a.inherits=Ah(),a._extend=function(B,G){if(!G||!P(G))return B;for(var O=Object.keys(G),C=O.length;C--;)B[O[C]]=G[O[C]];return B};function ie(B,G){return Object.prototype.hasOwnProperty.call(B,G)}var ce=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;a.promisify=function(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');if(ce&&G[ce]){var O=G[ce];if(typeof O!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(O,ce,{value:O,enumerable:!1,writable:!1,configurable:!0}),O}function O(){for(var C,D,F=new Promise(function(R,q){C=R,D=q}),k=[],T=0;T<arguments.length;T++)k.push(arguments[T]);k.push(function(R,q){R?D(R):C(q)});try{G.apply(this,k)}catch(R){D(R)}return F}return Object.setPrototypeOf(O,Object.getPrototypeOf(G)),ce&&Object.defineProperty(O,ce,{value:O,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(O,d(G))},a.promisify.custom=ce;function oe(B,G){if(!B){var O=new Error("Promise was rejected with a falsy value");O.reason=B,B=O}return G(B)}function te(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');function G(){for(var O=[],C=0;C<arguments.length;C++)O.push(arguments[C]);var D=O.pop();if(typeof D!="function")throw new TypeError("The last argument must be of type Function");var F=this,k=function(){return D.apply(F,arguments)};B.apply(this,O).then(function(T){process.nextTick(k.bind(null,null,T))},function(T){process.nextTick(oe.bind(null,T,k))})}return Object.setPrototypeOf(G,Object.getPrototypeOf(B)),Object.defineProperties(G,d(B)),G}a.callbackify=te})(So)),So}var Qu;function V0(){if(Qu)return Eo;Qu=1;function a(_){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},a(_)}function d(_,A,E){return Object.defineProperty(_,"prototype",{writable:!1}),_}function y(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")}function m(_,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(A&&A.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),A&&h(_,A)}function h(_,A){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,b){return N.__proto__=b,N},h(_,A)}function u(_){var A=t();return function(){var N=i(_),b;if(A){var w=i(this).constructor;b=Reflect.construct(N,arguments,w)}else b=N.apply(this,arguments);return r(this,b)}}function r(_,A){if(A&&(a(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o(_)}function o(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function i(_){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(_)}var e={},s,l;function c(_,A,E){E||(E=Error);function N(w,P,j){return typeof A=="string"?A:A(w,P,j)}var b=(function(w){m(j,w);var P=u(j);function j(W,L,$){var Q;return y(this,j),Q=P.call(this,N(W,L,$)),Q.code=_,Q}return d(j)})(E);e[_]=b}function p(_,A){if(Array.isArray(_)){var E=_.length;return _=_.map(function(N){return String(N)}),E>2?"one of ".concat(A," ").concat(_.slice(0,E-1).join(", "),", or ")+_[E-1]:E===2?"one of ".concat(A," ").concat(_[0]," or ").concat(_[1]):"of ".concat(A," ").concat(_[0])}else return"of ".concat(A," ").concat(String(_))}function v(_,A,E){return _.substr(0,A.length)===A}function x(_,A,E){return(E===void 0||E>_.length)&&(E=_.length),_.substring(E-A.length,E)===A}function g(_,A,E){return typeof E!="number"&&(E=0),E+A.length>_.length?!1:_.indexOf(A,E)!==-1}return c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",function(_,A,E){s===void 0&&(s=Ue()),s(typeof _=="string","'name' must be a string");var N;typeof A=="string"&&v(A,"not ")?(N="must not be",A=A.replace(/^not /,"")):N="must be";var b;if(x(_," argument"))b="The ".concat(_," ").concat(N," ").concat(p(A,"type"));else{var w=g(_,".")?"property":"argument";b='The "'.concat(_,'" ').concat(w," ").concat(N," ").concat(p(A,"type"))}return b+=". Received type ".concat(a(E)),b},TypeError),c("ERR_INVALID_ARG_VALUE",function(_,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";l===void 0&&(l=Vn());var N=l.inspect(A);return N.length>128&&(N="".concat(N.slice(0,128),"...")),"The argument '".concat(_,"' ").concat(E,". Received ").concat(N)},TypeError),c("ERR_INVALID_RETURN_VALUE",function(_,A,E){var N;return E&&E.constructor&&E.constructor.name?N="instance of ".concat(E.constructor.name):N="type ".concat(a(E)),"Expected ".concat(_,' to be returned from the "').concat(A,'"')+" function but got ".concat(N,".")},TypeError),c("ERR_MISSING_ARGS",function(){for(var _=arguments.length,A=new Array(_),E=0;E<_;E++)A[E]=arguments[E];s===void 0&&(s=Ue()),s(A.length>0,"At least one arg needs to be specified");var N="The ",b=A.length;switch(A=A.map(function(w){return'"'.concat(w,'"')}),b){case 1:N+="".concat(A[0]," argument");break;case 2:N+="".concat(A[0]," and ").concat(A[1]," arguments");break;default:N+=A.slice(0,b-1).join(", "),N+=", and ".concat(A[b-1]," arguments");break}return"".concat(N," must be specified")},TypeError),Eo.codes=e,Eo}var Ss,Xu;function vh(){if(Xu)return Ss;Xu=1;function a(oe,te){var B=Object.keys(oe);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(oe);te&&(G=G.filter(function(O){return Object.getOwnPropertyDescriptor(oe,O).enumerable})),B.push.apply(B,G)}return B}function d(oe){for(var te=1;te<arguments.length;te++){var B=arguments[te]!=null?arguments[te]:{};te%2?a(Object(B),!0).forEach(function(G){y(oe,G,B[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(B)):a(Object(B)).forEach(function(G){Object.defineProperty(oe,G,Object.getOwnPropertyDescriptor(B,G))})}return oe}function y(oe,te,B){return te=r(te),te in oe?Object.defineProperty(oe,te,{value:B,enumerable:!0,configurable:!0,writable:!0}):oe[te]=B,oe}function m(oe,te){if(!(oe instanceof te))throw new TypeError("Cannot call a class as a function")}function h(oe,te){for(var B=0;B<te.length;B++){var G=te[B];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(oe,r(G.key),G)}}function u(oe,te,B){return te&&h(oe.prototype,te),Object.defineProperty(oe,"prototype",{writable:!1}),oe}function r(oe){var te=o(oe,"string");return _(te)==="symbol"?te:String(te)}function o(oe,te){if(_(oe)!=="object"||oe===null)return oe;var B=oe[Symbol.toPrimitive];if(B!==void 0){var G=B.call(oe,te);if(_(G)!=="object")return G;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(oe)}function t(oe,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(te&&te.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),te&&x(oe,te)}function i(oe){var te=p();return function(){var G=g(oe),O;if(te){var C=g(this).constructor;O=Reflect.construct(G,arguments,C)}else O=G.apply(this,arguments);return e(this,O)}}function e(oe,te){if(te&&(_(te)==="object"||typeof te=="function"))return te;if(te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(oe)}function s(oe){if(oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe}function l(oe){var te=typeof Map=="function"?new Map:void 0;return l=function(G){if(G===null||!v(G))return G;if(typeof G!="function")throw new TypeError("Super expression must either be null or a function");if(typeof te<"u"){if(te.has(G))return te.get(G);te.set(G,O)}function O(){return c(G,arguments,g(this).constructor)}return O.prototype=Object.create(G.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),x(O,G)},l(oe)}function c(oe,te,B){return p()?c=Reflect.construct.bind():c=function(O,C,D){var F=[null];F.push.apply(F,C);var k=Function.bind.apply(O,F),T=new k;return D&&x(T,D.prototype),T},c.apply(null,arguments)}function p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(oe){return Function.toString.call(oe).indexOf("[native code]")!==-1}function x(oe,te){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(G,O){return G.__proto__=O,G},x(oe,te)}function g(oe){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(B){return B.__proto__||Object.getPrototypeOf(B)},g(oe)}function _(oe){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},_(oe)}var A=Vn(),E=A.inspect,N=V0(),b=N.codes.ERR_INVALID_ARG_TYPE;function w(oe,te,B){return(B===void 0||B>oe.length)&&(B=oe.length),oe.substring(B-te.length,B)===te}function P(oe,te){if(te=Math.floor(te),oe.length==0||te==0)return"";var B=oe.length*te;for(te=Math.floor(Math.log(te)/Math.log(2));te;)oe+=oe,te--;return oe+=oe.substring(0,B-oe.length),oe}var j="",W="",L="",$="",Q={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},ee=10;function I(oe){var te=Object.keys(oe),B=Object.create(Object.getPrototypeOf(oe));return te.forEach(function(G){B[G]=oe[G]}),Object.defineProperty(B,"message",{value:oe.message}),B}function X(oe){return E(oe,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ie(oe,te,B){var G="",O="",C=0,D="",F=!1,k=X(oe),T=k.split(`
34
+ `)+" "+O[1]:O[0]+G+" "+B.join(", ")+" "+O[1]}a.types=mh();function v(B){return Array.isArray(B)}a.isArray=v;function x(B){return typeof B=="boolean"}a.isBoolean=x;function g(B){return B===null}a.isNull=g;function _(B){return B==null}a.isNullOrUndefined=_;function A(B){return typeof B=="number"}a.isNumber=A;function E(B){return typeof B=="string"}a.isString=E;function N(B){return typeof B=="symbol"}a.isSymbol=N;function b(B){return B===void 0}a.isUndefined=b;function w(B){return P(B)&&Q(B)==="[object RegExp]"}a.isRegExp=w,a.types.isRegExp=w;function P(B){return typeof B=="object"&&B!==null}a.isObject=P;function j(B){return P(B)&&Q(B)==="[object Date]"}a.isDate=j,a.types.isDate=j;function W(B){return P(B)&&(Q(B)==="[object Error]"||B instanceof Error)}a.isError=W,a.types.isNativeError=W;function L(B){return typeof B=="function"}a.isFunction=L;function $(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}a.isPrimitive=$,a.isBuffer=yh();function Q(B){return Object.prototype.toString.call(B)}function ee(B){return B<10?"0"+B.toString(10):B.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function X(){var B=new Date,G=[ee(B.getHours()),ee(B.getMinutes()),ee(B.getSeconds())].join(":");return[B.getDate(),I[B.getMonth()],G].join(" ")}a.log=function(){console.log("%s - %s",X(),a.format.apply(a,arguments))},a.inherits=gh(),a._extend=function(B,G){if(!G||!P(G))return B;for(var O=Object.keys(G),C=O.length;C--;)B[O[C]]=G[O[C]];return B};function ie(B,G){return Object.prototype.hasOwnProperty.call(B,G)}var ce=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;a.promisify=function(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');if(ce&&G[ce]){var O=G[ce];if(typeof O!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(O,ce,{value:O,enumerable:!1,writable:!1,configurable:!0}),O}function O(){for(var C,D,F=new Promise(function(R,q){C=R,D=q}),k=[],T=0;T<arguments.length;T++)k.push(arguments[T]);k.push(function(R,q){R?D(R):C(q)});try{G.apply(this,k)}catch(R){D(R)}return F}return Object.setPrototypeOf(O,Object.getPrototypeOf(G)),ce&&Object.defineProperty(O,ce,{value:O,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(O,d(G))},a.promisify.custom=ce;function oe(B,G){if(!B){var O=new Error("Promise was rejected with a falsy value");O.reason=B,B=O}return G(B)}function te(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');function G(){for(var O=[],C=0;C<arguments.length;C++)O.push(arguments[C]);var D=O.pop();if(typeof D!="function")throw new TypeError("The last argument must be of type Function");var F=this,k=function(){return D.apply(F,arguments)};B.apply(this,O).then(function(T){process.nextTick(k.bind(null,null,T))},function(T){process.nextTick(oe.bind(null,T,k))})}return Object.setPrototypeOf(G,Object.getPrototypeOf(B)),Object.defineProperties(G,d(B)),G}a.callbackify=te})(vo)),vo}var Yu;function V0(){if(Yu)return Ao;Yu=1;function a(_){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},a(_)}function d(_,A,E){return Object.defineProperty(_,"prototype",{writable:!1}),_}function y(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")}function m(_,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(A&&A.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),A&&h(_,A)}function h(_,A){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,b){return N.__proto__=b,N},h(_,A)}function u(_){var A=t();return function(){var N=i(_),b;if(A){var w=i(this).constructor;b=Reflect.construct(N,arguments,w)}else b=N.apply(this,arguments);return r(this,b)}}function r(_,A){if(A&&(a(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o(_)}function o(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function i(_){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(_)}var e={},s,l;function c(_,A,E){E||(E=Error);function N(w,P,j){return typeof A=="string"?A:A(w,P,j)}var b=(function(w){m(j,w);var P=u(j);function j(W,L,$){var Q;return y(this,j),Q=P.call(this,N(W,L,$)),Q.code=_,Q}return d(j)})(E);e[_]=b}function p(_,A){if(Array.isArray(_)){var E=_.length;return _=_.map(function(N){return String(N)}),E>2?"one of ".concat(A," ").concat(_.slice(0,E-1).join(", "),", or ")+_[E-1]:E===2?"one of ".concat(A," ").concat(_[0]," or ").concat(_[1]):"of ".concat(A," ").concat(_[0])}else return"of ".concat(A," ").concat(String(_))}function v(_,A,E){return _.substr(0,A.length)===A}function x(_,A,E){return(E===void 0||E>_.length)&&(E=_.length),_.substring(E-A.length,E)===A}function g(_,A,E){return typeof E!="number"&&(E=0),E+A.length>_.length?!1:_.indexOf(A,E)!==-1}return c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",function(_,A,E){s===void 0&&(s=Ue()),s(typeof _=="string","'name' must be a string");var N;typeof A=="string"&&v(A,"not ")?(N="must not be",A=A.replace(/^not /,"")):N="must be";var b;if(x(_," argument"))b="The ".concat(_," ").concat(N," ").concat(p(A,"type"));else{var w=g(_,".")?"property":"argument";b='The "'.concat(_,'" ').concat(w," ").concat(N," ").concat(p(A,"type"))}return b+=". Received type ".concat(a(E)),b},TypeError),c("ERR_INVALID_ARG_VALUE",function(_,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";l===void 0&&(l=Vn());var N=l.inspect(A);return N.length>128&&(N="".concat(N.slice(0,128),"...")),"The argument '".concat(_,"' ").concat(E,". Received ").concat(N)},TypeError),c("ERR_INVALID_RETURN_VALUE",function(_,A,E){var N;return E&&E.constructor&&E.constructor.name?N="instance of ".concat(E.constructor.name):N="type ".concat(a(E)),"Expected ".concat(_,' to be returned from the "').concat(A,'"')+" function but got ".concat(N,".")},TypeError),c("ERR_MISSING_ARGS",function(){for(var _=arguments.length,A=new Array(_),E=0;E<_;E++)A[E]=arguments[E];s===void 0&&(s=Ue()),s(A.length>0,"At least one arg needs to be specified");var N="The ",b=A.length;switch(A=A.map(function(w){return'"'.concat(w,'"')}),b){case 1:N+="".concat(A[0]," argument");break;case 2:N+="".concat(A[0]," and ").concat(A[1]," arguments");break;default:N+=A.slice(0,b-1).join(", "),N+=", and ".concat(A[b-1]," arguments");break}return"".concat(N," must be specified")},TypeError),Ao.codes=e,Ao}var vs,Wu;function _h(){if(Wu)return vs;Wu=1;function a(oe,te){var B=Object.keys(oe);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(oe);te&&(G=G.filter(function(O){return Object.getOwnPropertyDescriptor(oe,O).enumerable})),B.push.apply(B,G)}return B}function d(oe){for(var te=1;te<arguments.length;te++){var B=arguments[te]!=null?arguments[te]:{};te%2?a(Object(B),!0).forEach(function(G){y(oe,G,B[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(B)):a(Object(B)).forEach(function(G){Object.defineProperty(oe,G,Object.getOwnPropertyDescriptor(B,G))})}return oe}function y(oe,te,B){return te=r(te),te in oe?Object.defineProperty(oe,te,{value:B,enumerable:!0,configurable:!0,writable:!0}):oe[te]=B,oe}function m(oe,te){if(!(oe instanceof te))throw new TypeError("Cannot call a class as a function")}function h(oe,te){for(var B=0;B<te.length;B++){var G=te[B];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(oe,r(G.key),G)}}function u(oe,te,B){return te&&h(oe.prototype,te),Object.defineProperty(oe,"prototype",{writable:!1}),oe}function r(oe){var te=o(oe,"string");return _(te)==="symbol"?te:String(te)}function o(oe,te){if(_(oe)!=="object"||oe===null)return oe;var B=oe[Symbol.toPrimitive];if(B!==void 0){var G=B.call(oe,te);if(_(G)!=="object")return G;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(oe)}function t(oe,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(te&&te.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),Object.defineProperty(oe,"prototype",{writable:!1}),te&&x(oe,te)}function i(oe){var te=p();return function(){var G=g(oe),O;if(te){var C=g(this).constructor;O=Reflect.construct(G,arguments,C)}else O=G.apply(this,arguments);return e(this,O)}}function e(oe,te){if(te&&(_(te)==="object"||typeof te=="function"))return te;if(te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(oe)}function s(oe){if(oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe}function l(oe){var te=typeof Map=="function"?new Map:void 0;return l=function(G){if(G===null||!v(G))return G;if(typeof G!="function")throw new TypeError("Super expression must either be null or a function");if(typeof te<"u"){if(te.has(G))return te.get(G);te.set(G,O)}function O(){return c(G,arguments,g(this).constructor)}return O.prototype=Object.create(G.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),x(O,G)},l(oe)}function c(oe,te,B){return p()?c=Reflect.construct.bind():c=function(O,C,D){var F=[null];F.push.apply(F,C);var k=Function.bind.apply(O,F),T=new k;return D&&x(T,D.prototype),T},c.apply(null,arguments)}function p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(oe){return Function.toString.call(oe).indexOf("[native code]")!==-1}function x(oe,te){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(G,O){return G.__proto__=O,G},x(oe,te)}function g(oe){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(B){return B.__proto__||Object.getPrototypeOf(B)},g(oe)}function _(oe){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},_(oe)}var A=Vn(),E=A.inspect,N=V0(),b=N.codes.ERR_INVALID_ARG_TYPE;function w(oe,te,B){return(B===void 0||B>oe.length)&&(B=oe.length),oe.substring(B-te.length,B)===te}function P(oe,te){if(te=Math.floor(te),oe.length==0||te==0)return"";var B=oe.length*te;for(te=Math.floor(Math.log(te)/Math.log(2));te;)oe+=oe,te--;return oe+=oe.substring(0,B-oe.length),oe}var j="",W="",L="",$="",Q={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},ee=10;function I(oe){var te=Object.keys(oe),B=Object.create(Object.getPrototypeOf(oe));return te.forEach(function(G){B[G]=oe[G]}),Object.defineProperty(B,"message",{value:oe.message}),B}function X(oe){return E(oe,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ie(oe,te,B){var G="",O="",C=0,D="",F=!1,k=X(oe),T=k.split(`
41
35
  `),R=X(te).split(`
42
36
  `),q=0,H="";if(B==="strictEqual"&&_(oe)==="object"&&_(te)==="object"&&oe!==null&&te!==null&&(B="strictEqualObject"),T.length===1&&R.length===1&&T[0]!==R[0]){var J=T[0].length+R[0].length;if(J<=ee){if((_(oe)!=="object"||oe===null)&&(_(te)!=="object"||te===null)&&(oe!==0||te!==0))return"".concat(Q[B],`
43
37
 
@@ -83,13 +77,13 @@ import{V as I0,W as Mp}from"./index-CGKwxuak.js";function qp(a,d){for(var y=0;y<
83
77
 
84
78
  should equal
85
79
 
86
- `):V=" ".concat(F," ").concat(V)),C=B.call(this,"".concat(M).concat(V))}return Error.stackTraceLimit=q,C.generatedMessage=!D,Object.defineProperty(s(C),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),C.code="ERR_ASSERTION",C.actual=T,C.expected=R,C.operator=F,Error.captureStackTrace&&Error.captureStackTrace(s(C),k),C.stack,C.name="AssertionError",e(C)}return u(G,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:te,value:function(C,D){return E(this,d(d({},D),{},{customInspect:!1,depth:0}))}}]),G})(l(Error),E.custom);return Ss=ce,Ss}var Ts,Ku;function z0(){if(Ku)return Ts;Ku=1;var a=Object.prototype.toString;return Ts=function(y){var m=a.call(y),h=m==="[object Arguments]";return h||(h=m!=="[object Array]"&&y!==null&&typeof y=="object"&&typeof y.length=="number"&&y.length>=0&&a.call(y.callee)==="[object Function]"),h},Ts}var bs,Ju;function Eh(){if(Ju)return bs;Ju=1;var a;if(!Object.keys){var d=Object.prototype.hasOwnProperty,y=Object.prototype.toString,m=z0(),h=Object.prototype.propertyIsEnumerable,u=!h.call({toString:null},"toString"),r=h.call(function(){},"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],t=function(l){var c=l.constructor;return c&&c.prototype===l},i={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},e=(function(){if(typeof window>"u")return!1;for(var l in window)try{if(!i["$"+l]&&d.call(window,l)&&window[l]!==null&&typeof window[l]=="object")try{t(window[l])}catch{return!0}}catch{return!0}return!1})(),s=function(l){if(typeof window>"u"||!e)return t(l);try{return t(l)}catch{return!1}};a=function(c){var p=c!==null&&typeof c=="object",v=y.call(c)==="[object Function]",x=m(c),g=p&&y.call(c)==="[object String]",_=[];if(!p&&!v&&!x)throw new TypeError("Object.keys called on a non-object");var A=r&&v;if(g&&c.length>0&&!d.call(c,0))for(var E=0;E<c.length;++E)_.push(String(E));if(x&&c.length>0)for(var N=0;N<c.length;++N)_.push(String(N));else for(var b in c)!(A&&b==="prototype")&&d.call(c,b)&&_.push(String(b));if(u)for(var w=s(c),P=0;P<o.length;++P)!(w&&o[P]==="constructor")&&d.call(c,o[P])&&_.push(o[P]);return _}}return bs=a,bs}var Ns,Zu;function H0(){if(Zu)return Ns;Zu=1;var a=Array.prototype.slice,d=z0(),y=Object.keys,m=y?function(r){return y(r)}:Eh(),h=Object.keys;return m.shim=function(){if(Object.keys){var r=(function(){var o=Object.keys(arguments);return o&&o.length===arguments.length})(1,2);r||(Object.keys=function(t){return d(t)?h(a.call(t)):h(t)})}else Object.keys=m;return Object.keys||m},Ns=m,Ns}var Cs,el;function Sh(){if(el)return Cs;el=1;var a=H0(),d=ha()(),y=Hn(),m=xa(),h=y("Array.prototype.push"),u=y("Object.prototype.propertyIsEnumerable"),r=d?m.getOwnPropertySymbols:null;return Cs=function(t,i){if(t==null)throw new TypeError("target must be an object");var e=m(t);if(arguments.length===1)return e;for(var s=1;s<arguments.length;++s){var l=m(arguments[s]),c=a(l),p=d&&(m.getOwnPropertySymbols||r);if(p)for(var v=p(l),x=0;x<v.length;++x){var g=v[x];u(l,g)&&h(c,g)}for(var _=0;_<c.length;++_){var A=c[_];if(u(l,A)){var E=l[A];e[A]=E}}}return e},Cs}var Os,tl;function Th(){if(tl)return Os;tl=1;var a=Sh(),d=function(){if(!Object.assign)return!1;for(var m="abcdefghijklmnopqrst",h=m.split(""),u={},r=0;r<h.length;++r)u[h[r]]=h[r];var o=Object.assign({},u),t="";for(var i in o)t+=i;return m!==t},y=function(){if(!Object.assign||!Object.preventExtensions)return!1;var m=Object.preventExtensions({1:2});try{Object.assign(m,"xy")}catch{return m[1]==="y"}return!1};return Os=function(){return!Object.assign||d()||y()?a:Object.assign},Os}var Ds,rl;function G0(){if(rl)return Ds;rl=1;var a=function(d){return d!==d};return Ds=function(y,m){return y===0&&m===0?1/y===1/m:!!(y===m||a(y)&&a(m))},Ds}var ws,nl;function Aa(){if(nl)return ws;nl=1;var a=G0();return ws=function(){return typeof Object.is=="function"?Object.is:a},ws}var Rs,il;function bh(){if(il)return Rs;il=1;var a=_a(),d=to(),y=d(a("String.prototype.indexOf"));return Rs=function(h,u){var r=a(h,!!u);return typeof r=="function"&&y(h,".prototype.")>-1?d(r):r},Rs}var Ps,ol;function ro(){if(ol)return Ps;ol=1;var a=H0(),d=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",y=Object.prototype.toString,m=Array.prototype.concat,h=j0(),u=function(i){return typeof i=="function"&&y.call(i)==="[object Function]"},r=$0()(),o=function(i,e,s,l){if(e in i){if(l===!0){if(i[e]===s)return}else if(!u(l)||!l())return}r?h(i,e,s,!0):h(i,e,s)},t=function(i,e){var s=arguments.length>2?arguments[2]:{},l=a(e);d&&(l=m.call(l,Object.getOwnPropertySymbols(e)));for(var c=0;c<l.length;c+=1)o(i,l[c],e[l[c]],s[l[c]])};return t.supportsDescriptors=!!r,Ps=t,Ps}var Fs,sl;function Nh(){if(sl)return Fs;sl=1;var a=Aa(),d=ro();return Fs=function(){var m=a();return d(Object,{is:m},{is:function(){return Object.is!==m}}),m},Fs}var Is,al;function Ch(){if(al)return Is;al=1;var a=ro(),d=to(),y=G0(),m=Aa(),h=Nh(),u=d(m(),Object);return a(u,{getPolyfill:m,implementation:y,shim:h}),Is=u,Is}var Ls,ul;function Y0(){return ul||(ul=1,Ls=function(d){return d!==d}),Ls}var Bs,ll;function W0(){if(ll)return Bs;ll=1;var a=Y0();return Bs=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:a},Bs}var ks,cl;function Oh(){if(cl)return ks;cl=1;var a=ro(),d=W0();return ks=function(){var m=d();return a(Number,{isNaN:m},{isNaN:function(){return Number.isNaN!==m}}),m},ks}var Ms,fl;function Dh(){if(fl)return Ms;fl=1;var a=to(),d=ro(),y=Y0(),m=W0(),h=Oh(),u=a(m(),Number);return d(u,{getPolyfill:m,implementation:y,shim:h}),Ms=u,Ms}var qs,pl;function wh(){if(pl)return qs;pl=1;function a(Y,re){return u(Y)||h(Y,re)||y(Y,re)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
87
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(Y,re){if(Y){if(typeof Y=="string")return m(Y,re);var xe=Object.prototype.toString.call(Y).slice(8,-1);if(xe==="Object"&&Y.constructor&&(xe=Y.constructor.name),xe==="Map"||xe==="Set")return Array.from(Y);if(xe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xe))return m(Y,re)}}function m(Y,re){(re==null||re>Y.length)&&(re=Y.length);for(var xe=0,ge=new Array(re);xe<re;xe++)ge[xe]=Y[xe];return ge}function h(Y,re){var xe=Y==null?null:typeof Symbol<"u"&&Y[Symbol.iterator]||Y["@@iterator"];if(xe!=null){var ge,_e,be,Te,De=[],Pe=!0,Le=!1;try{if(be=(xe=xe.call(Y)).next,re!==0)for(;!(Pe=(ge=be.call(xe)).done)&&(De.push(ge.value),De.length!==re);Pe=!0);}catch(ue){Le=!0,_e=ue}finally{try{if(!Pe&&xe.return!=null&&(Te=xe.return(),Object(Te)!==Te))return}finally{if(Le)throw _e}}return De}}function u(Y){if(Array.isArray(Y))return Y}function r(Y){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(re){return typeof re}:function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},r(Y)}var o=/a/g.flags!==void 0,t=function(re){var xe=[];return re.forEach(function(ge){return xe.push(ge)}),xe},i=function(re){var xe=[];return re.forEach(function(ge,_e){return xe.push([_e,ge])}),xe},e=Object.is?Object.is:Ch(),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:Dh();function c(Y){return Y.call.bind(Y)}var p=c(Object.prototype.hasOwnProperty),v=c(Object.prototype.propertyIsEnumerable),x=c(Object.prototype.toString),g=Vn().types,_=g.isAnyArrayBuffer,A=g.isArrayBufferView,E=g.isDate,N=g.isMap,b=g.isRegExp,w=g.isSet,P=g.isNativeError,j=g.isBoxedPrimitive,W=g.isNumberObject,L=g.isStringObject,$=g.isBooleanObject,Q=g.isBigIntObject,ee=g.isSymbolObject,I=g.isFloat32Array,X=g.isFloat64Array;function ie(Y){if(Y.length===0||Y.length>10)return!0;for(var re=0;re<Y.length;re++){var xe=Y.charCodeAt(re);if(xe<48||xe>57)return!0}return Y.length===10&&Y>=Math.pow(2,32)}function ce(Y){return Object.keys(Y).filter(ie).concat(s(Y).filter(Object.prototype.propertyIsEnumerable.bind(Y)))}/*!
80
+ `):V=" ".concat(F," ").concat(V)),C=B.call(this,"".concat(M).concat(V))}return Error.stackTraceLimit=q,C.generatedMessage=!D,Object.defineProperty(s(C),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),C.code="ERR_ASSERTION",C.actual=T,C.expected=R,C.operator=F,Error.captureStackTrace&&Error.captureStackTrace(s(C),k),C.stack,C.name="AssertionError",e(C)}return u(G,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:te,value:function(C,D){return E(this,d(d({},D),{},{customInspect:!1,depth:0}))}}]),G})(l(Error),E.custom);return vs=ce,vs}var Es,Qu;function z0(){if(Qu)return Es;Qu=1;var a=Object.prototype.toString;return Es=function(y){var m=a.call(y),h=m==="[object Arguments]";return h||(h=m!=="[object Array]"&&y!==null&&typeof y=="object"&&typeof y.length=="number"&&y.length>=0&&a.call(y.callee)==="[object Function]"),h},Es}var Ss,Xu;function Ah(){if(Xu)return Ss;Xu=1;var a;if(!Object.keys){var d=Object.prototype.hasOwnProperty,y=Object.prototype.toString,m=z0(),h=Object.prototype.propertyIsEnumerable,u=!h.call({toString:null},"toString"),r=h.call(function(){},"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],t=function(l){var c=l.constructor;return c&&c.prototype===l},i={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},e=(function(){if(typeof window>"u")return!1;for(var l in window)try{if(!i["$"+l]&&d.call(window,l)&&window[l]!==null&&typeof window[l]=="object")try{t(window[l])}catch{return!0}}catch{return!0}return!1})(),s=function(l){if(typeof window>"u"||!e)return t(l);try{return t(l)}catch{return!1}};a=function(c){var p=c!==null&&typeof c=="object",v=y.call(c)==="[object Function]",x=m(c),g=p&&y.call(c)==="[object String]",_=[];if(!p&&!v&&!x)throw new TypeError("Object.keys called on a non-object");var A=r&&v;if(g&&c.length>0&&!d.call(c,0))for(var E=0;E<c.length;++E)_.push(String(E));if(x&&c.length>0)for(var N=0;N<c.length;++N)_.push(String(N));else for(var b in c)!(A&&b==="prototype")&&d.call(c,b)&&_.push(String(b));if(u)for(var w=s(c),P=0;P<o.length;++P)!(w&&o[P]==="constructor")&&d.call(c,o[P])&&_.push(o[P]);return _}}return Ss=a,Ss}var Ts,Ku;function H0(){if(Ku)return Ts;Ku=1;var a=Array.prototype.slice,d=z0(),y=Object.keys,m=y?function(r){return y(r)}:Ah(),h=Object.keys;return m.shim=function(){if(Object.keys){var r=(function(){var o=Object.keys(arguments);return o&&o.length===arguments.length})(1,2);r||(Object.keys=function(t){return d(t)?h(a.call(t)):h(t)})}else Object.keys=m;return Object.keys||m},Ts=m,Ts}var bs,Ju;function vh(){if(Ju)return bs;Ju=1;var a=H0(),d=ha()(),y=Hn(),m=xa(),h=y("Array.prototype.push"),u=y("Object.prototype.propertyIsEnumerable"),r=d?m.getOwnPropertySymbols:null;return bs=function(t,i){if(t==null)throw new TypeError("target must be an object");var e=m(t);if(arguments.length===1)return e;for(var s=1;s<arguments.length;++s){var l=m(arguments[s]),c=a(l),p=d&&(m.getOwnPropertySymbols||r);if(p)for(var v=p(l),x=0;x<v.length;++x){var g=v[x];u(l,g)&&h(c,g)}for(var _=0;_<c.length;++_){var A=c[_];if(u(l,A)){var E=l[A];e[A]=E}}}return e},bs}var Ns,Zu;function Eh(){if(Zu)return Ns;Zu=1;var a=vh(),d=function(){if(!Object.assign)return!1;for(var m="abcdefghijklmnopqrst",h=m.split(""),u={},r=0;r<h.length;++r)u[h[r]]=h[r];var o=Object.assign({},u),t="";for(var i in o)t+=i;return m!==t},y=function(){if(!Object.assign||!Object.preventExtensions)return!1;var m=Object.preventExtensions({1:2});try{Object.assign(m,"xy")}catch{return m[1]==="y"}return!1};return Ns=function(){return!Object.assign||d()||y()?a:Object.assign},Ns}var Cs,el;function G0(){if(el)return Cs;el=1;var a=function(d){return d!==d};return Cs=function(y,m){return y===0&&m===0?1/y===1/m:!!(y===m||a(y)&&a(m))},Cs}var Os,tl;function Aa(){if(tl)return Os;tl=1;var a=G0();return Os=function(){return typeof Object.is=="function"?Object.is:a},Os}var Ds,rl;function Sh(){if(rl)return Ds;rl=1;var a=_a(),d=to(),y=d(a("String.prototype.indexOf"));return Ds=function(h,u){var r=a(h,!!u);return typeof r=="function"&&y(h,".prototype.")>-1?d(r):r},Ds}var ws,nl;function ro(){if(nl)return ws;nl=1;var a=H0(),d=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",y=Object.prototype.toString,m=Array.prototype.concat,h=j0(),u=function(i){return typeof i=="function"&&y.call(i)==="[object Function]"},r=$0()(),o=function(i,e,s,l){if(e in i){if(l===!0){if(i[e]===s)return}else if(!u(l)||!l())return}r?h(i,e,s,!0):h(i,e,s)},t=function(i,e){var s=arguments.length>2?arguments[2]:{},l=a(e);d&&(l=m.call(l,Object.getOwnPropertySymbols(e)));for(var c=0;c<l.length;c+=1)o(i,l[c],e[l[c]],s[l[c]])};return t.supportsDescriptors=!!r,ws=t,ws}var Rs,il;function Th(){if(il)return Rs;il=1;var a=Aa(),d=ro();return Rs=function(){var m=a();return d(Object,{is:m},{is:function(){return Object.is!==m}}),m},Rs}var Ps,ol;function bh(){if(ol)return Ps;ol=1;var a=ro(),d=to(),y=G0(),m=Aa(),h=Th(),u=d(m(),Object);return a(u,{getPolyfill:m,implementation:y,shim:h}),Ps=u,Ps}var Fs,sl;function Y0(){return sl||(sl=1,Fs=function(d){return d!==d}),Fs}var Is,al;function W0(){if(al)return Is;al=1;var a=Y0();return Is=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:a},Is}var Ls,ul;function Nh(){if(ul)return Ls;ul=1;var a=ro(),d=W0();return Ls=function(){var m=d();return a(Number,{isNaN:m},{isNaN:function(){return Number.isNaN!==m}}),m},Ls}var Bs,ll;function Ch(){if(ll)return Bs;ll=1;var a=to(),d=ro(),y=Y0(),m=W0(),h=Nh(),u=a(m(),Number);return d(u,{getPolyfill:m,implementation:y,shim:h}),Bs=u,Bs}var ks,cl;function Oh(){if(cl)return ks;cl=1;function a(Y,re){return u(Y)||h(Y,re)||y(Y,re)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
81
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(Y,re){if(Y){if(typeof Y=="string")return m(Y,re);var xe=Object.prototype.toString.call(Y).slice(8,-1);if(xe==="Object"&&Y.constructor&&(xe=Y.constructor.name),xe==="Map"||xe==="Set")return Array.from(Y);if(xe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xe))return m(Y,re)}}function m(Y,re){(re==null||re>Y.length)&&(re=Y.length);for(var xe=0,ge=new Array(re);xe<re;xe++)ge[xe]=Y[xe];return ge}function h(Y,re){var xe=Y==null?null:typeof Symbol<"u"&&Y[Symbol.iterator]||Y["@@iterator"];if(xe!=null){var ge,_e,be,Te,De=[],Pe=!0,Le=!1;try{if(be=(xe=xe.call(Y)).next,re!==0)for(;!(Pe=(ge=be.call(xe)).done)&&(De.push(ge.value),De.length!==re);Pe=!0);}catch(ue){Le=!0,_e=ue}finally{try{if(!Pe&&xe.return!=null&&(Te=xe.return(),Object(Te)!==Te))return}finally{if(Le)throw _e}}return De}}function u(Y){if(Array.isArray(Y))return Y}function r(Y){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(re){return typeof re}:function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},r(Y)}var o=/a/g.flags!==void 0,t=function(re){var xe=[];return re.forEach(function(ge){return xe.push(ge)}),xe},i=function(re){var xe=[];return re.forEach(function(ge,_e){return xe.push([_e,ge])}),xe},e=Object.is?Object.is:bh(),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:Ch();function c(Y){return Y.call.bind(Y)}var p=c(Object.prototype.hasOwnProperty),v=c(Object.prototype.propertyIsEnumerable),x=c(Object.prototype.toString),g=Vn().types,_=g.isAnyArrayBuffer,A=g.isArrayBufferView,E=g.isDate,N=g.isMap,b=g.isRegExp,w=g.isSet,P=g.isNativeError,j=g.isBoxedPrimitive,W=g.isNumberObject,L=g.isStringObject,$=g.isBooleanObject,Q=g.isBigIntObject,ee=g.isSymbolObject,I=g.isFloat32Array,X=g.isFloat64Array;function ie(Y){if(Y.length===0||Y.length>10)return!0;for(var re=0;re<Y.length;re++){var xe=Y.charCodeAt(re);if(xe<48||xe>57)return!0}return Y.length===10&&Y>=Math.pow(2,32)}function ce(Y){return Object.keys(Y).filter(ie).concat(s(Y).filter(Object.prototype.propertyIsEnumerable.bind(Y)))}/*!
88
82
  * The buffer module from node.js, for the browser.
89
83
  *
90
84
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
91
85
  * @license MIT
92
- */function oe(Y,re){if(Y===re)return 0;for(var xe=Y.length,ge=re.length,_e=0,be=Math.min(xe,ge);_e<be;++_e)if(Y[_e]!==re[_e]){xe=Y[_e],ge=re[_e];break}return xe<ge?-1:ge<xe?1:0}var te=!0,B=!1,G=0,O=1,C=2,D=3;function F(Y,re){return o?Y.source===re.source&&Y.flags===re.flags:RegExp.prototype.toString.call(Y)===RegExp.prototype.toString.call(re)}function k(Y,re){if(Y.byteLength!==re.byteLength)return!1;for(var xe=0;xe<Y.byteLength;xe++)if(Y[xe]!==re[xe])return!1;return!0}function T(Y,re){return Y.byteLength!==re.byteLength?!1:oe(new Uint8Array(Y.buffer,Y.byteOffset,Y.byteLength),new Uint8Array(re.buffer,re.byteOffset,re.byteLength))===0}function R(Y,re){return Y.byteLength===re.byteLength&&oe(new Uint8Array(Y),new Uint8Array(re))===0}function q(Y,re){return W(Y)?W(re)&&e(Number.prototype.valueOf.call(Y),Number.prototype.valueOf.call(re)):L(Y)?L(re)&&String.prototype.valueOf.call(Y)===String.prototype.valueOf.call(re):$(Y)?$(re)&&Boolean.prototype.valueOf.call(Y)===Boolean.prototype.valueOf.call(re):Q(Y)?Q(re)&&BigInt.prototype.valueOf.call(Y)===BigInt.prototype.valueOf.call(re):ee(re)&&Symbol.prototype.valueOf.call(Y)===Symbol.prototype.valueOf.call(re)}function H(Y,re,xe,ge){if(Y===re)return Y!==0?!0:xe?e(Y,re):!0;if(xe){if(r(Y)!=="object")return typeof Y=="number"&&l(Y)&&l(re);if(r(re)!=="object"||Y===null||re===null||Object.getPrototypeOf(Y)!==Object.getPrototypeOf(re))return!1}else{if(Y===null||r(Y)!=="object")return re===null||r(re)!=="object"?Y==re:!1;if(re===null||r(re)!=="object")return!1}var _e=x(Y),be=x(re);if(_e!==be)return!1;if(Array.isArray(Y)){if(Y.length!==re.length)return!1;var Te=ce(Y),De=ce(re);return Te.length!==De.length?!1:M(Y,re,xe,ge,O,Te)}if(_e==="[object Object]"&&(!N(Y)&&N(re)||!w(Y)&&w(re)))return!1;if(E(Y)){if(!E(re)||Date.prototype.getTime.call(Y)!==Date.prototype.getTime.call(re))return!1}else if(b(Y)){if(!b(re)||!F(Y,re))return!1}else if(P(Y)||Y instanceof Error){if(Y.message!==re.message||Y.name!==re.name)return!1}else if(A(Y)){if(!xe&&(I(Y)||X(Y))){if(!k(Y,re))return!1}else if(!T(Y,re))return!1;var Pe=ce(Y),Le=ce(re);return Pe.length!==Le.length?!1:M(Y,re,xe,ge,G,Pe)}else{if(w(Y))return!w(re)||Y.size!==re.size?!1:M(Y,re,xe,ge,C);if(N(Y))return!N(re)||Y.size!==re.size?!1:M(Y,re,xe,ge,D);if(_(Y)){if(!R(Y,re))return!1}else if(j(Y)&&!q(Y,re))return!1}return M(Y,re,xe,ge,G)}function J(Y,re){return re.filter(function(xe){return v(Y,xe)})}function M(Y,re,xe,ge,_e,be){if(arguments.length===5){be=Object.keys(Y);var Te=Object.keys(re);if(be.length!==Te.length)return!1}for(var De=0;De<be.length;De++)if(!p(re,be[De]))return!1;if(xe&&arguments.length===5){var Pe=s(Y);if(Pe.length!==0){var Le=0;for(De=0;De<Pe.length;De++){var ue=Pe[De];if(v(Y,ue)){if(!v(re,ue))return!1;be.push(ue),Le++}else if(v(re,ue))return!1}var ve=s(re);if(Pe.length!==ve.length&&J(re,ve).length!==Le)return!1}else{var Ee=s(re);if(Ee.length!==0&&J(re,Ee).length!==0)return!1}}if(be.length===0&&(_e===G||_e===O&&Y.length===0||Y.size===0))return!0;if(ge===void 0)ge={val1:new Map,val2:new Map,position:0};else{var z=ge.val1.get(Y);if(z!==void 0){var f=ge.val2.get(re);if(f!==void 0)return z===f}ge.position++}ge.val1.set(Y,ge.position),ge.val2.set(re,ge.position);var S=de(Y,re,xe,be,ge,_e);return ge.val1.delete(Y),ge.val2.delete(re),S}function V(Y,re,xe,ge){for(var _e=t(Y),be=0;be<_e.length;be++){var Te=_e[be];if(H(re,Te,xe,ge))return Y.delete(Te),!0}return!1}function Z(Y){switch(r(Y)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":Y=+Y;case"number":if(l(Y))return!1}return!0}function se(Y,re,xe){var ge=Z(xe);return ge??(re.has(ge)&&!Y.has(ge))}function fe(Y,re,xe,ge,_e){var be=Z(xe);if(be!=null)return be;var Te=re.get(be);return Te===void 0&&!re.has(be)||!H(ge,Te,!1,_e)?!1:!Y.has(be)&&H(ge,Te,!1,_e)}function he(Y,re,xe,ge){for(var _e=null,be=t(Y),Te=0;Te<be.length;Te++){var De=be[Te];if(r(De)==="object"&&De!==null)_e===null&&(_e=new Set),_e.add(De);else if(!re.has(De)){if(xe||!se(Y,re,De))return!1;_e===null&&(_e=new Set),_e.add(De)}}if(_e!==null){for(var Pe=t(re),Le=0;Le<Pe.length;Le++){var ue=Pe[Le];if(r(ue)==="object"&&ue!==null){if(!V(_e,ue,xe,ge))return!1}else if(!xe&&!Y.has(ue)&&!V(_e,ue,xe,ge))return!1}return _e.size===0}return!0}function K(Y,re,xe,ge,_e,be){for(var Te=t(Y),De=0;De<Te.length;De++){var Pe=Te[De];if(H(xe,Pe,_e,be)&&H(ge,re.get(Pe),_e,be))return Y.delete(Pe),!0}return!1}function ae(Y,re,xe,ge){for(var _e=null,be=i(Y),Te=0;Te<be.length;Te++){var De=a(be[Te],2),Pe=De[0],Le=De[1];if(r(Pe)==="object"&&Pe!==null)_e===null&&(_e=new Set),_e.add(Pe);else{var ue=re.get(Pe);if(ue===void 0&&!re.has(Pe)||!H(Le,ue,xe,ge)){if(xe||!fe(Y,re,Pe,Le,ge))return!1;_e===null&&(_e=new Set),_e.add(Pe)}}}if(_e!==null){for(var ve=i(re),Ee=0;Ee<ve.length;Ee++){var z=a(ve[Ee],2),f=z[0],S=z[1];if(r(f)==="object"&&f!==null){if(!K(_e,Y,f,S,xe,ge))return!1}else if(!xe&&(!Y.has(f)||!H(Y.get(f),S,!1,ge))&&!K(_e,Y,f,S,!1,ge))return!1}return _e.size===0}return!0}function de(Y,re,xe,ge,_e,be){var Te=0;if(be===C){if(!he(Y,re,xe,_e))return!1}else if(be===D){if(!ae(Y,re,xe,_e))return!1}else if(be===O)for(;Te<Y.length;Te++)if(p(Y,Te)){if(!p(re,Te)||!H(Y[Te],re[Te],xe,_e))return!1}else{if(p(re,Te))return!1;for(var De=Object.keys(Y);Te<De.length;Te++){var Pe=De[Te];if(!p(re,Pe)||!H(Y[Pe],re[Pe],xe,_e))return!1}return De.length===Object.keys(re).length}for(Te=0;Te<ge.length;Te++){var Le=ge[Te];if(!H(Y[Le],re[Le],xe,_e))return!1}return!0}function Ce(Y,re){return H(Y,re,B)}function Re(Y,re){return H(Y,re,te)}return qs={isDeepEqual:Ce,isDeepStrictEqual:Re},qs}var hl;function Ue(){if(hl)return vo.exports;hl=1;function a(C){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},a(C)}function d(C,D,F){return Object.defineProperty(C,"prototype",{writable:!1}),C}function y(C,D){if(!(C instanceof D))throw new TypeError("Cannot call a class as a function")}var m=V0(),h=m.codes,u=h.ERR_AMBIGUOUS_ARGUMENT,r=h.ERR_INVALID_ARG_TYPE,o=h.ERR_INVALID_ARG_VALUE,t=h.ERR_INVALID_RETURN_VALUE,i=h.ERR_MISSING_ARGS,e=vh(),s=Vn(),l=s.inspect,c=Vn().types,p=c.isPromise,v=c.isRegExp,x=Th()(),g=Aa()(),_=bh()("RegExp.prototype.test"),A,E;function N(){var C=wh();A=C.isDeepEqual,E=C.isDeepStrictEqual}var b=!1,w=vo.exports=$,P={};function j(C){throw C.message instanceof Error?C.message:new e(C)}function W(C,D,F,k,T){var R=arguments.length,q;if(R===0)q="Failed";else if(R===1)F=C,C=void 0;else{if(b===!1){b=!0;var H=process.emitWarning?process.emitWarning:console.warn.bind(console);H("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}R===2&&(k="!=")}if(F instanceof Error)throw F;var J={actual:C,expected:D,operator:k===void 0?"fail":k,stackStartFn:T||W};F!==void 0&&(J.message=F);var M=new e(J);throw q&&(M.message=q,M.generatedMessage=!0),M}w.fail=W,w.AssertionError=e;function L(C,D,F,k){if(!F){var T=!1;if(D===0)T=!0,k="No value argument passed to `assert.ok()`";else if(k instanceof Error)throw k;var R=new e({actual:F,expected:!0,message:k,operator:"==",stackStartFn:C});throw R.generatedMessage=T,R}}function $(){for(var C=arguments.length,D=new Array(C),F=0;F<C;F++)D[F]=arguments[F];L.apply(void 0,[$,D.length].concat(D))}w.ok=$,w.equal=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");D!=F&&j({actual:D,expected:F,message:k,operator:"==",stackStartFn:C})},w.notEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");D==F&&j({actual:D,expected:F,message:k,operator:"!=",stackStartFn:C})},w.deepEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");A===void 0&&N(),A(D,F)||j({actual:D,expected:F,message:k,operator:"deepEqual",stackStartFn:C})},w.notDeepEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");A===void 0&&N(),A(D,F)&&j({actual:D,expected:F,message:k,operator:"notDeepEqual",stackStartFn:C})},w.deepStrictEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");A===void 0&&N(),E(D,F)||j({actual:D,expected:F,message:k,operator:"deepStrictEqual",stackStartFn:C})},w.notDeepStrictEqual=Q;function Q(C,D,F){if(arguments.length<2)throw new i("actual","expected");A===void 0&&N(),E(C,D)&&j({actual:C,expected:D,message:F,operator:"notDeepStrictEqual",stackStartFn:Q})}w.strictEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");g(D,F)||j({actual:D,expected:F,message:k,operator:"strictEqual",stackStartFn:C})},w.notStrictEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");g(D,F)&&j({actual:D,expected:F,message:k,operator:"notStrictEqual",stackStartFn:C})};var ee=d(function C(D,F,k){var T=this;y(this,C),F.forEach(function(R){R in D&&(k!==void 0&&typeof k[R]=="string"&&v(D[R])&&_(D[R],k[R])?T[R]=k[R]:T[R]=D[R])})});function I(C,D,F,k,T,R){if(!(F in C)||!E(C[F],D[F])){if(!k){var q=new ee(C,T),H=new ee(D,T,C),J=new e({actual:q,expected:H,operator:"deepStrictEqual",stackStartFn:R});throw J.actual=C,J.expected=D,J.operator=R.name,J}j({actual:C,expected:D,message:k,operator:R.name,stackStartFn:R})}}function X(C,D,F,k){if(typeof D!="function"){if(v(D))return _(D,C);if(arguments.length===2)throw new r("expected",["Function","RegExp"],D);if(a(C)!=="object"||C===null){var T=new e({actual:C,expected:D,message:F,operator:"deepStrictEqual",stackStartFn:k});throw T.operator=k.name,T}var R=Object.keys(D);if(D instanceof Error)R.push("name","message");else if(R.length===0)throw new o("error",D,"may not be an empty object");return A===void 0&&N(),R.forEach(function(q){typeof C[q]=="string"&&v(D[q])&&_(D[q],C[q])||I(C,D,q,F,R,k)}),!0}return D.prototype!==void 0&&C instanceof D?!0:Error.isPrototypeOf(D)?!1:D.call({},C)===!0}function ie(C){if(typeof C!="function")throw new r("fn","Function",C);try{C()}catch(D){return D}return P}function ce(C){return p(C)||C!==null&&a(C)==="object"&&typeof C.then=="function"&&typeof C.catch=="function"}function oe(C){return Promise.resolve().then(function(){var D;if(typeof C=="function"){if(D=C(),!ce(D))throw new t("instance of Promise","promiseFn",D)}else if(ce(C))D=C;else throw new r("promiseFn",["Function","Promise"],C);return Promise.resolve().then(function(){return D}).then(function(){return P}).catch(function(F){return F})})}function te(C,D,F,k){if(typeof F=="string"){if(arguments.length===4)throw new r("error",["Object","Error","Function","RegExp"],F);if(a(D)==="object"&&D!==null){if(D.message===F)throw new u("error/message",'The error message "'.concat(D.message,'" is identical to the message.'))}else if(D===F)throw new u("error/message",'The error "'.concat(D,'" is identical to the message.'));k=F,F=void 0}else if(F!=null&&a(F)!=="object"&&typeof F!="function")throw new r("error",["Object","Error","Function","RegExp"],F);if(D===P){var T="";F&&F.name&&(T+=" (".concat(F.name,")")),T+=k?": ".concat(k):".";var R=C.name==="rejects"?"rejection":"exception";j({actual:void 0,expected:F,operator:C.name,message:"Missing expected ".concat(R).concat(T),stackStartFn:C})}if(F&&!X(D,F,k,C))throw D}function B(C,D,F,k){if(D!==P){if(typeof F=="string"&&(k=F,F=void 0),!F||X(D,F)){var T=k?": ".concat(k):".",R=C.name==="doesNotReject"?"rejection":"exception";j({actual:D,expected:F,operator:C.name,message:"Got unwanted ".concat(R).concat(T,`
86
+ */function oe(Y,re){if(Y===re)return 0;for(var xe=Y.length,ge=re.length,_e=0,be=Math.min(xe,ge);_e<be;++_e)if(Y[_e]!==re[_e]){xe=Y[_e],ge=re[_e];break}return xe<ge?-1:ge<xe?1:0}var te=!0,B=!1,G=0,O=1,C=2,D=3;function F(Y,re){return o?Y.source===re.source&&Y.flags===re.flags:RegExp.prototype.toString.call(Y)===RegExp.prototype.toString.call(re)}function k(Y,re){if(Y.byteLength!==re.byteLength)return!1;for(var xe=0;xe<Y.byteLength;xe++)if(Y[xe]!==re[xe])return!1;return!0}function T(Y,re){return Y.byteLength!==re.byteLength?!1:oe(new Uint8Array(Y.buffer,Y.byteOffset,Y.byteLength),new Uint8Array(re.buffer,re.byteOffset,re.byteLength))===0}function R(Y,re){return Y.byteLength===re.byteLength&&oe(new Uint8Array(Y),new Uint8Array(re))===0}function q(Y,re){return W(Y)?W(re)&&e(Number.prototype.valueOf.call(Y),Number.prototype.valueOf.call(re)):L(Y)?L(re)&&String.prototype.valueOf.call(Y)===String.prototype.valueOf.call(re):$(Y)?$(re)&&Boolean.prototype.valueOf.call(Y)===Boolean.prototype.valueOf.call(re):Q(Y)?Q(re)&&BigInt.prototype.valueOf.call(Y)===BigInt.prototype.valueOf.call(re):ee(re)&&Symbol.prototype.valueOf.call(Y)===Symbol.prototype.valueOf.call(re)}function H(Y,re,xe,ge){if(Y===re)return Y!==0?!0:xe?e(Y,re):!0;if(xe){if(r(Y)!=="object")return typeof Y=="number"&&l(Y)&&l(re);if(r(re)!=="object"||Y===null||re===null||Object.getPrototypeOf(Y)!==Object.getPrototypeOf(re))return!1}else{if(Y===null||r(Y)!=="object")return re===null||r(re)!=="object"?Y==re:!1;if(re===null||r(re)!=="object")return!1}var _e=x(Y),be=x(re);if(_e!==be)return!1;if(Array.isArray(Y)){if(Y.length!==re.length)return!1;var Te=ce(Y),De=ce(re);return Te.length!==De.length?!1:M(Y,re,xe,ge,O,Te)}if(_e==="[object Object]"&&(!N(Y)&&N(re)||!w(Y)&&w(re)))return!1;if(E(Y)){if(!E(re)||Date.prototype.getTime.call(Y)!==Date.prototype.getTime.call(re))return!1}else if(b(Y)){if(!b(re)||!F(Y,re))return!1}else if(P(Y)||Y instanceof Error){if(Y.message!==re.message||Y.name!==re.name)return!1}else if(A(Y)){if(!xe&&(I(Y)||X(Y))){if(!k(Y,re))return!1}else if(!T(Y,re))return!1;var Pe=ce(Y),Le=ce(re);return Pe.length!==Le.length?!1:M(Y,re,xe,ge,G,Pe)}else{if(w(Y))return!w(re)||Y.size!==re.size?!1:M(Y,re,xe,ge,C);if(N(Y))return!N(re)||Y.size!==re.size?!1:M(Y,re,xe,ge,D);if(_(Y)){if(!R(Y,re))return!1}else if(j(Y)&&!q(Y,re))return!1}return M(Y,re,xe,ge,G)}function J(Y,re){return re.filter(function(xe){return v(Y,xe)})}function M(Y,re,xe,ge,_e,be){if(arguments.length===5){be=Object.keys(Y);var Te=Object.keys(re);if(be.length!==Te.length)return!1}for(var De=0;De<be.length;De++)if(!p(re,be[De]))return!1;if(xe&&arguments.length===5){var Pe=s(Y);if(Pe.length!==0){var Le=0;for(De=0;De<Pe.length;De++){var ue=Pe[De];if(v(Y,ue)){if(!v(re,ue))return!1;be.push(ue),Le++}else if(v(re,ue))return!1}var ve=s(re);if(Pe.length!==ve.length&&J(re,ve).length!==Le)return!1}else{var Ee=s(re);if(Ee.length!==0&&J(re,Ee).length!==0)return!1}}if(be.length===0&&(_e===G||_e===O&&Y.length===0||Y.size===0))return!0;if(ge===void 0)ge={val1:new Map,val2:new Map,position:0};else{var z=ge.val1.get(Y);if(z!==void 0){var f=ge.val2.get(re);if(f!==void 0)return z===f}ge.position++}ge.val1.set(Y,ge.position),ge.val2.set(re,ge.position);var S=de(Y,re,xe,be,ge,_e);return ge.val1.delete(Y),ge.val2.delete(re),S}function V(Y,re,xe,ge){for(var _e=t(Y),be=0;be<_e.length;be++){var Te=_e[be];if(H(re,Te,xe,ge))return Y.delete(Te),!0}return!1}function Z(Y){switch(r(Y)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":Y=+Y;case"number":if(l(Y))return!1}return!0}function se(Y,re,xe){var ge=Z(xe);return ge??(re.has(ge)&&!Y.has(ge))}function fe(Y,re,xe,ge,_e){var be=Z(xe);if(be!=null)return be;var Te=re.get(be);return Te===void 0&&!re.has(be)||!H(ge,Te,!1,_e)?!1:!Y.has(be)&&H(ge,Te,!1,_e)}function he(Y,re,xe,ge){for(var _e=null,be=t(Y),Te=0;Te<be.length;Te++){var De=be[Te];if(r(De)==="object"&&De!==null)_e===null&&(_e=new Set),_e.add(De);else if(!re.has(De)){if(xe||!se(Y,re,De))return!1;_e===null&&(_e=new Set),_e.add(De)}}if(_e!==null){for(var Pe=t(re),Le=0;Le<Pe.length;Le++){var ue=Pe[Le];if(r(ue)==="object"&&ue!==null){if(!V(_e,ue,xe,ge))return!1}else if(!xe&&!Y.has(ue)&&!V(_e,ue,xe,ge))return!1}return _e.size===0}return!0}function K(Y,re,xe,ge,_e,be){for(var Te=t(Y),De=0;De<Te.length;De++){var Pe=Te[De];if(H(xe,Pe,_e,be)&&H(ge,re.get(Pe),_e,be))return Y.delete(Pe),!0}return!1}function ae(Y,re,xe,ge){for(var _e=null,be=i(Y),Te=0;Te<be.length;Te++){var De=a(be[Te],2),Pe=De[0],Le=De[1];if(r(Pe)==="object"&&Pe!==null)_e===null&&(_e=new Set),_e.add(Pe);else{var ue=re.get(Pe);if(ue===void 0&&!re.has(Pe)||!H(Le,ue,xe,ge)){if(xe||!fe(Y,re,Pe,Le,ge))return!1;_e===null&&(_e=new Set),_e.add(Pe)}}}if(_e!==null){for(var ve=i(re),Ee=0;Ee<ve.length;Ee++){var z=a(ve[Ee],2),f=z[0],S=z[1];if(r(f)==="object"&&f!==null){if(!K(_e,Y,f,S,xe,ge))return!1}else if(!xe&&(!Y.has(f)||!H(Y.get(f),S,!1,ge))&&!K(_e,Y,f,S,!1,ge))return!1}return _e.size===0}return!0}function de(Y,re,xe,ge,_e,be){var Te=0;if(be===C){if(!he(Y,re,xe,_e))return!1}else if(be===D){if(!ae(Y,re,xe,_e))return!1}else if(be===O)for(;Te<Y.length;Te++)if(p(Y,Te)){if(!p(re,Te)||!H(Y[Te],re[Te],xe,_e))return!1}else{if(p(re,Te))return!1;for(var De=Object.keys(Y);Te<De.length;Te++){var Pe=De[Te];if(!p(re,Pe)||!H(Y[Pe],re[Pe],xe,_e))return!1}return De.length===Object.keys(re).length}for(Te=0;Te<ge.length;Te++){var Le=ge[Te];if(!H(Y[Le],re[Le],xe,_e))return!1}return!0}function Ce(Y,re){return H(Y,re,B)}function Re(Y,re){return H(Y,re,te)}return ks={isDeepEqual:Ce,isDeepStrictEqual:Re},ks}var fl;function Ue(){if(fl)return _o.exports;fl=1;function a(C){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},a(C)}function d(C,D,F){return Object.defineProperty(C,"prototype",{writable:!1}),C}function y(C,D){if(!(C instanceof D))throw new TypeError("Cannot call a class as a function")}var m=V0(),h=m.codes,u=h.ERR_AMBIGUOUS_ARGUMENT,r=h.ERR_INVALID_ARG_TYPE,o=h.ERR_INVALID_ARG_VALUE,t=h.ERR_INVALID_RETURN_VALUE,i=h.ERR_MISSING_ARGS,e=_h(),s=Vn(),l=s.inspect,c=Vn().types,p=c.isPromise,v=c.isRegExp,x=Eh()(),g=Aa()(),_=Sh()("RegExp.prototype.test"),A,E;function N(){var C=Oh();A=C.isDeepEqual,E=C.isDeepStrictEqual}var b=!1,w=_o.exports=$,P={};function j(C){throw C.message instanceof Error?C.message:new e(C)}function W(C,D,F,k,T){var R=arguments.length,q;if(R===0)q="Failed";else if(R===1)F=C,C=void 0;else{if(b===!1){b=!0;var H=process.emitWarning?process.emitWarning:console.warn.bind(console);H("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}R===2&&(k="!=")}if(F instanceof Error)throw F;var J={actual:C,expected:D,operator:k===void 0?"fail":k,stackStartFn:T||W};F!==void 0&&(J.message=F);var M=new e(J);throw q&&(M.message=q,M.generatedMessage=!0),M}w.fail=W,w.AssertionError=e;function L(C,D,F,k){if(!F){var T=!1;if(D===0)T=!0,k="No value argument passed to `assert.ok()`";else if(k instanceof Error)throw k;var R=new e({actual:F,expected:!0,message:k,operator:"==",stackStartFn:C});throw R.generatedMessage=T,R}}function $(){for(var C=arguments.length,D=new Array(C),F=0;F<C;F++)D[F]=arguments[F];L.apply(void 0,[$,D.length].concat(D))}w.ok=$,w.equal=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");D!=F&&j({actual:D,expected:F,message:k,operator:"==",stackStartFn:C})},w.notEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");D==F&&j({actual:D,expected:F,message:k,operator:"!=",stackStartFn:C})},w.deepEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");A===void 0&&N(),A(D,F)||j({actual:D,expected:F,message:k,operator:"deepEqual",stackStartFn:C})},w.notDeepEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");A===void 0&&N(),A(D,F)&&j({actual:D,expected:F,message:k,operator:"notDeepEqual",stackStartFn:C})},w.deepStrictEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");A===void 0&&N(),E(D,F)||j({actual:D,expected:F,message:k,operator:"deepStrictEqual",stackStartFn:C})},w.notDeepStrictEqual=Q;function Q(C,D,F){if(arguments.length<2)throw new i("actual","expected");A===void 0&&N(),E(C,D)&&j({actual:C,expected:D,message:F,operator:"notDeepStrictEqual",stackStartFn:Q})}w.strictEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");g(D,F)||j({actual:D,expected:F,message:k,operator:"strictEqual",stackStartFn:C})},w.notStrictEqual=function C(D,F,k){if(arguments.length<2)throw new i("actual","expected");g(D,F)&&j({actual:D,expected:F,message:k,operator:"notStrictEqual",stackStartFn:C})};var ee=d(function C(D,F,k){var T=this;y(this,C),F.forEach(function(R){R in D&&(k!==void 0&&typeof k[R]=="string"&&v(D[R])&&_(D[R],k[R])?T[R]=k[R]:T[R]=D[R])})});function I(C,D,F,k,T,R){if(!(F in C)||!E(C[F],D[F])){if(!k){var q=new ee(C,T),H=new ee(D,T,C),J=new e({actual:q,expected:H,operator:"deepStrictEqual",stackStartFn:R});throw J.actual=C,J.expected=D,J.operator=R.name,J}j({actual:C,expected:D,message:k,operator:R.name,stackStartFn:R})}}function X(C,D,F,k){if(typeof D!="function"){if(v(D))return _(D,C);if(arguments.length===2)throw new r("expected",["Function","RegExp"],D);if(a(C)!=="object"||C===null){var T=new e({actual:C,expected:D,message:F,operator:"deepStrictEqual",stackStartFn:k});throw T.operator=k.name,T}var R=Object.keys(D);if(D instanceof Error)R.push("name","message");else if(R.length===0)throw new o("error",D,"may not be an empty object");return A===void 0&&N(),R.forEach(function(q){typeof C[q]=="string"&&v(D[q])&&_(D[q],C[q])||I(C,D,q,F,R,k)}),!0}return D.prototype!==void 0&&C instanceof D?!0:Error.isPrototypeOf(D)?!1:D.call({},C)===!0}function ie(C){if(typeof C!="function")throw new r("fn","Function",C);try{C()}catch(D){return D}return P}function ce(C){return p(C)||C!==null&&a(C)==="object"&&typeof C.then=="function"&&typeof C.catch=="function"}function oe(C){return Promise.resolve().then(function(){var D;if(typeof C=="function"){if(D=C(),!ce(D))throw new t("instance of Promise","promiseFn",D)}else if(ce(C))D=C;else throw new r("promiseFn",["Function","Promise"],C);return Promise.resolve().then(function(){return D}).then(function(){return P}).catch(function(F){return F})})}function te(C,D,F,k){if(typeof F=="string"){if(arguments.length===4)throw new r("error",["Object","Error","Function","RegExp"],F);if(a(D)==="object"&&D!==null){if(D.message===F)throw new u("error/message",'The error message "'.concat(D.message,'" is identical to the message.'))}else if(D===F)throw new u("error/message",'The error "'.concat(D,'" is identical to the message.'));k=F,F=void 0}else if(F!=null&&a(F)!=="object"&&typeof F!="function")throw new r("error",["Object","Error","Function","RegExp"],F);if(D===P){var T="";F&&F.name&&(T+=" (".concat(F.name,")")),T+=k?": ".concat(k):".";var R=C.name==="rejects"?"rejection":"exception";j({actual:void 0,expected:F,operator:C.name,message:"Missing expected ".concat(R).concat(T),stackStartFn:C})}if(F&&!X(D,F,k,C))throw D}function B(C,D,F,k){if(D!==P){if(typeof F=="string"&&(k=F,F=void 0),!F||X(D,F)){var T=k?": ".concat(k):".",R=C.name==="doesNotReject"?"rejection":"exception";j({actual:D,expected:F,operator:C.name,message:"Got unwanted ".concat(R).concat(T,`
93
87
  `)+'Actual message: "'.concat(D&&D.message,'"'),stackStartFn:C})}throw D}}w.throws=function C(D){for(var F=arguments.length,k=new Array(F>1?F-1:0),T=1;T<F;T++)k[T-1]=arguments[T];te.apply(void 0,[C,ie(D)].concat(k))},w.rejects=function C(D){for(var F=arguments.length,k=new Array(F>1?F-1:0),T=1;T<F;T++)k[T-1]=arguments[T];return oe(D).then(function(R){return te.apply(void 0,[C,R].concat(k))})},w.doesNotThrow=function C(D){for(var F=arguments.length,k=new Array(F>1?F-1:0),T=1;T<F;T++)k[T-1]=arguments[T];B.apply(void 0,[C,ie(D)].concat(k))},w.doesNotReject=function C(D){for(var F=arguments.length,k=new Array(F>1?F-1:0),T=1;T<F;T++)k[T-1]=arguments[T];return oe(D).then(function(R){return B.apply(void 0,[C,R].concat(k))})},w.ifError=function C(D){if(D!=null){var F="ifError got unwanted exception: ";a(D)==="object"&&typeof D.message=="string"?D.message.length===0&&D.constructor?F+=D.constructor.name:F+=D.message:F+=l(D);var k=new e({actual:D,expected:null,operator:"ifError",message:F,stackStartFn:C}),T=D.stack;if(typeof T=="string"){var R=T.split(`
94
88
  `);R.shift();for(var q=k.stack.split(`
95
89
  `),H=0;H<R.length;H++){var J=q.indexOf(R[H]);if(J!==-1){q=q.slice(0,J);break}}k.stack="".concat(q.join(`
@@ -98,418 +92,424 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
98
92
  `))}throw k}};function G(C,D,F,k,T){if(!v(D))throw new r("regexp","RegExp",D);var R=T==="match";if(typeof C!="string"||_(D,C)!==R){if(F instanceof Error)throw F;var q=!F;F=F||(typeof C!="string"?'The "string" argument must be of type string. Received type '+"".concat(a(C)," (").concat(l(C),")"):(R?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(l(D),`. Input:
99
93
 
100
94
  `).concat(l(C),`
101
- `));var H=new e({actual:C,expected:D,message:F,operator:T,stackStartFn:k});throw H.generatedMessage=q,H}}w.match=function C(D,F,k){G(D,F,k,C,"match")},w.doesNotMatch=function C(D,F,k){G(D,F,k,C,"doesNotMatch")};function O(){for(var C=arguments.length,D=new Array(C),F=0;F<C;F++)D[F]=arguments[F];L.apply(void 0,[O,D.length].concat(D))}return w.strict=x(O,w,{equal:w.strictEqual,deepEqual:w.deepStrictEqual,notEqual:w.notStrictEqual,notDeepEqual:w.notDeepStrictEqual}),w.strict.strict=w.strict,vo.exports}var xl;function Rh(){if(xl)return Rr;xl=1;/*!
95
+ `));var H=new e({actual:C,expected:D,message:F,operator:T,stackStartFn:k});throw H.generatedMessage=q,H}}w.match=function C(D,F,k){G(D,F,k,C,"match")},w.doesNotMatch=function C(D,F,k){G(D,F,k,C,"doesNotMatch")};function O(){for(var C=arguments.length,D=new Array(C),F=0;F<C;F++)D[F]=arguments[F];L.apply(void 0,[O,D.length].concat(D))}return w.strict=x(O,w,{equal:w.strictEqual,deepEqual:w.deepStrictEqual,notEqual:w.notStrictEqual,notDeepEqual:w.notDeepStrictEqual}),w.strict.strict=w.strict,_o.exports}var Rr={},Ms={},pl;function ke(){return pl||(pl=1,(function(a){/*!
102
96
  * Copyright 2016 The ANTLR Project. All rights reserved.
103
97
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
104
- */var a=Rr&&Rr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.ANTLRInputStream=void 0;const d=Ue(),y=pe(),m=gr();let h=class{constructor(r){this.p=0,this.data=r,this.n=r.length}reset(){this.p=0}consume(){if(this.p>=this.n)throw d(this.LA(1)===m.IntStream.EOF),new Error("cannot consume EOF");this.p<this.n&&this.p++}LA(r){return r===0?0:r<0&&(r++,this.p+r-1<0)||this.p+r-1>=this.n?m.IntStream.EOF:this.data.charCodeAt(this.p+r-1)}LT(r){return this.LA(r)}get index(){return this.p}get size(){return this.n}mark(){return-1}release(r){}seek(r){if(r<=this.p){this.p=r;return}for(r=Math.min(r,this.n);this.p<r;)this.consume()}getText(r){let o=r.a,t=r.b;t>=this.n&&(t=this.n-1);let i=t-o+1;return o>=this.n?"":this.data.substr(o,i)}get sourceName(){return this.name?this.name:m.IntStream.UNKNOWN_SOURCE_NAME}toString(){return this.data}};return a([y.Override],h.prototype,"consume",null),a([y.Override],h.prototype,"LA",null),a([y.Override],h.prototype,"index",null),a([y.Override],h.prototype,"size",null),a([y.Override],h.prototype,"mark",null),a([y.Override],h.prototype,"release",null),a([y.Override],h.prototype,"seek",null),a([y.Override],h.prototype,"getText",null),a([y.Override],h.prototype,"sourceName",null),a([y.Override],h.prototype,"toString",null),Rr.ANTLRInputStream=h,Rr}var Pr={},ct={},Jn={},dl;function dr(){return dl||(dl=1,(function(a){/*!
98
+ */Object.defineProperty(a,"__esModule",{value:!0}),a.MurmurHash=void 0,(function(d){function m(t=0){return t}d.initialize=m;function h(t,i){i==null?i=0:typeof i=="string"?i=o(i):typeof i=="object"&&(i=i.hashCode());let x=i;return x=Math.imul(x,3432918353),x=x<<15|x>>>17,x=Math.imul(x,461845907),t=t^x,t=t<<13|t>>>19,t=Math.imul(t,5)+3864292196,t&4294967295}d.update=h;function u(t,i){return t=t^i*4,t=t^t>>>16,t=Math.imul(t,2246822507),t=t^t>>>13,t=Math.imul(t,3266489909),t=t^t>>>16,t}d.finish=u;function r(t,i=0){let e=m(i),s=0;for(let l of t)e=h(e,l),s++;return e=u(e,s),e}d.hashCode=r;function o(t){let i=t.length;if(i===0)return 0;let e=0;for(let s=0;s<i;s++){let l=t.charCodeAt(s);e=(e<<5>>>0)-e+l,e|=0}return e}})(a.MurmurHash||(a.MurmurHash={}))})(Ms)),Ms}var Pr={},hl;function at(){if(hl)return Pr;hl=1;/*!
105
99
  * Copyright 2016 The ANTLR Project. All rights reserved.
106
100
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
107
- */var d=Jn&&Jn.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(a,"__esModule",{value:!0}),a.ATNState=void 0;const y=pe();let m=class ia{constructor(){this.stateNumber=ia.INVALID_STATE_NUMBER,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.optimizedTransitions=this.transitions}getStateNumber(){return this.stateNumber}get nonStopStateNumber(){return this.getStateNumber()}hashCode(){return this.stateNumber}equals(u){return u instanceof ia?this.stateNumber===u.stateNumber:!1}get isNonGreedyExitState(){return!1}toString(){return String(this.stateNumber)}getTransitions(){return this.transitions.slice(0)}get numberOfTransitions(){return this.transitions.length}addTransition(u,r){if(this.transitions.length===0)this.epsilonOnlyTransitions=u.isEpsilon;else if(this.epsilonOnlyTransitions!==u.isEpsilon)throw this.epsilonOnlyTransitions=!1,new Error("ATN state "+this.stateNumber+" has both epsilon and non-epsilon transitions.");this.transitions.splice(r!==void 0?r:this.transitions.length,0,u)}transition(u){return this.transitions[u]}setTransition(u,r){this.transitions[u]=r}removeTransition(u){return this.transitions.splice(u,1)[0]}get onlyHasEpsilonTransitions(){return this.epsilonOnlyTransitions}setRuleIndex(u){this.ruleIndex=u}get isOptimized(){return this.optimizedTransitions!==this.transitions}get numberOfOptimizedTransitions(){return this.optimizedTransitions.length}getOptimizedTransition(u){return this.optimizedTransitions[u]}addOptimizedTransition(u){this.isOptimized||(this.optimizedTransitions=new Array),this.optimizedTransitions.push(u)}setOptimizedTransition(u,r){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions[u]=r}removeOptimizedTransition(u){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions.splice(u,1)}};d([y.Override],m.prototype,"hashCode",null),d([y.Override],m.prototype,"equals",null),d([y.Override],m.prototype,"toString",null),a.ATNState=m,(function(h){h.INVALID_STATE_NUMBER=-1})(m=a.ATNState||(a.ATNState={}))})(Jn)),Jn}var js={},ml;function qe(){return ml||(ml=1,(function(a){/*!
101
+ */var a=Pr&&Pr.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.ObjectEqualityComparator=void 0;const d=pe();let y=class{hashCode(h){return h==null?0:h.hashCode()}equals(h,u){return h==null?u==null:h.equals(u)}};return y.INSTANCE=new y,a([d.Override],y.prototype,"hashCode",null),a([d.Override],y.prototype,"equals",null),Pr.ObjectEqualityComparator=y,Pr}var xl;function Dh(){if(xl)return Rr;xl=1;/*!
108
102
  * Copyright 2016 The ANTLR Project. All rights reserved.
109
103
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
110
- */Object.defineProperty(a,"__esModule",{value:!0}),a.ATNStateType=void 0,(function(d){d[d.INVALID_TYPE=0]="INVALID_TYPE",d[d.BASIC=1]="BASIC",d[d.RULE_START=2]="RULE_START",d[d.BLOCK_START=3]="BLOCK_START",d[d.PLUS_BLOCK_START=4]="PLUS_BLOCK_START",d[d.STAR_BLOCK_START=5]="STAR_BLOCK_START",d[d.TOKEN_START=6]="TOKEN_START",d[d.RULE_STOP=7]="RULE_STOP",d[d.BLOCK_END=8]="BLOCK_END",d[d.STAR_LOOP_BACK=9]="STAR_LOOP_BACK",d[d.STAR_LOOP_ENTRY=10]="STAR_LOOP_ENTRY",d[d.PLUS_LOOP_BACK=11]="PLUS_LOOP_BACK",d[d.LOOP_END=12]="LOOP_END"})(a.ATNStateType||(a.ATNStateType={}))})(js)),js}var ft={},Zn={},yl;function Ar(){if(yl)return Zn;yl=1;/*!
104
+ */var a=Rr&&Rr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.DefaultEqualityComparator=void 0;const d=pe(),y=ke(),m=at();let h=class{hashCode(r){return r==null?0:typeof r=="string"||typeof r=="number"?y.MurmurHash.hashCode([r]):m.ObjectEqualityComparator.INSTANCE.hashCode(r)}equals(r,o){return r==null?o==null:typeof r=="string"||typeof r=="number"?r===o:m.ObjectEqualityComparator.INSTANCE.equals(r,o)}};return h.INSTANCE=new h,a([d.Override],h.prototype,"hashCode",null),a([d.Override],h.prototype,"equals",null),Rr.DefaultEqualityComparator=h,Rr}var dl;function Ar(){if(dl)return ct;dl=1;/*!
111
105
  * Copyright 2016 The ANTLR Project. All rights reserved.
112
106
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
113
- */Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.RecognitionException=void 0;let a=class extends Error{constructor(y,m,h,u){super(u),this._offendingState=-1,this._recognizer=y,this.input=m,this.ctx=h,y&&(this._offendingState=y.state)}get offendingState(){return this._offendingState}setOffendingState(y){this._offendingState=y}get expectedTokens(){if(this._recognizer)return this._recognizer.atn.getExpectedTokens(this._offendingState,this.ctx)}get context(){return this.ctx}get inputStream(){return this.input}getOffendingToken(y){if(!(y&&y!==this._recognizer))return this.offendingToken}setOffendingToken(y,m){y===this._recognizer&&(this.offendingToken=m)}get recognizer(){return this._recognizer}};return Zn.RecognitionException=a,Zn}var pt={},ei={},ht={},gl;function vr(){if(gl)return ht;gl=1;/*!
107
+ */var a=ct&&ct.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p},d=ct&&ct.__param||function(i,e){return function(s,l){e(s,l,i)}};Object.defineProperty(ct,"__esModule",{value:!0}),ct.Array2DHashSet=void 0;const y=Ue(),m=Dh(),h=pe(),u=ke(),r=16,o=.75;let t=class Gi{constructor(e,s=r){if(this.n=0,this.threshold=Math.floor(r*o),e instanceof Gi){this.comparator=e.comparator,this.buckets=e.buckets.slice(0);for(let l=0;l<this.buckets.length;l++){let c=this.buckets[l];c&&(this.buckets[l]=c.slice(0))}this.n=e.n,this.threshold=e.threshold}else this.comparator=e||m.DefaultEqualityComparator.INSTANCE,this.buckets=this.createBuckets(s)}getOrAdd(e){return this.n>this.threshold&&this.expand(),this.getOrAddImpl(e)}getOrAddImpl(e){let s=this.getBucket(e),l=this.buckets[s];if(!l)return l=[e],this.buckets[s]=l,this.n++,e;for(let c of l)if(this.comparator.equals(c,e))return c;return l.push(e),this.n++,e}get(e){if(e==null)return e;let s=this.getBucket(e),l=this.buckets[s];if(l){for(let c of l)if(this.comparator.equals(c,e))return c}}getBucket(e){return this.comparator.hashCode(e)&this.buckets.length-1}hashCode(){let e=u.MurmurHash.initialize();for(let s of this.buckets)if(s!=null)for(let l of s){if(l==null)break;e=u.MurmurHash.update(e,this.comparator.hashCode(l))}return e=u.MurmurHash.finish(e,this.size),e}equals(e){return e===this?!0:!(e instanceof Gi)||e.size!==this.size?!1:this.containsAll(e)}expand(){let e=this.buckets,s=this.buckets.length*2,l=this.createBuckets(s);this.buckets=l,this.threshold=Math.floor(s*o);let c=this.size;for(let p of e)if(p)for(let v of p){let x=this.getBucket(v),g=this.buckets[x];g||(g=[],this.buckets[x]=g),g.push(v)}y(this.n===c)}add(e){return this.getOrAdd(e)===e}get size(){return this.n}get isEmpty(){return this.n===0}contains(e){return this.containsFast(this.asElementType(e))}containsFast(e){return e==null?!1:this.get(e)!=null}*[Symbol.iterator](){yield*this.toArray()}toArray(){const e=new Array(this.size);let s=0;for(let l of this.buckets)if(l!=null)for(let c of l){if(c==null)break;e[s++]=c}return e}containsAll(e){if(e instanceof Gi){let s=e;for(let l of s.buckets)if(l!=null)for(let c of l){if(c==null)break;if(!this.containsFast(this.asElementType(c)))return!1}}else for(let s of e)if(!this.containsFast(this.asElementType(s)))return!1;return!0}addAll(e){let s=!1;for(let l of e)this.getOrAdd(l)!==l&&(s=!0);return s}clear(){this.buckets=this.createBuckets(r),this.n=0,this.threshold=Math.floor(r*o)}toString(){if(this.size===0)return"{}";let e="{",s=!0;for(let l of this.buckets)if(l!=null)for(let c of l){if(c==null)break;s?s=!1:e+=", ",e+=c.toString()}return e+="}",e}toTableString(){let e="";for(let s of this.buckets){if(s==null){e+=`null
108
+ `;continue}e+="[";let l=!0;for(let c of s)l?l=!1:e+=" ",c==null?e+="_":e+=c.toString();e+=`]
109
+ `}return e}asElementType(e){return e}createBuckets(e){return new Array(e)}};return a([h.NotNull],t.prototype,"comparator",void 0),a([h.Override],t.prototype,"hashCode",null),a([h.Override],t.prototype,"equals",null),a([h.Override],t.prototype,"add",null),a([h.Override],t.prototype,"size",null),a([h.Override],t.prototype,"isEmpty",null),a([h.Override],t.prototype,"contains",null),a([d(0,h.Nullable)],t.prototype,"containsFast",null),a([h.Override],t.prototype,Symbol.iterator,null),a([h.Override],t.prototype,"toArray",null),a([h.Override],t.prototype,"containsAll",null),a([h.Override],t.prototype,"addAll",null),a([h.Override],t.prototype,"clear",null),a([h.Override],t.prototype,"toString",null),a([h.SuppressWarnings("unchecked")],t.prototype,"asElementType",null),a([h.SuppressWarnings("unchecked")],t.prototype,"createBuckets",null),ct.Array2DHashSet=t,ct}var ml;function Gn(){if(ml)return Jn;ml=1;/*!
114
110
  * Copyright 2016 The ANTLR Project. All rights reserved.
115
111
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
116
- */var a=ht&&ht.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=ht&&ht.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(ht,"__esModule",{value:!0}),ht.Transition=void 0;const y=pe();let m=class{constructor(u){if(u==null)throw new Error("target cannot be null.");this.target=u}get isEpsilon(){return!1}get label(){}};return m.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],a([y.NotNull],m.prototype,"target",void 0),m=a([d(0,y.NotNull)],m),ht.Transition=m,ht}var _l;function va(){if(_l)return ei;_l=1;/*!
112
+ */Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.Array2DHashMap=void 0;const a=Ar();class d{constructor(h){this.keyComparator=h}hashCode(h){return this.keyComparator.hashCode(h.key)}equals(h,u){return this.keyComparator.equals(h.key,u.key)}}let y=class ia{constructor(h){h instanceof ia?this.backingStore=new a.Array2DHashSet(h.backingStore):this.backingStore=new a.Array2DHashSet(new d(h))}clear(){this.backingStore.clear()}containsKey(h){return this.backingStore.contains({key:h})}get(h){let u=this.backingStore.get({key:h});if(u)return u.value}get isEmpty(){return this.backingStore.isEmpty}put(h,u){let r=this.backingStore.get({key:h,value:u}),o;return r?(o=r.value,r.value=u):this.backingStore.add({key:h,value:u}),o}putIfAbsent(h,u){let r=this.backingStore.get({key:h,value:u}),o;return r?o=r.value:this.backingStore.add({key:h,value:u}),o}get size(){return this.backingStore.size}hashCode(){return this.backingStore.hashCode()}equals(h){return h instanceof ia?this.backingStore.equals(h.backingStore):!1}};return Jn.Array2DHashMap=y,Jn}var ft={},Fr={},Ir={},yl;function no(){if(yl)return Ir;yl=1;/*!
117
113
  * Copyright 2016 The ANTLR Project. All rights reserved.
118
114
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
119
- */Object.defineProperty(ei,"__esModule",{value:!0}),ei.AbstractPredicateTransition=void 0;const a=vr();let d=class extends a.Transition{constructor(m){super(m)}};return ei.AbstractPredicateTransition=d,ei}var Fr={},xt={},Ir={},$s={},Al;function ke(){return Al||(Al=1,(function(a){/*!
115
+ */var a=Ir&&Ir.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.ArrayEqualityComparator=void 0;const d=pe(),y=ke(),m=at();let h=class{hashCode(r){return r==null?0:y.MurmurHash.hashCode(r,0)}equals(r,o){if(r==null)return o==null;if(o==null||r.length!==o.length)return!1;for(let t=0;t<r.length;t++)if(!m.ObjectEqualityComparator.INSTANCE.equals(r[t],o[t]))return!1;return!0}};return h.INSTANCE=new h,a([d.Override],h.prototype,"hashCode",null),a([d.Override],h.prototype,"equals",null),Ir.ArrayEqualityComparator=h,Ir}var pt={},Zn={},ei={},gl;function dr(){return gl||(gl=1,(function(a){/*!
120
116
  * Copyright 2016 The ANTLR Project. All rights reserved.
121
117
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
122
- */Object.defineProperty(a,"__esModule",{value:!0}),a.MurmurHash=void 0,(function(d){function m(t=0){return t}d.initialize=m;function h(t,i){i==null?i=0:typeof i=="string"?i=o(i):typeof i=="object"&&(i=i.hashCode());let x=i;return x=Math.imul(x,3432918353),x=x<<15|x>>>17,x=Math.imul(x,461845907),t=t^x,t=t<<13|t>>>19,t=Math.imul(t,5)+3864292196,t&4294967295}d.update=h;function u(t,i){return t=t^i*4,t=t^t>>>16,t=Math.imul(t,2246822507),t=t^t>>>13,t=Math.imul(t,3266489909),t=t^t>>>16,t}d.finish=u;function r(t,i=0){let e=m(i),s=0;for(let l of t)e=h(e,l),s++;return e=u(e,s),e}d.hashCode=r;function o(t){let i=t.length;if(i===0)return 0;let e=0;for(let s=0;s<i;s++){let l=t.charCodeAt(s);e=(e<<5>>>0)-e+l,e|=0}return e}})(a.MurmurHash||(a.MurmurHash={}))})($s)),$s}var Lr={},vl;function at(){if(vl)return Lr;vl=1;/*!
118
+ */var d=ei&&ei.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(a,"__esModule",{value:!0}),a.ATNState=void 0;const y=pe();let m=class oa{constructor(){this.stateNumber=oa.INVALID_STATE_NUMBER,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.optimizedTransitions=this.transitions}getStateNumber(){return this.stateNumber}get nonStopStateNumber(){return this.getStateNumber()}hashCode(){return this.stateNumber}equals(u){return u instanceof oa?this.stateNumber===u.stateNumber:!1}get isNonGreedyExitState(){return!1}toString(){return String(this.stateNumber)}getTransitions(){return this.transitions.slice(0)}get numberOfTransitions(){return this.transitions.length}addTransition(u,r){if(this.transitions.length===0)this.epsilonOnlyTransitions=u.isEpsilon;else if(this.epsilonOnlyTransitions!==u.isEpsilon)throw this.epsilonOnlyTransitions=!1,new Error("ATN state "+this.stateNumber+" has both epsilon and non-epsilon transitions.");this.transitions.splice(r!==void 0?r:this.transitions.length,0,u)}transition(u){return this.transitions[u]}setTransition(u,r){this.transitions[u]=r}removeTransition(u){return this.transitions.splice(u,1)[0]}get onlyHasEpsilonTransitions(){return this.epsilonOnlyTransitions}setRuleIndex(u){this.ruleIndex=u}get isOptimized(){return this.optimizedTransitions!==this.transitions}get numberOfOptimizedTransitions(){return this.optimizedTransitions.length}getOptimizedTransition(u){return this.optimizedTransitions[u]}addOptimizedTransition(u){this.isOptimized||(this.optimizedTransitions=new Array),this.optimizedTransitions.push(u)}setOptimizedTransition(u,r){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions[u]=r}removeOptimizedTransition(u){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions.splice(u,1)}};d([y.Override],m.prototype,"hashCode",null),d([y.Override],m.prototype,"equals",null),d([y.Override],m.prototype,"toString",null),a.ATNState=m,(function(h){h.INVALID_STATE_NUMBER=-1})(m=a.ATNState||(a.ATNState={}))})(ei)),ei}var _l;function kn(){if(_l)return Zn;_l=1;/*!
123
119
  * Copyright 2016 The ANTLR Project. All rights reserved.
124
120
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
125
- */var a=Lr&&Lr.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.ObjectEqualityComparator=void 0;const d=pe();let y=class{hashCode(h){return h==null?0:h.hashCode()}equals(h,u){return h==null?u==null:h.equals(u)}};return y.INSTANCE=new y,a([d.Override],y.prototype,"hashCode",null),a([d.Override],y.prototype,"equals",null),Lr.ObjectEqualityComparator=y,Lr}var El;function Ph(){if(El)return Ir;El=1;/*!
121
+ */Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.DecisionState=void 0;const a=dr();let d=class extends a.ATNState{constructor(){super(...arguments),this.decision=-1,this.nonGreedy=!1,this.sll=!1}};return Zn.DecisionState=d,Zn}var Lr={},qs={},Al;function va(){return Al||(Al=1,(function(a){/*!
126
122
  * Copyright 2016 The ANTLR Project. All rights reserved.
127
123
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
128
- */var a=Ir&&Ir.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.DefaultEqualityComparator=void 0;const d=pe(),y=ke(),m=at();let h=class{hashCode(r){return r==null?0:typeof r=="string"||typeof r=="number"?y.MurmurHash.hashCode([r]):m.ObjectEqualityComparator.INSTANCE.hashCode(r)}equals(r,o){return r==null?o==null:typeof r=="string"||typeof r=="number"?r===o:m.ObjectEqualityComparator.INSTANCE.equals(r,o)}};return h.INSTANCE=new h,a([d.Override],h.prototype,"hashCode",null),a([d.Override],h.prototype,"equals",null),Ir.DefaultEqualityComparator=h,Ir}var Sl;function Er(){if(Sl)return xt;Sl=1;/*!
124
+ */Object.defineProperty(a,"__esModule",{value:!0}),a.Arrays=void 0,(function(d){function y(u,r,o,t){return m(u,o!==void 0?o:0,t!==void 0?t:u.length,r)}d.binarySearch=y;function m(u,r,o,t){let i=r,e=o-1;for(;i<=e;){let s=i+e>>>1,l=u[s];if(l<t)i=s+1;else if(l>t)e=s-1;else return s}return-(i+1)}function h(u){let r="[",o=!0;for(let t of u)o?o=!1:r+=", ",t===null?r+="null":t===void 0?r+="undefined":r+=t;return r+="]",r}d.toString=h})(a.Arrays||(a.Arrays={}))})(qs)),qs}var ti={},vl;function Ea(){return vl||(vl=1,(function(a){/*!
129
125
  * Copyright 2016 The ANTLR Project. All rights reserved.
130
126
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
131
- */var a=xt&&xt.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p},d=xt&&xt.__param||function(i,e){return function(s,l){e(s,l,i)}};Object.defineProperty(xt,"__esModule",{value:!0}),xt.Array2DHashSet=void 0;const y=Ue(),m=Ph(),h=pe(),u=ke(),r=16,o=.75;let t=class Gi{constructor(e,s=r){if(this.n=0,this.threshold=Math.floor(r*o),e instanceof Gi){this.comparator=e.comparator,this.buckets=e.buckets.slice(0);for(let l=0;l<this.buckets.length;l++){let c=this.buckets[l];c&&(this.buckets[l]=c.slice(0))}this.n=e.n,this.threshold=e.threshold}else this.comparator=e||m.DefaultEqualityComparator.INSTANCE,this.buckets=this.createBuckets(s)}getOrAdd(e){return this.n>this.threshold&&this.expand(),this.getOrAddImpl(e)}getOrAddImpl(e){let s=this.getBucket(e),l=this.buckets[s];if(!l)return l=[e],this.buckets[s]=l,this.n++,e;for(let c of l)if(this.comparator.equals(c,e))return c;return l.push(e),this.n++,e}get(e){if(e==null)return e;let s=this.getBucket(e),l=this.buckets[s];if(l){for(let c of l)if(this.comparator.equals(c,e))return c}}getBucket(e){return this.comparator.hashCode(e)&this.buckets.length-1}hashCode(){let e=u.MurmurHash.initialize();for(let s of this.buckets)if(s!=null)for(let l of s){if(l==null)break;e=u.MurmurHash.update(e,this.comparator.hashCode(l))}return e=u.MurmurHash.finish(e,this.size),e}equals(e){return e===this?!0:!(e instanceof Gi)||e.size!==this.size?!1:this.containsAll(e)}expand(){let e=this.buckets,s=this.buckets.length*2,l=this.createBuckets(s);this.buckets=l,this.threshold=Math.floor(s*o);let c=this.size;for(let p of e)if(p)for(let v of p){let x=this.getBucket(v),g=this.buckets[x];g||(g=[],this.buckets[x]=g),g.push(v)}y(this.n===c)}add(e){return this.getOrAdd(e)===e}get size(){return this.n}get isEmpty(){return this.n===0}contains(e){return this.containsFast(this.asElementType(e))}containsFast(e){return e==null?!1:this.get(e)!=null}*[Symbol.iterator](){yield*this.toArray()}toArray(){const e=new Array(this.size);let s=0;for(let l of this.buckets)if(l!=null)for(let c of l){if(c==null)break;e[s++]=c}return e}containsAll(e){if(e instanceof Gi){let s=e;for(let l of s.buckets)if(l!=null)for(let c of l){if(c==null)break;if(!this.containsFast(this.asElementType(c)))return!1}}else for(let s of e)if(!this.containsFast(this.asElementType(s)))return!1;return!0}addAll(e){let s=!1;for(let l of e)this.getOrAdd(l)!==l&&(s=!0);return s}clear(){this.buckets=this.createBuckets(r),this.n=0,this.threshold=Math.floor(r*o)}toString(){if(this.size===0)return"{}";let e="{",s=!0;for(let l of this.buckets)if(l!=null)for(let c of l){if(c==null)break;s?s=!1:e+=", ",e+=c.toString()}return e+="}",e}toTableString(){let e="";for(let s of this.buckets){if(s==null){e+=`null
132
- `;continue}e+="[";let l=!0;for(let c of s)l?l=!1:e+=" ",c==null?e+="_":e+=c.toString();e+=`]
133
- `}return e}asElementType(e){return e}createBuckets(e){return new Array(e)}};return a([h.NotNull],t.prototype,"comparator",void 0),a([h.Override],t.prototype,"hashCode",null),a([h.Override],t.prototype,"equals",null),a([h.Override],t.prototype,"add",null),a([h.Override],t.prototype,"size",null),a([h.Override],t.prototype,"isEmpty",null),a([h.Override],t.prototype,"contains",null),a([d(0,h.Nullable)],t.prototype,"containsFast",null),a([h.Override],t.prototype,Symbol.iterator,null),a([h.Override],t.prototype,"toArray",null),a([h.Override],t.prototype,"containsAll",null),a([h.Override],t.prototype,"addAll",null),a([h.Override],t.prototype,"clear",null),a([h.Override],t.prototype,"toString",null),a([h.SuppressWarnings("unchecked")],t.prototype,"asElementType",null),a([h.SuppressWarnings("unchecked")],t.prototype,"createBuckets",null),xt.Array2DHashSet=t,xt}var Br={},Tl;function no(){if(Tl)return Br;Tl=1;/*!
127
+ */var d=ti&&ti.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c};Object.defineProperty(a,"__esModule",{value:!0}),a.PredictionContextCache=void 0;const y=Gn(),m=pe(),h=at(),u=ot(),r=Ue();let o=class sa{constructor(i=!0){this.contexts=new y.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.childContexts=new y.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.joinContexts=new y.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.enableCache=i}getAsCached(i){if(!this.enableCache)return i;let e=this.contexts.get(i);return e||(e=i,this.contexts.put(i,i)),e}getChild(i,e){if(!this.enableCache)return i.getChild(e);let s=new sa.PredictionContextAndInt(i,e),l=this.childContexts.get(s);return l||(l=i.getChild(e),l=this.getAsCached(l),this.childContexts.put(s,l)),l}join(i,e){if(!this.enableCache)return u.PredictionContext.join(i,e,this);let s=new sa.IdentityCommutativePredictionContextOperands(i,e),l=this.joinContexts.get(s);return l||(l=u.PredictionContext.join(i,e,this),l=this.getAsCached(l),this.joinContexts.put(s,l),l)}};a.PredictionContextCache=o,o.UNCACHED=new o(!1),(function(t){class i{constructor(l,c){this.obj=l,this.value=c}equals(l){if(l instanceof i){if(l===this)return!0}else return!1;let c=l;return this.value===c.value&&(this.obj===c.obj||this.obj!=null&&this.obj.equals(c.obj))}hashCode(){let l=5;return l=7*l+(this.obj!=null?this.obj.hashCode():0),l=7*l+this.value,l}}d([m.Override],i.prototype,"equals",null),d([m.Override],i.prototype,"hashCode",null),t.PredictionContextAndInt=i;class e{constructor(l,c){r(l!=null),r(c!=null),this._x=l,this._y=c}get x(){return this._x}get y(){return this._y}equals(l){if(l instanceof e){if(this===l)return!0}else return!1;let c=l;return this._x===c._x&&this._y===c._y||this._x===c._y&&this._y===c._x}hashCode(){return this._x.hashCode()^this._y.hashCode()}}d([m.Override],e.prototype,"equals",null),d([m.Override],e.prototype,"hashCode",null),t.IdentityCommutativePredictionContextOperands=e})(o=a.PredictionContextCache||(a.PredictionContextCache={}))})(ti)),ti}var El;function ot(){return El||(El=1,(function(a){/*!
134
128
  * Copyright 2016 The ANTLR Project. All rights reserved.
135
129
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
136
- */var a=Br&&Br.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Br,"__esModule",{value:!0}),Br.ArrayEqualityComparator=void 0;const d=pe(),y=ke(),m=at();let h=class{hashCode(r){return r==null?0:y.MurmurHash.hashCode(r,0)}equals(r,o){if(r==null)return o==null;if(o==null||r.length!==o.length)return!1;for(let t=0;t<r.length;t++)if(!m.ObjectEqualityComparator.INSTANCE.equals(r[t],o[t]))return!1;return!0}};return h.INSTANCE=new h,a([d.Override],h.prototype,"hashCode",null),a([d.Override],h.prototype,"equals",null),Br.ArrayEqualityComparator=h,Br}var ze={},bl;function ut(){if(bl)return ze;bl=1;/*!
130
+ */var d=Lr&&Lr.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var b=v.length-1;b>=0;b--)(N=v[b])&&(E=(A<3?N(E):A>3?N(x,g,E):N(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},y=Lr&&Lr.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SingletonPredictionContext=a.PredictionContext=void 0;const m=Gn(),h=Ar(),u=va(),r=ke(),o=pe(),t=Ea(),i=Ue(),e=1;let s=class $e{constructor(x){this.cachedHashCode=x}static calculateEmptyHashCode(){let x=r.MurmurHash.initialize(e);return x=r.MurmurHash.finish(x,0),x}static calculateSingleHashCode(x,g){let _=r.MurmurHash.initialize(e);return _=r.MurmurHash.update(_,x),_=r.MurmurHash.update(_,g),_=r.MurmurHash.finish(_,2),_}static calculateHashCode(x,g){let _=r.MurmurHash.initialize(e);for(let A of x)_=r.MurmurHash.update(_,A);for(let A of g)_=r.MurmurHash.update(_,A);return _=r.MurmurHash.finish(_,2*x.length),_}static fromRuleContext(x,g,_=!0){if(g.isEmpty)return _?$e.EMPTY_FULL:$e.EMPTY_LOCAL;let A;g._parent?A=$e.fromRuleContext(x,g._parent,_):A=_?$e.EMPTY_FULL:$e.EMPTY_LOCAL;let N=x.states[g.invokingState].transition(0);return A.getChild(N.followState.stateNumber)}static addEmptyContext(x){return x.addEmptyContext()}static removeEmptyContext(x){return x.removeEmptyContext()}static join(x,g,_=t.PredictionContextCache.UNCACHED){if(x===g)return x;if(x.isEmpty)return $e.isEmptyLocal(x)?x:$e.addEmptyContext(g);if(g.isEmpty)return $e.isEmptyLocal(g)?g:$e.addEmptyContext(x);let A=x.size,E=g.size;if(A===1&&E===1&&x.getReturnState(0)===g.getReturnState(0)){let $=_.join(x.getParent(0),g.getParent(0));return $===x.getParent(0)?x:$===g.getParent(0)?g:$.getChild(x.getReturnState(0))}let N=0,b=new Array(A+E),w=new Array(b.length),P=0,j=0,W=!0,L=!0;for(;P<A&&j<E;)x.getReturnState(P)===g.getReturnState(j)?(b[N]=_.join(x.getParent(P),g.getParent(j)),w[N]=x.getReturnState(P),W=W&&b[N]===x.getParent(P),L=L&&b[N]===g.getParent(j),P++,j++):x.getReturnState(P)<g.getReturnState(j)?(b[N]=x.getParent(P),w[N]=x.getReturnState(P),L=!1,P++):(i(g.getReturnState(j)<x.getReturnState(P)),b[N]=g.getParent(j),w[N]=g.getReturnState(j),W=!1,j++),N++;for(;P<A;)b[N]=x.getParent(P),w[N]=x.getReturnState(P),P++,L=!1,N++;for(;j<E;)b[N]=g.getParent(j),w[N]=g.getReturnState(j),j++,W=!1,N++;return W?x:L?g:(N<b.length&&(b=b.slice(0,N),w=w.slice(0,N)),b.length===0?$e.EMPTY_FULL:b.length===1?new p(b[0],w[0]):new c(b,w))}static isEmptyLocal(x){return x===$e.EMPTY_LOCAL}static getCachedContext(x,g,_){if(x.isEmpty)return x;let A=_.get(x);if(A)return A;if(A=g.get(x),A)return _.put(x,A),A;let E=!1,N=new Array(x.size);for(let w=0;w<N.length;w++){let P=$e.getCachedContext(x.getParent(w),g,_);if(E||P!==x.getParent(w)){if(!E){N=new Array(x.size);for(let j=0;j<x.size;j++)N[j]=x.getParent(j);E=!0}N[w]=P}}if(!E)return A=g.putIfAbsent(x,x),_.put(x,A??x),x;let b;if(N.length===1)b=new p(N[0],x.getReturnState(0));else{let w=new Array(x.size);for(let P=0;P<x.size;P++)w[P]=x.getReturnState(P);b=new c(N,w,x.hashCode())}return A=g.putIfAbsent(b,b),_.put(b,A||b),_.put(x,A||b),b}appendSingleContext(x,g){return this.appendContext($e.EMPTY_FULL.getChild(x),g)}getChild(x){return new p(this,x)}hashCode(){return this.cachedHashCode}toStrings(x,g,_=$e.EMPTY_FULL){let A=[];e:for(let E=0;;E++){let N=0,b=!0,w=this,P=g,j="";for(j+="[";!w.isEmpty&&w!==_;){let W=0;if(w.size>0){let L=1;for(;1<<L>>>0<w.size;)L++;let $=(1<<L>>>0)-1;if(W=E>>N&$,b=b&&W>=w.size-1,W>=w.size)continue e;N+=L}if(x){j.length>1&&(j+=" ");let $=x.atn.states[P],Q=x.ruleNames[$.ruleIndex];j+=Q}else w.getReturnState(W)!==$e.EMPTY_FULL_STATE_KEY&&(w.isEmpty||(j.length>1&&(j+=" "),j+=w.getReturnState(W)));P=w.getReturnState(W),w=w.getParent(W)}if(j+="]",A.push(j),b)break}return A}};d([o.Override],s.prototype,"hashCode",null),d([y(0,o.NotNull),y(1,o.NotNull),y(2,o.NotNull)],s,"join",null),d([y(0,o.NotNull),y(1,o.NotNull),y(2,o.NotNull)],s,"getCachedContext",null),a.PredictionContext=s;class l extends s{constructor(x){super(s.calculateEmptyHashCode()),this.fullContext=x}get isFullContext(){return this.fullContext}addEmptyContext(){return this}removeEmptyContext(){throw new Error("Cannot remove the empty context from itself.")}getParent(x){throw new Error("index out of bounds")}getReturnState(x){throw new Error("index out of bounds")}findReturnState(x){return-1}get size(){return 0}appendSingleContext(x,g){return g.getChild(this,x)}appendContext(x,g){return x}get isEmpty(){return!0}get hasEmpty(){return!0}equals(x){return this===x}toStrings(x,g,_){return["[]"]}}d([o.Override],l.prototype,"addEmptyContext",null),d([o.Override],l.prototype,"removeEmptyContext",null),d([o.Override],l.prototype,"getParent",null),d([o.Override],l.prototype,"getReturnState",null),d([o.Override],l.prototype,"findReturnState",null),d([o.Override],l.prototype,"size",null),d([o.Override],l.prototype,"appendSingleContext",null),d([o.Override],l.prototype,"appendContext",null),d([o.Override],l.prototype,"isEmpty",null),d([o.Override],l.prototype,"hasEmpty",null),d([o.Override],l.prototype,"equals",null),d([o.Override],l.prototype,"toStrings",null);let c=class Bn extends s{constructor(x,g,_){super(_||s.calculateHashCode(x,g)),i(x.length===g.length),i(g.length>1||g[0]!==s.EMPTY_FULL_STATE_KEY,"Should be using PredictionContext.EMPTY instead."),this.parents=x,this.returnStates=g}getParent(x){return this.parents[x]}getReturnState(x){return this.returnStates[x]}findReturnState(x){return u.Arrays.binarySearch(this.returnStates,x)}get size(){return this.returnStates.length}get isEmpty(){return!1}get hasEmpty(){return this.returnStates[this.returnStates.length-1]===s.EMPTY_FULL_STATE_KEY}addEmptyContext(){if(this.hasEmpty)return this;let x=this.parents.slice(0),g=this.returnStates.slice(0);return x.push(s.EMPTY_FULL),g.push(s.EMPTY_FULL_STATE_KEY),new Bn(x,g)}removeEmptyContext(){if(!this.hasEmpty)return this;if(this.returnStates.length===2)return new p(this.parents[0],this.returnStates[0]);{let x=this.parents.slice(0,this.parents.length-1),g=this.returnStates.slice(0,this.returnStates.length-1);return new Bn(x,g)}}appendContext(x,g){return Bn.appendContextImpl(this,x,new s.IdentityHashMap)}static appendContextImpl(x,g,_){if(g.isEmpty){if(s.isEmptyLocal(g)){if(x.hasEmpty)return s.EMPTY_LOCAL;throw new Error("what to do here?")}return x}if(g.size!==1)throw new Error("Appending a tree suffix is not yet supported.");let A=_.get(x);if(!A){if(x.isEmpty)A=g;else{let E=x.size;x.hasEmpty&&E--;let N=new Array(E),b=new Array(E);for(let w=0;w<E;w++)b[w]=x.getReturnState(w);for(let w=0;w<E;w++)N[w]=Bn.appendContextImpl(x.getParent(w),g,_);N.length===1?A=new p(N[0],b[0]):(i(N.length>1),A=new Bn(N,b)),x.hasEmpty&&(A=s.join(A,g))}_.put(x,A)}return A}equals(x){if(this===x)return!0;if(!(x instanceof Bn)||this.hashCode()!==x.hashCode())return!1;let g=x;return this.equalsImpl(g,new h.Array2DHashSet)}equalsImpl(x,g){let _=[],A=[];for(_.push(this),A.push(x);;){let E=_.pop(),N=A.pop();if(!E||!N)break;let b=new t.PredictionContextCache.IdentityCommutativePredictionContextOperands(E,N);if(!g.add(b))continue;let w=b.x.size;if(w===0){if(!b.x.equals(b.y))return!1;continue}let P=b.y.size;if(w!==P)return!1;for(let j=0;j<w;j++){if(b.x.getReturnState(j)!==b.y.getReturnState(j))return!1;let W=b.x.getParent(j),L=b.y.getParent(j);if(W.hashCode()!==L.hashCode())return!1;W!==L&&(_.push(W),A.push(L))}}return!0}};d([o.NotNull],c.prototype,"parents",void 0),d([o.NotNull],c.prototype,"returnStates",void 0),d([o.Override],c.prototype,"getParent",null),d([o.Override],c.prototype,"getReturnState",null),d([o.Override],c.prototype,"findReturnState",null),d([o.Override],c.prototype,"size",null),d([o.Override],c.prototype,"isEmpty",null),d([o.Override],c.prototype,"hasEmpty",null),d([o.Override],c.prototype,"addEmptyContext",null),d([o.Override],c.prototype,"removeEmptyContext",null),d([o.Override],c.prototype,"appendContext",null),d([o.Override],c.prototype,"equals",null),c=d([y(0,o.NotNull)],c);let p=class Q0 extends s{constructor(x,g){super(s.calculateSingleHashCode(x,g)),this.parent=x,this.returnState=g}getParent(x){return this.parent}getReturnState(x){return this.returnState}findReturnState(x){return this.returnState===x?0:-1}get size(){return 1}get isEmpty(){return!1}get hasEmpty(){return!1}appendContext(x,g){return g.getChild(this.parent.appendContext(x,g),this.returnState)}addEmptyContext(){let x=[this.parent,s.EMPTY_FULL],g=[this.returnState,s.EMPTY_FULL_STATE_KEY];return new c(x,g)}removeEmptyContext(){return this}equals(x){if(x===this)return!0;if(!(x instanceof Q0))return!1;let g=x;return this.hashCode()!==g.hashCode()?!1:this.returnState===g.returnState&&this.parent.equals(g.parent)}};d([o.NotNull],p.prototype,"parent",void 0),d([o.Override],p.prototype,"getParent",null),d([o.Override],p.prototype,"getReturnState",null),d([o.Override],p.prototype,"findReturnState",null),d([o.Override],p.prototype,"size",null),d([o.Override],p.prototype,"isEmpty",null),d([o.Override],p.prototype,"hasEmpty",null),d([o.Override],p.prototype,"appendContext",null),d([o.Override],p.prototype,"addEmptyContext",null),d([o.Override],p.prototype,"removeEmptyContext",null),d([o.Override],p.prototype,"equals",null),p=d([y(0,o.NotNull)],p),a.SingletonPredictionContext=p,(function(v){v.EMPTY_LOCAL=new l(!1),v.EMPTY_FULL=new l(!0),v.EMPTY_LOCAL_STATE_KEY=-2147483648,v.EMPTY_FULL_STATE_KEY=(1<<31>>>0)-1;class x extends m.Array2DHashMap{constructor(){super(g.INSTANCE)}}v.IdentityHashMap=x;class g{IdentityEqualityComparator(){}hashCode(A){return A.hashCode()}equals(A,E){return A===E}}g.INSTANCE=new g,d([o.Override],g.prototype,"hashCode",null),d([o.Override],g.prototype,"equals",null),v.IdentityEqualityComparator=g})(s=a.PredictionContext||(a.PredictionContext={}))})(Lr)),Lr}var Br={},ze={},Sl;function ut(){if(Sl)return ze;Sl=1;/*!
137
131
  * Copyright 2016 The ANTLR Project. All rights reserved.
138
132
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
139
- */Object.defineProperty(ze,"__esModule",{value:!0}),ze.toCharArray=ze.toMap=ze.equals=ze.join=ze.escapeWhitespace=void 0;function a(u,r){return r?u.replace(/ /,"·"):u.replace(/\t/,"\\t").replace(/\n/,"\\n").replace(/\r/,"\\r")}ze.escapeWhitespace=a;function d(u,r){let o="",t=!0;for(let i of u)t?t=!1:o+=r,o+=i;return o}ze.join=d;function y(u,r){return u===r?!0:u===void 0||r===void 0?!1:u.equals(r)}ze.equals=y;function m(u){let r=new Map;for(let o=0;o<u.length;o++)r.set(u[o],o);return r}ze.toMap=m;function h(u){if(typeof u=="string"){let r=new Uint16Array(u.length);for(let o=0;o<u.length;o++)r[o]=u.charCodeAt(o);return r}else return u.toCharArray()}return ze.toCharArray=h,ze}var Nl;function Gn(){return Nl||(Nl=1,(function(a){/*!
133
+ */Object.defineProperty(ze,"__esModule",{value:!0}),ze.toCharArray=ze.toMap=ze.equals=ze.join=ze.escapeWhitespace=void 0;function a(u,r){return r?u.replace(/ /,"·"):u.replace(/\t/,"\\t").replace(/\n/,"\\n").replace(/\r/,"\\r")}ze.escapeWhitespace=a;function d(u,r){let o="",t=!0;for(let i of u)t?t=!1:o+=r,o+=i;return o}ze.join=d;function y(u,r){return u===r?!0:u===void 0||r===void 0?!1:u.equals(r)}ze.equals=y;function m(u){let r=new Map;for(let o=0;o<u.length;o++)r.set(u[o],o);return r}ze.toMap=m;function h(u){if(typeof u=="string"){let r=new Uint16Array(u.length);for(let o=0;o<u.length;o++)r[o]=u.charCodeAt(o);return r}else return u.toCharArray()}return ze.toCharArray=h,ze}var Tl;function Yn(){return Tl||(Tl=1,(function(a){/*!
140
134
  * Copyright 2016 The ANTLR Project. All rights reserved.
141
135
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
142
- */var d=Fr&&Fr.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},y=Fr&&Fr.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SemanticContext=void 0;const m=Er(),h=no(),u=ke(),r=pe(),o=at(),t=ut();function i(l){let c;for(let p of l){if(c===void 0){c=p;continue}c.compareTo(p)<0&&(c=p)}return c}function e(l){let c;for(let p of l){if(c===void 0){c=p;continue}c.compareTo(p)>0&&(c=p)}return c}let s=class We{static get NONE(){return We._NONE===void 0&&(We._NONE=new We.Predicate),We._NONE}evalPrecedence(c,p){return this}static and(c,p){if(!c||c===We.NONE)return p;if(p===We.NONE)return c;let v=new We.AND(c,p);return v.opnds.length===1?v.opnds[0]:v}static or(c,p){if(!c)return p;if(c===We.NONE||p===We.NONE)return We.NONE;let v=new We.OR(c,p);return v.opnds.length===1?v.opnds[0]:v}};a.SemanticContext=s,(function(l){function v(N){let b=[];for(let w=0;w<N.length;w++){let P=N[w];P instanceof l.PrecedencePredicate&&(b.push(P),N.splice(w,1),w--)}return b}class x extends l{constructor(b=-1,w=-1,P=!1){super(),this.ruleIndex=b,this.predIndex=w,this.isCtxDependent=P}eval(b,w){let P=this.isCtxDependent?w:void 0;return b.sempred(P,this.ruleIndex,this.predIndex)}hashCode(){let b=u.MurmurHash.initialize();return b=u.MurmurHash.update(b,this.ruleIndex),b=u.MurmurHash.update(b,this.predIndex),b=u.MurmurHash.update(b,this.isCtxDependent?1:0),b=u.MurmurHash.finish(b,3),b}equals(b){return b instanceof x?this===b?!0:this.ruleIndex===b.ruleIndex&&this.predIndex===b.predIndex&&this.isCtxDependent===b.isCtxDependent:!1}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}d([r.Override],x.prototype,"eval",null),d([r.Override],x.prototype,"hashCode",null),d([r.Override],x.prototype,"equals",null),d([r.Override],x.prototype,"toString",null),l.Predicate=x;class g extends l{constructor(b){super(),this.precedence=b}eval(b,w){return b.precpred(w,this.precedence)}evalPrecedence(b,w){if(b.precpred(w,this.precedence))return l.NONE}compareTo(b){return this.precedence-b.precedence}hashCode(){let b=1;return b=31*b+this.precedence,b}equals(b){return b instanceof g?this===b?!0:this.precedence===b.precedence:!1}toString(){return"{"+this.precedence+">=prec}?"}}d([r.Override],g.prototype,"eval",null),d([r.Override],g.prototype,"evalPrecedence",null),d([r.Override],g.prototype,"compareTo",null),d([r.Override],g.prototype,"hashCode",null),d([r.Override],g.prototype,"equals",null),d([r.Override],g.prototype,"toString",null),l.PrecedencePredicate=g;class _ extends l{}l.Operator=_;let A=class Yi extends _{constructor(b,w){super();let P=new m.Array2DHashSet(o.ObjectEqualityComparator.INSTANCE);b instanceof Yi?P.addAll(b.opnds):P.add(b),w instanceof Yi?P.addAll(w.opnds):P.add(w),this.opnds=P.toArray();let j=v(this.opnds),W=e(j);W&&this.opnds.push(W)}get operands(){return this.opnds}equals(b){return this===b?!0:b instanceof Yi?h.ArrayEqualityComparator.INSTANCE.equals(this.opnds,b.opnds):!1}hashCode(){return u.MurmurHash.hashCode(this.opnds,40363613)}eval(b,w){for(let P of this.opnds)if(!P.eval(b,w))return!1;return!0}evalPrecedence(b,w){let P=!1,j=[];for(let L of this.opnds){let $=L.evalPrecedence(b,w);if(P=P||$!==L,$==null)return;$!==l.NONE&&j.push($)}if(!P)return this;if(j.length===0)return l.NONE;let W=j[0];for(let L=1;L<j.length;L++)W=l.and(W,j[L]);return W}toString(){return t.join(this.opnds,"&&")}};d([r.Override],A.prototype,"operands",null),d([r.Override],A.prototype,"equals",null),d([r.Override],A.prototype,"hashCode",null),d([r.Override],A.prototype,"eval",null),d([r.Override],A.prototype,"evalPrecedence",null),d([r.Override],A.prototype,"toString",null),A=d([y(0,r.NotNull),y(1,r.NotNull)],A),l.AND=A;let E=class Wi extends _{constructor(b,w){super();let P=new m.Array2DHashSet(o.ObjectEqualityComparator.INSTANCE);b instanceof Wi?P.addAll(b.opnds):P.add(b),w instanceof Wi?P.addAll(w.opnds):P.add(w),this.opnds=P.toArray();let j=v(this.opnds),W=i(j);W&&this.opnds.push(W)}get operands(){return this.opnds}equals(b){return this===b?!0:b instanceof Wi?h.ArrayEqualityComparator.INSTANCE.equals(this.opnds,b.opnds):!1}hashCode(){return u.MurmurHash.hashCode(this.opnds,486279973)}eval(b,w){for(let P of this.opnds)if(P.eval(b,w))return!0;return!1}evalPrecedence(b,w){let P=!1,j=[];for(let L of this.opnds){let $=L.evalPrecedence(b,w);if(P=P||$!==L,$===l.NONE)return l.NONE;$&&j.push($)}if(!P)return this;if(j.length===0)return;let W=j[0];for(let L=1;L<j.length;L++)W=l.or(W,j[L]);return W}toString(){return t.join(this.opnds,"||")}};d([r.Override],E.prototype,"operands",null),d([r.Override],E.prototype,"equals",null),d([r.Override],E.prototype,"hashCode",null),d([r.Override],E.prototype,"eval",null),d([r.Override],E.prototype,"evalPrecedence",null),d([r.Override],E.prototype,"toString",null),E=d([y(0,r.NotNull),y(1,r.NotNull)],E),l.OR=E})(s=a.SemanticContext||(a.SemanticContext={}))})(Fr)),Fr}var Cl;function Q0(){if(Cl)return pt;Cl=1;/*!
136
+ */var d=Br&&Br.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},y=Br&&Br.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SemanticContext=void 0;const m=Ar(),h=no(),u=ke(),r=pe(),o=at(),t=ut();function i(l){let c;for(let p of l){if(c===void 0){c=p;continue}c.compareTo(p)<0&&(c=p)}return c}function e(l){let c;for(let p of l){if(c===void 0){c=p;continue}c.compareTo(p)>0&&(c=p)}return c}let s=class We{static get NONE(){return We._NONE===void 0&&(We._NONE=new We.Predicate),We._NONE}evalPrecedence(c,p){return this}static and(c,p){if(!c||c===We.NONE)return p;if(p===We.NONE)return c;let v=new We.AND(c,p);return v.opnds.length===1?v.opnds[0]:v}static or(c,p){if(!c)return p;if(c===We.NONE||p===We.NONE)return We.NONE;let v=new We.OR(c,p);return v.opnds.length===1?v.opnds[0]:v}};a.SemanticContext=s,(function(l){function v(N){let b=[];for(let w=0;w<N.length;w++){let P=N[w];P instanceof l.PrecedencePredicate&&(b.push(P),N.splice(w,1),w--)}return b}class x extends l{constructor(b=-1,w=-1,P=!1){super(),this.ruleIndex=b,this.predIndex=w,this.isCtxDependent=P}eval(b,w){let P=this.isCtxDependent?w:void 0;return b.sempred(P,this.ruleIndex,this.predIndex)}hashCode(){let b=u.MurmurHash.initialize();return b=u.MurmurHash.update(b,this.ruleIndex),b=u.MurmurHash.update(b,this.predIndex),b=u.MurmurHash.update(b,this.isCtxDependent?1:0),b=u.MurmurHash.finish(b,3),b}equals(b){return b instanceof x?this===b?!0:this.ruleIndex===b.ruleIndex&&this.predIndex===b.predIndex&&this.isCtxDependent===b.isCtxDependent:!1}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}d([r.Override],x.prototype,"eval",null),d([r.Override],x.prototype,"hashCode",null),d([r.Override],x.prototype,"equals",null),d([r.Override],x.prototype,"toString",null),l.Predicate=x;class g extends l{constructor(b){super(),this.precedence=b}eval(b,w){return b.precpred(w,this.precedence)}evalPrecedence(b,w){if(b.precpred(w,this.precedence))return l.NONE}compareTo(b){return this.precedence-b.precedence}hashCode(){let b=1;return b=31*b+this.precedence,b}equals(b){return b instanceof g?this===b?!0:this.precedence===b.precedence:!1}toString(){return"{"+this.precedence+">=prec}?"}}d([r.Override],g.prototype,"eval",null),d([r.Override],g.prototype,"evalPrecedence",null),d([r.Override],g.prototype,"compareTo",null),d([r.Override],g.prototype,"hashCode",null),d([r.Override],g.prototype,"equals",null),d([r.Override],g.prototype,"toString",null),l.PrecedencePredicate=g;class _ extends l{}l.Operator=_;let A=class Yi extends _{constructor(b,w){super();let P=new m.Array2DHashSet(o.ObjectEqualityComparator.INSTANCE);b instanceof Yi?P.addAll(b.opnds):P.add(b),w instanceof Yi?P.addAll(w.opnds):P.add(w),this.opnds=P.toArray();let j=v(this.opnds),W=e(j);W&&this.opnds.push(W)}get operands(){return this.opnds}equals(b){return this===b?!0:b instanceof Yi?h.ArrayEqualityComparator.INSTANCE.equals(this.opnds,b.opnds):!1}hashCode(){return u.MurmurHash.hashCode(this.opnds,40363613)}eval(b,w){for(let P of this.opnds)if(!P.eval(b,w))return!1;return!0}evalPrecedence(b,w){let P=!1,j=[];for(let L of this.opnds){let $=L.evalPrecedence(b,w);if(P=P||$!==L,$==null)return;$!==l.NONE&&j.push($)}if(!P)return this;if(j.length===0)return l.NONE;let W=j[0];for(let L=1;L<j.length;L++)W=l.and(W,j[L]);return W}toString(){return t.join(this.opnds,"&&")}};d([r.Override],A.prototype,"operands",null),d([r.Override],A.prototype,"equals",null),d([r.Override],A.prototype,"hashCode",null),d([r.Override],A.prototype,"eval",null),d([r.Override],A.prototype,"evalPrecedence",null),d([r.Override],A.prototype,"toString",null),A=d([y(0,r.NotNull),y(1,r.NotNull)],A),l.AND=A;let E=class Wi extends _{constructor(b,w){super();let P=new m.Array2DHashSet(o.ObjectEqualityComparator.INSTANCE);b instanceof Wi?P.addAll(b.opnds):P.add(b),w instanceof Wi?P.addAll(w.opnds):P.add(w),this.opnds=P.toArray();let j=v(this.opnds),W=i(j);W&&this.opnds.push(W)}get operands(){return this.opnds}equals(b){return this===b?!0:b instanceof Wi?h.ArrayEqualityComparator.INSTANCE.equals(this.opnds,b.opnds):!1}hashCode(){return u.MurmurHash.hashCode(this.opnds,486279973)}eval(b,w){for(let P of this.opnds)if(P.eval(b,w))return!0;return!1}evalPrecedence(b,w){let P=!1,j=[];for(let L of this.opnds){let $=L.evalPrecedence(b,w);if(P=P||$!==L,$===l.NONE)return l.NONE;$&&j.push($)}if(!P)return this;if(j.length===0)return;let W=j[0];for(let L=1;L<j.length;L++)W=l.or(W,j[L]);return W}toString(){return t.join(this.opnds,"||")}};d([r.Override],E.prototype,"operands",null),d([r.Override],E.prototype,"equals",null),d([r.Override],E.prototype,"hashCode",null),d([r.Override],E.prototype,"eval",null),d([r.Override],E.prototype,"evalPrecedence",null),d([r.Override],E.prototype,"toString",null),E=d([y(0,r.NotNull),y(1,r.NotNull)],E),l.OR=E})(s=a.SemanticContext||(a.SemanticContext={}))})(Br)),Br}var bl;function io(){if(bl)return pt;bl=1;/*!
143
137
  * Copyright 2016 The ANTLR Project. All rights reserved.
144
138
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
145
- */var a=pt&&pt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=pt&&pt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(pt,"__esModule",{value:!0}),pt.PredicateTransition=void 0;const y=va(),m=pe(),h=Gn();let u=class extends y.AbstractPredicateTransition{constructor(o,t,i,e){super(o),this.ruleIndex=t,this.predIndex=i,this.isCtxDependent=e}get serializationType(){return 4}get isEpsilon(){return!0}matches(o,t,i){return!1}get predicate(){return new h.SemanticContext.Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override],u.prototype,"isEpsilon",null),a([m.Override],u.prototype,"matches",null),a([m.Override,m.NotNull],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),pt.PredicateTransition=u,pt}var Ol;function io(){if(Ol)return ft;Ol=1;/*!
139
+ */var a=pt&&pt.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var b=v.length-1;b>=0;b--)(N=v[b])&&(E=(A<3?N(E):A>3?N(x,g,E):N(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},d=pt&&pt.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(pt,"__esModule",{value:!0}),pt.ATNConfig=void 0;const y=Gn(),m=kn(),h=ke(),u=pe(),r=at(),o=ot(),t=Yn(),i=Ue(),e=2147483648;let s=class bi{constructor(x,g,_){typeof g=="number"?(i((g&16777215)===g),this._state=x,this.altAndOuterContextDepth=g,this._context=_):(this._state=x,this.altAndOuterContextDepth=g.altAndOuterContextDepth,this._context=_)}static create(x,g,_,A=t.SemanticContext.NONE,E){return A!==t.SemanticContext.NONE?E!=null?new p(E,A,x,g,_,!1):new l(A,x,g,_):E!=null?new c(E,x,g,_,!1):new bi(x,g,_)}get state(){return this._state}get alt(){return this.altAndOuterContextDepth&16777215}get context(){return this._context}set context(x){this._context=x}get reachesIntoOuterContext(){return this.outerContextDepth!==0}get outerContextDepth(){return this.altAndOuterContextDepth>>>24&127}set outerContextDepth(x){i(x>=0),x=Math.min(x,127),this.altAndOuterContextDepth=x<<24|(this.altAndOuterContextDepth&-2130706433)>>>0}get lexerActionExecutor(){}get semanticContext(){return t.SemanticContext.NONE}get hasPassedThroughNonGreedyDecision(){return!1}clone(){return this.transform(this.state,!1)}transform(x,g,_){return _==null?this.transformImpl(x,this._context,this.semanticContext,g,this.lexerActionExecutor):_ instanceof o.PredictionContext?this.transformImpl(x,_,this.semanticContext,g,this.lexerActionExecutor):_ instanceof t.SemanticContext?this.transformImpl(x,this._context,_,g,this.lexerActionExecutor):this.transformImpl(x,this._context,this.semanticContext,g,_)}transformImpl(x,g,_,A,E){let N=A&&bi.checkNonGreedyDecision(this,x);return _!==t.SemanticContext.NONE?E!=null||N?new p(E,_,x,this,g,N):new l(_,x,this,g):E!=null||N?new c(E,x,this,g,N):new bi(x,this,g)}static checkNonGreedyDecision(x,g){return x.hasPassedThroughNonGreedyDecision||g instanceof m.DecisionState&&g.nonGreedy}appendContext(x,g){if(typeof x=="number"){let _=this.context.appendSingleContext(x,g);return this.transform(this.state,!1,_)}else{let _=this.context.appendContext(x,g);return this.transform(this.state,!1,_)}}contains(x){if(this.state.stateNumber!==x.state.stateNumber||this.alt!==x.alt||!this.semanticContext.equals(x.semanticContext))return!1;let g=[],_=[];for(g.push(this.context),_.push(x.context);;){let A=g.pop(),E=_.pop();if(!A||!E)break;if(A===E)return!0;if(A.size<E.size)return!1;if(E.isEmpty)return A.hasEmpty;for(let N=0;N<E.size;N++){let b=A.findReturnState(E.getReturnState(N));if(b<0)return!1;g.push(A.getParent(b)),_.push(E.getParent(N))}}return!1}get isPrecedenceFilterSuppressed(){return(this.altAndOuterContextDepth&e)!==0}set isPrecedenceFilterSuppressed(x){x?this.altAndOuterContextDepth|=e:this.altAndOuterContextDepth&=~e}equals(x){return this===x?!0:x instanceof bi?this.state.stateNumber===x.state.stateNumber&&this.alt===x.alt&&this.reachesIntoOuterContext===x.reachesIntoOuterContext&&this.context.equals(x.context)&&this.semanticContext.equals(x.semanticContext)&&this.isPrecedenceFilterSuppressed===x.isPrecedenceFilterSuppressed&&this.hasPassedThroughNonGreedyDecision===x.hasPassedThroughNonGreedyDecision&&r.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor,x.lexerActionExecutor):!1}hashCode(){let x=h.MurmurHash.initialize(7);return x=h.MurmurHash.update(x,this.state.stateNumber),x=h.MurmurHash.update(x,this.alt),x=h.MurmurHash.update(x,this.reachesIntoOuterContext?1:0),x=h.MurmurHash.update(x,this.context),x=h.MurmurHash.update(x,this.semanticContext),x=h.MurmurHash.update(x,this.hasPassedThroughNonGreedyDecision?1:0),x=h.MurmurHash.update(x,this.lexerActionExecutor),x=h.MurmurHash.finish(x,7),x}toDotString(){let x="";x+=`digraph G {
140
+ `,x+=`rankdir=LR;
141
+ `;let g=new y.Array2DHashMap(o.PredictionContext.IdentityEqualityComparator.INSTANCE),_=[];function A(E){let N=g.size,b=g.putIfAbsent(E,N);return b??(_.push(E),N)}for(_.push(this.context),g.put(this.context,0);;){let E=_.pop();if(!E)break;for(let N=0;N<E.size;N++)x+=" s"+A(E),x+="->",x+="s"+A(E.getParent(N)),x+='[label="'+E.getReturnState(N)+`"];
142
+ `}return x+=`}
143
+ `,x.toString()}toString(x,g,_){_==null&&(_=g!=null),g==null&&(g=!0);let A="",E;_?E=this.context.toStrings(x,this.state.stateNumber):E=["?"];let N=!0;for(let b of E)N?N=!1:A+=", ",A+="(",A+=this.state,g&&(A+=",",A+=this.alt),this.context&&(A+=",",A+=b),this.semanticContext!==t.SemanticContext.NONE&&(A+=",",A+=this.semanticContext),this.reachesIntoOuterContext&&(A+=",up="+this.outerContextDepth),A+=")";return A.toString()}};a([u.NotNull],s.prototype,"_state",void 0),a([u.NotNull],s.prototype,"_context",void 0),a([u.NotNull],s.prototype,"state",null),a([u.NotNull,d(0,u.NotNull)],s.prototype,"context",null),a([u.NotNull],s.prototype,"semanticContext",null),a([u.Override],s.prototype,"clone",null),a([d(0,u.NotNull),d(2,u.NotNull)],s.prototype,"transformImpl",null),a([u.Override],s.prototype,"equals",null),a([u.Override],s.prototype,"hashCode",null),a([d(0,u.NotNull),d(3,u.NotNull)],s,"create",null),s=a([d(0,u.NotNull),d(2,u.NotNull)],s),pt.ATNConfig=s;let l=class extends s{constructor(x,g,_,A){typeof _=="number"?super(g,_,A):super(g,_,A),this._semanticContext=x}get semanticContext(){return this._semanticContext}};a([u.NotNull],l.prototype,"_semanticContext",void 0),a([u.Override],l.prototype,"semanticContext",null),l=a([d(1,u.NotNull),d(2,u.NotNull)],l);let c=class extends s{constructor(x,g,_,A,E){if(typeof _=="number")super(g,_,A);else if(super(g,_,A),_.semanticContext!==t.SemanticContext.NONE)throw new Error("Not supported");this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=E}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};a([u.Override],c.prototype,"lexerActionExecutor",null),a([u.Override],c.prototype,"hasPassedThroughNonGreedyDecision",null),c=a([d(1,u.NotNull),d(2,u.NotNull)],c);let p=class extends l{constructor(x,g,_,A,E,N){typeof A=="number"?super(g,_,A,E):super(g,_,A,E),this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=N}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};return a([u.Override],p.prototype,"lexerActionExecutor",null),a([u.Override],p.prototype,"hasPassedThroughNonGreedyDecision",null),p=a([d(1,u.NotNull),d(2,u.NotNull)],p),pt}var ri={},Nl;function vr(){if(Nl)return ri;Nl=1;/*!
146
144
  * Copyright 2016 The ANTLR Project. All rights reserved.
147
145
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
148
- */var a=ft&&ft.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=ft&&ft.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(ft,"__esModule",{value:!0}),ft.FailedPredicateException=void 0;const y=Ar(),m=pe(),h=Q0();let u=class X0 extends y.RecognitionException{constructor(o,t,i){super(o,o.inputStream,o.context,X0.formatMessage(t,i));let s=o.interpreter.atn.states[o.state].transition(0);s instanceof h.PredicateTransition?(this._ruleIndex=s.ruleIndex,this._predicateIndex=s.predIndex):(this._ruleIndex=0,this._predicateIndex=0),this._predicate=t,super.setOffendingToken(o,o.currentToken)}get ruleIndex(){return this._ruleIndex}get predicateIndex(){return this._predicateIndex}get predicate(){return this._predicate}static formatMessage(o,t){return t||`failed predicate: {${o}}?`}};return a([m.NotNull],u,"formatMessage",null),u=a([d(0,m.NotNull)],u),ft.FailedPredicateException=u,ft}var dt={},Dl;function oo(){if(Dl)return dt;Dl=1;/*!
146
+ */Object.defineProperty(ri,"__esModule",{value:!0}),ri.BitSet=void 0;const a=Vn(),d=ke(),y=new Uint16Array(0);function m(s){return s>>>4}function h(s){return s*16}function u(s){let l=1;for(let c=0;c<16;c++){if((s&l)!==0)return c;l=l<<1>>>0}throw new RangeError("No specified bit found")}function r(s){let l=32768;for(let c=15;c>=0;c--){if((s&l)!==0)return c;l=l>>>1}throw new RangeError("No specified bit found")}function o(s,l){return s&=15,l&=15,s===l?1<<s>>>0:65535>>>15-l^65535>>>16-s}const t=new Uint8Array(65536);for(let s=0;s<16;s++){const l=1<<s>>>0;let c=0;for(;c<t.length;){c+=l;for(let p=0;p<l;p++)t[c]++,c++}}let i=class Ni{constructor(l){if(!l)this.data=y;else if(typeof l=="number"){if(l<0)throw new RangeError("nbits cannot be negative");this.data=new Uint16Array(m(l-1)+1)}else if(l instanceof Ni)this.data=l.data.slice(0);else{let c=-1;for(let p of l)c<p&&(c=p);this.data=new Uint16Array(m(c-1)+1);for(let p of l)this.set(p)}}and(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length);let x=-1;for(let g=0;g<v;g++)(c[g]&=p[g])!==0&&(x=g);x===-1&&(this.data=y),x<c.length-1&&(this.data=c.slice(0,x+1))}andNot(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length);let x=-1;for(let g=0;g<v;g++)(c[g]&=p[g]^65535)!==0&&(x=g);x===-1&&(this.data=y),x<c.length-1&&(this.data=c.slice(0,x+1))}cardinality(){if(this.isEmpty)return 0;const l=this.data,c=l.length;let p=0;for(let v=0;v<c;v++)p+=t[l[v]];return p}clear(l,c){l==null?this.data.fill(0):c==null?this.set(l,!1):this.set(l,c,!1)}flip(l,c){if(c==null&&(c=l),l<0||c<l)throw new RangeError;let p=m(l);const v=m(c);if(p===v)this.data[p]^=o(l,c);else{for(this.data[p++]^=o(l,15);p<v;)this.data[p++]^=65535;this.data[p++]^=o(0,c)}}get(l,c){if(c===void 0)return!!(this.data[m(l)]&o(l,l));{let p=new Ni(c+1);for(let v=l;v<=c;v++)p.set(v,this.get(v));return p}}intersects(l){let c=Math.min(this.length(),l.length());if(c===0)return!1;let p=m(c-1);for(let v=0;v<=p;v++)if((this.data[v]&l.data[v])!==0)return!0;return!1}get isEmpty(){return this.length()===0}length(){return this.data.length?this.previousSetBit(h(this.data.length)-1)+1:0}nextClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);if(v>p)return-1;let x=65535^o(l,15);if((c[v]|x)===65535){for(v++,x=0;v<p&&c[v]===65535;v++);if(v===p)return-1}return h(v)+u((c[v]|x)^65535)}nextSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);if(v>p)return-1;let x=o(l,15);if((c[v]&x)===0){for(v++,x=65535;v<p&&c[v]===0;v++);if(v>=p)return-1}return h(v)+u(c[v]&x)}or(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length),x=Math.max(c.length,p.length),g=c.length===x?c:new Uint16Array(x);let _=-1;for(let E=0;E<v;E++)(g[E]=c[E]|p[E])!==0&&(_=E);const A=c.length>p.length?c:p;for(let E=v;E<x;E++)(g[E]=A[E])!==0&&(_=E);_===-1?this.data=y:g.length===_+1?this.data=g:this.data=g.slice(0,_)}previousClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);v>=p&&(v=p-1);let x=65535^o(0,l);if((c[v]|x)===65535){for(x=0,v--;v>=0&&c[v]===65535;v--);if(v<0)return-1}return h(v)+r((c[v]|x)^65535)}previousSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);v>=p&&(v=p-1);let x=o(0,l);if((c[v]&x)===0){for(v--,x=65535;v>=0&&c[v]===0;v--);if(v<0)return-1}return h(v)+r(c[v]&x)}set(l,c,p){if(c===void 0?(c=l,p=!0):typeof c=="boolean"&&(p=c,c=l),p===void 0&&(p=!0),l<0||l>c)throw new RangeError;let v=m(l),x=m(c);if(p&&x>=this.data.length){let g=new Uint16Array(x+1);this.data.forEach((_,A)=>g[A]=_),this.data=g}else if(!p){if(v>=this.data.length)return;x>=this.data.length&&(x=this.data.length-1,c=this.data.length*16-1)}if(v===x)this._setBits(v,p,o(l,c));else{for(this._setBits(v++,p,o(l,15));v<x;)this.data[v++]=p?65535:0;this._setBits(v,p,o(0,c))}}_setBits(l,c,p){c?this.data[l]|=p:this.data[l]&=65535^p}get size(){return this.data.byteLength*8}hashCode(){return d.MurmurHash.hashCode(this.data,22)}equals(l){if(l===this)return!0;if(!(l instanceof Ni))return!1;const c=this.length();if(c!==l.length())return!1;if(c===0)return!0;let p=m(c-1);for(let v=0;v<=p;v++)if(this.data[v]!==l.data[v])return!1;return!0}toString(){let l="{",c=!0;for(let p=this.nextSetBit(0);p>=0;p=this.nextSetBit(p+1))c?c=!1:l+=", ",l+=p;return l+="}",l}xor(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length),x=Math.max(c.length,p.length),g=c.length===x?c:new Uint16Array(x);let _=-1;for(let E=0;E<v;E++)(g[E]=c[E]^p[E])!==0&&(_=E);const A=c.length>p.length?c:p;for(let E=v;E<x;E++)(g[E]=A[E])!==0&&(_=E);_===-1?this.data=y:g.length===_+1?this.data=g:this.data=g.slice(0,_+1)}clone(){return new Ni(this)}[Symbol.iterator](){return new e(this.data)}[a.inspect.custom](){return"BitSet "+this.toString()}};ri.BitSet=i;class e{constructor(l){this.data=l,this.index=0,this.mask=65535}next(){for(;this.index<this.data.length;){const l=this.data[this.index]&this.mask;if(l!==0){const c=h(this.index)+u(l);return this.mask=o(c+1,15),{done:!1,value:c}}this.index++,this.mask=65535}return{done:!0,value:-1}}[Symbol.iterator](){return this}}return ri}var Cl;function Li(){if(Cl)return Fr;Cl=1;/*!
149
147
  * Copyright 2016 The ANTLR Project. All rights reserved.
150
148
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
151
- */var a=dt&&dt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=dt&&dt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(dt,"__esModule",{value:!0}),dt.InputMismatchException=void 0;const y=Ar(),m=pe();let h=class extends y.RecognitionException{constructor(r,o,t){t===void 0&&(t=r.context),super(r,r.inputStream,t),o!==void 0&&this.setOffendingState(o),this.setOffendingToken(r,r.currentToken)}};return h=a([d(0,m.NotNull)],h),dt.InputMismatchException=h,dt}var mt={},kr={},Us={},wl;function Ea(){return wl||(wl=1,(function(a){/*!
149
+ */var a=Fr&&Fr.__decorate||function(g,_,A,E){var N=arguments.length,b=N<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,A):E,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,_,A,E);else for(var P=g.length-1;P>=0;P--)(w=g[P])&&(b=(N<3?w(b):N>3?w(_,A,b):w(_,A))||b);return N>3&&b&&Object.defineProperty(_,A,b),b};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.ATNConfigSet=void 0;const d=Gn(),y=Ar(),m=no(),h=lt(),u=io(),r=vr(),o=pe(),t=at(),i=ot(),e=Ea(),s=Yn(),l=Ue(),c=ut();class p{hashCode(_){return _.state^_.alt}equals(_,A){return _.state===A.state&&_.alt===A.alt}}p.INSTANCE=new p;function v(g){return g?new d.Array2DHashMap(g):new d.Array2DHashMap(p.INSTANCE)}let x=class aa{constructor(_,A){this._uniqueAlt=0,this._hasSemanticContext=!1,this._dipsIntoOuterContext=!1,this.outermostConfigSet=!1,this.cachedHashCode=-1,_?(A?(this.mergedConfigs=void 0,this.unmerged=void 0):_.isReadOnly?(this.mergedConfigs=v(),this.unmerged=[]):(this.mergedConfigs=v(_.mergedConfigs),this.unmerged=_.unmerged.slice(0)),this.configs=_.configs.slice(0),this._dipsIntoOuterContext=_._dipsIntoOuterContext,this._hasSemanticContext=_._hasSemanticContext,this.outermostConfigSet=_.outermostConfigSet,(A||!_.isReadOnly)&&(this._uniqueAlt=_._uniqueAlt,this._conflictInfo=_._conflictInfo)):(this.mergedConfigs=v(),this.unmerged=[],this.configs=[],this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER)}getRepresentedAlternatives(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts.clone();let _=new r.BitSet;for(let A of this)_.set(A.alt);return _}get isReadOnly(){return this.mergedConfigs==null}get isOutermostConfigSet(){return this.outermostConfigSet}set isOutermostConfigSet(_){if(this.outermostConfigSet&&!_)throw new Error("IllegalStateException");l(!_||!this._dipsIntoOuterContext),this.outermostConfigSet=_}getStates(){let _=new y.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE);for(let A of this.configs)_.add(A.state);return _}optimizeConfigs(_){if(this.configs.length!==0)for(let A of this.configs)A.context=_.atn.getCachedContext(A.context)}clone(_){let A=new aa(this,_);return!_&&this.isReadOnly&&A.addAll(this.configs),A}get size(){return this.configs.length}get isEmpty(){return this.configs.length===0}contains(_){if(!(_ instanceof u.ATNConfig))return!1;if(this.mergedConfigs&&this.unmerged){let A=_,E=this.getKey(A),N=this.mergedConfigs.get(E);if(N!=null&&this.canMerge(A,E,N))return N.contains(A);for(let b of this.unmerged)if(b.contains(_))return!0}else for(let A of this.configs)if(A.contains(_))return!0;return!1}*[Symbol.iterator](){yield*this.configs}toArray(){return this.configs}add(_,A){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");l(!this.outermostConfigSet||!_.reachesIntoOuterContext),A==null&&(A=e.PredictionContextCache.UNCACHED);let E,N=this.getKey(_),b=this.mergedConfigs.get(N);if(E=b==null,b!=null&&this.canMerge(_,N,b)){b.outerContextDepth=Math.max(b.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(b.isPrecedenceFilterSuppressed=!0);let w=i.PredictionContext.join(b.context,_.context,A);return this.updatePropertiesForMergedConfig(_),b.context===w?!1:(b.context=w,!0)}for(let w=0;w<this.unmerged.length;w++){let P=this.unmerged[w];if(this.canMerge(_,N,P)){P.outerContextDepth=Math.max(P.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(P.isPrecedenceFilterSuppressed=!0);let j=i.PredictionContext.join(P.context,_.context,A);return this.updatePropertiesForMergedConfig(_),P.context===j?!1:(P.context=j,E&&(this.mergedConfigs.put(N,P),this.unmerged.splice(w,1)),!0)}}return this.configs.push(_),E?this.mergedConfigs.put(N,_):this.unmerged.push(_),this.updatePropertiesForAddedConfig(_),!0}updatePropertiesForMergedConfig(_){this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}updatePropertiesForAddedConfig(_){this.configs.length===1?this._uniqueAlt=_.alt:this._uniqueAlt!==_.alt&&(this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER),this._hasSemanticContext=this._hasSemanticContext||!s.SemanticContext.NONE.equals(_.semanticContext),this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}canMerge(_,A,E){return _.state.stateNumber!==E.state.stateNumber||A.alt!==E.alt?!1:_.semanticContext.equals(E.semanticContext)}getKey(_){return{state:_.state.stateNumber,alt:_.alt}}containsAll(_){for(let A of _)if(!(A instanceof u.ATNConfig)||!this.contains(A))return!1;return!0}addAll(_,A){this.ensureWritable();let E=!1;for(let N of _)this.add(N,A)&&(E=!0);return E}clear(){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");this.mergedConfigs.clear(),this.unmerged.length=0,this.configs.length=0,this._dipsIntoOuterContext=!1,this._hasSemanticContext=!1,this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER,this._conflictInfo=void 0}equals(_){return this===_?!0:_ instanceof aa?this.outermostConfigSet===_.outermostConfigSet&&c.equals(this._conflictInfo,_._conflictInfo)&&m.ArrayEqualityComparator.INSTANCE.equals(this.configs,_.configs):!1}hashCode(){if(this.isReadOnly&&this.cachedHashCode!==-1)return this.cachedHashCode;let _=1;return _=5*_^(this.outermostConfigSet?1:0),_=5*_^m.ArrayEqualityComparator.INSTANCE.hashCode(this.configs),this.isReadOnly&&(this.cachedHashCode=_),_}toString(_){_==null&&(_=!1);let A="",E=this.configs.slice(0);E.sort((N,b)=>N.alt!==b.alt?N.alt-b.alt:N.state.stateNumber!==b.state.stateNumber?N.state.stateNumber-b.state.stateNumber:N.semanticContext.toString().localeCompare(b.semanticContext.toString())),A+="[";for(let N=0;N<E.length;N++)N>0&&(A+=", "),A+=E[N].toString(void 0,!0,_);return A+="]",this._hasSemanticContext&&(A+=",hasSemanticContext="+this._hasSemanticContext),this._uniqueAlt!==h.ATN.INVALID_ALT_NUMBER&&(A+=",uniqueAlt="+this._uniqueAlt),this._conflictInfo!=null&&(A+=",conflictingAlts="+this._conflictInfo.conflictedAlts,this._conflictInfo.isExact||(A+="*")),this._dipsIntoOuterContext&&(A+=",dipsIntoOuterContext"),A.toString()}get uniqueAlt(){return this._uniqueAlt}get hasSemanticContext(){return this._hasSemanticContext}set hasSemanticContext(_){this.ensureWritable(),this._hasSemanticContext=_}get conflictInfo(){return this._conflictInfo}set conflictInfo(_){this.ensureWritable(),this._conflictInfo=_}get conflictingAlts(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts}get isExactConflict(){return this._conflictInfo==null?!1:this._conflictInfo.isExact}get dipsIntoOuterContext(){return this._dipsIntoOuterContext}get(_){return this.configs[_]}ensureWritable(){if(this.isReadOnly)throw new Error("This ATNConfigSet is read only.")}};return a([o.NotNull],x.prototype,"getRepresentedAlternatives",null),a([o.Override],x.prototype,"size",null),a([o.Override],x.prototype,"isEmpty",null),a([o.Override],x.prototype,"contains",null),a([o.Override],x.prototype,Symbol.iterator,null),a([o.Override],x.prototype,"toArray",null),a([o.Override],x.prototype,"containsAll",null),a([o.Override],x.prototype,"clear",null),a([o.Override],x.prototype,"equals",null),a([o.Override],x.prototype,"hashCode",null),Fr.ATNConfigSet=x,Fr}var kr={},Mr={},qr={},Ol;function oo(){return Ol||(Ol=1,(function(a){/*!
152
150
  * Copyright 2016 The ANTLR Project. All rights reserved.
153
151
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
154
- */Object.defineProperty(a,"__esModule",{value:!0}),a.Arrays=void 0,(function(d){function y(u,r,o,t){return m(u,o!==void 0?o:0,t!==void 0?t:u.length,r)}d.binarySearch=y;function m(u,r,o,t){let i=r,e=o-1;for(;i<=e;){let s=i+e>>>1,l=u[s];if(l<t)i=s+1;else if(l>t)e=s-1;else return s}return-(i+1)}function h(u){let r="[",o=!0;for(let t of u)o?o=!1:r+=", ",t===null?r+="null":t===void 0?r+="undefined":r+=t;return r+="]",r}d.toString=h})(a.Arrays||(a.Arrays={}))})(Us)),Us}var Rl;function Sa(){if(Rl)return kr;Rl=1;/*!
152
+ */var d=qr&&qr.__decorate||function(e,s,l,c){var p=arguments.length,v=p<3?s:c===null?c=Object.getOwnPropertyDescriptor(s,l):c,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,l,c);else for(var g=e.length-1;g>=0;g--)(x=e[g])&&(v=(p<3?x(v):p>3?x(s,l,v):x(s,l))||v);return p>3&&v&&Object.defineProperty(s,l,v),v},y=qr&&qr.__param||function(e,s){return function(l,c){s(l,c,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DFAState=void 0;const m=lt(),h=vr(),u=ke(),r=pe(),o=ot(),t=Ue();let i=class X0{constructor(s){this.stateNumber=-1,this.configs=s,this.edges=new Map,this.contextEdges=new Map}get isContextSensitive(){return!!this.contextSymbols}isContextSymbol(s){return this.isContextSensitive?this.contextSymbols.get(s):!1}setContextSymbol(s){t(this.isContextSensitive),this.contextSymbols.set(s)}setContextSensitive(s){t(!this.configs.isOutermostConfigSet),!this.isContextSensitive&&(this.contextSymbols||(this.contextSymbols=new h.BitSet))}get acceptStateInfo(){return this._acceptStateInfo}set acceptStateInfo(s){this._acceptStateInfo=s}get isAcceptState(){return!!this._acceptStateInfo}get prediction(){return this._acceptStateInfo?this._acceptStateInfo.prediction:m.ATN.INVALID_ALT_NUMBER}get lexerActionExecutor(){if(this._acceptStateInfo)return this._acceptStateInfo.lexerActionExecutor}getTarget(s){return this.edges.get(s)}setTarget(s,l){this.edges.set(s,l)}getEdgeMap(){return this.edges}getContextTarget(s){return s===o.PredictionContext.EMPTY_FULL_STATE_KEY&&(s=-1),this.contextEdges.get(s)}setContextTarget(s,l){if(!this.isContextSensitive)throw new Error("The state is not context sensitive.");s===o.PredictionContext.EMPTY_FULL_STATE_KEY&&(s=-1),this.contextEdges.set(s,l)}getContextEdgeMap(){let s=new Map(this.contextEdges),l=s.get(-1);if(l!==void 0)if(s.size===1){let c=new Map;return c.set(o.PredictionContext.EMPTY_FULL_STATE_KEY,l),c}else s.delete(-1),s.set(o.PredictionContext.EMPTY_FULL_STATE_KEY,l);return s}hashCode(){let s=u.MurmurHash.initialize(7);return s=u.MurmurHash.update(s,this.configs.hashCode()),s=u.MurmurHash.finish(s,1),s}equals(s){if(this===s)return!0;if(!(s instanceof X0))return!1;let l=s;return this.configs.equals(l.configs)}toString(){let s="";return s+=this.stateNumber+":"+this.configs,this.isAcceptState&&(s+="=>",this.predicates?s+=this.predicates:s+=this.prediction),s.toString()}};d([r.NotNull],i.prototype,"configs",void 0),d([r.NotNull],i.prototype,"edges",void 0),d([r.NotNull],i.prototype,"contextEdges",void 0),d([r.Override],i.prototype,"hashCode",null),d([r.Override],i.prototype,"equals",null),d([r.Override],i.prototype,"toString",null),a.DFAState=i,(function(e){let s=class{constructor(c,p){this.alt=p,this.pred=c}toString(){return"("+this.pred+", "+this.alt+")"}};d([r.NotNull],s.prototype,"pred",void 0),d([r.Override],s.prototype,"toString",null),s=d([y(0,r.NotNull)],s),e.PredPrediction=s})(i=a.DFAState||(a.DFAState={}))})(qr)),qr}var Dl;function so(){return Dl||(Dl=1,(function(a){/*!
155
153
  * Copyright 2016 The ANTLR Project. All rights reserved.
156
154
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
157
- */var a=kr&&kr.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(kr,"__esModule",{value:!0}),kr.IntegerList=void 0;const d=Ea(),y=pe(),m=new Int32Array(0),h=4,u=(1<<31>>>0)-1-8;let r=class Qi{constructor(t){if(!t)this._data=m,this._size=0;else if(t instanceof Qi)this._data=t._data.slice(0),this._size=t._size;else if(typeof t=="number")t===0?(this._data=m,this._size=0):(this._data=new Int32Array(t),this._size=0);else{this._data=m,this._size=0;for(let i of t)this.add(i)}}add(t){this._data.length===this._size&&this.ensureCapacity(this._size+1),this._data[this._size]=t,this._size++}addAll(t){if(Array.isArray(t))this.ensureCapacity(this._size+t.length),this._data.subarray(this._size,this._size+t.length).set(t),this._size+=t.length;else if(t instanceof Qi)this.ensureCapacity(this._size+t._size),this._data.subarray(this._size,this._size+t.size).set(t._data),this._size+=t._size;else{this.ensureCapacity(this._size+t.size);let i=0;for(let e of t)this._data[this._size+i]=e,i++;this._size+=t.size}}get(t){if(t<0||t>=this._size)throw RangeError();return this._data[t]}contains(t){for(let i=0;i<this._size;i++)if(this._data[i]===t)return!0;return!1}set(t,i){if(t<0||t>=this._size)throw RangeError();let e=this._data[t];return this._data[t]=i,e}removeAt(t){let i=this.get(t);return this._data.copyWithin(t,t+1,this._size),this._data[this._size-1]=0,this._size--,i}removeRange(t,i){if(t<0||i<0||t>this._size||i>this._size||t>i)throw RangeError();this._data.copyWithin(i,t,this._size),this._data.fill(0,this._size-(i-t),this._size),this._size-=i-t}get isEmpty(){return this._size===0}get size(){return this._size}trimToSize(){this._data.length!==this._size&&(this._data=this._data.slice(0,this._size))}clear(){this._data.fill(0,0,this._size),this._size=0}toArray(){return this._size===0?[]:Array.from(this._data.subarray(0,this._size))}sort(){this._data.subarray(0,this._size).sort()}equals(t){if(t===this)return!0;if(!(t instanceof Qi)||this._size!==t._size)return!1;for(let i=0;i<this._size;i++)if(this._data[i]!==t._data[i])return!1;return!0}hashCode(){let t=1;for(let i=0;i<this._size;i++)t=31*t+this._data[i];return t}toString(){return this._data.toString()}binarySearch(t,i,e){if(i===void 0&&(i=0),e===void 0&&(e=this._size),i<0||e<0||i>this._size||e>this._size)throw new RangeError;if(i>e)throw new RangeError;return d.Arrays.binarySearch(this._data,t,i,e)}ensureCapacity(t){if(t<0||t>u)throw new RangeError;let i;for(this._data.length===0?i=h:i=this._data.length;i<t;)i=i*2,(i<0||i>u)&&(i=u);let e=new Int32Array(i);e.set(this._data),this._data=e}toCharArray(){let t=new Uint16Array(this._size),i=0,e=!1;for(let s=0;s<this._size;s++){let l=this._data[s];if(l>=0&&l<65536){t[i]=l,i++;continue}if(!e){let p=new Uint16Array(this.charArraySize());p.set(t,0),t=p,e=!0}let c=String.fromCodePoint(l);t[i]=c.charCodeAt(0),t[i+1]=c.charCodeAt(1),i+=2}return t}charArraySize(){let t=0;for(let i=0;i<this._size;i++)t+=this._data[i]>=65536?2:1;return t}};return a([y.NotNull],r.prototype,"_data",void 0),a([y.Override],r.prototype,"equals",null),a([y.Override],r.prototype,"hashCode",null),a([y.Override],r.prototype,"toString",null),kr.IntegerList=r,kr}var Mr={},ti={},yt={},Pl;function Li(){if(Pl)return yt;Pl=1;/*!
155
+ */var d=Mr&&Mr.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c},y=Mr&&Mr.__param||function(t,i){return function(e,s){i(e,s,t)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ATNSimulator=void 0;const m=Li(),h=oo(),u=pe(),r=ot();let o=class Ci{constructor(i){this.atn=i}static get ERROR(){return Ci._ERROR||(Ci._ERROR=new h.DFAState(new m.ATNConfigSet),Ci._ERROR.stateNumber=r.PredictionContext.EMPTY_FULL_STATE_KEY),Ci._ERROR}clearDFA(){this.atn.clearDFA()}};d([u.NotNull],o.prototype,"atn",void 0),d([u.NotNull],o,"ERROR",null),o=d([y(0,u.NotNull)],o),a.ATNSimulator=o,o=a.ATNSimulator||(a.ATNSimulator={}),a.ATNSimulator=o})(Mr)),Mr}var ht={},ni={},wl;function K0(){if(wl)return ni;wl=1;/*!
158
156
  * Copyright 2016 The ANTLR Project. All rights reserved.
159
157
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
160
- */var a=yt&&yt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=yt&&yt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(yt,"__esModule",{value:!0}),yt.CommonToken=void 0;const y=Ve(),m=pe(),h=Ie();let u=class bi{constructor(o,t,i=bi.EMPTY_SOURCE,e=h.Token.DEFAULT_CHANNEL,s=0,l=0){this._line=0,this._charPositionInLine=-1,this._channel=h.Token.DEFAULT_CHANNEL,this.index=-1,this._text=t,this._type=o,this.source=i,this._channel=e,this.start=s,this.stop=l,i.source!=null&&(this._line=i.source.line,this._charPositionInLine=i.source.charPositionInLine)}static fromToken(o){let t=new bi(o.type,void 0,bi.EMPTY_SOURCE,o.channel,o.startIndex,o.stopIndex);return t._line=o.line,t.index=o.tokenIndex,t._charPositionInLine=o.charPositionInLine,o instanceof bi?(t._text=o._text,t.source=o.source):(t._text=o.text,t.source={source:o.tokenSource,stream:o.inputStream}),t}get type(){return this._type}set type(o){this._type=o}get line(){return this._line}set line(o){this._line=o}get text(){if(this._text!=null)return this._text;let o=this.inputStream;if(o==null)return;let t=o.size;return this.start<t&&this.stop<t?o.getText(y.Interval.of(this.start,this.stop)):"<EOF>"}set text(o){this._text=o}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(o){this._charPositionInLine=o}get channel(){return this._channel}set channel(o){this._channel=o}get startIndex(){return this.start}set startIndex(o){this.start=o}get stopIndex(){return this.stop}set stopIndex(o){this.stop=o}get tokenIndex(){return this.index}set tokenIndex(o){this.index=o}get tokenSource(){return this.source.source}get inputStream(){return this.source.stream}toString(o){let t="";this._channel>0&&(t=",channel="+this._channel);let i=this.text;i!=null?(i=i.replace(/\n/g,"\\n"),i=i.replace(/\r/g,"\\r"),i=i.replace(/\t/g,"\\t")):i="<no text>";let e=String(this._type);return o&&(e=o.vocabulary.getDisplayName(this._type)),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+i+"',<"+e+">"+t+","+this._line+":"+this.charPositionInLine+"]"}};return u.EMPTY_SOURCE={source:void 0,stream:void 0},a([m.NotNull],u.prototype,"source",void 0),a([m.Override],u.prototype,"type",null),a([m.Override],u.prototype,"line",null),a([m.Override],u.prototype,"text",null),a([m.Override],u.prototype,"charPositionInLine",null),a([m.Override],u.prototype,"channel",null),a([m.Override],u.prototype,"startIndex",null),a([m.Override],u.prototype,"stopIndex",null),a([m.Override],u.prototype,"tokenIndex",null),a([m.Override],u.prototype,"tokenSource",null),a([m.Override],u.prototype,"inputStream",null),a([m.Override],u.prototype,"toString",null),a([d(0,m.NotNull)],u,"fromToken",null),u=a([d(2,m.NotNull)],u),yt.CommonToken=u,yt}var Fl;function Ta(){return Fl||(Fl=1,(function(a){/*!
158
+ */Object.defineProperty(ni,"__esModule",{value:!0}),ni.ConsoleErrorListener=void 0;let a=class{syntaxError(y,m,h,u,r,o){console.error(`line ${h}:${u} ${r}`)}};return ni.ConsoleErrorListener=a,a.INSTANCE=new a,ni}var xt={},Rl;function Sa(){if(Rl)return xt;Rl=1;/*!
161
159
  * Copyright 2016 The ANTLR Project. All rights reserved.
162
160
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
163
- */var d=ti&&ti.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(a,"__esModule",{value:!0}),a.CommonTokenFactory=void 0;const y=Li(),m=Ve(),h=pe();let u=class{constructor(o=!1){this.copyText=o}create(o,t,i,e,s,l,c,p){let v=new y.CommonToken(t,i,o,e,s,l);return v.line=c,v.charPositionInLine=p,i==null&&this.copyText&&o.stream!=null&&(v.text=o.stream.getText(m.Interval.of(s,l))),v}createSimple(o,t){return new y.CommonToken(o,t)}};d([h.Override],u.prototype,"create",null),d([h.Override],u.prototype,"createSimple",null),a.CommonTokenFactory=u,(function(r){r.DEFAULT=new r})(u=a.CommonTokenFactory||(a.CommonTokenFactory={}))})(ti)),ti}var ri={},Il;function K0(){if(Il)return ri;Il=1;/*!
161
+ */var a=xt&&xt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=xt&&xt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(xt,"__esModule",{value:!0}),xt.ProxyErrorListener=void 0;const y=pe();let m=class{constructor(u){if(this.delegates=u,!u)throw new Error("Invalid delegates")}getDelegates(){return this.delegates}syntaxError(u,r,o,t,i,e){this.delegates.forEach(s=>{s.syntaxError&&s.syntaxError(u,r,o,t,i,e)})}};return a([y.Override,d(0,y.NotNull),d(4,y.NotNull)],m.prototype,"syntaxError",null),xt.ProxyErrorListener=m,xt}var Pl;function Bi(){if(Pl)return ht;Pl=1;/*!
164
162
  * Copyright 2016 The ANTLR Project. All rights reserved.
165
163
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
166
- */Object.defineProperty(ri,"__esModule",{value:!0}),ri.IntegerStack=void 0;const a=Sa();let d=class extends a.IntegerList{constructor(m){super(m)}push(m){this.add(m)}pop(){return this.removeAt(this.size-1)}peek(){return this.get(this.size-1)}};return ri.IntegerStack=d,ri}var qr={},ni={},Ll;function J0(){if(Ll)return ni;Ll=1;/*!
164
+ */var a=ht&&ht.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c},d=ht&&ht.__param||function(t,i){return function(e,s){i(e,s,t)}};Object.defineProperty(ht,"__esModule",{value:!0}),ht.Recognizer=void 0;const y=K0(),m=Sa(),h=pe(),u=Ie(),r=ut();let o=class Oi{constructor(){this._listeners=[y.ConsoleErrorListener.INSTANCE],this._stateNumber=-1}getTokenTypeMap(){let i=this.vocabulary,e=Oi.tokenTypeMapCache.get(i);if(e==null){let s=new Map;for(let l=0;l<=this.atn.maxTokenType;l++){let c=i.getLiteralName(l);c!=null&&s.set(c,l);let p=i.getSymbolicName(l);p!=null&&s.set(p,l)}s.set("EOF",u.Token.EOF),e=s,Oi.tokenTypeMapCache.set(i,e)}return e}getRuleIndexMap(){let i=this.ruleNames;if(i==null)throw new Error("The current recognizer does not provide a list of rule names.");let e=Oi.ruleIndexMapCache.get(i);return e==null&&(e=r.toMap(i),Oi.ruleIndexMapCache.set(i,e)),e}getTokenType(i){let e=this.getTokenTypeMap().get(i);return e??u.Token.INVALID_TYPE}get serializedATN(){throw new Error("there is no serialized ATN")}get atn(){return this._interp.atn}get interpreter(){return this._interp}set interpreter(i){this._interp=i}get parseInfo(){return Promise.resolve(void 0)}getErrorHeader(i){let e=i.getOffendingToken();if(!e)return"";let s=e.line,l=e.charPositionInLine;return"line "+s+":"+l}addErrorListener(i){if(!i)throw new TypeError("listener must not be null");this._listeners.push(i)}removeErrorListener(i){let e=this._listeners.indexOf(i);e!==-1&&this._listeners.splice(e,1)}removeErrorListeners(){this._listeners.length=0}getErrorListeners(){return this._listeners.slice(0)}getErrorListenerDispatch(){return new m.ProxyErrorListener(this.getErrorListeners())}sempred(i,e,s){return!0}precpred(i,e){return!0}action(i,e,s){}get state(){return this._stateNumber}set state(i){this._stateNumber=i}};return o.EOF=-1,o.tokenTypeMapCache=new WeakMap,o.ruleIndexMapCache=new WeakMap,a([h.SuppressWarnings("serial"),h.NotNull],o.prototype,"_listeners",void 0),a([h.NotNull],o.prototype,"getTokenTypeMap",null),a([h.NotNull],o.prototype,"getRuleIndexMap",null),a([h.NotNull],o.prototype,"serializedATN",null),a([h.NotNull],o.prototype,"atn",null),a([h.NotNull,d(0,h.NotNull)],o.prototype,"interpreter",null),a([h.NotNull,d(0,h.NotNull)],o.prototype,"getErrorHeader",null),a([d(0,h.NotNull)],o.prototype,"addErrorListener",null),a([d(0,h.NotNull)],o.prototype,"removeErrorListener",null),a([h.NotNull],o.prototype,"getErrorListeners",null),ht.Recognizer=o,ht}var jr={},Fl;function Er(){if(Fl)return jr;Fl=1;/*!
167
165
  * Copyright 2016 The ANTLR Project. All rights reserved.
168
166
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
169
- */Object.defineProperty(ni,"__esModule",{value:!0}),ni.AcceptStateInfo=void 0;let a=class{constructor(y,m){this._prediction=y,this._lexerActionExecutor=m}get prediction(){return this._prediction}get lexerActionExecutor(){return this._lexerActionExecutor}};return ni.AcceptStateInfo=a,ni}var jr={},ii={},Bl;function Yn(){if(Bl)return ii;Bl=1;/*!
167
+ */var a=jr&&jr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(jr,"__esModule",{value:!0}),jr.VocabularyImpl=void 0;const d=pe(),y=Ie();let m=class{constructor(u,r,o){this.literalNames=u,this.symbolicNames=r,this.displayNames=o,this._maxTokenType=Math.max(this.displayNames.length,Math.max(this.literalNames.length,this.symbolicNames.length))-1}get maxTokenType(){return this._maxTokenType}getLiteralName(u){if(u>=0&&u<this.literalNames.length)return this.literalNames[u]}getSymbolicName(u){if(u>=0&&u<this.symbolicNames.length)return this.symbolicNames[u];if(u===y.Token.EOF)return"EOF"}getDisplayName(u){if(u>=0&&u<this.displayNames.length){let t=this.displayNames[u];if(t)return t}let r=this.getLiteralName(u);if(r)return r;let o=this.getSymbolicName(u);return o||String(u)}};return m.EMPTY_VOCABULARY=new m([],[],[]),a([d.NotNull],m.prototype,"literalNames",void 0),a([d.NotNull],m.prototype,"symbolicNames",void 0),a([d.NotNull],m.prototype,"displayNames",void 0),a([d.Override],m.prototype,"maxTokenType",null),a([d.Override],m.prototype,"getLiteralName",null),a([d.Override],m.prototype,"getSymbolicName",null),a([d.Override,d.NotNull],m.prototype,"getDisplayName",null),a([d.NotNull],m,"EMPTY_VOCABULARY",void 0),jr.VocabularyImpl=m,jr}var Il;function J0(){if(Il)return kr;Il=1;/*!
170
168
  * Copyright 2016 The ANTLR Project. All rights reserved.
171
169
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
172
- */Object.defineProperty(ii,"__esModule",{value:!0}),ii.Array2DHashMap=void 0;const a=Er();class d{constructor(h){this.keyComparator=h}hashCode(h){return this.keyComparator.hashCode(h.key)}equals(h,u){return this.keyComparator.equals(h.key,u.key)}}let y=class oa{constructor(h){h instanceof oa?this.backingStore=new a.Array2DHashSet(h.backingStore):this.backingStore=new a.Array2DHashSet(new d(h))}clear(){this.backingStore.clear()}containsKey(h){return this.backingStore.contains({key:h})}get(h){let u=this.backingStore.get({key:h});if(u)return u.value}get isEmpty(){return this.backingStore.isEmpty}put(h,u){let r=this.backingStore.get({key:h,value:u}),o;return r?(o=r.value,r.value=u):this.backingStore.add({key:h,value:u}),o}putIfAbsent(h,u){let r=this.backingStore.get({key:h,value:u}),o;return r?o=r.value:this.backingStore.add({key:h,value:u}),o}get size(){return this.backingStore.size}hashCode(){return this.backingStore.hashCode()}equals(h){return h instanceof oa?this.backingStore.equals(h.backingStore):!1}};return ii.Array2DHashMap=y,ii}var gt={},$r={},_t={},oi={},kl;function kn(){if(kl)return oi;kl=1;/*!
170
+ */var a=kr&&kr.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(kr,"__esModule",{value:!0}),kr.DFASerializer=void 0;const d=so(),y=pe(),m=ot(),h=Bi(),u=Er();let r=class{constructor(t,i,e,s){i instanceof h.Recognizer?(e=i.ruleNames,s=i.atn,i=i.vocabulary):i||(i=u.VocabularyImpl.EMPTY_VOCABULARY),this.dfa=t,this.vocabulary=i,this.ruleNames=e,this.atn=s}toString(){if(!this.dfa.s0)return"";let t="";if(this.dfa.states){let e=new Array(...this.dfa.states.toArray());e.sort((s,l)=>s.stateNumber-l.stateNumber);for(let s of e){let l=s.getEdgeMap(),c=[...l.keys()].sort((x,g)=>x-g),p=s.getContextEdgeMap(),v=[...p.keys()].sort((x,g)=>x-g);for(let x of c){let g=l.get(x);if((g==null||g===d.ATNSimulator.ERROR)&&!s.isContextSymbol(x))continue;let _=!1;t+=this.getStateString(s)+"-"+this.getEdgeLabel(x)+"->",s.isContextSymbol(x)&&(t+="!",_=!0);let A=g;A&&A.stateNumber!==d.ATNSimulator.ERROR.stateNumber?t+=this.getStateString(A)+`
171
+ `:_&&(t+=`ctx
172
+ `)}if(s.isContextSensitive)for(let x of v)t+=this.getStateString(s)+"-"+this.getContextLabel(x)+"->"+this.getStateString(p.get(x))+`
173
+ `}}let i=t;return i.length===0?"":i}getContextLabel(t){if(t===m.PredictionContext.EMPTY_FULL_STATE_KEY)return"ctx:EMPTY_FULL";if(t===m.PredictionContext.EMPTY_LOCAL_STATE_KEY)return"ctx:EMPTY_LOCAL";if(this.atn&&t>0&&t<=this.atn.states.length){let e=this.atn.states[t].ruleIndex;if(this.ruleNames&&e>=0&&e<this.ruleNames.length)return"ctx:"+String(t)+"("+this.ruleNames[e]+")"}return"ctx:"+String(t)}getEdgeLabel(t){return this.vocabulary.getDisplayName(t)}getStateString(t){if(t===d.ATNSimulator.ERROR)return"ERROR";let i=t.stateNumber,e="s"+i;if(t.isAcceptState&&(t.predicates?e=":s"+i+"=>"+t.predicates:e=":s"+i+"=>"+t.prediction),t.isContextSensitive){e+="*";for(let s of t.configs)if(s.reachesIntoOuterContext){e+="*";break}}return e}};return a([y.NotNull],r.prototype,"dfa",void 0),a([y.NotNull],r.prototype,"vocabulary",void 0),a([y.Override],r.prototype,"toString",null),kr.DFASerializer=r,kr}var dt={},Ll;function wh(){if(Ll)return dt;Ll=1;/*!
173
174
  * Copyright 2016 The ANTLR Project. All rights reserved.
174
175
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
175
- */Object.defineProperty(oi,"__esModule",{value:!0}),oi.DecisionState=void 0;const a=dr();let d=class extends a.ATNState{constructor(){super(...arguments),this.decision=-1,this.nonGreedy=!1,this.sll=!1}};return oi.DecisionState=d,oi}var Ur={},si={},Ml;function ba(){return Ml||(Ml=1,(function(a){/*!
176
+ */var a=dt&&dt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=dt&&dt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(dt,"__esModule",{value:!0}),dt.LexerDFASerializer=void 0;const y=J0(),m=pe(),h=Er();let u=class extends y.DFASerializer{constructor(o){super(o,h.VocabularyImpl.EMPTY_VOCABULARY)}getEdgeLabel(o){return"'"+String.fromCodePoint(o)+"'"}};return a([m.Override,m.NotNull],u.prototype,"getEdgeLabel",null),u=a([d(0,m.NotNull)],u),dt.LexerDFASerializer=u,dt}var $r={},js={},Bl;function qe(){return Bl||(Bl=1,(function(a){/*!
176
177
  * Copyright 2016 The ANTLR Project. All rights reserved.
177
178
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
178
- */var d=si&&si.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c};Object.defineProperty(a,"__esModule",{value:!0}),a.PredictionContextCache=void 0;const y=Yn(),m=pe(),h=at(),u=ot(),r=Ue();let o=class sa{constructor(i=!0){this.contexts=new y.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.childContexts=new y.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.joinContexts=new y.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.enableCache=i}getAsCached(i){if(!this.enableCache)return i;let e=this.contexts.get(i);return e||(e=i,this.contexts.put(i,i)),e}getChild(i,e){if(!this.enableCache)return i.getChild(e);let s=new sa.PredictionContextAndInt(i,e),l=this.childContexts.get(s);return l||(l=i.getChild(e),l=this.getAsCached(l),this.childContexts.put(s,l)),l}join(i,e){if(!this.enableCache)return u.PredictionContext.join(i,e,this);let s=new sa.IdentityCommutativePredictionContextOperands(i,e),l=this.joinContexts.get(s);return l||(l=u.PredictionContext.join(i,e,this),l=this.getAsCached(l),this.joinContexts.put(s,l),l)}};a.PredictionContextCache=o,o.UNCACHED=new o(!1),(function(t){class i{constructor(l,c){this.obj=l,this.value=c}equals(l){if(l instanceof i){if(l===this)return!0}else return!1;let c=l;return this.value===c.value&&(this.obj===c.obj||this.obj!=null&&this.obj.equals(c.obj))}hashCode(){let l=5;return l=7*l+(this.obj!=null?this.obj.hashCode():0),l=7*l+this.value,l}}d([m.Override],i.prototype,"equals",null),d([m.Override],i.prototype,"hashCode",null),t.PredictionContextAndInt=i;class e{constructor(l,c){r(l!=null),r(c!=null),this._x=l,this._y=c}get x(){return this._x}get y(){return this._y}equals(l){if(l instanceof e){if(this===l)return!0}else return!1;let c=l;return this._x===c._x&&this._y===c._y||this._x===c._y&&this._y===c._x}hashCode(){return this._x.hashCode()^this._y.hashCode()}}d([m.Override],e.prototype,"equals",null),d([m.Override],e.prototype,"hashCode",null),t.IdentityCommutativePredictionContextOperands=e})(o=a.PredictionContextCache||(a.PredictionContextCache={}))})(si)),si}var ql;function ot(){return ql||(ql=1,(function(a){/*!
179
+ */Object.defineProperty(a,"__esModule",{value:!0}),a.ATNStateType=void 0,(function(d){d[d.INVALID_TYPE=0]="INVALID_TYPE",d[d.BASIC=1]="BASIC",d[d.RULE_START=2]="RULE_START",d[d.BLOCK_START=3]="BLOCK_START",d[d.PLUS_BLOCK_START=4]="PLUS_BLOCK_START",d[d.STAR_BLOCK_START=5]="STAR_BLOCK_START",d[d.TOKEN_START=6]="TOKEN_START",d[d.RULE_STOP=7]="RULE_STOP",d[d.BLOCK_END=8]="BLOCK_END",d[d.STAR_LOOP_BACK=9]="STAR_LOOP_BACK",d[d.STAR_LOOP_ENTRY=10]="STAR_LOOP_ENTRY",d[d.PLUS_LOOP_BACK=11]="PLUS_LOOP_BACK",d[d.LOOP_END=12]="LOOP_END"})(a.ATNStateType||(a.ATNStateType={}))})(js)),js}var kl;function Ta(){if(kl)return $r;kl=1;/*!
179
180
  * Copyright 2016 The ANTLR Project. All rights reserved.
180
181
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
181
- */var d=Ur&&Ur.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var b=v.length-1;b>=0;b--)(N=v[b])&&(E=(A<3?N(E):A>3?N(x,g,E):N(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},y=Ur&&Ur.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SingletonPredictionContext=a.PredictionContext=void 0;const m=Yn(),h=Er(),u=Ea(),r=ke(),o=pe(),t=ba(),i=Ue(),e=1;let s=class $e{constructor(x){this.cachedHashCode=x}static calculateEmptyHashCode(){let x=r.MurmurHash.initialize(e);return x=r.MurmurHash.finish(x,0),x}static calculateSingleHashCode(x,g){let _=r.MurmurHash.initialize(e);return _=r.MurmurHash.update(_,x),_=r.MurmurHash.update(_,g),_=r.MurmurHash.finish(_,2),_}static calculateHashCode(x,g){let _=r.MurmurHash.initialize(e);for(let A of x)_=r.MurmurHash.update(_,A);for(let A of g)_=r.MurmurHash.update(_,A);return _=r.MurmurHash.finish(_,2*x.length),_}static fromRuleContext(x,g,_=!0){if(g.isEmpty)return _?$e.EMPTY_FULL:$e.EMPTY_LOCAL;let A;g._parent?A=$e.fromRuleContext(x,g._parent,_):A=_?$e.EMPTY_FULL:$e.EMPTY_LOCAL;let N=x.states[g.invokingState].transition(0);return A.getChild(N.followState.stateNumber)}static addEmptyContext(x){return x.addEmptyContext()}static removeEmptyContext(x){return x.removeEmptyContext()}static join(x,g,_=t.PredictionContextCache.UNCACHED){if(x===g)return x;if(x.isEmpty)return $e.isEmptyLocal(x)?x:$e.addEmptyContext(g);if(g.isEmpty)return $e.isEmptyLocal(g)?g:$e.addEmptyContext(x);let A=x.size,E=g.size;if(A===1&&E===1&&x.getReturnState(0)===g.getReturnState(0)){let $=_.join(x.getParent(0),g.getParent(0));return $===x.getParent(0)?x:$===g.getParent(0)?g:$.getChild(x.getReturnState(0))}let N=0,b=new Array(A+E),w=new Array(b.length),P=0,j=0,W=!0,L=!0;for(;P<A&&j<E;)x.getReturnState(P)===g.getReturnState(j)?(b[N]=_.join(x.getParent(P),g.getParent(j)),w[N]=x.getReturnState(P),W=W&&b[N]===x.getParent(P),L=L&&b[N]===g.getParent(j),P++,j++):x.getReturnState(P)<g.getReturnState(j)?(b[N]=x.getParent(P),w[N]=x.getReturnState(P),L=!1,P++):(i(g.getReturnState(j)<x.getReturnState(P)),b[N]=g.getParent(j),w[N]=g.getReturnState(j),W=!1,j++),N++;for(;P<A;)b[N]=x.getParent(P),w[N]=x.getReturnState(P),P++,L=!1,N++;for(;j<E;)b[N]=g.getParent(j),w[N]=g.getReturnState(j),j++,W=!1,N++;return W?x:L?g:(N<b.length&&(b=b.slice(0,N),w=w.slice(0,N)),b.length===0?$e.EMPTY_FULL:b.length===1?new p(b[0],w[0]):new c(b,w))}static isEmptyLocal(x){return x===$e.EMPTY_LOCAL}static getCachedContext(x,g,_){if(x.isEmpty)return x;let A=_.get(x);if(A)return A;if(A=g.get(x),A)return _.put(x,A),A;let E=!1,N=new Array(x.size);for(let w=0;w<N.length;w++){let P=$e.getCachedContext(x.getParent(w),g,_);if(E||P!==x.getParent(w)){if(!E){N=new Array(x.size);for(let j=0;j<x.size;j++)N[j]=x.getParent(j);E=!0}N[w]=P}}if(!E)return A=g.putIfAbsent(x,x),_.put(x,A??x),x;let b;if(N.length===1)b=new p(N[0],x.getReturnState(0));else{let w=new Array(x.size);for(let P=0;P<x.size;P++)w[P]=x.getReturnState(P);b=new c(N,w,x.hashCode())}return A=g.putIfAbsent(b,b),_.put(b,A||b),_.put(x,A||b),b}appendSingleContext(x,g){return this.appendContext($e.EMPTY_FULL.getChild(x),g)}getChild(x){return new p(this,x)}hashCode(){return this.cachedHashCode}toStrings(x,g,_=$e.EMPTY_FULL){let A=[];e:for(let E=0;;E++){let N=0,b=!0,w=this,P=g,j="";for(j+="[";!w.isEmpty&&w!==_;){let W=0;if(w.size>0){let L=1;for(;1<<L>>>0<w.size;)L++;let $=(1<<L>>>0)-1;if(W=E>>N&$,b=b&&W>=w.size-1,W>=w.size)continue e;N+=L}if(x){j.length>1&&(j+=" ");let $=x.atn.states[P],Q=x.ruleNames[$.ruleIndex];j+=Q}else w.getReturnState(W)!==$e.EMPTY_FULL_STATE_KEY&&(w.isEmpty||(j.length>1&&(j+=" "),j+=w.getReturnState(W)));P=w.getReturnState(W),w=w.getParent(W)}if(j+="]",A.push(j),b)break}return A}};d([o.Override],s.prototype,"hashCode",null),d([y(0,o.NotNull),y(1,o.NotNull),y(2,o.NotNull)],s,"join",null),d([y(0,o.NotNull),y(1,o.NotNull),y(2,o.NotNull)],s,"getCachedContext",null),a.PredictionContext=s;class l extends s{constructor(x){super(s.calculateEmptyHashCode()),this.fullContext=x}get isFullContext(){return this.fullContext}addEmptyContext(){return this}removeEmptyContext(){throw new Error("Cannot remove the empty context from itself.")}getParent(x){throw new Error("index out of bounds")}getReturnState(x){throw new Error("index out of bounds")}findReturnState(x){return-1}get size(){return 0}appendSingleContext(x,g){return g.getChild(this,x)}appendContext(x,g){return x}get isEmpty(){return!0}get hasEmpty(){return!0}equals(x){return this===x}toStrings(x,g,_){return["[]"]}}d([o.Override],l.prototype,"addEmptyContext",null),d([o.Override],l.prototype,"removeEmptyContext",null),d([o.Override],l.prototype,"getParent",null),d([o.Override],l.prototype,"getReturnState",null),d([o.Override],l.prototype,"findReturnState",null),d([o.Override],l.prototype,"size",null),d([o.Override],l.prototype,"appendSingleContext",null),d([o.Override],l.prototype,"appendContext",null),d([o.Override],l.prototype,"isEmpty",null),d([o.Override],l.prototype,"hasEmpty",null),d([o.Override],l.prototype,"equals",null),d([o.Override],l.prototype,"toStrings",null);let c=class Bn extends s{constructor(x,g,_){super(_||s.calculateHashCode(x,g)),i(x.length===g.length),i(g.length>1||g[0]!==s.EMPTY_FULL_STATE_KEY,"Should be using PredictionContext.EMPTY instead."),this.parents=x,this.returnStates=g}getParent(x){return this.parents[x]}getReturnState(x){return this.returnStates[x]}findReturnState(x){return u.Arrays.binarySearch(this.returnStates,x)}get size(){return this.returnStates.length}get isEmpty(){return!1}get hasEmpty(){return this.returnStates[this.returnStates.length-1]===s.EMPTY_FULL_STATE_KEY}addEmptyContext(){if(this.hasEmpty)return this;let x=this.parents.slice(0),g=this.returnStates.slice(0);return x.push(s.EMPTY_FULL),g.push(s.EMPTY_FULL_STATE_KEY),new Bn(x,g)}removeEmptyContext(){if(!this.hasEmpty)return this;if(this.returnStates.length===2)return new p(this.parents[0],this.returnStates[0]);{let x=this.parents.slice(0,this.parents.length-1),g=this.returnStates.slice(0,this.returnStates.length-1);return new Bn(x,g)}}appendContext(x,g){return Bn.appendContextImpl(this,x,new s.IdentityHashMap)}static appendContextImpl(x,g,_){if(g.isEmpty){if(s.isEmptyLocal(g)){if(x.hasEmpty)return s.EMPTY_LOCAL;throw new Error("what to do here?")}return x}if(g.size!==1)throw new Error("Appending a tree suffix is not yet supported.");let A=_.get(x);if(!A){if(x.isEmpty)A=g;else{let E=x.size;x.hasEmpty&&E--;let N=new Array(E),b=new Array(E);for(let w=0;w<E;w++)b[w]=x.getReturnState(w);for(let w=0;w<E;w++)N[w]=Bn.appendContextImpl(x.getParent(w),g,_);N.length===1?A=new p(N[0],b[0]):(i(N.length>1),A=new Bn(N,b)),x.hasEmpty&&(A=s.join(A,g))}_.put(x,A)}return A}equals(x){if(this===x)return!0;if(!(x instanceof Bn)||this.hashCode()!==x.hashCode())return!1;let g=x;return this.equalsImpl(g,new h.Array2DHashSet)}equalsImpl(x,g){let _=[],A=[];for(_.push(this),A.push(x);;){let E=_.pop(),N=A.pop();if(!E||!N)break;let b=new t.PredictionContextCache.IdentityCommutativePredictionContextOperands(E,N);if(!g.add(b))continue;let w=b.x.size;if(w===0){if(!b.x.equals(b.y))return!1;continue}let P=b.y.size;if(w!==P)return!1;for(let j=0;j<w;j++){if(b.x.getReturnState(j)!==b.y.getReturnState(j))return!1;let W=b.x.getParent(j),L=b.y.getParent(j);if(W.hashCode()!==L.hashCode())return!1;W!==L&&(_.push(W),A.push(L))}}return!0}};d([o.NotNull],c.prototype,"parents",void 0),d([o.NotNull],c.prototype,"returnStates",void 0),d([o.Override],c.prototype,"getParent",null),d([o.Override],c.prototype,"getReturnState",null),d([o.Override],c.prototype,"findReturnState",null),d([o.Override],c.prototype,"size",null),d([o.Override],c.prototype,"isEmpty",null),d([o.Override],c.prototype,"hasEmpty",null),d([o.Override],c.prototype,"addEmptyContext",null),d([o.Override],c.prototype,"removeEmptyContext",null),d([o.Override],c.prototype,"appendContext",null),d([o.Override],c.prototype,"equals",null),c=d([y(0,o.NotNull)],c);let p=class Z0 extends s{constructor(x,g){super(s.calculateSingleHashCode(x,g)),this.parent=x,this.returnState=g}getParent(x){return this.parent}getReturnState(x){return this.returnState}findReturnState(x){return this.returnState===x?0:-1}get size(){return 1}get isEmpty(){return!1}get hasEmpty(){return!1}appendContext(x,g){return g.getChild(this.parent.appendContext(x,g),this.returnState)}addEmptyContext(){let x=[this.parent,s.EMPTY_FULL],g=[this.returnState,s.EMPTY_FULL_STATE_KEY];return new c(x,g)}removeEmptyContext(){return this}equals(x){if(x===this)return!0;if(!(x instanceof Z0))return!1;let g=x;return this.hashCode()!==g.hashCode()?!1:this.returnState===g.returnState&&this.parent.equals(g.parent)}};d([o.NotNull],p.prototype,"parent",void 0),d([o.Override],p.prototype,"getParent",null),d([o.Override],p.prototype,"getReturnState",null),d([o.Override],p.prototype,"findReturnState",null),d([o.Override],p.prototype,"size",null),d([o.Override],p.prototype,"isEmpty",null),d([o.Override],p.prototype,"hasEmpty",null),d([o.Override],p.prototype,"appendContext",null),d([o.Override],p.prototype,"addEmptyContext",null),d([o.Override],p.prototype,"removeEmptyContext",null),d([o.Override],p.prototype,"equals",null),p=d([y(0,o.NotNull)],p),a.SingletonPredictionContext=p,(function(v){v.EMPTY_LOCAL=new l(!1),v.EMPTY_FULL=new l(!0),v.EMPTY_LOCAL_STATE_KEY=-2147483648,v.EMPTY_FULL_STATE_KEY=(1<<31>>>0)-1;class x extends m.Array2DHashMap{constructor(){super(g.INSTANCE)}}v.IdentityHashMap=x;class g{IdentityEqualityComparator(){}hashCode(A){return A.hashCode()}equals(A,E){return A===E}}g.INSTANCE=new g,d([o.Override],g.prototype,"hashCode",null),d([o.Override],g.prototype,"equals",null),v.IdentityEqualityComparator=g})(s=a.PredictionContext||(a.PredictionContext={}))})(Ur)),Ur}var jl;function so(){if(jl)return _t;jl=1;/*!
182
+ */var a=$r&&$r.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty($r,"__esModule",{value:!0}),$r.StarLoopEntryState=void 0;const d=qe(),y=vr(),m=kn(),h=pe();let u=class extends m.DecisionState{constructor(){super(...arguments),this.precedenceRuleDecision=!1,this.precedenceLoopbackStates=new y.BitSet}get stateType(){return d.ATNStateType.STAR_LOOP_ENTRY}};return a([h.Override],u.prototype,"stateType",null),$r.StarLoopEntryState=u,$r}var Ml;function Z0(){if(Ml)return ft;Ml=1;/*!
182
183
  * Copyright 2016 The ANTLR Project. All rights reserved.
183
184
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
184
- */var a=_t&&_t.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var b=v.length-1;b>=0;b--)(N=v[b])&&(E=(A<3?N(E):A>3?N(x,g,E):N(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},d=_t&&_t.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(_t,"__esModule",{value:!0}),_t.ATNConfig=void 0;const y=Yn(),m=kn(),h=ke(),u=pe(),r=at(),o=ot(),t=Gn(),i=Ue(),e=2147483648;let s=class Ni{constructor(x,g,_){typeof g=="number"?(i((g&16777215)===g),this._state=x,this.altAndOuterContextDepth=g,this._context=_):(this._state=x,this.altAndOuterContextDepth=g.altAndOuterContextDepth,this._context=_)}static create(x,g,_,A=t.SemanticContext.NONE,E){return A!==t.SemanticContext.NONE?E!=null?new p(E,A,x,g,_,!1):new l(A,x,g,_):E!=null?new c(E,x,g,_,!1):new Ni(x,g,_)}get state(){return this._state}get alt(){return this.altAndOuterContextDepth&16777215}get context(){return this._context}set context(x){this._context=x}get reachesIntoOuterContext(){return this.outerContextDepth!==0}get outerContextDepth(){return this.altAndOuterContextDepth>>>24&127}set outerContextDepth(x){i(x>=0),x=Math.min(x,127),this.altAndOuterContextDepth=x<<24|(this.altAndOuterContextDepth&-2130706433)>>>0}get lexerActionExecutor(){}get semanticContext(){return t.SemanticContext.NONE}get hasPassedThroughNonGreedyDecision(){return!1}clone(){return this.transform(this.state,!1)}transform(x,g,_){return _==null?this.transformImpl(x,this._context,this.semanticContext,g,this.lexerActionExecutor):_ instanceof o.PredictionContext?this.transformImpl(x,_,this.semanticContext,g,this.lexerActionExecutor):_ instanceof t.SemanticContext?this.transformImpl(x,this._context,_,g,this.lexerActionExecutor):this.transformImpl(x,this._context,this.semanticContext,g,_)}transformImpl(x,g,_,A,E){let N=A&&Ni.checkNonGreedyDecision(this,x);return _!==t.SemanticContext.NONE?E!=null||N?new p(E,_,x,this,g,N):new l(_,x,this,g):E!=null||N?new c(E,x,this,g,N):new Ni(x,this,g)}static checkNonGreedyDecision(x,g){return x.hasPassedThroughNonGreedyDecision||g instanceof m.DecisionState&&g.nonGreedy}appendContext(x,g){if(typeof x=="number"){let _=this.context.appendSingleContext(x,g);return this.transform(this.state,!1,_)}else{let _=this.context.appendContext(x,g);return this.transform(this.state,!1,_)}}contains(x){if(this.state.stateNumber!==x.state.stateNumber||this.alt!==x.alt||!this.semanticContext.equals(x.semanticContext))return!1;let g=[],_=[];for(g.push(this.context),_.push(x.context);;){let A=g.pop(),E=_.pop();if(!A||!E)break;if(A===E)return!0;if(A.size<E.size)return!1;if(E.isEmpty)return A.hasEmpty;for(let N=0;N<E.size;N++){let b=A.findReturnState(E.getReturnState(N));if(b<0)return!1;g.push(A.getParent(b)),_.push(E.getParent(N))}}return!1}get isPrecedenceFilterSuppressed(){return(this.altAndOuterContextDepth&e)!==0}set isPrecedenceFilterSuppressed(x){x?this.altAndOuterContextDepth|=e:this.altAndOuterContextDepth&=~e}equals(x){return this===x?!0:x instanceof Ni?this.state.stateNumber===x.state.stateNumber&&this.alt===x.alt&&this.reachesIntoOuterContext===x.reachesIntoOuterContext&&this.context.equals(x.context)&&this.semanticContext.equals(x.semanticContext)&&this.isPrecedenceFilterSuppressed===x.isPrecedenceFilterSuppressed&&this.hasPassedThroughNonGreedyDecision===x.hasPassedThroughNonGreedyDecision&&r.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor,x.lexerActionExecutor):!1}hashCode(){let x=h.MurmurHash.initialize(7);return x=h.MurmurHash.update(x,this.state.stateNumber),x=h.MurmurHash.update(x,this.alt),x=h.MurmurHash.update(x,this.reachesIntoOuterContext?1:0),x=h.MurmurHash.update(x,this.context),x=h.MurmurHash.update(x,this.semanticContext),x=h.MurmurHash.update(x,this.hasPassedThroughNonGreedyDecision?1:0),x=h.MurmurHash.update(x,this.lexerActionExecutor),x=h.MurmurHash.finish(x,7),x}toDotString(){let x="";x+=`digraph G {
185
- `,x+=`rankdir=LR;
186
- `;let g=new y.Array2DHashMap(o.PredictionContext.IdentityEqualityComparator.INSTANCE),_=[];function A(E){let N=g.size,b=g.putIfAbsent(E,N);return b??(_.push(E),N)}for(_.push(this.context),g.put(this.context,0);;){let E=_.pop();if(!E)break;for(let N=0;N<E.size;N++)x+=" s"+A(E),x+="->",x+="s"+A(E.getParent(N)),x+='[label="'+E.getReturnState(N)+`"];
187
- `}return x+=`}
188
- `,x.toString()}toString(x,g,_){_==null&&(_=g!=null),g==null&&(g=!0);let A="",E;_?E=this.context.toStrings(x,this.state.stateNumber):E=["?"];let N=!0;for(let b of E)N?N=!1:A+=", ",A+="(",A+=this.state,g&&(A+=",",A+=this.alt),this.context&&(A+=",",A+=b),this.semanticContext!==t.SemanticContext.NONE&&(A+=",",A+=this.semanticContext),this.reachesIntoOuterContext&&(A+=",up="+this.outerContextDepth),A+=")";return A.toString()}};a([u.NotNull],s.prototype,"_state",void 0),a([u.NotNull],s.prototype,"_context",void 0),a([u.NotNull],s.prototype,"state",null),a([u.NotNull,d(0,u.NotNull)],s.prototype,"context",null),a([u.NotNull],s.prototype,"semanticContext",null),a([u.Override],s.prototype,"clone",null),a([d(0,u.NotNull),d(2,u.NotNull)],s.prototype,"transformImpl",null),a([u.Override],s.prototype,"equals",null),a([u.Override],s.prototype,"hashCode",null),a([d(0,u.NotNull),d(3,u.NotNull)],s,"create",null),s=a([d(0,u.NotNull),d(2,u.NotNull)],s),_t.ATNConfig=s;let l=class extends s{constructor(x,g,_,A){typeof _=="number"?super(g,_,A):super(g,_,A),this._semanticContext=x}get semanticContext(){return this._semanticContext}};a([u.NotNull],l.prototype,"_semanticContext",void 0),a([u.Override],l.prototype,"semanticContext",null),l=a([d(1,u.NotNull),d(2,u.NotNull)],l);let c=class extends s{constructor(x,g,_,A,E){if(typeof _=="number")super(g,_,A);else if(super(g,_,A),_.semanticContext!==t.SemanticContext.NONE)throw new Error("Not supported");this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=E}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};a([u.Override],c.prototype,"lexerActionExecutor",null),a([u.Override],c.prototype,"hasPassedThroughNonGreedyDecision",null),c=a([d(1,u.NotNull),d(2,u.NotNull)],c);let p=class extends l{constructor(x,g,_,A,E,N){typeof A=="number"?super(g,_,A,E):super(g,_,A,E),this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=N}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};return a([u.Override],p.prototype,"lexerActionExecutor",null),a([u.Override],p.prototype,"hasPassedThroughNonGreedyDecision",null),p=a([d(1,u.NotNull),d(2,u.NotNull)],p),_t}var ai={},$l;function Sr(){if($l)return ai;$l=1;/*!
185
+ */var a=ft&&ft.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},d=ft&&ft.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(ft,"__esModule",{value:!0}),ft.DFA=void 0;const y=Ar(),m=Li(),h=J0(),u=oo(),r=wh(),o=pe(),t=at(),i=Ta(),e=Er();let s=class{constructor(c,p=0){if(this.states=new y.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE),this.nextStateNumber=0,!c.atn)throw new Error("The ATNState must be associated with an ATN");this.atnStartState=c,this.atn=c.atn,this.decision=p;let v=!1;c instanceof i.StarLoopEntryState&&c.precedenceRuleDecision&&(v=!0,this.s0=new u.DFAState(new m.ATNConfigSet),this.s0full=new u.DFAState(new m.ATNConfigSet)),this.precedenceDfa=v}get isPrecedenceDfa(){return this.precedenceDfa}getPrecedenceStartState(c,p){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");return p?this.s0full.getTarget(c):this.s0.getTarget(c)}setPrecedenceStartState(c,p,v){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");c<0||(p?this.s0full.setTarget(c,v):this.s0.setTarget(c,v))}get isEmpty(){return this.isPrecedenceDfa?this.s0.getEdgeMap().size===0&&this.s0full.getEdgeMap().size===0:this.s0==null&&this.s0full==null}get isContextSensitive(){return this.isPrecedenceDfa?this.s0full.getEdgeMap().size>0:this.s0full!=null}addState(c){return c.stateNumber=this.nextStateNumber++,this.states.getOrAdd(c)}toString(c,p){if(c||(c=e.VocabularyImpl.EMPTY_VOCABULARY),!this.s0)return"";let v;return p?v=new h.DFASerializer(this,c,p,this.atnStartState.atn):v=new h.DFASerializer(this,c),v.toString()}toLexerString(){return this.s0?new r.LexerDFASerializer(this).toString():""}};return a([o.NotNull],s.prototype,"states",void 0),a([o.NotNull],s.prototype,"atnStartState",void 0),a([o.NotNull],s.prototype,"atn",void 0),s=a([d(0,o.NotNull)],s),ft.DFA=s,ft}var mt={},Ur={},ql;function ba(){if(ql)return Ur;ql=1;/*!
189
186
  * Copyright 2016 The ANTLR Project. All rights reserved.
190
187
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
191
- */Object.defineProperty(ai,"__esModule",{value:!0}),ai.BitSet=void 0;const a=Vn(),d=ke(),y=new Uint16Array(0);function m(s){return s>>>4}function h(s){return s*16}function u(s){let l=1;for(let c=0;c<16;c++){if((s&l)!==0)return c;l=l<<1>>>0}throw new RangeError("No specified bit found")}function r(s){let l=32768;for(let c=15;c>=0;c--){if((s&l)!==0)return c;l=l>>>1}throw new RangeError("No specified bit found")}function o(s,l){return s&=15,l&=15,s===l?1<<s>>>0:65535>>>15-l^65535>>>16-s}const t=new Uint8Array(65536);for(let s=0;s<16;s++){const l=1<<s>>>0;let c=0;for(;c<t.length;){c+=l;for(let p=0;p<l;p++)t[c]++,c++}}let i=class Ci{constructor(l){if(!l)this.data=y;else if(typeof l=="number"){if(l<0)throw new RangeError("nbits cannot be negative");this.data=new Uint16Array(m(l-1)+1)}else if(l instanceof Ci)this.data=l.data.slice(0);else{let c=-1;for(let p of l)c<p&&(c=p);this.data=new Uint16Array(m(c-1)+1);for(let p of l)this.set(p)}}and(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length);let x=-1;for(let g=0;g<v;g++)(c[g]&=p[g])!==0&&(x=g);x===-1&&(this.data=y),x<c.length-1&&(this.data=c.slice(0,x+1))}andNot(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length);let x=-1;for(let g=0;g<v;g++)(c[g]&=p[g]^65535)!==0&&(x=g);x===-1&&(this.data=y),x<c.length-1&&(this.data=c.slice(0,x+1))}cardinality(){if(this.isEmpty)return 0;const l=this.data,c=l.length;let p=0;for(let v=0;v<c;v++)p+=t[l[v]];return p}clear(l,c){l==null?this.data.fill(0):c==null?this.set(l,!1):this.set(l,c,!1)}flip(l,c){if(c==null&&(c=l),l<0||c<l)throw new RangeError;let p=m(l);const v=m(c);if(p===v)this.data[p]^=o(l,c);else{for(this.data[p++]^=o(l,15);p<v;)this.data[p++]^=65535;this.data[p++]^=o(0,c)}}get(l,c){if(c===void 0)return!!(this.data[m(l)]&o(l,l));{let p=new Ci(c+1);for(let v=l;v<=c;v++)p.set(v,this.get(v));return p}}intersects(l){let c=Math.min(this.length(),l.length());if(c===0)return!1;let p=m(c-1);for(let v=0;v<=p;v++)if((this.data[v]&l.data[v])!==0)return!0;return!1}get isEmpty(){return this.length()===0}length(){return this.data.length?this.previousSetBit(h(this.data.length)-1)+1:0}nextClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);if(v>p)return-1;let x=65535^o(l,15);if((c[v]|x)===65535){for(v++,x=0;v<p&&c[v]===65535;v++);if(v===p)return-1}return h(v)+u((c[v]|x)^65535)}nextSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);if(v>p)return-1;let x=o(l,15);if((c[v]&x)===0){for(v++,x=65535;v<p&&c[v]===0;v++);if(v>=p)return-1}return h(v)+u(c[v]&x)}or(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length),x=Math.max(c.length,p.length),g=c.length===x?c:new Uint16Array(x);let _=-1;for(let E=0;E<v;E++)(g[E]=c[E]|p[E])!==0&&(_=E);const A=c.length>p.length?c:p;for(let E=v;E<x;E++)(g[E]=A[E])!==0&&(_=E);_===-1?this.data=y:g.length===_+1?this.data=g:this.data=g.slice(0,_)}previousClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);v>=p&&(v=p-1);let x=65535^o(0,l);if((c[v]|x)===65535){for(x=0,v--;v>=0&&c[v]===65535;v--);if(v<0)return-1}return h(v)+r((c[v]|x)^65535)}previousSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);v>=p&&(v=p-1);let x=o(0,l);if((c[v]&x)===0){for(v--,x=65535;v>=0&&c[v]===0;v--);if(v<0)return-1}return h(v)+r(c[v]&x)}set(l,c,p){if(c===void 0?(c=l,p=!0):typeof c=="boolean"&&(p=c,c=l),p===void 0&&(p=!0),l<0||l>c)throw new RangeError;let v=m(l),x=m(c);if(p&&x>=this.data.length){let g=new Uint16Array(x+1);this.data.forEach((_,A)=>g[A]=_),this.data=g}else if(!p){if(v>=this.data.length)return;x>=this.data.length&&(x=this.data.length-1,c=this.data.length*16-1)}if(v===x)this._setBits(v,p,o(l,c));else{for(this._setBits(v++,p,o(l,15));v<x;)this.data[v++]=p?65535:0;this._setBits(v,p,o(0,c))}}_setBits(l,c,p){c?this.data[l]|=p:this.data[l]&=65535^p}get size(){return this.data.byteLength*8}hashCode(){return d.MurmurHash.hashCode(this.data,22)}equals(l){if(l===this)return!0;if(!(l instanceof Ci))return!1;const c=this.length();if(c!==l.length())return!1;if(c===0)return!0;let p=m(c-1);for(let v=0;v<=p;v++)if(this.data[v]!==l.data[v])return!1;return!0}toString(){let l="{",c=!0;for(let p=this.nextSetBit(0);p>=0;p=this.nextSetBit(p+1))c?c=!1:l+=", ",l+=p;return l+="}",l}xor(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length),x=Math.max(c.length,p.length),g=c.length===x?c:new Uint16Array(x);let _=-1;for(let E=0;E<v;E++)(g[E]=c[E]^p[E])!==0&&(_=E);const A=c.length>p.length?c:p;for(let E=v;E<x;E++)(g[E]=A[E])!==0&&(_=E);_===-1?this.data=y:g.length===_+1?this.data=g:this.data=g.slice(0,_+1)}clone(){return new Ci(this)}[Symbol.iterator](){return new e(this.data)}[a.inspect.custom](){return"BitSet "+this.toString()}};ai.BitSet=i;class e{constructor(l){this.data=l,this.index=0,this.mask=65535}next(){for(;this.index<this.data.length;){const l=this.data[this.index]&this.mask;if(l!==0){const c=h(this.index)+u(l);return this.mask=o(c+1,15),{done:!1,value:c}}this.index++,this.mask=65535}return{done:!0,value:-1}}[Symbol.iterator](){return this}}return ai}var Ul;function Bi(){if(Ul)return $r;Ul=1;/*!
188
+ */var a=Ur&&Ur.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.IntegerList=void 0;const d=va(),y=pe(),m=new Int32Array(0),h=4,u=(1<<31>>>0)-1-8;let r=class Qi{constructor(t){if(!t)this._data=m,this._size=0;else if(t instanceof Qi)this._data=t._data.slice(0),this._size=t._size;else if(typeof t=="number")t===0?(this._data=m,this._size=0):(this._data=new Int32Array(t),this._size=0);else{this._data=m,this._size=0;for(let i of t)this.add(i)}}add(t){this._data.length===this._size&&this.ensureCapacity(this._size+1),this._data[this._size]=t,this._size++}addAll(t){if(Array.isArray(t))this.ensureCapacity(this._size+t.length),this._data.subarray(this._size,this._size+t.length).set(t),this._size+=t.length;else if(t instanceof Qi)this.ensureCapacity(this._size+t._size),this._data.subarray(this._size,this._size+t.size).set(t._data),this._size+=t._size;else{this.ensureCapacity(this._size+t.size);let i=0;for(let e of t)this._data[this._size+i]=e,i++;this._size+=t.size}}get(t){if(t<0||t>=this._size)throw RangeError();return this._data[t]}contains(t){for(let i=0;i<this._size;i++)if(this._data[i]===t)return!0;return!1}set(t,i){if(t<0||t>=this._size)throw RangeError();let e=this._data[t];return this._data[t]=i,e}removeAt(t){let i=this.get(t);return this._data.copyWithin(t,t+1,this._size),this._data[this._size-1]=0,this._size--,i}removeRange(t,i){if(t<0||i<0||t>this._size||i>this._size||t>i)throw RangeError();this._data.copyWithin(i,t,this._size),this._data.fill(0,this._size-(i-t),this._size),this._size-=i-t}get isEmpty(){return this._size===0}get size(){return this._size}trimToSize(){this._data.length!==this._size&&(this._data=this._data.slice(0,this._size))}clear(){this._data.fill(0,0,this._size),this._size=0}toArray(){return this._size===0?[]:Array.from(this._data.subarray(0,this._size))}sort(){this._data.subarray(0,this._size).sort()}equals(t){if(t===this)return!0;if(!(t instanceof Qi)||this._size!==t._size)return!1;for(let i=0;i<this._size;i++)if(this._data[i]!==t._data[i])return!1;return!0}hashCode(){let t=1;for(let i=0;i<this._size;i++)t=31*t+this._data[i];return t}toString(){return this._data.toString()}binarySearch(t,i,e){if(i===void 0&&(i=0),e===void 0&&(e=this._size),i<0||e<0||i>this._size||e>this._size)throw new RangeError;if(i>e)throw new RangeError;return d.Arrays.binarySearch(this._data,t,i,e)}ensureCapacity(t){if(t<0||t>u)throw new RangeError;let i;for(this._data.length===0?i=h:i=this._data.length;i<t;)i=i*2,(i<0||i>u)&&(i=u);let e=new Int32Array(i);e.set(this._data),this._data=e}toCharArray(){let t=new Uint16Array(this._size),i=0,e=!1;for(let s=0;s<this._size;s++){let l=this._data[s];if(l>=0&&l<65536){t[i]=l,i++;continue}if(!e){let p=new Uint16Array(this.charArraySize());p.set(t,0),t=p,e=!0}let c=String.fromCodePoint(l);t[i]=c.charCodeAt(0),t[i+1]=c.charCodeAt(1),i+=2}return t}charArraySize(){let t=0;for(let i=0;i<this._size;i++)t+=this._data[i]>=65536?2:1;return t}};return a([y.NotNull],r.prototype,"_data",void 0),a([y.Override],r.prototype,"equals",null),a([y.Override],r.prototype,"hashCode",null),a([y.Override],r.prototype,"toString",null),Ur.IntegerList=r,Ur}var Vr={},ii={},yt={},jl;function ki(){if(jl)return yt;jl=1;/*!
192
189
  * Copyright 2016 The ANTLR Project. All rights reserved.
193
190
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
194
- */var a=$r&&$r.__decorate||function(g,_,A,E){var N=arguments.length,b=N<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,A):E,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,_,A,E);else for(var P=g.length-1;P>=0;P--)(w=g[P])&&(b=(N<3?w(b):N>3?w(_,A,b):w(_,A))||b);return N>3&&b&&Object.defineProperty(_,A,b),b};Object.defineProperty($r,"__esModule",{value:!0}),$r.ATNConfigSet=void 0;const d=Yn(),y=Er(),m=no(),h=lt(),u=so(),r=Sr(),o=pe(),t=at(),i=ot(),e=ba(),s=Gn(),l=Ue(),c=ut();class p{hashCode(_){return _.state^_.alt}equals(_,A){return _.state===A.state&&_.alt===A.alt}}p.INSTANCE=new p;function v(g){return g?new d.Array2DHashMap(g):new d.Array2DHashMap(p.INSTANCE)}let x=class aa{constructor(_,A){this._uniqueAlt=0,this._hasSemanticContext=!1,this._dipsIntoOuterContext=!1,this.outermostConfigSet=!1,this.cachedHashCode=-1,_?(A?(this.mergedConfigs=void 0,this.unmerged=void 0):_.isReadOnly?(this.mergedConfigs=v(),this.unmerged=[]):(this.mergedConfigs=v(_.mergedConfigs),this.unmerged=_.unmerged.slice(0)),this.configs=_.configs.slice(0),this._dipsIntoOuterContext=_._dipsIntoOuterContext,this._hasSemanticContext=_._hasSemanticContext,this.outermostConfigSet=_.outermostConfigSet,(A||!_.isReadOnly)&&(this._uniqueAlt=_._uniqueAlt,this._conflictInfo=_._conflictInfo)):(this.mergedConfigs=v(),this.unmerged=[],this.configs=[],this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER)}getRepresentedAlternatives(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts.clone();let _=new r.BitSet;for(let A of this)_.set(A.alt);return _}get isReadOnly(){return this.mergedConfigs==null}get isOutermostConfigSet(){return this.outermostConfigSet}set isOutermostConfigSet(_){if(this.outermostConfigSet&&!_)throw new Error("IllegalStateException");l(!_||!this._dipsIntoOuterContext),this.outermostConfigSet=_}getStates(){let _=new y.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE);for(let A of this.configs)_.add(A.state);return _}optimizeConfigs(_){if(this.configs.length!==0)for(let A of this.configs)A.context=_.atn.getCachedContext(A.context)}clone(_){let A=new aa(this,_);return!_&&this.isReadOnly&&A.addAll(this.configs),A}get size(){return this.configs.length}get isEmpty(){return this.configs.length===0}contains(_){if(!(_ instanceof u.ATNConfig))return!1;if(this.mergedConfigs&&this.unmerged){let A=_,E=this.getKey(A),N=this.mergedConfigs.get(E);if(N!=null&&this.canMerge(A,E,N))return N.contains(A);for(let b of this.unmerged)if(b.contains(_))return!0}else for(let A of this.configs)if(A.contains(_))return!0;return!1}*[Symbol.iterator](){yield*this.configs}toArray(){return this.configs}add(_,A){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");l(!this.outermostConfigSet||!_.reachesIntoOuterContext),A==null&&(A=e.PredictionContextCache.UNCACHED);let E,N=this.getKey(_),b=this.mergedConfigs.get(N);if(E=b==null,b!=null&&this.canMerge(_,N,b)){b.outerContextDepth=Math.max(b.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(b.isPrecedenceFilterSuppressed=!0);let w=i.PredictionContext.join(b.context,_.context,A);return this.updatePropertiesForMergedConfig(_),b.context===w?!1:(b.context=w,!0)}for(let w=0;w<this.unmerged.length;w++){let P=this.unmerged[w];if(this.canMerge(_,N,P)){P.outerContextDepth=Math.max(P.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(P.isPrecedenceFilterSuppressed=!0);let j=i.PredictionContext.join(P.context,_.context,A);return this.updatePropertiesForMergedConfig(_),P.context===j?!1:(P.context=j,E&&(this.mergedConfigs.put(N,P),this.unmerged.splice(w,1)),!0)}}return this.configs.push(_),E?this.mergedConfigs.put(N,_):this.unmerged.push(_),this.updatePropertiesForAddedConfig(_),!0}updatePropertiesForMergedConfig(_){this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}updatePropertiesForAddedConfig(_){this.configs.length===1?this._uniqueAlt=_.alt:this._uniqueAlt!==_.alt&&(this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER),this._hasSemanticContext=this._hasSemanticContext||!s.SemanticContext.NONE.equals(_.semanticContext),this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}canMerge(_,A,E){return _.state.stateNumber!==E.state.stateNumber||A.alt!==E.alt?!1:_.semanticContext.equals(E.semanticContext)}getKey(_){return{state:_.state.stateNumber,alt:_.alt}}containsAll(_){for(let A of _)if(!(A instanceof u.ATNConfig)||!this.contains(A))return!1;return!0}addAll(_,A){this.ensureWritable();let E=!1;for(let N of _)this.add(N,A)&&(E=!0);return E}clear(){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");this.mergedConfigs.clear(),this.unmerged.length=0,this.configs.length=0,this._dipsIntoOuterContext=!1,this._hasSemanticContext=!1,this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER,this._conflictInfo=void 0}equals(_){return this===_?!0:_ instanceof aa?this.outermostConfigSet===_.outermostConfigSet&&c.equals(this._conflictInfo,_._conflictInfo)&&m.ArrayEqualityComparator.INSTANCE.equals(this.configs,_.configs):!1}hashCode(){if(this.isReadOnly&&this.cachedHashCode!==-1)return this.cachedHashCode;let _=1;return _=5*_^(this.outermostConfigSet?1:0),_=5*_^m.ArrayEqualityComparator.INSTANCE.hashCode(this.configs),this.isReadOnly&&(this.cachedHashCode=_),_}toString(_){_==null&&(_=!1);let A="",E=this.configs.slice(0);E.sort((N,b)=>N.alt!==b.alt?N.alt-b.alt:N.state.stateNumber!==b.state.stateNumber?N.state.stateNumber-b.state.stateNumber:N.semanticContext.toString().localeCompare(b.semanticContext.toString())),A+="[";for(let N=0;N<E.length;N++)N>0&&(A+=", "),A+=E[N].toString(void 0,!0,_);return A+="]",this._hasSemanticContext&&(A+=",hasSemanticContext="+this._hasSemanticContext),this._uniqueAlt!==h.ATN.INVALID_ALT_NUMBER&&(A+=",uniqueAlt="+this._uniqueAlt),this._conflictInfo!=null&&(A+=",conflictingAlts="+this._conflictInfo.conflictedAlts,this._conflictInfo.isExact||(A+="*")),this._dipsIntoOuterContext&&(A+=",dipsIntoOuterContext"),A.toString()}get uniqueAlt(){return this._uniqueAlt}get hasSemanticContext(){return this._hasSemanticContext}set hasSemanticContext(_){this.ensureWritable(),this._hasSemanticContext=_}get conflictInfo(){return this._conflictInfo}set conflictInfo(_){this.ensureWritable(),this._conflictInfo=_}get conflictingAlts(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts}get isExactConflict(){return this._conflictInfo==null?!1:this._conflictInfo.isExact}get dipsIntoOuterContext(){return this._dipsIntoOuterContext}get(_){return this.configs[_]}ensureWritable(){if(this.isReadOnly)throw new Error("This ATNConfigSet is read only.")}};return a([o.NotNull],x.prototype,"getRepresentedAlternatives",null),a([o.Override],x.prototype,"size",null),a([o.Override],x.prototype,"isEmpty",null),a([o.Override],x.prototype,"contains",null),a([o.Override],x.prototype,Symbol.iterator,null),a([o.Override],x.prototype,"toArray",null),a([o.Override],x.prototype,"containsAll",null),a([o.Override],x.prototype,"clear",null),a([o.Override],x.prototype,"equals",null),a([o.Override],x.prototype,"hashCode",null),$r.ATNConfigSet=x,$r}var Vr={},zr={},Hr={},Vl;function ao(){return Vl||(Vl=1,(function(a){/*!
191
+ */var a=yt&&yt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=yt&&yt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(yt,"__esModule",{value:!0}),yt.CommonToken=void 0;const y=Ve(),m=pe(),h=Ie();let u=class Di{constructor(o,t,i=Di.EMPTY_SOURCE,e=h.Token.DEFAULT_CHANNEL,s=0,l=0){this._line=0,this._charPositionInLine=-1,this._channel=h.Token.DEFAULT_CHANNEL,this.index=-1,this._text=t,this._type=o,this.source=i,this._channel=e,this.start=s,this.stop=l,i.source!=null&&(this._line=i.source.line,this._charPositionInLine=i.source.charPositionInLine)}static fromToken(o){let t=new Di(o.type,void 0,Di.EMPTY_SOURCE,o.channel,o.startIndex,o.stopIndex);return t._line=o.line,t.index=o.tokenIndex,t._charPositionInLine=o.charPositionInLine,o instanceof Di?(t._text=o._text,t.source=o.source):(t._text=o.text,t.source={source:o.tokenSource,stream:o.inputStream}),t}get type(){return this._type}set type(o){this._type=o}get line(){return this._line}set line(o){this._line=o}get text(){if(this._text!=null)return this._text;let o=this.inputStream;if(o==null)return;let t=o.size;return this.start<t&&this.stop<t?o.getText(y.Interval.of(this.start,this.stop)):"<EOF>"}set text(o){this._text=o}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(o){this._charPositionInLine=o}get channel(){return this._channel}set channel(o){this._channel=o}get startIndex(){return this.start}set startIndex(o){this.start=o}get stopIndex(){return this.stop}set stopIndex(o){this.stop=o}get tokenIndex(){return this.index}set tokenIndex(o){this.index=o}get tokenSource(){return this.source.source}get inputStream(){return this.source.stream}toString(o){let t="";this._channel>0&&(t=",channel="+this._channel);let i=this.text;i!=null?(i=i.replace(/\n/g,"\\n"),i=i.replace(/\r/g,"\\r"),i=i.replace(/\t/g,"\\t")):i="<no text>";let e=String(this._type);return o&&(e=o.vocabulary.getDisplayName(this._type)),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+i+"',<"+e+">"+t+","+this._line+":"+this.charPositionInLine+"]"}};return u.EMPTY_SOURCE={source:void 0,stream:void 0},a([m.NotNull],u.prototype,"source",void 0),a([m.Override],u.prototype,"type",null),a([m.Override],u.prototype,"line",null),a([m.Override],u.prototype,"text",null),a([m.Override],u.prototype,"charPositionInLine",null),a([m.Override],u.prototype,"channel",null),a([m.Override],u.prototype,"startIndex",null),a([m.Override],u.prototype,"stopIndex",null),a([m.Override],u.prototype,"tokenIndex",null),a([m.Override],u.prototype,"tokenSource",null),a([m.Override],u.prototype,"inputStream",null),a([m.Override],u.prototype,"toString",null),a([d(0,m.NotNull)],u,"fromToken",null),u=a([d(2,m.NotNull)],u),yt.CommonToken=u,yt}var $l;function Na(){return $l||($l=1,(function(a){/*!
195
192
  * Copyright 2016 The ANTLR Project. All rights reserved.
196
193
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
197
- */var d=Hr&&Hr.__decorate||function(e,s,l,c){var p=arguments.length,v=p<3?s:c===null?c=Object.getOwnPropertyDescriptor(s,l):c,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,l,c);else for(var g=e.length-1;g>=0;g--)(x=e[g])&&(v=(p<3?x(v):p>3?x(s,l,v):x(s,l))||v);return p>3&&v&&Object.defineProperty(s,l,v),v},y=Hr&&Hr.__param||function(e,s){return function(l,c){s(l,c,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DFAState=void 0;const m=lt(),h=Sr(),u=ke(),r=pe(),o=ot(),t=Ue();let i=class ep{constructor(s){this.stateNumber=-1,this.configs=s,this.edges=new Map,this.contextEdges=new Map}get isContextSensitive(){return!!this.contextSymbols}isContextSymbol(s){return this.isContextSensitive?this.contextSymbols.get(s):!1}setContextSymbol(s){t(this.isContextSensitive),this.contextSymbols.set(s)}setContextSensitive(s){t(!this.configs.isOutermostConfigSet),!this.isContextSensitive&&(this.contextSymbols||(this.contextSymbols=new h.BitSet))}get acceptStateInfo(){return this._acceptStateInfo}set acceptStateInfo(s){this._acceptStateInfo=s}get isAcceptState(){return!!this._acceptStateInfo}get prediction(){return this._acceptStateInfo?this._acceptStateInfo.prediction:m.ATN.INVALID_ALT_NUMBER}get lexerActionExecutor(){if(this._acceptStateInfo)return this._acceptStateInfo.lexerActionExecutor}getTarget(s){return this.edges.get(s)}setTarget(s,l){this.edges.set(s,l)}getEdgeMap(){return this.edges}getContextTarget(s){return s===o.PredictionContext.EMPTY_FULL_STATE_KEY&&(s=-1),this.contextEdges.get(s)}setContextTarget(s,l){if(!this.isContextSensitive)throw new Error("The state is not context sensitive.");s===o.PredictionContext.EMPTY_FULL_STATE_KEY&&(s=-1),this.contextEdges.set(s,l)}getContextEdgeMap(){let s=new Map(this.contextEdges),l=s.get(-1);if(l!==void 0)if(s.size===1){let c=new Map;return c.set(o.PredictionContext.EMPTY_FULL_STATE_KEY,l),c}else s.delete(-1),s.set(o.PredictionContext.EMPTY_FULL_STATE_KEY,l);return s}hashCode(){let s=u.MurmurHash.initialize(7);return s=u.MurmurHash.update(s,this.configs.hashCode()),s=u.MurmurHash.finish(s,1),s}equals(s){if(this===s)return!0;if(!(s instanceof ep))return!1;let l=s;return this.configs.equals(l.configs)}toString(){let s="";return s+=this.stateNumber+":"+this.configs,this.isAcceptState&&(s+="=>",this.predicates?s+=this.predicates:s+=this.prediction),s.toString()}};d([r.NotNull],i.prototype,"configs",void 0),d([r.NotNull],i.prototype,"edges",void 0),d([r.NotNull],i.prototype,"contextEdges",void 0),d([r.Override],i.prototype,"hashCode",null),d([r.Override],i.prototype,"equals",null),d([r.Override],i.prototype,"toString",null),a.DFAState=i,(function(e){let s=class{constructor(c,p){this.alt=p,this.pred=c}toString(){return"("+this.pred+", "+this.alt+")"}};d([r.NotNull],s.prototype,"pred",void 0),d([r.Override],s.prototype,"toString",null),s=d([y(0,r.NotNull)],s),e.PredPrediction=s})(i=a.DFAState||(a.DFAState={}))})(Hr)),Hr}var zl;function uo(){return zl||(zl=1,(function(a){/*!
194
+ */var d=ii&&ii.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(a,"__esModule",{value:!0}),a.CommonTokenFactory=void 0;const y=ki(),m=Ve(),h=pe();let u=class{constructor(o=!1){this.copyText=o}create(o,t,i,e,s,l,c,p){let v=new y.CommonToken(t,i,o,e,s,l);return v.line=c,v.charPositionInLine=p,i==null&&this.copyText&&o.stream!=null&&(v.text=o.stream.getText(m.Interval.of(s,l))),v}createSimple(o,t){return new y.CommonToken(o,t)}};d([h.Override],u.prototype,"create",null),d([h.Override],u.prototype,"createSimple",null),a.CommonTokenFactory=u,(function(r){r.DEFAULT=new r})(u=a.CommonTokenFactory||(a.CommonTokenFactory={}))})(ii)),ii}var oi={},Ul;function ep(){if(Ul)return oi;Ul=1;/*!
198
195
  * Copyright 2016 The ANTLR Project. All rights reserved.
199
196
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
200
- */var d=zr&&zr.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c},y=zr&&zr.__param||function(t,i){return function(e,s){i(e,s,t)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ATNSimulator=void 0;const m=Bi(),h=ao(),u=pe(),r=ot();let o=class Oi{constructor(i){this.atn=i}static get ERROR(){return Oi._ERROR||(Oi._ERROR=new h.DFAState(new m.ATNConfigSet),Oi._ERROR.stateNumber=r.PredictionContext.EMPTY_FULL_STATE_KEY),Oi._ERROR}clearDFA(){this.atn.clearDFA()}};d([u.NotNull],o.prototype,"atn",void 0),d([u.NotNull],o,"ERROR",null),o=d([y(0,u.NotNull)],o),a.ATNSimulator=o,o=a.ATNSimulator||(a.ATNSimulator={}),a.ATNSimulator=o})(zr)),zr}var At={},ui={},Hl;function tp(){if(Hl)return ui;Hl=1;/*!
197
+ */Object.defineProperty(oi,"__esModule",{value:!0}),oi.IntegerStack=void 0;const a=ba();let d=class extends a.IntegerList{constructor(m){super(m)}push(m){this.add(m)}pop(){return this.removeAt(this.size-1)}peek(){return this.get(this.size-1)}};return oi.IntegerStack=d,oi}var zr={},si={},Vl;function tp(){if(Vl)return si;Vl=1;/*!
201
198
  * Copyright 2016 The ANTLR Project. All rights reserved.
202
199
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
203
- */Object.defineProperty(ui,"__esModule",{value:!0}),ui.ConsoleErrorListener=void 0;let a=class{syntaxError(y,m,h,u,r,o){console.error(`line ${h}:${u} ${r}`)}};return ui.ConsoleErrorListener=a,a.INSTANCE=new a,ui}var vt={},Gl;function Na(){if(Gl)return vt;Gl=1;/*!
200
+ */Object.defineProperty(si,"__esModule",{value:!0}),si.AcceptStateInfo=void 0;let a=class{constructor(y,m){this._prediction=y,this._lexerActionExecutor=m}get prediction(){return this._prediction}get lexerActionExecutor(){return this._lexerActionExecutor}};return si.AcceptStateInfo=a,si}var gt={},_t={},zl;function Rh(){if(zl)return _t;zl=1;/*!
204
201
  * Copyright 2016 The ANTLR Project. All rights reserved.
205
202
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
206
- */var a=vt&&vt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=vt&&vt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(vt,"__esModule",{value:!0}),vt.ProxyErrorListener=void 0;const y=pe();let m=class{constructor(u){if(this.delegates=u,!u)throw new Error("Invalid delegates")}getDelegates(){return this.delegates}syntaxError(u,r,o,t,i,e){this.delegates.forEach(s=>{s.syntaxError&&s.syntaxError(u,r,o,t,i,e)})}};return a([y.Override,d(0,y.NotNull),d(4,y.NotNull)],m.prototype,"syntaxError",null),vt.ProxyErrorListener=m,vt}var Yl;function ki(){if(Yl)return At;Yl=1;/*!
203
+ */var a=_t&&_t.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=_t&&_t.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(_t,"__esModule",{value:!0}),_t.LexerIndexedCustomAction=void 0;const y=ke(),m=pe();let h=class rp{constructor(r,o){this._offset=r,this._action=o}get offset(){return this._offset}get action(){return this._action}get actionType(){return this._action.actionType}get isPositionDependent(){return!0}execute(r){this._action.execute(r)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this._offset),r=y.MurmurHash.update(r,this._action),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof rp?this._offset===r._offset&&this._action.equals(r._action):!1}};return a([m.NotNull],h.prototype,"action",null),a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),h=a([d(1,m.NotNull)],h),_t.LexerIndexedCustomAction=h,_t}var Hl;function Ph(){if(Hl)return gt;Hl=1;/*!
207
204
  * Copyright 2016 The ANTLR Project. All rights reserved.
208
205
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
209
- */var a=At&&At.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c},d=At&&At.__param||function(t,i){return function(e,s){i(e,s,t)}};Object.defineProperty(At,"__esModule",{value:!0}),At.Recognizer=void 0;const y=tp(),m=Na(),h=pe(),u=Ie(),r=ut();let o=class Di{constructor(){this._listeners=[y.ConsoleErrorListener.INSTANCE],this._stateNumber=-1}getTokenTypeMap(){let i=this.vocabulary,e=Di.tokenTypeMapCache.get(i);if(e==null){let s=new Map;for(let l=0;l<=this.atn.maxTokenType;l++){let c=i.getLiteralName(l);c!=null&&s.set(c,l);let p=i.getSymbolicName(l);p!=null&&s.set(p,l)}s.set("EOF",u.Token.EOF),e=s,Di.tokenTypeMapCache.set(i,e)}return e}getRuleIndexMap(){let i=this.ruleNames;if(i==null)throw new Error("The current recognizer does not provide a list of rule names.");let e=Di.ruleIndexMapCache.get(i);return e==null&&(e=r.toMap(i),Di.ruleIndexMapCache.set(i,e)),e}getTokenType(i){let e=this.getTokenTypeMap().get(i);return e??u.Token.INVALID_TYPE}get serializedATN(){throw new Error("there is no serialized ATN")}get atn(){return this._interp.atn}get interpreter(){return this._interp}set interpreter(i){this._interp=i}get parseInfo(){return Promise.resolve(void 0)}getErrorHeader(i){let e=i.getOffendingToken();if(!e)return"";let s=e.line,l=e.charPositionInLine;return"line "+s+":"+l}addErrorListener(i){if(!i)throw new TypeError("listener must not be null");this._listeners.push(i)}removeErrorListener(i){let e=this._listeners.indexOf(i);e!==-1&&this._listeners.splice(e,1)}removeErrorListeners(){this._listeners.length=0}getErrorListeners(){return this._listeners.slice(0)}getErrorListenerDispatch(){return new m.ProxyErrorListener(this.getErrorListeners())}sempred(i,e,s){return!0}precpred(i,e){return!0}action(i,e,s){}get state(){return this._stateNumber}set state(i){this._stateNumber=i}};return o.EOF=-1,o.tokenTypeMapCache=new WeakMap,o.ruleIndexMapCache=new WeakMap,a([h.SuppressWarnings("serial"),h.NotNull],o.prototype,"_listeners",void 0),a([h.NotNull],o.prototype,"getTokenTypeMap",null),a([h.NotNull],o.prototype,"getRuleIndexMap",null),a([h.NotNull],o.prototype,"serializedATN",null),a([h.NotNull],o.prototype,"atn",null),a([h.NotNull,d(0,h.NotNull)],o.prototype,"interpreter",null),a([h.NotNull,d(0,h.NotNull)],o.prototype,"getErrorHeader",null),a([d(0,h.NotNull)],o.prototype,"addErrorListener",null),a([d(0,h.NotNull)],o.prototype,"removeErrorListener",null),a([h.NotNull],o.prototype,"getErrorListeners",null),At.Recognizer=o,At}var Gr={},Wl;function Tr(){if(Wl)return Gr;Wl=1;/*!
206
+ */var a=gt&&gt.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=gt&&gt.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(gt,"__esModule",{value:!0}),gt.LexerActionExecutor=void 0;const y=no(),m=Rh(),h=ke(),u=pe();let r=class wi{constructor(t){this._lexerActions=t;let i=h.MurmurHash.initialize();for(let e of t)i=h.MurmurHash.update(i,e);this.cachedHashCode=h.MurmurHash.finish(i,t.length)}static append(t,i){if(!t)return new wi([i]);let e=t._lexerActions.slice(0);return e.push(i),new wi(e)}fixOffsetBeforeMatch(t){let i;for(let e=0;e<this._lexerActions.length;e++)this._lexerActions[e].isPositionDependent&&!(this._lexerActions[e]instanceof m.LexerIndexedCustomAction)&&(i||(i=this._lexerActions.slice(0)),i[e]=new m.LexerIndexedCustomAction(t,this._lexerActions[e]));return i?new wi(i):this}get lexerActions(){return this._lexerActions}execute(t,i,e){let s=!1,l=i.index;try{for(let c of this._lexerActions){if(c instanceof m.LexerIndexedCustomAction){let p=c.offset;i.seek(e+p),c=c.action,s=e+p!==l}else c.isPositionDependent&&(i.seek(l),s=!1);c.execute(t)}}finally{s&&i.seek(l)}}hashCode(){return this.cachedHashCode}equals(t){return t===this?!0:t instanceof wi?this.cachedHashCode===t.cachedHashCode&&y.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions,t._lexerActions):!1}};return a([u.NotNull],r.prototype,"_lexerActions",void 0),a([u.NotNull],r.prototype,"lexerActions",null),a([d(0,u.NotNull)],r.prototype,"execute",null),a([u.Override],r.prototype,"hashCode",null),a([u.Override],r.prototype,"equals",null),a([u.NotNull,d(1,u.NotNull)],r,"append",null),r=a([d(0,u.NotNull)],r),gt.LexerActionExecutor=r,gt}var At={},ai={},Gl;function Sr(){if(Gl)return ai;Gl=1;/*!
210
207
  * Copyright 2016 The ANTLR Project. All rights reserved.
211
208
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
212
- */var a=Gr&&Gr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.VocabularyImpl=void 0;const d=pe(),y=Ie();let m=class{constructor(u,r,o){this.literalNames=u,this.symbolicNames=r,this.displayNames=o,this._maxTokenType=Math.max(this.displayNames.length,Math.max(this.literalNames.length,this.symbolicNames.length))-1}get maxTokenType(){return this._maxTokenType}getLiteralName(u){if(u>=0&&u<this.literalNames.length)return this.literalNames[u]}getSymbolicName(u){if(u>=0&&u<this.symbolicNames.length)return this.symbolicNames[u];if(u===y.Token.EOF)return"EOF"}getDisplayName(u){if(u>=0&&u<this.displayNames.length){let t=this.displayNames[u];if(t)return t}let r=this.getLiteralName(u);if(r)return r;let o=this.getSymbolicName(u);return o||String(u)}};return m.EMPTY_VOCABULARY=new m([],[],[]),a([d.NotNull],m.prototype,"literalNames",void 0),a([d.NotNull],m.prototype,"symbolicNames",void 0),a([d.NotNull],m.prototype,"displayNames",void 0),a([d.Override],m.prototype,"maxTokenType",null),a([d.Override],m.prototype,"getLiteralName",null),a([d.Override],m.prototype,"getSymbolicName",null),a([d.Override,d.NotNull],m.prototype,"getDisplayName",null),a([d.NotNull],m,"EMPTY_VOCABULARY",void 0),Gr.VocabularyImpl=m,Gr}var Ql;function rp(){if(Ql)return Vr;Ql=1;/*!
209
+ */Object.defineProperty(ai,"__esModule",{value:!0}),ai.RecognitionException=void 0;let a=class extends Error{constructor(y,m,h,u){super(u),this._offendingState=-1,this._recognizer=y,this.input=m,this.ctx=h,y&&(this._offendingState=y.state)}get offendingState(){return this._offendingState}setOffendingState(y){this._offendingState=y}get expectedTokens(){if(this._recognizer)return this._recognizer.atn.getExpectedTokens(this._offendingState,this.ctx)}get context(){return this.ctx}get inputStream(){return this.input}getOffendingToken(y){if(!(y&&y!==this._recognizer))return this.offendingToken}setOffendingToken(y,m){y===this._recognizer&&(this.offendingToken=m)}get recognizer(){return this._recognizer}};return ai.RecognitionException=a,ai}var Yl;function ao(){if(Yl)return At;Yl=1;/*!
213
210
  * Copyright 2016 The ANTLR Project. All rights reserved.
214
211
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
215
- */var a=Vr&&Vr.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.DFASerializer=void 0;const d=uo(),y=pe(),m=ot(),h=ki(),u=Tr();let r=class{constructor(t,i,e,s){i instanceof h.Recognizer?(e=i.ruleNames,s=i.atn,i=i.vocabulary):i||(i=u.VocabularyImpl.EMPTY_VOCABULARY),this.dfa=t,this.vocabulary=i,this.ruleNames=e,this.atn=s}toString(){if(!this.dfa.s0)return"";let t="";if(this.dfa.states){let e=new Array(...this.dfa.states.toArray());e.sort((s,l)=>s.stateNumber-l.stateNumber);for(let s of e){let l=s.getEdgeMap(),c=[...l.keys()].sort((x,g)=>x-g),p=s.getContextEdgeMap(),v=[...p.keys()].sort((x,g)=>x-g);for(let x of c){let g=l.get(x);if((g==null||g===d.ATNSimulator.ERROR)&&!s.isContextSymbol(x))continue;let _=!1;t+=this.getStateString(s)+"-"+this.getEdgeLabel(x)+"->",s.isContextSymbol(x)&&(t+="!",_=!0);let A=g;A&&A.stateNumber!==d.ATNSimulator.ERROR.stateNumber?t+=this.getStateString(A)+`
216
- `:_&&(t+=`ctx
217
- `)}if(s.isContextSensitive)for(let x of v)t+=this.getStateString(s)+"-"+this.getContextLabel(x)+"->"+this.getStateString(p.get(x))+`
218
- `}}let i=t;return i.length===0?"":i}getContextLabel(t){if(t===m.PredictionContext.EMPTY_FULL_STATE_KEY)return"ctx:EMPTY_FULL";if(t===m.PredictionContext.EMPTY_LOCAL_STATE_KEY)return"ctx:EMPTY_LOCAL";if(this.atn&&t>0&&t<=this.atn.states.length){let e=this.atn.states[t].ruleIndex;if(this.ruleNames&&e>=0&&e<this.ruleNames.length)return"ctx:"+String(t)+"("+this.ruleNames[e]+")"}return"ctx:"+String(t)}getEdgeLabel(t){return this.vocabulary.getDisplayName(t)}getStateString(t){if(t===d.ATNSimulator.ERROR)return"ERROR";let i=t.stateNumber,e="s"+i;if(t.isAcceptState&&(t.predicates?e=":s"+i+"=>"+t.predicates:e=":s"+i+"=>"+t.prediction),t.isContextSensitive){e+="*";for(let s of t.configs)if(s.reachesIntoOuterContext){e+="*";break}}return e}};return a([y.NotNull],r.prototype,"dfa",void 0),a([y.NotNull],r.prototype,"vocabulary",void 0),a([y.Override],r.prototype,"toString",null),Vr.DFASerializer=r,Vr}var Et={},Xl;function Fh(){if(Xl)return Et;Xl=1;/*!
212
+ */var a=At&&At.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=At&&At.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(At,"__esModule",{value:!0}),At.LexerNoViableAltException=void 0;const y=Sr(),m=pe(),h=Ve(),u=ut();let r=class extends y.RecognitionException{constructor(t,i,e,s){super(t,i),this._startIndex=e,this._deadEndConfigs=s}get startIndex(){return this._startIndex}get deadEndConfigs(){return this._deadEndConfigs}get inputStream(){return super.inputStream}toString(){let t="";return this._startIndex>=0&&this._startIndex<this.inputStream.size&&(t=this.inputStream.getText(h.Interval.of(this._startIndex,this._startIndex)),t=u.escapeWhitespace(t,!1)),`LexerNoViableAltException('${t}')`}};return a([m.Override],r.prototype,"inputStream",null),a([m.Override],r.prototype,"toString",null),r=a([d(1,m.NotNull)],r),At.LexerNoViableAltException=r,At}var Hr={},Wl;function Fh(){if(Wl)return Hr;Wl=1;/*!
219
213
  * Copyright 2016 The ANTLR Project. All rights reserved.
220
214
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
221
- */var a=Et&&Et.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Et&&Et.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Et,"__esModule",{value:!0}),Et.LexerDFASerializer=void 0;const y=rp(),m=pe(),h=Tr();let u=class extends y.DFASerializer{constructor(o){super(o,h.VocabularyImpl.EMPTY_VOCABULARY)}getEdgeLabel(o){return"'"+String.fromCodePoint(o)+"'"}};return a([m.Override,m.NotNull],u.prototype,"getEdgeLabel",null),u=a([d(0,m.NotNull)],u),Et.LexerDFASerializer=u,Et}var Yr={},Kl;function Ca(){if(Kl)return Yr;Kl=1;/*!
215
+ */var a=Hr&&Hr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.OrderedATNConfigSet=void 0;const d=Li(),y=pe();let m=class np extends d.ATNConfigSet{constructor(u,r){u!=null&&r!=null?super(u,r):super()}clone(u){let r=new np(this,u);return!u&&this.isReadOnly&&r.addAll(this),r}getKey(u){return{state:0,alt:u.hashCode()}}canMerge(u,r,o){return u.equals(o)}};return a([y.Override],m.prototype,"clone",null),a([y.Override],m.prototype,"getKey",null),a([y.Override],m.prototype,"canMerge",null),Hr.OrderedATNConfigSet=m,Hr}var Gr={},Ql;function Mi(){if(Ql)return Gr;Ql=1;/*!
222
216
  * Copyright 2016 The ANTLR Project. All rights reserved.
223
217
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
224
- */var a=Yr&&Yr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.StarLoopEntryState=void 0;const d=qe(),y=Sr(),m=kn(),h=pe();let u=class extends m.DecisionState{constructor(){super(...arguments),this.precedenceRuleDecision=!1,this.precedenceLoopbackStates=new y.BitSet}get stateType(){return d.ATNStateType.STAR_LOOP_ENTRY}};return a([h.Override],u.prototype,"stateType",null),Yr.StarLoopEntryState=u,Yr}var Jl;function np(){if(Jl)return gt;Jl=1;/*!
218
+ */var a=Gr&&Gr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.RuleStopState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{get nonStopStateNumber(){return-1}get stateType(){return y.ATNStateType.RULE_STOP}};return a([m.Override],h.prototype,"nonStopStateNumber",null),a([m.Override],h.prototype,"stateType",null),Gr.RuleStopState=h,Gr}var Xl;function uo(){return Xl||(Xl=1,(function(a){/*!
225
219
  * Copyright 2016 The ANTLR Project. All rights reserved.
226
220
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
227
- */var a=gt&&gt.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},d=gt&&gt.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(gt,"__esModule",{value:!0}),gt.DFA=void 0;const y=Er(),m=Bi(),h=rp(),u=ao(),r=Fh(),o=pe(),t=at(),i=Ca(),e=Tr();let s=class{constructor(c,p=0){if(this.states=new y.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE),this.nextStateNumber=0,!c.atn)throw new Error("The ATNState must be associated with an ATN");this.atnStartState=c,this.atn=c.atn,this.decision=p;let v=!1;c instanceof i.StarLoopEntryState&&c.precedenceRuleDecision&&(v=!0,this.s0=new u.DFAState(new m.ATNConfigSet),this.s0full=new u.DFAState(new m.ATNConfigSet)),this.precedenceDfa=v}get isPrecedenceDfa(){return this.precedenceDfa}getPrecedenceStartState(c,p){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");return p?this.s0full.getTarget(c):this.s0.getTarget(c)}setPrecedenceStartState(c,p,v){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");c<0||(p?this.s0full.setTarget(c,v):this.s0.setTarget(c,v))}get isEmpty(){return this.isPrecedenceDfa?this.s0.getEdgeMap().size===0&&this.s0full.getEdgeMap().size===0:this.s0==null&&this.s0full==null}get isContextSensitive(){return this.isPrecedenceDfa?this.s0full.getEdgeMap().size>0:this.s0full!=null}addState(c){return c.stateNumber=this.nextStateNumber++,this.states.getOrAdd(c)}toString(c,p){if(c||(c=e.VocabularyImpl.EMPTY_VOCABULARY),!this.s0)return"";let v;return p?v=new h.DFASerializer(this,c,p,this.atnStartState.atn):v=new h.DFASerializer(this,c),v.toString()}toLexerString(){return this.s0?new r.LexerDFASerializer(this).toString():""}};return a([o.NotNull],s.prototype,"states",void 0),a([o.NotNull],s.prototype,"atnStartState",void 0),a([o.NotNull],s.prototype,"atn",void 0),s=a([d(0,o.NotNull)],s),gt.DFA=s,gt}var Wr={},Qr={},Zl;function ip(){if(Zl)return Qr;Zl=1;/*!
221
+ */var d=zr&&zr.__decorate||function(N,b,w,P){var j=arguments.length,W=j<3?b:P===null?P=Object.getOwnPropertyDescriptor(b,w):P,L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(N,b,w,P);else for(var $=N.length-1;$>=0;$--)(L=N[$])&&(W=(j<3?L(W):j>3?L(b,w,W):L(b,w))||W);return j>3&&W&&Object.defineProperty(b,w,W),W},y=zr&&zr.__param||function(N,b){return function(w,P){b(w,P,N)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerATNSimulator=void 0;const m=tp(),h=lt(),u=io(),r=Li(),o=so(),t=oo(),i=Ve(),e=gr(),s=Tr(),l=Ph(),c=ao(),p=pe(),v=Fh(),x=ot(),g=Mi(),_=Ie(),A=Ue();let E=class He extends o.ATNSimulator{constructor(b,w){super(b),this.optimize_tail_calls=!0,this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=s.Lexer.DEFAULT_MODE,this.prevAccept=new He.SimState,this.recog=w}copyState(b){this._charPositionInLine=b.charPositionInLine,this._line=b._line,this.mode=b.mode,this.startIndex=b.startIndex}match(b,w){this.mode=w;let P=b.mark();try{this.startIndex=b.index,this.prevAccept.reset();let j=this.atn.modeToDFA[w].s0;return j==null?this.matchATN(b):this.execATN(b,j)}finally{b.release(P)}}reset(){this.prevAccept.reset(),this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=s.Lexer.DEFAULT_MODE}matchATN(b){let w=this.atn.modeToStartState[this.mode];He.debug&&console.log(`matchATN mode ${this.mode} start: ${w}`);let P=this.mode,j=this.computeStartState(b,w),W=j.hasSemanticContext;W&&(j.hasSemanticContext=!1);let L=this.addDFAState(j);if(!W){let Q=this.atn.modeToDFA[this.mode];Q.s0?L=Q.s0:Q.s0=L}let $=this.execATN(b,L);return He.debug&&console.log(`DFA after matchATN: ${this.atn.modeToDFA[P].toLexerString()}`),$}execATN(b,w){He.debug&&console.log(`start state closure=${w.configs}`),w.isAcceptState&&this.captureSimState(this.prevAccept,b,w);let P=b.LA(1),j=w;for(;;){He.debug&&console.log(`execATN loop starting closure: ${j.configs}`);let W=this.getExistingTargetState(j,P);if(W==null&&(W=this.computeTargetState(b,j,P)),W===o.ATNSimulator.ERROR||(P!==e.IntStream.EOF&&this.consume(b),W.isAcceptState&&(this.captureSimState(this.prevAccept,b,W),P===e.IntStream.EOF)))break;P=b.LA(1),j=W}return this.failOrAccept(this.prevAccept,b,j.configs,P)}getExistingTargetState(b,w){let P=b.getTarget(w);return He.debug&&P!=null&&console.log("reuse state "+b.stateNumber+" edge to "+P.stateNumber),P}computeTargetState(b,w,P){let j=new v.OrderedATNConfigSet;return this.getReachableConfigSet(b,w.configs,j,P),j.isEmpty?(j.hasSemanticContext||this.addDFAEdge(w,P,o.ATNSimulator.ERROR),o.ATNSimulator.ERROR):this.addDFAEdge(w,P,j)}failOrAccept(b,w,P,j){if(b.dfaState!=null){let W=b.dfaState.lexerActionExecutor;return this.accept(w,W,this.startIndex,b.index,b.line,b.charPos),b.dfaState.prediction}else{if(j===e.IntStream.EOF&&w.index===this.startIndex)return _.Token.EOF;throw new c.LexerNoViableAltException(this.recog,w,this.startIndex,P)}}getReachableConfigSet(b,w,P,j){let W=h.ATN.INVALID_ALT_NUMBER;for(let L of w){let $=L.alt===W;if($&&L.hasPassedThroughNonGreedyDecision)continue;He.debug&&console.log(`testing ${this.getTokenName(j)} at ${L.toString(this.recog,!0)}`);let Q=L.state.numberOfOptimizedTransitions;for(let ee=0;ee<Q;ee++){let I=L.state.getOptimizedTransition(ee),X=this.getReachableTarget(I,j);if(X!=null){let ie=L.lexerActionExecutor,ce;ie!=null?(ie=ie.fixOffsetBeforeMatch(b.index-this.startIndex),ce=L.transform(X,!0,ie)):(A(L.lexerActionExecutor==null),ce=L.transform(X,!0));let oe=j===e.IntStream.EOF;if(this.closure(b,ce,P,$,!0,oe)){W=L.alt;break}}}}}accept(b,w,P,j,W,L){He.debug&&console.log(`ACTION ${w}`),b.seek(j),this._line=W,this._charPositionInLine=L,w!=null&&this.recog!=null&&w.execute(this.recog,b,P)}getReachableTarget(b,w){if(b.matches(w,s.Lexer.MIN_CHAR_VALUE,s.Lexer.MAX_CHAR_VALUE))return b.target}computeStartState(b,w){let P=x.PredictionContext.EMPTY_FULL,j=new v.OrderedATNConfigSet;for(let W=0;W<w.numberOfTransitions;W++){let L=w.transition(W).target,$=u.ATNConfig.create(L,W+1,P);this.closure(b,$,j,!1,!1,!1)}return j}closure(b,w,P,j,W,L){if(He.debug&&console.log("closure("+w.toString(this.recog,!0)+")"),w.state instanceof g.RuleStopState){He.debug&&(this.recog!=null?console.log(`closure at ${this.recog.ruleNames[w.state.ruleIndex]} rule stop ${w}`):console.log(`closure at rule stop ${w}`));let Q=w.context;if(Q.isEmpty)return P.add(w),!0;Q.hasEmpty&&(P.add(w.transform(w.state,!0,x.PredictionContext.EMPTY_FULL)),j=!0);for(let ee=0;ee<Q.size;ee++){let I=Q.getReturnState(ee);if(I===x.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let X=Q.getParent(ee),ie=this.atn.states[I],ce=w.transform(ie,!1,X);j=this.closure(b,ce,P,j,W,L)}return j}w.state.onlyHasEpsilonTransitions||(!j||!w.hasPassedThroughNonGreedyDecision)&&P.add(w);let $=w.state;for(let Q=0;Q<$.numberOfOptimizedTransitions;Q++){let ee=$.getOptimizedTransition(Q),I=this.getEpsilonTarget(b,w,ee,P,W,L);I!=null&&(j=this.closure(b,I,P,j,W,L))}return j}getEpsilonTarget(b,w,P,j,W,L){let $;switch(P.serializationType){case 3:let Q=P;if(this.optimize_tail_calls&&Q.optimizedTailCall&&!w.context.hasEmpty)$=w.transform(P.target,!0);else{let I=w.context.getChild(Q.followState.stateNumber);$=w.transform(P.target,!0,I)}break;case 10:throw new Error("Precedence predicates are not supported in lexers.");case 4:let ee=P;He.debug&&console.log("EVAL rule "+ee.ruleIndex+":"+ee.predIndex),j.hasSemanticContext=!0,this.evaluatePredicate(b,ee.ruleIndex,ee.predIndex,W)?$=w.transform(P.target,!0):$=void 0;break;case 6:if(w.context.hasEmpty){let I=l.LexerActionExecutor.append(w.lexerActionExecutor,this.atn.lexerActions[P.actionIndex]);$=w.transform(P.target,!0,I);break}else{$=w.transform(P.target,!0);break}case 1:$=w.transform(P.target,!0);break;case 5:case 2:case 7:if(L&&P.matches(e.IntStream.EOF,s.Lexer.MIN_CHAR_VALUE,s.Lexer.MAX_CHAR_VALUE)){$=w.transform(P.target,!1);break}$=void 0;break;default:$=void 0;break}return $}evaluatePredicate(b,w,P,j){if(this.recog==null)return!0;if(!j)return this.recog.sempred(void 0,w,P);let W=this._charPositionInLine,L=this._line,$=b.index,Q=b.mark();try{return this.consume(b),this.recog.sempred(void 0,w,P)}finally{this._charPositionInLine=W,this._line=L,b.seek($),b.release(Q)}}captureSimState(b,w,P){b.index=w.index,b.line=this._line,b.charPos=this._charPositionInLine,b.dfaState=P}addDFAEdge(b,w,P){if(P instanceof r.ATNConfigSet){let j=P.hasSemanticContext;j&&(P.hasSemanticContext=!1);let W=this.addDFAState(P);return j||this.addDFAEdge(b,w,W),W}else He.debug&&console.log("EDGE "+b+" -> "+P+" upon "+String.fromCharCode(w)),b?.setTarget(w,P)}addDFAState(b){A(!b.hasSemanticContext);let w=new t.DFAState(b),P=this.atn.modeToDFA[this.mode].states.get(w);if(P!=null)return P;b.optimizeConfigs(this);let j=new t.DFAState(b.clone(!0)),W;for(let L of b)if(L.state instanceof g.RuleStopState){W=L;break}if(W!=null){let L=this.atn.ruleToTokenType[W.state.ruleIndex],$=W.lexerActionExecutor;j.acceptStateInfo=new m.AcceptStateInfo(L,$)}return this.atn.modeToDFA[this.mode].addState(j)}getDFA(b){return this.atn.modeToDFA[b]}getText(b){return b.getText(i.Interval.of(this.startIndex,b.index-1))}get line(){return this._line}set line(b){this._line=b}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(b){this._charPositionInLine=b}consume(b){b.LA(1)===10?(this._line++,this._charPositionInLine=0):this._charPositionInLine++,b.consume()}getTokenName(b){return b===-1?"EOF":"'"+String.fromCharCode(b)+"'"}};d([p.NotNull],E.prototype,"prevAccept",void 0),d([y(0,p.NotNull)],E.prototype,"copyState",null),d([y(0,p.NotNull)],E.prototype,"match",null),d([p.Override],E.prototype,"reset",null),d([y(0,p.NotNull)],E.prototype,"matchATN",null),d([y(0,p.NotNull),y(1,p.NotNull)],E.prototype,"execATN",null),d([y(0,p.NotNull)],E.prototype,"getExistingTargetState",null),d([p.NotNull,y(0,p.NotNull),y(1,p.NotNull)],E.prototype,"computeTargetState",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull)],E.prototype,"getReachableConfigSet",null),d([y(0,p.NotNull)],E.prototype,"accept",null),d([p.NotNull,y(0,p.NotNull),y(1,p.NotNull)],E.prototype,"computeStartState",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull)],E.prototype,"closure",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull),y(3,p.NotNull)],E.prototype,"getEpsilonTarget",null),d([y(0,p.NotNull)],E.prototype,"evaluatePredicate",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull)],E.prototype,"captureSimState",null),d([p.NotNull,y(0,p.NotNull)],E.prototype,"addDFAState",null),d([p.NotNull],E.prototype,"getDFA",null),d([p.NotNull,y(0,p.NotNull)],E.prototype,"getText",null),d([y(0,p.NotNull)],E.prototype,"consume",null),d([p.NotNull],E.prototype,"getTokenName",null),E=d([y(0,p.NotNull)],E),a.LexerATNSimulator=E,(function(N){N.debug=!1,N.dfa_debug=!1;class b{constructor(){this.index=-1,this.line=0,this.charPos=-1}reset(){this.index=-1,this.line=0,this.charPos=-1,this.dfaState=void 0}}N.SimState=b})(E=a.LexerATNSimulator||(a.LexerATNSimulator={})),a.LexerATNSimulator=E})(zr)),zr}var Kl;function Tr(){if(Kl)return Vr;Kl=1;/*!
228
222
  * Copyright 2016 The ANTLR Project. All rights reserved.
229
223
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
230
- */var a=Qr&&Qr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.BasicState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{get stateType(){return y.ATNStateType.BASIC}};return a([m.Override],h.prototype,"stateType",null),Qr.BasicState=h,Qr}var ec;function sp(){if(ec)return Wr;ec=1;/*!
224
+ */var a=Vr&&Vr.__decorate||function(s,l,c,p){var v=arguments.length,x=v<3?l:p===null?p=Object.getOwnPropertyDescriptor(l,c):p,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(s,l,c,p);else for(var _=s.length-1;_>=0;_--)(g=s[_])&&(x=(v<3?g(x):v>3?g(l,c,x):g(l,c))||x);return v>3&&x&&Object.defineProperty(l,c,x),x};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.Lexer=void 0;const d=Na(),y=ep(),m=Ve(),h=gr(),u=uo(),r=ao(),o=pe(),t=Bi(),i=Ie();let e=class mr extends t.Recognizer{constructor(l){super(),this._factory=d.CommonTokenFactory.DEFAULT,this._tokenStartCharIndex=-1,this._tokenStartLine=0,this._tokenStartCharPositionInLine=0,this._hitEOF=!1,this._channel=0,this._type=0,this._modeStack=new y.IntegerStack,this._mode=mr.DEFAULT_MODE,this._input=l,this._tokenFactorySourcePair={source:this,stream:l}}static get DEFAULT_TOKEN_CHANNEL(){return i.Token.DEFAULT_CHANNEL}static get HIDDEN(){return i.Token.HIDDEN_CHANNEL}reset(l){(l===void 0||l)&&this._input.seek(0),this._token=void 0,this._type=i.Token.INVALID_TYPE,this._channel=i.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartCharPositionInLine=-1,this._tokenStartLine=-1,this._text=void 0,this._hitEOF=!1,this._mode=mr.DEFAULT_MODE,this._modeStack.clear(),this.interpreter.reset()}nextToken(){if(this._input==null)throw new Error("nextToken requires a non-null input stream.");let l=this._input.mark();try{e:for(;;){if(this._hitEOF)return this.emitEOF();this._token=void 0,this._channel=i.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartCharPositionInLine=this.interpreter.charPositionInLine,this._tokenStartLine=this.interpreter.line,this._text=void 0;do{this._type=i.Token.INVALID_TYPE;let c;try{c=this.interpreter.match(this._input,this._mode)}catch(p){if(p instanceof r.LexerNoViableAltException)this.notifyListeners(p),this.recover(p),c=mr.SKIP;else throw p}if(this._input.LA(1)===h.IntStream.EOF&&(this._hitEOF=!0),this._type===i.Token.INVALID_TYPE&&(this._type=c),this._type===mr.SKIP)continue e}while(this._type===mr.MORE);return this._token==null?this.emit():this._token}}finally{this._input.release(l)}}skip(){this._type=mr.SKIP}more(){this._type=mr.MORE}mode(l){this._mode=l}pushMode(l){u.LexerATNSimulator.debug&&console.log("pushMode "+l),this._modeStack.push(this._mode),this.mode(l)}popMode(){if(this._modeStack.isEmpty)throw new Error("EmptyStackException");return u.LexerATNSimulator.debug&&console.log("popMode back to "+this._modeStack.peek()),this.mode(this._modeStack.pop()),this._mode}get tokenFactory(){return this._factory}set tokenFactory(l){this._factory=l}get inputStream(){return this._input}set inputStream(l){this.reset(!1),this._input=l,this._tokenFactorySourcePair={source:this,stream:this._input}}get sourceName(){return this._input.sourceName}emit(l){return l||(l=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.charIndex-1,this._tokenStartLine,this._tokenStartCharPositionInLine)),this._token=l,l}emitEOF(){let l=this.charPositionInLine,c=this.line,p=this._factory.create(this._tokenFactorySourcePair,i.Token.EOF,void 0,i.Token.DEFAULT_CHANNEL,this._input.index,this._input.index-1,c,l);return this.emit(p),p}get line(){return this.interpreter.line}set line(l){this.interpreter.line=l}get charPositionInLine(){return this.interpreter.charPositionInLine}set charPositionInLine(l){this.interpreter.charPositionInLine=l}get charIndex(){return this._input.index}get text(){return this._text!=null?this._text:this.interpreter.getText(this._input)}set text(l){this._text=l}get token(){return this._token}set token(l){this._token=l}set type(l){this._type=l}get type(){return this._type}set channel(l){this._channel=l}get channel(){return this._channel}getAllTokens(){let l=[],c=this.nextToken();for(;c.type!==i.Token.EOF;)l.push(c),c=this.nextToken();return l}notifyListeners(l){let c=this._input.getText(m.Interval.of(this._tokenStartCharIndex,this._input.index)),p="token recognition error at: '"+this.getErrorDisplay(c)+"'",v=this.getErrorListenerDispatch();v.syntaxError&&v.syntaxError(this,void 0,this._tokenStartLine,this._tokenStartCharPositionInLine,p,l)}getErrorDisplay(l){if(typeof l=="number"){switch(l){case i.Token.EOF:return"<EOF>";case 10:return"\\n";case 9:return"\\t";case 13:return"\\r"}return String.fromCharCode(l)}return l.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}getCharErrorDisplay(l){return"'"+this.getErrorDisplay(l)+"'"}recover(l){l instanceof r.LexerNoViableAltException?this._input.LA(1)!==h.IntStream.EOF&&this.interpreter.consume(this._input):this._input.consume()}};return e.DEFAULT_MODE=0,e.MORE=-2,e.SKIP=-3,e.MIN_CHAR_VALUE=0,e.MAX_CHAR_VALUE=1114111,a([o.Override],e.prototype,"nextToken",null),a([o.Override],e.prototype,"tokenFactory",null),a([o.Override],e.prototype,"inputStream",null),a([o.Override],e.prototype,"sourceName",null),a([o.Override],e.prototype,"line",null),a([o.Override],e.prototype,"charPositionInLine",null),Vr.Lexer=e,Vr}var Jl;function Mn(){if(Jl)return mt;Jl=1;/*!
231
225
  * Copyright 2016 The ANTLR Project. All rights reserved.
232
226
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
233
- */var a=Wr&&Wr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.InvalidState=void 0;const d=qe(),y=ip(),m=pe();let h=class extends y.BasicState{get stateType(){return d.ATNStateType.INVALID_TYPE}};return a([m.Override],h.prototype,"stateType",null),Wr.InvalidState=h,Wr}var St={},Tt={},bt={},tc;function Oa(){if(tc)return bt;tc=1;/*!
227
+ */var a=mt&&mt.__decorate||function(e,s,l,c){var p=arguments.length,v=p<3?s:c===null?c=Object.getOwnPropertyDescriptor(s,l):c,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,l,c);else for(var g=e.length-1;g>=0;g--)(x=e[g])&&(v=(p<3?x(v):p>3?x(s,l,v):x(s,l))||v);return p>3&&v&&Object.defineProperty(s,l,v),v},d=mt&&mt.__param||function(e,s){return function(l,c){s(l,c,e)}};Object.defineProperty(mt,"__esModule",{value:!0}),mt.IntervalSet=void 0;const y=no(),m=ba(),h=Ve(),u=Tr(),r=ke(),o=pe(),t=Ie();let i=class Fe{constructor(s){this.readonly=!1,s!=null?this._intervals=s.slice(0):this._intervals=[]}static get COMPLETE_CHAR_SET(){return Fe._COMPLETE_CHAR_SET===void 0&&(Fe._COMPLETE_CHAR_SET=Fe.of(u.Lexer.MIN_CHAR_VALUE,u.Lexer.MAX_CHAR_VALUE),Fe._COMPLETE_CHAR_SET.setReadonly(!0)),Fe._COMPLETE_CHAR_SET}static get EMPTY_SET(){return Fe._EMPTY_SET==null&&(Fe._EMPTY_SET=new Fe,Fe._EMPTY_SET.setReadonly(!0)),Fe._EMPTY_SET}static of(s,l=s){let c=new Fe;return c.add(s,l),c}clear(){if(this.readonly)throw new Error("can't alter readonly IntervalSet");this._intervals.length=0}add(s,l=s){this.addRange(h.Interval.of(s,l))}addRange(s){if(this.readonly)throw new Error("can't alter readonly IntervalSet");if(!(s.b<s.a)){for(let l=0;l<this._intervals.length;l++){let c=this._intervals[l];if(s.equals(c))return;if(s.adjacent(c)||!s.disjoint(c)){let p=s.union(c);for(this._intervals[l]=p;l<this._intervals.length-1;){l++;let v=this._intervals[l];if(!p.adjacent(v)&&p.disjoint(v))break;this._intervals.splice(l,1),l--,this._intervals[l]=p.union(v)}return}if(s.startsBeforeDisjoint(c)){this._intervals.splice(l,0,s);return}}this._intervals.push(s)}}static or(s){let l=new Fe;for(let c of s)l.addAll(c);return l}addAll(s){if(s==null)return this;if(s instanceof Fe){let l=s,c=l._intervals.length;for(let p=0;p<c;p++){let v=l._intervals[p];this.add(v.a,v.b)}}else for(let l of s.toArray())this.add(l);return this}complementRange(s,l){return this.complement(Fe.of(s,l))}complement(s){if(s.isNil)return Fe.EMPTY_SET;let l;return s instanceof Fe?l=s:(l=new Fe,l.addAll(s)),l.subtract(this)}subtract(s){if(s==null||s.isNil)return new Fe(this._intervals);if(s instanceof Fe)return Fe.subtract(this,s);let l=new Fe;return l.addAll(s),Fe.subtract(this,l)}static subtract(s,l){if(s.isNil)return new Fe;let c=new Fe(s._intervals);if(l.isNil)return c;let p=0,v=0;for(;p<c._intervals.length&&v<l._intervals.length;){let x=c._intervals[p],g=l._intervals[v];if(g.b<x.a){v++;continue}if(g.a>x.b){p++;continue}let _,A;if(g.a>x.a&&(_=new h.Interval(x.a,g.a-1)),g.b<x.b&&(A=new h.Interval(g.b+1,x.b)),_)if(A){c._intervals[p]=_,c._intervals.splice(p+1,0,A),p++,v++;continue}else{c._intervals[p]=_,p++;continue}else if(A){c._intervals[p]=A,v++;continue}else{c._intervals.splice(p,1);continue}}return c}or(s){let l=new Fe;return l.addAll(this),l.addAll(s),l}and(s){if(s.isNil)return new Fe;let l=this._intervals,c=s._intervals,p,v=l.length,x=c.length,g=0,_=0;for(;g<v&&_<x;){let A=l[g],E=c[_];A.startsBeforeDisjoint(E)?g++:E.startsBeforeDisjoint(A)?_++:A.properlyContains(E)?(p||(p=new Fe),p.addRange(A.intersection(E)),_++):E.properlyContains(A)?(p||(p=new Fe),p.addRange(A.intersection(E)),g++):A.disjoint(E)||(p||(p=new Fe),p.addRange(A.intersection(E)),A.startsAfterNonDisjoint(E)?_++:E.startsAfterNonDisjoint(A)&&g++)}return p||new Fe}contains(s){let l=this._intervals.length,c=0,p=l-1;for(;c<=p;){let v=c+p>>1,x=this._intervals[v],g=x.a;if(x.b<s)c=v+1;else if(g>s)p=v-1;else return!0}return!1}get isNil(){return this._intervals==null||this._intervals.length===0}get maxElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[this._intervals.length-1].b}get minElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[0].a}get intervals(){return this._intervals}hashCode(){let s=r.MurmurHash.initialize();for(let l of this._intervals)s=r.MurmurHash.update(s,l.a),s=r.MurmurHash.update(s,l.b);return s=r.MurmurHash.finish(s,this._intervals.length*2),s}equals(s){return s==null||!(s instanceof Fe)?!1:y.ArrayEqualityComparator.INSTANCE.equals(this._intervals,s._intervals)}toString(s=!1){let l="";if(this._intervals==null||this._intervals.length===0)return"{}";this.size>1&&(l+="{");let c=!0;for(let p of this._intervals){c?c=!1:l+=", ";let v=p.a,x=p.b;v===x?v===t.Token.EOF?l+="<EOF>":s?l+="'"+String.fromCodePoint(v)+"'":l+=v:s?l+="'"+String.fromCodePoint(v)+"'..'"+String.fromCodePoint(x)+"'":l+=v+".."+x}return this.size>1&&(l+="}"),l}toStringVocabulary(s){if(this._intervals==null||this._intervals.length===0)return"{}";let l="";this.size>1&&(l+="{");let c=!0;for(let p of this._intervals){c?c=!1:l+=", ";let v=p.a,x=p.b;if(v===x)l+=this.elementName(s,v);else for(let g=v;g<=x;g++)g>v&&(l+=", "),l+=this.elementName(s,g)}return this.size>1&&(l+="}"),l}elementName(s,l){return l===t.Token.EOF?"<EOF>":l===t.Token.EPSILON?"<EPSILON>":s.getDisplayName(l)}get size(){let s=0,l=this._intervals.length;if(l===1){let c=this._intervals[0];return c.b-c.a+1}for(let c=0;c<l;c++){let p=this._intervals[c];s+=p.b-p.a+1}return s}toIntegerList(){let s=new m.IntegerList(this.size),l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;for(let g=v;g<=x;g++)s.add(g)}return s}toSet(){let s=new Set;for(let l of this._intervals){let c=l.a,p=l.b;for(let v=c;v<=p;v++)s.add(v)}return s}toArray(){let s=new Array,l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;for(let g=v;g<=x;g++)s.push(g)}return s}remove(s){if(this.readonly)throw new Error("can't alter readonly IntervalSet");let l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;if(s<v)break;if(s===v&&s===x){this._intervals.splice(c,1);break}if(s===v){this._intervals[c]=h.Interval.of(p.a+1,p.b);break}if(s===x){this._intervals[c]=h.Interval.of(p.a,p.b-1);break}if(s>v&&s<x){let g=p.b;this._intervals[c]=h.Interval.of(p.a,s-1),this.add(s+1,g)}}}get isReadonly(){return this.readonly}setReadonly(s){if(this.readonly&&!s)throw new Error("can't alter readonly IntervalSet");this.readonly=s}};return a([o.Override],i.prototype,"addAll",null),a([o.Override],i.prototype,"complement",null),a([o.Override],i.prototype,"subtract",null),a([o.Override],i.prototype,"or",null),a([o.Override],i.prototype,"and",null),a([o.Override],i.prototype,"contains",null),a([o.Override],i.prototype,"isNil",null),a([o.Override],i.prototype,"hashCode",null),a([o.Override],i.prototype,"equals",null),a([d(0,o.NotNull)],i.prototype,"toStringVocabulary",null),a([o.NotNull,d(0,o.NotNull)],i.prototype,"elementName",null),a([o.Override],i.prototype,"size",null),a([o.Override],i.prototype,"remove",null),a([o.NotNull],i,"of",null),a([o.NotNull],i,"subtract",null),mt.IntervalSet=i,mt}var Yr={},Wr={},Zl;function ip(){if(Zl)return Wr;Zl=1;/*!
234
228
  * Copyright 2016 The ANTLR Project. All rights reserved.
235
229
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
236
- */var a=bt&&bt.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=bt&&bt.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(bt,"__esModule",{value:!0}),bt.SetTransition=void 0;const y=Mn(),m=pe(),h=Ie(),u=vr();let r=class extends u.Transition{constructor(t,i){super(t),i==null&&(i=y.IntervalSet.of(h.Token.INVALID_TYPE)),this.set=i}get serializationType(){return 7}get label(){return this.set}matches(t,i,e){return this.set.contains(t)}toString(){return this.set.toString()}};return a([m.NotNull],r.prototype,"set",void 0),a([m.Override],r.prototype,"serializationType",null),a([m.Override,m.NotNull],r.prototype,"label",null),a([m.Override],r.prototype,"matches",null),a([m.Override,m.NotNull],r.prototype,"toString",null),r=a([d(0,m.NotNull),d(1,m.Nullable)],r),bt.SetTransition=r,bt}var rc;function Da(){if(rc)return Tt;rc=1;/*!
230
+ */var a=Wr&&Wr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.BasicState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{get stateType(){return y.ATNStateType.BASIC}};return a([m.Override],h.prototype,"stateType",null),Wr.BasicState=h,Wr}var ec;function sp(){if(ec)return Yr;ec=1;/*!
237
231
  * Copyright 2016 The ANTLR Project. All rights reserved.
238
232
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
239
- */var a=Tt&&Tt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Tt&&Tt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.NotSetTransition=void 0;const y=pe(),m=Oa();let h=class extends m.SetTransition{constructor(r,o){super(r,o)}get serializationType(){return 8}matches(r,o,t){return r>=o&&r<=t&&!super.matches(r,o,t)}toString(){return"~"+super.toString()}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"matches",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull),d(1,y.Nullable)],h),Tt.NotSetTransition=h,Tt}var Xr={},nc;function Mi(){if(nc)return Xr;nc=1;/*!
233
+ */var a=Yr&&Yr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.InvalidState=void 0;const d=qe(),y=ip(),m=pe();let h=class extends y.BasicState{get stateType(){return d.ATNStateType.INVALID_TYPE}};return a([m.Override],h.prototype,"stateType",null),Yr.InvalidState=h,Yr}var vt={},ui={},Et={},tc;function br(){if(tc)return Et;tc=1;/*!
240
234
  * Copyright 2016 The ANTLR Project. All rights reserved.
241
235
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
242
- */var a=Xr&&Xr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.RuleStopState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{get nonStopStateNumber(){return-1}get stateType(){return y.ATNStateType.RULE_STOP}};return a([m.Override],h.prototype,"nonStopStateNumber",null),a([m.Override],h.prototype,"stateType",null),Xr.RuleStopState=h,Xr}var Nt={},ic;function wa(){if(ic)return Nt;ic=1;/*!
236
+ */var a=Et&&Et.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=Et&&Et.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(Et,"__esModule",{value:!0}),Et.Transition=void 0;const y=pe();let m=class{constructor(u){if(u==null)throw new Error("target cannot be null.");this.target=u}get isEpsilon(){return!1}get label(){}};return m.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],a([y.NotNull],m.prototype,"target",void 0),m=a([d(0,y.NotNull)],m),Et.Transition=m,Et}var rc;function Ca(){if(rc)return ui;rc=1;/*!
243
237
  * Copyright 2016 The ANTLR Project. All rights reserved.
244
238
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
245
- */var a=Nt&&Nt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Nt&&Nt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.RuleTransition=void 0;const y=pe(),m=vr();let h=class extends m.Transition{constructor(r,o,t,i){super(r),this.tailCall=!1,this.optimizedTailCall=!1,this.ruleIndex=o,this.precedence=t,this.followState=i}get serializationType(){return 3}get isEpsilon(){return!0}matches(r,o,t){return!1}};return a([y.NotNull],h.prototype,"followState",void 0),a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"isEpsilon",null),a([y.Override],h.prototype,"matches",null),h=a([d(0,y.NotNull),d(3,y.NotNull)],h),Nt.RuleTransition=h,Nt}var Ct={},oc;function ap(){if(oc)return Ct;oc=1;/*!
239
+ */Object.defineProperty(ui,"__esModule",{value:!0}),ui.AbstractPredicateTransition=void 0;const a=br();let d=class extends a.Transition{constructor(m){super(m)}};return ui.AbstractPredicateTransition=d,ui}var St={},Tt={},nc;function Oa(){if(nc)return Tt;nc=1;/*!
246
240
  * Copyright 2016 The ANTLR Project. All rights reserved.
247
241
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
248
- */var a=Ct&&Ct.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Ct&&Ct.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.WildcardTransition=void 0;const y=pe(),m=vr();let h=class extends m.Transition{constructor(r){super(r)}get serializationType(){return 9}matches(r,o,t){return r>=o&&r<=t}toString(){return"."}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"matches",null),a([y.Override,y.NotNull],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),Ct.WildcardTransition=h,Ct}var sc;function Ih(){if(sc)return St;sc=1;/*!
242
+ */var a=Tt&&Tt.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=Tt&&Tt.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.SetTransition=void 0;const y=Mn(),m=pe(),h=Ie(),u=br();let r=class extends u.Transition{constructor(t,i){super(t),i==null&&(i=y.IntervalSet.of(h.Token.INVALID_TYPE)),this.set=i}get serializationType(){return 7}get label(){return this.set}matches(t,i,e){return this.set.contains(t)}toString(){return this.set.toString()}};return a([m.NotNull],r.prototype,"set",void 0),a([m.Override],r.prototype,"serializationType",null),a([m.Override,m.NotNull],r.prototype,"label",null),a([m.Override],r.prototype,"matches",null),a([m.Override,m.NotNull],r.prototype,"toString",null),r=a([d(0,m.NotNull),d(1,m.Nullable)],r),Tt.SetTransition=r,Tt}var ic;function Da(){if(ic)return St;ic=1;/*!
249
243
  * Copyright 2016 The ANTLR Project. All rights reserved.
250
244
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
251
- */var a=St&&St.__decorate||function(x,g,_,A){var E=arguments.length,N=E<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,_):A,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(x,g,_,A);else for(var w=x.length-1;w>=0;w--)(b=x[w])&&(N=(E<3?b(N):E>3?b(g,_,N):b(g,_))||N);return E>3&&N&&Object.defineProperty(g,_,N),N},d=St&&St.__param||function(x,g){return function(_,A){g(_,A,x)}};Object.defineProperty(St,"__esModule",{value:!0}),St.LL1Analyzer=void 0;const y=va(),m=Er(),h=so(),u=Sr(),r=Mn(),o=pe(),t=Da(),i=at(),e=ot(),s=Mi(),l=wa(),c=Ie(),p=ap();let v=class ua{constructor(g){this.atn=g}getDecisionLookahead(g){if(g==null)return;let _=new Array(g.numberOfTransitions);for(let A=0;A<g.numberOfTransitions;A++){let E=new r.IntervalSet;_[A]=E;let N=new m.Array2DHashSet(i.ObjectEqualityComparator.INSTANCE);this._LOOK(g.transition(A).target,void 0,e.PredictionContext.EMPTY_LOCAL,E,N,new u.BitSet,!1,!1),(E.size===0||E.contains(ua.HIT_PRED))&&(E=void 0,_[A]=E)}return _}LOOK(g,_,A){if(A===void 0){if(g.atn==null)throw new Error("Illegal state");A=g.atn.ruleToStopState[g.ruleIndex]}else A===null&&(A=void 0);let E=new r.IntervalSet;return this._LOOK(g,A,_,E,new m.Array2DHashSet,new u.BitSet,!0,!0),E}_LOOK(g,_,A,E,N,b,w,P){let j=h.ATNConfig.create(g,0,A);if(!N.add(j))return;if(g===_){if(e.PredictionContext.isEmptyLocal(A)){E.add(c.Token.EPSILON);return}else if(A.isEmpty){P&&E.add(c.Token.EOF);return}}if(g instanceof s.RuleStopState){if(A.isEmpty&&!e.PredictionContext.isEmptyLocal(A)){P&&E.add(c.Token.EOF);return}let L=b.get(g.ruleIndex);try{b.clear(g.ruleIndex);for(let $=0;$<A.size;$++){if(A.getReturnState($)===e.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let Q=this.atn.states[A.getReturnState($)];this._LOOK(Q,_,A.getParent($),E,N,b,w,P)}}finally{L&&b.set(g.ruleIndex)}}let W=g.numberOfTransitions;for(let L=0;L<W;L++){let $=g.transition(L);if($ instanceof l.RuleTransition){if(b.get($.ruleIndex))continue;let Q=A.getChild($.followState.stateNumber);try{b.set($.ruleIndex),this._LOOK($.target,_,Q,E,N,b,w,P)}finally{b.clear($.ruleIndex)}}else if($ instanceof y.AbstractPredicateTransition)w?this._LOOK($.target,_,A,E,N,b,w,P):E.add(ua.HIT_PRED);else if($.isEpsilon)this._LOOK($.target,_,A,E,N,b,w,P);else if($ instanceof p.WildcardTransition)E.addAll(r.IntervalSet.of(c.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType));else{let Q=$.label;Q!=null&&($ instanceof t.NotSetTransition&&(Q=Q.complement(r.IntervalSet.of(c.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))),E.addAll(Q))}}}};return v.HIT_PRED=c.Token.INVALID_TYPE,a([o.NotNull],v.prototype,"atn",void 0),a([o.NotNull,d(0,o.NotNull),d(1,o.NotNull)],v.prototype,"LOOK",null),a([d(0,o.NotNull),d(2,o.NotNull),d(3,o.NotNull),d(4,o.NotNull),d(5,o.NotNull)],v.prototype,"_LOOK",null),v=a([d(0,o.NotNull)],v),St.LL1Analyzer=v,St}var ac;function lt(){return ac||(ac=1,(function(a){/*!
245
+ */var a=St&&St.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=St&&St.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(St,"__esModule",{value:!0}),St.NotSetTransition=void 0;const y=pe(),m=Oa();let h=class extends m.SetTransition{constructor(r,o){super(r,o)}get serializationType(){return 8}matches(r,o,t){return r>=o&&r<=t&&!super.matches(r,o,t)}toString(){return"~"+super.toString()}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"matches",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull),d(1,y.Nullable)],h),St.NotSetTransition=h,St}var bt={},oc;function wa(){if(oc)return bt;oc=1;/*!
252
246
  * Copyright 2016 The ANTLR Project. All rights reserved.
253
247
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
254
- */var d=jr&&jr.__decorate||function(p,v,x,g){var _=arguments.length,A=_<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,x):g,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,v,x,g);else for(var N=p.length-1;N>=0;N--)(E=p[N])&&(A=(_<3?E(A):_>3?E(v,x,A):E(v,x))||A);return _>3&&A&&Object.defineProperty(v,x,A),A},y=jr&&jr.__param||function(p,v){return function(x,g){v(x,g,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ATN=void 0;const m=Yn(),h=np(),u=Mn(),r=sp(),o=Ih(),t=pe(),i=at(),e=ot(),s=Ie(),l=Ue();let c=class{constructor(v,x){this.states=[],this.decisionToState=[],this.modeNameToStartState=new Map,this.modeToStartState=[],this.contextCache=new m.Array2DHashMap(i.ObjectEqualityComparator.INSTANCE),this.decisionToDFA=[],this.modeToDFA=[],this.LL1Table=new Map,this.grammarType=v,this.maxTokenType=x}clearDFA(){this.decisionToDFA=new Array(this.decisionToState.length);for(let v=0;v<this.decisionToDFA.length;v++)this.decisionToDFA[v]=new h.DFA(this.decisionToState[v],v);this.modeToDFA=new Array(this.modeToStartState.length);for(let v=0;v<this.modeToDFA.length;v++)this.modeToDFA[v]=new h.DFA(this.modeToStartState[v]);this.contextCache.clear(),this.LL1Table.clear()}get contextCacheSize(){return this.contextCache.size}getCachedContext(v){return e.PredictionContext.getCachedContext(v,this.contextCache,new e.PredictionContext.IdentityHashMap)}getDecisionToDFA(){return l(this.decisionToDFA!=null&&this.decisionToDFA.length===this.decisionToState.length),this.decisionToDFA}nextTokens(v,x){return x?new o.LL1Analyzer(this).LOOK(v,x):(v.nextTokenWithinRule||(v.nextTokenWithinRule=this.nextTokens(v,e.PredictionContext.EMPTY_LOCAL),v.nextTokenWithinRule.setReadonly(!0)),v.nextTokenWithinRule)}addState(v){v.atn=this,v.stateNumber=this.states.length,this.states.push(v)}removeState(v){let x=new r.InvalidState;x.atn=this,x.stateNumber=v.stateNumber,this.states[v.stateNumber]=x}defineMode(v,x){this.modeNameToStartState.set(v,x),this.modeToStartState.push(x),this.modeToDFA.push(new h.DFA(x)),this.defineDecisionState(x)}defineDecisionState(v){return this.decisionToState.push(v),v.decision=this.decisionToState.length-1,this.decisionToDFA.push(new h.DFA(v,v.decision)),v.decision}getDecisionState(v){if(this.decisionToState.length>0)return this.decisionToState[v]}get numberOfDecisions(){return this.decisionToState.length}getExpectedTokens(v,x){if(v<0||v>=this.states.length)throw new RangeError("Invalid state number.");let g=x,_=this.states[v],A=this.nextTokens(_);if(!A.contains(s.Token.EPSILON))return A;let E=new u.IntervalSet;for(E.addAll(A),E.remove(s.Token.EPSILON);g!=null&&g.invokingState>=0&&A.contains(s.Token.EPSILON);){let b=this.states[g.invokingState].transition(0);A=this.nextTokens(b.followState),E.addAll(A),E.remove(s.Token.EPSILON),g=g._parent}return A.contains(s.Token.EPSILON)&&E.add(s.Token.EOF),E}};d([t.NotNull],c.prototype,"states",void 0),d([t.NotNull],c.prototype,"decisionToState",void 0),d([t.NotNull],c.prototype,"modeNameToStartState",void 0),d([t.NotNull],c.prototype,"modeToStartState",void 0),d([t.NotNull],c.prototype,"decisionToDFA",void 0),d([t.NotNull],c.prototype,"modeToDFA",void 0),d([t.NotNull],c.prototype,"nextTokens",null),d([y(0,t.NotNull)],c.prototype,"removeState",null),d([y(0,t.NotNull),y(1,t.NotNull)],c.prototype,"defineMode",null),d([y(0,t.NotNull)],c.prototype,"defineDecisionState",null),d([t.NotNull],c.prototype,"getExpectedTokens",null),c=d([y(0,t.NotNull)],c),a.ATN=c,(function(p){p.INVALID_ALT_NUMBER=0})(c=a.ATN||(a.ATN={})),a.ATN=c})(jr)),jr}var Ot={},Dt={},uc;function Lh(){if(uc)return Dt;uc=1;/*!
248
+ */var a=bt&&bt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=bt&&bt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(bt,"__esModule",{value:!0}),bt.RuleTransition=void 0;const y=pe(),m=br();let h=class extends m.Transition{constructor(r,o,t,i){super(r),this.tailCall=!1,this.optimizedTailCall=!1,this.ruleIndex=o,this.precedence=t,this.followState=i}get serializationType(){return 3}get isEpsilon(){return!0}matches(r,o,t){return!1}};return a([y.NotNull],h.prototype,"followState",void 0),a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"isEpsilon",null),a([y.Override],h.prototype,"matches",null),h=a([d(0,y.NotNull),d(3,y.NotNull)],h),bt.RuleTransition=h,bt}var Nt={},sc;function ap(){if(sc)return Nt;sc=1;/*!
255
249
  * Copyright 2016 The ANTLR Project. All rights reserved.
256
250
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
257
- */var a=Dt&&Dt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Dt&&Dt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.LexerIndexedCustomAction=void 0;const y=ke(),m=pe();let h=class up{constructor(r,o){this._offset=r,this._action=o}get offset(){return this._offset}get action(){return this._action}get actionType(){return this._action.actionType}get isPositionDependent(){return!0}execute(r){this._action.execute(r)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this._offset),r=y.MurmurHash.update(r,this._action),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof up?this._offset===r._offset&&this._action.equals(r._action):!1}};return a([m.NotNull],h.prototype,"action",null),a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),h=a([d(1,m.NotNull)],h),Dt.LexerIndexedCustomAction=h,Dt}var lc;function Bh(){if(lc)return Ot;lc=1;/*!
251
+ */var a=Nt&&Nt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Nt&&Nt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.WildcardTransition=void 0;const y=pe(),m=br();let h=class extends m.Transition{constructor(r){super(r)}get serializationType(){return 9}matches(r,o,t){return r>=o&&r<=t}toString(){return"."}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"matches",null),a([y.Override,y.NotNull],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),Nt.WildcardTransition=h,Nt}var ac;function Ih(){if(ac)return vt;ac=1;/*!
258
252
  * Copyright 2016 The ANTLR Project. All rights reserved.
259
253
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
260
- */var a=Ot&&Ot.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=Ot&&Ot.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.LexerActionExecutor=void 0;const y=no(),m=Lh(),h=ke(),u=pe();let r=class wi{constructor(t){this._lexerActions=t;let i=h.MurmurHash.initialize();for(let e of t)i=h.MurmurHash.update(i,e);this.cachedHashCode=h.MurmurHash.finish(i,t.length)}static append(t,i){if(!t)return new wi([i]);let e=t._lexerActions.slice(0);return e.push(i),new wi(e)}fixOffsetBeforeMatch(t){let i;for(let e=0;e<this._lexerActions.length;e++)this._lexerActions[e].isPositionDependent&&!(this._lexerActions[e]instanceof m.LexerIndexedCustomAction)&&(i||(i=this._lexerActions.slice(0)),i[e]=new m.LexerIndexedCustomAction(t,this._lexerActions[e]));return i?new wi(i):this}get lexerActions(){return this._lexerActions}execute(t,i,e){let s=!1,l=i.index;try{for(let c of this._lexerActions){if(c instanceof m.LexerIndexedCustomAction){let p=c.offset;i.seek(e+p),c=c.action,s=e+p!==l}else c.isPositionDependent&&(i.seek(l),s=!1);c.execute(t)}}finally{s&&i.seek(l)}}hashCode(){return this.cachedHashCode}equals(t){return t===this?!0:t instanceof wi?this.cachedHashCode===t.cachedHashCode&&y.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions,t._lexerActions):!1}};return a([u.NotNull],r.prototype,"_lexerActions",void 0),a([u.NotNull],r.prototype,"lexerActions",null),a([d(0,u.NotNull)],r.prototype,"execute",null),a([u.Override],r.prototype,"hashCode",null),a([u.Override],r.prototype,"equals",null),a([u.NotNull,d(1,u.NotNull)],r,"append",null),r=a([d(0,u.NotNull)],r),Ot.LexerActionExecutor=r,Ot}var wt={},cc;function lo(){if(cc)return wt;cc=1;/*!
254
+ */var a=vt&&vt.__decorate||function(x,g,_,A){var E=arguments.length,N=E<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,_):A,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(x,g,_,A);else for(var w=x.length-1;w>=0;w--)(b=x[w])&&(N=(E<3?b(N):E>3?b(g,_,N):b(g,_))||N);return E>3&&N&&Object.defineProperty(g,_,N),N},d=vt&&vt.__param||function(x,g){return function(_,A){g(_,A,x)}};Object.defineProperty(vt,"__esModule",{value:!0}),vt.LL1Analyzer=void 0;const y=Ca(),m=Ar(),h=io(),u=vr(),r=Mn(),o=pe(),t=Da(),i=at(),e=ot(),s=Mi(),l=wa(),c=Ie(),p=ap();let v=class ua{constructor(g){this.atn=g}getDecisionLookahead(g){if(g==null)return;let _=new Array(g.numberOfTransitions);for(let A=0;A<g.numberOfTransitions;A++){let E=new r.IntervalSet;_[A]=E;let N=new m.Array2DHashSet(i.ObjectEqualityComparator.INSTANCE);this._LOOK(g.transition(A).target,void 0,e.PredictionContext.EMPTY_LOCAL,E,N,new u.BitSet,!1,!1),(E.size===0||E.contains(ua.HIT_PRED))&&(E=void 0,_[A]=E)}return _}LOOK(g,_,A){if(A===void 0){if(g.atn==null)throw new Error("Illegal state");A=g.atn.ruleToStopState[g.ruleIndex]}else A===null&&(A=void 0);let E=new r.IntervalSet;return this._LOOK(g,A,_,E,new m.Array2DHashSet,new u.BitSet,!0,!0),E}_LOOK(g,_,A,E,N,b,w,P){let j=h.ATNConfig.create(g,0,A);if(!N.add(j))return;if(g===_){if(e.PredictionContext.isEmptyLocal(A)){E.add(c.Token.EPSILON);return}else if(A.isEmpty){P&&E.add(c.Token.EOF);return}}if(g instanceof s.RuleStopState){if(A.isEmpty&&!e.PredictionContext.isEmptyLocal(A)){P&&E.add(c.Token.EOF);return}let L=b.get(g.ruleIndex);try{b.clear(g.ruleIndex);for(let $=0;$<A.size;$++){if(A.getReturnState($)===e.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let Q=this.atn.states[A.getReturnState($)];this._LOOK(Q,_,A.getParent($),E,N,b,w,P)}}finally{L&&b.set(g.ruleIndex)}}let W=g.numberOfTransitions;for(let L=0;L<W;L++){let $=g.transition(L);if($ instanceof l.RuleTransition){if(b.get($.ruleIndex))continue;let Q=A.getChild($.followState.stateNumber);try{b.set($.ruleIndex),this._LOOK($.target,_,Q,E,N,b,w,P)}finally{b.clear($.ruleIndex)}}else if($ instanceof y.AbstractPredicateTransition)w?this._LOOK($.target,_,A,E,N,b,w,P):E.add(ua.HIT_PRED);else if($.isEpsilon)this._LOOK($.target,_,A,E,N,b,w,P);else if($ instanceof p.WildcardTransition)E.addAll(r.IntervalSet.of(c.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType));else{let Q=$.label;Q!=null&&($ instanceof t.NotSetTransition&&(Q=Q.complement(r.IntervalSet.of(c.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))),E.addAll(Q))}}}};return v.HIT_PRED=c.Token.INVALID_TYPE,a([o.NotNull],v.prototype,"atn",void 0),a([o.NotNull,d(0,o.NotNull),d(1,o.NotNull)],v.prototype,"LOOK",null),a([d(0,o.NotNull),d(2,o.NotNull),d(3,o.NotNull),d(4,o.NotNull),d(5,o.NotNull)],v.prototype,"_LOOK",null),v=a([d(0,o.NotNull)],v),vt.LL1Analyzer=v,vt}var uc;function lt(){return uc||(uc=1,(function(a){/*!
261
255
  * Copyright 2016 The ANTLR Project. All rights reserved.
262
256
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
263
- */var a=wt&&wt.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=wt&&wt.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.LexerNoViableAltException=void 0;const y=Ar(),m=pe(),h=Ve(),u=ut();let r=class extends y.RecognitionException{constructor(t,i,e,s){super(t,i),this._startIndex=e,this._deadEndConfigs=s}get startIndex(){return this._startIndex}get deadEndConfigs(){return this._deadEndConfigs}get inputStream(){return super.inputStream}toString(){let t="";return this._startIndex>=0&&this._startIndex<this.inputStream.size&&(t=this.inputStream.getText(h.Interval.of(this._startIndex,this._startIndex)),t=u.escapeWhitespace(t,!1)),`LexerNoViableAltException('${t}')`}};return a([m.Override],r.prototype,"inputStream",null),a([m.Override],r.prototype,"toString",null),r=a([d(1,m.NotNull)],r),wt.LexerNoViableAltException=r,wt}var Kr={},fc;function kh(){if(fc)return Kr;fc=1;/*!
257
+ */var d=wr&&wr.__decorate||function(p,v,x,g){var _=arguments.length,A=_<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,x):g,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,v,x,g);else for(var N=p.length-1;N>=0;N--)(E=p[N])&&(A=(_<3?E(A):_>3?E(v,x,A):E(v,x))||A);return _>3&&A&&Object.defineProperty(v,x,A),A},y=wr&&wr.__param||function(p,v){return function(x,g){v(x,g,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ATN=void 0;const m=Gn(),h=Z0(),u=Mn(),r=sp(),o=Ih(),t=pe(),i=at(),e=ot(),s=Ie(),l=Ue();let c=class{constructor(v,x){this.states=[],this.decisionToState=[],this.modeNameToStartState=new Map,this.modeToStartState=[],this.contextCache=new m.Array2DHashMap(i.ObjectEqualityComparator.INSTANCE),this.decisionToDFA=[],this.modeToDFA=[],this.LL1Table=new Map,this.grammarType=v,this.maxTokenType=x}clearDFA(){this.decisionToDFA=new Array(this.decisionToState.length);for(let v=0;v<this.decisionToDFA.length;v++)this.decisionToDFA[v]=new h.DFA(this.decisionToState[v],v);this.modeToDFA=new Array(this.modeToStartState.length);for(let v=0;v<this.modeToDFA.length;v++)this.modeToDFA[v]=new h.DFA(this.modeToStartState[v]);this.contextCache.clear(),this.LL1Table.clear()}get contextCacheSize(){return this.contextCache.size}getCachedContext(v){return e.PredictionContext.getCachedContext(v,this.contextCache,new e.PredictionContext.IdentityHashMap)}getDecisionToDFA(){return l(this.decisionToDFA!=null&&this.decisionToDFA.length===this.decisionToState.length),this.decisionToDFA}nextTokens(v,x){return x?new o.LL1Analyzer(this).LOOK(v,x):(v.nextTokenWithinRule||(v.nextTokenWithinRule=this.nextTokens(v,e.PredictionContext.EMPTY_LOCAL),v.nextTokenWithinRule.setReadonly(!0)),v.nextTokenWithinRule)}addState(v){v.atn=this,v.stateNumber=this.states.length,this.states.push(v)}removeState(v){let x=new r.InvalidState;x.atn=this,x.stateNumber=v.stateNumber,this.states[v.stateNumber]=x}defineMode(v,x){this.modeNameToStartState.set(v,x),this.modeToStartState.push(x),this.modeToDFA.push(new h.DFA(x)),this.defineDecisionState(x)}defineDecisionState(v){return this.decisionToState.push(v),v.decision=this.decisionToState.length-1,this.decisionToDFA.push(new h.DFA(v,v.decision)),v.decision}getDecisionState(v){if(this.decisionToState.length>0)return this.decisionToState[v]}get numberOfDecisions(){return this.decisionToState.length}getExpectedTokens(v,x){if(v<0||v>=this.states.length)throw new RangeError("Invalid state number.");let g=x,_=this.states[v],A=this.nextTokens(_);if(!A.contains(s.Token.EPSILON))return A;let E=new u.IntervalSet;for(E.addAll(A),E.remove(s.Token.EPSILON);g!=null&&g.invokingState>=0&&A.contains(s.Token.EPSILON);){let b=this.states[g.invokingState].transition(0);A=this.nextTokens(b.followState),E.addAll(A),E.remove(s.Token.EPSILON),g=g._parent}return A.contains(s.Token.EPSILON)&&E.add(s.Token.EOF),E}};d([t.NotNull],c.prototype,"states",void 0),d([t.NotNull],c.prototype,"decisionToState",void 0),d([t.NotNull],c.prototype,"modeNameToStartState",void 0),d([t.NotNull],c.prototype,"modeToStartState",void 0),d([t.NotNull],c.prototype,"decisionToDFA",void 0),d([t.NotNull],c.prototype,"modeToDFA",void 0),d([t.NotNull],c.prototype,"nextTokens",null),d([y(0,t.NotNull)],c.prototype,"removeState",null),d([y(0,t.NotNull),y(1,t.NotNull)],c.prototype,"defineMode",null),d([y(0,t.NotNull)],c.prototype,"defineDecisionState",null),d([t.NotNull],c.prototype,"getExpectedTokens",null),c=d([y(0,t.NotNull)],c),a.ATN=c,(function(p){p.INVALID_ALT_NUMBER=0})(c=a.ATN||(a.ATN={})),a.ATN=c})(wr)),wr}var Ct={},Ot={},lc;function up(){if(lc)return Ot;lc=1;/*!
264
258
  * Copyright 2016 The ANTLR Project. All rights reserved.
265
259
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
266
- */var a=Kr&&Kr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.OrderedATNConfigSet=void 0;const d=Bi(),y=pe();let m=class lp extends d.ATNConfigSet{constructor(u,r){u!=null&&r!=null?super(u,r):super()}clone(u){let r=new lp(this,u);return!u&&this.isReadOnly&&r.addAll(this),r}getKey(u){return{state:0,alt:u.hashCode()}}canMerge(u,r,o){return u.equals(o)}};return a([y.Override],m.prototype,"clone",null),a([y.Override],m.prototype,"getKey",null),a([y.Override],m.prototype,"canMerge",null),Kr.OrderedATNConfigSet=m,Kr}var pc;function co(){return pc||(pc=1,(function(a){/*!
260
+ */var a=Ot&&Ot.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Ot&&Ot.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.ActionTransition=void 0;const y=pe(),m=br();let h=class extends m.Transition{constructor(r,o,t=-1,i=!1){super(r),this.ruleIndex=o,this.actionIndex=t,this.isCtxDependent=i}get serializationType(){return 6}get isEpsilon(){return!0}matches(r,o,t){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"isEpsilon",null),a([y.Override],h.prototype,"matches",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),Ot.ActionTransition=h,Ot}var Qr={},cc;function lp(){if(cc)return Qr;cc=1;/*!
267
261
  * Copyright 2016 The ANTLR Project. All rights reserved.
268
262
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
269
- */var d=qr&&qr.__decorate||function(N,b,w,P){var j=arguments.length,W=j<3?b:P===null?P=Object.getOwnPropertyDescriptor(b,w):P,L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(N,b,w,P);else for(var $=N.length-1;$>=0;$--)(L=N[$])&&(W=(j<3?L(W):j>3?L(b,w,W):L(b,w))||W);return j>3&&W&&Object.defineProperty(b,w,W),W},y=qr&&qr.__param||function(N,b){return function(w,P){b(w,P,N)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerATNSimulator=void 0;const m=J0(),h=lt(),u=so(),r=Bi(),o=uo(),t=ao(),i=Ve(),e=gr(),s=br(),l=Bh(),c=lo(),p=pe(),v=kh(),x=ot(),g=Mi(),_=Ie(),A=Ue();let E=class He extends o.ATNSimulator{constructor(b,w){super(b),this.optimize_tail_calls=!0,this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=s.Lexer.DEFAULT_MODE,this.prevAccept=new He.SimState,this.recog=w}copyState(b){this._charPositionInLine=b.charPositionInLine,this._line=b._line,this.mode=b.mode,this.startIndex=b.startIndex}match(b,w){this.mode=w;let P=b.mark();try{this.startIndex=b.index,this.prevAccept.reset();let j=this.atn.modeToDFA[w].s0;return j==null?this.matchATN(b):this.execATN(b,j)}finally{b.release(P)}}reset(){this.prevAccept.reset(),this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=s.Lexer.DEFAULT_MODE}matchATN(b){let w=this.atn.modeToStartState[this.mode];He.debug&&console.log(`matchATN mode ${this.mode} start: ${w}`);let P=this.mode,j=this.computeStartState(b,w),W=j.hasSemanticContext;W&&(j.hasSemanticContext=!1);let L=this.addDFAState(j);if(!W){let Q=this.atn.modeToDFA[this.mode];Q.s0?L=Q.s0:Q.s0=L}let $=this.execATN(b,L);return He.debug&&console.log(`DFA after matchATN: ${this.atn.modeToDFA[P].toLexerString()}`),$}execATN(b,w){He.debug&&console.log(`start state closure=${w.configs}`),w.isAcceptState&&this.captureSimState(this.prevAccept,b,w);let P=b.LA(1),j=w;for(;;){He.debug&&console.log(`execATN loop starting closure: ${j.configs}`);let W=this.getExistingTargetState(j,P);if(W==null&&(W=this.computeTargetState(b,j,P)),W===o.ATNSimulator.ERROR||(P!==e.IntStream.EOF&&this.consume(b),W.isAcceptState&&(this.captureSimState(this.prevAccept,b,W),P===e.IntStream.EOF)))break;P=b.LA(1),j=W}return this.failOrAccept(this.prevAccept,b,j.configs,P)}getExistingTargetState(b,w){let P=b.getTarget(w);return He.debug&&P!=null&&console.log("reuse state "+b.stateNumber+" edge to "+P.stateNumber),P}computeTargetState(b,w,P){let j=new v.OrderedATNConfigSet;return this.getReachableConfigSet(b,w.configs,j,P),j.isEmpty?(j.hasSemanticContext||this.addDFAEdge(w,P,o.ATNSimulator.ERROR),o.ATNSimulator.ERROR):this.addDFAEdge(w,P,j)}failOrAccept(b,w,P,j){if(b.dfaState!=null){let W=b.dfaState.lexerActionExecutor;return this.accept(w,W,this.startIndex,b.index,b.line,b.charPos),b.dfaState.prediction}else{if(j===e.IntStream.EOF&&w.index===this.startIndex)return _.Token.EOF;throw new c.LexerNoViableAltException(this.recog,w,this.startIndex,P)}}getReachableConfigSet(b,w,P,j){let W=h.ATN.INVALID_ALT_NUMBER;for(let L of w){let $=L.alt===W;if($&&L.hasPassedThroughNonGreedyDecision)continue;He.debug&&console.log(`testing ${this.getTokenName(j)} at ${L.toString(this.recog,!0)}`);let Q=L.state.numberOfOptimizedTransitions;for(let ee=0;ee<Q;ee++){let I=L.state.getOptimizedTransition(ee),X=this.getReachableTarget(I,j);if(X!=null){let ie=L.lexerActionExecutor,ce;ie!=null?(ie=ie.fixOffsetBeforeMatch(b.index-this.startIndex),ce=L.transform(X,!0,ie)):(A(L.lexerActionExecutor==null),ce=L.transform(X,!0));let oe=j===e.IntStream.EOF;if(this.closure(b,ce,P,$,!0,oe)){W=L.alt;break}}}}}accept(b,w,P,j,W,L){He.debug&&console.log(`ACTION ${w}`),b.seek(j),this._line=W,this._charPositionInLine=L,w!=null&&this.recog!=null&&w.execute(this.recog,b,P)}getReachableTarget(b,w){if(b.matches(w,s.Lexer.MIN_CHAR_VALUE,s.Lexer.MAX_CHAR_VALUE))return b.target}computeStartState(b,w){let P=x.PredictionContext.EMPTY_FULL,j=new v.OrderedATNConfigSet;for(let W=0;W<w.numberOfTransitions;W++){let L=w.transition(W).target,$=u.ATNConfig.create(L,W+1,P);this.closure(b,$,j,!1,!1,!1)}return j}closure(b,w,P,j,W,L){if(He.debug&&console.log("closure("+w.toString(this.recog,!0)+")"),w.state instanceof g.RuleStopState){He.debug&&(this.recog!=null?console.log(`closure at ${this.recog.ruleNames[w.state.ruleIndex]} rule stop ${w}`):console.log(`closure at rule stop ${w}`));let Q=w.context;if(Q.isEmpty)return P.add(w),!0;Q.hasEmpty&&(P.add(w.transform(w.state,!0,x.PredictionContext.EMPTY_FULL)),j=!0);for(let ee=0;ee<Q.size;ee++){let I=Q.getReturnState(ee);if(I===x.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let X=Q.getParent(ee),ie=this.atn.states[I],ce=w.transform(ie,!1,X);j=this.closure(b,ce,P,j,W,L)}return j}w.state.onlyHasEpsilonTransitions||(!j||!w.hasPassedThroughNonGreedyDecision)&&P.add(w);let $=w.state;for(let Q=0;Q<$.numberOfOptimizedTransitions;Q++){let ee=$.getOptimizedTransition(Q),I=this.getEpsilonTarget(b,w,ee,P,W,L);I!=null&&(j=this.closure(b,I,P,j,W,L))}return j}getEpsilonTarget(b,w,P,j,W,L){let $;switch(P.serializationType){case 3:let Q=P;if(this.optimize_tail_calls&&Q.optimizedTailCall&&!w.context.hasEmpty)$=w.transform(P.target,!0);else{let I=w.context.getChild(Q.followState.stateNumber);$=w.transform(P.target,!0,I)}break;case 10:throw new Error("Precedence predicates are not supported in lexers.");case 4:let ee=P;He.debug&&console.log("EVAL rule "+ee.ruleIndex+":"+ee.predIndex),j.hasSemanticContext=!0,this.evaluatePredicate(b,ee.ruleIndex,ee.predIndex,W)?$=w.transform(P.target,!0):$=void 0;break;case 6:if(w.context.hasEmpty){let I=l.LexerActionExecutor.append(w.lexerActionExecutor,this.atn.lexerActions[P.actionIndex]);$=w.transform(P.target,!0,I);break}else{$=w.transform(P.target,!0);break}case 1:$=w.transform(P.target,!0);break;case 5:case 2:case 7:if(L&&P.matches(e.IntStream.EOF,s.Lexer.MIN_CHAR_VALUE,s.Lexer.MAX_CHAR_VALUE)){$=w.transform(P.target,!1);break}$=void 0;break;default:$=void 0;break}return $}evaluatePredicate(b,w,P,j){if(this.recog==null)return!0;if(!j)return this.recog.sempred(void 0,w,P);let W=this._charPositionInLine,L=this._line,$=b.index,Q=b.mark();try{return this.consume(b),this.recog.sempred(void 0,w,P)}finally{this._charPositionInLine=W,this._line=L,b.seek($),b.release(Q)}}captureSimState(b,w,P){b.index=w.index,b.line=this._line,b.charPos=this._charPositionInLine,b.dfaState=P}addDFAEdge(b,w,P){if(P instanceof r.ATNConfigSet){let j=P.hasSemanticContext;j&&(P.hasSemanticContext=!1);let W=this.addDFAState(P);return j||this.addDFAEdge(b,w,W),W}else He.debug&&console.log("EDGE "+b+" -> "+P+" upon "+String.fromCharCode(w)),b?.setTarget(w,P)}addDFAState(b){A(!b.hasSemanticContext);let w=new t.DFAState(b),P=this.atn.modeToDFA[this.mode].states.get(w);if(P!=null)return P;b.optimizeConfigs(this);let j=new t.DFAState(b.clone(!0)),W;for(let L of b)if(L.state instanceof g.RuleStopState){W=L;break}if(W!=null){let L=this.atn.ruleToTokenType[W.state.ruleIndex],$=W.lexerActionExecutor;j.acceptStateInfo=new m.AcceptStateInfo(L,$)}return this.atn.modeToDFA[this.mode].addState(j)}getDFA(b){return this.atn.modeToDFA[b]}getText(b){return b.getText(i.Interval.of(this.startIndex,b.index-1))}get line(){return this._line}set line(b){this._line=b}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(b){this._charPositionInLine=b}consume(b){b.LA(1)===10?(this._line++,this._charPositionInLine=0):this._charPositionInLine++,b.consume()}getTokenName(b){return b===-1?"EOF":"'"+String.fromCharCode(b)+"'"}};d([p.NotNull],E.prototype,"prevAccept",void 0),d([y(0,p.NotNull)],E.prototype,"copyState",null),d([y(0,p.NotNull)],E.prototype,"match",null),d([p.Override],E.prototype,"reset",null),d([y(0,p.NotNull)],E.prototype,"matchATN",null),d([y(0,p.NotNull),y(1,p.NotNull)],E.prototype,"execATN",null),d([y(0,p.NotNull)],E.prototype,"getExistingTargetState",null),d([p.NotNull,y(0,p.NotNull),y(1,p.NotNull)],E.prototype,"computeTargetState",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull)],E.prototype,"getReachableConfigSet",null),d([y(0,p.NotNull)],E.prototype,"accept",null),d([p.NotNull,y(0,p.NotNull),y(1,p.NotNull)],E.prototype,"computeStartState",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull)],E.prototype,"closure",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull),y(3,p.NotNull)],E.prototype,"getEpsilonTarget",null),d([y(0,p.NotNull)],E.prototype,"evaluatePredicate",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull)],E.prototype,"captureSimState",null),d([p.NotNull,y(0,p.NotNull)],E.prototype,"addDFAState",null),d([p.NotNull],E.prototype,"getDFA",null),d([p.NotNull,y(0,p.NotNull)],E.prototype,"getText",null),d([y(0,p.NotNull)],E.prototype,"consume",null),d([p.NotNull],E.prototype,"getTokenName",null),E=d([y(0,p.NotNull)],E),a.LexerATNSimulator=E,(function(N){N.debug=!1,N.dfa_debug=!1;class b{constructor(){this.index=-1,this.line=0,this.charPos=-1}reset(){this.index=-1,this.line=0,this.charPos=-1,this.dfaState=void 0}}N.SimState=b})(E=a.LexerATNSimulator||(a.LexerATNSimulator={})),a.LexerATNSimulator=E})(qr)),qr}var hc;function br(){if(hc)return Mr;hc=1;/*!
263
+ */var a=Qr&&Qr.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.ATNDeserializationOptions=void 0;const d=pe();let y=class Un{constructor(h){this.readOnly=!1,h?(this.verifyATN=h.verifyATN,this.generateRuleBypassTransitions=h.generateRuleBypassTransitions,this.optimize=h.optimize):(this.verifyATN=!0,this.generateRuleBypassTransitions=!1,this.optimize=!0)}static get defaultOptions(){return Un._defaultOptions==null&&(Un._defaultOptions=new Un,Un._defaultOptions.makeReadOnly()),Un._defaultOptions}get isReadOnly(){return this.readOnly}makeReadOnly(){this.readOnly=!0}get isVerifyATN(){return this.verifyATN}set isVerifyATN(h){this.throwIfReadOnly(),this.verifyATN=h}get isGenerateRuleBypassTransitions(){return this.generateRuleBypassTransitions}set isGenerateRuleBypassTransitions(h){this.throwIfReadOnly(),this.generateRuleBypassTransitions=h}get isOptimize(){return this.optimize}set isOptimize(h){this.throwIfReadOnly(),this.optimize=h}throwIfReadOnly(){if(this.isReadOnly)throw new Error("The object is read only.")}};return a([d.NotNull],y,"defaultOptions",null),Qr.ATNDeserializationOptions=y,Qr}var Dt={},fc;function cp(){if(fc)return Dt;fc=1;/*!
270
264
  * Copyright 2016 The ANTLR Project. All rights reserved.
271
265
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
272
- */var a=Mr&&Mr.__decorate||function(s,l,c,p){var v=arguments.length,x=v<3?l:p===null?p=Object.getOwnPropertyDescriptor(l,c):p,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(s,l,c,p);else for(var _=s.length-1;_>=0;_--)(g=s[_])&&(x=(v<3?g(x):v>3?g(l,c,x):g(l,c))||x);return v>3&&x&&Object.defineProperty(l,c,x),x};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.Lexer=void 0;const d=Ta(),y=K0(),m=Ve(),h=gr(),u=co(),r=lo(),o=pe(),t=ki(),i=Ie();let e=class mr extends t.Recognizer{constructor(l){super(),this._factory=d.CommonTokenFactory.DEFAULT,this._tokenStartCharIndex=-1,this._tokenStartLine=0,this._tokenStartCharPositionInLine=0,this._hitEOF=!1,this._channel=0,this._type=0,this._modeStack=new y.IntegerStack,this._mode=mr.DEFAULT_MODE,this._input=l,this._tokenFactorySourcePair={source:this,stream:l}}static get DEFAULT_TOKEN_CHANNEL(){return i.Token.DEFAULT_CHANNEL}static get HIDDEN(){return i.Token.HIDDEN_CHANNEL}reset(l){(l===void 0||l)&&this._input.seek(0),this._token=void 0,this._type=i.Token.INVALID_TYPE,this._channel=i.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartCharPositionInLine=-1,this._tokenStartLine=-1,this._text=void 0,this._hitEOF=!1,this._mode=mr.DEFAULT_MODE,this._modeStack.clear(),this.interpreter.reset()}nextToken(){if(this._input==null)throw new Error("nextToken requires a non-null input stream.");let l=this._input.mark();try{e:for(;;){if(this._hitEOF)return this.emitEOF();this._token=void 0,this._channel=i.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartCharPositionInLine=this.interpreter.charPositionInLine,this._tokenStartLine=this.interpreter.line,this._text=void 0;do{this._type=i.Token.INVALID_TYPE;let c;try{c=this.interpreter.match(this._input,this._mode)}catch(p){if(p instanceof r.LexerNoViableAltException)this.notifyListeners(p),this.recover(p),c=mr.SKIP;else throw p}if(this._input.LA(1)===h.IntStream.EOF&&(this._hitEOF=!0),this._type===i.Token.INVALID_TYPE&&(this._type=c),this._type===mr.SKIP)continue e}while(this._type===mr.MORE);return this._token==null?this.emit():this._token}}finally{this._input.release(l)}}skip(){this._type=mr.SKIP}more(){this._type=mr.MORE}mode(l){this._mode=l}pushMode(l){u.LexerATNSimulator.debug&&console.log("pushMode "+l),this._modeStack.push(this._mode),this.mode(l)}popMode(){if(this._modeStack.isEmpty)throw new Error("EmptyStackException");return u.LexerATNSimulator.debug&&console.log("popMode back to "+this._modeStack.peek()),this.mode(this._modeStack.pop()),this._mode}get tokenFactory(){return this._factory}set tokenFactory(l){this._factory=l}get inputStream(){return this._input}set inputStream(l){this.reset(!1),this._input=l,this._tokenFactorySourcePair={source:this,stream:this._input}}get sourceName(){return this._input.sourceName}emit(l){return l||(l=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.charIndex-1,this._tokenStartLine,this._tokenStartCharPositionInLine)),this._token=l,l}emitEOF(){let l=this.charPositionInLine,c=this.line,p=this._factory.create(this._tokenFactorySourcePair,i.Token.EOF,void 0,i.Token.DEFAULT_CHANNEL,this._input.index,this._input.index-1,c,l);return this.emit(p),p}get line(){return this.interpreter.line}set line(l){this.interpreter.line=l}get charPositionInLine(){return this.interpreter.charPositionInLine}set charPositionInLine(l){this.interpreter.charPositionInLine=l}get charIndex(){return this._input.index}get text(){return this._text!=null?this._text:this.interpreter.getText(this._input)}set text(l){this._text=l}get token(){return this._token}set token(l){this._token=l}set type(l){this._type=l}get type(){return this._type}set channel(l){this._channel=l}get channel(){return this._channel}getAllTokens(){let l=[],c=this.nextToken();for(;c.type!==i.Token.EOF;)l.push(c),c=this.nextToken();return l}notifyListeners(l){let c=this._input.getText(m.Interval.of(this._tokenStartCharIndex,this._input.index)),p="token recognition error at: '"+this.getErrorDisplay(c)+"'",v=this.getErrorListenerDispatch();v.syntaxError&&v.syntaxError(this,void 0,this._tokenStartLine,this._tokenStartCharPositionInLine,p,l)}getErrorDisplay(l){if(typeof l=="number"){switch(l){case i.Token.EOF:return"<EOF>";case 10:return"\\n";case 9:return"\\t";case 13:return"\\r"}return String.fromCharCode(l)}return l.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}getCharErrorDisplay(l){return"'"+this.getErrorDisplay(l)+"'"}recover(l){l instanceof r.LexerNoViableAltException?this._input.LA(1)!==h.IntStream.EOF&&this.interpreter.consume(this._input):this._input.consume()}};return e.DEFAULT_MODE=0,e.MORE=-2,e.SKIP=-3,e.MIN_CHAR_VALUE=0,e.MAX_CHAR_VALUE=1114111,a([o.Override],e.prototype,"nextToken",null),a([o.Override],e.prototype,"tokenFactory",null),a([o.Override],e.prototype,"inputStream",null),a([o.Override],e.prototype,"sourceName",null),a([o.Override],e.prototype,"line",null),a([o.Override],e.prototype,"charPositionInLine",null),Mr.Lexer=e,Mr}var xc;function Mn(){if(xc)return mt;xc=1;/*!
266
+ */var a=Dt&&Dt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Dt&&Dt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.AtomTransition=void 0;const y=Mn(),m=pe(),h=br();let u=class extends h.Transition{constructor(o,t){super(o),this._label=t}get serializationType(){return 5}get label(){return y.IntervalSet.of(this._label)}matches(o,t,i){return this._label===o}toString(){return String(this.label)}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override,m.NotNull],u.prototype,"label",null),a([m.Override],u.prototype,"matches",null),a([m.Override,m.NotNull],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),Dt.AtomTransition=u,Dt}var Xr={},li={},pc;function lo(){if(pc)return li;pc=1;/*!
273
267
  * Copyright 2016 The ANTLR Project. All rights reserved.
274
268
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
275
- */var a=mt&&mt.__decorate||function(e,s,l,c){var p=arguments.length,v=p<3?s:c===null?c=Object.getOwnPropertyDescriptor(s,l):c,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,l,c);else for(var g=e.length-1;g>=0;g--)(x=e[g])&&(v=(p<3?x(v):p>3?x(s,l,v):x(s,l))||v);return p>3&&v&&Object.defineProperty(s,l,v),v},d=mt&&mt.__param||function(e,s){return function(l,c){s(l,c,e)}};Object.defineProperty(mt,"__esModule",{value:!0}),mt.IntervalSet=void 0;const y=no(),m=Sa(),h=Ve(),u=br(),r=ke(),o=pe(),t=Ie();let i=class Fe{constructor(s){this.readonly=!1,s!=null?this._intervals=s.slice(0):this._intervals=[]}static get COMPLETE_CHAR_SET(){return Fe._COMPLETE_CHAR_SET===void 0&&(Fe._COMPLETE_CHAR_SET=Fe.of(u.Lexer.MIN_CHAR_VALUE,u.Lexer.MAX_CHAR_VALUE),Fe._COMPLETE_CHAR_SET.setReadonly(!0)),Fe._COMPLETE_CHAR_SET}static get EMPTY_SET(){return Fe._EMPTY_SET==null&&(Fe._EMPTY_SET=new Fe,Fe._EMPTY_SET.setReadonly(!0)),Fe._EMPTY_SET}static of(s,l=s){let c=new Fe;return c.add(s,l),c}clear(){if(this.readonly)throw new Error("can't alter readonly IntervalSet");this._intervals.length=0}add(s,l=s){this.addRange(h.Interval.of(s,l))}addRange(s){if(this.readonly)throw new Error("can't alter readonly IntervalSet");if(!(s.b<s.a)){for(let l=0;l<this._intervals.length;l++){let c=this._intervals[l];if(s.equals(c))return;if(s.adjacent(c)||!s.disjoint(c)){let p=s.union(c);for(this._intervals[l]=p;l<this._intervals.length-1;){l++;let v=this._intervals[l];if(!p.adjacent(v)&&p.disjoint(v))break;this._intervals.splice(l,1),l--,this._intervals[l]=p.union(v)}return}if(s.startsBeforeDisjoint(c)){this._intervals.splice(l,0,s);return}}this._intervals.push(s)}}static or(s){let l=new Fe;for(let c of s)l.addAll(c);return l}addAll(s){if(s==null)return this;if(s instanceof Fe){let l=s,c=l._intervals.length;for(let p=0;p<c;p++){let v=l._intervals[p];this.add(v.a,v.b)}}else for(let l of s.toArray())this.add(l);return this}complementRange(s,l){return this.complement(Fe.of(s,l))}complement(s){if(s.isNil)return Fe.EMPTY_SET;let l;return s instanceof Fe?l=s:(l=new Fe,l.addAll(s)),l.subtract(this)}subtract(s){if(s==null||s.isNil)return new Fe(this._intervals);if(s instanceof Fe)return Fe.subtract(this,s);let l=new Fe;return l.addAll(s),Fe.subtract(this,l)}static subtract(s,l){if(s.isNil)return new Fe;let c=new Fe(s._intervals);if(l.isNil)return c;let p=0,v=0;for(;p<c._intervals.length&&v<l._intervals.length;){let x=c._intervals[p],g=l._intervals[v];if(g.b<x.a){v++;continue}if(g.a>x.b){p++;continue}let _,A;if(g.a>x.a&&(_=new h.Interval(x.a,g.a-1)),g.b<x.b&&(A=new h.Interval(g.b+1,x.b)),_)if(A){c._intervals[p]=_,c._intervals.splice(p+1,0,A),p++,v++;continue}else{c._intervals[p]=_,p++;continue}else if(A){c._intervals[p]=A,v++;continue}else{c._intervals.splice(p,1);continue}}return c}or(s){let l=new Fe;return l.addAll(this),l.addAll(s),l}and(s){if(s.isNil)return new Fe;let l=this._intervals,c=s._intervals,p,v=l.length,x=c.length,g=0,_=0;for(;g<v&&_<x;){let A=l[g],E=c[_];A.startsBeforeDisjoint(E)?g++:E.startsBeforeDisjoint(A)?_++:A.properlyContains(E)?(p||(p=new Fe),p.addRange(A.intersection(E)),_++):E.properlyContains(A)?(p||(p=new Fe),p.addRange(A.intersection(E)),g++):A.disjoint(E)||(p||(p=new Fe),p.addRange(A.intersection(E)),A.startsAfterNonDisjoint(E)?_++:E.startsAfterNonDisjoint(A)&&g++)}return p||new Fe}contains(s){let l=this._intervals.length,c=0,p=l-1;for(;c<=p;){let v=c+p>>1,x=this._intervals[v],g=x.a;if(x.b<s)c=v+1;else if(g>s)p=v-1;else return!0}return!1}get isNil(){return this._intervals==null||this._intervals.length===0}get maxElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[this._intervals.length-1].b}get minElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[0].a}get intervals(){return this._intervals}hashCode(){let s=r.MurmurHash.initialize();for(let l of this._intervals)s=r.MurmurHash.update(s,l.a),s=r.MurmurHash.update(s,l.b);return s=r.MurmurHash.finish(s,this._intervals.length*2),s}equals(s){return s==null||!(s instanceof Fe)?!1:y.ArrayEqualityComparator.INSTANCE.equals(this._intervals,s._intervals)}toString(s=!1){let l="";if(this._intervals==null||this._intervals.length===0)return"{}";this.size>1&&(l+="{");let c=!0;for(let p of this._intervals){c?c=!1:l+=", ";let v=p.a,x=p.b;v===x?v===t.Token.EOF?l+="<EOF>":s?l+="'"+String.fromCodePoint(v)+"'":l+=v:s?l+="'"+String.fromCodePoint(v)+"'..'"+String.fromCodePoint(x)+"'":l+=v+".."+x}return this.size>1&&(l+="}"),l}toStringVocabulary(s){if(this._intervals==null||this._intervals.length===0)return"{}";let l="";this.size>1&&(l+="{");let c=!0;for(let p of this._intervals){c?c=!1:l+=", ";let v=p.a,x=p.b;if(v===x)l+=this.elementName(s,v);else for(let g=v;g<=x;g++)g>v&&(l+=", "),l+=this.elementName(s,g)}return this.size>1&&(l+="}"),l}elementName(s,l){return l===t.Token.EOF?"<EOF>":l===t.Token.EPSILON?"<EPSILON>":s.getDisplayName(l)}get size(){let s=0,l=this._intervals.length;if(l===1){let c=this._intervals[0];return c.b-c.a+1}for(let c=0;c<l;c++){let p=this._intervals[c];s+=p.b-p.a+1}return s}toIntegerList(){let s=new m.IntegerList(this.size),l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;for(let g=v;g<=x;g++)s.add(g)}return s}toSet(){let s=new Set;for(let l of this._intervals){let c=l.a,p=l.b;for(let v=c;v<=p;v++)s.add(v)}return s}toArray(){let s=new Array,l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;for(let g=v;g<=x;g++)s.push(g)}return s}remove(s){if(this.readonly)throw new Error("can't alter readonly IntervalSet");let l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;if(s<v)break;if(s===v&&s===x){this._intervals.splice(c,1);break}if(s===v){this._intervals[c]=h.Interval.of(p.a+1,p.b);break}if(s===x){this._intervals[c]=h.Interval.of(p.a,p.b-1);break}if(s>v&&s<x){let g=p.b;this._intervals[c]=h.Interval.of(p.a,s-1),this.add(s+1,g)}}}get isReadonly(){return this.readonly}setReadonly(s){if(this.readonly&&!s)throw new Error("can't alter readonly IntervalSet");this.readonly=s}};return a([o.Override],i.prototype,"addAll",null),a([o.Override],i.prototype,"complement",null),a([o.Override],i.prototype,"subtract",null),a([o.Override],i.prototype,"or",null),a([o.Override],i.prototype,"and",null),a([o.Override],i.prototype,"contains",null),a([o.Override],i.prototype,"isNil",null),a([o.Override],i.prototype,"hashCode",null),a([o.Override],i.prototype,"equals",null),a([d(0,o.NotNull)],i.prototype,"toStringVocabulary",null),a([o.NotNull,d(0,o.NotNull)],i.prototype,"elementName",null),a([o.Override],i.prototype,"size",null),a([o.Override],i.prototype,"remove",null),a([o.NotNull],i,"of",null),a([o.NotNull],i,"subtract",null),mt.IntervalSet=i,mt}var Jr={},Ke={},Zr={},dc;function cp(){if(dc)return Zr;dc=1;/*!
269
+ */Object.defineProperty(li,"__esModule",{value:!0}),li.BlockStartState=void 0;const a=kn();let d=class extends a.DecisionState{};return li.BlockStartState=d,li}var hc;function Lh(){if(hc)return Xr;hc=1;/*!
276
270
  * Copyright 2016 The ANTLR Project. All rights reserved.
277
271
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
278
- */var a=Zr&&Zr.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.ATNDeserializationOptions=void 0;const d=pe();let y=class Un{constructor(h){this.readOnly=!1,h?(this.verifyATN=h.verifyATN,this.generateRuleBypassTransitions=h.generateRuleBypassTransitions,this.optimize=h.optimize):(this.verifyATN=!0,this.generateRuleBypassTransitions=!1,this.optimize=!0)}static get defaultOptions(){return Un._defaultOptions==null&&(Un._defaultOptions=new Un,Un._defaultOptions.makeReadOnly()),Un._defaultOptions}get isReadOnly(){return this.readOnly}makeReadOnly(){this.readOnly=!0}get isVerifyATN(){return this.verifyATN}set isVerifyATN(h){this.throwIfReadOnly(),this.verifyATN=h}get isGenerateRuleBypassTransitions(){return this.generateRuleBypassTransitions}set isGenerateRuleBypassTransitions(h){this.throwIfReadOnly(),this.generateRuleBypassTransitions=h}get isOptimize(){return this.optimize}set isOptimize(h){this.throwIfReadOnly(),this.optimize=h}throwIfReadOnly(){if(this.isReadOnly)throw new Error("The object is read only.")}};return a([d.NotNull],y,"defaultOptions",null),Zr.ATNDeserializationOptions=y,Zr}var Rt={},Pt={},mc;function fp(){if(mc)return Pt;mc=1;/*!
272
+ */var a=Xr&&Xr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.BasicBlockStartState=void 0;const d=qe(),y=lo(),m=pe();let h=class extends y.BlockStartState{get stateType(){return d.ATNStateType.BLOCK_START}};return a([m.Override],h.prototype,"stateType",null),Xr.BasicBlockStartState=h,Xr}var Kr={},xc;function Bh(){if(xc)return Kr;xc=1;/*!
279
273
  * Copyright 2016 The ANTLR Project. All rights reserved.
280
274
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
281
- */var a=Pt&&Pt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Pt&&Pt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.ActionTransition=void 0;const y=pe(),m=vr();let h=class extends m.Transition{constructor(r,o,t=-1,i=!1){super(r),this.ruleIndex=o,this.actionIndex=t,this.isCtxDependent=i}get serializationType(){return 6}get isEpsilon(){return!0}matches(r,o,t){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"isEpsilon",null),a([y.Override],h.prototype,"matches",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),Pt.ActionTransition=h,Pt}var Ft={},yc;function pp(){if(yc)return Ft;yc=1;/*!
275
+ */var a=Kr&&Kr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.BlockEndState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{get stateType(){return y.ATNStateType.BLOCK_END}};return a([m.Override],h.prototype,"stateType",null),Kr.BlockEndState=h,Kr}var wt={},dc;function kh(){if(dc)return wt;dc=1;/*!
282
276
  * Copyright 2016 The ANTLR Project. All rights reserved.
283
277
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
284
- */var a=Ft&&Ft.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Ft&&Ft.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.AtomTransition=void 0;const y=Mn(),m=pe(),h=vr();let u=class extends h.Transition{constructor(o,t){super(o),this._label=t}get serializationType(){return 5}get label(){return y.IntervalSet.of(this._label)}matches(o,t,i){return this._label===o}toString(){return String(this.label)}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override,m.NotNull],u.prototype,"label",null),a([m.Override],u.prototype,"matches",null),a([m.Override,m.NotNull],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),Ft.AtomTransition=u,Ft}var en={},li={},gc;function fo(){if(gc)return li;gc=1;/*!
278
+ */var a=wt&&wt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=wt&&wt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.EpsilonTransition=void 0;const y=pe(),m=br();let h=class extends m.Transition{constructor(r,o=-1){super(r),this._outermostPrecedenceReturn=o}get outermostPrecedenceReturn(){return this._outermostPrecedenceReturn}get serializationType(){return 1}get isEpsilon(){return!0}matches(r,o,t){return!1}toString(){return"epsilon"}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"isEpsilon",null),a([y.Override],h.prototype,"matches",null),a([y.Override,y.NotNull],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),wt.EpsilonTransition=h,wt}var Rt={},mc;function Mh(){if(mc)return Rt;mc=1;/*!
285
279
  * Copyright 2016 The ANTLR Project. All rights reserved.
286
280
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
287
- */Object.defineProperty(li,"__esModule",{value:!0}),li.BlockStartState=void 0;const a=kn();let d=class extends a.DecisionState{};return li.BlockStartState=d,li}var _c;function Mh(){if(_c)return en;_c=1;/*!
281
+ */var a=Rt&&Rt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Rt&&Rt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.LexerChannelAction=void 0;const y=ke(),m=pe();let h=class fp{constructor(r){this._channel=r}get channel(){return this._channel}get actionType(){return 0}get isPositionDependent(){return!1}execute(r){r.channel=this._channel}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._channel),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof fp?this._channel===r._channel:!1}toString(){return`channel(${this._channel})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),Rt.LexerChannelAction=h,Rt}var Pt={},yc;function qh(){if(yc)return Pt;yc=1;/*!
288
282
  * Copyright 2016 The ANTLR Project. All rights reserved.
289
283
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
290
- */var a=en&&en.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(en,"__esModule",{value:!0}),en.BasicBlockStartState=void 0;const d=qe(),y=fo(),m=pe();let h=class extends y.BlockStartState{get stateType(){return d.ATNStateType.BLOCK_START}};return a([m.Override],h.prototype,"stateType",null),en.BasicBlockStartState=h,en}var tn={},Ac;function qh(){if(Ac)return tn;Ac=1;/*!
284
+ */var a=Pt&&Pt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Pt&&Pt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.LexerCustomAction=void 0;const y=ke(),m=pe();let h=class pp{constructor(r,o){this._ruleIndex=r,this._actionIndex=o}get ruleIndex(){return this._ruleIndex}get actionIndex(){return this._actionIndex}get actionType(){return 1}get isPositionDependent(){return!0}execute(r){r.action(void 0,this._ruleIndex,this._actionIndex)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._ruleIndex),r=y.MurmurHash.update(r,this._actionIndex),y.MurmurHash.finish(r,3)}equals(r){return r===this?!0:r instanceof pp?this._ruleIndex===r._ruleIndex&&this._actionIndex===r._actionIndex:!1}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),Pt.LexerCustomAction=h,Pt}var Ft={},gc;function jh(){if(gc)return Ft;gc=1;/*!
291
285
  * Copyright 2016 The ANTLR Project. All rights reserved.
292
286
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
293
- */var a=tn&&tn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(tn,"__esModule",{value:!0}),tn.BlockEndState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{get stateType(){return y.ATNStateType.BLOCK_END}};return a([m.Override],h.prototype,"stateType",null),tn.BlockEndState=h,tn}var It={},vc;function jh(){if(vc)return It;vc=1;/*!
287
+ */var a=Ft&&Ft.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Ft&&Ft.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.LexerModeAction=void 0;const y=ke(),m=pe();let h=class hp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 2}get isPositionDependent(){return!1}execute(r){r.mode(this._mode)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._mode),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof hp?this._mode===r._mode:!1}toString(){return`mode(${this._mode})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),Ft.LexerModeAction=h,Ft}var Jr={},_c;function $h(){return _c||(_c=1,(function(a){/*!
294
288
  * Copyright 2016 The ANTLR Project. All rights reserved.
295
289
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
296
- */var a=It&&It.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=It&&It.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(It,"__esModule",{value:!0}),It.EpsilonTransition=void 0;const y=pe(),m=vr();let h=class extends m.Transition{constructor(r,o=-1){super(r),this._outermostPrecedenceReturn=o}get outermostPrecedenceReturn(){return this._outermostPrecedenceReturn}get serializationType(){return 1}get isEpsilon(){return!0}matches(r,o,t){return!1}toString(){return"epsilon"}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"isEpsilon",null),a([y.Override],h.prototype,"matches",null),a([y.Override,y.NotNull],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),It.EpsilonTransition=h,It}var Lt={},Ec;function $h(){if(Ec)return Lt;Ec=1;/*!
290
+ */var d=Jr&&Jr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},y=Jr&&Jr.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerMoreAction=void 0;const m=ke(),h=pe();let u=class{constructor(){}get actionType(){return 3}get isPositionDependent(){return!1}execute(o){o.more()}hashCode(){let o=m.MurmurHash.initialize();return o=m.MurmurHash.update(o,this.actionType),m.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"more"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,y(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerMoreAction=u,(function(r){r.INSTANCE=new r})(u=a.LexerMoreAction||(a.LexerMoreAction={}))})(Jr)),Jr}var Zr={},Ac;function Uh(){return Ac||(Ac=1,(function(a){/*!
297
291
  * Copyright 2016 The ANTLR Project. All rights reserved.
298
292
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
299
- */var a=Lt&&Lt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Lt&&Lt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.LexerChannelAction=void 0;const y=ke(),m=pe();let h=class hp{constructor(r){this._channel=r}get channel(){return this._channel}get actionType(){return 0}get isPositionDependent(){return!1}execute(r){r.channel=this._channel}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._channel),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof hp?this._channel===r._channel:!1}toString(){return`channel(${this._channel})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),Lt.LexerChannelAction=h,Lt}var Bt={},Sc;function Uh(){if(Sc)return Bt;Sc=1;/*!
293
+ */var d=Zr&&Zr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},y=Zr&&Zr.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerPopModeAction=void 0;const m=ke(),h=pe();let u=class{constructor(){}get actionType(){return 4}get isPositionDependent(){return!1}execute(o){o.popMode()}hashCode(){let o=m.MurmurHash.initialize();return o=m.MurmurHash.update(o,this.actionType),m.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"popMode"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,y(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerPopModeAction=u,(function(r){r.INSTANCE=new r})(u=a.LexerPopModeAction||(a.LexerPopModeAction={}))})(Zr)),Zr}var It={},vc;function Vh(){if(vc)return It;vc=1;/*!
300
294
  * Copyright 2016 The ANTLR Project. All rights reserved.
301
295
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
302
- */var a=Bt&&Bt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Bt&&Bt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.LexerCustomAction=void 0;const y=ke(),m=pe();let h=class xp{constructor(r,o){this._ruleIndex=r,this._actionIndex=o}get ruleIndex(){return this._ruleIndex}get actionIndex(){return this._actionIndex}get actionType(){return 1}get isPositionDependent(){return!0}execute(r){r.action(void 0,this._ruleIndex,this._actionIndex)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._ruleIndex),r=y.MurmurHash.update(r,this._actionIndex),y.MurmurHash.finish(r,3)}equals(r){return r===this?!0:r instanceof xp?this._ruleIndex===r._ruleIndex&&this._actionIndex===r._actionIndex:!1}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),Bt.LexerCustomAction=h,Bt}var kt={},Tc;function Vh(){if(Tc)return kt;Tc=1;/*!
296
+ */var a=It&&It.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=It&&It.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(It,"__esModule",{value:!0}),It.LexerPushModeAction=void 0;const y=ke(),m=pe();let h=class xp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 5}get isPositionDependent(){return!1}execute(r){r.pushMode(this._mode)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._mode),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof xp?this._mode===r._mode:!1}toString(){return`pushMode(${this._mode})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),It.LexerPushModeAction=h,It}var en={},Ec;function zh(){return Ec||(Ec=1,(function(a){/*!
303
297
  * Copyright 2016 The ANTLR Project. All rights reserved.
304
298
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
305
- */var a=kt&&kt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=kt&&kt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(kt,"__esModule",{value:!0}),kt.LexerModeAction=void 0;const y=ke(),m=pe();let h=class dp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 2}get isPositionDependent(){return!1}execute(r){r.mode(this._mode)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._mode),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof dp?this._mode===r._mode:!1}toString(){return`mode(${this._mode})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),kt.LexerModeAction=h,kt}var rn={},bc;function zh(){return bc||(bc=1,(function(a){/*!
299
+ */var d=en&&en.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},y=en&&en.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerSkipAction=void 0;const m=ke(),h=pe();let u=class{constructor(){}get actionType(){return 6}get isPositionDependent(){return!1}execute(o){o.skip()}hashCode(){let o=m.MurmurHash.initialize();return o=m.MurmurHash.update(o,this.actionType),m.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"skip"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,y(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerSkipAction=u,(function(r){r.INSTANCE=new r})(u=a.LexerSkipAction||(a.LexerSkipAction={}))})(en)),en}var Lt={},Sc;function Hh(){if(Sc)return Lt;Sc=1;/*!
306
300
  * Copyright 2016 The ANTLR Project. All rights reserved.
307
301
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
308
- */var d=rn&&rn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},y=rn&&rn.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerMoreAction=void 0;const m=ke(),h=pe();let u=class{constructor(){}get actionType(){return 3}get isPositionDependent(){return!1}execute(o){o.more()}hashCode(){let o=m.MurmurHash.initialize();return o=m.MurmurHash.update(o,this.actionType),m.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"more"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,y(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerMoreAction=u,(function(r){r.INSTANCE=new r})(u=a.LexerMoreAction||(a.LexerMoreAction={}))})(rn)),rn}var nn={},Nc;function Hh(){return Nc||(Nc=1,(function(a){/*!
302
+ */var a=Lt&&Lt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Lt&&Lt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.LexerTypeAction=void 0;const y=ke(),m=pe();let h=class dp{constructor(r){this._type=r}get type(){return this._type}get actionType(){return 7}get isPositionDependent(){return!1}execute(r){r.type=this._type}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._type),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof dp?this._type===r._type:!1}toString(){return`type(${this._type})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),Lt.LexerTypeAction=h,Lt}var tn={},Tc;function mp(){if(Tc)return tn;Tc=1;/*!
309
303
  * Copyright 2016 The ANTLR Project. All rights reserved.
310
304
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
311
- */var d=nn&&nn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},y=nn&&nn.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerPopModeAction=void 0;const m=ke(),h=pe();let u=class{constructor(){}get actionType(){return 4}get isPositionDependent(){return!1}execute(o){o.popMode()}hashCode(){let o=m.MurmurHash.initialize();return o=m.MurmurHash.update(o,this.actionType),m.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"popMode"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,y(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerPopModeAction=u,(function(r){r.INSTANCE=new r})(u=a.LexerPopModeAction||(a.LexerPopModeAction={}))})(nn)),nn}var Mt={},Cc;function Gh(){if(Cc)return Mt;Cc=1;/*!
305
+ */var a=tn&&tn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(tn,"__esModule",{value:!0}),tn.LoopEndState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{get stateType(){return y.ATNStateType.LOOP_END}};return a([m.Override],h.prototype,"stateType",null),tn.LoopEndState=h,tn}var Bt={},rn={},bc;function Gh(){if(bc)return rn;bc=1;/*!
312
306
  * Copyright 2016 The ANTLR Project. All rights reserved.
313
307
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
314
- */var a=Mt&&Mt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Mt&&Mt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.LexerPushModeAction=void 0;const y=ke(),m=pe();let h=class mp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 5}get isPositionDependent(){return!1}execute(r){r.pushMode(this._mode)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._mode),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof mp?this._mode===r._mode:!1}toString(){return`pushMode(${this._mode})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),Mt.LexerPushModeAction=h,Mt}var on={},Oc;function Yh(){return Oc||(Oc=1,(function(a){/*!
308
+ */var a=rn&&rn.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(rn,"__esModule",{value:!0}),rn.ConflictInfo=void 0;const d=pe(),y=ut();let m=class yp{constructor(u,r){this._conflictedAlts=u,this.exact=r}get conflictedAlts(){return this._conflictedAlts}get isExact(){return this.exact}equals(u){return u===this?!0:u instanceof yp?this.isExact===u.isExact&&y.equals(this.conflictedAlts,u.conflictedAlts):!1}hashCode(){return this.conflictedAlts.hashCode()}};return a([d.Override],m.prototype,"equals",null),a([d.Override],m.prototype,"hashCode",null),rn.ConflictInfo=m,rn}var nn={},Ke={},kt={},Mt={},qt={},Nc;function gp(){if(Nc)return qt;Nc=1;/*!
315
309
  * Copyright 2016 The ANTLR Project. All rights reserved.
316
310
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
317
- */var d=on&&on.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},y=on&&on.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerSkipAction=void 0;const m=ke(),h=pe();let u=class{constructor(){}get actionType(){return 6}get isPositionDependent(){return!1}execute(o){o.skip()}hashCode(){let o=m.MurmurHash.initialize();return o=m.MurmurHash.update(o,this.actionType),m.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"skip"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,y(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerSkipAction=u,(function(r){r.INSTANCE=new r})(u=a.LexerSkipAction||(a.LexerSkipAction={}))})(on)),on}var qt={},Dc;function Wh(){if(Dc)return qt;Dc=1;/*!
311
+ */var a=qt&&qt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=qt&&qt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(qt,"__esModule",{value:!0}),qt.PredicateTransition=void 0;const y=Ca(),m=pe(),h=Yn();let u=class extends y.AbstractPredicateTransition{constructor(o,t,i,e){super(o),this.ruleIndex=t,this.predIndex=i,this.isCtxDependent=e}get serializationType(){return 4}get isEpsilon(){return!0}matches(o,t,i){return!1}get predicate(){return new h.SemanticContext.Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override],u.prototype,"isEpsilon",null),a([m.Override],u.prototype,"matches",null),a([m.Override,m.NotNull],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),qt.PredicateTransition=u,qt}var Cc;function co(){if(Cc)return Mt;Cc=1;/*!
318
312
  * Copyright 2016 The ANTLR Project. All rights reserved.
319
313
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
320
- */var a=qt&&qt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=qt&&qt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(qt,"__esModule",{value:!0}),qt.LexerTypeAction=void 0;const y=ke(),m=pe();let h=class yp{constructor(r){this._type=r}get type(){return this._type}get actionType(){return 7}get isPositionDependent(){return!1}execute(r){r.type=this._type}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._type),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof yp?this._type===r._type:!1}toString(){return`type(${this._type})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),qt.LexerTypeAction=h,qt}var sn={},wc;function gp(){if(wc)return sn;wc=1;/*!
314
+ */var a=Mt&&Mt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Mt&&Mt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.FailedPredicateException=void 0;const y=Sr(),m=pe(),h=gp();let u=class _p extends y.RecognitionException{constructor(o,t,i){super(o,o.inputStream,o.context,_p.formatMessage(t,i));let s=o.interpreter.atn.states[o.state].transition(0);s instanceof h.PredicateTransition?(this._ruleIndex=s.ruleIndex,this._predicateIndex=s.predIndex):(this._ruleIndex=0,this._predicateIndex=0),this._predicate=t,super.setOffendingToken(o,o.currentToken)}get ruleIndex(){return this._ruleIndex}get predicateIndex(){return this._predicateIndex}get predicate(){return this._predicate}static formatMessage(o,t){return t||`failed predicate: {${o}}?`}};return a([m.NotNull],u,"formatMessage",null),u=a([d(0,m.NotNull)],u),Mt.FailedPredicateException=u,Mt}var jt={},Oc;function fo(){if(Oc)return jt;Oc=1;/*!
321
315
  * Copyright 2016 The ANTLR Project. All rights reserved.
322
316
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
323
- */var a=sn&&sn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(sn,"__esModule",{value:!0}),sn.LoopEndState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{get stateType(){return y.ATNStateType.LOOP_END}};return a([m.Override],h.prototype,"stateType",null),sn.LoopEndState=h,sn}var jt={},an={},Rc;function Qh(){if(Rc)return an;Rc=1;/*!
317
+ */var a=jt&&jt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=jt&&jt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(jt,"__esModule",{value:!0}),jt.InputMismatchException=void 0;const y=Sr(),m=pe();let h=class extends y.RecognitionException{constructor(r,o,t){t===void 0&&(t=r.context),super(r,r.inputStream,t),o!==void 0&&this.setOffendingState(o),this.setOffendingToken(r,r.currentToken)}};return h=a([d(0,m.NotNull)],h),jt.InputMismatchException=h,jt}var Dc;function Ra(){if(Dc)return kt;Dc=1;/*!
324
318
  * Copyright 2016 The ANTLR Project. All rights reserved.
325
319
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
326
- */var a=an&&an.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(an,"__esModule",{value:!0}),an.ConflictInfo=void 0;const d=pe(),y=ut();let m=class _p{constructor(u,r){this._conflictedAlts=u,this.exact=r}get conflictedAlts(){return this._conflictedAlts}get isExact(){return this.exact}equals(u){return u===this?!0:u instanceof _p?this.isExact===u.isExact&&y.equals(this.conflictedAlts,u.conflictedAlts):!1}hashCode(){return this.conflictedAlts.hashCode()}};return a([d.Override],m.prototype,"equals",null),a([d.Override],m.prototype,"hashCode",null),an.ConflictInfo=m,an}var un={},ln={},$t={},Pc;function Nr(){if(Pc)return $t;Pc=1;/*!
320
+ */var a=kt&&kt.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},d=kt&&kt.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(kt,"__esModule",{value:!0}),kt.DefaultErrorStrategy=void 0;const y=dr(),m=qe(),h=co(),u=fo(),r=Mn(),o=po(),t=ot(),i=Ie(),e=pe();let s=class{constructor(){this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.nextTokensState=y.ATNState.INVALID_STATE_NUMBER}reset(c){this.endErrorCondition(c)}beginErrorCondition(c){this.errorRecoveryMode=!0}inErrorRecoveryMode(c){return this.errorRecoveryMode}endErrorCondition(c){this.errorRecoveryMode=!1,this.lastErrorStates=void 0,this.lastErrorIndex=-1}reportMatch(c){this.endErrorCondition(c)}reportError(c,p){this.inErrorRecoveryMode(c)||(this.beginErrorCondition(c),p instanceof o.NoViableAltException?this.reportNoViableAlternative(c,p):p instanceof u.InputMismatchException?this.reportInputMismatch(c,p):p instanceof h.FailedPredicateException?this.reportFailedPredicate(c,p):(console.error(`unknown recognition error type: ${p}`),this.notifyErrorListeners(c,p.toString(),p)))}notifyErrorListeners(c,p,v){let x=v.getOffendingToken(c);x===void 0&&(x=null),c.notifyErrorListeners(p,x,v)}recover(c,p){this.lastErrorIndex===c.inputStream.index&&this.lastErrorStates&&this.lastErrorStates.contains(c.state)&&c.consume(),this.lastErrorIndex=c.inputStream.index,this.lastErrorStates||(this.lastErrorStates=new r.IntervalSet),this.lastErrorStates.add(c.state);let v=this.getErrorRecoverySet(c);this.consumeUntil(c,v)}sync(c){let p=c.interpreter.atn.states[c.state];if(this.inErrorRecoveryMode(c))return;let x=c.inputStream.LA(1),g=c.atn.nextTokens(p);if(g.contains(x)){this.nextTokensContext=void 0,this.nextTokensState=y.ATNState.INVALID_STATE_NUMBER;return}if(g.contains(i.Token.EPSILON)){this.nextTokensContext===void 0&&(this.nextTokensContext=c.context,this.nextTokensState=c.state);return}switch(p.stateType){case m.ATNStateType.BLOCK_START:case m.ATNStateType.STAR_BLOCK_START:case m.ATNStateType.PLUS_BLOCK_START:case m.ATNStateType.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(c))return;throw new u.InputMismatchException(c);case m.ATNStateType.PLUS_LOOP_BACK:case m.ATNStateType.STAR_LOOP_BACK:this.reportUnwantedToken(c);let A=c.getExpectedTokens().or(this.getErrorRecoverySet(c));this.consumeUntil(c,A);break}}reportNoViableAlternative(c,p){let v=c.inputStream,x;v?p.startToken.type===i.Token.EOF?x="<EOF>":x=v.getTextFromRange(p.startToken,p.getOffendingToken()):x="<unknown input>";let g="no viable alternative at input "+this.escapeWSAndQuote(x);this.notifyErrorListeners(c,g,p)}reportInputMismatch(c,p){let v=p.expectedTokens,x=v?v.toStringVocabulary(c.vocabulary):"",g="mismatched input "+this.getTokenErrorDisplay(p.getOffendingToken(c))+" expecting "+x;this.notifyErrorListeners(c,g,p)}reportFailedPredicate(c,p){let x="rule "+c.ruleNames[c.context.ruleIndex]+" "+p.message;this.notifyErrorListeners(c,x,p)}reportUnwantedToken(c){if(this.inErrorRecoveryMode(c))return;this.beginErrorCondition(c);let p=c.currentToken,v=this.getTokenErrorDisplay(p),x=this.getExpectedTokens(c),g="extraneous input "+v+" expecting "+x.toStringVocabulary(c.vocabulary);c.notifyErrorListeners(g,p,void 0)}reportMissingToken(c){if(this.inErrorRecoveryMode(c))return;this.beginErrorCondition(c);let p=c.currentToken,x="missing "+this.getExpectedTokens(c).toStringVocabulary(c.vocabulary)+" at "+this.getTokenErrorDisplay(p);c.notifyErrorListeners(x,p,void 0)}recoverInline(c){let p=this.singleTokenDeletion(c);if(p)return c.consume(),p;if(this.singleTokenInsertion(c))return this.getMissingSymbol(c);throw this.nextTokensContext===void 0?new u.InputMismatchException(c):new u.InputMismatchException(c,this.nextTokensState,this.nextTokensContext)}singleTokenInsertion(c){let p=c.inputStream.LA(1),x=c.interpreter.atn.states[c.state].transition(0).target,g=c.interpreter.atn;return g.nextTokens(x,t.PredictionContext.fromRuleContext(g,c.context)).contains(p)?(this.reportMissingToken(c),!0):!1}singleTokenDeletion(c){let p=c.inputStream.LA(2);if(this.getExpectedTokens(c).contains(p)){this.reportUnwantedToken(c),c.consume();let x=c.currentToken;return this.reportMatch(c),x}}getMissingSymbol(c){let p=c.currentToken,v=this.getExpectedTokens(c),x=i.Token.INVALID_TYPE;v.isNil||(x=v.minElement);let g;x===i.Token.EOF?g="<missing EOF>":g="<missing "+c.vocabulary.getDisplayName(x)+">";let _=p,A=c.inputStream.tryLT(-1);return _.type===i.Token.EOF&&A!=null&&(_=A),this.constructToken(c.inputStream.tokenSource,x,g,_)}constructToken(c,p,v,x){let g=c.tokenFactory,_=x.tokenSource,A=_?_.inputStream:void 0;return g.create({source:c,stream:A},p,v,i.Token.DEFAULT_CHANNEL,-1,-1,x.line,x.charPositionInLine)}getExpectedTokens(c){return c.getExpectedTokens()}getTokenErrorDisplay(c){if(!c)return"<no token>";let p=this.getSymbolText(c);return p||(this.getSymbolType(c)===i.Token.EOF?p="<EOF>":p=`<${this.getSymbolType(c)}>`),this.escapeWSAndQuote(p)}getSymbolText(c){return c.text}getSymbolType(c){return c.type}escapeWSAndQuote(c){return c=c.replace(`
321
+ `,"\\n"),c=c.replace("\r","\\r"),c=c.replace(" ","\\t"),"'"+c+"'"}getErrorRecoverySet(c){let p=c.interpreter.atn,v=c.context,x=new r.IntervalSet;for(;v&&v.invokingState>=0;){let _=p.states[v.invokingState].transition(0),A=p.nextTokens(_.followState);x.addAll(A),v=v._parent}return x.remove(i.Token.EPSILON),x}consumeUntil(c,p){let v=c.inputStream.LA(1);for(;v!==i.Token.EOF&&!p.contains(v);)c.consume(),v=c.inputStream.LA(1)}};return a([e.Override],s.prototype,"reset",null),a([d(0,e.NotNull)],s.prototype,"beginErrorCondition",null),a([e.Override],s.prototype,"inErrorRecoveryMode",null),a([d(0,e.NotNull)],s.prototype,"endErrorCondition",null),a([e.Override],s.prototype,"reportMatch",null),a([e.Override],s.prototype,"reportError",null),a([d(0,e.NotNull)],s.prototype,"notifyErrorListeners",null),a([e.Override],s.prototype,"recover",null),a([e.Override],s.prototype,"sync",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportNoViableAlternative",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportInputMismatch",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportFailedPredicate",null),a([d(0,e.NotNull)],s.prototype,"reportUnwantedToken",null),a([d(0,e.NotNull)],s.prototype,"reportMissingToken",null),a([e.Override],s.prototype,"recoverInline",null),a([d(0,e.NotNull)],s.prototype,"singleTokenInsertion",null),a([d(0,e.NotNull)],s.prototype,"singleTokenDeletion",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getMissingSymbol",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getExpectedTokens",null),a([d(0,e.NotNull)],s.prototype,"getSymbolText",null),a([d(0,e.NotNull)],s.prototype,"getSymbolType",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"escapeWSAndQuote",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getErrorRecoverySet",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"consumeUntil",null),kt.DefaultErrorStrategy=s,kt}var $t={},wc;function Yh(){if(wc)return $t;wc=1;/*!
327
322
  * Copyright 2016 The ANTLR Project. All rights reserved.
328
323
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
329
- */var a=$t&&$t.__decorate||function(c,p,v,x){var g=arguments.length,_=g<3?p:x===null?x=Object.getOwnPropertyDescriptor(p,v):x,A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(c,p,v,x);else for(var E=c.length-1;E>=0;E--)(A=c[E])&&(_=(g<3?A(_):g>3?A(p,v,_):A(p,v))||_);return g>3&&_&&Object.defineProperty(p,v,_),_},d=$t&&$t.__param||function(c,p){return function(v,x){p(v,x,c)}};Object.defineProperty($t,"__esModule",{value:!0}),$t.Trees=void 0;const y=lt(),m=Li(),h=Ri(),u=pe(),r=$i(),o=st(),t=Pi(),i=_r(),e=Ie(),s=ut();let l=class yr{static toStringTree(p,v){let x;v instanceof r.Parser?x=v.ruleNames:x=v;let g=s.escapeWhitespace(this.getNodeText(p,x),!1);if(p.childCount===0)return g;let _="";_+="(",g=s.escapeWhitespace(this.getNodeText(p,x),!1),_+=g,_+=" ";for(let A=0;A<p.childCount;A++)A>0&&(_+=" "),_+=this.toStringTree(p.getChild(A),x);return _+=")",_}static getNodeText(p,v){let x;if(v instanceof r.Parser)x=v.ruleNames;else if(v)x=v;else{let g=p.payload;return typeof g.text=="string"?g.text:p.payload.toString()}if(p instanceof t.RuleNode){let g=p.ruleContext,_=g.ruleIndex,A=x[_],E=g.altNumber;return E!==y.ATN.INVALID_ALT_NUMBER?A+":"+E:A}else{if(p instanceof h.ErrorNode)return p.toString();if(p instanceof i.TerminalNode)return p.symbol.text||""}throw new TypeError("Unexpected node type")}static getChildren(p){let v=[];for(let x=0;x<p.childCount;x++)v.push(p.getChild(x));return v}static getAncestors(p){let v=[],x=p.parent;for(;x;)v.unshift(x),x=x.parent;return v}static isAncestorOf(p,v){if(!p||!v||!p.parent)return!1;let x=v.parent;for(;x;){if(p===x)return!0;x=x.parent}return!1}static findAllTokenNodes(p,v){return yr.findAllNodes(p,v,!0)}static findAllRuleNodes(p,v){return yr.findAllNodes(p,v,!1)}static findAllNodes(p,v,x){let g=[];return yr._findAllNodes(p,v,x,g),g}static _findAllNodes(p,v,x,g){x&&p instanceof i.TerminalNode?p.symbol.type===v&&g.push(p):!x&&p instanceof o.ParserRuleContext&&p.ruleIndex===v&&g.push(p);for(let _=0;_<p.childCount;_++)yr._findAllNodes(p.getChild(_),v,x,g)}static getDescendants(p){let v=[];function x(g){v.push(g);const _=g.childCount;for(let A=0;A<_;A++)x(g.getChild(A))}return x(p),v}static getRootOfSubtreeEnclosingRegion(p,v,x){let g=p.childCount;for(let _=0;_<g;_++){let A=p.getChild(_),E=yr.getRootOfSubtreeEnclosingRegion(A,v,x);if(E)return E}if(p instanceof o.ParserRuleContext){let _=p.stop;if(v>=p.start.tokenIndex&&(_==null||x<=_.tokenIndex))return p}}static stripChildrenOutOfRange(p,v,x,g){if(!p)return;let _=p.childCount;for(let A=0;A<_;A++){let E=p.getChild(A),N=E.sourceInterval;if(E instanceof o.ParserRuleContext&&(N.b<x||N.a>g)&&yr.isAncestorOf(E,v)){let b=new m.CommonToken(e.Token.INVALID_TYPE,"...");p.children[A]=new i.TerminalNode(b)}}}static findNodeSuchThat(p,v){if(v(p))return p;let x=p.childCount;for(let g=0;g<x;g++){let _=yr.findNodeSuchThat(p.getChild(g),v);if(_!==void 0)return _}}};return a([d(0,u.NotNull)],l,"toStringTree",null),a([u.NotNull,d(0,u.NotNull)],l,"getAncestors",null),a([d(0,u.NotNull)],l,"getRootOfSubtreeEnclosingRegion",null),$t.Trees=l,$t}var Fc;function vp(){if(Fc)return ln;Fc=1;/*!
324
+ */var a=$t&&$t.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=$t&&$t.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty($t,"__esModule",{value:!0}),$t.ParseInfo=void 0;const y=pe();let m=class{constructor(u){this.atnSimulator=u}getDecisionInfo(){return this.atnSimulator.getDecisionInfo()}getLLDecisions(){let u=this.atnSimulator.getDecisionInfo(),r=[];for(let o=0;o<u.length;o++)u[o].LL_Fallback>0&&r.push(o);return r}getTotalTimeInPrediction(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.timeInPrediction;return r}getTotalSLLLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_TotalLook;return r}getTotalLLLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.LL_TotalLook;return r}getTotalSLLATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_ATNTransitions;return r}getTotalLLATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.LL_ATNTransitions;return r}getTotalATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_ATNTransitions,r+=o.LL_ATNTransitions;return r}getDFASize(u){if(u)return this.atnSimulator.atn.decisionToDFA[u].states.size;{let r=0,o=this.atnSimulator.atn.decisionToDFA;for(let t=0;t<o.length;t++)r+=this.getDFASize(t);return r}}};return a([y.NotNull],m.prototype,"getDecisionInfo",null),a([y.NotNull],m.prototype,"getLLDecisions",null),m=a([d(0,y.NotNull)],m),$t.ParseInfo=m,$t}var on={},Rc;function Ap(){if(Rc)return on;Rc=1;/*!
330
325
  * Copyright 2016 The ANTLR Project. All rights reserved.
331
326
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
332
- */var a=ln&&ln.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p};Object.defineProperty(ln,"__esModule",{value:!0}),ln.RuleContext=void 0;const d=lt(),y=ki(),m=Pi(),h=Ve(),u=pe(),r=Nr(),o=st();let t=class Ap extends m.RuleNode{constructor(e,s){super(),this._parent=e,this.invokingState=s??-1}static getChildContext(e,s){return new Ap(e,s)}depth(){let e=0,s=this;for(;s;)s=s._parent,e++;return e}get isEmpty(){return this.invokingState===-1}get sourceInterval(){return h.Interval.INVALID}get ruleContext(){return this}get parent(){return this._parent}setParent(e){this._parent=e}get payload(){return this}get text(){if(this.childCount===0)return"";let e="";for(let s=0;s<this.childCount;s++)e+=this.getChild(s).text;return e.toString()}get ruleIndex(){return-1}get altNumber(){return d.ATN.INVALID_ALT_NUMBER}set altNumber(e){}getChild(e){throw new RangeError("i must be greater than or equal to 0 and less than childCount")}get childCount(){return 0}accept(e){return e.visitChildren(this)}toStringTree(e){return r.Trees.toStringTree(this,e)}toString(e,s){const l=e instanceof y.Recognizer?e.ruleNames:e;s=s||o.ParserRuleContext.emptyContext();let c="",p=this;for(c+="[";p&&p!==s;){if(!l)p.isEmpty||(c+=p.invokingState);else{let v=p.ruleIndex,x=v>=0&&v<l.length?l[v]:v.toString();c+=x}p._parent&&(l||!p._parent.isEmpty)&&(c+=" "),p=p._parent}return c+="]",c.toString()}};return a([u.Override],t.prototype,"sourceInterval",null),a([u.Override],t.prototype,"ruleContext",null),a([u.Override],t.prototype,"parent",null),a([u.Override],t.prototype,"setParent",null),a([u.Override],t.prototype,"payload",null),a([u.Override],t.prototype,"text",null),a([u.Override],t.prototype,"getChild",null),a([u.Override],t.prototype,"childCount",null),a([u.Override],t.prototype,"accept",null),a([u.Override],t.prototype,"toStringTree",null),ln.RuleContext=t,ln}var Ic;function st(){if(Ic)return un;Ic=1;/*!
327
+ */var a=on&&on.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(on,"__esModule",{value:!0}),on.ProxyParserErrorListener=void 0;const d=Sa(),y=pe();let m=class extends d.ProxyErrorListener{constructor(u){super(u)}reportAmbiguity(u,r,o,t,i,e,s){this.getDelegates().forEach(l=>{l.reportAmbiguity&&l.reportAmbiguity(u,r,o,t,i,e,s)})}reportAttemptingFullContext(u,r,o,t,i,e){this.getDelegates().forEach(s=>{s.reportAttemptingFullContext&&s.reportAttemptingFullContext(u,r,o,t,i,e)})}reportContextSensitivity(u,r,o,t,i,e){this.getDelegates().forEach(s=>{s.reportContextSensitivity&&s.reportContextSensitivity(u,r,o,t,i,e)})}};return a([y.Override],m.prototype,"reportAmbiguity",null),a([y.Override],m.prototype,"reportAttemptingFullContext",null),a([y.Override],m.prototype,"reportContextSensitivity",null),on.ProxyParserErrorListener=m,on}var sn={},an={},ci={},Pc;function vp(){if(Pc)return ci;Pc=1;/*!
333
328
  * Copyright 2016 The ANTLR Project. All rights reserved.
334
329
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
335
- */var a=un&&un.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(un,"__esModule",{value:!0}),un.ParserRuleContext=void 0;const d=Ri(),y=Ve(),m=pe(),h=vp(),u=_r();let r=class la extends h.RuleContext{constructor(t,i){i==null?super():super(t,i)}static emptyContext(){return la.EMPTY}copyFrom(t){if(this._parent=t._parent,this.invokingState=t.invokingState,this._start=t._start,this._stop=t._stop,t.children){this.children=[];for(let i of t.children)i instanceof d.ErrorNode&&this.addChild(i)}}enterRule(t){}exitRule(t){}addAnyChild(t){return this.children?this.children.push(t):this.children=[t],t}addChild(t){if(t instanceof u.TerminalNode){t.setParent(this),this.addAnyChild(t);return}else if(t instanceof h.RuleContext){this.addAnyChild(t);return}else return t=new u.TerminalNode(t),this.addAnyChild(t),t.setParent(this),t}addErrorNode(t){if(t instanceof d.ErrorNode){const i=t;return i.setParent(this),this.addAnyChild(i)}else{const i=t;let e=new d.ErrorNode(i);return this.addAnyChild(e),e.setParent(this),e}}removeLastChild(){this.children&&this.children.pop()}get parent(){let t=super.parent;if(t===void 0||t instanceof la)return t;throw new TypeError("Invalid parent type for ParserRuleContext")}getChild(t,i){if(!this.children||t<0||t>=this.children.length)throw new RangeError("index parameter must be between >= 0 and <= number of children.");if(i==null)return this.children[t];let e=this.tryGetChild(t,i);if(e===void 0)throw new Error("The specified node does not exist");return e}tryGetChild(t,i){if(!this.children||t<0||t>=this.children.length)return;let e=-1;for(let s of this.children)if(s instanceof i&&(e++,e===t))return s}getToken(t,i){let e=this.tryGetToken(t,i);if(e===void 0)throw new Error("The specified token does not exist");return e}tryGetToken(t,i){if(!this.children||i<0||i>=this.children.length)return;let e=-1;for(let s of this.children)if(s instanceof u.TerminalNode&&s.symbol.type===t&&(e++,e===i))return s}getTokens(t){let i=[];if(!this.children)return i;for(let e of this.children)e instanceof u.TerminalNode&&e.symbol.type===t&&i.push(e);return i}get ruleContext(){return this}getRuleContext(t,i){return this.getChild(t,i)}tryGetRuleContext(t,i){return this.tryGetChild(t,i)}getRuleContexts(t){let i=[];if(!this.children)return i;for(let e of this.children)e instanceof t&&i.push(e);return i}get childCount(){return this.children?this.children.length:0}get sourceInterval(){return this._start?!this._stop||this._stop.tokenIndex<this._start.tokenIndex?y.Interval.of(this._start.tokenIndex,this._start.tokenIndex-1):y.Interval.of(this._start.tokenIndex,this._stop.tokenIndex):y.Interval.INVALID}get start(){return this._start}get stop(){return this._stop}toInfoString(t){return"ParserRuleContext"+t.getRuleInvocationStack(this).reverse()+"{start="+this._start+", stop="+this._stop+"}"}};return r.EMPTY=new r,a([m.Override],r.prototype,"parent",null),a([m.Override],r.prototype,"childCount",null),a([m.Override],r.prototype,"sourceInterval",null),un.ParserRuleContext=r,un}var ci={},Lc;function Xh(){return Lc||(Lc=1,(function(a){/*!
330
+ */Object.defineProperty(ci,"__esModule",{value:!0}),ci.ParseCancellationException=void 0;let a=class extends Error{constructor(y){super(y.message),this.cause=y,this.stack=y.stack}getCause(){return this.cause}};return ci.ParseCancellationException=a,ci}var Fc;function Ep(){if(Fc)return an;Fc=1;/*!
336
331
  * Copyright 2016 The ANTLR Project. All rights reserved.
337
332
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
338
- */var d=ci&&ci.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(a,"__esModule",{value:!0}),a.PredictionMode=void 0;const y=Yn(),m=ke(),h=pe(),u=Mi();(function(r){r[r.SLL=0]="SLL",r[r.LL=1]="LL",r[r.LL_EXACT_AMBIG_DETECTION=2]="LL_EXACT_AMBIG_DETECTION"})(a.PredictionMode||(a.PredictionMode={})),(function(r){class o extends y.Array2DHashMap{constructor(){super(t.INSTANCE)}}class t{AltAndContextConfigEqualityComparator(){}hashCode(l){let c=m.MurmurHash.initialize(7);return c=m.MurmurHash.update(c,l.state.stateNumber),c=m.MurmurHash.update(c,l.context),c=m.MurmurHash.finish(c,2),c}equals(l,c){return l===c?!0:l==null||c==null?!1:l.state.stateNumber===c.state.stateNumber&&l.context.equals(c.context)}}t.INSTANCE=new t,d([h.Override],t.prototype,"hashCode",null),d([h.Override],t.prototype,"equals",null);function i(s){for(let l of s)if(l.state instanceof u.RuleStopState)return!0;return!1}r.hasConfigInRuleStopState=i;function e(s){for(let l of s)if(!(l.state instanceof u.RuleStopState))return!1;return!0}r.allConfigsInRuleStopStates=e})(a.PredictionMode||(a.PredictionMode={}))})(ci)),ci}var Ut={},Bc;function Ep(){if(Bc)return Ut;Bc=1;/*!
333
+ */var a=an&&an.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(an,"__esModule",{value:!0}),an.BailErrorStrategy=void 0;const d=Ra(),y=fo(),m=pe(),h=vp();let u=class extends d.DefaultErrorStrategy{recover(o,t){for(let i=o.context;i;i=i.parent)i.exception=t;throw new h.ParseCancellationException(t)}recoverInline(o){let t=new y.InputMismatchException(o);for(let i=o.context;i;i=i.parent)i.exception=t;throw new h.ParseCancellationException(t)}sync(o){}};return a([m.Override],u.prototype,"recover",null),a([m.Override],u.prototype,"recoverInline",null),a([m.Override],u.prototype,"sync",null),an.BailErrorStrategy=u,an}var $s={},Us={},Ut={},Ic;function Wh(){if(Ic)return Ut;Ic=1;/*!
339
334
  * Copyright 2016 The ANTLR Project. All rights reserved.
340
335
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
341
- */var a=Ut&&Ut.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Ut&&Ut.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.SimulatorState=void 0;const y=pe(),m=st();let h=class{constructor(r,o,t,i){this.outerContext=r??m.ParserRuleContext.emptyContext(),this.s0=o,this.useContext=t,this.remainingOuterContext=i}};return h=a([d(1,y.NotNull)],h),Ut.SimulatorState=h,Ut}var kc;function qi(){if(kc)return jt;kc=1;/*!
336
+ */Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.isSupplementaryCodePoint=Ut.isLowSurrogate=Ut.isHighSurrogate=void 0;function a(m){return m>=55296&&m<=56319}Ut.isHighSurrogate=a;function d(m){return m>=56320&&m<=57343}Ut.isLowSurrogate=d;function y(m){return m>=65536}return Ut.isSupplementaryCodePoint=y,Ut}var Lc;function Sp(){return Lc||(Lc=1,(function(a){/*!
342
337
  * Copyright 2016 The ANTLR Project. All rights reserved.
343
338
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
344
- */var a=jt&&jt.__decorate||function(G,O,C,D){var F=arguments.length,k=F<3?O:D===null?D=Object.getOwnPropertyDescriptor(O,C):D,T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(G,O,C,D);else for(var R=G.length-1;R>=0;R--)(T=G[R])&&(k=(F<3?T(k):F>3?T(O,C,k):T(O,C))||k);return F>3&&k&&Object.defineProperty(O,C,k),k},d=jt&&jt.__param||function(G,O){return function(C,D){O(C,D,G)}};Object.defineProperty(jt,"__esModule",{value:!0}),jt.ParserATNSimulator=void 0;const y=J0(),m=fp(),h=Er(),u=Ea(),r=lt(),o=so(),t=Bi(),i=uo(),e=qe(),s=pp(),l=Sr(),c=Qh(),p=kn(),v=ao(),x=Sa(),g=Ve(),_=gr(),A=pe(),E=Da(),N=ho(),b=at(),w=st(),P=ot(),j=ba(),W=Xh(),L=Mi(),$=wa(),Q=Gn(),ee=Oa(),I=Ep(),X=Ie(),ie=Tr(),ce=Ue(),oe=65535,te=-2147483648;let B=class Ne extends i.ATNSimulator{constructor(O,C){super(O),this.predictionMode=W.PredictionMode.LL,this.force_global_context=!1,this.always_try_local_context=!0,this.enable_global_context_dfa=!1,this.optimize_unique_closure=!0,this.optimize_ll1=!0,this.optimize_tail_calls=!0,this.tail_call_preserves_sll=!0,this.treat_sllk1_conflict_as_ambiguity=!1,this.reportAmbiguities=!1,this.userWantsCtxSensitive=!0,this._parser=C}getPredictionMode(){return this.predictionMode}setPredictionMode(O){this.predictionMode=O}reset(){}adaptivePredict(O,C,D,F){F===void 0&&(F=!1);let k=this.atn.decisionToDFA[C];if(ce(k!=null),this.optimize_ll1&&!k.isPrecedenceDfa&&!k.isEmpty){let H=O.LA(1);if(H>=0&&H<=65535){let J=(C<<16>>>0)+H,M=this.atn.LL1Table.get(J);if(M!=null)return M}}this.dfa=k,this.force_global_context?F=!0:this.always_try_local_context||(F=F||k.isContextSensitive),this.userWantsCtxSensitive=F||this.predictionMode!==W.PredictionMode.SLL&&D!=null&&!this.atn.decisionToState[C].sll,D==null&&(D=w.ParserRuleContext.emptyContext());let T;k.isEmpty||(T=this.getStartState(k,O,D,F)),T==null&&(D==null&&(D=w.ParserRuleContext.emptyContext()),Ne.debug&&console.log("ATN decision "+k.decision+" exec LA(1)=="+this.getLookaheadName(O)+", outerContext="+D.toString(this._parser)),T=this.computeStartState(k,D,F));let R=O.mark(),q=O.index;try{let H=this.execDFA(k,O,q,T);return Ne.debug&&console.log("DFA after predictATN: "+k.toString(this._parser.vocabulary,this._parser.ruleNames)),H}finally{this.dfa=void 0,O.seek(q),O.release(R)}}getStartState(O,C,D,F){if(!F)if(O.isPrecedenceDfa){let R=O.getPrecedenceStartState(this._parser.precedence,!1);return R==null?void 0:new I.SimulatorState(D,R,!1,D)}else return O.s0==null?void 0:new I.SimulatorState(D,O.s0,!1,D);if(!this.enable_global_context_dfa)return;let k=D;ce(D!=null);let T;for(O.isPrecedenceDfa?T=O.getPrecedenceStartState(this._parser.precedence,!0):T=O.s0full;k!=null&&T!=null&&T.isContextSensitive;)k=this.skipTailCalls(k),T=T.getContextTarget(this.getReturnState(k)),k.isEmpty?ce(T==null||!T.isContextSensitive):k=k.parent;if(T!=null)return new I.SimulatorState(D,T,F,k)}execDFA(O,C,D,F){let k=F.outerContext;Ne.dfa_debug&&console.log("DFA decision "+O.decision+" exec LA(1)=="+this.getLookaheadName(C)+", outerContext="+k.toString(this._parser)),Ne.dfa_debug&&console.log(O.toString(this._parser.vocabulary,this._parser.ruleNames));let T=F.s0,R=C.LA(1),q=F.remainingOuterContext;for(;;){if(Ne.dfa_debug&&console.log("DFA state "+T.stateNumber+" LA(1)=="+this.getLookaheadName(C)),F.useContext)for(;T.isContextSymbol(R);){let M;if(q!=null&&(q=this.skipTailCalls(q),M=T.getContextTarget(this.getReturnState(q))),M==null){let V=new I.SimulatorState(F.outerContext,T,F.useContext,q);return this.execATN(O,C,D,V)}ce(q!=null),q=q.parent,T=M}if(this.isAcceptState(T,F.useContext)){T.predicates!=null?Ne.dfa_debug&&console.log("accept "+T):Ne.dfa_debug&&console.log("accept; predict "+T.prediction+" in state "+T.stateNumber);break}ce(!this.isAcceptState(T,F.useContext));let J=this.getExistingTargetState(T,R);if(J==null){Ne.dfa_debug&&R>=0&&console.log("no edge for "+this._parser.vocabulary.getDisplayName(R));let M;if(Ne.dfa_debug){let Z=g.Interval.of(D,this._parser.inputStream.index);console.log("ATN exec upon "+this._parser.inputStream.getText(Z)+" at DFA state "+T.stateNumber)}let V=new I.SimulatorState(k,T,F.useContext,q);return M=this.execATN(O,C,D,V),Ne.dfa_debug&&console.log("back from DFA update, alt="+M+`, dfa=
345
- `+O.toString(this._parser.vocabulary,this._parser.ruleNames)),Ne.dfa_debug&&console.log("DFA decision "+O.decision+" predicts "+M),M}else if(J===i.ATNSimulator.ERROR){let M=new I.SimulatorState(k,T,F.useContext,q);return this.handleNoViableAlt(C,D,M)}T=J,!this.isAcceptState(T,F.useContext)&&R!==_.IntStream.EOF&&(C.consume(),R=C.LA(1))}if(!F.useContext&&T.configs.conflictInfo!=null&&O.atnStartState instanceof p.DecisionState&&!(!this.userWantsCtxSensitive||!T.configs.dipsIntoOuterContext&&T.configs.isExactConflict||this.treat_sllk1_conflict_as_ambiguity&&C.index===D)){ce(!F.useContext);let J,M=T.predicates;if(M!=null){let V=C.index;if(V!==D&&C.seek(D),J=this.evalSemanticContext(M,k,!0),J.cardinality()===1)return J.nextSetBit(0);V!==D&&C.seek(V)}if(this.reportAmbiguities){let V=new I.SimulatorState(k,T,F.useContext,q);this.reportAttemptingFullContext(O,J,V,D,C.index)}return C.seek(D),this.adaptivePredict(C,O.decision,k,!0)}let H=T.predicates;if(H!=null){let J=C.index;D!==J&&C.seek(D);let M=this.evalSemanticContext(H,k,this.reportAmbiguities&&this.predictionMode===W.PredictionMode.LL_EXACT_AMBIG_DETECTION);switch(M.cardinality()){case 0:throw this.noViableAlt(C,k,T.configs,D);case 1:return M.nextSetBit(0);default:return D!==J&&C.seek(J),this.reportAmbiguity(O,T,D,J,T.configs.isExactConflict,M,T.configs),M.nextSetBit(0)}}return Ne.dfa_debug&&console.log("DFA decision "+O.decision+" predicts "+T.prediction),T.prediction}isAcceptState(O,C){return O.isAcceptState?O.configs.conflictingAlts==null?!0:C&&this.predictionMode===W.PredictionMode.LL_EXACT_AMBIG_DETECTION?O.configs.isExactConflict:!0:!1}execATN(O,C,D,F){Ne.debug&&console.log("execATN decision "+O.decision+" exec LA(1)=="+this.getLookaheadName(C));let k=F.outerContext,T=F.useContext,R=C.LA(1),q=F,H=new j.PredictionContextCache;for(;;){let J=this.computeReachSet(O,q,R,H);if(J==null)return this.setDFAEdge(q.s0,C.LA(1),i.ATNSimulator.ERROR),this.handleNoViableAlt(C,D,q);let M=J.s0;if(ce(M.isAcceptState||M.prediction===r.ATN.INVALID_ALT_NUMBER),ce(M.isAcceptState||M.configs.conflictInfo==null),this.isAcceptState(M,T)){let V=M.configs.conflictingAlts,Z=V==null?M.prediction:r.ATN.INVALID_ALT_NUMBER;if(Z!==r.ATN.INVALID_ALT_NUMBER){if(this.optimize_ll1&&C.index===D&&!O.isPrecedenceDfa&&J.outerContext===J.remainingOuterContext&&O.decision>=0&&!M.configs.hasSemanticContext&&R>=0&&R<=oe){let fe=(O.decision<<16>>>0)+R;this.atn.LL1Table.set(fe,Z)}T&&this.always_try_local_context&&this.reportContextSensitivity(O,Z,J,D,C.index)}Z=M.prediction;let se=V!=null&&this.userWantsCtxSensitive;if(se&&(se=!T&&(M.configs.dipsIntoOuterContext||!M.configs.isExactConflict)&&(!this.treat_sllk1_conflict_as_ambiguity||C.index!==D)),M.configs.hasSemanticContext){let fe=M.predicates;if(fe!=null){let he=C.index;switch(he!==D&&C.seek(D),V=this.evalSemanticContext(fe,k,se||this.reportAmbiguities),V.cardinality()){case 0:throw this.noViableAlt(C,k,M.configs,D);case 1:return V.nextSetBit(0)}he!==D&&C.seek(he)}}if(se){ce(!T),ce(this.isAcceptState(M,!1)),Ne.debug&&console.log("RETRY with outerContext="+k);let fe=this.computeStartState(O,k,!0);return this.reportAmbiguities&&this.reportAttemptingFullContext(O,V,J,D,C.index),C.seek(D),this.execATN(O,C,D,fe)}else return V!=null&&(this.reportAmbiguities&&V.cardinality()>1&&this.reportAmbiguity(O,M,D,C.index,M.configs.isExactConflict,V,M.configs),Z=V.nextSetBit(0)),Z}q=J,R!==_.IntStream.EOF&&(C.consume(),R=C.LA(1))}}handleNoViableAlt(O,C,D){if(D.s0!=null){let F=new l.BitSet,k=0;for(let T of D.s0.configs)(T.reachesIntoOuterContext||T.state instanceof L.RuleStopState)&&(F.set(T.alt),k=Math.max(k,T.alt));switch(F.cardinality()){case 0:break;case 1:return F.nextSetBit(0);default:if(!D.s0.configs.hasSemanticContext)return F.nextSetBit(0);let T=new t.ATNConfigSet;for(let q of D.s0.configs)(q.reachesIntoOuterContext||q.state instanceof L.RuleStopState)&&T.add(q);let R=this.getPredsForAmbigAlts(F,T,k);if(R!=null){let q=this.getPredicatePredictions(F,R);if(q!=null){let H=O.index;try{O.seek(C);let J=this.evalSemanticContext(q,D.outerContext,!1);if(!J.isEmpty)return J.nextSetBit(0)}finally{O.seek(H)}}}return F.nextSetBit(0)}}throw this.noViableAlt(O,D.outerContext,D.s0.configs,C)}computeReachSet(O,C,D,F){let k=C.useContext,T=C.remainingOuterContext,R=C.s0;if(k)for(;R.isContextSymbol(D);){let J;if(T!=null&&(T=this.skipTailCalls(T),J=R.getContextTarget(this.getReturnState(T))),J==null)break;ce(T!=null),T=T.parent,R=J}if(ce(!this.isAcceptState(R,k)),this.isAcceptState(R,k))return new I.SimulatorState(C.outerContext,R,k,T);let q=R,H=this.getExistingTargetState(q,D);if(H==null){let J=this.computeTargetState(O,q,T,D,k,F);H=J[0],T=J[1]}if(H!==i.ATNSimulator.ERROR)return ce(!k||!H.configs.dipsIntoOuterContext),new I.SimulatorState(C.outerContext,H,k,T)}getExistingTargetState(O,C){return O.getTarget(C)}computeTargetState(O,C,D,F,k,T){let R=C.configs.toArray(),q,H=new t.ATNConfigSet,J;do{let V=!k||D!=null;V||(H.isOutermostConfigSet=!0);let Z=new t.ATNConfigSet,se;for(let K of R){if(Ne.debug&&console.log("testing "+this.getTokenName(F)+" at "+K.toString()),K.state instanceof L.RuleStopState){ce(K.context.isEmpty),(k&&!K.reachesIntoOuterContext||F===_.IntStream.EOF)&&(se==null&&(se=[]),se.push(K));continue}let ae=K.state.numberOfOptimizedTransitions;for(let de=0;de<ae;de++){let Ce=K.state.getOptimizedTransition(de),Re=this.getReachableTarget(K,Ce,F);Re!=null&&Z.add(K.transform(Re,!1),T)}}if(this.optimize_unique_closure&&se==null&&F!==X.Token.EOF&&Z.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER){Z.isOutermostConfigSet=H.isOutermostConfigSet,H=Z;break}let fe=!1,he=F===X.Token.EOF;if(this.closure(Z,H,fe,V,T,he),J=H.dipsIntoOuterContext,F===_.IntStream.EOF&&(H=this.removeAllConfigsNotInRuleStopState(H,T)),se!=null&&(!k||!W.PredictionMode.hasConfigInRuleStopState(H))){ce(se.length>0);for(let K of se)H.add(K,T)}if(k&&J){H.clear(),D=D,D=this.skipTailCalls(D);let K=this.getReturnState(D);if(q==null&&(q=new x.IntegerList),D.isEmpty?D=void 0:D=D.parent,q.add(K),K!==P.PredictionContext.EMPTY_FULL_STATE_KEY)for(let ae=0;ae<R.length;ae++)R[ae]=R[ae].appendContext(K,T)}}while(k&&J);return H.isEmpty?(this.setDFAEdge(C,F,i.ATNSimulator.ERROR),[i.ATNSimulator.ERROR,D]):[this.addDFAEdge(O,C,F,q,H,T),D]}removeAllConfigsNotInRuleStopState(O,C){if(W.PredictionMode.allConfigsInRuleStopStates(O))return O;let D=new t.ATNConfigSet;for(let F of O)F.state instanceof L.RuleStopState&&D.add(F,C);return D}computeStartState(O,C,D){let F=O.isPrecedenceDfa?O.getPrecedenceStartState(this._parser.precedence,D):D?O.s0full:O.s0;if(F!=null){if(!D)return new I.SimulatorState(C,F,D,C);F.setContextSensitive(this.atn)}O.decision;let k=O.atnStartState,T=0,R=C,q=D?P.PredictionContext.EMPTY_FULL:P.PredictionContext.EMPTY_LOCAL,H=new j.PredictionContextCache;if(D){if(!this.enable_global_context_dfa)for(;R!=null;)R.isEmpty?(T=P.PredictionContext.EMPTY_FULL_STATE_KEY,R=void 0):(T=this.getReturnState(R),q=q.appendSingleContext(T,H),R=R.parent);for(;F!=null&&F.isContextSensitive&&R!=null;){let M;if(R=this.skipTailCalls(R),R.isEmpty?(M=F.getContextTarget(P.PredictionContext.EMPTY_FULL_STATE_KEY),T=P.PredictionContext.EMPTY_FULL_STATE_KEY,R=void 0):(T=this.getReturnState(R),M=F.getContextTarget(T),q=q.appendSingleContext(T,H),R=R.parent),M==null)break;F=M}}if(F!=null&&!F.isContextSensitive)return new I.SimulatorState(C,F,D,R);let J=new t.ATNConfigSet;for(;;){let M=new t.ATNConfigSet,V=k.numberOfTransitions;for(let ae=0;ae<V;ae++){let de=k.transition(ae).target;M.add(o.ATNConfig.create(de,ae+1,q))}let Z=R!=null;Z||(J.isOutermostConfigSet=!0),this.closure(M,J,!0,Z,H,!1);let fe=J.dipsIntoOuterContext,he;if(D&&!this.enable_global_context_dfa){F=this.addDFAState(O,J,H);break}else F==null?O.isPrecedenceDfa?(J=this.applyPrecedenceFilter(J,C,H),he=this.addDFAState(O,J,H),O.setPrecedenceStartState(this._parser.precedence,D,he)):(he=this.addDFAState(O,J,H),D?O.s0full?he=O.s0full:O.s0full=he:O.s0?he=O.s0:O.s0=he):(O.isPrecedenceDfa&&(J=this.applyPrecedenceFilter(J,C,H)),he=this.addDFAState(O,J,H),F.setContextTarget(T,he));if(F=he,!D||!fe)break;he.setContextSensitive(this.atn),R=R,J.clear(),R=this.skipTailCalls(R);let K=this.getReturnState(R);R.isEmpty?R=void 0:R=R.parent,K!==P.PredictionContext.EMPTY_FULL_STATE_KEY&&(q=q.appendSingleContext(K,H)),T=K}return new I.SimulatorState(C,F,D,R)}applyPrecedenceFilter(O,C,D){let F=new Map,k=new t.ATNConfigSet;for(let T of O){if(T.alt!==1)continue;let R=T.semanticContext.evalPrecedence(this._parser,C);R!=null&&(F.set(T.state.stateNumber,T.context),R!==T.semanticContext?k.add(T.transform(T.state,!1,R),D):k.add(T,D))}for(let T of O)if(T.alt!==1){if(!T.isPrecedenceFilterSuppressed){let R=F.get(T.state.stateNumber);if(R!=null&&R.equals(T.context))continue}k.add(T,D)}return k}getReachableTarget(O,C,D){if(C.matches(D,0,this.atn.maxTokenType))return C.target}predicateDFAState(O,C,D){let F=this.getConflictingAltsFromConfigSet(C);if(!F)throw new Error("This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case.");Ne.debug&&console.log("predicateDFAState "+O);let k=this.getPredsForAmbigAlts(F,C,D),T;return k!=null&&(T=this.getPredicatePredictions(F,k),O.predicates=T),T}getPredsForAmbigAlts(O,C,D){let F=new Array(D+1),k=F.length;for(let q of C)O.get(q.alt)&&(F[q.alt]=Q.SemanticContext.or(F[q.alt],q.semanticContext));let T=0;for(let q=0;q<k;q++)F[q]==null?F[q]=Q.SemanticContext.NONE:F[q]!==Q.SemanticContext.NONE&&T++;let R=F;return T===0&&(R=void 0),Ne.debug&&console.log("getPredsForAmbigAlts result "+(R?u.Arrays.toString(R):"undefined")),R}getPredicatePredictions(O,C){let D=[],F=!1;for(let k=1;k<C.length;k++){let T=C[k];ce(T!=null),O!=null&&O.get(k)&&T===Q.SemanticContext.NONE?D.push(new v.DFAState.PredPrediction(T,k)):T!==Q.SemanticContext.NONE&&(F=!0,D.push(new v.DFAState.PredPrediction(T,k)))}if(F)return D}evalSemanticContext(O,C,D){let F=new l.BitSet;for(let k of O){if(k.pred===Q.SemanticContext.NONE){if(F.set(k.alt),!D)break;continue}let T=this.evalSemanticContextImpl(k.pred,C,k.alt);if((Ne.debug||Ne.dfa_debug)&&console.log("eval pred "+k+"="+T),T&&((Ne.debug||Ne.dfa_debug)&&console.log("PREDICT "+k.alt),F.set(k.alt),!D))break}return F}evalSemanticContextImpl(O,C,D){return O.eval(this._parser,C)}closure(O,C,D,F,k,T){k==null&&(k=j.PredictionContextCache.UNCACHED);let R=O,q=new h.Array2DHashSet(b.ObjectEqualityComparator.INSTANCE);for(;R.size>0;){let H=new t.ATNConfigSet;for(let J of R)this.closureImpl(J,C,H,q,D,F,k,0,T);R=H}}closureImpl(O,C,D,F,k,T,R,q,H){if(Ne.debug&&console.log("closure("+O.toString(this._parser,!0)+")"),O.state instanceof L.RuleStopState)if(O.context.isEmpty)if(T)Ne.debug&&console.log("FALLING off rule "+this.getRuleName(O.state.ruleIndex)),O.context===P.PredictionContext.EMPTY_FULL?O=O.transform(O.state,!1,P.PredictionContext.EMPTY_LOCAL):!O.reachesIntoOuterContext&&P.PredictionContext.isEmptyLocal(O.context)&&C.add(O,R);else{C.add(O,R);return}else{let M=O.context.hasEmpty,V=O.context.size-(M?1:0);for(let Z=0;Z<V;Z++){let se=O.context.getParent(Z),fe=this.atn.states[O.context.getReturnState(Z)],he=o.ATNConfig.create(fe,O.alt,se,O.semanticContext);he.outerContextDepth=O.outerContextDepth,he.isPrecedenceFilterSuppressed=O.isPrecedenceFilterSuppressed,ce(q>te),this.closureImpl(he,C,D,F,k,T,R,q-1,H)}if(!M||!T)return;O=O.transform(O.state,!1,P.PredictionContext.EMPTY_LOCAL)}let J=O.state;J.onlyHasEpsilonTransitions||(C.add(O,R),Ne.debug&&console.log("added config "+C));for(let M=0;M<J.numberOfOptimizedTransitions;M++){if(M===0&&J.stateType===e.ATNStateType.STAR_LOOP_ENTRY&&J.precedenceRuleDecision&&!O.context.hasEmpty){let fe=J,he=!0;for(let K=0;K<O.context.size;K++)if(!fe.precedenceLoopbackStates.get(O.context.getReturnState(K))){he=!1;break}if(he)continue}let V=J.getOptimizedTransition(M),Z=!(V instanceof m.ActionTransition)&&k,se=this.getEpsilonTarget(O,V,Z,q===0,R,H);if(se!=null){if(V instanceof $.RuleTransition&&D!=null&&!k){D.add(se,R);continue}let fe=q;if(O.state instanceof L.RuleStopState){if(this.dfa!=null&&this.dfa.isPrecedenceDfa&&V.outermostPrecedenceReturn===this.dfa.atnStartState.ruleIndex&&(se.isPrecedenceFilterSuppressed=!0),se.outerContextDepth=se.outerContextDepth+1,!F.add(se))continue;ce(fe>te),fe--,Ne.debug&&console.log("dips into outer ctx: "+se)}else if(V instanceof $.RuleTransition)this.optimize_tail_calls&&V.optimizedTailCall&&(!this.tail_call_preserves_sll||!P.PredictionContext.isEmptyLocal(O.context))?(ce(se.context===O.context),fe===0&&(fe--,!this.tail_call_preserves_sll&&P.PredictionContext.isEmptyLocal(O.context)&&(se.outerContextDepth=se.outerContextDepth+1))):fe>=0&&fe++;else if(!V.isEpsilon&&!F.add(se))continue;this.closureImpl(se,C,D,F,Z,T,R,fe,H)}}}getRuleName(O){return this._parser!=null&&O>=0?this._parser.ruleNames[O]:"<rule "+O+">"}getEpsilonTarget(O,C,D,F,k,T){switch(C.serializationType){case 3:return this.ruleTransition(O,C,k);case 10:return this.precedenceTransition(O,C,D,F);case 4:return this.predTransition(O,C,D,F);case 6:return this.actionTransition(O,C);case 1:return O.transform(C.target,!1);case 5:case 2:case 7:return T&&C.matches(X.Token.EOF,0,1)?O.transform(C.target,!1):void 0;default:return}}actionTransition(O,C){return Ne.debug&&console.log("ACTION edge "+C.ruleIndex+":"+C.actionIndex),O.transform(C.target,!1)}precedenceTransition(O,C,D,F){Ne.debug&&(console.log("PRED (collectPredicates="+D+") "+C.precedence+">=_p, ctx dependent=true"),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let k;if(D&&F){let T=Q.SemanticContext.and(O.semanticContext,C.predicate);k=O.transform(C.target,!1,T)}else k=O.transform(C.target,!1);return Ne.debug&&console.log("config from pred transition="+k),k}predTransition(O,C,D,F){Ne.debug&&(console.log("PRED (collectPredicates="+D+") "+C.ruleIndex+":"+C.predIndex+", ctx dependent="+C.isCtxDependent),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let k;if(D&&(!C.isCtxDependent||C.isCtxDependent&&F)){let T=Q.SemanticContext.and(O.semanticContext,C.predicate);k=O.transform(C.target,!1,T)}else k=O.transform(C.target,!1);return Ne.debug&&console.log("config from pred transition="+k),k}ruleTransition(O,C,D){Ne.debug&&console.log("CALL rule "+this.getRuleName(C.target.ruleIndex)+", ctx="+O.context);let F=C.followState,k;return this.optimize_tail_calls&&C.optimizedTailCall&&(!this.tail_call_preserves_sll||!P.PredictionContext.isEmptyLocal(O.context))?k=O.context:D!=null?k=D.getChild(O.context,F.stateNumber):k=O.context.getChild(F.stateNumber),O.transform(C.target,!1,k)}isConflicted(O,C){if(O.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER||O.size<=1)return;let D=O.toArray();D.sort(Ne.STATE_ALT_SORT_COMPARATOR);let F=!O.dipsIntoOuterContext,k=new l.BitSet,T=D[0].alt;k.set(T);let R=D[0].state.nonStopStateNumber;for(let V of D){let Z=V.state.nonStopStateNumber;if(Z!==R){if(V.alt!==T)return;R=Z}}let q;if(F){R=D[0].state.nonStopStateNumber,q=new l.BitSet;let V=T;for(let se of D){if(se.state.nonStopStateNumber!==R)break;let fe=se.alt;q.set(fe),V=fe}R=D[0].state.nonStopStateNumber;let Z=T;for(let se of D){let fe=se.state.nonStopStateNumber,he=se.alt;if(fe!==R){if(Z!==V){F=!1;break}R=fe,Z=T}else if(he!==Z){if(he!==q.nextSetBit(Z+1)){F=!1;break}Z=he}}}R=D[0].state.nonStopStateNumber;let H=0,J=0,M=D[0].context;for(let V=1;V<D.length;V++){let Z=D[V];if(Z.alt!==T||Z.state.nonStopStateNumber!==R)break;J=V,M=C.join(M,D[V].context)}for(let V=J+1;V<D.length;V++){let Z=D[V],se=Z.state;if(k.set(Z.alt),se.nonStopStateNumber!==R){R=se.nonStopStateNumber,H=V,J=V,M=Z.context;for(let de=H+1;de<D.length;de++){let Ce=D[de];if(Ce.alt!==T||Ce.state.nonStopStateNumber!==R)break;J=de,M=C.join(M,Ce.context)}V=J;continue}let fe=Z.context,he=Z.alt,K=V;for(let de=K+1;de<D.length;de++){let Ce=D[de];if(Ce.alt!==he||Ce.state.nonStopStateNumber!==R)break;K=de,fe=C.join(fe,Ce.context)}V=K;let ae=C.join(M,fe);if(!M.equals(ae))return;F=F&&M.equals(fe)}return new c.ConflictInfo(k,F)}getConflictingAltsFromConfigSet(O){let C=O.conflictingAlts;return C==null&&O.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER&&(C=new l.BitSet,C.set(O.uniqueAlt)),C}getTokenName(O){if(O===X.Token.EOF)return"EOF";let D=(this._parser!=null?this._parser.vocabulary:ie.VocabularyImpl.EMPTY_VOCABULARY).getDisplayName(O);return D===String(O)?D:D+"<"+O+">"}getLookaheadName(O){return this.getTokenName(O.LA(1))}dumpDeadEndConfigs(O){console.log("dead end configs: ");let C=O.deadEndConfigs;if(C)for(let D of C){let F="no edges";if(D.state.numberOfOptimizedTransitions>0){let k=D.state.getOptimizedTransition(0);k instanceof s.AtomTransition?F="Atom "+this.getTokenName(k._label):k instanceof ee.SetTransition&&(F=(k instanceof E.NotSetTransition?"~":"")+"Set "+k.set.toString())}console.log(D.toString(this._parser,!0)+":"+F)}}noViableAlt(O,C,D,F){return new N.NoViableAltException(this._parser,O,O.get(F),O.LT(1),D,C)}getUniqueAlt(O){let C=r.ATN.INVALID_ALT_NUMBER;for(let D of O)if(C===r.ATN.INVALID_ALT_NUMBER)C=D.alt;else if(D.alt!==C)return r.ATN.INVALID_ALT_NUMBER;return C}configWithAltAtStopState(O,C){for(let D of O)if(D.alt===C&&D.state instanceof L.RuleStopState)return!0;return!1}addDFAEdge(O,C,D,F,k,T){ce(F==null||F.isEmpty||O.isContextSensitive);let R=C,q=this.addDFAState(O,k,T);if(F!=null)for(let H of F.toArray()){if(H===P.PredictionContext.EMPTY_FULL_STATE_KEY&&R.configs.isOutermostConfigSet)continue;R.setContextSensitive(this.atn),R.setContextSymbol(D);let J=R.getContextTarget(H);if(J!=null){R=J;continue}J=this.addDFAContextState(O,R.configs,H,T),ce(H!==P.PredictionContext.EMPTY_FULL_STATE_KEY||J.configs.isOutermostConfigSet),R.setContextTarget(H,J),R=J}return Ne.debug&&console.log("EDGE "+R+" -> "+q+" upon "+this.getTokenName(D)),this.setDFAEdge(R,D,q),Ne.debug&&console.log(`DFA=
346
- `+O.toString(this._parser!=null?this._parser.vocabulary:ie.VocabularyImpl.EMPTY_VOCABULARY,this._parser!=null?this._parser.ruleNames:void 0)),q}setDFAEdge(O,C,D){O?.setTarget(C,D)}addDFAContextState(O,C,D,F){if(D!==P.PredictionContext.EMPTY_FULL_STATE_KEY){let k=new t.ATNConfigSet;for(let T of C)k.add(T.appendContext(D,F));return this.addDFAState(O,k,F)}else return ce(!C.isOutermostConfigSet,"Shouldn't be adding a duplicate edge."),C=C.clone(!0),C.isOutermostConfigSet=!0,this.addDFAState(O,C,F)}addDFAState(O,C,D){let F=this.enable_global_context_dfa||!C.isOutermostConfigSet;if(F){C.isReadOnly||C.optimizeConfigs(this);let H=this.createDFAState(O,C),J=O.states.get(H);if(J!=null)return J}C.isReadOnly||C.conflictInfo==null&&(C.conflictInfo=this.isConflicted(C,D));let k=this.createDFAState(O,C.clone(!0)),T=this.atn.getDecisionState(O.decision),R=this.getUniqueAlt(C);if(R!==r.ATN.INVALID_ALT_NUMBER)k.acceptStateInfo=new y.AcceptStateInfo(R);else if(C.conflictingAlts!=null){let H=C.conflictingAlts;H&&(k.acceptStateInfo=new y.AcceptStateInfo(H.nextSetBit(0)))}if(k.isAcceptState&&C.hasSemanticContext&&this.predicateDFAState(k,C,T.numberOfTransitions),!F)return k;let q=O.addState(k);return Ne.debug&&q===k&&console.log("adding new DFA state: "+k),q}createDFAState(O,C){return new v.DFAState(C)}reportAttemptingFullContext(O,C,D,F,k){if(Ne.debug||Ne.retry_debug){let T=g.Interval.of(F,k);console.log("reportAttemptingFullContext decision="+O.decision+":"+D.s0.configs+", input="+this._parser.inputStream.getText(T))}if(this._parser!=null){let T=this._parser.getErrorListenerDispatch();T.reportAttemptingFullContext&&T.reportAttemptingFullContext(this._parser,O,F,k,C,D)}}reportContextSensitivity(O,C,D,F,k){if(Ne.debug||Ne.retry_debug){let T=g.Interval.of(F,k);console.log("reportContextSensitivity decision="+O.decision+":"+D.s0.configs+", input="+this._parser.inputStream.getText(T))}if(this._parser!=null){let T=this._parser.getErrorListenerDispatch();T.reportContextSensitivity&&T.reportContextSensitivity(this._parser,O,F,k,C,D)}}reportAmbiguity(O,C,D,F,k,T,R){if(Ne.debug||Ne.retry_debug){let q=g.Interval.of(D,F);console.log("reportAmbiguity "+T+":"+R+", input="+this._parser.inputStream.getText(q))}if(this._parser!=null){let q=this._parser.getErrorListenerDispatch();q.reportAmbiguity&&q.reportAmbiguity(this._parser,O,D,F,k,T,R)}}getReturnState(O){return O.isEmpty?P.PredictionContext.EMPTY_FULL_STATE_KEY:this.atn.states[O.invokingState].transition(0).followState.stateNumber}skipTailCalls(O){if(!this.optimize_tail_calls)return O;for(;!O.isEmpty;){let C=this.atn.states[O.invokingState];if(ce(C.numberOfTransitions===1&&C.transition(0).serializationType===3),!C.transition(0).tailCall)break;O=O.parent}return O}get parser(){return this._parser}};return B.debug=!1,B.dfa_debug=!1,B.retry_debug=!1,B.STATE_ALT_SORT_COMPARATOR=(G,O)=>{let C=G.state.nonStopStateNumber-O.state.nonStopStateNumber;return C!==0||(C=G.alt-O.alt,C!==0)?C:0},a([A.NotNull],B.prototype,"predictionMode",void 0),a([A.NotNull],B.prototype,"getPredictionMode",null),a([d(0,A.NotNull)],B.prototype,"setPredictionMode",null),a([A.Override],B.prototype,"reset",null),a([d(0,A.NotNull)],B.prototype,"adaptivePredict",null),a([d(0,A.NotNull),d(1,A.NotNull),d(2,A.NotNull)],B.prototype,"getStartState",null),a([d(0,A.NotNull),d(1,A.NotNull),d(3,A.NotNull)],B.prototype,"execDFA",null),a([d(0,A.NotNull),d(1,A.NotNull),d(3,A.NotNull)],B.prototype,"execATN",null),a([d(0,A.NotNull),d(2,A.NotNull)],B.prototype,"handleNoViableAlt",null),a([d(0,A.NotNull)],B.prototype,"getExistingTargetState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"computeTargetState",null),a([A.NotNull,d(0,A.NotNull)],B.prototype,"removeAllConfigsNotInRuleStopState",null),a([A.NotNull],B.prototype,"computeStartState",null),a([A.NotNull,d(0,A.NotNull)],B.prototype,"applyPrecedenceFilter",null),a([d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"getReachableTarget",null),a([d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"getPredsForAmbigAlts",null),a([d(0,A.NotNull)],B.prototype,"evalSemanticContext",null),a([d(0,A.NotNull)],B.prototype,"evalSemanticContextImpl",null),a([d(1,A.NotNull),d(4,A.Nullable)],B.prototype,"closure",null),a([d(0,A.NotNull),d(1,A.NotNull),d(2,A.Nullable),d(3,A.NotNull),d(6,A.NotNull)],B.prototype,"closureImpl",null),a([A.NotNull],B.prototype,"getRuleName",null),a([d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"getEpsilonTarget",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"actionTransition",null),a([A.Nullable,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"precedenceTransition",null),a([A.Nullable,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"predTransition",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(2,A.Nullable)],B.prototype,"ruleTransition",null),a([d(0,A.NotNull)],B.prototype,"isConflicted",null),a([A.NotNull],B.prototype,"getTokenName",null),a([d(0,A.NotNull)],B.prototype,"dumpDeadEndConfigs",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(2,A.NotNull)],B.prototype,"noViableAlt",null),a([d(0,A.NotNull)],B.prototype,"getUniqueAlt",null),a([d(0,A.NotNull)],B.prototype,"configWithAltAtStopState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(4,A.NotNull)],B.prototype,"addDFAEdge",null),a([d(0,A.Nullable),d(2,A.Nullable)],B.prototype,"setDFAEdge",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"addDFAContextState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"addDFAState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"createDFAState",null),a([d(0,A.NotNull),d(2,A.NotNull)],B.prototype,"reportAttemptingFullContext",null),a([d(0,A.NotNull),d(2,A.NotNull)],B.prototype,"reportContextSensitivity",null),a([d(0,A.NotNull),d(5,A.NotNull),d(6,A.NotNull)],B.prototype,"reportAmbiguity",null),B=a([d(0,A.NotNull)],B),jt.ParserATNSimulator=B,jt}var cn={},Mc;function Kh(){if(Mc)return cn;Mc=1;/*!
339
+ */Object.defineProperty(a,"__esModule",{value:!0}),a.CodePointBuffer=void 0;const d=Ue(),y=Wh();class m{constructor(u,r){this.buffer=u,this._position=0,this._size=r}static withArray(u){return new m(u,u.length)}get position(){return this._position}set position(u){if(u<0||u>this._size)throw new RangeError;this._position=u}get remaining(){return this._size-this.position}get(u){return this.buffer[u]}array(){return this.buffer.slice(0,this._size)}static builder(u){return new m.Builder(u)}}a.CodePointBuffer=m,(function(h){let u;(function(o){o[o.BYTE=0]="BYTE",o[o.CHAR=1]="CHAR",o[o.INT=2]="INT"})(u||(u={}));class r{constructor(t){this.type=0,this.buffer=new Uint8Array(t),this.prevHighSurrogate=-1,this.position=0}build(){return new h(this.buffer,this.position)}static roundUpToNextPowerOfTwo(t){let i=32-Math.clz32(t-1);return Math.pow(2,i)}ensureRemaining(t){switch(this.type){case 0:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint8Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 1:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint16Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 2:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Int32Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break}}append(t){this.ensureRemaining(t.length),this.appendArray(t)}appendArray(t){switch(this.type){case 0:this.appendArrayByte(t);break;case 1:this.appendArrayChar(t);break;case 2:this.appendArrayInt(t);break}}appendArrayByte(t){d(this.prevHighSurrogate===-1);let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];if(p<=255)l[c]=p;else if(t=t.subarray(e,s),this.position=c,y.isHighSurrogate(p)){this.byteToIntBuffer(t.length),this.appendArrayInt(t);return}else{this.byteToCharBuffer(t.length),this.appendArrayChar(t);return}e++,c++}this.position=c}appendArrayChar(t){d(this.prevHighSurrogate===-1);let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];if(!y.isHighSurrogate(p))l[c]=p;else{t=t.subarray(e,s),this.position=c,this.charToIntBuffer(t.length),this.appendArrayInt(t);return}e++,c++}this.position=c}appendArrayInt(t){let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];e++,this.prevHighSurrogate!==-1?y.isLowSurrogate(p)?(l[c]=String.fromCharCode(this.prevHighSurrogate,p).codePointAt(0),c++,this.prevHighSurrogate=-1):(l[c]=this.prevHighSurrogate,c++,y.isHighSurrogate(p)?this.prevHighSurrogate=p:(l[c]=p,c++,this.prevHighSurrogate=-1)):y.isHighSurrogate(p)?this.prevHighSurrogate=p:(l[c]=p,c++)}this.prevHighSurrogate!==-1&&(l[c]=this.prevHighSurrogate,c++),this.position=c}byteToCharBuffer(t){let i=new Uint16Array(Math.max(this.position+t,this.buffer.length>>1));i.set(this.buffer.subarray(0,this.position),0),this.type=1,this.buffer=i}byteToIntBuffer(t){let i=new Int32Array(Math.max(this.position+t,this.buffer.length>>2));i.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=i}charToIntBuffer(t){let i=new Int32Array(Math.max(this.position+t,this.buffer.length>>1));i.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=i}}h.Builder=r})(m=a.CodePointBuffer||(a.CodePointBuffer={}))})(Us)),Us}var un={},Bc;function bp(){if(Bc)return un;Bc=1;/*!
340
+ * Copyright 2016 The ANTLR Project. All rights reserved.
341
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
342
+ */var a=un&&un.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(un,"__esModule",{value:!0}),un.CodePointCharStream=void 0;const d=Ue(),y=gr(),m=Ve(),h=pe();let u=class Tp{constructor(o,t,i,e){d(t===0),this._array=o,this._size=i,this._name=e,this._position=0}get internalStorage(){return this._array}static fromBuffer(o,t){return(t===void 0||t.length===0)&&(t=y.IntStream.UNKNOWN_SOURCE_NAME),new Tp(o.array(),o.position,o.remaining,t)}consume(){if(this._size-this._position===0)throw d(this.LA(1)===y.IntStream.EOF),new RangeError("cannot consume EOF");this._position++}get index(){return this._position}get size(){return this._size}mark(){return-1}release(o){}seek(o){this._position=o}get sourceName(){return this._name}toString(){return this.getText(m.Interval.of(0,this.size-1))}LA(o){let t;switch(Math.sign(o)){case-1:return t=this.index+o,t<0?y.IntStream.EOF:this._array[t];case 0:return 0;case 1:return t=this.index+o-1,t>=this.size?y.IntStream.EOF:this._array[t]}throw new RangeError("Not reached")}getText(o){const t=Math.min(o.a,this.size),i=Math.min(o.b-o.a+1,this.size-t);return this._array instanceof Int32Array?String.fromCodePoint(...Array.from(this._array.subarray(t,t+i))):String.fromCharCode(...Array.from(this._array.subarray(t,t+i)))}};return a([h.Override],u.prototype,"consume",null),a([h.Override],u.prototype,"index",null),a([h.Override],u.prototype,"size",null),a([h.Override],u.prototype,"mark",null),a([h.Override],u.prototype,"release",null),a([h.Override],u.prototype,"seek",null),a([h.Override],u.prototype,"sourceName",null),a([h.Override],u.prototype,"toString",null),a([h.Override],u.prototype,"LA",null),a([h.Override],u.prototype,"getText",null),un.CodePointCharStream=u,un}var kc;function Pa(){return kc||(kc=1,(function(a){/*!
347
343
  * Copyright 2016 The ANTLR Project. All rights reserved.
348
344
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
349
- */var a=cn&&cn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(cn,"__esModule",{value:!0}),cn.PlusBlockStartState=void 0;const d=qe(),y=fo(),m=pe();let h=class extends y.BlockStartState{get stateType(){return d.ATNStateType.PLUS_BLOCK_START}};return a([m.Override],h.prototype,"stateType",null),cn.PlusBlockStartState=h,cn}var fn={},qc;function Jh(){if(qc)return fn;qc=1;/*!
345
+ */Object.defineProperty(a,"__esModule",{value:!0}),a.CharStreams=void 0;const d=Sp(),y=bp(),m=gr();(function(h){function u(r,o){(o===void 0||o.length===0)&&(o=m.IntStream.UNKNOWN_SOURCE_NAME);let t=d.CodePointBuffer.builder(r.length),i=new Uint16Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);return t.append(i),y.CodePointCharStream.fromBuffer(t.build(),o)}h.fromString=u})(a.CharStreams||(a.CharStreams={}))})($s)),$s}var Vt={},zt={},Mc;function Np(){if(Mc)return zt;Mc=1;/*!
350
346
  * Copyright 2016 The ANTLR Project. All rights reserved.
351
347
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
352
- */var a=fn&&fn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(fn,"__esModule",{value:!0}),fn.PlusLoopbackState=void 0;const d=qe(),y=kn(),m=pe();let h=class extends y.DecisionState{get stateType(){return d.ATNStateType.PLUS_LOOP_BACK}};return a([m.Override],h.prototype,"stateType",null),fn.PlusLoopbackState=h,fn}var Vt={},jc;function Zh(){if(jc)return Vt;jc=1;/*!
348
+ */var a=zt&&zt.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p},d=zt&&zt.__param||function(i,e){return function(s,l){e(s,l,i)}};Object.defineProperty(zt,"__esModule",{value:!0}),zt.BufferedTokenStream=void 0;const y=Ue(),m=ki(),h=Ve(),u=Tr(),r=pe(),o=Ie();let t=class{constructor(e){if(this.tokens=[],this.p=-1,this.fetchedEOF=!1,e==null)throw new Error("tokenSource cannot be null");this._tokenSource=e}get tokenSource(){return this._tokenSource}set tokenSource(e){this._tokenSource=e,this.tokens.length=0,this.p=-1,this.fetchedEOF=!1}get index(){return this.p}mark(){return 0}release(e){}seek(e){this.lazyInit(),this.p=this.adjustSeekIndex(e)}get size(){return this.tokens.length}consume(){let e;if(this.p>=0?this.fetchedEOF?e=this.p<this.tokens.length-1:e=this.p<this.tokens.length:e=!1,!e&&this.LA(1)===o.Token.EOF)throw new Error("cannot consume EOF");this.sync(this.p+1)&&(this.p=this.adjustSeekIndex(this.p+1))}sync(e){y(e>=0);let s=e-this.tokens.length+1;return s>0?this.fetch(s)>=s:!0}fetch(e){if(this.fetchedEOF)return 0;for(let s=0;s<e;s++){let l=this.tokenSource.nextToken();if(this.isWritableToken(l)&&(l.tokenIndex=this.tokens.length),this.tokens.push(l),l.type===o.Token.EOF)return this.fetchedEOF=!0,s+1}return e}get(e){if(e<0||e>=this.tokens.length)throw new RangeError("token index "+e+" out of range 0.."+(this.tokens.length-1));return this.tokens[e]}getRange(e,s){if(e<0||s<0)return[];this.lazyInit();let l=new Array;s>=this.tokens.length&&(s=this.tokens.length-1);for(let c=e;c<=s;c++){let p=this.tokens[c];if(p.type===o.Token.EOF)break;l.push(p)}return l}LA(e){let s=this.LT(e);return s?s.type:o.Token.INVALID_TYPE}tryLB(e){if(!(this.p-e<0))return this.tokens[this.p-e]}LT(e){let s=this.tryLT(e);if(s===void 0)throw new RangeError("requested lookback index out of range");return s}tryLT(e){if(this.lazyInit(),e===0)throw new RangeError("0 is not a valid lookahead index");if(e<0)return this.tryLB(-e);let s=this.p+e-1;return this.sync(s),s>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[s]}adjustSeekIndex(e){return e}lazyInit(){this.p===-1&&this.setup()}setup(){this.sync(0),this.p=this.adjustSeekIndex(0)}getTokens(e,s,l){if(this.lazyInit(),e===void 0)return y(s===void 0&&l===void 0),this.tokens;if(s===void 0&&(s=this.tokens.length-1),e<0||s>=this.tokens.length||s<0||e>=this.tokens.length)throw new RangeError("start "+e+" or stop "+s+" not in 0.."+(this.tokens.length-1));if(e>s)return[];if(l===void 0)return this.tokens.slice(e,s+1);typeof l=="number"&&(l=new Set().add(l));let c=l,p=this.tokens.slice(e,s+1);return p=p.filter(v=>c.has(v.type)),p}nextTokenOnChannel(e,s){if(this.sync(e),e>=this.size)return this.size-1;let l=this.tokens[e];for(;l.channel!==s;){if(l.type===o.Token.EOF)return e;e++,this.sync(e),l=this.tokens[e]}return e}previousTokenOnChannel(e,s){if(this.sync(e),e>=this.size)return this.size-1;for(;e>=0;){let l=this.tokens[e];if(l.type===o.Token.EOF||l.channel===s)return e;e--}return e}getHiddenTokensToRight(e,s=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));let l=this.nextTokenOnChannel(e+1,u.Lexer.DEFAULT_TOKEN_CHANNEL),c,p=e+1;return l===-1?c=this.size-1:c=l,this.filterForChannel(p,c,s)}getHiddenTokensToLeft(e,s=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));if(e===0)return[];let l=this.previousTokenOnChannel(e-1,u.Lexer.DEFAULT_TOKEN_CHANNEL);if(l===e-1)return[];let c=l+1,p=e-1;return this.filterForChannel(c,p,s)}filterForChannel(e,s,l){let c=new Array;for(let p=e;p<=s;p++){let v=this.tokens[p];l===-1?v.channel!==u.Lexer.DEFAULT_TOKEN_CHANNEL&&c.push(v):v.channel===l&&c.push(v)}return c}get sourceName(){return this.tokenSource.sourceName}getText(e){e===void 0?e=h.Interval.of(0,this.size-1):e instanceof h.Interval||(e=e.sourceInterval);let s=e.a,l=e.b;if(s<0||l<0)return"";this.fill(),l>=this.tokens.length&&(l=this.tokens.length-1);let c="";for(let p=s;p<=l;p++){let v=this.tokens[p];if(v.type===o.Token.EOF)break;c+=v.text}return c.toString()}getTextFromRange(e,s){return this.isToken(e)&&this.isToken(s)?this.getText(h.Interval.of(e.tokenIndex,s.tokenIndex)):""}fill(){this.lazyInit();const e=1e3;for(;;)if(this.fetch(e)<e)return}isWritableToken(e){return e instanceof m.CommonToken}isToken(e){return e instanceof m.CommonToken}};return a([r.NotNull],t.prototype,"_tokenSource",void 0),a([r.Override],t.prototype,"tokenSource",null),a([r.Override],t.prototype,"index",null),a([r.Override],t.prototype,"mark",null),a([r.Override],t.prototype,"release",null),a([r.Override],t.prototype,"seek",null),a([r.Override],t.prototype,"size",null),a([r.Override],t.prototype,"consume",null),a([r.Override],t.prototype,"get",null),a([r.Override],t.prototype,"LA",null),a([r.NotNull,r.Override],t.prototype,"LT",null),a([r.Override],t.prototype,"sourceName",null),a([r.NotNull,r.Override],t.prototype,"getText",null),a([r.NotNull,r.Override],t.prototype,"getTextFromRange",null),t=a([d(0,r.NotNull)],t),zt.BufferedTokenStream=t,zt}var qc;function Fa(){if(qc)return Vt;qc=1;/*!
353
349
  * Copyright 2016 The ANTLR Project. All rights reserved.
354
350
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
355
- */var a=Vt&&Vt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Vt&&Vt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.PrecedencePredicateTransition=void 0;const y=va(),m=pe(),h=Gn();let u=class extends y.AbstractPredicateTransition{constructor(o,t){super(o),this.precedence=t}get serializationType(){return 10}get isEpsilon(){return!0}matches(o,t,i){return!1}get predicate(){return new h.SemanticContext.PrecedencePredicate(this.precedence)}toString(){return this.precedence+" >= _p"}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override],u.prototype,"isEpsilon",null),a([m.Override],u.prototype,"matches",null),a([m.Override],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),Vt.PrecedencePredicateTransition=u,Vt}var zt={},$c;function ex(){if($c)return zt;$c=1;/*!
351
+ */var a=Vt&&Vt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Vt&&Vt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.CommonTokenStream=void 0;const y=Np(),m=pe(),h=Ie();let u=class extends y.BufferedTokenStream{constructor(o,t=h.Token.DEFAULT_CHANNEL){super(o),this.channel=t}adjustSeekIndex(o){return this.nextTokenOnChannel(o,this.channel)}tryLB(o){if(this.p-o<0)return;let t=this.p,i=1;for(;i<=o&&t>0;)t=this.previousTokenOnChannel(t-1,this.channel),i++;if(!(t<0))return this.tokens[t]}tryLT(o){if(this.lazyInit(),o===0)throw new RangeError("0 is not a valid lookahead index");if(o<0)return this.tryLB(-o);let t=this.p,i=1;for(;i<o;)this.sync(t+1)&&(t=this.nextTokenOnChannel(t+1,this.channel)),i++;return this.tokens[t]}getNumberOfOnChannelTokens(){let o=0;this.fill();for(let t of this.tokens)if(t.channel===this.channel&&o++,t.type===h.Token.EOF)break;return o}};return a([m.Override],u.prototype,"adjustSeekIndex",null),a([m.Override],u.prototype,"tryLB",null),a([m.Override],u.prototype,"tryLT",null),u=a([d(0,m.NotNull)],u),Vt.CommonTokenStream=u,Vt}var Ht={},jc;function Cp(){if(jc)return Ht;jc=1;/*!
356
352
  * Copyright 2016 The ANTLR Project. All rights reserved.
357
353
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
358
- */var a=zt&&zt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=zt&&zt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(zt,"__esModule",{value:!0}),zt.RangeTransition=void 0;const y=Mn(),m=pe(),h=vr();let u=class extends h.Transition{constructor(o,t,i){super(o),this.from=t,this.to=i}get serializationType(){return 2}get label(){return y.IntervalSet.of(this.from,this.to)}matches(o,t,i){return o>=this.from&&o<=this.to}toString(){return"'"+String.fromCodePoint(this.from)+"'..'"+String.fromCodePoint(this.to)+"'"}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override,m.NotNull],u.prototype,"label",null),a([m.Override],u.prototype,"matches",null),a([m.Override,m.NotNull],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),zt.RangeTransition=u,zt}var pn={},Uc;function tx(){if(Uc)return pn;Uc=1;/*!
354
+ */var a=Ht&&Ht.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Ht&&Ht.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.ListTokenSource=void 0;const y=Na(),m=pe(),h=Ie();let u=class{constructor(o,t){if(this.i=0,this._factory=y.CommonTokenFactory.DEFAULT,o==null)throw new Error("tokens cannot be null");this.tokens=o,this._sourceName=t}get charPositionInLine(){if(this.i<this.tokens.length)return this.tokens[this.i].charPositionInLine;if(this.eofToken!=null)return this.eofToken.charPositionInLine;if(this.tokens.length>0){let o=this.tokens[this.tokens.length-1],t=o.text;if(t!=null){let i=t.lastIndexOf(`
355
+ `);if(i>=0)return t.length-i-1}return o.charPositionInLine+o.stopIndex-o.startIndex+1}return 0}nextToken(){if(this.i>=this.tokens.length){if(this.eofToken==null){let t=-1;if(this.tokens.length>0){let e=this.tokens[this.tokens.length-1].stopIndex;e!==-1&&(t=e+1)}let i=Math.max(-1,t-1);this.eofToken=this._factory.create({source:this,stream:this.inputStream},h.Token.EOF,"EOF",h.Token.DEFAULT_CHANNEL,t,i,this.line,this.charPositionInLine)}return this.eofToken}let o=this.tokens[this.i];return this.i===this.tokens.length-1&&o.type===h.Token.EOF&&(this.eofToken=o),this.i++,o}get line(){if(this.i<this.tokens.length)return this.tokens[this.i].line;if(this.eofToken!=null)return this.eofToken.line;if(this.tokens.length>0){let o=this.tokens[this.tokens.length-1],t=o.line,i=o.text;if(i!=null)for(let e=0;e<i.length;e++)i.charAt(e)===`
356
+ `&&t++;return t}return 1}get inputStream(){if(this.i<this.tokens.length)return this.tokens[this.i].inputStream;if(this.eofToken!=null)return this.eofToken.inputStream;if(this.tokens.length>0)return this.tokens[this.tokens.length-1].inputStream}get sourceName(){if(this._sourceName)return this._sourceName;let o=this.inputStream;return o!=null?o.sourceName:"List"}set tokenFactory(o){this._factory=o}get tokenFactory(){return this._factory}};return a([m.Override],u.prototype,"charPositionInLine",null),a([m.Override],u.prototype,"nextToken",null),a([m.Override],u.prototype,"line",null),a([m.Override],u.prototype,"inputStream",null),a([m.Override],u.prototype,"sourceName",null),a([m.Override,m.NotNull,d(0,m.NotNull)],u.prototype,"tokenFactory",null),u=a([d(0,m.NotNull)],u),Ht.ListTokenSource=u,Ht}var fi={},$c;function Qh(){if($c)return fi;$c=1;/*!
359
357
  * Copyright 2016 The ANTLR Project. All rights reserved.
360
358
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
361
- */var a=pn&&pn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(pn,"__esModule",{value:!0}),pn.RuleStartState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{constructor(){super(...arguments),this.isPrecedenceRule=!1,this.leftFactored=!1}get stateType(){return y.ATNStateType.RULE_START}};return a([m.Override],h.prototype,"stateType",null),pn.RuleStartState=h,pn}var hn={},Vc;function rx(){if(Vc)return hn;Vc=1;/*!
359
+ */Object.defineProperty(fi,"__esModule",{value:!0}),fi.MultiMap=void 0;let a=class extends Map{constructor(){super()}map(y,m){let h=super.get(y);h||(h=[],super.set(y,h)),h.push(m)}getPairs(){let y=[];return this.forEach((m,h)=>{m.forEach(u=>{y.push([h,u])})}),y}};return fi.MultiMap=a,fi}var Gt={},ln={},cn={},fn={},Yt={},Uc;function Nr(){if(Uc)return Yt;Uc=1;/*!
362
360
  * Copyright 2016 The ANTLR Project. All rights reserved.
363
361
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
364
- */var a=hn&&hn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(hn,"__esModule",{value:!0}),hn.StarBlockStartState=void 0;const d=qe(),y=fo(),m=pe();let h=class extends y.BlockStartState{get stateType(){return d.ATNStateType.STAR_BLOCK_START}};return a([m.Override],h.prototype,"stateType",null),hn.StarBlockStartState=h,hn}var xn={},zc;function nx(){if(zc)return xn;zc=1;/*!
362
+ */var a=Yt&&Yt.__decorate||function(c,p,v,x){var g=arguments.length,_=g<3?p:x===null?x=Object.getOwnPropertyDescriptor(p,v):x,A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(c,p,v,x);else for(var E=c.length-1;E>=0;E--)(A=c[E])&&(_=(g<3?A(_):g>3?A(p,v,_):A(p,v))||_);return g>3&&_&&Object.defineProperty(p,v,_),_},d=Yt&&Yt.__param||function(c,p){return function(v,x){p(v,x,c)}};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.Trees=void 0;const y=lt(),m=ki(),h=Ri(),u=pe(),r=ji(),o=st(),t=Pi(),i=_r(),e=Ie(),s=ut();let l=class yr{static toStringTree(p,v){let x;v instanceof r.Parser?x=v.ruleNames:x=v;let g=s.escapeWhitespace(this.getNodeText(p,x),!1);if(p.childCount===0)return g;let _="";_+="(",g=s.escapeWhitespace(this.getNodeText(p,x),!1),_+=g,_+=" ";for(let A=0;A<p.childCount;A++)A>0&&(_+=" "),_+=this.toStringTree(p.getChild(A),x);return _+=")",_}static getNodeText(p,v){let x;if(v instanceof r.Parser)x=v.ruleNames;else if(v)x=v;else{let g=p.payload;return typeof g.text=="string"?g.text:p.payload.toString()}if(p instanceof t.RuleNode){let g=p.ruleContext,_=g.ruleIndex,A=x[_],E=g.altNumber;return E!==y.ATN.INVALID_ALT_NUMBER?A+":"+E:A}else{if(p instanceof h.ErrorNode)return p.toString();if(p instanceof i.TerminalNode)return p.symbol.text||""}throw new TypeError("Unexpected node type")}static getChildren(p){let v=[];for(let x=0;x<p.childCount;x++)v.push(p.getChild(x));return v}static getAncestors(p){let v=[],x=p.parent;for(;x;)v.unshift(x),x=x.parent;return v}static isAncestorOf(p,v){if(!p||!v||!p.parent)return!1;let x=v.parent;for(;x;){if(p===x)return!0;x=x.parent}return!1}static findAllTokenNodes(p,v){return yr.findAllNodes(p,v,!0)}static findAllRuleNodes(p,v){return yr.findAllNodes(p,v,!1)}static findAllNodes(p,v,x){let g=[];return yr._findAllNodes(p,v,x,g),g}static _findAllNodes(p,v,x,g){x&&p instanceof i.TerminalNode?p.symbol.type===v&&g.push(p):!x&&p instanceof o.ParserRuleContext&&p.ruleIndex===v&&g.push(p);for(let _=0;_<p.childCount;_++)yr._findAllNodes(p.getChild(_),v,x,g)}static getDescendants(p){let v=[];function x(g){v.push(g);const _=g.childCount;for(let A=0;A<_;A++)x(g.getChild(A))}return x(p),v}static getRootOfSubtreeEnclosingRegion(p,v,x){let g=p.childCount;for(let _=0;_<g;_++){let A=p.getChild(_),E=yr.getRootOfSubtreeEnclosingRegion(A,v,x);if(E)return E}if(p instanceof o.ParserRuleContext){let _=p.stop;if(v>=p.start.tokenIndex&&(_==null||x<=_.tokenIndex))return p}}static stripChildrenOutOfRange(p,v,x,g){if(!p)return;let _=p.childCount;for(let A=0;A<_;A++){let E=p.getChild(A),N=E.sourceInterval;if(E instanceof o.ParserRuleContext&&(N.b<x||N.a>g)&&yr.isAncestorOf(E,v)){let b=new m.CommonToken(e.Token.INVALID_TYPE,"...");p.children[A]=new i.TerminalNode(b)}}}static findNodeSuchThat(p,v){if(v(p))return p;let x=p.childCount;for(let g=0;g<x;g++){let _=yr.findNodeSuchThat(p.getChild(g),v);if(_!==void 0)return _}}};return a([d(0,u.NotNull)],l,"toStringTree",null),a([u.NotNull,d(0,u.NotNull)],l,"getAncestors",null),a([d(0,u.NotNull)],l,"getRootOfSubtreeEnclosingRegion",null),Yt.Trees=l,Yt}var Vc;function Dp(){if(Vc)return fn;Vc=1;/*!
365
363
  * Copyright 2016 The ANTLR Project. All rights reserved.
366
364
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
367
- */var a=xn&&xn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(xn,"__esModule",{value:!0}),xn.StarLoopbackState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{get loopEntryState(){return this.transition(0).target}get stateType(){return y.ATNStateType.STAR_LOOP_BACK}};return a([m.Override],h.prototype,"stateType",null),xn.StarLoopbackState=h,xn}var dn={},Hc;function ix(){if(Hc)return dn;Hc=1;/*!
365
+ */var a=fn&&fn.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p};Object.defineProperty(fn,"__esModule",{value:!0}),fn.RuleContext=void 0;const d=lt(),y=Bi(),m=Pi(),h=Ve(),u=pe(),r=Nr(),o=st();let t=class Op extends m.RuleNode{constructor(e,s){super(),this._parent=e,this.invokingState=s??-1}static getChildContext(e,s){return new Op(e,s)}depth(){let e=0,s=this;for(;s;)s=s._parent,e++;return e}get isEmpty(){return this.invokingState===-1}get sourceInterval(){return h.Interval.INVALID}get ruleContext(){return this}get parent(){return this._parent}setParent(e){this._parent=e}get payload(){return this}get text(){if(this.childCount===0)return"";let e="";for(let s=0;s<this.childCount;s++)e+=this.getChild(s).text;return e.toString()}get ruleIndex(){return-1}get altNumber(){return d.ATN.INVALID_ALT_NUMBER}set altNumber(e){}getChild(e){throw new RangeError("i must be greater than or equal to 0 and less than childCount")}get childCount(){return 0}accept(e){return e.visitChildren(this)}toStringTree(e){return r.Trees.toStringTree(this,e)}toString(e,s){const l=e instanceof y.Recognizer?e.ruleNames:e;s=s||o.ParserRuleContext.emptyContext();let c="",p=this;for(c+="[";p&&p!==s;){if(!l)p.isEmpty||(c+=p.invokingState);else{let v=p.ruleIndex,x=v>=0&&v<l.length?l[v]:v.toString();c+=x}p._parent&&(l||!p._parent.isEmpty)&&(c+=" "),p=p._parent}return c+="]",c.toString()}};return a([u.Override],t.prototype,"sourceInterval",null),a([u.Override],t.prototype,"ruleContext",null),a([u.Override],t.prototype,"parent",null),a([u.Override],t.prototype,"setParent",null),a([u.Override],t.prototype,"payload",null),a([u.Override],t.prototype,"text",null),a([u.Override],t.prototype,"getChild",null),a([u.Override],t.prototype,"childCount",null),a([u.Override],t.prototype,"accept",null),a([u.Override],t.prototype,"toStringTree",null),fn.RuleContext=t,fn}var zc;function st(){if(zc)return cn;zc=1;/*!
368
366
  * Copyright 2016 The ANTLR Project. All rights reserved.
369
367
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
370
- */var a=dn&&dn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(dn,"__esModule",{value:!0}),dn.TokensStartState=void 0;const d=qe(),y=kn(),m=pe();let h=class extends y.DecisionState{get stateType(){return d.ATNStateType.TOKEN_START}};return a([m.Override],h.prototype,"stateType",null),dn.TokensStartState=h,dn}var fi={},Gc;function ox(){if(Gc)return fi;Gc=1;/*!
368
+ */var a=cn&&cn.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(cn,"__esModule",{value:!0}),cn.ParserRuleContext=void 0;const d=Ri(),y=Ve(),m=pe(),h=Dp(),u=_r();let r=class la extends h.RuleContext{constructor(t,i){i==null?super():super(t,i)}static emptyContext(){return la.EMPTY}copyFrom(t){if(this._parent=t._parent,this.invokingState=t.invokingState,this._start=t._start,this._stop=t._stop,t.children){this.children=[];for(let i of t.children)i instanceof d.ErrorNode&&this.addChild(i)}}enterRule(t){}exitRule(t){}addAnyChild(t){return this.children?this.children.push(t):this.children=[t],t}addChild(t){if(t instanceof u.TerminalNode){t.setParent(this),this.addAnyChild(t);return}else if(t instanceof h.RuleContext){this.addAnyChild(t);return}else return t=new u.TerminalNode(t),this.addAnyChild(t),t.setParent(this),t}addErrorNode(t){if(t instanceof d.ErrorNode){const i=t;return i.setParent(this),this.addAnyChild(i)}else{const i=t;let e=new d.ErrorNode(i);return this.addAnyChild(e),e.setParent(this),e}}removeLastChild(){this.children&&this.children.pop()}get parent(){let t=super.parent;if(t===void 0||t instanceof la)return t;throw new TypeError("Invalid parent type for ParserRuleContext")}getChild(t,i){if(!this.children||t<0||t>=this.children.length)throw new RangeError("index parameter must be between >= 0 and <= number of children.");if(i==null)return this.children[t];let e=this.tryGetChild(t,i);if(e===void 0)throw new Error("The specified node does not exist");return e}tryGetChild(t,i){if(!this.children||t<0||t>=this.children.length)return;let e=-1;for(let s of this.children)if(s instanceof i&&(e++,e===t))return s}getToken(t,i){let e=this.tryGetToken(t,i);if(e===void 0)throw new Error("The specified token does not exist");return e}tryGetToken(t,i){if(!this.children||i<0||i>=this.children.length)return;let e=-1;for(let s of this.children)if(s instanceof u.TerminalNode&&s.symbol.type===t&&(e++,e===i))return s}getTokens(t){let i=[];if(!this.children)return i;for(let e of this.children)e instanceof u.TerminalNode&&e.symbol.type===t&&i.push(e);return i}get ruleContext(){return this}getRuleContext(t,i){return this.getChild(t,i)}tryGetRuleContext(t,i){return this.tryGetChild(t,i)}getRuleContexts(t){let i=[];if(!this.children)return i;for(let e of this.children)e instanceof t&&i.push(e);return i}get childCount(){return this.children?this.children.length:0}get sourceInterval(){return this._start?!this._stop||this._stop.tokenIndex<this._start.tokenIndex?y.Interval.of(this._start.tokenIndex,this._start.tokenIndex-1):y.Interval.of(this._start.tokenIndex,this._stop.tokenIndex):y.Interval.INVALID}get start(){return this._start}get stop(){return this._stop}toInfoString(t){return"ParserRuleContext"+t.getRuleInvocationStack(this).reverse()+"{start="+this._start+", stop="+this._stop+"}"}};return r.EMPTY=new r,a([m.Override],r.prototype,"parent",null),a([m.Override],r.prototype,"childCount",null),a([m.Override],r.prototype,"sourceInterval",null),cn.ParserRuleContext=r,cn}var Hc;function wp(){if(Hc)return ln;Hc=1;/*!
371
369
  * Copyright 2016 The ANTLR Project. All rights reserved.
372
370
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
373
- */Object.defineProperty(fi,"__esModule",{value:!0}),fi.UUID=void 0;const a=ke();let d=class ca{constructor(m,h,u,r){this.data=new Uint32Array(4),this.data[0]=m,this.data[1]=h,this.data[2]=u,this.data[3]=r}static fromString(m){if(!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(m))throw new Error("Incorrectly formatted UUID");let h=m.split("-"),u=parseInt(h[0],16),r=(parseInt(h[1],16)<<16>>>0)+parseInt(h[2],16),o=(parseInt(h[3],16)<<16>>>0)+parseInt(h[4].substr(0,4),16),t=parseInt(h[4].substr(-8),16);return new ca(u,r,o,t)}hashCode(){return a.MurmurHash.hashCode([this.data[0],this.data[1],this.data[2],this.data[3]])}equals(m){return m===this?!0:m instanceof ca?this.data[0]===m.data[0]&&this.data[1]===m.data[1]&&this.data[2]===m.data[2]&&this.data[3]===m.data[3]:!1}toString(){return("00000000"+this.data[0].toString(16)).substr(-8)+"-"+("0000"+(this.data[1]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[1].toString(16)).substr(-4)+"-"+("0000"+(this.data[2]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[2].toString(16)).substr(-4)+("00000000"+this.data[3].toString(16)).substr(-8)}};return fi.UUID=d,fi}var Yc;function po(){if(Yc)return Rt;Yc=1;/*!
371
+ */var a=ln&&ln.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(ln,"__esModule",{value:!0}),ln.InterpreterRuleContext=void 0;const d=pe(),y=st();let m=class extends y.ParserRuleContext{constructor(u,r,o){o!==void 0?super(r,o):super(),this._ruleIndex=u}get ruleIndex(){return this._ruleIndex}};return a([d.Override],m.prototype,"ruleIndex",null),ln.InterpreterRuleContext=m,ln}var Gc;function Rp(){if(Gc)return Gt;Gc=1;/*!
374
372
  * Copyright 2016 The ANTLR Project. All rights reserved.
375
373
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
376
- */var a=Rt&&Rt.__decorate||function(J,M,V,Z){var se=arguments.length,fe=se<3?M:Z===null?Z=Object.getOwnPropertyDescriptor(M,V):Z,he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(J,M,V,Z);else for(var K=J.length-1;K>=0;K--)(he=J[K])&&(fe=(se<3?he(fe):se>3?he(M,V,fe):he(M,V))||fe);return se>3&&fe&&Object.defineProperty(M,V,fe),fe},d=Rt&&Rt.__param||function(J,M){return function(V,Z){M(V,Z,J)}};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.ATNDeserializer=void 0;const y=fp(),m=Er(),h=lt(),u=cp(),r=qe(),o=pp(),t=Mh(),i=ip(),e=Sr(),s=qh(),l=fo(),c=kn(),p=np(),v=jh(),x=Mn(),g=sp(),_=$h(),A=Uh(),E=Vh(),N=zh(),b=Hh(),w=Gh(),P=Yh(),j=Wh(),W=gp(),L=pe(),$=Da(),Q=qi(),ee=Kh(),I=Jh(),X=Zh(),ie=Q0(),ce=ex(),oe=tx(),te=Mi(),B=wa(),G=Oa(),O=rx(),C=nx(),D=Ca(),F=Ie(),k=ix(),T=ox(),R=ap();var q;(function(J){J[J.UNICODE_BMP=0]="UNICODE_BMP",J[J.UNICODE_SMP=1]="UNICODE_SMP"})(q||(q={}));let H=class Ae{constructor(M){M===void 0&&(M=u.ATNDeserializationOptions.defaultOptions),this.deserializationOptions=M}static get SERIALIZED_VERSION(){return 3}static isFeatureSupported(M,V){let Z=Ae.SUPPORTED_UUIDS.findIndex(se=>se.equals(M));return Z<0?!1:Ae.SUPPORTED_UUIDS.findIndex(se=>se.equals(V))>=Z}static getUnicodeDeserializer(M){return M===0?{readUnicode:(V,Z)=>Ae.toInt(V[Z]),size:1}:{readUnicode:(V,Z)=>Ae.toInt32(V,Z),size:2}}deserialize(M){M=M.slice(0);for(let ue=1;ue<M.length;ue++)M[ue]=M[ue]-2&65535;let V=0,Z=Ae.toInt(M[V++]);if(Z!==Ae.SERIALIZED_VERSION){let ue=`Could not deserialize ATN with version ${Z} (expected ${Ae.SERIALIZED_VERSION}).`;throw new Error(ue)}let se=Ae.toUUID(M,V);if(V+=8,Ae.SUPPORTED_UUIDS.findIndex(ue=>ue.equals(se))<0){let ue=`Could not deserialize ATN with UUID ${se} (expected ${Ae.SERIALIZED_UUID} or a legacy UUID).`;throw new Error(ue)}let fe=Ae.isFeatureSupported(Ae.ADDED_LEXER_ACTIONS,se),he=Ae.toInt(M[V++]),K=Ae.toInt(M[V++]),ae=new h.ATN(he,K),de=[],Ce=[],Re=Ae.toInt(M[V++]);for(let ue=0;ue<Re;ue++){let ve=Ae.toInt(M[V++]);if(ve===r.ATNStateType.INVALID_TYPE){ae.addState(new g.InvalidState);continue}let Ee=Ae.toInt(M[V++]);Ee===65535&&(Ee=-1);let z=this.stateFactory(ve,Ee);if(ve===r.ATNStateType.LOOP_END){let f=Ae.toInt(M[V++]);de.push([z,f])}else if(z instanceof l.BlockStartState){let f=Ae.toInt(M[V++]);Ce.push([z,f])}ae.addState(z)}for(let ue of de)ue[0].loopBackState=ae.states[ue[1]];for(let ue of Ce)ue[0].endState=ae.states[ue[1]];let Y=Ae.toInt(M[V++]);for(let ue=0;ue<Y;ue++){let ve=Ae.toInt(M[V++]);ae.states[ve].nonGreedy=!0}let re=Ae.toInt(M[V++]);for(let ue=0;ue<re;ue++){let ve=Ae.toInt(M[V++]);ae.states[ve].sll=!0}let xe=Ae.toInt(M[V++]);for(let ue=0;ue<xe;ue++){let ve=Ae.toInt(M[V++]);ae.states[ve].isPrecedenceRule=!0}let ge=Ae.toInt(M[V++]);ae.grammarType===0&&(ae.ruleToTokenType=new Int32Array(ge)),ae.ruleToStartState=new Array(ge);for(let ue=0;ue<ge;ue++){let ve=Ae.toInt(M[V++]),Ee=ae.states[ve];if(Ee.leftFactored=Ae.toInt(M[V++])!==0,ae.ruleToStartState[ue]=Ee,ae.grammarType===0){let z=Ae.toInt(M[V++]);z===65535&&(z=F.Token.EOF),ae.ruleToTokenType[ue]=z,Ae.isFeatureSupported(Ae.ADDED_LEXER_ACTIONS,se)||Ae.toInt(M[V++])}}ae.ruleToStopState=new Array(ge);for(let ue of ae.states)ue instanceof te.RuleStopState&&(ae.ruleToStopState[ue.ruleIndex]=ue,ae.ruleToStartState[ue.ruleIndex].stopState=ue);let _e=Ae.toInt(M[V++]);for(let ue=0;ue<_e;ue++){let ve=Ae.toInt(M[V++]);ae.modeToStartState.push(ae.states[ve])}ae.modeToDFA=new Array(_e);for(let ue=0;ue<_e;ue++)ae.modeToDFA[ue]=new p.DFA(ae.modeToStartState[ue]);let be=[];V=this.deserializeSets(M,V,be,Ae.getUnicodeDeserializer(0)),Ae.isFeatureSupported(Ae.ADDED_UNICODE_SMP,se)&&(V=this.deserializeSets(M,V,be,Ae.getUnicodeDeserializer(1)));let Te=Ae.toInt(M[V++]);for(let ue=0;ue<Te;ue++){let ve=Ae.toInt(M[V]),Ee=Ae.toInt(M[V+1]),z=Ae.toInt(M[V+2]),f=Ae.toInt(M[V+3]),S=Ae.toInt(M[V+4]),U=Ae.toInt(M[V+5]),le=this.edgeFactory(ae,z,ve,Ee,f,S,U,be);ae.states[ve].addTransition(le),V+=6}let De=new m.Array2DHashSet({hashCode:ue=>ue.stopState^ue.returnState^ue.outermostPrecedenceReturn,equals:(ue,ve)=>ue.stopState===ve.stopState&&ue.returnState===ve.returnState&&ue.outermostPrecedenceReturn===ve.outermostPrecedenceReturn}),Pe=[];for(let ue of ae.states){let ve=ue.ruleIndex>=0&&ae.ruleToStartState[ue.ruleIndex].leftFactored;for(let Ee=0;Ee<ue.numberOfTransitions;Ee++){let z=ue.transition(Ee);if(!(z instanceof B.RuleTransition))continue;let f=z;if(!ae.ruleToStartState[f.target.ruleIndex].leftFactored&&ve)continue;let U=-1;ae.ruleToStartState[f.target.ruleIndex].isPrecedenceRule&&f.precedence===0&&(U=f.target.ruleIndex);let le={stopState:f.target.ruleIndex,returnState:f.followState.stateNumber,outermostPrecedenceReturn:U};De.add(le)&&Pe.push(le)}}for(let ue of Pe){let ve=new v.EpsilonTransition(ae.states[ue.returnState],ue.outermostPrecedenceReturn);ae.ruleToStopState[ue.stopState].addTransition(ve)}for(let ue of ae.states){if(ue instanceof l.BlockStartState){if(ue.endState===void 0)throw new Error("IllegalStateException");if(ue.endState.startState!==void 0)throw new Error("IllegalStateException");ue.endState.startState=ue}if(ue instanceof I.PlusLoopbackState){let ve=ue;for(let Ee=0;Ee<ve.numberOfTransitions;Ee++){let z=ve.transition(Ee).target;z instanceof ee.PlusBlockStartState&&(z.loopBackState=ve)}}else if(ue instanceof C.StarLoopbackState){let ve=ue;for(let Ee=0;Ee<ve.numberOfTransitions;Ee++){let z=ve.transition(Ee).target;z instanceof D.StarLoopEntryState&&(z.loopBackState=ve)}}}let Le=Ae.toInt(M[V++]);for(let ue=1;ue<=Le;ue++){let ve=Ae.toInt(M[V++]),Ee=ae.states[ve];ae.decisionToState.push(Ee),Ee.decision=ue-1}if(ae.grammarType===0)if(fe){ae.lexerActions=new Array(Ae.toInt(M[V++]));for(let ue=0;ue<ae.lexerActions.length;ue++){let ve=Ae.toInt(M[V++]),Ee=Ae.toInt(M[V++]);Ee===65535&&(Ee=-1);let z=Ae.toInt(M[V++]);z===65535&&(z=-1);let f=this.lexerActionFactory(ve,Ee,z);ae.lexerActions[ue]=f}}else{let ue=[];for(let ve of ae.states)for(let Ee=0;Ee<ve.numberOfTransitions;Ee++){let z=ve.transition(Ee);if(!(z instanceof y.ActionTransition))continue;let f=z.ruleIndex,S=z.actionIndex,U=new A.LexerCustomAction(f,S);ve.setTransition(Ee,new y.ActionTransition(z.target,f,ue.length,!1)),ue.push(U)}ae.lexerActions=ue}this.markPrecedenceDecisions(ae),ae.decisionToDFA=new Array(Le);for(let ue=0;ue<Le;ue++)ae.decisionToDFA[ue]=new p.DFA(ae.decisionToState[ue],ue);if(this.deserializationOptions.isVerifyATN&&this.verifyATN(ae),this.deserializationOptions.isGenerateRuleBypassTransitions&&ae.grammarType===1){ae.ruleToTokenType=new Int32Array(ae.ruleToStartState.length);for(let ue=0;ue<ae.ruleToStartState.length;ue++)ae.ruleToTokenType[ue]=ae.maxTokenType+ue+1;for(let ue=0;ue<ae.ruleToStartState.length;ue++){let ve=new t.BasicBlockStartState;ve.ruleIndex=ue,ae.addState(ve);let Ee=new s.BlockEndState;Ee.ruleIndex=ue,ae.addState(Ee),ve.endState=Ee,ae.defineDecisionState(ve),Ee.startState=ve;let z,f;if(ae.ruleToStartState[ue].isPrecedenceRule){z=void 0;for(let U of ae.states){if(U.ruleIndex!==ue||!(U instanceof D.StarLoopEntryState))continue;let le=U.transition(U.numberOfTransitions-1).target;if(le instanceof W.LoopEndState&&le.epsilonOnlyTransitions&&le.transition(0).target instanceof te.RuleStopState){z=U;break}}if(!z)throw new Error("Couldn't identify final state of the precedence rule prefix section.");f=z.loopBackState.transition(0)}else z=ae.ruleToStopState[ue];for(let U of ae.states)for(let le=0;le<U.numberOfTransitions;le++){let me=U.transition(le);me!==f&&me.target===z&&(me.target=Ee)}for(;ae.ruleToStartState[ue].numberOfTransitions>0;){let U=ae.ruleToStartState[ue].removeTransition(ae.ruleToStartState[ue].numberOfTransitions-1);ve.addTransition(U)}ae.ruleToStartState[ue].addTransition(new v.EpsilonTransition(ve)),Ee.addTransition(new v.EpsilonTransition(z));let S=new i.BasicState;ae.addState(S),S.addTransition(new o.AtomTransition(Ee,ae.ruleToTokenType[ue])),ve.addTransition(new v.EpsilonTransition(S))}this.deserializationOptions.isVerifyATN&&this.verifyATN(ae)}if(this.deserializationOptions.isOptimize){for(;;){let ue=0;ue+=Ae.inlineSetRules(ae),ue+=Ae.combineChainedEpsilons(ae);let ve=ae.grammarType===0;if(ue+=Ae.optimizeSets(ae,ve),ue===0)break}this.deserializationOptions.isVerifyATN&&this.verifyATN(ae)}return Ae.identifyTailCalls(ae),ae}deserializeSets(M,V,Z,se){let fe=Ae.toInt(M[V++]);for(let he=0;he<fe;he++){let K=Ae.toInt(M[V]);V++;let ae=new x.IntervalSet;Z.push(ae),Ae.toInt(M[V++])!==0&&ae.add(-1);for(let Ce=0;Ce<K;Ce++){let Re=se.readUnicode(M,V);V+=se.size;let Y=se.readUnicode(M,V);V+=se.size,ae.add(Re,Y)}}return V}markPrecedenceDecisions(M){let V=new Map;for(let Z of M.states)if(Z instanceof D.StarLoopEntryState&&M.ruleToStartState[Z.ruleIndex].isPrecedenceRule){let se=Z.transition(Z.numberOfTransitions-1).target;se instanceof W.LoopEndState&&se.epsilonOnlyTransitions&&se.transition(0).target instanceof te.RuleStopState&&(V.set(Z.ruleIndex,Z),Z.precedenceRuleDecision=!0,Z.precedenceLoopbackStates=new e.BitSet(M.states.length))}for(let Z of V)for(let se of M.ruleToStopState[Z[0]].getTransitions())se.serializationType!==1||se.outermostPrecedenceReturn!==-1||Z[1].precedenceLoopbackStates.set(se.target.stateNumber)}verifyATN(M){for(let V of M.states)if(this.checkCondition(V!==void 0,"ATN states should not be undefined."),V.stateType!==r.ATNStateType.INVALID_TYPE){if(this.checkCondition(V.onlyHasEpsilonTransitions||V.numberOfTransitions<=1),V instanceof ee.PlusBlockStartState&&this.checkCondition(V.loopBackState!==void 0),V instanceof D.StarLoopEntryState){let Z=V;if(this.checkCondition(Z.loopBackState!==void 0),this.checkCondition(Z.numberOfTransitions===2),Z.transition(0).target instanceof O.StarBlockStartState)this.checkCondition(Z.transition(1).target instanceof W.LoopEndState),this.checkCondition(!Z.nonGreedy);else if(Z.transition(0).target instanceof W.LoopEndState)this.checkCondition(Z.transition(1).target instanceof O.StarBlockStartState),this.checkCondition(Z.nonGreedy);else throw new Error("IllegalStateException")}if(V instanceof C.StarLoopbackState&&(this.checkCondition(V.numberOfTransitions===1),this.checkCondition(V.transition(0).target instanceof D.StarLoopEntryState)),V instanceof W.LoopEndState&&this.checkCondition(V.loopBackState!==void 0),V instanceof oe.RuleStartState&&this.checkCondition(V.stopState!==void 0),V instanceof l.BlockStartState&&this.checkCondition(V.endState!==void 0),V instanceof s.BlockEndState&&this.checkCondition(V.startState!==void 0),V instanceof c.DecisionState){let Z=V;this.checkCondition(Z.numberOfTransitions<=1||Z.decision>=0)}else this.checkCondition(V.numberOfTransitions<=1||V instanceof te.RuleStopState)}}checkCondition(M,V){if(!M)throw new Error("IllegalStateException: "+V)}static inlineSetRules(M){let V=0,Z=new Array(M.ruleToStartState.length);for(let se=0;se<M.ruleToStartState.length;se++){let he=M.ruleToStartState[se];for(;he.onlyHasEpsilonTransitions&&he.numberOfOptimizedTransitions===1&&he.getOptimizedTransition(0).serializationType===1;)he=he.getOptimizedTransition(0).target;if(he.numberOfOptimizedTransitions!==1)continue;let K=he.getOptimizedTransition(0),ae=K.target;if(!(K.isEpsilon||!ae.onlyHasEpsilonTransitions||ae.numberOfOptimizedTransitions!==1||!(ae.getOptimizedTransition(0).target instanceof te.RuleStopState)))switch(K.serializationType){case 5:case 2:case 7:Z[se]=K;break;case 8:case 9:continue;default:continue}}for(let se of M.states){if(se.ruleIndex<0)continue;let fe;for(let he=0;he<se.numberOfOptimizedTransitions;he++){let K=se.getOptimizedTransition(he);if(!(K instanceof B.RuleTransition)){fe!==void 0&&fe.push(K);continue}let ae=K,de=Z[ae.target.ruleIndex];if(de===void 0){fe!==void 0&&fe.push(K);continue}if(fe===void 0){fe=[];for(let Y=0;Y<he;Y++)fe.push(se.getOptimizedTransition(he))}V++;let Ce=ae.followState,Re=new i.BasicState;switch(Re.setRuleIndex(Ce.ruleIndex),M.addState(Re),fe.push(new v.EpsilonTransition(Re)),de.serializationType){case 5:Re.addTransition(new o.AtomTransition(Ce,de._label));break;case 2:Re.addTransition(new ce.RangeTransition(Ce,de.from,de.to));break;case 7:Re.addTransition(new G.SetTransition(Ce,de.label));break;default:throw new Error("UnsupportedOperationException")}}if(fe!==void 0){if(se.isOptimized)for(;se.numberOfOptimizedTransitions>0;)se.removeOptimizedTransition(se.numberOfOptimizedTransitions-1);for(let he of fe)se.addOptimizedTransition(he)}}return Q.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+V+" rule invocations by inlining sets."),V}static combineChainedEpsilons(M){let V=0;for(let Z of M.states){if(!Z.onlyHasEpsilonTransitions||Z instanceof te.RuleStopState)continue;let se;e:for(let fe=0;fe<Z.numberOfOptimizedTransitions;fe++){let he=Z.getOptimizedTransition(fe),K=he.target;if(he.serializationType!==1||he.outermostPrecedenceReturn!==-1||K.stateType!==r.ATNStateType.BASIC||!K.onlyHasEpsilonTransitions){se!==void 0&&se.push(he);continue e}for(let ae=0;ae<K.numberOfOptimizedTransitions;ae++)if(K.getOptimizedTransition(ae).serializationType!==1||K.getOptimizedTransition(ae).outermostPrecedenceReturn!==-1){se!==void 0&&se.push(he);continue e}if(V++,se===void 0){se=[];for(let ae=0;ae<fe;ae++)se.push(Z.getOptimizedTransition(ae))}for(let ae=0;ae<K.numberOfOptimizedTransitions;ae++){let de=K.getOptimizedTransition(ae).target;se.push(new v.EpsilonTransition(de))}}if(se!==void 0){if(Z.isOptimized)for(;Z.numberOfOptimizedTransitions>0;)Z.removeOptimizedTransition(Z.numberOfOptimizedTransitions-1);for(let fe of se)Z.addOptimizedTransition(fe)}}return Q.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+V+" transitions by combining chained epsilon transitions."),V}static optimizeSets(M,V){if(V)return 0;let Z=0,se=M.decisionToState;for(let fe of se){let he=new x.IntervalSet;for(let Y=0;Y<fe.numberOfOptimizedTransitions;Y++){let re=fe.getOptimizedTransition(Y);if(!(re instanceof v.EpsilonTransition)||re.target.numberOfOptimizedTransitions!==1)continue;let xe=re.target.getOptimizedTransition(0);xe.target instanceof s.BlockEndState&&(xe instanceof $.NotSetTransition||(xe instanceof o.AtomTransition||xe instanceof ce.RangeTransition||xe instanceof G.SetTransition)&&he.add(Y))}if(he.size<=1)continue;let K=[];for(let Y=0;Y<fe.numberOfOptimizedTransitions;Y++)he.contains(Y)||K.push(fe.getOptimizedTransition(Y));let ae=fe.getOptimizedTransition(he.minElement).target.getOptimizedTransition(0).target,de=new x.IntervalSet;for(let Y of he.intervals)for(let re=Y.a;re<=Y.b;re++){let xe=fe.getOptimizedTransition(re).target.getOptimizedTransition(0);if(xe instanceof $.NotSetTransition)throw new Error("Not yet implemented.");de.addAll(xe.label)}let Ce;if(de.intervals.length===1)if(de.size===1)Ce=new o.AtomTransition(ae,de.minElement);else{let Y=de.intervals[0];Ce=new ce.RangeTransition(ae,Y.a,Y.b)}else Ce=new G.SetTransition(ae,de);let Re=new i.BasicState;if(Re.setRuleIndex(fe.ruleIndex),M.addState(Re),Re.addTransition(Ce),K.push(new v.EpsilonTransition(Re)),Z+=fe.numberOfOptimizedTransitions-K.length,fe.isOptimized)for(;fe.numberOfOptimizedTransitions>0;)fe.removeOptimizedTransition(fe.numberOfOptimizedTransitions-1);for(let Y of K)fe.addOptimizedTransition(Y)}return Q.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+Z+" paths by collapsing sets."),Z}static identifyTailCalls(M){for(let V of M.states){for(let Z=0;Z<V.numberOfTransitions;Z++){let se=V.transition(Z);se instanceof B.RuleTransition&&(se.tailCall=this.testTailCall(M,se,!1),se.optimizedTailCall=this.testTailCall(M,se,!0))}if(V.isOptimized)for(let Z=0;Z<V.numberOfOptimizedTransitions;Z++){let se=V.getOptimizedTransition(Z);se instanceof B.RuleTransition&&(se.tailCall=this.testTailCall(M,se,!1),se.optimizedTailCall=this.testTailCall(M,se,!0))}}}static testTailCall(M,V,Z){if(!Z&&V.tailCall||Z&&V.optimizedTailCall)return!0;let se=new e.BitSet(M.states.length),fe=[];for(fe.push(V.followState);;){let he=fe.pop();if(!he)break;if(se.get(he.stateNumber)||he instanceof te.RuleStopState)continue;if(!he.onlyHasEpsilonTransitions)return!1;let K=Z?he.numberOfOptimizedTransitions:he.numberOfTransitions;for(let ae=0;ae<K;ae++){let de=Z?he.getOptimizedTransition(ae):he.transition(ae);if(de.serializationType!==1)return!1;fe.push(de.target)}}return!0}static toInt(M){return M}static toInt32(M,V){return(M[V]|M[V+1]<<16)>>>0}static toUUID(M,V){let Z=Ae.toInt32(M,V),se=Ae.toInt32(M,V+2),fe=Ae.toInt32(M,V+4),he=Ae.toInt32(M,V+6);return new T.UUID(he,fe,se,Z)}edgeFactory(M,V,Z,se,fe,he,K,ae){let de=M.states[se];switch(V){case 1:return new v.EpsilonTransition(de);case 2:return K!==0?new ce.RangeTransition(de,F.Token.EOF,he):new ce.RangeTransition(de,fe,he);case 3:return new B.RuleTransition(M.states[fe],he,K,de);case 4:return new ie.PredicateTransition(de,fe,he,K!==0);case 10:return new X.PrecedencePredicateTransition(de,fe);case 5:return K!==0?new o.AtomTransition(de,F.Token.EOF):new o.AtomTransition(de,fe);case 6:return new y.ActionTransition(de,fe,he,K!==0);case 7:return new G.SetTransition(de,ae[fe]);case 8:return new $.NotSetTransition(de,ae[fe]);case 9:return new R.WildcardTransition(de)}throw new Error("The specified transition type is not valid.")}stateFactory(M,V){let Z;switch(M){case r.ATNStateType.INVALID_TYPE:return new g.InvalidState;case r.ATNStateType.BASIC:Z=new i.BasicState;break;case r.ATNStateType.RULE_START:Z=new oe.RuleStartState;break;case r.ATNStateType.BLOCK_START:Z=new t.BasicBlockStartState;break;case r.ATNStateType.PLUS_BLOCK_START:Z=new ee.PlusBlockStartState;break;case r.ATNStateType.STAR_BLOCK_START:Z=new O.StarBlockStartState;break;case r.ATNStateType.TOKEN_START:Z=new k.TokensStartState;break;case r.ATNStateType.RULE_STOP:Z=new te.RuleStopState;break;case r.ATNStateType.BLOCK_END:Z=new s.BlockEndState;break;case r.ATNStateType.STAR_LOOP_BACK:Z=new C.StarLoopbackState;break;case r.ATNStateType.STAR_LOOP_ENTRY:Z=new D.StarLoopEntryState;break;case r.ATNStateType.PLUS_LOOP_BACK:Z=new I.PlusLoopbackState;break;case r.ATNStateType.LOOP_END:Z=new W.LoopEndState;break;default:let se=`The specified state type ${M} is not valid.`;throw new Error(se)}return Z.ruleIndex=V,Z}lexerActionFactory(M,V,Z){switch(M){case 0:return new _.LexerChannelAction(V);case 1:return new A.LexerCustomAction(V,Z);case 2:return new E.LexerModeAction(V);case 3:return N.LexerMoreAction.INSTANCE;case 4:return b.LexerPopModeAction.INSTANCE;case 5:return new w.LexerPushModeAction(V);case 6:return P.LexerSkipAction.INSTANCE;case 7:return new j.LexerTypeAction(V);default:let se=`The specified lexer action type ${M} is not valid.`;throw new Error(se)}}};return H.BASE_SERIALIZED_UUID=T.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"),H.ADDED_LEXER_ACTIONS=T.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D"),H.ADDED_UNICODE_SMP=T.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B"),H.SUPPORTED_UUIDS=[H.BASE_SERIALIZED_UUID,H.ADDED_LEXER_ACTIONS,H.ADDED_UNICODE_SMP],H.SERIALIZED_UUID=H.ADDED_UNICODE_SMP,a([L.NotNull],H.prototype,"deserializationOptions",void 0),a([d(0,L.NotNull)],H.prototype,"deserialize",null),a([d(0,L.NotNull)],H.prototype,"markPrecedenceDecisions",null),a([L.NotNull,d(0,L.NotNull)],H.prototype,"edgeFactory",null),Rt.ATNDeserializer=H,Rt}var Ht={},Wc;function sx(){if(Wc)return Ht;Wc=1;/*!
374
+ */var a=Gt&&Gt.__decorate||function(g,_,A,E){var N=arguments.length,b=N<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,A):E,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,_,A,E);else for(var P=g.length-1;P>=0;P--)(w=g[P])&&(b=(N<3?w(b):N>3?w(_,A,b):w(_,A))||b);return N>3&&b&&Object.defineProperty(_,A,b),b},d=Gt&&Gt.__param||function(g,_){return function(A,E){_(A,E,g)}};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.ParserInterpreter=void 0;const y=dr(),m=qe(),h=vr(),u=co(),r=fo(),o=wp(),t=mp(),i=pe(),e=pe(),s=ji(),l=$i(),c=Sr(),p=Ta(),v=Ie();let x=class ca extends s.Parser{constructor(_,A,E,N,b){if(super(_ instanceof ca?_.inputStream:b),this._parentContextStack=[],this.overrideDecision=-1,this.overrideDecisionInputIndex=-1,this.overrideDecisionAlt=-1,this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0,_ instanceof ca){let w=_;this._grammarFileName=w._grammarFileName,this._atn=w._atn,this.pushRecursionContextStates=w.pushRecursionContextStates,this._ruleNames=w._ruleNames,this._vocabulary=w._vocabulary,this.interpreter=new l.ParserATNSimulator(this._atn,this)}else{A=A,E=E,N=N,this._grammarFileName=_,this._atn=N,this._ruleNames=E.slice(0),this._vocabulary=A,this.pushRecursionContextStates=new h.BitSet(N.states.length);for(let w of N.states)w instanceof p.StarLoopEntryState&&w.precedenceRuleDecision&&this.pushRecursionContextStates.set(w.stateNumber);this.interpreter=new l.ParserATNSimulator(N,this)}}reset(_){_===void 0?super.reset():super.reset(_),this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0}get atn(){return this._atn}get vocabulary(){return this._vocabulary}get ruleNames(){return this._ruleNames}get grammarFileName(){return this._grammarFileName}parse(_){let A=this._atn.ruleToStartState[_];for(this._rootContext=this.createInterpreterRuleContext(void 0,y.ATNState.INVALID_STATE_NUMBER,_),A.isPrecedenceRule?this.enterRecursionRule(this._rootContext,A.stateNumber,_,0):this.enterRule(this._rootContext,A.stateNumber,_);;){let E=this.atnState;switch(E.stateType){case m.ATNStateType.RULE_STOP:if(this._ctx.isEmpty)if(A.isPrecedenceRule){let N=this._ctx,b=this._parentContextStack.pop();return this.unrollRecursionContexts(b[0]),N}else return this.exitRule(),this._rootContext;this.visitRuleStopState(E);break;default:try{this.visitState(E)}catch(N){if(N instanceof c.RecognitionException)this.state=this._atn.ruleToStopState[E.ruleIndex].stateNumber,this.context.exception=N,this.errorHandler.reportError(this,N),this.recover(N);else throw N}break}}}enterRecursionRule(_,A,E,N){this._parentContextStack.push([this._ctx,_.invokingState]),super.enterRecursionRule(_,A,E,N)}get atnState(){return this._atn.states[this.state]}visitState(_){let A=1;_.numberOfTransitions>1&&(A=this.visitDecisionState(_));let E=_.transition(A-1);switch(E.serializationType){case 1:if(this.pushRecursionContextStates.get(_.stateNumber)&&!(E.target instanceof t.LoopEndState)){let W=this._parentContextStack[this._parentContextStack.length-1],L=this.createInterpreterRuleContext(W[0],W[1],this._ctx.ruleIndex);this.pushNewRecursionContext(L,this._atn.ruleToStartState[_.ruleIndex].stateNumber,this._ctx.ruleIndex)}break;case 5:this.match(E._label);break;case 2:case 7:case 8:E.matches(this._input.LA(1),v.Token.MIN_USER_TOKEN_TYPE,65535)||this.recoverInline(),this.matchWildcard();break;case 9:this.matchWildcard();break;case 3:let N=E.target,b=N.ruleIndex,w=this.createInterpreterRuleContext(this._ctx,_.stateNumber,b);N.isPrecedenceRule?this.enterRecursionRule(w,N.stateNumber,b,E.precedence):this.enterRule(w,E.target.stateNumber,b);break;case 4:let P=E;if(!this.sempred(this._ctx,P.ruleIndex,P.predIndex))throw new u.FailedPredicateException(this);break;case 6:let j=E;this.action(this._ctx,j.ruleIndex,j.actionIndex);break;case 10:if(!this.precpred(this._ctx,E.precedence)){let W=E.precedence;throw new u.FailedPredicateException(this,`precpred(_ctx, ${W})`)}break;default:throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.")}this.state=E.target.stateNumber}visitDecisionState(_){let A;this.errorHandler.sync(this);let E=_.decision;return E===this.overrideDecision&&this._input.index===this.overrideDecisionInputIndex&&!this.overrideDecisionReached?(A=this.overrideDecisionAlt,this.overrideDecisionReached=!0):A=this.interpreter.adaptivePredict(this._input,E,this._ctx),A}createInterpreterRuleContext(_,A,E){return new o.InterpreterRuleContext(E,_,A)}visitRuleStopState(_){if(this._atn.ruleToStartState[_.ruleIndex].isPrecedenceRule){let N=this._parentContextStack.pop();this.unrollRecursionContexts(N[0]),this.state=N[1]}else this.exitRule();let E=this._atn.states[this.state].transition(0);this.state=E.followState.stateNumber}addDecisionOverride(_,A,E){this.overrideDecision=_,this.overrideDecisionInputIndex=A,this.overrideDecisionAlt=E}get overrideDecisionRoot(){return this._overrideDecisionRoot}recover(_){let A=this._input.index;if(this.errorHandler.recover(this,_),this._input.index===A){let E=_.getOffendingToken();if(!E)throw new Error("Expected exception to have an offending token");let N=E.tokenSource,b=N!==void 0?N.inputStream:void 0,w={source:N,stream:b};if(_ instanceof r.InputMismatchException){let P=_.expectedTokens;if(P===void 0)throw new Error("Expected the exception to provide expected tokens");let j=v.Token.INVALID_TYPE;P.isNil||(j=P.minElement);let W=this.tokenFactory.create(w,j,E.text,v.Token.DEFAULT_CHANNEL,-1,-1,E.line,E.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,W))}else{E.tokenSource;let P=this.tokenFactory.create(w,v.Token.INVALID_TYPE,E.text,v.Token.DEFAULT_CHANNEL,-1,-1,E.line,E.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,P))}}}recoverInline(){return this._errHandler.recoverInline(this)}get rootContext(){return this._rootContext}};return a([i.NotNull],x.prototype,"_vocabulary",void 0),a([e.Override],x.prototype,"reset",null),a([e.Override],x.prototype,"atn",null),a([e.Override],x.prototype,"vocabulary",null),a([e.Override],x.prototype,"ruleNames",null),a([e.Override],x.prototype,"grammarFileName",null),a([e.Override],x.prototype,"enterRecursionRule",null),x=a([d(1,i.NotNull)],x),Gt.ParserInterpreter=x,Gt}var Wt={},Yc;function Xh(){if(Yc)return Wt;Yc=1;/*!
377
375
  * Copyright 2016 The ANTLR Project. All rights reserved.
378
376
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
379
- */var a=Ht&&Ht.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=Ht&&Ht.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.ParseInfo=void 0;const y=pe();let m=class{constructor(u){this.atnSimulator=u}getDecisionInfo(){return this.atnSimulator.getDecisionInfo()}getLLDecisions(){let u=this.atnSimulator.getDecisionInfo(),r=[];for(let o=0;o<u.length;o++)u[o].LL_Fallback>0&&r.push(o);return r}getTotalTimeInPrediction(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.timeInPrediction;return r}getTotalSLLLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_TotalLook;return r}getTotalLLLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.LL_TotalLook;return r}getTotalSLLATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_ATNTransitions;return r}getTotalLLATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.LL_ATNTransitions;return r}getTotalATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_ATNTransitions,r+=o.LL_ATNTransitions;return r}getDFASize(u){if(u)return this.atnSimulator.atn.decisionToDFA[u].states.size;{let r=0,o=this.atnSimulator.atn.decisionToDFA;for(let t=0;t<o.length;t++)r+=this.getDFASize(t);return r}}};return a([y.NotNull],m.prototype,"getDecisionInfo",null),a([y.NotNull],m.prototype,"getLLDecisions",null),m=a([d(0,y.NotNull)],m),Ht.ParseInfo=m,Ht}var mn={},Qc;function Sp(){if(Qc)return mn;Qc=1;/*!
377
+ */var a=Wt&&Wt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=Wt&&Wt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.ParseTreeMatch=void 0;const y=pe();let m=class{constructor(u,r,o,t){if(!u)throw new Error("tree cannot be null");if(!r)throw new Error("pattern cannot be null");if(!o)throw new Error("labels cannot be null");this._tree=u,this._pattern=r,this._labels=o,this._mismatchedNode=t}get(u){let r=this._labels.get(u);if(!(!r||r.length===0))return r[r.length-1]}getAll(u){const r=this._labels.get(u);return r||[]}get labels(){return this._labels}get mismatchedNode(){return this._mismatchedNode}get succeeded(){return!this._mismatchedNode}get pattern(){return this._pattern}get tree(){return this._tree}toString(){return`Match ${this.succeeded?"succeeded":"failed"}; found ${this.labels.size} labels`}};return a([y.NotNull,d(0,y.NotNull)],m.prototype,"getAll",null),a([y.NotNull],m.prototype,"labels",null),a([y.NotNull],m.prototype,"pattern",null),a([y.NotNull],m.prototype,"tree",null),a([y.Override],m.prototype,"toString",null),m=a([d(0,y.NotNull),d(1,y.NotNull),d(2,y.NotNull)],m),Wt.ParseTreeMatch=m,Wt}var Qt={},pi={},hi={},Wc;function Kh(){if(Wc)return hi;Wc=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.XPathLexer=void 0;const a=ho(),d=Tr(),y=uo(),m=Er(),h=ut();let u=class Ge extends d.Lexer{constructor(o){super(o),this._interp=new y.LexerATNSimulator(Ge._ATN,this)}get vocabulary(){return Ge.VOCABULARY}get grammarFileName(){return"XPathLexer.g4"}get ruleNames(){return Ge.ruleNames}get serializedATN(){return Ge._serializedATN}get channelNames(){return Ge.channelNames}get modeNames(){return Ge.modeNames}action(o,t,i){switch(t){case 4:this.ID_action(o,i);break}}ID_action(o,t){switch(t){case 0:let i=this.text;i.charAt(0)===i.charAt(0).toUpperCase()?this.type=Ge.TOKEN_REF:this.type=Ge.RULE_REF;break}}static get _ATN(){return Ge.__ATN||(Ge.__ATN=new a.ATNDeserializer().deserialize(h.toCharArray(Ge._serializedATN))),Ge.__ATN}};return hi.XPathLexer=u,u.TOKEN_REF=1,u.RULE_REF=2,u.ANYWHERE=3,u.ROOT=4,u.WILDCARD=5,u.BANG=6,u.ID=7,u.STRING=8,u.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],u.modeNames=["DEFAULT_MODE"],u.ruleNames=["ANYWHERE","ROOT","WILDCARD","BANG","ID","NameChar","NameStartChar","STRING"],u._LITERAL_NAMES=[void 0,void 0,void 0,"'//'","'/'","'*'","'!'"],u._SYMBOLIC_NAMES=[void 0,"TOKEN_REF","RULE_REF","ANYWHERE","ROOT","WILDCARD","BANG","ID","STRING"],u.VOCABULARY=new m.VocabularyImpl(u._LITERAL_NAMES,u._SYMBOLIC_NAMES,[]),u._serializedATNSegments=2,u._serializedATNSegment0=`줝쪺֍꾺体؇쉁
378
+ 2\b     \x07 \x07\b \b \x07
379
+ \f"\v\x07\x07\b\b  \x07 ,
380
+ \f  /\v   -
381
+ \x07\x07 \b\v \r
382
+ ʶ
383
+ 2;C\\aac|¡¬¬¯¯··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰̂Ͷ͸͹ͼͿ΁΁ΈΈΊΌΎΎΐΣΥϷϹ҃҅҉ҌԱԳ՘՛՛գ։ֿׁׁ֓׃ׄ׆ׇ׉׉ג׬ײ״؂؇ؒ؜؞؞آ٫ٰە۪ۗ۟ۡ۬۾܁܁ܑ݌ݏ޳߂߷߼߼ࠂ࠯ࡂ࡝ࢢࢶࢸࢿࣖ॥२ॱॳঅই঎঑঒কপবল঴঴স঻া৆৉৊্৐৙৙৞য়ৡ৥২৳ਃਅਇ਌਑਒ਕਪਬਲ਴ਵ਷ਸ਺਻ਾਾੀ੄੉੊੍੏੓੓ਜ਼ਫ਼੠੠੨੷ઃઅઇએઑઓકપબલ઴વષ઻ાેૉો્૏૒૒ૢ૥૨૱ૻૻଃଅଇ଎଑଒କପବଲ଴ଵଷ଻ା୆୉୊୍୏୘୙୞ୟୡ୥୨ୱ୳୳஄அஇ஌ஐஒஔ஗஛ஜஞஞ஠஡஥஦ப஬ர஻ீ௄ைொௌ௏௒௒௙௙௨௱ంఅఇఎఐఒఔపబ఻ిెైొౌ౏౗ౘౚ౜ౢ౥౨౱ಂಅಇಎಐಒಔಪಬವಷ಻ಾೆೈೊೌ೏೗೘ೠೠೢ೥೨ೱೳ೴ഃഅഇഎഐഒഔ഼ിെൈൊൌ൐ൖ൙ൡ൥൨൱ർඁ඄අඇ඘ගඳඵල඿඿ෂ෈෌෌ෑූෘෘේ෡෨෱෴෵ฃ฼โ๐๒๛຃ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯົຽ຿ໂໆ່່໊໏໒໛ໞ໡༂༂༚༛༢༫༹༹༷༷༻༻ཀཉཋ཮ཱི྆ྈྙྛ྾࿈࿈ဂ။ၒ႟ႢჇ჉჉჏჏გჼჾቊቌ቏ቒቘቚቚቜ቟ቢኊኌ኏ኒኲኴ኷ኺዀዂዂዄ዇ዊዘዚጒጔ጗ጚ፜፟፡ᎂ᎑Ꭲ᏷ᏺ᏿ᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰ᛺ᜂᜎᜐ᜖ᜢ᜶ᝂ᝕ᝢᝮᝰᝲ᝴᝵គ៕៙៙៞៟២៫᠍᠐᠒᠛ᠢ᡹ᢂ᢬ᢲ᣷ᤂᤠᤢ᤭ᤲ᤽᥈᥯ᥲ᥶ᦂ᦭ᦲ᧋᧒᧛ᨂ᨝ᨢ᩠ᩢ᩾᪁᪋᪒᪛᪩᪩ᪿ᪲ᬂ᭍᭒᭛᭭᭵ᮂ᯵ᰂ᰹᱂᱋ᱏ᱿ᲂᲊ᳔᳖᳒᳸ᳺ᳻ᴂ᷽᷷἗Ἒ἟ἢ὇Ὂ὏ὒὙὛὛὝὝὟὟὡ὿ᾂᾶᾸι῀῀ῄῆῈ῎ῒ῕Ῐ῝ῢ΅ῴῶῸ῾‍‑‬‰⁁⁂⁖⁖⁢⁦⁨ⁱ⁳⁳₁₁ₒ₞⃒⃞⃣⃣⃧⃲℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮ⳵ⴂⴧ⴩⴩⴯⴯ⴲ⵩⵱⵱ⶁ⶘ⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠⷢ⸁⸱⸱〇〉〣〱〳〷〺〾ぃ゘゛゜ゟァィーヾ㄁ㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂ꒎ꓒ꓿ꔂ꘎ꘒ꘭Ꙃ꙱ꙶꙿꚁ꛳ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹ꠩ꡂ꡵ꢂ꣇꣒꣛꣢꣹ꣽꣽꣿꣿ꤂꤯ꤲ꥕ꥢ꥾ꦂ꧂꧑꧛ꧢꨀꨂ꨸ꩂ꩏꩒꩛ꩢ꩸ꩼ꫄ꫝ꫟ꫢ꫱ꫴ꫸ꬃ꬈ꬋ꬐ꬓ꬘ꬢꬨꬪꬰꬲꭜꭞꭧꭲ꯬꯮꯯꯲꯻갂힥ힲ퟈ퟍ퟽車﩯全﫛fl﬈ﬕ﬙ײַשׁשּׁטּךּמּנּנּ﭂ףּ﭅צּרּ﮳ﯕ﴿ﵒ﶑ﶔ﷉ﷲ﷽︂︑︢︱︵︶﹏﹑ﹲﹶﹸ﻾!!2;C\aac|ィ￀ᅣ￉ᅩ￑ᅯ￙ᅵ￞�\r(*<>?AOR_‚üłŶǿǿʂʞʢ˒ˢˢ̡̲̂͌͒ͼ΂Ο΢υϊϑϓϗЂҟҢҫҲӕӚӽԂԩԲե؂ܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠ࣢ࣶࣴࣷंगढऻংহীুਂਅਇਈ਎ਕਗਙਛਵ਺਼ੁੁ੢੾ંઞૂૉો૨ଂଷୂୗୢ୴ஂஓంొಂ಴ೂ೴ဂ၈ၨၱႁႼႿႿგცჲ჻ᄂᄶᄸᅁᅒᅵᅸᅸᆂᇆᇌᇎᇒᇜᇞᇞሂሓሕሹቀቀኂኈኊኊኌ኏ኑኟኡኪኲዬዲዻጂጅጇጎ጑ጒጕጪጬጲጴጵጷጻጾፆፉፊፍፏፒፒፙፙ፟፥፨፮፲፶ᐂᑌᑒᑛᒂᓇᓉᓉᓒᓛᖂᖷᖺᗂᗚᗟᘂᙂᙆᙆᙒᙛᚂᚹᛂᛋᜂ᜛ᜟᜭᜲ᜻ᢢᣫᤁᤁ᫂᫺ᰂᰊᰌ᰸᰺᱂᱒ᱛᱴᲑᲔᲩᲫᲸ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠橢橫櫒櫯櫲櫶欂欸歂歅歒歛步歹歿殑漂潆潒澀澑澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛벟베벢벥텧텫텯톄톇톍톬톯퉄퉆퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌힪힬ퟄퟆퟍퟐ\uD801\uDA02\uDA38\uDA3D\uDA6E\uDA77\uDA77\uDA86\uDA86\uDA9D\uDAA1\uDAA3\uDAB1ꛘ꜂뜶띂렟렢캣﨟"ĂDZɀC\\c|¬¬··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰ͲͶ͸͹ͼͿ΁΁ΈΈΊΌΎΎΐΣΥϷϹ҃ҌԱԳ՘՛՛գ։ג׬ײ״آٌٰٱٳەۗۗۧۨ۰۱ۼ۾܁܁ܒܒܔܱݏާ޳޳ߌ߬߶߷߼߼ࠂࠗࠜࠜࠦࠦࠪࠪࡂ࡚ࢢࢶࢸࢿआऻिि॒॒ग़ॣॳংই঎঑঒কপবল঴঴স঻িি৐৐৞য়ৡৣ৲৳ਇ਌਑਒ਕਪਬਲ਴ਵ਷ਸ਺਻ਜ਼ਫ਼੠੠ੴ੶ઇએઑઓકપબલ઴વષ઻િિ૒૒ૢૣૻૻଇ଎଑଒କପବଲ଴ଵଷ଻ିି୞ୟୡୣ୳୳அஅஇ஌ஐஒஔ஗஛ஜஞஞ஠஡஥஦ப஬ர஻௒௒ఇఎఐఒఔపబ఻ిిౚ౜ౢౣಂಂಇಎಐಒಔಪಬವಷ಻ಿಿೠೠೢೣೳ೴ഇഎഐഒഔ഼ിി൐൐ൖ൘ൡൣർඁඇ඘ගඳඵල඿඿ෂ෈ฃาิีโ่຃ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯາິີ຿຿ໂໆ່່ໞ໡༂༂གཉཋ཮ྊྎဂာ၁၁ၒၗၜၟၣၣၧၨၰၲၷႃ႐႐ႢჇ჉჉჏჏გჼჾቊቌ቏ቒቘቚቚቜ቟ቢኊኌ኏ኒኲኴ኷ኺዀዂዂዄ዇ዊዘዚጒጔ጗ጚ፜ᎂ᎑Ꭲ᏷ᏺ᏿ᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰ᛺ᜂᜎᜐᜓᜢᜳᝂᝓᝢᝮᝰᝲគ឵៙៙៞៞ᠢ᡹ᢂᢆᢉᢪ᢬᢬ᢲ᣷ᤂᤠᥒ᥯ᥲ᥶ᦂ᦭ᦲ᧋ᨂᨘᨢᩖ᪩᪩ᬈᭇ᭍ᮅᮢ᮰᮱ᮼᯧᰂᰥᱏ᱑ᱜ᱿ᲂᲊᳫᳮᳰᳳ᳷᳸ᴂ᷁Ḃ἗Ἒ἟ἢ὇Ὂ὏ὒὙὛὛὝὝὟὟὡ὿ᾂᾶᾸι῀῀ῄῆῈ῎ῒ῕Ῐ῝ῢ΅ῴῶῸ῾⁳⁳₁₁ₒ₞℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮ⳰⳴⳵ⴂⴧ⴩⴩⴯⴯ⴲ⵩⵱⵱ⶂ⶘ⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠ⸱⸱〇〉〣〫〳〷〺〾ぃ゘ゟァィーヾ㄁ㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂ꒎ꓒ꓿ꔂ꘎ꘒ꘡꘬꘭Ꙃ꙰ꚁꚟꚢ꛱ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹꠃꠅꠇꠉꠌꠎꠤꡂ꡵ꢄꢵꣴ꣹ꣽꣽꣿꣿꤌꤧꤲꥈꥢ꥾ꦆꦴ꧑꧑ꧢꧦꧨ꧱ꧼꨀꨂꨪꩂꩄꩆꩍꩢ꩸ꩼꩼꪀꪱꪳꪳꪷꪸꪻ꪿ꫂꫂ꫄꫄ꫝ꫟ꫢꫬꫴ꫶ꬃ꬈ꬋ꬐ꬓ꬘ꬢꬨꬪꬰꬲꭜꭞꭧꭲꯤ갂힥ힲ퟈ퟍ퟽車﩯全﫛fl﬈ﬕ﬙ײַײַﬡשׁשּׁטּךּמּנּנּ﭂ףּ﭅צּרּ﮳ﯕ﴿ﵒ﶑ﶔ﷉ﷲ﷽ﹲﹶﹸ﻾C\c|ィ￀ᅣ￉ᅩ￑ᅯ￙ᅵ￞\r(*<>?AOR_‚üłŶʂʞʢ˒̡̲̂͌͒ͷ΂Ο΢υϊϑϓϗЂҟҲӕӚӽԂԩԲե؂ܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠ࣢ࣶࣴࣷंगढऻংহীুਂਂ਒ਕਗਙਛਵ੢੾ંઞૂૉો૦ଂଷୂୗୢ୴ஂஓంొಂ಴ೂ೴စ္ႅႱგცᄅᄨᅒᅴᅸᅸᆅᆴᇃᇆᇜᇜᇞᇞሂሓሕርኂኈኊኊኌ኏ኑኟኡኪኲዠጇጎ጑ጒጕጪጬጲጴጵጷጻጿጿፒፒ፟፣ᐂᐶᑉᑌᒂᒱᓆᓇᓉᓉᖂᖰᗚᗝᘂᘱᙆᙆᚂᚬᜂ᜛ᢢᣡᤁᤁ᫂᫺ᰂᰊᰌᰰ᱂᱂ᱴᲑ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠櫒櫯欂欱歂歅步歹歿殑漂潆潒潒澕澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈`,u._serializedATNSegment1=`핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌힪힬ퟄퟆퟍꛘ꜂뜶띂렟렢캣﨟1\x07 \v\x07 \v\r%')\x071\x071\x071\x07,\b\x1B\x07#\x1B
384
+  \b\r\x07"  !!#" #$\b$\f%& &'( ()-\x07)*,\v+*,/-.-+.0/-01\x07)1 -`,u._serializedATN=h.join([u._serializedATNSegment0,u._serializedATNSegment1],""),hi}var pn={},Qc;function Jh(){if(Qc)return pn;Qc=1;/*!
380
385
  * Copyright 2016 The ANTLR Project. All rights reserved.
381
386
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
382
- */var a=mn&&mn.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(mn,"__esModule",{value:!0}),mn.ProxyParserErrorListener=void 0;const d=Na(),y=pe();let m=class extends d.ProxyErrorListener{constructor(u){super(u)}reportAmbiguity(u,r,o,t,i,e,s){this.getDelegates().forEach(l=>{l.reportAmbiguity&&l.reportAmbiguity(u,r,o,t,i,e,s)})}reportAttemptingFullContext(u,r,o,t,i,e){this.getDelegates().forEach(s=>{s.reportAttemptingFullContext&&s.reportAttemptingFullContext(u,r,o,t,i,e)})}reportContextSensitivity(u,r,o,t,i,e){this.getDelegates().forEach(s=>{s.reportContextSensitivity&&s.reportContextSensitivity(u,r,o,t,i,e)})}};return a([y.Override],m.prototype,"reportAmbiguity",null),a([y.Override],m.prototype,"reportAttemptingFullContext",null),a([y.Override],m.prototype,"reportContextSensitivity",null),mn.ProxyParserErrorListener=m,mn}var yn={},Vs={},zs={},Gt={},Xc;function ax(){if(Xc)return Gt;Xc=1;/*!
387
+ */var a=pn&&pn.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(pn,"__esModule",{value:!0}),pn.XPathLexerErrorListener=void 0;const d=pe();let y=class{syntaxError(h,u,r,o,t,i){}};return a([d.Override],y.prototype,"syntaxError",null),pn.XPathLexerErrorListener=y,pn}var hn={},xn={},Xc;function Wn(){if(Xc)return xn;Xc=1;/*!
383
388
  * Copyright 2016 The ANTLR Project. All rights reserved.
384
389
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
385
- */Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.isSupplementaryCodePoint=Gt.isLowSurrogate=Gt.isHighSurrogate=void 0;function a(m){return m>=55296&&m<=56319}Gt.isHighSurrogate=a;function d(m){return m>=56320&&m<=57343}Gt.isLowSurrogate=d;function y(m){return m>=65536}return Gt.isSupplementaryCodePoint=y,Gt}var Kc;function Tp(){return Kc||(Kc=1,(function(a){/*!
390
+ */var a=xn&&xn.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(xn,"__esModule",{value:!0}),xn.XPathElement=void 0;const d=pe();let y=class{constructor(h){this.nodeName=h,this.invert=!1}toString(){let h=this.invert?"!":"";return Object.constructor.name+"["+h+this.nodeName+"]"}};return a([d.Override],y.prototype,"toString",null),xn.XPathElement=y,xn}var Kc;function Zh(){if(Kc)return hn;Kc=1;/*!
386
391
  * Copyright 2016 The ANTLR Project. All rights reserved.
387
392
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
388
- */Object.defineProperty(a,"__esModule",{value:!0}),a.CodePointBuffer=void 0;const d=Ue(),y=ax();class m{constructor(u,r){this.buffer=u,this._position=0,this._size=r}static withArray(u){return new m(u,u.length)}get position(){return this._position}set position(u){if(u<0||u>this._size)throw new RangeError;this._position=u}get remaining(){return this._size-this.position}get(u){return this.buffer[u]}array(){return this.buffer.slice(0,this._size)}static builder(u){return new m.Builder(u)}}a.CodePointBuffer=m,(function(h){let u;(function(o){o[o.BYTE=0]="BYTE",o[o.CHAR=1]="CHAR",o[o.INT=2]="INT"})(u||(u={}));class r{constructor(t){this.type=0,this.buffer=new Uint8Array(t),this.prevHighSurrogate=-1,this.position=0}build(){return new h(this.buffer,this.position)}static roundUpToNextPowerOfTwo(t){let i=32-Math.clz32(t-1);return Math.pow(2,i)}ensureRemaining(t){switch(this.type){case 0:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint8Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 1:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint16Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 2:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Int32Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break}}append(t){this.ensureRemaining(t.length),this.appendArray(t)}appendArray(t){switch(this.type){case 0:this.appendArrayByte(t);break;case 1:this.appendArrayChar(t);break;case 2:this.appendArrayInt(t);break}}appendArrayByte(t){d(this.prevHighSurrogate===-1);let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];if(p<=255)l[c]=p;else if(t=t.subarray(e,s),this.position=c,y.isHighSurrogate(p)){this.byteToIntBuffer(t.length),this.appendArrayInt(t);return}else{this.byteToCharBuffer(t.length),this.appendArrayChar(t);return}e++,c++}this.position=c}appendArrayChar(t){d(this.prevHighSurrogate===-1);let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];if(!y.isHighSurrogate(p))l[c]=p;else{t=t.subarray(e,s),this.position=c,this.charToIntBuffer(t.length),this.appendArrayInt(t);return}e++,c++}this.position=c}appendArrayInt(t){let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];e++,this.prevHighSurrogate!==-1?y.isLowSurrogate(p)?(l[c]=String.fromCharCode(this.prevHighSurrogate,p).codePointAt(0),c++,this.prevHighSurrogate=-1):(l[c]=this.prevHighSurrogate,c++,y.isHighSurrogate(p)?this.prevHighSurrogate=p:(l[c]=p,c++,this.prevHighSurrogate=-1)):y.isHighSurrogate(p)?this.prevHighSurrogate=p:(l[c]=p,c++)}this.prevHighSurrogate!==-1&&(l[c]=this.prevHighSurrogate,c++),this.position=c}byteToCharBuffer(t){let i=new Uint16Array(Math.max(this.position+t,this.buffer.length>>1));i.set(this.buffer.subarray(0,this.position),0),this.type=1,this.buffer=i}byteToIntBuffer(t){let i=new Int32Array(Math.max(this.position+t,this.buffer.length>>2));i.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=i}charToIntBuffer(t){let i=new Int32Array(Math.max(this.position+t,this.buffer.length>>1));i.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=i}}h.Builder=r})(m=a.CodePointBuffer||(a.CodePointBuffer={}))})(zs)),zs}var gn={},Jc;function Np(){if(Jc)return gn;Jc=1;/*!
393
+ */var a=hn&&hn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(hn,"__esModule",{value:!0}),hn.XPathRuleAnywhereElement=void 0;const d=pe(),y=Nr(),m=Wn();let h=class extends m.XPathElement{constructor(r,o){super(r),this.ruleIndex=o}evaluate(r){return y.Trees.findAllRuleNodes(r,this.ruleIndex)}};return a([d.Override],h.prototype,"evaluate",null),hn.XPathRuleAnywhereElement=h,hn}var dn={},Jc;function ex(){if(Jc)return dn;Jc=1;/*!
389
394
  * Copyright 2016 The ANTLR Project. All rights reserved.
390
395
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
391
- */var a=gn&&gn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(gn,"__esModule",{value:!0}),gn.CodePointCharStream=void 0;const d=Ue(),y=gr(),m=Ve(),h=pe();let u=class bp{constructor(o,t,i,e){d(t===0),this._array=o,this._size=i,this._name=e,this._position=0}get internalStorage(){return this._array}static fromBuffer(o,t){return(t===void 0||t.length===0)&&(t=y.IntStream.UNKNOWN_SOURCE_NAME),new bp(o.array(),o.position,o.remaining,t)}consume(){if(this._size-this._position===0)throw d(this.LA(1)===y.IntStream.EOF),new RangeError("cannot consume EOF");this._position++}get index(){return this._position}get size(){return this._size}mark(){return-1}release(o){}seek(o){this._position=o}get sourceName(){return this._name}toString(){return this.getText(m.Interval.of(0,this.size-1))}LA(o){let t;switch(Math.sign(o)){case-1:return t=this.index+o,t<0?y.IntStream.EOF:this._array[t];case 0:return 0;case 1:return t=this.index+o-1,t>=this.size?y.IntStream.EOF:this._array[t]}throw new RangeError("Not reached")}getText(o){const t=Math.min(o.a,this.size),i=Math.min(o.b-o.a+1,this.size-t);return this._array instanceof Int32Array?String.fromCodePoint(...Array.from(this._array.subarray(t,t+i))):String.fromCharCode(...Array.from(this._array.subarray(t,t+i)))}};return a([h.Override],u.prototype,"consume",null),a([h.Override],u.prototype,"index",null),a([h.Override],u.prototype,"size",null),a([h.Override],u.prototype,"mark",null),a([h.Override],u.prototype,"release",null),a([h.Override],u.prototype,"seek",null),a([h.Override],u.prototype,"sourceName",null),a([h.Override],u.prototype,"toString",null),a([h.Override],u.prototype,"LA",null),a([h.Override],u.prototype,"getText",null),gn.CodePointCharStream=u,gn}var Zc;function Ra(){return Zc||(Zc=1,(function(a){/*!
396
+ */var a=dn&&dn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(dn,"__esModule",{value:!0}),dn.XPathRuleElement=void 0;const d=st(),y=pe(),m=Nr(),h=Wn();let u=class extends h.XPathElement{constructor(o,t){super(o),this.ruleIndex=t}evaluate(o){let t=[];for(let i of m.Trees.getChildren(o))i instanceof d.ParserRuleContext&&(i.ruleIndex===this.ruleIndex&&!this.invert||i.ruleIndex!==this.ruleIndex&&this.invert)&&t.push(i);return t}};return a([y.Override],u.prototype,"evaluate",null),dn.XPathRuleElement=u,dn}var mn={},Zc;function tx(){if(Zc)return mn;Zc=1;/*!
392
397
  * Copyright 2016 The ANTLR Project. All rights reserved.
393
398
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
394
- */Object.defineProperty(a,"__esModule",{value:!0}),a.CharStreams=void 0;const d=Tp(),y=Np(),m=gr();(function(h){function u(r,o){(o===void 0||o.length===0)&&(o=m.IntStream.UNKNOWN_SOURCE_NAME);let t=d.CodePointBuffer.builder(r.length),i=new Uint16Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);return t.append(i),y.CodePointCharStream.fromBuffer(t.build(),o)}h.fromString=u})(a.CharStreams||(a.CharStreams={}))})(Vs)),Vs}var Yt={},Wt={},ef;function Cp(){if(ef)return Wt;ef=1;/*!
399
+ */var a=mn&&mn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(mn,"__esModule",{value:!0}),mn.XPathTokenAnywhereElement=void 0;const d=pe(),y=Nr(),m=Wn();let h=class extends m.XPathElement{constructor(r,o){super(r),this.tokenType=o}evaluate(r){return y.Trees.findAllTokenNodes(r,this.tokenType)}};return a([d.Override],h.prototype,"evaluate",null),mn.XPathTokenAnywhereElement=h,mn}var yn={},ef;function rx(){if(ef)return yn;ef=1;/*!
395
400
  * Copyright 2016 The ANTLR Project. All rights reserved.
396
401
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
397
- */var a=Wt&&Wt.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p},d=Wt&&Wt.__param||function(i,e){return function(s,l){e(s,l,i)}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.BufferedTokenStream=void 0;const y=Ue(),m=Li(),h=Ve(),u=br(),r=pe(),o=Ie();let t=class{constructor(e){if(this.tokens=[],this.p=-1,this.fetchedEOF=!1,e==null)throw new Error("tokenSource cannot be null");this._tokenSource=e}get tokenSource(){return this._tokenSource}set tokenSource(e){this._tokenSource=e,this.tokens.length=0,this.p=-1,this.fetchedEOF=!1}get index(){return this.p}mark(){return 0}release(e){}seek(e){this.lazyInit(),this.p=this.adjustSeekIndex(e)}get size(){return this.tokens.length}consume(){let e;if(this.p>=0?this.fetchedEOF?e=this.p<this.tokens.length-1:e=this.p<this.tokens.length:e=!1,!e&&this.LA(1)===o.Token.EOF)throw new Error("cannot consume EOF");this.sync(this.p+1)&&(this.p=this.adjustSeekIndex(this.p+1))}sync(e){y(e>=0);let s=e-this.tokens.length+1;return s>0?this.fetch(s)>=s:!0}fetch(e){if(this.fetchedEOF)return 0;for(let s=0;s<e;s++){let l=this.tokenSource.nextToken();if(this.isWritableToken(l)&&(l.tokenIndex=this.tokens.length),this.tokens.push(l),l.type===o.Token.EOF)return this.fetchedEOF=!0,s+1}return e}get(e){if(e<0||e>=this.tokens.length)throw new RangeError("token index "+e+" out of range 0.."+(this.tokens.length-1));return this.tokens[e]}getRange(e,s){if(e<0||s<0)return[];this.lazyInit();let l=new Array;s>=this.tokens.length&&(s=this.tokens.length-1);for(let c=e;c<=s;c++){let p=this.tokens[c];if(p.type===o.Token.EOF)break;l.push(p)}return l}LA(e){let s=this.LT(e);return s?s.type:o.Token.INVALID_TYPE}tryLB(e){if(!(this.p-e<0))return this.tokens[this.p-e]}LT(e){let s=this.tryLT(e);if(s===void 0)throw new RangeError("requested lookback index out of range");return s}tryLT(e){if(this.lazyInit(),e===0)throw new RangeError("0 is not a valid lookahead index");if(e<0)return this.tryLB(-e);let s=this.p+e-1;return this.sync(s),s>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[s]}adjustSeekIndex(e){return e}lazyInit(){this.p===-1&&this.setup()}setup(){this.sync(0),this.p=this.adjustSeekIndex(0)}getTokens(e,s,l){if(this.lazyInit(),e===void 0)return y(s===void 0&&l===void 0),this.tokens;if(s===void 0&&(s=this.tokens.length-1),e<0||s>=this.tokens.length||s<0||e>=this.tokens.length)throw new RangeError("start "+e+" or stop "+s+" not in 0.."+(this.tokens.length-1));if(e>s)return[];if(l===void 0)return this.tokens.slice(e,s+1);typeof l=="number"&&(l=new Set().add(l));let c=l,p=this.tokens.slice(e,s+1);return p=p.filter(v=>c.has(v.type)),p}nextTokenOnChannel(e,s){if(this.sync(e),e>=this.size)return this.size-1;let l=this.tokens[e];for(;l.channel!==s;){if(l.type===o.Token.EOF)return e;e++,this.sync(e),l=this.tokens[e]}return e}previousTokenOnChannel(e,s){if(this.sync(e),e>=this.size)return this.size-1;for(;e>=0;){let l=this.tokens[e];if(l.type===o.Token.EOF||l.channel===s)return e;e--}return e}getHiddenTokensToRight(e,s=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));let l=this.nextTokenOnChannel(e+1,u.Lexer.DEFAULT_TOKEN_CHANNEL),c,p=e+1;return l===-1?c=this.size-1:c=l,this.filterForChannel(p,c,s)}getHiddenTokensToLeft(e,s=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));if(e===0)return[];let l=this.previousTokenOnChannel(e-1,u.Lexer.DEFAULT_TOKEN_CHANNEL);if(l===e-1)return[];let c=l+1,p=e-1;return this.filterForChannel(c,p,s)}filterForChannel(e,s,l){let c=new Array;for(let p=e;p<=s;p++){let v=this.tokens[p];l===-1?v.channel!==u.Lexer.DEFAULT_TOKEN_CHANNEL&&c.push(v):v.channel===l&&c.push(v)}return c}get sourceName(){return this.tokenSource.sourceName}getText(e){e===void 0?e=h.Interval.of(0,this.size-1):e instanceof h.Interval||(e=e.sourceInterval);let s=e.a,l=e.b;if(s<0||l<0)return"";this.fill(),l>=this.tokens.length&&(l=this.tokens.length-1);let c="";for(let p=s;p<=l;p++){let v=this.tokens[p];if(v.type===o.Token.EOF)break;c+=v.text}return c.toString()}getTextFromRange(e,s){return this.isToken(e)&&this.isToken(s)?this.getText(h.Interval.of(e.tokenIndex,s.tokenIndex)):""}fill(){this.lazyInit();const e=1e3;for(;;)if(this.fetch(e)<e)return}isWritableToken(e){return e instanceof m.CommonToken}isToken(e){return e instanceof m.CommonToken}};return a([r.NotNull],t.prototype,"_tokenSource",void 0),a([r.Override],t.prototype,"tokenSource",null),a([r.Override],t.prototype,"index",null),a([r.Override],t.prototype,"mark",null),a([r.Override],t.prototype,"release",null),a([r.Override],t.prototype,"seek",null),a([r.Override],t.prototype,"size",null),a([r.Override],t.prototype,"consume",null),a([r.Override],t.prototype,"get",null),a([r.Override],t.prototype,"LA",null),a([r.NotNull,r.Override],t.prototype,"LT",null),a([r.Override],t.prototype,"sourceName",null),a([r.NotNull,r.Override],t.prototype,"getText",null),a([r.NotNull,r.Override],t.prototype,"getTextFromRange",null),t=a([d(0,r.NotNull)],t),Wt.BufferedTokenStream=t,Wt}var tf;function Pa(){if(tf)return Yt;tf=1;/*!
402
+ */var a=yn&&yn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(yn,"__esModule",{value:!0}),yn.XPathTokenElement=void 0;const d=pe(),y=_r(),m=Nr(),h=Wn();let u=class extends h.XPathElement{constructor(o,t){super(o),this.tokenType=t}evaluate(o){let t=[];for(let i of m.Trees.getChildren(o))i instanceof y.TerminalNode&&(i.symbol.type===this.tokenType&&!this.invert||i.symbol.type!==this.tokenType&&this.invert)&&t.push(i);return t}};return a([d.Override],u.prototype,"evaluate",null),yn.XPathTokenElement=u,yn}var gn={},tf;function nx(){if(tf)return gn;tf=1;/*!
398
403
  * Copyright 2016 The ANTLR Project. All rights reserved.
399
404
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
400
- */var a=Yt&&Yt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Yt&&Yt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.CommonTokenStream=void 0;const y=Cp(),m=pe(),h=Ie();let u=class extends y.BufferedTokenStream{constructor(o,t=h.Token.DEFAULT_CHANNEL){super(o),this.channel=t}adjustSeekIndex(o){return this.nextTokenOnChannel(o,this.channel)}tryLB(o){if(this.p-o<0)return;let t=this.p,i=1;for(;i<=o&&t>0;)t=this.previousTokenOnChannel(t-1,this.channel),i++;if(!(t<0))return this.tokens[t]}tryLT(o){if(this.lazyInit(),o===0)throw new RangeError("0 is not a valid lookahead index");if(o<0)return this.tryLB(-o);let t=this.p,i=1;for(;i<o;)this.sync(t+1)&&(t=this.nextTokenOnChannel(t+1,this.channel)),i++;return this.tokens[t]}getNumberOfOnChannelTokens(){let o=0;this.fill();for(let t of this.tokens)if(t.channel===this.channel&&o++,t.type===h.Token.EOF)break;return o}};return a([m.Override],u.prototype,"adjustSeekIndex",null),a([m.Override],u.prototype,"tryLB",null),a([m.Override],u.prototype,"tryLT",null),u=a([d(0,m.NotNull)],u),Yt.CommonTokenStream=u,Yt}var Qt={},rf;function Op(){if(rf)return Qt;rf=1;/*!
405
+ */var a=gn&&gn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(gn,"__esModule",{value:!0}),gn.XPathWildcardAnywhereElement=void 0;const d=pe(),y=Nr(),m=Ia(),h=Wn();let u=class extends h.XPathElement{constructor(){super(m.XPath.WILDCARD)}evaluate(o){return this.invert?[]:y.Trees.getDescendants(o)}};return a([d.Override],u.prototype,"evaluate",null),gn.XPathWildcardAnywhereElement=u,gn}var _n={},rf;function ix(){if(rf)return _n;rf=1;/*!
401
406
  * Copyright 2016 The ANTLR Project. All rights reserved.
402
407
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
403
- */var a=Qt&&Qt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Qt&&Qt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.ListTokenSource=void 0;const y=Ta(),m=pe(),h=Ie();let u=class{constructor(o,t){if(this.i=0,this._factory=y.CommonTokenFactory.DEFAULT,o==null)throw new Error("tokens cannot be null");this.tokens=o,this._sourceName=t}get charPositionInLine(){if(this.i<this.tokens.length)return this.tokens[this.i].charPositionInLine;if(this.eofToken!=null)return this.eofToken.charPositionInLine;if(this.tokens.length>0){let o=this.tokens[this.tokens.length-1],t=o.text;if(t!=null){let i=t.lastIndexOf(`
404
- `);if(i>=0)return t.length-i-1}return o.charPositionInLine+o.stopIndex-o.startIndex+1}return 0}nextToken(){if(this.i>=this.tokens.length){if(this.eofToken==null){let t=-1;if(this.tokens.length>0){let e=this.tokens[this.tokens.length-1].stopIndex;e!==-1&&(t=e+1)}let i=Math.max(-1,t-1);this.eofToken=this._factory.create({source:this,stream:this.inputStream},h.Token.EOF,"EOF",h.Token.DEFAULT_CHANNEL,t,i,this.line,this.charPositionInLine)}return this.eofToken}let o=this.tokens[this.i];return this.i===this.tokens.length-1&&o.type===h.Token.EOF&&(this.eofToken=o),this.i++,o}get line(){if(this.i<this.tokens.length)return this.tokens[this.i].line;if(this.eofToken!=null)return this.eofToken.line;if(this.tokens.length>0){let o=this.tokens[this.tokens.length-1],t=o.line,i=o.text;if(i!=null)for(let e=0;e<i.length;e++)i.charAt(e)===`
405
- `&&t++;return t}return 1}get inputStream(){if(this.i<this.tokens.length)return this.tokens[this.i].inputStream;if(this.eofToken!=null)return this.eofToken.inputStream;if(this.tokens.length>0)return this.tokens[this.tokens.length-1].inputStream}get sourceName(){if(this._sourceName)return this._sourceName;let o=this.inputStream;return o!=null?o.sourceName:"List"}set tokenFactory(o){this._factory=o}get tokenFactory(){return this._factory}};return a([m.Override],u.prototype,"charPositionInLine",null),a([m.Override],u.prototype,"nextToken",null),a([m.Override],u.prototype,"line",null),a([m.Override],u.prototype,"inputStream",null),a([m.Override],u.prototype,"sourceName",null),a([m.Override,m.NotNull,d(0,m.NotNull)],u.prototype,"tokenFactory",null),u=a([d(0,m.NotNull)],u),Qt.ListTokenSource=u,Qt}var pi={},nf;function ux(){if(nf)return pi;nf=1;/*!
408
+ */var a=_n&&_n.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(_n,"__esModule",{value:!0}),_n.XPathWildcardElement=void 0;const d=pe(),y=Nr(),m=Ia(),h=Wn();let u=class extends h.XPathElement{constructor(){super(m.XPath.WILDCARD)}evaluate(o){let t=[];if(this.invert)return t;for(let i of y.Trees.getChildren(o))t.push(i);return t}};return a([d.Override],u.prototype,"evaluate",null),_n.XPathWildcardElement=u,_n}var nf;function Ia(){if(nf)return pi;nf=1;/*!
406
409
  * Copyright 2016 The ANTLR Project. All rights reserved.
407
410
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
408
- */Object.defineProperty(pi,"__esModule",{value:!0}),pi.MultiMap=void 0;let a=class extends Map{constructor(){super()}map(y,m){let h=super.get(y);h||(h=[],super.set(y,h)),h.push(m)}getPairs(){let y=[];return this.forEach((m,h)=>{m.forEach(u=>{y.push([h,u])})}),y}};return pi.MultiMap=a,pi}var hi={},of;function Dp(){if(of)return hi;of=1;/*!
411
+ */Object.defineProperty(pi,"__esModule",{value:!0}),pi.XPath=void 0;const a=Pa(),d=Fa(),y=ao(),m=st(),h=Ie(),u=Kh(),r=Jh(),o=Zh(),t=ex(),i=tx(),e=rx(),s=nx(),l=ix();let c=class Pp{constructor(v,x){this.parser=v,this.path=x,this.elements=this.split(x)}split(v){let x=new u.XPathLexer(a.CharStreams.fromString(v));x.recover=b=>{throw b},x.removeErrorListeners(),x.addErrorListener(new r.XPathLexerErrorListener);let g=new d.CommonTokenStream(x);try{g.fill()}catch(b){if(b instanceof y.LexerNoViableAltException){let P="Invalid tokens or characters at index "+x.charPositionInLine+" in path '"+v+"' -- "+b.message;throw new RangeError(P)}throw b}let _=g.getTokens(),A=[],E=_.length,N=0;e:for(;N<E;){let b=_[N],w;switch(b.type){case u.XPathLexer.ROOT:case u.XPathLexer.ANYWHERE:let P=b.type===u.XPathLexer.ANYWHERE;N++,w=_[N];let j=w.type===u.XPathLexer.BANG;j&&(N++,w=_[N]);let W=this.getXPathElement(w,P);W.invert=j,A.push(W),N++;break;case u.XPathLexer.TOKEN_REF:case u.XPathLexer.RULE_REF:case u.XPathLexer.WILDCARD:A.push(this.getXPathElement(b,!1)),N++;break;case h.Token.EOF:break e;default:throw new Error("Unknowth path element "+b)}}return A}getXPathElement(v,x){if(v.type===h.Token.EOF)throw new Error("Missing path element at end of path");let g=v.text;if(g==null)throw new Error("Expected wordToken to have text content.");let _=this.parser.getTokenType(g),A=this.parser.getRuleIndex(g);switch(v.type){case u.XPathLexer.WILDCARD:return x?new s.XPathWildcardAnywhereElement:new l.XPathWildcardElement;case u.XPathLexer.TOKEN_REF:case u.XPathLexer.STRING:if(_===h.Token.INVALID_TYPE)throw new Error(g+" at index "+v.startIndex+" isn't a valid token name");return x?new i.XPathTokenAnywhereElement(g,_):new e.XPathTokenElement(g,_);default:if(A===-1)throw new Error(g+" at index "+v.startIndex+" isn't a valid rule name");return x?new o.XPathRuleAnywhereElement(g,A):new t.XPathRuleElement(g,A)}}static findAll(v,x,g){return new Pp(g,x).evaluate(v)}evaluate(v){let x=new m.ParserRuleContext;x.addChild(v);let g=new Set([x]),_=0;for(;_<this.elements.length;){let A=new Set;for(let E of g)E.childCount>0&&this.elements[_].evaluate(E).forEach(A.add,A);_++,g=A}return g}};return pi.XPath=c,c.WILDCARD="*",c.NOT="!",pi}var of;function ox(){if(of)return Qt;of=1;/*!
409
412
  * Copyright 2016 The ANTLR Project. All rights reserved.
410
413
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
411
- */Object.defineProperty(hi,"__esModule",{value:!0}),hi.ParseCancellationException=void 0;let a=class extends Error{constructor(y){super(y.message),this.cause=y,this.stack=y.stack}getCause(){return this.cause}};return hi.ParseCancellationException=a,hi}var Xt={},_n={},sf;function wp(){if(sf)return _n;sf=1;/*!
414
+ */var a=Qt&&Qt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Qt&&Qt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.ParseTreePattern=void 0;const y=pe(),m=Ia();let h=class{constructor(r,o,t,i){this._matcher=r,this._patternRuleIndex=t,this._pattern=o,this._patternTree=i}match(r){return this._matcher.match(r,this)}matches(r){return this._matcher.match(r,this).succeeded}findAll(r,o){let t=m.XPath.findAll(r,o,this._matcher.parser),i=[];for(let e of t){let s=this.match(e);s.succeeded&&i.push(s)}return i}get matcher(){return this._matcher}get pattern(){return this._pattern}get patternRuleIndex(){return this._patternRuleIndex}get patternTree(){return this._patternTree}};return a([y.NotNull],h.prototype,"_pattern",void 0),a([y.NotNull],h.prototype,"_patternTree",void 0),a([y.NotNull],h.prototype,"_matcher",void 0),a([y.NotNull,d(0,y.NotNull)],h.prototype,"match",null),a([d(0,y.NotNull)],h.prototype,"matches",null),a([y.NotNull,d(0,y.NotNull),d(1,y.NotNull)],h.prototype,"findAll",null),a([y.NotNull],h.prototype,"matcher",null),a([y.NotNull],h.prototype,"pattern",null),a([y.NotNull],h.prototype,"patternTree",null),h=a([d(0,y.NotNull),d(1,y.NotNull),d(3,y.NotNull)],h),Qt.ParseTreePattern=h,Qt}var Xt={},sf;function sx(){if(sf)return Xt;sf=1;/*!
412
415
  * Copyright 2016 The ANTLR Project. All rights reserved.
413
416
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
414
- */var a=_n&&_n.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(_n,"__esModule",{value:!0}),_n.InterpreterRuleContext=void 0;const d=pe(),y=st();let m=class extends y.ParserRuleContext{constructor(u,r,o){o!==void 0?super(r,o):super(),this._ruleIndex=u}get ruleIndex(){return this._ruleIndex}};return a([d.Override],m.prototype,"ruleIndex",null),_n.InterpreterRuleContext=m,_n}var af;function Rp(){if(af)return Xt;af=1;/*!
417
+ */var a=Xt&&Xt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Xt&&Xt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.RuleTagToken=void 0;const y=pe(),m=Ie();let h=class{constructor(r,o,t){if(r==null||r.length===0)throw new Error("ruleName cannot be null or empty.");this._ruleName=r,this.bypassTokenType=o,this._label=t}get ruleName(){return this._ruleName}get label(){return this._label}get channel(){return m.Token.DEFAULT_CHANNEL}get text(){return this._label!=null?"<"+this._label+":"+this._ruleName+">":"<"+this._ruleName+">"}get type(){return this.bypassTokenType}get line(){return 0}get charPositionInLine(){return-1}get tokenIndex(){return-1}get startIndex(){return-1}get stopIndex(){return-1}get tokenSource(){}get inputStream(){}toString(){return this._ruleName+":"+this.bypassTokenType}};return a([y.NotNull],h.prototype,"ruleName",null),a([y.Override],h.prototype,"channel",null),a([y.Override],h.prototype,"text",null),a([y.Override],h.prototype,"type",null),a([y.Override],h.prototype,"line",null),a([y.Override],h.prototype,"charPositionInLine",null),a([y.Override],h.prototype,"tokenIndex",null),a([y.Override],h.prototype,"startIndex",null),a([y.Override],h.prototype,"stopIndex",null),a([y.Override],h.prototype,"tokenSource",null),a([y.Override],h.prototype,"inputStream",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),Xt.RuleTagToken=h,Xt}var An={},xi={},af;function Fp(){if(af)return xi;af=1;/*!
415
418
  * Copyright 2016 The ANTLR Project. All rights reserved.
416
419
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
417
- */var a=Xt&&Xt.__decorate||function(g,_,A,E){var N=arguments.length,b=N<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,A):E,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,_,A,E);else for(var P=g.length-1;P>=0;P--)(w=g[P])&&(b=(N<3?w(b):N>3?w(_,A,b):w(_,A))||b);return N>3&&b&&Object.defineProperty(_,A,b),b},d=Xt&&Xt.__param||function(g,_){return function(A,E){_(A,E,g)}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.ParserInterpreter=void 0;const y=dr(),m=qe(),h=Sr(),u=io(),r=oo(),o=wp(),t=gp(),i=pe(),e=pe(),s=$i(),l=qi(),c=Ar(),p=Ca(),v=Ie();let x=class fa extends s.Parser{constructor(_,A,E,N,b){if(super(_ instanceof fa?_.inputStream:b),this._parentContextStack=[],this.overrideDecision=-1,this.overrideDecisionInputIndex=-1,this.overrideDecisionAlt=-1,this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0,_ instanceof fa){let w=_;this._grammarFileName=w._grammarFileName,this._atn=w._atn,this.pushRecursionContextStates=w.pushRecursionContextStates,this._ruleNames=w._ruleNames,this._vocabulary=w._vocabulary,this.interpreter=new l.ParserATNSimulator(this._atn,this)}else{A=A,E=E,N=N,this._grammarFileName=_,this._atn=N,this._ruleNames=E.slice(0),this._vocabulary=A,this.pushRecursionContextStates=new h.BitSet(N.states.length);for(let w of N.states)w instanceof p.StarLoopEntryState&&w.precedenceRuleDecision&&this.pushRecursionContextStates.set(w.stateNumber);this.interpreter=new l.ParserATNSimulator(N,this)}}reset(_){_===void 0?super.reset():super.reset(_),this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0}get atn(){return this._atn}get vocabulary(){return this._vocabulary}get ruleNames(){return this._ruleNames}get grammarFileName(){return this._grammarFileName}parse(_){let A=this._atn.ruleToStartState[_];for(this._rootContext=this.createInterpreterRuleContext(void 0,y.ATNState.INVALID_STATE_NUMBER,_),A.isPrecedenceRule?this.enterRecursionRule(this._rootContext,A.stateNumber,_,0):this.enterRule(this._rootContext,A.stateNumber,_);;){let E=this.atnState;switch(E.stateType){case m.ATNStateType.RULE_STOP:if(this._ctx.isEmpty)if(A.isPrecedenceRule){let N=this._ctx,b=this._parentContextStack.pop();return this.unrollRecursionContexts(b[0]),N}else return this.exitRule(),this._rootContext;this.visitRuleStopState(E);break;default:try{this.visitState(E)}catch(N){if(N instanceof c.RecognitionException)this.state=this._atn.ruleToStopState[E.ruleIndex].stateNumber,this.context.exception=N,this.errorHandler.reportError(this,N),this.recover(N);else throw N}break}}}enterRecursionRule(_,A,E,N){this._parentContextStack.push([this._ctx,_.invokingState]),super.enterRecursionRule(_,A,E,N)}get atnState(){return this._atn.states[this.state]}visitState(_){let A=1;_.numberOfTransitions>1&&(A=this.visitDecisionState(_));let E=_.transition(A-1);switch(E.serializationType){case 1:if(this.pushRecursionContextStates.get(_.stateNumber)&&!(E.target instanceof t.LoopEndState)){let W=this._parentContextStack[this._parentContextStack.length-1],L=this.createInterpreterRuleContext(W[0],W[1],this._ctx.ruleIndex);this.pushNewRecursionContext(L,this._atn.ruleToStartState[_.ruleIndex].stateNumber,this._ctx.ruleIndex)}break;case 5:this.match(E._label);break;case 2:case 7:case 8:E.matches(this._input.LA(1),v.Token.MIN_USER_TOKEN_TYPE,65535)||this.recoverInline(),this.matchWildcard();break;case 9:this.matchWildcard();break;case 3:let N=E.target,b=N.ruleIndex,w=this.createInterpreterRuleContext(this._ctx,_.stateNumber,b);N.isPrecedenceRule?this.enterRecursionRule(w,N.stateNumber,b,E.precedence):this.enterRule(w,E.target.stateNumber,b);break;case 4:let P=E;if(!this.sempred(this._ctx,P.ruleIndex,P.predIndex))throw new u.FailedPredicateException(this);break;case 6:let j=E;this.action(this._ctx,j.ruleIndex,j.actionIndex);break;case 10:if(!this.precpred(this._ctx,E.precedence)){let W=E.precedence;throw new u.FailedPredicateException(this,`precpred(_ctx, ${W})`)}break;default:throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.")}this.state=E.target.stateNumber}visitDecisionState(_){let A;this.errorHandler.sync(this);let E=_.decision;return E===this.overrideDecision&&this._input.index===this.overrideDecisionInputIndex&&!this.overrideDecisionReached?(A=this.overrideDecisionAlt,this.overrideDecisionReached=!0):A=this.interpreter.adaptivePredict(this._input,E,this._ctx),A}createInterpreterRuleContext(_,A,E){return new o.InterpreterRuleContext(E,_,A)}visitRuleStopState(_){if(this._atn.ruleToStartState[_.ruleIndex].isPrecedenceRule){let N=this._parentContextStack.pop();this.unrollRecursionContexts(N[0]),this.state=N[1]}else this.exitRule();let E=this._atn.states[this.state].transition(0);this.state=E.followState.stateNumber}addDecisionOverride(_,A,E){this.overrideDecision=_,this.overrideDecisionInputIndex=A,this.overrideDecisionAlt=E}get overrideDecisionRoot(){return this._overrideDecisionRoot}recover(_){let A=this._input.index;if(this.errorHandler.recover(this,_),this._input.index===A){let E=_.getOffendingToken();if(!E)throw new Error("Expected exception to have an offending token");let N=E.tokenSource,b=N!==void 0?N.inputStream:void 0,w={source:N,stream:b};if(_ instanceof r.InputMismatchException){let P=_.expectedTokens;if(P===void 0)throw new Error("Expected the exception to provide expected tokens");let j=v.Token.INVALID_TYPE;P.isNil||(j=P.minElement);let W=this.tokenFactory.create(w,j,E.text,v.Token.DEFAULT_CHANNEL,-1,-1,E.line,E.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,W))}else{E.tokenSource;let P=this.tokenFactory.create(w,v.Token.INVALID_TYPE,E.text,v.Token.DEFAULT_CHANNEL,-1,-1,E.line,E.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,P))}}}recoverInline(){return this._errHandler.recoverInline(this)}get rootContext(){return this._rootContext}};return a([i.NotNull],x.prototype,"_vocabulary",void 0),a([e.Override],x.prototype,"reset",null),a([e.Override],x.prototype,"atn",null),a([e.Override],x.prototype,"vocabulary",null),a([e.Override],x.prototype,"ruleNames",null),a([e.Override],x.prototype,"grammarFileName",null),a([e.Override],x.prototype,"enterRecursionRule",null),x=a([d(1,i.NotNull)],x),Xt.ParserInterpreter=x,Xt}var Kt={},uf;function lx(){if(uf)return Kt;uf=1;/*!
420
+ */Object.defineProperty(xi,"__esModule",{value:!0}),xi.Chunk=void 0;let a=class{};return xi.Chunk=a,xi}var uf;function ax(){if(uf)return An;uf=1;/*!
418
421
  * Copyright 2016 The ANTLR Project. All rights reserved.
419
422
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
420
- */var a=Kt&&Kt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=Kt&&Kt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.ParseTreeMatch=void 0;const y=pe();let m=class{constructor(u,r,o,t){if(!u)throw new Error("tree cannot be null");if(!r)throw new Error("pattern cannot be null");if(!o)throw new Error("labels cannot be null");this._tree=u,this._pattern=r,this._labels=o,this._mismatchedNode=t}get(u){let r=this._labels.get(u);if(!(!r||r.length===0))return r[r.length-1]}getAll(u){const r=this._labels.get(u);return r||[]}get labels(){return this._labels}get mismatchedNode(){return this._mismatchedNode}get succeeded(){return!this._mismatchedNode}get pattern(){return this._pattern}get tree(){return this._tree}toString(){return`Match ${this.succeeded?"succeeded":"failed"}; found ${this.labels.size} labels`}};return a([y.NotNull,d(0,y.NotNull)],m.prototype,"getAll",null),a([y.NotNull],m.prototype,"labels",null),a([y.NotNull],m.prototype,"pattern",null),a([y.NotNull],m.prototype,"tree",null),a([y.Override],m.prototype,"toString",null),m=a([d(0,y.NotNull),d(1,y.NotNull),d(2,y.NotNull)],m),Kt.ParseTreeMatch=m,Kt}var Jt={},xi={},di={},lf;function cx(){if(lf)return di;lf=1,Object.defineProperty(di,"__esModule",{value:!0}),di.XPathLexer=void 0;const a=po(),d=br(),y=co(),m=Tr(),h=ut();let u=class Ge extends d.Lexer{constructor(o){super(o),this._interp=new y.LexerATNSimulator(Ge._ATN,this)}get vocabulary(){return Ge.VOCABULARY}get grammarFileName(){return"XPathLexer.g4"}get ruleNames(){return Ge.ruleNames}get serializedATN(){return Ge._serializedATN}get channelNames(){return Ge.channelNames}get modeNames(){return Ge.modeNames}action(o,t,i){switch(t){case 4:this.ID_action(o,i);break}}ID_action(o,t){switch(t){case 0:let i=this.text;i.charAt(0)===i.charAt(0).toUpperCase()?this.type=Ge.TOKEN_REF:this.type=Ge.RULE_REF;break}}static get _ATN(){return Ge.__ATN||(Ge.__ATN=new a.ATNDeserializer().deserialize(h.toCharArray(Ge._serializedATN))),Ge.__ATN}};return di.XPathLexer=u,u.TOKEN_REF=1,u.RULE_REF=2,u.ANYWHERE=3,u.ROOT=4,u.WILDCARD=5,u.BANG=6,u.ID=7,u.STRING=8,u.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],u.modeNames=["DEFAULT_MODE"],u.ruleNames=["ANYWHERE","ROOT","WILDCARD","BANG","ID","NameChar","NameStartChar","STRING"],u._LITERAL_NAMES=[void 0,void 0,void 0,"'//'","'/'","'*'","'!'"],u._SYMBOLIC_NAMES=[void 0,"TOKEN_REF","RULE_REF","ANYWHERE","ROOT","WILDCARD","BANG","ID","STRING"],u.VOCABULARY=new m.VocabularyImpl(u._LITERAL_NAMES,u._SYMBOLIC_NAMES,[]),u._serializedATNSegments=2,u._serializedATNSegment0=`줝쪺֍꾺体؇쉁
421
- 2\b     \x07 \x07\b \b \x07
422
- \f"\v\x07\x07\b\b  \x07 ,
423
- \f  /\v   -
424
- \x07\x07 \b\v \r
425
- ʶ
426
- 2;C\\aac|¡¬¬¯¯··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰̂Ͷ͸͹ͼͿ΁΁ΈΈΊΌΎΎΐΣΥϷϹ҃҅҉ҌԱԳ՘՛՛գ։ֿׁׁ֓׃ׄ׆ׇ׉׉ג׬ײ״؂؇ؒ؜؞؞آ٫ٰە۪ۗ۟ۡ۬۾܁܁ܑ݌ݏ޳߂߷߼߼ࠂ࠯ࡂ࡝ࢢࢶࢸࢿࣖ॥२ॱॳঅই঎঑঒কপবল঴঴স঻া৆৉৊্৐৙৙৞য়ৡ৥২৳ਃਅਇ਌਑਒ਕਪਬਲ਴ਵ਷ਸ਺਻ਾਾੀ੄੉੊੍੏੓੓ਜ਼ਫ਼੠੠੨੷ઃઅઇએઑઓકપબલ઴વષ઻ાેૉો્૏૒૒ૢ૥૨૱ૻૻଃଅଇ଎଑଒କପବଲ଴ଵଷ଻ା୆୉୊୍୏୘୙୞ୟୡ୥୨ୱ୳୳஄அஇ஌ஐஒஔ஗஛ஜஞஞ஠஡஥஦ப஬ர஻ீ௄ைொௌ௏௒௒௙௙௨௱ంఅఇఎఐఒఔపబ఻ిెైొౌ౏౗ౘౚ౜ౢ౥౨౱ಂಅಇಎಐಒಔಪಬವಷ಻ಾೆೈೊೌ೏೗೘ೠೠೢ೥೨ೱೳ೴ഃഅഇഎഐഒഔ഼ിെൈൊൌ൐ൖ൙ൡ൥൨൱ർඁ඄අඇ඘ගඳඵල඿඿ෂ෈෌෌ෑූෘෘේ෡෨෱෴෵ฃ฼โ๐๒๛຃ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯົຽ຿ໂໆ່່໊໏໒໛ໞ໡༂༂༚༛༢༫༹༹༷༷༻༻ཀཉཋ཮ཱི྆ྈྙྛ྾࿈࿈ဂ။ၒ႟ႢჇ჉჉჏჏გჼჾቊቌ቏ቒቘቚቚቜ቟ቢኊኌ኏ኒኲኴ኷ኺዀዂዂዄ዇ዊዘዚጒጔ጗ጚ፜፟፡ᎂ᎑Ꭲ᏷ᏺ᏿ᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰ᛺ᜂᜎᜐ᜖ᜢ᜶ᝂ᝕ᝢᝮᝰᝲ᝴᝵គ៕៙៙៞៟២៫᠍᠐᠒᠛ᠢ᡹ᢂ᢬ᢲ᣷ᤂᤠᤢ᤭ᤲ᤽᥈᥯ᥲ᥶ᦂ᦭ᦲ᧋᧒᧛ᨂ᨝ᨢ᩠ᩢ᩾᪁᪋᪒᪛᪩᪩ᪿ᪲ᬂ᭍᭒᭛᭭᭵ᮂ᯵ᰂ᰹᱂᱋ᱏ᱿ᲂᲊ᳔᳖᳒᳸ᳺ᳻ᴂ᷽᷷἗Ἒ἟ἢ὇Ὂ὏ὒὙὛὛὝὝὟὟὡ὿ᾂᾶᾸι῀῀ῄῆῈ῎ῒ῕Ῐ῝ῢ΅ῴῶῸ῾‍‑‬‰⁁⁂⁖⁖⁢⁦⁨ⁱ⁳⁳₁₁ₒ₞⃒⃞⃣⃣⃧⃲℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮ⳵ⴂⴧ⴩⴩⴯⴯ⴲ⵩⵱⵱ⶁ⶘ⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠⷢ⸁⸱⸱〇〉〣〱〳〷〺〾ぃ゘゛゜ゟァィーヾ㄁ㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂ꒎ꓒ꓿ꔂ꘎ꘒ꘭Ꙃ꙱ꙶꙿꚁ꛳ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹ꠩ꡂ꡵ꢂ꣇꣒꣛꣢꣹ꣽꣽꣿꣿ꤂꤯ꤲ꥕ꥢ꥾ꦂ꧂꧑꧛ꧢꨀꨂ꨸ꩂ꩏꩒꩛ꩢ꩸ꩼ꫄ꫝ꫟ꫢ꫱ꫴ꫸ꬃ꬈ꬋ꬐ꬓ꬘ꬢꬨꬪꬰꬲꭜꭞꭧꭲ꯬꯮꯯꯲꯻갂힥ힲ퟈ퟍ퟽車﩯全﫛fl﬈ﬕ﬙ײַשׁשּׁטּךּמּנּנּ﭂ףּ﭅צּרּ﮳ﯕ﴿ﵒ﶑ﶔ﷉ﷲ﷽︂︑︢︱︵︶﹏﹑ﹲﹶﹸ﻾!!2;C\aac|ィ￀ᅣ￉ᅩ￑ᅯ￙ᅵ￞�\r(*<>?AOR_‚üłŶǿǿʂʞʢ˒ˢˢ̡̲̂͌͒ͼ΂Ο΢υϊϑϓϗЂҟҢҫҲӕӚӽԂԩԲե؂ܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠ࣢ࣶࣴࣷंगढऻংহীুਂਅਇਈ਎ਕਗਙਛਵ਺਼ੁੁ੢੾ંઞૂૉો૨ଂଷୂୗୢ୴ஂஓంొಂ಴ೂ೴ဂ၈ၨၱႁႼႿႿგცჲ჻ᄂᄶᄸᅁᅒᅵᅸᅸᆂᇆᇌᇎᇒᇜᇞᇞሂሓሕሹቀቀኂኈኊኊኌ኏ኑኟኡኪኲዬዲዻጂጅጇጎ጑ጒጕጪጬጲጴጵጷጻጾፆፉፊፍፏፒፒፙፙ፟፥፨፮፲፶ᐂᑌᑒᑛᒂᓇᓉᓉᓒᓛᖂᖷᖺᗂᗚᗟᘂᙂᙆᙆᙒᙛᚂᚹᛂᛋᜂ᜛ᜟᜭᜲ᜻ᢢᣫᤁᤁ᫂᫺ᰂᰊᰌ᰸᰺᱂᱒ᱛᱴᲑᲔᲩᲫᲸ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠橢橫櫒櫯櫲櫶欂欸歂歅歒歛步歹歿殑漂潆潒澀澑澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛벟베벢벥텧텫텯톄톇톍톬톯퉄퉆퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌힪힬ퟄퟆퟍퟐ\uD801\uDA02\uDA38\uDA3D\uDA6E\uDA77\uDA77\uDA86\uDA86\uDA9D\uDAA1\uDAA3\uDAB1ꛘ꜂뜶띂렟렢캣﨟"ĂDZɀC\\c|¬¬··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰ͲͶ͸͹ͼͿ΁΁ΈΈΊΌΎΎΐΣΥϷϹ҃ҌԱԳ՘՛՛գ։ג׬ײ״آٌٰٱٳەۗۗۧۨ۰۱ۼ۾܁܁ܒܒܔܱݏާ޳޳ߌ߬߶߷߼߼ࠂࠗࠜࠜࠦࠦࠪࠪࡂ࡚ࢢࢶࢸࢿआऻिि॒॒ग़ॣॳংই঎঑঒কপবল঴঴স঻িি৐৐৞য়ৡৣ৲৳ਇ਌਑਒ਕਪਬਲ਴ਵ਷ਸ਺਻ਜ਼ਫ਼੠੠ੴ੶ઇએઑઓકપબલ઴વષ઻િિ૒૒ૢૣૻૻଇ଎଑଒କପବଲ଴ଵଷ଻ିି୞ୟୡୣ୳୳அஅஇ஌ஐஒஔ஗஛ஜஞஞ஠஡஥஦ப஬ர஻௒௒ఇఎఐఒఔపబ఻ిిౚ౜ౢౣಂಂಇಎಐಒಔಪಬವಷ಻ಿಿೠೠೢೣೳ೴ഇഎഐഒഔ഼ിി൐൐ൖ൘ൡൣർඁඇ඘ගඳඵල඿඿ෂ෈ฃาิีโ่຃ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯາິີ຿຿ໂໆ່່ໞ໡༂༂གཉཋ཮ྊྎဂာ၁၁ၒၗၜၟၣၣၧၨၰၲၷႃ႐႐ႢჇ჉჉჏჏გჼჾቊቌ቏ቒቘቚቚቜ቟ቢኊኌ኏ኒኲኴ኷ኺዀዂዂዄ዇ዊዘዚጒጔ጗ጚ፜ᎂ᎑Ꭲ᏷ᏺ᏿ᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰ᛺ᜂᜎᜐᜓᜢᜳᝂᝓᝢᝮᝰᝲគ឵៙៙៞៞ᠢ᡹ᢂᢆᢉᢪ᢬᢬ᢲ᣷ᤂᤠᥒ᥯ᥲ᥶ᦂ᦭ᦲ᧋ᨂᨘᨢᩖ᪩᪩ᬈᭇ᭍ᮅᮢ᮰᮱ᮼᯧᰂᰥᱏ᱑ᱜ᱿ᲂᲊᳫᳮᳰᳳ᳷᳸ᴂ᷁Ḃ἗Ἒ἟ἢ὇Ὂ὏ὒὙὛὛὝὝὟὟὡ὿ᾂᾶᾸι῀῀ῄῆῈ῎ῒ῕Ῐ῝ῢ΅ῴῶῸ῾⁳⁳₁₁ₒ₞℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮ⳰⳴⳵ⴂⴧ⴩⴩⴯⴯ⴲ⵩⵱⵱ⶂ⶘ⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠ⸱⸱〇〉〣〫〳〷〺〾ぃ゘ゟァィーヾ㄁ㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂ꒎ꓒ꓿ꔂ꘎ꘒ꘡꘬꘭Ꙃ꙰ꚁꚟꚢ꛱ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹꠃꠅꠇꠉꠌꠎꠤꡂ꡵ꢄꢵꣴ꣹ꣽꣽꣿꣿꤌꤧꤲꥈꥢ꥾ꦆꦴ꧑꧑ꧢꧦꧨ꧱ꧼꨀꨂꨪꩂꩄꩆꩍꩢ꩸ꩼꩼꪀꪱꪳꪳꪷꪸꪻ꪿ꫂꫂ꫄꫄ꫝ꫟ꫢꫬꫴ꫶ꬃ꬈ꬋ꬐ꬓ꬘ꬢꬨꬪꬰꬲꭜꭞꭧꭲꯤ갂힥ힲ퟈ퟍ퟽車﩯全﫛fl﬈ﬕ﬙ײַײַﬡשׁשּׁטּךּמּנּנּ﭂ףּ﭅צּרּ﮳ﯕ﴿ﵒ﶑ﶔ﷉ﷲ﷽ﹲﹶﹸ﻾C\c|ィ￀ᅣ￉ᅩ￑ᅯ￙ᅵ￞\r(*<>?AOR_‚üłŶʂʞʢ˒̡̲̂͌͒ͷ΂Ο΢υϊϑϓϗЂҟҲӕӚӽԂԩԲե؂ܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠ࣢ࣶࣴࣷंगढऻংহীুਂਂ਒ਕਗਙਛਵ੢੾ંઞૂૉો૦ଂଷୂୗୢ୴ஂஓంొಂ಴ೂ೴စ္ႅႱგცᄅᄨᅒᅴᅸᅸᆅᆴᇃᇆᇜᇜᇞᇞሂሓሕርኂኈኊኊኌ኏ኑኟኡኪኲዠጇጎ጑ጒጕጪጬጲጴጵጷጻጿጿፒፒ፟፣ᐂᐶᑉᑌᒂᒱᓆᓇᓉᓉᖂᖰᗚᗝᘂᘱᙆᙆᚂᚬᜂ᜛ᢢᣡᤁᤁ᫂᫺ᰂᰊᰌᰰ᱂᱂ᱴᲑ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠櫒櫯欂欱歂歅步歹歿殑漂潆潒潒澕澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈`,u._serializedATNSegment1=`핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌힪힬ퟄퟆퟍꛘ꜂뜶띂렟렢캣﨟1\x07 \v\x07 \v\r%')\x071\x071\x071\x07,\b\x1B\x07#\x1B
427
-  \b\r\x07"  !!#" #$\b$\f%& &'( ()-\x07)*,\v+*,/-.-+.0/-01\x07)1 -`,u._serializedATN=h.join([u._serializedATNSegment0,u._serializedATNSegment1],""),di}var An={},cf;function fx(){if(cf)return An;cf=1;/*!
423
+ */var a=An&&An.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(An,"__esModule",{value:!0}),An.TagChunk=void 0;const d=Fp(),y=pe();let m=class extends d.Chunk{constructor(u,r){if(super(),u==null||u.length===0)throw new Error("tag cannot be null or empty");this._tag=u,this._label=r}get tag(){return this._tag}get label(){return this._label}toString(){return this._label!=null?this._label+":"+this._tag:this._tag}};return a([y.NotNull],m.prototype,"tag",null),a([y.Override],m.prototype,"toString",null),An.TagChunk=m,An}var Kt={},lf;function ux(){if(lf)return Kt;lf=1;/*!
424
+ * Copyright 2016 The ANTLR Project. All rights reserved.
425
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
426
+ */var a=Kt&&Kt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Kt&&Kt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.TextChunk=void 0;const y=Fp(),m=pe();let h=class extends y.Chunk{constructor(r){if(super(),r==null)throw new Error("text cannot be null");this._text=r}get text(){return this._text}toString(){return"'"+this._text+"'"}};return a([m.NotNull],h.prototype,"_text",void 0),a([m.NotNull],h.prototype,"text",null),a([m.Override],h.prototype,"toString",null),h=a([d(0,m.NotNull)],h),Kt.TextChunk=h,Kt}var Jt={},cf;function lx(){if(cf)return Jt;cf=1;/*!
428
427
  * Copyright 2016 The ANTLR Project. All rights reserved.
429
428
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
430
- */var a=An&&An.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(An,"__esModule",{value:!0}),An.XPathLexerErrorListener=void 0;const d=pe();let y=class{syntaxError(h,u,r,o,t,i){}};return a([d.Override],y.prototype,"syntaxError",null),An.XPathLexerErrorListener=y,An}var vn={},En={},ff;function Wn(){if(ff)return En;ff=1;/*!
429
+ */var a=Jt&&Jt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Jt&&Jt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.TokenTagToken=void 0;const y=ki(),m=pe();let h=class extends y.CommonToken{constructor(r,o,t){super(o),this._tokenName=r,this._label=t}get tokenName(){return this._tokenName}get label(){return this._label}get text(){return this._label!=null?"<"+this._label+":"+this._tokenName+">":"<"+this._tokenName+">"}toString(){return this._tokenName+":"+this.type}};return a([m.NotNull],h.prototype,"_tokenName",void 0),a([m.NotNull],h.prototype,"tokenName",null),a([m.Override],h.prototype,"text",null),a([m.Override],h.prototype,"toString",null),h=a([d(0,m.NotNull)],h),Jt.TokenTagToken=h,Jt}var ff;function cx(){return ff||(ff=1,(function(a){/*!
431
430
  * Copyright 2016 The ANTLR Project. All rights reserved.
432
431
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
433
- */var a=En&&En.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(En,"__esModule",{value:!0}),En.XPathElement=void 0;const d=pe();let y=class{constructor(h){this.nodeName=h,this.invert=!1}toString(){let h=this.invert?"!":"";return Object.constructor.name+"["+h+this.nodeName+"]"}};return a([d.Override],y.prototype,"toString",null),En.XPathElement=y,En}var pf;function px(){if(pf)return vn;pf=1;/*!
432
+ */var d=sn&&sn.__decorate||function(w,P,j,W){var L=arguments.length,$=L<3?P:W===null?W=Object.getOwnPropertyDescriptor(P,j):W,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(w,P,j,W);else for(var ee=w.length-1;ee>=0;ee--)(Q=w[ee])&&($=(L<3?Q($):L>3?Q(P,j,$):Q(P,j))||$);return L>3&&$&&Object.defineProperty(P,j,$),$},y=sn&&sn.__param||function(w,P){return function(j,W){P(j,W,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ParseTreePatternMatcher=void 0;const m=Ep(),h=Pa(),u=Fa(),r=Cp(),o=Qh(),t=pe(),i=vp(),e=Rp(),s=st(),l=Xh(),c=ox(),p=Sr(),v=Pi(),x=sx(),g=ax(),_=_r(),A=ux(),E=Ie(),N=lx();let b=class fa{constructor(P,j){this.start="<",this.stop=">",this.escape="\\",this.escapeRE=/\\/g,this._lexer=P,this._parser=j}setDelimiters(P,j,W){if(!P)throw new Error("start cannot be null or empty");if(!j)throw new Error("stop cannot be null or empty");this.start=P,this.stop=j,this.escape=W,this.escapeRE=new RegExp(W.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g")}matches(P,j,W=0){if(typeof j=="string"){let L=this.compile(j,W);return this.matches(P,L)}else{let L=new o.MultiMap;return!this.matchImpl(P,j.patternTree,L)}}match(P,j,W=0){if(typeof j=="string"){let L=this.compile(j,W);return this.match(P,L)}else{let L=new o.MultiMap,$=this.matchImpl(P,j.patternTree,L);return new l.ParseTreeMatch(P,j,L,$)}}compile(P,j){let W=this.tokenize(P),L=new r.ListTokenSource(W),$=new u.CommonTokenStream(L);const Q=this._parser;let ee=new e.ParserInterpreter(Q.grammarFileName,Q.vocabulary,Q.ruleNames,Q.getATNWithBypassAlts(),$),I;try{ee.errorHandler=new m.BailErrorStrategy,I=ee.parse(j)}catch(X){throw X instanceof i.ParseCancellationException?X.getCause():X instanceof p.RecognitionException?X:X instanceof Error?new fa.CannotInvokeStartRule(X):X}if($.LA(1)!==E.Token.EOF)throw new fa.StartRuleDoesNotConsumeFullPattern;return new c.ParseTreePattern(this,P,j,I)}get lexer(){return this._lexer}get parser(){return this._parser}matchImpl(P,j,W){if(!P)throw new TypeError("tree cannot be null");if(!j)throw new TypeError("patternTree cannot be null");if(P instanceof _.TerminalNode&&j instanceof _.TerminalNode){let L;if(P.symbol.type===j.symbol.type)if(j.symbol instanceof N.TokenTagToken){let $=j.symbol;W.map($.tokenName,P);const Q=$.label;Q&&W.map(Q,P)}else P.text===j.text||L||(L=P);else L||(L=P);return L}if(P instanceof s.ParserRuleContext&&j instanceof s.ParserRuleContext){let L,$=this.getRuleTagToken(j);if($){if(P.ruleContext.ruleIndex===j.ruleContext.ruleIndex){W.map($.ruleName,P);const ee=$.label;ee&&W.map(ee,P)}else L||(L=P);return L}if(P.childCount!==j.childCount)return L||(L=P),L;let Q=P.childCount;for(let ee=0;ee<Q;ee++){let I=this.matchImpl(P.getChild(ee),j.getChild(ee),W);if(I)return I}return L}return P}getRuleTagToken(P){if(P instanceof v.RuleNode&&P.childCount===1&&P.getChild(0)instanceof _.TerminalNode){let j=P.getChild(0);if(j.symbol instanceof x.RuleTagToken)return j.symbol}}tokenize(P){let j=this.split(P),W=[];for(let L of j)if(L instanceof g.TagChunk){let $=L;const Q=$.tag.substr(0,1);if(Q===Q.toUpperCase()){let ee=this._parser.getTokenType($.tag);if(ee===E.Token.INVALID_TYPE)throw new Error("Unknown token "+$.tag+" in pattern: "+P);let I=new N.TokenTagToken($.tag,ee,$.label);W.push(I)}else if(Q===Q.toLowerCase()){let ee=this._parser.getRuleIndex($.tag);if(ee===-1)throw new Error("Unknown rule "+$.tag+" in pattern: "+P);let I=this._parser.getATNWithBypassAlts().ruleToTokenType[ee];W.push(new x.RuleTagToken($.tag,I,$.label))}else throw new Error("invalid tag: "+$.tag+" in pattern: "+P)}else{let $=L;this._lexer.inputStream=h.CharStreams.fromString($.text);let Q=this._lexer.nextToken();for(;Q.type!==E.Token.EOF;)W.push(Q),Q=this._lexer.nextToken()}return W}split(P){let j=0,W=P.length,L=[],$=[],Q=[];for(;j<W;)j===P.indexOf(this.escape+this.start,j)?j+=this.escape.length+this.start.length:j===P.indexOf(this.escape+this.stop,j)?j+=this.escape.length+this.stop.length:j===P.indexOf(this.start,j)?($.push(j),j+=this.start.length):j===P.indexOf(this.stop,j)?(Q.push(j),j+=this.stop.length):j++;if($.length>Q.length)throw new Error("unterminated tag in pattern: "+P);if($.length<Q.length)throw new Error("missing start tag in pattern: "+P);let ee=$.length;for(let I=0;I<ee;I++)if($[I]>=Q[I])throw new Error("tag delimiters out of order in pattern: "+P);if(ee===0){let I=P.substring(0,W);L.push(new A.TextChunk(I))}if(ee>0&&$[0]>0){let I=P.substring(0,$[0]);L.push(new A.TextChunk(I))}for(let I=0;I<ee;I++){let X=P.substring($[I]+this.start.length,Q[I]),ie=X,ce,oe=X.indexOf(":");if(oe>=0&&(ce=X.substring(0,oe),ie=X.substring(oe+1,X.length)),L.push(new g.TagChunk(ie,ce)),I+1<ee){let te=P.substring(Q[I]+this.stop.length,$[I+1]);L.push(new A.TextChunk(te))}}if(ee>0){let I=Q[ee-1]+this.stop.length;if(I<W){let X=P.substring(I,W);L.push(new A.TextChunk(X))}}for(let I=0;I<L.length;I++){let X=L[I];if(X instanceof A.TextChunk){let ie=X.text.replace(this.escapeRE,"");ie.length<X.text.length&&(L[I]=new A.TextChunk(ie))}}return L}};d([t.NotNull,y(1,t.NotNull)],b.prototype,"match",null),d([t.NotNull],b.prototype,"lexer",null),d([t.NotNull],b.prototype,"parser",null),d([y(0,t.NotNull),y(1,t.NotNull),y(2,t.NotNull)],b.prototype,"matchImpl",null),a.ParseTreePatternMatcher=b,(function(w){class P extends Error{constructor(L){super(`CannotInvokeStartRule: ${L}`),this.error=L}}w.CannotInvokeStartRule=P;class j extends Error{constructor(){super("StartRuleDoesNotConsumeFullPattern")}}w.StartRuleDoesNotConsumeFullPattern=j})(b=a.ParseTreePatternMatcher||(a.ParseTreePatternMatcher={}))})(sn)),sn}var Zt={},er={},tr={},pf;function qi(){if(pf)return tr;pf=1;/*!
434
433
  * Copyright 2016 The ANTLR Project. All rights reserved.
435
434
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
436
- */var a=vn&&vn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(vn,"__esModule",{value:!0}),vn.XPathRuleAnywhereElement=void 0;const d=pe(),y=Nr(),m=Wn();let h=class extends m.XPathElement{constructor(r,o){super(r),this.ruleIndex=o}evaluate(r){return y.Trees.findAllRuleNodes(r,this.ruleIndex)}};return a([d.Override],h.prototype,"evaluate",null),vn.XPathRuleAnywhereElement=h,vn}var Sn={},hf;function hx(){if(hf)return Sn;hf=1;/*!
435
+ */var a=tr&&tr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=tr&&tr.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.DecisionEventInfo=void 0;const y=pe();let m=class{constructor(u,r,o,t,i,e){this.decision=u,this.fullCtx=e,this.stopIndex=i,this.input=o,this.startIndex=t,this.state=r}};return a([y.NotNull],m.prototype,"input",void 0),m=a([d(2,y.NotNull)],m),tr.DecisionEventInfo=m,tr}var hf;function fx(){if(hf)return er;hf=1;/*!
437
436
  * Copyright 2016 The ANTLR Project. All rights reserved.
438
437
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
439
- */var a=Sn&&Sn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.XPathRuleElement=void 0;const d=st(),y=pe(),m=Nr(),h=Wn();let u=class extends h.XPathElement{constructor(o,t){super(o),this.ruleIndex=t}evaluate(o){let t=[];for(let i of m.Trees.getChildren(o))i instanceof d.ParserRuleContext&&(i.ruleIndex===this.ruleIndex&&!this.invert||i.ruleIndex!==this.ruleIndex&&this.invert)&&t.push(i);return t}};return a([y.Override],u.prototype,"evaluate",null),Sn.XPathRuleElement=u,Sn}var Tn={},xf;function xx(){if(xf)return Tn;xf=1;/*!
438
+ */var a=er&&er.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=er&&er.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(er,"__esModule",{value:!0}),er.AmbiguityInfo=void 0;const y=qi(),m=pe();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e,s){super(r,o,i,e,s,o.useContext),this.ambigAlts=t}get ambiguousAlternatives(){return this.ambigAlts}};return a([m.NotNull],h.prototype,"ambigAlts",void 0),a([m.NotNull],h.prototype,"ambiguousAlternatives",null),h=a([d(1,m.NotNull),d(2,m.NotNull),d(3,m.NotNull)],h),er.AmbiguityInfo=h,er}var rr={},xf;function px(){if(xf)return rr;xf=1;/*!
440
439
  * Copyright 2016 The ANTLR Project. All rights reserved.
441
440
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
442
- */var a=Tn&&Tn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.XPathTokenAnywhereElement=void 0;const d=pe(),y=Nr(),m=Wn();let h=class extends m.XPathElement{constructor(r,o){super(r),this.tokenType=o}evaluate(r){return y.Trees.findAllTokenNodes(r,this.tokenType)}};return a([d.Override],h.prototype,"evaluate",null),Tn.XPathTokenAnywhereElement=h,Tn}var bn={},df;function dx(){if(df)return bn;df=1;/*!
441
+ */var a=rr&&rr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=rr&&rr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(rr,"__esModule",{value:!0}),rr.ContextSensitivityInfo=void 0;const y=qi(),m=pe();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e){super(r,o,t,i,e,!0)}};return h=a([d(1,m.NotNull),d(2,m.NotNull)],h),rr.ContextSensitivityInfo=h,rr}var vn={},df;function hx(){if(df)return vn;df=1;/*!
443
442
  * Copyright 2016 The ANTLR Project. All rights reserved.
444
443
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
445
- */var a=bn&&bn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(bn,"__esModule",{value:!0}),bn.XPathTokenElement=void 0;const d=pe(),y=_r(),m=Nr(),h=Wn();let u=class extends h.XPathElement{constructor(o,t){super(o),this.tokenType=t}evaluate(o){let t=[];for(let i of m.Trees.getChildren(o))i instanceof y.TerminalNode&&(i.symbol.type===this.tokenType&&!this.invert||i.symbol.type!==this.tokenType&&this.invert)&&t.push(i);return t}};return a([d.Override],u.prototype,"evaluate",null),bn.XPathTokenElement=u,bn}var Nn={},mf;function mx(){if(mf)return Nn;mf=1;/*!
444
+ */var a=vn&&vn.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(vn,"__esModule",{value:!0}),vn.DecisionInfo=void 0;const d=pe();let y=class{constructor(h){this.invocations=0,this.timeInPrediction=0,this.SLL_TotalLook=0,this.SLL_MinLook=0,this.SLL_MaxLook=0,this.LL_TotalLook=0,this.LL_MinLook=0,this.LL_MaxLook=0,this.contextSensitivities=[],this.errors=[],this.ambiguities=[],this.predicateEvals=[],this.SLL_ATNTransitions=0,this.SLL_DFATransitions=0,this.LL_Fallback=0,this.LL_ATNTransitions=0,this.LL_DFATransitions=0,this.decision=h}toString(){return"{decision="+this.decision+", contextSensitivities="+this.contextSensitivities.length+", errors="+this.errors.length+", ambiguities="+this.ambiguities.length+", SLL_lookahead="+this.SLL_TotalLook+", SLL_ATNTransitions="+this.SLL_ATNTransitions+", SLL_DFATransitions="+this.SLL_DFATransitions+", LL_Fallback="+this.LL_Fallback+", LL_lookahead="+this.LL_TotalLook+", LL_ATNTransitions="+this.LL_ATNTransitions+"}"}};return a([d.Override],y.prototype,"toString",null),vn.DecisionInfo=y,vn}var nr={},mf;function xx(){if(mf)return nr;mf=1;/*!
446
445
  * Copyright 2016 The ANTLR Project. All rights reserved.
447
446
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
448
- */var a=Nn&&Nn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.XPathWildcardAnywhereElement=void 0;const d=pe(),y=Nr(),m=Fa(),h=Wn();let u=class extends h.XPathElement{constructor(){super(m.XPath.WILDCARD)}evaluate(o){return this.invert?[]:y.Trees.getDescendants(o)}};return a([d.Override],u.prototype,"evaluate",null),Nn.XPathWildcardAnywhereElement=u,Nn}var Cn={},yf;function yx(){if(yf)return Cn;yf=1;/*!
447
+ */var a=nr&&nr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=nr&&nr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.ErrorInfo=void 0;const y=qi(),m=pe();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e){super(r,o,t,i,e,o.useContext)}};return h=a([d(1,m.NotNull),d(2,m.NotNull)],h),nr.ErrorInfo=h,nr}var ir={},yf;function dx(){if(yf)return ir;yf=1;/*!
449
448
  * Copyright 2016 The ANTLR Project. All rights reserved.
450
449
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
451
- */var a=Cn&&Cn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.XPathWildcardElement=void 0;const d=pe(),y=Nr(),m=Fa(),h=Wn();let u=class extends h.XPathElement{constructor(){super(m.XPath.WILDCARD)}evaluate(o){let t=[];if(this.invert)return t;for(let i of y.Trees.getChildren(o))t.push(i);return t}};return a([d.Override],u.prototype,"evaluate",null),Cn.XPathWildcardElement=u,Cn}var gf;function Fa(){if(gf)return xi;gf=1;/*!
450
+ */var a=ir&&ir.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=ir&&ir.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(ir,"__esModule",{value:!0}),ir.LookaheadEventInfo=void 0;const y=qi(),m=pe();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e,s,l){super(r,o,i,e,s,l),this.predictedAlt=t}};return h=a([d(3,m.NotNull)],h),ir.LookaheadEventInfo=h,ir}var sr={},gf;function mx(){if(gf)return sr;gf=1;/*!
452
451
  * Copyright 2016 The ANTLR Project. All rights reserved.
453
452
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
454
- */Object.defineProperty(xi,"__esModule",{value:!0}),xi.XPath=void 0;const a=Ra(),d=Pa(),y=lo(),m=st(),h=Ie(),u=cx(),r=fx(),o=px(),t=hx(),i=xx(),e=dx(),s=mx(),l=yx();let c=class Pp{constructor(v,x){this.parser=v,this.path=x,this.elements=this.split(x)}split(v){let x=new u.XPathLexer(a.CharStreams.fromString(v));x.recover=b=>{throw b},x.removeErrorListeners(),x.addErrorListener(new r.XPathLexerErrorListener);let g=new d.CommonTokenStream(x);try{g.fill()}catch(b){if(b instanceof y.LexerNoViableAltException){let P="Invalid tokens or characters at index "+x.charPositionInLine+" in path '"+v+"' -- "+b.message;throw new RangeError(P)}throw b}let _=g.getTokens(),A=[],E=_.length,N=0;e:for(;N<E;){let b=_[N],w;switch(b.type){case u.XPathLexer.ROOT:case u.XPathLexer.ANYWHERE:let P=b.type===u.XPathLexer.ANYWHERE;N++,w=_[N];let j=w.type===u.XPathLexer.BANG;j&&(N++,w=_[N]);let W=this.getXPathElement(w,P);W.invert=j,A.push(W),N++;break;case u.XPathLexer.TOKEN_REF:case u.XPathLexer.RULE_REF:case u.XPathLexer.WILDCARD:A.push(this.getXPathElement(b,!1)),N++;break;case h.Token.EOF:break e;default:throw new Error("Unknowth path element "+b)}}return A}getXPathElement(v,x){if(v.type===h.Token.EOF)throw new Error("Missing path element at end of path");let g=v.text;if(g==null)throw new Error("Expected wordToken to have text content.");let _=this.parser.getTokenType(g),A=this.parser.getRuleIndex(g);switch(v.type){case u.XPathLexer.WILDCARD:return x?new s.XPathWildcardAnywhereElement:new l.XPathWildcardElement;case u.XPathLexer.TOKEN_REF:case u.XPathLexer.STRING:if(_===h.Token.INVALID_TYPE)throw new Error(g+" at index "+v.startIndex+" isn't a valid token name");return x?new i.XPathTokenAnywhereElement(g,_):new e.XPathTokenElement(g,_);default:if(A===-1)throw new Error(g+" at index "+v.startIndex+" isn't a valid rule name");return x?new o.XPathRuleAnywhereElement(g,A):new t.XPathRuleElement(g,A)}}static findAll(v,x,g){return new Pp(g,x).evaluate(v)}evaluate(v){let x=new m.ParserRuleContext;x.addChild(v);let g=new Set([x]),_=0;for(;_<this.elements.length;){let A=new Set;for(let E of g)E.childCount>0&&this.elements[_].evaluate(E).forEach(A.add,A);_++,g=A}return g}};return xi.XPath=c,c.WILDCARD="*",c.NOT="!",xi}var _f;function gx(){if(_f)return Jt;_f=1;/*!
453
+ */var a=sr&&sr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=sr&&sr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.PredicateEvalInfo=void 0;const y=qi(),m=pe();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e,s,l,c){super(o,r,t,i,e,r.useContext),this.semctx=s,this.evalResult=l,this.predictedAlt=c}};return h=a([d(0,m.NotNull),d(2,m.NotNull),d(5,m.NotNull)],h),sr.PredicateEvalInfo=h,sr}var ar={},_f;function Ip(){if(_f)return ar;_f=1;/*!
455
454
  * Copyright 2016 The ANTLR Project. All rights reserved.
456
455
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
457
- */var a=Jt&&Jt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Jt&&Jt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.ParseTreePattern=void 0;const y=pe(),m=Fa();let h=class{constructor(r,o,t,i){this._matcher=r,this._patternRuleIndex=t,this._pattern=o,this._patternTree=i}match(r){return this._matcher.match(r,this)}matches(r){return this._matcher.match(r,this).succeeded}findAll(r,o){let t=m.XPath.findAll(r,o,this._matcher.parser),i=[];for(let e of t){let s=this.match(e);s.succeeded&&i.push(s)}return i}get matcher(){return this._matcher}get pattern(){return this._pattern}get patternRuleIndex(){return this._patternRuleIndex}get patternTree(){return this._patternTree}};return a([y.NotNull],h.prototype,"_pattern",void 0),a([y.NotNull],h.prototype,"_patternTree",void 0),a([y.NotNull],h.prototype,"_matcher",void 0),a([y.NotNull,d(0,y.NotNull)],h.prototype,"match",null),a([d(0,y.NotNull)],h.prototype,"matches",null),a([y.NotNull,d(0,y.NotNull),d(1,y.NotNull)],h.prototype,"findAll",null),a([y.NotNull],h.prototype,"matcher",null),a([y.NotNull],h.prototype,"pattern",null),a([y.NotNull],h.prototype,"patternTree",null),h=a([d(0,y.NotNull),d(1,y.NotNull),d(3,y.NotNull)],h),Jt.ParseTreePattern=h,Jt}var Zt={},Af;function _x(){if(Af)return Zt;Af=1;/*!
456
+ */var a=ar&&ar.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=ar&&ar.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(ar,"__esModule",{value:!0}),ar.SimulatorState=void 0;const y=pe(),m=st();let h=class{constructor(r,o,t,i){this.outerContext=r??m.ParserRuleContext.emptyContext(),this.s0=o,this.useContext=t,this.remainingOuterContext=i}};return h=a([d(1,y.NotNull)],h),ar.SimulatorState=h,ar}var Af;function vf(){if(Af)return Zt;Af=1;/*!
458
457
  * Copyright 2016 The ANTLR Project. All rights reserved.
459
458
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
460
- */var a=Zt&&Zt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Zt&&Zt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.RuleTagToken=void 0;const y=pe(),m=Ie();let h=class{constructor(r,o,t){if(r==null||r.length===0)throw new Error("ruleName cannot be null or empty.");this._ruleName=r,this.bypassTokenType=o,this._label=t}get ruleName(){return this._ruleName}get label(){return this._label}get channel(){return m.Token.DEFAULT_CHANNEL}get text(){return this._label!=null?"<"+this._label+":"+this._ruleName+">":"<"+this._ruleName+">"}get type(){return this.bypassTokenType}get line(){return 0}get charPositionInLine(){return-1}get tokenIndex(){return-1}get startIndex(){return-1}get stopIndex(){return-1}get tokenSource(){}get inputStream(){}toString(){return this._ruleName+":"+this.bypassTokenType}};return a([y.NotNull],h.prototype,"ruleName",null),a([y.Override],h.prototype,"channel",null),a([y.Override],h.prototype,"text",null),a([y.Override],h.prototype,"type",null),a([y.Override],h.prototype,"line",null),a([y.Override],h.prototype,"charPositionInLine",null),a([y.Override],h.prototype,"tokenIndex",null),a([y.Override],h.prototype,"startIndex",null),a([y.Override],h.prototype,"stopIndex",null),a([y.Override],h.prototype,"tokenSource",null),a([y.Override],h.prototype,"inputStream",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),Zt.RuleTagToken=h,Zt}var On={},mi={},vf;function Fp(){if(vf)return mi;vf=1;/*!
459
+ */var a=Zt&&Zt.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var b=v.length-1;b>=0;b--)(N=v[b])&&(E=(A<3?N(E):A>3?N(x,g,E):N(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},d=Zt&&Zt.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.ProfilingATNSimulator=void 0;const y=fx(),m=lt(),h=so(),u=px(),r=hx(),o=xx(),t=pe(),i=dx(),e=$i(),s=mx(),l=Yn(),c=Ip();let p=class extends e.ParserATNSimulator{constructor(x){super(x.interpreter.atn,x),this._startIndex=0,this._sllStopIndex=0,this._llStopIndex=0,this.currentDecision=0,this.conflictingAltResolvedBySLL=0,this.optimize_ll1=!1,this.reportAmbiguities=!0,this.numDecisions=this.atn.decisionToState.length,this.decisions=[];for(let g=0;g<this.numDecisions;g++)this.decisions.push(new r.DecisionInfo(g))}adaptivePredict(x,g,_,A){if(A!==void 0)return super.adaptivePredict(x,g,_,A);try{this._input=x,this._startIndex=x.index,this._sllStopIndex=this._startIndex-1,this._llStopIndex=-1,this.currentDecision=g,this.currentState=void 0,this.conflictingAltResolvedBySLL=m.ATN.INVALID_ALT_NUMBER;let E=process.hrtime(),N=super.adaptivePredict(x,g,_),b=process.hrtime(),w=(b[0]-E[0])*1e9;w===0?w=b[1]-E[1]:w+=1e9-E[1]+b[1],this.decisions[g].timeInPrediction+=w,this.decisions[g].invocations++;let P=this._sllStopIndex-this._startIndex+1;if(this.decisions[g].SLL_TotalLook+=P,this.decisions[g].SLL_MinLook=this.decisions[g].SLL_MinLook===0?P:Math.min(this.decisions[g].SLL_MinLook,P),P>this.decisions[g].SLL_MaxLook&&(this.decisions[g].SLL_MaxLook=P,this.decisions[g].SLL_MaxLookEvent=new i.LookaheadEventInfo(g,void 0,N,x,this._startIndex,this._sllStopIndex,!1)),this._llStopIndex>=0){let j=this._llStopIndex-this._startIndex+1;this.decisions[g].LL_TotalLook+=j,this.decisions[g].LL_MinLook=this.decisions[g].LL_MinLook===0?j:Math.min(this.decisions[g].LL_MinLook,j),j>this.decisions[g].LL_MaxLook&&(this.decisions[g].LL_MaxLook=j,this.decisions[g].LL_MaxLookEvent=new i.LookaheadEventInfo(g,void 0,N,x,this._startIndex,this._llStopIndex,!0))}return N}finally{this._input=void 0,this.currentDecision=-1}}getStartState(x,g,_,A){let E=super.getStartState(x,g,_,A);return this.currentState=E,E}computeStartState(x,g,_){let A=super.computeStartState(x,g,_);return this.currentState=A,A}computeReachSet(x,g,_,A){if(this._input===void 0)throw new Error("Invalid state");let E=super.computeReachSet(x,g,_,A);return E==null&&this.decisions[this.currentDecision].errors.push(new o.ErrorInfo(this.currentDecision,g,this._input,this._startIndex,this._input.index)),this.currentState=E,E}getExistingTargetState(x,g){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");this.currentState.useContext?this._llStopIndex=this._input.index:this._sllStopIndex=this._input.index;let _=super.getExistingTargetState(x,g);if(_!=null&&(this.currentState=new c.SimulatorState(this.currentState.outerContext,_,this.currentState.useContext,this.currentState.remainingOuterContext),this.currentState.useContext?this.decisions[this.currentDecision].LL_DFATransitions++:this.decisions[this.currentDecision].SLL_DFATransitions++,_===h.ATNSimulator.ERROR)){let A=new c.SimulatorState(this.currentState.outerContext,x,this.currentState.useContext,this.currentState.remainingOuterContext);this.decisions[this.currentDecision].errors.push(new o.ErrorInfo(this.currentDecision,A,this._input,this._startIndex,this._input.index))}return _}computeTargetState(x,g,_,A,E,N){let b=super.computeTargetState(x,g,_,A,E,N);return E?this.decisions[this.currentDecision].LL_ATNTransitions++:this.decisions[this.currentDecision].SLL_ATNTransitions++,b}evalSemanticContextImpl(x,g,_){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let A=super.evalSemanticContextImpl(x,g,_);if(!(x instanceof l.SemanticContext.PrecedencePredicate)){let N=this._llStopIndex>=0?this._llStopIndex:this._sllStopIndex;this.decisions[this.currentDecision].predicateEvals.push(new s.PredicateEvalInfo(this.currentState,this.currentDecision,this._input,this._startIndex,N,x,A,_))}return A}reportContextSensitivity(x,g,_,A,E){if(this._input===void 0)throw new Error("Invalid state");g!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new u.ContextSensitivityInfo(this.currentDecision,_,this._input,A,E)),super.reportContextSensitivity(x,g,_,A,E)}reportAttemptingFullContext(x,g,_,A,E){g!=null?this.conflictingAltResolvedBySLL=g.nextSetBit(0):this.conflictingAltResolvedBySLL=_.s0.configs.getRepresentedAlternatives().nextSetBit(0),this.decisions[this.currentDecision].LL_Fallback++,super.reportAttemptingFullContext(x,g,_,A,E)}reportAmbiguity(x,g,_,A,E,N,b){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let w;N!=null?w=N.nextSetBit(0):w=b.getRepresentedAlternatives().nextSetBit(0),this.conflictingAltResolvedBySLL!==m.ATN.INVALID_ALT_NUMBER&&w!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new u.ContextSensitivityInfo(this.currentDecision,this.currentState,this._input,_,A)),this.decisions[this.currentDecision].ambiguities.push(new y.AmbiguityInfo(this.currentDecision,this.currentState,N,this._input,_,A)),super.reportAmbiguity(x,g,_,A,E,N,b)}getDecisionInfo(){return this.decisions}getCurrentState(){return this.currentState}};return a([t.Override,d(0,t.NotNull)],p.prototype,"adaptivePredict",null),a([t.Override],p.prototype,"getStartState",null),a([t.Override],p.prototype,"computeStartState",null),a([t.Override],p.prototype,"computeReachSet",null),a([t.Override],p.prototype,"getExistingTargetState",null),a([t.Override],p.prototype,"computeTargetState",null),a([t.Override],p.prototype,"evalSemanticContextImpl",null),a([t.Override],p.prototype,"reportContextSensitivity",null),a([t.Override],p.prototype,"reportAttemptingFullContext",null),a([t.Override,d(0,t.NotNull),d(5,t.NotNull),d(6,t.NotNull)],p.prototype,"reportAmbiguity",null),Zt.ProfilingATNSimulator=p,Zt}var Ef;function ji(){if(Ef)return Ke;Ef=1;/*!
461
460
  * Copyright 2016 The ANTLR Project. All rights reserved.
462
461
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
463
- */Object.defineProperty(mi,"__esModule",{value:!0}),mi.Chunk=void 0;let a=class{};return mi.Chunk=a,mi}var Ef;function Ax(){if(Ef)return On;Ef=1;/*!
462
+ */var a=Ke&&Ke.__decorate||function(A,E,N,b){var w=arguments.length,P=w<3?E:b===null?b=Object.getOwnPropertyDescriptor(E,N):b,j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(A,E,N,b);else for(var W=A.length-1;W>=0;W--)(j=A[W])&&(P=(w<3?j(P):w>3?j(E,N,P):j(E,N))||P);return w>3&&P&&Object.defineProperty(E,N,P),P},d=Ke&&Ke.__param||function(A,E){return function(N,b){E(N,b,A)}},y=Ke&&Ke.__awaiter||function(A,E,N,b){function w(P){return P instanceof N?P:new N(function(j){j(P)})}return new(N||(N=Promise))(function(P,j){function W(Q){try{$(b.next(Q))}catch(ee){j(ee)}}function L(Q){try{$(b.throw(Q))}catch(ee){j(ee)}}function $(Q){Q.done?P(Q.value):w(Q.value).then(W,L)}$((b=b.apply(A,E||[])).next())})};Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.Parser=void 0;const m=ut(),h=lp(),u=ho(),r=Ra(),o=Ri(),t=ep(),i=Tr(),e=pe(),s=Yh(),l=$i(),c=Ap(),p=Bi(),v=_r(),x=Ie();class g{constructor(E,N){this.ruleNames=E,this.tokenStream=N}enterEveryRule(E){console.log("enter "+this.ruleNames[E.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}exitEveryRule(E){console.log("exit "+this.ruleNames[E.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}visitErrorNode(E){}visitTerminal(E){let N=E.parent.ruleContext,b=E.symbol;console.log("consume "+b+" rule "+this.ruleNames[N.ruleIndex])}}a([e.Override],g.prototype,"enterEveryRule",null),a([e.Override],g.prototype,"exitEveryRule",null),a([e.Override],g.prototype,"visitErrorNode",null),a([e.Override],g.prototype,"visitTerminal",null);let _=class Xi extends p.Recognizer{constructor(E){super(),this._errHandler=new r.DefaultErrorStrategy,this._precedenceStack=new t.IntegerStack,this._buildParseTrees=!0,this._parseListeners=[],this._syntaxErrors=0,this.matchedEOF=!1,this._precedenceStack.push(0),this.inputStream=E}reset(E){(E===void 0||E)&&this.inputStream.seek(0),this._errHandler.reset(this),this._ctx=void 0,this._syntaxErrors=0,this.matchedEOF=!1,this.isTrace=!1,this._precedenceStack.clear(),this._precedenceStack.push(0);let N=this.interpreter;N?.reset()}match(E){let N=this.currentToken;return N.type===E?(E===x.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):(N=this._errHandler.recoverInline(this),this._buildParseTrees&&N.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,N))),N}matchWildcard(){let E=this.currentToken;return E.type>0?(this._errHandler.reportMatch(this),this.consume()):(E=this._errHandler.recoverInline(this),this._buildParseTrees&&E.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,E))),E}set buildParseTree(E){this._buildParseTrees=E}get buildParseTree(){return this._buildParseTrees}getParseListeners(){return this._parseListeners}addParseListener(E){if(E==null)throw new TypeError("listener cannot be null");this._parseListeners.push(E)}removeParseListener(E){let N=this._parseListeners.findIndex(b=>b===E);N!==-1&&this._parseListeners.splice(N,1)}removeParseListeners(){this._parseListeners.length=0}triggerEnterRuleEvent(){for(let E of this._parseListeners)E.enterEveryRule&&E.enterEveryRule(this._ctx),this._ctx.enterRule(E)}triggerExitRuleEvent(){for(let E=this._parseListeners.length-1;E>=0;E--){let N=this._parseListeners[E];this._ctx.exitRule(N),N.exitEveryRule&&N.exitEveryRule(this._ctx)}}get numberOfSyntaxErrors(){return this._syntaxErrors}get tokenFactory(){return this._input.tokenSource.tokenFactory}getATNWithBypassAlts(){let E=this.serializedATN;if(E==null)throw new Error("The current parser does not support an ATN with bypass alternatives.");let N=Xi.bypassAltsAtnCache.get(E);if(N==null){let b=new h.ATNDeserializationOptions;b.isGenerateRuleBypassTransitions=!0,N=new u.ATNDeserializer(b).deserialize(m.toCharArray(E)),Xi.bypassAltsAtnCache.set(E,N)}return N}compileParseTreePattern(E,N,b){return y(this,void 0,void 0,function*(){if(!b){if(this.inputStream){let W=this.inputStream.tokenSource;W instanceof i.Lexer&&(b=W)}if(!b)throw new Error("Parser can't discover a lexer to use")}let w=b,P=yield Promise.resolve().then(()=>cx());return new P.ParseTreePatternMatcher(w,this).compile(E,N)})}get errorHandler(){return this._errHandler}set errorHandler(E){this._errHandler=E}get inputStream(){return this._input}set inputStream(E){this.reset(!1),this._input=E}get currentToken(){return this._input.LT(1)}notifyErrorListeners(E,N,b){N===void 0?N=this.currentToken:N===null&&(N=void 0),this._syntaxErrors++;let w=-1,P=-1;N!=null&&(w=N.line,P=N.charPositionInLine);let j=this.getErrorListenerDispatch();j.syntaxError&&j.syntaxError(this,N,w,P,E,b)}consume(){let E=this.currentToken;E.type!==Xi.EOF&&this.inputStream.consume();let N=this._parseListeners.length!==0;if(this._buildParseTrees||N)if(this._errHandler.inErrorRecoveryMode(this)){let b=this._ctx.addErrorNode(this.createErrorNode(this._ctx,E));if(N)for(let w of this._parseListeners)w.visitErrorNode&&w.visitErrorNode(b)}else{let b=this.createTerminalNode(this._ctx,E);if(this._ctx.addChild(b),N)for(let w of this._parseListeners)w.visitTerminal&&w.visitTerminal(b)}return E}createTerminalNode(E,N){return new v.TerminalNode(N)}createErrorNode(E,N){return new o.ErrorNode(N)}addContextToParseTree(){let E=this._ctx._parent;E?.addChild(this._ctx)}enterRule(E,N,b){this.state=N,this._ctx=E,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}enterLeftFactoredRule(E,N,b){if(this.state=N,this._buildParseTrees){let w=this._ctx.getChild(this._ctx.childCount-1);this._ctx.removeLastChild(),w._parent=E,E.addChild(w)}this._ctx=E,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this.matchedEOF?this._ctx._stop=this._input.LT(1):this._ctx._stop=this._input.tryLT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx._parent}enterOuterAlt(E,N){if(E.altNumber=N,this._buildParseTrees&&this._ctx!==E){let b=this._ctx._parent;b!=null&&(b.removeLastChild(),b.addChild(E))}this._ctx=E}get precedence(){return this._precedenceStack.isEmpty?-1:this._precedenceStack.peek()}enterRecursionRule(E,N,b,w){this.state=N,this._precedenceStack.push(w),this._ctx=E,this._ctx._start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(E,N,b){let w=this._ctx;w._parent=E,w.invokingState=N,w._stop=this._input.tryLT(-1),this._ctx=E,this._ctx._start=w._start,this._buildParseTrees&&this._ctx.addChild(w),this.triggerEnterRuleEvent()}unrollRecursionContexts(E){this._precedenceStack.pop(),this._ctx._stop=this._input.tryLT(-1);let N=this._ctx;if(this._parseListeners.length>0)for(;this._ctx!==E;)this.triggerExitRuleEvent(),this._ctx=this._ctx._parent;else this._ctx=E;N._parent=E,this._buildParseTrees&&E!=null&&E.addChild(N)}getInvokingContext(E){let N=this._ctx;for(;N&&N.ruleIndex!==E;)N=N._parent;return N}get context(){return this._ctx}set context(E){this._ctx=E}precpred(E,N){return N>=this._precedenceStack.peek()}getErrorListenerDispatch(){return new c.ProxyParserErrorListener(this.getErrorListeners())}inContext(E){return!1}isExpectedToken(E){let N=this.interpreter.atn,b=this._ctx,w=N.states[this.state],P=N.nextTokens(w);if(P.contains(E))return!0;if(!P.contains(x.Token.EPSILON))return!1;for(;b!=null&&b.invokingState>=0&&P.contains(x.Token.EPSILON);){let W=N.states[b.invokingState].transition(0);if(P=N.nextTokens(W.followState),P.contains(E))return!0;b=b._parent}return!!(P.contains(x.Token.EPSILON)&&E===x.Token.EOF)}get isMatchedEOF(){return this.matchedEOF}getExpectedTokens(){return this.atn.getExpectedTokens(this.state,this.context)}getExpectedTokensWithinCurrentRule(){let E=this.interpreter.atn,N=E.states[this.state];return E.nextTokens(N)}getRuleIndex(E){let N=this.getRuleIndexMap().get(E);return N??-1}get ruleContext(){return this._ctx}getRuleInvocationStack(E=this._ctx){let N=E,b=this.ruleNames,w=[];for(;N!=null;){let P=N.ruleIndex;P<0?w.push("n/a"):w.push(b[P]),N=N._parent}return w}getDFAStrings(){let E=[];for(let N of this._interp.atn.decisionToDFA)E.push(N.toString(this.vocabulary,this.ruleNames));return E}dumpDFA(){let E=!1;for(let N of this._interp.atn.decisionToDFA)N.isEmpty||(E&&console.log(),console.log("Decision "+N.decision+":"),process.stdout.write(N.toString(this.vocabulary,this.ruleNames)),E=!0)}get sourceName(){return this._input.sourceName}get parseInfo(){return Promise.resolve().then(()=>vf()).then(E=>{let N=this.interpreter;if(N instanceof E.ProfilingATNSimulator)return new s.ParseInfo(N)})}setProfile(E){return y(this,void 0,void 0,function*(){let N=yield Promise.resolve().then(()=>vf()),b=this.interpreter;E?b instanceof N.ProfilingATNSimulator||(this.interpreter=new N.ProfilingATNSimulator(this)):b instanceof N.ProfilingATNSimulator&&(this.interpreter=new l.ParserATNSimulator(this.atn,this)),this.interpreter.setPredictionMode(b.getPredictionMode())})}set isTrace(E){E?(this._tracer?this.removeParseListener(this._tracer):this._tracer=new g(this.ruleNames,this._input),this.addParseListener(this._tracer)):this._tracer&&(this.removeParseListener(this._tracer),this._tracer=void 0)}get isTrace(){return this._tracer!=null}};return _.bypassAltsAtnCache=new Map,a([e.NotNull],_.prototype,"_errHandler",void 0),a([e.NotNull],_.prototype,"match",null),a([e.NotNull],_.prototype,"matchWildcard",null),a([e.NotNull],_.prototype,"getParseListeners",null),a([d(0,e.NotNull)],_.prototype,"addParseListener",null),a([e.NotNull],_.prototype,"getATNWithBypassAlts",null),a([e.NotNull,d(0,e.NotNull)],_.prototype,"errorHandler",null),a([e.Override],_.prototype,"inputStream",null),a([e.NotNull],_.prototype,"currentToken",null),a([d(0,e.NotNull)],_.prototype,"enterRule",null),a([e.Override,d(0,e.Nullable)],_.prototype,"precpred",null),a([e.Override],_.prototype,"getErrorListenerDispatch",null),a([e.NotNull],_.prototype,"getExpectedTokens",null),a([e.NotNull],_.prototype,"getExpectedTokensWithinCurrentRule",null),a([e.Override],_.prototype,"parseInfo",null),Ke.Parser=_,Ke}var Sf;function po(){if(Sf)return nn;Sf=1;/*!
464
463
  * Copyright 2016 The ANTLR Project. All rights reserved.
465
464
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
466
- */var a=On&&On.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(On,"__esModule",{value:!0}),On.TagChunk=void 0;const d=Fp(),y=pe();let m=class extends d.Chunk{constructor(u,r){if(super(),u==null||u.length===0)throw new Error("tag cannot be null or empty");this._tag=u,this._label=r}get tag(){return this._tag}get label(){return this._label}toString(){return this._label!=null?this._label+":"+this._tag:this._tag}};return a([y.NotNull],m.prototype,"tag",null),a([y.Override],m.prototype,"toString",null),On.TagChunk=m,On}var er={},Sf;function vx(){if(Sf)return er;Sf=1;/*!
465
+ */var a=nn&&nn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(nn,"__esModule",{value:!0}),nn.NoViableAltException=void 0;const d=ji(),y=Sr(),m=pe();let h=class extends y.RecognitionException{constructor(r,o,t,i,e,s){r instanceof d.Parser&&(o===void 0&&(o=r.inputStream),t===void 0&&(t=r.currentToken),i===void 0&&(i=r.currentToken),s===void 0&&(s=r.context)),super(r,o,s),this._deadEndConfigs=e,this._startToken=t,this.setOffendingToken(r,i)}get startToken(){return this._startToken}get deadEndConfigs(){return this._deadEndConfigs}};return a([m.NotNull],h.prototype,"_startToken",void 0),nn.NoViableAltException=h,nn}var di={},Tf;function yx(){return Tf||(Tf=1,(function(a){/*!
467
466
  * Copyright 2016 The ANTLR Project. All rights reserved.
468
467
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
469
- */var a=er&&er.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=er&&er.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(er,"__esModule",{value:!0}),er.TextChunk=void 0;const y=Fp(),m=pe();let h=class extends y.Chunk{constructor(r){if(super(),r==null)throw new Error("text cannot be null");this._text=r}get text(){return this._text}toString(){return"'"+this._text+"'"}};return a([m.NotNull],h.prototype,"_text",void 0),a([m.NotNull],h.prototype,"text",null),a([m.Override],h.prototype,"toString",null),h=a([d(0,m.NotNull)],h),er.TextChunk=h,er}var tr={},Tf;function Ex(){if(Tf)return tr;Tf=1;/*!
468
+ */var d=di&&di.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(a,"__esModule",{value:!0}),a.PredictionMode=void 0;const y=Gn(),m=ke(),h=pe(),u=Mi();(function(r){r[r.SLL=0]="SLL",r[r.LL=1]="LL",r[r.LL_EXACT_AMBIG_DETECTION=2]="LL_EXACT_AMBIG_DETECTION"})(a.PredictionMode||(a.PredictionMode={})),(function(r){class o extends y.Array2DHashMap{constructor(){super(t.INSTANCE)}}class t{AltAndContextConfigEqualityComparator(){}hashCode(l){let c=m.MurmurHash.initialize(7);return c=m.MurmurHash.update(c,l.state.stateNumber),c=m.MurmurHash.update(c,l.context),c=m.MurmurHash.finish(c,2),c}equals(l,c){return l===c?!0:l==null||c==null?!1:l.state.stateNumber===c.state.stateNumber&&l.context.equals(c.context)}}t.INSTANCE=new t,d([h.Override],t.prototype,"hashCode",null),d([h.Override],t.prototype,"equals",null);function i(s){for(let l of s)if(l.state instanceof u.RuleStopState)return!0;return!1}r.hasConfigInRuleStopState=i;function e(s){for(let l of s)if(!(l.state instanceof u.RuleStopState))return!1;return!0}r.allConfigsInRuleStopStates=e})(a.PredictionMode||(a.PredictionMode={}))})(di)),di}var bf;function $i(){if(bf)return Bt;bf=1;/*!
470
469
  * Copyright 2016 The ANTLR Project. All rights reserved.
471
470
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
472
- */var a=tr&&tr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=tr&&tr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.TokenTagToken=void 0;const y=Li(),m=pe();let h=class extends y.CommonToken{constructor(r,o,t){super(o),this._tokenName=r,this._label=t}get tokenName(){return this._tokenName}get label(){return this._label}get text(){return this._label!=null?"<"+this._label+":"+this._tokenName+">":"<"+this._tokenName+">"}toString(){return this._tokenName+":"+this.type}};return a([m.NotNull],h.prototype,"_tokenName",void 0),a([m.NotNull],h.prototype,"tokenName",null),a([m.Override],h.prototype,"text",null),a([m.Override],h.prototype,"toString",null),h=a([d(0,m.NotNull)],h),tr.TokenTagToken=h,tr}var bf;function Sx(){return bf||(bf=1,(function(a){/*!
471
+ */var a=Bt&&Bt.__decorate||function(G,O,C,D){var F=arguments.length,k=F<3?O:D===null?D=Object.getOwnPropertyDescriptor(O,C):D,T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(G,O,C,D);else for(var R=G.length-1;R>=0;R--)(T=G[R])&&(k=(F<3?T(k):F>3?T(O,C,k):T(O,C))||k);return F>3&&k&&Object.defineProperty(O,C,k),k},d=Bt&&Bt.__param||function(G,O){return function(C,D){O(C,D,G)}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.ParserATNSimulator=void 0;const y=tp(),m=up(),h=Ar(),u=va(),r=lt(),o=io(),t=Li(),i=so(),e=qe(),s=cp(),l=vr(),c=Gh(),p=kn(),v=oo(),x=ba(),g=Ve(),_=gr(),A=pe(),E=Da(),N=po(),b=at(),w=st(),P=ot(),j=Ea(),W=yx(),L=Mi(),$=wa(),Q=Yn(),ee=Oa(),I=Ip(),X=Ie(),ie=Er(),ce=Ue(),oe=65535,te=-2147483648;let B=class Ne extends i.ATNSimulator{constructor(O,C){super(O),this.predictionMode=W.PredictionMode.LL,this.force_global_context=!1,this.always_try_local_context=!0,this.enable_global_context_dfa=!1,this.optimize_unique_closure=!0,this.optimize_ll1=!0,this.optimize_tail_calls=!0,this.tail_call_preserves_sll=!0,this.treat_sllk1_conflict_as_ambiguity=!1,this.reportAmbiguities=!1,this.userWantsCtxSensitive=!0,this._parser=C}getPredictionMode(){return this.predictionMode}setPredictionMode(O){this.predictionMode=O}reset(){}adaptivePredict(O,C,D,F){F===void 0&&(F=!1);let k=this.atn.decisionToDFA[C];if(ce(k!=null),this.optimize_ll1&&!k.isPrecedenceDfa&&!k.isEmpty){let H=O.LA(1);if(H>=0&&H<=65535){let J=(C<<16>>>0)+H,M=this.atn.LL1Table.get(J);if(M!=null)return M}}this.dfa=k,this.force_global_context?F=!0:this.always_try_local_context||(F=F||k.isContextSensitive),this.userWantsCtxSensitive=F||this.predictionMode!==W.PredictionMode.SLL&&D!=null&&!this.atn.decisionToState[C].sll,D==null&&(D=w.ParserRuleContext.emptyContext());let T;k.isEmpty||(T=this.getStartState(k,O,D,F)),T==null&&(D==null&&(D=w.ParserRuleContext.emptyContext()),Ne.debug&&console.log("ATN decision "+k.decision+" exec LA(1)=="+this.getLookaheadName(O)+", outerContext="+D.toString(this._parser)),T=this.computeStartState(k,D,F));let R=O.mark(),q=O.index;try{let H=this.execDFA(k,O,q,T);return Ne.debug&&console.log("DFA after predictATN: "+k.toString(this._parser.vocabulary,this._parser.ruleNames)),H}finally{this.dfa=void 0,O.seek(q),O.release(R)}}getStartState(O,C,D,F){if(!F)if(O.isPrecedenceDfa){let R=O.getPrecedenceStartState(this._parser.precedence,!1);return R==null?void 0:new I.SimulatorState(D,R,!1,D)}else return O.s0==null?void 0:new I.SimulatorState(D,O.s0,!1,D);if(!this.enable_global_context_dfa)return;let k=D;ce(D!=null);let T;for(O.isPrecedenceDfa?T=O.getPrecedenceStartState(this._parser.precedence,!0):T=O.s0full;k!=null&&T!=null&&T.isContextSensitive;)k=this.skipTailCalls(k),T=T.getContextTarget(this.getReturnState(k)),k.isEmpty?ce(T==null||!T.isContextSensitive):k=k.parent;if(T!=null)return new I.SimulatorState(D,T,F,k)}execDFA(O,C,D,F){let k=F.outerContext;Ne.dfa_debug&&console.log("DFA decision "+O.decision+" exec LA(1)=="+this.getLookaheadName(C)+", outerContext="+k.toString(this._parser)),Ne.dfa_debug&&console.log(O.toString(this._parser.vocabulary,this._parser.ruleNames));let T=F.s0,R=C.LA(1),q=F.remainingOuterContext;for(;;){if(Ne.dfa_debug&&console.log("DFA state "+T.stateNumber+" LA(1)=="+this.getLookaheadName(C)),F.useContext)for(;T.isContextSymbol(R);){let M;if(q!=null&&(q=this.skipTailCalls(q),M=T.getContextTarget(this.getReturnState(q))),M==null){let V=new I.SimulatorState(F.outerContext,T,F.useContext,q);return this.execATN(O,C,D,V)}ce(q!=null),q=q.parent,T=M}if(this.isAcceptState(T,F.useContext)){T.predicates!=null?Ne.dfa_debug&&console.log("accept "+T):Ne.dfa_debug&&console.log("accept; predict "+T.prediction+" in state "+T.stateNumber);break}ce(!this.isAcceptState(T,F.useContext));let J=this.getExistingTargetState(T,R);if(J==null){Ne.dfa_debug&&R>=0&&console.log("no edge for "+this._parser.vocabulary.getDisplayName(R));let M;if(Ne.dfa_debug){let Z=g.Interval.of(D,this._parser.inputStream.index);console.log("ATN exec upon "+this._parser.inputStream.getText(Z)+" at DFA state "+T.stateNumber)}let V=new I.SimulatorState(k,T,F.useContext,q);return M=this.execATN(O,C,D,V),Ne.dfa_debug&&console.log("back from DFA update, alt="+M+`, dfa=
472
+ `+O.toString(this._parser.vocabulary,this._parser.ruleNames)),Ne.dfa_debug&&console.log("DFA decision "+O.decision+" predicts "+M),M}else if(J===i.ATNSimulator.ERROR){let M=new I.SimulatorState(k,T,F.useContext,q);return this.handleNoViableAlt(C,D,M)}T=J,!this.isAcceptState(T,F.useContext)&&R!==_.IntStream.EOF&&(C.consume(),R=C.LA(1))}if(!F.useContext&&T.configs.conflictInfo!=null&&O.atnStartState instanceof p.DecisionState&&!(!this.userWantsCtxSensitive||!T.configs.dipsIntoOuterContext&&T.configs.isExactConflict||this.treat_sllk1_conflict_as_ambiguity&&C.index===D)){ce(!F.useContext);let J,M=T.predicates;if(M!=null){let V=C.index;if(V!==D&&C.seek(D),J=this.evalSemanticContext(M,k,!0),J.cardinality()===1)return J.nextSetBit(0);V!==D&&C.seek(V)}if(this.reportAmbiguities){let V=new I.SimulatorState(k,T,F.useContext,q);this.reportAttemptingFullContext(O,J,V,D,C.index)}return C.seek(D),this.adaptivePredict(C,O.decision,k,!0)}let H=T.predicates;if(H!=null){let J=C.index;D!==J&&C.seek(D);let M=this.evalSemanticContext(H,k,this.reportAmbiguities&&this.predictionMode===W.PredictionMode.LL_EXACT_AMBIG_DETECTION);switch(M.cardinality()){case 0:throw this.noViableAlt(C,k,T.configs,D);case 1:return M.nextSetBit(0);default:return D!==J&&C.seek(J),this.reportAmbiguity(O,T,D,J,T.configs.isExactConflict,M,T.configs),M.nextSetBit(0)}}return Ne.dfa_debug&&console.log("DFA decision "+O.decision+" predicts "+T.prediction),T.prediction}isAcceptState(O,C){return O.isAcceptState?O.configs.conflictingAlts==null?!0:C&&this.predictionMode===W.PredictionMode.LL_EXACT_AMBIG_DETECTION?O.configs.isExactConflict:!0:!1}execATN(O,C,D,F){Ne.debug&&console.log("execATN decision "+O.decision+" exec LA(1)=="+this.getLookaheadName(C));let k=F.outerContext,T=F.useContext,R=C.LA(1),q=F,H=new j.PredictionContextCache;for(;;){let J=this.computeReachSet(O,q,R,H);if(J==null)return this.setDFAEdge(q.s0,C.LA(1),i.ATNSimulator.ERROR),this.handleNoViableAlt(C,D,q);let M=J.s0;if(ce(M.isAcceptState||M.prediction===r.ATN.INVALID_ALT_NUMBER),ce(M.isAcceptState||M.configs.conflictInfo==null),this.isAcceptState(M,T)){let V=M.configs.conflictingAlts,Z=V==null?M.prediction:r.ATN.INVALID_ALT_NUMBER;if(Z!==r.ATN.INVALID_ALT_NUMBER){if(this.optimize_ll1&&C.index===D&&!O.isPrecedenceDfa&&J.outerContext===J.remainingOuterContext&&O.decision>=0&&!M.configs.hasSemanticContext&&R>=0&&R<=oe){let fe=(O.decision<<16>>>0)+R;this.atn.LL1Table.set(fe,Z)}T&&this.always_try_local_context&&this.reportContextSensitivity(O,Z,J,D,C.index)}Z=M.prediction;let se=V!=null&&this.userWantsCtxSensitive;if(se&&(se=!T&&(M.configs.dipsIntoOuterContext||!M.configs.isExactConflict)&&(!this.treat_sllk1_conflict_as_ambiguity||C.index!==D)),M.configs.hasSemanticContext){let fe=M.predicates;if(fe!=null){let he=C.index;switch(he!==D&&C.seek(D),V=this.evalSemanticContext(fe,k,se||this.reportAmbiguities),V.cardinality()){case 0:throw this.noViableAlt(C,k,M.configs,D);case 1:return V.nextSetBit(0)}he!==D&&C.seek(he)}}if(se){ce(!T),ce(this.isAcceptState(M,!1)),Ne.debug&&console.log("RETRY with outerContext="+k);let fe=this.computeStartState(O,k,!0);return this.reportAmbiguities&&this.reportAttemptingFullContext(O,V,J,D,C.index),C.seek(D),this.execATN(O,C,D,fe)}else return V!=null&&(this.reportAmbiguities&&V.cardinality()>1&&this.reportAmbiguity(O,M,D,C.index,M.configs.isExactConflict,V,M.configs),Z=V.nextSetBit(0)),Z}q=J,R!==_.IntStream.EOF&&(C.consume(),R=C.LA(1))}}handleNoViableAlt(O,C,D){if(D.s0!=null){let F=new l.BitSet,k=0;for(let T of D.s0.configs)(T.reachesIntoOuterContext||T.state instanceof L.RuleStopState)&&(F.set(T.alt),k=Math.max(k,T.alt));switch(F.cardinality()){case 0:break;case 1:return F.nextSetBit(0);default:if(!D.s0.configs.hasSemanticContext)return F.nextSetBit(0);let T=new t.ATNConfigSet;for(let q of D.s0.configs)(q.reachesIntoOuterContext||q.state instanceof L.RuleStopState)&&T.add(q);let R=this.getPredsForAmbigAlts(F,T,k);if(R!=null){let q=this.getPredicatePredictions(F,R);if(q!=null){let H=O.index;try{O.seek(C);let J=this.evalSemanticContext(q,D.outerContext,!1);if(!J.isEmpty)return J.nextSetBit(0)}finally{O.seek(H)}}}return F.nextSetBit(0)}}throw this.noViableAlt(O,D.outerContext,D.s0.configs,C)}computeReachSet(O,C,D,F){let k=C.useContext,T=C.remainingOuterContext,R=C.s0;if(k)for(;R.isContextSymbol(D);){let J;if(T!=null&&(T=this.skipTailCalls(T),J=R.getContextTarget(this.getReturnState(T))),J==null)break;ce(T!=null),T=T.parent,R=J}if(ce(!this.isAcceptState(R,k)),this.isAcceptState(R,k))return new I.SimulatorState(C.outerContext,R,k,T);let q=R,H=this.getExistingTargetState(q,D);if(H==null){let J=this.computeTargetState(O,q,T,D,k,F);H=J[0],T=J[1]}if(H!==i.ATNSimulator.ERROR)return ce(!k||!H.configs.dipsIntoOuterContext),new I.SimulatorState(C.outerContext,H,k,T)}getExistingTargetState(O,C){return O.getTarget(C)}computeTargetState(O,C,D,F,k,T){let R=C.configs.toArray(),q,H=new t.ATNConfigSet,J;do{let V=!k||D!=null;V||(H.isOutermostConfigSet=!0);let Z=new t.ATNConfigSet,se;for(let K of R){if(Ne.debug&&console.log("testing "+this.getTokenName(F)+" at "+K.toString()),K.state instanceof L.RuleStopState){ce(K.context.isEmpty),(k&&!K.reachesIntoOuterContext||F===_.IntStream.EOF)&&(se==null&&(se=[]),se.push(K));continue}let ae=K.state.numberOfOptimizedTransitions;for(let de=0;de<ae;de++){let Ce=K.state.getOptimizedTransition(de),Re=this.getReachableTarget(K,Ce,F);Re!=null&&Z.add(K.transform(Re,!1),T)}}if(this.optimize_unique_closure&&se==null&&F!==X.Token.EOF&&Z.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER){Z.isOutermostConfigSet=H.isOutermostConfigSet,H=Z;break}let fe=!1,he=F===X.Token.EOF;if(this.closure(Z,H,fe,V,T,he),J=H.dipsIntoOuterContext,F===_.IntStream.EOF&&(H=this.removeAllConfigsNotInRuleStopState(H,T)),se!=null&&(!k||!W.PredictionMode.hasConfigInRuleStopState(H))){ce(se.length>0);for(let K of se)H.add(K,T)}if(k&&J){H.clear(),D=D,D=this.skipTailCalls(D);let K=this.getReturnState(D);if(q==null&&(q=new x.IntegerList),D.isEmpty?D=void 0:D=D.parent,q.add(K),K!==P.PredictionContext.EMPTY_FULL_STATE_KEY)for(let ae=0;ae<R.length;ae++)R[ae]=R[ae].appendContext(K,T)}}while(k&&J);return H.isEmpty?(this.setDFAEdge(C,F,i.ATNSimulator.ERROR),[i.ATNSimulator.ERROR,D]):[this.addDFAEdge(O,C,F,q,H,T),D]}removeAllConfigsNotInRuleStopState(O,C){if(W.PredictionMode.allConfigsInRuleStopStates(O))return O;let D=new t.ATNConfigSet;for(let F of O)F.state instanceof L.RuleStopState&&D.add(F,C);return D}computeStartState(O,C,D){let F=O.isPrecedenceDfa?O.getPrecedenceStartState(this._parser.precedence,D):D?O.s0full:O.s0;if(F!=null){if(!D)return new I.SimulatorState(C,F,D,C);F.setContextSensitive(this.atn)}O.decision;let k=O.atnStartState,T=0,R=C,q=D?P.PredictionContext.EMPTY_FULL:P.PredictionContext.EMPTY_LOCAL,H=new j.PredictionContextCache;if(D){if(!this.enable_global_context_dfa)for(;R!=null;)R.isEmpty?(T=P.PredictionContext.EMPTY_FULL_STATE_KEY,R=void 0):(T=this.getReturnState(R),q=q.appendSingleContext(T,H),R=R.parent);for(;F!=null&&F.isContextSensitive&&R!=null;){let M;if(R=this.skipTailCalls(R),R.isEmpty?(M=F.getContextTarget(P.PredictionContext.EMPTY_FULL_STATE_KEY),T=P.PredictionContext.EMPTY_FULL_STATE_KEY,R=void 0):(T=this.getReturnState(R),M=F.getContextTarget(T),q=q.appendSingleContext(T,H),R=R.parent),M==null)break;F=M}}if(F!=null&&!F.isContextSensitive)return new I.SimulatorState(C,F,D,R);let J=new t.ATNConfigSet;for(;;){let M=new t.ATNConfigSet,V=k.numberOfTransitions;for(let ae=0;ae<V;ae++){let de=k.transition(ae).target;M.add(o.ATNConfig.create(de,ae+1,q))}let Z=R!=null;Z||(J.isOutermostConfigSet=!0),this.closure(M,J,!0,Z,H,!1);let fe=J.dipsIntoOuterContext,he;if(D&&!this.enable_global_context_dfa){F=this.addDFAState(O,J,H);break}else F==null?O.isPrecedenceDfa?(J=this.applyPrecedenceFilter(J,C,H),he=this.addDFAState(O,J,H),O.setPrecedenceStartState(this._parser.precedence,D,he)):(he=this.addDFAState(O,J,H),D?O.s0full?he=O.s0full:O.s0full=he:O.s0?he=O.s0:O.s0=he):(O.isPrecedenceDfa&&(J=this.applyPrecedenceFilter(J,C,H)),he=this.addDFAState(O,J,H),F.setContextTarget(T,he));if(F=he,!D||!fe)break;he.setContextSensitive(this.atn),R=R,J.clear(),R=this.skipTailCalls(R);let K=this.getReturnState(R);R.isEmpty?R=void 0:R=R.parent,K!==P.PredictionContext.EMPTY_FULL_STATE_KEY&&(q=q.appendSingleContext(K,H)),T=K}return new I.SimulatorState(C,F,D,R)}applyPrecedenceFilter(O,C,D){let F=new Map,k=new t.ATNConfigSet;for(let T of O){if(T.alt!==1)continue;let R=T.semanticContext.evalPrecedence(this._parser,C);R!=null&&(F.set(T.state.stateNumber,T.context),R!==T.semanticContext?k.add(T.transform(T.state,!1,R),D):k.add(T,D))}for(let T of O)if(T.alt!==1){if(!T.isPrecedenceFilterSuppressed){let R=F.get(T.state.stateNumber);if(R!=null&&R.equals(T.context))continue}k.add(T,D)}return k}getReachableTarget(O,C,D){if(C.matches(D,0,this.atn.maxTokenType))return C.target}predicateDFAState(O,C,D){let F=this.getConflictingAltsFromConfigSet(C);if(!F)throw new Error("This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case.");Ne.debug&&console.log("predicateDFAState "+O);let k=this.getPredsForAmbigAlts(F,C,D),T;return k!=null&&(T=this.getPredicatePredictions(F,k),O.predicates=T),T}getPredsForAmbigAlts(O,C,D){let F=new Array(D+1),k=F.length;for(let q of C)O.get(q.alt)&&(F[q.alt]=Q.SemanticContext.or(F[q.alt],q.semanticContext));let T=0;for(let q=0;q<k;q++)F[q]==null?F[q]=Q.SemanticContext.NONE:F[q]!==Q.SemanticContext.NONE&&T++;let R=F;return T===0&&(R=void 0),Ne.debug&&console.log("getPredsForAmbigAlts result "+(R?u.Arrays.toString(R):"undefined")),R}getPredicatePredictions(O,C){let D=[],F=!1;for(let k=1;k<C.length;k++){let T=C[k];ce(T!=null),O!=null&&O.get(k)&&T===Q.SemanticContext.NONE?D.push(new v.DFAState.PredPrediction(T,k)):T!==Q.SemanticContext.NONE&&(F=!0,D.push(new v.DFAState.PredPrediction(T,k)))}if(F)return D}evalSemanticContext(O,C,D){let F=new l.BitSet;for(let k of O){if(k.pred===Q.SemanticContext.NONE){if(F.set(k.alt),!D)break;continue}let T=this.evalSemanticContextImpl(k.pred,C,k.alt);if((Ne.debug||Ne.dfa_debug)&&console.log("eval pred "+k+"="+T),T&&((Ne.debug||Ne.dfa_debug)&&console.log("PREDICT "+k.alt),F.set(k.alt),!D))break}return F}evalSemanticContextImpl(O,C,D){return O.eval(this._parser,C)}closure(O,C,D,F,k,T){k==null&&(k=j.PredictionContextCache.UNCACHED);let R=O,q=new h.Array2DHashSet(b.ObjectEqualityComparator.INSTANCE);for(;R.size>0;){let H=new t.ATNConfigSet;for(let J of R)this.closureImpl(J,C,H,q,D,F,k,0,T);R=H}}closureImpl(O,C,D,F,k,T,R,q,H){if(Ne.debug&&console.log("closure("+O.toString(this._parser,!0)+")"),O.state instanceof L.RuleStopState)if(O.context.isEmpty)if(T)Ne.debug&&console.log("FALLING off rule "+this.getRuleName(O.state.ruleIndex)),O.context===P.PredictionContext.EMPTY_FULL?O=O.transform(O.state,!1,P.PredictionContext.EMPTY_LOCAL):!O.reachesIntoOuterContext&&P.PredictionContext.isEmptyLocal(O.context)&&C.add(O,R);else{C.add(O,R);return}else{let M=O.context.hasEmpty,V=O.context.size-(M?1:0);for(let Z=0;Z<V;Z++){let se=O.context.getParent(Z),fe=this.atn.states[O.context.getReturnState(Z)],he=o.ATNConfig.create(fe,O.alt,se,O.semanticContext);he.outerContextDepth=O.outerContextDepth,he.isPrecedenceFilterSuppressed=O.isPrecedenceFilterSuppressed,ce(q>te),this.closureImpl(he,C,D,F,k,T,R,q-1,H)}if(!M||!T)return;O=O.transform(O.state,!1,P.PredictionContext.EMPTY_LOCAL)}let J=O.state;J.onlyHasEpsilonTransitions||(C.add(O,R),Ne.debug&&console.log("added config "+C));for(let M=0;M<J.numberOfOptimizedTransitions;M++){if(M===0&&J.stateType===e.ATNStateType.STAR_LOOP_ENTRY&&J.precedenceRuleDecision&&!O.context.hasEmpty){let fe=J,he=!0;for(let K=0;K<O.context.size;K++)if(!fe.precedenceLoopbackStates.get(O.context.getReturnState(K))){he=!1;break}if(he)continue}let V=J.getOptimizedTransition(M),Z=!(V instanceof m.ActionTransition)&&k,se=this.getEpsilonTarget(O,V,Z,q===0,R,H);if(se!=null){if(V instanceof $.RuleTransition&&D!=null&&!k){D.add(se,R);continue}let fe=q;if(O.state instanceof L.RuleStopState){if(this.dfa!=null&&this.dfa.isPrecedenceDfa&&V.outermostPrecedenceReturn===this.dfa.atnStartState.ruleIndex&&(se.isPrecedenceFilterSuppressed=!0),se.outerContextDepth=se.outerContextDepth+1,!F.add(se))continue;ce(fe>te),fe--,Ne.debug&&console.log("dips into outer ctx: "+se)}else if(V instanceof $.RuleTransition)this.optimize_tail_calls&&V.optimizedTailCall&&(!this.tail_call_preserves_sll||!P.PredictionContext.isEmptyLocal(O.context))?(ce(se.context===O.context),fe===0&&(fe--,!this.tail_call_preserves_sll&&P.PredictionContext.isEmptyLocal(O.context)&&(se.outerContextDepth=se.outerContextDepth+1))):fe>=0&&fe++;else if(!V.isEpsilon&&!F.add(se))continue;this.closureImpl(se,C,D,F,Z,T,R,fe,H)}}}getRuleName(O){return this._parser!=null&&O>=0?this._parser.ruleNames[O]:"<rule "+O+">"}getEpsilonTarget(O,C,D,F,k,T){switch(C.serializationType){case 3:return this.ruleTransition(O,C,k);case 10:return this.precedenceTransition(O,C,D,F);case 4:return this.predTransition(O,C,D,F);case 6:return this.actionTransition(O,C);case 1:return O.transform(C.target,!1);case 5:case 2:case 7:return T&&C.matches(X.Token.EOF,0,1)?O.transform(C.target,!1):void 0;default:return}}actionTransition(O,C){return Ne.debug&&console.log("ACTION edge "+C.ruleIndex+":"+C.actionIndex),O.transform(C.target,!1)}precedenceTransition(O,C,D,F){Ne.debug&&(console.log("PRED (collectPredicates="+D+") "+C.precedence+">=_p, ctx dependent=true"),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let k;if(D&&F){let T=Q.SemanticContext.and(O.semanticContext,C.predicate);k=O.transform(C.target,!1,T)}else k=O.transform(C.target,!1);return Ne.debug&&console.log("config from pred transition="+k),k}predTransition(O,C,D,F){Ne.debug&&(console.log("PRED (collectPredicates="+D+") "+C.ruleIndex+":"+C.predIndex+", ctx dependent="+C.isCtxDependent),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let k;if(D&&(!C.isCtxDependent||C.isCtxDependent&&F)){let T=Q.SemanticContext.and(O.semanticContext,C.predicate);k=O.transform(C.target,!1,T)}else k=O.transform(C.target,!1);return Ne.debug&&console.log("config from pred transition="+k),k}ruleTransition(O,C,D){Ne.debug&&console.log("CALL rule "+this.getRuleName(C.target.ruleIndex)+", ctx="+O.context);let F=C.followState,k;return this.optimize_tail_calls&&C.optimizedTailCall&&(!this.tail_call_preserves_sll||!P.PredictionContext.isEmptyLocal(O.context))?k=O.context:D!=null?k=D.getChild(O.context,F.stateNumber):k=O.context.getChild(F.stateNumber),O.transform(C.target,!1,k)}isConflicted(O,C){if(O.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER||O.size<=1)return;let D=O.toArray();D.sort(Ne.STATE_ALT_SORT_COMPARATOR);let F=!O.dipsIntoOuterContext,k=new l.BitSet,T=D[0].alt;k.set(T);let R=D[0].state.nonStopStateNumber;for(let V of D){let Z=V.state.nonStopStateNumber;if(Z!==R){if(V.alt!==T)return;R=Z}}let q;if(F){R=D[0].state.nonStopStateNumber,q=new l.BitSet;let V=T;for(let se of D){if(se.state.nonStopStateNumber!==R)break;let fe=se.alt;q.set(fe),V=fe}R=D[0].state.nonStopStateNumber;let Z=T;for(let se of D){let fe=se.state.nonStopStateNumber,he=se.alt;if(fe!==R){if(Z!==V){F=!1;break}R=fe,Z=T}else if(he!==Z){if(he!==q.nextSetBit(Z+1)){F=!1;break}Z=he}}}R=D[0].state.nonStopStateNumber;let H=0,J=0,M=D[0].context;for(let V=1;V<D.length;V++){let Z=D[V];if(Z.alt!==T||Z.state.nonStopStateNumber!==R)break;J=V,M=C.join(M,D[V].context)}for(let V=J+1;V<D.length;V++){let Z=D[V],se=Z.state;if(k.set(Z.alt),se.nonStopStateNumber!==R){R=se.nonStopStateNumber,H=V,J=V,M=Z.context;for(let de=H+1;de<D.length;de++){let Ce=D[de];if(Ce.alt!==T||Ce.state.nonStopStateNumber!==R)break;J=de,M=C.join(M,Ce.context)}V=J;continue}let fe=Z.context,he=Z.alt,K=V;for(let de=K+1;de<D.length;de++){let Ce=D[de];if(Ce.alt!==he||Ce.state.nonStopStateNumber!==R)break;K=de,fe=C.join(fe,Ce.context)}V=K;let ae=C.join(M,fe);if(!M.equals(ae))return;F=F&&M.equals(fe)}return new c.ConflictInfo(k,F)}getConflictingAltsFromConfigSet(O){let C=O.conflictingAlts;return C==null&&O.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER&&(C=new l.BitSet,C.set(O.uniqueAlt)),C}getTokenName(O){if(O===X.Token.EOF)return"EOF";let D=(this._parser!=null?this._parser.vocabulary:ie.VocabularyImpl.EMPTY_VOCABULARY).getDisplayName(O);return D===String(O)?D:D+"<"+O+">"}getLookaheadName(O){return this.getTokenName(O.LA(1))}dumpDeadEndConfigs(O){console.log("dead end configs: ");let C=O.deadEndConfigs;if(C)for(let D of C){let F="no edges";if(D.state.numberOfOptimizedTransitions>0){let k=D.state.getOptimizedTransition(0);k instanceof s.AtomTransition?F="Atom "+this.getTokenName(k._label):k instanceof ee.SetTransition&&(F=(k instanceof E.NotSetTransition?"~":"")+"Set "+k.set.toString())}console.log(D.toString(this._parser,!0)+":"+F)}}noViableAlt(O,C,D,F){return new N.NoViableAltException(this._parser,O,O.get(F),O.LT(1),D,C)}getUniqueAlt(O){let C=r.ATN.INVALID_ALT_NUMBER;for(let D of O)if(C===r.ATN.INVALID_ALT_NUMBER)C=D.alt;else if(D.alt!==C)return r.ATN.INVALID_ALT_NUMBER;return C}configWithAltAtStopState(O,C){for(let D of O)if(D.alt===C&&D.state instanceof L.RuleStopState)return!0;return!1}addDFAEdge(O,C,D,F,k,T){ce(F==null||F.isEmpty||O.isContextSensitive);let R=C,q=this.addDFAState(O,k,T);if(F!=null)for(let H of F.toArray()){if(H===P.PredictionContext.EMPTY_FULL_STATE_KEY&&R.configs.isOutermostConfigSet)continue;R.setContextSensitive(this.atn),R.setContextSymbol(D);let J=R.getContextTarget(H);if(J!=null){R=J;continue}J=this.addDFAContextState(O,R.configs,H,T),ce(H!==P.PredictionContext.EMPTY_FULL_STATE_KEY||J.configs.isOutermostConfigSet),R.setContextTarget(H,J),R=J}return Ne.debug&&console.log("EDGE "+R+" -> "+q+" upon "+this.getTokenName(D)),this.setDFAEdge(R,D,q),Ne.debug&&console.log(`DFA=
473
+ `+O.toString(this._parser!=null?this._parser.vocabulary:ie.VocabularyImpl.EMPTY_VOCABULARY,this._parser!=null?this._parser.ruleNames:void 0)),q}setDFAEdge(O,C,D){O?.setTarget(C,D)}addDFAContextState(O,C,D,F){if(D!==P.PredictionContext.EMPTY_FULL_STATE_KEY){let k=new t.ATNConfigSet;for(let T of C)k.add(T.appendContext(D,F));return this.addDFAState(O,k,F)}else return ce(!C.isOutermostConfigSet,"Shouldn't be adding a duplicate edge."),C=C.clone(!0),C.isOutermostConfigSet=!0,this.addDFAState(O,C,F)}addDFAState(O,C,D){let F=this.enable_global_context_dfa||!C.isOutermostConfigSet;if(F){C.isReadOnly||C.optimizeConfigs(this);let H=this.createDFAState(O,C),J=O.states.get(H);if(J!=null)return J}C.isReadOnly||C.conflictInfo==null&&(C.conflictInfo=this.isConflicted(C,D));let k=this.createDFAState(O,C.clone(!0)),T=this.atn.getDecisionState(O.decision),R=this.getUniqueAlt(C);if(R!==r.ATN.INVALID_ALT_NUMBER)k.acceptStateInfo=new y.AcceptStateInfo(R);else if(C.conflictingAlts!=null){let H=C.conflictingAlts;H&&(k.acceptStateInfo=new y.AcceptStateInfo(H.nextSetBit(0)))}if(k.isAcceptState&&C.hasSemanticContext&&this.predicateDFAState(k,C,T.numberOfTransitions),!F)return k;let q=O.addState(k);return Ne.debug&&q===k&&console.log("adding new DFA state: "+k),q}createDFAState(O,C){return new v.DFAState(C)}reportAttemptingFullContext(O,C,D,F,k){if(Ne.debug||Ne.retry_debug){let T=g.Interval.of(F,k);console.log("reportAttemptingFullContext decision="+O.decision+":"+D.s0.configs+", input="+this._parser.inputStream.getText(T))}if(this._parser!=null){let T=this._parser.getErrorListenerDispatch();T.reportAttemptingFullContext&&T.reportAttemptingFullContext(this._parser,O,F,k,C,D)}}reportContextSensitivity(O,C,D,F,k){if(Ne.debug||Ne.retry_debug){let T=g.Interval.of(F,k);console.log("reportContextSensitivity decision="+O.decision+":"+D.s0.configs+", input="+this._parser.inputStream.getText(T))}if(this._parser!=null){let T=this._parser.getErrorListenerDispatch();T.reportContextSensitivity&&T.reportContextSensitivity(this._parser,O,F,k,C,D)}}reportAmbiguity(O,C,D,F,k,T,R){if(Ne.debug||Ne.retry_debug){let q=g.Interval.of(D,F);console.log("reportAmbiguity "+T+":"+R+", input="+this._parser.inputStream.getText(q))}if(this._parser!=null){let q=this._parser.getErrorListenerDispatch();q.reportAmbiguity&&q.reportAmbiguity(this._parser,O,D,F,k,T,R)}}getReturnState(O){return O.isEmpty?P.PredictionContext.EMPTY_FULL_STATE_KEY:this.atn.states[O.invokingState].transition(0).followState.stateNumber}skipTailCalls(O){if(!this.optimize_tail_calls)return O;for(;!O.isEmpty;){let C=this.atn.states[O.invokingState];if(ce(C.numberOfTransitions===1&&C.transition(0).serializationType===3),!C.transition(0).tailCall)break;O=O.parent}return O}get parser(){return this._parser}};return B.debug=!1,B.dfa_debug=!1,B.retry_debug=!1,B.STATE_ALT_SORT_COMPARATOR=(G,O)=>{let C=G.state.nonStopStateNumber-O.state.nonStopStateNumber;return C!==0||(C=G.alt-O.alt,C!==0)?C:0},a([A.NotNull],B.prototype,"predictionMode",void 0),a([A.NotNull],B.prototype,"getPredictionMode",null),a([d(0,A.NotNull)],B.prototype,"setPredictionMode",null),a([A.Override],B.prototype,"reset",null),a([d(0,A.NotNull)],B.prototype,"adaptivePredict",null),a([d(0,A.NotNull),d(1,A.NotNull),d(2,A.NotNull)],B.prototype,"getStartState",null),a([d(0,A.NotNull),d(1,A.NotNull),d(3,A.NotNull)],B.prototype,"execDFA",null),a([d(0,A.NotNull),d(1,A.NotNull),d(3,A.NotNull)],B.prototype,"execATN",null),a([d(0,A.NotNull),d(2,A.NotNull)],B.prototype,"handleNoViableAlt",null),a([d(0,A.NotNull)],B.prototype,"getExistingTargetState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"computeTargetState",null),a([A.NotNull,d(0,A.NotNull)],B.prototype,"removeAllConfigsNotInRuleStopState",null),a([A.NotNull],B.prototype,"computeStartState",null),a([A.NotNull,d(0,A.NotNull)],B.prototype,"applyPrecedenceFilter",null),a([d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"getReachableTarget",null),a([d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"getPredsForAmbigAlts",null),a([d(0,A.NotNull)],B.prototype,"evalSemanticContext",null),a([d(0,A.NotNull)],B.prototype,"evalSemanticContextImpl",null),a([d(1,A.NotNull),d(4,A.Nullable)],B.prototype,"closure",null),a([d(0,A.NotNull),d(1,A.NotNull),d(2,A.Nullable),d(3,A.NotNull),d(6,A.NotNull)],B.prototype,"closureImpl",null),a([A.NotNull],B.prototype,"getRuleName",null),a([d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"getEpsilonTarget",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"actionTransition",null),a([A.Nullable,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"precedenceTransition",null),a([A.Nullable,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"predTransition",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(2,A.Nullable)],B.prototype,"ruleTransition",null),a([d(0,A.NotNull)],B.prototype,"isConflicted",null),a([A.NotNull],B.prototype,"getTokenName",null),a([d(0,A.NotNull)],B.prototype,"dumpDeadEndConfigs",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(2,A.NotNull)],B.prototype,"noViableAlt",null),a([d(0,A.NotNull)],B.prototype,"getUniqueAlt",null),a([d(0,A.NotNull)],B.prototype,"configWithAltAtStopState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(4,A.NotNull)],B.prototype,"addDFAEdge",null),a([d(0,A.Nullable),d(2,A.Nullable)],B.prototype,"setDFAEdge",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"addDFAContextState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"addDFAState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],B.prototype,"createDFAState",null),a([d(0,A.NotNull),d(2,A.NotNull)],B.prototype,"reportAttemptingFullContext",null),a([d(0,A.NotNull),d(2,A.NotNull)],B.prototype,"reportContextSensitivity",null),a([d(0,A.NotNull),d(5,A.NotNull),d(6,A.NotNull)],B.prototype,"reportAmbiguity",null),B=a([d(0,A.NotNull)],B),Bt.ParserATNSimulator=B,Bt}var En={},Nf;function gx(){if(Nf)return En;Nf=1;/*!
473
474
  * Copyright 2016 The ANTLR Project. All rights reserved.
474
475
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
475
- */var d=yn&&yn.__decorate||function(w,P,j,W){var L=arguments.length,$=L<3?P:W===null?W=Object.getOwnPropertyDescriptor(P,j):W,Q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(w,P,j,W);else for(var ee=w.length-1;ee>=0;ee--)(Q=w[ee])&&($=(L<3?Q($):L>3?Q(P,j,$):Q(P,j))||$);return L>3&&$&&Object.defineProperty(P,j,$),$},y=yn&&yn.__param||function(w,P){return function(j,W){P(j,W,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ParseTreePatternMatcher=void 0;const m=Ip(),h=Ra(),u=Pa(),r=Op(),o=ux(),t=pe(),i=Dp(),e=Rp(),s=st(),l=lx(),c=gx(),p=Ar(),v=Pi(),x=_x(),g=Ax(),_=_r(),A=vx(),E=Ie(),N=Ex();let b=class pa{constructor(P,j){this.start="<",this.stop=">",this.escape="\\",this.escapeRE=/\\/g,this._lexer=P,this._parser=j}setDelimiters(P,j,W){if(!P)throw new Error("start cannot be null or empty");if(!j)throw new Error("stop cannot be null or empty");this.start=P,this.stop=j,this.escape=W,this.escapeRE=new RegExp(W.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g")}matches(P,j,W=0){if(typeof j=="string"){let L=this.compile(j,W);return this.matches(P,L)}else{let L=new o.MultiMap;return!this.matchImpl(P,j.patternTree,L)}}match(P,j,W=0){if(typeof j=="string"){let L=this.compile(j,W);return this.match(P,L)}else{let L=new o.MultiMap,$=this.matchImpl(P,j.patternTree,L);return new l.ParseTreeMatch(P,j,L,$)}}compile(P,j){let W=this.tokenize(P),L=new r.ListTokenSource(W),$=new u.CommonTokenStream(L);const Q=this._parser;let ee=new e.ParserInterpreter(Q.grammarFileName,Q.vocabulary,Q.ruleNames,Q.getATNWithBypassAlts(),$),I;try{ee.errorHandler=new m.BailErrorStrategy,I=ee.parse(j)}catch(X){throw X instanceof i.ParseCancellationException?X.getCause():X instanceof p.RecognitionException?X:X instanceof Error?new pa.CannotInvokeStartRule(X):X}if($.LA(1)!==E.Token.EOF)throw new pa.StartRuleDoesNotConsumeFullPattern;return new c.ParseTreePattern(this,P,j,I)}get lexer(){return this._lexer}get parser(){return this._parser}matchImpl(P,j,W){if(!P)throw new TypeError("tree cannot be null");if(!j)throw new TypeError("patternTree cannot be null");if(P instanceof _.TerminalNode&&j instanceof _.TerminalNode){let L;if(P.symbol.type===j.symbol.type)if(j.symbol instanceof N.TokenTagToken){let $=j.symbol;W.map($.tokenName,P);const Q=$.label;Q&&W.map(Q,P)}else P.text===j.text||L||(L=P);else L||(L=P);return L}if(P instanceof s.ParserRuleContext&&j instanceof s.ParserRuleContext){let L,$=this.getRuleTagToken(j);if($){if(P.ruleContext.ruleIndex===j.ruleContext.ruleIndex){W.map($.ruleName,P);const ee=$.label;ee&&W.map(ee,P)}else L||(L=P);return L}if(P.childCount!==j.childCount)return L||(L=P),L;let Q=P.childCount;for(let ee=0;ee<Q;ee++){let I=this.matchImpl(P.getChild(ee),j.getChild(ee),W);if(I)return I}return L}return P}getRuleTagToken(P){if(P instanceof v.RuleNode&&P.childCount===1&&P.getChild(0)instanceof _.TerminalNode){let j=P.getChild(0);if(j.symbol instanceof x.RuleTagToken)return j.symbol}}tokenize(P){let j=this.split(P),W=[];for(let L of j)if(L instanceof g.TagChunk){let $=L;const Q=$.tag.substr(0,1);if(Q===Q.toUpperCase()){let ee=this._parser.getTokenType($.tag);if(ee===E.Token.INVALID_TYPE)throw new Error("Unknown token "+$.tag+" in pattern: "+P);let I=new N.TokenTagToken($.tag,ee,$.label);W.push(I)}else if(Q===Q.toLowerCase()){let ee=this._parser.getRuleIndex($.tag);if(ee===-1)throw new Error("Unknown rule "+$.tag+" in pattern: "+P);let I=this._parser.getATNWithBypassAlts().ruleToTokenType[ee];W.push(new x.RuleTagToken($.tag,I,$.label))}else throw new Error("invalid tag: "+$.tag+" in pattern: "+P)}else{let $=L;this._lexer.inputStream=h.CharStreams.fromString($.text);let Q=this._lexer.nextToken();for(;Q.type!==E.Token.EOF;)W.push(Q),Q=this._lexer.nextToken()}return W}split(P){let j=0,W=P.length,L=[],$=[],Q=[];for(;j<W;)j===P.indexOf(this.escape+this.start,j)?j+=this.escape.length+this.start.length:j===P.indexOf(this.escape+this.stop,j)?j+=this.escape.length+this.stop.length:j===P.indexOf(this.start,j)?($.push(j),j+=this.start.length):j===P.indexOf(this.stop,j)?(Q.push(j),j+=this.stop.length):j++;if($.length>Q.length)throw new Error("unterminated tag in pattern: "+P);if($.length<Q.length)throw new Error("missing start tag in pattern: "+P);let ee=$.length;for(let I=0;I<ee;I++)if($[I]>=Q[I])throw new Error("tag delimiters out of order in pattern: "+P);if(ee===0){let I=P.substring(0,W);L.push(new A.TextChunk(I))}if(ee>0&&$[0]>0){let I=P.substring(0,$[0]);L.push(new A.TextChunk(I))}for(let I=0;I<ee;I++){let X=P.substring($[I]+this.start.length,Q[I]),ie=X,ce,oe=X.indexOf(":");if(oe>=0&&(ce=X.substring(0,oe),ie=X.substring(oe+1,X.length)),L.push(new g.TagChunk(ie,ce)),I+1<ee){let te=P.substring(Q[I]+this.stop.length,$[I+1]);L.push(new A.TextChunk(te))}}if(ee>0){let I=Q[ee-1]+this.stop.length;if(I<W){let X=P.substring(I,W);L.push(new A.TextChunk(X))}}for(let I=0;I<L.length;I++){let X=L[I];if(X instanceof A.TextChunk){let ie=X.text.replace(this.escapeRE,"");ie.length<X.text.length&&(L[I]=new A.TextChunk(ie))}}return L}};d([t.NotNull,y(1,t.NotNull)],b.prototype,"match",null),d([t.NotNull],b.prototype,"lexer",null),d([t.NotNull],b.prototype,"parser",null),d([y(0,t.NotNull),y(1,t.NotNull),y(2,t.NotNull)],b.prototype,"matchImpl",null),a.ParseTreePatternMatcher=b,(function(w){class P extends Error{constructor(L){super(`CannotInvokeStartRule: ${L}`),this.error=L}}w.CannotInvokeStartRule=P;class j extends Error{constructor(){super("StartRuleDoesNotConsumeFullPattern")}}w.StartRuleDoesNotConsumeFullPattern=j})(b=a.ParseTreePatternMatcher||(a.ParseTreePatternMatcher={}))})(yn)),yn}var rr={},nr={},ir={},Nf;function ji(){if(Nf)return ir;Nf=1;/*!
476
+ */var a=En&&En.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(En,"__esModule",{value:!0}),En.PlusBlockStartState=void 0;const d=qe(),y=lo(),m=pe();let h=class extends y.BlockStartState{get stateType(){return d.ATNStateType.PLUS_BLOCK_START}};return a([m.Override],h.prototype,"stateType",null),En.PlusBlockStartState=h,En}var Sn={},Cf;function _x(){if(Cf)return Sn;Cf=1;/*!
476
477
  * Copyright 2016 The ANTLR Project. All rights reserved.
477
478
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
478
- */var a=ir&&ir.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=ir&&ir.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(ir,"__esModule",{value:!0}),ir.DecisionEventInfo=void 0;const y=pe();let m=class{constructor(u,r,o,t,i,e){this.decision=u,this.fullCtx=e,this.stopIndex=i,this.input=o,this.startIndex=t,this.state=r}};return a([y.NotNull],m.prototype,"input",void 0),m=a([d(2,y.NotNull)],m),ir.DecisionEventInfo=m,ir}var Cf;function Tx(){if(Cf)return nr;Cf=1;/*!
479
+ */var a=Sn&&Sn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.PlusLoopbackState=void 0;const d=qe(),y=kn(),m=pe();let h=class extends y.DecisionState{get stateType(){return d.ATNStateType.PLUS_LOOP_BACK}};return a([m.Override],h.prototype,"stateType",null),Sn.PlusLoopbackState=h,Sn}var ur={},Of;function Ax(){if(Of)return ur;Of=1;/*!
479
480
  * Copyright 2016 The ANTLR Project. All rights reserved.
480
481
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
481
- */var a=nr&&nr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=nr&&nr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.AmbiguityInfo=void 0;const y=ji(),m=pe();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e,s){super(r,o,i,e,s,o.useContext),this.ambigAlts=t}get ambiguousAlternatives(){return this.ambigAlts}};return a([m.NotNull],h.prototype,"ambigAlts",void 0),a([m.NotNull],h.prototype,"ambiguousAlternatives",null),h=a([d(1,m.NotNull),d(2,m.NotNull),d(3,m.NotNull)],h),nr.AmbiguityInfo=h,nr}var sr={},Of;function bx(){if(Of)return sr;Of=1;/*!
482
+ */var a=ur&&ur.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=ur&&ur.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(ur,"__esModule",{value:!0}),ur.PrecedencePredicateTransition=void 0;const y=Ca(),m=pe(),h=Yn();let u=class extends y.AbstractPredicateTransition{constructor(o,t){super(o),this.precedence=t}get serializationType(){return 10}get isEpsilon(){return!0}matches(o,t,i){return!1}get predicate(){return new h.SemanticContext.PrecedencePredicate(this.precedence)}toString(){return this.precedence+" >= _p"}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override],u.prototype,"isEpsilon",null),a([m.Override],u.prototype,"matches",null),a([m.Override],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),ur.PrecedencePredicateTransition=u,ur}var lr={},Df;function vx(){if(Df)return lr;Df=1;/*!
482
483
  * Copyright 2016 The ANTLR Project. All rights reserved.
483
484
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
484
- */var a=sr&&sr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=sr&&sr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.ContextSensitivityInfo=void 0;const y=ji(),m=pe();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e){super(r,o,t,i,e,!0)}};return h=a([d(1,m.NotNull),d(2,m.NotNull)],h),sr.ContextSensitivityInfo=h,sr}var Dn={},Df;function Nx(){if(Df)return Dn;Df=1;/*!
485
+ */var a=lr&&lr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=lr&&lr.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(lr,"__esModule",{value:!0}),lr.RangeTransition=void 0;const y=Mn(),m=pe(),h=br();let u=class extends h.Transition{constructor(o,t,i){super(o),this.from=t,this.to=i}get serializationType(){return 2}get label(){return y.IntervalSet.of(this.from,this.to)}matches(o,t,i){return o>=this.from&&o<=this.to}toString(){return"'"+String.fromCodePoint(this.from)+"'..'"+String.fromCodePoint(this.to)+"'"}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override,m.NotNull],u.prototype,"label",null),a([m.Override],u.prototype,"matches",null),a([m.Override,m.NotNull],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),lr.RangeTransition=u,lr}var Tn={},wf;function Ex(){if(wf)return Tn;wf=1;/*!
485
486
  * Copyright 2016 The ANTLR Project. All rights reserved.
486
487
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
487
- */var a=Dn&&Dn.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.DecisionInfo=void 0;const d=pe();let y=class{constructor(h){this.invocations=0,this.timeInPrediction=0,this.SLL_TotalLook=0,this.SLL_MinLook=0,this.SLL_MaxLook=0,this.LL_TotalLook=0,this.LL_MinLook=0,this.LL_MaxLook=0,this.contextSensitivities=[],this.errors=[],this.ambiguities=[],this.predicateEvals=[],this.SLL_ATNTransitions=0,this.SLL_DFATransitions=0,this.LL_Fallback=0,this.LL_ATNTransitions=0,this.LL_DFATransitions=0,this.decision=h}toString(){return"{decision="+this.decision+", contextSensitivities="+this.contextSensitivities.length+", errors="+this.errors.length+", ambiguities="+this.ambiguities.length+", SLL_lookahead="+this.SLL_TotalLook+", SLL_ATNTransitions="+this.SLL_ATNTransitions+", SLL_DFATransitions="+this.SLL_DFATransitions+", LL_Fallback="+this.LL_Fallback+", LL_lookahead="+this.LL_TotalLook+", LL_ATNTransitions="+this.LL_ATNTransitions+"}"}};return a([d.Override],y.prototype,"toString",null),Dn.DecisionInfo=y,Dn}var ar={},wf;function Cx(){if(wf)return ar;wf=1;/*!
488
+ */var a=Tn&&Tn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.RuleStartState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{constructor(){super(...arguments),this.isPrecedenceRule=!1,this.leftFactored=!1}get stateType(){return y.ATNStateType.RULE_START}};return a([m.Override],h.prototype,"stateType",null),Tn.RuleStartState=h,Tn}var bn={},Rf;function Sx(){if(Rf)return bn;Rf=1;/*!
488
489
  * Copyright 2016 The ANTLR Project. All rights reserved.
489
490
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
490
- */var a=ar&&ar.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=ar&&ar.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(ar,"__esModule",{value:!0}),ar.ErrorInfo=void 0;const y=ji(),m=pe();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e){super(r,o,t,i,e,o.useContext)}};return h=a([d(1,m.NotNull),d(2,m.NotNull)],h),ar.ErrorInfo=h,ar}var ur={},Rf;function Ox(){if(Rf)return ur;Rf=1;/*!
491
+ */var a=bn&&bn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(bn,"__esModule",{value:!0}),bn.StarBlockStartState=void 0;const d=qe(),y=lo(),m=pe();let h=class extends y.BlockStartState{get stateType(){return d.ATNStateType.STAR_BLOCK_START}};return a([m.Override],h.prototype,"stateType",null),bn.StarBlockStartState=h,bn}var Nn={},Pf;function Tx(){if(Pf)return Nn;Pf=1;/*!
491
492
  * Copyright 2016 The ANTLR Project. All rights reserved.
492
493
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
493
- */var a=ur&&ur.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=ur&&ur.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(ur,"__esModule",{value:!0}),ur.LookaheadEventInfo=void 0;const y=ji(),m=pe();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e,s,l){super(r,o,i,e,s,l),this.predictedAlt=t}};return h=a([d(3,m.NotNull)],h),ur.LookaheadEventInfo=h,ur}var lr={},Pf;function Dx(){if(Pf)return lr;Pf=1;/*!
494
+ */var a=Nn&&Nn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.StarLoopbackState=void 0;const d=dr(),y=qe(),m=pe();let h=class extends d.ATNState{get loopEntryState(){return this.transition(0).target}get stateType(){return y.ATNStateType.STAR_LOOP_BACK}};return a([m.Override],h.prototype,"stateType",null),Nn.StarLoopbackState=h,Nn}var Cn={},Ff;function bx(){if(Ff)return Cn;Ff=1;/*!
494
495
  * Copyright 2016 The ANTLR Project. All rights reserved.
495
496
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
496
- */var a=lr&&lr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=lr&&lr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(lr,"__esModule",{value:!0}),lr.PredicateEvalInfo=void 0;const y=ji(),m=pe();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e,s,l,c){super(o,r,t,i,e,r.useContext),this.semctx=s,this.evalResult=l,this.predictedAlt=c}};return h=a([d(0,m.NotNull),d(2,m.NotNull),d(5,m.NotNull)],h),lr.PredicateEvalInfo=h,lr}var Ff;function If(){if(Ff)return rr;Ff=1;/*!
497
+ */var a=Cn&&Cn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.TokensStartState=void 0;const d=qe(),y=kn(),m=pe();let h=class extends y.DecisionState{get stateType(){return d.ATNStateType.TOKEN_START}};return a([m.Override],h.prototype,"stateType",null),Cn.TokensStartState=h,Cn}var mi={},If;function Nx(){if(If)return mi;If=1;/*!
497
498
  * Copyright 2016 The ANTLR Project. All rights reserved.
498
499
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
499
- */var a=rr&&rr.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var b=v.length-1;b>=0;b--)(N=v[b])&&(E=(A<3?N(E):A>3?N(x,g,E):N(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},d=rr&&rr.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(rr,"__esModule",{value:!0}),rr.ProfilingATNSimulator=void 0;const y=Tx(),m=lt(),h=uo(),u=bx(),r=Nx(),o=Cx(),t=pe(),i=Ox(),e=qi(),s=Dx(),l=Gn(),c=Ep();let p=class extends e.ParserATNSimulator{constructor(x){super(x.interpreter.atn,x),this._startIndex=0,this._sllStopIndex=0,this._llStopIndex=0,this.currentDecision=0,this.conflictingAltResolvedBySLL=0,this.optimize_ll1=!1,this.reportAmbiguities=!0,this.numDecisions=this.atn.decisionToState.length,this.decisions=[];for(let g=0;g<this.numDecisions;g++)this.decisions.push(new r.DecisionInfo(g))}adaptivePredict(x,g,_,A){if(A!==void 0)return super.adaptivePredict(x,g,_,A);try{this._input=x,this._startIndex=x.index,this._sllStopIndex=this._startIndex-1,this._llStopIndex=-1,this.currentDecision=g,this.currentState=void 0,this.conflictingAltResolvedBySLL=m.ATN.INVALID_ALT_NUMBER;let E=process.hrtime(),N=super.adaptivePredict(x,g,_),b=process.hrtime(),w=(b[0]-E[0])*1e9;w===0?w=b[1]-E[1]:w+=1e9-E[1]+b[1],this.decisions[g].timeInPrediction+=w,this.decisions[g].invocations++;let P=this._sllStopIndex-this._startIndex+1;if(this.decisions[g].SLL_TotalLook+=P,this.decisions[g].SLL_MinLook=this.decisions[g].SLL_MinLook===0?P:Math.min(this.decisions[g].SLL_MinLook,P),P>this.decisions[g].SLL_MaxLook&&(this.decisions[g].SLL_MaxLook=P,this.decisions[g].SLL_MaxLookEvent=new i.LookaheadEventInfo(g,void 0,N,x,this._startIndex,this._sllStopIndex,!1)),this._llStopIndex>=0){let j=this._llStopIndex-this._startIndex+1;this.decisions[g].LL_TotalLook+=j,this.decisions[g].LL_MinLook=this.decisions[g].LL_MinLook===0?j:Math.min(this.decisions[g].LL_MinLook,j),j>this.decisions[g].LL_MaxLook&&(this.decisions[g].LL_MaxLook=j,this.decisions[g].LL_MaxLookEvent=new i.LookaheadEventInfo(g,void 0,N,x,this._startIndex,this._llStopIndex,!0))}return N}finally{this._input=void 0,this.currentDecision=-1}}getStartState(x,g,_,A){let E=super.getStartState(x,g,_,A);return this.currentState=E,E}computeStartState(x,g,_){let A=super.computeStartState(x,g,_);return this.currentState=A,A}computeReachSet(x,g,_,A){if(this._input===void 0)throw new Error("Invalid state");let E=super.computeReachSet(x,g,_,A);return E==null&&this.decisions[this.currentDecision].errors.push(new o.ErrorInfo(this.currentDecision,g,this._input,this._startIndex,this._input.index)),this.currentState=E,E}getExistingTargetState(x,g){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");this.currentState.useContext?this._llStopIndex=this._input.index:this._sllStopIndex=this._input.index;let _=super.getExistingTargetState(x,g);if(_!=null&&(this.currentState=new c.SimulatorState(this.currentState.outerContext,_,this.currentState.useContext,this.currentState.remainingOuterContext),this.currentState.useContext?this.decisions[this.currentDecision].LL_DFATransitions++:this.decisions[this.currentDecision].SLL_DFATransitions++,_===h.ATNSimulator.ERROR)){let A=new c.SimulatorState(this.currentState.outerContext,x,this.currentState.useContext,this.currentState.remainingOuterContext);this.decisions[this.currentDecision].errors.push(new o.ErrorInfo(this.currentDecision,A,this._input,this._startIndex,this._input.index))}return _}computeTargetState(x,g,_,A,E,N){let b=super.computeTargetState(x,g,_,A,E,N);return E?this.decisions[this.currentDecision].LL_ATNTransitions++:this.decisions[this.currentDecision].SLL_ATNTransitions++,b}evalSemanticContextImpl(x,g,_){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let A=super.evalSemanticContextImpl(x,g,_);if(!(x instanceof l.SemanticContext.PrecedencePredicate)){let N=this._llStopIndex>=0?this._llStopIndex:this._sllStopIndex;this.decisions[this.currentDecision].predicateEvals.push(new s.PredicateEvalInfo(this.currentState,this.currentDecision,this._input,this._startIndex,N,x,A,_))}return A}reportContextSensitivity(x,g,_,A,E){if(this._input===void 0)throw new Error("Invalid state");g!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new u.ContextSensitivityInfo(this.currentDecision,_,this._input,A,E)),super.reportContextSensitivity(x,g,_,A,E)}reportAttemptingFullContext(x,g,_,A,E){g!=null?this.conflictingAltResolvedBySLL=g.nextSetBit(0):this.conflictingAltResolvedBySLL=_.s0.configs.getRepresentedAlternatives().nextSetBit(0),this.decisions[this.currentDecision].LL_Fallback++,super.reportAttemptingFullContext(x,g,_,A,E)}reportAmbiguity(x,g,_,A,E,N,b){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let w;N!=null?w=N.nextSetBit(0):w=b.getRepresentedAlternatives().nextSetBit(0),this.conflictingAltResolvedBySLL!==m.ATN.INVALID_ALT_NUMBER&&w!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new u.ContextSensitivityInfo(this.currentDecision,this.currentState,this._input,_,A)),this.decisions[this.currentDecision].ambiguities.push(new y.AmbiguityInfo(this.currentDecision,this.currentState,N,this._input,_,A)),super.reportAmbiguity(x,g,_,A,E,N,b)}getDecisionInfo(){return this.decisions}getCurrentState(){return this.currentState}};return a([t.Override,d(0,t.NotNull)],p.prototype,"adaptivePredict",null),a([t.Override],p.prototype,"getStartState",null),a([t.Override],p.prototype,"computeStartState",null),a([t.Override],p.prototype,"computeReachSet",null),a([t.Override],p.prototype,"getExistingTargetState",null),a([t.Override],p.prototype,"computeTargetState",null),a([t.Override],p.prototype,"evalSemanticContextImpl",null),a([t.Override],p.prototype,"reportContextSensitivity",null),a([t.Override],p.prototype,"reportAttemptingFullContext",null),a([t.Override,d(0,t.NotNull),d(5,t.NotNull),d(6,t.NotNull)],p.prototype,"reportAmbiguity",null),rr.ProfilingATNSimulator=p,rr}var Lf;function $i(){if(Lf)return Ke;Lf=1;/*!
500
+ */Object.defineProperty(mi,"__esModule",{value:!0}),mi.UUID=void 0;const a=ke();let d=class pa{constructor(m,h,u,r){this.data=new Uint32Array(4),this.data[0]=m,this.data[1]=h,this.data[2]=u,this.data[3]=r}static fromString(m){if(!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(m))throw new Error("Incorrectly formatted UUID");let h=m.split("-"),u=parseInt(h[0],16),r=(parseInt(h[1],16)<<16>>>0)+parseInt(h[2],16),o=(parseInt(h[3],16)<<16>>>0)+parseInt(h[4].substr(0,4),16),t=parseInt(h[4].substr(-8),16);return new pa(u,r,o,t)}hashCode(){return a.MurmurHash.hashCode([this.data[0],this.data[1],this.data[2],this.data[3]])}equals(m){return m===this?!0:m instanceof pa?this.data[0]===m.data[0]&&this.data[1]===m.data[1]&&this.data[2]===m.data[2]&&this.data[3]===m.data[3]:!1}toString(){return("00000000"+this.data[0].toString(16)).substr(-8)+"-"+("0000"+(this.data[1]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[1].toString(16)).substr(-4)+"-"+("0000"+(this.data[2]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[2].toString(16)).substr(-4)+("00000000"+this.data[3].toString(16)).substr(-8)}};return mi.UUID=d,mi}var Lf;function ho(){if(Lf)return Ct;Lf=1;/*!
500
501
  * Copyright 2016 The ANTLR Project. All rights reserved.
501
502
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
502
- */var a=Ke&&Ke.__decorate||function(A,E,N,b){var w=arguments.length,P=w<3?E:b===null?b=Object.getOwnPropertyDescriptor(E,N):b,j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(A,E,N,b);else for(var W=A.length-1;W>=0;W--)(j=A[W])&&(P=(w<3?j(P):w>3?j(E,N,P):j(E,N))||P);return w>3&&P&&Object.defineProperty(E,N,P),P},d=Ke&&Ke.__param||function(A,E){return function(N,b){E(N,b,A)}},y=Ke&&Ke.__awaiter||function(A,E,N,b){function w(P){return P instanceof N?P:new N(function(j){j(P)})}return new(N||(N=Promise))(function(P,j){function W(Q){try{$(b.next(Q))}catch(ee){j(ee)}}function L(Q){try{$(b.throw(Q))}catch(ee){j(ee)}}function $(Q){Q.done?P(Q.value):w(Q.value).then(W,L)}$((b=b.apply(A,E||[])).next())})};Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.Parser=void 0;const m=ut(),h=cp(),u=po(),r=Ia(),o=Ri(),t=K0(),i=br(),e=pe(),s=sx(),l=qi(),c=Sp(),p=ki(),v=_r(),x=Ie();class g{constructor(E,N){this.ruleNames=E,this.tokenStream=N}enterEveryRule(E){console.log("enter "+this.ruleNames[E.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}exitEveryRule(E){console.log("exit "+this.ruleNames[E.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}visitErrorNode(E){}visitTerminal(E){let N=E.parent.ruleContext,b=E.symbol;console.log("consume "+b+" rule "+this.ruleNames[N.ruleIndex])}}a([e.Override],g.prototype,"enterEveryRule",null),a([e.Override],g.prototype,"exitEveryRule",null),a([e.Override],g.prototype,"visitErrorNode",null),a([e.Override],g.prototype,"visitTerminal",null);let _=class Xi extends p.Recognizer{constructor(E){super(),this._errHandler=new r.DefaultErrorStrategy,this._precedenceStack=new t.IntegerStack,this._buildParseTrees=!0,this._parseListeners=[],this._syntaxErrors=0,this.matchedEOF=!1,this._precedenceStack.push(0),this.inputStream=E}reset(E){(E===void 0||E)&&this.inputStream.seek(0),this._errHandler.reset(this),this._ctx=void 0,this._syntaxErrors=0,this.matchedEOF=!1,this.isTrace=!1,this._precedenceStack.clear(),this._precedenceStack.push(0);let N=this.interpreter;N?.reset()}match(E){let N=this.currentToken;return N.type===E?(E===x.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):(N=this._errHandler.recoverInline(this),this._buildParseTrees&&N.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,N))),N}matchWildcard(){let E=this.currentToken;return E.type>0?(this._errHandler.reportMatch(this),this.consume()):(E=this._errHandler.recoverInline(this),this._buildParseTrees&&E.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,E))),E}set buildParseTree(E){this._buildParseTrees=E}get buildParseTree(){return this._buildParseTrees}getParseListeners(){return this._parseListeners}addParseListener(E){if(E==null)throw new TypeError("listener cannot be null");this._parseListeners.push(E)}removeParseListener(E){let N=this._parseListeners.findIndex(b=>b===E);N!==-1&&this._parseListeners.splice(N,1)}removeParseListeners(){this._parseListeners.length=0}triggerEnterRuleEvent(){for(let E of this._parseListeners)E.enterEveryRule&&E.enterEveryRule(this._ctx),this._ctx.enterRule(E)}triggerExitRuleEvent(){for(let E=this._parseListeners.length-1;E>=0;E--){let N=this._parseListeners[E];this._ctx.exitRule(N),N.exitEveryRule&&N.exitEveryRule(this._ctx)}}get numberOfSyntaxErrors(){return this._syntaxErrors}get tokenFactory(){return this._input.tokenSource.tokenFactory}getATNWithBypassAlts(){let E=this.serializedATN;if(E==null)throw new Error("The current parser does not support an ATN with bypass alternatives.");let N=Xi.bypassAltsAtnCache.get(E);if(N==null){let b=new h.ATNDeserializationOptions;b.isGenerateRuleBypassTransitions=!0,N=new u.ATNDeserializer(b).deserialize(m.toCharArray(E)),Xi.bypassAltsAtnCache.set(E,N)}return N}compileParseTreePattern(E,N,b){return y(this,void 0,void 0,function*(){if(!b){if(this.inputStream){let W=this.inputStream.tokenSource;W instanceof i.Lexer&&(b=W)}if(!b)throw new Error("Parser can't discover a lexer to use")}let w=b,P=yield Promise.resolve().then(()=>Sx());return new P.ParseTreePatternMatcher(w,this).compile(E,N)})}get errorHandler(){return this._errHandler}set errorHandler(E){this._errHandler=E}get inputStream(){return this._input}set inputStream(E){this.reset(!1),this._input=E}get currentToken(){return this._input.LT(1)}notifyErrorListeners(E,N,b){N===void 0?N=this.currentToken:N===null&&(N=void 0),this._syntaxErrors++;let w=-1,P=-1;N!=null&&(w=N.line,P=N.charPositionInLine);let j=this.getErrorListenerDispatch();j.syntaxError&&j.syntaxError(this,N,w,P,E,b)}consume(){let E=this.currentToken;E.type!==Xi.EOF&&this.inputStream.consume();let N=this._parseListeners.length!==0;if(this._buildParseTrees||N)if(this._errHandler.inErrorRecoveryMode(this)){let b=this._ctx.addErrorNode(this.createErrorNode(this._ctx,E));if(N)for(let w of this._parseListeners)w.visitErrorNode&&w.visitErrorNode(b)}else{let b=this.createTerminalNode(this._ctx,E);if(this._ctx.addChild(b),N)for(let w of this._parseListeners)w.visitTerminal&&w.visitTerminal(b)}return E}createTerminalNode(E,N){return new v.TerminalNode(N)}createErrorNode(E,N){return new o.ErrorNode(N)}addContextToParseTree(){let E=this._ctx._parent;E?.addChild(this._ctx)}enterRule(E,N,b){this.state=N,this._ctx=E,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}enterLeftFactoredRule(E,N,b){if(this.state=N,this._buildParseTrees){let w=this._ctx.getChild(this._ctx.childCount-1);this._ctx.removeLastChild(),w._parent=E,E.addChild(w)}this._ctx=E,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this.matchedEOF?this._ctx._stop=this._input.LT(1):this._ctx._stop=this._input.tryLT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx._parent}enterOuterAlt(E,N){if(E.altNumber=N,this._buildParseTrees&&this._ctx!==E){let b=this._ctx._parent;b!=null&&(b.removeLastChild(),b.addChild(E))}this._ctx=E}get precedence(){return this._precedenceStack.isEmpty?-1:this._precedenceStack.peek()}enterRecursionRule(E,N,b,w){this.state=N,this._precedenceStack.push(w),this._ctx=E,this._ctx._start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(E,N,b){let w=this._ctx;w._parent=E,w.invokingState=N,w._stop=this._input.tryLT(-1),this._ctx=E,this._ctx._start=w._start,this._buildParseTrees&&this._ctx.addChild(w),this.triggerEnterRuleEvent()}unrollRecursionContexts(E){this._precedenceStack.pop(),this._ctx._stop=this._input.tryLT(-1);let N=this._ctx;if(this._parseListeners.length>0)for(;this._ctx!==E;)this.triggerExitRuleEvent(),this._ctx=this._ctx._parent;else this._ctx=E;N._parent=E,this._buildParseTrees&&E!=null&&E.addChild(N)}getInvokingContext(E){let N=this._ctx;for(;N&&N.ruleIndex!==E;)N=N._parent;return N}get context(){return this._ctx}set context(E){this._ctx=E}precpred(E,N){return N>=this._precedenceStack.peek()}getErrorListenerDispatch(){return new c.ProxyParserErrorListener(this.getErrorListeners())}inContext(E){return!1}isExpectedToken(E){let N=this.interpreter.atn,b=this._ctx,w=N.states[this.state],P=N.nextTokens(w);if(P.contains(E))return!0;if(!P.contains(x.Token.EPSILON))return!1;for(;b!=null&&b.invokingState>=0&&P.contains(x.Token.EPSILON);){let W=N.states[b.invokingState].transition(0);if(P=N.nextTokens(W.followState),P.contains(E))return!0;b=b._parent}return!!(P.contains(x.Token.EPSILON)&&E===x.Token.EOF)}get isMatchedEOF(){return this.matchedEOF}getExpectedTokens(){return this.atn.getExpectedTokens(this.state,this.context)}getExpectedTokensWithinCurrentRule(){let E=this.interpreter.atn,N=E.states[this.state];return E.nextTokens(N)}getRuleIndex(E){let N=this.getRuleIndexMap().get(E);return N??-1}get ruleContext(){return this._ctx}getRuleInvocationStack(E=this._ctx){let N=E,b=this.ruleNames,w=[];for(;N!=null;){let P=N.ruleIndex;P<0?w.push("n/a"):w.push(b[P]),N=N._parent}return w}getDFAStrings(){let E=[];for(let N of this._interp.atn.decisionToDFA)E.push(N.toString(this.vocabulary,this.ruleNames));return E}dumpDFA(){let E=!1;for(let N of this._interp.atn.decisionToDFA)N.isEmpty||(E&&console.log(),console.log("Decision "+N.decision+":"),process.stdout.write(N.toString(this.vocabulary,this.ruleNames)),E=!0)}get sourceName(){return this._input.sourceName}get parseInfo(){return Promise.resolve().then(()=>If()).then(E=>{let N=this.interpreter;if(N instanceof E.ProfilingATNSimulator)return new s.ParseInfo(N)})}setProfile(E){return y(this,void 0,void 0,function*(){let N=yield Promise.resolve().then(()=>If()),b=this.interpreter;E?b instanceof N.ProfilingATNSimulator||(this.interpreter=new N.ProfilingATNSimulator(this)):b instanceof N.ProfilingATNSimulator&&(this.interpreter=new l.ParserATNSimulator(this.atn,this)),this.interpreter.setPredictionMode(b.getPredictionMode())})}set isTrace(E){E?(this._tracer?this.removeParseListener(this._tracer):this._tracer=new g(this.ruleNames,this._input),this.addParseListener(this._tracer)):this._tracer&&(this.removeParseListener(this._tracer),this._tracer=void 0)}get isTrace(){return this._tracer!=null}};return _.bypassAltsAtnCache=new Map,a([e.NotNull],_.prototype,"_errHandler",void 0),a([e.NotNull],_.prototype,"match",null),a([e.NotNull],_.prototype,"matchWildcard",null),a([e.NotNull],_.prototype,"getParseListeners",null),a([d(0,e.NotNull)],_.prototype,"addParseListener",null),a([e.NotNull],_.prototype,"getATNWithBypassAlts",null),a([e.NotNull,d(0,e.NotNull)],_.prototype,"errorHandler",null),a([e.Override],_.prototype,"inputStream",null),a([e.NotNull],_.prototype,"currentToken",null),a([d(0,e.NotNull)],_.prototype,"enterRule",null),a([e.Override,d(0,e.Nullable)],_.prototype,"precpred",null),a([e.Override],_.prototype,"getErrorListenerDispatch",null),a([e.NotNull],_.prototype,"getExpectedTokens",null),a([e.NotNull],_.prototype,"getExpectedTokensWithinCurrentRule",null),a([e.Override],_.prototype,"parseInfo",null),Ke.Parser=_,Ke}var Bf;function ho(){if(Bf)return Jr;Bf=1;/*!
503
+ */var a=Ct&&Ct.__decorate||function(J,M,V,Z){var se=arguments.length,fe=se<3?M:Z===null?Z=Object.getOwnPropertyDescriptor(M,V):Z,he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")fe=Reflect.decorate(J,M,V,Z);else for(var K=J.length-1;K>=0;K--)(he=J[K])&&(fe=(se<3?he(fe):se>3?he(M,V,fe):he(M,V))||fe);return se>3&&fe&&Object.defineProperty(M,V,fe),fe},d=Ct&&Ct.__param||function(J,M){return function(V,Z){M(V,Z,J)}};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.ATNDeserializer=void 0;const y=up(),m=Ar(),h=lt(),u=lp(),r=qe(),o=cp(),t=Lh(),i=ip(),e=vr(),s=Bh(),l=lo(),c=kn(),p=Z0(),v=kh(),x=Mn(),g=sp(),_=Mh(),A=qh(),E=jh(),N=$h(),b=Uh(),w=Vh(),P=zh(),j=Hh(),W=mp(),L=pe(),$=Da(),Q=$i(),ee=gx(),I=_x(),X=Ax(),ie=gp(),ce=vx(),oe=Ex(),te=Mi(),B=wa(),G=Oa(),O=Sx(),C=Tx(),D=Ta(),F=Ie(),k=bx(),T=Nx(),R=ap();var q;(function(J){J[J.UNICODE_BMP=0]="UNICODE_BMP",J[J.UNICODE_SMP=1]="UNICODE_SMP"})(q||(q={}));let H=class Ae{constructor(M){M===void 0&&(M=u.ATNDeserializationOptions.defaultOptions),this.deserializationOptions=M}static get SERIALIZED_VERSION(){return 3}static isFeatureSupported(M,V){let Z=Ae.SUPPORTED_UUIDS.findIndex(se=>se.equals(M));return Z<0?!1:Ae.SUPPORTED_UUIDS.findIndex(se=>se.equals(V))>=Z}static getUnicodeDeserializer(M){return M===0?{readUnicode:(V,Z)=>Ae.toInt(V[Z]),size:1}:{readUnicode:(V,Z)=>Ae.toInt32(V,Z),size:2}}deserialize(M){M=M.slice(0);for(let ue=1;ue<M.length;ue++)M[ue]=M[ue]-2&65535;let V=0,Z=Ae.toInt(M[V++]);if(Z!==Ae.SERIALIZED_VERSION){let ue=`Could not deserialize ATN with version ${Z} (expected ${Ae.SERIALIZED_VERSION}).`;throw new Error(ue)}let se=Ae.toUUID(M,V);if(V+=8,Ae.SUPPORTED_UUIDS.findIndex(ue=>ue.equals(se))<0){let ue=`Could not deserialize ATN with UUID ${se} (expected ${Ae.SERIALIZED_UUID} or a legacy UUID).`;throw new Error(ue)}let fe=Ae.isFeatureSupported(Ae.ADDED_LEXER_ACTIONS,se),he=Ae.toInt(M[V++]),K=Ae.toInt(M[V++]),ae=new h.ATN(he,K),de=[],Ce=[],Re=Ae.toInt(M[V++]);for(let ue=0;ue<Re;ue++){let ve=Ae.toInt(M[V++]);if(ve===r.ATNStateType.INVALID_TYPE){ae.addState(new g.InvalidState);continue}let Ee=Ae.toInt(M[V++]);Ee===65535&&(Ee=-1);let z=this.stateFactory(ve,Ee);if(ve===r.ATNStateType.LOOP_END){let f=Ae.toInt(M[V++]);de.push([z,f])}else if(z instanceof l.BlockStartState){let f=Ae.toInt(M[V++]);Ce.push([z,f])}ae.addState(z)}for(let ue of de)ue[0].loopBackState=ae.states[ue[1]];for(let ue of Ce)ue[0].endState=ae.states[ue[1]];let Y=Ae.toInt(M[V++]);for(let ue=0;ue<Y;ue++){let ve=Ae.toInt(M[V++]);ae.states[ve].nonGreedy=!0}let re=Ae.toInt(M[V++]);for(let ue=0;ue<re;ue++){let ve=Ae.toInt(M[V++]);ae.states[ve].sll=!0}let xe=Ae.toInt(M[V++]);for(let ue=0;ue<xe;ue++){let ve=Ae.toInt(M[V++]);ae.states[ve].isPrecedenceRule=!0}let ge=Ae.toInt(M[V++]);ae.grammarType===0&&(ae.ruleToTokenType=new Int32Array(ge)),ae.ruleToStartState=new Array(ge);for(let ue=0;ue<ge;ue++){let ve=Ae.toInt(M[V++]),Ee=ae.states[ve];if(Ee.leftFactored=Ae.toInt(M[V++])!==0,ae.ruleToStartState[ue]=Ee,ae.grammarType===0){let z=Ae.toInt(M[V++]);z===65535&&(z=F.Token.EOF),ae.ruleToTokenType[ue]=z,Ae.isFeatureSupported(Ae.ADDED_LEXER_ACTIONS,se)||Ae.toInt(M[V++])}}ae.ruleToStopState=new Array(ge);for(let ue of ae.states)ue instanceof te.RuleStopState&&(ae.ruleToStopState[ue.ruleIndex]=ue,ae.ruleToStartState[ue.ruleIndex].stopState=ue);let _e=Ae.toInt(M[V++]);for(let ue=0;ue<_e;ue++){let ve=Ae.toInt(M[V++]);ae.modeToStartState.push(ae.states[ve])}ae.modeToDFA=new Array(_e);for(let ue=0;ue<_e;ue++)ae.modeToDFA[ue]=new p.DFA(ae.modeToStartState[ue]);let be=[];V=this.deserializeSets(M,V,be,Ae.getUnicodeDeserializer(0)),Ae.isFeatureSupported(Ae.ADDED_UNICODE_SMP,se)&&(V=this.deserializeSets(M,V,be,Ae.getUnicodeDeserializer(1)));let Te=Ae.toInt(M[V++]);for(let ue=0;ue<Te;ue++){let ve=Ae.toInt(M[V]),Ee=Ae.toInt(M[V+1]),z=Ae.toInt(M[V+2]),f=Ae.toInt(M[V+3]),S=Ae.toInt(M[V+4]),U=Ae.toInt(M[V+5]),le=this.edgeFactory(ae,z,ve,Ee,f,S,U,be);ae.states[ve].addTransition(le),V+=6}let De=new m.Array2DHashSet({hashCode:ue=>ue.stopState^ue.returnState^ue.outermostPrecedenceReturn,equals:(ue,ve)=>ue.stopState===ve.stopState&&ue.returnState===ve.returnState&&ue.outermostPrecedenceReturn===ve.outermostPrecedenceReturn}),Pe=[];for(let ue of ae.states){let ve=ue.ruleIndex>=0&&ae.ruleToStartState[ue.ruleIndex].leftFactored;for(let Ee=0;Ee<ue.numberOfTransitions;Ee++){let z=ue.transition(Ee);if(!(z instanceof B.RuleTransition))continue;let f=z;if(!ae.ruleToStartState[f.target.ruleIndex].leftFactored&&ve)continue;let U=-1;ae.ruleToStartState[f.target.ruleIndex].isPrecedenceRule&&f.precedence===0&&(U=f.target.ruleIndex);let le={stopState:f.target.ruleIndex,returnState:f.followState.stateNumber,outermostPrecedenceReturn:U};De.add(le)&&Pe.push(le)}}for(let ue of Pe){let ve=new v.EpsilonTransition(ae.states[ue.returnState],ue.outermostPrecedenceReturn);ae.ruleToStopState[ue.stopState].addTransition(ve)}for(let ue of ae.states){if(ue instanceof l.BlockStartState){if(ue.endState===void 0)throw new Error("IllegalStateException");if(ue.endState.startState!==void 0)throw new Error("IllegalStateException");ue.endState.startState=ue}if(ue instanceof I.PlusLoopbackState){let ve=ue;for(let Ee=0;Ee<ve.numberOfTransitions;Ee++){let z=ve.transition(Ee).target;z instanceof ee.PlusBlockStartState&&(z.loopBackState=ve)}}else if(ue instanceof C.StarLoopbackState){let ve=ue;for(let Ee=0;Ee<ve.numberOfTransitions;Ee++){let z=ve.transition(Ee).target;z instanceof D.StarLoopEntryState&&(z.loopBackState=ve)}}}let Le=Ae.toInt(M[V++]);for(let ue=1;ue<=Le;ue++){let ve=Ae.toInt(M[V++]),Ee=ae.states[ve];ae.decisionToState.push(Ee),Ee.decision=ue-1}if(ae.grammarType===0)if(fe){ae.lexerActions=new Array(Ae.toInt(M[V++]));for(let ue=0;ue<ae.lexerActions.length;ue++){let ve=Ae.toInt(M[V++]),Ee=Ae.toInt(M[V++]);Ee===65535&&(Ee=-1);let z=Ae.toInt(M[V++]);z===65535&&(z=-1);let f=this.lexerActionFactory(ve,Ee,z);ae.lexerActions[ue]=f}}else{let ue=[];for(let ve of ae.states)for(let Ee=0;Ee<ve.numberOfTransitions;Ee++){let z=ve.transition(Ee);if(!(z instanceof y.ActionTransition))continue;let f=z.ruleIndex,S=z.actionIndex,U=new A.LexerCustomAction(f,S);ve.setTransition(Ee,new y.ActionTransition(z.target,f,ue.length,!1)),ue.push(U)}ae.lexerActions=ue}this.markPrecedenceDecisions(ae),ae.decisionToDFA=new Array(Le);for(let ue=0;ue<Le;ue++)ae.decisionToDFA[ue]=new p.DFA(ae.decisionToState[ue],ue);if(this.deserializationOptions.isVerifyATN&&this.verifyATN(ae),this.deserializationOptions.isGenerateRuleBypassTransitions&&ae.grammarType===1){ae.ruleToTokenType=new Int32Array(ae.ruleToStartState.length);for(let ue=0;ue<ae.ruleToStartState.length;ue++)ae.ruleToTokenType[ue]=ae.maxTokenType+ue+1;for(let ue=0;ue<ae.ruleToStartState.length;ue++){let ve=new t.BasicBlockStartState;ve.ruleIndex=ue,ae.addState(ve);let Ee=new s.BlockEndState;Ee.ruleIndex=ue,ae.addState(Ee),ve.endState=Ee,ae.defineDecisionState(ve),Ee.startState=ve;let z,f;if(ae.ruleToStartState[ue].isPrecedenceRule){z=void 0;for(let U of ae.states){if(U.ruleIndex!==ue||!(U instanceof D.StarLoopEntryState))continue;let le=U.transition(U.numberOfTransitions-1).target;if(le instanceof W.LoopEndState&&le.epsilonOnlyTransitions&&le.transition(0).target instanceof te.RuleStopState){z=U;break}}if(!z)throw new Error("Couldn't identify final state of the precedence rule prefix section.");f=z.loopBackState.transition(0)}else z=ae.ruleToStopState[ue];for(let U of ae.states)for(let le=0;le<U.numberOfTransitions;le++){let me=U.transition(le);me!==f&&me.target===z&&(me.target=Ee)}for(;ae.ruleToStartState[ue].numberOfTransitions>0;){let U=ae.ruleToStartState[ue].removeTransition(ae.ruleToStartState[ue].numberOfTransitions-1);ve.addTransition(U)}ae.ruleToStartState[ue].addTransition(new v.EpsilonTransition(ve)),Ee.addTransition(new v.EpsilonTransition(z));let S=new i.BasicState;ae.addState(S),S.addTransition(new o.AtomTransition(Ee,ae.ruleToTokenType[ue])),ve.addTransition(new v.EpsilonTransition(S))}this.deserializationOptions.isVerifyATN&&this.verifyATN(ae)}if(this.deserializationOptions.isOptimize){for(;;){let ue=0;ue+=Ae.inlineSetRules(ae),ue+=Ae.combineChainedEpsilons(ae);let ve=ae.grammarType===0;if(ue+=Ae.optimizeSets(ae,ve),ue===0)break}this.deserializationOptions.isVerifyATN&&this.verifyATN(ae)}return Ae.identifyTailCalls(ae),ae}deserializeSets(M,V,Z,se){let fe=Ae.toInt(M[V++]);for(let he=0;he<fe;he++){let K=Ae.toInt(M[V]);V++;let ae=new x.IntervalSet;Z.push(ae),Ae.toInt(M[V++])!==0&&ae.add(-1);for(let Ce=0;Ce<K;Ce++){let Re=se.readUnicode(M,V);V+=se.size;let Y=se.readUnicode(M,V);V+=se.size,ae.add(Re,Y)}}return V}markPrecedenceDecisions(M){let V=new Map;for(let Z of M.states)if(Z instanceof D.StarLoopEntryState&&M.ruleToStartState[Z.ruleIndex].isPrecedenceRule){let se=Z.transition(Z.numberOfTransitions-1).target;se instanceof W.LoopEndState&&se.epsilonOnlyTransitions&&se.transition(0).target instanceof te.RuleStopState&&(V.set(Z.ruleIndex,Z),Z.precedenceRuleDecision=!0,Z.precedenceLoopbackStates=new e.BitSet(M.states.length))}for(let Z of V)for(let se of M.ruleToStopState[Z[0]].getTransitions())se.serializationType!==1||se.outermostPrecedenceReturn!==-1||Z[1].precedenceLoopbackStates.set(se.target.stateNumber)}verifyATN(M){for(let V of M.states)if(this.checkCondition(V!==void 0,"ATN states should not be undefined."),V.stateType!==r.ATNStateType.INVALID_TYPE){if(this.checkCondition(V.onlyHasEpsilonTransitions||V.numberOfTransitions<=1),V instanceof ee.PlusBlockStartState&&this.checkCondition(V.loopBackState!==void 0),V instanceof D.StarLoopEntryState){let Z=V;if(this.checkCondition(Z.loopBackState!==void 0),this.checkCondition(Z.numberOfTransitions===2),Z.transition(0).target instanceof O.StarBlockStartState)this.checkCondition(Z.transition(1).target instanceof W.LoopEndState),this.checkCondition(!Z.nonGreedy);else if(Z.transition(0).target instanceof W.LoopEndState)this.checkCondition(Z.transition(1).target instanceof O.StarBlockStartState),this.checkCondition(Z.nonGreedy);else throw new Error("IllegalStateException")}if(V instanceof C.StarLoopbackState&&(this.checkCondition(V.numberOfTransitions===1),this.checkCondition(V.transition(0).target instanceof D.StarLoopEntryState)),V instanceof W.LoopEndState&&this.checkCondition(V.loopBackState!==void 0),V instanceof oe.RuleStartState&&this.checkCondition(V.stopState!==void 0),V instanceof l.BlockStartState&&this.checkCondition(V.endState!==void 0),V instanceof s.BlockEndState&&this.checkCondition(V.startState!==void 0),V instanceof c.DecisionState){let Z=V;this.checkCondition(Z.numberOfTransitions<=1||Z.decision>=0)}else this.checkCondition(V.numberOfTransitions<=1||V instanceof te.RuleStopState)}}checkCondition(M,V){if(!M)throw new Error("IllegalStateException: "+V)}static inlineSetRules(M){let V=0,Z=new Array(M.ruleToStartState.length);for(let se=0;se<M.ruleToStartState.length;se++){let he=M.ruleToStartState[se];for(;he.onlyHasEpsilonTransitions&&he.numberOfOptimizedTransitions===1&&he.getOptimizedTransition(0).serializationType===1;)he=he.getOptimizedTransition(0).target;if(he.numberOfOptimizedTransitions!==1)continue;let K=he.getOptimizedTransition(0),ae=K.target;if(!(K.isEpsilon||!ae.onlyHasEpsilonTransitions||ae.numberOfOptimizedTransitions!==1||!(ae.getOptimizedTransition(0).target instanceof te.RuleStopState)))switch(K.serializationType){case 5:case 2:case 7:Z[se]=K;break;case 8:case 9:continue;default:continue}}for(let se of M.states){if(se.ruleIndex<0)continue;let fe;for(let he=0;he<se.numberOfOptimizedTransitions;he++){let K=se.getOptimizedTransition(he);if(!(K instanceof B.RuleTransition)){fe!==void 0&&fe.push(K);continue}let ae=K,de=Z[ae.target.ruleIndex];if(de===void 0){fe!==void 0&&fe.push(K);continue}if(fe===void 0){fe=[];for(let Y=0;Y<he;Y++)fe.push(se.getOptimizedTransition(he))}V++;let Ce=ae.followState,Re=new i.BasicState;switch(Re.setRuleIndex(Ce.ruleIndex),M.addState(Re),fe.push(new v.EpsilonTransition(Re)),de.serializationType){case 5:Re.addTransition(new o.AtomTransition(Ce,de._label));break;case 2:Re.addTransition(new ce.RangeTransition(Ce,de.from,de.to));break;case 7:Re.addTransition(new G.SetTransition(Ce,de.label));break;default:throw new Error("UnsupportedOperationException")}}if(fe!==void 0){if(se.isOptimized)for(;se.numberOfOptimizedTransitions>0;)se.removeOptimizedTransition(se.numberOfOptimizedTransitions-1);for(let he of fe)se.addOptimizedTransition(he)}}return Q.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+V+" rule invocations by inlining sets."),V}static combineChainedEpsilons(M){let V=0;for(let Z of M.states){if(!Z.onlyHasEpsilonTransitions||Z instanceof te.RuleStopState)continue;let se;e:for(let fe=0;fe<Z.numberOfOptimizedTransitions;fe++){let he=Z.getOptimizedTransition(fe),K=he.target;if(he.serializationType!==1||he.outermostPrecedenceReturn!==-1||K.stateType!==r.ATNStateType.BASIC||!K.onlyHasEpsilonTransitions){se!==void 0&&se.push(he);continue e}for(let ae=0;ae<K.numberOfOptimizedTransitions;ae++)if(K.getOptimizedTransition(ae).serializationType!==1||K.getOptimizedTransition(ae).outermostPrecedenceReturn!==-1){se!==void 0&&se.push(he);continue e}if(V++,se===void 0){se=[];for(let ae=0;ae<fe;ae++)se.push(Z.getOptimizedTransition(ae))}for(let ae=0;ae<K.numberOfOptimizedTransitions;ae++){let de=K.getOptimizedTransition(ae).target;se.push(new v.EpsilonTransition(de))}}if(se!==void 0){if(Z.isOptimized)for(;Z.numberOfOptimizedTransitions>0;)Z.removeOptimizedTransition(Z.numberOfOptimizedTransitions-1);for(let fe of se)Z.addOptimizedTransition(fe)}}return Q.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+V+" transitions by combining chained epsilon transitions."),V}static optimizeSets(M,V){if(V)return 0;let Z=0,se=M.decisionToState;for(let fe of se){let he=new x.IntervalSet;for(let Y=0;Y<fe.numberOfOptimizedTransitions;Y++){let re=fe.getOptimizedTransition(Y);if(!(re instanceof v.EpsilonTransition)||re.target.numberOfOptimizedTransitions!==1)continue;let xe=re.target.getOptimizedTransition(0);xe.target instanceof s.BlockEndState&&(xe instanceof $.NotSetTransition||(xe instanceof o.AtomTransition||xe instanceof ce.RangeTransition||xe instanceof G.SetTransition)&&he.add(Y))}if(he.size<=1)continue;let K=[];for(let Y=0;Y<fe.numberOfOptimizedTransitions;Y++)he.contains(Y)||K.push(fe.getOptimizedTransition(Y));let ae=fe.getOptimizedTransition(he.minElement).target.getOptimizedTransition(0).target,de=new x.IntervalSet;for(let Y of he.intervals)for(let re=Y.a;re<=Y.b;re++){let xe=fe.getOptimizedTransition(re).target.getOptimizedTransition(0);if(xe instanceof $.NotSetTransition)throw new Error("Not yet implemented.");de.addAll(xe.label)}let Ce;if(de.intervals.length===1)if(de.size===1)Ce=new o.AtomTransition(ae,de.minElement);else{let Y=de.intervals[0];Ce=new ce.RangeTransition(ae,Y.a,Y.b)}else Ce=new G.SetTransition(ae,de);let Re=new i.BasicState;if(Re.setRuleIndex(fe.ruleIndex),M.addState(Re),Re.addTransition(Ce),K.push(new v.EpsilonTransition(Re)),Z+=fe.numberOfOptimizedTransitions-K.length,fe.isOptimized)for(;fe.numberOfOptimizedTransitions>0;)fe.removeOptimizedTransition(fe.numberOfOptimizedTransitions-1);for(let Y of K)fe.addOptimizedTransition(Y)}return Q.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+Z+" paths by collapsing sets."),Z}static identifyTailCalls(M){for(let V of M.states){for(let Z=0;Z<V.numberOfTransitions;Z++){let se=V.transition(Z);se instanceof B.RuleTransition&&(se.tailCall=this.testTailCall(M,se,!1),se.optimizedTailCall=this.testTailCall(M,se,!0))}if(V.isOptimized)for(let Z=0;Z<V.numberOfOptimizedTransitions;Z++){let se=V.getOptimizedTransition(Z);se instanceof B.RuleTransition&&(se.tailCall=this.testTailCall(M,se,!1),se.optimizedTailCall=this.testTailCall(M,se,!0))}}}static testTailCall(M,V,Z){if(!Z&&V.tailCall||Z&&V.optimizedTailCall)return!0;let se=new e.BitSet(M.states.length),fe=[];for(fe.push(V.followState);;){let he=fe.pop();if(!he)break;if(se.get(he.stateNumber)||he instanceof te.RuleStopState)continue;if(!he.onlyHasEpsilonTransitions)return!1;let K=Z?he.numberOfOptimizedTransitions:he.numberOfTransitions;for(let ae=0;ae<K;ae++){let de=Z?he.getOptimizedTransition(ae):he.transition(ae);if(de.serializationType!==1)return!1;fe.push(de.target)}}return!0}static toInt(M){return M}static toInt32(M,V){return(M[V]|M[V+1]<<16)>>>0}static toUUID(M,V){let Z=Ae.toInt32(M,V),se=Ae.toInt32(M,V+2),fe=Ae.toInt32(M,V+4),he=Ae.toInt32(M,V+6);return new T.UUID(he,fe,se,Z)}edgeFactory(M,V,Z,se,fe,he,K,ae){let de=M.states[se];switch(V){case 1:return new v.EpsilonTransition(de);case 2:return K!==0?new ce.RangeTransition(de,F.Token.EOF,he):new ce.RangeTransition(de,fe,he);case 3:return new B.RuleTransition(M.states[fe],he,K,de);case 4:return new ie.PredicateTransition(de,fe,he,K!==0);case 10:return new X.PrecedencePredicateTransition(de,fe);case 5:return K!==0?new o.AtomTransition(de,F.Token.EOF):new o.AtomTransition(de,fe);case 6:return new y.ActionTransition(de,fe,he,K!==0);case 7:return new G.SetTransition(de,ae[fe]);case 8:return new $.NotSetTransition(de,ae[fe]);case 9:return new R.WildcardTransition(de)}throw new Error("The specified transition type is not valid.")}stateFactory(M,V){let Z;switch(M){case r.ATNStateType.INVALID_TYPE:return new g.InvalidState;case r.ATNStateType.BASIC:Z=new i.BasicState;break;case r.ATNStateType.RULE_START:Z=new oe.RuleStartState;break;case r.ATNStateType.BLOCK_START:Z=new t.BasicBlockStartState;break;case r.ATNStateType.PLUS_BLOCK_START:Z=new ee.PlusBlockStartState;break;case r.ATNStateType.STAR_BLOCK_START:Z=new O.StarBlockStartState;break;case r.ATNStateType.TOKEN_START:Z=new k.TokensStartState;break;case r.ATNStateType.RULE_STOP:Z=new te.RuleStopState;break;case r.ATNStateType.BLOCK_END:Z=new s.BlockEndState;break;case r.ATNStateType.STAR_LOOP_BACK:Z=new C.StarLoopbackState;break;case r.ATNStateType.STAR_LOOP_ENTRY:Z=new D.StarLoopEntryState;break;case r.ATNStateType.PLUS_LOOP_BACK:Z=new I.PlusLoopbackState;break;case r.ATNStateType.LOOP_END:Z=new W.LoopEndState;break;default:let se=`The specified state type ${M} is not valid.`;throw new Error(se)}return Z.ruleIndex=V,Z}lexerActionFactory(M,V,Z){switch(M){case 0:return new _.LexerChannelAction(V);case 1:return new A.LexerCustomAction(V,Z);case 2:return new E.LexerModeAction(V);case 3:return N.LexerMoreAction.INSTANCE;case 4:return b.LexerPopModeAction.INSTANCE;case 5:return new w.LexerPushModeAction(V);case 6:return P.LexerSkipAction.INSTANCE;case 7:return new j.LexerTypeAction(V);default:let se=`The specified lexer action type ${M} is not valid.`;throw new Error(se)}}};return H.BASE_SERIALIZED_UUID=T.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"),H.ADDED_LEXER_ACTIONS=T.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D"),H.ADDED_UNICODE_SMP=T.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B"),H.SUPPORTED_UUIDS=[H.BASE_SERIALIZED_UUID,H.ADDED_LEXER_ACTIONS,H.ADDED_UNICODE_SMP],H.SERIALIZED_UUID=H.ADDED_UNICODE_SMP,a([L.NotNull],H.prototype,"deserializationOptions",void 0),a([d(0,L.NotNull)],H.prototype,"deserialize",null),a([d(0,L.NotNull)],H.prototype,"markPrecedenceDecisions",null),a([L.NotNull,d(0,L.NotNull)],H.prototype,"edgeFactory",null),Ct.ATNDeserializer=H,Ct}var On={},Vs={},Bf;function Cx(){if(Bf)return Vs;Bf=1;/*!
503
504
  * Copyright 2016 The ANTLR Project. All rights reserved.
504
505
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
505
- */var a=Jr&&Jr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.NoViableAltException=void 0;const d=$i(),y=Ar(),m=pe();let h=class extends y.RecognitionException{constructor(r,o,t,i,e,s){r instanceof d.Parser&&(o===void 0&&(o=r.inputStream),t===void 0&&(t=r.currentToken),i===void 0&&(i=r.currentToken),s===void 0&&(s=r.context)),super(r,o,s),this._deadEndConfigs=e,this._startToken=t,this.setOffendingToken(r,i)}get startToken(){return this._startToken}get deadEndConfigs(){return this._deadEndConfigs}};return a([m.NotNull],h.prototype,"_startToken",void 0),Jr.NoViableAltException=h,Jr}var kf;function Ia(){if(kf)return ct;kf=1;/*!
506
+ */return Object.defineProperty(Vs,"__esModule",{value:!0}),Vs}var zs={},kf;function Ox(){if(kf)return zs;kf=1;/*!
506
507
  * Copyright 2016 The ANTLR Project. All rights reserved.
507
508
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
508
- */var a=ct&&ct.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},d=ct&&ct.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(ct,"__esModule",{value:!0}),ct.DefaultErrorStrategy=void 0;const y=dr(),m=qe(),h=io(),u=oo(),r=Mn(),o=ho(),t=ot(),i=Ie(),e=pe();let s=class{constructor(){this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.nextTokensState=y.ATNState.INVALID_STATE_NUMBER}reset(c){this.endErrorCondition(c)}beginErrorCondition(c){this.errorRecoveryMode=!0}inErrorRecoveryMode(c){return this.errorRecoveryMode}endErrorCondition(c){this.errorRecoveryMode=!1,this.lastErrorStates=void 0,this.lastErrorIndex=-1}reportMatch(c){this.endErrorCondition(c)}reportError(c,p){this.inErrorRecoveryMode(c)||(this.beginErrorCondition(c),p instanceof o.NoViableAltException?this.reportNoViableAlternative(c,p):p instanceof u.InputMismatchException?this.reportInputMismatch(c,p):p instanceof h.FailedPredicateException?this.reportFailedPredicate(c,p):(console.error(`unknown recognition error type: ${p}`),this.notifyErrorListeners(c,p.toString(),p)))}notifyErrorListeners(c,p,v){let x=v.getOffendingToken(c);x===void 0&&(x=null),c.notifyErrorListeners(p,x,v)}recover(c,p){this.lastErrorIndex===c.inputStream.index&&this.lastErrorStates&&this.lastErrorStates.contains(c.state)&&c.consume(),this.lastErrorIndex=c.inputStream.index,this.lastErrorStates||(this.lastErrorStates=new r.IntervalSet),this.lastErrorStates.add(c.state);let v=this.getErrorRecoverySet(c);this.consumeUntil(c,v)}sync(c){let p=c.interpreter.atn.states[c.state];if(this.inErrorRecoveryMode(c))return;let x=c.inputStream.LA(1),g=c.atn.nextTokens(p);if(g.contains(x)){this.nextTokensContext=void 0,this.nextTokensState=y.ATNState.INVALID_STATE_NUMBER;return}if(g.contains(i.Token.EPSILON)){this.nextTokensContext===void 0&&(this.nextTokensContext=c.context,this.nextTokensState=c.state);return}switch(p.stateType){case m.ATNStateType.BLOCK_START:case m.ATNStateType.STAR_BLOCK_START:case m.ATNStateType.PLUS_BLOCK_START:case m.ATNStateType.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(c))return;throw new u.InputMismatchException(c);case m.ATNStateType.PLUS_LOOP_BACK:case m.ATNStateType.STAR_LOOP_BACK:this.reportUnwantedToken(c);let A=c.getExpectedTokens().or(this.getErrorRecoverySet(c));this.consumeUntil(c,A);break}}reportNoViableAlternative(c,p){let v=c.inputStream,x;v?p.startToken.type===i.Token.EOF?x="<EOF>":x=v.getTextFromRange(p.startToken,p.getOffendingToken()):x="<unknown input>";let g="no viable alternative at input "+this.escapeWSAndQuote(x);this.notifyErrorListeners(c,g,p)}reportInputMismatch(c,p){let v=p.expectedTokens,x=v?v.toStringVocabulary(c.vocabulary):"",g="mismatched input "+this.getTokenErrorDisplay(p.getOffendingToken(c))+" expecting "+x;this.notifyErrorListeners(c,g,p)}reportFailedPredicate(c,p){let x="rule "+c.ruleNames[c.context.ruleIndex]+" "+p.message;this.notifyErrorListeners(c,x,p)}reportUnwantedToken(c){if(this.inErrorRecoveryMode(c))return;this.beginErrorCondition(c);let p=c.currentToken,v=this.getTokenErrorDisplay(p),x=this.getExpectedTokens(c),g="extraneous input "+v+" expecting "+x.toStringVocabulary(c.vocabulary);c.notifyErrorListeners(g,p,void 0)}reportMissingToken(c){if(this.inErrorRecoveryMode(c))return;this.beginErrorCondition(c);let p=c.currentToken,x="missing "+this.getExpectedTokens(c).toStringVocabulary(c.vocabulary)+" at "+this.getTokenErrorDisplay(p);c.notifyErrorListeners(x,p,void 0)}recoverInline(c){let p=this.singleTokenDeletion(c);if(p)return c.consume(),p;if(this.singleTokenInsertion(c))return this.getMissingSymbol(c);throw this.nextTokensContext===void 0?new u.InputMismatchException(c):new u.InputMismatchException(c,this.nextTokensState,this.nextTokensContext)}singleTokenInsertion(c){let p=c.inputStream.LA(1),x=c.interpreter.atn.states[c.state].transition(0).target,g=c.interpreter.atn;return g.nextTokens(x,t.PredictionContext.fromRuleContext(g,c.context)).contains(p)?(this.reportMissingToken(c),!0):!1}singleTokenDeletion(c){let p=c.inputStream.LA(2);if(this.getExpectedTokens(c).contains(p)){this.reportUnwantedToken(c),c.consume();let x=c.currentToken;return this.reportMatch(c),x}}getMissingSymbol(c){let p=c.currentToken,v=this.getExpectedTokens(c),x=i.Token.INVALID_TYPE;v.isNil||(x=v.minElement);let g;x===i.Token.EOF?g="<missing EOF>":g="<missing "+c.vocabulary.getDisplayName(x)+">";let _=p,A=c.inputStream.tryLT(-1);return _.type===i.Token.EOF&&A!=null&&(_=A),this.constructToken(c.inputStream.tokenSource,x,g,_)}constructToken(c,p,v,x){let g=c.tokenFactory,_=x.tokenSource,A=_?_.inputStream:void 0;return g.create({source:c,stream:A},p,v,i.Token.DEFAULT_CHANNEL,-1,-1,x.line,x.charPositionInLine)}getExpectedTokens(c){return c.getExpectedTokens()}getTokenErrorDisplay(c){if(!c)return"<no token>";let p=this.getSymbolText(c);return p||(this.getSymbolType(c)===i.Token.EOF?p="<EOF>":p=`<${this.getSymbolType(c)}>`),this.escapeWSAndQuote(p)}getSymbolText(c){return c.text}getSymbolType(c){return c.type}escapeWSAndQuote(c){return c=c.replace(`
509
- `,"\\n"),c=c.replace("\r","\\r"),c=c.replace(" ","\\t"),"'"+c+"'"}getErrorRecoverySet(c){let p=c.interpreter.atn,v=c.context,x=new r.IntervalSet;for(;v&&v.invokingState>=0;){let _=p.states[v.invokingState].transition(0),A=p.nextTokens(_.followState);x.addAll(A),v=v._parent}return x.remove(i.Token.EPSILON),x}consumeUntil(c,p){let v=c.inputStream.LA(1);for(;v!==i.Token.EOF&&!p.contains(v);)c.consume(),v=c.inputStream.LA(1)}};return a([e.Override],s.prototype,"reset",null),a([d(0,e.NotNull)],s.prototype,"beginErrorCondition",null),a([e.Override],s.prototype,"inErrorRecoveryMode",null),a([d(0,e.NotNull)],s.prototype,"endErrorCondition",null),a([e.Override],s.prototype,"reportMatch",null),a([e.Override],s.prototype,"reportError",null),a([d(0,e.NotNull)],s.prototype,"notifyErrorListeners",null),a([e.Override],s.prototype,"recover",null),a([e.Override],s.prototype,"sync",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportNoViableAlternative",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportInputMismatch",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportFailedPredicate",null),a([d(0,e.NotNull)],s.prototype,"reportUnwantedToken",null),a([d(0,e.NotNull)],s.prototype,"reportMissingToken",null),a([e.Override],s.prototype,"recoverInline",null),a([d(0,e.NotNull)],s.prototype,"singleTokenInsertion",null),a([d(0,e.NotNull)],s.prototype,"singleTokenDeletion",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getMissingSymbol",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getExpectedTokens",null),a([d(0,e.NotNull)],s.prototype,"getSymbolText",null),a([d(0,e.NotNull)],s.prototype,"getSymbolType",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"escapeWSAndQuote",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getErrorRecoverySet",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"consumeUntil",null),ct.DefaultErrorStrategy=s,ct}var Mf;function Ip(){if(Mf)return Pr;Mf=1;/*!
509
+ */return Object.defineProperty(zs,"__esModule",{value:!0}),zs}var Dn={},Mf;function Dx(){if(Mf)return Dn;Mf=1;/*!
510
510
  * Copyright 2016 The ANTLR Project. All rights reserved.
511
511
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
512
- */var a=Pr&&Pr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.BailErrorStrategy=void 0;const d=Ia(),y=oo(),m=pe(),h=Dp();let u=class extends d.DefaultErrorStrategy{recover(o,t){for(let i=o.context;i;i=i.parent)i.exception=t;throw new h.ParseCancellationException(t)}recoverInline(o){let t=new y.InputMismatchException(o);for(let i=o.context;i;i=i.parent)i.exception=t;throw new h.ParseCancellationException(t)}sync(o){}};return a([m.Override],u.prototype,"recover",null),a([m.Override],u.prototype,"recoverInline",null),a([m.Override],u.prototype,"sync",null),Pr.BailErrorStrategy=u,Pr}var Hs={},qf;function wx(){if(qf)return Hs;qf=1;/*!
512
+ */var a=Dn&&Dn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.ANTLRInputStream=void 0;const d=Ue(),y=pe(),m=gr();let h=class{constructor(r){this.p=0,this.data=r,this.n=r.length}reset(){this.p=0}consume(){if(this.p>=this.n)throw d(this.LA(1)===m.IntStream.EOF),new Error("cannot consume EOF");this.p<this.n&&this.p++}LA(r){return r===0?0:r<0&&(r++,this.p+r-1<0)||this.p+r-1>=this.n?m.IntStream.EOF:this.data.charCodeAt(this.p+r-1)}LT(r){return this.LA(r)}get index(){return this.p}get size(){return this.n}mark(){return-1}release(r){}seek(r){if(r<=this.p){this.p=r;return}for(r=Math.min(r,this.n);this.p<r;)this.consume()}getText(r){let o=r.a,t=r.b;t>=this.n&&(t=this.n-1);let i=t-o+1;return o>=this.n?"":this.data.substr(o,i)}get sourceName(){return this.name?this.name:m.IntStream.UNKNOWN_SOURCE_NAME}toString(){return this.data}};return a([y.Override],h.prototype,"consume",null),a([y.Override],h.prototype,"LA",null),a([y.Override],h.prototype,"index",null),a([y.Override],h.prototype,"size",null),a([y.Override],h.prototype,"mark",null),a([y.Override],h.prototype,"release",null),a([y.Override],h.prototype,"seek",null),a([y.Override],h.prototype,"getText",null),a([y.Override],h.prototype,"sourceName",null),a([y.Override],h.prototype,"toString",null),Dn.ANTLRInputStream=h,Dn}var Hs={},qf;function wx(){if(qf)return Hs;qf=1;/*!
513
513
  * Copyright 2016 The ANTLR Project. All rights reserved.
514
514
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
515
515
  */return Object.defineProperty(Hs,"__esModule",{value:!0}),Hs}var Gs={},jf;function Rx(){return jf||(jf=1,(function(a){/*!
@@ -518,10 +518,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
518
518
  */Object.defineProperty(a,"__esModule",{value:!0}),a.Dependents=void 0,(function(d){d[d.SELF=0]="SELF",d[d.PARENTS=1]="PARENTS",d[d.CHILDREN=2]="CHILDREN",d[d.ANCESTORS=3]="ANCESTORS",d[d.DESCENDANTS=4]="DESCENDANTS",d[d.SIBLINGS=5]="SIBLINGS",d[d.PRECEEDING_SIBLINGS=6]="PRECEEDING_SIBLINGS",d[d.FOLLOWING_SIBLINGS=7]="FOLLOWING_SIBLINGS",d[d.PRECEEDING=8]="PRECEEDING",d[d.FOLLOWING=9]="FOLLOWING"})(a.Dependents||(a.Dependents={}))})(Gs)),Gs}var cr={},$f;function Px(){if($f)return cr;$f=1;/*!
519
519
  * Copyright 2016 The ANTLR Project. All rights reserved.
520
520
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
521
- */var a=cr&&cr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=cr&&cr.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(cr,"__esModule",{value:!0}),cr.DiagnosticErrorListener=void 0;const y=Sr(),m=pe(),h=Ve();let u=class{constructor(o=!0){this.exactOnly=o,this.exactOnly=o}syntaxError(o,t,i,e,s,l){}reportAmbiguity(o,t,i,e,s,l,c){if(this.exactOnly&&!s)return;let p=this.getDecisionDescription(o,t),v=this.getConflictingAlts(l,c),x=o.inputStream.getText(h.Interval.of(i,e)),g=`reportAmbiguity d=${p}: ambigAlts=${v}, input='${x}'`;o.notifyErrorListeners(g)}reportAttemptingFullContext(o,t,i,e,s,l){let c=this.getDecisionDescription(o,t),p=o.inputStream.getText(h.Interval.of(i,e)),v=`reportAttemptingFullContext d=${c}, input='${p}'`;o.notifyErrorListeners(v)}reportContextSensitivity(o,t,i,e,s,l){let c=this.getDecisionDescription(o,t),p=o.inputStream.getText(h.Interval.of(i,e)),v=`reportContextSensitivity d=${c}, input='${p}'`;o.notifyErrorListeners(v)}getDecisionDescription(o,t){let i=t.decision,e=t.atnStartState.ruleIndex,s=o.ruleNames;if(e<0||e>=s.length)return i.toString();let l=s[e];return l?`${i} (${l})`:i.toString()}getConflictingAlts(o,t){if(o!=null)return o;let i=new y.BitSet;for(let e of t)i.set(e.alt);return i}};return a([m.Override],u.prototype,"syntaxError",null),a([m.Override,d(0,m.NotNull),d(1,m.NotNull),d(6,m.NotNull)],u.prototype,"reportAmbiguity",null),a([m.Override,d(0,m.NotNull),d(1,m.NotNull),d(5,m.NotNull)],u.prototype,"reportAttemptingFullContext",null),a([m.Override,d(0,m.NotNull),d(1,m.NotNull),d(5,m.NotNull)],u.prototype,"reportContextSensitivity",null),a([d(0,m.NotNull),d(1,m.NotNull)],u.prototype,"getDecisionDescription",null),a([m.NotNull,d(1,m.NotNull)],u.prototype,"getConflictingAlts",null),cr.DiagnosticErrorListener=u,cr}var fr={},Uf;function Fx(){if(Uf)return fr;Uf=1;/*!
521
+ */var a=cr&&cr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=cr&&cr.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(cr,"__esModule",{value:!0}),cr.DiagnosticErrorListener=void 0;const y=vr(),m=pe(),h=Ve();let u=class{constructor(o=!0){this.exactOnly=o,this.exactOnly=o}syntaxError(o,t,i,e,s,l){}reportAmbiguity(o,t,i,e,s,l,c){if(this.exactOnly&&!s)return;let p=this.getDecisionDescription(o,t),v=this.getConflictingAlts(l,c),x=o.inputStream.getText(h.Interval.of(i,e)),g=`reportAmbiguity d=${p}: ambigAlts=${v}, input='${x}'`;o.notifyErrorListeners(g)}reportAttemptingFullContext(o,t,i,e,s,l){let c=this.getDecisionDescription(o,t),p=o.inputStream.getText(h.Interval.of(i,e)),v=`reportAttemptingFullContext d=${c}, input='${p}'`;o.notifyErrorListeners(v)}reportContextSensitivity(o,t,i,e,s,l){let c=this.getDecisionDescription(o,t),p=o.inputStream.getText(h.Interval.of(i,e)),v=`reportContextSensitivity d=${c}, input='${p}'`;o.notifyErrorListeners(v)}getDecisionDescription(o,t){let i=t.decision,e=t.atnStartState.ruleIndex,s=o.ruleNames;if(e<0||e>=s.length)return i.toString();let l=s[e];return l?`${i} (${l})`:i.toString()}getConflictingAlts(o,t){if(o!=null)return o;let i=new y.BitSet;for(let e of t)i.set(e.alt);return i}};return a([m.Override],u.prototype,"syntaxError",null),a([m.Override,d(0,m.NotNull),d(1,m.NotNull),d(6,m.NotNull)],u.prototype,"reportAmbiguity",null),a([m.Override,d(0,m.NotNull),d(1,m.NotNull),d(5,m.NotNull)],u.prototype,"reportAttemptingFullContext",null),a([m.Override,d(0,m.NotNull),d(1,m.NotNull),d(5,m.NotNull)],u.prototype,"reportContextSensitivity",null),a([d(0,m.NotNull),d(1,m.NotNull)],u.prototype,"getDecisionDescription",null),a([m.NotNull,d(1,m.NotNull)],u.prototype,"getConflictingAlts",null),cr.DiagnosticErrorListener=u,cr}var fr={},Uf;function Fx(){if(Uf)return fr;Uf=1;/*!
522
522
  * Copyright 2016 The ANTLR Project. All rights reserved.
523
523
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
524
- */var a=fr&&fr.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=fr&&fr.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(fr,"__esModule",{value:!0}),fr.LexerInterpreter=void 0;const y=br(),m=co(),h=pe(),u=pe();let r=class extends y.Lexer{constructor(t,i,e,s,l,c,p){if(super(p),c.grammarType!==0)throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.");this._grammarFileName=t,this._atn=c,this._ruleNames=e.slice(0),this._channelNames=s.slice(0),this._modeNames=l.slice(0),this._vocabulary=i,this._interp=new m.LexerATNSimulator(c,this)}get atn(){return this._atn}get grammarFileName(){return this._grammarFileName}get ruleNames(){return this._ruleNames}get channelNames(){return this._channelNames}get modeNames(){return this._modeNames}get vocabulary(){return this._vocabulary}};return a([h.NotNull],r.prototype,"_vocabulary",void 0),a([u.Override],r.prototype,"atn",null),a([u.Override],r.prototype,"grammarFileName",null),a([u.Override],r.prototype,"ruleNames",null),a([u.Override],r.prototype,"channelNames",null),a([u.Override],r.prototype,"modeNames",null),a([u.Override],r.prototype,"vocabulary",null),r=a([d(1,h.NotNull)],r),fr.LexerInterpreter=r,fr}var Ys={},Vf;function Ix(){if(Vf)return Ys;Vf=1;/*!
524
+ */var a=fr&&fr.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=fr&&fr.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(fr,"__esModule",{value:!0}),fr.LexerInterpreter=void 0;const y=Tr(),m=uo(),h=pe(),u=pe();let r=class extends y.Lexer{constructor(t,i,e,s,l,c,p){if(super(p),c.grammarType!==0)throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.");this._grammarFileName=t,this._atn=c,this._ruleNames=e.slice(0),this._channelNames=s.slice(0),this._modeNames=l.slice(0),this._vocabulary=i,this._interp=new m.LexerATNSimulator(c,this)}get atn(){return this._atn}get grammarFileName(){return this._grammarFileName}get ruleNames(){return this._ruleNames}get channelNames(){return this._channelNames}get modeNames(){return this._modeNames}get vocabulary(){return this._vocabulary}};return a([h.NotNull],r.prototype,"_vocabulary",void 0),a([u.Override],r.prototype,"atn",null),a([u.Override],r.prototype,"grammarFileName",null),a([u.Override],r.prototype,"ruleNames",null),a([u.Override],r.prototype,"channelNames",null),a([u.Override],r.prototype,"modeNames",null),a([u.Override],r.prototype,"vocabulary",null),r=a([d(1,h.NotNull)],r),fr.LexerInterpreter=r,fr}var Ys={},Vf;function Ix(){if(Vf)return Ys;Vf=1;/*!
525
525
  * Copyright 2016 The ANTLR Project. All rights reserved.
526
526
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
527
527
  */return Object.defineProperty(Ys,"__esModule",{value:!0}),Ys}var wn={},zf;function Lx(){if(zf)return wn;zf=1;/*!
@@ -554,7 +554,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
554
554
  */return Object.defineProperty(Js,"__esModule",{value:!0}),Js}var Zf;function zx(){return Zf||(Zf=1,(function(a){/*!
555
555
  * Copyright 2016 The ANTLR Project. All rights reserved.
556
556
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
557
- */var d=wr&&wr.__createBinding||(Object.create?(function(m,h,u,r){r===void 0&&(r=u),Object.defineProperty(m,r,{enumerable:!0,get:function(){return h[u]}})}):(function(m,h,u,r){r===void 0&&(r=u),m[r]=h[u]})),y=wr&&wr.__exportStar||function(m,h){for(var u in m)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,m,u)};Object.defineProperty(a,"__esModule",{value:!0}),y($p(),a),y(Up(),a),y(Rh(),a),y(Ip(),a),y(Cp(),a),y(wx(),a),y(Ra(),a),y(Tp(),a),y(Np(),a),y(Li(),a),y(Ta(),a),y(Pa(),a),y(tp(),a),y(Ia(),a),y(Rx(),a),y(Px(),a),y(io(),a),y(oo(),a),y(wp(),a),y(gr(),a),y(br(),a),y(Fx(),a),y(lo(),a),y(Op(),a),y(ho(),a),y($i(),a),y(Ix(),a),y(Rp(),a),y(st(),a),y(Na(),a),y(Sp(),a),y(Ar(),a),y(ki(),a),y(vp(),a),y(Lx(),a),y(Bx(),a),y(kx(),a),y(Ie(),a),y(Mx(),a),y(qx(),a),y(jx(),a),y($x(),a),y(Ux(),a),y(Tr(),a),y(Vx(),a)})(wr)),wr}var hr={},e0;function Hx(){if(e0)return hr;e0=1;/*!
557
+ */var d=On&&On.__createBinding||(Object.create?(function(m,h,u,r){r===void 0&&(r=u),Object.defineProperty(m,r,{enumerable:!0,get:function(){return h[u]}})}):(function(m,h,u,r){r===void 0&&(r=u),m[r]=h[u]})),y=On&&On.__exportStar||function(m,h){for(var u in m)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,m,u)};Object.defineProperty(a,"__esModule",{value:!0}),y(Cx(),a),y(Ox(),a),y(Dx(),a),y(Ep(),a),y(Np(),a),y(wx(),a),y(Pa(),a),y(Sp(),a),y(bp(),a),y(ki(),a),y(Na(),a),y(Fa(),a),y(K0(),a),y(Ra(),a),y(Rx(),a),y(Px(),a),y(co(),a),y(fo(),a),y(wp(),a),y(gr(),a),y(Tr(),a),y(Fx(),a),y(ao(),a),y(Cp(),a),y(po(),a),y(ji(),a),y(Ix(),a),y(Rp(),a),y(st(),a),y(Sa(),a),y(Ap(),a),y(Sr(),a),y(Bi(),a),y(Dp(),a),y(Lx(),a),y(Bx(),a),y(kx(),a),y(Ie(),a),y(Mx(),a),y(qx(),a),y(jx(),a),y($x(),a),y(Ux(),a),y(Er(),a),y(Vx(),a)})(On)),On}var hr={},e0;function Hx(){if(e0)return hr;e0=1;/*!
558
558
  * Copyright 2016 The ANTLR Project. All rights reserved.
559
559
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
560
560
  */var a=hr&&hr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=hr&&hr.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(hr,"__esModule",{value:!0}),hr.AbstractParseTreeVisitor=void 0;const y=pe();let m=class{visit(u){return u.accept(this)}visitChildren(u){let r=this.defaultResult(),o=u.childCount;for(let t=0;t<o&&this.shouldVisitNextChild(u,r);t++){let e=u.getChild(t).accept(this);r=this.aggregateResult(r,e)}return r}visitTerminal(u){return this.defaultResult()}visitErrorNode(u){return this.defaultResult()}aggregateResult(u,r){return r}shouldVisitNextChild(u,r){return!0}};return a([y.Override,d(0,y.NotNull)],m.prototype,"visit",null),a([y.Override,d(0,y.NotNull)],m.prototype,"visitChildren",null),a([y.Override,d(0,y.NotNull)],m.prototype,"visitTerminal",null),a([y.Override,d(0,y.NotNull)],m.prototype,"visitErrorNode",null),a([d(0,y.NotNull)],m.prototype,"shouldVisitNextChild",null),hr.AbstractParseTreeVisitor=m,hr}var Rn={},Zs={},t0;function Gx(){if(t0)return Zs;t0=1;/*!
@@ -579,7 +579,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
579
579
  * Copyright 2016 The ANTLR Project. All rights reserved.
580
580
  * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
581
581
  */var d=Rn&&Rn.__createBinding||(Object.create?(function(m,h,u,r){r===void 0&&(r=u),Object.defineProperty(m,r,{enumerable:!0,get:function(){return h[u]}})}):(function(m,h,u,r){r===void 0&&(r=u),m[r]=h[u]})),y=Rn&&Rn.__exportStar||function(m,h){for(var u in m)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,m,u)};Object.defineProperty(a,"__esModule",{value:!0}),y(Hx(),a),y(Ri(),a),y(Gx(),a),y(Yx(),a),y(Wx(),a),y(Qx(),a),y(jp(),a),y(Pi(),a),y(Xx(),a),y(_r(),a),y(Kx(),a),y(Nr(),a)})(Rn)),Rn}var Pn={},Ai={},u0;function Lp(){return u0||(u0=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.MALLOY_INTERFACE_TYPES=void 0,Ai.MALLOY_INTERFACE_TYPES={Aggregate:{type:"struct",name:"Aggregate",fields:{name:{type:"string",optional:!0,array:!1},field:{type:"Field",optional:!1,array:!1}}},Annotation:{type:"struct",name:"Annotation",fields:{value:{type:"string",optional:!1,array:!1}}},AnonymousQueryInfo:{type:"struct",name:"AnonymousQueryInfo",fields:{schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},definition:{type:"Query",optional:!0,array:!1},code:{type:"string",optional:!0,array:!1},location:{type:"Location",optional:!0,array:!1}}},ArrayCell:{type:"struct",name:"ArrayCell",fields:{array_value:{type:"Cell",array:!0,optional:!1}}},ArrayType:{type:"struct",name:"ArrayType",fields:{element_type:{type:"AtomicType",optional:!1,array:!1}}},AtomicType:{type:"union",name:"AtomicType",options:{string_type:"StringType",boolean_type:"BooleanType",number_type:"NumberType",json_type:"JSONType",sql_native_type:"SQLNativeType",date_type:"DateType",timestamp_type:"TimestampType",array_type:"ArrayType",record_type:"RecordType",timestamptz_type:"TimestamptzType"}},BooleanCell:{type:"struct",name:"BooleanCell",fields:{boolean_value:{type:"boolean",optional:!1,array:!1}}},BooleanLiteral:{type:"struct",name:"BooleanLiteral",fields:{boolean_value:{type:"boolean",optional:!1,array:!1}}},BooleanType:{type:"struct",name:"BooleanType",fields:{}},CalculateInfo:{type:"struct",name:"CalculateInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"AtomicType",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},CalculateOperation:{type:"struct",name:"CalculateOperation",fields:{name:{type:"string",optional:!1,array:!1},field:{type:"Field",optional:!1,array:!1}}},Cell:{type:"union",name:"Cell",options:{string_cell:"StringCell",boolean_cell:"BooleanCell",date_cell:"DateCell",timestamp_cell:"TimestampCell",number_cell:"NumberCell",json_cell:"JSONCell",record_cell:"RecordCell",array_cell:"ArrayCell",null_cell:"NullCell",sql_native_cell:"SQLNativeCell"}},CompileModelRequest:{type:"struct",name:"CompileModelRequest",fields:{model_url:{type:"string",optional:!1,array:!1},extend_model_url:{type:"string",optional:!0,array:!1},exclude_references:{type:"boolean",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},CompileModelResponse:{type:"struct",name:"CompileModelResponse",fields:{model:{type:"ModelInfo",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},translations:{type:"Translation",array:!0,optional:!0},timing_info:{type:"TimingInfo",optional:!0,array:!1}}},CompileQueryRequest:{type:"struct",name:"CompileQueryRequest",fields:{model_url:{type:"string",optional:!1,array:!1},query:{type:"Query",optional:!0,array:!1},query_malloy:{type:"string",optional:!0,array:!1},default_row_limit:{type:"number",optional:!0,array:!1},exclude_references:{type:"boolean",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},CompileQueryResponse:{type:"struct",name:"CompileQueryResponse",fields:{result:{type:"Result",optional:!0,array:!1},default_row_limit_added:{type:"number",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},translations:{type:"Translation",array:!0,optional:!0},timing_info:{type:"TimingInfo",optional:!0,array:!1}}},CompileSourceRequest:{type:"struct",name:"CompileSourceRequest",fields:{model_url:{type:"string",optional:!1,array:!1},name:{type:"string",optional:!1,array:!1},extend_model_url:{type:"string",optional:!0,array:!1},exclude_references:{type:"boolean",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},CompileSourceResponse:{type:"struct",name:"CompileSourceResponse",fields:{source:{type:"SourceInfo",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},timing_info:{type:"TimingInfo",optional:!0,array:!1}}},CompilerNeeds:{type:"struct",name:"CompilerNeeds",fields:{table_schemas:{type:"SQLTable",array:!0,optional:!0},sql_schemas:{type:"SQLQuery",array:!0,optional:!0},files:{type:"File",array:!0,optional:!0},connections:{type:"Connection",array:!0,optional:!0},translations:{type:"Translation",array:!0,optional:!0}}},Connection:{type:"struct",name:"Connection",fields:{name:{type:"string",optional:!1,array:!1},dialect:{type:"string",optional:!0,array:!1}}},Data:{type:"union",name:"Data",options:{record_cell:"RecordCell",array_cell:"ArrayCell"}},DateCell:{type:"struct",name:"DateCell",fields:{date_value:{type:"string",optional:!1,array:!1}}},DateLiteral:{type:"struct",name:"DateLiteral",fields:{date_value:{type:"string",optional:!1,array:!1},granularity:{type:"DateTimeframe",optional:!0,array:!1},timezone:{type:"string",optional:!0,array:!1}}},DateTimeframe:{type:"enum",name:"DateTimeframe",values:{year:1,quarter:2,month:3,week:4,day:5}},DateType:{type:"struct",name:"DateType",fields:{timeframe:{type:"DateTimeframe",optional:!0,array:!1}}},DimensionInfo:{type:"struct",name:"DimensionInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"AtomicType",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},DocumentPosition:{type:"struct",name:"DocumentPosition",fields:{line:{type:"number",optional:!1,array:!1},character:{type:"number",optional:!1,array:!1}}},DocumentRange:{type:"struct",name:"DocumentRange",fields:{start:{type:"DocumentPosition",optional:!1,array:!1},end:{type:"DocumentPosition",optional:!1,array:!1}}},DrillOperation:{type:"struct",name:"DrillOperation",fields:{filter:{type:"Filter",optional:!1,array:!1}}},Expression:{type:"union",name:"Expression",options:{field_reference:"Reference",time_truncation:"TimeTruncationFieldReference",filtered_field:"FilteredField",literal_value:"LiteralValueExpression",moving_average:"MovingAverage"}},Field:{type:"struct",name:"Field",fields:{expression:{type:"Expression",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},FieldInfo:{type:"union",name:"FieldInfo",options:{dimension:"DimensionInfo",measure:"MeasureInfo",join:"JoinInfo",view:"ViewInfo",calculate:"CalculateInfo"}},File:{type:"struct",name:"File",fields:{url:{type:"string",optional:!1,array:!1},contents:{type:"string",optional:!0,array:!1},invalidation_key:{type:"string",optional:!0,array:!1}}},Filter:{type:"union",name:"Filter",options:{filter_string:"FilterStringApplication",literal_equality:"LiteralEqualityComparison"}},FilterExpressionLiteral:{type:"struct",name:"FilterExpressionLiteral",fields:{filter_expression_value:{type:"string",optional:!1,array:!1}}},FilterExpressionType:{type:"struct",name:"FilterExpressionType",fields:{filter_type:{type:"FilterableType",optional:!1,array:!1}}},FilterOperation:{type:"struct",name:"FilterOperation",fields:{filter:{type:"Filter",optional:!1,array:!1}}},FilterStringApplication:{type:"struct",name:"FilterStringApplication",fields:{expression:{type:"Expression",optional:!1,array:!1},filter:{type:"string",optional:!1,array:!1}}},FilterableType:{type:"union",name:"FilterableType",options:{string_type:"StringType",boolean_type:"BooleanType",number_type:"NumberType",date_type:"DateType",timestamp_type:"TimestampType",timestamptz_type:"TimestamptzType"}},FilteredField:{type:"struct",name:"FilteredField",fields:{field_reference:{type:"Reference",optional:!1,array:!1},where:{type:"FilterOperation",array:!0,optional:!1}}},GroupBy:{type:"struct",name:"GroupBy",fields:{name:{type:"string",optional:!0,array:!1},field:{type:"Field",optional:!1,array:!1}}},JSONCell:{type:"struct",name:"JSONCell",fields:{json_value:{type:"string",optional:!1,array:!1}}},JSONType:{type:"struct",name:"JSONType",fields:{}},JoinInfo:{type:"struct",name:"JoinInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},relationship:{type:"Relationship",optional:!1,array:!1}}},Limit:{type:"struct",name:"Limit",fields:{limit:{type:"number",optional:!1,array:!1}}},LiteralEqualityComparison:{type:"struct",name:"LiteralEqualityComparison",fields:{expression:{type:"Expression",optional:!1,array:!1},value:{type:"LiteralValue",optional:!1,array:!1}}},LiteralValue:{type:"union",name:"LiteralValue",options:{string_literal:"StringLiteral",number_literal:"NumberLiteral",date_literal:"DateLiteral",timestamp_literal:"TimestampLiteral",boolean_literal:"BooleanLiteral",null_literal:"NullLiteral",filter_expression_literal:"FilterExpressionLiteral"}},LiteralValueExpression:{type:"struct",name:"LiteralValueExpression",fields:{literal_value:{type:"LiteralValue",optional:!1,array:!1}}},Location:{type:"struct",name:"Location",fields:{url:{type:"string",optional:!1,array:!1},range:{type:"Range",optional:!1,array:!1}}},LogMessage:{type:"struct",name:"LogMessage",fields:{url:{type:"string",optional:!1,array:!1},range:{type:"DocumentRange",optional:!1,array:!1},severity:{type:"LogSeverity",optional:!1,array:!1},message:{type:"string",optional:!1,array:!1}}},LogSeverity:{type:"enum",name:"LogSeverity",values:{debug:1,info:2,warn:3,error:4}},MeasureInfo:{type:"struct",name:"MeasureInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"AtomicType",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},ModelEntryValue:{type:"union",name:"ModelEntryValue",options:{source:"SourceInfo",query:"QueryInfo"}},ModelInfo:{type:"struct",name:"ModelInfo",fields:{entries:{type:"ModelEntryValue",array:!0,optional:!1},annotations:{type:"Annotation",array:!0,optional:!0},anonymous_queries:{type:"AnonymousQueryInfo",array:!0,optional:!1}}},MovingAverage:{type:"struct",name:"MovingAverage",fields:{field_reference:{type:"Reference",optional:!1,array:!1},rows_preceding:{type:"number",optional:!0,array:!1},rows_following:{type:"number",optional:!0,array:!1},partition_fields:{type:"Reference",array:!0,optional:!0}}},Nest:{type:"struct",name:"Nest",fields:{name:{type:"string",optional:!0,array:!1},view:{type:"View",optional:!1,array:!1}}},NullCell:{type:"struct",name:"NullCell",fields:{}},NullLiteral:{type:"struct",name:"NullLiteral",fields:{}},NumberCell:{type:"struct",name:"NumberCell",fields:{number_value:{type:"number",optional:!1,array:!1},subtype:{type:"NumberSubtype",optional:!0,array:!1},string_value:{type:"string",optional:!0,array:!1}}},NumberLiteral:{type:"struct",name:"NumberLiteral",fields:{number_value:{type:"number",optional:!1,array:!1},string_value:{type:"string",optional:!0,array:!1}}},NumberSubtype:{type:"enum",name:"NumberSubtype",values:{integer:1,decimal:2,bigint:3}},NumberType:{type:"struct",name:"NumberType",fields:{subtype:{type:"NumberSubtype",optional:!0,array:!1}}},OrderBy:{type:"struct",name:"OrderBy",fields:{field_reference:{type:"Reference",optional:!1,array:!1},direction:{type:"OrderByDirection",optional:!0,array:!1}}},OrderByDirection:{type:"enum",name:"OrderByDirection",values:{asc:1,desc:2}},ParameterInfo:{type:"struct",name:"ParameterInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"ParameterType",optional:!1,array:!1},default_value:{type:"LiteralValue",optional:!0,array:!1}}},ParameterType:{type:"union",name:"ParameterType",options:{string_type:"StringType",boolean_type:"BooleanType",number_type:"NumberType",json_type:"JSONType",sql_native_type:"SQLNativeType",date_type:"DateType",timestamp_type:"TimestampType",array_type:"ArrayType",record_type:"RecordType",filter_expression_type:"FilterExpressionType",timestamptz_type:"TimestamptzType"}},ParameterValue:{type:"struct",name:"ParameterValue",fields:{name:{type:"string",optional:!1,array:!1},value:{type:"LiteralValue",optional:!1,array:!1}}},Position:{type:"struct",name:"Position",fields:{line:{type:"number",optional:!1,array:!1},character:{type:"number",optional:!1,array:!1}}},Query:{type:"struct",name:"Query",fields:{definition:{type:"QueryDefinition",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},QueryArrow:{type:"struct",name:"QueryArrow",fields:{source:{type:"QueryArrowSource",optional:!1,array:!1},view:{type:"ViewDefinition",optional:!1,array:!1}}},QueryArrowSource:{type:"union",name:"QueryArrowSource",options:{refinement:"QueryRefinement",source_reference:"Reference"}},QueryDefinition:{type:"union",name:"QueryDefinition",options:{arrow:"QueryArrow",query_reference:"Reference",refinement:"QueryRefinement"}},QueryInfo:{type:"struct",name:"QueryInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},definition:{type:"Query",optional:!0,array:!1},code:{type:"string",optional:!0,array:!1},location:{type:"Location",optional:!0,array:!1}}},QueryRefinement:{type:"struct",name:"QueryRefinement",fields:{base:{type:"QueryDefinition",optional:!1,array:!1},refinement:{type:"ViewDefinition",optional:!1,array:!1}}},Range:{type:"struct",name:"Range",fields:{start:{type:"Position",optional:!1,array:!1},end:{type:"Position",optional:!1,array:!1}}},RecordCell:{type:"struct",name:"RecordCell",fields:{record_value:{type:"Cell",array:!0,optional:!1}}},RecordType:{type:"struct",name:"RecordType",fields:{fields:{type:"DimensionInfo",array:!0,optional:!1}}},Reference:{type:"struct",name:"Reference",fields:{name:{type:"string",optional:!1,array:!1},path:{type:"string",array:!0,optional:!0},parameters:{type:"ParameterValue",array:!0,optional:!0}}},Relationship:{type:"enum",name:"Relationship",values:{one:1,many:2,cross:3}},Result:{type:"struct",name:"Result",fields:{data:{type:"Data",optional:!0,array:!1},schema:{type:"Schema",optional:!1,array:!1},sql:{type:"string",optional:!0,array:!1},connection_name:{type:"string",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},model_annotations:{type:"Annotation",array:!0,optional:!0},query_timezone:{type:"string",optional:!0,array:!1},source_annotations:{type:"Annotation",array:!0,optional:!0}}},RunIndexQueryRequest:{type:"struct",name:"RunIndexQueryRequest",fields:{model_url:{type:"string",optional:!1,array:!1},source_name:{type:"string",optional:!1,array:!1},exclude_references:{type:"boolean",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},RunIndexQueryResponse:{type:"struct",name:"RunIndexQueryResponse",fields:{result:{type:"Result",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},timing_info:{type:"TimingInfo",optional:!0,array:!1}}},RunQueryRequest:{type:"struct",name:"RunQueryRequest",fields:{model_url:{type:"string",optional:!1,array:!1},query:{type:"Query",optional:!0,array:!1},query_malloy:{type:"string",optional:!0,array:!1},default_row_limit:{type:"number",optional:!0,array:!1},exclude_references:{type:"boolean",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},RunQueryResponse:{type:"struct",name:"RunQueryResponse",fields:{result:{type:"Result",optional:!0,array:!1},default_row_limit_added:{type:"number",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},timing_info:{type:"TimingInfo",optional:!0,array:!1}}},SQLNativeCell:{type:"struct",name:"SQLNativeCell",fields:{sql_native_value:{type:"string",optional:!1,array:!1}}},SQLNativeType:{type:"struct",name:"SQLNativeType",fields:{sql_type:{type:"string",optional:!0,array:!1}}},SQLQuery:{type:"struct",name:"SQLQuery",fields:{sql:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!0,array:!1},connection_name:{type:"string",optional:!1,array:!1}}},SQLTable:{type:"struct",name:"SQLTable",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!0,array:!1},connection_name:{type:"string",optional:!1,array:!1}}},Schema:{type:"struct",name:"Schema",fields:{fields:{type:"FieldInfo",array:!0,optional:!1}}},SourceInfo:{type:"struct",name:"SourceInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},parameters:{type:"ParameterInfo",array:!0,optional:!0}}},StringCell:{type:"struct",name:"StringCell",fields:{string_value:{type:"string",optional:!1,array:!1}}},StringLiteral:{type:"struct",name:"StringLiteral",fields:{string_value:{type:"string",optional:!1,array:!1}}},StringType:{type:"struct",name:"StringType",fields:{}},TimeTruncationFieldReference:{type:"struct",name:"TimeTruncationFieldReference",fields:{field_reference:{type:"Reference",optional:!1,array:!1},truncation:{type:"TimestampTimeframe",optional:!1,array:!1}}},TimestampCell:{type:"struct",name:"TimestampCell",fields:{timestamp_value:{type:"string",optional:!1,array:!1}}},TimestampLiteral:{type:"struct",name:"TimestampLiteral",fields:{timestamp_value:{type:"string",optional:!1,array:!1},granularity:{type:"TimestampTimeframe",optional:!0,array:!1},timezone:{type:"string",optional:!0,array:!1}}},TimestampTimeframe:{type:"enum",name:"TimestampTimeframe",values:{year:1,quarter:2,month:3,week:4,day:5,hour:6,minute:7,second:8}},TimestampType:{type:"struct",name:"TimestampType",fields:{timeframe:{type:"TimestampTimeframe",optional:!0,array:!1}}},TimestamptzType:{type:"struct",name:"TimestamptzType",fields:{timeframe:{type:"TimestampTimeframe",optional:!0,array:!1}}},TimingInfo:{type:"struct",name:"TimingInfo",fields:{name:{type:"string",optional:!1,array:!1},duration_ms:{type:"number",optional:!1,array:!1},detailed_timing:{type:"TimingInfo",array:!0,optional:!0}}},Translation:{type:"struct",name:"Translation",fields:{url:{type:"string",optional:!1,array:!1},compiled_model_json:{type:"string",optional:!0,array:!1}}},View:{type:"struct",name:"View",fields:{definition:{type:"ViewDefinition",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},ViewArrow:{type:"struct",name:"ViewArrow",fields:{source:{type:"ViewDefinition",optional:!1,array:!1},view:{type:"ViewDefinition",optional:!1,array:!1}}},ViewDefinition:{type:"union",name:"ViewDefinition",options:{arrow:"ViewArrow",view_reference:"Reference",refinement:"ViewRefinement",segment:"ViewSegment"}},ViewInfo:{type:"struct",name:"ViewInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},definition:{type:"View",optional:!0,array:!1}}},ViewOperation:{type:"union",name:"ViewOperation",options:{group_by:"GroupBy",aggregate:"Aggregate",order_by:"OrderBy",limit:"Limit",where:"FilterOperation",nest:"Nest",having:"FilterOperation",drill:"DrillOperation",calculate:"CalculateOperation"}},ViewRefinement:{type:"struct",name:"ViewRefinement",fields:{base:{type:"ViewDefinition",optional:!1,array:!1},refinement:{type:"ViewDefinition",optional:!1,array:!1}}},ViewSegment:{type:"struct",name:"ViewSegment",fields:{operations:{type:"ViewOperation",array:!0,optional:!1}}}}),Ai}var vi={},Vi={},Ei={},l0;function Zx(){return l0||(l0=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.RESERVED_WORDS=void 0,Ei.RESERVED_WORDS=["accept","aggregate","declare","dimension","except","explore","group_by","having","index","join_cross","join_one","join_many","limit","measure","nest","order_by","primary_key","project","query","rename","sample","source","sql","turduck","top","where","all","as","asc","avg","boolean","by","case","cast","condition","count","date","day","days","desc","distinct","else","end","exclude","false","for","from","from_sql","has","hour","hours","import","is","json","last","max","min","minute","minutes","month","months","not","now","null","number","on","or","pick","quarter","quarters","second","seconds","string","sum","table","then","this","timestamp","to","true","turtle","week","weeks","when","with","year","years","ungrouped"]),Ei}var c0;function ed(){if(c0)return Vi;c0=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.maybeQuoteIdentifier=y;const a=Zx();function d(m){const h=!m.match(/^[A-Za-z_][A-Za-z_0-9]*$/),u=a.RESERVED_WORDS.includes(m.toLowerCase());return h||u}function y(m){return d(m)?`\`${m}\``:m}return Vi}var f0;function td(){if(f0)return vi;f0=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.queryToMalloy=d,vi.filterToMalloy=y;const a=ed();function d(T,{tabWidth:R}={tabWidth:2}){const q=v(T);return o(q,{tabWidth:R})}function y(T,{tabWidth:R}={tabWidth:2}){const q=C(T);return o(q,{tabWidth:R})}const m=Symbol("indent"),h=Symbol("newline"),u=Symbol("outdent"),r=Symbol("optional_newline_indent");function o(T,{tabWidth:R}={tabWidth:2}){let q="",H=0,J=!0;for(const M of T)if(M===h)q+=`
582
- `,J=!0;else if(M===u)H--;else if(M===m)H++;else{if(M===r)continue;J&&(q+=" ".repeat(H*R),J=!1),q+=M}return q}function t(T,R,q,H){var J;if(R.includes(h))return[T,h,m,...R,h,u,q];const V=((J=H?.spaces)!==null&&J!==void 0?J:!0)?" ":"";return[T,V,...R,V,q]}function i(T){return{contents:T,quoteCharacter:'"'}}function e(T,R){const q=[];for(let H=0;H<T.length;H++){const J=T[H];q.push(J),H<T.length-1&&q.push(R)}return q}function s(T){var R,q;switch(T.kind){case"filter_expression_literal":return[G(T.filter_expression_value)];case"boolean_literal":return[T.boolean_value.toString()];case"string_literal":{const{contents:H,quoteCharacter:J}=i(T.string_value);return[J,H,J]}case"number_literal":return[T.number_value.toString()];case"null_literal":return["null"];case"date_literal":return[c(l(T.date_value),(R=T.granularity)!==null&&R!==void 0?R:"day",T.timezone)];case"timestamp_literal":return[c(l(T.timestamp_value),(q=T.granularity)!==null&&q!==void 0?q:"second",T.timezone)]}}function l(T){let R;if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/.exec(T)){const[q,H,J,M,V,Z,se]=R;return[H,J,M,V,Z,se]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d)/.exec(T)){const[q,H,J,M,V,Z]=R;return[H,J,M,V,Z,"00"]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d)(?:00)?/.exec(T)){const[q,H,J,M,V]=R;return[H,J,M,V,"00","00"]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(T)){const[q,H,J,M]=R;return[H,J,M,"00","00","00"]}else if(R=/(\d\d\d\d)-(\d\d)/.exec(T)){const[q,H,J]=R;return[H,J,"01","00","00","00"]}else if(R=/(\d\d\d\d)/.exec(T)){const[q,H]=R;return[H,"01","01","00","00","00"]}return["1970","01","01","00","00","00"]}function c([T,R,q,H,J,M],V,Z){switch(V){case"year":return`@${T}`;case"quarter":{const se=Math.floor(+R/3)+1;return`@${T}-Q${se}`}case"month":return`@${T}-${R}`;case"week":return`@${T}-${R}-${q}-WK`;case"day":return`@${T}-${R}-${q}`;case"hour":return`@${T}-${R}-${q} ${H}`;case"minute":return`@${T}-${R}-${q} ${H}:${J}`;case"second":return Z!==void 0?`@${T}-${R}-${q} ${H}:${J}:${M}[${Z}]`:`@${T}-${R}-${q} ${H}:${J}:${M}`;default:throw new Error("Unknown timeframe.")}}function p(T){var R;const q=[];for(const H of(R=T.path)!==null&&R!==void 0?R:[])q.push((0,a.maybeQuoteIdentifier)(H)),q.push(".");if(q.push((0,a.maybeQuoteIdentifier)(T.name)),T.parameters){const H=[];for(let J=0;J<T.parameters.length;J++){const M=T.parameters[J];H.push((0,a.maybeQuoteIdentifier)(M.name)),H.push(" is "),H.push(...s(M.value)),J<T.parameters.length-1&&H.push(",",h)}q.push(...t("(",H,")",{spaces:!1}))}return q}function v(T){const R=[];return R.push(...F(T.annotations)),R.push("run: "),R.push(...g(T.definition)),R}function x(T){const R=[];switch(T.kind){case"source_reference":{R.push(...p(T));break}case"refinement":R.push(...g(T));break}return R}function g(T){const R=[];switch(T.kind){case"arrow":{R.push(...x(T.source)),R.push(" -> "),R.push(..._(T.view));break}case"query_reference":{R.push(...p(T));break}case"refinement":{const q=g(T.base);T.base.kind==="arrow"?R.push(...t("(",q,")",{spaces:!1})):R.push(...q),R.push(" + "),R.push(..._(T.refinement));break}}return R}function _(T){const R=[];switch(T.kind){case"arrow":{R.push(..._(T.source)),R.push(" -> "),R.push(..._(T.view));break}case"view_reference":{R.push(...p(T));break}case"refinement":{R.push(..._(T.base)),R.push(" + "),R.push(..._(T.refinement));break}case"segment":{R.push(...A(T));break}}return R}function A(T){if(T.operations.length===0)return["{ }"];const R=T.operations.length>1,q=[];for(let H=0;H<T.operations.length;H++){const J=T.operations[H],M=[J];for(;H<T.operations.length-1;){const V=T.operations[H+1];if(V.kind===J.kind)M.push(V),H++;else break}q.push(...E(M)),R&&H<T.operations.length-1&&q.push(h)}return t("{",q,"}")}function E(T){switch(T[0].kind){case"aggregate":return W(T,"aggregate");case"group_by":return W(T,"group_by");case"order_by":return L(T);case"nest":return Q(T);case"limit":return ie(T);case"where":return ce(T);case"having":return te(T);case"drill":return oe(T);case"calculate":return W(T,"calculate")}}function N(T,R,q=""){const H=[];H.push(`${T}:`);const J=R.length>1||R.some(M=>M.includes(h));J?H.push(h,m):H.push(" ");for(let M=0;M<R.length;M++){const V=R[M];H.push(...V),R.length>1&&M<R.length-1&&H.push(q),J&&M<R.length-1&&H.push(h)}return J&&H.push(u),H}function b(T){const R=[];return R.push(...P(T.expression)),R}function w(T){return T}function P(T){var R;switch(T.kind){case"field_reference":return p(T);case"time_truncation":return[...p(T.field_reference),".",T.truncation];case"filtered_field":return[...p(T.field_reference),...t(" {",ce(T.where),"}")];case"literal_value":return s(T.literal_value);case"moving_average":{const q=["avg_moving",...t("(",[...p(T.field_reference),T.rows_preceding!==void 0?`, ${T.rows_preceding}`:", 0",T.rows_following!==void 0?`, ${T.rows_following}`:""],")",{spaces:!1})];return!((R=T.partition_fields)===null||R===void 0)&&R.length&&q.push(...t(" {",["partition_by",": ",...e(T.partition_fields.flatMap(H=>p(H)),", ")],"}")),q}}}function j(T,R=!1){const q=[];return R||q.push(...F(T.field.annotations)),T.name&&(q.push((0,a.maybeQuoteIdentifier)(T.name)),q.push(" is ")),q.push(...b(T.field)),q}function W(T,R){const q=[],H=T.length===1;return H&&q.push(...F(T[0].field.annotations)),q.push(...N(R,T.map(J=>j(J,H)))),q}function L(T){return N("order_by",T.map($),",")}function $(T){const R=[];return R.push(...p(T.field_reference)),T.direction&&(R.push(" "),R.push(T.direction)),R}function Q(T){const R=[],q=T.length===1;return q&&R.push(...F(T[0].view.annotations)),R.push(...N("nest",T.map(H=>ee(H,q)))),R}function ee(T,R=!1){const q=[];return R||q.push(...F(T.view.annotations)),T.name&&(q.push((0,a.maybeQuoteIdentifier)(T.name)),q.push(" is ")),q.push(...I(T.view)),q}function I(T){return _(T.definition)}function X(T){return[`limit: ${T.limit}`]}function ie(T){const R=[];for(let q=0;q<T.length;q++)q!==0&&R.push(h),R.push(...X(T[q]));return R}function ce(T){return N("where",T.map(D),",")}function oe(T){return N("drill",T.map(D),",")}function te(T){return N("having",T.map(D),",")}const B=["`","'",'"'];function G(T){let R,q;for(const H of B){const J=O(T,H);if(J===T)return`f${H}${T}${H}`;(q===void 0||J.length<q.length)&&(R=H,q=J)}return`f${R}${q}${R}`}function O(T,R){let q="";for(let H=0;H<T.length;H++)T.slice(H).startsWith(R)?(q+="\\"+R,H+=R.length):(q+=T[H],T[H]==="\\"&&(q+=T[++H]));return q}function C(T){switch(T.kind){case"filter_string":return[...P(T.expression)," ~ ",G(T.filter)];case"literal_equality":return[...P(T.expression)," = ",...s(T.value)]}}function D(T){return C(T.filter)}function F(T){return T?T.flatMap(k):[]}function k(T){return[T.value.trim(),h]}return vi}var Fn={},p0;function rd(){if(p0)return Fn;p0=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.nestUnions=d,Fn.unnestUnions=y,Fn.convertFromThrift=m,Fn.convertToThrift=u;const a=Lp();function d(r){if(r==null)return r;if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(d);{const o={};let t;for(const i in r)i==="kind"?t=r[i]:o[i]=d(r[i]);return t===void 0?o:{[t]:o}}}function y(r,o){if(r==null)return r;if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(t=>y(t,o));{const t=h(o);if(t.type==="union"){for(const i in t.options)if(r[i]!==void 0){const e=y(r[i],t.options[i]);if(typeof e=="object")return{kind:i,...e}}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=y(r[e],s.type)}return i}else throw new Error(`Cannot unnest unions in an enum type ${o}`)}}function m(r,o){if(r==null)return r;if(typeof r=="string"||typeof r=="boolean")return r;if(typeof r=="number"){if(o==="number")return r;const t=h(o);if(t.type!=="enum")throw new Error(`Found a number where a ${o} was expected`);const i=Object.entries(t.values).find(([,e])=>e===r);if(i===void 0)throw new Error(`${r} is not a valid enum value for ${o}`);return i[0]}else{if(Array.isArray(r))return r.map(t=>m(t,o));{const t=h(o);if(t.type==="union"){for(const i in t.options)if(r[i]!==void 0&&r[i]!==null){const e=m(r[i],t.options[i]);if(typeof e=="object")return{kind:i,...e}}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=m(r[e],s.type)}return i}else throw new Error(`Cannot unnest unions in an enum type ${o}`)}}}function h(r){const o=a.MALLOY_INTERFACE_TYPES[r];if(o===void 0)throw new Error(`Unknown Malloy interface type ${r}`);return o}function u(r,o){if(r==null)return r;if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string"){if(o==="string")return r;const t=h(o);if(t.type==="enum"){const i=t.values[r];if(i===void 0)throw new Error(`${r} is not a valid enum value for ${o}`);return i}}else{if(Array.isArray(r))return r.map(t=>u(t,o));{const t=h(o);if(t.type==="union"){const i=r.kind,e=t.options[i];if(e===void 0)throw new Error(`${i} is not a valid union of ${o}`);const s=h(e);if(s.type!=="struct")throw new Error("Union fields must be structs");const l={};for(const c in r){if(c==="kind")continue;const p=s.fields[c];l[c]=u(r[c],p.type)}return{[i]:l}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=u(r[e],s.type)}return i}}}}return Fn}var h0;function nd(){return h0||(h0=1,(function(a){var d=Pn&&Pn.__createBinding||(Object.create?(function(u,r,o,t){t===void 0&&(t=o);var i=Object.getOwnPropertyDescriptor(r,o);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(u,t,i)}):(function(u,r,o,t){t===void 0&&(t=o),u[t]=r[o]})),y=Pn&&Pn.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&d(r,u,o)};Object.defineProperty(a,"__esModule",{value:!0}),a.thingy4sddfdfsd=a.thingy4sdfsd=a.thingy4dfdsfs=a.thingy4asdfas=a.thingy4asdfasdf=a.thingy3dfdf=a.thingy3=a.thingy2asdf=a.thingyssdfg=a.thingy123r=a.thingy1=a.res=a.test=a.convertToThrift=a.convertFromThrift=a.unnestUnions=a.nestUnions=a.filterToMalloy=a.queryToMalloy=void 0,y(Lp(),a);var m=td();Object.defineProperty(a,"queryToMalloy",{enumerable:!0,get:function(){return m.queryToMalloy}}),Object.defineProperty(a,"filterToMalloy",{enumerable:!0,get:function(){return m.filterToMalloy}});var h=rd();Object.defineProperty(a,"nestUnions",{enumerable:!0,get:function(){return h.nestUnions}}),Object.defineProperty(a,"unnestUnions",{enumerable:!0,get:function(){return h.unnestUnions}}),Object.defineProperty(a,"convertFromThrift",{enumerable:!0,get:function(){return h.convertFromThrift}}),Object.defineProperty(a,"convertToThrift",{enumerable:!0,get:function(){return h.convertToThrift}}),a.test={entries:[{kind:"source",name:"flights",schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"boolean_type"},annotations:[{value:"# foo=1"}]},{kind:"dimension",name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}},{kind:"dimension",name:"arr_rec",type:{kind:"array_type",element_type:{kind:"record_type",fields:[{name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}}]}}},{kind:"dimension",name:"rec",type:{kind:"record_type",fields:[{name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}}]}},{kind:"join",name:"carriers",relationship:"one",schema:{fields:[{kind:"dimension",name:"code",type:{kind:"string_type"}}]}},{kind:"view",name:"by_carrier",schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"string_type"}},{kind:"dimension",name:"flight_count",type:{kind:"number_type"}}]}}]},parameters:[{name:"param",type:{kind:"number_type"},default_value:{kind:"number_literal",number_value:7}}]}],anonymous_queries:[]},a.res={connection_name:"foo",data:{kind:"array_cell",array_value:[{kind:"record_cell",record_value:[{kind:"string_cell",string_value:"UA"},{kind:"number_cell",number_value:12341234}]},{kind:"record_cell",record_value:[{kind:"string_cell",string_value:"AA"},{kind:"number_cell",number_value:2343}]}]},schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"string_type"}},{kind:"dimension",name:"flight_count",type:{kind:"number_type"}}]},sql:"SELECT * ..."},a.thingy1={definition:{kind:"query_reference",name:"flights_by_carrier"}},a.thingy123r={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"view_reference",name:"by_carrier"}}},a.thingyssdfg={definition:{kind:"refinement",base:{kind:"query_reference",name:"flights"},refinement:{kind:"view_reference",name:"by_carrier"}}},a.thingy2asdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"where",filter:{kind:"filter_string",expression:{kind:"field_reference",name:"carrier"},filter:"WN"}}]}}}},a.thingy3={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"group_by",field:{expression:{kind:"field_reference",name:"foo"}}}]}}}},a.thingy3dfdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"view_reference",name:"top10"}}}},a.thingy4asdfasdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"group_by",field:{expression:{kind:"field_reference",name:"foo"}}}]}}},a.thingy4asdfas={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"view_reference",name:"by_carrier"}}},a.thingy4dfdsfs={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"limit",limit:10}]}}}},a.thingy4sdfsd={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"limit",limit:10}]}}},a.thingy4sddfdfsd={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[]}}}})(Pn)),Pn}var In={},xr={},Je={},Si={},Ze={},x0;function id(){if(x0)return Ze;x0=1;var a=Ze&&Ze.__createBinding||(Object.create?(function(i,e,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(e,s);(!c||("get"in c?!e.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(i,l,c)}):(function(i,e,s,l){l===void 0&&(l=s),i[l]=e[s]})),d=Ze&&Ze.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),y=Ze&&Ze.__importStar||(function(){var i=function(e){return i=Object.getOwnPropertyNames||function(s){var l=[];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[l.length]=c);return l},i(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var l=i(e),c=0;c<l.length;c++)l[c]!=="default"&&a(s,e,l[c]);return d(s,e),s}})();Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.MalloyTagLexer=void 0;const m=po(),h=br(),u=co(),r=Tr(),o=y(ut());let t=class it extends h.Lexer{get vocabulary(){return it.VOCABULARY}constructor(e){super(e),this._interp=new u.LexerATNSimulator(it._ATN,this)}get grammarFileName(){return"MalloyTag.g4"}get ruleNames(){return it.ruleNames}get serializedATN(){return it._serializedATN}get channelNames(){return it.channelNames}get modeNames(){return it.modeNames}static get _ATN(){return it.__ATN||(it.__ATN=new m.ATNDeserializer().deserialize(o.toCharArray(it._serializedATN))),it.__ATN}};return Ze.MalloyTagLexer=t,t.MINUS_DOTTY=1,t.DOTTY=2,t.DOT=3,t.MINUS=4,t.EQ=5,t.RF_BEG=6,t.RF_END=7,t.PR_BEG=8,t.PR_END=9,t.AR_BEG=10,t.COMMA=11,t.AR_END=12,t.SQ_STRING=13,t.DQ_STRING=14,t.BQ_STRING=15,t.NUMERIC_LITERAL=16,t.BARE_STRING=17,t.COMMENT=18,t.WHITE_SPACE=19,t.UNEXPECTED_CHAR=20,t.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],t.modeNames=["DEFAULT_MODE"],t.ruleNames=["MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","ID_CHAR","DIGIT","HEX","UNICODE","SAFE_NON_QUOTE","ESCAPED","SQ_STRING","DQ_STRING","BQ_STRING","INTEGER_LITERAL","EXPONENT","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],t._LITERAL_NAMES=[void 0,"'-...'","'...'","'.'","'-'","'='","'$('","')'","'{'","'}'","'['","','","']'"],t._SYMBOLIC_NAMES=[void 0,"MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","SQ_STRING","DQ_STRING","BQ_STRING","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],t.VOCABULARY=new r.VocabularyImpl(t._LITERAL_NAMES,t._SYMBOLIC_NAMES,[]),t._serializedATN=`줝쪺֍꾺体؇쉁Í\b     \x07 \x07\b \b 
582
+ `,J=!0;else if(M===u)H--;else if(M===m)H++;else{if(M===r)continue;J&&(q+=" ".repeat(H*R),J=!1),q+=M}return q}function t(T,R,q,H){var J;if(R.includes(h))return[T,h,m,...R,h,u,q];const V=((J=H?.spaces)!==null&&J!==void 0?J:!0)?" ":"";return[T,V,...R,V,q]}function i(T){return{contents:T,quoteCharacter:'"'}}function e(T,R){const q=[];for(let H=0;H<T.length;H++){const J=T[H];q.push(J),H<T.length-1&&q.push(R)}return q}function s(T){var R,q;switch(T.kind){case"filter_expression_literal":return[G(T.filter_expression_value)];case"boolean_literal":return[T.boolean_value.toString()];case"string_literal":{const{contents:H,quoteCharacter:J}=i(T.string_value);return[J,H,J]}case"number_literal":return[T.number_value.toString()];case"null_literal":return["null"];case"date_literal":return[c(l(T.date_value),(R=T.granularity)!==null&&R!==void 0?R:"day",T.timezone)];case"timestamp_literal":return[c(l(T.timestamp_value),(q=T.granularity)!==null&&q!==void 0?q:"second",T.timezone)]}}function l(T){let R;if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/.exec(T)){const[q,H,J,M,V,Z,se]=R;return[H,J,M,V,Z,se]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d)/.exec(T)){const[q,H,J,M,V,Z]=R;return[H,J,M,V,Z,"00"]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d)(?:00)?/.exec(T)){const[q,H,J,M,V]=R;return[H,J,M,V,"00","00"]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(T)){const[q,H,J,M]=R;return[H,J,M,"00","00","00"]}else if(R=/(\d\d\d\d)-(\d\d)/.exec(T)){const[q,H,J]=R;return[H,J,"01","00","00","00"]}else if(R=/(\d\d\d\d)/.exec(T)){const[q,H]=R;return[H,"01","01","00","00","00"]}return["1970","01","01","00","00","00"]}function c([T,R,q,H,J,M],V,Z){switch(V){case"year":return`@${T}`;case"quarter":{const se=Math.floor(+R/3)+1;return`@${T}-Q${se}`}case"month":return`@${T}-${R}`;case"week":return`@${T}-${R}-${q}-WK`;case"day":return`@${T}-${R}-${q}`;case"hour":return`@${T}-${R}-${q} ${H}`;case"minute":return`@${T}-${R}-${q} ${H}:${J}`;case"second":return Z!==void 0?`@${T}-${R}-${q} ${H}:${J}:${M}[${Z}]`:`@${T}-${R}-${q} ${H}:${J}:${M}`;default:throw new Error("Unknown timeframe.")}}function p(T){var R;const q=[];for(const H of(R=T.path)!==null&&R!==void 0?R:[])q.push((0,a.maybeQuoteIdentifier)(H)),q.push(".");if(q.push((0,a.maybeQuoteIdentifier)(T.name)),T.parameters){const H=[];for(let J=0;J<T.parameters.length;J++){const M=T.parameters[J];H.push((0,a.maybeQuoteIdentifier)(M.name)),H.push(" is "),H.push(...s(M.value)),J<T.parameters.length-1&&H.push(",",h)}q.push(...t("(",H,")",{spaces:!1}))}return q}function v(T){const R=[];return R.push(...F(T.annotations)),R.push("run: "),R.push(...g(T.definition)),R}function x(T){const R=[];switch(T.kind){case"source_reference":{R.push(...p(T));break}case"refinement":R.push(...g(T));break}return R}function g(T){const R=[];switch(T.kind){case"arrow":{R.push(...x(T.source)),R.push(" -> "),R.push(..._(T.view));break}case"query_reference":{R.push(...p(T));break}case"refinement":{const q=g(T.base);T.base.kind==="arrow"?R.push(...t("(",q,")",{spaces:!1})):R.push(...q),R.push(" + "),R.push(..._(T.refinement));break}}return R}function _(T){const R=[];switch(T.kind){case"arrow":{R.push(..._(T.source)),R.push(" -> "),R.push(..._(T.view));break}case"view_reference":{R.push(...p(T));break}case"refinement":{R.push(..._(T.base)),R.push(" + "),R.push(..._(T.refinement));break}case"segment":{R.push(...A(T));break}}return R}function A(T){if(T.operations.length===0)return["{ }"];const R=T.operations.length>1,q=[];for(let H=0;H<T.operations.length;H++){const J=T.operations[H],M=[J];for(;H<T.operations.length-1;){const V=T.operations[H+1];if(V.kind===J.kind)M.push(V),H++;else break}q.push(...E(M)),R&&H<T.operations.length-1&&q.push(h)}return t("{",q,"}")}function E(T){switch(T[0].kind){case"aggregate":return W(T,"aggregate");case"group_by":return W(T,"group_by");case"order_by":return L(T);case"nest":return Q(T);case"limit":return ie(T);case"where":return ce(T);case"having":return te(T);case"drill":return oe(T);case"calculate":return W(T,"calculate")}}function N(T,R,q=""){const H=[];H.push(`${T}:`);const J=R.length>1||R.some(M=>M.includes(h));J?H.push(h,m):H.push(" ");for(let M=0;M<R.length;M++){const V=R[M];H.push(...V),R.length>1&&M<R.length-1&&H.push(q),J&&M<R.length-1&&H.push(h)}return J&&H.push(u),H}function b(T){const R=[];return R.push(...P(T.expression)),R}function w(T){return T}function P(T){var R;switch(T.kind){case"field_reference":return p(T);case"time_truncation":return[...p(T.field_reference),".",T.truncation];case"filtered_field":return[...p(T.field_reference),...t(" {",ce(T.where),"}")];case"literal_value":return s(T.literal_value);case"moving_average":{const q=["avg_moving",...t("(",[...p(T.field_reference),T.rows_preceding!==void 0?`, ${T.rows_preceding}`:", 0",T.rows_following!==void 0?`, ${T.rows_following}`:""],")",{spaces:!1})];return!((R=T.partition_fields)===null||R===void 0)&&R.length&&q.push(...t(" {",["partition_by",": ",...e(T.partition_fields.flatMap(H=>p(H)),", ")],"}")),q}}}function j(T,R=!1){const q=[];return R||q.push(...F(T.field.annotations)),T.name&&(q.push((0,a.maybeQuoteIdentifier)(T.name)),q.push(" is ")),q.push(...b(T.field)),q}function W(T,R){const q=[],H=T.length===1;return H&&q.push(...F(T[0].field.annotations)),q.push(...N(R,T.map(J=>j(J,H)))),q}function L(T){return N("order_by",T.map($),",")}function $(T){const R=[];return R.push(...p(T.field_reference)),T.direction&&(R.push(" "),R.push(T.direction)),R}function Q(T){const R=[],q=T.length===1;return q&&R.push(...F(T[0].view.annotations)),R.push(...N("nest",T.map(H=>ee(H,q)))),R}function ee(T,R=!1){const q=[];return R||q.push(...F(T.view.annotations)),T.name&&(q.push((0,a.maybeQuoteIdentifier)(T.name)),q.push(" is ")),q.push(...I(T.view)),q}function I(T){return _(T.definition)}function X(T){return[`limit: ${T.limit}`]}function ie(T){const R=[];for(let q=0;q<T.length;q++)q!==0&&R.push(h),R.push(...X(T[q]));return R}function ce(T){return N("where",T.map(D),",")}function oe(T){return N("drill",T.map(D),",")}function te(T){return N("having",T.map(D),",")}const B=["`","'",'"'];function G(T){let R,q;for(const H of B){const J=O(T,H);if(J===T)return`f${H}${T}${H}`;(q===void 0||J.length<q.length)&&(R=H,q=J)}return`f${R}${q}${R}`}function O(T,R){let q="";for(let H=0;H<T.length;H++)T.slice(H).startsWith(R)?(q+="\\"+R,H+=R.length):(q+=T[H],T[H]==="\\"&&(q+=T[++H]));return q}function C(T){switch(T.kind){case"filter_string":return[...P(T.expression)," ~ ",G(T.filter)];case"literal_equality":return[...P(T.expression)," = ",...s(T.value)]}}function D(T){return C(T.filter)}function F(T){return T?T.flatMap(k):[]}function k(T){return[T.value.trim(),h]}return vi}var Fn={},p0;function rd(){if(p0)return Fn;p0=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.nestUnions=d,Fn.unnestUnions=y,Fn.convertFromThrift=m,Fn.convertToThrift=u;const a=Lp();function d(r){if(r==null)return r;if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(d);{const o={};let t;for(const i in r)i==="kind"?t=r[i]:o[i]=d(r[i]);return t===void 0?o:{[t]:o}}}function y(r,o){if(r==null)return r;if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(t=>y(t,o));{const t=h(o);if(t.type==="union"){for(const i in t.options)if(r[i]!==void 0){const e=y(r[i],t.options[i]);if(typeof e=="object")return{kind:i,...e}}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=y(r[e],s.type)}return i}else throw new Error(`Cannot unnest unions in an enum type ${o}`)}}function m(r,o){if(r==null)return r;if(typeof r=="string"||typeof r=="boolean")return r;if(typeof r=="number"){if(o==="number")return r;const t=h(o);if(t.type!=="enum")throw new Error(`Found a number where a ${o} was expected`);const i=Object.entries(t.values).find(([,e])=>e===r);if(i===void 0)throw new Error(`${r} is not a valid enum value for ${o}`);return i[0]}else{if(Array.isArray(r))return r.map(t=>m(t,o));{const t=h(o);if(t.type==="union"){for(const i in t.options)if(r[i]!==void 0&&r[i]!==null){const e=m(r[i],t.options[i]);if(typeof e=="object")return{kind:i,...e}}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=m(r[e],s.type)}return i}else throw new Error(`Cannot unnest unions in an enum type ${o}`)}}}function h(r){const o=a.MALLOY_INTERFACE_TYPES[r];if(o===void 0)throw new Error(`Unknown Malloy interface type ${r}`);return o}function u(r,o){if(r==null)return r;if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string"){if(o==="string")return r;const t=h(o);if(t.type==="enum"){const i=t.values[r];if(i===void 0)throw new Error(`${r} is not a valid enum value for ${o}`);return i}}else{if(Array.isArray(r))return r.map(t=>u(t,o));{const t=h(o);if(t.type==="union"){const i=r.kind,e=t.options[i];if(e===void 0)throw new Error(`${i} is not a valid union of ${o}`);const s=h(e);if(s.type!=="struct")throw new Error("Union fields must be structs");const l={};for(const c in r){if(c==="kind")continue;const p=s.fields[c];l[c]=u(r[c],p.type)}return{[i]:l}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=u(r[e],s.type)}return i}}}}return Fn}var h0;function nd(){return h0||(h0=1,(function(a){var d=Pn&&Pn.__createBinding||(Object.create?(function(u,r,o,t){t===void 0&&(t=o);var i=Object.getOwnPropertyDescriptor(r,o);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(u,t,i)}):(function(u,r,o,t){t===void 0&&(t=o),u[t]=r[o]})),y=Pn&&Pn.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&d(r,u,o)};Object.defineProperty(a,"__esModule",{value:!0}),a.thingy4sddfdfsd=a.thingy4sdfsd=a.thingy4dfdsfs=a.thingy4asdfas=a.thingy4asdfasdf=a.thingy3dfdf=a.thingy3=a.thingy2asdf=a.thingyssdfg=a.thingy123r=a.thingy1=a.res=a.test=a.convertToThrift=a.convertFromThrift=a.unnestUnions=a.nestUnions=a.filterToMalloy=a.queryToMalloy=void 0,y(Lp(),a);var m=td();Object.defineProperty(a,"queryToMalloy",{enumerable:!0,get:function(){return m.queryToMalloy}}),Object.defineProperty(a,"filterToMalloy",{enumerable:!0,get:function(){return m.filterToMalloy}});var h=rd();Object.defineProperty(a,"nestUnions",{enumerable:!0,get:function(){return h.nestUnions}}),Object.defineProperty(a,"unnestUnions",{enumerable:!0,get:function(){return h.unnestUnions}}),Object.defineProperty(a,"convertFromThrift",{enumerable:!0,get:function(){return h.convertFromThrift}}),Object.defineProperty(a,"convertToThrift",{enumerable:!0,get:function(){return h.convertToThrift}}),a.test={entries:[{kind:"source",name:"flights",schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"boolean_type"},annotations:[{value:"# foo=1"}]},{kind:"dimension",name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}},{kind:"dimension",name:"arr_rec",type:{kind:"array_type",element_type:{kind:"record_type",fields:[{name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}}]}}},{kind:"dimension",name:"rec",type:{kind:"record_type",fields:[{name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}}]}},{kind:"join",name:"carriers",relationship:"one",schema:{fields:[{kind:"dimension",name:"code",type:{kind:"string_type"}}]}},{kind:"view",name:"by_carrier",schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"string_type"}},{kind:"dimension",name:"flight_count",type:{kind:"number_type"}}]}}]},parameters:[{name:"param",type:{kind:"number_type"},default_value:{kind:"number_literal",number_value:7}}]}],anonymous_queries:[]},a.res={connection_name:"foo",data:{kind:"array_cell",array_value:[{kind:"record_cell",record_value:[{kind:"string_cell",string_value:"UA"},{kind:"number_cell",number_value:12341234}]},{kind:"record_cell",record_value:[{kind:"string_cell",string_value:"AA"},{kind:"number_cell",number_value:2343}]}]},schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"string_type"}},{kind:"dimension",name:"flight_count",type:{kind:"number_type"}}]},sql:"SELECT * ..."},a.thingy1={definition:{kind:"query_reference",name:"flights_by_carrier"}},a.thingy123r={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"view_reference",name:"by_carrier"}}},a.thingyssdfg={definition:{kind:"refinement",base:{kind:"query_reference",name:"flights"},refinement:{kind:"view_reference",name:"by_carrier"}}},a.thingy2asdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"where",filter:{kind:"filter_string",expression:{kind:"field_reference",name:"carrier"},filter:"WN"}}]}}}},a.thingy3={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"group_by",field:{expression:{kind:"field_reference",name:"foo"}}}]}}}},a.thingy3dfdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"view_reference",name:"top10"}}}},a.thingy4asdfasdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"group_by",field:{expression:{kind:"field_reference",name:"foo"}}}]}}},a.thingy4asdfas={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"view_reference",name:"by_carrier"}}},a.thingy4dfdsfs={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"limit",limit:10}]}}}},a.thingy4sdfsd={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"limit",limit:10}]}}},a.thingy4sddfdfsd={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[]}}}})(Pn)),Pn}var In={},xr={},Je={},Si={},Ze={},x0;function id(){if(x0)return Ze;x0=1;var a=Ze&&Ze.__createBinding||(Object.create?(function(i,e,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(e,s);(!c||("get"in c?!e.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(i,l,c)}):(function(i,e,s,l){l===void 0&&(l=s),i[l]=e[s]})),d=Ze&&Ze.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),y=Ze&&Ze.__importStar||(function(){var i=function(e){return i=Object.getOwnPropertyNames||function(s){var l=[];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[l.length]=c);return l},i(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var l=i(e),c=0;c<l.length;c++)l[c]!=="default"&&a(s,e,l[c]);return d(s,e),s}})();Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.MalloyTagLexer=void 0;const m=ho(),h=Tr(),u=uo(),r=Er(),o=y(ut());let t=class it extends h.Lexer{get vocabulary(){return it.VOCABULARY}constructor(e){super(e),this._interp=new u.LexerATNSimulator(it._ATN,this)}get grammarFileName(){return"MalloyTag.g4"}get ruleNames(){return it.ruleNames}get serializedATN(){return it._serializedATN}get channelNames(){return it.channelNames}get modeNames(){return it.modeNames}static get _ATN(){return it.__ATN||(it.__ATN=new m.ATNDeserializer().deserialize(o.toCharArray(it._serializedATN))),it.__ATN}};return Ze.MalloyTagLexer=t,t.MINUS_DOTTY=1,t.DOTTY=2,t.DOT=3,t.MINUS=4,t.EQ=5,t.RF_BEG=6,t.RF_END=7,t.PR_BEG=8,t.PR_END=9,t.AR_BEG=10,t.COMMA=11,t.AR_END=12,t.SQ_STRING=13,t.DQ_STRING=14,t.BQ_STRING=15,t.NUMERIC_LITERAL=16,t.BARE_STRING=17,t.COMMENT=18,t.WHITE_SPACE=19,t.UNEXPECTED_CHAR=20,t.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],t.modeNames=["DEFAULT_MODE"],t.ruleNames=["MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","ID_CHAR","DIGIT","HEX","UNICODE","SAFE_NON_QUOTE","ESCAPED","SQ_STRING","DQ_STRING","BQ_STRING","INTEGER_LITERAL","EXPONENT","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],t._LITERAL_NAMES=[void 0,"'-...'","'...'","'.'","'-'","'='","'$('","')'","'{'","'}'","'['","','","']'"],t._SYMBOLIC_NAMES=[void 0,"MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","SQ_STRING","DQ_STRING","BQ_STRING","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],t.VOCABULARY=new r.VocabularyImpl(t._LITERAL_NAMES,t._SYMBOLIC_NAMES,[]),t._serializedATN=`줝쪺֍꾺体؇쉁Í\b     \x07 \x07\b \b 
583
583
 
584
584
  \v \v\f \f\r \r             \x1B \x1B  \x07\x07\x07\b\b  
585
585
  
@@ -602,7 +602,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
602
602
  \v\f\r\x1B!#%')+-/13579\v2;2;CHch\x07!$$))^^bb$$bb))bb$$))GGgg--//\v\r""ʇC\\aac|¬¬··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰͇͇ͲͶ͸͹ͼͿ΁΁ΈΈΊΌΎΎΐΣΥϷϹ҃ҌԱԳ՘՛՛գ։ֲֿׁׁ׃ׄ׆ׇ׉׉ג׬ײ״ؒ؜آٙٛ١ٰەۗ۞ۣ۪ۯ۱ۼ۾܁܁ܒ݁ݏ޳ߌ߬߶߷߼߼ࠂ࠙ࠜ࠮ࡂ࡚ࢢࢶࢸࢿࣲࣖ࣡ࣥ࣫ऽिॎॐ॒ॗ॥ॳঅই঎঑঒কপবল঴঴স঻ি৆৉৊্ৎ৐৐৙৙৞য়ৡ৥৲৳ਃਅਇ਌਑਒ਕਪਬਲ਴ਵ਷ਸ਺਻ੀ੄੉੊੍੎੓੓ਜ਼ਫ਼੠੠ੲ੷ઃઅઇએઑઓકપબલ઴વષ઻િેૉો્૎૒૒ૢ૥ૻૻଃଅଇ଎଑଒କପବଲ଴ଵଷ଻ି୆୉୊୍୎୘୙୞ୟୡ୥୳୳஄அஇ஌ஐஒஔ஗஛ஜஞஞ஠஡஥஦ப஬ர஻ீ௄ைொௌ௎௒௒௙௙ంఅఇఎఐఒఔపబ఻ిెైొౌ౎౗ౘౚ౜ౢ౥ಂಅಇಎಐಒಔಪಬವಷ಻ಿೆೈೊೌ೎೗೘ೠೠೢ೥ೳ೴ഃഅഇഎഐഒഔ഼ിെൈൊൌൎ൐൐ൖ൙ൡ൥ർඁ඄අඇ඘ගඳඵල඿඿ෂ෈ෑූෘෘේ෡෴෵ฃ฼โ่๏๏຃ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯົຽ຿ໂໆ່່໏໏ໞ໡༂༂གཉཋ཮ཱིྃྊྙྛ྾ဂး််ွ၁ၒၤၧၪၰႈ႐႐႞႟ႢჇ჉჉჏჏გჼჾቊቌ቏ቒቘቚቚቜ቟ቢኊኌ኏ኒኲኴ኷ኺዀዂዂዄ዇ዊዘዚጒጔ጗ጚ፜፡፡ᎂ᎑Ꭲ᏷ᏺ᏿ᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰ᛺ᜂᜎᜐ᜕ᜢ᜵ᝂ᝕ᝢᝮᝰᝲ᝴᝵គ឵ី៊៙៙៞៞ᠢ᡹ᢂ᢬ᢲ᣷ᤂᤠᤢ᤭ᤲ᤺ᥒ᥯ᥲ᥶ᦂ᦭ᦲ᧋ᨂ᨝ᨢ᩠ᩣ᩶᪩᪩ᬂᬵᬷᭅᭇ᭍ᮂ᮫ᮮ᮱ᮼᯧᯩ᯳ᰂ᰷ᱏ᱑ᱜ᱿ᲂᲊᳫᳮᳰᳵ᳷᳸ᴂ᷁ᷩ᷶Ḃ἗Ἒ἟ἢ὇Ὂ὏ὒὙὛὛὝὝὟὟὡ὿ᾂᾶᾸι῀῀ῄῆῈ῎ῒ῕Ῐ῝ῢ΅ῴῶῸ῾⁳⁳₁₁ₒ₞℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊Ⓒ⓫ⰂⰰⰲⱠⱢ⳦Ⳮ⳰⳴⳵ⴂⴧ⴩⴩⴯⴯ⴲ⵩⵱⵱ⶂ⶘ⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠⷢ⸁⸱⸱〇〉〣〫〳〷〺〾ぃ゘ゟァィーヾ㄁ㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂ꒎ꓒ꓿ꔂ꘎ꘒ꘡꘬꘭Ꙃ꙰ꙶ꙽ꚁ꛱ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹꠃꠅꠇꠉꠌꠎ꠩ꡂ꡵ꢂꣅ꣇꣇ꣴ꣹ꣽꣽꣿꣿꤌ꤬ꤲ꥔ꥢ꥾ꦂꦴꦶ꧁꧑꧑ꧢꧦꧨ꧱ꧼꨀꨂ꨸ꩂ꩏ꩢ꩸ꩼꩼꪀꫀꫂꫂ꫄꫄ꫝ꫟ꫢ꫱ꫴ꫷ꬃ꬈ꬋ꬐ꬓ꬘ꬢꬨꬪꬰꬲꭜꭞꭧꭲ꯬갂힥ힲ퟈ퟍ퟽車﩯全﫛fl﬈ﬕ﬙ײַשׁשּׁטּךּמּנּנּ﭂ףּ﭅צּרּ﮳ﯕ﴿ﵒ﶑ﶔ﷉ﷲ﷽ﹲﹶﹸ﻾C\c|ィ￀ᅣ￉ᅩ￑ᅯ￙ᅵ￞\r(*<>?AOR_‚üłŶʂʞʢ˒̡̲̂͌͒ͼ΂Ο΢υϊϑϓϗЂҟҲӕӚӽԂԩԲե؂ܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠ࣢ࣶࣴࣷंगढऻংহীুਂਅਇਈ਎ਕਗਙਛਵ੢੾ંઞૂૉો૦ଂଷୂୗୢ୴ஂஓంొಂ಴ೂ೴ဂ၇ႄႺგცᄂᄴᅒᅴᅸᅸᆂᇁᇃᇆᇜᇜᇞᇞሂሓሕሶሹሹቀቀኂኈኊኊኌ኏ኑኟኡኪኲዪጂጅጇጎ጑ጒጕጪጬጲጴጵጷጻጿፆፉፊፍፎፒፒፙፙ፟፥ᐂᑃᑅᑇᑉᑌᒂᓃᓆᓇᓉᓉᖂᖷᖺᗀᗚᗟᘂᙀᙂᙂᙆᙆᚂᚷᜂ᜛ᜟᜬᢢᣡᤁᤁ᫂᫺ᰂᰊᰌ᰸᰺᱀᱂᱂ᱴᲑᲔᲩᲫᲸ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠櫒櫯欂欸歂歅步歹歿殑漂潆潒澀澕澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛베베퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌힪힬ퟄퟆퟍꛘ꜂뜶띂렟렢캣﨟Ý\x07 \v\r')+13579;@\x07D F\vH\rJMOQSUW\x1BY[]!_#g%i'l)x+„-‘/˜1±3µ5¹7Å9Ë;<\x07/<=\x070=>\x070>?\x070?@A\x070AB\x070BC\x070CDE\x070E\bFG\x07/G
603
603
  HI\x07?I\fJK\x07&KL\x07*LMN\x07+NOP\x07}PQR\x07RST\x07]TUV\x07.VWX\x07_XYZ \vZ[\\ \\]^ ^ _\`\x07^\`a\x07wabbccddeeff"gh
604
604
  h$ij\x07^jk\vk&ls\x07)mr!nr%or#pr qmqnqoqprusqsttvusvw\x07)w(x\x07$y~!z~%{~#|~ }y}z}{}|~}€€‚‚ƒ\x07$ƒ*„‹\x07b…Š!†Š%‡Š#ˆŠ \x07‰…‰†‰‡‰ˆŠ‹‰‹ŒŒŽ‹Ž\x07b,’ ‘‘’’”“•”“•––”–——.˜š \b™› š™š››œžœžŸŸŸ  0¡£-¢¡¢££¤¤¦\x07¥§¦¥§¨¨¦¨©©«ª¬/«ª«¬¬²­¯-®°/¯®¯°°²±¢±­²2³¶´¶\x1Bµ³µ´¶··µ·¸¸4¹½\x07%º¼\v»º¼¿½¾½»¾À¿½ÀÁ\x07ÁÂÂÃ\b\x1BÃ6ÄÆ
605
- ÅÄÆÇÇÅÇÈÈÉÉÊ\bÊ8ËÌ\vÌ:qs}‰‹‘–šŸ¢¨«¯±µ·½Ç\b`,Ze}var Oe={},d0;function od(){if(d0)return Oe;d0=1;var a=Oe&&Oe.__createBinding||(Object.create?(function(ee,I,X,ie){ie===void 0&&(ie=X);var ce=Object.getOwnPropertyDescriptor(I,X);(!ce||("get"in ce?!I.__esModule:ce.writable||ce.configurable))&&(ce={enumerable:!0,get:function(){return I[X]}}),Object.defineProperty(ee,ie,ce)}):(function(ee,I,X,ie){ie===void 0&&(ie=X),ee[ie]=I[X]})),d=Oe&&Oe.__setModuleDefault||(Object.create?(function(ee,I){Object.defineProperty(ee,"default",{enumerable:!0,value:I})}):function(ee,I){ee.default=I}),y=Oe&&Oe.__importStar||(function(){var ee=function(I){return ee=Object.getOwnPropertyNames||function(X){var ie=[];for(var ce in X)Object.prototype.hasOwnProperty.call(X,ce)&&(ie[ie.length]=ce);return ie},ee(I)};return function(I){if(I&&I.__esModule)return I;var X={};if(I!=null)for(var ie=ee(I),ce=0;ce<ie.length;ce++)ie[ce]!=="default"&&a(X,I,ie[ce]);return d(X,I),X}})();Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.PropertiesContext=Oe.ArrayValueContext=Oe.ReferenceContext=Oe.ArrayElementContext=Oe.EqValueContext=Oe.PropNameContext=Oe.IdentifierContext=Oe.StringContext=Oe.TagEmptyContext=Oe.TagDefContext=Oe.TagUpdatePropertiesContext=Oe.TagReplacePropertiesContext=Oe.TagEqContext=Oe.TagSpecContext=Oe.TagLineContext=Oe.MalloyTagParser=void 0;const m=lt(),h=po(),u=io(),r=ho(),o=$i(),t=st(),i=qi(),e=Ar(),s=Ie(),l=Tr(),c=y(ut());let p=class ye extends o.Parser{get vocabulary(){return ye.VOCABULARY}get grammarFileName(){return"MalloyTag.g4"}get ruleNames(){return ye.ruleNames}get serializedATN(){return ye._serializedATN}createFailedPredicateException(I,X){return new u.FailedPredicateException(this,I,X)}constructor(I){super(I),this._interp=new i.ParserATNSimulator(ye._ATN,this)}tagLine(){let I=new v(this._ctx,this.state);this.enterRule(I,0,ye.RULE_tagLine);let X;try{this.enterOuterAlt(I,1);{for(this.state=23,this._errHandler.sync(this),X=this._input.LA(1);(X&-32)===0&&(1<<X&(1<<ye.MINUS_DOTTY|1<<ye.MINUS|1<<ye.BQ_STRING|1<<ye.BARE_STRING))!==0;)this.state=20,this.tagSpec(),this.state=25,this._errHandler.sync(this),X=this._input.LA(1);this.state=26,this.match(ye.EOF)}}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}tagSpec(){let I=new x(this._ctx,this.state);this.enterRule(I,2,ye.RULE_tagSpec);let X;try{switch(this.state=49,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,4,this._ctx)){case 1:I=new g(I),this.enterOuterAlt(I,1),this.state=28,this.propName(),this.state=29,this.match(ye.EQ),this.state=30,this.eqValue(),this.state=32,this._errHandler.sync(this),X=this._input.LA(1),X===ye.PR_BEG&&(this.state=31,this.properties());break;case 2:I=new _(I),this.enterOuterAlt(I,2),this.state=34,this.propName(),this.state=35,this.match(ye.EQ),this.state=37,this._errHandler.sync(this),X=this._input.LA(1),X===ye.DOTTY&&(this.state=36,this.match(ye.DOTTY)),this.state=39,this.properties();break;case 3:I=new A(I),this.enterOuterAlt(I,3),this.state=41,this.propName(),this.state=42,this.properties();break;case 4:I=new E(I),this.enterOuterAlt(I,4),this.state=45,this._errHandler.sync(this),X=this._input.LA(1),X===ye.MINUS&&(this.state=44,this.match(ye.MINUS)),this.state=47,this.propName();break;case 5:I=new N(I),this.enterOuterAlt(I,5),this.state=48,this.match(ye.MINUS_DOTTY);break}}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}string(){let I=new b(this._ctx,this.state);this.enterRule(I,4,ye.RULE_string);let X;try{this.enterOuterAlt(I,1),this.state=51,X=this._input.LA(1),(X&-32)===0&&(1<<X&(1<<ye.SQ_STRING|1<<ye.DQ_STRING|1<<ye.NUMERIC_LITERAL|1<<ye.BARE_STRING))!==0?(this._input.LA(1)===s.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}identifier(){let I=new w(this._ctx,this.state);this.enterRule(I,6,ye.RULE_identifier);let X;try{this.enterOuterAlt(I,1),this.state=53,X=this._input.LA(1),X===ye.BQ_STRING||X===ye.BARE_STRING?(this._input.LA(1)===s.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}propName(){let I=new P(this._ctx,this.state);this.enterRule(I,8,ye.RULE_propName);let X;try{for(this.enterOuterAlt(I,1),this.state=55,this.identifier(),this.state=60,this._errHandler.sync(this),X=this._input.LA(1);X===ye.DOT;)this.state=56,this.match(ye.DOT),this.state=57,this.identifier(),this.state=62,this._errHandler.sync(this),X=this._input.LA(1)}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}eqValue(){let I=new j(this._ctx,this.state);this.enterRule(I,10,ye.RULE_eqValue);try{switch(this.state=66,this._errHandler.sync(this),this._input.LA(1)){case ye.SQ_STRING:case ye.DQ_STRING:case ye.NUMERIC_LITERAL:case ye.BARE_STRING:this.enterOuterAlt(I,1),this.state=63,this.string();break;case ye.AR_BEG:this.enterOuterAlt(I,2),this.state=64,this.arrayValue();break;case ye.RF_BEG:this.enterOuterAlt(I,3),this.state=65,this.reference();break;default:throw new r.NoViableAltException(this)}}catch(X){if(X instanceof e.RecognitionException)I.exception=X,this._errHandler.reportError(this,X),this._errHandler.recover(this,X);else throw X}finally{this.exitRule()}return I}arrayElement(){let I=new W(this._ctx,this.state);this.enterRule(I,12,ye.RULE_arrayElement);let X;try{switch(this.state=75,this._errHandler.sync(this),this._input.LA(1)){case ye.SQ_STRING:case ye.DQ_STRING:case ye.NUMERIC_LITERAL:case ye.BARE_STRING:this.enterOuterAlt(I,1),this.state=68,this.string(),this.state=70,this._errHandler.sync(this),X=this._input.LA(1),X===ye.PR_BEG&&(this.state=69,this.properties());break;case ye.PR_BEG:this.enterOuterAlt(I,2),this.state=72,this.properties();break;case ye.AR_BEG:this.enterOuterAlt(I,3),this.state=73,this.arrayValue();break;case ye.RF_BEG:this.enterOuterAlt(I,4),this.state=74,this.reference();break;default:throw new r.NoViableAltException(this)}}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}reference(){let I=new L(this._ctx,this.state);this.enterRule(I,14,ye.RULE_reference);try{this.enterOuterAlt(I,1),this.state=77,this.match(ye.RF_BEG),this.state=78,this.propName(),this.state=79,this.match(ye.RF_END)}catch(X){if(X instanceof e.RecognitionException)I.exception=X,this._errHandler.reportError(this,X),this._errHandler.recover(this,X);else throw X}finally{this.exitRule()}return I}arrayValue(){let I=new $(this._ctx,this.state);this.enterRule(I,16,ye.RULE_arrayValue);let X;try{let ie;switch(this.state=97,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,11,this._ctx)){case 1:this.enterOuterAlt(I,1);{for(this.state=81,this.match(ye.AR_BEG),this.state=82,this.arrayElement(),this.state=87,this._errHandler.sync(this),ie=this.interpreter.adaptivePredict(this._input,9,this._ctx);ie!==2&&ie!==m.ATN.INVALID_ALT_NUMBER;)ie===1&&(this.state=83,this.match(ye.COMMA),this.state=84,this.arrayElement()),this.state=89,this._errHandler.sync(this),ie=this.interpreter.adaptivePredict(this._input,9,this._ctx);this.state=91,this._errHandler.sync(this),X=this._input.LA(1),X===ye.COMMA&&(this.state=90,this.match(ye.COMMA)),this.state=93,this.match(ye.AR_END)}break;case 2:this.enterOuterAlt(I,2),this.state=95,this.match(ye.AR_BEG),this.state=96,this.match(ye.AR_END);break}}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}properties(){let I=new Q(this._ctx,this.state);this.enterRule(I,18,ye.RULE_properties);let X;try{this.enterOuterAlt(I,1);{switch(this.state=99,this.match(ye.PR_BEG),this.state=107,this._errHandler.sync(this),this._input.LA(1)){case ye.DOTTY:this.state=100,this.match(ye.DOTTY);break;case ye.MINUS_DOTTY:case ye.MINUS:case ye.PR_END:case ye.BQ_STRING:case ye.BARE_STRING:for(this.state=104,this._errHandler.sync(this),X=this._input.LA(1);(X&-32)===0&&(1<<X&(1<<ye.MINUS_DOTTY|1<<ye.MINUS|1<<ye.BQ_STRING|1<<ye.BARE_STRING))!==0;)this.state=101,this.tagSpec(),this.state=106,this._errHandler.sync(this),X=this._input.LA(1);break;default:throw new r.NoViableAltException(this)}this.state=109,this.match(ye.PR_END)}}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}static get _ATN(){return ye.__ATN||(ye.__ATN=new h.ATNDeserializer().deserialize(c.toCharArray(ye._serializedATN))),ye.__ATN}};Oe.MalloyTagParser=p,p.MINUS_DOTTY=1,p.DOTTY=2,p.DOT=3,p.MINUS=4,p.EQ=5,p.RF_BEG=6,p.RF_END=7,p.PR_BEG=8,p.PR_END=9,p.AR_BEG=10,p.COMMA=11,p.AR_END=12,p.SQ_STRING=13,p.DQ_STRING=14,p.BQ_STRING=15,p.NUMERIC_LITERAL=16,p.BARE_STRING=17,p.COMMENT=18,p.WHITE_SPACE=19,p.UNEXPECTED_CHAR=20,p.RULE_tagLine=0,p.RULE_tagSpec=1,p.RULE_string=2,p.RULE_identifier=3,p.RULE_propName=4,p.RULE_eqValue=5,p.RULE_arrayElement=6,p.RULE_reference=7,p.RULE_arrayValue=8,p.RULE_properties=9,p.ruleNames=["tagLine","tagSpec","string","identifier","propName","eqValue","arrayElement","reference","arrayValue","properties"],p._LITERAL_NAMES=[void 0,"'-...'","'...'","'.'","'-'","'='","'$('","')'","'{'","'}'","'['","','","']'"],p._SYMBOLIC_NAMES=[void 0,"MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","SQ_STRING","DQ_STRING","BQ_STRING","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],p.VOCABULARY=new l.VocabularyImpl(p._LITERAL_NAMES,p._SYMBOLIC_NAMES,[]),p._serializedATN=`줝쪺֍꾺体؇쉁r     \x07 \x07\b \b 
605
+ ÅÄÆÇÇÅÇÈÈÉÉÊ\bÊ8ËÌ\vÌ:qs}‰‹‘–šŸ¢¨«¯±µ·½Ç\b`,Ze}var Oe={},d0;function od(){if(d0)return Oe;d0=1;var a=Oe&&Oe.__createBinding||(Object.create?(function(ee,I,X,ie){ie===void 0&&(ie=X);var ce=Object.getOwnPropertyDescriptor(I,X);(!ce||("get"in ce?!I.__esModule:ce.writable||ce.configurable))&&(ce={enumerable:!0,get:function(){return I[X]}}),Object.defineProperty(ee,ie,ce)}):(function(ee,I,X,ie){ie===void 0&&(ie=X),ee[ie]=I[X]})),d=Oe&&Oe.__setModuleDefault||(Object.create?(function(ee,I){Object.defineProperty(ee,"default",{enumerable:!0,value:I})}):function(ee,I){ee.default=I}),y=Oe&&Oe.__importStar||(function(){var ee=function(I){return ee=Object.getOwnPropertyNames||function(X){var ie=[];for(var ce in X)Object.prototype.hasOwnProperty.call(X,ce)&&(ie[ie.length]=ce);return ie},ee(I)};return function(I){if(I&&I.__esModule)return I;var X={};if(I!=null)for(var ie=ee(I),ce=0;ce<ie.length;ce++)ie[ce]!=="default"&&a(X,I,ie[ce]);return d(X,I),X}})();Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.PropertiesContext=Oe.ArrayValueContext=Oe.ReferenceContext=Oe.ArrayElementContext=Oe.EqValueContext=Oe.PropNameContext=Oe.IdentifierContext=Oe.StringContext=Oe.TagEmptyContext=Oe.TagDefContext=Oe.TagUpdatePropertiesContext=Oe.TagReplacePropertiesContext=Oe.TagEqContext=Oe.TagSpecContext=Oe.TagLineContext=Oe.MalloyTagParser=void 0;const m=lt(),h=ho(),u=co(),r=po(),o=ji(),t=st(),i=$i(),e=Sr(),s=Ie(),l=Er(),c=y(ut());let p=class ye extends o.Parser{get vocabulary(){return ye.VOCABULARY}get grammarFileName(){return"MalloyTag.g4"}get ruleNames(){return ye.ruleNames}get serializedATN(){return ye._serializedATN}createFailedPredicateException(I,X){return new u.FailedPredicateException(this,I,X)}constructor(I){super(I),this._interp=new i.ParserATNSimulator(ye._ATN,this)}tagLine(){let I=new v(this._ctx,this.state);this.enterRule(I,0,ye.RULE_tagLine);let X;try{this.enterOuterAlt(I,1);{for(this.state=23,this._errHandler.sync(this),X=this._input.LA(1);(X&-32)===0&&(1<<X&(1<<ye.MINUS_DOTTY|1<<ye.MINUS|1<<ye.BQ_STRING|1<<ye.BARE_STRING))!==0;)this.state=20,this.tagSpec(),this.state=25,this._errHandler.sync(this),X=this._input.LA(1);this.state=26,this.match(ye.EOF)}}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}tagSpec(){let I=new x(this._ctx,this.state);this.enterRule(I,2,ye.RULE_tagSpec);let X;try{switch(this.state=49,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,4,this._ctx)){case 1:I=new g(I),this.enterOuterAlt(I,1),this.state=28,this.propName(),this.state=29,this.match(ye.EQ),this.state=30,this.eqValue(),this.state=32,this._errHandler.sync(this),X=this._input.LA(1),X===ye.PR_BEG&&(this.state=31,this.properties());break;case 2:I=new _(I),this.enterOuterAlt(I,2),this.state=34,this.propName(),this.state=35,this.match(ye.EQ),this.state=37,this._errHandler.sync(this),X=this._input.LA(1),X===ye.DOTTY&&(this.state=36,this.match(ye.DOTTY)),this.state=39,this.properties();break;case 3:I=new A(I),this.enterOuterAlt(I,3),this.state=41,this.propName(),this.state=42,this.properties();break;case 4:I=new E(I),this.enterOuterAlt(I,4),this.state=45,this._errHandler.sync(this),X=this._input.LA(1),X===ye.MINUS&&(this.state=44,this.match(ye.MINUS)),this.state=47,this.propName();break;case 5:I=new N(I),this.enterOuterAlt(I,5),this.state=48,this.match(ye.MINUS_DOTTY);break}}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}string(){let I=new b(this._ctx,this.state);this.enterRule(I,4,ye.RULE_string);let X;try{this.enterOuterAlt(I,1),this.state=51,X=this._input.LA(1),(X&-32)===0&&(1<<X&(1<<ye.SQ_STRING|1<<ye.DQ_STRING|1<<ye.NUMERIC_LITERAL|1<<ye.BARE_STRING))!==0?(this._input.LA(1)===s.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}identifier(){let I=new w(this._ctx,this.state);this.enterRule(I,6,ye.RULE_identifier);let X;try{this.enterOuterAlt(I,1),this.state=53,X=this._input.LA(1),X===ye.BQ_STRING||X===ye.BARE_STRING?(this._input.LA(1)===s.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}propName(){let I=new P(this._ctx,this.state);this.enterRule(I,8,ye.RULE_propName);let X;try{for(this.enterOuterAlt(I,1),this.state=55,this.identifier(),this.state=60,this._errHandler.sync(this),X=this._input.LA(1);X===ye.DOT;)this.state=56,this.match(ye.DOT),this.state=57,this.identifier(),this.state=62,this._errHandler.sync(this),X=this._input.LA(1)}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}eqValue(){let I=new j(this._ctx,this.state);this.enterRule(I,10,ye.RULE_eqValue);try{switch(this.state=66,this._errHandler.sync(this),this._input.LA(1)){case ye.SQ_STRING:case ye.DQ_STRING:case ye.NUMERIC_LITERAL:case ye.BARE_STRING:this.enterOuterAlt(I,1),this.state=63,this.string();break;case ye.AR_BEG:this.enterOuterAlt(I,2),this.state=64,this.arrayValue();break;case ye.RF_BEG:this.enterOuterAlt(I,3),this.state=65,this.reference();break;default:throw new r.NoViableAltException(this)}}catch(X){if(X instanceof e.RecognitionException)I.exception=X,this._errHandler.reportError(this,X),this._errHandler.recover(this,X);else throw X}finally{this.exitRule()}return I}arrayElement(){let I=new W(this._ctx,this.state);this.enterRule(I,12,ye.RULE_arrayElement);let X;try{switch(this.state=75,this._errHandler.sync(this),this._input.LA(1)){case ye.SQ_STRING:case ye.DQ_STRING:case ye.NUMERIC_LITERAL:case ye.BARE_STRING:this.enterOuterAlt(I,1),this.state=68,this.string(),this.state=70,this._errHandler.sync(this),X=this._input.LA(1),X===ye.PR_BEG&&(this.state=69,this.properties());break;case ye.PR_BEG:this.enterOuterAlt(I,2),this.state=72,this.properties();break;case ye.AR_BEG:this.enterOuterAlt(I,3),this.state=73,this.arrayValue();break;case ye.RF_BEG:this.enterOuterAlt(I,4),this.state=74,this.reference();break;default:throw new r.NoViableAltException(this)}}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}reference(){let I=new L(this._ctx,this.state);this.enterRule(I,14,ye.RULE_reference);try{this.enterOuterAlt(I,1),this.state=77,this.match(ye.RF_BEG),this.state=78,this.propName(),this.state=79,this.match(ye.RF_END)}catch(X){if(X instanceof e.RecognitionException)I.exception=X,this._errHandler.reportError(this,X),this._errHandler.recover(this,X);else throw X}finally{this.exitRule()}return I}arrayValue(){let I=new $(this._ctx,this.state);this.enterRule(I,16,ye.RULE_arrayValue);let X;try{let ie;switch(this.state=97,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,11,this._ctx)){case 1:this.enterOuterAlt(I,1);{for(this.state=81,this.match(ye.AR_BEG),this.state=82,this.arrayElement(),this.state=87,this._errHandler.sync(this),ie=this.interpreter.adaptivePredict(this._input,9,this._ctx);ie!==2&&ie!==m.ATN.INVALID_ALT_NUMBER;)ie===1&&(this.state=83,this.match(ye.COMMA),this.state=84,this.arrayElement()),this.state=89,this._errHandler.sync(this),ie=this.interpreter.adaptivePredict(this._input,9,this._ctx);this.state=91,this._errHandler.sync(this),X=this._input.LA(1),X===ye.COMMA&&(this.state=90,this.match(ye.COMMA)),this.state=93,this.match(ye.AR_END)}break;case 2:this.enterOuterAlt(I,2),this.state=95,this.match(ye.AR_BEG),this.state=96,this.match(ye.AR_END);break}}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}properties(){let I=new Q(this._ctx,this.state);this.enterRule(I,18,ye.RULE_properties);let X;try{this.enterOuterAlt(I,1);{switch(this.state=99,this.match(ye.PR_BEG),this.state=107,this._errHandler.sync(this),this._input.LA(1)){case ye.DOTTY:this.state=100,this.match(ye.DOTTY);break;case ye.MINUS_DOTTY:case ye.MINUS:case ye.PR_END:case ye.BQ_STRING:case ye.BARE_STRING:for(this.state=104,this._errHandler.sync(this),X=this._input.LA(1);(X&-32)===0&&(1<<X&(1<<ye.MINUS_DOTTY|1<<ye.MINUS|1<<ye.BQ_STRING|1<<ye.BARE_STRING))!==0;)this.state=101,this.tagSpec(),this.state=106,this._errHandler.sync(this),X=this._input.LA(1);break;default:throw new r.NoViableAltException(this)}this.state=109,this.match(ye.PR_END)}}catch(ie){if(ie instanceof e.RecognitionException)I.exception=ie,this._errHandler.reportError(this,ie),this._errHandler.recover(this,ie);else throw ie}finally{this.exitRule()}return I}static get _ATN(){return ye.__ATN||(ye.__ATN=new h.ATNDeserializer().deserialize(c.toCharArray(ye._serializedATN))),ye.__ATN}};Oe.MalloyTagParser=p,p.MINUS_DOTTY=1,p.DOTTY=2,p.DOT=3,p.MINUS=4,p.EQ=5,p.RF_BEG=6,p.RF_END=7,p.PR_BEG=8,p.PR_END=9,p.AR_BEG=10,p.COMMA=11,p.AR_END=12,p.SQ_STRING=13,p.DQ_STRING=14,p.BQ_STRING=15,p.NUMERIC_LITERAL=16,p.BARE_STRING=17,p.COMMENT=18,p.WHITE_SPACE=19,p.UNEXPECTED_CHAR=20,p.RULE_tagLine=0,p.RULE_tagSpec=1,p.RULE_string=2,p.RULE_identifier=3,p.RULE_propName=4,p.RULE_eqValue=5,p.RULE_arrayElement=6,p.RULE_reference=7,p.RULE_arrayValue=8,p.RULE_properties=9,p.ruleNames=["tagLine","tagSpec","string","identifier","propName","eqValue","arrayElement","reference","arrayValue","properties"],p._LITERAL_NAMES=[void 0,"'-...'","'...'","'.'","'-'","'='","'$('","')'","'{'","'}'","'['","','","']'"],p._SYMBOLIC_NAMES=[void 0,"MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","SQ_STRING","DQ_STRING","BQ_STRING","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],p.VOCABULARY=new l.VocabularyImpl(p._LITERAL_NAMES,p._SYMBOLIC_NAMES,[]),p._serializedATN=`줝쪺֍꾺体؇쉁r     \x07 \x07\b \b 
606
606
 
607
607
  \v \v\x07
608
608
  \f\x1B\v#
@@ -673,4 +673,4 @@ Use (?: … ) instead`);if(!te.lineBreaks&&F.test(`
673
673
  `))throw new Error("Rule should declare lineBreaks: "+F);ce.push(t(D))}}var T=Q&&Q.fallback,R=m&&!T?"ym":"gm",q=m||T?"":"|";X===!0&&(R+="u");var H=new RegExp(i(ce)+q,R);return{regexp:H,groups:ie,fast:ee,error:Q||g}}function A(L){var $=_(x(L));return new w({start:$},"start")}function E(L,$,Q){var ee=L&&(L.push||L.next);if(ee&&!Q[ee])throw new Error("Missing state '"+ee+"' (in token '"+L.defaultType+"' of state '"+$+"')");if(L&&L.pop&&+L.pop!=1)throw new Error("pop must be 1 (in token '"+L.defaultType+"' of state '"+$+"')")}function N(L,$){var Q=L.$all?x(L.$all):[];delete L.$all;var ee=Object.getOwnPropertyNames(L);$||($=ee[0]);for(var I=Object.create(null),X=0;X<ee.length;X++){var ie=ee[X];I[ie]=x(L[ie]).concat(Q)}for(var X=0;X<ee.length;X++)for(var ie=ee[X],ce=I[ie],oe=Object.create(null),te=0;te<ce.length;te++){var B=ce[te];if(B.include){var G=[te,1];if(B.include!==ie&&!oe[B.include]){oe[B.include]=!0;var O=I[B.include];if(!O)throw new Error("Cannot include nonexistent state '"+B.include+"' (in state '"+ie+"')");for(var C=0;C<O.length;C++){var D=O[C];ce.indexOf(D)===-1&&G.push(D)}}ce.splice.apply(ce,G),te--}}for(var F=Object.create(null),X=0;X<ee.length;X++){var ie=ee[X];F[ie]=_(I[ie],!0)}for(var X=0;X<ee.length;X++){for(var k=ee[X],T=F[k],R=T.groups,te=0;te<R.length;te++)E(R[te],k,F);for(var q=Object.getOwnPropertyNames(T.fast),te=0;te<q.length;te++)E(T.fast[q[te]],k,F)}return new w(F,$)}function b(L){for(var $=typeof Map<"u",Q=$?new Map:Object.create(null),ee=Object.getOwnPropertyNames(L),I=0;I<ee.length;I++){var X=ee[I],ie=L[X],ce=Array.isArray(ie)?ie:[ie];ce.forEach(function(oe){if(typeof oe!="string")throw new Error("keyword must be string (in keyword '"+X+"')");$?Q.set(oe,X):Q[oe]=X})}return function(oe){return $?Q.get(oe):Q[oe]}}var w=function(L,$){this.startState=$,this.states=L,this.buffer="",this.stack=[],this.reset()};w.prototype.reset=function(L,$){return this.buffer=L||"",this.index=0,this.line=$?$.line:1,this.col=$?$.col:1,this.queuedToken=$?$.queuedToken:null,this.queuedText=$?$.queuedText:"",this.queuedThrow=$?$.queuedThrow:null,this.setState($?$.state:this.startState),this.stack=$&&$.stack?$.stack.slice():[],this},w.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},w.prototype.setState=function(L){if(!(!L||this.state===L)){this.state=L;var $=this.states[L];this.groups=$.groups,this.error=$.error,this.re=$.regexp,this.fast=$.fast}},w.prototype.popState=function(){this.setState(this.stack.pop())},w.prototype.pushState=function(L){this.stack.push(this.state),this.setState(L)};var P=m?function(L,$){return L.exec($)}:function(L,$){var Q=L.exec($);return Q[0].length===0?null:Q};w.prototype._getGroup=function(L){for(var $=this.groups.length,Q=0;Q<$;Q++)if(L[Q+1]!==void 0)return this.groups[Q];throw new Error("Cannot find token type for matched text")};function j(){return this.value}if(w.prototype.next=function(){var L=this.index;if(this.queuedGroup){var $=this._token(this.queuedGroup,this.queuedText,L);return this.queuedGroup=null,this.queuedText="",$}var Q=this.buffer;if(L!==Q.length){var ie=this.fast[Q.charCodeAt(L)];if(ie)return this._token(ie,Q.charAt(L),L);var ee=this.re;ee.lastIndex=L;var I=P(ee,Q),X=this.error;if(I==null)return this._token(X,Q.slice(L,Q.length),L);var ie=this._getGroup(I),ce=I[0];return X.fallback&&I.index!==L?(this.queuedGroup=ie,this.queuedText=ce,this._token(X,Q.slice(L,I.index),L)):this._token(ie,ce,L)}},w.prototype._token=function(L,$,Q){var ee=0;if(L.lineBreaks){var I=/\n/g,X=1;if($===`
674
674
  `)ee=1;else for(;I.exec($);)ee++,X=I.lastIndex}var ie={type:typeof L.type=="function"&&L.type($)||L.defaultType,value:typeof L.value=="function"?L.value($):$,text:$,toString:j,offset:Q,lineBreaks:ee,line:this.line,col:this.col},ce=$.length;if(this.index+=ce,this.line+=ee,ee!==0?this.col=ce-X+1:this.col+=ce,L.shouldThrow){var oe=new Error(this.formatError(ie,"invalid syntax"));throw oe}return L.pop?this.popState():L.push?this.pushState(L.push):L.next&&this.setState(L.next),ie},typeof Symbol<"u"&&Symbol.iterator){var W=function(L){this.lexer=L};W.prototype.next=function(){var L=this.lexer.next();return{value:L,done:!L}},W.prototype[Symbol.iterator]=function(){return this},w.prototype[Symbol.iterator]=function(){return new W(this)}}return w.prototype.formatError=function(L,$){if(L==null)var Q=this.buffer.slice(this.index),L={text:Q,offset:this.index,lineBreaks:Q.indexOf(`
675
675
  `)===-1?0:1,line:this.line,col:this.col};var ee=2,I=Math.max(L.line-ee,1),X=L.line+ee,ie=String(X).length,ce=l(this.buffer,this.line-L.line+ee+1).slice(0,5),oe=[];oe.push($+" at line "+L.line+" col "+L.col+":"),oe.push("");for(var te=0;te<ce.length;te++){var B=ce[te],G=I+te;oe.push(s(String(G),ie)+" "+B),G===L.line&&oe.push(s("",ie+L.col+1)+"^")}return oe.join(`
676
- `)},w.prototype.clone=function(){return new w(this.states,this.state)},w.prototype.has=function(L){return!0},{compile:A,states:N,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:b}})})(Ji)),Ji.exports}var je={},S0;function xo(){if(S0)return je;S0=1,Object.defineProperty(je,"__esModule",{value:!0}),je.maybeNot=d,je.unescape=y,je.escape=m,je.matchOp=u,je.conjoin=o,je.joinNumbers=t,je.mkRange=i,je.mkValues=e,je.numNot=s,je.temporalNot=l,je.joinTemporal=c,je.timeLiteral=p,je.mkUnits=v;const a=Qn();function d(x){const[g,_]=x;return g&&_&&(0,a.isStringFilter)(_)?{..._,not:!0}:_}function y(x){return x.replace(/\\(.)/g,"$1")}function m(x){const g=x.toLowerCase();return g==="null"||g==="empty"?"\\"+x:x.replace(/([,; |()\\%_-])/g,"\\$1")}function h(x){let g=!1,_=!1,A=0,E=!1;const N=x.length;for(let b=0;b<N;b+=1){const w=x[b];if(w===" "||w===" "){A+=1;continue}A=0,w==="%"?(E=!0,b===0&&(g=!0),_=!0):(_=!1,w==="\\"?b+=1:w==="_"&&(E=!0))}return{hasLike:E,percentEnd:_&&N>1,percentStart:g&&N>1,endSpace:A}}function u(x){let g=x.trimStart();const{hasLike:_,percentEnd:A,percentStart:E,endSpace:N}=h(g);if(N>0&&(g=g.slice(0,-N)),_){if(E&&A){const b=g.slice(1,-1);if(!h(b).hasLike&&b.length>0)return{operator:"contains",values:[y(b)]}}else if(A){const b=g.slice(0,-1);if(!h(b).hasLike)return{operator:"starts",values:[y(b)]}}else if(E){const b=g.slice(1);if(!h(b).hasLike)return{operator:"ends",values:[y(b)]}}return{operator:"~",escaped_values:[g]}}return g.toLowerCase()==="null"?{operator:"null"}:g.toLowerCase()==="empty"?{operator:"empty"}:{operator:"=",values:[y(g)]}}function r(x,g){var _,A;return x.operator===g.operator&&((_=x.not)!==null&&_!==void 0?_:!1)===((A=g.not)!==null&&A!==void 0?A:!1)}function o(x,g,_){if(g=g.toLowerCase(),(0,a.isStringFilter)(x)&&(0,a.isStringFilter)(_)){if(g===","){if(x.operator==="~"&&r(x,_))return{...x,escaped_values:[...x.escaped_values,..._.escaped_values]};if((0,a.isStringCondition)(x)&&r(x,_))return{...x,values:[...x.values,..._.values]}}const A=g===","?",":g==="|"?"or":g===";"?"and":void 0;if(A)return x.operator===A?{...x,members:[...x.members,_]}:{operator:A,members:[x,_]}}return null}function t(x,g,_){if(g=g.toLowerCase(),(0,a.isNumberFilter)(x)&&(0,a.isNumberFilter)(_)){if(g==="or"&&x.operator==="="&&r(x,_)){const A={operator:"=",values:[...x.values,..._.values]};return x.not&&(A.not=!0),A}if(g==="and"||g==="or")return x.operator===g?{...x,members:[...x.members,_]}:{operator:g,members:[x,_]}}return null}function i(x,g,_,A){return{operator:"range",startValue:g,startOperator:x==="("?">":">=",endValue:_,endOperator:A===")"?"<":"<="}}function e(x,g){return{values:[x,...g]}}function s(x,g){return(0,a.isNumberFilter)(x)&&g?x.operator==="="?{operator:"!=",values:x.values}:x.operator==="!="?{operator:"=",values:x.values}:{...x,not:!0}:x}function l(x,g){return(0,a.isTemporalFilter)(x)&&g?{...x,not:!0}:x}function c(x,g,_){return g=g.toLowerCase(),(0,a.isTemporalFilter)(x)&&(0,a.isTemporalFilter)(_)&&(g==="and"||g==="or")?x.operator===g?{...x,members:[...x.members,_]}:{operator:g,members:[x,_]}:null}function p(x,g){const _={moment:"literal",literal:x};return g&&(_.units=g),_}function v(x){switch(x.toLowerCase()){case"second":case"seconds":return"second";case"minute":case"minutes":return"minute";case"hour":case"hours":return"hour";case"day":case"days":return"day";case"week":case"weeks":return"week";case"month":case"months":return"month";case"quarter":case"quarters":return"quarter";case"year":case"years":return"year"}}return je}var T0;function fd(){if(T0)return qn;T0=1;var a=qn&&qn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qn,"__esModule",{value:!0});function d(t){return t[0]}const y=a(Ba()),m=xo(),h=y.default.keywords({AND:"and",OR:"or",NOT:"not",NULL_KW:"null",TO:"to"}),u=y.default.compile({WS:/[ \t]+/,id:{match:/[a-zA-Z]+/,type:t=>h(t.toLowerCase())},oparen:"(",cparen:")",obrack:"[",cbrack:"]",comma:",",op:/<=|>=|<|>/,ne:"!=",eq:"=",float:/-?(?:\d+)?\.\d+(?:[Ee][+-]?\d+)?/,numberE:/-?\d+[Ee][+-]?\d+/,integer:/-?\d+/}),r=u.next;u.next=(t=>()=>{for(;;){const i=t.call(u);if(i===void 0||i.type!=="WS")return i}})(r);const o={Lexer:u,ParserRules:[{name:"numberFilter",symbols:["numberFilter","conjunction","numberUnary"],postprocess:([t,i,e])=>(0,m.joinNumbers)(t,i[0].text,e)},{name:"numberFilter",symbols:["numberUnary"],postprocess:t=>t[0]},{name:"numberUnary$ebnf$1",symbols:[u.has("NOT")?{type:"NOT"}:NOT],postprocess:d},{name:"numberUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"numberUnary",symbols:["numberUnary$ebnf$1","clause"],postprocess:([t,i])=>(0,m.numNot)(i,t)},{name:"clause",symbols:[u.has("NULL_KW")?{type:"NULL_KW"}:NULL_KW],postprocess:()=>({operator:"null"})},{name:"clause$ebnf$1",symbols:[]},{name:"clause$ebnf$1",symbols:["clause$ebnf$1","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:["N","clause$ebnf$1"],postprocess:([t,i])=>({operator:"=",...(0,m.mkValues)(t,i)})},{name:"clause$ebnf$2",symbols:[]},{name:"clause$ebnf$2",symbols:["clause$ebnf$2","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:[u.has("eq")?{type:"eq"}:eq,"N","clause$ebnf$2"],postprocess:([t,i,e])=>({operator:"=",...(0,m.mkValues)(i,e)})},{name:"clause$ebnf$3",symbols:[]},{name:"clause$ebnf$3",symbols:["clause$ebnf$3","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:[u.has("ne")?{type:"ne"}:ne,"N","clause$ebnf$3"],postprocess:([t,i,e])=>({operator:"!=",...(0,m.mkValues)(i,e)})},{name:"clause",symbols:[u.has("op")?{type:"op"}:op,"N"],postprocess:([t,i])=>({operator:t.text,values:[i]})},{name:"clause",symbols:[u.has("oparen")?{type:"oparen"}:oparen,"numberFilter",u.has("cparen")?{type:"cparen"}:cparen],postprocess:([t,i,e])=>({operator:"()",expr:i})},{name:"clause",symbols:["openInterval","N",u.has("TO")?{type:"TO"}:TO,"N","closeInterval"],postprocess:([t,i,e,s,l])=>(0,m.mkRange)(t[0].text,i,s,l[0].text)},{name:"numberList",symbols:[u.has("comma")?{type:"comma"}:comma,"N"],postprocess:([t,i])=>i},{name:"closeInterval",symbols:[u.has("cbrack")?{type:"cbrack"}:cbrack]},{name:"closeInterval",symbols:[u.has("cparen")?{type:"cparen"}:cparen]},{name:"openInterval",symbols:[u.has("obrack")?{type:"obrack"}:obrack]},{name:"openInterval",symbols:[u.has("oparen")?{type:"oparen"}:oparen]},{name:"N$subexpression$1",symbols:[u.has("float")?{type:"float"}:float]},{name:"N$subexpression$1",symbols:[u.has("numberE")?{type:"numberE"}:numberE]},{name:"N$subexpression$1",symbols:[u.has("integer")?{type:"integer"}:integer]},{name:"N",symbols:["N$subexpression$1"],postprocess:([t])=>t[0].text},{name:"conjunction",symbols:[u.has("OR")?{type:"OR"}:OR]},{name:"conjunction",symbols:[u.has("AND")?{type:"AND"}:AND]}],ParserStart:"numberFilter"};return qn.default=o,qn}var Hi={},b0;function ka(){if(b0)return Hi;b0=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.run_parser=d;const a=Qn();function d(y,m){try{m.feed(y);const u=m.finish()[0];return(0,a.isFilterExpression)(u)?{parsed:u,log:[]}:{parsed:null,log:[]}}catch(h){let u=h.message,r=1,o=y.length;if(h.token){const t=h.token;r=t.col,o=t.text.length;const e=h.message.match(/(?<=A ).*(?= based on:)/g).map(s=>s.replace(/\s+token/i,""));u=`Unexpected ${t.type} token "${t.value}"`,e&&e.length&&(u+=` Tokens expected: ${[...new Set(e)]}`)}return{parsed:null,log:[{message:u,startIndex:r-1,endIndex:r-1+o-1,severity:"error"}]}}}return Hi}var N0;function pd(){return N0||(N0=1,(function(a){var d=tt&&tt.__createBinding||(Object.create?(function(i,e,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(e,s);(!c||("get"in c?!e.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(i,l,c)}):(function(i,e,s,l){l===void 0&&(l=s),i[l]=e[s]})),y=tt&&tt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),m=tt&&tt.__importStar||(function(){var i=function(e){return i=Object.getOwnPropertyNames||function(s){var l=[];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[l.length]=c);return l},i(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var l=i(e),c=0;c<l.length;c++)l[c]!=="default"&&d(s,e,l[c]);return y(s,e),s}})(),h=tt&&tt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(a,"__esModule",{value:!0}),a.NumberFilterExpression=void 0;const u=Qn(),r=m(La()),o=h(fd()),t=ka();a.NumberFilterExpression={parse(i){if(i.match(/^\s*$/))return{parsed:null,log:[]};const e=new r.Parser(r.Grammar.fromCompiled(o.default)),s=(0,t.run_parser)(i,e);return s.parsed&&(0,u.isNumberFilter)(s.parsed)?{parsed:s.parsed,log:[]}:{parsed:null,log:s.log}},unparse(i){if(i===null)return"";switch(i.operator){case"=":return i.values.join(", ");case"!=":return"!= "+i.values.join(", ");case">":case"<":case"<=":case">=":return i.not?i.values.map(e=>i.operator==="="?`not ${e}`:`not ${i.operator} ${e}`).join(", "):i.values.map(e=>`${i.operator} ${e}`).join(", ");case"range":{const e=i.startOperator===">"?"(":"[",s=i.endOperator==="<"?")":"]",l=`${e}${i.startValue} to ${i.endValue}${s}`;return i.not?`not ${l}`:l}case"null":return i.not?"not null":"null";case"and":case"or":return i.members.map(e=>a.NumberFilterExpression.unparse(e)).join(` ${i.operator} `);case"()":{const e="("+a.NumberFilterExpression.unparse(i.expr)+")";return i.not?"not "+e:e}}return`no unparse for ${JSON.stringify(i)}`}}})(tt)),tt}var rt={},jn={},C0;function hd(){if(C0)return jn;C0=1;var a=jn&&jn.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(jn,"__esModule",{value:!0});function d(o){return o[0]}const y=a(Ba()),m=xo(),h=y.default.compile({WS:/[ \t]+/,comma:",",semi:";",or:"|",open:"(",close:")",minus:"-",matchStr:/(?:\\[^\n]|[^\n,;()|])+/}),u=h.next;h.next=(o=>()=>{for(;;){const t=o.call(h);if(t==null||t.type!=="WS")return t}})(u);const r={Lexer:h,ParserRules:[{name:"stringFilter",symbols:["stringFilter","conjunction","sfUnary"],postprocess:([o,t,i])=>(0,m.conjoin)(o,t[0].text,i)},{name:"stringFilter",symbols:["sfUnary"],postprocess:o=>o[0]},{name:"sfUnary$ebnf$1",symbols:[h.has("minus")?{type:"minus"}:minus],postprocess:d},{name:"sfUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"sfUnary",symbols:["sfUnary$ebnf$1","clause"],postprocess:o=>(0,m.maybeNot)(o)},{name:"parens",symbols:[h.has("open")?{type:"open"}:open,"stringFilter",h.has("close")?{type:"close"}:close],postprocess:([o,t,i])=>({operator:"()",expr:t})},{name:"clause",symbols:[h.has("matchStr")?{type:"matchStr"}:matchStr],postprocess:([o])=>(0,m.matchOp)(o.text)},{name:"clause",symbols:["parens"],postprocess:o=>o[0]},{name:"conjunction",symbols:[h.has("comma")?{type:"comma"}:comma]},{name:"conjunction",symbols:[h.has("semi")?{type:"semi"}:semi]},{name:"conjunction",symbols:[h.has("or")?{type:"or"}:or]}],ParserStart:"stringFilter"};return jn.default=r,jn}var O0;function xd(){return O0||(O0=1,(function(a){var d=rt&&rt.__createBinding||(Object.create?(function(e,s,l,c){c===void 0&&(c=l);var p=Object.getOwnPropertyDescriptor(s,l);(!p||("get"in p?!s.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(e,c,p)}):(function(e,s,l,c){c===void 0&&(c=l),e[c]=s[l]})),y=rt&&rt.__setModuleDefault||(Object.create?(function(e,s){Object.defineProperty(e,"default",{enumerable:!0,value:s})}):function(e,s){e.default=s}),m=rt&&rt.__importStar||(function(){var e=function(s){return e=Object.getOwnPropertyNames||function(l){var c=[];for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(c[c.length]=p);return c},e(s)};return function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var c=e(s),p=0;p<c.length;p++)c[p]!=="default"&&d(l,s,c[p]);return y(l,s),l}})(),h=rt&&rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.StringFilterExpression=void 0;const u=Qn(),r=m(La()),o=h(hd()),t=xo(),i=ka();a.StringFilterExpression={parse(e){if(e.match(/^\s*$/))return{parsed:null,log:[]};const s=new r.Parser(r.Grammar.fromCompiled(o.default)),l=(0,i.run_parser)(e,s);return l.parsed&&(0,u.isStringFilter)(l.parsed)?{parsed:l.parsed,log:[]}:{parsed:null,log:l.log}},unparse(e){if(e===null)return"";switch(e.operator){case"=":return e.not?e.values.map(s=>"-"+(0,t.escape)(s)).join(", "):e.values.map(s=>(0,t.escape)(s)).join(", ");case"~":return e.not?e.escaped_values.map(s=>"-"+s).join(", "):e.escaped_values.join(", ");case"starts":return e.not?e.values.map(s=>"-"+(0,t.escape)(s)+"%").join(", "):e.values.map(s=>(0,t.escape)(s)+"%").join(", ");case"ends":return e.not?e.values.map(s=>"-%"+(0,t.escape)(s)).join(", "):e.values.map(s=>"%"+(0,t.escape)(s)).join(", ");case"contains":return e.not?e.values.map(s=>"-%"+(0,t.escape)(s)+"%").join(", "):e.values.map(s=>"%"+(0,t.escape)(s)+"%").join(", ");case"or":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join(" | ");case"and":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join("; ");case",":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join(", ");case"()":{const s="("+a.StringFilterExpression.unparse(e.expr)+")";return e.not?"-"+s:s}case"null":return e.not?"-null":"null";case"empty":return e.not?"-empty":"empty"}}}})(rt)),rt}var nt={},$n={},D0;function dd(){if(D0)return $n;D0=1;var a=$n&&$n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($n,"__esModule",{value:!0});function d(t){return t[0]}const y=a(Ba()),m=xo(),h=y.default.keywords({AND:"and",OR:"or",NOT:"not",NULL_KW:"null",TO:"to",NOW:"now",LAST:"last",THIS:"this",NEXT:"next",AGO:"ago",FROM:"from",BEFORE:"before",AFTER:"after",THROUGH:"through",STARTING:"starting",FOR:"for",TODAY:"today",YESTERDAY:"yesterday",TOMORROW:"tomorrow",SECOND:"second",MINUTE:"minute",HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",QUARTER:"quarter",YEAR:"year",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days",WEEKS:"weeks",MONTHS:"months",QUARTERS:"quarters",YEARS:"years",MONDAY:"monday",TUESDAY:"tuesday",WEDNESDAY:"wednesday",THURSDAY:"thursday",FRIDAY:"friday",SATURDAY:"saturday",SUNDAY:"sunday"}),u=y.default.compile({WS:/[ \t]+/,id:{match:/[a-zA-Z]+/,type:t=>h(t.toLowerCase())},oparen:"(",cparen:")",comma:",",literal:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d:\d\d(?::\d\d(?:[.,]\d*)?)/,lit_week:/\d\d\d\d-\d\d-\d\d-[Ww][Kk]/,lit_quarter:/\d\d\d\d-[qQ][1234]/,lit_min:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d:\d\d/,lit_hour:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d/,lit_day:/\d\d\d\d-\d\d-\d\d/,lit_month:/\d\d\d\d-\d\d/,lit_year:/\d\d\d\d/,n:/\d+/}),r=u.next;u.next=(t=>()=>{for(;;){const i=t.call(u);if(i===void 0||i.type!=="WS")return i}})(r);const o={Lexer:u,ParserRules:[{name:"temporalFilter",symbols:["temporalFilter","conjunction","temporalUnary"],postprocess:([t,i,e])=>(0,m.joinTemporal)(t,i[0].text,e)},{name:"temporalFilter",symbols:["temporalUnary"],postprocess:t=>t[0]},{name:"temporalUnary$ebnf$1",symbols:[u.has("NOT")?{type:"NOT"}:NOT],postprocess:d},{name:"temporalUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"temporalUnary",symbols:["temporalUnary$ebnf$1","clause"],postprocess:([t,i])=>(0,m.temporalNot)(i,t)},{name:"duration",symbols:["number","unit"],postprocess:([t,i])=>({units:i,n:t})},{name:"number",symbols:[u.has("n")?{type:"n"}:n],postprocess:([t])=>t.text},{name:"number",symbols:[u.has("lityear")?{type:"lityear"}:lityear],postprocess:([t])=>t.text},{name:"unit$subexpression$1",symbols:[u.has("SECOND")?{type:"SECOND"}:SECOND]},{name:"unit$subexpression$1",symbols:[u.has("MINUTE")?{type:"MINUTE"}:MINUTE]},{name:"unit$subexpression$1",symbols:[u.has("HOUR")?{type:"HOUR"}:HOUR]},{name:"unit$subexpression$1",symbols:[u.has("DAY")?{type:"DAY"}:DAY]},{name:"unit$subexpression$1",symbols:[u.has("WEEK")?{type:"WEEK"}:WEEK]},{name:"unit$subexpression$1",symbols:[u.has("MONTH")?{type:"MONTH"}:MONTH]},{name:"unit$subexpression$1",symbols:[u.has("QUARTER")?{type:"QUARTER"}:QUARTER]},{name:"unit$subexpression$1",symbols:[u.has("YEAR")?{type:"YEAR"}:YEAR]},{name:"unit$subexpression$1",symbols:[u.has("SECONDS")?{type:"SECONDS"}:SECONDS]},{name:"unit$subexpression$1",symbols:[u.has("MINUTES")?{type:"MINUTES"}:MINUTES]},{name:"unit$subexpression$1",symbols:[u.has("HOURS")?{type:"HOURS"}:HOURS]},{name:"unit$subexpression$1",symbols:[u.has("DAYS")?{type:"DAYS"}:DAYS]},{name:"unit$subexpression$1",symbols:[u.has("WEEKS")?{type:"WEEKS"}:WEEKS]},{name:"unit$subexpression$1",symbols:[u.has("MONTHS")?{type:"MONTHS"}:MONTHS]},{name:"unit$subexpression$1",symbols:[u.has("QUARTERS")?{type:"QUARTERS"}:QUARTERS]},{name:"unit$subexpression$1",symbols:[u.has("YEARS")?{type:"YEARS"}:YEARS]},{name:"unit",symbols:["unit$subexpression$1"],postprocess:([t])=>(0,m.mkUnits)(t[0].text)},{name:"clause",symbols:[u.has("NULL_KW")?{type:"NULL_KW"}:NULL_KW],postprocess:()=>({operator:"null"})},{name:"clause",symbols:["parens"],postprocess:t=>t[0]},{name:"clause",symbols:["duration"],postprocess:([t])=>({operator:"in_last",...t})},{name:"clause",symbols:[u.has("BEFORE")?{type:"BEFORE"}:BEFORE,"moment"],postprocess:([t,i])=>({operator:"before",before:i})},{name:"clause",symbols:[u.has("STARTING")?{type:"STARTING"}:STARTING,"moment"],postprocess:([t,i])=>({operator:"before",before:i,not:!0})},{name:"clause",symbols:[u.has("AFTER")?{type:"AFTER"}:AFTER,"moment"],postprocess:([t,i])=>({operator:"after",after:i})},{name:"clause",symbols:[u.has("THROUGH")?{type:"THROUGH"}:THROUGH,"moment"],postprocess:([t,i])=>({operator:"after",after:i,not:!0})},{name:"clause",symbols:["moment",u.has("TO")?{type:"TO"}:TO,"moment"],postprocess:([t,i,e])=>({operator:"to",fromMoment:t,toMoment:e})},{name:"clause",symbols:["moment",u.has("FOR")?{type:"FOR"}:FOR,"duration"],postprocess:([t,i,e])=>({...e,operator:"for",begin:t})},{name:"clause$subexpression$1",symbols:[u.has("LAST")?{type:"LAST"}:LAST]},{name:"clause$subexpression$1",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT]},{name:"clause",symbols:["clause$subexpression$1","duration"],postprocess:([t,i])=>({operator:t[0].text,...i})},{name:"clause",symbols:["moment"],postprocess:([t])=>({operator:"in",in:t})},{name:"lastNextThis",symbols:[u.has("THIS")?{type:"THIS"}:THIS],postprocess:([t])=>t.text.toLowerCase()},{name:"lastNextThis",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT],postprocess:([t])=>t.text.toLowerCase()},{name:"lastNextThis",symbols:[u.has("LAST")?{type:"LAST"}:LAST],postprocess:([t])=>t.text.toLowerCase()},{name:"moment",symbols:[u.has("NOW")?{type:"NOW"}:NOW],postprocess:()=>({moment:"now"})},{name:"moment",symbols:["lastNextThis","unit"],postprocess:([t,i])=>({moment:t,units:i})},{name:"moment",symbols:[u.has("TODAY")?{type:"TODAY"}:TODAY],postprocess:()=>({moment:"today"})},{name:"moment",symbols:[u.has("YESTERDAY")?{type:"YESTERDAY"}:YESTERDAY],postprocess:()=>({moment:"yesterday"})},{name:"moment",symbols:[u.has("TOMORROW")?{type:"TOMORROW"}:TOMORROW],postprocess:()=>({moment:"tomorrow"})},{name:"moment",symbols:["duration",u.has("AGO")?{type:"AGO"}:AGO],postprocess:([t,i])=>({moment:"ago",...t})},{name:"moment",symbols:["duration",u.has("FROM")?{type:"FROM"}:FROM,u.has("NOW")?{type:"NOW"}:NOW],postprocess:([t,i])=>({moment:"from_now",...t})},{name:"moment",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT,"weekday"],postprocess:([t,i])=>({moment:i.toLowerCase(),which:"next"})},{name:"moment",symbols:[u.has("LAST")?{type:"LAST"}:LAST,"weekday"],postprocess:([t,i])=>({moment:i.toLowerCase(),which:"last"})},{name:"moment",symbols:["weekday"],postprocess:([t])=>({moment:t.toLowerCase(),which:"last"})},{name:"moment",symbols:["timeLiteral"],postprocess:t=>t[0]},{name:"timeLiteral",symbols:[u.has("literal")?{type:"literal"}:literal],postprocess:([t])=>(0,m.timeLiteral)(t.text)},{name:"timeLiteral",symbols:[u.has("lit_day")?{type:"lit_day"}:lit_day],postprocess:([t])=>(0,m.timeLiteral)(t.text,"day")},{name:"timeLiteral",symbols:[u.has("lit_min")?{type:"lit_min"}:lit_min],postprocess:([t])=>(0,m.timeLiteral)(t.text,"minute")},{name:"timeLiteral",symbols:[u.has("lit_hour")?{type:"lit_hour"}:lit_hour],postprocess:([t])=>(0,m.timeLiteral)(t.text,"hour")},{name:"timeLiteral",symbols:[u.has("lit_month")?{type:"lit_month"}:lit_month],postprocess:([t])=>(0,m.timeLiteral)(t.text,"month")},{name:"timeLiteral",symbols:[u.has("lit_quarter")?{type:"lit_quarter"}:lit_quarter],postprocess:([t])=>(0,m.timeLiteral)(t.text,"quarter")},{name:"timeLiteral",symbols:[u.has("lit_week")?{type:"lit_week"}:lit_week],postprocess:([t])=>(0,m.timeLiteral)(t.text,"week")},{name:"timeLiteral",symbols:[u.has("lit_year")?{type:"lit_year"}:lit_year],postprocess:([t])=>(0,m.timeLiteral)(t.text,"year")},{name:"weekday$subexpression$1",symbols:[u.has("MONDAY")?{type:"MONDAY"}:MONDAY]},{name:"weekday$subexpression$1",symbols:[u.has("TUESDAY")?{type:"TUESDAY"}:TUESDAY]},{name:"weekday$subexpression$1",symbols:[u.has("WEDNESDAY")?{type:"WEDNESDAY"}:WEDNESDAY]},{name:"weekday$subexpression$1",symbols:[u.has("THURSDAY")?{type:"THURSDAY"}:THURSDAY]},{name:"weekday$subexpression$1",symbols:[u.has("FRIDAY")?{type:"FRIDAY"}:FRIDAY]},{name:"weekday$subexpression$1",symbols:[u.has("SATURDAY")?{type:"SATURDAY"}:SATURDAY]},{name:"weekday$subexpression$1",symbols:[u.has("SUNDAY")?{type:"SUNDAY"}:SUNDAY]},{name:"weekday",symbols:["weekday$subexpression$1"],postprocess:([t])=>t[0].text},{name:"parens",symbols:[u.has("oparen")?{type:"oparen"}:oparen,"temporalFilter",u.has("cparen")?{type:"cparen"}:cparen],postprocess:([t,i,e])=>({operator:"()",expr:i})},{name:"conjunction",symbols:[u.has("OR")?{type:"OR"}:OR]},{name:"conjunction",symbols:[u.has("AND")?{type:"AND"}:AND]}],ParserStart:"temporalFilter"};return $n.default=o,$n}var w0;function md(){return w0||(w0=1,(function(a){var d=nt&&nt.__createBinding||(Object.create?(function(l,c,p,v){v===void 0&&(v=p);var x=Object.getOwnPropertyDescriptor(c,p);(!x||("get"in x?!c.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return c[p]}}),Object.defineProperty(l,v,x)}):(function(l,c,p,v){v===void 0&&(v=p),l[v]=c[p]})),y=nt&&nt.__setModuleDefault||(Object.create?(function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}):function(l,c){l.default=c}),m=nt&&nt.__importStar||(function(){var l=function(c){return l=Object.getOwnPropertyNames||function(p){var v=[];for(var x in p)Object.prototype.hasOwnProperty.call(p,x)&&(v[v.length]=x);return v},l(c)};return function(c){if(c&&c.__esModule)return c;var p={};if(c!=null)for(var v=l(c),x=0;x<v.length;x++)v[x]!=="default"&&d(p,c,v[x]);return y(p,c),p}})(),h=nt&&nt.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(a,"__esModule",{value:!0}),a.TemporalFilterExpression=void 0;const u=Qn(),r=h(dd()),o=m(La()),t=ka();a.TemporalFilterExpression={parse(l){if(l.match(/^\s*$/))return{parsed:null,log:[]};const c=new o.Parser(o.Grammar.fromCompiled(r.default)),p=(0,t.run_parser)(l,c);return p.parsed&&(0,u.isTemporalFilter)(p.parsed)?{parsed:p.parsed,log:[]}:{parsed:null,log:p.log}},unparse(l){if(l===null)return"";switch(l.operator){case"null":return i(l,"null");case"in":return i(l,s(l.in));case"()":return"("+a.TemporalFilterExpression.unparse(l.expr)+")";case"in_last":return i(l,e(l));case"last":case"next":return i(l,`${l.operator} ${e(l)}`);case"before":return`${l.not?"starting":"before"} ${s(l.before)}`;case"after":return`${l.not?"through":"after"} ${s(l.after)}`;case"to":return i(l,`${s(l.fromMoment)} to ${s(l.toMoment)}`);case"for":return i(l,`${s(l.begin)} for ${e(l)}`);case"or":return l.members.map(c=>a.TemporalFilterExpression.unparse(c)).join(" or ");case"and":return l.members.map(c=>a.TemporalFilterExpression.unparse(c)).join(" and ")}}};function i(l,c){return"not"in l&&l.not?"not "+c:c}function e(l){return l.n==="1"?`1 ${l.units}`:`${l.n} ${l.units}s`}function s(l){switch(l.moment){case"literal":return l.literal;case"now":case"today":case"yesterday":case"tomorrow":return l.moment;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return l.which==="next"?"next "+l.moment:l.moment;case"this":case"next":case"last":return`${l.moment} ${l.units}`;case"ago":return`${e(l)} ago`;case"from_now":return`${e(l)} from now`}}})(nt)),nt}var R0;function yd(){return R0||(R0=1,(function(a){var d=Ln&&Ln.__createBinding||(Object.create?(function(o,t,i,e){e===void 0&&(e=i);var s=Object.getOwnPropertyDescriptor(t,i);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(o,e,s)}):(function(o,t,i,e){e===void 0&&(e=i),o[e]=t[i]})),y=Ln&&Ln.__exportStar||function(o,t){for(var i in o)i!=="default"&&!Object.prototype.hasOwnProperty.call(t,i)&&d(t,o,i)};Object.defineProperty(a,"__esModule",{value:!0}),a.TemporalFilterExpression=a.StringFilterExpression=a.NumberFilterExpression=a.BooleanFilterExpression=void 0,y(Qn(),a);var m=ud();Object.defineProperty(a,"BooleanFilterExpression",{enumerable:!0,get:function(){return m.BooleanFilterExpression}});var h=pd();Object.defineProperty(a,"NumberFilterExpression",{enumerable:!0,get:function(){return h.NumberFilterExpression}});var u=xd();Object.defineProperty(a,"StringFilterExpression",{enumerable:!0,get:function(){return u.StringFilterExpression}});var r=md();Object.defineProperty(a,"TemporalFilterExpression",{enumerable:!0,get:function(){return r.TemporalFilterExpression}})})(Ln)),Ln}var P0;function gd(){return P0||(P0=1,(function(a){var d=xr&&xr.__createBinding||(Object.create?(function(z,f,S,U){U===void 0&&(U=S);var le=Object.getOwnPropertyDescriptor(f,S);(!le||("get"in le?!f.__esModule:le.writable||le.configurable))&&(le={enumerable:!0,get:function(){return f[S]}}),Object.defineProperty(z,U,le)}):(function(z,f,S,U){U===void 0&&(U=S),z[U]=f[S]})),y=xr&&xr.__setModuleDefault||(Object.create?(function(z,f){Object.defineProperty(z,"default",{enumerable:!0,value:f})}):function(z,f){z.default=f}),m=xr&&xr.__importStar||(function(){var z=function(f){return z=Object.getOwnPropertyNames||function(S){var U=[];for(var le in S)Object.prototype.hasOwnProperty.call(S,le)&&(U[U.length]=le);return U},z(f)};return function(f){if(f&&f.__esModule)return f;var S={};if(f!=null)for(var U=z(f),le=0;le<U.length;le++)U[le]!=="default"&&d(S,f,U[le]);return y(S,f),S}})();Object.defineProperty(a,"__esModule",{value:!0}),a.ASTAnnotationList=a.ASTLimitViewOperation=a.ASTView=a.ASTFilterWithLiteralEquality=a.ASTFilterWithFilterString=a.ASTFilter=a.ASTCalculateViewOperation=a.ASTHavingViewOperation=a.ASTDrillViewOperation=a.ASTWhereViewOperation=a.ASTNestViewOperation=a.ASTFilteredFieldExpression=a.ASTFilterOperationList=a.ASTFilterOperation=a.ASTMovingAverageExpression=a.ASTFieldReferenceList=a.ASTLiteralValueExpression=a.ASTTimeTruncationExpression=a.ASTReferenceExpression=a.ASTExpression=a.ASTField=a.ASTAggregateViewOperation=a.ASTGroupByViewOperation=a.ASTOrderByViewOperation=a.ASTViewOperation=a.ASTViewOperationList=a.ASTSegmentViewDefinition=a.ASTRefinementViewDefinition=a.ASTArrowViewDefinition=a.ASTReferenceViewDefinition=a.ASTReferenceQueryArrowSource=a.ASTReferenceQueryDefinition=a.ASTRefinementQueryDefinition=a.ASTArrowQueryDefinition=a.ASTQueryDefinition=a.ASTQueryArrowSource=a.ASTUnimplemented=a.ASTFilterExpressionLiteralValue=a.ASTTimestampLiteralValue=a.ASTDateLiteralValue=a.ASTBooleanLiteralValue=a.ASTNumberLiteralValue=a.ASTNullLiteralValue=a.ASTStringLiteralValue=a.ASTLiteralValue=a.ASTParameterValue=a.ASTParameterValueList=a.ASTFieldReference=a.ASTReference=a.ASTQuery=void 0,a.ASTAnnotation=void 0;const h=m(nd()),u=ad(),r=m(yd());class o{constructor(){this.edited=!1}edit(){return this.edited=!0,this._parent&&this._parent.edit(),this}get as(){const f=this;return{Query(){if(f instanceof s)return f;throw new Error("Not an ASTQuery")},Reference(){if(f instanceof l)return f;throw new Error("Not an ASTReference")},ReferenceQueryArrowSource(){if(f instanceof L)return f;throw new Error("Not an ASTReferenceQueryArrowSource")},ParameterValueList(){if(f instanceof p)return f;throw new Error("Not an ASTParameterValueList")},FilterOperation(){if(f instanceof R)return f;throw new Error("Not an ASTFilterOperation")},FilterOperationList(){if(f instanceof q)return f;throw new Error("Not an ASTFilterOperationList")},ParameterValue(){if(f instanceof v)return f;throw new Error("Not an ASTParameterValue")},StringLiteralValue(){if(f instanceof x)return f;throw new Error("Not an ASTStringLiteralValue")},NumberLiteralValue(){if(f instanceof _)return f;throw new Error("Not an ASTNumberLiteralValue")},ViewOperationList(){if(f instanceof oe)return f;throw new Error("Not an ASTViewOperationList")},GroupByViewOperation(){if(f instanceof B)return f;throw new Error("Not an ASTGroupByViewOperation")},AggregateViewOperation(){if(f instanceof G)return f;throw new Error("Not an ASTAggregateViewOperation")},OrderByViewOperation(){if(f instanceof te)return f;throw new Error("Not an ASTOrderByViewOperation")},Field(){if(f instanceof O)return f;throw new Error("Not an ASTField")},ReferenceExpression(){if(f instanceof C)return f;throw new Error("Not an ASTReferenceExpression")},ReferenceViewDefinition(){if(f instanceof I)return f;throw new Error("Not an ASTReferenceViewDefinition")},ArrowQueryDefinition(){if(f instanceof P)return f;throw new Error("Not an ASTArrowQueryDefinition")},ArrowViewDefinition(){if(f instanceof X)return f;throw new Error("Not an ASTArrowViewDefinition")},RefinementViewDefinition(){if(f instanceof ie)return f;throw new Error("Not an ASTRefinementViewDefinition")},TimeTruncationExpression(){if(f instanceof D)return f;throw new Error("Not an ASTTimeTruncationExpression")},FilteredFieldExpression(){if(f instanceof H)return f;throw new Error("Not an ASTFilteredFieldExpression")},NestViewOperation(){if(f instanceof M)return f;throw new Error("Not an ASTNestViewOperation")},View(){if(f instanceof ae)return f;throw new Error("Not an ASTView")},SegmentViewDefinition(){if(f instanceof ce)return f;throw new Error("Not an ASTSegmentViewDefinition")},LimitViewOperation(){if(f instanceof de)return f;throw new Error("Not an ASTLimitViewOperation")},AnnotationList(){if(f instanceof Y)return f;throw new Error("Not an ASTAnnotationList")},Annotation(){if(f instanceof re)return f;throw new Error("Not an ASTAnnotation")}}}get find(){const f=this;return{Query(S){return f.findAny(S).as.Query()},Reference(S){return f.findAny(S).as.Reference()},ReferenceQueryArrowSource(S){return f.findAny(S).as.ReferenceQueryArrowSource()},ParameterValueList(S){return f.findAny(S).as.ParameterValueList()},FilterOperation(S){return f.findAny(S).as.FilterOperation()},FilterOperationList(S){return f.findAny(S).as.FilterOperationList()},ParameterValue(S){return f.findAny(S).as.ParameterValue()},StringLiteralValue(S){return f.findAny(S).as.StringLiteralValue()},NumberLiteralValue(S){return f.findAny(S).as.NumberLiteralValue()},ViewOperationList(S){return f.findAny(S).as.ViewOperationList()},GroupByViewOperation(S){return f.findAny(S).as.GroupByViewOperation()},AggregateViewOperation(S){return f.findAny(S).as.AggregateViewOperation()},OrderByViewOperation(S){return f.findAny(S).as.OrderByViewOperation()},Field(S){return f.findAny(S).as.Field()},ReferenceExpression(S){return f.findAny(S).as.ReferenceExpression()},ReferenceViewDefinition(S){return f.findAny(S).as.ReferenceViewDefinition()},ArrowQueryDefinition(S){return f.findAny(S).as.ArrowQueryDefinition()},ArrowViewDefinition(S){return f.findAny(S).as.ArrowViewDefinition()},RefinementViewDefinition(S){return f.findAny(S).as.RefinementViewDefinition()},TimeTruncationExpression(S){return f.findAny(S).as.TimeTruncationExpression()},FilteredFieldExpression(S){return f.findAny(S).as.FilteredFieldExpression()},NestViewOperation(S){return f.findAny(S).as.NestViewOperation()},View(S){return f.findAny(S).as.View()},SegmentViewDefinition(S){return f.findAny(S).as.SegmentViewDefinition()},LimitViewOperation(S){return f.findAny(S).as.LimitViewOperation()},AnnotationList(S){return f.findAny(S).as.AnnotationList()},Annotation(S){return f.findAny(S).as.Annotation()}}}get parent(){if(this._parent===void 0)throw new Error("This node does not have a parent");return this._parent}set parent(f){this._parent=f}static schemaTryGet(f,S,U){return o._schemaTryGet(f,S,U,!1)}static schemaTryGetDrillField(f,S,U){return o._schemaTryGet(f,S,U,!0)}static _schemaTryGet(f,S,U,le){let me=f.fields;for(const Be of U??[]){const we=me.find(Me=>Me.name===Be);if(we===void 0)throw new Error(`${Be} not found`);if(we.kind==="join"||le&&we.kind==="view"){me=we.schema.fields;continue}if(we.kind==="dimension"||we.kind==="measure"){if(we.type.kind==="record_type"){me=we.type.fields.map(Me=>({kind:we.kind,...Me}));continue}else if(we.type.kind==="array_type"&&we.type.element_type.kind==="record_type"){me=we.type.element_type.fields.map(Me=>({kind:we.kind,...Me}));continue}}throw new Error(`${Be} is not a join, record, or repeated record`)}return me.find(Be=>Be.name===S)}static schemaGet(f,S,U){const le=o.schemaTryGet(f,S,U);if(le===void 0)throw new Error(`${S} not found`);return le}static schemaGetDrillField(f,S,U){const le=o.schemaTryGetDrillField(f,S,U);if(le===void 0)throw new Error(`${S} not found`);return le}static schemaMerge(f,S){return{fields:[...f.fields,...S.fields]}}static tagFor(f,S="# "){var U,le,me;const Se=(le=(U=f.annotations)===null||U===void 0?void 0:U.map(Be=>Be.value))===null||le===void 0?void 0:le.filter(Be=>Be.startsWith(S));return(me=u.Tag.fromTagLines(Se??[]).tag)!==null&&me!==void 0?me:new u.Tag}static fieldWasCalculation(f){if(f.kind!=="dimension")throw new Error(`${f.name} could not be an output field, because it is a ${f.kind}, and only dimensions can appear in output schemas`);return o.tagFor(f,"#(malloy) ").has("calculation")}}function t(z){return Array.isArray(z)||typeof z=="string"||typeof z=="number"||typeof z=="boolean"}class i extends o{constructor(f,S){super(),this.node=f,this.children=S,this.originalChildren=[...S],S.forEach(U=>U.parent=this)}*iter(){for(let f=0;f<this.length;f++)yield this.index(f)}get length(){return this.children.length}get last(){return this.children[this.children.length-1]}index(f){return this.children[f]}insert(f,S){this.edit(),this.children.splice(S,0,f),f.parent=this}add(f){this.edit(),this.children.push(f),f.parent=this}remove(f){const S=this.children.findIndex(U=>U===f);if(S===-1)return this;this.edit(),this.children.splice(S,1)}build(){if(!this.edited)return this.node;const f=this.children.map(S=>S.build());return this.edited=!1,this.originalChildren=[...this.children],this.node=f,f}findAny(f){if(f.length===0)return this;const[S,...U]=f;if(typeof S!="number")throw new Error(`${this.constructor.name} is a ASTListNode and thus cannot contain a ${S}`);return this.children[S].findAny(U)}findIndex(f){return this.children.findIndex(f)}indexOf(f){return this.children.indexOf(f)}}class e extends o{constructor(f,S){super(),this.node=f,this.children=S;for(const U in S){const le=S[U];le&&!t(le)&&(le.parent=this)}}build(){if(!this.edited)return this.node;let f=this.node;for(const S in this.children){const U=this.children[S];U===void 0?f={...f,[S]:void 0}:t(U)?this.edited&&(f={...f,[S]:U}):f={...f,[S]:U.build()}}return this.node=f,this.edited=!1,f}findAny(f){if(f.length===0)return this;const[S,...U]=f;if(typeof S!="string")throw new Error(`${this.constructor.name} is a ASTListNode and thus cannot contain a ${S}`);const le=this.children[S];if(t(le))throw new Error(`${this.constructor.name}.${S} refers to a basic type, not an ASTNode`);return le._find(U)}}class s extends e{constructor(f){var S,U;let le=f.source;if(le===void 0){if(f.model===void 0)throw new Error("Need a model or source");if(f.query){const we=f.query.definition;if(we.kind==="arrow"&&we.source.kind==="source_reference"){const Me=we.source.name;if(le=f.model.entries.find(Xn=>Xn.name===Me),le===void 0)throw new Error(`Model does not contain source or query named ${Me}`)}}if(le===void 0&&(le=f.model.entries[0]),le===void 0)throw new Error("Model does not contain any sources or queries")}const me=be(le),Se=(S=f.query)!==null&&S!==void 0?S:{definition:{kind:"arrow",source:{kind:"source_reference",name:me.name},view:{kind:"segment",operations:[]}}},Be=(U=f.model)!==null&&U!==void 0?U:{entries:[me],anonymous_queries:[]};super(Se,{definition:a.ASTQueryDefinition.from(Se.definition),annotations:Se.annotations&&new Y(Se.annotations)}),this.model=Be,f.source&&this.setSource(f.source.name)}get definition(){return this.children.definition}set definition(f){this.edit(),this.children.definition=f,f.parent=this}get annotations(){return this.children.annotations}reorderFields(f){this.definition.reorderFields(f)}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new Y([]);return this.children.annotations=f,f.parent=this,f}getInheritedTag(f="# "){return xe(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}setViewToEmptySegment(){if(!(this.definition instanceof P))throw new Error("Must set source before setting view");return this.definition=new P({kind:"arrow",source:this.definition.source.build(),view:{kind:"segment",operations:[]}}),this.definition.view.as.SegmentViewDefinition()}isRunnable(){return this.definition.isRunnable()}isEmpty(){return this.definition instanceof P&&this.definition.view instanceof ce&&this.definition.view.operations.length===0}getOrAddDefaultSegment(){return this.definition.getOrAddDefaultSegment()}setSource(f){if(this.definition instanceof P&&this.definition.source instanceof L&&this.definition.source.name===f)return;if(this.model.entries.find(U=>U.name===f)===void 0)throw new Error(`Source ${f} is not defined in model`);this.definition=new P({kind:"arrow",source:{kind:"source_reference",name:f},view:this.definition instanceof P?this.definition.view.build():{kind:"segment",operations:[]}})}setQueryHead(f){const S=this.model.entries.find(U=>U.name===f);if(S===void 0||S.kind!=="query")throw new Error(`No query named ${f} in the model`);this.definition=new W({kind:"query_reference",name:f})}getQueryInfo(f){const S=this.model.entries.find(U=>U.name===f);if(S===void 0)throw new Error(`Query ${f} is not defined in model`);if(S.kind!=="query")throw new Error(`Model entry ${f} is not a query`);return S}toMalloy(){return h.queryToMalloy(this.build())}build(){return super.build()}setView(f){if(!(this.definition instanceof P))throw new Error("Must set source before setting view");return this.definition=new P({kind:"arrow",source:this.definition.source.build(),view:{kind:"view_reference",name:f}}),this.definition.view.as.ReferenceViewDefinition()}_getInheritedAnnotations(f){var S;return f instanceof W?(S=this.getQueryInfo(f.name).annotations)!==null&&S!==void 0?S:[]:f instanceof j?this._getInheritedAnnotations(f.base):f instanceof P?f.view.getInheritedAnnotations():[]}getInheritedAnnotations(){return this._getInheritedAnnotations(this.definition)}}a.ASTQuery=s;class l extends e{constructor(f){super(f,{name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.reference=f}get name(){return this.children.name}set name(f){this.edit(),this.children.name=f}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}static getOrAddParameters(f){if(f.parameters)return f.parameters;f.edit();const S=new p([]);return f.parameters=S,S}static setParameter(f,S,U){const le=l.tryGetParameter(f,S);if(le!==void 0){le.value=a.ASTLiteralValue.from(a.ASTLiteralValue.makeLiteral(U));return}return f.getOrAddParameters().addParameter(S,U)}static tryGetParameter(f,S){if(f.parameters!==void 0){for(const U of f.parameters.iter())if(U.name===S)return U}}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReference=l;class c extends l{get segment(){const f=this.parent;return f instanceof H||f instanceof D?f.field.segment:f instanceof he||f instanceof K?f.segment:f.list.segment}getReferenceSchema(){return this.parent instanceof te?this.segment.getOutputSchema():this.segment.getInputSchema()}getFieldInfo(){const f=this.getReferenceSchema();return o.schemaGet(f,this.name,this.path)}}a.ASTFieldReference=c;class p extends i{constructor(f){super(f,f.map(S=>new v(S)))}get parameters(){return this.children}addParameter(f,S){this.add(new v({name:f,value:a.ASTLiteralValue.makeLiteral(S)}))}}a.ASTParameterValueList=p;class v extends e{constructor(f){super(f,{name:f.name,value:a.ASTLiteralValue.from(f.value)}),this.parameter=f}get name(){return this.children.name}get value(){return this.children.value}set value(f){this.edit(),this.children.value=f}}a.ASTParameterValue=v,a.ASTLiteralValue={from(z){switch(z.kind){case"string_literal":return new x(z);case"number_literal":return new _(z);case"boolean_literal":return new A(z);case"date_literal":return new E(z);case"timestamp_literal":return new N(z);case"null_literal":return new g(z);case"filter_expression_literal":return new b(z)}},makeLiteral(z){if(z!==null&&typeof z=="object"&&"kind"in z)return z;if(typeof z=="string")return{kind:"string_literal",string_value:z};if(typeof z=="boolean")return{kind:"boolean_literal",boolean_value:z};if(typeof z=="number")return{kind:"number_literal",number_value:z};if(z===null)return{kind:"null_literal"};if("date"in z){const f=z.granularity,S=Pe(z.date);return Te(f)?{kind:"date_literal",date_value:S,granularity:f}:{kind:"timestamp_literal",timestamp_value:S,granularity:f}}throw new Error("Unknown literal type")}};class x extends e{constructor(f){super(f,{kind:f.kind,string_value:f.string_value}),this.node=f,this.kind="string_literal"}get fieldType(){return{kind:"string_type"}}}a.ASTStringLiteralValue=x;class g extends e{constructor(f){super(f,{kind:f.kind}),this.node=f,this.kind="null_literal"}get fieldType(){}}a.ASTNullLiteralValue=g;class _ extends e{constructor(f){super(f,{kind:f.kind,number_value:f.number_value}),this.node=f,this.kind="number_literal"}get fieldType(){return{kind:"number_type",subtype:Number.isInteger(this.children.number_value)?"integer":"decimal"}}}a.ASTNumberLiteralValue=_;class A extends e{constructor(f){super(f,{kind:f.kind,boolean_value:f.boolean_value}),this.node=f,this.kind="boolean_literal"}get fieldType(){return{kind:"boolean_type"}}}a.ASTBooleanLiteralValue=A;class E extends e{constructor(f){super(f,{kind:f.kind,date_value:f.date_value,granularity:f.granularity}),this.node=f,this.kind="date_literal"}get fieldType(){return{kind:"date_type",timeframe:this.children.granularity}}}a.ASTDateLiteralValue=E;class N extends e{constructor(f){super(f,{kind:f.kind,timestamp_value:f.timestamp_value,granularity:f.granularity}),this.node=f,this.kind="timestamp_literal"}get fieldType(){return{kind:"timestamp_type",timeframe:this.children.granularity}}}a.ASTTimestampLiteralValue=N;class b extends e{constructor(f){super(f,{kind:f.kind,filter_expression_value:f.filter_expression_value}),this.node=f,this.kind="filter_expression_literal"}get fieldType(){}}a.ASTFilterExpressionLiteralValue=b;class w extends o{constructor(f){super(),this.node=f}get treeEdited(){return!1}build(){return this.node}findAny(){throw new Error("Tried to find a node from an unimplemented node type")}}a.ASTUnimplemented=w,a.ASTQueryArrowSource={from(z){switch(z.kind){case"refinement":return new j(z);case"source_reference":return new L(z)}}},a.ASTQueryDefinition={from(z){switch(z.kind){case"arrow":return new P(z);case"query_reference":return new W(z);case"refinement":return new j(z)}}};class P extends e{constructor(f){super(f,{kind:"arrow",source:a.ASTQueryArrowSource.from(f.source),view:$.from(f.view)}),this.node=f}get view(){return this.children.view}set view(f){this.edit(),this.children.view=f,f.parent=this}get source(){return this.children.source}set source(f){this.edit(),this.children.source=f}getOrAddDefaultSegment(){return this.view.getOrAddDefaultSegment()}getSourceInfo(){return this.source.getSourceInfo()}getOutputSchema(){return this.view.getRefinementSchema()}isRunnable(){return this.view.isRunnable()&&this.source.isRunnable()}get query(){return this.parent.as.Query()}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.view),this.view.propagateDown(f)}reorderFields(f){this.view instanceof ce?this.view.reorderFields(f):this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}}a.ASTArrowQueryDefinition=P;class j extends e{constructor(f){super(f,{kind:"refinement",base:a.ASTQueryDefinition.from(f.base),refinement:$.from(f.refinement)}),this.node=f}get base(){return this.children.base}get refinement(){return this.children.refinement}set refinement(f){this.edit(),this.children.refinement=f,f.parent=this}isRunnable(){return!0}get query(){return this.parent.as.Query()}getOrAddDefaultSegment(){return this.refinement.getOrAddDefaultSegment()}getOutputSchema(){const f=this.base.getOutputSchema(),S=this.refinement.getRefinementSchema();return s.schemaMerge(f,S)}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.refinement),this.refinement.propagateDown(f)}reorderFields(f){this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}getSourceInfo(){return this.base.getSourceInfo()}}a.ASTRefinementQueryDefinition=j;class W extends e{constructor(f){super(f,{kind:"query_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return!0}get name(){return this.children.name}get query(){return this.parent.as.Query()}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}getOrAddDefaultSegment(){const f=new j({kind:"refinement",base:this.build(),refinement:{kind:"segment",operations:[]}});return this.query.definition=f,f.refinement.as.SegmentViewDefinition()}propagateUp(f){}propagateDown(f){}reorderFields(f){this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}getOutputSchema(){return this.getSourceInfo().schema}getSourceInfo(){const S=this.query.model.entries.find(U=>U.name===this.name);if(S===void 0)throw new Error(`Query not found with name ${this.name}`);return S}}a.ASTReferenceQueryDefinition=W;class L extends e{constructor(f){super(f,{kind:"source_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return this.areRequiredParametersSet()}get name(){return this.children.name}get arrow(){return this.parent.as.ArrowQueryDefinition()}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}getSourceInfo(){const f=this.arrow.query.model.entries.find(S=>S.name===this.name);if(f===void 0)throw new Error(`No query or source named ${this.name}`);return f}getOrAddDefaultSegment(){if(this.getSourceInfo().kind!=="query")throw new Error(`Cannot refine source ${this.name}`);const S=new j({kind:"refinement",base:{...this.build(),kind:"query_reference"},refinement:{kind:"segment",operations:[]}});return this.arrow.source=S,S.refinement.as.SegmentViewDefinition()}propagateUp(f){}propagateDown(f){}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}get query(){return this.parent.parent.as.Query()}getSourceParameters(){var f;const S=this.getSourceInfo();return S.kind==="query"?[]:(f=S.parameters)!==null&&f!==void 0?f:[]}areRequiredParametersSet(){const f=this.getSourceParameters();for(const S of f){if(S.default_value!==void 0)continue;if(this.tryGetParameter(S.name)===void 0)return!1}return!0}}a.ASTReferenceQueryArrowSource=L;const $={from(z){switch(z.kind){case"arrow":return new X(z);case"view_reference":return new I(z);case"segment":return new ce(z);case"refinement":return new ie(z)}}};function Q(z,f){const S=z.parent;S instanceof P?S.view=f:S instanceof j?S.refinement=f:S instanceof ae?S.definition=f:S instanceof X?S.source===z?S.source=f:S.view=f:S.base===z?S.base=f:S.refinement=f}function ee(z,f,S=[]){const U=z.getInputSchema(),le=s.schemaGet(U,f,S);if(le===void 0)return{isValidViewRefinement:!1,error:`${f} is not defined`};if(le.kind!=="view")return{isValidViewRefinement:!1,error:`${f} is not a view`};const me=z.getOutputSchema();for(const Se of le.schema.fields)if(s.schemaTryGet(me,Se.name,[]))return{isValidViewRefinement:!1,error:`Cannot refine with ${f} because stage already has an output field named ${Se.name}`};return{isValidViewRefinement:!0}}class I extends e{constructor(f){super(f,{kind:"view_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return!0}get name(){return this.children.name}get path(){return this.children.path}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}getOrAddDefaultSegment(){return this.addEmptyRefinement()}addEmptyRefinement(){const f=ie.segmentRefinementOf(this.build());return Q(this,f),f.refinement.as.SegmentViewDefinition()}addViewRefinement(f,S){const{error:U}=this.isValidViewRefinement(f,S);if(U)throw new Error(U);const le=ie.viewRefinementOf(this.build(),f,S);return Q(this,le),le.refinement.as.ReferenceViewDefinition()}convertToNest(f){const S=$.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});Q(this,S)}isValidViewRefinement(f,S){return ee(this,f,S)}getInputSchema(){return Ee(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getImplicitName(){return this.name}getViewInfo(){const f=this.getInputSchema(),S=o.schemaGet(f,this.name,this.path);if(S.kind!=="view")throw new Error("Not a view");return S}getRefinementSchema(){return this.getViewInfo().schema}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){}getInheritedAnnotations(){var f;return(f=this.getViewInfo().annotations)!==null&&f!==void 0?f:[]}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReferenceViewDefinition=I;class X extends e{constructor(f){super(f,{kind:"arrow",source:$.from(f.source),view:$.from(f.view)}),this.node=f}isRunnable(){return this.source.isRunnable()&&this.view.isRunnable()}get source(){return this.children.source}set source(f){this.edit(),this.children.source=f}get view(){return this.children.view}set view(f){this.edit(),this.children.view=f,f.parent=this}getOrAddDefaultSegment(){return this.view.getOrAddDefaultSegment()}addEmptyRefinement(){return this.view.addEmptyRefinement()}addViewRefinement(f,S){return this.view.addViewRefinement(f,S)}convertToNest(f){const S=$.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});Q(this,S)}getInputSchema(){return this.source.getOutputSchema()}getOutputSchema(){return this.view.getRefinementSchema()}getImplicitName(){return this.view.getImplicitName()}getRefinementSchema(){throw new Error("An arrow is not a valid refinement")}isValidViewRefinement(f,S){return ee(this,f,S)}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.view),this.view.propagateDown(f)}getInheritedAnnotations(){return[]}}a.ASTArrowViewDefinition=X;class ie extends e{constructor(f){super(f,{kind:"refinement",base:$.from(f.base),refinement:$.from(f.refinement)}),this.node=f}isRunnable(){return this.getOutputSchema().fields.length>0}get refinement(){return this.children.refinement}set refinement(f){this.edit(),this.children.refinement=f,f.parent=this}get base(){return this.children.base}set base(f){this.edit(),this.children.base=f}convertToNest(f){const S=$.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});Q(this,S)}getOrAddDefaultSegment(){return this.refinement.getOrAddDefaultSegment()}addEmptyRefinement(){return this.refinement.addEmptyRefinement()}addViewRefinement(f,S){return this.refinement.addViewRefinement(f,S)}getInputSchema(){return Ee(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getRefinementSchema(){return o.schemaMerge(this.base.getRefinementSchema(),this.refinement.getRefinementSchema())}getImplicitName(){return this.base.getImplicitName()}isValidViewRefinement(f,S){return ee(this,f,S)}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){f(this.base),f(this.refinement),this.base.propagateDown(f),this.refinement.propagateDown(f)}getInheritedAnnotations(){return this.base.getInheritedAnnotations()}static viewRefinementOf(f,S,U){return new ie({kind:"refinement",base:f,refinement:{kind:"view_reference",name:S,path:U}})}static segmentRefinementOf(f){return new ie({kind:"refinement",base:f,refinement:{kind:"segment",operations:[]}})}}a.ASTRefinementViewDefinition=ie;class ce extends e{constructor(f){super(f,{kind:"segment",operations:new oe(f.operations)}),this.node=f,this.DEFAULT_INSERTION_ORDER=["group_by","aggregate","drill","where","having","nest","order_by","calculate","limit"]}isRunnable(){let f=!1;for(const S of this.operations.iter()){if(S instanceof G||S instanceof B)return!0;if(S instanceof M){if(!S.view.definition.isRunnable())return!1;f=!0}}return f}get operations(){return this.children.operations}convertToNest(f){const S=$.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});Q(this,S)}renameOrderBys(f,S){for(const U of this.operations.iter())U instanceof te&&U.name===f&&U.setField(S)}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){}removeOrderBys(f){for(const S of this.operations.iter())S instanceof te&&S.name===f&&S.delete()}reorderFields(f){const S=[],U=[],le={};let me=!1;for(const we of this.operations.iter()){if((we instanceof G||we instanceof B||we instanceof M)&&f.includes(we.name)){le[we.name]=we,me=!0;continue}me?U.push(we):S.push(we)}const Se=[];for(const we of f){const Me=le[we];if(Me===void 0)throw new Error(`No field named ${we}`);Se.push(Me)}const Be=[...S,...Se,...U];this.operations.items=Be}renameField(f,S){if(f.name===S)return;const U=this.getOutputSchema();if(o.schemaTryGet(U,S,[]))throw new Error(`Output already has a field named ${S}`);const le=f.name;f.name=S,this.propagateUp(me=>{me instanceof ce&&me.renameOrderBys(le,S)})}addOrderBy(f,S){const U=this.getOutputSchema();try{o.schemaGet(U,f,[])}catch{throw new Error(`No such field ${f} in stage output`)}for(const me of this.operations.iter())if(me instanceof te&&me.name===f)return me.direction=S,me;const le=new te({kind:"order_by",field_reference:{name:f},direction:S});return this.addOperation(le),le}addEmptyNest(f){const S=new M({kind:"nest",name:f,view:{definition:{kind:"segment",operations:[]}}});return this.addOperation(S),S}firstIndexOfOperationType(f){return this.operations.findIndex(S=>S.kind===f)}findInsertionPoint(f){const S=this.firstIndexOfOperationType(f);if(S>-1){let me=S;for(;this.operations.index(me)&&this.operations.index(me).kind===f;)me++;return me}const U=this.DEFAULT_INSERTION_ORDER.indexOf(f);if(U===-1)throw new Error(`Operation ${f} is not supported for \`findInsertionPoint\``);const le=this.DEFAULT_INSERTION_ORDER.slice(U+1);for(const me of le){const Se=this.firstIndexOfOperationType(me);if(Se>-1)return Se}return this.operations.length}getFieldNamed(f){const S=this.tryGetFieldNamed(f);if(S===void 0)throw new Error("No such field");return S}hasFieldNamed(f){return this.tryGetFieldNamed(f)!==void 0}hasField(f,S){return this.tryGetField(f,S)!==void 0}getField(f,S){const U=this.tryGetField(f,S);if(U===void 0)throw new Error("No such field");return U}tryGetField(f,S){for(const U of this.operations.iter())if(U instanceof B||U instanceof G){const le=U.field.getReference();if(le&&le.name===f&&Le(le.path,S))return U}else if(U instanceof M){if(U.view instanceof I)return U}else if(U instanceof fe){const le=U.expression.field.getReference();if(le&&le.name===f&&Le(le.path,S))return U}}tryGetFieldNamed(f){for(const S of this.operations.iter())if((S instanceof B||S instanceof G||S instanceof M||S instanceof fe)&&S.name===f)return S}getGroupBy(f){for(const S of this.operations.iter())if(S instanceof B&&S.name===f)return S}removeGroupBy(f){var S;return(S=this.getGroupBy(f))===null||S===void 0||S.delete(),this}addGroupBy(f,S=[],U){const le=this.makeField(f,S,U,"dimension");return this.addOperation(le),le}addDrill(f){const S=new Z({kind:"drill",...f});return this.addOperation(S),S}addWhere(f,S,U){const le=Array.isArray(S)?S:[],me=U===void 0?S:U,Se=typeof me=="string"?me:ge(me),Be=this.getInputSchema(),we=s.schemaGet(Be,f,le);ve(we,me);const Me=new V({kind:"where",filter:{kind:"filter_string",expression:{kind:"field_reference",name:f,path:le},filter:Se}});return this.addOperation(Me),Me}addHaving(f,S,U){const le=Array.isArray(S)?S:[],me=U===void 0?S:U,Se=typeof me=="string"?me:ge(me),Be=this.getInputSchema(),we=s.schemaGet(Be,f,le);ve(we,me);const Me=new se({kind:"having",filter:{kind:"filter_string",expression:{kind:"field_reference",name:f,path:le},filter:Se}});return this.addOperation(Me),Me}addCalculateMovingAverage(f,S,U,le,me){const Se=new fe({kind:"calculate",name:f,field:{expression:{kind:"moving_average",field_reference:{name:S,path:U},rows_preceding:le,rows_following:me}}});return this.addOperation(Se),Se}addTimeGroupBy(f,S,U,le){const me=this.getInputSchema(),Se=o.schemaGet(me,f,S);if(Se===void 0)throw new Error(`No such field ${f}`);if(Se.kind!=="dimension")throw new Error(`Cannot group by non-dimension ${f}`);if(Se.type.kind!==le)throw new Error(`${f} is not a ${le}`);const Be=new B({kind:"group_by",field:{expression:{kind:"time_truncation",field_reference:{name:f,path:S},truncation:U}}});return this.addOperation(Be),Be}addDateGroupBy(f,S,U){const le=U===void 0?S:U,me=U===void 0?[]:S;return this.addTimeGroupBy(f,me,le,"date_type")}addTimestampGroupBy(f,S,U){const le=U===void 0?S:U,me=U===void 0?[]:S;return this.addTimeGroupBy(f,me,le,"timestamp_type")}addAggregate(f,S=[],U){const le=this.makeField(f,S,U,"measure");return this.addOperation(le),le}addNest(f,S){const U=this.makeField(f,[],S,"view");return this.addOperation(U),U}makeField(f,S,U,le){const me=this.getInputSchema(),Se=o.schemaGet(me,f,S);if(Se===void 0)throw new Error(`No such field ${f}`);if(Se.kind!==le){const Be=Ce(le),we=le;throw new Error(`Cannot ${Be} non-${we} ${f}`)}return le==="dimension"?B.fromReference(f,S,U):le==="measure"?G.fromReference(f,S,U):M.fromReference(f,S,U)}addOperation(f){if((f instanceof B||f instanceof G||f instanceof M||f instanceof fe)&&this.hasFieldNamed(f.name))throw new Error(`Query already has a field named ${f.name}`);const S=this.findInsertionPoint(f.kind);return this.operations.insert(f,S),f}getRefinementSchema(){const f=[];for(const S of this.operations.iter())(S instanceof B||S instanceof G||S instanceof M||S instanceof fe)&&f.push(S.getFieldInfo());return{fields:f}}setLimit(f){de.validateLimit(f);const S=[...this.operations.iter()].find(a.ASTViewOperation.isLimit);S?S.limit=f:this.operations.add(new de({kind:"limit",limit:f}))}getOrAddDefaultSegment(){return this}addEmptyRefinement(){const f=ie.segmentRefinementOf(this.build());return Q(this,f),f.refinement.as.SegmentViewDefinition()}addViewRefinement(f,S){const{error:U}=this.isValidViewRefinement(f,S);if(U)throw new Error(U);const le=ie.viewRefinementOf(this.build(),f,S);return Q(this,le),le.refinement.as.ReferenceViewDefinition()}getInputSchema(){return Ee(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getImplicitName(){}isValidViewRefinement(f,S){return ee(this,f,S)}getInheritedAnnotations(){return[]}}a.ASTSegmentViewDefinition=ce;class oe extends i{constructor(f){super(f,f.map(S=>a.ASTViewOperation.from(S)))}get items(){return this.children}set items(f){this.edit(),this.children=f}get segment(){return this.parent.as.SegmentViewDefinition()}}a.ASTViewOperationList=oe,a.ASTViewOperation={from(z){switch(z.kind){case"group_by":return new B(z);case"aggregate":return new G(z);case"order_by":return new te(z);case"nest":return new M(z);case"limit":return new de(z);case"where":return new V(z);case"drill":return new Z(z);case"having":return new se(z);case"calculate":return new fe(z)}},isLimit(z){return z instanceof de}};class te extends e{constructor(f){super(f,{kind:"order_by",field_reference:new c(f.field_reference),direction:f.direction}),this.node=f,this.kind="order_by"}get fieldReference(){return this.children.field_reference}get name(){return this.fieldReference.name}get direction(){return this.children.direction}set direction(f){this.direction!==f&&(this.edit(),this.children.direction=f)}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}setField(f){const S=this.list.segment.getOutputSchema();o.schemaGet(S,f,[]),this.edit(),this.children.field_reference=new c({name:f})}setDirection(f){this.direction=f}}a.ASTOrderByViewOperation=te;class B extends e{constructor(f){super(f,{kind:"group_by",name:f.name,field:new O(f.field)}),this.node=f,this.kind="group_by"}get field(){return this.children.field}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.field.name;if(S===void 0)throw new Error("Group by does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.field.name===f?this.children.name=void 0:this.children.name=f)}get list(){return this.parent.as.ViewOperationList()}rename(f){this.list.segment.renameField(this,f)}delete(){this.list.remove(this),this.list.segment.propagateUp(f=>{f instanceof ce&&f.removeOrderBys(this.name)})}getFieldInfo(){return{kind:"dimension",name:this.name,type:this.field.type}}get annotations(){return this.field.annotations}set annotations(f){this.edit(),this.field.annotations=f}getOrAddAnnotations(){return this.field.getOrAddAnnotations()}getInheritedTag(f="# "){return xe(f,this.field.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}static fromReference(f,S,U){return new B({kind:"group_by",name:U,field:{expression:{kind:"field_reference",name:f,path:S}}})}}a.ASTGroupByViewOperation=B;class G extends e{constructor(f){super(f,{kind:"aggregate",name:f.name,field:new O(f.field)}),this.node=f,this.kind="aggregate"}get field(){return this.children.field}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.field.name;if(S===void 0)throw new Error("Aggregate does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.field.name===f?this.children.name=void 0:this.children.name=f)}get annotations(){return this.field.annotations}rename(f){this.list.segment.renameField(this,f)}convertToCalculateMovingAverage(f,S,U=0,le=[]){if(!(this.field.expression instanceof C))throw new Error("Cannot convert aggregate to smoothed metric unless it is a field reference");this.list.remove(this);const me=new fe({kind:"calculate",name:f,field:{expression:{kind:"moving_average",field_reference:{name:this.field.expression.name,path:this.field.expression.path},rows_preceding:S,rows_following:U,partition_fields:le.map(Se=>({name:Se}))}}});return this.list.add(me),me}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this),this.list.segment.propagateUp(f=>{f instanceof ce&&f.removeOrderBys(this.name)})}getFieldInfo(){return{annotations:[{value:u.Tag.withPrefix("#(malloy) ").set(["calculation"]).toString()}],kind:"dimension",name:this.name,type:this.field.type}}getOrAddAnnotations(){return this.field.getOrAddAnnotations()}getInheritedTag(f="# "){return xe(f,this.field.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}addWhere(f,S,U){const le=Array.isArray(S)?S:[],me=U===void 0?S:U,Se=typeof me=="string"?me:ge(me),Be=this.list.segment.getInputSchema(),we=s.schemaGet(Be,f,le);ve(we,me);const Me={filter:{kind:"filter_string",expression:{kind:"field_reference",name:f,path:le},filter:Se}};if(this.field.expression instanceof H)return this.field.expression.where.add(new R(Me)),this.field.expression;if(this.field.expression instanceof C){const Xn=this.field.expression.build();return this.field.expression=new H({kind:"filtered_field",field_reference:{name:Xn.name,path:Xn.path,parameters:Xn.parameters},where:[Me]}),this.field.expression}else throw new Error("This kind of expression does not support addWhere")}static fromReference(f,S,U){return new G({kind:"aggregate",name:U,field:{expression:{kind:"field_reference",name:f,path:S}}})}}a.ASTAggregateViewOperation=G;class O extends e{constructor(f){super(f,{expression:a.ASTExpression.from(f.expression),annotations:f.annotations&&new Y(f.annotations)}),this.node=f}get expression(){return this.children.expression}set expression(f){this.edit(),this.children.expression=f,f.parent=this}get name(){return this.expression.name}get type(){const f=this.expression.fieldType;if(f===void 0)throw new Error("Field expression does not have a type");return f}get annotations(){return this.children.annotations}set annotations(f){this.edit(),this.children.annotations=f}getReference(){if(!(this.expression instanceof F))return this.expression.getReference()}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new Y([]);return this.children.annotations=f,f.parent=this,f}getInheritedTag(f="# "){return xe(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}get segment(){return this.parent.list.segment}getInheritedAnnotations(){return this.expression.getInheritedAnnotations()}}a.ASTField=O,a.ASTExpression={from(z){switch(z.kind){case"field_reference":return new C(z);case"filtered_field":return new H(z);case"time_truncation":return new D(z);case"literal_value":return new F(z);case"moving_average":return new T(z)}}};class C extends e{constructor(f){super(f,{kind:f.kind,name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f,this.kind="field_reference"}get name(){return this.children.name}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get segment(){const f=this.parent;if(f instanceof O)return f.segment;if(f instanceof he||f instanceof K)return f.segment;throw new Error("Invalid expression parent")}get path(){return this.children.path}getReference(){return this.build()}getFieldInfo(){const f=this.segment.getInputSchema(),U=this.parent instanceof K&&this.parent.parent instanceof Z?o.schemaGetDrillField(f,this.name,this.path):o.schemaGet(f,this.name,this.path);if(U.kind!=="dimension"&&U.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return U}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReferenceExpression=C;class D extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),truncation:f.truncation}),this.node=f,this.kind="time_truncation"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get truncation(){return this.children.truncation}set truncation(f){this.edit(),this.children.truncation=f}get name(){return this.fieldReference.name}get field(){return this.parent.as.Field()}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="dimension"&&S.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return S}get fieldType(){const f=this.getFieldInfo();if(f.type.kind==="date_type")return{...f.type,timeframe:J(this.truncation)};if(f.type.kind==="timestamp_type")return{...f.type,timeframe:this.truncation};throw new Error("This type of field cannot have a time truncation")}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTTimeTruncationExpression=D;class F extends e{constructor(f){super(f,{kind:f.kind,literal_value:a.ASTLiteralValue.from(f.literal_value)}),this.node=f,this.kind="time_truncation"}get name(){}get literalValue(){return this.children.literal_value}get fieldType(){return this.literalValue.fieldType}getInheritedAnnotations(){return[]}getFieldInfo(){}}a.ASTLiteralValueExpression=F;class k extends i{constructor(f){super(f,f.map(S=>new c(S)))}}a.ASTFieldReferenceList=k;class T extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),rows_preceding:f.rows_preceding,rows_following:f.rows_following,partition_fields:new k(f.partition_fields||[])}),this.node=f,this.kind="moving_average"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get rowsPreceding(){return this.children.rows_preceding}set rowsPreceding(f){this.edit(),this.children.rows_preceding=f}get rowsFollowing(){return this.children.rows_following}set rowsFollowing(f){this.edit(),this.children.rows_following=f}get name(){return this.fieldReference.name}get field(){return this.parent.as.Field()}get partitionFields(){return this.children.partition_fields}setPartitionFields(f){this.children.partition_fields=new k(f)}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="dimension"&&S.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return S}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTMovingAverageExpression=T;class R extends e{constructor(f){super(f,{filter:a.ASTFilter.from(f.filter)})}get filter(){return this.children.filter}get list(){return this.parent.as.FilterOperationList()}delete(){this.list.remove(this)}}a.ASTFilterOperation=R;class q extends i{constructor(f){super(f,f.map(S=>new R(S)))}get expression(){return this.parent.as.FilteredFieldExpression()}}a.ASTFilterOperationList=q;class H extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),where:new q(f.where)}),this.node=f,this.kind="filtered_field"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get name(){return this.fieldReference.name}get where(){return this.children.where}get field(){return this.parent.as.Field()}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="measure")throw new Error("Invalid field for ASTFilteredFieldExpression");return S}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTFilteredFieldExpression=H;function J(z){switch(z){case"day":case"week":case"month":case"year":case"quarter":return z;default:throw new Error("Invalid date timeframe")}}class M extends e{constructor(f){super(f,{kind:"nest",name:f.name,view:new ae(f.view)}),this.node=f,this.kind="nest"}get view(){return this.children.view}get annotations(){return this.view.annotations}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.view.name;if(S===void 0)throw new Error("Nest does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.view.name===f?this.children.name=void 0:this.children.name=f)}get list(){return this.parent.as.ViewOperationList()}getOrAddAnnotations(){return this.view.getOrAddAnnotations()}getInheritedTag(f="# "){return xe(f,this.view.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}delete(){this.list.remove(this)}rename(f){this.list.segment.renameField(this,f)}getFieldInfo(){return{kind:"view",name:this.name,definition:this.view.build(),schema:this.view.getOutputSchema()}}static fromReference(f,S,U){return new M({kind:"nest",name:U,view:{definition:{kind:"view_reference",name:f,path:S}}})}}a.ASTNestViewOperation=M;class V extends e{constructor(f){super(f,{kind:"where",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="where"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTWhereViewOperation=V;class Z extends e{constructor(f){super(f,{kind:"drill",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="drill"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTDrillViewOperation=Z;class se extends e{constructor(f){super(f,{kind:"having",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="having"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTHavingViewOperation=se;class fe extends e{constructor(f){super(f,{kind:"calculate",field:new O(f.field),name:f.name}),this.node=f,this.kind="calculate"}get expression(){return this.children.field.expression}set expression(f){this.edit(),this.children.field.expression=f,f.parent=this}get name(){return this.node.name}set name(f){this.name!==f&&(this.edit(),this.node.name=f)}getFieldInfo(){return{annotations:[{value:u.Tag.withPrefix("#(malloy) ").set(["calculation"]).toString()}],kind:"calculate",name:this.name,type:this.expression.fieldType}}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTCalculateViewOperation=fe,a.ASTFilter={from(z){switch(z.kind){case"filter_string":return new he(z);case"literal_equality":return new K(z)}},getSegment(z){const f=z.parent;return f instanceof R?f.list.expression.field.segment:f.list.segment}};class he extends e{constructor(f){super(f,{kind:"filter_string",expression:a.ASTExpression.from(f.expression),filter:f.filter}),this.node=f,this.kind="filter_string"}get expression(){return this.children.expression}get filterString(){return this.children.filter}set filterString(f){this.edit(),this.children.filter=f}setFilterString(f){const S=this.getFilterType();_e(this.filterString,S),this.filterString=f}get segment(){return a.ASTFilter.getSegment(this)}getFieldInfo(){const f=this.expression.getFieldInfo();if(f===void 0||f.kind!=="dimension"&&f.kind!=="measure")throw new Error("Invalid field type for filter with filter string");return f}getFilterType(){const f=this.getFieldInfo();return ue(f)}setFilter(f){const S=this.getFilterType();if(S!==f.kind)throw new Error(`Invalid filter: expected type ${S}, got ${f.kind}`);this.filterString=ge(f)}getFilter(){const f=this.getFilterType();return _e(this.filterString,f)}}a.ASTFilterWithFilterString=he;class K extends e{constructor(f){super(f,{kind:"literal_equality",expression:a.ASTExpression.from(f.expression),value:a.ASTLiteralValue.from(f.value)}),this.node=f,this.kind="literal_equality"}get expression(){return this.children.expression}get value(){return this.children.value}get segment(){return a.ASTFilter.getSegment(this)}}a.ASTFilterWithLiteralEquality=K;class ae extends e{constructor(f){super(f,{definition:$.from(f.definition),annotations:f.annotations&&new Y(f.annotations)}),this.node=f}get definition(){return this.children.definition}set definition(f){this.edit(),this.children.definition=f,f.parent=this}get name(){return this.definition.getImplicitName()}getOrAddDefaultSegment(){return this.definition.getOrAddDefaultSegment()}get nest(){return this.parent.as.NestViewOperation()}getInputSchema(){return this.nest.list.segment.getInputSchema()}getOutputSchema(){return this.definition.getRefinementSchema()}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.definition),this.definition.propagateDown(f)}reorderFields(f){this.definition instanceof ce?this.definition.reorderFields(f):this.getOrAddAnnotations().setTagProperty(["field_order"],f)}get annotations(){return this.children.annotations}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new Y([]);return this.children.annotations=f,f.parent=this,f}getInheritedAnnotations(){return this.definition.getInheritedAnnotations()}getInheritedTag(f="# "){return xe(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}}a.ASTView=ae;class de extends e{get limit(){return this.children.limit}set limit(f){de.validateLimit(f),this.edit(),this.children.limit=f}constructor(f){super(f,{kind:f.kind,limit:f.limit}),this.node=f,this.kind="limit"}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}static validateLimit(f){if(!Number.isInteger(f))throw new Error("Limit must be an integer")}}a.ASTLimitViewOperation=de;function Ce(z){switch(z){case"dimension":return"group by";case"measure":return"aggregate";case"view":return"nest";case"join":return"join";case"calculate":return"calculate"}}function Re(z){return z}class Y extends i{constructor(f){super(f,f.map(S=>new re(S)))}get items(){return this.children}getInheritedAnnotations(){return this.parent.getInheritedAnnotations()}getIntrinsicTag(f="# "){return xe(f,this.items)}getTag(f="# "){const S=u.Tag.fromTagLines(this.getInheritedAnnotations().map(U=>U.value)).tag;return xe(f,this.items,S)}get annotations(){return this.children.map(f=>f.node)}setTagProperty(f,S=null,U="# "){let le;for(let me=this.items.length-1;me>=0;me--){const Se=this.index(me);if(Se.hasPrefix(U)&&(le=Se,Se.hasIntrinsicTagProperty(f))){Se.setTagProperty(f,S);return}}le?le.setTagProperty(f,S):this.add(new re({value:new u.Tag({prefix:U}).set(f,S).toString()}))}removeTagProperty(f,S="# "){let U;for(let le=this.items.length-1;le>=0;le--){const me=this.index(le);if(me.hasPrefix(S)&&(U=me,me.hasIntrinsicTagProperty(f))){me.removeTagProperty(f);return}}U?U.removeTagProperty(f):this.add(new re({value:new u.Tag({prefix:S}).unset(...f).toString()}))}}a.ASTAnnotationList=Y;class re extends e{get value(){return this.children.value}set value(f){this.edit(),this.children.value=f}constructor(f){super(f,{value:f.value}),this.node=f}get list(){return this.parent.as.AnnotationList()}get index(){return this.list.indexOf(this)}delete(){this.list.remove(this)}getIntrinsicTag(){var f;return(f=u.Tag.fromTagLines([this.value]).tag)!==null&&f!==void 0?f:new u.Tag}getTag(){var f,S;const U=this.index===0?(f=u.Tag.fromTagLines(this.list.getInheritedAnnotations().map(le=>le.value)).tag)!==null&&f!==void 0?f:new u.Tag:this.list.index(this.index-1).getTag();return(S=u.Tag.fromTagLines([this.value],U).tag)!==null&&S!==void 0?S:new u.Tag}hasPrefix(f){return this.value.startsWith(f)}hasIntrinsicTagProperty(f){return this.getIntrinsicTag().has(...f)}setTagProperty(f,S){this.value=this.getIntrinsicTag().set(f,S).toString()}removeTagProperty(f){this.value=this.getTag().unset(...f).toString()}}a.ASTAnnotation=re;function xe(z,f=[],S){var U;const me=f.map(Se=>Se.value).filter(Se=>typeof z=="string"?Se.startsWith(z):Se.match(z));return(U=u.Tag.fromTagLines(me,S).tag)!==null&&U!==void 0?U:new u.Tag}function ge(z){switch(z.kind){case"string":return r.StringFilterExpression.unparse(z.parsed);case"number":return r.NumberFilterExpression.unparse(z.parsed);case"boolean":return r.BooleanFilterExpression.unparse(z.parsed);case"timestamp":case"date":return r.TemporalFilterExpression.unparse(z.parsed)}}function _e(z,f){function S(U){const le=U.filter(me=>me.severity==="error");if(le.length!==0)throw new Error(`Invalid Malloy filter string: ${le[0].message}`)}switch(f){case"string":{const U=r.StringFilterExpression.parse(z);return S(U.log),{kind:f,parsed:U.parsed}}case"number":{const U=r.NumberFilterExpression.parse(z);return S(U.log),{kind:f,parsed:U.parsed}}case"boolean":{const U=r.BooleanFilterExpression.parse(z);return S(U.log),{kind:f,parsed:U.parsed}}case"timestamp":case"date":{const U=r.TemporalFilterExpression.parse(z);return S(U.log),{kind:f,parsed:U.parsed}}case"other":throw new Error("Not implemented")}}function be(z){return"kind"in z?z:{...z,kind:"source"}}function Te(z){switch(z){case"year":case"quarter":case"month":case"week":case"day":return!0;default:return!1}}function De(z,f){return z.toString().padStart(f,"0")}function Pe(z){const f=De(z.getUTCFullYear(),4),S=De(z.getUTCMonth()+1,2),U=De(z.getUTCDate(),2),le=De(z.getUTCHours(),2),me=De(z.getUTCMinutes(),2),Se=De(z.getUTCSeconds(),2);return`${f}-${S}-${U} ${le}:${me}:${Se}`}function Le(z,f){const S=z??[],U=f??[];return S.length===U.length&&S.every((le,me)=>le===U[me])}function ue(z){switch(z.type.kind){case"string_type":return"string";case"boolean_type":return"boolean";case"number_type":return"number";case"date_type":return"date";case"timestamp_type":return"timestamp";default:return"other"}}function ve(z,f){if(z.kind!=="dimension"&&z.kind!=="measure")throw new Error(`Cannot filter by field of type ${z.kind}`);const S=ue(z);if(typeof f=="string")_e(f,S);else if(f.kind!==S)throw new Error(`Invalid filter for field ${z.name}; expected type ${S}, but got ${f.kind}`)}function Ee(z){if(z instanceof P)return z.getSourceInfo().schema;if(z instanceof j)throw new Error("unimplemented");return z.getInputSchema()}})(xr)),xr}var F0;function _d(){return F0||(F0=1,(function(a){var d=In&&In.__createBinding||(Object.create?(function(m,h,u,r){r===void 0&&(r=u);var o=Object.getOwnPropertyDescriptor(h,u);(!o||("get"in o?!h.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return h[u]}}),Object.defineProperty(m,r,o)}):(function(m,h,u,r){r===void 0&&(r=u),m[r]=h[u]})),y=In&&In.__exportStar||function(m,h){for(var u in m)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,m,u)};Object.defineProperty(a,"__esModule",{value:!0}),y(gd(),a)})(In)),In}var kp=_d();const Ad=Mp(kp),uy=qp({__proto__:null,default:Ad},[kp]);export{zx as a,Hx as b,Ve as c,Jx as d,po as e,br as f,co as g,Tr as h,uy as i,ut as j,lt as k,io as l,ho as m,$i as n,st as o,qi as p,Ar as q,jp as r,Ie as s,nd as t,Ba as u,La as v,kp as w};
676
+ `)},w.prototype.clone=function(){return new w(this.states,this.state)},w.prototype.has=function(L){return!0},{compile:A,states:N,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:b}})})(Ji)),Ji.exports}var je={},S0;function xo(){if(S0)return je;S0=1,Object.defineProperty(je,"__esModule",{value:!0}),je.maybeNot=d,je.unescape=y,je.escape=m,je.matchOp=u,je.conjoin=o,je.joinNumbers=t,je.mkRange=i,je.mkValues=e,je.numNot=s,je.temporalNot=l,je.joinTemporal=c,je.timeLiteral=p,je.mkUnits=v;const a=Qn();function d(x){const[g,_]=x;return g&&_&&(0,a.isStringFilter)(_)?{..._,not:!0}:_}function y(x){return x.replace(/\\(.)/g,"$1")}function m(x){const g=x.toLowerCase();return g==="null"||g==="empty"?"\\"+x:x.replace(/([,; |()\\%_-])/g,"\\$1")}function h(x){let g=!1,_=!1,A=0,E=!1;const N=x.length;for(let b=0;b<N;b+=1){const w=x[b];if(w===" "||w===" "){A+=1;continue}A=0,w==="%"?(E=!0,b===0&&(g=!0),_=!0):(_=!1,w==="\\"?b+=1:w==="_"&&(E=!0))}return{hasLike:E,percentEnd:_&&N>1,percentStart:g&&N>1,endSpace:A}}function u(x){let g=x.trimStart();const{hasLike:_,percentEnd:A,percentStart:E,endSpace:N}=h(g);if(N>0&&(g=g.slice(0,-N)),_){if(E&&A){const b=g.slice(1,-1);if(!h(b).hasLike&&b.length>0)return{operator:"contains",values:[y(b)]}}else if(A){const b=g.slice(0,-1);if(!h(b).hasLike)return{operator:"starts",values:[y(b)]}}else if(E){const b=g.slice(1);if(!h(b).hasLike)return{operator:"ends",values:[y(b)]}}return{operator:"~",escaped_values:[g]}}return g.toLowerCase()==="null"?{operator:"null"}:g.toLowerCase()==="empty"?{operator:"empty"}:{operator:"=",values:[y(g)]}}function r(x,g){var _,A;return x.operator===g.operator&&((_=x.not)!==null&&_!==void 0?_:!1)===((A=g.not)!==null&&A!==void 0?A:!1)}function o(x,g,_){if(g=g.toLowerCase(),(0,a.isStringFilter)(x)&&(0,a.isStringFilter)(_)){if(g===","){if(x.operator==="~"&&r(x,_))return{...x,escaped_values:[...x.escaped_values,..._.escaped_values]};if((0,a.isStringCondition)(x)&&r(x,_))return{...x,values:[...x.values,..._.values]}}const A=g===","?",":g==="|"?"or":g===";"?"and":void 0;if(A)return x.operator===A?{...x,members:[...x.members,_]}:{operator:A,members:[x,_]}}return null}function t(x,g,_){if(g=g.toLowerCase(),(0,a.isNumberFilter)(x)&&(0,a.isNumberFilter)(_)){if(g==="or"&&x.operator==="="&&r(x,_)){const A={operator:"=",values:[...x.values,..._.values]};return x.not&&(A.not=!0),A}if(g==="and"||g==="or")return x.operator===g?{...x,members:[...x.members,_]}:{operator:g,members:[x,_]}}return null}function i(x,g,_,A){return{operator:"range",startValue:g,startOperator:x==="("?">":">=",endValue:_,endOperator:A===")"?"<":"<="}}function e(x,g){return{values:[x,...g]}}function s(x,g){return(0,a.isNumberFilter)(x)&&g?x.operator==="="?{operator:"!=",values:x.values}:x.operator==="!="?{operator:"=",values:x.values}:{...x,not:!0}:x}function l(x,g){return(0,a.isTemporalFilter)(x)&&g?{...x,not:!0}:x}function c(x,g,_){return g=g.toLowerCase(),(0,a.isTemporalFilter)(x)&&(0,a.isTemporalFilter)(_)&&(g==="and"||g==="or")?x.operator===g?{...x,members:[...x.members,_]}:{operator:g,members:[x,_]}:null}function p(x,g){const _={moment:"literal",literal:x};return g&&(_.units=g),_}function v(x){switch(x.toLowerCase()){case"second":case"seconds":return"second";case"minute":case"minutes":return"minute";case"hour":case"hours":return"hour";case"day":case"days":return"day";case"week":case"weeks":return"week";case"month":case"months":return"month";case"quarter":case"quarters":return"quarter";case"year":case"years":return"year"}}return je}var T0;function fd(){if(T0)return qn;T0=1;var a=qn&&qn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qn,"__esModule",{value:!0});function d(t){return t[0]}const y=a(Ba()),m=xo(),h=y.default.keywords({AND:"and",OR:"or",NOT:"not",NULL_KW:"null",TO:"to"}),u=y.default.compile({WS:/[ \t]+/,id:{match:/[a-zA-Z]+/,type:t=>h(t.toLowerCase())},oparen:"(",cparen:")",obrack:"[",cbrack:"]",comma:",",op:/<=|>=|<|>/,ne:"!=",eq:"=",float:/-?(?:\d+)?\.\d+(?:[Ee][+-]?\d+)?/,numberE:/-?\d+[Ee][+-]?\d+/,integer:/-?\d+/}),r=u.next;u.next=(t=>()=>{for(;;){const i=t.call(u);if(i===void 0||i.type!=="WS")return i}})(r);const o={Lexer:u,ParserRules:[{name:"numberFilter",symbols:["numberFilter","conjunction","numberUnary"],postprocess:([t,i,e])=>(0,m.joinNumbers)(t,i[0].text,e)},{name:"numberFilter",symbols:["numberUnary"],postprocess:t=>t[0]},{name:"numberUnary$ebnf$1",symbols:[u.has("NOT")?{type:"NOT"}:NOT],postprocess:d},{name:"numberUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"numberUnary",symbols:["numberUnary$ebnf$1","clause"],postprocess:([t,i])=>(0,m.numNot)(i,t)},{name:"clause",symbols:[u.has("NULL_KW")?{type:"NULL_KW"}:NULL_KW],postprocess:()=>({operator:"null"})},{name:"clause$ebnf$1",symbols:[]},{name:"clause$ebnf$1",symbols:["clause$ebnf$1","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:["N","clause$ebnf$1"],postprocess:([t,i])=>({operator:"=",...(0,m.mkValues)(t,i)})},{name:"clause$ebnf$2",symbols:[]},{name:"clause$ebnf$2",symbols:["clause$ebnf$2","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:[u.has("eq")?{type:"eq"}:eq,"N","clause$ebnf$2"],postprocess:([t,i,e])=>({operator:"=",...(0,m.mkValues)(i,e)})},{name:"clause$ebnf$3",symbols:[]},{name:"clause$ebnf$3",symbols:["clause$ebnf$3","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:[u.has("ne")?{type:"ne"}:ne,"N","clause$ebnf$3"],postprocess:([t,i,e])=>({operator:"!=",...(0,m.mkValues)(i,e)})},{name:"clause",symbols:[u.has("op")?{type:"op"}:op,"N"],postprocess:([t,i])=>({operator:t.text,values:[i]})},{name:"clause",symbols:[u.has("oparen")?{type:"oparen"}:oparen,"numberFilter",u.has("cparen")?{type:"cparen"}:cparen],postprocess:([t,i,e])=>({operator:"()",expr:i})},{name:"clause",symbols:["openInterval","N",u.has("TO")?{type:"TO"}:TO,"N","closeInterval"],postprocess:([t,i,e,s,l])=>(0,m.mkRange)(t[0].text,i,s,l[0].text)},{name:"numberList",symbols:[u.has("comma")?{type:"comma"}:comma,"N"],postprocess:([t,i])=>i},{name:"closeInterval",symbols:[u.has("cbrack")?{type:"cbrack"}:cbrack]},{name:"closeInterval",symbols:[u.has("cparen")?{type:"cparen"}:cparen]},{name:"openInterval",symbols:[u.has("obrack")?{type:"obrack"}:obrack]},{name:"openInterval",symbols:[u.has("oparen")?{type:"oparen"}:oparen]},{name:"N$subexpression$1",symbols:[u.has("float")?{type:"float"}:float]},{name:"N$subexpression$1",symbols:[u.has("numberE")?{type:"numberE"}:numberE]},{name:"N$subexpression$1",symbols:[u.has("integer")?{type:"integer"}:integer]},{name:"N",symbols:["N$subexpression$1"],postprocess:([t])=>t[0].text},{name:"conjunction",symbols:[u.has("OR")?{type:"OR"}:OR]},{name:"conjunction",symbols:[u.has("AND")?{type:"AND"}:AND]}],ParserStart:"numberFilter"};return qn.default=o,qn}var Hi={},b0;function ka(){if(b0)return Hi;b0=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.run_parser=d;const a=Qn();function d(y,m){try{m.feed(y);const u=m.finish()[0];return(0,a.isFilterExpression)(u)?{parsed:u,log:[]}:{parsed:null,log:[]}}catch(h){let u=h.message,r=1,o=y.length;if(h.token){const t=h.token;r=t.col,o=t.text.length;const e=h.message.match(/(?<=A ).*(?= based on:)/g).map(s=>s.replace(/\s+token/i,""));u=`Unexpected ${t.type} token "${t.value}"`,e&&e.length&&(u+=` Tokens expected: ${[...new Set(e)]}`)}return{parsed:null,log:[{message:u,startIndex:r-1,endIndex:r-1+o-1,severity:"error"}]}}}return Hi}var N0;function pd(){return N0||(N0=1,(function(a){var d=tt&&tt.__createBinding||(Object.create?(function(i,e,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(e,s);(!c||("get"in c?!e.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(i,l,c)}):(function(i,e,s,l){l===void 0&&(l=s),i[l]=e[s]})),y=tt&&tt.__setModuleDefault||(Object.create?(function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}):function(i,e){i.default=e}),m=tt&&tt.__importStar||(function(){var i=function(e){return i=Object.getOwnPropertyNames||function(s){var l=[];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[l.length]=c);return l},i(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var l=i(e),c=0;c<l.length;c++)l[c]!=="default"&&d(s,e,l[c]);return y(s,e),s}})(),h=tt&&tt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(a,"__esModule",{value:!0}),a.NumberFilterExpression=void 0;const u=Qn(),r=m(La()),o=h(fd()),t=ka();a.NumberFilterExpression={parse(i){if(i.match(/^\s*$/))return{parsed:null,log:[]};const e=new r.Parser(r.Grammar.fromCompiled(o.default)),s=(0,t.run_parser)(i,e);return s.parsed&&(0,u.isNumberFilter)(s.parsed)?{parsed:s.parsed,log:[]}:{parsed:null,log:s.log}},unparse(i){if(i===null)return"";switch(i.operator){case"=":return i.values.join(", ");case"!=":return"!= "+i.values.join(", ");case">":case"<":case"<=":case">=":return i.not?i.values.map(e=>i.operator==="="?`not ${e}`:`not ${i.operator} ${e}`).join(", "):i.values.map(e=>`${i.operator} ${e}`).join(", ");case"range":{const e=i.startOperator===">"?"(":"[",s=i.endOperator==="<"?")":"]",l=`${e}${i.startValue} to ${i.endValue}${s}`;return i.not?`not ${l}`:l}case"null":return i.not?"not null":"null";case"and":case"or":return i.members.map(e=>a.NumberFilterExpression.unparse(e)).join(` ${i.operator} `);case"()":{const e="("+a.NumberFilterExpression.unparse(i.expr)+")";return i.not?"not "+e:e}}return`no unparse for ${JSON.stringify(i)}`}}})(tt)),tt}var rt={},jn={},C0;function hd(){if(C0)return jn;C0=1;var a=jn&&jn.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(jn,"__esModule",{value:!0});function d(o){return o[0]}const y=a(Ba()),m=xo(),h=y.default.compile({WS:/[ \t]+/,comma:",",semi:";",or:"|",open:"(",close:")",minus:"-",matchStr:/(?:\\[^\n]|[^\n,;()|])+/}),u=h.next;h.next=(o=>()=>{for(;;){const t=o.call(h);if(t==null||t.type!=="WS")return t}})(u);const r={Lexer:h,ParserRules:[{name:"stringFilter",symbols:["stringFilter","conjunction","sfUnary"],postprocess:([o,t,i])=>(0,m.conjoin)(o,t[0].text,i)},{name:"stringFilter",symbols:["sfUnary"],postprocess:o=>o[0]},{name:"sfUnary$ebnf$1",symbols:[h.has("minus")?{type:"minus"}:minus],postprocess:d},{name:"sfUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"sfUnary",symbols:["sfUnary$ebnf$1","clause"],postprocess:o=>(0,m.maybeNot)(o)},{name:"parens",symbols:[h.has("open")?{type:"open"}:open,"stringFilter",h.has("close")?{type:"close"}:close],postprocess:([o,t,i])=>({operator:"()",expr:t})},{name:"clause",symbols:[h.has("matchStr")?{type:"matchStr"}:matchStr],postprocess:([o])=>(0,m.matchOp)(o.text)},{name:"clause",symbols:["parens"],postprocess:o=>o[0]},{name:"conjunction",symbols:[h.has("comma")?{type:"comma"}:comma]},{name:"conjunction",symbols:[h.has("semi")?{type:"semi"}:semi]},{name:"conjunction",symbols:[h.has("or")?{type:"or"}:or]}],ParserStart:"stringFilter"};return jn.default=r,jn}var O0;function xd(){return O0||(O0=1,(function(a){var d=rt&&rt.__createBinding||(Object.create?(function(e,s,l,c){c===void 0&&(c=l);var p=Object.getOwnPropertyDescriptor(s,l);(!p||("get"in p?!s.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(e,c,p)}):(function(e,s,l,c){c===void 0&&(c=l),e[c]=s[l]})),y=rt&&rt.__setModuleDefault||(Object.create?(function(e,s){Object.defineProperty(e,"default",{enumerable:!0,value:s})}):function(e,s){e.default=s}),m=rt&&rt.__importStar||(function(){var e=function(s){return e=Object.getOwnPropertyNames||function(l){var c=[];for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(c[c.length]=p);return c},e(s)};return function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var c=e(s),p=0;p<c.length;p++)c[p]!=="default"&&d(l,s,c[p]);return y(l,s),l}})(),h=rt&&rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.StringFilterExpression=void 0;const u=Qn(),r=m(La()),o=h(hd()),t=xo(),i=ka();a.StringFilterExpression={parse(e){if(e.match(/^\s*$/))return{parsed:null,log:[]};const s=new r.Parser(r.Grammar.fromCompiled(o.default)),l=(0,i.run_parser)(e,s);return l.parsed&&(0,u.isStringFilter)(l.parsed)?{parsed:l.parsed,log:[]}:{parsed:null,log:l.log}},unparse(e){if(e===null)return"";switch(e.operator){case"=":return e.not?e.values.map(s=>"-"+(0,t.escape)(s)).join(", "):e.values.map(s=>(0,t.escape)(s)).join(", ");case"~":return e.not?e.escaped_values.map(s=>"-"+s).join(", "):e.escaped_values.join(", ");case"starts":return e.not?e.values.map(s=>"-"+(0,t.escape)(s)+"%").join(", "):e.values.map(s=>(0,t.escape)(s)+"%").join(", ");case"ends":return e.not?e.values.map(s=>"-%"+(0,t.escape)(s)).join(", "):e.values.map(s=>"%"+(0,t.escape)(s)).join(", ");case"contains":return e.not?e.values.map(s=>"-%"+(0,t.escape)(s)+"%").join(", "):e.values.map(s=>"%"+(0,t.escape)(s)+"%").join(", ");case"or":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join(" | ");case"and":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join("; ");case",":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join(", ");case"()":{const s="("+a.StringFilterExpression.unparse(e.expr)+")";return e.not?"-"+s:s}case"null":return e.not?"-null":"null";case"empty":return e.not?"-empty":"empty"}}}})(rt)),rt}var nt={},$n={},D0;function dd(){if(D0)return $n;D0=1;var a=$n&&$n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($n,"__esModule",{value:!0});function d(t){return t[0]}const y=a(Ba()),m=xo(),h=y.default.keywords({AND:"and",OR:"or",NOT:"not",NULL_KW:"null",TO:"to",NOW:"now",LAST:"last",THIS:"this",NEXT:"next",AGO:"ago",FROM:"from",BEFORE:"before",AFTER:"after",THROUGH:"through",STARTING:"starting",FOR:"for",TODAY:"today",YESTERDAY:"yesterday",TOMORROW:"tomorrow",SECOND:"second",MINUTE:"minute",HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",QUARTER:"quarter",YEAR:"year",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days",WEEKS:"weeks",MONTHS:"months",QUARTERS:"quarters",YEARS:"years",MONDAY:"monday",TUESDAY:"tuesday",WEDNESDAY:"wednesday",THURSDAY:"thursday",FRIDAY:"friday",SATURDAY:"saturday",SUNDAY:"sunday"}),u=y.default.compile({WS:/[ \t]+/,id:{match:/[a-zA-Z]+/,type:t=>h(t.toLowerCase())},oparen:"(",cparen:")",comma:",",literal:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d:\d\d(?::\d\d(?:[.,]\d*)?)/,lit_week:/\d\d\d\d-\d\d-\d\d-[Ww][Kk]/,lit_quarter:/\d\d\d\d-[qQ][1234]/,lit_min:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d:\d\d/,lit_hour:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d/,lit_day:/\d\d\d\d-\d\d-\d\d/,lit_month:/\d\d\d\d-\d\d/,lit_year:/\d\d\d\d/,n:/\d+/}),r=u.next;u.next=(t=>()=>{for(;;){const i=t.call(u);if(i===void 0||i.type!=="WS")return i}})(r);const o={Lexer:u,ParserRules:[{name:"temporalFilter",symbols:["temporalFilter","conjunction","temporalUnary"],postprocess:([t,i,e])=>(0,m.joinTemporal)(t,i[0].text,e)},{name:"temporalFilter",symbols:["temporalUnary"],postprocess:t=>t[0]},{name:"temporalUnary$ebnf$1",symbols:[u.has("NOT")?{type:"NOT"}:NOT],postprocess:d},{name:"temporalUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"temporalUnary",symbols:["temporalUnary$ebnf$1","clause"],postprocess:([t,i])=>(0,m.temporalNot)(i,t)},{name:"duration",symbols:["number","unit"],postprocess:([t,i])=>({units:i,n:t})},{name:"number",symbols:[u.has("n")?{type:"n"}:n],postprocess:([t])=>t.text},{name:"number",symbols:[u.has("lityear")?{type:"lityear"}:lityear],postprocess:([t])=>t.text},{name:"unit$subexpression$1",symbols:[u.has("SECOND")?{type:"SECOND"}:SECOND]},{name:"unit$subexpression$1",symbols:[u.has("MINUTE")?{type:"MINUTE"}:MINUTE]},{name:"unit$subexpression$1",symbols:[u.has("HOUR")?{type:"HOUR"}:HOUR]},{name:"unit$subexpression$1",symbols:[u.has("DAY")?{type:"DAY"}:DAY]},{name:"unit$subexpression$1",symbols:[u.has("WEEK")?{type:"WEEK"}:WEEK]},{name:"unit$subexpression$1",symbols:[u.has("MONTH")?{type:"MONTH"}:MONTH]},{name:"unit$subexpression$1",symbols:[u.has("QUARTER")?{type:"QUARTER"}:QUARTER]},{name:"unit$subexpression$1",symbols:[u.has("YEAR")?{type:"YEAR"}:YEAR]},{name:"unit$subexpression$1",symbols:[u.has("SECONDS")?{type:"SECONDS"}:SECONDS]},{name:"unit$subexpression$1",symbols:[u.has("MINUTES")?{type:"MINUTES"}:MINUTES]},{name:"unit$subexpression$1",symbols:[u.has("HOURS")?{type:"HOURS"}:HOURS]},{name:"unit$subexpression$1",symbols:[u.has("DAYS")?{type:"DAYS"}:DAYS]},{name:"unit$subexpression$1",symbols:[u.has("WEEKS")?{type:"WEEKS"}:WEEKS]},{name:"unit$subexpression$1",symbols:[u.has("MONTHS")?{type:"MONTHS"}:MONTHS]},{name:"unit$subexpression$1",symbols:[u.has("QUARTERS")?{type:"QUARTERS"}:QUARTERS]},{name:"unit$subexpression$1",symbols:[u.has("YEARS")?{type:"YEARS"}:YEARS]},{name:"unit",symbols:["unit$subexpression$1"],postprocess:([t])=>(0,m.mkUnits)(t[0].text)},{name:"clause",symbols:[u.has("NULL_KW")?{type:"NULL_KW"}:NULL_KW],postprocess:()=>({operator:"null"})},{name:"clause",symbols:["parens"],postprocess:t=>t[0]},{name:"clause",symbols:["duration"],postprocess:([t])=>({operator:"in_last",...t})},{name:"clause",symbols:[u.has("BEFORE")?{type:"BEFORE"}:BEFORE,"moment"],postprocess:([t,i])=>({operator:"before",before:i})},{name:"clause",symbols:[u.has("STARTING")?{type:"STARTING"}:STARTING,"moment"],postprocess:([t,i])=>({operator:"before",before:i,not:!0})},{name:"clause",symbols:[u.has("AFTER")?{type:"AFTER"}:AFTER,"moment"],postprocess:([t,i])=>({operator:"after",after:i})},{name:"clause",symbols:[u.has("THROUGH")?{type:"THROUGH"}:THROUGH,"moment"],postprocess:([t,i])=>({operator:"after",after:i,not:!0})},{name:"clause",symbols:["moment",u.has("TO")?{type:"TO"}:TO,"moment"],postprocess:([t,i,e])=>({operator:"to",fromMoment:t,toMoment:e})},{name:"clause",symbols:["moment",u.has("FOR")?{type:"FOR"}:FOR,"duration"],postprocess:([t,i,e])=>({...e,operator:"for",begin:t})},{name:"clause$subexpression$1",symbols:[u.has("LAST")?{type:"LAST"}:LAST]},{name:"clause$subexpression$1",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT]},{name:"clause",symbols:["clause$subexpression$1","duration"],postprocess:([t,i])=>({operator:t[0].text,...i})},{name:"clause",symbols:["moment"],postprocess:([t])=>({operator:"in",in:t})},{name:"lastNextThis",symbols:[u.has("THIS")?{type:"THIS"}:THIS],postprocess:([t])=>t.text.toLowerCase()},{name:"lastNextThis",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT],postprocess:([t])=>t.text.toLowerCase()},{name:"lastNextThis",symbols:[u.has("LAST")?{type:"LAST"}:LAST],postprocess:([t])=>t.text.toLowerCase()},{name:"moment",symbols:[u.has("NOW")?{type:"NOW"}:NOW],postprocess:()=>({moment:"now"})},{name:"moment",symbols:["lastNextThis","unit"],postprocess:([t,i])=>({moment:t,units:i})},{name:"moment",symbols:[u.has("TODAY")?{type:"TODAY"}:TODAY],postprocess:()=>({moment:"today"})},{name:"moment",symbols:[u.has("YESTERDAY")?{type:"YESTERDAY"}:YESTERDAY],postprocess:()=>({moment:"yesterday"})},{name:"moment",symbols:[u.has("TOMORROW")?{type:"TOMORROW"}:TOMORROW],postprocess:()=>({moment:"tomorrow"})},{name:"moment",symbols:["duration",u.has("AGO")?{type:"AGO"}:AGO],postprocess:([t,i])=>({moment:"ago",...t})},{name:"moment",symbols:["duration",u.has("FROM")?{type:"FROM"}:FROM,u.has("NOW")?{type:"NOW"}:NOW],postprocess:([t,i])=>({moment:"from_now",...t})},{name:"moment",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT,"weekday"],postprocess:([t,i])=>({moment:i.toLowerCase(),which:"next"})},{name:"moment",symbols:[u.has("LAST")?{type:"LAST"}:LAST,"weekday"],postprocess:([t,i])=>({moment:i.toLowerCase(),which:"last"})},{name:"moment",symbols:["weekday"],postprocess:([t])=>({moment:t.toLowerCase(),which:"last"})},{name:"moment",symbols:["timeLiteral"],postprocess:t=>t[0]},{name:"timeLiteral",symbols:[u.has("literal")?{type:"literal"}:literal],postprocess:([t])=>(0,m.timeLiteral)(t.text)},{name:"timeLiteral",symbols:[u.has("lit_day")?{type:"lit_day"}:lit_day],postprocess:([t])=>(0,m.timeLiteral)(t.text,"day")},{name:"timeLiteral",symbols:[u.has("lit_min")?{type:"lit_min"}:lit_min],postprocess:([t])=>(0,m.timeLiteral)(t.text,"minute")},{name:"timeLiteral",symbols:[u.has("lit_hour")?{type:"lit_hour"}:lit_hour],postprocess:([t])=>(0,m.timeLiteral)(t.text,"hour")},{name:"timeLiteral",symbols:[u.has("lit_month")?{type:"lit_month"}:lit_month],postprocess:([t])=>(0,m.timeLiteral)(t.text,"month")},{name:"timeLiteral",symbols:[u.has("lit_quarter")?{type:"lit_quarter"}:lit_quarter],postprocess:([t])=>(0,m.timeLiteral)(t.text,"quarter")},{name:"timeLiteral",symbols:[u.has("lit_week")?{type:"lit_week"}:lit_week],postprocess:([t])=>(0,m.timeLiteral)(t.text,"week")},{name:"timeLiteral",symbols:[u.has("lit_year")?{type:"lit_year"}:lit_year],postprocess:([t])=>(0,m.timeLiteral)(t.text,"year")},{name:"weekday$subexpression$1",symbols:[u.has("MONDAY")?{type:"MONDAY"}:MONDAY]},{name:"weekday$subexpression$1",symbols:[u.has("TUESDAY")?{type:"TUESDAY"}:TUESDAY]},{name:"weekday$subexpression$1",symbols:[u.has("WEDNESDAY")?{type:"WEDNESDAY"}:WEDNESDAY]},{name:"weekday$subexpression$1",symbols:[u.has("THURSDAY")?{type:"THURSDAY"}:THURSDAY]},{name:"weekday$subexpression$1",symbols:[u.has("FRIDAY")?{type:"FRIDAY"}:FRIDAY]},{name:"weekday$subexpression$1",symbols:[u.has("SATURDAY")?{type:"SATURDAY"}:SATURDAY]},{name:"weekday$subexpression$1",symbols:[u.has("SUNDAY")?{type:"SUNDAY"}:SUNDAY]},{name:"weekday",symbols:["weekday$subexpression$1"],postprocess:([t])=>t[0].text},{name:"parens",symbols:[u.has("oparen")?{type:"oparen"}:oparen,"temporalFilter",u.has("cparen")?{type:"cparen"}:cparen],postprocess:([t,i,e])=>({operator:"()",expr:i})},{name:"conjunction",symbols:[u.has("OR")?{type:"OR"}:OR]},{name:"conjunction",symbols:[u.has("AND")?{type:"AND"}:AND]}],ParserStart:"temporalFilter"};return $n.default=o,$n}var w0;function md(){return w0||(w0=1,(function(a){var d=nt&&nt.__createBinding||(Object.create?(function(l,c,p,v){v===void 0&&(v=p);var x=Object.getOwnPropertyDescriptor(c,p);(!x||("get"in x?!c.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return c[p]}}),Object.defineProperty(l,v,x)}):(function(l,c,p,v){v===void 0&&(v=p),l[v]=c[p]})),y=nt&&nt.__setModuleDefault||(Object.create?(function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}):function(l,c){l.default=c}),m=nt&&nt.__importStar||(function(){var l=function(c){return l=Object.getOwnPropertyNames||function(p){var v=[];for(var x in p)Object.prototype.hasOwnProperty.call(p,x)&&(v[v.length]=x);return v},l(c)};return function(c){if(c&&c.__esModule)return c;var p={};if(c!=null)for(var v=l(c),x=0;x<v.length;x++)v[x]!=="default"&&d(p,c,v[x]);return y(p,c),p}})(),h=nt&&nt.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(a,"__esModule",{value:!0}),a.TemporalFilterExpression=void 0;const u=Qn(),r=h(dd()),o=m(La()),t=ka();a.TemporalFilterExpression={parse(l){if(l.match(/^\s*$/))return{parsed:null,log:[]};const c=new o.Parser(o.Grammar.fromCompiled(r.default)),p=(0,t.run_parser)(l,c);return p.parsed&&(0,u.isTemporalFilter)(p.parsed)?{parsed:p.parsed,log:[]}:{parsed:null,log:p.log}},unparse(l){if(l===null)return"";switch(l.operator){case"null":return i(l,"null");case"in":return i(l,s(l.in));case"()":return"("+a.TemporalFilterExpression.unparse(l.expr)+")";case"in_last":return i(l,e(l));case"last":case"next":return i(l,`${l.operator} ${e(l)}`);case"before":return`${l.not?"starting":"before"} ${s(l.before)}`;case"after":return`${l.not?"through":"after"} ${s(l.after)}`;case"to":return i(l,`${s(l.fromMoment)} to ${s(l.toMoment)}`);case"for":return i(l,`${s(l.begin)} for ${e(l)}`);case"or":return l.members.map(c=>a.TemporalFilterExpression.unparse(c)).join(" or ");case"and":return l.members.map(c=>a.TemporalFilterExpression.unparse(c)).join(" and ")}}};function i(l,c){return"not"in l&&l.not?"not "+c:c}function e(l){return l.n==="1"?`1 ${l.units}`:`${l.n} ${l.units}s`}function s(l){switch(l.moment){case"literal":return l.literal;case"now":case"today":case"yesterday":case"tomorrow":return l.moment;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return l.which==="next"?"next "+l.moment:l.moment;case"this":case"next":case"last":return`${l.moment} ${l.units}`;case"ago":return`${e(l)} ago`;case"from_now":return`${e(l)} from now`}}})(nt)),nt}var R0;function yd(){return R0||(R0=1,(function(a){var d=Ln&&Ln.__createBinding||(Object.create?(function(o,t,i,e){e===void 0&&(e=i);var s=Object.getOwnPropertyDescriptor(t,i);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(o,e,s)}):(function(o,t,i,e){e===void 0&&(e=i),o[e]=t[i]})),y=Ln&&Ln.__exportStar||function(o,t){for(var i in o)i!=="default"&&!Object.prototype.hasOwnProperty.call(t,i)&&d(t,o,i)};Object.defineProperty(a,"__esModule",{value:!0}),a.TemporalFilterExpression=a.StringFilterExpression=a.NumberFilterExpression=a.BooleanFilterExpression=void 0,y(Qn(),a);var m=ud();Object.defineProperty(a,"BooleanFilterExpression",{enumerable:!0,get:function(){return m.BooleanFilterExpression}});var h=pd();Object.defineProperty(a,"NumberFilterExpression",{enumerable:!0,get:function(){return h.NumberFilterExpression}});var u=xd();Object.defineProperty(a,"StringFilterExpression",{enumerable:!0,get:function(){return u.StringFilterExpression}});var r=md();Object.defineProperty(a,"TemporalFilterExpression",{enumerable:!0,get:function(){return r.TemporalFilterExpression}})})(Ln)),Ln}var P0;function gd(){return P0||(P0=1,(function(a){var d=xr&&xr.__createBinding||(Object.create?(function(z,f,S,U){U===void 0&&(U=S);var le=Object.getOwnPropertyDescriptor(f,S);(!le||("get"in le?!f.__esModule:le.writable||le.configurable))&&(le={enumerable:!0,get:function(){return f[S]}}),Object.defineProperty(z,U,le)}):(function(z,f,S,U){U===void 0&&(U=S),z[U]=f[S]})),y=xr&&xr.__setModuleDefault||(Object.create?(function(z,f){Object.defineProperty(z,"default",{enumerable:!0,value:f})}):function(z,f){z.default=f}),m=xr&&xr.__importStar||(function(){var z=function(f){return z=Object.getOwnPropertyNames||function(S){var U=[];for(var le in S)Object.prototype.hasOwnProperty.call(S,le)&&(U[U.length]=le);return U},z(f)};return function(f){if(f&&f.__esModule)return f;var S={};if(f!=null)for(var U=z(f),le=0;le<U.length;le++)U[le]!=="default"&&d(S,f,U[le]);return y(S,f),S}})();Object.defineProperty(a,"__esModule",{value:!0}),a.ASTAnnotationList=a.ASTLimitViewOperation=a.ASTView=a.ASTFilterWithLiteralEquality=a.ASTFilterWithFilterString=a.ASTFilter=a.ASTCalculateViewOperation=a.ASTHavingViewOperation=a.ASTDrillViewOperation=a.ASTWhereViewOperation=a.ASTNestViewOperation=a.ASTFilteredFieldExpression=a.ASTFilterOperationList=a.ASTFilterOperation=a.ASTMovingAverageExpression=a.ASTFieldReferenceList=a.ASTLiteralValueExpression=a.ASTTimeTruncationExpression=a.ASTReferenceExpression=a.ASTExpression=a.ASTField=a.ASTAggregateViewOperation=a.ASTGroupByViewOperation=a.ASTOrderByViewOperation=a.ASTViewOperation=a.ASTViewOperationList=a.ASTSegmentViewDefinition=a.ASTRefinementViewDefinition=a.ASTArrowViewDefinition=a.ASTReferenceViewDefinition=a.ASTReferenceQueryArrowSource=a.ASTReferenceQueryDefinition=a.ASTRefinementQueryDefinition=a.ASTArrowQueryDefinition=a.ASTQueryDefinition=a.ASTQueryArrowSource=a.ASTUnimplemented=a.ASTFilterExpressionLiteralValue=a.ASTTimestampLiteralValue=a.ASTDateLiteralValue=a.ASTBooleanLiteralValue=a.ASTNumberLiteralValue=a.ASTNullLiteralValue=a.ASTStringLiteralValue=a.ASTLiteralValue=a.ASTParameterValue=a.ASTParameterValueList=a.ASTFieldReference=a.ASTReference=a.ASTQuery=void 0,a.ASTAnnotation=void 0;const h=m(nd()),u=ad(),r=m(yd());class o{constructor(){this.edited=!1}edit(){return this.edited=!0,this._parent&&this._parent.edit(),this}get as(){const f=this;return{Query(){if(f instanceof s)return f;throw new Error("Not an ASTQuery")},Reference(){if(f instanceof l)return f;throw new Error("Not an ASTReference")},ReferenceQueryArrowSource(){if(f instanceof L)return f;throw new Error("Not an ASTReferenceQueryArrowSource")},ParameterValueList(){if(f instanceof p)return f;throw new Error("Not an ASTParameterValueList")},FilterOperation(){if(f instanceof R)return f;throw new Error("Not an ASTFilterOperation")},FilterOperationList(){if(f instanceof q)return f;throw new Error("Not an ASTFilterOperationList")},ParameterValue(){if(f instanceof v)return f;throw new Error("Not an ASTParameterValue")},StringLiteralValue(){if(f instanceof x)return f;throw new Error("Not an ASTStringLiteralValue")},NumberLiteralValue(){if(f instanceof _)return f;throw new Error("Not an ASTNumberLiteralValue")},ViewOperationList(){if(f instanceof oe)return f;throw new Error("Not an ASTViewOperationList")},GroupByViewOperation(){if(f instanceof B)return f;throw new Error("Not an ASTGroupByViewOperation")},AggregateViewOperation(){if(f instanceof G)return f;throw new Error("Not an ASTAggregateViewOperation")},OrderByViewOperation(){if(f instanceof te)return f;throw new Error("Not an ASTOrderByViewOperation")},Field(){if(f instanceof O)return f;throw new Error("Not an ASTField")},ReferenceExpression(){if(f instanceof C)return f;throw new Error("Not an ASTReferenceExpression")},ReferenceViewDefinition(){if(f instanceof I)return f;throw new Error("Not an ASTReferenceViewDefinition")},ArrowQueryDefinition(){if(f instanceof P)return f;throw new Error("Not an ASTArrowQueryDefinition")},ArrowViewDefinition(){if(f instanceof X)return f;throw new Error("Not an ASTArrowViewDefinition")},RefinementViewDefinition(){if(f instanceof ie)return f;throw new Error("Not an ASTRefinementViewDefinition")},TimeTruncationExpression(){if(f instanceof D)return f;throw new Error("Not an ASTTimeTruncationExpression")},FilteredFieldExpression(){if(f instanceof H)return f;throw new Error("Not an ASTFilteredFieldExpression")},NestViewOperation(){if(f instanceof M)return f;throw new Error("Not an ASTNestViewOperation")},View(){if(f instanceof ae)return f;throw new Error("Not an ASTView")},SegmentViewDefinition(){if(f instanceof ce)return f;throw new Error("Not an ASTSegmentViewDefinition")},LimitViewOperation(){if(f instanceof de)return f;throw new Error("Not an ASTLimitViewOperation")},AnnotationList(){if(f instanceof Y)return f;throw new Error("Not an ASTAnnotationList")},Annotation(){if(f instanceof re)return f;throw new Error("Not an ASTAnnotation")}}}get find(){const f=this;return{Query(S){return f.findAny(S).as.Query()},Reference(S){return f.findAny(S).as.Reference()},ReferenceQueryArrowSource(S){return f.findAny(S).as.ReferenceQueryArrowSource()},ParameterValueList(S){return f.findAny(S).as.ParameterValueList()},FilterOperation(S){return f.findAny(S).as.FilterOperation()},FilterOperationList(S){return f.findAny(S).as.FilterOperationList()},ParameterValue(S){return f.findAny(S).as.ParameterValue()},StringLiteralValue(S){return f.findAny(S).as.StringLiteralValue()},NumberLiteralValue(S){return f.findAny(S).as.NumberLiteralValue()},ViewOperationList(S){return f.findAny(S).as.ViewOperationList()},GroupByViewOperation(S){return f.findAny(S).as.GroupByViewOperation()},AggregateViewOperation(S){return f.findAny(S).as.AggregateViewOperation()},OrderByViewOperation(S){return f.findAny(S).as.OrderByViewOperation()},Field(S){return f.findAny(S).as.Field()},ReferenceExpression(S){return f.findAny(S).as.ReferenceExpression()},ReferenceViewDefinition(S){return f.findAny(S).as.ReferenceViewDefinition()},ArrowQueryDefinition(S){return f.findAny(S).as.ArrowQueryDefinition()},ArrowViewDefinition(S){return f.findAny(S).as.ArrowViewDefinition()},RefinementViewDefinition(S){return f.findAny(S).as.RefinementViewDefinition()},TimeTruncationExpression(S){return f.findAny(S).as.TimeTruncationExpression()},FilteredFieldExpression(S){return f.findAny(S).as.FilteredFieldExpression()},NestViewOperation(S){return f.findAny(S).as.NestViewOperation()},View(S){return f.findAny(S).as.View()},SegmentViewDefinition(S){return f.findAny(S).as.SegmentViewDefinition()},LimitViewOperation(S){return f.findAny(S).as.LimitViewOperation()},AnnotationList(S){return f.findAny(S).as.AnnotationList()},Annotation(S){return f.findAny(S).as.Annotation()}}}get parent(){if(this._parent===void 0)throw new Error("This node does not have a parent");return this._parent}set parent(f){this._parent=f}static schemaTryGet(f,S,U){return o._schemaTryGet(f,S,U,!1)}static schemaTryGetDrillField(f,S,U){return o._schemaTryGet(f,S,U,!0)}static _schemaTryGet(f,S,U,le){let me=f.fields;for(const Be of U??[]){const we=me.find(Me=>Me.name===Be);if(we===void 0)throw new Error(`${Be} not found`);if(we.kind==="join"||le&&we.kind==="view"){me=we.schema.fields;continue}if(we.kind==="dimension"||we.kind==="measure"){if(we.type.kind==="record_type"){me=we.type.fields.map(Me=>({kind:we.kind,...Me}));continue}else if(we.type.kind==="array_type"&&we.type.element_type.kind==="record_type"){me=we.type.element_type.fields.map(Me=>({kind:we.kind,...Me}));continue}}throw new Error(`${Be} is not a join, record, or repeated record`)}return me.find(Be=>Be.name===S)}static schemaGet(f,S,U){const le=o.schemaTryGet(f,S,U);if(le===void 0)throw new Error(`${S} not found`);return le}static schemaGetDrillField(f,S,U){const le=o.schemaTryGetDrillField(f,S,U);if(le===void 0)throw new Error(`${S} not found`);return le}static schemaMerge(f,S){return{fields:[...f.fields,...S.fields]}}static tagFor(f,S="# "){var U,le,me;const Se=(le=(U=f.annotations)===null||U===void 0?void 0:U.map(Be=>Be.value))===null||le===void 0?void 0:le.filter(Be=>Be.startsWith(S));return(me=u.Tag.fromTagLines(Se??[]).tag)!==null&&me!==void 0?me:new u.Tag}static fieldWasCalculation(f){if(f.kind!=="dimension")throw new Error(`${f.name} could not be an output field, because it is a ${f.kind}, and only dimensions can appear in output schemas`);return o.tagFor(f,"#(malloy) ").has("calculation")}}function t(z){return Array.isArray(z)||typeof z=="string"||typeof z=="number"||typeof z=="boolean"}class i extends o{constructor(f,S){super(),this.node=f,this.children=S,this.originalChildren=[...S],S.forEach(U=>U.parent=this)}*iter(){for(let f=0;f<this.length;f++)yield this.index(f)}get length(){return this.children.length}get last(){return this.children[this.children.length-1]}index(f){return this.children[f]}insert(f,S){this.edit(),this.children.splice(S,0,f),f.parent=this}add(f){this.edit(),this.children.push(f),f.parent=this}remove(f){const S=this.children.findIndex(U=>U===f);if(S===-1)return this;this.edit(),this.children.splice(S,1)}build(){if(!this.edited)return this.node;const f=this.children.map(S=>S.build());return this.edited=!1,this.originalChildren=[...this.children],this.node=f,f}findAny(f){if(f.length===0)return this;const[S,...U]=f;if(typeof S!="number")throw new Error(`${this.constructor.name} is a ASTListNode and thus cannot contain a ${S}`);return this.children[S].findAny(U)}findIndex(f){return this.children.findIndex(f)}indexOf(f){return this.children.indexOf(f)}}class e extends o{constructor(f,S){super(),this.node=f,this.children=S;for(const U in S){const le=S[U];le&&!t(le)&&(le.parent=this)}}build(){if(!this.edited)return this.node;let f=this.node;for(const S in this.children){const U=this.children[S];U===void 0?f={...f,[S]:void 0}:t(U)?this.edited&&(f={...f,[S]:U}):f={...f,[S]:U.build()}}return this.node=f,this.edited=!1,f}findAny(f){if(f.length===0)return this;const[S,...U]=f;if(typeof S!="string")throw new Error(`${this.constructor.name} is a ASTListNode and thus cannot contain a ${S}`);const le=this.children[S];if(t(le))throw new Error(`${this.constructor.name}.${S} refers to a basic type, not an ASTNode`);return le._find(U)}}class s extends e{constructor(f){var S,U;let le=f.source;if(le===void 0){if(f.model===void 0)throw new Error("Need a model or source");if(f.query){const we=f.query.definition;if(we.kind==="arrow"&&we.source.kind==="source_reference"){const Me=we.source.name;if(le=f.model.entries.find(Xn=>Xn.name===Me),le===void 0)throw new Error(`Model does not contain source or query named ${Me}`)}}if(le===void 0&&(le=f.model.entries[0]),le===void 0)throw new Error("Model does not contain any sources or queries")}const me=be(le),Se=(S=f.query)!==null&&S!==void 0?S:{definition:{kind:"arrow",source:{kind:"source_reference",name:me.name},view:{kind:"segment",operations:[]}}},Be=(U=f.model)!==null&&U!==void 0?U:{entries:[me],anonymous_queries:[]};super(Se,{definition:a.ASTQueryDefinition.from(Se.definition),annotations:Se.annotations&&new Y(Se.annotations)}),this.model=Be,f.source&&this.setSource(f.source.name)}get definition(){return this.children.definition}set definition(f){this.edit(),this.children.definition=f,f.parent=this}get annotations(){return this.children.annotations}reorderFields(f){this.definition.reorderFields(f)}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new Y([]);return this.children.annotations=f,f.parent=this,f}getInheritedTag(f="# "){return xe(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}setViewToEmptySegment(){if(!(this.definition instanceof P))throw new Error("Must set source before setting view");return this.definition=new P({kind:"arrow",source:this.definition.source.build(),view:{kind:"segment",operations:[]}}),this.definition.view.as.SegmentViewDefinition()}isRunnable(){return this.definition.isRunnable()}isEmpty(){return this.definition instanceof P&&this.definition.view instanceof ce&&this.definition.view.operations.length===0}getOrAddDefaultSegment(){return this.definition.getOrAddDefaultSegment()}setSource(f){if(this.definition instanceof P&&this.definition.source instanceof L&&this.definition.source.name===f)return;if(this.model.entries.find(U=>U.name===f)===void 0)throw new Error(`Source ${f} is not defined in model`);this.definition=new P({kind:"arrow",source:{kind:"source_reference",name:f},view:this.definition instanceof P?this.definition.view.build():{kind:"segment",operations:[]}})}setQueryHead(f){const S=this.model.entries.find(U=>U.name===f);if(S===void 0||S.kind!=="query")throw new Error(`No query named ${f} in the model`);this.definition=new W({kind:"query_reference",name:f})}getQueryInfo(f){const S=this.model.entries.find(U=>U.name===f);if(S===void 0)throw new Error(`Query ${f} is not defined in model`);if(S.kind!=="query")throw new Error(`Model entry ${f} is not a query`);return S}toMalloy(){return h.queryToMalloy(this.build())}build(){return super.build()}setView(f){if(!(this.definition instanceof P))throw new Error("Must set source before setting view");return this.definition=new P({kind:"arrow",source:this.definition.source.build(),view:{kind:"view_reference",name:f}}),this.definition.view.as.ReferenceViewDefinition()}_getInheritedAnnotations(f){var S;return f instanceof W?(S=this.getQueryInfo(f.name).annotations)!==null&&S!==void 0?S:[]:f instanceof j?this._getInheritedAnnotations(f.base):f instanceof P?f.view.getInheritedAnnotations():[]}getInheritedAnnotations(){return this._getInheritedAnnotations(this.definition)}}a.ASTQuery=s;class l extends e{constructor(f){super(f,{name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.reference=f}get name(){return this.children.name}set name(f){this.edit(),this.children.name=f}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}static getOrAddParameters(f){if(f.parameters)return f.parameters;f.edit();const S=new p([]);return f.parameters=S,S}static setParameter(f,S,U){const le=l.tryGetParameter(f,S);if(le!==void 0){le.value=a.ASTLiteralValue.from(a.ASTLiteralValue.makeLiteral(U));return}return f.getOrAddParameters().addParameter(S,U)}static tryGetParameter(f,S){if(f.parameters!==void 0){for(const U of f.parameters.iter())if(U.name===S)return U}}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReference=l;class c extends l{get segment(){const f=this.parent;return f instanceof H||f instanceof D?f.field.segment:f instanceof he||f instanceof K?f.segment:f.list.segment}getReferenceSchema(){return this.parent instanceof te?this.segment.getOutputSchema():this.segment.getInputSchema()}getFieldInfo(){const f=this.getReferenceSchema();return o.schemaGet(f,this.name,this.path)}}a.ASTFieldReference=c;class p extends i{constructor(f){super(f,f.map(S=>new v(S)))}get parameters(){return this.children}addParameter(f,S){this.add(new v({name:f,value:a.ASTLiteralValue.makeLiteral(S)}))}}a.ASTParameterValueList=p;class v extends e{constructor(f){super(f,{name:f.name,value:a.ASTLiteralValue.from(f.value)}),this.parameter=f}get name(){return this.children.name}get value(){return this.children.value}set value(f){this.edit(),this.children.value=f}}a.ASTParameterValue=v,a.ASTLiteralValue={from(z){switch(z.kind){case"string_literal":return new x(z);case"number_literal":return new _(z);case"boolean_literal":return new A(z);case"date_literal":return new E(z);case"timestamp_literal":return new N(z);case"null_literal":return new g(z);case"filter_expression_literal":return new b(z)}},makeLiteral(z){if(z!==null&&typeof z=="object"&&"kind"in z)return z;if(typeof z=="string")return{kind:"string_literal",string_value:z};if(typeof z=="boolean")return{kind:"boolean_literal",boolean_value:z};if(typeof z=="number")return{kind:"number_literal",number_value:z};if(z===null)return{kind:"null_literal"};if("date"in z){const f=z.granularity,S=Pe(z.date);return Te(f)?{kind:"date_literal",date_value:S,granularity:f}:{kind:"timestamp_literal",timestamp_value:S,granularity:f}}throw new Error("Unknown literal type")}};class x extends e{constructor(f){super(f,{kind:f.kind,string_value:f.string_value}),this.node=f,this.kind="string_literal"}get fieldType(){return{kind:"string_type"}}}a.ASTStringLiteralValue=x;class g extends e{constructor(f){super(f,{kind:f.kind}),this.node=f,this.kind="null_literal"}get fieldType(){}}a.ASTNullLiteralValue=g;class _ extends e{constructor(f){super(f,{kind:f.kind,number_value:f.number_value}),this.node=f,this.kind="number_literal"}get fieldType(){return{kind:"number_type",subtype:Number.isInteger(this.children.number_value)?"integer":"decimal"}}}a.ASTNumberLiteralValue=_;class A extends e{constructor(f){super(f,{kind:f.kind,boolean_value:f.boolean_value}),this.node=f,this.kind="boolean_literal"}get fieldType(){return{kind:"boolean_type"}}}a.ASTBooleanLiteralValue=A;class E extends e{constructor(f){super(f,{kind:f.kind,date_value:f.date_value,granularity:f.granularity}),this.node=f,this.kind="date_literal"}get fieldType(){return{kind:"date_type",timeframe:this.children.granularity}}}a.ASTDateLiteralValue=E;class N extends e{constructor(f){super(f,{kind:f.kind,timestamp_value:f.timestamp_value,granularity:f.granularity}),this.node=f,this.kind="timestamp_literal"}get fieldType(){return{kind:"timestamp_type",timeframe:this.children.granularity}}}a.ASTTimestampLiteralValue=N;class b extends e{constructor(f){super(f,{kind:f.kind,filter_expression_value:f.filter_expression_value}),this.node=f,this.kind="filter_expression_literal"}get fieldType(){}}a.ASTFilterExpressionLiteralValue=b;class w extends o{constructor(f){super(),this.node=f}get treeEdited(){return!1}build(){return this.node}findAny(){throw new Error("Tried to find a node from an unimplemented node type")}}a.ASTUnimplemented=w,a.ASTQueryArrowSource={from(z){switch(z.kind){case"refinement":return new j(z);case"source_reference":return new L(z)}}},a.ASTQueryDefinition={from(z){switch(z.kind){case"arrow":return new P(z);case"query_reference":return new W(z);case"refinement":return new j(z)}}};class P extends e{constructor(f){super(f,{kind:"arrow",source:a.ASTQueryArrowSource.from(f.source),view:$.from(f.view)}),this.node=f}get view(){return this.children.view}set view(f){this.edit(),this.children.view=f,f.parent=this}get source(){return this.children.source}set source(f){this.edit(),this.children.source=f}getOrAddDefaultSegment(){return this.view.getOrAddDefaultSegment()}getSourceInfo(){return this.source.getSourceInfo()}getOutputSchema(){return this.view.getRefinementSchema()}isRunnable(){return this.view.isRunnable()&&this.source.isRunnable()}get query(){return this.parent.as.Query()}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.view),this.view.propagateDown(f)}reorderFields(f){this.view instanceof ce?this.view.reorderFields(f):this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}}a.ASTArrowQueryDefinition=P;class j extends e{constructor(f){super(f,{kind:"refinement",base:a.ASTQueryDefinition.from(f.base),refinement:$.from(f.refinement)}),this.node=f}get base(){return this.children.base}get refinement(){return this.children.refinement}set refinement(f){this.edit(),this.children.refinement=f,f.parent=this}isRunnable(){return!0}get query(){return this.parent.as.Query()}getOrAddDefaultSegment(){return this.refinement.getOrAddDefaultSegment()}getOutputSchema(){const f=this.base.getOutputSchema(),S=this.refinement.getRefinementSchema();return s.schemaMerge(f,S)}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.refinement),this.refinement.propagateDown(f)}reorderFields(f){this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}getSourceInfo(){return this.base.getSourceInfo()}}a.ASTRefinementQueryDefinition=j;class W extends e{constructor(f){super(f,{kind:"query_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return!0}get name(){return this.children.name}get query(){return this.parent.as.Query()}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}getOrAddDefaultSegment(){const f=new j({kind:"refinement",base:this.build(),refinement:{kind:"segment",operations:[]}});return this.query.definition=f,f.refinement.as.SegmentViewDefinition()}propagateUp(f){}propagateDown(f){}reorderFields(f){this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}getOutputSchema(){return this.getSourceInfo().schema}getSourceInfo(){const S=this.query.model.entries.find(U=>U.name===this.name);if(S===void 0)throw new Error(`Query not found with name ${this.name}`);return S}}a.ASTReferenceQueryDefinition=W;class L extends e{constructor(f){super(f,{kind:"source_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return this.areRequiredParametersSet()}get name(){return this.children.name}get arrow(){return this.parent.as.ArrowQueryDefinition()}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}getSourceInfo(){const f=this.arrow.query.model.entries.find(S=>S.name===this.name);if(f===void 0)throw new Error(`No query or source named ${this.name}`);return f}getOrAddDefaultSegment(){if(this.getSourceInfo().kind!=="query")throw new Error(`Cannot refine source ${this.name}`);const S=new j({kind:"refinement",base:{...this.build(),kind:"query_reference"},refinement:{kind:"segment",operations:[]}});return this.arrow.source=S,S.refinement.as.SegmentViewDefinition()}propagateUp(f){}propagateDown(f){}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}get query(){return this.parent.parent.as.Query()}getSourceParameters(){var f;const S=this.getSourceInfo();return S.kind==="query"?[]:(f=S.parameters)!==null&&f!==void 0?f:[]}areRequiredParametersSet(){const f=this.getSourceParameters();for(const S of f){if(S.default_value!==void 0)continue;if(this.tryGetParameter(S.name)===void 0)return!1}return!0}}a.ASTReferenceQueryArrowSource=L;const $={from(z){switch(z.kind){case"arrow":return new X(z);case"view_reference":return new I(z);case"segment":return new ce(z);case"refinement":return new ie(z)}}};function Q(z,f){const S=z.parent;S instanceof P?S.view=f:S instanceof j?S.refinement=f:S instanceof ae?S.definition=f:S instanceof X?S.source===z?S.source=f:S.view=f:S.base===z?S.base=f:S.refinement=f}function ee(z,f,S=[]){const U=z.getInputSchema(),le=s.schemaGet(U,f,S);if(le===void 0)return{isValidViewRefinement:!1,error:`${f} is not defined`};if(le.kind!=="view")return{isValidViewRefinement:!1,error:`${f} is not a view`};const me=z.getOutputSchema();for(const Se of le.schema.fields)if(s.schemaTryGet(me,Se.name,[]))return{isValidViewRefinement:!1,error:`Cannot refine with ${f} because stage already has an output field named ${Se.name}`};return{isValidViewRefinement:!0}}class I extends e{constructor(f){super(f,{kind:"view_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return!0}get name(){return this.children.name}get path(){return this.children.path}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}getOrAddDefaultSegment(){return this.addEmptyRefinement()}addEmptyRefinement(){const f=ie.segmentRefinementOf(this.build());return Q(this,f),f.refinement.as.SegmentViewDefinition()}addViewRefinement(f,S){const{error:U}=this.isValidViewRefinement(f,S);if(U)throw new Error(U);const le=ie.viewRefinementOf(this.build(),f,S);return Q(this,le),le.refinement.as.ReferenceViewDefinition()}convertToNest(f){const S=$.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});Q(this,S)}isValidViewRefinement(f,S){return ee(this,f,S)}getInputSchema(){return Ee(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getImplicitName(){return this.name}getViewInfo(){const f=this.getInputSchema(),S=o.schemaGet(f,this.name,this.path);if(S.kind!=="view")throw new Error("Not a view");return S}getRefinementSchema(){return this.getViewInfo().schema}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){}getInheritedAnnotations(){var f;return(f=this.getViewInfo().annotations)!==null&&f!==void 0?f:[]}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReferenceViewDefinition=I;class X extends e{constructor(f){super(f,{kind:"arrow",source:$.from(f.source),view:$.from(f.view)}),this.node=f}isRunnable(){return this.source.isRunnable()&&this.view.isRunnable()}get source(){return this.children.source}set source(f){this.edit(),this.children.source=f}get view(){return this.children.view}set view(f){this.edit(),this.children.view=f,f.parent=this}getOrAddDefaultSegment(){return this.view.getOrAddDefaultSegment()}addEmptyRefinement(){return this.view.addEmptyRefinement()}addViewRefinement(f,S){return this.view.addViewRefinement(f,S)}convertToNest(f){const S=$.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});Q(this,S)}getInputSchema(){return this.source.getOutputSchema()}getOutputSchema(){return this.view.getRefinementSchema()}getImplicitName(){return this.view.getImplicitName()}getRefinementSchema(){throw new Error("An arrow is not a valid refinement")}isValidViewRefinement(f,S){return ee(this,f,S)}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.view),this.view.propagateDown(f)}getInheritedAnnotations(){return[]}}a.ASTArrowViewDefinition=X;class ie extends e{constructor(f){super(f,{kind:"refinement",base:$.from(f.base),refinement:$.from(f.refinement)}),this.node=f}isRunnable(){return this.getOutputSchema().fields.length>0}get refinement(){return this.children.refinement}set refinement(f){this.edit(),this.children.refinement=f,f.parent=this}get base(){return this.children.base}set base(f){this.edit(),this.children.base=f}convertToNest(f){const S=$.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});Q(this,S)}getOrAddDefaultSegment(){return this.refinement.getOrAddDefaultSegment()}addEmptyRefinement(){return this.refinement.addEmptyRefinement()}addViewRefinement(f,S){return this.refinement.addViewRefinement(f,S)}getInputSchema(){return Ee(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getRefinementSchema(){return o.schemaMerge(this.base.getRefinementSchema(),this.refinement.getRefinementSchema())}getImplicitName(){return this.base.getImplicitName()}isValidViewRefinement(f,S){return ee(this,f,S)}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){f(this.base),f(this.refinement),this.base.propagateDown(f),this.refinement.propagateDown(f)}getInheritedAnnotations(){return this.base.getInheritedAnnotations()}static viewRefinementOf(f,S,U){return new ie({kind:"refinement",base:f,refinement:{kind:"view_reference",name:S,path:U}})}static segmentRefinementOf(f){return new ie({kind:"refinement",base:f,refinement:{kind:"segment",operations:[]}})}}a.ASTRefinementViewDefinition=ie;class ce extends e{constructor(f){super(f,{kind:"segment",operations:new oe(f.operations)}),this.node=f,this.DEFAULT_INSERTION_ORDER=["group_by","aggregate","drill","where","having","nest","order_by","calculate","limit"]}isRunnable(){let f=!1;for(const S of this.operations.iter()){if(S instanceof G||S instanceof B)return!0;if(S instanceof M){if(!S.view.definition.isRunnable())return!1;f=!0}}return f}get operations(){return this.children.operations}convertToNest(f){const S=$.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});Q(this,S)}renameOrderBys(f,S){for(const U of this.operations.iter())U instanceof te&&U.name===f&&U.setField(S)}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){}removeOrderBys(f){for(const S of this.operations.iter())S instanceof te&&S.name===f&&S.delete()}reorderFields(f){const S=[],U=[],le={};let me=!1;for(const we of this.operations.iter()){if((we instanceof G||we instanceof B||we instanceof M)&&f.includes(we.name)){le[we.name]=we,me=!0;continue}me?U.push(we):S.push(we)}const Se=[];for(const we of f){const Me=le[we];if(Me===void 0)throw new Error(`No field named ${we}`);Se.push(Me)}const Be=[...S,...Se,...U];this.operations.items=Be}renameField(f,S){if(f.name===S)return;const U=this.getOutputSchema();if(o.schemaTryGet(U,S,[]))throw new Error(`Output already has a field named ${S}`);const le=f.name;f.name=S,this.propagateUp(me=>{me instanceof ce&&me.renameOrderBys(le,S)})}addOrderBy(f,S){const U=this.getOutputSchema();try{o.schemaGet(U,f,[])}catch{throw new Error(`No such field ${f} in stage output`)}for(const me of this.operations.iter())if(me instanceof te&&me.name===f)return me.direction=S,me;const le=new te({kind:"order_by",field_reference:{name:f},direction:S});return this.addOperation(le),le}addEmptyNest(f){const S=new M({kind:"nest",name:f,view:{definition:{kind:"segment",operations:[]}}});return this.addOperation(S),S}firstIndexOfOperationType(f){return this.operations.findIndex(S=>S.kind===f)}findInsertionPoint(f){const S=this.firstIndexOfOperationType(f);if(S>-1){let me=S;for(;this.operations.index(me)&&this.operations.index(me).kind===f;)me++;return me}const U=this.DEFAULT_INSERTION_ORDER.indexOf(f);if(U===-1)throw new Error(`Operation ${f} is not supported for \`findInsertionPoint\``);const le=this.DEFAULT_INSERTION_ORDER.slice(U+1);for(const me of le){const Se=this.firstIndexOfOperationType(me);if(Se>-1)return Se}return this.operations.length}getFieldNamed(f){const S=this.tryGetFieldNamed(f);if(S===void 0)throw new Error("No such field");return S}hasFieldNamed(f){return this.tryGetFieldNamed(f)!==void 0}hasField(f,S){return this.tryGetField(f,S)!==void 0}getField(f,S){const U=this.tryGetField(f,S);if(U===void 0)throw new Error("No such field");return U}tryGetField(f,S){for(const U of this.operations.iter())if(U instanceof B||U instanceof G){const le=U.field.getReference();if(le&&le.name===f&&Le(le.path,S))return U}else if(U instanceof M){if(U.view instanceof I)return U}else if(U instanceof fe){const le=U.expression.field.getReference();if(le&&le.name===f&&Le(le.path,S))return U}}tryGetFieldNamed(f){for(const S of this.operations.iter())if((S instanceof B||S instanceof G||S instanceof M||S instanceof fe)&&S.name===f)return S}getGroupBy(f){for(const S of this.operations.iter())if(S instanceof B&&S.name===f)return S}removeGroupBy(f){var S;return(S=this.getGroupBy(f))===null||S===void 0||S.delete(),this}addGroupBy(f,S=[],U){const le=this.makeField(f,S,U,"dimension");return this.addOperation(le),le}addDrill(f){const S=new Z({kind:"drill",...f});return this.addOperation(S),S}addWhere(f,S,U){const le=Array.isArray(S)?S:[],me=U===void 0?S:U,Se=typeof me=="string"?me:ge(me),Be=this.getInputSchema(),we=s.schemaGet(Be,f,le);ve(we,me);const Me=new V({kind:"where",filter:{kind:"filter_string",expression:{kind:"field_reference",name:f,path:le},filter:Se}});return this.addOperation(Me),Me}addHaving(f,S,U){const le=Array.isArray(S)?S:[],me=U===void 0?S:U,Se=typeof me=="string"?me:ge(me),Be=this.getInputSchema(),we=s.schemaGet(Be,f,le);ve(we,me);const Me=new se({kind:"having",filter:{kind:"filter_string",expression:{kind:"field_reference",name:f,path:le},filter:Se}});return this.addOperation(Me),Me}addCalculateMovingAverage(f,S,U,le,me){const Se=new fe({kind:"calculate",name:f,field:{expression:{kind:"moving_average",field_reference:{name:S,path:U},rows_preceding:le,rows_following:me}}});return this.addOperation(Se),Se}addTimeGroupBy(f,S,U,le){const me=this.getInputSchema(),Se=o.schemaGet(me,f,S);if(Se===void 0)throw new Error(`No such field ${f}`);if(Se.kind!=="dimension")throw new Error(`Cannot group by non-dimension ${f}`);if(Se.type.kind!==le)throw new Error(`${f} is not a ${le}`);const Be=new B({kind:"group_by",field:{expression:{kind:"time_truncation",field_reference:{name:f,path:S},truncation:U}}});return this.addOperation(Be),Be}addDateGroupBy(f,S,U){const le=U===void 0?S:U,me=U===void 0?[]:S;return this.addTimeGroupBy(f,me,le,"date_type")}addTimestampGroupBy(f,S,U){const le=U===void 0?S:U,me=U===void 0?[]:S;return this.addTimeGroupBy(f,me,le,"timestamp_type")}addAggregate(f,S=[],U){const le=this.makeField(f,S,U,"measure");return this.addOperation(le),le}addNest(f,S){const U=this.makeField(f,[],S,"view");return this.addOperation(U),U}makeField(f,S,U,le){const me=this.getInputSchema(),Se=o.schemaGet(me,f,S);if(Se===void 0)throw new Error(`No such field ${f}`);if(Se.kind!==le){const Be=Ce(le),we=le;throw new Error(`Cannot ${Be} non-${we} ${f}`)}return le==="dimension"?B.fromReference(f,S,U):le==="measure"?G.fromReference(f,S,U):M.fromReference(f,S,U)}addOperation(f){if((f instanceof B||f instanceof G||f instanceof M||f instanceof fe)&&this.hasFieldNamed(f.name))throw new Error(`Query already has a field named ${f.name}`);const S=this.findInsertionPoint(f.kind);return this.operations.insert(f,S),f}getRefinementSchema(){const f=[];for(const S of this.operations.iter())(S instanceof B||S instanceof G||S instanceof M||S instanceof fe)&&f.push(S.getFieldInfo());return{fields:f}}setLimit(f){de.validateLimit(f);const S=[...this.operations.iter()].find(a.ASTViewOperation.isLimit);S?S.limit=f:this.operations.add(new de({kind:"limit",limit:f}))}getOrAddDefaultSegment(){return this}addEmptyRefinement(){const f=ie.segmentRefinementOf(this.build());return Q(this,f),f.refinement.as.SegmentViewDefinition()}addViewRefinement(f,S){const{error:U}=this.isValidViewRefinement(f,S);if(U)throw new Error(U);const le=ie.viewRefinementOf(this.build(),f,S);return Q(this,le),le.refinement.as.ReferenceViewDefinition()}getInputSchema(){return Ee(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getImplicitName(){}isValidViewRefinement(f,S){return ee(this,f,S)}getInheritedAnnotations(){return[]}}a.ASTSegmentViewDefinition=ce;class oe extends i{constructor(f){super(f,f.map(S=>a.ASTViewOperation.from(S)))}get items(){return this.children}set items(f){this.edit(),this.children=f}get segment(){return this.parent.as.SegmentViewDefinition()}}a.ASTViewOperationList=oe,a.ASTViewOperation={from(z){switch(z.kind){case"group_by":return new B(z);case"aggregate":return new G(z);case"order_by":return new te(z);case"nest":return new M(z);case"limit":return new de(z);case"where":return new V(z);case"drill":return new Z(z);case"having":return new se(z);case"calculate":return new fe(z)}},isLimit(z){return z instanceof de}};class te extends e{constructor(f){super(f,{kind:"order_by",field_reference:new c(f.field_reference),direction:f.direction}),this.node=f,this.kind="order_by"}get fieldReference(){return this.children.field_reference}get name(){return this.fieldReference.name}get direction(){return this.children.direction}set direction(f){this.direction!==f&&(this.edit(),this.children.direction=f)}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}setField(f){const S=this.list.segment.getOutputSchema();o.schemaGet(S,f,[]),this.edit(),this.children.field_reference=new c({name:f})}setDirection(f){this.direction=f}}a.ASTOrderByViewOperation=te;class B extends e{constructor(f){super(f,{kind:"group_by",name:f.name,field:new O(f.field)}),this.node=f,this.kind="group_by"}get field(){return this.children.field}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.field.name;if(S===void 0)throw new Error("Group by does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.field.name===f?this.children.name=void 0:this.children.name=f)}get list(){return this.parent.as.ViewOperationList()}rename(f){this.list.segment.renameField(this,f)}delete(){this.list.remove(this),this.list.segment.propagateUp(f=>{f instanceof ce&&f.removeOrderBys(this.name)})}getFieldInfo(){return{kind:"dimension",name:this.name,type:this.field.type}}get annotations(){return this.field.annotations}set annotations(f){this.edit(),this.field.annotations=f}getOrAddAnnotations(){return this.field.getOrAddAnnotations()}getInheritedTag(f="# "){return xe(f,this.field.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}static fromReference(f,S,U){return new B({kind:"group_by",name:U,field:{expression:{kind:"field_reference",name:f,path:S}}})}}a.ASTGroupByViewOperation=B;class G extends e{constructor(f){super(f,{kind:"aggregate",name:f.name,field:new O(f.field)}),this.node=f,this.kind="aggregate"}get field(){return this.children.field}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.field.name;if(S===void 0)throw new Error("Aggregate does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.field.name===f?this.children.name=void 0:this.children.name=f)}get annotations(){return this.field.annotations}rename(f){this.list.segment.renameField(this,f)}convertToCalculateMovingAverage(f,S,U=0,le=[]){if(!(this.field.expression instanceof C))throw new Error("Cannot convert aggregate to smoothed metric unless it is a field reference");this.list.remove(this);const me=new fe({kind:"calculate",name:f,field:{expression:{kind:"moving_average",field_reference:{name:this.field.expression.name,path:this.field.expression.path},rows_preceding:S,rows_following:U,partition_fields:le.map(Se=>({name:Se}))}}});return this.list.add(me),me}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this),this.list.segment.propagateUp(f=>{f instanceof ce&&f.removeOrderBys(this.name)})}getFieldInfo(){return{annotations:[{value:u.Tag.withPrefix("#(malloy) ").set(["calculation"]).toString()}],kind:"dimension",name:this.name,type:this.field.type}}getOrAddAnnotations(){return this.field.getOrAddAnnotations()}getInheritedTag(f="# "){return xe(f,this.field.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}addWhere(f,S,U){const le=Array.isArray(S)?S:[],me=U===void 0?S:U,Se=typeof me=="string"?me:ge(me),Be=this.list.segment.getInputSchema(),we=s.schemaGet(Be,f,le);ve(we,me);const Me={filter:{kind:"filter_string",expression:{kind:"field_reference",name:f,path:le},filter:Se}};if(this.field.expression instanceof H)return this.field.expression.where.add(new R(Me)),this.field.expression;if(this.field.expression instanceof C){const Xn=this.field.expression.build();return this.field.expression=new H({kind:"filtered_field",field_reference:{name:Xn.name,path:Xn.path,parameters:Xn.parameters},where:[Me]}),this.field.expression}else throw new Error("This kind of expression does not support addWhere")}static fromReference(f,S,U){return new G({kind:"aggregate",name:U,field:{expression:{kind:"field_reference",name:f,path:S}}})}}a.ASTAggregateViewOperation=G;class O extends e{constructor(f){super(f,{expression:a.ASTExpression.from(f.expression),annotations:f.annotations&&new Y(f.annotations)}),this.node=f}get expression(){return this.children.expression}set expression(f){this.edit(),this.children.expression=f,f.parent=this}get name(){return this.expression.name}get type(){const f=this.expression.fieldType;if(f===void 0)throw new Error("Field expression does not have a type");return f}get annotations(){return this.children.annotations}set annotations(f){this.edit(),this.children.annotations=f}getReference(){if(!(this.expression instanceof F))return this.expression.getReference()}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new Y([]);return this.children.annotations=f,f.parent=this,f}getInheritedTag(f="# "){return xe(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}get segment(){return this.parent.list.segment}getInheritedAnnotations(){return this.expression.getInheritedAnnotations()}}a.ASTField=O,a.ASTExpression={from(z){switch(z.kind){case"field_reference":return new C(z);case"filtered_field":return new H(z);case"time_truncation":return new D(z);case"literal_value":return new F(z);case"moving_average":return new T(z)}}};class C extends e{constructor(f){super(f,{kind:f.kind,name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f,this.kind="field_reference"}get name(){return this.children.name}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get segment(){const f=this.parent;if(f instanceof O)return f.segment;if(f instanceof he||f instanceof K)return f.segment;throw new Error("Invalid expression parent")}get path(){return this.children.path}getReference(){return this.build()}getFieldInfo(){const f=this.segment.getInputSchema(),U=this.parent instanceof K&&this.parent.parent instanceof Z?o.schemaGetDrillField(f,this.name,this.path):o.schemaGet(f,this.name,this.path);if(U.kind!=="dimension"&&U.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return U}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReferenceExpression=C;class D extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),truncation:f.truncation}),this.node=f,this.kind="time_truncation"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get truncation(){return this.children.truncation}set truncation(f){this.edit(),this.children.truncation=f}get name(){return this.fieldReference.name}get field(){return this.parent.as.Field()}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="dimension"&&S.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return S}get fieldType(){const f=this.getFieldInfo();if(f.type.kind==="date_type")return{...f.type,timeframe:J(this.truncation)};if(f.type.kind==="timestamp_type")return{...f.type,timeframe:this.truncation};throw new Error("This type of field cannot have a time truncation")}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTTimeTruncationExpression=D;class F extends e{constructor(f){super(f,{kind:f.kind,literal_value:a.ASTLiteralValue.from(f.literal_value)}),this.node=f,this.kind="time_truncation"}get name(){}get literalValue(){return this.children.literal_value}get fieldType(){return this.literalValue.fieldType}getInheritedAnnotations(){return[]}getFieldInfo(){}}a.ASTLiteralValueExpression=F;class k extends i{constructor(f){super(f,f.map(S=>new c(S)))}}a.ASTFieldReferenceList=k;class T extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),rows_preceding:f.rows_preceding,rows_following:f.rows_following,partition_fields:new k(f.partition_fields||[])}),this.node=f,this.kind="moving_average"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get rowsPreceding(){return this.children.rows_preceding}set rowsPreceding(f){this.edit(),this.children.rows_preceding=f}get rowsFollowing(){return this.children.rows_following}set rowsFollowing(f){this.edit(),this.children.rows_following=f}get name(){return this.fieldReference.name}get field(){return this.parent.as.Field()}get partitionFields(){return this.children.partition_fields}setPartitionFields(f){this.children.partition_fields=new k(f)}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="dimension"&&S.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return S}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTMovingAverageExpression=T;class R extends e{constructor(f){super(f,{filter:a.ASTFilter.from(f.filter)})}get filter(){return this.children.filter}get list(){return this.parent.as.FilterOperationList()}delete(){this.list.remove(this)}}a.ASTFilterOperation=R;class q extends i{constructor(f){super(f,f.map(S=>new R(S)))}get expression(){return this.parent.as.FilteredFieldExpression()}}a.ASTFilterOperationList=q;class H extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),where:new q(f.where)}),this.node=f,this.kind="filtered_field"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get name(){return this.fieldReference.name}get where(){return this.children.where}get field(){return this.parent.as.Field()}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="measure")throw new Error("Invalid field for ASTFilteredFieldExpression");return S}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTFilteredFieldExpression=H;function J(z){switch(z){case"day":case"week":case"month":case"year":case"quarter":return z;default:throw new Error("Invalid date timeframe")}}class M extends e{constructor(f){super(f,{kind:"nest",name:f.name,view:new ae(f.view)}),this.node=f,this.kind="nest"}get view(){return this.children.view}get annotations(){return this.view.annotations}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.view.name;if(S===void 0)throw new Error("Nest does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.view.name===f?this.children.name=void 0:this.children.name=f)}get list(){return this.parent.as.ViewOperationList()}getOrAddAnnotations(){return this.view.getOrAddAnnotations()}getInheritedTag(f="# "){return xe(f,this.view.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}delete(){this.list.remove(this)}rename(f){this.list.segment.renameField(this,f)}getFieldInfo(){return{kind:"view",name:this.name,definition:this.view.build(),schema:this.view.getOutputSchema()}}static fromReference(f,S,U){return new M({kind:"nest",name:U,view:{definition:{kind:"view_reference",name:f,path:S}}})}}a.ASTNestViewOperation=M;class V extends e{constructor(f){super(f,{kind:"where",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="where"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTWhereViewOperation=V;class Z extends e{constructor(f){super(f,{kind:"drill",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="drill"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTDrillViewOperation=Z;class se extends e{constructor(f){super(f,{kind:"having",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="having"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTHavingViewOperation=se;class fe extends e{constructor(f){super(f,{kind:"calculate",field:new O(f.field),name:f.name}),this.node=f,this.kind="calculate"}get expression(){return this.children.field.expression}set expression(f){this.edit(),this.children.field.expression=f,f.parent=this}get name(){return this.node.name}set name(f){this.name!==f&&(this.edit(),this.node.name=f)}getFieldInfo(){return{annotations:[{value:u.Tag.withPrefix("#(malloy) ").set(["calculation"]).toString()}],kind:"calculate",name:this.name,type:this.expression.fieldType}}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTCalculateViewOperation=fe,a.ASTFilter={from(z){switch(z.kind){case"filter_string":return new he(z);case"literal_equality":return new K(z)}},getSegment(z){const f=z.parent;return f instanceof R?f.list.expression.field.segment:f.list.segment}};class he extends e{constructor(f){super(f,{kind:"filter_string",expression:a.ASTExpression.from(f.expression),filter:f.filter}),this.node=f,this.kind="filter_string"}get expression(){return this.children.expression}get filterString(){return this.children.filter}set filterString(f){this.edit(),this.children.filter=f}setFilterString(f){const S=this.getFilterType();_e(this.filterString,S),this.filterString=f}get segment(){return a.ASTFilter.getSegment(this)}getFieldInfo(){const f=this.expression.getFieldInfo();if(f===void 0||f.kind!=="dimension"&&f.kind!=="measure")throw new Error("Invalid field type for filter with filter string");return f}getFilterType(){const f=this.getFieldInfo();return ue(f)}setFilter(f){const S=this.getFilterType();if(S!==f.kind)throw new Error(`Invalid filter: expected type ${S}, got ${f.kind}`);this.filterString=ge(f)}getFilter(){const f=this.getFilterType();return _e(this.filterString,f)}}a.ASTFilterWithFilterString=he;class K extends e{constructor(f){super(f,{kind:"literal_equality",expression:a.ASTExpression.from(f.expression),value:a.ASTLiteralValue.from(f.value)}),this.node=f,this.kind="literal_equality"}get expression(){return this.children.expression}get value(){return this.children.value}get segment(){return a.ASTFilter.getSegment(this)}}a.ASTFilterWithLiteralEquality=K;class ae extends e{constructor(f){super(f,{definition:$.from(f.definition),annotations:f.annotations&&new Y(f.annotations)}),this.node=f}get definition(){return this.children.definition}set definition(f){this.edit(),this.children.definition=f,f.parent=this}get name(){return this.definition.getImplicitName()}getOrAddDefaultSegment(){return this.definition.getOrAddDefaultSegment()}get nest(){return this.parent.as.NestViewOperation()}getInputSchema(){return this.nest.list.segment.getInputSchema()}getOutputSchema(){return this.definition.getRefinementSchema()}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.definition),this.definition.propagateDown(f)}reorderFields(f){this.definition instanceof ce?this.definition.reorderFields(f):this.getOrAddAnnotations().setTagProperty(["field_order"],f)}get annotations(){return this.children.annotations}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new Y([]);return this.children.annotations=f,f.parent=this,f}getInheritedAnnotations(){return this.definition.getInheritedAnnotations()}getInheritedTag(f="# "){return xe(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&U!==void 0?U:new u.Tag}getTag(f="# "){var S,U;return(U=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&U!==void 0?U:this.getInheritedTag(f)}setTagProperty(f,S=null,U="# "){this.getOrAddAnnotations().setTagProperty(f,S,U)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}}a.ASTView=ae;class de extends e{get limit(){return this.children.limit}set limit(f){de.validateLimit(f),this.edit(),this.children.limit=f}constructor(f){super(f,{kind:f.kind,limit:f.limit}),this.node=f,this.kind="limit"}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}static validateLimit(f){if(!Number.isInteger(f))throw new Error("Limit must be an integer")}}a.ASTLimitViewOperation=de;function Ce(z){switch(z){case"dimension":return"group by";case"measure":return"aggregate";case"view":return"nest";case"join":return"join";case"calculate":return"calculate"}}function Re(z){return z}class Y extends i{constructor(f){super(f,f.map(S=>new re(S)))}get items(){return this.children}getInheritedAnnotations(){return this.parent.getInheritedAnnotations()}getIntrinsicTag(f="# "){return xe(f,this.items)}getTag(f="# "){const S=u.Tag.fromTagLines(this.getInheritedAnnotations().map(U=>U.value)).tag;return xe(f,this.items,S)}get annotations(){return this.children.map(f=>f.node)}setTagProperty(f,S=null,U="# "){let le;for(let me=this.items.length-1;me>=0;me--){const Se=this.index(me);if(Se.hasPrefix(U)&&(le=Se,Se.hasIntrinsicTagProperty(f))){Se.setTagProperty(f,S);return}}le?le.setTagProperty(f,S):this.add(new re({value:new u.Tag({prefix:U}).set(f,S).toString()}))}removeTagProperty(f,S="# "){let U;for(let le=this.items.length-1;le>=0;le--){const me=this.index(le);if(me.hasPrefix(S)&&(U=me,me.hasIntrinsicTagProperty(f))){me.removeTagProperty(f);return}}U?U.removeTagProperty(f):this.add(new re({value:new u.Tag({prefix:S}).unset(...f).toString()}))}}a.ASTAnnotationList=Y;class re extends e{get value(){return this.children.value}set value(f){this.edit(),this.children.value=f}constructor(f){super(f,{value:f.value}),this.node=f}get list(){return this.parent.as.AnnotationList()}get index(){return this.list.indexOf(this)}delete(){this.list.remove(this)}getIntrinsicTag(){var f;return(f=u.Tag.fromTagLines([this.value]).tag)!==null&&f!==void 0?f:new u.Tag}getTag(){var f,S;const U=this.index===0?(f=u.Tag.fromTagLines(this.list.getInheritedAnnotations().map(le=>le.value)).tag)!==null&&f!==void 0?f:new u.Tag:this.list.index(this.index-1).getTag();return(S=u.Tag.fromTagLines([this.value],U).tag)!==null&&S!==void 0?S:new u.Tag}hasPrefix(f){return this.value.startsWith(f)}hasIntrinsicTagProperty(f){return this.getIntrinsicTag().has(...f)}setTagProperty(f,S){this.value=this.getIntrinsicTag().set(f,S).toString()}removeTagProperty(f){this.value=this.getTag().unset(...f).toString()}}a.ASTAnnotation=re;function xe(z,f=[],S){var U;const me=f.map(Se=>Se.value).filter(Se=>typeof z=="string"?Se.startsWith(z):Se.match(z));return(U=u.Tag.fromTagLines(me,S).tag)!==null&&U!==void 0?U:new u.Tag}function ge(z){switch(z.kind){case"string":return r.StringFilterExpression.unparse(z.parsed);case"number":return r.NumberFilterExpression.unparse(z.parsed);case"boolean":return r.BooleanFilterExpression.unparse(z.parsed);case"timestamp":case"date":return r.TemporalFilterExpression.unparse(z.parsed)}}function _e(z,f){function S(U){const le=U.filter(me=>me.severity==="error");if(le.length!==0)throw new Error(`Invalid Malloy filter string: ${le[0].message}`)}switch(f){case"string":{const U=r.StringFilterExpression.parse(z);return S(U.log),{kind:f,parsed:U.parsed}}case"number":{const U=r.NumberFilterExpression.parse(z);return S(U.log),{kind:f,parsed:U.parsed}}case"boolean":{const U=r.BooleanFilterExpression.parse(z);return S(U.log),{kind:f,parsed:U.parsed}}case"timestamp":case"date":{const U=r.TemporalFilterExpression.parse(z);return S(U.log),{kind:f,parsed:U.parsed}}case"other":throw new Error("Not implemented")}}function be(z){return"kind"in z?z:{...z,kind:"source"}}function Te(z){switch(z){case"year":case"quarter":case"month":case"week":case"day":return!0;default:return!1}}function De(z,f){return z.toString().padStart(f,"0")}function Pe(z){const f=De(z.getUTCFullYear(),4),S=De(z.getUTCMonth()+1,2),U=De(z.getUTCDate(),2),le=De(z.getUTCHours(),2),me=De(z.getUTCMinutes(),2),Se=De(z.getUTCSeconds(),2);return`${f}-${S}-${U} ${le}:${me}:${Se}`}function Le(z,f){const S=z??[],U=f??[];return S.length===U.length&&S.every((le,me)=>le===U[me])}function ue(z){switch(z.type.kind){case"string_type":return"string";case"boolean_type":return"boolean";case"number_type":return"number";case"date_type":return"date";case"timestamp_type":return"timestamp";default:return"other"}}function ve(z,f){if(z.kind!=="dimension"&&z.kind!=="measure")throw new Error(`Cannot filter by field of type ${z.kind}`);const S=ue(z);if(typeof f=="string")_e(f,S);else if(f.kind!==S)throw new Error(`Invalid filter for field ${z.name}; expected type ${S}, but got ${f.kind}`)}function Ee(z){if(z instanceof P)return z.getSourceInfo().schema;if(z instanceof j)throw new Error("unimplemented");return z.getInputSchema()}})(xr)),xr}var F0;function _d(){return F0||(F0=1,(function(a){var d=In&&In.__createBinding||(Object.create?(function(m,h,u,r){r===void 0&&(r=u);var o=Object.getOwnPropertyDescriptor(h,u);(!o||("get"in o?!h.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return h[u]}}),Object.defineProperty(m,r,o)}):(function(m,h,u,r){r===void 0&&(r=u),m[r]=h[u]})),y=In&&In.__exportStar||function(m,h){for(var u in m)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,m,u)};Object.defineProperty(a,"__esModule",{value:!0}),y(gd(),a)})(In)),In}var kp=_d();const Ad=Mp(kp),uy=qp({__proto__:null,default:Ad},[kp]);export{ho as a,co as b,po as c,ji as d,st as e,$i as f,Sr as g,Ie as h,uy as i,Er as j,ut as k,jp as l,zx as m,Hx as n,Ve as o,Jx as p,Tr as q,lt as r,uo as s,nd as t,Ba as u,La as v,kp as w};