@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 41.7 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
*/
function n(n,t){function r(){this.constructor=n}r.prototype=t.prototype,n.prototype=new r}function t(n,r,e,o){var u=Error.call(this,n);return Object.setPrototypeOf&&Object.setPrototypeOf(u,t.prototype),u.expected=r,u.found=e,u.location=o,u.name="SyntaxError",u}function r(n,t,r){return r=r||" ",n.length>t?n:(t-=n.length,n+(r+=r.repeat(t)).slice(0,t))}function e(n,r){var e,o={},u=(r=void 0!==r?r:{}).grammarSource,i={start:uu},a=uu,c="!",s="=",f=">=",l=">",p="<=",v="<>",d="!=",y="||",h="@",g="'",A="N'",m="''",C=".",b="null",E="true",L="false",T="in",w="is",x="like",N="escape",I="not",R="and",O="or",F="between",S="from",M="for",$="substring",U="extract",_="trim",D="position",H="timestamp",P="date",j="time",Z="leading",k="trailing",z="both",G="cast",B="as",q="integer",V="int",W="smallint",Y="float",K="real",X="varchar",J="to",Q="interval",nn="year",tn="timezone_hour",rn="timezone_minute",en="month",on="day",un="hour",an="minute",cn="second",sn="case",fn="end",ln="when",pn="then",vn="else",dn=",",yn="(",hn=")",gn="`",An=/^[<-=]/,mn=/^[+\-]/,Cn=/^[*\/]/,bn=/^[A-Za-z_\x80-\uFFFF]/,En=/^[A-Za-z0-9_]/,Ln=/^[A-Za-z0-9_.\x80-\uFFFF]/,Tn=/^["]/,wn=/^[^']/,xn=/^[0-9]/,Nn=/^[eE]/,In=/^[ \t\n\r]/,Rn=/^[^`]/,On=Xo("!",!1),Fn=Xo("=",!1),Sn=Xo(">=",!1),Mn=Xo(">",!1),$n=Xo("<=",!1),Un=Xo("<>",!1),_n=Jo([["<","="]],!1,!1),Dn=Xo("!=",!1),Hn=Jo(["+","-"],!1,!1),Pn=Xo("||",!1),jn=Jo(["*","/"],!1,!1),Zn=Jo([["A","Z"],["a","z"],"_",["€","￿"]],!1,!1),kn=Jo([["A","Z"],["a","z"],["0","9"],"_"],!1,!1),zn=Jo([["A","Z"],["a","z"],["0","9"],"_",".",["€","￿"]],!1,!1),Gn=Jo(['"'],!1,!1),Bn=Xo("@",!1),qn=Xo("'",!1),Vn=Xo("N'",!1),Wn=Xo("''",!1),Yn=Jo(["'"],!0,!1),Kn=Xo(".",!1),Xn=Jo([["0","9"]],!1,!1),Jn=Jo(["e","E"],!1,!1),Qn=Xo("NULL",!0),nt=Xo("TRUE",!0),tt=Xo("FALSE",!0),rt=Xo("IN",!0),et=Xo("IS",!0),ot=Xo("LIKE",!0),ut=Xo("ESCAPE",!0),it=Xo("NOT",!0),at=Xo("AND",!0),ct=Xo("OR",!0),st=Xo("BETWEEN",!0),ft=Xo("FROM",!0),lt=Xo("FOR",!0),pt=Xo("SUBSTRING",!0),vt=Xo("EXTRACT",!0),dt=Xo("TRIM",!0),yt=Xo("POSITION",!0),ht=Xo("TIMESTAMP",!0),gt=Xo("DATE",!0),At=Xo("TIME",!0),mt=Xo("LEADING",!0),Ct=Xo("TRAILING",!0),bt=Xo("BOTH",!0),Et=Xo("CAST",!0),Lt=Xo("AS",!0),Tt=Xo("INTEGER",!0),wt=Xo("INT",!0),xt=Xo("SMALLINT",!0),Nt=Xo("FLOAT",!0),It=Xo("REAL",!0),Rt=Xo("VARCHAR",!0),Ot=Xo("TO",!0),Ft=Xo("INTERVAL",!0),St=Xo("YEAR",!0),Mt=Xo("TIMEZONE_HOUR",!0),$t=Xo("TIMEZONE_MINUTE",!0),Ut=Xo("MONTH",!0),_t=Xo("DAY",!0),Dt=Xo("HOUR",!0),Ht=Xo("MINUTE",!0),Pt=Xo("SECOND",!0),jt=Xo("CASE",!0),Zt=Xo("END",!0),kt=Xo("WHEN",!0),zt=Xo("THEN",!0),Gt=Xo("ELSE",!0),Bt=Xo(",",!1),qt=Xo("(",!1),Vt=Xo(")",!1),Wt=Jo([" ","\t","\n","\r"],!1,!1),Yt=Xo("`",!1),Kt=Jo(["`"],!0,!1),Xt=function(n){return n},Jt=function(n){return{type:"expression-list",location:Yo(),value:n}},Qt=function(n,t,r){return{op:t,expr:r,location:Yo()}},nr=function(n,t){return wa(n,t)},tr=function(n,t,r){return{op:t,expr:r,location:Yo()}},rr=function(n,t){return wa(n,t)},er=function(n){return Ea("NOT",n,Yo())},or=function(n,t){if(""==t||null==t||null==t)return n;return"arithmetic"==t.type?wa(n,t.tail):La(t.op,n,t.right,t.escape,Yo())},ur=function(n,t){return{op:n,expr:t,location:Yo()}},ir=function(n){return{type:"arithmetic",tail:n}},ar=function(n,t){return{op:n+"NOT",right:t}},cr=function(n,t){return{op:n,right:t}},sr=function(n,t,r){return Ta(Yo(),t,r)},fr=function(n,t){return{op:"NOT"+n,right:t}},lr=function(n,t,r){return Ta(Yo(),t,r)},pr=function(n,t){return{op:n,right:t}},vr=function(n){return n[0]+" "+n[2]},dr=function(n){return n[0]+" "+n[2]},yr=function(n,t,r){return{op:n,right:t,escape:r.value}},hr=function(n,t){return{op:n,right:t,escape:""}},gr=function(n,t){return{op:n,right:t}},Ar=function(n,t){return{op:n,right:t}},mr=function(n,t,r){return{op:t,expr:r,location:Yo()}},Cr=function(n,t){return wa(n,t)},br=function(n,t,r){return{op:t,expr:r,location:Yo()}},Er=function(n,t){return wa(n,t)},Lr=function(n){return n.paren=!0,n},Tr=function(n){return/^CURRENT_DATE$/i.test(n)?{type:"current-time",location:Yo(),mode:"date"}:/^CURRENT_TIMESTAMP$/i.test(n)?{type:"current-time",location:Yo(),mode:"timestamp"}:/^CURRENT_TIME$/i.test(n)?{type:"current-time",location:Yo(),mode:"time"}:/^CURRENT_USER$/i.test(n)?{type:"current-user",location:Yo()}:{type:"column-reference",location:Yo(),table:"",column:n}},wr=function(n){return{type:"column-reference",location:Yo(),table:"",column:n,delimited:!0}},xr=function(n){return n},Nr=function(n,t){return n+t.join("")},Ir=function(n,t){return n+t.join("")},Rr=function(n){return n},Or=function(n){return n.join("")},Fr=function(){return'"'},Sr=function(n){return{type:"parameter",location:Yo(),value:n[1]}},Mr=function(n,t){return Ta(Yo(),n,t)},$r=function(n,t){return Ta(Yo(),n,t)},Ur=function(n){return{type:"function",location:Yo(),name:"extract",args:n}},_r=function(n,t,r){return Ta(Yo(),n,t,...r?[r]:[])},Dr=function(n,t,r){return Ta(Yo(),n,t,r)},Hr=function(n){return{type:"function",location:Yo(),name:"substring",args:n}},Pr=function(n,t){return Ta(Yo(),n,t)},jr=function(n,t){return Ta(Yo(),n,t)},Zr=function(n){return{type:"function",location:Yo(),name:"cast",args:n}},kr=function(){return{type:"data-type",location:Yo(),value:{type:"integer"}}},zr=function(){return{type:"data-type",location:Yo(),value:{type:"smallint"}}},Gr=function(){return{type:"data-type",location:Yo(),value:{type:"float"}}},Br=function(){return{type:"data-type",location:Yo(),value:{type:"real"}}},qr=function(){return{type:"data-type",location:Yo(),value:{type:"date"}}},Vr=function(){return{type:"data-type",location:Yo(),value:{type:"timestamp"}}},Wr=function(){return{type:"data-type",location:Yo(),value:{type:"time"}}},Yr=function(n){return{type:"data-type",location:Yo(),value:{type:"varchar",size:parseInt(n)}}},Kr=function(n,t,r){return Ta(Yo(),n,t,r)},Xr=function(n,t){return Ta(Yo(),n,t)},Jr=function(n){return{type:"function",location:Yo(),name:"trim",args:n}},Qr=function(n){return{type:"string",location:Yo(),value:n??"BOTH"}},ne=function(n,t){return Ta(Yo(),n,t)},te=function(n,t){return Ta(Yo(),n,t)},re=function(n){return{type:"function",location:Yo(),name:"position",args:n}},ee=function(n,t){return{type:"function",location:Yo(),name:n,args:t}},oe=function(n){return{type:"string",location:Yo(),value:n}},ue=function(n){return"string"===n.type&&xa(n.value),{type:"timestamp",location:Yo(),value:n.value}},ie=function(n){return"string"===n.type&&Na(n.value),{type:"time",location:Yo(),value:n.value}},ae=function(n,t,r){return{type:"interval",location:Yo(),value:t,qualifier:r,op:n}},ce=function(n,t){return{type:"interval",location:Yo(),value:n,qualifier:t,op:""}},se=function(n,t){return{type:"interval-qualifier",location:Yo(),start:n,end:t}},fe=function(n,t){return{type:"interval-period",location:Yo(),period:n.value,precision:t,secondary:null}},le=function(n){return{type:"interval-period",location:Yo(),period:n.value,precision:null,secondary:null}},pe=function(n){return{type:"interval-period",location:Yo(),period:n.value,precision:null,secondary:null}},ve=function(n,t){return{type:"interval-period",location:Yo(),period:"second",precision:n,secondary:t}},de=function(n){return{type:"interval-period",location:Yo(),period:"second",precision:n,secondary:null}},ye=function(){return{type:"interval-period",location:Yo(),period:"second",precision:null,secondary:null}},he=function(n,t){return{type:"interval-period",location:Yo(),period:n.value,precision:t,secondary:null}},ge=function(n){return{type:"interval-period",location:Yo(),period:n.value,precision:null,secondary:null}},Ae=function(n,t){return{type:"interval-period",location:Yo(),period:"second",precision:n,secondary:t}},me=function(n){return{type:"interval-period",location:Yo(),period:"second",precision:n,secondary:null}},Ce=function(){return{type:"interval-period",location:Yo(),period:"second",precision:null,secondary:null}},be=function(){return{type:"string",location:Yo(),value:"day"}},Ee=function(){return{type:"string",location:Yo(),value:"hour"}},Le=function(){return{type:"string",location:Yo(),value:"minute"}},Te=function(){return{type:"string",location:Yo(),value:"month"}},we=function(){return{type:"string",location:Yo(),value:"year"}},xe=function(n){return parseFloat(n)},Ne=function(n){return parseFloat(n)},Ie=function(n){return"string"===n.type&&Ia(n.value),{type:"date",location:Yo(),value:n.value}},Re=function(){return{type:"null",location:Yo(),value:null}},Oe=function(){return{type:"boolean",location:Yo(),value:!0}},Fe=function(){return{type:"boolean",location:Yo(),value:!1}},Se=function(){return"'"},Me=function(n){return{type:"string",location:Yo(),value:n.join("")}},$e=function(n,t){return{type:"case-expression",location:Yo(),format:"simple",operand:n,clauses:t,else:null,elseLocation:null}},Ue=function(n,t,r){return{type:"case-expression",location:Yo(),format:"simple",operand:n,clauses:t,else:r.value,elseLocation:r.location}},_e=function(n){return{type:"case-expression",location:Yo(),format:"searched",clauses:n,else:null,elseLocation:null}},De=function(n,t){return{type:"case-expression",location:Yo(),format:"searched",clauses:n,else:t.value,elseLocation:t.location}},He=function(n,t){return{type:"when-clause",location:Yo(),operand:n,value:t}},Pe=function(n,t){return{type:"when-clause",location:Yo(),operand:n,value:t}},je=function(n){return{type:"else-clause",location:Yo(),value:n}},Ze=function(n){return{type:"number",location:Yo(),value:n}},ke=function(n,t,r){return parseFloat(n+t+r)},ze=function(n,t){return parseFloat(n+t)},Ge=function(n,t){return parseFloat(n+t)},Be=function(n){return parseFloat(n)},qe=function(n,t){return n[0]+t},Ve=function(n){return"."+(null!=n?n:"")},We=function(n,t){return n+t},Ye=function(n){return n.join("")},Ke=function(n,t){return"e"+(null===t?"":t)},Xe=function(){return"IN"},Je=function(){return"IS"},Qe=function(){return"LIKE"},no=function(){return"ESCAPE"},to=function(){return"NOT"},ro=function(){return"AND"},eo=function(){return"OR"},oo=function(){return"BETWEEN"},uo=function(){return"FROM"},io=function(){return"FOR"},ao=function(){return"SUBSTRING"},co=function(){return"EXTRACT"},so=function(){return"TRIM"},fo=function(){return"POSITION"},lo=function(){return"TIMESTAMP"},po=function(){return"DATE"},vo=function(){return"TIME"},yo=function(){return"LEADING"},ho=function(){return"TRAILING"},go=function(){return"BOTH"},Ao=function(){return"CAST"},mo=function(){return"AS"},Co=function(){return"INTEGER"},bo=function(){return"INT"},Eo=function(){return"SMALLINT"},Lo=function(){return"FLOAT"},To=function(){return"REAL"},wo=function(){return"VARCHAR"},xo=function(){return"TO"},No=function(){return"INTERVAL"},Io=function(){return"YEAR"},Ro=function(){return"TIMEZONE_HOUR"},Oo=function(){return"TIMEZONE_MINUTE"},Fo=function(){return"MONTH"},So=function(){return"DAY"},Mo=function(){return"HOUR"},$o=function(){return"MINUTE"},Uo=function(){return"SECOND"},_o=function(){return"CASE"},Do=function(){return"END"},Ho=function(){return"WHEN"},Po=function(){return"THEN"},jo=function(){return"ELSE"},Zo=function(n){return n},ko=function(n){return n.join("")},zo=0|r.peg$currPos,Go=zo,Bo=[{line:1,column:1}],qo=zo,Vo=r.peg$maxFailExpected||[],Wo=0|r.peg$silentFails;if(r.startRule){if(!(r.startRule in i))throw new Error("Can't start parsing from rule \""+r.startRule+'".');a=i[r.startRule]}function Yo(){return tu(Go,zo)}function Ko(n,t){throw eu(n,t=void 0!==t?t:tu(Go,zo))}function Xo(n,t){return{type:"literal",text:n,ignoreCase:t}}function Jo(n,t,r){return{type:"class",parts:n,inverted:t,ignoreCase:r}}function Qo(){return{type:"end"}}function nu(t){var r,e=Bo[t];if(e)return e;if(t>=Bo.length)r=Bo.length-1;else for(r=t;!Bo[--r];);for(e={line:(e=Bo[r]).line,column:e.column};r<t;)10===n.charCodeAt(r)?(e.line++,e.column=1):e.column++,r++;return Bo[t]=e,e}function tu(n,t,r){var e=nu(n),o=nu(t);return{source:u,start:{offset:n,line:e.line,column:e.column},end:{offset:t,line:o.line,column:o.column}}}function ru(n){zo<qo||(zo>qo&&(qo=zo,Vo=[]),Vo.push(n))}function eu(n,r){return new t(n,null,null,r)}function ou(n,r,e){return new t(t.buildMessage(n,r),n,r,e)}function uu(){var n,t;return n=zo,ma(),(t=au())!==o?(ma(),Go=n,n=Xt(t)):(zo=n,n=o),n}function iu(){var n,t,r,e,u,i;if(n=zo,ga()!==o){for(ma(),t=[],r=au();r!==o;)t.push(r),r=zo,e=zo,u=ma(),(i=ha())!==o?e=u=[u,i,ma()]:(zo=e,e=o),e!==o&&(e=au())===o?(zo=r,r=o):r=e;r=ma(),(e=Aa())!==o?(Go=n,n=Jt(t)):(zo=n,n=o)}else zo=n,n=o;return n}function au(){var n,t,r,e,u,i;if(n=zo,(t=cu())!==o){for(r=[],e=zo,ma(),(u=Mi())!==o?(ma(),(i=cu())!==o?(Go=e,e=Qt(t,u,i)):(zo=e,e=o)):(zo=e,e=o);e!==o;)r.push(e),e=zo,ma(),(u=Mi())!==o?(ma(),(i=cu())!==o?(Go=e,e=Qt(t,u,i)):(zo=e,e=o)):(zo=e,e=o);Go=n,n=nr(t,r)}else zo=n,n=o;return n}function cu(){var n,t,r,e,u,i;if(n=zo,(t=su())!==o){for(r=[],e=zo,ma(),(u=Si())!==o?(ma(),(i=su())!==o?(Go=e,e=tr(t,u,i)):(zo=e,e=o)):(zo=e,e=o);e!==o;)r.push(e),e=zo,ma(),(u=Si())!==o?(ma(),(i=su())!==o?(Go=e,e=tr(t,u,i)):(zo=e,e=o)):(zo=e,e=o);Go=n,n=rr(t,r)}else zo=n,n=o;return n}function su(){var t,r,e,u,i;return t=zo,(r=Fi())===o&&(r=zo,33===n.charCodeAt(zo)?(e=c,zo++):(e=o,0===Wo&&ru(On)),e!==o?(u=zo,Wo++,61===n.charCodeAt(zo)?(i=s,zo++):(i=o,0===Wo&&ru(Fn)),Wo--,i===o?u=void 0:(zo=u,u=o),u!==o?r=e=[e,u]:(zo=r,r=o)):(zo=r,r=o)),r!==o?(e=ma(),(u=su())!==o?(Go=t,t=er(u)):(zo=t,t=o)):(zo=t,t=o),t===o&&(t=fu()),t}function fu(){var n,t,r,e;return n=zo,(t=Cu())!==o?(r=zo,ma(),(e=lu())!==o?r=e:(zo=r,r=o),r===o&&(r=null),Go=n,n=or(t,r)):(zo=n,n=o),n}function lu(){var n;return(n=pu())===o&&(n=mu())===o&&(n=yu())===o&&(n=du())===o&&(n=Au()),n}function pu(){var n,t,r,e,u;if(n=zo,t=[],r=zo,ma(),(e=vu())!==o?(ma(),(u=Cu())!==o?(Go=r,r=ur(e,u)):(zo=r,r=o)):(zo=r,r=o),r!==o)for(;r!==o;)t.push(r),r=zo,ma(),(e=vu())!==o?(ma(),(u=Cu())!==o?(Go=r,r=ur(e,u)):(zo=r,r=o)):(zo=r,r=o);else t=o;return t!==o&&(Go=n,t=ir(t)),n=t}function vu(){var t;return n.substr(zo,2)===f?(t=f,zo+=2):(t=o,0===Wo&&ru(Sn)),t===o&&(62===n.charCodeAt(zo)?(t=l,zo++):(t=o,0===Wo&&ru(Mn)),t===o&&(n.substr(zo,2)===p?(t=p,zo+=2):(t=o,0===Wo&&ru($n)),t===o&&(n.substr(zo,2)===v?(t=v,zo+=2):(t=o,0===Wo&&ru(Un)),t===o&&(t=n.charAt(zo),An.test(t)?zo++:(t=o,0===Wo&&ru(_n)),t===o&&(n.substr(zo,2)===d?(t=d,zo+=2):(t=o,0===Wo&&ru(Dn))))))),t}function du(){var n,t,r,e;return n=zo,(t=Ii())!==o?(ma(),(r=Fi())!==o?(ma(),(e=Cu())!==o?(Go=n,n=ar(t,e)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=zo,(t=Ii())!==o?(ma(),(r=Cu())!==o?(Go=n,n=cr(t,r)):(zo=n,n=o)):(zo=n,n=o)),n}function yu(){var n,t,r,e,u,i,a,c;return n=zo,(t=Fi())!==o?(ma(),(r=$i())!==o?(e=ma(),u=zo,(i=Cu())!==o?(ma(),(a=Si())!==o?(ma(),(c=Cu())!==o?(Go=u,u=sr(r,i,c)):(zo=u,u=o)):(zo=u,u=o)):(zo=u,u=o),u!==o?(Go=n,n=fr(r,u)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=zo,(t=$i())!==o?(ma(),r=zo,(e=Cu())!==o?(u=ma(),(i=Si())!==o?(ma(),(a=Cu())!==o?(Go=r,r=lr(t,e,a)):(zo=r,r=o)):(zo=r,r=o)):(zo=r,r=o),r!==o?(Go=n,n=pr(t,r)):(zo=n,n=o)):(zo=n,n=o)),n}function hu(){var n,t,r,e,u;return n=zo,t=zo,(r=Fi())!==o?(e=ma(),(u=Ri())!==o?t=r=[r,e,u]:(zo=t,t=o)):(zo=t,t=o),t!==o&&(Go=n,t=vr(t)),(n=t)===o&&(n=Ri()),n}function gu(){var n,t,r,e,u;return n=zo,t=zo,(r=Fi())!==o?(e=ma(),(u=Ni())!==o?t=r=[r,e,u]:(zo=t,t=o)):(zo=t,t=o),t!==o&&(Go=n,t=dr(t)),(n=t)===o&&(n=Ni()),n}function Au(){var n,t,r,e;return n=zo,(t=hu())!==o?(ma(),(r=ci())!==o?(ma(),Oi()!==o?(ma(),(e=si())!==o?(Go=n,n=yr(t,r,e)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=zo,(t=hu())!==o?(ma(),(r=ci())!==o?(Go=n,n=hr(t,r)):(zo=n,n=o)):(zo=n,n=o)),n}function mu(){var n,t,r;return n=zo,(t=gu())!==o?(ma(),(r=iu())!==o?(Go=n,n=gr(t,r)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=zo,(t=gu())!==o?(ma(),(r=Hu())!==o?(Go=n,n=Ar(t,r)):(zo=n,n=o)):(zo=n,n=o)),n}function Cu(){var n,t,r,e,u,i;if(n=zo,(t=Eu())!==o){for(r=[],e=zo,ma(),(u=bu())!==o?(ma(),(i=Eu())!==o?(Go=e,e=mr(t,u,i)):(zo=e,e=o)):(zo=e,e=o);e!==o;)r.push(e),e=zo,ma(),(u=bu())!==o?(ma(),(i=Eu())!==o?(Go=e,e=mr(t,u,i)):(zo=e,e=o)):(zo=e,e=o);Go=n,n=Cr(t,r)}else zo=n,n=o;return n}function bu(){var t;return t=n.charAt(zo),mn.test(t)?zo++:(t=o,0===Wo&&ru(Hn)),t===o&&(n.substr(zo,2)===y?(t=y,zo+=2):(t=o,0===Wo&&ru(Pn))),t}function Eu(){var n,t,r,e,u,i;if(n=zo,(t=Tu())!==o){for(r=[],e=zo,ma(),(u=Lu())!==o?(ma(),(i=Tu())!==o?(Go=e,e=br(t,u,i)):(zo=e,e=o)):(zo=e,e=o);e!==o;)r.push(e),e=zo,ma(),(u=Lu())!==o?(ma(),(i=Tu())!==o?(Go=e,e=br(t,u,i)):(zo=e,e=o)):(zo=e,e=o);Go=n,n=Er(t,r)}else zo=n,n=o;return n}function Lu(){var t;return t=n.charAt(zo),Cn.test(t)?zo++:(t=o,0===Wo&&ru(jn)),t}function Tu(){var n,t;return(n=Wu())===o&&(n=Pu())===o&&(n=ju())===o&&(n=zu())===o&&(n=Bu())===o&&(n=Zu())===o&&(n=qu())===o&&(n=fi())===o&&(n=wu())===o&&(n=Hu())===o&&(n=zo,ga()!==o?(ma(),(t=au())!==o?(ma(),Aa()!==o?(Go=n,n=Lr(t)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)),n}function wu(){var n,t;return n=zo,(t=xu())!==o&&(Go=n,t=Tr(t)),(n=t)===o&&(n=zo,(t=Su())!==o&&(Go=n,t=wr(t)),n=t),n}function xu(){var n,t;return n=zo,(t=Nu())!==o&&(Go=n,t=xr(t)),n=t}function Nu(){var n,t,r,e;if(n=zo,(t=Ru())!==o){for(r=[],e=Fu();e!==o;)r.push(e),e=Fu();Go=n,n=Nr(t,r)}else zo=n,n=o;return n}function Iu(){var n,t,r,e;if(n=zo,(t=Ru())!==o){for(r=[],e=Ou();e!==o;)r.push(e),e=Ou();Go=n,n=Ir(t,r)}else zo=n,n=o;return n}function Ru(){var t;return t=n.charAt(zo),bn.test(t)?zo++:(t=o,0===Wo&&ru(Zn)),t}function Ou(){var t;return t=n.charAt(zo),En.test(t)?zo++:(t=o,0===Wo&&ru(kn)),t}function Fu(){var t;return t=n.charAt(zo),Ln.test(t)?zo++:(t=o,0===Wo&&ru(zn)),t}function Su(){var n,t;return n=zo,Du()!==o?(t=Mu(),Du()!==o?(Go=n,n=Rr(t)):(zo=n,n=o)):(zo=n,n=o),n}function Mu(){var n,t,r;for(n=zo,t=[],r=$u();r!==o;)t.push(r),r=$u();return Go=n,n=t=Or(t)}function $u(){var n;return(n=_u())===o&&(n=Uu()),n}function Uu(){var n;return n=zo,Du()!==o&&Du()!==o?(Go=n,n=Fr()):(zo=n,n=o),n}function _u(){var t;return t=n.charAt(zo),Ln.test(t)?zo++:(t=o,0===Wo&&ru(zn)),t}function Du(){var t;return t=n.charAt(zo),Tn.test(t)?zo++:(t=o,0===Wo&&ru(Gn)),t}function Hu(){var t,r,e,u;return t=zo,r=zo,64===n.charCodeAt(zo)?(e=h,zo++):(e=o,0===Wo&&ru(Bn)),e!==o&&(u=Iu())!==o?r=e=[e,u]:(zo=r,r=o),r!==o&&(Go=t,r=Sr(r)),t=r}function Pu(){var n,t,r,e;return n=zo,Hi()!==o?(ma(),t=zo,ga()!==o?(ma(),(r=Vu())!==o?(ma(),Ui()!==o?(ma(),(e=au())!==o?(ma(),Aa()!==o?(Go=t,t=Mr(r,e)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o),t===o&&(t=zo,ga()!==o?(ma(),(r=Vu())!==o?(ma(),ha()!==o?(ma(),(e=au())!==o?(ma(),Aa()!==o?(Go=t,t=$r(r,e)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)),t!==o?(Go=n,n=Ur(t)):(zo=n,n=o)):(zo=n,n=o),n}function ju(){var n,t,r,e,u,i,a;return n=zo,Di()!==o?(ma(),t=zo,ga()!==o?(ma(),(r=au())!==o?(ma(),Ui()!==o?(ma(),(e=au())!==o?(ma(),u=zo,_i()!==o?(i=ma(),(a=au())!==o?(ma(),u=a):(zo=u,u=o)):(zo=u,u=o),u===o&&(u=null),Aa()!==o?(Go=t,t=_r(r,e,u)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o),t===o&&(t=zo,ga()!==o?(ma(),(r=au())!==o?(ma(),ha()!==o?(ma(),(e=au())!==o?(ma(),(u=ha())!==o?(ma(),(i=au())!==o&&(a=Aa())!==o?(Go=t,t=Dr(r,e,i)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)),t!==o?(Go=n,n=Hr(t)):(zo=n,n=o)):(zo=n,n=o),n}function Zu(){var n,t,r,e;return n=zo,Vi()!==o?(ma(),t=zo,ga()!==o?(ma(),(r=au())!==o?(ma(),Wi()!==o?(ma(),(e=ku())!==o?(ma(),Aa()!==o?(Go=t,t=Pr(r,e)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o),t===o&&(t=zo,ga()!==o?(ma(),(r=au())!==o?(ma(),ha()!==o?(ma(),(e=ku())!==o?(ma(),Aa()!==o?(Go=t,t=jr(r,e)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)),t!==o?(Go=n,n=Zr(t)):(zo=n,n=o)):(zo=n,n=o),n}function ku(){var n,t,r;return n=zo,(t=Yi())===o&&(t=Ki()),t!==o&&(Go=n,t=kr()),(n=t)===o&&(n=zo,(t=Xi())!==o&&(Go=n,t=zr()),(n=t)===o&&(n=zo,(t=Ji())!==o&&(Go=n,t=Gr()),(n=t)===o&&(n=zo,(t=Qi())!==o&&(Go=n,t=Br()),(n=t)===o&&(n=zo,(t=ki())!==o&&(Go=n,t=qr()),(n=t)===o&&(n=zo,(t=Zi())!==o&&(Go=n,t=Vr()),(n=t)===o&&(n=zo,(t=zi())!==o&&(Go=n,t=Wr()),(n=t)===o&&(n=zo,(t=na())!==o?(ma(),ga()!==o?(ma(),(r=bi())!==o?(ma(),Aa()!==o?(Go=n,n=Yr(r)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)))))))),n}function zu(){var n,t,r,e,u;return n=zo,Pi()!==o?(ma(),t=zo,ga()!==o?(ma(),r=Gu(),ma(),(e=au())!==o?(ma(),Ui()!==o?(ma(),(u=au())!==o?(ma(),Aa()!==o?(Go=t,t=Kr(r,e,u)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o),t===o&&(t=zo,ga()!==o?(ma(),r=Gu(),ma(),(e=au())!==o?(ma(),Aa()!==o?(Go=t,t=Xr(r,e)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)),t!==o?(Go=n,n=Jr(t)):(zo=n,n=o)):(zo=n,n=o),n}function Gu(){var n,t;return n=zo,(t=Gi())===o&&(t=Bi())===o&&(t=qi()),t===o&&(t=null),Go=n,n=t=Qr(t)}function Bu(){var n,t,r,e;return n=zo,ji()!==o?(ma(),t=zo,ga()!==o?(ma(),(r=au())!==o?(ma(),Ni()!==o?(ma(),(e=au())!==o?(ma(),Aa()!==o?(Go=t,t=ne(r,e)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o),t===o&&(t=zo,ga()!==o?(ma(),(r=au())!==o?(ma(),ha()!==o?(ma(),(e=au())!==o?(ma(),Aa()!==o?(Go=t,t=te(r,e)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)),t!==o?(Go=n,n=re(t)):(zo=n,n=o)):(zo=n,n=o),n}function qu(){var n,t,r,e;return n=zo,t=zo,Wo++,r=Hi(),Wo--,r===o?t=void 0:(zo=t,t=o),t!==o&&(r=ba())!==o?(ma(),(e=iu())!==o?(Go=n,n=ee(r,e)):(zo=n,n=o)):(zo=n,n=o),n}function Vu(){var n,t;return n=zo,(t=ea())===o&&(t=ia())===o&&(t=aa())===o&&(t=ca())===o&&(t=sa())===o&&(t=fa())===o&&(t=oa())===o&&(t=ua()),t!==o&&(Go=n,t=oe(t)),n=t}function Wu(){var n;return(n=si())===o&&(n=hi())===o&&(n=ai())===o&&(n=ii())===o&&(n=ui())===o&&(n=Yu())===o&&(n=Xu())===o&&(n=Ku()),n}function Yu(){var n,t;return n=zo,Zi()!==o?(ma(),(t=ci())!==o?(Go=n,n=ue(t)):(zo=n,n=o)):(zo=n,n=o),n}function Ku(){var n,t;return n=zo,zi()!==o?(ma(),(t=ci())!==o?(Go=n,n=ie(t)):(zo=n,n=o)):(zo=n,n=o),n}function Xu(){var t,r,e,u;return t=zo,ra()!==o?(ma(),r=n.charAt(zo),mn.test(r)?zo++:(r=o,0===Wo&&ru(Hn)),r!==o?(ma(),(e=ci())!==o?(ma(),(u=Ju())!==o?(Go=t,t=ae(r,e,u)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o),t===o&&(t=zo,ra()!==o?(ma(),(r=ci())!==o?(ma(),(e=Ju())!==o?(Go=t,t=ce(r,e)):(zo=t,t=o)):(zo=t,t=o)):(zo=t,t=o)),t}function Ju(){var n,t,r;return n=zo,(t=Qu())!==o?(ma(),ta()!==o?(ma(),(r=ni())!==o?(Go=n,n=se(t,r)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=ti()),n}function Qu(){var n,t,r;return n=zo,(t=ri())!==o?(ma(),ga()!==o?(ma(),(r=oi())!==o?(ma(),Aa()!==o?(Go=n,n=fe(t,r)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=zo,(t=ri())!==o&&(Go=n,t=le(t)),n=t),n}function ni(){var n,t,r,e;return n=zo,(t=ri())!==o&&(Go=n,t=pe(t)),(n=t)===o&&(n=zo,(t=fa())!==o?(ma(),ga()!==o?(ma(),(r=oi())!==o?(ma(),ha()!==o?(ma(),(e=ei())!==o?(ma(),Aa()!==o?(Go=n,n=ve(r,e)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=zo,(t=fa())!==o?(ma(),ga()!==o?(ma(),(r=oi())!==o?(ma(),Aa()!==o?(Go=n,n=de(r)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=zo,(t=fa())!==o&&(Go=n,t=ye()),n=t))),n}function ti(){var n,t,r,e;return n=zo,(t=ri())!==o?(ma(),ga()!==o?(ma(),(r=ei())!==o?(ma(),Aa()!==o?(Go=n,n=he(t,r)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=zo,(t=ri())!==o&&(Go=n,t=ge(t)),(n=t)===o&&(n=zo,(t=fa())!==o?(ma(),ga()!==o?(ma(),(r=oi())!==o?(ma(),ha()!==o?(ma(),(e=ei())!==o?(ma(),Aa()!==o?(Go=n,n=Ae(r,e)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=zo,(t=fa())!==o?(ma(),ga()!==o?(ma(),(r=ei())!==o?(ma(),Aa()!==o?(Go=n,n=me(r)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n===o&&(n=zo,(t=fa())!==o&&(Go=n,t=Ce()),n=t)))),n}function ri(){var n,t;return n=zo,(t=aa())!==o&&(Go=n,t=be()),(n=t)===o&&(n=zo,(t=ca())!==o&&(Go=n,t=Ee()),(n=t)===o&&(n=zo,(t=sa())!==o&&(Go=n,t=Le()),(n=t)===o&&(n=zo,(t=ia())!==o&&(Go=n,t=Te()),(n=t)===o&&(n=zo,(t=ea())!==o&&(Go=n,t=we()),n=t)))),n}function ei(){var n,t;return n=zo,(t=bi())!==o&&(Go=n,t=xe(t)),n=t}function oi(){var n,t;return n=zo,(t=bi())!==o&&(Go=n,t=Ne(t)),n=t}function ui(){var n,t;return n=zo,ki()!==o?(ma(),(t=ci())!==o?(Go=n,n=Ie(t)):(zo=n,n=o)):(zo=n,n=o),n}function ii(){var n,t;return n=zo,(t=Ti())!==o&&(Go=n,t=Re()),n=t}function ai(){var n,t;return n=zo,(t=wi())!==o&&(Go=n,t=Oe()),(n=t)===o&&(n=zo,(t=xi())!==o&&(Go=n,t=Fe()),n=t),n}function ci(){var n;return(n=si())===o&&(n=Hu()),n}function si(){var t,r,e,u,i;if(t=zo,39===n.charCodeAt(zo)?(r=g,zo++):(r=o,0===Wo&&ru(qn)),r===o&&(n.substr(zo,2)===A?(r=A,zo+=2):(r=o,0===Wo&&ru(Vn))),r!==o){for(e=[],u=zo,n.substr(zo,2)===m?(i=m,zo+=2):(i=o,0===Wo&&ru(Wn)),i!==o&&(Go=u,i=Se()),(u=i)===o&&(u=n.charAt(zo),wn.test(u)?zo++:(u=o,0===Wo&&ru(Yn)));u!==o;)e.push(u),u=zo,n.substr(zo,2)===m?(i=m,zo+=2):(i=o,0===Wo&&ru(Wn)),i!==o&&(Go=u,i=Se()),(u=i)===o&&(u=n.charAt(zo),wn.test(u)?zo++:(u=o,0===Wo&&ru(Yn)));39===n.charCodeAt(zo)?(u=g,zo++):(u=o,0===Wo&&ru(qn)),u!==o?(Go=t,t=Me(e)):(zo=t,t=o)}else zo=t,t=o;return t}function fi(){var n;return(n=li())===o&&(n=pi()),n}function li(){var n,t,r,e,u;if(n=zo,la()!==o)if(ma(),(t=au())!==o){for(ma(),r=[],e=zo,(u=di())!==o?(ma(),e=u):(zo=e,e=o);e!==o;)r.push(e),e=zo,(u=di())!==o?(ma(),e=u):(zo=e,e=o);(e=pa())!==o?(Go=n,n=$e(t,r)):(zo=n,n=o)}else zo=n,n=o;else zo=n,n=o;if(n===o)if(n=zo,la()!==o)if(ma(),(t=au())!==o){for(ma(),r=[],e=zo,(u=di())!==o?(ma(),e=u):(zo=e,e=o);e!==o;)r.push(e),e=zo,(u=di())!==o?(ma(),e=u):(zo=e,e=o);(e=yi())!==o?(u=ma(),pa()!==o?(Go=n,n=Ue(t,r,e)):(zo=n,n=o)):(zo=n,n=o)}else zo=n,n=o;else zo=n,n=o;return n}function pi(){var n,t,r,e;if(n=zo,la()!==o){for(ma(),t=[],r=zo,(e=vi())!==o?(ma(),r=e):(zo=r,r=o);r!==o;)t.push(r),r=zo,(e=vi())!==o?(ma(),r=e):(zo=r,r=o);(r=pa())!==o?(Go=n,n=_e(t)):(zo=n,n=o)}else zo=n,n=o;if(n===o)if(n=zo,la()!==o){for(ma(),t=[],r=zo,(e=vi())!==o?(ma(),r=e):(zo=r,r=o);r!==o;)t.push(r),r=zo,(e=vi())!==o?(ma(),r=e):(zo=r,r=o);(r=yi())!==o?(e=ma(),pa()!==o?(Go=n,n=De(t,r)):(zo=n,n=o)):(zo=n,n=o)}else zo=n,n=o;return n}function vi(){var n,t,r;return n=zo,va()!==o?(ma(),(t=au())!==o?(ma(),da()!==o?(ma(),(r=au())!==o?(Go=n,n=He(t,r)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n}function di(){var n,t,r;return n=zo,va()!==o?(ma(),(t=au())!==o?(ma(),da()!==o?(ma(),(r=au())!==o?(Go=n,n=Pe(t,r)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o)):(zo=n,n=o),n}function yi(){var n,t;return n=zo,ya()!==o?(ma(),(t=au())!==o?(Go=n,n=je(t)):(zo=n,n=o)):(zo=n,n=o),n}function hi(){var n,t,r,e;return n=zo,(t=gi())!==o?(r=zo,Wo++,e=Ru(),Wo--,e===o?r=void 0:(zo=r,r=o),r!==o?(Go=n,n=Ze(t)):(zo=n,n=o)):(zo=n,n=o),n}function gi(){var n,t,r,e;return n=zo,(t=Ai())!==o&&(r=mi())!==o&&(e=Ci())!==o?(Go=n,n=ke(t,r,e)):(zo=n,n=o),n===o&&(n=zo,(t=Ai())!==o&&(r=mi())!==o?(Go=n,n=ze(t,r)):(zo=n,n=o),n===o&&(n=zo,(t=Ai())!==o&&(r=Ci())!==o?(Go=n,n=Ge(t,r)):(zo=n,n=o),n===o&&(n=zo,(t=Ai())!==o&&(Go=n,t=Be(t)),n=t))),n}function Ai(){var t,r,e;return(t=bi())===o&&(t=zo,r=n.charAt(zo),mn.test(r)?zo++:(r=o,0===Wo&&ru(Hn)),r!==o&&(e=bi())!==o?(Go=t,t=qe(r,e)):(zo=t,t=o)),t}function mi(){var t,r,e;return t=zo,46===n.charCodeAt(zo)?(r=C,zo++):(r=o,0===Wo&&ru(Kn)),r!==o?((e=bi())===o&&(e=null),Go=t,t=Ve(e)):(zo=t,t=o),t}function Ci(){var n,t,r;return n=zo,(t=Li())!==o&&(r=bi())!==o?(Go=n,n=We(t,r)):(zo=n,n=o),n}function bi(){var n,t,r;if(n=zo,t=[],(r=Ei())!==o)for(;r!==o;)t.push(r),r=Ei();else t=o;return t!==o&&(Go=n,t=Ye(t)),n=t}function Ei(){var t;return t=n.charAt(zo),xn.test(t)?zo++:(t=o,0===Wo&&ru(Xn)),t}function Li(){var t,r,e;return t=zo,r=n.charAt(zo),Nn.test(r)?zo++:(r=o,0===Wo&&ru(Jn)),r!==o?(e=n.charAt(zo),mn.test(e)?zo++:(e=o,0===Wo&&ru(Hn)),e===o&&(e=null),Go=t,t=Ke(r,e)):(zo=t,t=o),t}function Ti(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===b?zo+=4:(r=o,0===Wo&&ru(Qn)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?t=r=[r,e]:(zo=t,t=o)):(zo=t,t=o),t}function wi(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===E?zo+=4:(r=o,0===Wo&&ru(nt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?t=r=[r,e]:(zo=t,t=o)):(zo=t,t=o),t}function xi(){var t,r,e,u;return t=zo,(r=n.substr(zo,5)).toLowerCase()===L?zo+=5:(r=o,0===Wo&&ru(tt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?t=r=[r,e]:(zo=t,t=o)):(zo=t,t=o),t}function Ni(){var t,r,e,u;return t=zo,(r=n.substr(zo,2)).toLowerCase()===T?zo+=2:(r=o,0===Wo&&ru(rt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Xe()):(zo=t,t=o)):(zo=t,t=o),t}function Ii(){var t,r,e,u;return t=zo,(r=n.substr(zo,2)).toLowerCase()===w?zo+=2:(r=o,0===Wo&&ru(et)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Je()):(zo=t,t=o)):(zo=t,t=o),t}function Ri(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===x?zo+=4:(r=o,0===Wo&&ru(ot)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Qe()):(zo=t,t=o)):(zo=t,t=o),t}function Oi(){var t,r,e,u;return t=zo,(r=n.substr(zo,6)).toLowerCase()===N?zo+=6:(r=o,0===Wo&&ru(ut)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=no()):(zo=t,t=o)):(zo=t,t=o),t}function Fi(){var t,r,e,u;return t=zo,(r=n.substr(zo,3)).toLowerCase()===I?zo+=3:(r=o,0===Wo&&ru(it)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=to()):(zo=t,t=o)):(zo=t,t=o),t}function Si(){var t,r,e,u;return t=zo,(r=n.substr(zo,3)).toLowerCase()===R?zo+=3:(r=o,0===Wo&&ru(at)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=ro()):(zo=t,t=o)):(zo=t,t=o),t}function Mi(){var t,r,e,u;return t=zo,(r=n.substr(zo,2)).toLowerCase()===O?zo+=2:(r=o,0===Wo&&ru(ct)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=eo()):(zo=t,t=o)):(zo=t,t=o),t}function $i(){var t,r,e,u;return t=zo,(r=n.substr(zo,7)).toLowerCase()===F?zo+=7:(r=o,0===Wo&&ru(st)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=oo()):(zo=t,t=o)):(zo=t,t=o),t}function Ui(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===S?zo+=4:(r=o,0===Wo&&ru(ft)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=uo()):(zo=t,t=o)):(zo=t,t=o),t}function _i(){var t,r,e,u;return t=zo,(r=n.substr(zo,3)).toLowerCase()===M?zo+=3:(r=o,0===Wo&&ru(lt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=io()):(zo=t,t=o)):(zo=t,t=o),t}function Di(){var t,r,e,u;return t=zo,(r=n.substr(zo,9)).toLowerCase()===$?zo+=9:(r=o,0===Wo&&ru(pt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=ao()):(zo=t,t=o)):(zo=t,t=o),t}function Hi(){var t,r,e,u;return t=zo,(r=n.substr(zo,7)).toLowerCase()===U?zo+=7:(r=o,0===Wo&&ru(vt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=co()):(zo=t,t=o)):(zo=t,t=o),t}function Pi(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===_?zo+=4:(r=o,0===Wo&&ru(dt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=so()):(zo=t,t=o)):(zo=t,t=o),t}function ji(){var t,r,e,u;return t=zo,(r=n.substr(zo,8)).toLowerCase()===D?zo+=8:(r=o,0===Wo&&ru(yt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=fo()):(zo=t,t=o)):(zo=t,t=o),t}function Zi(){var t,r,e,u;return t=zo,(r=n.substr(zo,9)).toLowerCase()===H?zo+=9:(r=o,0===Wo&&ru(ht)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=lo()):(zo=t,t=o)):(zo=t,t=o),t}function ki(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===P?zo+=4:(r=o,0===Wo&&ru(gt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=po()):(zo=t,t=o)):(zo=t,t=o),t}function zi(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===j?zo+=4:(r=o,0===Wo&&ru(At)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=vo()):(zo=t,t=o)):(zo=t,t=o),t}function Gi(){var t,r,e,u;return t=zo,(r=n.substr(zo,7)).toLowerCase()===Z?zo+=7:(r=o,0===Wo&&ru(mt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=yo()):(zo=t,t=o)):(zo=t,t=o),t}function Bi(){var t,r,e,u;return t=zo,(r=n.substr(zo,8)).toLowerCase()===k?zo+=8:(r=o,0===Wo&&ru(Ct)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=ho()):(zo=t,t=o)):(zo=t,t=o),t}function qi(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===z?zo+=4:(r=o,0===Wo&&ru(bt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=go()):(zo=t,t=o)):(zo=t,t=o),t}function Vi(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===G?zo+=4:(r=o,0===Wo&&ru(Et)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Ao()):(zo=t,t=o)):(zo=t,t=o),t}function Wi(){var t,r,e,u;return t=zo,(r=n.substr(zo,2)).toLowerCase()===B?zo+=2:(r=o,0===Wo&&ru(Lt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=mo()):(zo=t,t=o)):(zo=t,t=o),t}function Yi(){var t,r,e,u;return t=zo,(r=n.substr(zo,7)).toLowerCase()===q?zo+=7:(r=o,0===Wo&&ru(Tt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Co()):(zo=t,t=o)):(zo=t,t=o),t}function Ki(){var t,r,e,u;return t=zo,(r=n.substr(zo,3)).toLowerCase()===V?zo+=3:(r=o,0===Wo&&ru(wt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=bo()):(zo=t,t=o)):(zo=t,t=o),t}function Xi(){var t,r,e,u;return t=zo,(r=n.substr(zo,8)).toLowerCase()===W?zo+=8:(r=o,0===Wo&&ru(xt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Eo()):(zo=t,t=o)):(zo=t,t=o),t}function Ji(){var t,r,e,u;return t=zo,(r=n.substr(zo,5)).toLowerCase()===Y?zo+=5:(r=o,0===Wo&&ru(Nt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Lo()):(zo=t,t=o)):(zo=t,t=o),t}function Qi(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===K?zo+=4:(r=o,0===Wo&&ru(It)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=To()):(zo=t,t=o)):(zo=t,t=o),t}function na(){var t,r,e,u;return t=zo,(r=n.substr(zo,7)).toLowerCase()===X?zo+=7:(r=o,0===Wo&&ru(Rt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=wo()):(zo=t,t=o)):(zo=t,t=o),t}function ta(){var t,r,e,u;return t=zo,(r=n.substr(zo,2)).toLowerCase()===J?zo+=2:(r=o,0===Wo&&ru(Ot)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=xo()):(zo=t,t=o)):(zo=t,t=o),t}function ra(){var t,r,e,u;return t=zo,(r=n.substr(zo,8)).toLowerCase()===Q?zo+=8:(r=o,0===Wo&&ru(Ft)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=No()):(zo=t,t=o)):(zo=t,t=o),t}function ea(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===nn?zo+=4:(r=o,0===Wo&&ru(St)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Io()):(zo=t,t=o)):(zo=t,t=o),t}function oa(){var t,r,e,u;return t=zo,(r=n.substr(zo,13)).toLowerCase()===tn?zo+=13:(r=o,0===Wo&&ru(Mt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Ro()):(zo=t,t=o)):(zo=t,t=o),t}function ua(){var t,r,e,u;return t=zo,(r=n.substr(zo,15)).toLowerCase()===rn?zo+=15:(r=o,0===Wo&&ru($t)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Oo()):(zo=t,t=o)):(zo=t,t=o),t}function ia(){var t,r,e,u;return t=zo,(r=n.substr(zo,5)).toLowerCase()===en?zo+=5:(r=o,0===Wo&&ru(Ut)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Fo()):(zo=t,t=o)):(zo=t,t=o),t}function aa(){var t,r,e,u;return t=zo,(r=n.substr(zo,3)).toLowerCase()===on?zo+=3:(r=o,0===Wo&&ru(_t)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=So()):(zo=t,t=o)):(zo=t,t=o),t}function ca(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===un?zo+=4:(r=o,0===Wo&&ru(Dt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Mo()):(zo=t,t=o)):(zo=t,t=o),t}function sa(){var t,r,e,u;return t=zo,(r=n.substr(zo,6)).toLowerCase()===an?zo+=6:(r=o,0===Wo&&ru(Ht)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=$o()):(zo=t,t=o)):(zo=t,t=o),t}function fa(){var t,r,e,u;return t=zo,(r=n.substr(zo,6)).toLowerCase()===cn?zo+=6:(r=o,0===Wo&&ru(Pt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Uo()):(zo=t,t=o)):(zo=t,t=o),t}function la(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===sn?zo+=4:(r=o,0===Wo&&ru(jt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=_o()):(zo=t,t=o)):(zo=t,t=o),t}function pa(){var t,r,e,u;return t=zo,(r=n.substr(zo,3)).toLowerCase()===fn?zo+=3:(r=o,0===Wo&&ru(Zt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Do()):(zo=t,t=o)):(zo=t,t=o),t}function va(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===ln?zo+=4:(r=o,0===Wo&&ru(kt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Ho()):(zo=t,t=o)):(zo=t,t=o),t}function da(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===pn?zo+=4:(r=o,0===Wo&&ru(zt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=Po()):(zo=t,t=o)):(zo=t,t=o),t}function ya(){var t,r,e,u;return t=zo,(r=n.substr(zo,4)).toLowerCase()===vn?zo+=4:(r=o,0===Wo&&ru(Gt)),r!==o?(e=zo,Wo++,u=Ou(),Wo--,u===o?e=void 0:(zo=e,e=o),e!==o?(Go=t,t=jo()):(zo=t,t=o)):(zo=t,t=o),t}function ha(){var t;return 44===n.charCodeAt(zo)?(t=dn,zo++):(t=o,0===Wo&&ru(Bt)),t}function ga(){var t;return 40===n.charCodeAt(zo)?(t=yn,zo++):(t=o,0===Wo&&ru(qt)),t}function Aa(){var t;return 41===n.charCodeAt(zo)?(t=hn,zo++):(t=o,0===Wo&&ru(Vt)),t}function ma(){var n,t;for(n=[],t=Ca();t!==o;)n.push(t),t=Ca();return n}function Ca(){var t;return t=n.charAt(zo),In.test(t)?zo++:(t=o,0===Wo&&ru(Wt)),t}function ba(){var t,r,e,u;if(t=zo,(r=Iu())!==o&&(Go=t,r=Zo(r)),(t=r)===o)if(t=zo,96===n.charCodeAt(zo)?(r=gn,zo++):(r=o,0===Wo&&ru(Yt)),r!==o){if(e=[],u=n.charAt(zo),Rn.test(u)?zo++:(u=o,0===Wo&&ru(Kt)),u!==o)for(;u!==o;)e.push(u),u=n.charAt(zo),Rn.test(u)?zo++:(u=o,0===Wo&&ru(Kt));else e=o;e!==o?(96===n.charCodeAt(zo)?(u=gn,zo++):(u=o,0===Wo&&ru(Yt)),u!==o?(Go=t,t=ko(e)):(zo=t,t=o)):(zo=t,t=o)}else zo=t,t=o;return t}function Ea(n,t,r){return{type:"unary-expression",location:r,operator:n,expr:t}}function La(n,t,r,e,o){const u={type:"binary-expression",location:o,operator:n,left:t,right:r};return void 0!==e&&(u.escape=e),u}function Ta(n,...t){return{type:"expression-list",location:n,value:t}}function wa(n,t){let r=n;for(const{op:e,expr:o,location:{end:u}}of t)r=La(e,r,o,void 0,{...r.location,end:u});return r}function xa(n){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(n)&&Ko("Timestamp literal is invalid")}function Na(n){!0!==/^(\d{1,2}):(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/.test(n)&&Ko("Time literal is invalid")}function Ia(n){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(n)&&Ko("Date literal is invalid")}if(e=a(),r.peg$library)return{peg$result:e,peg$currPos:zo,peg$FAILED:o,peg$maxFailExpected:Vo,peg$maxFailPos:qo};if(e!==o&&zo===n.length)return e;throw e!==o&&zo<n.length&&ru(Qo()),ou(Vo,qo<n.length?n.charAt(qo):null,qo<n.length?tu(qo,qo+1):tu(qo,qo))}n(t,Error),t.prototype.format=function(n){var t="Error: "+this.message;if(this.location){var e,o=null;for(e=0;e<n.length;e++)if(n[e].source===this.location.source){o=n[e].text.split(/\r\n|\n|\r/g);break}var u=this.location.start,i=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(u):u,a=this.location.source+":"+i.line+":"+i.column;if(o){var c=this.location.end,s=r("",i.line.toString().length," "),f=o[u.line-1],l=(u.line===c.line?c.column:f.length+1)-u.column||1;t+="\n --\x3e "+a+"\n"+s+" |\n"+i.line+" | "+f+"\n"+s+" | "+r("",u.column-1," ")+r("",l,"^")}else t+="\n at "+a}return t},t.buildMessage=function(n,t){var r={literal:function(n){return'"'+o(n.text)+'"'},class:function(n){var t=n.parts.map((function(n){return Array.isArray(n)?u(n[0])+"-"+u(n[1]):u(n)}));return"["+(n.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(n){return n.description}};function e(n){return n.charCodeAt(0).toString(16).toUpperCase()}function o(n){return n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(n){return"\\x0"+e(n)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(n){return"\\x"+e(n)}))}function u(n){return n.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(n){return"\\x0"+e(n)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(n){return"\\x"+e(n)}))}function i(n){return r[n.type](n)}function a(n){var t,r,e=n.map(i);if(e.sort(),e.length>0){for(t=1,r=1;t<e.length;t++)e[t-1]!==e[t]&&(e[r]=e[t],r++);e.length=r}switch(e.length){case 1:return e[0];case 2:return e[0]+" or "+e[1];default:return e.slice(0,-1).join(", ")+", or "+e[e.length-1]}}function c(n){return n?'"'+o(n)+'"':"end of input"}return"Expected "+a(n)+" but "+c(t)+" found."};class o{static parse(n){return e(n)}}function u(n,t){if(null!=n)switch(t(n),n.type){case"when-clause":u(n.operand,t),u(n.value,t);break;case"case-expression":for(const r of n.clauses)u(r,t);"simple"===n.format&&u(n.operand,t),null!==n.else&&u(n.else,t);break;case"expression-list":for(const r of n.value)u(r,t);break;case"unary-expression":u(n.expr,t);break;case"binary-expression":u(n.left,t),u(n.right,t);break;case"function":u(n.args,t);break;case"interval":u(n.value,t),u(n.qualifier,t);break;case"interval-qualifier":u(n.start,t),u(n.end,t)}}export{o as WhereGrammar,u as visitAll};