@dolthub/web-utils 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/index.d.ts +20 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/index.d.ts +20 -0
- package/dist/index.d.ts +266 -3
- package/package.json +7 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";exports.compareArray=function(r,t){if(r.length!==t.length)return!1;const e=r.sort(),n=t.sort();for(let t=0;t<r.length;t++)if(e[t]!==n[t])return!1;return!0},exports.dedupe=function(r){return Array.from(new Set(r))},exports.enumKeys=function(r){return Object.keys(r).filter((r=>Number.isNaN(+r))).map((r=>r))},exports.excerpt=(r,t=100)=>r.length<t?r:((r,t)=>`${r.slice(0,t-1)}…`)(r,t),exports.initialUppercase=function(r){const[t,...e]=r;return[t.toLocaleUpperCase(),...e].join("")},exports.nTimes=function(r,t,e=[]){const n=[];for(let o=0;o<r;o++)n.push(t(...e));return n},exports.nTimesWithIndex=function(r,t){const e=[];for(let n=0;n<r;n++)e.push(t(n));return e},exports.prettyJSON=function(r){try{return JSON.stringify(r,null,2)}catch(t){return console.error(t),`${r}`}},exports.prettyJSONText=function(r){try{return JSON.stringify(JSON.parse(r),null,2)}catch(t){return console.error(t),r}},exports.randomArrayItem=function(r){if(0===r.length)throw new Error("Can't take random element of empty array");return r[Math.floor(Math.random()*r.length)]},exports.safeJSONParse=function(r){try{return JSON.parse(r)}catch(t){return r}},exports.tuplify=function(...r){return r};
|
|
1
|
+
"use strict";var r=["second","minute","hour","day","week","month","year"];var t=["秒","分钟","小时","天","周","个月","年"];var e={},n=function(r,t){e[r]=t},s=[60,60,24,7,365/7/12,12];function o(r){return r instanceof Date?r:!isNaN(r)||/^\d+$/.test(r)?new Date(parseInt(r)):(r=(r||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(r))}var u=function(r,t,n){var u=function(r,t){return(+(t?o(t):new Date)-+o(r))/1e3}(r,n&&n.relativeDate);return function(r,t){for(var e=r<0?1:0,n=r=Math.abs(r),o=0;r>=s[o]&&o<s.length;o++)r/=s[o];return(r=Math.floor(r))>(0==(o*=2)?9:1)&&(o+=1),t(r,o,n)[e].replace("%s",r.toString())}(u,function(r){return e[r]||e.en_US}(t))};n("en_US",(function(t,e){if(0===e)return["just now","right now"];var n=r[Math.floor(e/2)];return t>1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]})),n("zh_CN",(function(r,e){if(0===e)return["刚刚","片刻后"];var n=t[~~(e/2)];return[r+" "+n+"前",r+" "+n+"后"]}));function a(r){const t=l(r.getUTCMonth()+1),e=l(r.getUTCDate());return`${r.getUTCFullYear()}-${t}-${e}`}function i(r){const t=r.getUTCHours(),e=r.getUTCMinutes();return`${l(t)}:${l(e)}`}function l(r){return r<10?`0${r}`:String(r)}function c(){return new Date(Date.now())}const f="NULL";function b(r){return r===f}var v,p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},L={},C={exports:{}};function d(){return v||(v=1,r=C,t=function(r){var e=1e7,n=7,s=9007199254740992,o=v(s),u="0123456789abcdefghijklmnopqrstuvwxyz",a="function"==typeof BigInt;function i(r,t,e,n){return void 0===r?i[0]:void 0===t||10==+t&&!e?z(r):X(r,t,e,n)}function l(r,t){this.value=r,this.sign=t,this.isSmall=!1}function c(r){this.value=r,this.sign=r<0,this.isSmall=!0}function f(r){this.value=r}function b(r){return-s<r&&r<s}function v(r){return r<1e7?[r]:r<1e14?[r%1e7,Math.floor(r/1e7)]:[r%1e7,Math.floor(r/1e7)%1e7,Math.floor(r/1e14)]}function p(r){L(r);var t=r.length;if(t<4&&O(r,o)<0)switch(t){case 0:return 0;case 1:return r[0];case 2:return r[0]+r[1]*e;default:return r[0]+(r[1]+r[2]*e)*e}return r}function L(r){for(var t=r.length;0===r[--t];);r.length=t+1}function C(r){for(var t=new Array(r),e=-1;++e<r;)t[e]=0;return t}function d(r){return r>0?Math.floor(r):Math.ceil(r)}function w(r,t){var n,s,o=r.length,u=t.length,a=new Array(o),i=0,l=e;for(s=0;s<u;s++)i=(n=r[s]+t[s]+i)>=l?1:0,a[s]=n-i*l;for(;s<o;)i=(n=r[s]+i)===l?1:0,a[s++]=n-i*l;return i>0&&a.push(i),a}function h(r,t){return r.length>=t.length?w(r,t):w(t,r)}function y(r,t){var n,s,o=r.length,u=new Array(o),a=e;for(s=0;s<o;s++)n=r[s]-a+t,t=Math.floor(n/a),u[s]=n-t*a,t+=1;for(;t>0;)u[s++]=t%a,t=Math.floor(t/a);return u}function E(r,t){var n,s,o=r.length,u=t.length,a=new Array(o),i=0,l=e;for(n=0;n<u;n++)(s=r[n]-i-t[n])<0?(s+=l,i=1):i=0,a[n]=s;for(n=u;n<o;n++){if(!((s=r[n]-i)<0)){a[n++]=s;break}s+=l,a[n]=s}for(;n<o;n++)a[n]=r[n];return L(a),a}function A(r,t,n){var s,o,u=r.length,a=new Array(u),i=-t,f=e;for(s=0;s<u;s++)o=r[s]+i,i=Math.floor(o/f),o%=f,a[s]=o<0?o+f:o;return"number"==typeof(a=p(a))?(n&&(a=-a),new c(a)):new l(a,n)}function m(r,t){var n,s,o,u,a=r.length,i=t.length,l=C(a+i),c=e;for(o=0;o<a;++o){u=r[o];for(var f=0;f<i;++f)n=u*t[f]+l[o+f],s=Math.floor(n/c),l[o+f]=n-s*c,l[o+f+1]+=s}return L(l),l}function T(r,t){var n,s,o=r.length,u=new Array(o),a=e,i=0;for(s=0;s<o;s++)n=r[s]*t+i,i=Math.floor(n/a),u[s]=n-i*a;for(;i>0;)u[s++]=i%a,i=Math.floor(i/a);return u}function I(r,t){for(var e=[];t-- >0;)e.push(0);return e.concat(r)}function N(r,t){var e=Math.max(r.length,t.length);if(e<=30)return m(r,t);e=Math.ceil(e/2);var n=r.slice(e),s=r.slice(0,e),o=t.slice(e),u=t.slice(0,e),a=N(s,u),i=N(n,o),l=N(h(s,n),h(u,o)),c=h(h(a,I(E(E(l,a),i),e)),I(i,2*e));return L(c),c}function R(r,t,n){return new l(r<e?T(t,r):m(t,v(r)),n)}function S(r){var t,n,s,o,u=r.length,a=C(u+u),i=e;for(s=0;s<u;s++){n=0-(o=r[s])*o;for(var l=s;l<u;l++)t=o*r[l]*2+a[s+l]+n,n=Math.floor(t/i),a[s+l]=t-n*i;a[s+u]=n}return L(a),a}function _(r,t){var n,s,o,u,a=r.length,i=C(a),l=e;for(o=0,n=a-1;n>=0;--n)o=(u=o*l+r[n])-(s=d(u/t))*t,i[n]=0|s;return[i,0|o]}function g(r,t){var n,s=z(t);if(a)return[new f(r.value/s.value),new f(r.value%s.value)];var o,u=r.value,b=s.value;if(0===b)throw new Error("Cannot divide by zero");if(r.isSmall)return s.isSmall?[new c(d(u/b)),new c(u%b)]:[i[0],r];if(s.isSmall){if(1===b)return[r,i[0]];if(-1==b)return[r.negate(),i[0]];var w=Math.abs(b);if(w<e){o=p((n=_(u,w))[0]);var h=n[1];return r.sign&&(h=-h),"number"==typeof o?(r.sign!==s.sign&&(o=-o),[new c(o),new c(h)]):[new l(o,r.sign!==s.sign),new c(h)]}b=v(w)}var y=O(u,b);if(-1===y)return[i[0],r];if(0===y)return[i[r.sign===s.sign?1:-1],i[0]];n=u.length+b.length<=200?function(r,t){var n,s,o,u,a,i,l,c=r.length,f=t.length,b=e,v=C(t.length),L=t[f-1],d=Math.ceil(b/(2*L)),w=T(r,d),h=T(t,d);for(w.length<=c&&w.push(0),h.push(0),L=h[f-1],s=c-f;s>=0;s--){for(n=b-1,w[s+f]!==L&&(n=Math.floor((w[s+f]*b+w[s+f-1])/L)),o=0,u=0,i=h.length,a=0;a<i;a++)o+=n*h[a],l=Math.floor(o/b),u+=w[s+a]-(o-l*b),o=l,u<0?(w[s+a]=u+b,u=-1):(w[s+a]=u,u=0);for(;0!==u;){for(n-=1,o=0,a=0;a<i;a++)(o+=w[s+a]-b+h[a])<0?(w[s+a]=o+b,o=0):(w[s+a]=o,o=1);u+=o}v[s]=n}return w=_(w,d)[0],[p(v),p(w)]}(u,b):function(r,t){for(var n,s,o,u,a,i=r.length,l=t.length,c=[],f=[],b=e;i;)if(f.unshift(r[--i]),L(f),O(f,t)<0)c.push(0);else{o=f[(s=f.length)-1]*b+f[s-2],u=t[l-1]*b+t[l-2],s>l&&(o=(o+1)*b),n=Math.ceil(o/u);do{if(O(a=T(t,n),f)<=0)break;n--}while(n);c.push(n),f=E(f,a)}return c.reverse(),[p(c),p(f)]}(u,b),o=n[0];var A=r.sign!==s.sign,m=n[1],I=r.sign;return"number"==typeof o?(A&&(o=-o),o=new c(o)):o=new l(o,A),"number"==typeof m?(I&&(m=-m),m=new c(m)):m=new l(m,I),[o,m]}function O(r,t){if(r.length!==t.length)return r.length>t.length?1:-1;for(var e=r.length-1;e>=0;e--)if(r[e]!==t[e])return r[e]>t[e]?1:-1;return 0}function x(r){var t=r.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function U(r,e){for(var n,s,o,u=r.prev(),a=u,i=0;a.isEven();)a=a.divide(2),i++;r:for(s=0;s<e.length;s++)if(!r.lesser(e[s])&&!(o=t(e[s]).modPow(a,r)).isUnit()&&!o.equals(u)){for(n=i-1;0!=n;n--){if((o=o.square().mod(r)).isUnit())return!1;if(o.equals(u))continue r}return!1}return!0}l.prototype=Object.create(i.prototype),c.prototype=Object.create(i.prototype),f.prototype=Object.create(i.prototype),l.prototype.add=function(r){var t=z(r);if(this.sign!==t.sign)return this.subtract(t.negate());var e=this.value,n=t.value;return t.isSmall?new l(y(e,Math.abs(n)),this.sign):new l(h(e,n),this.sign)},l.prototype.plus=l.prototype.add,c.prototype.add=function(r){var t=z(r),e=this.value;if(e<0!==t.sign)return this.subtract(t.negate());var n=t.value;if(t.isSmall){if(b(e+n))return new c(e+n);n=v(Math.abs(n))}return new l(y(n,Math.abs(e)),e<0)},c.prototype.plus=c.prototype.add,f.prototype.add=function(r){return new f(this.value+z(r).value)},f.prototype.plus=f.prototype.add,l.prototype.subtract=function(r){var t=z(r);if(this.sign!==t.sign)return this.add(t.negate());var e=this.value,n=t.value;return t.isSmall?A(e,Math.abs(n),this.sign):function(r,t,e){var n;return O(r,t)>=0?n=E(r,t):(n=E(t,r),e=!e),"number"==typeof(n=p(n))?(e&&(n=-n),new c(n)):new l(n,e)}(e,n,this.sign)},l.prototype.minus=l.prototype.subtract,c.prototype.subtract=function(r){var t=z(r),e=this.value;if(e<0!==t.sign)return this.add(t.negate());var n=t.value;return t.isSmall?new c(e-n):A(n,Math.abs(e),e>=0)},c.prototype.minus=c.prototype.subtract,f.prototype.subtract=function(r){return new f(this.value-z(r).value)},f.prototype.minus=f.prototype.subtract,l.prototype.negate=function(){return new l(this.value,!this.sign)},c.prototype.negate=function(){var r=this.sign,t=new c(-this.value);return t.sign=!r,t},f.prototype.negate=function(){return new f(-this.value)},l.prototype.abs=function(){return new l(this.value,!1)},c.prototype.abs=function(){return new c(Math.abs(this.value))},f.prototype.abs=function(){return new f(this.value>=0?this.value:-this.value)},l.prototype.multiply=function(r){var t,n,s,o=z(r),u=this.value,a=o.value,c=this.sign!==o.sign;if(o.isSmall){if(0===a)return i[0];if(1===a)return this;if(-1===a)return this.negate();if((t=Math.abs(a))<e)return new l(T(u,t),c);a=v(t)}return n=u.length,s=a.length,new l(-.012*n-.012*s+15e-6*n*s>0?N(u,a):m(u,a),c)},l.prototype.times=l.prototype.multiply,c.prototype._multiplyBySmall=function(r){return b(r.value*this.value)?new c(r.value*this.value):R(Math.abs(r.value),v(Math.abs(this.value)),this.sign!==r.sign)},l.prototype._multiplyBySmall=function(r){return 0===r.value?i[0]:1===r.value?this:-1===r.value?this.negate():R(Math.abs(r.value),this.value,this.sign!==r.sign)},c.prototype.multiply=function(r){return z(r)._multiplyBySmall(this)},c.prototype.times=c.prototype.multiply,f.prototype.multiply=function(r){return new f(this.value*z(r).value)},f.prototype.times=f.prototype.multiply,l.prototype.square=function(){return new l(S(this.value),!1)},c.prototype.square=function(){var r=this.value*this.value;return b(r)?new c(r):new l(S(v(Math.abs(this.value))),!1)},f.prototype.square=function(r){return new f(this.value*this.value)},l.prototype.divmod=function(r){var t=g(this,r);return{quotient:t[0],remainder:t[1]}},f.prototype.divmod=c.prototype.divmod=l.prototype.divmod,l.prototype.divide=function(r){return g(this,r)[0]},f.prototype.over=f.prototype.divide=function(r){return new f(this.value/z(r).value)},c.prototype.over=c.prototype.divide=l.prototype.over=l.prototype.divide,l.prototype.mod=function(r){return g(this,r)[1]},f.prototype.mod=f.prototype.remainder=function(r){return new f(this.value%z(r).value)},c.prototype.remainder=c.prototype.mod=l.prototype.remainder=l.prototype.mod,l.prototype.pow=function(r){var t,e,n,s=z(r),o=this.value,u=s.value;if(0===u)return i[1];if(0===o)return i[0];if(1===o)return i[1];if(-1===o)return s.isEven()?i[1]:i[-1];if(s.sign)return i[0];if(!s.isSmall)throw new Error("The exponent "+s.toString()+" is too large.");if(this.isSmall&&b(t=Math.pow(o,u)))return new c(d(t));for(e=this,n=i[1];!0&u&&(n=n.times(e),--u),0!==u;)u/=2,e=e.square();return n},c.prototype.pow=l.prototype.pow,f.prototype.pow=function(r){var t=z(r),e=this.value,n=t.value,s=BigInt(0),o=BigInt(1),u=BigInt(2);if(n===s)return i[1];if(e===s)return i[0];if(e===o)return i[1];if(e===BigInt(-1))return t.isEven()?i[1]:i[-1];if(t.isNegative())return new f(s);for(var a=this,l=i[1];(n&o)===o&&(l=l.times(a),--n),n!==s;)n/=u,a=a.square();return l},l.prototype.modPow=function(r,t){if(r=z(r),(t=z(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var e=i[1],n=this.mod(t);for(r.isNegative()&&(r=r.multiply(i[-1]),n=n.modInv(t));r.isPositive();){if(n.isZero())return i[0];r.isOdd()&&(e=e.multiply(n).mod(t)),r=r.divide(2),n=n.square().mod(t)}return e},f.prototype.modPow=c.prototype.modPow=l.prototype.modPow,l.prototype.compareAbs=function(r){var t=z(r),e=this.value,n=t.value;return t.isSmall?1:O(e,n)},c.prototype.compareAbs=function(r){var t=z(r),e=Math.abs(this.value),n=t.value;return t.isSmall?e===(n=Math.abs(n))?0:e>n?1:-1:-1},f.prototype.compareAbs=function(r){var t=this.value,e=z(r).value;return(t=t>=0?t:-t)===(e=e>=0?e:-e)?0:t>e?1:-1},l.prototype.compare=function(r){if(r===1/0)return-1;if(r===-1/0)return 1;var t=z(r),e=this.value,n=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:O(e,n)*(this.sign?-1:1)},l.prototype.compareTo=l.prototype.compare,c.prototype.compare=function(r){if(r===1/0)return-1;if(r===-1/0)return 1;var t=z(r),e=this.value,n=t.value;return t.isSmall?e==n?0:e>n?1:-1:e<0!==t.sign?e<0?-1:1:e<0?1:-1},c.prototype.compareTo=c.prototype.compare,f.prototype.compare=function(r){if(r===1/0)return-1;if(r===-1/0)return 1;var t=this.value,e=z(r).value;return t===e?0:t>e?1:-1},f.prototype.compareTo=f.prototype.compare,l.prototype.equals=function(r){return 0===this.compare(r)},f.prototype.eq=f.prototype.equals=c.prototype.eq=c.prototype.equals=l.prototype.eq=l.prototype.equals,l.prototype.notEquals=function(r){return 0!==this.compare(r)},f.prototype.neq=f.prototype.notEquals=c.prototype.neq=c.prototype.notEquals=l.prototype.neq=l.prototype.notEquals,l.prototype.greater=function(r){return this.compare(r)>0},f.prototype.gt=f.prototype.greater=c.prototype.gt=c.prototype.greater=l.prototype.gt=l.prototype.greater,l.prototype.lesser=function(r){return this.compare(r)<0},f.prototype.lt=f.prototype.lesser=c.prototype.lt=c.prototype.lesser=l.prototype.lt=l.prototype.lesser,l.prototype.greaterOrEquals=function(r){return this.compare(r)>=0},f.prototype.geq=f.prototype.greaterOrEquals=c.prototype.geq=c.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals,l.prototype.lesserOrEquals=function(r){return this.compare(r)<=0},f.prototype.leq=f.prototype.lesserOrEquals=c.prototype.leq=c.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals,l.prototype.isEven=function(){return 0==(1&this.value[0])},c.prototype.isEven=function(){return 0==(1&this.value)},f.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},l.prototype.isOdd=function(){return 1==(1&this.value[0])},c.prototype.isOdd=function(){return 1==(1&this.value)},f.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},l.prototype.isPositive=function(){return!this.sign},c.prototype.isPositive=function(){return this.value>0},f.prototype.isPositive=c.prototype.isPositive,l.prototype.isNegative=function(){return this.sign},c.prototype.isNegative=function(){return this.value<0},f.prototype.isNegative=c.prototype.isNegative,l.prototype.isUnit=function(){return!1},c.prototype.isUnit=function(){return 1===Math.abs(this.value)},f.prototype.isUnit=function(){return this.abs().value===BigInt(1)},l.prototype.isZero=function(){return!1},c.prototype.isZero=function(){return 0===this.value},f.prototype.isZero=function(){return this.value===BigInt(0)},l.prototype.isDivisibleBy=function(r){var t=z(r);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},f.prototype.isDivisibleBy=c.prototype.isDivisibleBy=l.prototype.isDivisibleBy,l.prototype.isPrime=function(e){var n=x(this);if(n!==r)return n;var s=this.abs(),o=s.bitLength();if(o<=64)return U(s,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var u=Math.log(2)*o.toJSNumber(),a=Math.ceil(!0===e?2*Math.pow(u,2):u),i=[],l=0;l<a;l++)i.push(t(l+2));return U(s,i)},f.prototype.isPrime=c.prototype.isPrime=l.prototype.isPrime,l.prototype.isProbablePrime=function(e,n){var s=x(this);if(s!==r)return s;for(var o=this.abs(),u=e===r?5:e,a=[],i=0;i<u;i++)a.push(t.randBetween(2,o.minus(2),n));return U(o,a)},f.prototype.isProbablePrime=c.prototype.isProbablePrime=l.prototype.isProbablePrime,l.prototype.modInv=function(r){for(var e,n,s,o=t.zero,u=t.one,a=z(r),i=this.abs();!i.isZero();)e=a.divide(i),n=o,s=a,o=u,a=i,u=n.subtract(e.multiply(u)),i=s.subtract(e.multiply(i));if(!a.isUnit())throw new Error(this.toString()+" and "+r.toString()+" are not co-prime");return-1===o.compare(0)&&(o=o.add(r)),this.isNegative()?o.negate():o},f.prototype.modInv=c.prototype.modInv=l.prototype.modInv,l.prototype.next=function(){var r=this.value;return this.sign?A(r,1,this.sign):new l(y(r,1),this.sign)},c.prototype.next=function(){var r=this.value;return r+1<s?new c(r+1):new l(o,!1)},f.prototype.next=function(){return new f(this.value+BigInt(1))},l.prototype.prev=function(){var r=this.value;return this.sign?new l(y(r,1),!0):A(r,1,this.sign)},c.prototype.prev=function(){var r=this.value;return r-1>-s?new c(r-1):new l(o,!0)},f.prototype.prev=function(){return new f(this.value-BigInt(1))};for(var M=[1];2*M[M.length-1]<=e;)M.push(2*M[M.length-1]);var k=M.length,D=M[k-1];function $(r){return Math.abs(r)<=e}function P(r,e,n){e=z(e);for(var s=r.isNegative(),o=e.isNegative(),u=s?r.not():r,a=o?e.not():e,i=0,l=0,c=null,f=null,b=[];!u.isZero()||!a.isZero();)i=(c=g(u,D))[1].toJSNumber(),s&&(i=D-1-i),l=(f=g(a,D))[1].toJSNumber(),o&&(l=D-1-l),u=c[0],a=f[0],b.push(n(i,l));for(var v=0!==n(s?1:0,o?1:0)?t(-1):t(0),p=b.length-1;p>=0;p-=1)v=v.multiply(D).add(t(b[p]));return v}l.prototype.shiftLeft=function(r){var t=z(r).toJSNumber();if(!$(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var e=this;if(e.isZero())return e;for(;t>=k;)e=e.multiply(D),t-=k-1;return e.multiply(M[t])},f.prototype.shiftLeft=c.prototype.shiftLeft=l.prototype.shiftLeft,l.prototype.shiftRight=function(r){var t,e=z(r).toJSNumber();if(!$(e))throw new Error(String(e)+" is too large for shifting.");if(e<0)return this.shiftLeft(-e);for(var n=this;e>=k;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(t=g(n,D))[1].isNegative()?t[0].prev():t[0],e-=k-1}return(t=g(n,M[e]))[1].isNegative()?t[0].prev():t[0]},f.prototype.shiftRight=c.prototype.shiftRight=l.prototype.shiftRight,l.prototype.not=function(){return this.negate().prev()},f.prototype.not=c.prototype.not=l.prototype.not,l.prototype.and=function(r){return P(this,r,(function(r,t){return r&t}))},f.prototype.and=c.prototype.and=l.prototype.and,l.prototype.or=function(r){return P(this,r,(function(r,t){return r|t}))},f.prototype.or=c.prototype.or=l.prototype.or,l.prototype.xor=function(r){return P(this,r,(function(r,t){return r^t}))},f.prototype.xor=c.prototype.xor=l.prototype.xor;var F=1<<30,G=(e&-e)*(e&-e)|F;function j(r){var t=r.value,n="number"==typeof t?t|F:"bigint"==typeof t?t|BigInt(F):t[0]+t[1]*e|G;return n&-n}function H(r,e){if(e.compareTo(r)<=0){var n=H(r,e.square(e)),s=n.p,o=n.e,u=s.multiply(e);return u.compareTo(r)<=0?{p:u,e:2*o+1}:{p:s,e:2*o}}return{p:t(1),e:0}}function Y(r,t){return r=z(r),t=z(t),r.greater(t)?r:t}function B(r,t){return r=z(r),t=z(t),r.lesser(t)?r:t}function W(r,t){if(r=z(r).abs(),t=z(t).abs(),r.equals(t))return r;if(r.isZero())return t;if(t.isZero())return r;for(var e,n,s=i[1];r.isEven()&&t.isEven();)e=B(j(r),j(t)),r=r.divide(e),t=t.divide(e),s=s.multiply(e);for(;r.isEven();)r=r.divide(j(r));do{for(;t.isEven();)t=t.divide(j(t));r.greater(t)&&(n=t,t=r,r=n),t=t.subtract(r)}while(!t.isZero());return s.isUnit()?r:r.multiply(s)}l.prototype.bitLength=function(){var r=this;return r.compareTo(t(0))<0&&(r=r.negate().subtract(t(1))),0===r.compareTo(t(0))?t(0):t(H(r,t(2)).e).add(t(1))},f.prototype.bitLength=c.prototype.bitLength=l.prototype.bitLength;var X=function(r,t,e,n){e=e||u,r=String(r),n||(r=r.toLowerCase(),e=e.toLowerCase());var s,o=r.length,a=Math.abs(t),i={};for(s=0;s<e.length;s++)i[e[s]]=s;for(s=0;s<o;s++)if("-"!==(f=r[s])&&f in i&&i[f]>=a){if("1"===f&&1===a)continue;throw new Error(f+" is not a valid digit in base "+t+".")}t=z(t);var l=[],c="-"===r[0];for(s=c?1:0;s<r.length;s++){var f;if((f=r[s])in i)l.push(z(i[f]));else{if("<"!==f)throw new Error(f+" is not a valid character");var b=s;do{s++}while(">"!==r[s]&&s<r.length);l.push(z(r.slice(b+1,s)))}}return V(l,t,c)};function V(r,t,e){var n,s=i[0],o=i[1];for(n=r.length-1;n>=0;n--)s=s.add(r[n].times(o)),o=o.times(t);return e?s.negate():s}function q(r,e){if((e=t(e)).isZero()){if(r.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(e.equals(-1)){if(r.isZero())return{value:[0],isNegative:!1};if(r.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-r.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var n=Array.apply(null,Array(r.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return n.unshift([1]),{value:[].concat.apply([],n),isNegative:!1}}var s=!1;if(r.isNegative()&&e.isPositive()&&(s=!0,r=r.abs()),e.isUnit())return r.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(r.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:s};for(var o,u=[],a=r;a.isNegative()||a.compareAbs(e)>=0;){o=a.divmod(e),a=o.quotient;var i=o.remainder;i.isNegative()&&(i=e.minus(i).abs(),a=a.next()),u.push(i.toJSNumber())}return u.push(a.toJSNumber()),{value:u.reverse(),isNegative:s}}function K(r,t,e){var n=q(r,t);return(n.isNegative?"-":"")+n.value.map((function(r){return function(r,t){return r<(t=t||u).length?t[r]:"<"+r+">"}(r,e)})).join("")}function Z(r){if(b(+r)){var t=+r;if(t===d(t))return a?new f(BigInt(t)):new c(t);throw new Error("Invalid integer: "+r)}var e="-"===r[0];e&&(r=r.slice(1));var s=r.split(/e/i);if(s.length>2)throw new Error("Invalid integer: "+s.join("e"));if(2===s.length){var o=s[1];if("+"===o[0]&&(o=o.slice(1)),(o=+o)!==d(o)||!b(o))throw new Error("Invalid integer: "+o+" is not a valid exponent.");var u=s[0],i=u.indexOf(".");if(i>=0&&(o-=u.length-i-1,u=u.slice(0,i)+u.slice(i+1)),o<0)throw new Error("Cannot include negative exponent part for integers");r=u+=new Array(o+1).join("0")}if(!/^([0-9][0-9]*)$/.test(r))throw new Error("Invalid integer: "+r);if(a)return new f(BigInt(e?"-"+r:r));for(var v=[],p=r.length,C=n,w=p-C;p>0;)v.push(+r.slice(w,p)),(w-=C)<0&&(w=0),p-=C;return L(v),new l(v,e)}function z(r){return"number"==typeof r?function(r){if(a)return new f(BigInt(r));if(b(r)){if(r!==d(r))throw new Error(r+" is not an integer.");return new c(r)}return Z(r.toString())}(r):"string"==typeof r?Z(r):"bigint"==typeof r?new f(r):r}l.prototype.toArray=function(r){return q(this,r)},c.prototype.toArray=function(r){return q(this,r)},f.prototype.toArray=function(r){return q(this,r)},l.prototype.toString=function(t,e){if(t===r&&(t=10),10!==t||e)return K(this,t,e);for(var n,s=this.value,o=s.length,u=String(s[--o]);--o>=0;)n=String(s[o]),u+="0000000".slice(n.length)+n;return(this.sign?"-":"")+u},c.prototype.toString=function(t,e){return t===r&&(t=10),10!=t||e?K(this,t,e):String(this.value)},f.prototype.toString=c.prototype.toString,f.prototype.toJSON=l.prototype.toJSON=c.prototype.toJSON=function(){return this.toString()},l.prototype.valueOf=function(){return parseInt(this.toString(),10)},l.prototype.toJSNumber=l.prototype.valueOf,c.prototype.valueOf=function(){return this.value},c.prototype.toJSNumber=c.prototype.valueOf,f.prototype.valueOf=f.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var Q=0;Q<1e3;Q++)i[Q]=z(Q),Q>0&&(i[-Q]=z(-Q));return i.one=i[1],i.zero=i[0],i.minusOne=i[-1],i.max=Y,i.min=B,i.gcd=W,i.lcm=function(r,t){return r=z(r).abs(),t=z(t).abs(),r.divide(W(r,t)).multiply(t)},i.isInstance=function(r){return r instanceof l||r instanceof c||r instanceof f},i.randBetween=function(r,t,n){r=z(r),t=z(t);var s=n||Math.random,o=B(r,t),u=Y(r,t).subtract(o).add(1);if(u.isSmall)return o.add(Math.floor(s()*u));for(var a=q(u,e).value,l=[],c=!0,f=0;f<a.length;f++){var b=c?a[f]+(f+1<a.length?a[f+1]/e:0):e,v=d(s()*b);l.push(v),v<a[f]&&(c=!1)}return o.add(i.fromArray(l,e,!1))},i.fromArray=function(r,t,e){return V(r.map(z),z(t||10),e)},i}(),r.hasOwnProperty("exports")&&(r.exports=t)),C.exports;var r,t}!function(r,t){for(var e in t)r[e]=t[e]}(L,function(r){var t={};function e(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return r[n].call(s.exports,s,s.exports,e),s.l=!0,s.exports}return e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var s in r)e.d(n,s,function(t){return r[t]}.bind(null,s));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=11)}([function(r,t){r.exports=d()},function(r,t,e){var n=e(0);function s(r,t,e,n){this.message=r,this.expected=t,this.found=e,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,s)}!function(r,t){function e(){this.constructor=r}e.prototype=t.prototype,r.prototype=new e}(s,Error),s.buildMessage=function(r,t){var e={literal:function(r){return'"'+s(r.text)+'"'},class:function(r){var t,e="";for(t=0;t<r.parts.length;t++)e+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+e+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function n(r){return r.charCodeAt(0).toString(16).toUpperCase()}function s(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}function o(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}return"Expected "+function(r){var t,n,s,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(s=r[t],e[s.type](s));if(o.sort(),o.length>0){for(t=1,n=1;t<o.length;t++)o[t-1]!==o[t]&&(o[n]=o[t],n++);o.length=n}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+s(r)+'"':"end of input"}(t)+" found."},r.exports={SyntaxError:s,parse:function(r,t){t=void 0!==t?t:{};var e,o={},u={start:Fo},a=Fo,i=function(r,t){return Bl(r,t)},l=function(r,t){return Yl(r,t)},c=Mo("=",!1),f=Mo("DUPLICATE",!0),b=Mo("BINARY",!0),v=Mo("MASTER",!0),p=Mo("LOGS",!0),L=Mo("BINLOG",!0),C=Mo("EVENTS",!0),d=Mo("CHARACTER",!0),w=Mo("SET",!0),h=Mo("COLLATION",!0),y=function(r,t){return Yl(r,t,1)},E=Mo("IF",!0),A=function(r,t){return Yl(r,t)},m=Mo("GRANTS",!0),T=Mo(".",!1),I=Mo("ALGORITHM",!0),N=Mo("DEFAULT",!0),R=Mo("INSTANT",!0),S=Mo("INPLACE",!0),_=Mo("COPY",!0),g=Mo("LOCK",!0),O=Mo("NONE",!0),x=Mo("SHARED",!0),U=Mo("EXCLUSIVE",!0),M=Mo("AUTO_INCREMENT",!0),k=Mo("UNIQUE",!0),D=Mo("KEY",!0),$=Mo("PRIMARY",!0),P=Mo("FOR",!0),F=Mo("COLUMN_FORMAT",!0),G=Mo("FIXED",!0),j=Mo("DYNAMIC",!0),H=Mo("STORAGE",!0),Y=Mo("DISK",!0),B=Mo("MEMORY",!0),W=Mo("MATCH FULL",!0),X=Mo("MATCH PARTIAL",!0),V=Mo("MATCH SIMPLE",!0),q=Mo("expiration_timestamp",!0),K=Mo("partition_expiration_days",!0),Z=Mo("require_partition_filter",!0),z=Mo("kms_key_name",!0),Q=Mo("friendly_name",!0),J=Mo("description",!0),rr=Mo("labels",!0),tr=Mo("default_rounding_mode",!0),er=Mo("AVG_ROW_LENGTH",!0),nr=Mo("KEY_BLOCK_SIZE",!0),sr=Mo("MAX_ROWS",!0),or=Mo("MIN_ROWS",!0),ur=Mo("STATS_SAMPLE_PAGES",!0),ar=Mo("CONNECTION",!0),ir=Mo("COMPRESSION",!0),lr=Mo("'",!1),cr=Mo("ZLIB",!0),fr=Mo("LZ4",!0),br=Mo("ENGINE",!0),vr=Mo("CLUSTER",!0),pr=Mo("BY",!0),Lr=Mo("OPTIONS",!0),Cr=Mo("CHARSET",!0),dr=Mo("COLLATE",!0),wr=Mo("READ",!0),hr=Mo("LOCAL",!0),yr=Mo("LOW_PRIORITY",!0),Er=Mo("WRITE",!0),Ar=Mo("NOT",!0),mr=Mo("BTREE",!0),Tr=Mo("HASH",!0),Ir=Mo("WITH",!0),Nr=Mo("PARSER",!0),Rr=Mo("VISIBLE",!0),Sr=Mo("INVISIBLE",!0),_r=Mo("RESTRICT",!0),gr=Mo("CASCADE",!0),Or=Mo("SET NULL",!0),xr=Mo("NO ACTION",!0),Ur=Mo("SET DEFAULT",!0),Mr=Mo("UPDATE",!0),kr=Mo("CREATE",!0),Dr=Mo("DELETE",!0),$r=Mo("INSERT",!0),Pr=Mo(":=",!1),Fr=Mo("return",!0),Gr=Mo("REPLACE",!0),jr=Mo("ANALYZE",!0),Hr=Mo("ATTACH",!0),Yr=Mo("DATABASE",!0),Br=Mo("RENAME",!0),Wr=Mo("SHOW",!0),Xr=Mo("DESCRIBE",!0),Vr=Mo("@",!1),qr=Mo("@@",!1),Kr=Mo("$",!1),Zr=Mo("TEMPORARY",!0),zr=Mo("TEMP",!0),Qr=Mo("SCHEMA",!0),Jr=Mo("ALTER",!0),rt=Mo("SPATIAL",!0),tt=Mo("(",!1),et=Mo(")",!1),nt=Mo("INTERSECT",!0),st=Mo("EXCEPT",!0),ot=Mo("SYSTEM_TIME",!0),ut=Mo("AS",!0),at=Mo("OF",!0),it=Mo("UNNEST",!0),lt=function(r,t){return t.unshift(r),t.forEach((r=>{const{table:t,as:e}=r;Zl[t]=t,e&&(Zl[e]=t),function(r){const t=Xl(r);r.clear(),t.forEach((t=>r.add(t)))}(Kl)})),t},ct=/^[@]/,ft=ko(["@"],!1,!1),bt=/^[{]/,vt=ko(["{"],!1,!1),pt=/^[=]/,Lt=ko(["="],!1,!1),Ct=/^[}]/,dt=ko(["}"],!1,!1),wt=Mo("TABLESAMPLE",!0),ht=Mo("BERNOULLI",!0),yt=Mo("RESERVOIR",!0),Et=Mo("PERCENT",!0),At=Mo("ROWS",!0),mt=Mo("RANGE",!0),Tt=Mo("UNBOUNDED",!0),It=Mo("PRECEDING",!0),Nt=Mo("CURRENT",!0),Rt=Mo("ROW",!1),St=Mo("FOLLOWING",!0),_t=Mo("ROW",!0),gt=Mo("!",!1),Ot=function(r){return r[0]+" "+r[2]},xt=Mo(">=",!1),Ut=Mo(">",!1),Mt=Mo("<=",!1),kt=Mo("<>",!1),Dt=Mo("<",!1),$t=Mo("!=",!1),Pt=Mo("+",!1),Ft=Mo("-",!1),Gt=Mo("*",!1),jt=Mo("/",!1),Ht=Mo("%",!1),Yt=Mo('"',!1),Bt=/^[^"]/,Wt=ko(['"'],!0,!1),Xt=function(r){return r.join("")},Vt=/^[^']/,qt=ko(["'"],!0,!1),Kt=Mo("`",!1),Zt=/^[^`]/,zt=ko(["`"],!0,!1),Qt=function(r,t){return r+t.join("")},Jt=/^[A-Za-z_]/,re=ko([["A","Z"],["a","z"],"_"],!1,!1),te=/^[A-Za-z0-9_\-]/,ee=ko([["A","Z"],["a","z"],["0","9"],"_","-"],!1,!1),ne=/^[A-Za-z0-9_:\-]/,se=ko([["A","Z"],["a","z"],["0","9"],"_",":","-"],!1,!1),oe=Mo(":",!1),ue=Mo("string_agg",!0),ae=Mo("ANY_VALUE",!0),ie=Mo("YEAR_MONTH",!0),le=Mo("DAY_HOUR",!0),ce=Mo("DAY_MINUTE",!0),fe=Mo("DAY_SECOND",!0),be=Mo("DAY_MICROSECOND",!0),ve=Mo("HOUR_MINUTE",!0),pe=Mo("HOUR_SECOND",!0),Le=Mo("HOUR_MICROSECOND",!0),Ce=Mo("MINUTE_SECOND",!0),de=Mo("MINUTE_MICROSECOND",!0),we=Mo("SECOND_MICROSECOND",!0),he=Mo("TIMEZONE_HOUR",!0),ye=Mo("TIMEZONE_MINUTE",!0),Ee=Mo("CENTURY",!0),Ae=Mo("DAYOFWEEK",!0),me=Mo("DAY",!0),Te=Mo("DATE",!0),Ie=Mo("DECADE",!0),Ne=Mo("DOW",!0),Re=Mo("DOY",!0),Se=Mo("EPOCH",!0),_e=Mo("HOUR",!0),ge=Mo("ISODOW",!0),Oe=Mo("ISOWEEK",!0),xe=Mo("ISOYEAR",!0),Ue=Mo("MICROSECONDS",!0),Me=Mo("MILLENNIUM",!0),ke=Mo("MILLISECONDS",!0),De=Mo("MINUTE",!0),$e=Mo("MONTH",!0),Pe=Mo("QUARTER",!0),Fe=Mo("SECOND",!0),Ge=Mo("TIME",!0),je=Mo("TIMEZONE",!0),He=Mo("WEEK",!0),Ye=Mo("YEAR",!0),Be=Mo("DATE_TRUNC",!0),We=Mo("R",!0),Xe=function(r,t){return{type:r.toLowerCase(),value:t[1].join("")}},Ve=/^[^"\\\0-\x1F\x7F]/,qe=ko(['"',"\\",["\0",""],""],!0,!1),Ke=/^[^'\\]/,Ze=ko(["'","\\"],!0,!1),ze=Mo("\\'",!1),Qe=Mo('\\"',!1),Je=Mo("\\\\",!1),rn=Mo("\\/",!1),tn=Mo("\\b",!1),en=Mo("\\f",!1),nn=Mo("\\n",!1),sn=Mo("\\r",!1),on=Mo("\\t",!1),un=Mo("\\u",!1),an=Mo("\\",!1),ln=Mo("''",!1),cn=Mo('""',!1),fn=Mo("``",!1),bn=/^[\n\r]/,vn=ko(["\n","\r"],!1,!1),pn=/^[0-9]/,Ln=ko([["0","9"]],!1,!1),Cn=/^[0-9a-fA-F]/,dn=ko([["0","9"],["a","f"],["A","F"]],!1,!1),wn=/^[eE]/,hn=ko(["e","E"],!1,!1),yn=/^[+\-]/,En=ko(["+","-"],!1,!1),An=Mo("NULL",!0),mn=Mo("NOT NULL",!0),Tn=Mo("TRUE",!0),In=Mo("TO",!0),Nn=Mo("FALSE",!0),Rn=Mo("DROP",!0),Sn=Mo("USE",!0),_n=Mo("SELECT",!0),gn=Mo("IGNORE",!0),On=Mo("PARTITION",!0),xn=Mo("INTO",!0),Un=Mo("FROM",!0),Mn=Mo("UNLOCK",!0),kn=Mo("TABLE",!0),Dn=Mo("TABLES",!0),$n=Mo("ON",!0),Pn=Mo("LEFT",!0),Fn=Mo("RIGHT",!0),Gn=Mo("FULL",!0),jn=Mo("INNER",!0),Hn=Mo("CROSS",!0),Yn=Mo("JOIN",!0),Bn=Mo("OUTER",!0),Wn=Mo("OVER",!0),Xn=Mo("UNION",!0),Vn=Mo("VALUE",!0),qn=Mo("VALUES",!0),Kn=Mo("USING",!0),Zn=Mo("WHERE",!0),zn=Mo("GROUP",!0),Qn=Mo("ORDER",!0),Jn=Mo("HAVING",!0),rs=Mo("QUALIFY",!0),ts=Mo("WINDOW",!0),es=Mo("ORDINAL",!0),ns=Mo("SAFE_ORDINAL",!0),ss=Mo("LIMIT",!0),os=Mo("OFFSET",!0),us=Mo("SAFE_OFFSET",!0),as=Mo("ASC",!0),is=Mo("DESC",!0),ls=Mo("ALL",!0),cs=Mo("DISTINCT",!0),fs=Mo("BETWEEN",!0),bs=Mo("IN",!0),vs=Mo("IS",!0),ps=Mo("LIKE",!0),Ls=Mo("EXISTS",!0),Cs=Mo("AND",!0),ds=Mo("OR",!0),ws=Mo("COUNT",!0),hs=Mo("MAX",!0),ys=Mo("MIN",!0),Es=Mo("SUM",!0),As=Mo("AVG",!0),ms=Mo("EXTRACT",!0),Ts=Mo("CALL",!0),Is=Mo("CASE",!0),Ns=Mo("WHEN",!0),Rs=Mo("THEN",!0),Ss=Mo("ELSE",!0),_s=Mo("END",!0),gs=Mo("CAST",!0),Os=Mo("SAFE_CAST",!0),xs=Mo("ARRAY",!0),Us=Mo("BYTES",!0),Ms=Mo("BOOL",!0),ks=Mo("GEOGRAPHY",!0),Ds=Mo("NUMERIC",!0),$s=Mo("DECIMAL",!0),Ps=Mo("SIGNED",!0),Fs=Mo("UNSIGNED",!0),Gs=Mo("INT64",!0),js=Mo("INTEGER",!0),Hs=Mo("JSON",!0),Ys=Mo("STRING",!0),Bs=Mo("STRUCT",!0),Ws=Mo("FLOAT64",!0),Xs=Mo("DATETIME",!0),Vs=Mo("TIMESTAMP",!0),qs=Mo("TRUNCATE",!0),Ks=Mo("CURRENT_DATE",!0),Zs=Mo("INTERVAL",!0),zs=Mo("CURRENT_TIME",!0),Qs=Mo("CURRENT_TIMESTAMP",!0),Js=Mo("SESSION_USER",!0),ro=Mo("GLOBAL",!0),to=Mo("SESSION",!0),eo=Mo("PIVOT",!0),no=Mo("PERSIST",!0),so=Mo("PERSIST_ONLY",!0),oo=Mo("ADD",!0),uo=Mo("COLUMN",!0),ao=Mo("INDEX",!0),io=Mo("FULLTEXT",!0),lo=Mo("COMMENT",!0),co=Mo("REFERENCES",!0),fo=Mo(",",!1),bo=Mo("[",!1),vo=Mo("]",!1),po=Mo(";",!1),Lo=Mo("||",!1),Co=Mo("&&",!1),wo=Mo("/*",!1),ho=Mo("*/",!1),yo=Mo("--",!1),Eo=Mo("#",!1),Ao={type:"any"},mo=/^[ \t\n\r]/,To=ko([" ","\t","\n","\r"],!1,!1),Io=function(r){return{dataType:r}},No=Mo("MAX",!1),Ro=Mo("max",!1),So=function(r,t){return{dataType:r,definition:t,anglebracket:!0}},_o=0,go=[{line:1,column:1}],Oo=0,xo=[],Uo=0;if("startRule"in t){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function Mo(r,t){return{type:"literal",text:r,ignoreCase:t}}function ko(r,t,e){return{type:"class",parts:r,inverted:t,ignoreCase:e}}function Do(t){var e,n=go[t];if(n)return n;for(e=t-1;!go[e];)e--;for(n={line:(n=go[e]).line,column:n.column};e<t;)10===r.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return go[t]=n,n}function $o(r,t){var e=Do(r),n=Do(t);return{start:{offset:r,line:e.line,column:e.column},end:{offset:t,line:n.line,column:n.column}}}function Po(r){_o<Oo||(_o>Oo&&(Oo=_o,xo=[]),xo.push(r))}function Fo(){var r,t;return r=_o,Rl()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=Go())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=Il())!==o&&(a=Rl())!==o&&(i=Go())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=Il())!==o&&(a=Rl())!==o&&(i=Go())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?(t=function(r,t){const e=r&&r.ast||r,n=t&&t.length&&t[0].length>=4?[e]:e;for(let r=0;r<t.length;r++)t[r][3]&&0!==t[r][3].length&&n.push(t[r][3]&&t[r][3].ast||t[r][3]);return{tableList:Array.from(ql),columnList:Xl(Kl),ast:n}}(t,e),r=t):(_o=r,r=o)}else _o=r,r=o;return r}())!==o?r=t:(_o=r,r=o),r}function Go(){var t;return(t=function(){var t,e,n,s,u,a,i;return(t=function(){var r,t,e,n,s,u,a;return r=_o,(t=xu())!==o&&Rl()!==o?((e=aa())===o&&(e=null),e!==o&&Rl()!==o?((n=ca())===o&&(n=null),n!==o&&Rl()!==o?(s=t,u=e,a=n,r=t={tableList:Array.from(ql),columnList:Xl(Kl),ast:{...s.ast,_orderby:u,_limit:a,_parentheses:s._parentheses}}):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o),r}())===o&&(t=_o,e=_o,40===r.charCodeAt(_o)?(n="(",_o++):(n=o,0===Uo&&Po(tt)),n!==o&&(s=Rl())!==o&&(u=Mu())!==o&&(a=Rl())!==o?(41===r.charCodeAt(_o)?(i=")",_o++):(i=o,0===Uo&&Po(et)),i!==o?e=n=[n,s,u,a,i]:(_o=e,e=o)):(_o=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}())===o&&(t=function(){var t;return(t=xu())===o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v;return r=_o,Eu()!==o&&Rl()!==o&&(t=Xu())!==o&&Rl()!==o&&Ai()!==o&&Rl()!==o&&(e=Ko())!==o&&Rl()!==o?((n=Bu())===o&&(n=null),n!==o&&Rl()!==o?((s=Ju())===o&&(s=null),s!==o&&Rl()!==o?((u=aa())===o&&(u=null),u!==o&&Rl()!==o?((a=ca())===o&&(a=null),a!==o?(l=e,c=n,f=s,b=u,v=a,(i=t)&&i.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"update";ql.add(`${o}::${t}::${n}`)})),c&&c.forEach((r=>{r.table&&ql.add(`update::${r.db}::${r.table}`)})),l&&l.forEach((r=>Kl.add(`update::${r.table}::${r.column}`))),r={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"update",table:i,set:l,where:f,orderby:b,limit:v}}):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=_o,(t=zo())!==o&&Rl()!==o?((e=yi())===o&&(e=null),e!==o&&Rl()!==o&&(n=zu())!==o&&Rl()!==o?((s=Qo())===o&&(s=null),s!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(u=Da())!==o&&Rl()!==o&&yl()!==o&&Rl()!==o&&(a=Jo())!==o&&Rl()!==o?((i=ru())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o){if(t&&(ql.add(`insert::${t.db}::${t.table}`),t.as=null),n){let r=t&&t.table||null;Array.isArray(s)&&s.forEach(((r,t)=>{if(r.value.length!=n.length)throw new Error("Error: column count doesn't match value count at row "+(t+1))})),n.forEach((t=>Kl.add(`insert::${r}::${t}`)))}return{tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:r,table:[t],columns:n,values:s,partition:e,on_duplicate_update:o}}}(t,n,s,u,a,i),r=t):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l;return t=_o,(e=zo())!==o&&Rl()!==o?((n=function(){var t,e,n,s;return t=_o,"ignore"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(gn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())===o&&(n=null),n!==o&&Rl()!==o?((s=yi())===o&&(s=null),s!==o&&Rl()!==o&&(u=zu())!==o&&Rl()!==o?((a=Qo())===o&&(a=null),a!==o&&Rl()!==o&&(i=Jo())!==o&&Rl()!==o?((l=ru())===o&&(l=null),l!==o?(e=function(r,t,e,n,s,o,u){n&&(ql.add(`insert::${n.db}::${n.table}`),Kl.add(`insert::${n.table}::(.*)`),n.as=null);const a=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:r,table:[n],columns:null,values:o,partition:s,prefix:a,on_duplicate_update:u}}}(e,n,s,u,a,i,l),t=e):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b;return r=_o,(t=zo())!==o&&Rl()!==o?((e=yi())===o&&(e=null),e!==o&&Rl()!==o&&(n=zu())!==o&&Rl()!==o?((s=Qo())===o&&(s=null),s!==o&&Rl()!==o&&Ai()!==o&&Rl()!==o&&(u=Ko())!==o&&Rl()!==o?((a=ru())===o&&(a=null),a!==o?(i=t,c=s,f=u,b=a,(l=n)&&(ql.add(`insert::${l.db}::${l.table}`),Kl.add(`insert::${l.table}::(.*)`),l.as=null),r=t={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:i,table:[l],columns:null,partition:c,set:f,on_duplicate_update:b}}):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u,a;return r=_o,(t=mu())!==o&&Rl()!==o?((e=Xu())===o&&(e=null),e!==o&&Rl()!==o?((n=Bu())===o&&(n=null),n!==o&&Rl()!==o?((s=Ju())===o&&(s=null),s!==o&&Rl()!==o?((u=aa())===o&&(u=null),u!==o&&Rl()!==o?((a=ca())===o&&(a=null),a!==o?(t=function(r,t,e,n,s){if(r&&r.forEach((r=>ql.add(`delete::${r.db}::${r.table}`))),t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"delete";n&&ql.add(`${o}::${t}::${n}`),s||Kl.add(`delete::${n}::(.*)`)})),null===r&&1===t.length){const e=t[0];r=[{db:e.db,table:e.table,as:e.as,addition:!0}]}return{tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"delete",table:r,from:t,where:e,orderby:n,limit:s}}}(e,n,s,u,a),r=t):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o),r}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s,u;return t=_o,(e=function(){var t,e,n,s;return t=_o,"analyze"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(jr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&Rl()!==o&&(n=zu())!==o&&Rl()!==o?(s=e,u=n,ql.add(`${s}::${u.db}::${u.table}`),t=e={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:s.toLowerCase(),table:u}}):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=_o,(e=function(){var t,e,n,s;return t=_o,"attach"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Hr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&Rl()!==o&&(n=Nu())!==o&&Rl()!==o&&(s=ba())!==o&&Rl()!==o&&(u=mi())!==o&&Rl()!==o&&(a=$a())!==o&&Rl()!==o?(i=e,l=n,c=s,f=u,b=a,t=e={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:i.toLowerCase(),database:l,expr:c,as:f&&f[0].toLowerCase(),schema:b}}):(_o=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l;return r=_o,(t=wi())!==o&&Rl()!==o&&(e=Ti())!==o&&Rl()!==o&&(n=Xu())!==o?(a=t,i=e,(l=n)&&l.forEach((r=>ql.add(`${a}::${r.db}::${r.table}`))),r=t={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:a.toLowerCase(),keyword:i.toLowerCase(),name:l}}):(_o=r,r=o),r===o&&(r=_o,(t=wi())!==o&&Rl()!==o&&(e=vl())!==o&&Rl()!==o&&(n=ka())!==o&&Rl()!==o&&Ni()!==o&&Rl()!==o&&(s=zu())!==o&&Rl()!==o?((u=function(){var r,t,e,n,s,u;if(r=_o,(t=ou())===o&&(t=uu()),t!==o){for(e=[],n=_o,(s=Rl())!==o?((u=ou())===o&&(u=uu()),u!==o?n=s=[s,u]:(_o=n,n=o)):(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o?((u=ou())===o&&(u=uu()),u!==o?n=s=[s,u]:(_o=n,n=o)):(_o=n,n=o);e!==o?r=t=y(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())===o&&(u=null),u!==o&&Rl()!==o?(t=function(r,t,e,n,s){return{tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),name:e,table:n,options:s}}}(t,e,n,s,u),r=t):(_o=r,r=o)):(_o=r,r=o)),r}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s,u,a,i,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T;return t=_o,(e=Au())!==o&&Rl()!==o?(n=_o,(s=Ki())!==o&&(u=Rl())!==o&&(a=Iu())!==o?n=s=[s,u,a]:(_o=n,n=o),n===o&&(n=null),n!==o&&(s=Rl())!==o?((u=function(){var t,e,n,s;return t=_o,"temp"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(zr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())===o&&(u=gu()),u===o&&(u=null),u!==o&&(a=Rl())!==o&&(i=Ti())!==o&&Rl()!==o?((c=su())===o&&(c=null),c!==o&&Rl()!==o&&(f=zu())!==o&&Rl()!==o?((b=function(){var r,t,e,n,s,u,a,i;if(r=_o,hl()!==o)if(Rl()!==o)if((t=au())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=au())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=au())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o&&(n=Rl())!==o&&(s=yl())!==o?r=l(t,e):(_o=r,r=o)}else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;return r}())===o&&(b=null),b!==o&&Rl()!==o?((v=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=vu())!==o){for(e=[],n=_o,(s=Rl())!==o?((u=dl())===o&&(u=null),u!==o&&(a=Rl())!==o&&(i=vu())!==o?n=s=[s,u,a,i]:(_o=n,n=o)):(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o?((u=dl())===o&&(u=null),u!==o&&(a=Rl())!==o&&(i=vu())!==o?n=s=[s,u,a,i]:(_o=n,n=o)):(_o=n,n=o);e!==o?r=t=Yl(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())===o&&(v=null),v!==o&&Rl()!==o?((p=mi())===o&&(p=null),p!==o&&Rl()!==o?((L=xu())===o&&(L=null),L!==o?(C=e,d=n,w=u,h=c,E=b,A=v,m=p,T=L,(y=f)&&ql.add(`create::${y.db}::${y.table}`),t=e={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:C[0].toLowerCase(),keyword:"table",temporary:w&&w[0].toLowerCase(),if_not_exists:h,table:[y],or_replace:d&&"or replace",as:m&&m[0].toLowerCase(),query_expr:T&&T.ast,create_definitions:E,table_options:A}}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=Au())!==o&&Rl()!==o?((n=gu())===o&&(n=null),n!==o&&(s=Rl())!==o&&(u=Ti())!==o&&(a=Rl())!==o?((i=su())===o&&(i=null),i!==o&&Rl()!==o&&(c=Xu())!==o&&Rl()!==o&&(f=function r(){var t,e,n;return(t=function(){var r,t;return r=_o,Wi()!==o&&Rl()!==o&&(t=Xu())!==o?r={type:"like",table:t}:(_o=r,r=o),r}())===o&&(t=_o,hl()!==o&&Rl()!==o&&(e=r())!==o&&Rl()!==o&&yl()!==o?((n=e).parentheses=!0,t=n):(_o=t,t=o)),t}())!==o?(e=function(r,t,e,n,s){return n&&n.forEach((r=>ql.add(`create::${r.db}::${r.table}`))),{tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:r[0].toLowerCase(),keyword:"table",temporary:t&&t[0].toLowerCase(),if_not_exists:e,table:n,like:s}}}(e,n,i,c,f),t=e):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;return t=_o,(e=Au())!==o&&Rl()!==o?((n=Nu())===o&&(n=function(){var t,e,n,s;return t=_o,"schema"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Qr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()),n!==o&&Rl()!==o?((s=su())===o&&(s=null),s!==o&&Rl()!==o&&(u=Ya())!==o&&Rl()!==o?((a=function(){var r,t,e,n,s,u;if(r=_o,(t=pu())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=pu())!==o?n=s=[s,u]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=pu())!==o?n=s=[s,u]:(_o=n,n=o);e!==o?r=t=y(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())===o&&(a=null),a!==o?(i=e,l=s,c=u,f=a,t=e={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:i[0].toLowerCase(),keyword:"database",if_not_exists:l,database:c,create_definitions:f}}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=_o,(e=function(){var t,e,n,s;return t=_o,"truncate"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(qs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="TRUNCATE":(_o=t,t=o)):(_o=t,t=o),t}())!==o&&Rl()!==o?((n=Ti())===o&&(n=null),n!==o&&Rl()!==o&&(s=Xu())!==o?(u=e,a=n,(i=s)&&i.forEach((r=>ql.add(`${u}::${r.db}::${r.table}`))),t=e={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:u.toLowerCase(),keyword:a&&a.toLowerCase()||"table",name:i}}):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=_o,Ru()!==o&&Rl()!==o&&Ti()!==o&&Rl()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=Wu())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=Wu())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=Wu())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())!==o?((e=t).forEach((r=>r.forEach((r=>r.table&&ql.add(`rename::${r.db}::${r.table}`))))),r={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"rename",table:e}}):(_o=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=_o,function(){var t,e,n,s;return t=_o,"call"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Ts)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="CALL":(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&(e=Vo())!==o?(n=e,t={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"call",expr:n}}):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=_o,function(){var t,e,n,s;return t=_o,"use"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(Sn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&(e=$a())!==o?(n=e,ql.add(`use::${n}::null`),t={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"use",db:n}}):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=_o,function(){var t,e,n,s;return t=_o,"alter"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Jr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&Ti()!==o&&Rl()!==o&&(e=Xu())!==o&&Rl()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=Lu())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=Lu())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=Lu())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())!==o?(u=n,(s=e)&&s.length>0&&s.forEach((r=>ql.add(`alter::${r.db}::${r.table}`))),t={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"alter",table:s,expr:u}}):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=_o,Ai()!==o&&Rl()!==o?((e=function(){var t,e,n,s;return t=_o,"global"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(ro)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="GLOBAL":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=_o,"session"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(to)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="SESSION":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=_o,"local"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(hr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="LOCAL":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=_o,"persist"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(no)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="PERSIST":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=_o,"persist_only"===r.substr(_o,12).toLowerCase()?(e=r.substr(_o,12),_o+=12):(e=o,0===Uo&&Po(so)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="PERSIST_ONLY":(_o=t,t=o)):(_o=t,t=o),t}()),e===o&&(e=null),e!==o&&Rl()!==o&&(n=Ho())!==o?(s=e,(u=n).keyword=s,t={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"set",expr:u}}):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=_o,function(){var t,e,n,s;return t=_o,"lock"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(g)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&Ii()!==o&&Rl()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=cu())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=cu())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=cu())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=A(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())!==o?(n=e,t={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"lock",keyword:"tables",tables:n}}):(_o=t,t=o),t}())===o&&(t=function(){var t;return t=_o,function(){var t,e,n,s;return t=_o,"unlock"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Mn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&Ii()!==o?t={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"unlock",keyword:"tables"}}:(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,y,E,T;return t=_o,(e=Su())!==o&&Rl()!==o?("binary"===r.substr(_o,6).toLowerCase()?(n=r.substr(_o,6),_o+=6):(n=o,0===Uo&&Po(b)),n===o&&("master"===r.substr(_o,6).toLowerCase()?(n=r.substr(_o,6),_o+=6):(n=o,0===Uo&&Po(v))),n!==o&&(s=Rl())!==o?("logs"===r.substr(_o,4).toLowerCase()?(u=r.substr(_o,4),_o+=4):(u=o,0===Uo&&Po(p)),u!==o?(f=n,t=e={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"show",suffix:"logs",keyword:f.toLowerCase()}}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=Su())!==o&&Rl()!==o?("binlog"===r.substr(_o,6).toLowerCase()?(n=r.substr(_o,6),_o+=6):(n=o,0===Uo&&Po(L)),n!==o&&(s=Rl())!==o?("events"===r.substr(_o,6).toLowerCase()?(u=r.substr(_o,6),_o+=6):(u=o,0===Uo&&Po(C)),u!==o&&(a=Rl())!==o?((i=Na())===o&&(i=null),i!==o&&Rl()!==o?((l=Bu())===o&&(l=null),l!==o&&Rl()!==o?((c=ca())===o&&(c=null),c!==o?(y=i,E=l,T=c,t=e={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"show",suffix:"events",keyword:"binlog",in:y,from:E,limit:T}}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=Su())!==o&&Rl()!==o?(n=_o,"character"===r.substr(_o,9).toLowerCase()?(s=r.substr(_o,9),_o+=9):(s=o,0===Uo&&Po(d)),s!==o&&(u=Rl())!==o?("set"===r.substr(_o,3).toLowerCase()?(a=r.substr(_o,3),_o+=3):(a=o,0===Uo&&Po(w)),a!==o?n=s=[s,u,a]:(_o=n,n=o)):(_o=n,n=o),n===o&&("collation"===r.substr(_o,9).toLowerCase()?(n=r.substr(_o,9),_o+=9):(n=o,0===Uo&&Po(h))),n!==o&&(s=Rl())!==o?((u=Ia())===o&&(u=Ju()),u===o&&(u=null),u!==o?(e=function(r,t){let e=Array.isArray(r)&&r||[r];return{tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"show",suffix:e[2]&&e[2].toLowerCase(),keyword:e[0].toLowerCase(),expr:t}}}(n,u),t=e):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=function(){var t,e,n,s;return t=_o,Su()!==o&&Rl()!==o?("grants"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(m)),e!==o&&Rl()!==o?((n=function(){var t,e,n,s,u,a,i,l,c;return t=_o,"for"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(P)),e!==o&&Rl()!==o&&(n=$a())!==o&&Rl()!==o?(s=_o,(u=_u())!==o&&(a=Rl())!==o&&(i=$a())!==o?s=u=[u,a,i]:(_o=s,s=o),s===o&&(s=null),s!==o&&(u=Rl())!==o?((a=function(){var r,t;return r=_o,Oi()!==o&&Rl()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=$a())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=$a())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=$a())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=A(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())!==o?r=t:(_o=r,r=o),r}())===o&&(a=null),a!==o?(c=a,t=e={user:n,host:(l=s)&&l[2],role_list:c}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(n=null),n!==o?(s=n,t={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"show",keyword:"grants",for:s}}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}()))),t}())===o&&(t=function(){var t,e,n,s;return t=_o,(e=Fi())===o&&(e=function(){var t,e,n,s;return t=_o,"describe"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(Xr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()),e!==o&&Rl()!==o&&(n=$a())!==o?(s=n,t=e={tableList:Array.from(ql),columnList:Xl(Kl),ast:{type:"desc",table:s}}):(_o=t,t=o),t}()),t}())===o&&(t=function(){var r,t;for(r=[],t=jo();t!==o;)r.push(t),t=jo();return r}()),t}()),t}function jo(){var t,e;return t=_o,Vl=[],void 0!==o&&Rl()!==o?((e=Ho())===o&&(e=function(){var t,e;return t=_o,function(){var t;return"return"===r.substr(_o,6).toLowerCase()?(t=r.substr(_o,6),_o+=6):(t=o,0===Uo&&Po(Fr)),t}()!==o&&Rl()!==o&&(e=Yo())!==o?t={type:"return",expr:e}:(_o=t,t=o),t}()),e!==o?t={stmt:e,vars:Vl}:(_o=t,t=o)):(_o=t,t=o),t}function Ho(){var t,e,n,s;return t=_o,(e=tu())===o&&(e=eu()),e!==o&&Rl()!==o?((n=function(){var t;return":="===r.substr(_o,2)?(t=":=",_o+=2):(t=o,0===Uo&&Po(Pr)),t}())===o&&(n=Tu()),n!==o&&Rl()!==o&&(s=Yo())!==o?t=e={type:"assign",left:e,symbol:n,right:s}:(_o=t,t=o)):(_o=t,t=o),t}function Yo(){var r;return(r=Mu())===o&&(r=function(){var r,t,e,n,s;return r=_o,(t=tu())!==o&&Rl()!==o&&(e=Zu())!==o&&Rl()!==o&&(n=tu())!==o&&Rl()!==o&&(s=Qu())!==o?r=t={type:"join",ltable:t,rtable:n,op:e,on:s}:(_o=r,r=o),r}())===o&&(r=Bo())===o&&(r=function(){var r,t;return r=_o,ml()!==o&&Rl()!==o&&(t=qo())!==o&&Rl()!==o&&Tl()!==o?r={type:"array",value:t,brackets:!0}:(_o=r,r=o),r}()),r}function Bo(){var r,t,e,n,s,u,a,l;if(r=_o,(t=Wo())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=Sa())!==o&&(a=Rl())!==o&&(l=Wo())!==o?n=s=[s,u,a,l]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=Sa())!==o&&(a=Rl())!==o&&(l=Wo())!==o?n=s=[s,u,a,l]:(_o=n,n=o);e!==o?r=t=i(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Wo(){var r,t,e,n,s,u,a,l;if(r=_o,(t=Xo())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=ga())!==o&&(a=Rl())!==o&&(l=Xo())!==o?n=s=[s,u,a,l]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=ga())!==o&&(a=Rl())!==o&&(l=Xo())!==o?n=s=[s,u,a,l]:(_o=n,n=o);e!==o?r=t=i(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Xo(){var r,t,e;return(r=ti())===o&&(r=tu())===o&&(r=Vo())===o&&(r=Va())===o&&(r=_o,hl()!==o&&Rl()!==o&&(t=Bo())!==o&&Rl()!==o&&yl()!==o?((e=t).parentheses=!0,r=e):(_o=r,r=o)),r}function Vo(){var r,t,e;return r=_o,(t=za())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o?((e=qo())===o&&(e=null),e!==o&&Rl()!==o&&yl()!==o?r=t={type:"function",name:t,args:{type:"expr_list",value:e}}:(_o=r,r=o)):(_o=r,r=o),r===o&&(r=_o,(t=za())!==o&&(t=function(r){return{type:"function",name:r,args:null}}(t)),r=t),r}function qo(){var r,t,e,n,s,u,a,i;if(r=_o,(t=Xo())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=Xo())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=Xo())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Ko(){var r,t,e,n,s,u,a,i;if(r=_o,(t=Zo())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=Zo())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=Zo())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Zo(){var t,e,n,s,u,a,i,l,f;return t=_o,e=_o,(n=$a())!==o&&(s=Rl())!==o&&(u=Cl())!==o?e=n=[n,s,u]:(_o=e,e=o),e===o&&(e=null),e!==o&&(n=Rl())!==o&&(s=Fa())!==o&&(u=Rl())!==o?(61===r.charCodeAt(_o)?(a="=",_o++):(a=o,0===Uo&&Po(c)),a!==o&&Rl()!==o&&(i=Ra())!==o?t=e={column:s,value:i,table:(f=e)&&f[0]}:(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,e=_o,(n=$a())!==o&&(s=Rl())!==o&&(u=Cl())!==o?e=n=[n,s,u]:(_o=e,e=o),e===o&&(e=null),e!==o&&(n=Rl())!==o&&(s=Fa())!==o&&(u=Rl())!==o?(61===r.charCodeAt(_o)?(a="=",_o++):(a=o,0===Uo&&Po(c)),a!==o&&Rl()!==o&&(i=gi())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(l=ka())!==o&&Rl()!==o&&yl()!==o?t=e=function(r,t,e){return{column:t,value:e,table:r&&r[0],keyword:"values"}}(e,s,l):(_o=t,t=o)):(_o=t,t=o)),t}function zo(){var t,e;return t=_o,(e=function(){var t,e,n,s;return t=_o,"insert"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po($r)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&(e="insert"),(t=e)===o&&(t=_o,(e=Iu())!==o&&(e="replace"),t=e),t}function Qo(){var r,t,e,n,s,u,a,i,l;if(r=_o,hi()!==o)if(Rl()!==o)if((t=hl())!==o)if(Rl()!==o)if((e=Ya())!==o){for(n=[],s=_o,(u=Rl())!==o&&(a=dl())!==o&&(i=Rl())!==o&&(l=Ya())!==o?s=u=[u,a,i,l]:(_o=s,s=o);s!==o;)n.push(s),s=_o,(u=Rl())!==o&&(a=dl())!==o&&(i=Rl())!==o&&(l=Ya())!==o?s=u=[u,a,i,l]:(_o=s,s=o);n!==o&&(s=Rl())!==o&&(u=yl())!==o?r=Yl(e,n):(_o=r,r=o)}else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;return r===o&&(r=_o,hi()!==o&&Rl()!==o&&(t=nu())!==o?r=t:(_o=r,r=o)),r}function Jo(){var r;return(r=function(){var r,t;return r=_o,gi()!==o&&Rl()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=nu())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=nu())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=nu())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())!==o?r=t:(_o=r,r=o),r}())===o&&(r=Du()),r}function ru(){var t,e,n;return t=_o,Ni()!==o&&Rl()!==o?("duplicate"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(f)),e!==o&&Rl()!==o&&pl()!==o&&Rl()!==o&&Eu()!==o&&Rl()!==o&&(n=Ko())!==o?t={keyword:"on duplicate key update",set:n}:(_o=t,t=o)):(_o=t,t=o),t}function tu(){var t,e,n,s,u;return t=_o,(e=function(){var t;return(t=function(){var t;return"@@"===r.substr(_o,2)?(t="@@",_o+=2):(t=o,0===Uo&&Po(qr)),t}())===o&&(t=_u())===o&&(t=function(){var t;return 36===r.charCodeAt(_o)?(t="$",_o++):(t=o,0===Uo&&Po(Kr)),t}()),t}())!==o&&(n=eu())!==o?(s=e,u=n,t=e={type:"var",...u,prefix:s}):(_o=t,t=o),t}function eu(){var t,e,n,s,u;return t=_o,(e=Ya())!==o&&(n=function(){var t,e,n,s;for(t=[],e=_o,46===r.charCodeAt(_o)?(n=".",_o++):(n=o,0===Uo&&Po(T)),n!==o&&(s=Ya())!==o?e=n=[n,s]:(_o=e,e=o);e!==o;)t.push(e),e=_o,46===r.charCodeAt(_o)?(n=".",_o++):(n=o,0===Uo&&Po(T)),n!==o&&(s=Ya())!==o?e=n=[n,s]:(_o=e,e=o);return t!==o&&(t=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e][1]);return t}(t)),t}())!==o?(s=e,u=n,Vl.push(s),t=e={type:"var",name:s,members:u,prefix:null}):(_o=t,t=o),t===o&&(t=_o,(e=ii())!==o&&(e={type:"var",name:e.value,members:[],quoted:null,prefix:null}),t=e),t}function nu(){var r,t;return r=_o,hl()!==o&&Rl()!==o&&(t=fa())!==o&&Rl()!==o&&yl()!==o?r=t:(_o=r,r=o),r}function su(){var t,e;return t=_o,"if"===r.substr(_o,2).toLowerCase()?(e=r.substr(_o,2),_o+=2):(e=o,0===Uo&&Po(E)),e!==o&&Rl()!==o&&Vi()!==o&&Rl()!==o&&Xi()!==o?t=e="IF NOT EXISTS":(_o=t,t=o),t}function ou(){var t,e,n,s;return t=_o,"algorithm"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(I)),e!==o&&Rl()!==o?((n=Tu())===o&&(n=null),n!==o&&Rl()!==o?("default"===r.substr(_o,7).toLowerCase()?(s=r.substr(_o,7),_o+=7):(s=o,0===Uo&&Po(N)),s===o&&("instant"===r.substr(_o,7).toLowerCase()?(s=r.substr(_o,7),_o+=7):(s=o,0===Uo&&Po(R)),s===o&&("inplace"===r.substr(_o,7).toLowerCase()?(s=r.substr(_o,7),_o+=7):(s=o,0===Uo&&Po(S)),s===o&&("copy"===r.substr(_o,4).toLowerCase()?(s=r.substr(_o,4),_o+=4):(s=o,0===Uo&&Po(_))))),s!==o?t=e={type:"alter",keyword:"algorithm",resource:"algorithm",symbol:n,algorithm:s}:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}function uu(){var t,e,n,s;return t=_o,"lock"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(g)),e!==o&&Rl()!==o?((n=Tu())===o&&(n=null),n!==o&&Rl()!==o?("default"===r.substr(_o,7).toLowerCase()?(s=r.substr(_o,7),_o+=7):(s=o,0===Uo&&Po(N)),s===o&&("none"===r.substr(_o,4).toLowerCase()?(s=r.substr(_o,4),_o+=4):(s=o,0===Uo&&Po(O)),s===o&&("shared"===r.substr(_o,6).toLowerCase()?(s=r.substr(_o,6),_o+=6):(s=o,0===Uo&&Po(x)),s===o&&("exclusive"===r.substr(_o,9).toLowerCase()?(s=r.substr(_o,9),_o+=9):(s=o,0===Uo&&Po(U))))),s!==o?t=e={type:"alter",keyword:"lock",resource:"lock",symbol:n,lock:s}:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}function au(){var t;return(t=lu())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=_o,(t=vl())===o&&(t=pl()),t!==o&&Rl()!==o?((e=ja())===o&&(e=null),e!==o&&Rl()!==o?((n=Cu())===o&&(n=null),n!==o&&Rl()!==o&&(s=du())!==o&&Rl()!==o?((u=wu())===o&&(u=null),u!==o&&Rl()!==o?(a=n,i=u,r=t={index:e,definition:s,keyword:t.toLowerCase(),index_type:a,resource:"index",index_options:i}):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c;return t=_o,(e=function(){var t,e,n,s;return t=_o,"fulltext"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(io)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="FULLTEXT":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=_o,"spatial"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(rt)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()),e!==o&&Rl()!==o?((n=vl())===o&&(n=pl()),n===o&&(n=null),n!==o&&Rl()!==o?((s=ja())===o&&(s=null),s!==o&&Rl()!==o&&(u=du())!==o&&Rl()!==o?((a=wu())===o&&(a=null),a!==o&&Rl()!==o?(i=e,c=a,t=e={index:s,definition:u,keyword:(l=n)&&`${i.toLowerCase()} ${l.toLowerCase()}`||i.toLowerCase(),index_options:c,resource:"index"}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}()),t}function iu(){var t,e,n,s;return t=_o,(e=function(){var t;return(t=function(){var t,e,n,s;return t=_o,"not null"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(mn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&(t={type:"not null",value:"not null"}),t}())===o&&(e=ni()),e!==o&&((s=e)&&!s.value&&(s.value="null"),e={nullable:s}),(t=e)===o&&(t=_o,(e=function(){var r,t;return r=_o,Ci()!==o&&Rl()!==o?((t=ti())===o&&(t=ba()),t!==o?r={type:"default",value:t}:(_o=r,r=o)):(_o=r,r=o),r}())!==o&&(e={default_val:e}),(t=e)===o&&(t=_o,"auto_increment"===r.substr(_o,14).toLowerCase()?(e=r.substr(_o,14),_o+=14):(e=o,0===Uo&&Po(M)),e!==o&&(e={auto_increment:e.toLowerCase()}),(t=e)===o&&(t=_o,"unique"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(k)),e!==o&&Rl()!==o?("key"===r.substr(_o,3).toLowerCase()?(n=r.substr(_o,3),_o+=3):(n=o,0===Uo&&Po(D)),n===o&&(n=null),n!==o?t=e=function(r){const t=["unique"];return r&&t.push(r),{unique:t.join(" ").toLowerCase("")}}(n):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,"primary"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po($)),e===o&&(e=null),e!==o&&Rl()!==o?("key"===r.substr(_o,3).toLowerCase()?(n=r.substr(_o,3),_o+=3):(n=o,0===Uo&&Po(D)),n!==o?t=e=function(r){const t=[];return r&&t.push("primary"),t.push("key"),{primary_key:t.join(" ").toLowerCase("")}}(e):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=fu())!==o&&(e={comment:e}),(t=e)===o&&(t=_o,(e=function(){var t,e,n;return t=_o,function(){var t,e,n,s;return t=_o,"collate"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(dr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="COLLATE":(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o?((e=Tu())===o&&(e=null),e!==o&&Rl()!==o&&(n=Ya())!==o?t={type:"collate",symbol:e,value:n}:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&(e={collate:e}),(t=e)===o&&(t=_o,(e=function(){var t,e,n;return t=_o,"column_format"===r.substr(_o,13).toLowerCase()?(e=r.substr(_o,13),_o+=13):(e=o,0===Uo&&Po(F)),e!==o&&Rl()!==o?("fixed"===r.substr(_o,5).toLowerCase()?(n=r.substr(_o,5),_o+=5):(n=o,0===Uo&&Po(G)),n===o&&("dynamic"===r.substr(_o,7).toLowerCase()?(n=r.substr(_o,7),_o+=7):(n=o,0===Uo&&Po(j)),n===o&&("default"===r.substr(_o,7).toLowerCase()?(n=r.substr(_o,7),_o+=7):(n=o,0===Uo&&Po(N)))),n!==o?t=e={type:"column_format",value:n.toLowerCase()}:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&(e={column_format:e}),(t=e)===o&&(t=_o,(e=function(){var t,e,n;return t=_o,"storage"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(H)),e!==o&&Rl()!==o?("disk"===r.substr(_o,4).toLowerCase()?(n=r.substr(_o,4),_o+=4):(n=o,0===Uo&&Po(Y)),n===o&&("memory"===r.substr(_o,6).toLowerCase()?(n=r.substr(_o,6),_o+=6):(n=o,0===Uo&&Po(B))),n!==o?t=e={type:"storage",value:n.toLowerCase()}:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&(e={storage:e}),(t=e)===o&&(t=_o,(e=function(){var t,e,n,s,u,a,i,l,c,f;return t=_o,(e=function(){var t,e,n,s;return t=_o,"references"===r.substr(_o,10).toLowerCase()?(e=r.substr(_o,10),_o+=10):(e=o,0===Uo&&Po(co)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="REFERENCES":(_o=t,t=o)):(_o=t,t=o),t}())!==o&&Rl()!==o&&(n=Xu())!==o&&Rl()!==o&&(s=du())!==o&&Rl()!==o?("match full"===r.substr(_o,10).toLowerCase()?(u=r.substr(_o,10),_o+=10):(u=o,0===Uo&&Po(W)),u===o&&("match partial"===r.substr(_o,13).toLowerCase()?(u=r.substr(_o,13),_o+=13):(u=o,0===Uo&&Po(X)),u===o&&("match simple"===r.substr(_o,12).toLowerCase()?(u=r.substr(_o,12),_o+=12):(u=o,0===Uo&&Po(V)))),u===o&&(u=null),u!==o&&Rl()!==o?((a=yu())===o&&(a=null),a!==o&&Rl()!==o?((i=yu())===o&&(i=null),i!==o?(l=u,c=a,f=i,t=e={definition:s,table:n,keyword:e.toLowerCase(),match:l&&l.toLowerCase(),on_action:[c,f].filter((r=>r))}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=yu())!==o&&(e={on_action:[e]}),t=e),t}())!==o&&(e={reference_definition:e}),t=e))))))))),t}function lu(){var r,t,e,n,s,u,a;return r=_o,(t=ka())!==o&&Rl()!==o&&(e=kl())!==o&&Rl()!==o?((n=function(){var r,t,e,n,s,u;if(r=_o,(t=iu())!==o)if(Rl()!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=iu())!==o?n=s=[s,u]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=iu())!==o?n=s=[s,u]:(_o=n,n=o);e!==o?r=t=function(r,t){let e=r;for(let r=0;r<t.length;r++)e={...e,...t[r][1]};return e}(t,e):(_o=r,r=o)}else _o=r,r=o;else _o=r,r=o;return r}())===o&&(n=null),n!==o?(s=t,u=e,a=n,Kl.add(`create::${s.table}::${s.column}`),r=t={column:s,definition:u,resource:"column",...a||{}}):(_o=r,r=o)):(_o=r,r=o),r}function cu(){var t,e,n,s,u;return t=_o,(e=Ku())!==o&&Rl()!==o&&(n=function(){var t,e,n;return t=_o,"read"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(wr)),e!==o&&Rl()!==o?("local"===r.substr(_o,5).toLowerCase()?(n=r.substr(_o,5),_o+=5):(n=o,0===Uo&&Po(hr)),n===o&&(n=null),n!==o?t=e={type:"read",suffix:n&&"local"}:(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,"low_priority"===r.substr(_o,12).toLowerCase()?(e=r.substr(_o,12),_o+=12):(e=o,0===Uo&&Po(yr)),e===o&&(e=null),e!==o&&Rl()!==o?("write"===r.substr(_o,5).toLowerCase()?(n=r.substr(_o,5),_o+=5):(n=o,0===Uo&&Po(Er)),n!==o?t=e={type:"write",prefix:e&&"low_priority"}:(_o=t,t=o)):(_o=t,t=o)),t}())!==o?(s=e,u=n,ql.add(`lock::${s.db}::${s.table}`),t=e={table:s,lock_type:u}):(_o=t,t=o),t}function fu(){var r,t,e,n,s,u,a;return r=_o,(t=Ll())!==o&&Rl()!==o?((e=Tu())===o&&(e=null),e!==o&&Rl()!==o&&(n=si())!==o?(u=e,a=n,r=t={type:(s=t).toLowerCase(),keyword:s.toLowerCase(),symbol:u,value:a}):(_o=r,r=o)):(_o=r,r=o),r}function bu(){var t,e,n,s;return t=_o,"expiration_timestamp"===r.substr(_o,20).toLowerCase()?(e=r.substr(_o,20),_o+=20):(e=o,0===Uo&&Po(q)),e===o&&("partition_expiration_days"===r.substr(_o,25).toLowerCase()?(e=r.substr(_o,25),_o+=25):(e=o,0===Uo&&Po(K)),e===o&&("require_partition_filter"===r.substr(_o,24).toLowerCase()?(e=r.substr(_o,24),_o+=24):(e=o,0===Uo&&Po(Z)),e===o&&("kms_key_name"===r.substr(_o,12).toLowerCase()?(e=r.substr(_o,12),_o+=12):(e=o,0===Uo&&Po(z)),e===o&&("friendly_name"===r.substr(_o,13).toLowerCase()?(e=r.substr(_o,13),_o+=13):(e=o,0===Uo&&Po(Q)),e===o&&("description"===r.substr(_o,11).toLowerCase()?(e=r.substr(_o,11),_o+=11):(e=o,0===Uo&&Po(J)),e===o&&("labels"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(rr)),e===o&&("default_rounding_mode"===r.substr(_o,21).toLowerCase()?(e=r.substr(_o,21),_o+=21):(e=o,0===Uo&&Po(tr))))))))),e!==o&&Rl()!==o?((n=Tu())===o&&(n=null),n!==o&&Rl()!==o&&(s=ba())!==o?t=e={keyword:e,symbol:"=",value:s}:(_o=t,t=o)):(_o=t,t=o),t}function vu(){var t,e,n,s,u,a,i,l,c;return t=_o,"auto_increment"===r.substr(_o,14).toLowerCase()?(e=r.substr(_o,14),_o+=14):(e=o,0===Uo&&Po(M)),e===o&&("avg_row_length"===r.substr(_o,14).toLowerCase()?(e=r.substr(_o,14),_o+=14):(e=o,0===Uo&&Po(er)),e===o&&("key_block_size"===r.substr(_o,14).toLowerCase()?(e=r.substr(_o,14),_o+=14):(e=o,0===Uo&&Po(nr)),e===o&&("max_rows"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(sr)),e===o&&("min_rows"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(or)),e===o&&("stats_sample_pages"===r.substr(_o,18).toLowerCase()?(e=r.substr(_o,18),_o+=18):(e=o,0===Uo&&Po(ur))))))),e!==o&&Rl()!==o?((n=Tu())===o&&(n=null),n!==o&&Rl()!==o&&(s=ii())!==o?(l=n,c=s,t=e={keyword:e.toLowerCase(),symbol:l,value:c.value}):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=pu())===o&&(t=_o,(e=Ll())===o&&("connection"===r.substr(_o,10).toLowerCase()?(e=r.substr(_o,10),_o+=10):(e=o,0===Uo&&Po(ar))),e!==o&&Rl()!==o?((n=Tu())===o&&(n=null),n!==o&&Rl()!==o&&(s=si())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:`'${e.value}'`}}(e,n,s):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,"compression"===r.substr(_o,11).toLowerCase()?(e=r.substr(_o,11),_o+=11):(e=o,0===Uo&&Po(ir)),e!==o&&Rl()!==o?((n=Tu())===o&&(n=null),n!==o&&Rl()!==o?(s=_o,39===r.charCodeAt(_o)?(u="'",_o++):(u=o,0===Uo&&Po(lr)),u!==o?("zlib"===r.substr(_o,4).toLowerCase()?(a=r.substr(_o,4),_o+=4):(a=o,0===Uo&&Po(cr)),a===o&&("lz4"===r.substr(_o,3).toLowerCase()?(a=r.substr(_o,3),_o+=3):(a=o,0===Uo&&Po(fr)),a===o&&("none"===r.substr(_o,4).toLowerCase()?(a=r.substr(_o,4),_o+=4):(a=o,0===Uo&&Po(O)))),a!==o?(39===r.charCodeAt(_o)?(i="'",_o++):(i=o,0===Uo&&Po(lr)),i!==o?s=u=[u,a,i]:(_o=s,s=o)):(_o=s,s=o)):(_o=s,s=o),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.join("").toUpperCase()}}(e,n,s):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,"engine"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(br)),e!==o&&Rl()!==o?((n=Tu())===o&&(n=null),n!==o&&Rl()!==o&&(s=Ya())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.toUpperCase()}}(e,n,s):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=hi())!==o&&Rl()!==o&&(n=Ui())!==o&&Rl()!==o&&(s=ba())!==o?t=e=function(r){return{keyword:"partition by",value:r}}(s):(_o=t,t=o),t===o&&(t=_o,"cluster"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(vr)),e!==o&&Rl()!==o?("by"===r.substr(_o,2).toLowerCase()?(n=r.substr(_o,2),_o+=2):(n=o,0===Uo&&Po(pr)),n!==o&&Rl()!==o&&(s=Da())!==o?t=e={keyword:"cluster by",value:s}:(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,"options"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(Lr)),e!==o&&Rl()!==o&&(n=hl())!==o&&Rl()!==o&&(s=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=bu())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=bu())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=bu())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=A(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())!==o&&(u=Rl())!==o&&(a=yl())!==o?t=e=function(r){return{keyword:"options",parentheses:!0,value:r}}(s):(_o=t,t=o))))))),t}function pu(){var t,e,n,s,u,a,i,l,c;return t=_o,(e=Ci())===o&&(e=null),e!==o&&Rl()!==o?((n=function(){var t,e,n;return t=_o,"character"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(d)),e!==o&&Rl()!==o?("set"===r.substr(_o,3).toLowerCase()?(n=r.substr(_o,3),_o+=3):(n=o,0===Uo&&Po(w)),n!==o?t=e="CHARACTER SET":(_o=t,t=o)):(_o=t,t=o),t}())===o&&("charset"===r.substr(_o,7).toLowerCase()?(n=r.substr(_o,7),_o+=7):(n=o,0===Uo&&Po(Cr)),n===o&&("collate"===r.substr(_o,7).toLowerCase()?(n=r.substr(_o,7),_o+=7):(n=o,0===Uo&&Po(dr)))),n!==o&&Rl()!==o?((s=Tu())===o&&(s=null),s!==o&&Rl()!==o&&(u=si())!==o?(i=n,l=s,c=u,t=e={keyword:(a=e)&&`${a[0].toLowerCase()} ${i.toLowerCase()}`||i.toLowerCase(),symbol:l,value:c}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}function Lu(){var t;return(t=function(){var t,e,n,s,u;return t=_o,function(){var t,e,n,s;return t=_o,"add"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(oo)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="ADD":(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o?((e=bl())===o&&(e=null),e!==o&&Rl()!==o&&(n=lu())!==o?(s=e,u=n,t={action:"add",...u,keyword:s,resource:"column",type:"alter"}):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=_o,wi()!==o&&Rl()!==o?((t=bl())===o&&(t=null),t!==o&&Rl()!==o&&(e=ka())!==o?r={action:"drop",column:e,keyword:t,resource:"column",type:"alter"}:(_o=r,r=o)):(_o=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=_o,Ru()!==o&&Rl()!==o?((t=di())===o&&(t=mi()),t===o&&(t=null),t!==o&&Rl()!==o&&(e=$a())!==o?(s=e,r={action:"rename",type:"alter",resource:"table",keyword:(n=t)&&n[0].toLowerCase(),table:s}):(_o=r,r=o)):(_o=r,r=o),r}()),t}function Cu(){var t,e;return t=_o,Oi()!==o&&Rl()!==o?("btree"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(mr)),e===o&&("hash"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Tr))),e!==o?t={keyword:"using",type:e.toLowerCase()}:(_o=t,t=o)):(_o=t,t=o),t}function du(){var r,t,e,n,s,u,a,i;if(r=_o,hl()!==o)if(Rl()!==o)if((t=ja())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ja())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ja())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o&&(n=Rl())!==o&&(s=yl())!==o?r=l(t,e):(_o=r,r=o)}else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;return r}function wu(){var r,t,e,n,s,u;if(r=_o,(t=hu())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=hu())!==o?n=s=[s,u]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=hu())!==o?n=s=[s,u]:(_o=n,n=o);e!==o?r=t=function(r,t){const e=[r];for(let r=0;r<t.length;r++)e.push(t[r][1]);return e}(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function hu(){var t,e,n,s,u,a;return t=_o,(e=function(){var t,e,n,s;return t=_o,"key_block_size"===r.substr(_o,14).toLowerCase()?(e=r.substr(_o,14),_o+=14):(e=o,0===Uo&&Po(nr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&Rl()!==o?((n=Tu())===o&&(n=null),n!==o&&Rl()!==o&&(s=ii())!==o?(u=n,a=s,t=e={type:e.toLowerCase(),symbol:u,expr:a}):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=Cu())===o&&(t=_o,"with"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Ir)),e!==o&&Rl()!==o?("parser"===r.substr(_o,6).toLowerCase()?(n=r.substr(_o,6),_o+=6):(n=o,0===Uo&&Po(Nr)),n!==o&&Rl()!==o&&(s=Ya())!==o?t=e={type:"with parser",expr:s}:(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,"visible"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(Rr)),e===o&&("invisible"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(Sr))),e!==o&&(e=function(r){return{type:r.toLowerCase(),expr:r.toLowerCase()}}(e)),(t=e)===o&&(t=fu()))),t}function yu(){var t,e,n,s;return t=_o,Ni()!==o&&Rl()!==o?((e=mu())===o&&(e=Eu()),e!==o&&Rl()!==o&&(n=function(){var t,e,n;return t=_o,(e=fl())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o?((n=fa())===o&&(n=null),n!==o&&Rl()!==o&&yl()!==o?t=e={type:"function",name:e,args:n}:(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,"restrict"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(_r)),e===o&&("cascade"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(gr)),e===o&&("set null"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(Or)),e===o&&("no action"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(xr)),e===o&&("set default"===r.substr(_o,11).toLowerCase()?(e=r.substr(_o,11),_o+=11):(e=o,0===Uo&&Po(Ur)),e===o&&(e=fl()))))),e!==o&&(e={type:"origin",value:e.toLowerCase()}),t=e),t}())!==o?(s=n,t={type:"on "+e[0].toLowerCase(),value:s}):(_o=t,t=o)):(_o=t,t=o),t}function Eu(){var t,e,n,s;return t=_o,"update"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Mr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Au(){var t,e,n,s;return t=_o,"create"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(kr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function mu(){var t,e,n,s;return t=_o,"delete"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Dr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Tu(){var t;return 61===r.charCodeAt(_o)?(t="=",_o++):(t=o,0===Uo&&Po(c)),t}function Iu(){var t,e,n,s;return t=_o,"replace"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(Gr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Nu(){var t,e,n,s;return t=_o,"database"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(Yr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Ru(){var t,e,n,s;return t=_o,"rename"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Br)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Su(){var t,e,n,s;return t=_o,"show"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Wr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function _u(){var t;return 64===r.charCodeAt(_o)?(t="@",_o++):(t=o,0===Uo&&Po(Vr)),t}function gu(){var t,e,n,s;return t=_o,"temporary"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(Zr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Ou(){var t,e,n,s;return t=_o,(e=function(){var t,e,n,s;return t=_o,"union"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Xn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&Rl()!==o?((n=Gi())===o&&(n=ji()),n===o&&(n=null),n!==o?t=e=(s=n)?"union "+s.toLowerCase():"union":(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,"intersect"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(nt)),e===o&&("except"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(st))),e!==o&&Rl()!==o&&(n=ji())!==o?t=e=function(r,t){return`${r.toLowerCase()} ${t.toLowerCase()}`}(e,n):(_o=t,t=o)),t}function xu(){var t,e,n,s,u,a,i;return(t=Uu())===o&&(t=_o,e=_o,40===r.charCodeAt(_o)?(n="(",_o++):(n=o,0===Uo&&Po(tt)),n!==o&&(s=Rl())!==o&&(u=Uu())!==o&&(a=Rl())!==o?(41===r.charCodeAt(_o)?(i=")",_o++):(i=o,0===Uo&&Po(et)),i!==o?e=n=[n,s,u,a,i]:(_o=e,e=o)):(_o=e,e=o),e!==o&&(e={...e[2],_parentheses:!0}),t=e),t}function Uu(){var r,t,e,n,s,u,a,i;if(r=_o,(t=Mu())!==o){for(e=[],n=_o,(s=Rl())!==o?((u=Ou())===o&&(u=null),u!==o&&(a=Rl())!==o&&(i=Mu())!==o?n=s=[s,u,a,i]:(_o=n,n=o)):(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o?((u=Ou())===o&&(u=null),u!==o&&(a=Rl())!==o&&(i=Mu())!==o?n=s=[s,u,a,i]:(_o=n,n=o)):(_o=n,n=o);e!==o&&(n=Rl())!==o?((s=aa())===o&&(s=null),s!==o&&(u=Rl())!==o?((a=ca())===o&&(a=null),a!==o?r=t=function(r,t,e,n){let s=r;for(let r=0;r<t.length;r++)s._next=t[r][3],s.set_op=t[r][1],s=s._next;return{tableList:Array.from(ql),columnList:Xl(Kl),ast:r}}(t,e):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)}else _o=r,r=o;return r}function Mu(){var t,e,n,s,u,a,i;return(t=Du())===o&&(t=_o,e=_o,40===r.charCodeAt(_o)?(n="(",_o++):(n=o,0===Uo&&Po(tt)),n!==o&&(s=Rl())!==o&&(u=Mu())!==o&&(a=Rl())!==o?(41===r.charCodeAt(_o)?(i=")",_o++):(i=o,0===Uo&&Po(et)),i!==o?e=n=[n,s,u,a,i]:(_o=e,e=o)):(_o=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}function ku(){var r,t,e,n;return r=_o,(t=si())===o&&(t=Ya()),t!==o&&Rl()!==o&&mi()!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(e=xu())!==o&&Rl()!==o&&yl()!==o?("string"==typeof(n=t)&&(n={type:"default",value:n}),r=t={name:n,stmt:e}):(_o=r,r=o),r}function Du(){var t,e,n,s,u,a,i,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T,I,N,R,S,_;return t=_o,Rl()!==o?((e=function(){var r,t,e,n,s,u,a,i;if(r=_o,xi()!==o)if(Rl()!==o)if((t=ku())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ku())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ku())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=l(t,e):(_o=r,r=o)}else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;return r}())===o&&(e=null),e!==o&&Rl()!==o&&function(){var t,e,n,s;return t=_o,"select"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(_n)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Sl()!==o?((n=function(){var t,e,n,s;return t=_o,(e=mi())!==o&&Rl()!==o?((n=sl())===o&&(n=function(){var t,e,n,s;return t=_o,"value"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Vn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="VALUE":(_o=t,t=o)):(_o=t,t=o),t}()),n!==o?(s=n,t=e=`${e[0].toLowerCase()} ${s.toLowerCase()}`):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(n=null),n!==o&&Rl()!==o?((s=Gi())===o&&(s=ji()),s===o&&(s=null),s!==o&&Rl()!==o&&(u=$u())!==o&&Rl()!==o?((a=Bu())===o&&(a=null),a!==o&&Rl()!==o?((i=function(){var t,e,n,s,u,a;return t=_o,"for"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(P)),e!==o&&Rl()!==o?("system_time"===r.substr(_o,11).toLowerCase()?(n=r.substr(_o,11),_o+=11):(n=o,0===Uo&&Po(ot)),n!==o&&Rl()!==o?("as"===r.substr(_o,2).toLowerCase()?(s=r.substr(_o,2),_o+=2):(s=o,0===Uo&&Po(ut)),s!==o&&Rl()!==o?("of"===r.substr(_o,2).toLowerCase()?(u=r.substr(_o,2),_o+=2):(u=o,0===Uo&&Po(at)),u!==o&&Rl()!==o&&(a=ba())!==o?t=e={keyword:"for system_time as of",expr:a}:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(i=null),i!==o&&Rl()!==o?((c=Ju())===o&&(c=null),c!==o&&Rl()!==o?((f=function(){var t,e;return t=_o,function(){var t,e,n,s;return t=_o,"group"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(zn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&Ui()!==o&&Rl()!==o&&(e=fa())!==o?t=e.value:(_o=t,t=o),t}())===o&&(f=null),f!==o&&Rl()!==o?((b=function(){var r,t;return r=_o,Mi()!==o&&Rl()!==o&&(t=wa())!==o?r=t:(_o=r,r=o),r}())===o&&(b=null),b!==o&&Rl()!==o?((v=function(){var t,e;return t=_o,function(){var t,e,n,s;return t=_o,"qualify"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(rs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&(e=ba())!==o?t=e:(_o=t,t=o),t}())===o&&(v=null),v!==o&&Rl()!==o?((p=aa())===o&&(p=null),p!==o&&Rl()!==o?((L=ca())===o&&(L=null),L!==o&&Rl()!==o?((C=function(){var t,e;return t=_o,function(){var t,e,n,s;return t=_o,"window"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(ts)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=ra())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ra())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ra())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())!==o?t={keyword:"window",type:"window",expr:e}:(_o=t,t=o),t}())===o&&(C=null),C!==o?(d=e,w=n,h=s,y=u,E=a,A=i,m=c,T=f,I=b,N=v,R=p,S=L,_=C,Array.isArray(E)&&E.forEach((r=>r.table&&ql.add(`select::${r.db}::${r.table}`))),t={type:"select",as_struct_val:w,distinct:h,columns:y,from:E,for_sys_time_as_of:A,where:m,with:d,groupby:T,having:I,qualify:N,orderby:R,limit:S,window:_}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}function $u(){var r,t,e;return r=_o,(t=Pu())!==o&&Rl()!==o?((e=dl())===o&&(e=null),e!==o?r=t:(_o=r,r=o)):(_o=r,r=o),r}function Pu(){var r,t,e,n,s,u,a,i;if(r=_o,(t=ju())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ju())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ju())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Fu(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p;if(r=_o,t=[],e=_o,(n=ml())!==o&&(s=Rl())!==o?((u=ii())===o&&(u=si()),u!==o&&(a=Rl())!==o&&(i=Tl())!==o?e=n=[n,s,u,a,i]:(_o=e,e=o)):(_o=e,e=o),e!==o)for(;e!==o;)t.push(e),e=_o,(n=ml())!==o&&(s=Rl())!==o?((u=ii())===o&&(u=si()),u!==o&&(a=Rl())!==o&&(i=Tl())!==o?e=n=[n,s,u,a,i]:(_o=e,e=o)):(_o=e,e=o);else t=o;if(t!==o&&(t=t.map((r=>({value:r[2]})))),(r=t)===o){if(r=_o,t=[],e=_o,(n=ml())!==o&&(s=Rl())!==o?((u=$i())===o&&(u=ki())===o&&(u=Pi())===o&&(u=Di()),u!==o&&(a=Rl())!==o&&(i=hl())!==o&&(l=Rl())!==o?((c=ii())===o&&(c=si()),c!==o&&(f=Rl())!==o&&(b=yl())!==o&&(v=Rl())!==o&&(p=Tl())!==o?e=n=[n,s,u,a,i,l,c,f,b,v,p]:(_o=e,e=o)):(_o=e,e=o)):(_o=e,e=o),e!==o)for(;e!==o;)t.push(e),e=_o,(n=ml())!==o&&(s=Rl())!==o?((u=$i())===o&&(u=ki())===o&&(u=Pi())===o&&(u=Di()),u!==o&&(a=Rl())!==o&&(i=hl())!==o&&(l=Rl())!==o?((c=ii())===o&&(c=si()),c!==o&&(f=Rl())!==o&&(b=yl())!==o&&(v=Rl())!==o&&(p=Tl())!==o?e=n=[n,s,u,a,i,l,c,f,b,v,p]:(_o=e,e=o)):(_o=e,e=o)):(_o=e,e=o);else t=o;t!==o&&(t=function(r){return r.map((r=>({name:r[2],value:r[6]})))}(t)),r=t}return r}function Gu(){var r,t,e;return r=_o,(t=ba())!==o&&Rl()!==o&&(e=Fu())!==o?r=t={expr:t,offset:e}:(_o=r,r=o),r}function ju(){var t,e,n,s,u,a,i,l,c,f,b,v;return t=_o,e=_o,(n=Fa())!==o&&(s=Rl())!==o&&(u=Cl())!==o?e=n=[n,s,u]:(_o=e,e=o),e===o&&(e=null),e!==o&&(n=wl())!==o&&(s=Rl())!==o?("except"===r.substr(_o,6).toLowerCase()?(u=r.substr(_o,6),_o+=6):(u=o,0===Uo&&Po(st)),u===o&&("replace"===r.substr(_o,7).toLowerCase()?(u=r.substr(_o,7),_o+=7):(u=o,0===Uo&&Po(Gr))),u!==o&&(a=Rl())!==o&&(i=hl())!==o&&(l=Rl())!==o&&(c=Pu())!==o&&Rl()!==o&&yl()!==o?t=e=function(r,t,e){const n=r&&r[0];return Kl.add(`select::${n}::(.*)`),{expr_list:e,parentheses:!0,expr:{type:"column_ref",table:n,column:"*"},type:t.toLowerCase()}}(e,u,c):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=Gi())===o&&(e=_o,(n=wl())!==o?(s=_o,Uo++,u=Ba(),Uo--,u===o?s=void 0:(_o=s,s=o),s!==o?e=n=[n,s]:(_o=e,e=o)):(_o=e,e=o),e===o&&(e=wl())),e!==o&&(Kl.add("select::null::(.*)"),e={expr:{type:"column_ref",table:null,column:"*"},as:null}),(t=e)===o&&(t=_o,(e=Fa())!==o&&(n=Rl())!==o&&(s=Cl())!==o?(u=_o,(a=Gu())===o&&(a=Fa()),a!==o&&(i=Rl())!==o&&(l=Cl())!==o?u=a=[a,i,l]:(_o=u,u=o),u===o&&(u=null),u!==o&&(a=Rl())!==o&&(i=wl())!==o?t=e=function(r,t){Kl.add(`select::${r}::(.*)`);let e="*";const n=t&&t[0];return"string"==typeof n&&(e=n+".*"),n&&n.expr&&n.offset&&(e={...n,suffix:".*"}),{expr:{type:"column_ref",table:r,column:e},as:null}}(e,u):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=Gu())!==o&&(n=Rl())!==o?(s=_o,(u=Cl())!==o&&(a=Rl())!==o&&(i=Fa())!==o?s=u=[u,a,i]:(_o=s,s=o),s===o&&(s=null),s!==o&&(u=Rl())!==o?((a=Hu())===o&&(a=null),a!==o?(f=e,v=a,(b=s)&&(f.suffix="."+b[2]),t=e={expr:{type:"column_ref",table:null,column:f},as:v}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=function(){var r,t,e;return r=_o,(t=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=ba())!==o){for(e=[],n=_o,(s=Rl())!==o?((u=qi())===o&&(u=Ki())===o&&(u=Nl()),u!==o&&(a=Rl())!==o&&(i=ba())!==o?n=s=[s,u,a,i]:(_o=n,n=o)):(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o?((u=qi())===o&&(u=Ki())===o&&(u=Nl()),u!==o&&(a=Rl())!==o&&(i=ba())!==o?n=s=[s,u,a,i]:(_o=n,n=o)):(_o=n,n=o);e!==o?(t=function(r,t){const e=r.ast;if(e&&"select"===e.type&&(!(r.parentheses_symbol||r.parentheses||r.ast.parentheses||r.ast.parentheses_symbol)||1!==e.columns.length||"*"===e.columns[0].expr.column))throw new Error("invalid column clause with select statement");if(!t||0===t.length)return r;const n=t.length;let s=t[n-1][3];for(let e=n-1;e>=0;e--){const n=0===e?r:t[e-1][3];s=jl(t[e][1],n,s)}return s}(t,e),r=t):(_o=r,r=o)}else _o=r,r=o;return r}())!==o&&Rl()!==o?((e=Hu())===o&&(e=null),e!==o?r=t={expr:t,as:e}:(_o=r,r=o)):(_o=r,r=o),r}())))),t}function Hu(){var r,t,e;return r=_o,(t=mi())!==o&&Rl()!==o&&(e=function(){var r,t;return r=_o,(t=Ya())!==o&&(function(r){if(!0===Pl[r.toUpperCase()])throw new Error("Error: "+JSON.stringify(r)+" is a reserved word, can not as alias clause");return!1}(t)?o:void 0)!==o?r=t:(_o=r,r=o),r===o&&(r=_o,r=t=Pa()),r}())!==o?r=t=e:(_o=r,r=o),r===o&&(r=_o,(t=mi())===o&&(t=null),t!==o&&Rl()!==o&&(e=$a())!==o?r=t=e:(_o=r,r=o)),r}function Yu(){var t,e,n,s,u;return t=_o,"unnest"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(it)),e!==o&&Rl()!==o&&hl()!==o&&Rl()!==o?((n=ba())===o&&(n=null),n!==o&&Rl()!==o&&yl()!==o&&Rl()!==o?((s=Hu())===o&&(s=null),s!==o&&Rl()!==o?((u=function(){var r,t;return r=_o,xi()!==o&&Rl()!==o&&$i()!==o&&Rl()!==o?((t=Hu())===o&&(t=null),t!==o?r={keyword:"with offset as",as:t}:(_o=r,r=o)):(_o=r,r=o),r}())===o&&(u=null),u!==o?t=e={type:"unnest",expr:n,parentheses:!0,as:s,with_offset:u}:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}function Bu(){var t,e,n,s,u;return t=_o,Ei()!==o&&Rl()!==o&&(e=Xu())!==o&&Rl()!==o?((n=function(){var t,e,n,s,u,a,i,l,c,f;return t=_o,function(){var t,e,n,s;return t=_o,"pivot"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(eo)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="PIVOT":(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(e=function(){var r,t,e,n,s,u,a,i,l,c,f;if(r=_o,(t=qa())!==o)if(Rl()!==o)if((e=Hu())===o&&(e=null),e!==o){for(n=[],s=_o,(u=Rl())!==o&&(a=dl())!==o&&(i=Rl())!==o&&(l=qa())!==o&&(c=Rl())!==o?((f=Hu())===o&&(f=null),f!==o?s=u=[u,a,i,l,c,f]:(_o=s,s=o)):(_o=s,s=o);s!==o;)n.push(s),s=_o,(u=Rl())!==o&&(a=dl())!==o&&(i=Rl())!==o&&(l=qa())!==o&&(c=Rl())!==o?((f=Hu())===o&&(f=null),f!==o?s=u=[u,a,i,l,c,f]:(_o=s,s=o)):(_o=s,s=o);n!==o?(t=function(r,t,e){const n={type:"expr_list"};return n.value=Yl(r,e),n}(t,0,n),r=t):(_o=r,r=o)}else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;return r}())!==o&&Rl()!==o?("for"===r.substr(_o,3).toLowerCase()?(n=r.substr(_o,3),_o+=3):(n=o,0===Uo&&Po(P)),n!==o&&Rl()!==o&&(s=ka())!==o&&Rl()!==o&&(u=Na())!==o&&Rl()!==o&&yl()!==o&&Rl()!==o?((a=Hu())===o&&(a=null),a!==o?(i=e,l=s,f=a,(c=u).operator="=",t={type:"pivot",expr:i,column:l,in_expr:c,as:f}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(n=null),n!==o?(u=n,(s=e)[0]&&(s[0].operator=u),t=s):(_o=t,t=o)):(_o=t,t=o),t}function Wu(){var r,t,e;return r=_o,(t=zu())!==o&&Rl()!==o&&di()!==o&&Rl()!==o&&(e=zu())!==o?r=t=[t,e]:(_o=r,r=o),r}function Xu(){var r,t,e,n;if(r=_o,(t=Ku())!==o){for(e=[],n=Vu();n!==o;)e.push(n),n=Vu();e!==o?r=t=lt(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Vu(){var r,t,e;return r=_o,Rl()!==o&&(t=dl())!==o&&Rl()!==o&&(e=Ku())!==o?r=e:(_o=r,r=o),r===o&&(r=_o,Rl()!==o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(r=_o,(t=Zu())!==o)if(Rl()!==o)if((e=Ku())!==o)if(Rl()!==o)if((n=Oi())!==o)if(Rl()!==o)if(hl()!==o)if(Rl()!==o)if((s=Ya())!==o){for(u=[],a=_o,(i=Rl())!==o&&(l=dl())!==o&&(c=Rl())!==o&&(f=Ya())!==o?a=i=[i,l,c,f]:(_o=a,a=o);a!==o;)u.push(a),a=_o,(i=Rl())!==o&&(l=dl())!==o&&(c=Rl())!==o&&(f=Ya())!==o?a=i=[i,l,c,f]:(_o=a,a=o);u!==o&&(a=Rl())!==o&&(i=yl())!==o?(b=t,p=s,L=u,(v=e).join=b,v.using=Yl(p,L),r=t=v):(_o=r,r=o)}else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;else _o=r,r=o;return r===o&&(r=_o,(t=Zu())!==o&&Rl()!==o&&(e=Ku())!==o&&Rl()!==o?((n=Qu())===o&&(n=null),n!==o?(t=function(r,t,e){return t.join=r,t.on=e,t}(t,e,n),r=t):(_o=r,r=o)):(_o=r,r=o),r===o&&(r=_o,(t=Zu())!==o&&Rl()!==o&&(e=hl())!==o&&Rl()!==o&&(n=xu())!==o&&Rl()!==o&&yl()!==o&&Rl()!==o?((s=Hu())===o&&(s=null),s!==o&&(u=Rl())!==o?((a=Qu())===o&&(a=null),a!==o?(t=function(r,t,e,n){return t.parentheses=!0,{expr:t,as:e,join:r,on:n}}(t,n,s,a),r=t):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o))),r}())!==o?r=t:(_o=r,r=o)),r}function qu(){var t,e,n,s,u,a,i,l,c,f,b,v;return t=_o,"tablesample"===r.substr(_o,11).toLowerCase()?(e=r.substr(_o,11),_o+=11):(e=o,0===Uo&&Po(wt)),e!==o&&(n=Rl())!==o?("bernoulli"===r.substr(_o,9).toLowerCase()?(s=r.substr(_o,9),_o+=9):(s=o,0===Uo&&Po(ht)),s===o&&("reservoir"===r.substr(_o,9).toLowerCase()?(s=r.substr(_o,9),_o+=9):(s=o,0===Uo&&Po(yt))),s!==o&&(u=Rl())!==o?(40===r.charCodeAt(_o)?(a="(",_o++):(a=o,0===Uo&&Po(tt)),a!==o&&(i=Rl())!==o&&(l=li())!==o&&(c=Rl())!==o?("percent"===r.substr(_o,7).toLowerCase()?(f=r.substr(_o,7),_o+=7):(f=o,0===Uo&&Po(Et)),f===o&&("rows"===r.substr(_o,4).toLowerCase()?(f=r.substr(_o,4),_o+=4):(f=o,0===Uo&&Po(At))),f!==o&&(b=Rl())!==o?(41===r.charCodeAt(_o)?(v=")",_o++):(v=o,0===Uo&&Po(et)),v!==o?t=e=[e,n,s,u,a,i,l,c,f,b,v]:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}function Ku(){var t,e,n,s,u,a,i,l,c,f;return(t=Yu())===o&&(t=_o,(e=zu())!==o?((n=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=_o,ct.test(r.charAt(_o))?(e=r.charAt(_o),_o++):(e=o,0===Uo&&Po(ft)),e!==o?(bt.test(r.charAt(_o))?(n=r.charAt(_o),_o++):(n=o,0===Uo&&Po(vt)),n!==o&&(s=Rl())!==o&&(u=Ya())!==o&&(a=Rl())!==o?(pt.test(r.charAt(_o))?(i=r.charAt(_o),_o++):(i=o,0===Uo&&Po(Lt)),i!==o&&(l=Rl())!==o&&(c=Ya())!==o&&(f=Rl())!==o?(Ct.test(r.charAt(_o))?(b=r.charAt(_o),_o++):(b=o,0===Uo&&Po(dt)),b!==o?t=e=[e,n,s,u,a,i,l,c,f,b]:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(n=null),n!==o&&(s=Rl())!==o?((u=qu())===o&&(u=null),u!==o&&Rl()!==o?((a=Hu())===o&&(a=null),a!==o?(f=a,t=e="var"===(c=e).type?(c.as=f,c):{...c,as:f}):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=hl())!==o&&(n=Rl())!==o&&(s=xu())!==o&&(u=Rl())!==o&&yl()!==o&&(a=Rl())!==o?((i=qu())===o&&(i=null),i!==o&&Rl()!==o?((l=Hu())===o&&(l=null),l!==o?t=e=function(r,t,e){return r.parentheses=!0,{expr:r,as:e}}(s,0,l):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o))),t}function Zu(){var t,e,n;return t=_o,(e=function(){var t,e,n,s;return t=_o,"left"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Pn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&Rl()!==o?((n=Si())===o&&(n=null),n!==o&&Rl()!==o&&Ri()!==o?t=e="LEFT JOIN":(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=function(){var t,e,n,s;return t=_o,"right"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Fn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&Rl()!==o?((n=Si())===o&&(n=null),n!==o&&Rl()!==o&&Ri()!==o?t=e="RIGHT JOIN":(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=function(){var t,e,n,s;return t=_o,"full"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Gn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&Rl()!==o?((n=Si())===o&&(n=null),n!==o&&Rl()!==o&&Ri()!==o?t=e="FULL JOIN":(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=function(){var t,e,n,s;return t=_o,"cross"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Hn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&Rl()!==o&&(n=Ri())!==o?t=e=e[0].toUpperCase()+" JOIN":(_o=t,t=o),t===o&&(t=_o,(e=function(){var t,e,n,s;return t=_o,"inner"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(jn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())===o&&(e=null),e!==o&&Rl()!==o&&(n=Ri())!==o?t=e=function(r){return r?r[0].toUpperCase()+" JOIN":"JOIN"}(e):(_o=t,t=o))))),t}function zu(){var r,t,e,n,s,u,a,i;return r=_o,(t=Ga())!==o?(e=_o,(n=Rl())!==o&&(s=Cl())!==o&&(u=Rl())!==o&&(a=Ga())!==o?e=n=[n,s,u,a]:(_o=e,e=o),e!==o?(n=_o,(s=Rl())!==o&&(u=Cl())!==o&&(a=Rl())!==o&&(i=Ga())!==o?n=s=[s,u,a,i]:(_o=n,n=o),n!==o?r=t=function(r,t,e){const n={db:null,table:r};return null!==e&&(n.db=r,n.catalog=r,n.schema=t[3],n.table=e[3]),n}(t,e,n):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o),r===o&&(r=_o,(t=Ga())!==o?(e=_o,(n=Rl())!==o&&(s=Cl())!==o&&(u=Rl())!==o&&(a=Ga())!==o?e=n=[n,s,u,a]:(_o=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){const e={db:null,table:r};return null!==t&&(e.db=r,e.table=t[3]),e}(t,e):(_o=r,r=o)):(_o=r,r=o)),r}function Qu(){var r,t;return r=_o,Ni()!==o&&Rl()!==o&&(t=wa())!==o?r=t:(_o=r,r=o),r}function Ju(){var t,e;return t=_o,function(){var t,e,n,s;return t=_o,"where"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Zn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&(e=wa())!==o?t=e:(_o=t,t=o),t}function ra(){var r,t,e;return r=_o,(t=Ya())!==o&&Rl()!==o&&mi()!==o&&Rl()!==o&&(e=ta())!==o?r=t={name:t,as_window_specification:e}:(_o=r,r=o),r}function ta(){var t,e;return t=_o,(t=Ya())===o&&(t=_o,hl()!==o&&Rl()!==o?((e=function(){var t,e,n,s,u;return t=_o,(e=$a())===o&&(e=null),e!==o&&Rl()!==o?((n=ua())===o&&(n=null),n!==o&&Rl()!==o?((s=aa())===o&&(s=null),s!==o&&Rl()!==o?((u=function(){var t,e,n,s,u,a,i,l,c,f;return t=_o,"range"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(mt)),e!==o&&Rl()!==o&&(n=Hi())!==o?("unbounded"===r.substr(_o,9).toLowerCase()?(s=r.substr(_o,9),_o+=9):(s=o,0===Uo&&Po(Tt)),s!==o&&(u=Rl())!==o?("preceding"===r.substr(_o,9).toLowerCase()?(a=r.substr(_o,9),_o+=9):(a=o,0===Uo&&Po(It)),a!==o&&Rl()!==o&&qi()!==o&&(i=Rl())!==o?("current"===r.substr(_o,7).toLowerCase()?(l=r.substr(_o,7),_o+=7):(l=o,0===Uo&&Po(Nt)),l!==o&&Rl()!==o?("ROW"===r.substr(_o,3)?(c="ROW",_o+=3):(c=o,0===Uo&&Po(Rt)),c!==o?t=e="range between unbounded preceding and current row":(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=al())!==o&&Rl()!==o?((n=ea())===o&&(n=na()),n!==o?t=e="rows "+n.value:(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=al())!==o&&Rl()!==o&&(n=Hi())!==o&&(s=Rl())!==o&&(u=na())!==o&&(a=Rl())!==o&&qi()!==o&&Rl()!==o&&(i=ea())!==o?(f=i,t=e=`rows between ${u.value} and ${f.value}`):(_o=t,t=o))),t}())===o&&(u=null),u!==o?t=e={name:e,partitionby:n,orderby:s,window_frame_clause:u}:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(e=null),e!==o&&Rl()!==o&&yl()!==o?t={window_specification:e,parentheses:!0}:(_o=t,t=o)):(_o=t,t=o)),t}function ea(){var t,e,n,s,u;return t=_o,(e=oa())!==o&&Rl()!==o?("following"===r.substr(_o,9).toLowerCase()?(n=r.substr(_o,9),_o+=9):(n=o,0===Uo&&Po(St)),n===o&&("preceding"===r.substr(_o,9).toLowerCase()?(n=r.substr(_o,9),_o+=9):(n=o,0===Uo&&Po(It))),n!==o?(u=n,(s=e).value+=" "+u.toUpperCase(),t=e=s):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=sa()),t}function na(){var t,e,n,s;return t=_o,(e=oa())!==o&&Rl()!==o?("preceding"===r.substr(_o,9).toLowerCase()?(n=r.substr(_o,9),_o+=9):(n=o,0===Uo&&Po(It)),n!==o?((s=e).value+=" PRECEDING",t=e=s):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=sa()),t}function sa(){var t,e,n;return t=_o,"current"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(Nt)),e!==o&&Rl()!==o?("row"===r.substr(_o,3).toLowerCase()?(n=r.substr(_o,3),_o+=3):(n=o,0===Uo&&Po(_t)),n!==o?t=e={type:"single_quote_string",value:"current row"}:(_o=t,t=o)):(_o=t,t=o),t}function oa(){var t,e;return t=_o,"unbounded"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(Tt)),e!==o&&(e={type:"single_quote_string",value:e.toUpperCase()}),(t=e)===o&&(t=ii()),t}function ua(){var r,t;return r=_o,hi()!==o&&Rl()!==o&&Ui()!==o&&Rl()!==o&&(t=$u())!==o?r=t:(_o=r,r=o),r}function aa(){var t,e;return t=_o,function(){var t,e,n,s;return t=_o,"order"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Qn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&Ui()!==o&&Rl()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=ia())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ia())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ia())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())!==o?t=e:(_o=t,t=o),t}function ia(){var t,e,n,s,u,a;return t=_o,(e=ba())!==o&&Rl()!==o?(n=_o,"collate"===r.substr(_o,7).toLowerCase()?(s=r.substr(_o,7),_o+=7):(s=o,0===Uo&&Po(dr)),s!==o&&(u=Rl())!==o&&(a=si())!==o?n=s=[s,u,a]:(_o=n,n=o),n===o&&(n=null),n!==o&&(s=Rl())!==o?((u=Fi())===o&&(u=function(){var t,e,n,s;return t=_o,"asc"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(as)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="ASC":(_o=t,t=o)):(_o=t,t=o),t}()),u===o&&(u=null),u!==o?t=e={expr:e,type:u}:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}function la(){var r;return(r=ii())===o&&(r=Va()),r}function ca(){var t,e,n,s,u,a;return t=_o,function(){var t,e,n,s;return t=_o,"limit"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(ss)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&(e=la())!==o&&Rl()!==o?(n=_o,(s=dl())===o&&(s=$i()),s!==o&&(u=Rl())!==o&&(a=la())!==o?n=s=[s,u,a]:(_o=n,n=o),n===o&&(n=null),n!==o?t=function(r,t){const e=[r];return t&&e.push(t[2]),{seperator:t&&t[0]&&t[0].toLowerCase()||"",value:e}}(e,n):(_o=t,t=o)):(_o=t,t=o),t}function fa(){var r,t,e,n,s,u,a,i;if(r=_o,(t=ba())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ba())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ba())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=function(r,t){const e={type:"expr_list"};return e.value=Yl(r,t),e}(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function ba(){var r;return(r=function(){var r;return(r=Ca())===o&&(r=La())===o&&(r=da())===o&&(r=function(){var r,t,e,n,s,u,a,l;if(r=_o,(t=ha())!==o){for(e=[],n=_o,(s=Sl())!==o&&(u=Ki())!==o&&(a=Rl())!==o&&(l=ha())!==o?n=s=[s,u,a,l]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Sl())!==o&&(u=Ki())!==o&&(a=Rl())!==o&&(l=ha())!==o?n=s=[s,u,a,l]:(_o=n,n=o);e!==o?r=t=i(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u;if(r=_o,(t=Sa())!==o){if(e=[],n=_o,(s=Rl())!==o&&(u=Oa())!==o?n=s=[s,u]:(_o=n,n=o),n!==o)for(;n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=Oa())!==o?n=s=[s,u]:(_o=n,n=o);else e=o;e!==o?r=t=Gl(t,e[0][1]):(_o=r,r=o)}else _o=r,r=o;return r}())===o&&(r=pa()),r}())===o&&(r=xu()),r}function va(){var r,t;return r=_o,hl()!==o&&Rl()!==o&&(t=$u())!==o&&Rl()!==o&&yl()!==o?r=t:(_o=r,r=o),r}function pa(){var r,t,e,n,s,u;return r=_o,(t=ml())!==o&&Rl()!==o?((e=$u())===o&&(e=null),e!==o&&(n=Rl())!==o&&(s=Tl())!==o?r=t={array_path:e,type:"array",brackets:!0,keyword:""}:(_o=r,r=o)):(_o=r,r=o),r===o&&(r=_o,(t=Dl())===o&&(t=tl()),t===o&&(t=null),t!==o&&ml()!==o&&(e=Rl())!==o&&(n=ei())!==o&&(s=Rl())!==o&&Tl()!==o?r=t=function(r,t){return{definition:r,array_path:t.map((r=>({expr:r,as:null}))),type:"array",keyword:r&&"array",brackets:!0}}(t,n):(_o=r,r=o),r===o&&(r=_o,(t=Dl())===o&&(t=tl()),t===o&&(t=null),t!==o&&Rl()!==o?((e=ml())===o&&(e=hl()),e!==o&&(n=Rl())!==o?((s=function(){var r,t,e,n,s,u,a,i;if(r=_o,(t=va())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=va())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=va())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}())===o&&(s=ba()),s!==o&&Rl()!==o?((u=Tl())===o&&(u=yl()),u!==o?r=t=function(r,t,e,n){if("[]"!=`${t}${n}`&&"()"!=`${t}${n}`)throw new Error("parentheses or brackets is not in pair");return{definition:r,expr_list:e,type:"array",keyword:r&&"array",brackets:"["===t,parentheses:"("===t}}(t,e,s,u):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o))),r}function La(){var t,e;return t=_o,function(){var t,e,n,s;return t=_o,"json"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Hs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="JSON":(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&(e=ei())!==o?t={type:"json",keyword:"json",expr_list:e}:(_o=t,t=o),t}function Ca(){var r,t,e,n;return r=_o,(t=$l())===o&&(t=sl()),t!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(e=$u())!==o&&Rl()!==o&&yl()!==o?r=t={definition:n=t,expr_list:e,type:"struct",keyword:n&&"struct",parentheses:!0}:(_o=r,r=o),r}function da(){var r,t,e,n,s,u,a,i;if(r=_o,(t=Oa())!==o){if(e=[],n=_o,(s=Rl())!==o&&(u=Nl())!==o&&(a=Rl())!==o&&(i=Oa())!==o?n=s=[s,u,a,i]:(_o=n,n=o),n!==o)for(;n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=Nl())!==o&&(a=Rl())!==o&&(i=Oa())!==o?n=s=[s,u,a,i]:(_o=n,n=o);else e=o;e!==o&&(n=Rl())!==o?((s=Aa())===o&&(s=null),s!==o?r=t=function(r,t,e){const n=Bl(r,t);return null===e?n:"arithmetic"===e.type?Bl(n,e.tail):jl(e.op,n,e.right)}(t,e,s):(_o=r,r=o)):(_o=r,r=o)}else _o=r,r=o;return r}function wa(){var r,t,e,n,s,u,a,i;if(r=_o,(t=ba())!==o){for(e=[],n=_o,(s=Rl())!==o?((u=qi())===o&&(u=Ki())===o&&(u=dl()),u!==o&&(a=Rl())!==o&&(i=ba())!==o?n=s=[s,u,a,i]:(_o=n,n=o)):(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o?((u=qi())===o&&(u=Ki())===o&&(u=dl()),u!==o&&(a=Rl())!==o&&(i=ba())!==o?n=s=[s,u,a,i]:(_o=n,n=o)):(_o=n,n=o);e!==o?r=t=function(r,t){const e=t.length;let n=r,s="";for(let r=0;r<e;++r)","===t[r][1]?(s=",",Array.isArray(n)||(n=[n]),n.push(t[r][3])):n=jl(t[r][1],n,t[r][3]);if(","===s){const r={type:"expr_list"};return r.value=n,r}return n}(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function ha(){var r,t,e,n,s,u,a,l;if(r=_o,(t=ya())!==o){for(e=[],n=_o,(s=Sl())!==o&&(u=qi())!==o&&(a=Rl())!==o&&(l=ya())!==o?n=s=[s,u,a,l]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Sl())!==o&&(u=qi())!==o&&(a=Rl())!==o&&(l=ya())!==o?n=s=[s,u,a,l]:(_o=n,n=o);e!==o?r=t=i(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function ya(){var t,e,n,s,u;return(t=Ea())===o&&(t=function(){var r,t,e,n,s;return r=_o,(t=function(){var r,t,e,n,s;return r=_o,t=_o,(e=Vi())!==o&&(n=Rl())!==o&&(s=Xi())!==o?t=e=[e,n,s]:(_o=t,t=o),t!==o&&(t=Ot(t)),(r=t)===o&&(r=Xi()),r}())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(e=xu())!==o&&Rl()!==o&&yl()!==o?(n=t,(s=e).parentheses=!0,r=t=Gl(n,s)):(_o=r,r=o),r}())===o&&(t=_o,(e=Vi())===o&&(e=_o,33===r.charCodeAt(_o)?(n="!",_o++):(n=o,0===Uo&&Po(gt)),n!==o?(s=_o,Uo++,61===r.charCodeAt(_o)?(u="=",_o++):(u=o,0===Uo&&Po(c)),Uo--,u===o?s=void 0:(_o=s,s=o),s!==o?e=n=[n,s]:(_o=e,e=o)):(_o=e,e=o)),e!==o&&(n=Rl())!==o&&(s=ya())!==o?t=e=Gl("NOT",s):(_o=t,t=o)),t}function Ea(){var r,t,e,n,s;return r=_o,(t=Ra())!==o&&Rl()!==o?((e=Aa())===o&&(e=null),e!==o?(n=t,r=t=null===(s=e)?n:"arithmetic"===s.type?Bl(n,s.tail):jl(s.op,n,s.right)):(_o=r,r=o)):(_o=r,r=o),r===o&&(r=si())===o&&(r=ka()),r}function Aa(){var r;return(r=function(){var r,t,e,n,s,u;if(r=[],t=_o,(e=Rl())!==o&&(n=ma())!==o&&(s=Rl())!==o?((u=da())===o&&(u=Ra()),u!==o?t=e=[e,n,s,u]:(_o=t,t=o)):(_o=t,t=o),t!==o)for(;t!==o;)r.push(t),t=_o,(e=Rl())!==o&&(n=ma())!==o&&(s=Rl())!==o?((u=da())===o&&(u=Ra()),u!==o?t=e=[e,n,s,u]:(_o=t,t=o)):(_o=t,t=o);else r=o;return r!==o&&(r={type:"arithmetic",tail:r}),r}())===o&&(r=Na())===o&&(r=function(){var r,t,e,n;return r=_o,(t=function(){var r,t,e,n,s;return r=_o,t=_o,(e=Vi())!==o&&(n=Rl())!==o&&(s=Hi())!==o?t=e=[e,n,s]:(_o=t,t=o),t!==o&&(t=Ot(t)),(r=t)===o&&(r=Hi()),r}())!==o&&Rl()!==o&&(e=Ra())!==o&&Rl()!==o&&qi()!==o&&Rl()!==o&&(n=Ra())!==o?r=t={op:t,right:{type:"expr_list",value:[e,n]}}:(_o=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s;return r=_o,(t=Bi())!==o&&(e=Rl())!==o&&(n=Ra())!==o?r=t={op:"IS",right:n}:(_o=r,r=o),r===o&&(r=_o,t=_o,(e=Bi())!==o&&(n=Rl())!==o&&(s=Vi())!==o?t=e=[e,n,s]:(_o=t,t=o),t!==o&&(e=Rl())!==o&&(n=Ra())!==o?(t=function(r){return{op:"IS NOT",right:r}}(n),r=t):(_o=r,r=o)),r}())===o&&(r=Ia()),r}function ma(){var t;return">="===r.substr(_o,2)?(t=">=",_o+=2):(t=o,0===Uo&&Po(xt)),t===o&&(62===r.charCodeAt(_o)?(t=">",_o++):(t=o,0===Uo&&Po(Ut)),t===o&&("<="===r.substr(_o,2)?(t="<=",_o+=2):(t=o,0===Uo&&Po(Mt)),t===o&&("<>"===r.substr(_o,2)?(t="<>",_o+=2):(t=o,0===Uo&&Po(kt)),t===o&&(60===r.charCodeAt(_o)?(t="<",_o++):(t=o,0===Uo&&Po(Dt)),t===o&&(61===r.charCodeAt(_o)?(t="=",_o++):(t=o,0===Uo&&Po(c)),t===o&&("!="===r.substr(_o,2)?(t="!=",_o+=2):(t=o,0===Uo&&Po($t)))))))),t}function Ta(){var r,t,e,n,s;return r=_o,t=_o,(e=Vi())!==o&&(n=Rl())!==o&&(s=Yi())!==o?t=e=[e,n,s]:(_o=t,t=o),t!==o&&(t=Ot(t)),(r=t)===o&&(r=Yi()),r}function Ia(){var r,t,e;return r=_o,(t=function(){var r,t,e,n,s;return r=_o,t=_o,(e=Vi())!==o&&(n=Rl())!==o&&(s=Wi())!==o?t=e=[e,n,s]:(_o=t,t=o),t!==o&&(t=Ot(t)),(r=t)===o&&(r=Wi()),r}())!==o&&Rl()!==o?((e=ti())===o&&(e=Ea()),e!==o?r=t={op:t,right:e}:(_o=r,r=o)):(_o=r,r=o),r}function Na(){var r,t,e,n;return r=_o,(t=Ta())!==o&&Rl()!==o&&(e=hl())!==o&&Rl()!==o&&(n=fa())!==o&&Rl()!==o&&yl()!==o?r=t={op:t,right:n}:(_o=r,r=o),r===o&&(r=_o,(t=Ta())!==o&&Rl()!==o?((e=si())===o&&(e=Yu()),e!==o?r=t=function(r,t){return{op:r,right:t}}(t,e):(_o=r,r=o)):(_o=r,r=o)),r}function Ra(){var r,t,e,n,s,u,a,l;if(r=_o,(t=_a())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=Sa())!==o&&(a=Rl())!==o&&(l=_a())!==o?n=s=[s,u,a,l]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=Sa())!==o&&(a=Rl())!==o&&(l=_a())!==o?n=s=[s,u,a,l]:(_o=n,n=o);e!==o?r=t=i(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Sa(){var t;return 43===r.charCodeAt(_o)?(t="+",_o++):(t=o,0===Uo&&Po(Pt)),t===o&&(45===r.charCodeAt(_o)?(t="-",_o++):(t=o,0===Uo&&Po(Ft))),t}function _a(){var r,t,e,n,s,u,a,i;if(r=_o,(t=Oa())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=ga())!==o&&(a=Rl())!==o&&(i=Oa())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=ga())!==o&&(a=Rl())!==o&&(i=Oa())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=Bl(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function ga(){var t;return 42===r.charCodeAt(_o)?(t="*",_o++):(t=o,0===Uo&&Po(Gt)),t===o&&(47===r.charCodeAt(_o)?(t="/",_o++):(t=o,0===Uo&&Po(jt)),t===o&&(37===r.charCodeAt(_o)?(t="%",_o++):(t=o,0===Uo&&Po(Ht)))),t}function Oa(){var t,e,n;return(t=pa())===o&&(t=Ca())===o&&(t=La())===o&&(t=function(){var t,e,n,s,u,a,i,l,c;return t=_o,(e=ri())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(n=ba())!==o&&Rl()!==o&&mi()!==o&&Rl()!==o&&(s=kl())!==o&&Rl()!==o&&(u=yl())!==o?(l=n,c=s,t=e={type:"cast",keyword:e.toLowerCase(),expr:l,symbol:"as",target:c}):(_o=t,t=o),t===o&&(t=_o,(e=ri())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(n=ba())!==o&&Rl()!==o&&mi()!==o&&Rl()!==o&&(s=el())!==o&&Rl()!==o&&(u=hl())!==o&&Rl()!==o&&(a=ci())!==o&&Rl()!==o&&yl()!==o&&Rl()!==o&&(i=yl())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+")"}}}(e,n,a),t=e):(_o=t,t=o),t===o&&(t=_o,(e=ri())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(n=ba())!==o&&Rl()!==o&&mi()!==o&&Rl()!==o&&(s=el())!==o&&Rl()!==o&&(u=hl())!==o&&Rl()!==o&&(a=ci())!==o&&Rl()!==o&&dl()!==o&&Rl()!==o&&(i=ci())!==o&&Rl()!==o&&yl()!==o&&Rl()!==o&&yl()!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+", "+n+")"}}}(e,n,a,i),t=e):(_o=t,t=o),t===o&&(t=_o,(e=ri())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(n=ba())!==o&&Rl()!==o&&mi()!==o&&Rl()!==o&&(s=function(){var t;return(t=function(){var t,e,n,s;return t=_o,"signed"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Ps)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="SIGNED":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"unsigned"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(Fs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="UNSIGNED":(_o=t,t=o)):(_o=t,t=o),t}()),t}())!==o&&Rl()!==o?((u=nl())===o&&(u=null),u!==o&&Rl()!==o&&(a=yl())!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:e+(n?" "+n:"")}}}(e,n,s,u),t=e):(_o=t,t=o)):(_o=t,t=o)))),t}())===o&&(t=ti())===o&&(t=qa())===o&&(t=function(){var t,e,n,s,u;return(t=function(){var t,e,n,s,u,a,i,l;return t=_o,(e=Qi())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(n=Ja())!==o&&Rl()!==o&&Ei()!==o&&Rl()!==o?((s=ll())===o&&(s=cl())===o&&(s=il())===o&&(s=ol()),s!==o&&Rl()!==o&&(u=ba())!==o&&Rl()!==o&&yl()!==o?(a=n,i=s,l=u,t=e={type:e.toLowerCase(),args:{field:a,cast_type:i,source:l}}):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=Qi())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(n=Ja())!==o&&Rl()!==o&&Ei()!==o&&Rl()!==o&&(s=ba())!==o&&Rl()!==o&&(u=yl())!==o?(e=function(r,t,e){return{type:r.toLowerCase(),args:{field:t,source:e}}}(e,n,s),t=e):(_o=t,t=o),t===o&&(t=_o,"date_trunc"===r.substr(_o,10).toLowerCase()?(e=r.substr(_o,10),_o+=10):(e=o,0===Uo&&Po(Be)),e!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(n=ba())!==o&&Rl()!==o&&dl()!==o&&Rl()!==o&&(s=Ja())!==o&&Rl()!==o&&(u=yl())!==o?(e=function(r,t){return{type:"function",name:"DATE_TRUNC",args:{type:"expr_list",value:[r,{type:"origin",value:t}]},over:null}}(n,s),t=e):(_o=t,t=o))),t}())===o&&(t=function(){var t,e,n,s,u;return t=_o,"any_value"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(ae)),e!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(n=wa())!==o&&Rl()!==o?((s=function(){var r,t,e;return r=_o,Mi()!==o&&Rl()!==o?((t=Zi())===o&&(t=zi()),t!==o&&Rl()!==o&&(e=wa())!==o?r={prefix:t,expr:e}:(_o=r,r=o)):(_o=r,r=o),r}())===o&&(s=null),s!==o&&Rl()!==o&&yl()!==o&&Rl()!==o?((u=Za())===o&&(u=null),u!==o?t=e={type:"any_value",args:{expr:n,having:s},over:u}:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=_o,(e=function(){var t;return(t=Qa())===o&&(t=function(){var t,e,n,s;return t=_o,"session_user"===r.substr(_o,12).toLowerCase()?(e=r.substr(_o,12),_o+=12):(e=o,0===Uo&&Po(Js)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="SESSION_USER":(_o=t,t=o)):(_o=t,t=o),t}()),t}())!==o&&Rl()!==o&&(n=hl())!==o&&Rl()!==o?((s=fa())===o&&(s=null),s!==o&&Rl()!==o&&yl()!==o&&Rl()!==o?((u=Za())===o&&(u=null),u!==o?t=e={type:"function",name:e,args:s||{type:"expr_list",value:[]},over:u}:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=Qa())!==o&&Rl()!==o?((n=Ka())===o&&(n=null),n!==o?t=e={type:"function",name:e,over:n}:(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=za())!==o&&Rl()!==o&&(n=hl())!==o&&Rl()!==o?((s=wa())===o&&(s=null),s!==o&&Rl()!==o&&yl()!==o&&Rl()!==o?((u=Za())===o&&(u=null),u!==o?(e=function(r,t,e){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,s,u),t=e):(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o)))),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l;return r=_o,(t=Ji())!==o&&Rl()!==o&&(e=xa())!==o&&Rl()!==o?((n=Ma())===o&&(n=null),n!==o&&Rl()!==o&&(s=rl())!==o&&Rl()!==o?((u=Ji())===o&&(u=null),u!==o?(i=e,(l=n)&&i.push(l),r=t={type:"case",expr:null,args:i}):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o),r===o&&(r=_o,(t=Ji())!==o&&Rl()!==o&&(e=ba())!==o&&Rl()!==o&&(n=xa())!==o&&Rl()!==o?((s=Ma())===o&&(s=null),s!==o&&Rl()!==o&&(u=rl())!==o&&Rl()!==o?((a=Ji())===o&&(a=null),a!==o?(t=function(r,t,e){return e&&t.push(e),{type:"case",expr:r,args:t}}(e,n,s),r=t):(_o=r,r=o)):(_o=r,r=o)):(_o=r,r=o)),r}())===o&&(t=function(){var t,e,n;return t=_o,cl()!==o&&Rl()!==o&&(e=ba())!==o&&Rl()!==o&&(n=function(){var t;return(t=function(){var t,e,n,s;return t=_o,"year"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Ye)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="YEAR":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"isoyear"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(xe)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="ISOYEAR":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"month"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po($e)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="MONTH":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"day"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(me)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="DAY":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"hour"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(_e)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="HOUR":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"minute"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(De)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="MINUTE":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"second"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Fe)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="SECOND":(_o=t,t=o)):(_o=t,t=o),t}()),t}())!==o?t={type:"interval",expr:e,unit:n.toLowerCase()}:(_o=t,t=o),t}())===o&&(t=ka())===o&&(t=Va())===o&&(t=_o,hl()!==o&&Rl()!==o&&(e=wa())!==o&&Rl()!==o&&yl()!==o?((n=e).parentheses=!0,t=n):(_o=t,t=o)),t}function xa(){var r,t,e,n,s,u;if(r=_o,(t=Ua())!==o)if(Rl()!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=Ua())!==o?n=s=[s,u]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=Ua())!==o?n=s=[s,u]:(_o=n,n=o);e!==o?r=t=y(t,e):(_o=r,r=o)}else _o=r,r=o;else _o=r,r=o;return r}function Ua(){var t,e,n;return t=_o,function(){var t,e,n,s;return t=_o,"when"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Ns)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&(e=wa())!==o&&Rl()!==o&&function(){var t,e,n,s;return t=_o,"then"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Rs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&(n=ba())!==o?t={type:"when",cond:e,result:n}:(_o=t,t=o),t}function Ma(){var t,e;return t=_o,function(){var t,e,n,s;return t=_o,"else"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Ss)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}()!==o&&Rl()!==o&&(e=ba())!==o?t={type:"else",result:e}:(_o=t,t=o),t}function ka(){var r,t,e,n,s,u,a,i,l,c,f,b;if(r=_o,(t=Fa())!==o){if(e=[],n=_o,(s=Rl())!==o&&(u=Cl())!==o&&(a=Rl())!==o&&(i=Fa())!==o?n=s=[s,u,a,i]:(_o=n,n=o),n!==o)for(;n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=Cl())!==o&&(a=Rl())!==o&&(i=Fa())!==o?n=s=[s,u,a,i]:(_o=n,n=o);else e=o;e!==o&&(n=Rl())!==o?(s=_o,(u=Fu())!==o&&(a=Rl())!==o?(i=_o,(l=Cl())!==o&&(c=Rl())!==o&&(f=Fa())!==o?i=l=[l,c,f]:(_o=i,i=o),i===o&&(i=null),i!==o?s=u=[u,a,i]:(_o=s,s=o)):(_o=s,s=o),s===o&&(s=null),s!==o?r=t=function(r,t,e){const n=t.map((r=>r[3]));return Kl.add(`select::${r}::${n[0]}`),{type:"column_ref",table:r,...e?{column:{expr:{type:"column_ref",table:null,column:n[0],subFields:n.slice(1)},offset:e&&e[0],suffix:e&&e[2]&&"."+e[2][2]}}:{column:n[0],subFields:n.slice(1)}}}(t,e,s):(_o=r,r=o)):(_o=r,r=o)}else _o=r,r=o;return r===o&&(r=_o,(t=ja())!==o&&(b=t,Kl.add("select::null::"+b),t={type:"column_ref",table:null,column:b}),r=t),r}function Da(){var r,t,e,n,s,u,a,i;if(r=_o,(t=ja())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ja())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ja())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function $a(){var r,t;return r=_o,(t=Ya())!==o&&(!0===Pl[(""+t).toUpperCase()]?o:void 0)!==o?r=t:(_o=r,r=o),r===o&&(r=_o,r=t=Pa()),r}function Pa(){var t;return(t=function(){var t,e,n,s;if(t=_o,34===r.charCodeAt(_o)?(e='"',_o++):(e=o,0===Uo&&Po(Yt)),e!==o){if(n=[],Bt.test(r.charAt(_o))?(s=r.charAt(_o),_o++):(s=o,0===Uo&&Po(Wt)),s!==o)for(;s!==o;)n.push(s),Bt.test(r.charAt(_o))?(s=r.charAt(_o),_o++):(s=o,0===Uo&&Po(Wt));else n=o;n!==o?(34===r.charCodeAt(_o)?(s='"',_o++):(s=o,0===Uo&&Po(Yt)),s!==o?t=e=Xt(n):(_o=t,t=o)):(_o=t,t=o)}else _o=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=_o,39===r.charCodeAt(_o)?(e="'",_o++):(e=o,0===Uo&&Po(lr)),e!==o){if(n=[],Vt.test(r.charAt(_o))?(s=r.charAt(_o),_o++):(s=o,0===Uo&&Po(qt)),s!==o)for(;s!==o;)n.push(s),Vt.test(r.charAt(_o))?(s=r.charAt(_o),_o++):(s=o,0===Uo&&Po(qt));else n=o;n!==o?(39===r.charCodeAt(_o)?(s="'",_o++):(s=o,0===Uo&&Po(lr)),s!==o?t=e=Xt(n):(_o=t,t=o)):(_o=t,t=o)}else _o=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=_o,96===r.charCodeAt(_o)?(e="`",_o++):(e=o,0===Uo&&Po(Kt)),e!==o){if(n=[],Zt.test(r.charAt(_o))?(s=r.charAt(_o),_o++):(s=o,0===Uo&&Po(zt)),s!==o)for(;s!==o;)n.push(s),Zt.test(r.charAt(_o))?(s=r.charAt(_o),_o++):(s=o,0===Uo&&Po(zt));else n=o;n!==o?(96===r.charCodeAt(_o)?(s="`",_o++):(s=o,0===Uo&&Po(Kt)),s!==o?t=e=`\`${n.join("")}\``:(_o=t,t=o)):(_o=t,t=o)}else _o=t,t=o;return t}()),t}function Fa(){var r;return(r=Ha())===o&&(r=Pa()),r}function Ga(){var r;return(r=Ya())===o&&(r=Pa()),r}function ja(){var r,t;return r=_o,(t=Ha())!==o&&(!0===Pl[t.toUpperCase()]?o:void 0)!==o?r=t:(_o=r,r=o),r===o&&(r=Pa()),r}function Ha(){var r,t,e,n;if(r=_o,(t=Ba())!==o){for(e=[],n=Xa();n!==o;)e.push(n),n=Xa();e!==o?r=t=Qt(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Ya(){var r,t,e,n;if(r=_o,(t=Ba())!==o){for(e=[],n=Wa();n!==o;)e.push(n),n=Wa();e!==o?r=t=Qt(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Ba(){var t;return Jt.test(r.charAt(_o))?(t=r.charAt(_o),_o++):(t=o,0===Uo&&Po(re)),t}function Wa(){var t;return te.test(r.charAt(_o))?(t=r.charAt(_o),_o++):(t=o,0===Uo&&Po(ee)),t}function Xa(){var t;return ne.test(r.charAt(_o))?(t=r.charAt(_o),_o++):(t=o,0===Uo&&Po(se)),t}function Va(){var t,e,n;return t=_o,58===r.charCodeAt(_o)?(e=":",_o++):(e=o,0===Uo&&Po(oe)),e===o&&(64===r.charCodeAt(_o)?(e="@",_o++):(e=o,0===Uo&&Po(Vr))),e!==o&&(n=Ya())!==o?t=e={type:"param",value:n,prefix:e}:(_o=t,t=o),t}function qa(){var t;return(t=function(){var t,e,n,s;return t=_o,(e=function(){var t,e,n,s;return t=_o,"count"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(ws)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="COUNT":(_o=t,t=o)):(_o=t,t=o),t}())===o&&("string_agg"===r.substr(_o,10).toLowerCase()?(e=r.substr(_o,10),_o+=10):(e=o,0===Uo&&Po(ue))),e!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(n=function(){var t,e,n,s,u;return t=_o,(e=function(){var t;return 42===r.charCodeAt(_o)?(t="*",_o++):(t=o,0===Uo&&Po(Gt)),t!==o&&(t={type:"star",value:"*"}),t}())!==o&&(e={expr:e}),(t=e)===o&&(t=_o,(e=ji())===o&&(e=null),e!==o&&Rl()!==o&&(n=hl())!==o&&Rl()!==o&&(s=ba())!==o&&Rl()!==o&&yl()!==o&&Rl()!==o?((u=aa())===o&&(u=null),u!==o?t=e={distinct:e,expr:s,orderby:u,parentheses:!0}:(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,(e=ji())===o&&(e=null),e!==o&&Rl()!==o&&(n=ba())!==o&&Rl()!==o?((s=aa())===o&&(s=null),s!==o?(e=function(r,t,e){return{distinct:r,expr:t,orderby:e,parentheses:!1}}(e,n,s),t=e):(_o=t,t=o)):(_o=t,t=o))),t}())!==o&&Rl()!==o&&yl()!==o&&Rl()!==o?((s=Za())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:n,over:s}:(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,(e=function(){var t;return(t=function(){var t,e,n,s;return t=_o,"sum"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(Es)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="SUM":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=Zi())===o&&(t=zi())===o&&(t=function(){var t,e,n,s;return t=_o,"avg"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(As)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="AVG":(_o=t,t=o)):(_o=t,t=o),t}()),t}())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o&&(n=Ra())!==o&&Rl()!==o&&yl()!==o&&Rl()!==o?((s=Za())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:{expr:n},over:s}:(_o=t,t=o)):(_o=t,t=o),t}()),t}function Ka(){var t,e,n,s;return t=_o,Ni()!==o&&Rl()!==o?("update"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Mr)),e!==o&&Rl()!==o&&(n=fl())!==o&&Rl()!==o&&hl()!==o&&Rl()!==o?((s=fa())===o&&(s=null),s!==o&&Rl()!==o&&yl()!==o?t={type:"on update",keyword:n,parentheses:!0,expr:s}:(_o=t,t=o)):(_o=t,t=o)):(_o=t,t=o),t===o&&(t=_o,Ni()!==o&&Rl()!==o?("update"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Mr)),e!==o&&Rl()!==o&&(n=fl())!==o?t=function(r){return{type:"on update",keyword:r}}(n):(_o=t,t=o)):(_o=t,t=o)),t}function Za(){var r,t,e,n;return r=_o,_i()!==o&&Rl()!==o&&(t=ta())!==o?r={type:"window",as_window_specification:t}:(_o=r,r=o),r===o&&(r=_o,_i()!==o&&Rl()!==o&&(t=hl())!==o&&Rl()!==o&&(e=ua())!==o&&Rl()!==o?((n=aa())===o&&(n=null),n!==o&&Rl()!==o&&yl()!==o?r={partitionby:e,orderby:n}:(_o=r,r=o)):(_o=r,r=o),r===o&&(r=Ka())),r}function za(){var r,t,e,n,s,u,a,i;if(r=_o,(t=Ya())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=Cl())!==o&&(a=Rl())!==o&&(i=Ya())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=Cl())!==o&&(a=Rl())!==o&&(i=Ya())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=function(r,t){let e=r;return null!==t&&t.forEach((r=>e=`${e}.${r[3]}`)),e}(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Qa(){var t;return(t=function(){var t,e,n,s;return t=_o,"current_date"===r.substr(_o,12).toLowerCase()?(e=r.substr(_o,12),_o+=12):(e=o,0===Uo&&Po(Ks)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="CURRENT_DATE":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"current_time"===r.substr(_o,12).toLowerCase()?(e=r.substr(_o,12),_o+=12):(e=o,0===Uo&&Po(zs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="CURRENT_TIME":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=fl()),t}function Ja(){var t;return"year_month"===r.substr(_o,10).toLowerCase()?(t=r.substr(_o,10),_o+=10):(t=o,0===Uo&&Po(ie)),t===o&&("day_hour"===r.substr(_o,8).toLowerCase()?(t=r.substr(_o,8),_o+=8):(t=o,0===Uo&&Po(le)),t===o&&("day_minute"===r.substr(_o,10).toLowerCase()?(t=r.substr(_o,10),_o+=10):(t=o,0===Uo&&Po(ce)),t===o&&("day_second"===r.substr(_o,10).toLowerCase()?(t=r.substr(_o,10),_o+=10):(t=o,0===Uo&&Po(fe)),t===o&&("day_microsecond"===r.substr(_o,15).toLowerCase()?(t=r.substr(_o,15),_o+=15):(t=o,0===Uo&&Po(be)),t===o&&("hour_minute"===r.substr(_o,11).toLowerCase()?(t=r.substr(_o,11),_o+=11):(t=o,0===Uo&&Po(ve)),t===o&&("hour_second"===r.substr(_o,11).toLowerCase()?(t=r.substr(_o,11),_o+=11):(t=o,0===Uo&&Po(pe)),t===o&&("hour_microsecond"===r.substr(_o,16).toLowerCase()?(t=r.substr(_o,16),_o+=16):(t=o,0===Uo&&Po(Le)),t===o&&("minute_second"===r.substr(_o,13).toLowerCase()?(t=r.substr(_o,13),_o+=13):(t=o,0===Uo&&Po(Ce)),t===o&&("minute_microsecond"===r.substr(_o,18).toLowerCase()?(t=r.substr(_o,18),_o+=18):(t=o,0===Uo&&Po(de)),t===o&&("second_microsecond"===r.substr(_o,18).toLowerCase()?(t=r.substr(_o,18),_o+=18):(t=o,0===Uo&&Po(we)),t===o&&("timezone_hour"===r.substr(_o,13).toLowerCase()?(t=r.substr(_o,13),_o+=13):(t=o,0===Uo&&Po(he)),t===o&&("timezone_minute"===r.substr(_o,15).toLowerCase()?(t=r.substr(_o,15),_o+=15):(t=o,0===Uo&&Po(ye)),t===o&&("century"===r.substr(_o,7).toLowerCase()?(t=r.substr(_o,7),_o+=7):(t=o,0===Uo&&Po(Ee)),t===o&&("dayofweek"===r.substr(_o,9).toLowerCase()?(t=r.substr(_o,9),_o+=9):(t=o,0===Uo&&Po(Ae)),t===o&&("day"===r.substr(_o,3).toLowerCase()?(t=r.substr(_o,3),_o+=3):(t=o,0===Uo&&Po(me)),t===o&&("date"===r.substr(_o,4).toLowerCase()?(t=r.substr(_o,4),_o+=4):(t=o,0===Uo&&Po(Te)),t===o&&("decade"===r.substr(_o,6).toLowerCase()?(t=r.substr(_o,6),_o+=6):(t=o,0===Uo&&Po(Ie)),t===o&&("dow"===r.substr(_o,3).toLowerCase()?(t=r.substr(_o,3),_o+=3):(t=o,0===Uo&&Po(Ne)),t===o&&("doy"===r.substr(_o,3).toLowerCase()?(t=r.substr(_o,3),_o+=3):(t=o,0===Uo&&Po(Re)),t===o&&("epoch"===r.substr(_o,5).toLowerCase()?(t=r.substr(_o,5),_o+=5):(t=o,0===Uo&&Po(Se)),t===o&&("hour"===r.substr(_o,4).toLowerCase()?(t=r.substr(_o,4),_o+=4):(t=o,0===Uo&&Po(_e)),t===o&&("isodow"===r.substr(_o,6).toLowerCase()?(t=r.substr(_o,6),_o+=6):(t=o,0===Uo&&Po(ge)),t===o&&("isoweek"===r.substr(_o,7).toLowerCase()?(t=r.substr(_o,7),_o+=7):(t=o,0===Uo&&Po(Oe)),t===o&&("isoyear"===r.substr(_o,7).toLowerCase()?(t=r.substr(_o,7),_o+=7):(t=o,0===Uo&&Po(xe)),t===o&&("microseconds"===r.substr(_o,12).toLowerCase()?(t=r.substr(_o,12),_o+=12):(t=o,0===Uo&&Po(Ue)),t===o&&("millennium"===r.substr(_o,10).toLowerCase()?(t=r.substr(_o,10),_o+=10):(t=o,0===Uo&&Po(Me)),t===o&&("milliseconds"===r.substr(_o,12).toLowerCase()?(t=r.substr(_o,12),_o+=12):(t=o,0===Uo&&Po(ke)),t===o&&("minute"===r.substr(_o,6).toLowerCase()?(t=r.substr(_o,6),_o+=6):(t=o,0===Uo&&Po(De)),t===o&&("month"===r.substr(_o,5).toLowerCase()?(t=r.substr(_o,5),_o+=5):(t=o,0===Uo&&Po($e)),t===o&&("quarter"===r.substr(_o,7).toLowerCase()?(t=r.substr(_o,7),_o+=7):(t=o,0===Uo&&Po(Pe)),t===o&&("second"===r.substr(_o,6).toLowerCase()?(t=r.substr(_o,6),_o+=6):(t=o,0===Uo&&Po(Fe)),t===o&&("time"===r.substr(_o,4).toLowerCase()?(t=r.substr(_o,4),_o+=4):(t=o,0===Uo&&Po(Ge)),t===o&&("timezone"===r.substr(_o,8).toLowerCase()?(t=r.substr(_o,8),_o+=8):(t=o,0===Uo&&Po(je)),t===o&&("week"===r.substr(_o,4).toLowerCase()?(t=r.substr(_o,4),_o+=4):(t=o,0===Uo&&Po(He)),t===o&&("year"===r.substr(_o,4).toLowerCase()?(t=r.substr(_o,4),_o+=4):(t=o,0===Uo&&Po(Ye))))))))))))))))))))))))))))))))))))),t}function ri(){var t;return(t=function(){var t,e,n,s;return t=_o,"cast"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(gs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="CAST":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"safe_cast"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(Os)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="SAFE_CAST":(_o=t,t=o)):(_o=t,t=o),t}()),t}function ti(){var t;return(t=si())===o&&(t=ii())===o&&(t=function(){var t,e;return t=_o,(e=function(){var t,e,n,s;return t=_o,"true"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Tn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&(e={type:"bool",value:!0}),(t=e)===o&&(t=_o,(e=function(){var t,e,n,s;return t=_o,"false"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Nn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&(e={type:"bool",value:!1}),t=e),t}())===o&&(t=ni())===o&&(t=function(){var t,e,n,s,u,a;if(t=_o,(e=il())===o&&(e=ol())===o&&(e=ll())===o&&(e=ul()),e!==o)if(Rl()!==o){if(n=_o,39===r.charCodeAt(_o)?(s="'",_o++):(s=o,0===Uo&&Po(lr)),s!==o){for(u=[],a=ui();a!==o;)u.push(a),a=ui();u!==o?(39===r.charCodeAt(_o)?(a="'",_o++):(a=o,0===Uo&&Po(lr)),a!==o?n=s=[s,u,a]:(_o=n,n=o)):(_o=n,n=o)}else _o=n,n=o;n!==o?t=e=Xe(e,n):(_o=t,t=o)}else _o=t,t=o;else _o=t,t=o;if(t===o)if(t=_o,(e=il())===o&&(e=ol())===o&&(e=ll())===o&&(e=ul()),e!==o)if(Rl()!==o){if(n=_o,34===r.charCodeAt(_o)?(s='"',_o++):(s=o,0===Uo&&Po(Yt)),s!==o){for(u=[],a=oi();a!==o;)u.push(a),a=oi();u!==o?(34===r.charCodeAt(_o)?(a='"',_o++):(a=o,0===Uo&&Po(Yt)),a!==o?n=s=[s,u,a]:(_o=n,n=o)):(_o=n,n=o)}else _o=n,n=o;n!==o?t=e=Xe(e,n):(_o=t,t=o)}else _o=t,t=o;else _o=t,t=o;return t}()),t}function ei(){var r,t,e,n,s,u,a,i;if(r=_o,(t=ti())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ti())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=ti())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function ni(){var t;return(t=function(){var t,e,n,s;return t=_o,"null"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(An)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}())!==o&&(t={type:"null",value:null}),t}function si(){var t,e,n,s,u,a;if(t=_o,"r"===r.substr(_o,1).toLowerCase()?(e=r.charAt(_o),_o++):(e=o,0===Uo&&Po(We)),e===o&&(e=null),e!==o)if(Rl()!==o){if(n=_o,39===r.charCodeAt(_o)?(s="'",_o++):(s=o,0===Uo&&Po(lr)),s!==o){for(u=[],a=ui();a!==o;)u.push(a),a=ui();u!==o?(39===r.charCodeAt(_o)?(a="'",_o++):(a=o,0===Uo&&Po(lr)),a!==o?n=s=[s,u,a]:(_o=n,n=o)):(_o=n,n=o)}else _o=n,n=o;n!==o?t=e={type:e?"regex_string":"single_quote_string",value:n[1].join("")}:(_o=t,t=o)}else _o=t,t=o;else _o=t,t=o;if(t===o)if(t=_o,"r"===r.substr(_o,1).toLowerCase()?(e=r.charAt(_o),_o++):(e=o,0===Uo&&Po(We)),e===o&&(e=null),e!==o)if(Rl()!==o){if(n=_o,34===r.charCodeAt(_o)?(s='"',_o++):(s=o,0===Uo&&Po(Yt)),s!==o){for(u=[],a=oi();a!==o;)u.push(a),a=oi();u!==o?(34===r.charCodeAt(_o)?(a='"',_o++):(a=o,0===Uo&&Po(Yt)),a!==o?n=s=[s,u,a]:(_o=n,n=o)):(_o=n,n=o)}else _o=n,n=o;n!==o?t=e=function(r,t){return{type:r?"regex_string":"string",value:t[1].join("")}}(e,n):(_o=t,t=o)}else _o=t,t=o;else _o=t,t=o;return t}function oi(){var t;return Ve.test(r.charAt(_o))?(t=r.charAt(_o),_o++):(t=o,0===Uo&&Po(qe)),t===o&&(t=ai()),t}function ui(){var t;return Ke.test(r.charAt(_o))?(t=r.charAt(_o),_o++):(t=o,0===Uo&&Po(Ze)),t===o&&(t=ai()),t}function ai(){var t,e,n,s,u,a,i,l,c,f;return t=_o,"\\'"===r.substr(_o,2)?(e="\\'",_o+=2):(e=o,0===Uo&&Po(ze)),e!==o&&(e="\\'"),(t=e)===o&&(t=_o,'\\"'===r.substr(_o,2)?(e='\\"',_o+=2):(e=o,0===Uo&&Po(Qe)),e!==o&&(e='\\"'),(t=e)===o&&(t=_o,"\\\\"===r.substr(_o,2)?(e="\\\\",_o+=2):(e=o,0===Uo&&Po(Je)),e!==o&&(e="\\\\"),(t=e)===o&&(t=_o,"\\/"===r.substr(_o,2)?(e="\\/",_o+=2):(e=o,0===Uo&&Po(rn)),e!==o&&(e="\\/"),(t=e)===o&&(t=_o,"\\b"===r.substr(_o,2)?(e="\\b",_o+=2):(e=o,0===Uo&&Po(tn)),e!==o&&(e="\b"),(t=e)===o&&(t=_o,"\\f"===r.substr(_o,2)?(e="\\f",_o+=2):(e=o,0===Uo&&Po(en)),e!==o&&(e="\f"),(t=e)===o&&(t=_o,"\\n"===r.substr(_o,2)?(e="\\n",_o+=2):(e=o,0===Uo&&Po(nn)),e!==o&&(e="\n"),(t=e)===o&&(t=_o,"\\r"===r.substr(_o,2)?(e="\\r",_o+=2):(e=o,0===Uo&&Po(sn)),e!==o&&(e="\r"),(t=e)===o&&(t=_o,"\\t"===r.substr(_o,2)?(e="\\t",_o+=2):(e=o,0===Uo&&Po(on)),e!==o&&(e="\t"),(t=e)===o&&(t=_o,"\\u"===r.substr(_o,2)?(e="\\u",_o+=2):(e=o,0===Uo&&Po(un)),e!==o&&(n=Li())!==o&&(s=Li())!==o&&(u=Li())!==o&&(a=Li())!==o?(i=n,l=s,c=u,f=a,t=e=String.fromCharCode(parseInt("0x"+i+l+c+f))):(_o=t,t=o),t===o&&(t=_o,92===r.charCodeAt(_o)?(e="\\",_o++):(e=o,0===Uo&&Po(an)),e!==o&&(e="\\"),(t=e)===o&&(t=_o,"''"===r.substr(_o,2)?(e="''",_o+=2):(e=o,0===Uo&&Po(ln)),e!==o&&(e="''"),(t=e)===o&&(t=_o,'""'===r.substr(_o,2)?(e='""',_o+=2):(e=o,0===Uo&&Po(cn)),e!==o&&(e='""'),(t=e)===o&&(t=_o,"``"===r.substr(_o,2)?(e="``",_o+=2):(e=o,0===Uo&&Po(fn)),e!==o&&(e="``"),t=e))))))))))))),t}function ii(){var r,t;return(r=li())!==o&&(r=(t=r)&&"bigint"===t.type?t:{type:"number",value:t}),r}function li(){var r,t,e,n;return r=_o,(t=ci())!==o&&(e=fi())!==o&&(n=bi())!==o?r=t={type:"bigint",value:t+e+n}:(_o=r,r=o),r===o&&(r=_o,(t=ci())!==o&&(e=fi())!==o?r=t=function(r,t){const e=r+t;return Hl(r)?{type:"bigint",value:e}:parseFloat(e)}(t,e):(_o=r,r=o),r===o&&(r=_o,(t=ci())!==o&&(e=bi())!==o?r=t=function(r,t){return{type:"bigint",value:r+t}}(t,e):(_o=r,r=o),r===o&&(r=_o,(t=ci())!==o&&(t=function(r){return Hl(r)?{type:"bigint",value:r}:parseFloat(r)}(t)),r=t))),r}function ci(){var t,e,n;return(t=vi())===o&&(t=pi())===o&&(t=_o,45===r.charCodeAt(_o)?(e="-",_o++):(e=o,0===Uo&&Po(Ft)),e===o&&(43===r.charCodeAt(_o)?(e="+",_o++):(e=o,0===Uo&&Po(Pt))),e!==o&&(n=vi())!==o?t=e+=n:(_o=t,t=o),t===o&&(t=_o,45===r.charCodeAt(_o)?(e="-",_o++):(e=o,0===Uo&&Po(Ft)),e===o&&(43===r.charCodeAt(_o)?(e="+",_o++):(e=o,0===Uo&&Po(Pt))),e!==o&&(n=pi())!==o?t=e=function(r,t){return r+t}(e,n):(_o=t,t=o))),t}function fi(){var t,e,n;return t=_o,46===r.charCodeAt(_o)?(e=".",_o++):(e=o,0===Uo&&Po(T)),e!==o&&(n=vi())!==o?t=e="."+n:(_o=t,t=o),t}function bi(){var t,e,n;return t=_o,(e=function(){var t,e,n,s;return t=_o,wn.test(r.charAt(_o))?(e=r.charAt(_o),_o++):(e=o,0===Uo&&Po(hn)),e!==o?(yn.test(r.charAt(_o))?(n=r.charAt(_o),_o++):(n=o,0===Uo&&Po(En)),n===o&&(n=null),n!==o?t=e+=null!==(s=n)?s:"":(_o=t,t=o)):(_o=t,t=o),t}())!==o&&(n=vi())!==o?t=e+=n:(_o=t,t=o),t}function vi(){var r,t;if(r=[],(t=pi())!==o)for(;t!==o;)r.push(t),t=pi();else r=o;return r!==o&&(r=r.join("")),r}function pi(){var t;return pn.test(r.charAt(_o))?(t=r.charAt(_o),_o++):(t=o,0===Uo&&Po(Ln)),t}function Li(){var t;return Cn.test(r.charAt(_o))?(t=r.charAt(_o),_o++):(t=o,0===Uo&&Po(dn)),t}function Ci(){var t,e,n,s;return t=_o,"default"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(N)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function di(){var t,e,n,s;return t=_o,"to"===r.substr(_o,2).toLowerCase()?(e=r.substr(_o,2),_o+=2):(e=o,0===Uo&&Po(In)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function wi(){var t,e,n,s;return t=_o,"drop"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Rn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="DROP":(_o=t,t=o)):(_o=t,t=o),t}function hi(){var t,e,n,s;return t=_o,"partition"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(On)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="PARTITION":(_o=t,t=o)):(_o=t,t=o),t}function yi(){var t,e,n,s;return t=_o,"into"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(xn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Ei(){var t,e,n,s;return t=_o,"from"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Un)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Ai(){var t,e,n,s;return t=_o,"set"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(w)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="SET":(_o=t,t=o)):(_o=t,t=o),t}function mi(){var t,e,n,s;return t=_o,"as"===r.substr(_o,2).toLowerCase()?(e=r.substr(_o,2),_o+=2):(e=o,0===Uo&&Po(ut)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Ti(){var t,e,n,s;return t=_o,"table"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(kn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="TABLE":(_o=t,t=o)):(_o=t,t=o),t}function Ii(){var t,e,n,s;return t=_o,"tables"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Dn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="TABLES":(_o=t,t=o)):(_o=t,t=o),t}function Ni(){var t,e,n,s;return t=_o,"on"===r.substr(_o,2).toLowerCase()?(e=r.substr(_o,2),_o+=2):(e=o,0===Uo&&Po($n)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Ri(){var t,e,n,s;return t=_o,"join"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Yn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Si(){var t,e,n,s;return t=_o,"outer"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Bn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function _i(){var t,e,n,s;return t=_o,"over"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Wn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function gi(){var t,e,n,s;return t=_o,"values"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(qn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Oi(){var t,e,n,s;return t=_o,"using"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Kn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function xi(){var t,e,n,s;return t=_o,"with"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Ir)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Ui(){var t,e,n,s;return t=_o,"by"===r.substr(_o,2).toLowerCase()?(e=r.substr(_o,2),_o+=2):(e=o,0===Uo&&Po(pr)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function Mi(){var t,e,n,s;return t=_o,"having"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Jn)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function ki(){var t,e,n,s;return t=_o,"ordinal"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(es)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="ORDINAL":(_o=t,t=o)):(_o=t,t=o),t}function Di(){var t,e,n,s;return t=_o,"safe_ordinal"===r.substr(_o,12).toLowerCase()?(e=r.substr(_o,12),_o+=12):(e=o,0===Uo&&Po(ns)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="SAFE_ORDINAL":(_o=t,t=o)):(_o=t,t=o),t}function $i(){var t,e,n,s;return t=_o,"offset"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(os)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="OFFSET":(_o=t,t=o)):(_o=t,t=o),t}function Pi(){var t,e,n,s;return t=_o,"safe_offset"===r.substr(_o,11).toLowerCase()?(e=r.substr(_o,11),_o+=11):(e=o,0===Uo&&Po(us)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="SAFE_OFFSET":(_o=t,t=o)):(_o=t,t=o),t}function Fi(){var t,e,n,s;return t=_o,"desc"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(is)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="DESC":(_o=t,t=o)):(_o=t,t=o),t}function Gi(){var t,e,n,s;return t=_o,"all"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(ls)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="ALL":(_o=t,t=o)):(_o=t,t=o),t}function ji(){var t,e,n,s;return t=_o,"distinct"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(cs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="DISTINCT":(_o=t,t=o)):(_o=t,t=o),t}function Hi(){var t,e,n,s;return t=_o,"between"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(fs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="BETWEEN":(_o=t,t=o)):(_o=t,t=o),t}function Yi(){var t,e,n,s;return t=_o,"in"===r.substr(_o,2).toLowerCase()?(e=r.substr(_o,2),_o+=2):(e=o,0===Uo&&Po(bs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="IN":(_o=t,t=o)):(_o=t,t=o),t}function Bi(){var t,e,n,s;return t=_o,"is"===r.substr(_o,2).toLowerCase()?(e=r.substr(_o,2),_o+=2):(e=o,0===Uo&&Po(vs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="IS":(_o=t,t=o)):(_o=t,t=o),t}function Wi(){var t,e,n,s;return t=_o,"like"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(ps)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="LIKE":(_o=t,t=o)):(_o=t,t=o),t}function Xi(){var t,e,n,s;return t=_o,"exists"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Ls)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="EXISTS":(_o=t,t=o)):(_o=t,t=o),t}function Vi(){var t,e,n,s;return t=_o,"not"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(Ar)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="NOT":(_o=t,t=o)):(_o=t,t=o),t}function qi(){var t,e,n,s;return t=_o,"and"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(Cs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="AND":(_o=t,t=o)):(_o=t,t=o),t}function Ki(){var t,e,n,s;return t=_o,"or"===r.substr(_o,2).toLowerCase()?(e=r.substr(_o,2),_o+=2):(e=o,0===Uo&&Po(ds)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="OR":(_o=t,t=o)):(_o=t,t=o),t}function Zi(){var t,e,n,s;return t=_o,"max"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(hs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="MAX":(_o=t,t=o)):(_o=t,t=o),t}function zi(){var t,e,n,s;return t=_o,"min"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(ys)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="MIN":(_o=t,t=o)):(_o=t,t=o),t}function Qi(){var t,e,n,s;return t=_o,"extract"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(ms)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="EXTRACT":(_o=t,t=o)):(_o=t,t=o),t}function Ji(){var t,e,n,s;return t=_o,"case"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Is)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function rl(){var t,e,n,s;return t=_o,"end"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(_s)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e=[e,n]:(_o=t,t=o)):(_o=t,t=o),t}function tl(){var t,e,n,s;return t=_o,"array"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(xs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="ARRAY":(_o=t,t=o)):(_o=t,t=o),t}function el(){var t,e,n,s;return t=_o,"decimal"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po($s)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="DECIMAL":(_o=t,t=o)):(_o=t,t=o),t}function nl(){var t,e,n,s;return t=_o,"integer"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(js)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="INTEGER":(_o=t,t=o)):(_o=t,t=o),t}function sl(){var t,e,n,s;return t=_o,"struct"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Bs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="STRUCT":(_o=t,t=o)):(_o=t,t=o),t}function ol(){var t,e,n,s;return t=_o,"date"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Te)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="DATE":(_o=t,t=o)):(_o=t,t=o),t}function ul(){var t,e,n,s;return t=_o,"datetime"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(Xs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="DATETIME":(_o=t,t=o)):(_o=t,t=o),t}function al(){var t,e,n,s;return t=_o,"rows"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(At)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="ROWS":(_o=t,t=o)):(_o=t,t=o),t}function il(){var t,e,n,s;return t=_o,"time"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Ge)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="TIME":(_o=t,t=o)):(_o=t,t=o),t}function ll(){var t,e,n,s;return t=_o,"timestamp"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(Vs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="TIMESTAMP":(_o=t,t=o)):(_o=t,t=o),t}function cl(){var t,e,n,s;return t=_o,"interval"===r.substr(_o,8).toLowerCase()?(e=r.substr(_o,8),_o+=8):(e=o,0===Uo&&Po(Zs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="INTERVAL":(_o=t,t=o)):(_o=t,t=o),t}function fl(){var t,e,n,s;return t=_o,"current_timestamp"===r.substr(_o,17).toLowerCase()?(e=r.substr(_o,17),_o+=17):(e=o,0===Uo&&Po(Qs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="CURRENT_TIMESTAMP":(_o=t,t=o)):(_o=t,t=o),t}function bl(){var t,e,n,s;return t=_o,"column"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(uo)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="COLUMN":(_o=t,t=o)):(_o=t,t=o),t}function vl(){var t,e,n,s;return t=_o,"index"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(ao)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="INDEX":(_o=t,t=o)):(_o=t,t=o),t}function pl(){var t,e,n,s;return t=_o,"key"===r.substr(_o,3).toLowerCase()?(e=r.substr(_o,3),_o+=3):(e=o,0===Uo&&Po(D)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="KEY":(_o=t,t=o)):(_o=t,t=o),t}function Ll(){var t,e,n,s;return t=_o,"comment"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(lo)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="COMMENT":(_o=t,t=o)):(_o=t,t=o),t}function Cl(){var t;return 46===r.charCodeAt(_o)?(t=".",_o++):(t=o,0===Uo&&Po(T)),t}function dl(){var t;return 44===r.charCodeAt(_o)?(t=",",_o++):(t=o,0===Uo&&Po(fo)),t}function wl(){var t;return 42===r.charCodeAt(_o)?(t="*",_o++):(t=o,0===Uo&&Po(Gt)),t}function hl(){var t;return 40===r.charCodeAt(_o)?(t="(",_o++):(t=o,0===Uo&&Po(tt)),t}function yl(){var t;return 41===r.charCodeAt(_o)?(t=")",_o++):(t=o,0===Uo&&Po(et)),t}function El(){var t;return 60===r.charCodeAt(_o)?(t="<",_o++):(t=o,0===Uo&&Po(Dt)),t}function Al(){var t;return 62===r.charCodeAt(_o)?(t=">",_o++):(t=o,0===Uo&&Po(Ut)),t}function ml(){var t;return 91===r.charCodeAt(_o)?(t="[",_o++):(t=o,0===Uo&&Po(bo)),t}function Tl(){var t;return 93===r.charCodeAt(_o)?(t="]",_o++):(t=o,0===Uo&&Po(vo)),t}function Il(){var t;return 59===r.charCodeAt(_o)?(t=";",_o++):(t=o,0===Uo&&Po(po)),t}function Nl(){var t;return(t=function(){var t;return"||"===r.substr(_o,2)?(t="||",_o+=2):(t=o,0===Uo&&Po(Lo)),t}())===o&&(t=function(){var t;return"&&"===r.substr(_o,2)?(t="&&",_o+=2):(t=o,0===Uo&&Po(Co)),t}()),t}function Rl(){var r,t;for(r=[],(t=Ol())===o&&(t=_l());t!==o;)r.push(t),(t=Ol())===o&&(t=_l());return r}function Sl(){var r,t;if(r=[],(t=Ol())===o&&(t=_l()),t!==o)for(;t!==o;)r.push(t),(t=Ol())===o&&(t=_l());else r=o;return r}function _l(){var t;return(t=function(){var t,e,n,s,u,a;if(t=_o,"/*"===r.substr(_o,2)?(e="/*",_o+=2):(e=o,0===Uo&&Po(wo)),e!==o){for(n=[],s=_o,u=_o,Uo++,"*/"===r.substr(_o,2)?(a="*/",_o+=2):(a=o,0===Uo&&Po(ho)),Uo--,a===o?u=void 0:(_o=u,u=o),u!==o&&(a=gl())!==o?s=u=[u,a]:(_o=s,s=o);s!==o;)n.push(s),s=_o,u=_o,Uo++,"*/"===r.substr(_o,2)?(a="*/",_o+=2):(a=o,0===Uo&&Po(ho)),Uo--,a===o?u=void 0:(_o=u,u=o),u!==o&&(a=gl())!==o?s=u=[u,a]:(_o=s,s=o);n!==o?("*/"===r.substr(_o,2)?(s="*/",_o+=2):(s=o,0===Uo&&Po(ho)),s!==o?t=e=[e,n,s]:(_o=t,t=o)):(_o=t,t=o)}else _o=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=_o,"--"===r.substr(_o,2)?(e="--",_o+=2):(e=o,0===Uo&&Po(yo)),e!==o){for(n=[],s=_o,u=_o,Uo++,a=xl(),Uo--,a===o?u=void 0:(_o=u,u=o),u!==o&&(a=gl())!==o?s=u=[u,a]:(_o=s,s=o);s!==o;)n.push(s),s=_o,u=_o,Uo++,a=xl(),Uo--,a===o?u=void 0:(_o=u,u=o),u!==o&&(a=gl())!==o?s=u=[u,a]:(_o=s,s=o);n!==o?t=e=[e,n]:(_o=t,t=o)}else _o=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=_o,35===r.charCodeAt(_o)?(e="#",_o++):(e=o,0===Uo&&Po(Eo)),e!==o){for(n=[],s=_o,u=_o,Uo++,a=xl(),Uo--,a===o?u=void 0:(_o=u,u=o),u!==o&&(a=gl())!==o?s=u=[u,a]:(_o=s,s=o);s!==o;)n.push(s),s=_o,u=_o,Uo++,a=xl(),Uo--,a===o?u=void 0:(_o=u,u=o),u!==o&&(a=gl())!==o?s=u=[u,a]:(_o=s,s=o);n!==o?t=e=[e,n]:(_o=t,t=o)}else _o=t,t=o;return t}()),t}function gl(){var t;return r.length>_o?(t=r.charAt(_o),_o++):(t=o,0===Uo&&Po(Ao)),t}function Ol(){var t;return mo.test(r.charAt(_o))?(t=r.charAt(_o),_o++):(t=o,0===Uo&&Po(To)),t}function xl(){var t,e;if((t=function(){var t,e;return t=_o,Uo++,r.length>_o?(e=r.charAt(_o),_o++):(e=o,0===Uo&&Po(Ao)),Uo--,e===o?t=void 0:(_o=t,t=o),t}())===o)if(t=[],bn.test(r.charAt(_o))?(e=r.charAt(_o),_o++):(e=o,0===Uo&&Po(vn)),e!==o)for(;e!==o;)t.push(e),bn.test(r.charAt(_o))?(e=r.charAt(_o),_o++):(e=o,0===Uo&&Po(vn));else t=o;return t}function Ul(){var r,t,e,n,s,u,a,i;if(r=_o,(t=Ml())!==o){for(e=[],n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=Ml())!==o?n=s=[s,u,a,i]:(_o=n,n=o);n!==o;)e.push(n),n=_o,(s=Rl())!==o&&(u=dl())!==o&&(a=Rl())!==o&&(i=Ml())!==o?n=s=[s,u,a,i]:(_o=n,n=o);e!==o?r=t=l(t,e):(_o=r,r=o)}else _o=r,r=o;return r}function Ml(){var r,t,e,n;return r=_o,t=_o,(e=Ya())!==o&&(n=(n=!0===Fl[e.toUpperCase()])?o:void 0)!==o?t=e:(_o=t,t=o),t===o&&(t=null),t!==o&&(e=Rl())!==o&&(n=kl())!==o?r=t=function(r,t){return{field_name:r,field_type:t}}(t,n):(_o=r,r=o),r}function kl(){var t;return(t=$l())===o&&(t=Dl())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;if(t=_o,(e=function(){var t,e,n,s;return t=_o,"string"===r.substr(_o,6).toLowerCase()?(e=r.substr(_o,6),_o+=6):(e=o,0===Uo&&Po(Ys)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="STRING":(_o=t,t=o)):(_o=t,t=o),t}())!==o){if(n=[],s=_o,(u=Rl())!==o)if((a=hl())!==o)if((i=Rl())!==o){if(l=[],pn.test(r.charAt(_o))?(c=r.charAt(_o),_o++):(c=o,0===Uo&&Po(Ln)),c!==o)for(;c!==o;)l.push(c),pn.test(r.charAt(_o))?(c=r.charAt(_o),_o++):(c=o,0===Uo&&Po(Ln));else l=o;l!==o&&(c=Rl())!==o&&(f=yl())!==o?s=u=[u,a,i,l,c,f]:(_o=s,s=o)}else _o=s,s=o;else _o=s,s=o;else _o=s,s=o;for(;s!==o;)if(n.push(s),s=_o,(u=Rl())!==o)if((a=hl())!==o)if((i=Rl())!==o){if(l=[],pn.test(r.charAt(_o))?(c=r.charAt(_o),_o++):(c=o,0===Uo&&Po(Ln)),c!==o)for(;c!==o;)l.push(c),pn.test(r.charAt(_o))?(c=r.charAt(_o),_o++):(c=o,0===Uo&&Po(Ln));else l=o;l!==o&&(c=Rl())!==o&&(f=yl())!==o?s=u=[u,a,i,l,c,f]:(_o=s,s=o)}else _o=s,s=o;else _o=s,s=o;else _o=s,s=o;n!==o?(e=function(r,t){const e={dataType:r};return t&&0!==t.length?{...e,length:parseInt(t[3].join(""),10),parentheses:!0}:e}(e,n),t=e):(_o=t,t=o)}else _o=t,t=o;return t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=_o,"numeric"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(Ds)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="NUMERIC":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"int64"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Gs)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="INT64":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"float64"===r.substr(_o,7).toLowerCase()?(e=r.substr(_o,7),_o+=7):(e=o,0===Uo&&Po(Ws)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="FLOAT64":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=nl()),t!==o&&(t=Io(t)),t}())===o&&(t=function(){var t,e,n,s;if(t=_o,(e=ol())===o&&(e=ul())===o&&(e=il())===o&&(e=ll()),e!==o)if(Rl()!==o)if(hl()!==o)if(Rl()!==o){if(n=[],pn.test(r.charAt(_o))?(s=r.charAt(_o),_o++):(s=o,0===Uo&&Po(Ln)),s!==o)for(;s!==o;)n.push(s),pn.test(r.charAt(_o))?(s=r.charAt(_o),_o++):(s=o,0===Uo&&Po(Ln));else n=o;n!==o&&(s=Rl())!==o&&yl()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(_o=t,t=o)}else _o=t,t=o;else _o=t,t=o;else _o=t,t=o;else _o=t,t=o;return t===o&&(t=_o,(e=ol())===o&&(e=ul())===o&&(e=il())===o&&(e=ll()),e!==o&&(e=Io(e)),t=e),t}())===o&&(t=function(){var t,e,n,s,u,a,i;if(t=_o,(e=function(){var t,e,n,s;return t=_o,"bytes"===r.substr(_o,5).toLowerCase()?(e=r.substr(_o,5),_o+=5):(e=o,0===Uo&&Po(Us)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="BYTES":(_o=t,t=o)):(_o=t,t=o),t}())!==o)if((n=hl())!==o)if((s=Rl())!==o){if(u=[],pn.test(r.charAt(_o))?(a=r.charAt(_o),_o++):(a=o,0===Uo&&Po(Ln)),a!==o)for(;a!==o;)u.push(a),pn.test(r.charAt(_o))?(a=r.charAt(_o),_o++):(a=o,0===Uo&&Po(Ln));else u=o;u===o&&("MAX"===r.substr(_o,3)?(u="MAX",_o+=3):(u=o,0===Uo&&Po(No)),u===o&&("max"===r.substr(_o,3)?(u="max",_o+=3):(u=o,0===Uo&&Po(Ro)))),u!==o&&(a=Rl())!==o&&(i=yl())!==o?t=e=[e,n,s,u,a,i]:(_o=t,t=o)}else _o=t,t=o;else _o=t,t=o;else _o=t,t=o;return t===o&&(t=function(){var t,e,n,s;return t=_o,"bool"===r.substr(_o,4).toLowerCase()?(e=r.substr(_o,4),_o+=4):(e=o,0===Uo&&Po(Ms)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="BOOL":(_o=t,t=o)):(_o=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=_o,"geography"===r.substr(_o,9).toLowerCase()?(e=r.substr(_o,9),_o+=9):(e=o,0===Uo&&Po(ks)),e!==o?(n=_o,Uo++,s=Ba(),Uo--,s===o?n=void 0:(_o=n,n=o),n!==o?t=e="GEOGRAPHY":(_o=t,t=o)):(_o=t,t=o),t}()),t!==o&&(t=Io(t)),t}()),t}function Dl(){var r,t,e;return r=_o,(t=tl())!==o&&Rl()!==o&&El()!==o&&Rl()!==o&&(e=Ul())!==o&&Rl()!==o&&Al()!==o?r=t=So(t,e):(_o=r,r=o),r}function $l(){var r,t,e;return r=_o,(t=sl())!==o&&Rl()!==o&&El()!==o&&Rl()!==o&&(e=Ul())!==o&&Rl()!==o&&Al()!==o?r=t=So(t,e):(_o=r,r=o),r}const Pl={ARRAY:!0,ALTER:!0,ALL:!0,ADD:!0,AND:!0,AS:!0,ASC:!0,BETWEEN:!0,BY:!0,CALL:!0,CASE:!0,CREATE:!0,CROSS:!0,CONTAINS:!0,CURRENT_DATE:!0,CURRENT_TIME:!0,CURRENT_TIMESTAMP:!0,CURRENT_USER:!0,DELETE:!0,DESC:!0,DISTINCT:!0,DROP:!0,ELSE:!0,END:!0,EXISTS:!0,EXPLAIN:!0,FALSE:!0,FROM:!0,FULL:!0,FOR:!0,GROUP:!0,HAVING:!0,IN:!0,INNER:!0,INSERT:!0,INTO:!0,IS:!0,JOIN:!0,JSON:!0,KEY:!1,LEFT:!0,LIKE:!0,LIMIT:!0,LOW_PRIORITY:!0,NOT:!0,NULL:!0,ON:!0,OR:!0,ORDER:!0,OUTER:!0,PARTITION:!0,PIVOT:!0,RECURSIVE:!0,RENAME:!0,READ:!0,RIGHT:!1,SELECT:!0,SESSION_USER:!0,SET:!0,SHOW:!0,SYSTEM_USER:!0,TABLE:!0,THEN:!0,TRUE:!0,TRUNCATE:!0,UNION:!0,UPDATE:!0,USING:!0,VALUES:!0,WINDOW:!0,WITH:!0,WHEN:!0,WHERE:!0,WRITE:!0,GLOBAL:!0,LOCAL:!0,PERSIST:!0,PERSIST_ONLY:!0,UNNEST:!0},Fl={BOOL:!0,BYTE:!0,DATE:!0,DATETIME:!0,FLOAT64:!0,INT64:!0,NUMERIC:!0,STRING:!0,TIME:!0,TIMESTAMP:!0,ARRAY:!0,STRUCT:!0};function Gl(r,t){return{type:"unary_expr",operator:r,expr:t}}function jl(r,t,e){return{type:"binary_expr",operator:r,left:t,right:e}}function Hl(r){const t=n(Number.MAX_SAFE_INTEGER);return!(n(r)<t)}function Yl(r,t,e=3){const n=[r];for(let r=0;r<t.length;r++)delete t[r][e].tableList,delete t[r][e].columnList,n.push(t[r][e]);return n}function Bl(r,t){let e=r;for(let r=0;r<t.length;r++)e=jl(t[r][1],e,t[r][3]);return e}function Wl(r){return Zl[r]||r||null}function Xl(r){const t=new Set;for(let e of r.keys()){const r=e.split("::");if(!r){t.add(e);break}r&&r[1]&&(r[1]=Wl(r[1])),t.add(r.join("::"))}return Array.from(t)}let Vl=[];const ql=new Set,Kl=new Set,Zl={};if((e=a())!==o&&_o===r.length)return e;throw e!==o&&_o<r.length&&Po({type:"end"}),function(r,t,e){return new s(s.buildMessage(r,t),r,t,e)}(xo,Oo<r.length?r.charAt(Oo):null,Oo<r.length?$o(Oo,Oo+1):$o(Oo,Oo))}}},function(r,t,e){var n=e(0);function s(r,t,e,n){this.message=r,this.expected=t,this.found=e,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,s)}!function(r,t){function e(){this.constructor=r}e.prototype=t.prototype,r.prototype=new e}(s,Error),s.buildMessage=function(r,t){var e={literal:function(r){return'"'+s(r.text)+'"'},class:function(r){var t,e="";for(t=0;t<r.parts.length;t++)e+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+e+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function n(r){return r.charCodeAt(0).toString(16).toUpperCase()}function s(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}function o(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}return"Expected "+function(r){var t,n,s,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(s=r[t],e[s.type](s));if(o.sort(),o.length>0){for(t=1,n=1;t<o.length;t++)o[t-1]!==o[t]&&(o[n]=o[t],n++);o.length=n}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+s(r)+'"':"end of input"}(t)+" found."},r.exports={SyntaxError:s,parse:function(r,t){t=void 0!==t?t:{};var e,o={},u={start:Ss},a=Ss,i=function(r,t){return ui(r,t,1)},l=ms("IF",!0),c=function(r,t){return ui(r,t)},f=ms("AUTO_INCREMENT",!0),b=ms("UNIQUE",!0),v=ms("KEY",!0),p=ms("PRIMARY",!0),L=ms("COLUMN_FORMAT",!0),C=ms("FIXED",!0),d=ms("DYNAMIC",!0),w=ms("DEFAULT",!0),h=ms("STORAGE",!0),y=ms("DISK",!0),E=ms("MEMORY",!0),A=ms("ALGORITHM",!0),m=ms("INSTANT",!0),T=ms("INPLACE",!0),I=ms("COPY",!0),N=ms("LOCK",!0),R=ms("NONE",!0),S=ms("SHARED",!0),_=ms("EXCLUSIVE",!0),g=ms("CHECK",!0),O=ms("NOCHECK",!0),x=ms("PRIMARY KEY",!0),U=ms("NOT",!0),M=ms("FOR",!0),k=ms("REPLICATION",!0),D=ms("FOREIGN KEY",!0),$=ms("MATCH FULL",!0),P=ms("MATCH PARTIAL",!0),F=ms("MATCH SIMPLE",!0),G=ms("RESTRICT",!0),j=ms("CASCADE",!0),H=ms("SET NULL",!0),Y=ms("NO ACTION",!0),B=ms("SET DEFAULT",!0),W=ms("CHARACTER",!0),X=ms("SET",!0),V=ms("CHARSET",!0),q=ms("COLLATE",!0),K=ms("AVG_ROW_LENGTH",!0),Z=ms("KEY_BLOCK_SIZE",!0),z=ms("MAX_ROWS",!0),Q=ms("MIN_ROWS",!0),J=ms("STATS_SAMPLE_PAGES",!0),rr=ms("CONNECTION",!0),tr=ms("COMPRESSION",!0),er=ms("'",!1),nr=ms("ZLIB",!0),sr=ms("LZ4",!0),or=ms("ENGINE",!0),ur=ms("READ",!0),ar=ms("LOCAL",!0),ir=ms("LOW_PRIORITY",!0),lr=ms("WRITE",!0),cr=ms("(",!1),fr=ms(")",!1),br=ms("BTREE",!0),vr=ms("HASH",!0),pr=ms("WITH",!0),Lr=ms("PARSER",!0),Cr=ms("VISIBLE",!0),dr=ms("INVISIBLE",!0),wr=function(r,t){return t.unshift(r),t.forEach((r=>{const{table:t,as:e}=r;vi[t]=t,e&&(vi[e]=t),function(r){const t=li(r);r.clear(),t.forEach((t=>r.add(t)))}(bi)})),t},hr=ms("FIRST",!0),yr=ms("ROWS",!0),Er=ms("ONLY",!0),Ar=ms("NEXT",!0),mr=ms("=",!1),Tr=ms("DUPLICATE",!0),Ir=function(r,t){return ai(r,t)},Nr=ms("!",!1),Rr=function(r){return r[0]+" "+r[2]},Sr=ms(">=",!1),_r=ms(">",!1),gr=ms("<=",!1),Or=ms("<>",!1),xr=ms("<",!1),Ur=ms("!=",!1),Mr=ms("+",!1),kr=ms("-",!1),Dr=ms("*",!1),$r=ms("/",!1),Pr=ms("%",!1),Fr=function(r){return!0===ei[r.toUpperCase()]},Gr=ms('"',!1),jr=/^[^"]/,Hr=Ts(['"'],!0,!1),Yr=function(r){return r.join("")},Br=/^[^']/,Wr=Ts(["'"],!0,!1),Xr=ms("`",!1),Vr=/^[^`]/,qr=Ts(["`"],!0,!1),Kr=function(r,t){return r+t.join("")},Zr=/^[A-Za-z_]/,zr=Ts([["A","Z"],["a","z"],"_"],!1,!1),Qr=/^[A-Za-z0-9_]/,Jr=Ts([["A","Z"],["a","z"],["0","9"],"_"],!1,!1),rt=/^[A-Za-z0-9_:]/,tt=Ts([["A","Z"],["a","z"],["0","9"],"_",":"],!1,!1),et=ms(":",!1),nt=function(r,t){return{type:r.toLowerCase(),value:t[1].join("")}},st=/^[^"\\\0-\x1F\x7F]/,ot=Ts(['"',"\\",["\0",""],""],!0,!1),ut=/^[^'\\]/,at=Ts(["'","\\"],!0,!1),it=ms("\\'",!1),lt=ms('\\"',!1),ct=ms("\\\\",!1),ft=ms("\\/",!1),bt=ms("\\b",!1),vt=ms("\\f",!1),pt=ms("\\n",!1),Lt=ms("\\r",!1),Ct=ms("\\t",!1),dt=ms("\\u",!1),wt=ms("\\",!1),ht=ms("''",!1),yt=ms('""',!1),Et=ms("``",!1),At=/^[\n\r]/,mt=Ts(["\n","\r"],!1,!1),Tt=ms(".",!1),It=/^[0-9]/,Nt=Ts([["0","9"]],!1,!1),Rt=/^[0-9a-fA-F]/,St=Ts([["0","9"],["a","f"],["A","F"]],!1,!1),_t=/^[eE]/,gt=Ts(["e","E"],!1,!1),Ot=/^[+\-]/,xt=Ts(["+","-"],!1,!1),Ut=ms("NULL",!0),Mt=ms("NOT NULL",!0),kt=ms("TRUE",!0),Dt=ms("TO",!0),$t=ms("FALSE",!0),Pt=ms("DROP",!0),Ft=ms("USE",!0),Gt=ms("ALTER",!0),jt=ms("SELECT",!0),Ht=ms("UPDATE",!0),Yt=ms("CREATE",!0),Bt=ms("TEMPORARY",!0),Wt=ms("DELETE",!0),Xt=ms("INSERT",!0),Vt=ms("RECURSIVE",!1),qt=ms("REPLACE",!0),Kt=ms("RENAME",!0),Zt=ms("IGNORE",!0),zt=ms("PARTITION",!0),Qt=ms("INTO",!0),Jt=ms("FROM",!0),re=ms("UNLOCK",!0),te=ms("AS",!0),ee=ms("TABLE",!0),ne=ms("TABLES",!0),se=ms("DATABASE",!0),oe=ms("SCHEME",!0),ue=ms("ON",!0),ae=ms("LEFT",!0),ie=ms("RIGHT",!0),le=ms("FULL",!0),ce=ms("INNER",!0),fe=ms("JOIN",!0),be=ms("OUTER",!0),ve=ms("OVER",!0),pe=ms("UNION",!0),Le=ms("VALUES",!0),Ce=ms("USING",!0),de=ms("WHERE",!0),we=ms("GROUP",!0),he=ms("BY",!0),ye=ms("ORDER",!0),Ee=ms("HAVING",!0),Ae=ms("FETCH",!0),me=ms("OFFSET",!0),Te=ms("ASC",!0),Ie=ms("DESC",!0),Ne=ms("ALL",!0),Re=ms("DISTINCT",!0),Se=ms("BETWEEN",!0),_e=ms("IN",!0),ge=ms("IS",!0),Oe=ms("LIKE",!0),xe=ms("EXISTS",!0),Ue=ms("AND",!0),Me=ms("OR",!0),ke=ms("COUNT",!0),De=ms("MAX",!0),$e=ms("MIN",!0),Pe=ms("SUM",!0),Fe=ms("AVG",!0),Ge=ms("CALL",!0),je=ms("CASE",!0),He=ms("WHEN",!0),Ye=ms("THEN",!0),Be=ms("ELSE",!0),We=ms("END",!0),Xe=ms("CAST",!0),Ve=ms("CHAR",!0),qe=ms("VARCHAR",!0),Ke=ms("NUMERIC",!0),Ze=ms("DECIMAL",!0),ze=ms("SIGNED",!0),Qe=ms("UNSIGNED",!0),Je=ms("INT",!0),rn=ms("ZEROFILL",!0),tn=ms("INTEGER",!0),en=ms("JSON",!0),nn=ms("SMALLINT",!0),sn=ms("TINYINT",!0),on=ms("TINYTEXT",!0),un=ms("TEXT",!0),an=ms("MEDIUMTEXT",!0),ln=ms("LONGTEXT",!0),cn=ms("BIGINT",!0),fn=ms("FLOAT",!0),bn=ms("DOUBLE",!0),vn=ms("DATE",!0),pn=ms("DATETIME",!0),Ln=ms("TIME",!0),Cn=ms("TIMESTAMP",!0),dn=ms("TRUNCATE",!0),wn=ms("USER",!0),hn=ms("CURRENT_DATE",!0),yn=ms("INTERVAL",!0),En=ms("YEAR",!0),An=ms("MONTH",!0),mn=ms("DAY",!0),Tn=ms("HOUR",!0),In=ms("MINUTE",!0),Nn=ms("SECOND",!0),Rn=ms("CURRENT_TIME",!0),Sn=ms("CURRENT_TIMESTAMP",!0),_n=ms("CURRENT_USER",!0),gn=ms("SESSION_USER",!0),On=ms("SYSTEM_USER",!0),xn=ms("GLOBAL",!0),Un=ms("SESSION",!0),Mn=ms("PERSIST",!0),kn=ms("PERSIST_ONLY",!0),Dn=ms("@",!1),$n=ms("@@",!1),Pn=ms("$",!1),Fn=ms("return",!0),Gn=ms(":=",!1),jn=ms("DUAL",!0),Hn=ms("ADD",!0),Yn=ms("COLUMN",!0),Bn=ms("INDEX",!0),Wn=ms("FULLTEXT",!0),Xn=ms("SPATIAL",!0),Vn=ms("COMMENT",!0),qn=ms("CONSTRAINT",!0),Kn=ms("REFERENCES",!0),Zn=ms("SQL_CALC_FOUND_ROWS",!0),zn=ms("SQL_CACHE",!0),Qn=ms("SQL_NO_CACHE",!0),Jn=ms("SQL_SMALL_RESULT",!0),rs=ms("SQL_BIG_RESULT",!0),ts=ms("SQL_BUFFER_RESULT",!0),es=ms(",",!1),ns=ms("[",!1),ss=ms("]",!1),os=ms(";",!1),us=ms("->",!1),as=ms("->>",!1),is=ms("||",!1),ls=ms("&&",!1),cs=ms("/*",!1),fs=ms("*/",!1),bs=ms("--",!1),vs=ms("#",!1),ps={type:"any"},Ls=/^[ \t\n\r]/,Cs=Ts([" ","\t","\n","\r"],!1,!1),ds=function(r){return{dataType:r}},ws=0,hs=[{line:1,column:1}],ys=0,Es=[],As=0;if("startRule"in t){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function ms(r,t){return{type:"literal",text:r,ignoreCase:t}}function Ts(r,t,e){return{type:"class",parts:r,inverted:t,ignoreCase:e}}function Is(t){var e,n=hs[t];if(n)return n;for(e=t-1;!hs[e];)e--;for(n={line:(n=hs[e]).line,column:n.column};e<t;)10===r.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return hs[t]=n,n}function Ns(r,t){var e=Is(r),n=Is(t);return{start:{offset:r,line:e.line,column:e.column},end:{offset:t,line:n.line,column:n.column}}}function Rs(r){ws<ys||(ws>ys&&(ys=ws,Es=[]),Es.push(r))}function Ss(){var r,t;return r=ws,Da()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=gs())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=xa())!==o&&(a=Da())!==o&&(i=gs())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=xa())!==o&&(a=Da())!==o&&(i=gs())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?(t=function(r,t){const e=r&&r.ast||r,n=t&&t.length&&t[0].length>=4?[e]:e;for(let r=0;r<t.length;r++)t[r][3]&&0!==t[r][3].length&&n.push(t[r][3]&&t[r][3].ast||t[r][3]);return{tableList:Array.from(fi),columnList:li(bi),ast:n}}(t,e),r=t):(ws=r,r=o)}else ws=r,r=o;return r}())!==o?r=t:(ws=r,r=o),r}function _s(){var t;return(t=function(){var r,t,e,n,s,u,a,l,c;return r=ws,(t=Eu())!==o&&Da()!==o&&(e=Uu())!==o&&Da()!==o&&(n=co())!==o?(a=t,l=e,(c=n)&&c.forEach((r=>fi.add(`${a}::${r.db}::${r.table}`))),r=t={tableList:Array.from(fi),columnList:li(bi),ast:{type:a.toLowerCase(),keyword:l.toLowerCase(),name:c}}):(ws=r,r=o),r===o&&(r=ws,(t=Eu())!==o&&Da()!==o&&(e=ma())!==o&&Da()!==o&&(n=Xo())!==o&&Da()!==o&&ku()!==o&&Da()!==o&&(s=po())!==o&&Da()!==o?((u=function(){var r,t,e,n,s,u;if(r=ws,(t=Fs())===o&&(t=Gs()),t!==o){for(e=[],n=ws,(s=Da())!==o?((u=Fs())===o&&(u=Gs()),u!==o?n=s=[s,u]:(ws=n,n=o)):(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o?((u=Fs())===o&&(u=Gs()),u!==o?n=s=[s,u]:(ws=n,n=o)):(ws=n,n=o);e!==o?r=t=i(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())===o&&(u=null),u!==o&&Da()!==o?(t=function(r,t,e,n,s){return{tableList:Array.from(fi),columnList:li(bi),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),name:e,table:n,options:s}}}(t,e,n,s,u),r=t):(ws=r,r=o)):(ws=r,r=o)),r}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s,u,a,i,l,f,b,v,p,L,C,d,w,h,y;return r=ws,(t=mu())!==o&&Da()!==o?((e=Tu())===o&&(e=null),e!==o&&Da()!==o&&Uu()!==o&&Da()!==o?((n=Us())===o&&(n=null),n!==o&&Da()!==o&&(s=co())!==o&&Da()!==o&&(u=function(){var r,t,e,n,s,u,a,i;if(r=ws,ga()!==o)if(Da()!==o)if((t=Ms())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Ms())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Ms())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o&&(n=Da())!==o&&(s=Oa())!==o?r=c(t,e):(ws=r,r=o)}else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;return r}())!==o&&Da()!==o?((a=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=qs())!==o){for(e=[],n=ws,(s=Da())!==o?((u=Sa())===o&&(u=null),u!==o&&(a=Da())!==o&&(i=qs())!==o?n=s=[s,u,a,i]:(ws=n,n=o)):(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o?((u=Sa())===o&&(u=null),u!==o&&(a=Da())!==o&&(i=qs())!==o?n=s=[s,u,a,i]:(ws=n,n=o)):(ws=n,n=o);e!==o?r=t=ui(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())===o&&(a=null),a!==o&&Da()!==o?((i=Su())===o&&(i=Nu()),i===o&&(i=null),i!==o&&Da()!==o?((l=xu())===o&&(l=null),l!==o&&Da()!==o?((f=xs())===o&&(f=null),f!==o?(b=t,v=e,p=n,C=u,d=a,w=i,h=l,y=f,(L=s)&&L.forEach((r=>fi.add(`create::${r.db}::${r.table}`))),r=t={tableList:Array.from(fi),columnList:li(bi),ast:{type:b[0].toLowerCase(),keyword:"table",temporary:v&&v[0].toLowerCase(),if_not_exists:p,table:L,ignore_replace:w&&w[0].toLowerCase(),as:h&&h[0].toLowerCase(),query_expr:y&&y.ast,create_definitions:C,table_options:d}}):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o),r===o&&(r=ws,(t=mu())!==o&&Da()!==o?((e=Tu())===o&&(e=null),e!==o&&Da()!==o&&Uu()!==o&&Da()!==o?((n=Us())===o&&(n=null),n!==o&&Da()!==o&&(s=co())!==o&&Da()!==o&&(u=function r(){var t,e,n;return(t=function(){var r,t;return r=ws,qu()!==o&&Da()!==o&&(t=co())!==o?r={type:"like",table:t}:(ws=r,r=o),r}())===o&&(t=ws,ga()!==o&&Da()!==o&&(e=r())!==o&&Da()!==o&&Oa()!==o?((n=e).parentheses=!0,t=n):(ws=t,t=o)),t}())!==o?(t=function(r,t,e,n,s){return n&&n.forEach((r=>fi.add(`create::${r.db}::${r.table}`))),{tableList:Array.from(fi),columnList:li(bi),ast:{type:r[0].toLowerCase(),keyword:"table",temporary:t&&t[0].toLowerCase(),if_not_exists:e,table:n,like:s}}}(t,e,n,s,u),r=t):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)),r}())===o&&(t=function(){var t,e,n,s,u,a,l,c,f,b;return t=ws,(e=mu())!==o&&Da()!==o?((n=function(){var t,e,n,s;return t=ws,"database"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(se)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="DATABASE":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=ws,"scheme"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(oe)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="SCHEME":(ws=t,t=o)):(ws=t,t=o),t}()),n!==o&&Da()!==o?((s=Us())===o&&(s=null),s!==o&&Da()!==o&&(u=Qo())!==o&&Da()!==o?((a=function(){var r,t,e,n,s,u;if(r=ws,(t=Vs())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Vs())!==o?n=s=[s,u]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Vs())!==o?n=s=[s,u]:(ws=n,n=o);e!==o?r=t=i(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())===o&&(a=null),a!==o?(l=e,c=s,f=u,b=a,t=e={tableList:Array.from(fi),columnList:li(bi),ast:{type:l[0].toLowerCase(),keyword:"database",if_not_exists:c,database:f,create_definitions:b}}):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=ws,(e=function(){var t,e,n,s;return t=ws,"truncate"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(dn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="TRUNCATE":(ws=t,t=o)):(ws=t,t=o),t}())!==o&&Da()!==o?((n=Uu())===o&&(n=null),n!==o&&Da()!==o&&(s=co())!==o?(u=e,a=n,(i=s)&&i.forEach((r=>fi.add(`${u}::${r.db}::${r.table}`))),t=e={tableList:Array.from(fi),columnList:li(bi),ast:{type:u.toLowerCase(),keyword:a&&a.toLowerCase()||"table",name:i}}):(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=ws,Ru()!==o&&Da()!==o&&Uu()!==o&&Da()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=uo())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=uo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=uo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=c(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())!==o?((e=t).forEach((r=>r.forEach((r=>r.table&&fi.add(`rename::${r.db}::${r.table}`))))),r={tableList:Array.from(fi),columnList:li(bi),ast:{type:"rename",table:e}}):(ws=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=ws,function(){var t,e,n,s;return t=ws,"call"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Ge)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="CALL":(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(e=Za())!==o?(n=e,t={tableList:Array.from(fi),columnList:li(bi),ast:{type:"call",expr:n}}):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ws,function(){var t,e,n,s;return t=ws,"use"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(Ft)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(e=Vo())!==o?(n=e,fi.add(`use::${n}::null`),t={tableList:Array.from(fi),columnList:li(bi),ast:{type:"use",db:n}}):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=ws,function(){var t,e,n,s;return t=ws,"alter"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(Gt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&Uu()!==o&&Da()!==o&&(e=co())!==o&&Da()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Ps())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Ps())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Ps())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=c(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())!==o?(u=n,(s=e)&&s.length>0&&s.forEach((r=>fi.add(`alter::${r.db}::${r.table}`))),t={tableList:Array.from(fi),columnList:li(bi),ast:{type:"alter",table:s,expr:u}}):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=ws,Ou()!==o&&Da()!==o?((e=function(){var t,e,n,s;return t=ws,"global"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(xn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="GLOBAL":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ws,"session"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(Un)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="SESSION":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ws,"local"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(ar)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="LOCAL":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ws,"persist"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(Mn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="PERSIST":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ws,"persist_only"===r.substr(ws,12).toLowerCase()?(e=r.substr(ws,12),ws+=12):(e=o,0===As&&Rs(kn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="PERSIST_ONLY":(ws=t,t=o)):(ws=t,t=o),t}()),e===o&&(e=null),e!==o&&Da()!==o&&(n=Ba())!==o?(s=e,(u=n).keyword=s,t={tableList:Array.from(fi),columnList:li(bi),ast:{type:"set",expr:u}}):(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ws,function(){var t,e,n,s;return t=ws,"lock"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(N)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&Mu()!==o&&Da()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Ks())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Ks())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Ks())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=ui(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())!==o?(n=e,t={tableList:Array.from(fi),columnList:li(bi),ast:{type:"lock",keyword:"tables",tables:n}}):(ws=t,t=o),t}())===o&&(t=function(){var t;return t=ws,function(){var t,e,n,s;return t=ws,"unlock"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(re)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&Mu()!==o?t={tableList:Array.from(fi),columnList:li(bi),ast:{type:"unlock",keyword:"tables"}}:(ws=t,t=o),t}()),t}function gs(){var r;return(r=xs())===o&&(r=function(){var r,t,e,n,s;return r=ws,(t=Au())!==o&&Da()!==o&&(e=co())!==o&&Da()!==o&&Ou()!==o&&Da()!==o&&(n=Ao())!==o&&Da()!==o?((s=Co())===o&&(s=null),s!==o?(t=function(r,t,e){const n={};return r&&r.forEach((r=>{const{db:t,as:e,table:s,join:o}=r,u=o?"select":"update";t&&(n[s]=t),s&&fi.add(`${u}::${t}::${s}`)})),t&&t.forEach((r=>{if(r.table){const t=ii(r.table);fi.add(`update::${n[t]||null}::${t}`)}bi.add(`update::${r.table}::${r.column}`)})),{tableList:Array.from(fi),columnList:li(bi),ast:{type:"update",table:r,set:t,where:e}}}(e,n,s),r=t):(ws=r,r=o)):(ws=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=ws,(t=Ro())!==o&&Da()!==o?((e=gu())===o&&(e=null),e!==o&&Da()!==o&&(n=po())!==o&&Da()!==o?((s=Io())===o&&(s=null),s!==o&&Da()!==o&&ga()!==o&&Da()!==o&&(u=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Zo())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Zo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Zo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=c(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())!==o&&Da()!==o&&Oa()!==o&&Da()!==o&&(a=To())!==o&&Da()!==o?((i=No())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o){if(t&&(fi.add(`insert::${t.db}::${t.table}`),t.as=null),n){let r=t&&t.table||null;Array.isArray(s)&&s.forEach(((r,t)=>{if(r.value.length!=n.length)throw new Error("Error: column count doesn't match value count at row "+(t+1))})),n.forEach((t=>bi.add(`insert::${r}::${t}`)))}return{tableList:Array.from(fi),columnList:li(bi),ast:{type:r,table:[t],columns:n,values:s,partition:e,on_duplicate_update:o}}}(t,n,s,u,a,i),r=t):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=ws,(t=Ro())!==o&&Da()!==o?((e=Su())===o&&(e=null),e!==o&&Da()!==o?((n=gu())===o&&(n=null),n!==o&&Da()!==o&&(s=po())!==o&&Da()!==o?((u=Io())===o&&(u=null),u!==o&&Da()!==o&&(a=To())!==o&&Da()!==o?((i=No())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o,u){n&&(fi.add(`insert::${n.db}::${n.table}`),bi.add(`insert::${n.table}::(.*)`),n.as=null);const a=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(fi),columnList:li(bi),ast:{type:r,table:[n],columns:null,values:o,partition:s,prefix:a,on_duplicate_update:u}}}(t,e,n,s,u,a,i),r=t):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i,l,c,f;return r=ws,(t=Ro())!==o&&Da()!==o&&gu()!==o&&Da()!==o&&(e=po())!==o&&Da()!==o?((n=Io())===o&&(n=null),n!==o&&Da()!==o&&Ou()!==o&&Da()!==o&&(s=Ao())!==o&&Da()!==o?((u=No())===o&&(u=null),u!==o?(a=t,l=n,c=s,f=u,(i=e)&&(fi.add(`insert::${i.db}::${i.table}`),bi.add(`insert::${i.table}::(.*)`),i.as=null),r=t={tableList:Array.from(fi),columnList:li(bi),ast:{type:a,table:[i],columns:null,partition:l,set:c,on_duplicate_update:f}}):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s;return r=ws,(t=Iu())!==o&&Da()!==o?((e=co())===o&&(e=null),e!==o&&Da()!==o&&(n=oo())!==o&&Da()!==o?((s=Co())===o&&(s=null),s!==o?(t=function(r,t,e){if(t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"delete";n&&fi.add(`${o}::${t}::${n}`),s||bi.add(`delete::${n}::(.*)`)})),null===r&&1===t.length){const e=t[0];r=[{db:e.db,table:e.table,as:e.as,addition:!0}]}return{tableList:Array.from(fi),columnList:li(bi),ast:{type:"delete",table:r,from:t,where:e}}}(e,n,s),r=t):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o),r}())===o&&(r=_s())===o&&(r=function(){var r,t;for(r=[],t=Ya();t!==o;)r.push(t),t=Ya();return r}()),r}function Os(){var t,e,n;return t=ws,function(){var t,e,n,s;return t=ws,"union"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(pe)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o?((e=Yu())===o&&(e=Bu()),e===o&&(e=null),e!==o?t=(n=e)?"union "+n.toLowerCase():"union":(ws=t,t=o)):(ws=t,t=o),t}function xs(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Zs())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Os())!==o&&(a=Da())!==o&&(i=Zs())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Os())!==o&&(a=Da())!==o&&(i=Zs())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o&&(n=Da())!==o?((s=wo())===o&&(s=null),s!==o&&(u=Da())!==o?((a=Eo())===o&&(a=null),a!==o?r=t=function(r,t,e,n){let s=r;for(let r=0;r<t.length;r++)s._next=t[r][3],s.set_op=t[r][1],s=s._next;return e&&(r._orderby=e),n&&(r._limit=n),{tableList:Array.from(fi),columnList:li(bi),ast:r}}(t,e,s,a):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)}else ws=r,r=o;return r}function Us(){var t,e;return t=ws,"if"===r.substr(ws,2).toLowerCase()?(e=r.substr(ws,2),ws+=2):(e=o,0===As&&Rs(l)),e!==o&&Da()!==o&&Zu()!==o&&Da()!==o&&Ku()!==o?t=e="IF NOT EXISTS":(ws=t,t=o),t}function Ms(){var r;return(r=Ys())===o&&(r=Ds())===o&&(r=js())===o&&(r=Hs()),r}function ks(){var t,e,n,s;return t=ws,(e=function(){var t;return(t=function(){var t,e,n,s;return t=ws,"not null"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(Mt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(t={type:"not null",value:"not null"}),t}())===o&&(e=au()),e!==o&&((s=e)&&!s.value&&(s.value="null"),e={nullable:s}),(t=e)===o&&(t=ws,(e=function(){var r,t;return r=ws,hu()!==o&&Da()!==o?((t=uu())===o&&(t=Uo()),t!==o?r={type:"default",value:t}:(ws=r,r=o)):(ws=r,r=o),r}())!==o&&(e={default_val:e}),(t=e)===o&&(t=ws,"auto_increment"===r.substr(ws,14).toLowerCase()?(e=r.substr(ws,14),ws+=14):(e=o,0===As&&Rs(f)),e!==o&&(e={auto_increment:e.toLowerCase()}),(t=e)===o&&(t=ws,"unique"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(b)),e!==o&&Da()!==o?("key"===r.substr(ws,3).toLowerCase()?(n=r.substr(ws,3),ws+=3):(n=o,0===As&&Rs(v)),n===o&&(n=null),n!==o?t=e=function(r){const t=["unique"];return r&&t.push(r),{unique:t.join(" ").toLowerCase("")}}(n):(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,"primary"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(p)),e===o&&(e=null),e!==o&&Da()!==o?("key"===r.substr(ws,3).toLowerCase()?(n=r.substr(ws,3),ws+=3):(n=o,0===As&&Rs(v)),n!==o?t=e=function(r){const t=[];return r&&t.push("primary"),t.push("key"),{primary_key:t.join(" ").toLowerCase("")}}(e):(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,(e=Fa())!==o&&(e={comment:e}),(t=e)===o&&(t=ws,(e=$s())!==o&&(e={collate:e}),(t=e)===o&&(t=ws,(e=function(){var t,e,n;return t=ws,"column_format"===r.substr(ws,13).toLowerCase()?(e=r.substr(ws,13),ws+=13):(e=o,0===As&&Rs(L)),e!==o&&Da()!==o?("fixed"===r.substr(ws,5).toLowerCase()?(n=r.substr(ws,5),ws+=5):(n=o,0===As&&Rs(C)),n===o&&("dynamic"===r.substr(ws,7).toLowerCase()?(n=r.substr(ws,7),ws+=7):(n=o,0===As&&Rs(d)),n===o&&("default"===r.substr(ws,7).toLowerCase()?(n=r.substr(ws,7),ws+=7):(n=o,0===As&&Rs(w)))),n!==o?t=e={type:"column_format",value:n.toLowerCase()}:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(e={column_format:e}),(t=e)===o&&(t=ws,(e=function(){var t,e,n;return t=ws,"storage"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(h)),e!==o&&Da()!==o?("disk"===r.substr(ws,4).toLowerCase()?(n=r.substr(ws,4),ws+=4):(n=o,0===As&&Rs(y)),n===o&&("memory"===r.substr(ws,6).toLowerCase()?(n=r.substr(ws,6),ws+=6):(n=o,0===As&&Rs(E))),n!==o?t=e={type:"storage",value:n.toLowerCase()}:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(e={storage:e}),(t=e)===o&&(t=ws,(e=Ws())!==o&&(e={reference_definition:e}),t=e))))))))),t}function Ds(){var r,t,e,n,s,u,a;return r=ws,(t=Xo())!==o&&Da()!==o&&(e=ri())!==o&&Da()!==o?((n=function(){var r,t,e,n,s,u;if(r=ws,(t=ks())!==o)if(Da()!==o){for(e=[],n=ws,(s=Da())!==o&&(u=ks())!==o?n=s=[s,u]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=ks())!==o?n=s=[s,u]:(ws=n,n=o);e!==o?r=t=function(r,t){let e=r;for(let r=0;r<t.length;r++)e={...e,...t[r][1]};return e}(t,e):(ws=r,r=o)}else ws=r,r=o;else ws=r,r=o;return r}())===o&&(n=null),n!==o?(s=t,u=e,a=n,bi.add(`create::${s.table}::${s.column}`),r=t={column:s,definition:u,resource:"column",...a||{}}):(ws=r,r=o)):(ws=r,r=o),r}function $s(){var t,e;return t=ws,function(){var t,e,n,s;return t=ws,"collate"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(q)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="COLLATE":(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(e=Qo())!==o?t={type:"collate",value:e}:(ws=t,t=o),t}function Ps(){var t;return(t=function(){var r,t;return r=ws,Ea()!==o&&Da()!==o&&(t=Ys())!==o?r={action:"add",create_definitions:t,resource:"constraint",type:"alter"}:(ws=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=ws,Eu()!==o&&Da()!==o?("check"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(g)),e!==o&&Da()!==o&&(n=Qo())!==o?t={action:"drop",constraint:n,keyword:e.toLowerCase(),resource:"constraint",type:"alter"}:(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,Gu()!==o&&Da()!==o?("check"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(g)),e!==o&&Da()!==o?("check"===r.substr(ws,5).toLowerCase()?(n=r.substr(ws,5),ws+=5):(n=o,0===As&&Rs(g)),n!==o&&Da()!==o&&Na()!==o&&Da()!==o&&(s=Qo())!==o?t={action:"with",constraint:s,keyword:"check check",resource:"constraint",type:"alter"}:(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ws,"nocheck"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(O)),e!==o&&Da()!==o&&Na()!==o&&Da()!==o&&(n=Qo())!==o?t=e={action:"nocheck",constraint:n,resource:"constraint",type:"alter"}:(ws=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s;return r=ws,Ea()!==o&&Da()!==o?((t=Aa())===o&&(t=null),t!==o&&Da()!==o&&(e=Ds())!==o?(n=t,s=e,r={action:"add",...s,keyword:n,resource:"column",type:"alter"}):(ws=r,r=o)):(ws=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=ws,Eu()!==o&&Da()!==o?((t=Aa())===o&&(t=null),t!==o&&Da()!==o&&(e=Xo())!==o?r={action:"drop",column:e,keyword:t,resource:"column",type:"alter"}:(ws=r,r=o)):(ws=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=ws,Ea()!==o&&Da()!==o&&(t=js())!==o?(e=t,r={action:"add",type:"alter",...e}):(ws=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=ws,Ea()!==o&&Da()!==o&&(t=Hs())!==o?(e=t,r={action:"add",type:"alter",...e}):(ws=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=ws,Ru()!==o&&Da()!==o?((t=yu())===o&&(t=xu()),t===o&&(t=null),t!==o&&Da()!==o&&(e=Vo())!==o?(s=e,r={action:"rename",type:"alter",resource:"table",keyword:(n=t)&&n[0].toLowerCase(),table:s}):(ws=r,r=o)):(ws=r,r=o),r}())===o&&(t=Fs())===o&&(t=Gs()),t}function Fs(){var t,e,n,s;return t=ws,"algorithm"===r.substr(ws,9).toLowerCase()?(e=r.substr(ws,9),ws+=9):(e=o,0===As&&Rs(A)),e!==o&&Da()!==o?((n=ya())===o&&(n=null),n!==o&&Da()!==o?("default"===r.substr(ws,7).toLowerCase()?(s=r.substr(ws,7),ws+=7):(s=o,0===As&&Rs(w)),s===o&&("instant"===r.substr(ws,7).toLowerCase()?(s=r.substr(ws,7),ws+=7):(s=o,0===As&&Rs(m)),s===o&&("inplace"===r.substr(ws,7).toLowerCase()?(s=r.substr(ws,7),ws+=7):(s=o,0===As&&Rs(T)),s===o&&("copy"===r.substr(ws,4).toLowerCase()?(s=r.substr(ws,4),ws+=4):(s=o,0===As&&Rs(I))))),s!==o?t=e={type:"alter",keyword:"algorithm",resource:"algorithm",symbol:n,algorithm:s}:(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}function Gs(){var t,e,n,s;return t=ws,"lock"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(N)),e!==o&&Da()!==o?((n=ya())===o&&(n=null),n!==o&&Da()!==o?("default"===r.substr(ws,7).toLowerCase()?(s=r.substr(ws,7),ws+=7):(s=o,0===As&&Rs(w)),s===o&&("none"===r.substr(ws,4).toLowerCase()?(s=r.substr(ws,4),ws+=4):(s=o,0===As&&Rs(R)),s===o&&("shared"===r.substr(ws,6).toLowerCase()?(s=r.substr(ws,6),ws+=6):(s=o,0===As&&Rs(S)),s===o&&("exclusive"===r.substr(ws,9).toLowerCase()?(s=r.substr(ws,9),ws+=9):(s=o,0===As&&Rs(_))))),s!==o?t=e={type:"alter",keyword:"lock",resource:"lock",symbol:n,lock:s}:(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}function js(){var r,t,e,n,s,u,a,i;return r=ws,(t=ma())===o&&(t=Ta()),t!==o&&Da()!==o?((e=Zo())===o&&(e=null),e!==o&&Da()!==o?((n=ao())===o&&(n=null),n!==o&&Da()!==o&&(s=Js())!==o&&Da()!==o?((u=io())===o&&(u=null),u!==o&&Da()!==o?(a=n,i=u,r=t={index:e,definition:s,keyword:t.toLowerCase(),index_type:a,resource:"index",index_options:i}):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o),r}function Hs(){var t,e,n,s,u,a,i,l,c;return t=ws,(e=function(){var t,e,n,s;return t=ws,"fulltext"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(Wn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="FULLTEXT":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ws,"spatial"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(Xn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="SPATIAL":(ws=t,t=o)):(ws=t,t=o),t}()),e!==o&&Da()!==o?((n=ma())===o&&(n=Ta()),n===o&&(n=null),n!==o&&Da()!==o?((s=Zo())===o&&(s=null),s!==o&&Da()!==o&&(u=Js())!==o&&Da()!==o?((a=io())===o&&(a=null),a!==o&&Da()!==o?(i=e,c=a,t=e={index:s,definition:u,keyword:(l=n)&&`${i.toLowerCase()} ${l.toLowerCase()}`||i.toLowerCase(),index_options:c,resource:"index"}):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}function Ys(){var t;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=ws,(e=Bs())===o&&(e=null),e!==o&&Da()!==o?("primary key"===r.substr(ws,11).toLowerCase()?(n=r.substr(ws,11),ws+=11):(n=o,0===As&&Rs(x)),n!==o&&Da()!==o?((s=ao())===o&&(s=null),s!==o&&Da()!==o&&(u=Js())!==o&&Da()!==o?((a=io())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l.toLowerCase(),keyword:i&&i.keyword,index_type:c,resource:"constraint",index_options:b}):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,v,p,L,C,d;return t=ws,(e=Bs())===o&&(e=null),e!==o&&Da()!==o&&(n=function(){var t,e,n,s;return t=ws,"unique"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(b)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="UNIQUE":(ws=t,t=o)):(ws=t,t=o),t}())!==o&&Da()!==o?((s=ma())===o&&(s=Ta()),s===o&&(s=null),s!==o&&Da()!==o?((u=Zo())===o&&(u=null),u!==o&&Da()!==o?((a=ao())===o&&(a=null),a!==o&&Da()!==o&&(i=Js())!==o&&Da()!==o?((l=io())===o&&(l=null),l!==o?(f=n,v=s,p=u,L=a,C=i,d=l,t=e={constraint:(c=e)&&c.constraint,definition:C,constraint_type:v&&`${f.toLowerCase()} ${v.toLowerCase()}`||f.toLowerCase(),keyword:c&&c.keyword,index_type:L,index:p,resource:"constraint",index_options:d}):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=ws,(e=Bs())===o&&(e=null),e!==o&&Da()!==o?("foreign key"===r.substr(ws,11).toLowerCase()?(n=r.substr(ws,11),ws+=11):(n=o,0===As&&Rs(D)),n!==o&&Da()!==o?((s=Zo())===o&&(s=null),s!==o&&Da()!==o&&(u=Js())!==o&&Da()!==o?((a=Ws())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l,keyword:i&&i.keyword,index:c,resource:"constraint",reference_definition:b}):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p;return t=ws,(e=Bs())===o&&(e=null),e!==o&&Da()!==o?("check"===r.substr(ws,5).toLowerCase()?(n=r.substr(ws,5),ws+=5):(n=o,0===As&&Rs(g)),n!==o&&Da()!==o?(s=ws,"not"===r.substr(ws,3).toLowerCase()?(u=r.substr(ws,3),ws+=3):(u=o,0===As&&Rs(U)),u!==o&&(a=Da())!==o?("for"===r.substr(ws,3).toLowerCase()?(i=r.substr(ws,3),ws+=3):(i=o,0===As&&Rs(M)),i!==o&&(l=Da())!==o?("replication"===r.substr(ws,11).toLowerCase()?(c=r.substr(ws,11),ws+=11):(c=o,0===As&&Rs(k)),c!==o&&(f=Da())!==o?s=u=[u,a,i,l,c,f]:(ws=s,s=o)):(ws=s,s=o)):(ws=s,s=o),s===o&&(s=null),s!==o&&(u=ga())!==o&&(a=Da())!==o&&(i=Uo())!==o&&(l=Da())!==o&&(c=Oa())!==o?(b=e,v=s,p=i,t=e={constraint_type:n.toLowerCase(),keyword:b&&b.keyword,constraint:b&&b.constraint,index_type:v&&{keyword:"not for replication"},definition:[p],resource:"constraint"}):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}()),t}function Bs(){var r,t,e,n;return r=ws,(t=Na())!==o&&Da()!==o?((e=Vo())===o&&(e=null),e!==o?(n=e,r=t={keyword:t.toLowerCase(),constraint:n}):(ws=r,r=o)):(ws=r,r=o),r}function Ws(){var t,e,n,s,u,a,i,l,c,f;return t=ws,(e=function(){var t,e,n,s;return t=ws,"references"===r.substr(ws,10).toLowerCase()?(e=r.substr(ws,10),ws+=10):(e=o,0===As&&Rs(Kn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="REFERENCES":(ws=t,t=o)):(ws=t,t=o),t}())!==o&&Da()!==o&&(n=co())!==o&&Da()!==o&&(s=Js())!==o&&Da()!==o?("match full"===r.substr(ws,10).toLowerCase()?(u=r.substr(ws,10),ws+=10):(u=o,0===As&&Rs($)),u===o&&("match partial"===r.substr(ws,13).toLowerCase()?(u=r.substr(ws,13),ws+=13):(u=o,0===As&&Rs(P)),u===o&&("match simple"===r.substr(ws,12).toLowerCase()?(u=r.substr(ws,12),ws+=12):(u=o,0===As&&Rs(F)))),u===o&&(u=null),u!==o&&Da()!==o?((a=Xs())===o&&(a=null),a!==o&&Da()!==o?((i=Xs())===o&&(i=null),i!==o?(l=u,c=a,f=i,t=e={definition:s,table:n,keyword:e.toLowerCase(),match:l&&l.toLowerCase(),on_action:[c,f].filter((r=>r))}):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,(e=Xs())!==o&&(e={on_action:[e]}),t=e),t}function Xs(){var t,e,n,s;return t=ws,ku()!==o&&Da()!==o?((e=Iu())===o&&(e=Au()),e!==o&&Da()!==o&&(n=function(){var t,e,n;return t=ws,(e=wa())!==o&&Da()!==o&&ga()!==o&&Da()!==o?((n=_o())===o&&(n=null),n!==o&&Da()!==o&&Oa()!==o?t=e={type:"function",name:e,args:n}:(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,"restrict"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(G)),e===o&&("cascade"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(j)),e===o&&("set null"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(H)),e===o&&("no action"===r.substr(ws,9).toLowerCase()?(e=r.substr(ws,9),ws+=9):(e=o,0===As&&Rs(Y)),e===o&&("set default"===r.substr(ws,11).toLowerCase()?(e=r.substr(ws,11),ws+=11):(e=o,0===As&&Rs(B)),e===o&&(e=wa()))))),e!==o&&(e={type:"origin",value:e.toLowerCase()}),t=e),t}())!==o?(s=n,t={type:"on "+e[0].toLowerCase(),value:s}):(ws=t,t=o)):(ws=t,t=o),t}function Vs(){var t,e,n,s,u,a,i,l,c;return t=ws,(e=hu())===o&&(e=null),e!==o&&Da()!==o?((n=function(){var t,e,n;return t=ws,"character"===r.substr(ws,9).toLowerCase()?(e=r.substr(ws,9),ws+=9):(e=o,0===As&&Rs(W)),e!==o&&Da()!==o?("set"===r.substr(ws,3).toLowerCase()?(n=r.substr(ws,3),ws+=3):(n=o,0===As&&Rs(X)),n!==o?t=e="CHARACTER SET":(ws=t,t=o)):(ws=t,t=o),t}())===o&&("charset"===r.substr(ws,7).toLowerCase()?(n=r.substr(ws,7),ws+=7):(n=o,0===As&&Rs(V)),n===o&&("collate"===r.substr(ws,7).toLowerCase()?(n=r.substr(ws,7),ws+=7):(n=o,0===As&&Rs(q)))),n!==o&&Da()!==o?((s=ya())===o&&(s=null),s!==o&&Da()!==o&&(u=Qo())!==o?(i=n,l=s,c=u,t=e={keyword:(a=e)&&`${a[0].toLowerCase()} ${i.toLowerCase()}`||i.toLowerCase(),symbol:l,value:c}):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}function qs(){var t,e,n,s,u,a,i,l,c;return t=ws,"auto_increment"===r.substr(ws,14).toLowerCase()?(e=r.substr(ws,14),ws+=14):(e=o,0===As&&Rs(f)),e===o&&("avg_row_length"===r.substr(ws,14).toLowerCase()?(e=r.substr(ws,14),ws+=14):(e=o,0===As&&Rs(K)),e===o&&("key_block_size"===r.substr(ws,14).toLowerCase()?(e=r.substr(ws,14),ws+=14):(e=o,0===As&&Rs(Z)),e===o&&("max_rows"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(z)),e===o&&("min_rows"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(Q)),e===o&&("stats_sample_pages"===r.substr(ws,18).toLowerCase()?(e=r.substr(ws,18),ws+=18):(e=o,0===As&&Rs(J))))))),e!==o&&Da()!==o?((n=ya())===o&&(n=null),n!==o&&Da()!==o&&(s=bu())!==o?(l=n,c=s,t=e={keyword:e.toLowerCase(),symbol:l,value:c.value}):(ws=t,t=o)):(ws=t,t=o),t===o&&(t=Vs())===o&&(t=ws,(e=Ia())===o&&("connection"===r.substr(ws,10).toLowerCase()?(e=r.substr(ws,10),ws+=10):(e=o,0===As&&Rs(rr))),e!==o&&Da()!==o?((n=ya())===o&&(n=null),n!==o&&Da()!==o&&(s=iu())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:`'${e.value}'`}}(e,n,s):(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,"compression"===r.substr(ws,11).toLowerCase()?(e=r.substr(ws,11),ws+=11):(e=o,0===As&&Rs(tr)),e!==o&&Da()!==o?((n=ya())===o&&(n=null),n!==o&&Da()!==o?(s=ws,39===r.charCodeAt(ws)?(u="'",ws++):(u=o,0===As&&Rs(er)),u!==o?("zlib"===r.substr(ws,4).toLowerCase()?(a=r.substr(ws,4),ws+=4):(a=o,0===As&&Rs(nr)),a===o&&("lz4"===r.substr(ws,3).toLowerCase()?(a=r.substr(ws,3),ws+=3):(a=o,0===As&&Rs(sr)),a===o&&("none"===r.substr(ws,4).toLowerCase()?(a=r.substr(ws,4),ws+=4):(a=o,0===As&&Rs(R)))),a!==o?(39===r.charCodeAt(ws)?(i="'",ws++):(i=o,0===As&&Rs(er)),i!==o?s=u=[u,a,i]:(ws=s,s=o)):(ws=s,s=o)):(ws=s,s=o),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.join("").toUpperCase()}}(e,n,s):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,"engine"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(or)),e!==o&&Da()!==o?((n=ya())===o&&(n=null),n!==o&&Da()!==o&&(s=Qo())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.toUpperCase()}}(e,n,s):(ws=t,t=o)):(ws=t,t=o)))),t}function Ks(){var t,e,n,s,u;return t=ws,(e=bo())!==o&&Da()!==o&&(n=function(){var t,e,n;return t=ws,"read"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(ur)),e!==o&&Da()!==o?("local"===r.substr(ws,5).toLowerCase()?(n=r.substr(ws,5),ws+=5):(n=o,0===As&&Rs(ar)),n===o&&(n=null),n!==o?t=e={type:"read",suffix:n&&"local"}:(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,"low_priority"===r.substr(ws,12).toLowerCase()?(e=r.substr(ws,12),ws+=12):(e=o,0===As&&Rs(ir)),e===o&&(e=null),e!==o&&Da()!==o?("write"===r.substr(ws,5).toLowerCase()?(n=r.substr(ws,5),ws+=5):(n=o,0===As&&Rs(lr)),n!==o?t=e={type:"write",prefix:e&&"low_priority"}:(ws=t,t=o)):(ws=t,t=o)),t}())!==o?(s=e,u=n,fi.add(`lock::${s.db}::${s.table}`),t=e={table:s,lock_type:u}):(ws=t,t=o),t}function Zs(){var t,e,n,s,u,a,i;return(t=ro())===o&&(t=ws,e=ws,40===r.charCodeAt(ws)?(n="(",ws++):(n=o,0===As&&Rs(cr)),n!==o&&(s=Da())!==o&&(u=Zs())!==o&&(a=Da())!==o?(41===r.charCodeAt(ws)?(i=")",ws++):(i=o,0===As&&Rs(fr)),i!==o?e=n=[n,s,u,a,i]:(ws=e,e=o)):(ws=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}function zs(){var t,e,n,s,u,a,i,l,f;if(t=ws,Gu()!==o)if(Da()!==o)if((e=Qs())!==o){for(n=[],s=ws,(u=Da())!==o&&(a=Sa())!==o&&(i=Da())!==o&&(l=Qs())!==o?s=u=[u,a,i,l]:(ws=s,s=o);s!==o;)n.push(s),s=ws,(u=Da())!==o&&(a=Sa())!==o&&(i=Da())!==o&&(l=Qs())!==o?s=u=[u,a,i,l]:(ws=s,s=o);n!==o?t=c(e,n):(ws=t,t=o)}else ws=t,t=o;else ws=t,t=o;else ws=t,t=o;return t===o&&(t=ws,Da()!==o&&Gu()!==o&&(e=Da())!==o&&(n=function(){var t,e,n,s;return t=ws,"RECURSIVE"===r.substr(ws,9)?(e="RECURSIVE",ws+=9):(e=o,0===As&&Rs(Vt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(s=Da())!==o&&(u=Qs())!==o?((f=u).recursive=!0,t=[f]):(ws=t,t=o)),t}function Qs(){var r,t,e,n,s;return r=ws,(t=iu())===o&&(t=Qo()),t!==o&&Da()!==o?((e=Js())===o&&(e=null),e!==o&&Da()!==o&&xu()!==o&&Da()!==o&&ga()!==o&&Da()!==o&&(n=xs())!==o&&Da()!==o&&Oa()!==o?("string"==typeof(s=t)&&(s={type:"default",value:s}),r=t={name:s,stmt:n,columns:e}):(ws=r,r=o)):(ws=r,r=o),r}function Js(){var r,t;return r=ws,ga()!==o&&Da()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Xo())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Xo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Xo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=c(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())!==o&&Da()!==o&&Oa()!==o?r=t:(ws=r,r=o),r}function ro(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A;return t=ws,Da()!==o?((e=zs())===o&&(e=null),e!==o&&Da()!==o&&function(){var t,e,n,s;return t=ws,"select"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(jt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&$a()!==o?((n=function(){var r,t,e,n,s,u;if(r=ws,(t=to())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=to())!==o?n=s=[s,u]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=to())!==o?n=s=[s,u]:(ws=n,n=o);e!==o?(t=function(r,t){const e=[r];for(let r=0,n=t.length;r<n;++r)e.push(t[r][1]);return e}(t,e),r=t):(ws=r,r=o)}else ws=r,r=o;return r}())===o&&(n=null),n!==o&&Da()!==o?((s=Bu())===o&&(s=null),s!==o&&Da()!==o&&(u=eo())!==o&&Da()!==o?((a=oo())===o&&(a=null),a!==o&&Da()!==o?((i=Co())===o&&(i=null),i!==o&&Da()!==o?((l=function(){var t,e;return t=ws,function(){var t,e,n,s;return t=ws,"group"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(we)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&ju()!==o&&Da()!==o&&(e=_o())!==o?t=e.value:(ws=t,t=o),t}())===o&&(l=null),l!==o&&Da()!==o?((c=function(){var t,e;return t=ws,function(){var t,e,n,s;return t=ws,"having"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(Ee)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(e=Mo())!==o?t=e:(ws=t,t=o),t}())===o&&(c=null),c!==o&&Da()!==o?((f=wo())===o&&(f=null),f!==o&&Da()!==o?((b=Eo())===o&&(b=null),b!==o?(v=e,p=n,L=s,C=u,w=i,h=l,y=c,E=f,A=b,(d=a)&&d.forEach((r=>r.table&&fi.add(`select::${r.db}::${r.table}`))),t={with:v,type:"select",options:p,distinct:L,columns:C,from:d,where:w,groupby:h,having:y,orderby:E,limit:A}):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t}function to(){var t;return(t=function(){var t;return"sql_calc_found_rows"===r.substr(ws,19).toLowerCase()?(t=r.substr(ws,19),ws+=19):(t=o,0===As&&Rs(Zn)),t}())===o&&((t=function(){var t;return"sql_cache"===r.substr(ws,9).toLowerCase()?(t=r.substr(ws,9),ws+=9):(t=o,0===As&&Rs(zn)),t}())===o&&(t=function(){var t;return"sql_no_cache"===r.substr(ws,12).toLowerCase()?(t=r.substr(ws,12),ws+=12):(t=o,0===As&&Rs(Qn)),t}()),t===o&&(t=function(){var t;return"sql_big_result"===r.substr(ws,14).toLowerCase()?(t=r.substr(ws,14),ws+=14):(t=o,0===As&&Rs(rs)),t}())===o&&(t=function(){var t;return"sql_small_result"===r.substr(ws,16).toLowerCase()?(t=r.substr(ws,16),ws+=16):(t=o,0===As&&Rs(Jn)),t}())===o&&(t=function(){var t;return"sql_buffer_result"===r.substr(ws,17).toLowerCase()?(t=r.substr(ws,17),ws+=17):(t=o,0===As&&Rs(ts)),t}())),t}function eo(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Yu())===o&&(t=ws,(e=_a())!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t===o&&(t=_a())),t!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=no())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=no())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=function(r,t){bi.add("select::null::(.*)");const e={expr:{type:"column_ref",table:null,column:"*"},as:null};return t&&t.length>0?ui(e,t):[e]}(0,e):(ws=r,r=o)}else ws=r,r=o;if(r===o)if(r=ws,(t=no())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=no())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=no())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=c(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function no(){var r,t,e,n,s;return r=ws,t=ws,(e=Vo())!==o&&(n=Da())!==o&&(s=Ra())!==o?t=e=[e,n,s]:(ws=t,t=o),t===o&&(t=null),t!==o&&(e=Da())!==o&&(n=_a())!==o?r=t=function(r){const t=r&&r[0]||null;return bi.add(`select::${t}::(.*)`),{expr:{type:"column_ref",table:t,column:"*"},as:null}}(t):(ws=r,r=o),r===o&&(r=ws,(t=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Uo())!==o){for(e=[],n=ws,(s=Da())!==o?((u=zu())===o&&(u=Qu())===o&&(u=ka()),u!==o&&(a=Da())!==o&&(i=Uo())!==o?n=s=[s,u,a,i]:(ws=n,n=o)):(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o?((u=zu())===o&&(u=Qu())===o&&(u=ka()),u!==o&&(a=Da())!==o&&(i=Uo())!==o?n=s=[s,u,a,i]:(ws=n,n=o)):(ws=n,n=o);e!==o?(t=function(r,t){const e=r.ast;if(e&&"select"===e.type&&(!(r.parentheses_symbol||r.parentheses||r.ast.parentheses||r.ast.parentheses_symbol)||1!==e.columns.length||"*"===e.columns[0].expr.column))throw new Error("invalid column clause with select statement");if(!t||0===t.length)return r;const n=t.length;let s=t[n-1][3];for(let e=n-1;e>=0;e--){const n=0===e?r:t[e-1][3];s=si(t[e][1],n,s)}return s}(t,e),r=t):(ws=r,r=o)}else ws=r,r=o;return r}())!==o&&(e=Da())!==o?((n=so())===o&&(n=null),n!==o?r=t={expr:t,as:n}:(ws=r,r=o)):(ws=r,r=o)),r}function so(){var r,t,e;return r=ws,(t=xu())!==o&&Da()!==o&&(e=function(){var r,t;return r=ws,(t=Qo())!==o&&(function(r){if(!0===ei[r.toUpperCase()])throw new Error("Error: "+JSON.stringify(r)+" is a reserved word, can not as alias clause");return!1}(t)?o:void 0)!==o?r=t:(ws=r,r=o),r===o&&(r=ws,r=t=qo()),r}())!==o?r=t=e:(ws=r,r=o),r===o&&(r=ws,(t=xu())===o&&(t=null),t!==o&&Da()!==o&&(e=Vo())!==o?r=t=e:(ws=r,r=o)),r}function oo(){var t,e;return t=ws,function(){var t,e,n,s;return t=ws,"from"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Jt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(e=co())!==o?t=e:(ws=t,t=o),t}function uo(){var r,t,e;return r=ws,(t=po())!==o&&Da()!==o&&yu()!==o&&Da()!==o&&(e=po())!==o?r=t=[t,e]:(ws=r,r=o),r}function ao(){var t,e;return t=ws,Fu()!==o&&Da()!==o?("btree"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(br)),e===o&&("hash"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(vr))),e!==o?t={keyword:"using",type:e.toLowerCase()}:(ws=t,t=o)):(ws=t,t=o),t}function io(){var r,t,e,n,s,u;if(r=ws,(t=lo())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=lo())!==o?n=s=[s,u]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=lo())!==o?n=s=[s,u]:(ws=n,n=o);e!==o?r=t=function(r,t){const e=[r];for(let r=0;r<t.length;r++)e.push(t[r][1]);return e}(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function lo(){var t,e,n,s,u,a;return t=ws,(e=function(){var t,e,n,s;return t=ws,"key_block_size"===r.substr(ws,14).toLowerCase()?(e=r.substr(ws,14),ws+=14):(e=o,0===As&&Rs(Z)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="KEY_BLOCK_SIZE":(ws=t,t=o)):(ws=t,t=o),t}())!==o&&Da()!==o?((n=ya())===o&&(n=null),n!==o&&Da()!==o&&(s=bu())!==o?(u=n,a=s,t=e={type:e.toLowerCase(),symbol:u,expr:a}):(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ao())===o&&(t=ws,"with"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(pr)),e!==o&&Da()!==o?("parser"===r.substr(ws,6).toLowerCase()?(n=r.substr(ws,6),ws+=6):(n=o,0===As&&Rs(Lr)),n!==o&&Da()!==o&&(s=Qo())!==o?t=e={type:"with parser",expr:s}:(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,"visible"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(Cr)),e===o&&("invisible"===r.substr(ws,9).toLowerCase()?(e=r.substr(ws,9),ws+=9):(e=o,0===As&&Rs(dr))),e!==o&&(e=function(r){return{type:r.toLowerCase(),expr:r.toLowerCase()}}(e)),(t=e)===o&&(t=Fa()))),t}function co(){var r,t,e,n;if(r=ws,(t=bo())!==o){for(e=[],n=fo();n!==o;)e.push(n),n=fo();e!==o?r=t=wr(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function fo(){var r,t,e;return r=ws,Da()!==o&&(t=Sa())!==o&&Da()!==o&&(e=bo())!==o?r=e:(ws=r,r=o),r===o&&(r=ws,Da()!==o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(r=ws,(t=vo())!==o)if(Da()!==o)if((e=bo())!==o)if(Da()!==o)if((n=Fu())!==o)if(Da()!==o)if(ga()!==o)if(Da()!==o)if((s=Qo())!==o){for(u=[],a=ws,(i=Da())!==o&&(l=Sa())!==o&&(c=Da())!==o&&(f=Qo())!==o?a=i=[i,l,c,f]:(ws=a,a=o);a!==o;)u.push(a),a=ws,(i=Da())!==o&&(l=Sa())!==o&&(c=Da())!==o&&(f=Qo())!==o?a=i=[i,l,c,f]:(ws=a,a=o);u!==o&&(a=Da())!==o&&(i=Oa())!==o?(b=t,p=s,L=u,(v=e).join=b,v.using=ui(p,L),r=t=v):(ws=r,r=o)}else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;return r===o&&(r=ws,(t=vo())!==o&&Da()!==o&&(e=bo())!==o&&Da()!==o?((n=Lo())===o&&(n=null),n!==o?(t=function(r,t,e){return t.join=r,t.on=e,t}(t,e,n),r=t):(ws=r,r=o)):(ws=r,r=o),r===o&&(r=ws,(t=vo())!==o&&Da()!==o&&(e=ga())!==o&&Da()!==o&&(n=xs())!==o&&Da()!==o&&Oa()!==o&&Da()!==o?((s=so())===o&&(s=null),s!==o&&(u=Da())!==o?((a=Lo())===o&&(a=null),a!==o?(t=function(r,t,e,n){return t.parentheses=!0,{expr:t,as:e,join:r,on:n}}(t,n,s,a),r=t):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o))),r}())!==o?r=t:(ws=r,r=o)),r}function bo(){var t,e,n,s,u,a;return t=ws,(e=function(){var t;return"dual"===r.substr(ws,4).toLowerCase()?(t=r.substr(ws,4),ws+=4):(t=o,0===As&&Rs(jn)),t}())!==o&&(e={type:"dual"}),(t=e)===o&&(t=ws,(e=po())!==o&&Da()!==o?((n=so())===o&&(n=null),n!==o?(a=n,t=e="var"===(u=e).type?(u.as=a,u):{db:u.db,table:u.table,as:a}):(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,(e=ga())!==o&&Da()!==o&&(n=xs())!==o&&Da()!==o&&Oa()!==o&&Da()!==o?((s=so())===o&&(s=null),s!==o?t=e=function(r,t){return r.parentheses=!0,{expr:r,as:t}}(n,s):(ws=t,t=o)):(ws=t,t=o))),t}function vo(){var t,e,n,s;return t=ws,(e=function(){var t,e,n,s;return t=ws,"left"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(ae)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(n=Da())!==o?((s=$u())===o&&(s=null),s!==o&&Da()!==o&&Du()!==o?t=e="LEFT JOIN":(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,(e=function(){var t,e,n,s;return t=ws,"right"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(ie)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(n=Da())!==o?((s=$u())===o&&(s=null),s!==o&&Da()!==o&&Du()!==o?t=e="RIGHT JOIN":(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,(e=function(){var t,e,n,s;return t=ws,"full"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(le)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(n=Da())!==o?((s=$u())===o&&(s=null),s!==o&&Da()!==o&&Du()!==o?t=e="FULL JOIN":(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,e=ws,(n=function(){var t,e,n,s;return t=ws,"inner"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(ce)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(s=Da())!==o?e=n=[n,s]:(ws=e,e=o),e===o&&(e=null),e!==o&&(n=Du())!==o?t=e="INNER JOIN":(ws=t,t=o)))),t}function po(){var r,t,e,n,s,u,a,i;return r=ws,(t=Vo())!==o?(e=ws,(n=Da())!==o&&(s=Ra())!==o&&(u=Da())!==o&&(a=Vo())!==o?e=n=[n,s,u,a]:(ws=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){const e={db:null,table:r};return null!==t&&(e.db=r,e.table=t[3]),e}(t,e):(ws=r,r=o)):(ws=r,r=o),r===o&&(r=ws,(t=Qa())!==o&&((i=t).db=null,i.table=i.name,t=i),r=t),r}function Lo(){var r,t;return r=ws,ku()!==o&&Da()!==o&&(t=Mo())!==o?r=t:(ws=r,r=o),r}function Co(){var t,e;return t=ws,function(){var t,e,n,s;return t=ws,"where"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(de)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(e=Mo())!==o?t=e:(ws=t,t=o),t}function wo(){var t,e;return t=ws,function(){var t,e,n,s;return t=ws,"order"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(ye)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&ju()!==o&&Da()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=ho())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=ho())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=ho())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=c(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())!==o?t=e:(ws=t,t=o),t}function ho(){var t,e,n;return t=ws,(e=Uo())!==o&&Da()!==o?((n=function(){var t,e,n,s;return t=ws,"desc"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Ie)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="DESC":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=ws,"asc"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(Te)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="ASC":(ws=t,t=o)):(ws=t,t=o),t}()),n===o&&(n=null),n!==o?t=e={expr:e,type:n}:(ws=t,t=o)):(ws=t,t=o),t}function yo(){var r;return(r=bu())===o&&(r=eu()),r}function Eo(){var t,e,n,s,u,a,i,l;return t=ws,Hu()!==o&&Da()!==o?("first"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(hr)),e!==o&&Da()!==o&&(n=yo())!==o&&Da()!==o?("rows"===r.substr(ws,4).toLowerCase()?(s=r.substr(ws,4),ws+=4):(s=o,0===As&&Rs(yr)),s!==o&&Da()!==o?("only"===r.substr(ws,4).toLowerCase()?(u=r.substr(ws,4),ws+=4):(u=o,0===As&&Rs(Er)),u!==o?t={fetch:{prefix:"fetch first",value:n,suffix:"rows only"}}:(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,function(){var t,e,n,s;return t=ws,"offset"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(me)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="OFFSET":(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(e=yo())!==o&&Da()!==o?("rows"===r.substr(ws,4).toLowerCase()?(n=r.substr(ws,4),ws+=4):(n=o,0===As&&Rs(yr)),n!==o&&Da()!==o&&(s=Hu())!==o&&Da()!==o?("next"===r.substr(ws,4).toLowerCase()?(u=r.substr(ws,4),ws+=4):(u=o,0===As&&Rs(Ar)),u!==o&&Da()!==o&&(a=yo())!==o&&Da()!==o?("rows"===r.substr(ws,4).toLowerCase()?(i=r.substr(ws,4),ws+=4):(i=o,0===As&&Rs(yr)),i!==o&&Da()!==o?("only"===r.substr(ws,4).toLowerCase()?(l=r.substr(ws,4),ws+=4):(l=o,0===As&&Rs(Er)),l!==o?t=function(r,t){return{offset:{prefix:"offset",value:r,suffix:"rows"},fetch:{prefix:"fetch next",value:t,suffix:"rows only"}}}(e,a):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o)),t}function Ao(){var r,t,e,n,s,u,a,i;if(r=ws,(t=mo())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=mo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=mo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=c(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function mo(){var t,e,n,s,u,a,i,l,c;return t=ws,e=ws,(n=Vo())!==o&&(s=Da())!==o&&(u=Ra())!==o?e=n=[n,s,u]:(ws=e,e=o),e===o&&(e=null),e!==o&&(n=Da())!==o&&(s=Ko())!==o&&(u=Da())!==o?(61===r.charCodeAt(ws)?(a="=",ws++):(a=o,0===As&&Rs(mr)),a!==o&&Da()!==o&&(i=jo())!==o?t=e={column:s,value:i,table:(c=e)&&c[0]}:(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,e=ws,(n=Vo())!==o&&(s=Da())!==o&&(u=Ra())!==o?e=n=[n,s,u]:(ws=e,e=o),e===o&&(e=null),e!==o&&(n=Da())!==o&&(s=Ko())!==o&&(u=Da())!==o?(61===r.charCodeAt(ws)?(a="=",ws++):(a=o,0===As&&Rs(mr)),a!==o&&Da()!==o&&(i=Pu())!==o&&Da()!==o&&ga()!==o&&Da()!==o&&(l=Xo())!==o&&Da()!==o&&Oa()!==o?t=e=function(r,t,e){return{column:t,value:e,table:r&&r[0],keyword:"values"}}(e,s,l):(ws=t,t=o)):(ws=t,t=o)),t}function To(){var r;return(r=function(){var r,t;return r=ws,Pu()!==o&&Da()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=So())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=So())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=So())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=c(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())!==o?r=t:(ws=r,r=o),r}())===o&&(r=ro()),r}function Io(){var r,t,e,n,s,u,a,i,l;if(r=ws,_u()!==o)if(Da()!==o)if((t=ga())!==o)if(Da()!==o)if((e=Qo())!==o){for(n=[],s=ws,(u=Da())!==o&&(a=Sa())!==o&&(i=Da())!==o&&(l=Qo())!==o?s=u=[u,a,i,l]:(ws=s,s=o);s!==o;)n.push(s),s=ws,(u=Da())!==o&&(a=Sa())!==o&&(i=Da())!==o&&(l=Qo())!==o?s=u=[u,a,i,l]:(ws=s,s=o);n!==o&&(s=Da())!==o&&(u=Oa())!==o?r=ui(e,n):(ws=r,r=o)}else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;return r===o&&(r=ws,_u()!==o&&Da()!==o&&(t=So())!==o?r=t:(ws=r,r=o)),r}function No(){var t,e,n;return t=ws,ku()!==o&&Da()!==o?("duplicate"===r.substr(ws,9).toLowerCase()?(e=r.substr(ws,9),ws+=9):(e=o,0===As&&Rs(Tr)),e!==o&&Da()!==o&&Ta()!==o&&Da()!==o&&Au()!==o&&Da()!==o&&(n=Ao())!==o?t={keyword:"on duplicate key update",set:n}:(ws=t,t=o)):(ws=t,t=o),t}function Ro(){var t,e;return t=ws,(e=function(){var t,e,n,s;return t=ws,"insert"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(Xt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(e="insert"),(t=e)===o&&(t=ws,(e=Nu())!==o&&(e="replace"),t=e),t}function So(){var r,t;return r=ws,ga()!==o&&Da()!==o&&(t=_o())!==o&&Da()!==o&&Oa()!==o?r=t:(ws=r,r=o),r}function _o(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Uo())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Uo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=Uo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=function(r,t){const e={type:"expr_list"};return e.value=ui(r,t),e}(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function go(){var r,t,e,n,s,u;if(r=ws,(t=Oo())!==o)if(Da()!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Oo())!==o?n=s=[s,u]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Oo())!==o?n=s=[s,u]:(ws=n,n=o);e!==o?r=t=i(t,e):(ws=r,r=o)}else ws=r,r=o;else ws=r,r=o;return r}function Oo(){var t,e,n;return t=ws,function(){var t,e,n,s;return t=ws,"when"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(He)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(e=Mo())!==o&&Da()!==o&&function(){var t,e,n,s;return t=ws,"then"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Ye)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(n=Uo())!==o?t={type:"when",cond:e,result:n}:(ws=t,t=o),t}function xo(){var t,e;return t=ws,function(){var t,e,n,s;return t=ws,"else"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Be)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(e=Uo())!==o?t={type:"else",result:e}:(ws=t,t=o),t}function Uo(){var r;return(r=function(){var r;return(r=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Wo())!==o){if(e=[],n=ws,(s=Da())!==o&&(u=ka())!==o&&(a=Da())!==o&&(i=Wo())!==o?n=s=[s,u,a,i]:(ws=n,n=o),n!==o)for(;n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=ka())!==o&&(a=Da())!==o&&(i=Wo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);else e=o;e!==o&&(n=Da())!==o?((s=Po())===o&&(s=null),s!==o?(t=function(r,t,e){const n=ai(r,t);return null===e?n:"arithmetic"===e.type?ai(n,e.tail):si(e.op,n,e.right)}(t,e,s),r=t):(ws=r,r=o)):(ws=r,r=o)}else ws=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=ws,(t=ko())!==o){for(e=[],n=ws,(s=$a())!==o&&(u=Qu())!==o&&(a=Da())!==o&&(i=ko())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=$a())!==o&&(u=Qu())!==o&&(a=Da())!==o&&(i=ko())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=Ir(t,e):(ws=r,r=o)}else ws=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u;if(r=ws,(t=Ho())!==o){if(e=[],n=ws,(s=Da())!==o&&(u=Wo())!==o?n=s=[s,u]:(ws=n,n=o),n!==o)for(;n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Wo())!==o?n=s=[s,u]:(ws=n,n=o);else e=o;e!==o?r=t=ni(t,e[0][1]):(ws=r,r=o)}else ws=r,r=o;return r}()),r}())===o&&(r=xs()),r}function Mo(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Uo())!==o){for(e=[],n=ws,(s=Da())!==o?((u=zu())===o&&(u=Qu())===o&&(u=Sa()),u!==o&&(a=Da())!==o&&(i=Uo())!==o?n=s=[s,u,a,i]:(ws=n,n=o)):(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o?((u=zu())===o&&(u=Qu())===o&&(u=Sa()),u!==o&&(a=Da())!==o&&(i=Uo())!==o?n=s=[s,u,a,i]:(ws=n,n=o)):(ws=n,n=o);e!==o?r=t=function(r,t){const e=t.length;let n=r,s="";for(let r=0;r<e;++r)","===t[r][1]?(s=",",Array.isArray(n)||(n=[n]),n.push(t[r][3])):n=si(t[r][1],n,t[r][3]);if(","===s){const r={type:"expr_list"};return r.value=n,r}return n}(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function ko(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Do())!==o){for(e=[],n=ws,(s=$a())!==o&&(u=zu())!==o&&(a=Da())!==o&&(i=Do())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=$a())!==o&&(u=zu())!==o&&(a=Da())!==o&&(i=Do())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=Ir(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function Do(){var t,e,n,s,u;return(t=$o())===o&&(t=function(){var r,t,e,n,s;return r=ws,(t=function(){var r,t,e,n,s;return r=ws,t=ws,(e=Zu())!==o&&(n=Da())!==o&&(s=Ku())!==o?t=e=[e,n,s]:(ws=t,t=o),t!==o&&(t=Rr(t)),(r=t)===o&&(r=Ku()),r}())!==o&&Da()!==o&&ga()!==o&&Da()!==o&&(e=xs())!==o&&Da()!==o&&Oa()!==o?(n=t,(s=e).parentheses=!0,r=t=ni(n,s)):(ws=r,r=o),r}())===o&&(t=ws,(e=Zu())===o&&(e=ws,33===r.charCodeAt(ws)?(n="!",ws++):(n=o,0===As&&Rs(Nr)),n!==o?(s=ws,As++,61===r.charCodeAt(ws)?(u="=",ws++):(u=o,0===As&&Rs(mr)),As--,u===o?s=void 0:(ws=s,s=o),s!==o?e=n=[n,s]:(ws=e,e=o)):(ws=e,e=o)),e!==o&&(n=Da())!==o&&(s=Do())!==o?t=e=ni("NOT",s):(ws=t,t=o)),t}function $o(){var r,t,e,n,s;return r=ws,(t=jo())!==o&&Da()!==o?((e=Po())===o&&(e=null),e!==o?(n=t,r=t=null===(s=e)?n:"arithmetic"===s.type?ai(n,s.tail):si(s.op,n,s.right)):(ws=r,r=o)):(ws=r,r=o),r===o&&(r=iu())===o&&(r=Xo()),r}function Po(){var r;return(r=function(){var r,t,e,n,s,u;if(r=[],t=ws,(e=Da())!==o&&(n=Fo())!==o&&(s=Da())!==o&&(u=jo())!==o?t=e=[e,n,s,u]:(ws=t,t=o),t!==o)for(;t!==o;)r.push(t),t=ws,(e=Da())!==o&&(n=Fo())!==o&&(s=Da())!==o&&(u=jo())!==o?t=e=[e,n,s,u]:(ws=t,t=o);else r=o;return r!==o&&(r={type:"arithmetic",tail:r}),r}())===o&&(r=function(){var r,t,e,n;return r=ws,(t=Go())!==o&&Da()!==o&&(e=ga())!==o&&Da()!==o&&(n=_o())!==o&&Da()!==o&&Oa()!==o?r=t={op:t,right:n}:(ws=r,r=o),r===o&&(r=ws,(t=Go())!==o&&Da()!==o?((e=Qa())===o&&(e=iu()),e!==o?(t=function(r,t){return{op:r,right:t}}(t,e),r=t):(ws=r,r=o)):(ws=r,r=o)),r}())===o&&(r=function(){var r,t,e,n;return r=ws,(t=function(){var r,t,e,n,s;return r=ws,t=ws,(e=Zu())!==o&&(n=Da())!==o&&(s=Wu())!==o?t=e=[e,n,s]:(ws=t,t=o),t!==o&&(t=Rr(t)),(r=t)===o&&(r=Wu()),r}())!==o&&Da()!==o&&(e=jo())!==o&&Da()!==o&&zu()!==o&&Da()!==o&&(n=jo())!==o?r=t={op:t,right:{type:"expr_list",value:[e,n]}}:(ws=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s;return r=ws,(t=Vu())!==o&&(e=Da())!==o&&(n=jo())!==o?r=t={op:"IS",right:n}:(ws=r,r=o),r===o&&(r=ws,t=ws,(e=Vu())!==o&&(n=Da())!==o&&(s=Zu())!==o?t=e=[e,n,s]:(ws=t,t=o),t!==o&&(e=Da())!==o&&(n=jo())!==o?(t=function(r){return{op:"IS NOT",right:r}}(n),r=t):(ws=r,r=o)),r}())===o&&(r=function(){var r,t,e;return r=ws,(t=function(){var r,t,e,n,s;return r=ws,t=ws,(e=Zu())!==o&&(n=Da())!==o&&(s=qu())!==o?t=e=[e,n,s]:(ws=t,t=o),t!==o&&(t=Rr(t)),(r=t)===o&&(r=qu()),r}())!==o&&Da()!==o?((e=uu())===o&&(e=$o()),e!==o?r=t={op:t,right:e}:(ws=r,r=o)):(ws=r,r=o),r}()),r}function Fo(){var t;return">="===r.substr(ws,2)?(t=">=",ws+=2):(t=o,0===As&&Rs(Sr)),t===o&&(62===r.charCodeAt(ws)?(t=">",ws++):(t=o,0===As&&Rs(_r)),t===o&&("<="===r.substr(ws,2)?(t="<=",ws+=2):(t=o,0===As&&Rs(gr)),t===o&&("<>"===r.substr(ws,2)?(t="<>",ws+=2):(t=o,0===As&&Rs(Or)),t===o&&(60===r.charCodeAt(ws)?(t="<",ws++):(t=o,0===As&&Rs(xr)),t===o&&(61===r.charCodeAt(ws)?(t="=",ws++):(t=o,0===As&&Rs(mr)),t===o&&("!="===r.substr(ws,2)?(t="!=",ws+=2):(t=o,0===As&&Rs(Ur)))))))),t}function Go(){var r,t,e,n,s;return r=ws,t=ws,(e=Zu())!==o&&(n=Da())!==o&&(s=Xu())!==o?t=e=[e,n,s]:(ws=t,t=o),t!==o&&(t=Rr(t)),(r=t)===o&&(r=Xu()),r}function jo(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Yo())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Ho())!==o&&(a=Da())!==o&&(i=Yo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Ho())!==o&&(a=Da())!==o&&(i=Yo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=Ir(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function Ho(){var t;return 43===r.charCodeAt(ws)?(t="+",ws++):(t=o,0===As&&Rs(Mr)),t===o&&(45===r.charCodeAt(ws)?(t="-",ws++):(t=o,0===As&&Rs(kr))),t}function Yo(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Wo())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Bo())!==o&&(a=Da())!==o&&(i=Wo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Bo())!==o&&(a=Da())!==o&&(i=Wo())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=ai(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function Bo(){var t;return 42===r.charCodeAt(ws)?(t="*",ws++):(t=o,0===As&&Rs(Dr)),t===o&&(47===r.charCodeAt(ws)?(t="/",ws++):(t=o,0===As&&Rs($r)),t===o&&(37===r.charCodeAt(ws)?(t="%",ws++):(t=o,0===As&&Rs(Pr)))),t}function Wo(){var t,e,n;return(t=function(){var t,e,n,s,u,a,i,l,c;return t=ws,(e=ta())!==o&&Da()!==o&&ga()!==o&&Da()!==o&&(n=Uo())!==o&&Da()!==o&&xu()!==o&&Da()!==o&&(s=ri())!==o&&Da()!==o&&(u=Oa())!==o?(l=n,c=s,t=e={type:"cast",keyword:e.toLowerCase(),expr:l,symbol:"as",target:c}):(ws=t,t=o),t===o&&(t=ws,(e=ta())!==o&&Da()!==o&&ga()!==o&&Da()!==o&&(n=Uo())!==o&&Da()!==o&&xu()!==o&&Da()!==o&&(s=oa())!==o&&Da()!==o&&(u=ga())!==o&&Da()!==o&&(a=vu())!==o&&Da()!==o&&Oa()!==o&&Da()!==o&&(i=Oa())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+")"}}}(e,n,a),t=e):(ws=t,t=o),t===o&&(t=ws,(e=ta())!==o&&Da()!==o&&ga()!==o&&Da()!==o&&(n=Uo())!==o&&Da()!==o&&xu()!==o&&Da()!==o&&(s=oa())!==o&&Da()!==o&&(u=ga())!==o&&Da()!==o&&(a=vu())!==o&&Da()!==o&&Sa()!==o&&Da()!==o&&(i=vu())!==o&&Da()!==o&&Oa()!==o&&Da()!==o&&Oa()!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+", "+n+")"}}}(e,n,a,i),t=e):(ws=t,t=o),t===o&&(t=ws,(e=ta())!==o&&Da()!==o&&ga()!==o&&Da()!==o&&(n=Uo())!==o&&Da()!==o&&xu()!==o&&Da()!==o&&(s=function(){var t;return(t=function(){var t,e,n,s;return t=ws,"signed"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(ze)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="SIGNED":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=ua()),t}())!==o&&Da()!==o?((u=ia())===o&&(u=null),u!==o&&Da()!==o&&(a=Oa())!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:e+(n?" "+n:"")}}}(e,n,s,u),t=e):(ws=t,t=o)):(ws=t,t=o)))),t}())===o&&(t=uu())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ws,(e=function(){var t,e,n,s;return t=ws,"count"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(ke)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="COUNT":(ws=t,t=o)):(ws=t,t=o),t}())!==o&&Da()!==o&&ga()!==o&&Da()!==o&&(n=function(){var t,e,n,s;return t=ws,(e=function(){var t;return 42===r.charCodeAt(ws)?(t="*",ws++):(t=o,0===As&&Rs(Dr)),t!==o&&(t={type:"star",value:"*"}),t}())!==o&&(e={expr:e}),(t=e)===o&&(t=ws,(e=Bu())===o&&(e=null),e!==o&&Da()!==o&&(n=ga())!==o&&Da()!==o&&(s=Uo())!==o&&Da()!==o&&Oa()!==o?t=e={distinct:e,expr:s,parentheses:!0}:(ws=t,t=o),t===o&&(t=ws,(e=Bu())===o&&(e=null),e!==o&&Da()!==o&&(n=Uo())!==o&&Da()!==o?((s=wo())===o&&(s=null),s!==o?(e=function(r,t,e){return{distinct:r,expr:t,orderby:e,parentheses:!1}}(e,n,s),t=e):(ws=t,t=o)):(ws=t,t=o))),t}())!==o&&Da()!==o&&Oa()!==o&&Da()!==o?((s=su())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:n,over:s}:(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ws,(e=function(){var t;return(t=function(){var t,e,n,s;return t=ws,"sum"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(Pe)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="SUM":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"max"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(De)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="MAX":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"min"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs($e)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="MIN":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"avg"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(Fe)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="AVG":(ws=t,t=o)):(ws=t,t=o),t}()),t}())!==o&&Da()!==o&&ga()!==o&&Da()!==o&&(n=jo())!==o&&Da()!==o&&Oa()!==o?t=e={type:"aggr_func",name:e,args:{expr:n}}:(ws=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u;return t=ws,(e=function(){var t;return(t=ou())===o&&(t=function(){var t,e,n,s;return t=ws,"current_user"===r.substr(ws,12).toLowerCase()?(e=r.substr(ws,12),ws+=12):(e=o,0===As&&Rs(_n)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="CURRENT_USER":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"user"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(wn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="USER":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"session_user"===r.substr(ws,12).toLowerCase()?(e=r.substr(ws,12),ws+=12):(e=o,0===As&&Rs(gn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="SESSION_USER":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"system_user"===r.substr(ws,11).toLowerCase()?(e=r.substr(ws,11),ws+=11):(e=o,0===As&&Rs(On)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="SYSTEM_USER":(ws=t,t=o)):(ws=t,t=o),t}()),t}())!==o&&Da()!==o&&(n=ga())!==o&&Da()!==o?((s=_o())===o&&(s=null),s!==o&&Da()!==o&&Oa()!==o&&Da()!==o?((u=su())===o&&(u=null),u!==o?t=e={type:"function",name:e,args:s||{type:"expr_list",value:[]},over:u}:(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,(e=ou())!==o&&Da()!==o?((n=nu())===o&&(n=null),n!==o?t=e={type:"function",name:e,over:n}:(ws=t,t=o)):(ws=t,t=o),t===o&&(t=ws,(e=Ka())!==o&&Da()!==o&&(n=ga())!==o&&Da()!==o?((s=Mo())===o&&(s=null),s!==o&&Da()!==o&&Oa()!==o&&Da()!==o?((u=su())===o&&(u=null),u!==o?(e=function(r,t,e){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,s,u),t=e):(ws=t,t=o)):(ws=t,t=o)):(ws=t,t=o))),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=ws,Ju()!==o&&Da()!==o&&(t=go())!==o&&Da()!==o?((e=xo())===o&&(e=null),e!==o&&Da()!==o&&(n=ra())!==o&&Da()!==o?((s=Ju())===o&&(s=null),s!==o?(a=t,(i=e)&&a.push(i),r={type:"case",expr:null,args:a}):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o),r===o&&(r=ws,Ju()!==o&&Da()!==o&&(t=Uo())!==o&&Da()!==o&&(e=go())!==o&&Da()!==o?((n=xo())===o&&(n=null),n!==o&&Da()!==o&&(s=ra())!==o&&Da()!==o?((u=Ju())===o&&(u=null),u!==o?r=function(r,t,e){return e&&t.push(e),{type:"case",expr:r,args:t}}(t,e,n):(ws=r,r=o)):(ws=r,r=o)):(ws=r,r=o)),r}())===o&&(t=function(){var t,e,n;return t=ws,function(){var t,e,n,s;return t=ws,"interval"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(yn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="INTERVAL":(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&(e=Uo())!==o&&Da()!==o&&(n=function(){var t;return(t=function(){var t,e,n,s;return t=ws,"year"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(En)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="YEAR":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"month"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(An)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="MONTH":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"day"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(mn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="DAY":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"hour"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Tn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="HOUR":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"minute"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(In)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="MINUTE":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"second"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(Nn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="SECOND":(ws=t,t=o)):(ws=t,t=o),t}()),t}())!==o?t={type:"interval",expr:e,unit:n.toLowerCase()}:(ws=t,t=o),t}())===o&&(t=Xo())===o&&(t=eu())===o&&(t=ws,ga()!==o&&Da()!==o&&(e=Mo())!==o&&Da()!==o&&Oa()!==o?((n=e).parentheses=!0,t=n):(ws=t,t=o),t===o&&(t=Qa())),t}function Xo(){var r,t,e,n,s,u,a,i,l,c,f;if(r=ws,t=ws,(e=Vo())!==o&&(n=Da())!==o&&(s=Ra())!==o&&(u=Da())!==o?t=e=[e,n,s,u]:(ws=t,t=o),t===o&&(t=null),t!==o)if((e=Zo())!==o)if((n=Da())!==o){if(s=[],u=ws,(a=Ma())===o&&(a=Ua()),a!==o&&(i=Da())!==o?((l=iu())===o&&(l=bu()),l!==o?u=a=[a,i,l]:(ws=u,u=o)):(ws=u,u=o),u!==o)for(;u!==o;)s.push(u),u=ws,(a=Ma())===o&&(a=Ua()),a!==o&&(i=Da())!==o?((l=iu())===o&&(l=bu()),l!==o?u=a=[a,i,l]:(ws=u,u=o)):(ws=u,u=o);else s=o;s!==o&&(u=Da())!==o?((a=$s())===o&&(a=null),a!==o?r=t=function(r,t,e,n){const s=r&&r[0]||null;return bi.add(`select::${s}::${t}`),{type:"column_ref",table:s,column:t,collate:n,arrows:e.map((r=>r[0])),properties:e.map((r=>r[2]))}}(t,e,s,a):(ws=r,r=o)):(ws=r,r=o)}else ws=r,r=o;else ws=r,r=o;else ws=r,r=o;return r===o&&(r=ws,(t=Vo())!==o&&(e=Da())!==o&&(n=Ra())!==o&&(s=Da())!==o&&(u=Ko())!==o?(c=t,f=u,bi.add(`select::${c}::${f}`),r=t={type:"column_ref",table:c,column:f}):(ws=r,r=o),r===o&&(r=ws,(t=Zo())!==o&&(t=function(r){return bi.add("select::null::"+r),{type:"column_ref",table:null,column:r}}(t)),r=t)),r}function Vo(){var r,t;return r=ws,(t=Qo())!==o&&(Fr(t)?o:void 0)!==o?r=t:(ws=r,r=o),r===o&&(r=ws,r=t=qo()),r}function qo(){var t;return(t=function(){var t,e,n,s;if(t=ws,34===r.charCodeAt(ws)?(e='"',ws++):(e=o,0===As&&Rs(Gr)),e!==o){if(n=[],jr.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(Hr)),s!==o)for(;s!==o;)n.push(s),jr.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(Hr));else n=o;n!==o?(34===r.charCodeAt(ws)?(s='"',ws++):(s=o,0===As&&Rs(Gr)),s!==o?t=e=Yr(n):(ws=t,t=o)):(ws=t,t=o)}else ws=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=ws,39===r.charCodeAt(ws)?(e="'",ws++):(e=o,0===As&&Rs(er)),e!==o){if(n=[],Br.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(Wr)),s!==o)for(;s!==o;)n.push(s),Br.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(Wr));else n=o;n!==o?(39===r.charCodeAt(ws)?(s="'",ws++):(s=o,0===As&&Rs(er)),s!==o?t=e=Yr(n):(ws=t,t=o)):(ws=t,t=o)}else ws=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=ws,96===r.charCodeAt(ws)?(e="`",ws++):(e=o,0===As&&Rs(Xr)),e!==o){if(n=[],Vr.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(qr)),s!==o)for(;s!==o;)n.push(s),Vr.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(qr));else n=o;n!==o?(96===r.charCodeAt(ws)?(s="`",ws++):(s=o,0===As&&Rs(Xr)),s!==o?t=e=Yr(n):(ws=t,t=o)):(ws=t,t=o)}else ws=t,t=o;return t}()),t}function Ko(){var r;return r=ws,(r=zo())===o&&(r=qo()),r}function Zo(){var r,t;return r=ws,(t=zo())!==o&&(Fr(t)?o:void 0)!==o?r=t:(ws=r,r=o),r===o&&(r=qo()),r}function zo(){var r,t,e,n;if(r=ws,(t=Jo())!==o){for(e=[],n=tu();n!==o;)e.push(n),n=tu();e!==o?r=t=Kr(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function Qo(){var r,t,e,n;if(r=ws,(t=Jo())!==o){for(e=[],n=ru();n!==o;)e.push(n),n=ru();e!==o?r=t=Kr(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function Jo(){var t;return Zr.test(r.charAt(ws))?(t=r.charAt(ws),ws++):(t=o,0===As&&Rs(zr)),t}function ru(){var t;return Qr.test(r.charAt(ws))?(t=r.charAt(ws),ws++):(t=o,0===As&&Rs(Jr)),t}function tu(){var t;return rt.test(r.charAt(ws))?(t=r.charAt(ws),ws++):(t=o,0===As&&Rs(tt)),t}function eu(){var t,e,n;return t=ws,58===r.charCodeAt(ws)?(e=":",ws++):(e=o,0===As&&Rs(et)),e!==o&&(n=Qo())!==o?t=e=[e,n]:(ws=t,t=o),t!==o&&(t={type:"param",value:t[1]}),t}function nu(){var r,t,e;return r=ws,ku()!==o&&Da()!==o&&Au()!==o&&Da()!==o&&(t=wa())!==o&&Da()!==o&&ga()!==o&&Da()!==o?((e=_o())===o&&(e=null),e!==o&&Da()!==o&&Oa()!==o?r={type:"on update",keyword:t,parentheses:!0,expr:e}:(ws=r,r=o)):(ws=r,r=o),r===o&&(r=ws,ku()!==o&&Da()!==o&&Au()!==o&&Da()!==o&&(t=wa())!==o?r=function(r){return{type:"on update",keyword:r}}(t):(ws=r,r=o)),r}function su(){var t,e,n;return t=ws,function(){var t,e,n,s;return t=ws,"over"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(ve)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}()!==o&&Da()!==o&&ga()!==o&&Da()!==o&&_u()!==o&&Da()!==o&&ju()!==o&&Da()!==o&&(e=eo())!==o&&Da()!==o?((n=wo())===o&&(n=null),n!==o&&Da()!==o&&Oa()!==o?t={partitionby:e,orderby:n}:(ws=t,t=o)):(ws=t,t=o),t===o&&(t=nu()),t}function ou(){var t;return(t=function(){var t,e,n,s;return t=ws,"current_date"===r.substr(ws,12).toLowerCase()?(e=r.substr(ws,12),ws+=12):(e=o,0===As&&Rs(hn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="CURRENT_DATE":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"current_time"===r.substr(ws,12).toLowerCase()?(e=r.substr(ws,12),ws+=12):(e=o,0===As&&Rs(Rn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="CURRENT_TIME":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=wa()),t}function uu(){var t;return(t=iu())===o&&(t=bu())===o&&(t=function(){var t,e;return t=ws,(e=function(){var t,e,n,s;return t=ws,"true"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(kt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(e={type:"bool",value:!0}),(t=e)===o&&(t=ws,(e=function(){var t,e,n,s;return t=ws,"false"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs($t)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(e={type:"bool",value:!1}),t=e),t}())===o&&(t=au())===o&&(t=function(){var t,e,n,s,u,a;if(t=ws,(e=Ca())===o&&(e=pa())===o&&(e=da())===o&&(e=La()),e!==o)if(Da()!==o){if(n=ws,39===r.charCodeAt(ws)?(s="'",ws++):(s=o,0===As&&Rs(er)),s!==o){for(u=[],a=cu();a!==o;)u.push(a),a=cu();u!==o?(39===r.charCodeAt(ws)?(a="'",ws++):(a=o,0===As&&Rs(er)),a!==o?n=s=[s,u,a]:(ws=n,n=o)):(ws=n,n=o)}else ws=n,n=o;n!==o?t=e=nt(e,n):(ws=t,t=o)}else ws=t,t=o;else ws=t,t=o;if(t===o)if(t=ws,(e=Ca())===o&&(e=pa())===o&&(e=da())===o&&(e=La()),e!==o)if(Da()!==o){if(n=ws,34===r.charCodeAt(ws)?(s='"',ws++):(s=o,0===As&&Rs(Gr)),s!==o){for(u=[],a=lu();a!==o;)u.push(a),a=lu();u!==o?(34===r.charCodeAt(ws)?(a='"',ws++):(a=o,0===As&&Rs(Gr)),a!==o?n=s=[s,u,a]:(ws=n,n=o)):(ws=n,n=o)}else ws=n,n=o;n!==o?t=e=nt(e,n):(ws=t,t=o)}else ws=t,t=o;else ws=t,t=o;return t}()),t}function au(){var t;return(t=function(){var t,e,n,s;return t=ws,"null"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Ut)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(t={type:"null",value:null}),t}function iu(){var t,e,n,s,u;if(t=ws,e=ws,39===r.charCodeAt(ws)?(n="'",ws++):(n=o,0===As&&Rs(er)),n!==o){for(s=[],u=cu();u!==o;)s.push(u),u=cu();s!==o?(39===r.charCodeAt(ws)?(u="'",ws++):(u=o,0===As&&Rs(er)),u!==o?e=n=[n,s,u]:(ws=e,e=o)):(ws=e,e=o)}else ws=e,e=o;if(e!==o&&(e={type:"single_quote_string",value:e[1].join("")}),(t=e)===o){if(t=ws,e=ws,34===r.charCodeAt(ws)?(n='"',ws++):(n=o,0===As&&Rs(Gr)),n!==o){for(s=[],u=lu();u!==o;)s.push(u),u=lu();s!==o?(34===r.charCodeAt(ws)?(u='"',ws++):(u=o,0===As&&Rs(Gr)),u!==o?e=n=[n,s,u]:(ws=e,e=o)):(ws=e,e=o)}else ws=e,e=o;e!==o&&(e=function(r){return{type:"double_quote_string",value:r[1].join("")}}(e)),t=e}return t}function lu(){var t;return st.test(r.charAt(ws))?(t=r.charAt(ws),ws++):(t=o,0===As&&Rs(ot)),t===o&&(t=fu()),t}function cu(){var t;return ut.test(r.charAt(ws))?(t=r.charAt(ws),ws++):(t=o,0===As&&Rs(at)),t===o&&(t=fu()),t}function fu(){var t,e,n,s,u,a,i,l,c,f;return t=ws,"\\'"===r.substr(ws,2)?(e="\\'",ws+=2):(e=o,0===As&&Rs(it)),e!==o&&(e="\\'"),(t=e)===o&&(t=ws,'\\"'===r.substr(ws,2)?(e='\\"',ws+=2):(e=o,0===As&&Rs(lt)),e!==o&&(e='\\"'),(t=e)===o&&(t=ws,"\\\\"===r.substr(ws,2)?(e="\\\\",ws+=2):(e=o,0===As&&Rs(ct)),e!==o&&(e="\\\\"),(t=e)===o&&(t=ws,"\\/"===r.substr(ws,2)?(e="\\/",ws+=2):(e=o,0===As&&Rs(ft)),e!==o&&(e="\\/"),(t=e)===o&&(t=ws,"\\b"===r.substr(ws,2)?(e="\\b",ws+=2):(e=o,0===As&&Rs(bt)),e!==o&&(e="\b"),(t=e)===o&&(t=ws,"\\f"===r.substr(ws,2)?(e="\\f",ws+=2):(e=o,0===As&&Rs(vt)),e!==o&&(e="\f"),(t=e)===o&&(t=ws,"\\n"===r.substr(ws,2)?(e="\\n",ws+=2):(e=o,0===As&&Rs(pt)),e!==o&&(e="\n"),(t=e)===o&&(t=ws,"\\r"===r.substr(ws,2)?(e="\\r",ws+=2):(e=o,0===As&&Rs(Lt)),e!==o&&(e="\r"),(t=e)===o&&(t=ws,"\\t"===r.substr(ws,2)?(e="\\t",ws+=2):(e=o,0===As&&Rs(Ct)),e!==o&&(e="\t"),(t=e)===o&&(t=ws,"\\u"===r.substr(ws,2)?(e="\\u",ws+=2):(e=o,0===As&&Rs(dt)),e!==o&&(n=wu())!==o&&(s=wu())!==o&&(u=wu())!==o&&(a=wu())!==o?(i=n,l=s,c=u,f=a,t=e=String.fromCharCode(parseInt("0x"+i+l+c+f))):(ws=t,t=o),t===o&&(t=ws,92===r.charCodeAt(ws)?(e="\\",ws++):(e=o,0===As&&Rs(wt)),e!==o&&(e="\\"),(t=e)===o&&(t=ws,"''"===r.substr(ws,2)?(e="''",ws+=2):(e=o,0===As&&Rs(ht)),e!==o&&(e="''"),(t=e)===o&&(t=ws,'""'===r.substr(ws,2)?(e='""',ws+=2):(e=o,0===As&&Rs(yt)),e!==o&&(e='""'),(t=e)===o&&(t=ws,"``"===r.substr(ws,2)?(e="``",ws+=2):(e=o,0===As&&Rs(Et)),e!==o&&(e="``"),t=e))))))))))))),t}function bu(){var r,t;return(r=function(){var r,t,e,n;return r=ws,(t=vu())!==o&&(e=pu())!==o&&(n=Lu())!==o?r=t={type:"bigint",value:t+e+n}:(ws=r,r=o),r===o&&(r=ws,(t=vu())!==o&&(e=pu())!==o?(t=function(r,t){const e=r+t;return oi(r)?{type:"bigint",value:e}:parseFloat(e)}(t,e),r=t):(ws=r,r=o),r===o&&(r=ws,(t=vu())!==o&&(e=Lu())!==o?(t=function(r,t){return{type:"bigint",value:r+t}}(t,e),r=t):(ws=r,r=o),r===o&&(r=ws,(t=vu())!==o&&(t=function(r){return oi(r)?{type:"bigint",value:r}:parseFloat(r)}(t)),r=t))),r}())!==o&&(r=(t=r)&&"bigint"===t.type?t:{type:"number",value:t}),r}function vu(){var t,e,n;return(t=Cu())===o&&(t=du())===o&&(t=ws,45===r.charCodeAt(ws)?(e="-",ws++):(e=o,0===As&&Rs(kr)),e===o&&(43===r.charCodeAt(ws)?(e="+",ws++):(e=o,0===As&&Rs(Mr))),e!==o&&(n=Cu())!==o?t=e+=n:(ws=t,t=o),t===o&&(t=ws,45===r.charCodeAt(ws)?(e="-",ws++):(e=o,0===As&&Rs(kr)),e===o&&(43===r.charCodeAt(ws)?(e="+",ws++):(e=o,0===As&&Rs(Mr))),e!==o&&(n=du())!==o?t=e=function(r,t){return r+t}(e,n):(ws=t,t=o))),t}function pu(){var t,e,n;return t=ws,46===r.charCodeAt(ws)?(e=".",ws++):(e=o,0===As&&Rs(Tt)),e!==o&&(n=Cu())!==o?t=e="."+n:(ws=t,t=o),t}function Lu(){var t,e,n;return t=ws,(e=function(){var t,e,n,s;return t=ws,_t.test(r.charAt(ws))?(e=r.charAt(ws),ws++):(e=o,0===As&&Rs(gt)),e!==o?(Ot.test(r.charAt(ws))?(n=r.charAt(ws),ws++):(n=o,0===As&&Rs(xt)),n===o&&(n=null),n!==o?t=e+=null!==(s=n)?s:"":(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(n=Cu())!==o?t=e+=n:(ws=t,t=o),t}function Cu(){var r,t;if(r=[],(t=du())!==o)for(;t!==o;)r.push(t),t=du();else r=o;return r!==o&&(r=r.join("")),r}function du(){var t;return It.test(r.charAt(ws))?(t=r.charAt(ws),ws++):(t=o,0===As&&Rs(Nt)),t}function wu(){var t;return Rt.test(r.charAt(ws))?(t=r.charAt(ws),ws++):(t=o,0===As&&Rs(St)),t}function hu(){var t,e,n,s;return t=ws,"default"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(w)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function yu(){var t,e,n,s;return t=ws,"to"===r.substr(ws,2).toLowerCase()?(e=r.substr(ws,2),ws+=2):(e=o,0===As&&Rs(Dt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Eu(){var t,e,n,s;return t=ws,"drop"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Pt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="DROP":(ws=t,t=o)):(ws=t,t=o),t}function Au(){var t,e,n,s;return t=ws,"update"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(Ht)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function mu(){var t,e,n,s;return t=ws,"create"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(Yt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Tu(){var t,e,n,s;return t=ws,"temporary"===r.substr(ws,9).toLowerCase()?(e=r.substr(ws,9),ws+=9):(e=o,0===As&&Rs(Bt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Iu(){var t,e,n,s;return t=ws,"delete"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(Wt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Nu(){var t,e,n,s;return t=ws,"replace"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(qt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Ru(){var t,e,n,s;return t=ws,"rename"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(Kt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Su(){var t,e,n,s;return t=ws,"ignore"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(Zt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function _u(){var t,e,n,s;return t=ws,"partition"===r.substr(ws,9).toLowerCase()?(e=r.substr(ws,9),ws+=9):(e=o,0===As&&Rs(zt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="PARTITION":(ws=t,t=o)):(ws=t,t=o),t}function gu(){var t,e,n,s;return t=ws,"into"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Qt)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Ou(){var t,e,n,s;return t=ws,"set"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(X)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="SET":(ws=t,t=o)):(ws=t,t=o),t}function xu(){var t,e,n,s;return t=ws,"as"===r.substr(ws,2).toLowerCase()?(e=r.substr(ws,2),ws+=2):(e=o,0===As&&Rs(te)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Uu(){var t,e,n,s;return t=ws,"table"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(ee)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="TABLE":(ws=t,t=o)):(ws=t,t=o),t}function Mu(){var t,e,n,s;return t=ws,"tables"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(ne)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="TABLES":(ws=t,t=o)):(ws=t,t=o),t}function ku(){var t,e,n,s;return t=ws,"on"===r.substr(ws,2).toLowerCase()?(e=r.substr(ws,2),ws+=2):(e=o,0===As&&Rs(ue)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Du(){var t,e,n,s;return t=ws,"join"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(fe)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function $u(){var t,e,n,s;return t=ws,"outer"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(be)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Pu(){var t,e,n,s;return t=ws,"values"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(Le)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Fu(){var t,e,n,s;return t=ws,"using"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(Ce)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Gu(){var t,e,n,s;return t=ws,"with"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(pr)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function ju(){var t,e,n,s;return t=ws,"by"===r.substr(ws,2).toLowerCase()?(e=r.substr(ws,2),ws+=2):(e=o,0===As&&Rs(he)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function Hu(){var t,e,n,s;return t=ws,"fetch"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(Ae)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="FETCH":(ws=t,t=o)):(ws=t,t=o),t}function Yu(){var t,e,n,s;return t=ws,"all"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(Ne)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="ALL":(ws=t,t=o)):(ws=t,t=o),t}function Bu(){var t,e,n,s;return t=ws,"distinct"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(Re)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="DISTINCT":(ws=t,t=o)):(ws=t,t=o),t}function Wu(){var t,e,n,s;return t=ws,"between"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(Se)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="BETWEEN":(ws=t,t=o)):(ws=t,t=o),t}function Xu(){var t,e,n,s;return t=ws,"in"===r.substr(ws,2).toLowerCase()?(e=r.substr(ws,2),ws+=2):(e=o,0===As&&Rs(_e)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="IN":(ws=t,t=o)):(ws=t,t=o),t}function Vu(){var t,e,n,s;return t=ws,"is"===r.substr(ws,2).toLowerCase()?(e=r.substr(ws,2),ws+=2):(e=o,0===As&&Rs(ge)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="IS":(ws=t,t=o)):(ws=t,t=o),t}function qu(){var t,e,n,s;return t=ws,"like"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Oe)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="LIKE":(ws=t,t=o)):(ws=t,t=o),t}function Ku(){var t,e,n,s;return t=ws,"exists"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(xe)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="EXISTS":(ws=t,t=o)):(ws=t,t=o),t}function Zu(){var t,e,n,s;return t=ws,"not"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(U)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="NOT":(ws=t,t=o)):(ws=t,t=o),t}function zu(){var t,e,n,s;return t=ws,"and"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(Ue)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="AND":(ws=t,t=o)):(ws=t,t=o),t}function Qu(){var t,e,n,s;return t=ws,"or"===r.substr(ws,2).toLowerCase()?(e=r.substr(ws,2),ws+=2):(e=o,0===As&&Rs(Me)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="OR":(ws=t,t=o)):(ws=t,t=o),t}function Ju(){var t,e,n,s;return t=ws,"case"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(je)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function ra(){var t,e,n,s;return t=ws,"end"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(We)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e=[e,n]:(ws=t,t=o)):(ws=t,t=o),t}function ta(){var t,e,n,s;return t=ws,"cast"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Xe)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="CAST":(ws=t,t=o)):(ws=t,t=o),t}function ea(){var t,e,n,s;return t=ws,"char"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Ve)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="CHAR":(ws=t,t=o)):(ws=t,t=o),t}function na(){var t,e,n,s;return t=ws,"varchar"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(qe)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="VARCHAR":(ws=t,t=o)):(ws=t,t=o),t}function sa(){var t,e,n,s;return t=ws,"numeric"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(Ke)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="NUMERIC":(ws=t,t=o)):(ws=t,t=o),t}function oa(){var t,e,n,s;return t=ws,"decimal"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(Ze)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="DECIMAL":(ws=t,t=o)):(ws=t,t=o),t}function ua(){var t,e,n,s;return t=ws,"unsigned"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(Qe)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="UNSIGNED":(ws=t,t=o)):(ws=t,t=o),t}function aa(){var t,e,n,s;return t=ws,"int"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(Je)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="INT":(ws=t,t=o)):(ws=t,t=o),t}function ia(){var t,e,n,s;return t=ws,"integer"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(tn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="INTEGER":(ws=t,t=o)):(ws=t,t=o),t}function la(){var t,e,n,s;return t=ws,"smallint"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(nn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="SMALLINT":(ws=t,t=o)):(ws=t,t=o),t}function ca(){var t,e,n,s;return t=ws,"tinyint"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(sn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="TINYINT":(ws=t,t=o)):(ws=t,t=o),t}function fa(){var t,e,n,s;return t=ws,"bigint"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(cn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="BIGINT":(ws=t,t=o)):(ws=t,t=o),t}function ba(){var t,e,n,s;return t=ws,"float"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(fn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="FLOAT":(ws=t,t=o)):(ws=t,t=o),t}function va(){var t,e,n,s;return t=ws,"double"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(bn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="DOUBLE":(ws=t,t=o)):(ws=t,t=o),t}function pa(){var t,e,n,s;return t=ws,"date"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(vn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="DATE":(ws=t,t=o)):(ws=t,t=o),t}function La(){var t,e,n,s;return t=ws,"datetime"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(pn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="DATETIME":(ws=t,t=o)):(ws=t,t=o),t}function Ca(){var t,e,n,s;return t=ws,"time"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(Ln)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="TIME":(ws=t,t=o)):(ws=t,t=o),t}function da(){var t,e,n,s;return t=ws,"timestamp"===r.substr(ws,9).toLowerCase()?(e=r.substr(ws,9),ws+=9):(e=o,0===As&&Rs(Cn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="TIMESTAMP":(ws=t,t=o)):(ws=t,t=o),t}function wa(){var t,e,n,s;return t=ws,"current_timestamp"===r.substr(ws,17).toLowerCase()?(e=r.substr(ws,17),ws+=17):(e=o,0===As&&Rs(Sn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="CURRENT_TIMESTAMP":(ws=t,t=o)):(ws=t,t=o),t}function ha(){var t;return(t=function(){var t;return"@@"===r.substr(ws,2)?(t="@@",ws+=2):(t=o,0===As&&Rs($n)),t}())===o&&(t=function(){var t;return 64===r.charCodeAt(ws)?(t="@",ws++):(t=o,0===As&&Rs(Dn)),t}())===o&&(t=function(){var t;return 36===r.charCodeAt(ws)?(t="$",ws++):(t=o,0===As&&Rs(Pn)),t}()),t}function ya(){var t;return 61===r.charCodeAt(ws)?(t="=",ws++):(t=o,0===As&&Rs(mr)),t}function Ea(){var t,e,n,s;return t=ws,"add"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(Hn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="ADD":(ws=t,t=o)):(ws=t,t=o),t}function Aa(){var t,e,n,s;return t=ws,"column"===r.substr(ws,6).toLowerCase()?(e=r.substr(ws,6),ws+=6):(e=o,0===As&&Rs(Yn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="COLUMN":(ws=t,t=o)):(ws=t,t=o),t}function ma(){var t,e,n,s;return t=ws,"index"===r.substr(ws,5).toLowerCase()?(e=r.substr(ws,5),ws+=5):(e=o,0===As&&Rs(Bn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="INDEX":(ws=t,t=o)):(ws=t,t=o),t}function Ta(){var t,e,n,s;return t=ws,"key"===r.substr(ws,3).toLowerCase()?(e=r.substr(ws,3),ws+=3):(e=o,0===As&&Rs(v)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="KEY":(ws=t,t=o)):(ws=t,t=o),t}function Ia(){var t,e,n,s;return t=ws,"comment"===r.substr(ws,7).toLowerCase()?(e=r.substr(ws,7),ws+=7):(e=o,0===As&&Rs(Vn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="COMMENT":(ws=t,t=o)):(ws=t,t=o),t}function Na(){var t,e,n,s;return t=ws,"constraint"===r.substr(ws,10).toLowerCase()?(e=r.substr(ws,10),ws+=10):(e=o,0===As&&Rs(qn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="CONSTRAINT":(ws=t,t=o)):(ws=t,t=o),t}function Ra(){var t;return 46===r.charCodeAt(ws)?(t=".",ws++):(t=o,0===As&&Rs(Tt)),t}function Sa(){var t;return 44===r.charCodeAt(ws)?(t=",",ws++):(t=o,0===As&&Rs(es)),t}function _a(){var t;return 42===r.charCodeAt(ws)?(t="*",ws++):(t=o,0===As&&Rs(Dr)),t}function ga(){var t;return 40===r.charCodeAt(ws)?(t="(",ws++):(t=o,0===As&&Rs(cr)),t}function Oa(){var t;return 41===r.charCodeAt(ws)?(t=")",ws++):(t=o,0===As&&Rs(fr)),t}function xa(){var t;return 59===r.charCodeAt(ws)?(t=";",ws++):(t=o,0===As&&Rs(os)),t}function Ua(){var t;return"->"===r.substr(ws,2)?(t="->",ws+=2):(t=o,0===As&&Rs(us)),t}function Ma(){var t;return"->>"===r.substr(ws,3)?(t="->>",ws+=3):(t=o,0===As&&Rs(as)),t}function ka(){var t;return(t=function(){var t;return"||"===r.substr(ws,2)?(t="||",ws+=2):(t=o,0===As&&Rs(is)),t}())===o&&(t=function(){var t;return"&&"===r.substr(ws,2)?(t="&&",ws+=2):(t=o,0===As&&Rs(ls)),t}()),t}function Da(){var r,t;for(r=[],(t=ja())===o&&(t=Pa());t!==o;)r.push(t),(t=ja())===o&&(t=Pa());return r}function $a(){var r,t;if(r=[],(t=ja())===o&&(t=Pa()),t!==o)for(;t!==o;)r.push(t),(t=ja())===o&&(t=Pa());else r=o;return r}function Pa(){var t;return(t=function(){var t,e,n,s,u,a;if(t=ws,"/*"===r.substr(ws,2)?(e="/*",ws+=2):(e=o,0===As&&Rs(cs)),e!==o){for(n=[],s=ws,u=ws,As++,"*/"===r.substr(ws,2)?(a="*/",ws+=2):(a=o,0===As&&Rs(fs)),As--,a===o?u=void 0:(ws=u,u=o),u!==o&&(a=Ga())!==o?s=u=[u,a]:(ws=s,s=o);s!==o;)n.push(s),s=ws,u=ws,As++,"*/"===r.substr(ws,2)?(a="*/",ws+=2):(a=o,0===As&&Rs(fs)),As--,a===o?u=void 0:(ws=u,u=o),u!==o&&(a=Ga())!==o?s=u=[u,a]:(ws=s,s=o);n!==o?("*/"===r.substr(ws,2)?(s="*/",ws+=2):(s=o,0===As&&Rs(fs)),s!==o?t=e=[e,n,s]:(ws=t,t=o)):(ws=t,t=o)}else ws=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=ws,"--"===r.substr(ws,2)?(e="--",ws+=2):(e=o,0===As&&Rs(bs)),e!==o){for(n=[],s=ws,u=ws,As++,a=Ha(),As--,a===o?u=void 0:(ws=u,u=o),u!==o&&(a=Ga())!==o?s=u=[u,a]:(ws=s,s=o);s!==o;)n.push(s),s=ws,u=ws,As++,a=Ha(),As--,a===o?u=void 0:(ws=u,u=o),u!==o&&(a=Ga())!==o?s=u=[u,a]:(ws=s,s=o);n!==o?t=e=[e,n]:(ws=t,t=o)}else ws=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=ws,35===r.charCodeAt(ws)?(e="#",ws++):(e=o,0===As&&Rs(vs)),e!==o){for(n=[],s=ws,u=ws,As++,a=Ha(),As--,a===o?u=void 0:(ws=u,u=o),u!==o&&(a=Ga())!==o?s=u=[u,a]:(ws=s,s=o);s!==o;)n.push(s),s=ws,u=ws,As++,a=Ha(),As--,a===o?u=void 0:(ws=u,u=o),u!==o&&(a=Ga())!==o?s=u=[u,a]:(ws=s,s=o);n!==o?t=e=[e,n]:(ws=t,t=o)}else ws=t,t=o;return t}()),t}function Fa(){var r,t,e,n,s,u,a;return r=ws,(t=Ia())!==o&&Da()!==o?((e=ya())===o&&(e=null),e!==o&&Da()!==o&&(n=iu())!==o?(u=e,a=n,r=t={type:(s=t).toLowerCase(),keyword:s.toLowerCase(),symbol:u,value:a}):(ws=r,r=o)):(ws=r,r=o),r}function Ga(){var t;return r.length>ws?(t=r.charAt(ws),ws++):(t=o,0===As&&Rs(ps)),t}function ja(){var t;return Ls.test(r.charAt(ws))?(t=r.charAt(ws),ws++):(t=o,0===As&&Rs(Cs)),t}function Ha(){var t,e;if((t=function(){var t,e;return t=ws,As++,r.length>ws?(e=r.charAt(ws),ws++):(e=o,0===As&&Rs(ps)),As--,e===o?t=void 0:(ws=t,t=o),t}())===o)if(t=[],At.test(r.charAt(ws))?(e=r.charAt(ws),ws++):(e=o,0===As&&Rs(mt)),e!==o)for(;e!==o;)t.push(e),At.test(r.charAt(ws))?(e=r.charAt(ws),ws++):(e=o,0===As&&Rs(mt));else t=o;return t}function Ya(){var t,e;return t=ws,ci=[],void 0!==o&&Da()!==o?((e=Ba())===o&&(e=function(){var t,e;return t=ws,function(){var t;return"return"===r.substr(ws,6).toLowerCase()?(t=r.substr(ws,6),ws+=6):(t=o,0===As&&Rs(Fn)),t}()!==o&&Da()!==o&&(e=Wa())!==o?t={type:"return",expr:e}:(ws=t,t=o),t}()),e!==o?t={stmt:e,vars:ci}:(ws=t,t=o)):(ws=t,t=o),t}function Ba(){var t,e,n,s;return t=ws,(e=Qa())===o&&(e=Ja()),e!==o&&Da()!==o?((n=function(){var t;return":="===r.substr(ws,2)?(t=":=",ws+=2):(t=o,0===As&&Rs(Gn)),t}())===o&&(n=ya()),n!==o&&Da()!==o&&(s=Wa())!==o?t=e={type:"assign",left:e,symbol:n,right:s}:(ws=t,t=o)):(ws=t,t=o),t}function Wa(){var t;return(t=Zs())===o&&(t=function(){var r,t,e,n,s;return r=ws,(t=Qa())!==o&&Da()!==o&&(e=vo())!==o&&Da()!==o&&(n=Qa())!==o&&Da()!==o&&(s=Lo())!==o?r=t={type:"join",ltable:t,rtable:n,op:e,on:s}:(ws=r,r=o),r}())===o&&(t=Xa())===o&&(t=function(){var t,e;return t=ws,function(){var t;return 91===r.charCodeAt(ws)?(t="[",ws++):(t=o,0===As&&Rs(ns)),t}()!==o&&Da()!==o&&(e=za())!==o&&Da()!==o&&function(){var t;return 93===r.charCodeAt(ws)?(t="]",ws++):(t=o,0===As&&Rs(ss)),t}()!==o?t={type:"array",value:e}:(ws=t,t=o),t}()),t}function Xa(){var r,t,e,n,s,u,a,i;if(r=ws,(t=Va())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Ho())!==o&&(a=Da())!==o&&(i=Va())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Ho())!==o&&(a=Da())!==o&&(i=Va())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=Ir(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function Va(){var r,t,e,n,s,u,a,i;if(r=ws,(t=qa())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Bo())!==o&&(a=Da())!==o&&(i=qa())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Bo())!==o&&(a=Da())!==o&&(i=qa())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=Ir(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function qa(){var r,t,e;return(r=uu())===o&&(r=Qa())===o&&(r=Za())===o&&(r=eu())===o&&(r=ws,ga()!==o&&Da()!==o&&(t=Xa())!==o&&Da()!==o&&Oa()!==o?((e=t).parentheses=!0,r=e):(ws=r,r=o)),r}function Ka(){var r,t,e,n,s,u,a;return r=ws,(t=Qo())!==o?(e=ws,(n=Da())!==o&&(s=Ra())!==o&&(u=Da())!==o&&(a=Qo())!==o?e=n=[n,s,u,a]:(ws=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){let e=r;return null!==t&&(e=`${r}.${t[3]}`),e}(t,e):(ws=r,r=o)):(ws=r,r=o),r}function Za(){var r,t,e;return r=ws,(t=Ka())!==o&&Da()!==o&&ga()!==o&&Da()!==o?((e=za())===o&&(e=null),e!==o&&Da()!==o&&Oa()!==o?r=t={type:"function",name:t,args:{type:"expr_list",value:e}}:(ws=r,r=o)):(ws=r,r=o),r===o&&(r=ws,(t=Ka())!==o&&(t=function(r){return{type:"function",name:r,args:null}}(t)),r=t),r}function za(){var r,t,e,n,s,u,a,i;if(r=ws,(t=qa())!==o){for(e=[],n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=qa())!==o?n=s=[s,u,a,i]:(ws=n,n=o);n!==o;)e.push(n),n=ws,(s=Da())!==o&&(u=Sa())!==o&&(a=Da())!==o&&(i=qa())!==o?n=s=[s,u,a,i]:(ws=n,n=o);e!==o?r=t=c(t,e):(ws=r,r=o)}else ws=r,r=o;return r}function Qa(){var r,t,e,n,s;return r=ws,(t=ha())!==o&&(e=Ja())!==o?(n=t,s=e,r=t={type:"var",...s,prefix:n}):(ws=r,r=o),r}function Ja(){var t,e,n,s,u;return t=ws,(e=Qo())!==o&&(n=function(){var t,e,n,s;for(t=[],e=ws,46===r.charCodeAt(ws)?(n=".",ws++):(n=o,0===As&&Rs(Tt)),n!==o&&(s=Qo())!==o?e=n=[n,s]:(ws=e,e=o);e!==o;)t.push(e),e=ws,46===r.charCodeAt(ws)?(n=".",ws++):(n=o,0===As&&Rs(Tt)),n!==o&&(s=Qo())!==o?e=n=[n,s]:(ws=e,e=o);return t!==o&&(t=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e][1]);return t}(t)),t}())!==o?(s=e,u=n,ci.push(s),t=e={type:"var",name:s,members:u,prefix:null}):(ws=t,t=o),t===o&&(t=ws,(e=bu())!==o&&(e={type:"var",name:e.value,members:[],quoted:null,prefix:null}),t=e),t}function ri(){var t;return(t=function(){var t,e,n,s;if(t=ws,(e=ea())===o&&(e=na()),e!==o)if(Da()!==o)if(ga()!==o)if(Da()!==o){if(n=[],It.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(Nt)),s!==o)for(;s!==o;)n.push(s),It.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(Nt));else n=o;n!==o&&(s=Da())!==o&&Oa()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(ws=t,t=o)}else ws=t,t=o;else ws=t,t=o;else ws=t,t=o;else ws=t,t=o;return t===o&&(t=ws,(e=ea())!==o&&(e=ds(e)),(t=e)===o&&(t=ws,(e=na())!==o&&(e=ds(e)),t=e)),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(t=ws,(e=sa())===o&&(e=oa())===o&&(e=aa())===o&&(e=ia())===o&&(e=la())===o&&(e=ca())===o&&(e=fa())===o&&(e=ba())===o&&(e=va()),e!==o)if((n=Da())!==o)if((s=ga())!==o)if((u=Da())!==o){if(a=[],It.test(r.charAt(ws))?(i=r.charAt(ws),ws++):(i=o,0===As&&Rs(Nt)),i!==o)for(;i!==o;)a.push(i),It.test(r.charAt(ws))?(i=r.charAt(ws),ws++):(i=o,0===As&&Rs(Nt));else a=o;if(a!==o)if((i=Da())!==o){if(l=ws,(c=Sa())!==o)if((f=Da())!==o){if(b=[],It.test(r.charAt(ws))?(v=r.charAt(ws),ws++):(v=o,0===As&&Rs(Nt)),v!==o)for(;v!==o;)b.push(v),It.test(r.charAt(ws))?(v=r.charAt(ws),ws++):(v=o,0===As&&Rs(Nt));else b=o;b!==o?l=c=[c,f,b]:(ws=l,l=o)}else ws=l,l=o;else ws=l,l=o;l===o&&(l=null),l!==o&&(c=Da())!==o&&(f=Oa())!==o&&(b=Da())!==o?((v=ti())===o&&(v=null),v!==o?(p=l,L=v,t=e={dataType:e,length:parseInt(a.join(""),10),scale:p&&parseInt(p[2].join(""),10),parentheses:!0,suffix:L}):(ws=t,t=o)):(ws=t,t=o)}else ws=t,t=o;else ws=t,t=o}else ws=t,t=o;else ws=t,t=o;else ws=t,t=o;else ws=t,t=o;if(t===o){if(t=ws,(e=sa())===o&&(e=oa())===o&&(e=aa())===o&&(e=ia())===o&&(e=la())===o&&(e=ca())===o&&(e=fa())===o&&(e=ba())===o&&(e=va()),e!==o){if(n=[],It.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(Nt)),s!==o)for(;s!==o;)n.push(s),It.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(Nt));else n=o;n!==o&&(s=Da())!==o?((u=ti())===o&&(u=null),u!==o?(e=function(r,t,e){return{dataType:r,length:parseInt(t.join(""),10),suffix:e}}(e,n,u),t=e):(ws=t,t=o)):(ws=t,t=o)}else ws=t,t=o;t===o&&(t=ws,(e=sa())===o&&(e=oa())===o&&(e=aa())===o&&(e=ia())===o&&(e=la())===o&&(e=ca())===o&&(e=fa())===o&&(e=ba())===o&&(e=va()),e!==o&&(n=Da())!==o?((s=ti())===o&&(s=null),s!==o&&(u=Da())!==o?(e=function(r,t){return{dataType:r,suffix:t}}(e,s),t=e):(ws=t,t=o)):(ws=t,t=o))}return t}())===o&&(t=function(){var t,e,n,s;if(t=ws,(e=pa())===o&&(e=La())===o&&(e=Ca())===o&&(e=da()),e!==o)if(Da()!==o)if(ga()!==o)if(Da()!==o){if(n=[],It.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(Nt)),s!==o)for(;s!==o;)n.push(s),It.test(r.charAt(ws))?(s=r.charAt(ws),ws++):(s=o,0===As&&Rs(Nt));else n=o;n!==o&&(s=Da())!==o&&Oa()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(ws=t,t=o)}else ws=t,t=o;else ws=t,t=o;else ws=t,t=o;else ws=t,t=o;return t===o&&(t=ws,(e=pa())===o&&(e=La())===o&&(e=Ca())===o&&(e=da()),e!==o&&(e=ds(e)),t=e),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ws,"json"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(en)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="JSON":(ws=t,t=o)):(ws=t,t=o),t}())!==o&&(t=ds(t)),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ws,"tinytext"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(on)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="TINYTEXT":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"text"===r.substr(ws,4).toLowerCase()?(e=r.substr(ws,4),ws+=4):(e=o,0===As&&Rs(un)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="TEXT":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"mediumtext"===r.substr(ws,10).toLowerCase()?(e=r.substr(ws,10),ws+=10):(e=o,0===As&&Rs(an)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="MEDIUMTEXT":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ws,"longtext"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(ln)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="LONGTEXT":(ws=t,t=o)):(ws=t,t=o),t}()),t!==o&&(t={dataType:t}),t}()),t}function ti(){var t,e,n;return t=ws,(e=ua())===o&&(e=null),e!==o&&Da()!==o?((n=function(){var t,e,n,s;return t=ws,"zerofill"===r.substr(ws,8).toLowerCase()?(e=r.substr(ws,8),ws+=8):(e=o,0===As&&Rs(rn)),e!==o?(n=ws,As++,s=Jo(),As--,s===o?n=void 0:(ws=n,n=o),n!==o?t=e="ZEROFILL":(ws=t,t=o)):(ws=t,t=o),t}())===o&&(n=null),n!==o?t=e=function(r,t){const e=[];return r&&e.push(r),t&&e.push(t),e}(e,n):(ws=t,t=o)):(ws=t,t=o),t}const ei={ALTER:!0,ALL:!0,ADD:!0,AND:!0,AS:!0,ASC:!0,BETWEEN:!0,BY:!0,CALL:!0,CASE:!0,CREATE:!0,CONTAINS:!0,CURRENT_DATE:!0,CURRENT_TIME:!0,CURRENT_TIMESTAMP:!0,CURRENT_USER:!0,DELETE:!0,DESC:!0,DISTINCT:!0,DROP:!0,ELSE:!0,END:!0,EXISTS:!0,EXPLAIN:!0,FALSE:!0,FROM:!0,FULL:!0,GROUP:!0,HAVING:!0,IN:!0,INNER:!0,INSERT:!0,INTO:!0,IS:!0,JOIN:!0,JSON:!0,KEY:!0,LEFT:!0,LIKE:!0,LIMIT:!0,LOW_PRIORITY:!0,NOT:!0,NULL:!0,ON:!0,OR:!0,ORDER:!0,OUTER:!0,RECURSIVE:!0,RENAME:!0,READ:!0,RIGHT:!0,SELECT:!0,SESSION_USER:!0,SET:!0,SHOW:!0,SYSTEM_USER:!0,TABLE:!0,THEN:!0,TRUE:!0,TRUNCATE:!0,TYPE:!0,UNION:!0,UPDATE:!0,USING:!0,VALUES:!0,WITH:!0,WHEN:!0,WHERE:!0,WRITE:!0,GLOBAL:!0,SESSION:!0,LOCAL:!0,PERSIST:!0,PERSIST_ONLY:!0};function ni(r,t){return{type:"unary_expr",operator:r,expr:t}}function si(r,t,e){return{type:"binary_expr",operator:r,left:t,right:e}}function oi(r){const t=n(Number.MAX_SAFE_INTEGER);return!(n(r)<t)}function ui(r,t,e=3){const n=[r];for(let r=0;r<t.length;r++)delete t[r][e].tableList,delete t[r][e].columnList,n.push(t[r][e]);return n}function ai(r,t){let e=r;for(let r=0;r<t.length;r++)e=si(t[r][1],e,t[r][3]);return e}function ii(r){return vi[r]||r||null}function li(r){const t=new Set;for(let e of r.keys()){const r=e.split("::");if(!r){t.add(e);break}r&&r[1]&&(r[1]=ii(r[1])),t.add(r.join("::"))}return Array.from(t)}let ci=[];const fi=new Set,bi=new Set,vi={};if((e=a())!==o&&ws===r.length)return e;throw e!==o&&ws<r.length&&Rs({type:"end"}),function(r,t,e){return new s(s.buildMessage(r,t),r,t,e)}(Es,ys<r.length?r.charAt(ys):null,ys<r.length?Ns(ys,ys+1):Ns(ys,ys))}}},function(r,t,e){var n=e(0);function s(r,t,e,n){this.message=r,this.expected=t,this.found=e,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,s)}!function(r,t){function e(){this.constructor=r}e.prototype=t.prototype,r.prototype=new e}(s,Error),s.buildMessage=function(r,t){var e={literal:function(r){return'"'+s(r.text)+'"'},class:function(r){var t,e="";for(t=0;t<r.parts.length;t++)e+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+e+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function n(r){return r.charCodeAt(0).toString(16).toUpperCase()}function s(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}function o(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}return"Expected "+function(r){var t,n,s,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(s=r[t],e[s.type](s));if(o.sort(),o.length>0){for(t=1,n=1;t<o.length;t++)o[t-1]!==o[t]&&(o[n]=o[t],n++);o.length=n}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+s(r)+'"':"end of input"}(t)+" found."},r.exports={SyntaxError:s,parse:function(r,t){t=void 0!==t?t:{};var e,o={},u={start:gs},a=gs,i=function(r,t){return ii(r,t,1)},l=Is("IF",!0),c=function(r,t){return ii(r,t)},f=Is("AUTO_INCREMENT",!0),b=Is("UNIQUE",!0),v=Is("KEY",!0),p=Is("PRIMARY",!0),L=Is("COLUMN_FORMAT",!0),C=Is("FIXED",!0),d=Is("DYNAMIC",!0),w=Is("DEFAULT",!0),h=Is("STORAGE",!0),y=Is("DISK",!0),E=Is("MEMORY",!0),A=Is("ALGORITHM",!0),m=Is("INSTANT",!0),T=Is("INPLACE",!0),I=Is("COPY",!0),N=Is("LOCK",!0),R=Is("NONE",!0),S=Is("SHARED",!0),_=Is("EXCLUSIVE",!0),g=Is("PRIMARY KEY",!0),O=Is("FOREIGN KEY",!0),x=Is("MATCH FULL",!0),U=Is("MATCH PARTIAL",!0),M=Is("MATCH SIMPLE",!0),k=Is("RESTRICT",!0),D=Is("CASCADE",!0),$=Is("SET NULL",!0),P=Is("NO ACTION",!0),F=Is("SET DEFAULT",!0),G=Is("CHARACTER",!0),j=Is("SET",!0),H=Is("CHARSET",!0),Y=Is("COLLATE",!0),B=Is("AVG_ROW_LENGTH",!0),W=Is("KEY_BLOCK_SIZE",!0),X=Is("MAX_ROWS",!0),V=Is("MIN_ROWS",!0),q=Is("STATS_SAMPLE_PAGES",!0),K=Is("CONNECTION",!0),Z=Is("COMPRESSION",!0),z=Is("'",!1),Q=Is("ZLIB",!0),J=Is("LZ4",!0),rr=Is("ENGINE",!0),tr=Is("READ",!0),er=Is("LOCAL",!0),nr=Is("LOW_PRIORITY",!0),sr=Is("WRITE",!0),or=Is("(",!1),ur=Is(")",!1),ar=Is(".",!1),ir=Is("BTREE",!0),lr=Is("HASH",!0),cr=Is("WITH",!0),fr=Is("PARSER",!0),br=Is("VISIBLE",!0),vr=Is("INVISIBLE",!0),pr=function(r,t){return t.unshift(r),t.forEach((r=>{const{table:t,as:e}=r;Li[t]=t,e&&(Li[e]=t),function(r){const t=fi(r);r.clear(),t.forEach((t=>r.add(t)))}(pi)})),t},Lr=Is("FOLLOWING",!0),Cr=Is("PRECEDING",!0),dr=Is("CURRENT",!0),wr=Is("ROW",!0),hr=Is("UNBOUNDED",!0),yr=Is("=",!1),Er=function(r,t){return li(r,t)},Ar=Is("!",!1),mr=function(r){return r[0]+" "+r[2]},Tr=Is(">=",!1),Ir=Is(">",!1),Nr=Is("<=",!1),Rr=Is("<>",!1),Sr=Is("<",!1),_r=Is("==",!1),gr=Is("!=",!1),Or=function(r,t){return{op:r,right:t}},xr=Is("+",!1),Ur=Is("-",!1),Mr=Is("*",!1),kr=Is("/",!1),Dr=Is("%",!1),$r=function(r){return!0===si[r.toUpperCase()]},Pr=Is('"',!1),Fr=/^[^"]/,Gr=Ns(['"'],!0,!1),jr=function(r){return r.join("")},Hr=/^[^']/,Yr=Ns(["'"],!0,!1),Br=Is("`",!1),Wr=/^[^`]/,Xr=Ns(["`"],!0,!1),Vr=function(r,t){return r+t.join("")},qr=/^[A-Za-z_]/,Kr=Ns([["A","Z"],["a","z"],"_"],!1,!1),Zr=/^[A-Za-z0-9_]/,zr=Ns([["A","Z"],["a","z"],["0","9"],"_"],!1,!1),Qr=/^[A-Za-z0-9_:]/,Jr=Ns([["A","Z"],["a","z"],["0","9"],"_",":"],!1,!1),rt=Is(":",!1),tt=Is("OVER",!0),et=Is("AT TIME ZONE",!0),nt=function(r,t){return{type:r.toLowerCase(),value:t[1].join("")}},st=/^[^"\\\0-\x1F\x7F]/,ot=Ns(['"',"\\",["\0",""],""],!0,!1),ut=/^[^'\\]/,at=Ns(["'","\\"],!0,!1),it=Is("\\'",!1),lt=Is('\\"',!1),ct=Is("\\\\",!1),ft=Is("\\/",!1),bt=Is("\\b",!1),vt=Is("\\f",!1),pt=Is("\\n",!1),Lt=Is("\\r",!1),Ct=Is("\\t",!1),dt=Is("\\u",!1),wt=Is("\\",!1),ht=Is("''",!1),yt=Is('""',!1),Et=Is("``",!1),At=/^[\n\r]/,mt=Ns(["\n","\r"],!1,!1),Tt=/^[0-9]/,It=Ns([["0","9"]],!1,!1),Nt=/^[0-9a-fA-F]/,Rt=Ns([["0","9"],["a","f"],["A","F"]],!1,!1),St=/^[eE]/,_t=Ns(["e","E"],!1,!1),gt=/^[+\-]/,Ot=Ns(["+","-"],!1,!1),xt=Is("NULL",!0),Ut=Is("NOT NULL",!0),Mt=Is("TRUE",!0),kt=Is("TO",!0),Dt=Is("FALSE",!0),$t=Is("DROP",!0),Pt=Is("USE",!0),Ft=Is("ALTER",!0),Gt=Is("SELECT",!0),jt=Is("UPDATE",!0),Ht=Is("CREATE",!0),Yt=Is("TEMPORARY",!0),Bt=Is("DELETE",!0),Wt=Is("INSERT",!0),Xt=Is("RECURSIVE",!1),Vt=Is("REPLACE",!0),qt=Is("RENAME",!0),Kt=Is("IGNORE",!0),Zt=Is("PARTITION",!0),zt=Is("INTO",!0),Qt=Is("OVERWRITE",!0),Jt=Is("FROM",!0),re=Is("UNLOCK",!0),te=Is("AS",!0),ee=Is("TABLE",!0),ne=Is("TABLES",!0),se=Is("DATABASE",!0),oe=Is("SCHEME",!0),ue=Is("ON",!0),ae=Is("LEFT",!0),ie=Is("RIGHT",!0),le=Is("FULL",!0),ce=Is("CROSS",!0),fe=Is("INNER",!0),be=Is("JOIN",!0),ve=Is("OUTER",!0),pe=Is("UNION",!0),Le=Is("VALUES",!0),Ce=Is("USING",!0),de=Is("WHERE",!0),we=Is("GROUP",!0),he=Is("BY",!0),ye=Is("ORDER",!0),Ee=Is("HAVING",!0),Ae=Is("LIMIT",!0),me=Is("OFFSET",!0),Te=Is("ASC",!0),Ie=Is("DESC",!0),Ne=Is("ALL",!0),Re=Is("DISTINCT",!0),Se=Is("BETWEEN",!0),_e=Is("IN",!0),ge=Is("IS",!0),Oe=Is("LIKE",!0),xe=Is("RLIKE",!0),Ue=Is("EXISTS",!0),Me=Is("NOT",!0),ke=Is("AND",!0),De=Is("OR",!0),$e=Is("COUNT",!0),Pe=Is("MAX",!0),Fe=Is("MIN",!0),Ge=Is("SUM",!0),je=Is("AVG",!0),He=Is("CALL",!0),Ye=Is("CASE",!0),Be=Is("WHEN",!0),We=Is("THEN",!0),Xe=Is("ELSE",!0),Ve=Is("END",!0),qe=Is("CAST",!0),Ke=Is("CHAR",!0),Ze=Is("VARCHAR",!0),ze=Is("NUMERIC",!0),Qe=Is("DECIMAL",!0),Je=Is("SIGNED",!0),rn=Is("STRING",!0),tn=Is("UNSIGNED",!0),en=Is("INT",!0),nn=Is("ZEROFILL",!0),sn=Is("INTEGER",!0),on=Is("JSON",!0),un=Is("SMALLINT",!0),an=Is("TINYINT",!0),ln=Is("TINYTEXT",!0),cn=Is("TEXT",!0),fn=Is("MEDIUMTEXT",!0),bn=Is("LONGTEXT",!0),vn=Is("BIGINT",!0),pn=Is("FLOAT",!0),Ln=Is("DOUBLE",!0),Cn=Is("DATE",!0),dn=Is("DATETIME",!0),wn=Is("ROWS",!0),hn=Is("TIME",!0),yn=Is("TIMESTAMP",!0),En=Is("TRUNCATE",!0),An=Is("USER",!0),mn=Is("CURRENT_DATE",!0),Tn=Is("INTERVAL",!0),In=Is("YEAR",!0),Nn=Is("MONTH",!0),Rn=Is("DAY",!0),Sn=Is("HOUR",!0),_n=Is("MINUTE",!0),gn=Is("SECOND",!0),On=Is("CURRENT_TIME",!0),xn=Is("CURRENT_TIMESTAMP",!0),Un=Is("CURRENT_USER",!0),Mn=Is("SESSION_USER",!0),kn=Is("SYSTEM_USER",!0),Dn=Is("GLOBAL",!0),$n=Is("SESSION",!0),Pn=Is("PERSIST",!0),Fn=Is("PERSIST_ONLY",!0),Gn=Is("@",!1),jn=Is("@@",!1),Hn=Is("$",!1),Yn=Is("return",!0),Bn=Is(":=",!1),Wn=Is("DUAL",!0),Xn=Is("ADD",!0),Vn=Is("COLUMN",!0),qn=Is("INDEX",!0),Kn=Is("FULLTEXT",!0),Zn=Is("SPATIAL",!0),zn=Is("COMMENT",!0),Qn=Is("CONSTRAINT",!0),Jn=Is("REFERENCES",!0),rs=Is("SQL_CALC_FOUND_ROWS",!0),ts=Is("SQL_CACHE",!0),es=Is("SQL_NO_CACHE",!0),ns=Is("SQL_SMALL_RESULT",!0),ss=Is("SQL_BIG_RESULT",!0),os=Is("SQL_BUFFER_RESULT",!0),us=Is(",",!1),as=Is("[",!1),is=Is("]",!1),ls=Is(";",!1),cs=Is("||",!1),fs=Is("&&",!1),bs=Is("/*",!1),vs=Is("*/",!1),ps=Is("--",!1),Ls=Is("#",!1),Cs={type:"any"},ds=/^[ \t\n\r]/,ws=Ns([" ","\t","\n","\r"],!1,!1),hs=function(r){return{dataType:r}},ys=0,Es=[{line:1,column:1}],As=0,ms=[],Ts=0;if("startRule"in t){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function Is(r,t){return{type:"literal",text:r,ignoreCase:t}}function Ns(r,t,e){return{type:"class",parts:r,inverted:t,ignoreCase:e}}function Rs(t){var e,n=Es[t];if(n)return n;for(e=t-1;!Es[e];)e--;for(n={line:(n=Es[e]).line,column:n.column};e<t;)10===r.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return Es[t]=n,n}function Ss(r,t){var e=Rs(r),n=Rs(t);return{start:{offset:r,line:e.line,column:e.column},end:{offset:t,line:n.line,column:n.column}}}function _s(r){ys<As||(ys>As&&(As=ys,ms=[]),ms.push(r))}function gs(){var r,t;return r=ys,Pa()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Os())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=Da())!==o&&(a=Pa())!==o&&(i=Os())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=Da())!==o&&(a=Pa())!==o&&(i=Os())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?(t=function(r,t){const e=r&&r.ast||r,n=t&&t.length&&t[0].length>=4?[e]:e;for(let r=0;r<t.length;r++)t[r][3]&&0!==t[r][3].length&&n.push(t[r][3]&&t[r][3].ast||t[r][3]);return{tableList:Array.from(vi),columnList:fi(pi),ast:n}}(t,e),r=t):(ys=r,r=o)}else ys=r,r=o;return r}())!==o?r=t:(ys=r,r=o),r}function Os(){var t;return(t=Us())===o&&(t=function(){var r,t,e,n,s;return r=ys,(t=Iu())!==o&&Pa()!==o&&(e=co())!==o&&Pa()!==o&&Uu()!==o&&Pa()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Ro())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Ro())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Ro())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=c(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())!==o&&Pa()!==o?((s=Co())===o&&(s=null),s!==o?(t=function(r,t,e){const n={};return r&&r.forEach((r=>{const{db:t,as:e,table:s,join:o}=r,u=o?"select":"update";t&&(n[s]=t),s&&vi.add(`${u}::${t}::${s}`)})),t&&t.forEach((r=>{if(r.table){const t=ci(r.table);vi.add(`update::${n[t]||null}::${t}`)}pi.add(`update::${r.table}::${r.column}`)})),{tableList:Array.from(vi),columnList:fi(pi),ast:{type:"update",table:r,set:t,where:e}}}(e,n,s),r=t):(ys=r,r=o)):(ys=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=ys,(t=go())!==o&&Pa()!==o&&(e=xu())!==o&&Pa()!==o?((n=ku())===o&&(n=null),n!==o&&Pa()!==o&&(s=po())!==o?((u=_o())===o&&(u=null),u!==o&&Pa()!==o&&xa()!==o&&Pa()!==o&&(a=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Jo())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Jo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Jo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=c(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())!==o&&Pa()!==o&&Ua()!==o&&Pa()!==o&&(i=So())!==o?(t=function(r,t,e,n,s,o,u){if(n&&(vi.add(`insert::${n.db}::${n.table}`),n.as=null),o){let r=n&&n.table||null;Array.isArray(u)&&u.forEach(((r,t)=>{if(r.value.length!=o.length)throw new Error("Error: column count doesn't match value count at row "+(t+1))})),o.forEach((t=>pi.add(`insert::${r}::${t}`)))}const a=e?" "+e.toLowerCase():"";return{tableList:Array.from(vi),columnList:fi(pi),ast:{type:r,prefix:`${t.toLowerCase()}${a}`,table:[n],columns:o,values:u,partition:s}}}(t,e,n,s,u,a,i),r=t):(ys=r,r=o)):(ys=r,r=o)):(ys=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=ys,(e=go())!==o&&Pa()!==o?((n=xu())===o&&(n=function(){var t,e,n,s;return t=ys,"overwrite"===r.substr(ys,9).toLowerCase()?(e=r.substr(ys,9),ys+=9):(e=o,0===Ts&&_s(Qt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="OVERWRITE":(ys=t,t=o)):(ys=t,t=o),t}()),n!==o&&Pa()!==o?((s=ku())===o&&(s=null),s!==o&&Pa()!==o&&(u=po())!==o&&Pa()!==o?((a=_o())===o&&(a=null),a!==o&&Pa()!==o&&(i=So())!==o?(e=function(r,t,e,n,s,o){n&&(vi.add(`insert::${n.db}::${n.table}`),pi.add(`insert::${n.table}::(.*)`),n.as=null);const u=e?" "+e.toLowerCase():"";return{tableList:Array.from(vi),columnList:fi(pi),ast:{type:r,prefix:`${t.toLowerCase()}${u}`,table:[n],columns:null,values:o,partition:s}}}(e,n,s,u,a,i),t=e):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s;return r=ys,(t=Su())!==o&&Pa()!==o?((e=co())===o&&(e=null),e!==o&&Pa()!==o&&(n=oo())!==o&&Pa()!==o?((s=Co())===o&&(s=null),s!==o?(t=function(r,t,e){if(t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"delete";n&&vi.add(`${o}::${t}::${n}`),s||pi.add(`delete::${n}::(.*)`)})),null===r&&1===t.length){const e=t[0];r=[{db:e.db,table:e.table,as:e.as,addition:!0}]}return{tableList:Array.from(vi),columnList:fi(pi),ast:{type:"delete",table:r,from:t,where:e}}}(e,n,s),r=t):(ys=r,r=o)):(ys=r,r=o)):(ys=r,r=o),r}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s,u,a,l,c;return r=ys,(t=Tu())!==o&&Pa()!==o&&(e=ku())!==o&&Pa()!==o&&(n=co())!==o?(a=t,l=e,(c=n)&&c.forEach((r=>vi.add(`${a}::${r.db}::${r.table}`))),r=t={tableList:Array.from(vi),columnList:fi(pi),ast:{type:a.toLowerCase(),keyword:l.toLowerCase(),name:c}}):(ys=r,r=o),r===o&&(r=ys,(t=Tu())!==o&&Pa()!==o&&(e=Na())!==o&&Pa()!==o&&(n=Ko())!==o&&Pa()!==o&&$u()!==o&&Pa()!==o&&(s=po())!==o&&Pa()!==o?((u=function(){var r,t,e,n,s,u;if(r=ys,(t=Fs())===o&&(t=Gs()),t!==o){for(e=[],n=ys,(s=Pa())!==o?((u=Fs())===o&&(u=Gs()),u!==o?n=s=[s,u]:(ys=n,n=o)):(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o?((u=Fs())===o&&(u=Gs()),u!==o?n=s=[s,u]:(ys=n,n=o)):(ys=n,n=o);e!==o?r=t=i(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())===o&&(u=null),u!==o&&Pa()!==o?(t=function(r,t,e,n,s){return{tableList:Array.from(vi),columnList:fi(pi),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),name:e,table:n,options:s}}}(t,e,n,s,u),r=t):(ys=r,r=o)):(ys=r,r=o)),r}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s,u,a,i,l,f,b,v,p,L,C,d,w,h,y,E;return t=ys,(e=Nu())!==o&&Pa()!==o?((n=Ru())===o&&(n=null),n!==o&&Pa()!==o&&ku()!==o&&Pa()!==o?((s=Ms())===o&&(s=null),s!==o&&Pa()!==o&&(u=co())!==o&&Pa()!==o&&(a=function(){var r,t,e,n,s,u,a,i;if(r=ys,xa()!==o)if(Pa()!==o)if((t=ks())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=ks())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=ks())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o&&(n=Pa())!==o&&(s=Ua())!==o?r=c(t,e):(ys=r,r=o)}else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;return r}())!==o&&Pa()!==o?((i=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Vs())!==o){for(e=[],n=ys,(s=Pa())!==o?((u=ga())===o&&(u=null),u!==o&&(a=Pa())!==o&&(i=Vs())!==o?n=s=[s,u,a,i]:(ys=n,n=o)):(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o?((u=ga())===o&&(u=null),u!==o&&(a=Pa())!==o&&(i=Vs())!==o?n=s=[s,u,a,i]:(ys=n,n=o)):(ys=n,n=o);e!==o?r=t=ii(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())===o&&(i=null),i!==o&&Pa()!==o?((l=function(){var t,e,n,s;return t=ys,"ignore"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Kt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())===o&&(l=_u()),l===o&&(l=null),l!==o&&Pa()!==o?((f=Mu())===o&&(f=null),f!==o&&Pa()!==o?((b=Us())===o&&(b=null),b!==o?(v=e,p=n,L=s,d=a,w=i,h=l,y=f,E=b,(C=u)&&C.forEach((r=>vi.add(`create::${r.db}::${r.table}`))),t=e={tableList:Array.from(vi),columnList:fi(pi),ast:{type:v[0].toLowerCase(),keyword:"table",temporary:p&&p[0].toLowerCase(),if_not_exists:L,table:C,ignore_replace:h&&h[0].toLowerCase(),as:y&&y[0].toLowerCase(),query_expr:E&&E.ast,create_definitions:d,table_options:w}}):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,(e=Nu())!==o&&Pa()!==o?((n=Ru())===o&&(n=null),n!==o&&Pa()!==o&&ku()!==o&&Pa()!==o?((s=Ms())===o&&(s=null),s!==o&&Pa()!==o&&(u=co())!==o&&Pa()!==o&&(a=function r(){var t,e,n;return(t=function(){var r,t;return r=ys,Ku()!==o&&Pa()!==o&&(t=co())!==o?r={type:"like",table:t}:(ys=r,r=o),r}())===o&&(t=ys,xa()!==o&&Pa()!==o&&(e=r())!==o&&Pa()!==o&&Ua()!==o?((n=e).parentheses=!0,t=n):(ys=t,t=o)),t}())!==o?(e=function(r,t,e,n,s){return n&&n.forEach((r=>vi.add(`create::${r.db}::${r.table}`))),{tableList:Array.from(vi),columnList:fi(pi),ast:{type:r[0].toLowerCase(),keyword:"table",temporary:t&&t[0].toLowerCase(),if_not_exists:e,table:n,like:s}}}(e,n,s,u,a),t=e):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)),t}())===o&&(t=function(){var t,e,n,s,u,a,l,c,f,b;return t=ys,(e=Nu())!==o&&Pa()!==o?((n=function(){var t,e,n,s;return t=ys,"database"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(se)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="DATABASE":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=ys,"scheme"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(oe)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="SCHEME":(ys=t,t=o)):(ys=t,t=o),t}()),n!==o&&Pa()!==o?((s=Ms())===o&&(s=null),s!==o&&Pa()!==o&&(u=tu())!==o&&Pa()!==o?((a=function(){var r,t,e,n,s,u;if(r=ys,(t=Xs())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=Xs())!==o?n=s=[s,u]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=Xs())!==o?n=s=[s,u]:(ys=n,n=o);e!==o?r=t=i(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())===o&&(a=null),a!==o?(l=e,c=s,f=u,b=a,t=e={tableList:Array.from(vi),columnList:fi(pi),ast:{type:l[0].toLowerCase(),keyword:"database",if_not_exists:c,database:f,create_definitions:b}}):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=ys,(e=function(){var t,e,n,s;return t=ys,"truncate"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(En)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="TRUNCATE":(ys=t,t=o)):(ys=t,t=o),t}())!==o&&Pa()!==o?((n=ku())===o&&(n=null),n!==o&&Pa()!==o&&(s=co())!==o?(u=e,a=n,(i=s)&&i.forEach((r=>vi.add(`${u}::${r.db}::${r.table}`))),t=e={tableList:Array.from(vi),columnList:fi(pi),ast:{type:u.toLowerCase(),keyword:a&&a.toLowerCase()||"table",name:i}}):(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=ys,gu()!==o&&Pa()!==o&&ku()!==o&&Pa()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=uo())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=uo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=uo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=c(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())!==o?((e=t).forEach((r=>r.forEach((r=>r.table&&vi.add(`rename::${r.db}::${r.table}`))))),r={tableList:Array.from(vi),columnList:fi(pi),ast:{type:"rename",table:e}}):(ys=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=ys,function(){var t,e,n,s;return t=ys,"call"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(He)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="CALL":(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(e=Qa())!==o?(n=e,t={tableList:Array.from(vi),columnList:fi(pi),ast:{type:"call",expr:n}}):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ys,function(){var t,e,n,s;return t=ys,"use"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(Pt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(e=Zo())!==o?(n=e,vi.add(`use::${n}::null`),t={tableList:Array.from(vi),columnList:fi(pi),ast:{type:"use",db:n}}):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=ys,function(){var t,e,n,s;return t=ys,"alter"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(Ft)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&ku()!==o&&Pa()!==o&&(e=co())!==o&&Pa()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Ps())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Ps())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Ps())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=c(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())!==o?(u=n,(s=e)&&s.length>0&&s.forEach((r=>vi.add(`alter::${r.db}::${r.table}`))),t={tableList:Array.from(vi),columnList:fi(pi),ast:{type:"alter",table:s,expr:u}}):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=ys,Uu()!==o&&Pa()!==o?((e=function(){var t,e,n,s;return t=ys,"global"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Dn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="GLOBAL":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ys,"session"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s($n)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="SESSION":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ys,"local"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(er)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="LOCAL":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ys,"persist"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(Pn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="PERSIST":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ys,"persist_only"===r.substr(ys,12).toLowerCase()?(e=r.substr(ys,12),ys+=12):(e=o,0===Ts&&_s(Fn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="PERSIST_ONLY":(ys=t,t=o)):(ys=t,t=o),t}()),e===o&&(e=null),e!==o&&Pa()!==o&&(n=Xa())!==o?(s=e,(u=n).keyword=s,t={tableList:Array.from(vi),columnList:fi(pi),ast:{type:"set",expr:u}}):(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ys,function(){var t,e,n,s;return t=ys,"lock"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(N)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&Du()!==o&&Pa()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=qs())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=qs())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=qs())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=ii(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())!==o?(n=e,t={tableList:Array.from(vi),columnList:fi(pi),ast:{type:"lock",keyword:"tables",tables:n}}):(ys=t,t=o),t}())===o&&(t=function(){var t;return t=ys,function(){var t,e,n,s;return t=ys,"unlock"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(re)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&Du()!==o?t={tableList:Array.from(vi),columnList:fi(pi),ast:{type:"unlock",keyword:"tables"}}:(ys=t,t=o),t}()),t}())===o&&(t=function(){var r,t;for(r=[],t=Wa();t!==o;)r.push(t),t=Wa();return r}()),t}function xs(){var t,e,n;return t=ys,function(){var t,e,n,s;return t=ys,"union"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(pe)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o?((e=Bu())===o&&(e=Wu()),e===o&&(e=null),e!==o?t=(n=e)?"union "+n.toLowerCase():"union":(ys=t,t=o)):(ys=t,t=o),t}function Us(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Ks())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=xs())!==o&&(a=Pa())!==o&&(i=Ks())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=xs())!==o&&(a=Pa())!==o&&(i=Ks())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o&&(n=Pa())!==o?((s=Ao())===o&&(s=null),s!==o&&(u=Pa())!==o?((a=No())===o&&(a=null),a!==o?r=t=function(r,t,e,n){t.forEach((r=>r.slice(1,1)));let s=r;for(let r=0;r<t.length;r++)s._next=t[r][3],s.set_op=t[r][1],s=s._next;return e&&(r._orderby=e),n&&(r._limit=n),{tableList:Array.from(vi),columnList:fi(pi),ast:r}}(t,e,s,a):(ys=r,r=o)):(ys=r,r=o)):(ys=r,r=o)}else ys=r,r=o;return r}function Ms(){var t,e;return t=ys,"if"===r.substr(ys,2).toLowerCase()?(e=r.substr(ys,2),ys+=2):(e=o,0===Ts&&_s(l)),e!==o&&Pa()!==o&&Qu()!==o&&Pa()!==o&&zu()!==o?t=e="IF NOT EXISTS":(ys=t,t=o),t}function ks(){var t;return(t=$s())===o&&(t=js())===o&&(t=Hs())===o&&(t=function(){var t;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=ys,(e=Ys())===o&&(e=null),e!==o&&Pa()!==o?("primary key"===r.substr(ys,11).toLowerCase()?(n=r.substr(ys,11),ys+=11):(n=o,0===Ts&&_s(g)),n!==o&&Pa()!==o?((s=ao())===o&&(s=null),s!==o&&Pa()!==o&&(u=Qs())!==o&&Pa()!==o?((a=io())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l.toLowerCase(),keyword:i&&i.keyword,index_type:c,resource:"constraint",index_options:b}):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,v,p,L,C,d;return t=ys,(e=Ys())===o&&(e=null),e!==o&&Pa()!==o&&(n=function(){var t,e,n,s;return t=ys,"unique"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(b)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="UNIQUE":(ys=t,t=o)):(ys=t,t=o),t}())!==o&&Pa()!==o?((s=Na())===o&&(s=Ra()),s===o&&(s=null),s!==o&&Pa()!==o?((u=Jo())===o&&(u=null),u!==o&&Pa()!==o?((a=ao())===o&&(a=null),a!==o&&Pa()!==o&&(i=Qs())!==o&&Pa()!==o?((l=io())===o&&(l=null),l!==o?(f=n,v=s,p=u,L=a,C=i,d=l,t=e={constraint:(c=e)&&c.constraint,definition:C,constraint_type:v&&`${f.toLowerCase()} ${v.toLowerCase()}`||f.toLowerCase(),keyword:c&&c.keyword,index_type:L,index:p,resource:"constraint",index_options:d}):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=ys,(e=Ys())===o&&(e=null),e!==o&&Pa()!==o?("foreign key"===r.substr(ys,11).toLowerCase()?(n=r.substr(ys,11),ys+=11):(n=o,0===Ts&&_s(O)),n!==o&&Pa()!==o?((s=Jo())===o&&(s=null),s!==o&&Pa()!==o&&(u=Qs())!==o&&Pa()!==o?((a=Bs())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l,keyword:i&&i.keyword,index:c,resource:"constraint",reference_definition:b}):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}()),t}()),t}function Ds(){var t,e,n,s;return t=ys,(e=function(){var t;return(t=function(){var t,e,n,s;return t=ys,"not null"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(Ut)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(t={type:"not null",value:"not null"}),t}())===o&&(e=cu()),e!==o&&((s=e)&&!s.value&&(s.value="null"),e={nullable:s}),(t=e)===o&&(t=ys,(e=function(){var r,t;return r=ys,Au()!==o&&Pa()!==o?((t=lu())===o&&(t=Do()),t!==o?r={type:"default",value:t}:(ys=r,r=o)):(ys=r,r=o),r}())!==o&&(e={default_val:e}),(t=e)===o&&(t=ys,"auto_increment"===r.substr(ys,14).toLowerCase()?(e=r.substr(ys,14),ys+=14):(e=o,0===Ts&&_s(f)),e!==o&&(e={auto_increment:e.toLowerCase()}),(t=e)===o&&(t=ys,"unique"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(b)),e!==o&&Pa()!==o?("key"===r.substr(ys,3).toLowerCase()?(n=r.substr(ys,3),ys+=3):(n=o,0===Ts&&_s(v)),n===o&&(n=null),n!==o?t=e=function(r){const t=["unique"];return r&&t.push(r),{unique:t.join(" ").toLowerCase("")}}(n):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,"primary"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(p)),e===o&&(e=null),e!==o&&Pa()!==o?("key"===r.substr(ys,3).toLowerCase()?(n=r.substr(ys,3),ys+=3):(n=o,0===Ts&&_s(v)),n!==o?t=e=function(r){const t=[];return r&&t.push("primary"),t.push("key"),{primary_key:t.join(" ").toLowerCase("")}}(e):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,(e=ja())!==o&&(e={comment:e}),(t=e)===o&&(t=ys,(e=function(){var t,e;return t=ys,function(){var t,e,n,s;return t=ys,"collate"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(Y)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="COLLATE":(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(e=tu())!==o?t={type:"collate",value:e}:(ys=t,t=o),t}())!==o&&(e={collate:e}),(t=e)===o&&(t=ys,(e=function(){var t,e,n;return t=ys,"column_format"===r.substr(ys,13).toLowerCase()?(e=r.substr(ys,13),ys+=13):(e=o,0===Ts&&_s(L)),e!==o&&Pa()!==o?("fixed"===r.substr(ys,5).toLowerCase()?(n=r.substr(ys,5),ys+=5):(n=o,0===Ts&&_s(C)),n===o&&("dynamic"===r.substr(ys,7).toLowerCase()?(n=r.substr(ys,7),ys+=7):(n=o,0===Ts&&_s(d)),n===o&&("default"===r.substr(ys,7).toLowerCase()?(n=r.substr(ys,7),ys+=7):(n=o,0===Ts&&_s(w)))),n!==o?t=e={type:"column_format",value:n.toLowerCase()}:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(e={column_format:e}),(t=e)===o&&(t=ys,(e=function(){var t,e,n;return t=ys,"storage"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(h)),e!==o&&Pa()!==o?("disk"===r.substr(ys,4).toLowerCase()?(n=r.substr(ys,4),ys+=4):(n=o,0===Ts&&_s(y)),n===o&&("memory"===r.substr(ys,6).toLowerCase()?(n=r.substr(ys,6),ys+=6):(n=o,0===Ts&&_s(E))),n!==o?t=e={type:"storage",value:n.toLowerCase()}:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(e={storage:e}),(t=e)===o&&(t=ys,(e=Bs())!==o&&(e={reference_definition:e}),t=e))))))))),t}function $s(){var r,t,e,n,s,u,a;return r=ys,(t=Ko())!==o&&Pa()!==o&&(e=ei())!==o&&Pa()!==o?((n=function(){var r,t,e,n,s,u;if(r=ys,(t=Ds())!==o)if(Pa()!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=Ds())!==o?n=s=[s,u]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=Ds())!==o?n=s=[s,u]:(ys=n,n=o);e!==o?r=t=function(r,t){let e=r;for(let r=0;r<t.length;r++)e={...e,...t[r][1]};return e}(t,e):(ys=r,r=o)}else ys=r,r=o;else ys=r,r=o;return r}())===o&&(n=null),n!==o?(s=t,u=e,a=n,pi.add(`create::${s.table}::${s.column}`),r=t={column:s,definition:u,resource:"column",...a||{}}):(ys=r,r=o)):(ys=r,r=o),r}function Ps(){var r;return(r=function(){var r,t,e,n,s;return r=ys,Ta()!==o&&Pa()!==o?((t=Ia())===o&&(t=null),t!==o&&Pa()!==o&&(e=$s())!==o?(n=t,s=e,r={action:"add",...s,keyword:n,resource:"column",type:"alter"}):(ys=r,r=o)):(ys=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=ys,Tu()!==o&&Pa()!==o?((t=Ia())===o&&(t=null),t!==o&&Pa()!==o&&(e=Ko())!==o?r={action:"drop",column:e,keyword:t,resource:"column",type:"alter"}:(ys=r,r=o)):(ys=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=ys,Ta()!==o&&Pa()!==o&&(t=js())!==o?(e=t,r={action:"add",type:"alter",...e}):(ys=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=ys,Ta()!==o&&Pa()!==o&&(t=Hs())!==o?(e=t,r={action:"add",type:"alter",...e}):(ys=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s;return r=ys,gu()!==o&&Pa()!==o?((t=mu())===o&&(t=Mu()),t===o&&(t=null),t!==o&&Pa()!==o&&(e=Zo())!==o?(s=e,r={action:"rename",type:"alter",resource:"table",keyword:(n=t)&&n[0].toLowerCase(),table:s}):(ys=r,r=o)):(ys=r,r=o),r}())===o&&(r=Fs())===o&&(r=Gs()),r}function Fs(){var t,e,n,s;return t=ys,"algorithm"===r.substr(ys,9).toLowerCase()?(e=r.substr(ys,9),ys+=9):(e=o,0===Ts&&_s(A)),e!==o&&Pa()!==o?((n=ma())===o&&(n=null),n!==o&&Pa()!==o?("default"===r.substr(ys,7).toLowerCase()?(s=r.substr(ys,7),ys+=7):(s=o,0===Ts&&_s(w)),s===o&&("instant"===r.substr(ys,7).toLowerCase()?(s=r.substr(ys,7),ys+=7):(s=o,0===Ts&&_s(m)),s===o&&("inplace"===r.substr(ys,7).toLowerCase()?(s=r.substr(ys,7),ys+=7):(s=o,0===Ts&&_s(T)),s===o&&("copy"===r.substr(ys,4).toLowerCase()?(s=r.substr(ys,4),ys+=4):(s=o,0===Ts&&_s(I))))),s!==o?t=e={type:"alter",keyword:"algorithm",resource:"algorithm",symbol:n,algorithm:s}:(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}function Gs(){var t,e,n,s;return t=ys,"lock"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(N)),e!==o&&Pa()!==o?((n=ma())===o&&(n=null),n!==o&&Pa()!==o?("default"===r.substr(ys,7).toLowerCase()?(s=r.substr(ys,7),ys+=7):(s=o,0===Ts&&_s(w)),s===o&&("none"===r.substr(ys,4).toLowerCase()?(s=r.substr(ys,4),ys+=4):(s=o,0===Ts&&_s(R)),s===o&&("shared"===r.substr(ys,6).toLowerCase()?(s=r.substr(ys,6),ys+=6):(s=o,0===Ts&&_s(S)),s===o&&("exclusive"===r.substr(ys,9).toLowerCase()?(s=r.substr(ys,9),ys+=9):(s=o,0===Ts&&_s(_))))),s!==o?t=e={type:"alter",keyword:"lock",resource:"lock",symbol:n,lock:s}:(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}function js(){var r,t,e,n,s,u,a,i;return r=ys,(t=Na())===o&&(t=Ra()),t!==o&&Pa()!==o?((e=Jo())===o&&(e=null),e!==o&&Pa()!==o?((n=ao())===o&&(n=null),n!==o&&Pa()!==o&&(s=Qs())!==o&&Pa()!==o?((u=io())===o&&(u=null),u!==o&&Pa()!==o?(a=n,i=u,r=t={index:e,definition:s,keyword:t.toLowerCase(),index_type:a,resource:"index",index_options:i}):(ys=r,r=o)):(ys=r,r=o)):(ys=r,r=o)):(ys=r,r=o),r}function Hs(){var t,e,n,s,u,a,i,l,c;return t=ys,(e=function(){var t,e,n,s;return t=ys,"fulltext"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(Kn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="FULLTEXT":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ys,"spatial"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(Zn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="SPATIAL":(ys=t,t=o)):(ys=t,t=o),t}()),e!==o&&Pa()!==o?((n=Na())===o&&(n=Ra()),n===o&&(n=null),n!==o&&Pa()!==o?((s=Jo())===o&&(s=null),s!==o&&Pa()!==o&&(u=Qs())!==o&&Pa()!==o?((a=io())===o&&(a=null),a!==o&&Pa()!==o?(i=e,c=a,t=e={index:s,definition:u,keyword:(l=n)&&`${i.toLowerCase()} ${l.toLowerCase()}`||i.toLowerCase(),index_options:c,resource:"index"}):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}function Ys(){var t,e,n,s;return t=ys,(e=function(){var t,e,n,s;return t=ys,"constraint"===r.substr(ys,10).toLowerCase()?(e=r.substr(ys,10),ys+=10):(e=o,0===Ts&&_s(Qn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="CONSTRAINT":(ys=t,t=o)):(ys=t,t=o),t}())!==o&&Pa()!==o?((n=Zo())===o&&(n=null),n!==o?(s=n,t=e={keyword:e.toLowerCase(),constraint:s}):(ys=t,t=o)):(ys=t,t=o),t}function Bs(){var t,e,n,s,u,a,i,l,c,f;return t=ys,(e=function(){var t,e,n,s;return t=ys,"references"===r.substr(ys,10).toLowerCase()?(e=r.substr(ys,10),ys+=10):(e=o,0===Ts&&_s(Jn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="REFERENCES":(ys=t,t=o)):(ys=t,t=o),t}())!==o&&Pa()!==o&&(n=co())!==o&&Pa()!==o&&(s=Qs())!==o&&Pa()!==o?("match full"===r.substr(ys,10).toLowerCase()?(u=r.substr(ys,10),ys+=10):(u=o,0===Ts&&_s(x)),u===o&&("match partial"===r.substr(ys,13).toLowerCase()?(u=r.substr(ys,13),ys+=13):(u=o,0===Ts&&_s(U)),u===o&&("match simple"===r.substr(ys,12).toLowerCase()?(u=r.substr(ys,12),ys+=12):(u=o,0===Ts&&_s(M)))),u===o&&(u=null),u!==o&&Pa()!==o?((a=Ws())===o&&(a=null),a!==o&&Pa()!==o?((i=Ws())===o&&(i=null),i!==o?(l=u,c=a,f=i,t=e={definition:s,table:n,keyword:e.toLowerCase(),match:l&&l.toLowerCase(),on_action:[c,f].filter((r=>r))}):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,(e=Ws())!==o&&(e={on_action:[e]}),t=e),t}function Ws(){var t,e,n,s;return t=ys,$u()!==o&&Pa()!==o?((e=Su())===o&&(e=Iu()),e!==o&&Pa()!==o&&(n=function(){var t,e,n;return t=ys,(e=Ea())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o?((n=xo())===o&&(n=null),n!==o&&Pa()!==o&&Ua()!==o?t=e={type:"function",name:e,args:n}:(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,"restrict"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(k)),e===o&&("cascade"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(D)),e===o&&("set null"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s($)),e===o&&("no action"===r.substr(ys,9).toLowerCase()?(e=r.substr(ys,9),ys+=9):(e=o,0===Ts&&_s(P)),e===o&&("set default"===r.substr(ys,11).toLowerCase()?(e=r.substr(ys,11),ys+=11):(e=o,0===Ts&&_s(F)),e===o&&(e=Ea()))))),e!==o&&(e={type:"origin",value:e.toLowerCase()}),t=e),t}())!==o?(s=n,t={type:"on "+e[0].toLowerCase(),value:s}):(ys=t,t=o)):(ys=t,t=o),t}function Xs(){var t,e,n,s,u,a,i,l,c;return t=ys,(e=Au())===o&&(e=null),e!==o&&Pa()!==o?((n=function(){var t,e,n;return t=ys,"character"===r.substr(ys,9).toLowerCase()?(e=r.substr(ys,9),ys+=9):(e=o,0===Ts&&_s(G)),e!==o&&Pa()!==o?("set"===r.substr(ys,3).toLowerCase()?(n=r.substr(ys,3),ys+=3):(n=o,0===Ts&&_s(j)),n!==o?t=e="CHARACTER SET":(ys=t,t=o)):(ys=t,t=o),t}())===o&&("charset"===r.substr(ys,7).toLowerCase()?(n=r.substr(ys,7),ys+=7):(n=o,0===Ts&&_s(H)),n===o&&("collate"===r.substr(ys,7).toLowerCase()?(n=r.substr(ys,7),ys+=7):(n=o,0===Ts&&_s(Y)))),n!==o&&Pa()!==o?((s=ma())===o&&(s=null),s!==o&&Pa()!==o&&(u=tu())!==o?(i=n,l=s,c=u,t=e={keyword:(a=e)&&`${a[0].toLowerCase()} ${i.toLowerCase()}`||i.toLowerCase(),symbol:l,value:c}):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}function Vs(){var t,e,n,s,u,a,i,l,c;return t=ys,"auto_increment"===r.substr(ys,14).toLowerCase()?(e=r.substr(ys,14),ys+=14):(e=o,0===Ts&&_s(f)),e===o&&("avg_row_length"===r.substr(ys,14).toLowerCase()?(e=r.substr(ys,14),ys+=14):(e=o,0===Ts&&_s(B)),e===o&&("key_block_size"===r.substr(ys,14).toLowerCase()?(e=r.substr(ys,14),ys+=14):(e=o,0===Ts&&_s(W)),e===o&&("max_rows"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(X)),e===o&&("min_rows"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(V)),e===o&&("stats_sample_pages"===r.substr(ys,18).toLowerCase()?(e=r.substr(ys,18),ys+=18):(e=o,0===Ts&&_s(q))))))),e!==o&&Pa()!==o?((n=ma())===o&&(n=null),n!==o&&Pa()!==o&&(s=Lu())!==o?(l=n,c=s,t=e={keyword:e.toLowerCase(),symbol:l,value:c.value}):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=Xs())===o&&(t=ys,(e=Sa())===o&&("connection"===r.substr(ys,10).toLowerCase()?(e=r.substr(ys,10),ys+=10):(e=o,0===Ts&&_s(K))),e!==o&&Pa()!==o?((n=ma())===o&&(n=null),n!==o&&Pa()!==o&&(s=fu())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:`'${e.value}'`}}(e,n,s):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,"compression"===r.substr(ys,11).toLowerCase()?(e=r.substr(ys,11),ys+=11):(e=o,0===Ts&&_s(Z)),e!==o&&Pa()!==o?((n=ma())===o&&(n=null),n!==o&&Pa()!==o?(s=ys,39===r.charCodeAt(ys)?(u="'",ys++):(u=o,0===Ts&&_s(z)),u!==o?("zlib"===r.substr(ys,4).toLowerCase()?(a=r.substr(ys,4),ys+=4):(a=o,0===Ts&&_s(Q)),a===o&&("lz4"===r.substr(ys,3).toLowerCase()?(a=r.substr(ys,3),ys+=3):(a=o,0===Ts&&_s(J)),a===o&&("none"===r.substr(ys,4).toLowerCase()?(a=r.substr(ys,4),ys+=4):(a=o,0===Ts&&_s(R)))),a!==o?(39===r.charCodeAt(ys)?(i="'",ys++):(i=o,0===Ts&&_s(z)),i!==o?s=u=[u,a,i]:(ys=s,s=o)):(ys=s,s=o)):(ys=s,s=o),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.join("").toUpperCase()}}(e,n,s):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,"engine"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(rr)),e!==o&&Pa()!==o?((n=ma())===o&&(n=null),n!==o&&Pa()!==o&&(s=tu())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.toUpperCase()}}(e,n,s):(ys=t,t=o)):(ys=t,t=o)))),t}function qs(){var t,e,n,s,u;return t=ys,(e=bo())!==o&&Pa()!==o&&(n=function(){var t,e,n;return t=ys,"read"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(tr)),e!==o&&Pa()!==o?("local"===r.substr(ys,5).toLowerCase()?(n=r.substr(ys,5),ys+=5):(n=o,0===Ts&&_s(er)),n===o&&(n=null),n!==o?t=e={type:"read",suffix:n&&"local"}:(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,"low_priority"===r.substr(ys,12).toLowerCase()?(e=r.substr(ys,12),ys+=12):(e=o,0===Ts&&_s(nr)),e===o&&(e=null),e!==o&&Pa()!==o?("write"===r.substr(ys,5).toLowerCase()?(n=r.substr(ys,5),ys+=5):(n=o,0===Ts&&_s(sr)),n!==o?t=e={type:"write",prefix:e&&"low_priority"}:(ys=t,t=o)):(ys=t,t=o)),t}())!==o?(s=e,u=n,vi.add(`lock::${s.db}::${s.table}`),t=e={table:s,lock_type:u}):(ys=t,t=o),t}function Ks(){var t,e,n,s,u,a,i;return(t=Js())===o&&(t=ys,e=ys,40===r.charCodeAt(ys)?(n="(",ys++):(n=o,0===Ts&&_s(or)),n!==o&&(s=Pa())!==o&&(u=Ks())!==o&&(a=Pa())!==o?(41===r.charCodeAt(ys)?(i=")",ys++):(i=o,0===Ts&&_s(ur)),i!==o?e=n=[n,s,u,a,i]:(ys=e,e=o)):(ys=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}function Zs(){var t,e,n,s,u,a,i,l,f;if(t=ys,Hu()!==o)if(Pa()!==o)if((e=zs())!==o){for(n=[],s=ys,(u=Pa())!==o&&(a=ga())!==o&&(i=Pa())!==o&&(l=zs())!==o?s=u=[u,a,i,l]:(ys=s,s=o);s!==o;)n.push(s),s=ys,(u=Pa())!==o&&(a=ga())!==o&&(i=Pa())!==o&&(l=zs())!==o?s=u=[u,a,i,l]:(ys=s,s=o);n!==o?t=c(e,n):(ys=t,t=o)}else ys=t,t=o;else ys=t,t=o;else ys=t,t=o;return t===o&&(t=ys,Pa()!==o&&Hu()!==o&&(e=Pa())!==o&&(n=function(){var t,e,n,s;return t=ys,"RECURSIVE"===r.substr(ys,9)?(e="RECURSIVE",ys+=9):(e=o,0===Ts&&_s(Xt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(s=Pa())!==o&&(u=zs())!==o?((f=u).recursive=!0,t=[f]):(ys=t,t=o)),t}function zs(){var r,t,e,n,s;return r=ys,(t=fu())===o&&(t=tu()),t!==o&&Pa()!==o?((e=Qs())===o&&(e=null),e!==o&&Pa()!==o&&Mu()!==o&&Pa()!==o&&xa()!==o&&Pa()!==o&&(n=Us())!==o&&Pa()!==o&&Ua()!==o?("string"==typeof(s=t)&&(s={type:"default",value:s}),r=t={name:s,stmt:n,columns:e}):(ys=r,r=o)):(ys=r,r=o),r}function Qs(){var r,t;return r=ys,xa()!==o&&Pa()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Ko())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Ko())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Ko())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=c(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())!==o&&Pa()!==o&&Ua()!==o?r=t:(ys=r,r=o),r}function Js(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A;return t=ys,Pa()!==o?((e=Zs())===o&&(e=null),e!==o&&Pa()!==o&&function(){var t,e,n,s;return t=ys,"select"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Gt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Fa()!==o?((n=function(){var r,t,e,n,s,u;if(r=ys,(t=ro())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ro())!==o?n=s=[s,u]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ro())!==o?n=s=[s,u]:(ys=n,n=o);e!==o?(t=function(r,t){const e=[r];for(let r=0,n=t.length;r<n;++r)e.push(t[r][1]);return e}(t,e),r=t):(ys=r,r=o)}else ys=r,r=o;return r}())===o&&(n=null),n!==o&&Pa()!==o?((s=Wu())===o&&(s=null),s!==o&&Pa()!==o&&(u=to())!==o&&Pa()!==o?((a=oo())===o&&(a=null),a!==o&&Pa()!==o?((i=Co())===o&&(i=null),i!==o&&Pa()!==o?((l=function(){var t,e;return t=ys,function(){var t,e,n,s;return t=ys,"group"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(we)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&Yu()!==o&&Pa()!==o&&(e=xo())!==o?t=e.value:(ys=t,t=o),t}())===o&&(l=null),l!==o&&Pa()!==o?((c=function(){var t,e;return t=ys,function(){var t,e,n,s;return t=ys,"having"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Ee)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(e=$o())!==o?t=e:(ys=t,t=o),t}())===o&&(c=null),c!==o&&Pa()!==o?((f=Ao())===o&&(f=null),f!==o&&Pa()!==o?((b=No())===o&&(b=null),b!==o?(v=e,p=n,L=s,C=u,w=i,h=l,y=c,E=f,A=b,(d=a)&&d.forEach((r=>r.table&&vi.add(`select::${r.db}::${r.table}`))),t={with:v,type:"select",options:p,distinct:L,columns:C,from:d,where:w,groupby:h,having:y,orderby:E,limit:A}):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}function ro(){var t;return(t=function(){var t;return"sql_calc_found_rows"===r.substr(ys,19).toLowerCase()?(t=r.substr(ys,19),ys+=19):(t=o,0===Ts&&_s(rs)),t}())===o&&((t=function(){var t;return"sql_cache"===r.substr(ys,9).toLowerCase()?(t=r.substr(ys,9),ys+=9):(t=o,0===Ts&&_s(ts)),t}())===o&&(t=function(){var t;return"sql_no_cache"===r.substr(ys,12).toLowerCase()?(t=r.substr(ys,12),ys+=12):(t=o,0===Ts&&_s(es)),t}()),t===o&&(t=function(){var t;return"sql_big_result"===r.substr(ys,14).toLowerCase()?(t=r.substr(ys,14),ys+=14):(t=o,0===Ts&&_s(ss)),t}())===o&&(t=function(){var t;return"sql_small_result"===r.substr(ys,16).toLowerCase()?(t=r.substr(ys,16),ys+=16):(t=o,0===Ts&&_s(ns)),t}())===o&&(t=function(){var t;return"sql_buffer_result"===r.substr(ys,17).toLowerCase()?(t=r.substr(ys,17),ys+=17):(t=o,0===Ts&&_s(os)),t}())),t}function to(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Bu())===o&&(t=ys,(e=Oa())!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t===o&&(t=Oa())),t!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=no())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=no())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=function(r,t){pi.add("select::null::(.*)");const e={expr:{type:"column_ref",table:null,column:"*"},as:null};return t&&t.length>0?ii(e,t):[e]}(0,e):(ys=r,r=o)}else ys=r,r=o;if(r===o)if(r=ys,(t=no())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=no())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=no())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=c(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function eo(){var t,e,n,s,u,a,i;return t=ys,Ma()!==o&&Pa()!==o?((e=Lu())===o&&(e=fu()),e!==o&&Pa()!==o&&ka()!==o?(n=ys,(s=Pa())!==o?(46===r.charCodeAt(ys)?(u=".",ys++):(u=o,0===Ts&&_s(ar)),u!==o&&(a=Pa())!==o&&(i=Zo())!==o?n=s=[s,u,a,i]:(ys=n,n=o)):(ys=n,n=o),n===o&&(n=null),n!==o?t=function(r,t){let e;return t&&(e={type:"default",value:t[3]}),{brackets:!0,index:r,property:e}}(e,n):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t}function no(){var r,t,e,n,s;return r=ys,t=ys,(e=Zo())!==o&&(n=Pa())!==o&&(s=_a())!==o?t=e=[e,n,s]:(ys=t,t=o),t===o&&(t=null),t!==o&&(e=Pa())!==o&&(n=Oa())!==o?r=t=function(r){const t=r&&r[0]||null;return pi.add(`select::${t}::(.*)`),{expr:{type:"column_ref",table:t,column:"*"},as:null}}(t):(ys=r,r=o),r===o&&(r=ys,(t=function(){var r,t,e,n,s;return r=ys,(t=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Do())!==o){for(e=[],n=ys,(s=Pa())!==o?((u=Ju())===o&&(u=ra())===o&&(u=$a()),u!==o&&(a=Pa())!==o&&(i=Do())!==o?n=s=[s,u,a,i]:(ys=n,n=o)):(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o?((u=Ju())===o&&(u=ra())===o&&(u=$a()),u!==o&&(a=Pa())!==o&&(i=Do())!==o?n=s=[s,u,a,i]:(ys=n,n=o)):(ys=n,n=o);e!==o?(t=function(r,t){const e=r.ast;if(e&&"select"===e.type&&(!(r.parentheses_symbol||r.parentheses||r.ast.parentheses||r.ast.parentheses_symbol)||1!==e.columns.length||"*"===e.columns[0].expr.column))throw new Error("invalid column clause with select statement");if(!t||0===t.length)return r;const n=t.length;let s=t[n-1][3];for(let e=n-1;e>=0;e--){const n=0===e?r:t[e-1][3];s=ui(t[e][1],n,s)}return s}(t,e),r=t):(ys=r,r=o)}else ys=r,r=o;return r}())!==o&&Pa()!==o?((e=eo())===o&&(e=null),e!==o?(n=t,(s=e)&&(n.array_index=s),r=t=n):(ys=r,r=o)):(ys=r,r=o),r}())!==o&&(e=Pa())!==o?((n=so())===o&&(n=null),n!==o?r=t={type:"expr",expr:t,as:n}:(ys=r,r=o)):(ys=r,r=o)),r}function so(){var r,t,e;return r=ys,(t=Mu())!==o&&Pa()!==o&&(e=function(){var r,t;return r=ys,(t=tu())!==o&&(function(r){if(!0===si[r.toUpperCase()])throw new Error("Error: "+JSON.stringify(r)+" is a reserved word, can not as alias clause");return!1}(t)?o:void 0)!==o?r=t:(ys=r,r=o),r===o&&(r=ys,r=t=zo()),r}())!==o?r=t=e:(ys=r,r=o),r===o&&(r=ys,(t=Mu())===o&&(t=null),t!==o&&Pa()!==o&&(e=Zo())!==o?r=t=e:(ys=r,r=o)),r}function oo(){var t,e;return t=ys,function(){var t,e,n,s;return t=ys,"from"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(Jt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(e=co())!==o?t=e:(ys=t,t=o),t}function uo(){var r,t,e;return r=ys,(t=po())!==o&&Pa()!==o&&mu()!==o&&Pa()!==o&&(e=po())!==o?r=t=[t,e]:(ys=r,r=o),r}function ao(){var t,e;return t=ys,ju()!==o&&Pa()!==o?("btree"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(ir)),e===o&&("hash"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(lr))),e!==o?t={keyword:"using",type:e.toLowerCase()}:(ys=t,t=o)):(ys=t,t=o),t}function io(){var r,t,e,n,s,u;if(r=ys,(t=lo())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=lo())!==o?n=s=[s,u]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=lo())!==o?n=s=[s,u]:(ys=n,n=o);e!==o?r=t=function(r,t){const e=[r];for(let r=0;r<t.length;r++)e.push(t[r][1]);return e}(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function lo(){var t,e,n,s,u,a;return t=ys,(e=function(){var t,e,n,s;return t=ys,"key_block_size"===r.substr(ys,14).toLowerCase()?(e=r.substr(ys,14),ys+=14):(e=o,0===Ts&&_s(W)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="KEY_BLOCK_SIZE":(ys=t,t=o)):(ys=t,t=o),t}())!==o&&Pa()!==o?((n=ma())===o&&(n=null),n!==o&&Pa()!==o&&(s=Lu())!==o?(u=n,a=s,t=e={type:e.toLowerCase(),symbol:u,expr:a}):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ao())===o&&(t=ys,"with"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(cr)),e!==o&&Pa()!==o?("parser"===r.substr(ys,6).toLowerCase()?(n=r.substr(ys,6),ys+=6):(n=o,0===Ts&&_s(fr)),n!==o&&Pa()!==o&&(s=tu())!==o?t=e={type:"with parser",expr:s}:(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,"visible"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(br)),e===o&&("invisible"===r.substr(ys,9).toLowerCase()?(e=r.substr(ys,9),ys+=9):(e=o,0===Ts&&_s(vr))),e!==o&&(e=function(r){return{type:r.toLowerCase(),expr:r.toLowerCase()}}(e)),(t=e)===o&&(t=ja()))),t}function co(){var r,t,e,n;if(r=ys,(t=bo())!==o){for(e=[],n=fo();n!==o;)e.push(n),n=fo();e!==o?r=t=pr(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function fo(){var r,t,e;return r=ys,Pa()!==o&&(t=ga())!==o&&Pa()!==o&&(e=bo())!==o?r=e:(ys=r,r=o),r===o&&(r=ys,Pa()!==o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(r=ys,(t=vo())!==o)if(Pa()!==o)if((e=bo())!==o)if(Pa()!==o)if((n=ju())!==o)if(Pa()!==o)if(xa()!==o)if(Pa()!==o)if((s=tu())!==o){for(u=[],a=ys,(i=Pa())!==o&&(l=ga())!==o&&(c=Pa())!==o&&(f=tu())!==o?a=i=[i,l,c,f]:(ys=a,a=o);a!==o;)u.push(a),a=ys,(i=Pa())!==o&&(l=ga())!==o&&(c=Pa())!==o&&(f=tu())!==o?a=i=[i,l,c,f]:(ys=a,a=o);u!==o&&(a=Pa())!==o&&(i=Ua())!==o?(b=t,p=s,L=u,(v=e).join=b,v.using=ii(p,L),r=t=v):(ys=r,r=o)}else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;return r===o&&(r=ys,(t=vo())!==o&&Pa()!==o&&(e=bo())!==o&&Pa()!==o?((n=Lo())===o&&(n=null),n!==o?(t=function(r,t,e){return t.join=r,t.on=e,t}(t,e,n),r=t):(ys=r,r=o)):(ys=r,r=o),r===o&&(r=ys,(t=vo())!==o&&Pa()!==o&&(e=xa())!==o&&Pa()!==o&&(n=Us())!==o&&Pa()!==o&&Ua()!==o&&Pa()!==o?((s=so())===o&&(s=null),s!==o&&(u=Pa())!==o?((a=Lo())===o&&(a=null),a!==o?(t=function(r,t,e,n){return t.parentheses=!0,{expr:t,as:e,join:r,on:n}}(t,n,s,a),r=t):(ys=r,r=o)):(ys=r,r=o)):(ys=r,r=o))),r}())!==o?r=t:(ys=r,r=o)),r}function bo(){var t,e,n,s,u,a;return t=ys,(e=function(){var t;return"dual"===r.substr(ys,4).toLowerCase()?(t=r.substr(ys,4),ys+=4):(t=o,0===Ts&&_s(Wn)),t}())!==o&&(e={type:"dual"}),(t=e)===o&&(t=ys,(e=po())!==o&&Pa()!==o?((n=so())===o&&(n=null),n!==o?(a=n,t=e="var"===(u=e).type?(u.as=a,u):{db:u.db,table:u.table,as:a}):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,(e=xa())!==o&&Pa()!==o&&(n=Us())!==o&&Pa()!==o&&Ua()!==o&&Pa()!==o?((s=so())===o&&(s=null),s!==o?t=e=function(r,t){return r.parentheses=!0,{expr:r,as:t}}(n,s):(ys=t,t=o)):(ys=t,t=o))),t}function vo(){var t,e,n,s;return t=ys,(e=function(){var t,e,n,s;return t=ys,"left"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(ae)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(n=Pa())!==o?((s=Fu())===o&&(s=null),s!==o&&Pa()!==o&&Pu()!==o?t=e="LEFT JOIN":(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,(e=function(){var t,e,n,s;return t=ys,"right"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(ie)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(n=Pa())!==o?((s=Fu())===o&&(s=null),s!==o&&Pa()!==o&&Pu()!==o?t=e="RIGHT JOIN":(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,(e=function(){var t,e,n,s;return t=ys,"full"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(le)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(n=Pa())!==o?((s=Fu())===o&&(s=null),s!==o&&Pa()!==o&&Pu()!==o?t=e="FULL JOIN":(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,e=ys,(n=function(){var t,e,n,s;return t=ys,"inner"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(fe)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(s=Pa())!==o?e=n=[n,s]:(ys=e,e=o),e===o&&(e=null),e!==o&&(n=Pu())!==o?t=e="INNER JOIN":(ys=t,t=o),t===o&&(t=ys,(e=function(){var t,e,n,s;return t=ys,"cross"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(ce)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(n=Pa())!==o&&(s=Pu())!==o?t=e="CROSS JOIN":(ys=t,t=o))))),t}function po(){var r,t,e,n,s,u,a,i;return r=ys,(t=Zo())!==o?(e=ys,(n=Pa())!==o&&(s=_a())!==o&&(u=Pa())!==o&&(a=Zo())!==o?e=n=[n,s,u,a]:(ys=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){const e={db:null,table:r};return null!==t&&(e.db=r,e.table=t[3]),e}(t,e):(ys=r,r=o)):(ys=r,r=o),r===o&&(r=ys,(t=ri())!==o&&((i=t).db=null,i.table=i.name,t=i),r=t),r}function Lo(){var r,t;return r=ys,$u()!==o&&Pa()!==o&&(t=$o())!==o?r=t:(ys=r,r=o),r}function Co(){var t,e;return t=ys,function(){var t,e,n,s;return t=ys,"where"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(de)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(e=$o())!==o?t=e:(ys=t,t=o),t}function wo(){var t,e,n,s;return t=ys,(e=Eo())!==o&&Pa()!==o?("following"===r.substr(ys,9).toLowerCase()?(n=r.substr(ys,9),ys+=9):(n=o,0===Ts&&_s(Lr)),n!==o?((s=e).value+=" FOLLOWING",t=e=s):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=yo()),t}function ho(){var t,e,n,s;return t=ys,(e=Eo())!==o&&Pa()!==o?("preceding"===r.substr(ys,9).toLowerCase()?(n=r.substr(ys,9),ys+=9):(n=o,0===Ts&&_s(Cr)),n!==o?((s=e).value+=" PRECEDING",t=e=s):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=yo()),t}function yo(){var t,e,n;return t=ys,"current"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(dr)),e!==o&&Pa()!==o?("row"===r.substr(ys,3).toLowerCase()?(n=r.substr(ys,3),ys+=3):(n=o,0===Ts&&_s(wr)),n!==o?t=e={type:"single_quote_string",value:"current row"}:(ys=t,t=o)):(ys=t,t=o),t}function Eo(){var t,e;return t=ys,"unbounded"===r.substr(ys,9).toLowerCase()?(e=r.substr(ys,9),ys+=9):(e=o,0===Ts&&_s(hr)),e!==o&&(e={type:"single_quote_string",value:e.toUpperCase()}),(t=e)===o&&(t=Lu()),t}function Ao(){var t,e;return t=ys,function(){var t,e,n,s;return t=ys,"order"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(ye)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&Yu()!==o&&Pa()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=To())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=To())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=To())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=c(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())!==o?t=e:(ys=t,t=o),t}function mo(){var r,t;return r=ys,Ou()!==o&&Pa()!==o&&Yu()!==o&&Pa()!==o&&(t=to())!==o?r=t:(ys=r,r=o),r}function To(){var t,e,n;return t=ys,(e=Do())!==o&&Pa()!==o?((n=function(){var t,e,n,s;return t=ys,"desc"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(Ie)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="DESC":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=ys,"asc"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(Te)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="ASC":(ys=t,t=o)):(ys=t,t=o),t}()),n===o&&(n=null),n!==o?t=e={expr:e,type:n}:(ys=t,t=o)):(ys=t,t=o),t}function Io(){var r;return(r=Lu())===o&&(r=ou()),r}function No(){var t,e,n,s,u,a;return t=ys,function(){var t,e,n,s;return t=ys,"limit"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(Ae)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(e=Io())!==o&&Pa()!==o?(n=ys,(s=ga())===o&&(s=function(){var t,e,n,s;return t=ys,"offset"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(me)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="OFFSET":(ys=t,t=o)):(ys=t,t=o),t}()),s!==o&&(u=Pa())!==o&&(a=Io())!==o?n=s=[s,u,a]:(ys=n,n=o),n===o&&(n=null),n!==o?t=function(r,t){const e=[r];return t&&e.push(t[2]),{seperator:t&&t[0]&&t[0].toLowerCase()||"",value:e}}(e,n):(ys=t,t=o)):(ys=t,t=o),t}function Ro(){var t,e,n,s,u,a,i,l,c;return t=ys,e=ys,(n=Zo())!==o&&(s=Pa())!==o&&(u=_a())!==o?e=n=[n,s,u]:(ys=e,e=o),e===o&&(e=null),e!==o&&(n=Pa())!==o&&(s=Qo())!==o&&(u=Pa())!==o?(61===r.charCodeAt(ys)?(a="=",ys++):(a=o,0===Ts&&_s(yr)),a!==o&&Pa()!==o&&(i=Bo())!==o?t=e={column:s,value:i,table:(c=e)&&c[0]}:(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,e=ys,(n=Zo())!==o&&(s=Pa())!==o&&(u=_a())!==o?e=n=[n,s,u]:(ys=e,e=o),e===o&&(e=null),e!==o&&(n=Pa())!==o&&(s=Qo())!==o&&(u=Pa())!==o?(61===r.charCodeAt(ys)?(a="=",ys++):(a=o,0===Ts&&_s(yr)),a!==o&&Pa()!==o&&(i=Gu())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o&&(l=Ko())!==o&&Pa()!==o&&Ua()!==o?t=e=function(r,t,e){return{column:t,value:e,table:r&&r[0],keyword:"values"}}(e,s,l):(ys=t,t=o)):(ys=t,t=o)),t}function So(){var r;return(r=function(){var r,t;return r=ys,Gu()!==o&&Pa()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Oo())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Oo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Oo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=c(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())!==o?r=t:(ys=r,r=o),r}())===o&&(r=Js()),r}function _o(){var r,t,e,n,s,u,a,i,l;if(r=ys,Ou()!==o)if(Pa()!==o)if((t=xa())!==o)if(Pa()!==o)if((e=tu())!==o){for(n=[],s=ys,(u=Pa())!==o&&(a=ga())!==o&&(i=Pa())!==o&&(l=tu())!==o?s=u=[u,a,i,l]:(ys=s,s=o);s!==o;)n.push(s),s=ys,(u=Pa())!==o&&(a=ga())!==o&&(i=Pa())!==o&&(l=tu())!==o?s=u=[u,a,i,l]:(ys=s,s=o);n!==o&&(s=Pa())!==o&&(u=Ua())!==o?r=ii(e,n):(ys=r,r=o)}else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;else ys=r,r=o;return r===o&&(r=ys,Ou()!==o&&Pa()!==o&&(t=Oo())!==o?r=t:(ys=r,r=o)),r}function go(){var t,e;return t=ys,(e=function(){var t,e,n,s;return t=ys,"insert"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Wt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(e="insert"),(t=e)===o&&(t=ys,(e=_u())!==o&&(e="replace"),t=e),t}function Oo(){var r,t;return r=ys,xa()!==o&&Pa()!==o&&(t=xo())!==o&&Pa()!==o&&Ua()!==o?r=t:(ys=r,r=o),r}function xo(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Do())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Do())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Do())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=function(r,t){const e={type:"expr_list"};return e.value=ii(r,t),e}(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function Uo(){var r,t,e,n,s,u;if(r=ys,(t=Mo())!==o)if(Pa()!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=Mo())!==o?n=s=[s,u]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=Mo())!==o?n=s=[s,u]:(ys=n,n=o);e!==o?r=t=i(t,e):(ys=r,r=o)}else ys=r,r=o;else ys=r,r=o;return r}function Mo(){var t,e,n;return t=ys,function(){var t,e,n,s;return t=ys,"when"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(Be)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(e=$o())!==o&&Pa()!==o&&function(){var t,e,n,s;return t=ys,"then"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(We)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(n=Do())!==o?t={type:"when",cond:e,result:n}:(ys=t,t=o),t}function ko(){var t,e;return t=ys,function(){var t,e,n,s;return t=ys,"else"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(Xe)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(e=Do())!==o?t={type:"else",result:e}:(ys=t,t=o),t}function Do(){var r;return(r=function(){var r;return(r=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=qo())!==o){if(e=[],n=ys,(s=Pa())!==o&&(u=$a())!==o&&(a=Pa())!==o&&(i=qo())!==o?n=s=[s,u,a,i]:(ys=n,n=o),n!==o)for(;n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=$a())!==o&&(a=Pa())!==o&&(i=qo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);else e=o;e!==o&&(n=Pa())!==o?((s=jo())===o&&(s=null),s!==o?(t=function(r,t,e){const n=li(r,t);return null===e?n:"arithmetic"===e.type?li(n,e.tail):ui(e.op,n,e.right)}(t,e,s),r=t):(ys=r,r=o)):(ys=r,r=o)}else ys=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Po())!==o){for(e=[],n=ys,(s=Fa())!==o&&(u=ra())!==o&&(a=Pa())!==o&&(i=Po())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Fa())!==o&&(u=ra())!==o&&(a=Pa())!==o&&(i=Po())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=Er(t,e):(ys=r,r=o)}else ys=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u;if(r=ys,(t=Wo())!==o){if(e=[],n=ys,(s=Pa())!==o&&(u=qo())!==o?n=s=[s,u]:(ys=n,n=o),n!==o)for(;n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=qo())!==o?n=s=[s,u]:(ys=n,n=o);else e=o;e!==o?r=t=oi(t,e[0][1]):(ys=r,r=o)}else ys=r,r=o;return r}()),r}())===o&&(r=Us()),r}function $o(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Do())!==o){for(e=[],n=ys,(s=Pa())!==o?((u=Ju())===o&&(u=ra())===o&&(u=ga()),u!==o&&(a=Pa())!==o&&(i=Do())!==o?n=s=[s,u,a,i]:(ys=n,n=o)):(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o?((u=Ju())===o&&(u=ra())===o&&(u=ga()),u!==o&&(a=Pa())!==o&&(i=Do())!==o?n=s=[s,u,a,i]:(ys=n,n=o)):(ys=n,n=o);e!==o?r=t=function(r,t){const e=t.length;let n=r,s="";for(let r=0;r<e;++r)","===t[r][1]?(s=",",Array.isArray(n)||(n=[n]),n.push(t[r][3])):n=ui(t[r][1],n,t[r][3]);if(","===s){const r={type:"expr_list"};return r.value=n,r}return n}(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function Po(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Fo())!==o){for(e=[],n=ys,(s=Fa())!==o&&(u=Ju())!==o&&(a=Pa())!==o&&(i=Fo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Fa())!==o&&(u=Ju())!==o&&(a=Pa())!==o&&(i=Fo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=li(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function Fo(){var t,e,n,s,u;return(t=Go())===o&&(t=function(){var r,t,e,n,s;return r=ys,(t=function(){var r,t,e,n,s;return r=ys,t=ys,(e=Qu())!==o&&(n=Pa())!==o&&(s=zu())!==o?t=e=[e,n,s]:(ys=t,t=o),t!==o&&(t=mr(t)),(r=t)===o&&(r=zu()),r}())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o&&(e=Us())!==o&&Pa()!==o&&Ua()!==o?(n=t,(s=e).parentheses=!0,r=t=oi(n,s)):(ys=r,r=o),r}())===o&&(t=ys,(e=Qu())===o&&(e=ys,33===r.charCodeAt(ys)?(n="!",ys++):(n=o,0===Ts&&_s(Ar)),n!==o?(s=ys,Ts++,61===r.charCodeAt(ys)?(u="=",ys++):(u=o,0===Ts&&_s(yr)),Ts--,u===o?s=void 0:(ys=s,s=o),s!==o?e=n=[n,s]:(ys=e,e=o)):(ys=e,e=o)),e!==o&&(n=Pa())!==o&&(s=Fo())!==o?t=e=oi("NOT",s):(ys=t,t=o)),t}function Go(){var r,t,e,n,s;return r=ys,(t=Bo())!==o&&Pa()!==o?((e=jo())===o&&(e=null),e!==o?(n=t,r=t=null===(s=e)?n:"arithmetic"===s.type?li(n,s.tail):ui(s.op,n,s.right)):(ys=r,r=o)):(ys=r,r=o),r===o&&(r=fu())===o&&(r=Ko()),r}function jo(){var r;return(r=function(){var r,t,e,n,s,u;if(r=[],t=ys,(e=Pa())!==o&&(n=Ho())!==o&&(s=Pa())!==o&&(u=Bo())!==o?t=e=[e,n,s,u]:(ys=t,t=o),t!==o)for(;t!==o;)r.push(t),t=ys,(e=Pa())!==o&&(n=Ho())!==o&&(s=Pa())!==o&&(u=Bo())!==o?t=e=[e,n,s,u]:(ys=t,t=o);else r=o;return r!==o&&(r={type:"arithmetic",tail:r}),r}())===o&&(r=function(){var r,t,e,n;return r=ys,(t=Yo())!==o&&Pa()!==o&&(e=xa())!==o&&Pa()!==o&&(n=xo())!==o&&Pa()!==o&&Ua()!==o?r=t={op:t,right:n}:(ys=r,r=o),r===o&&(r=ys,(t=Yo())!==o&&Pa()!==o?((e=ri())===o&&(e=fu()),e!==o?(t=function(r,t){return{op:r,right:t}}(t,e),r=t):(ys=r,r=o)):(ys=r,r=o)),r}())===o&&(r=function(){var r,t,e,n;return r=ys,(t=function(){var r,t,e,n,s;return r=ys,t=ys,(e=Qu())!==o&&(n=Pa())!==o&&(s=Xu())!==o?t=e=[e,n,s]:(ys=t,t=o),t!==o&&(t=mr(t)),(r=t)===o&&(r=Xu()),r}())!==o&&Pa()!==o&&(e=Bo())!==o&&Pa()!==o&&Ju()!==o&&Pa()!==o&&(n=Bo())!==o?r=t={op:t,right:{type:"expr_list",value:[e,n]}}:(ys=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s;return r=ys,(t=qu())!==o&&(e=Pa())!==o&&(n=Bo())!==o?r=t={op:"IS",right:n}:(ys=r,r=o),r===o&&(r=ys,t=ys,(e=qu())!==o&&(n=Pa())!==o&&(s=Qu())!==o?t=e=[e,n,s]:(ys=t,t=o),t!==o&&(e=Pa())!==o&&(n=Bo())!==o?(t=function(r){return{op:"IS NOT",right:r}}(n),r=t):(ys=r,r=o)),r}())===o&&(r=function(){var r,t,e;return r=ys,(t=function(){var r,t,e,n,s;return r=ys,t=ys,(e=Qu())!==o&&(n=Pa())!==o&&(s=Ku())!==o?t=e=[e,n,s]:(ys=t,t=o),t!==o&&(t=mr(t)),(r=t)===o&&(r=Ku()),r}())!==o&&Pa()!==o?((e=lu())===o&&(e=Go()),e!==o?r=t=Or(t,e):(ys=r,r=o)):(ys=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=ys,(t=function(){var r,t,e,n,s;return r=ys,t=ys,(e=Qu())!==o&&(n=Pa())!==o&&(s=Zu())!==o?t=e=[e,n,s]:(ys=t,t=o),t!==o&&(t=mr(t)),(r=t)===o&&(r=Zu()),r}())!==o&&Pa()!==o?((e=lu())===o&&(e=Go()),e!==o?r=t=Or(t,e):(ys=r,r=o)):(ys=r,r=o),r}()),r}function Ho(){var t;return">="===r.substr(ys,2)?(t=">=",ys+=2):(t=o,0===Ts&&_s(Tr)),t===o&&(62===r.charCodeAt(ys)?(t=">",ys++):(t=o,0===Ts&&_s(Ir)),t===o&&("<="===r.substr(ys,2)?(t="<=",ys+=2):(t=o,0===Ts&&_s(Nr)),t===o&&("<>"===r.substr(ys,2)?(t="<>",ys+=2):(t=o,0===Ts&&_s(Rr)),t===o&&(60===r.charCodeAt(ys)?(t="<",ys++):(t=o,0===Ts&&_s(Sr)),t===o&&("=="===r.substr(ys,2)?(t="==",ys+=2):(t=o,0===Ts&&_s(_r)),t===o&&(61===r.charCodeAt(ys)?(t="=",ys++):(t=o,0===Ts&&_s(yr)),t===o&&("!="===r.substr(ys,2)?(t="!=",ys+=2):(t=o,0===Ts&&_s(gr))))))))),t}function Yo(){var r,t,e,n,s;return r=ys,t=ys,(e=Qu())!==o&&(n=Pa())!==o&&(s=Vu())!==o?t=e=[e,n,s]:(ys=t,t=o),t!==o&&(t=mr(t)),(r=t)===o&&(r=Vu()),r}function Bo(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Xo())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=Wo())!==o&&(a=Pa())!==o&&(i=Xo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=Wo())!==o&&(a=Pa())!==o&&(i=Xo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=Er(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function Wo(){var t;return 43===r.charCodeAt(ys)?(t="+",ys++):(t=o,0===Ts&&_s(xr)),t===o&&(45===r.charCodeAt(ys)?(t="-",ys++):(t=o,0===Ts&&_s(Ur))),t}function Xo(){var r,t,e,n,s,u,a,i;if(r=ys,(t=qo())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=Vo())!==o&&(a=Pa())!==o&&(i=qo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=Vo())!==o&&(a=Pa())!==o&&(i=qo())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=li(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function Vo(){var t;return 42===r.charCodeAt(ys)?(t="*",ys++):(t=o,0===Ts&&_s(Mr)),t===o&&(47===r.charCodeAt(ys)?(t="/",ys++):(t=o,0===Ts&&_s(kr)),t===o&&(37===r.charCodeAt(ys)?(t="%",ys++):(t=o,0===Ts&&_s(Dr)))),t}function qo(){var t,e,n,s,u,a;return(t=function(){var t,e,n,s,u,a,i,l,c;return t=ys,(e=na())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o&&(n=Do())!==o&&Pa()!==o&&Mu()!==o&&Pa()!==o&&(s=ei())!==o&&Pa()!==o&&(u=Ua())!==o?(l=n,c=s,t=e={type:"cast",keyword:e.toLowerCase(),expr:l,symbol:"as",target:c}):(ys=t,t=o),t===o&&(t=ys,(e=na())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o&&(n=Do())!==o&&Pa()!==o&&Mu()!==o&&Pa()!==o&&(s=aa())!==o&&Pa()!==o&&(u=xa())!==o&&Pa()!==o&&(a=Cu())!==o&&Pa()!==o&&Ua()!==o&&Pa()!==o&&(i=Ua())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+")"}}}(e,n,a),t=e):(ys=t,t=o),t===o&&(t=ys,(e=na())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o&&(n=Do())!==o&&Pa()!==o&&Mu()!==o&&Pa()!==o&&(s=aa())!==o&&Pa()!==o&&(u=xa())!==o&&Pa()!==o&&(a=Cu())!==o&&Pa()!==o&&ga()!==o&&Pa()!==o&&(i=Cu())!==o&&Pa()!==o&&Ua()!==o&&Pa()!==o&&Ua()!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+", "+n+")"}}}(e,n,a,i),t=e):(ys=t,t=o),t===o&&(t=ys,(e=na())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o&&(n=Do())!==o&&Pa()!==o&&Mu()!==o&&Pa()!==o&&(s=function(){var t;return(t=function(){var t,e,n,s;return t=ys,"signed"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Je)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="SIGNED":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=ia()),t}())!==o&&Pa()!==o?((u=ca())===o&&(u=null),u!==o&&Pa()!==o&&(a=Ua())!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:e+(n?" "+n:"")}}}(e,n,s,u),t=e):(ys=t,t=o)):(ys=t,t=o)))),t}())===o&&(t=lu())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ys,(e=function(){var t,e,n,s;return t=ys,"count"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s($e)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="COUNT":(ys=t,t=o)):(ys=t,t=o),t}())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o&&(n=function(){var t,e,n,s,u;return t=ys,(e=function(){var t;return 42===r.charCodeAt(ys)?(t="*",ys++):(t=o,0===Ts&&_s(Mr)),t!==o&&(t={type:"star",value:"*"}),t}())!==o&&(e={expr:e}),(t=e)===o&&(t=ys,(e=Wu())===o&&(e=null),e!==o&&Pa()!==o&&(n=xa())!==o&&Pa()!==o&&(s=Do())!==o&&Pa()!==o&&Ua()!==o&&Pa()!==o?((u=Ao())===o&&(u=null),u!==o?t=e={distinct:e,expr:s,orderby:u,parentheses:!0}:(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,(e=Wu())===o&&(e=null),e!==o&&Pa()!==o&&(n=Do())!==o&&Pa()!==o?((s=Ao())===o&&(s=null),s!==o?(e=function(r,t,e){return{distinct:r,expr:t,orderby:e,parentheses:!1}}(e,n,s),t=e):(ys=t,t=o)):(ys=t,t=o))),t}())!==o&&Pa()!==o&&Ua()!==o&&Pa()!==o?((s=au())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:n,over:s}:(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ys,(e=function(){var t;return(t=function(){var t,e,n,s;return t=ys,"sum"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(Ge)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="SUM":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"max"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(Pe)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="MAX":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"min"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(Fe)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="MIN":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"avg"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(je)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="AVG":(ys=t,t=o)):(ys=t,t=o),t}()),t}())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o&&(n=Bo())!==o&&Pa()!==o&&Ua()!==o?t=e={type:"aggr_func",name:e,args:{expr:n}}:(ys=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u;return t=ys,(e=function(){var t;return(t=iu())===o&&(t=function(){var t,e,n,s;return t=ys,"current_user"===r.substr(ys,12).toLowerCase()?(e=r.substr(ys,12),ys+=12):(e=o,0===Ts&&_s(Un)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="CURRENT_USER":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"user"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(An)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="USER":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"session_user"===r.substr(ys,12).toLowerCase()?(e=r.substr(ys,12),ys+=12):(e=o,0===Ts&&_s(Mn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="SESSION_USER":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"system_user"===r.substr(ys,11).toLowerCase()?(e=r.substr(ys,11),ys+=11):(e=o,0===Ts&&_s(kn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="SYSTEM_USER":(ys=t,t=o)):(ys=t,t=o),t}()),t}())!==o&&Pa()!==o&&(n=xa())!==o&&Pa()!==o?((s=xo())===o&&(s=null),s!==o&&Pa()!==o&&Ua()!==o&&Pa()!==o?((u=au())===o&&(u=null),u!==o?t=e={type:"function",name:e,args:s||{type:"expr_list",value:[]},over:u}:(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,(e=iu())!==o&&Pa()!==o?((n=uu())===o&&(n=null),n!==o?t=e={type:"function",name:e,over:n}:(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,(e=Ca())===o&&(e=ha())===o&&(e=ya())===o&&("at time zone"===r.substr(ys,12).toLowerCase()?(e=r.substr(ys,12),ys+=12):(e=o,0===Ts&&_s(et))),e!==o&&Pa()!==o?((n=$o())===o&&(n=null),n!==o&&Pa()!==o?((s=au())===o&&(s=null),s!==o?(e=function(r,t,e){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e,args_parentheses:!1}}(e,n,s),t=e):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=ys,(e=za())!==o&&Pa()!==o&&(n=xa())!==o&&Pa()!==o?((s=$o())===o&&(s=null),s!==o&&Pa()!==o&&Ua()!==o&&Pa()!==o?((u=au())===o&&(u=null),u!==o?(e=function(r,t,e){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,s,u),t=e):(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o)))),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=ys,ta()!==o&&Pa()!==o&&(t=Uo())!==o&&Pa()!==o?((e=ko())===o&&(e=null),e!==o&&Pa()!==o&&(n=ea())!==o&&Pa()!==o?((s=ta())===o&&(s=null),s!==o?(a=t,(i=e)&&a.push(i),r={type:"case",expr:null,args:a}):(ys=r,r=o)):(ys=r,r=o)):(ys=r,r=o),r===o&&(r=ys,ta()!==o&&Pa()!==o&&(t=Do())!==o&&Pa()!==o&&(e=Uo())!==o&&Pa()!==o?((n=ko())===o&&(n=null),n!==o&&Pa()!==o&&(s=ea())!==o&&Pa()!==o?((u=ta())===o&&(u=null),u!==o?r=function(r,t,e){return e&&t.push(e),{type:"case",expr:r,args:t}}(t,e,n):(ys=r,r=o)):(ys=r,r=o)):(ys=r,r=o)),r}())===o&&(t=function(){var t,e,n;return t=ys,function(){var t,e,n,s;return t=ys,"interval"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(Tn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="INTERVAL":(ys=t,t=o)):(ys=t,t=o),t}()!==o&&Pa()!==o&&(e=Do())!==o&&Pa()!==o&&(n=function(){var t;return(t=function(){var t,e,n,s;return t=ys,"year"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(In)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="YEAR":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"month"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(Nn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="MONTH":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"day"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(Rn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="DAY":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"hour"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(Sn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="HOUR":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"minute"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(_n)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="MINUTE":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"second"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(gn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="SECOND":(ys=t,t=o)):(ys=t,t=o),t}()),t}())!==o?t={type:"interval",expr:e,unit:n.toLowerCase()}:(ys=t,t=o),t}())===o&&(t=ys,(e=Ko())!==o&&Pa()!==o&&(n=eo())!==o?(a=n,(u=e).array_index=a,t=e=u):(ys=t,t=o),t===o&&(t=Ko())===o&&(t=ou())===o&&(t=ys,(e=xa())!==o&&Pa()!==o&&(n=$o())!==o&&Pa()!==o&&Ua()!==o?((s=n).parentheses=!0,t=e=s):(ys=t,t=o),t===o&&(t=ri()))),t}function Ko(){var r,t,e,n,s;return r=ys,(t=Zo())!==o&&Pa()!==o&&_a()!==o&&Pa()!==o&&(e=Jo())!==o?(n=t,s=e,pi.add(`select::${n}::${s}`),r=t={type:"column_ref",table:n,column:s}):(ys=r,r=o),r===o&&(r=ys,(t=Jo())!==o&&(t=function(r){return pi.add("select::null::"+r),{type:"column_ref",table:null,column:r}}(t)),r=t),r}function Zo(){var r,t;return r=ys,(t=tu())!==o&&($r(t)?o:void 0)!==o?r=t:(ys=r,r=o),r===o&&(r=ys,r=t=zo()),r}function zo(){var t;return(t=function(){var t,e,n,s;if(t=ys,34===r.charCodeAt(ys)?(e='"',ys++):(e=o,0===Ts&&_s(Pr)),e!==o){if(n=[],Fr.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(Gr)),s!==o)for(;s!==o;)n.push(s),Fr.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(Gr));else n=o;n!==o?(34===r.charCodeAt(ys)?(s='"',ys++):(s=o,0===Ts&&_s(Pr)),s!==o?t=e=jr(n):(ys=t,t=o)):(ys=t,t=o)}else ys=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=ys,39===r.charCodeAt(ys)?(e="'",ys++):(e=o,0===Ts&&_s(z)),e!==o){if(n=[],Hr.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(Yr)),s!==o)for(;s!==o;)n.push(s),Hr.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(Yr));else n=o;n!==o?(39===r.charCodeAt(ys)?(s="'",ys++):(s=o,0===Ts&&_s(z)),s!==o?t=e=jr(n):(ys=t,t=o)):(ys=t,t=o)}else ys=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=ys,96===r.charCodeAt(ys)?(e="`",ys++):(e=o,0===Ts&&_s(Br)),e!==o){if(n=[],Wr.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(Xr)),s!==o)for(;s!==o;)n.push(s),Wr.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(Xr));else n=o;n!==o?(96===r.charCodeAt(ys)?(s="`",ys++):(s=o,0===Ts&&_s(Br)),s!==o?t=e=jr(n):(ys=t,t=o)):(ys=t,t=o)}else ys=t,t=o;return t}()),t}function Qo(){var r;return r=ys,(r=ru())===o&&(r=zo()),r}function Jo(){var r,t;return r=ys,(t=ru())!==o&&($r(t)?o:void 0)!==o?r=t:(ys=r,r=o),r===o&&(r=zo()),r}function ru(){var r,t,e,n;if(r=ys,(t=nu())!==o){for(e=[],n=su();n!==o;)e.push(n),n=su();e!==o?r=t=Vr(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function tu(){var r,t,e,n;if(r=ys,(t=eu())!==o){for(e=[],n=nu();n!==o;)e.push(n),n=nu();e!==o?r=t=Vr(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function eu(){var t;return qr.test(r.charAt(ys))?(t=r.charAt(ys),ys++):(t=o,0===Ts&&_s(Kr)),t}function nu(){var t;return Zr.test(r.charAt(ys))?(t=r.charAt(ys),ys++):(t=o,0===Ts&&_s(zr)),t}function su(){var t;return Qr.test(r.charAt(ys))?(t=r.charAt(ys),ys++):(t=o,0===Ts&&_s(Jr)),t}function ou(){var t,e,n;return t=ys,58===r.charCodeAt(ys)?(e=":",ys++):(e=o,0===Ts&&_s(rt)),e!==o&&(n=tu())!==o?t=e=[e,n]:(ys=t,t=o),t!==o&&(t={type:"param",value:t[1]}),t}function uu(){var r,t,e;return r=ys,$u()!==o&&Pa()!==o&&Iu()!==o&&Pa()!==o&&(t=Ea())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o?((e=xo())===o&&(e=null),e!==o&&Pa()!==o&&Ua()!==o?r={type:"on update",keyword:t,parentheses:!0,expr:e}:(ys=r,r=o)):(ys=r,r=o),r===o&&(r=ys,$u()!==o&&Pa()!==o&&Iu()!==o&&Pa()!==o&&(t=Ea())!==o?r=function(r){return{type:"on update",keyword:r}}(t):(ys=r,r=o)),r}function au(){var t,e,n,s,u;return t=ys,"over"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(tt)),e!==o&&Pa()!==o&&(n=function(){var r,t;return(r=tu())===o&&(r=ys,xa()!==o&&Pa()!==o?((t=function(){var r,t,e,n;return r=ys,(t=mo())===o&&(t=null),t!==o&&Pa()!==o?((e=Ao())===o&&(e=null),e!==o&&Pa()!==o?((n=function(){var r,t,e,n,s;return r=ys,wa()!==o&&Pa()!==o?((t=wo())===o&&(t=ho()),t!==o?r="rows "+t.value:(ys=r,r=o)):(ys=r,r=o),r===o&&(r=ys,wa()!==o&&Pa()!==o&&(t=Xu())!==o&&Pa()!==o&&(e=ho())!==o&&Pa()!==o&&Ju()!==o&&Pa()!==o&&(n=wo())!==o?(s=n,r=`rows between ${e.value} and ${s.value}`):(ys=r,r=o)),r}())===o&&(n=null),n!==o?r=t={name:null,partitionby:t,orderby:e,window_frame_clause:n}:(ys=r,r=o)):(ys=r,r=o)):(ys=r,r=o),r}())===o&&(t=null),t!==o&&Pa()!==o&&Ua()!==o?r={window_specification:t||{},parentheses:!0}:(ys=r,r=o)):(ys=r,r=o)),r}())!==o?t=e={type:"window",as_window_specification:n}:(ys=t,t=o),t===o&&(t=ys,"over"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(tt)),e!==o&&Pa()!==o&&(n=xa())!==o&&Pa()!==o?((s=mo())===o&&(s=null),s!==o&&Pa()!==o?((u=Ao())===o&&(u=null),u!==o&&Pa()!==o&&Ua()!==o?t=e={partitionby:s,orderby:u}:(ys=t,t=o)):(ys=t,t=o)):(ys=t,t=o),t===o&&(t=uu())),t}function iu(){var t;return(t=function(){var t,e,n,s;return t=ys,"current_date"===r.substr(ys,12).toLowerCase()?(e=r.substr(ys,12),ys+=12):(e=o,0===Ts&&_s(mn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="CURRENT_DATE":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"current_time"===r.substr(ys,12).toLowerCase()?(e=r.substr(ys,12),ys+=12):(e=o,0===Ts&&_s(On)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="CURRENT_TIME":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=Ea()),t}function lu(){var t;return(t=fu())===o&&(t=Lu())===o&&(t=function(){var t,e;return t=ys,(e=function(){var t,e,n,s;return t=ys,"true"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(Mt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(e={type:"bool",value:!0}),(t=e)===o&&(t=ys,(e=function(){var t,e,n,s;return t=ys,"false"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(Dt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(e={type:"bool",value:!1}),t=e),t}())===o&&(t=cu())===o&&(t=function(){var t,e,n,s,u,a;if(t=ys,(e=ha())===o&&(e=Ca())===o&&(e=ya())===o&&(e=da()),e!==o)if(Pa()!==o){if(n=ys,39===r.charCodeAt(ys)?(s="'",ys++):(s=o,0===Ts&&_s(z)),s!==o){for(u=[],a=vu();a!==o;)u.push(a),a=vu();u!==o?(39===r.charCodeAt(ys)?(a="'",ys++):(a=o,0===Ts&&_s(z)),a!==o?n=s=[s,u,a]:(ys=n,n=o)):(ys=n,n=o)}else ys=n,n=o;n!==o?t=e=nt(e,n):(ys=t,t=o)}else ys=t,t=o;else ys=t,t=o;if(t===o)if(t=ys,(e=ha())===o&&(e=Ca())===o&&(e=ya())===o&&(e=da()),e!==o)if(Pa()!==o){if(n=ys,34===r.charCodeAt(ys)?(s='"',ys++):(s=o,0===Ts&&_s(Pr)),s!==o){for(u=[],a=bu();a!==o;)u.push(a),a=bu();u!==o?(34===r.charCodeAt(ys)?(a='"',ys++):(a=o,0===Ts&&_s(Pr)),a!==o?n=s=[s,u,a]:(ys=n,n=o)):(ys=n,n=o)}else ys=n,n=o;n!==o?t=e=nt(e,n):(ys=t,t=o)}else ys=t,t=o;else ys=t,t=o;return t}()),t}function cu(){var t;return(t=function(){var t,e,n,s;return t=ys,"null"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(xt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(t={type:"null",value:null}),t}function fu(){var t,e,n,s,u;if(t=ys,e=ys,39===r.charCodeAt(ys)?(n="'",ys++):(n=o,0===Ts&&_s(z)),n!==o){for(s=[],u=vu();u!==o;)s.push(u),u=vu();s!==o?(39===r.charCodeAt(ys)?(u="'",ys++):(u=o,0===Ts&&_s(z)),u!==o?e=n=[n,s,u]:(ys=e,e=o)):(ys=e,e=o)}else ys=e,e=o;if(e!==o&&(e={type:"single_quote_string",value:e[1].join("")}),(t=e)===o){if(t=ys,e=ys,34===r.charCodeAt(ys)?(n='"',ys++):(n=o,0===Ts&&_s(Pr)),n!==o){for(s=[],u=bu();u!==o;)s.push(u),u=bu();s!==o?(34===r.charCodeAt(ys)?(u='"',ys++):(u=o,0===Ts&&_s(Pr)),u!==o?e=n=[n,s,u]:(ys=e,e=o)):(ys=e,e=o)}else ys=e,e=o;e!==o&&(e=function(r){return{type:"double_quote_string",value:r[1].join("")}}(e)),t=e}return t}function bu(){var t;return st.test(r.charAt(ys))?(t=r.charAt(ys),ys++):(t=o,0===Ts&&_s(ot)),t===o&&(t=pu()),t}function vu(){var t;return ut.test(r.charAt(ys))?(t=r.charAt(ys),ys++):(t=o,0===Ts&&_s(at)),t===o&&(t=pu()),t}function pu(){var t,e,n,s,u,a,i,l,c,f;return t=ys,"\\'"===r.substr(ys,2)?(e="\\'",ys+=2):(e=o,0===Ts&&_s(it)),e!==o&&(e="\\'"),(t=e)===o&&(t=ys,'\\"'===r.substr(ys,2)?(e='\\"',ys+=2):(e=o,0===Ts&&_s(lt)),e!==o&&(e='\\"'),(t=e)===o&&(t=ys,"\\\\"===r.substr(ys,2)?(e="\\\\",ys+=2):(e=o,0===Ts&&_s(ct)),e!==o&&(e="\\\\"),(t=e)===o&&(t=ys,"\\/"===r.substr(ys,2)?(e="\\/",ys+=2):(e=o,0===Ts&&_s(ft)),e!==o&&(e="\\/"),(t=e)===o&&(t=ys,"\\b"===r.substr(ys,2)?(e="\\b",ys+=2):(e=o,0===Ts&&_s(bt)),e!==o&&(e="\b"),(t=e)===o&&(t=ys,"\\f"===r.substr(ys,2)?(e="\\f",ys+=2):(e=o,0===Ts&&_s(vt)),e!==o&&(e="\f"),(t=e)===o&&(t=ys,"\\n"===r.substr(ys,2)?(e="\\n",ys+=2):(e=o,0===Ts&&_s(pt)),e!==o&&(e="\n"),(t=e)===o&&(t=ys,"\\r"===r.substr(ys,2)?(e="\\r",ys+=2):(e=o,0===Ts&&_s(Lt)),e!==o&&(e="\r"),(t=e)===o&&(t=ys,"\\t"===r.substr(ys,2)?(e="\\t",ys+=2):(e=o,0===Ts&&_s(Ct)),e!==o&&(e="\t"),(t=e)===o&&(t=ys,"\\u"===r.substr(ys,2)?(e="\\u",ys+=2):(e=o,0===Ts&&_s(dt)),e!==o&&(n=Eu())!==o&&(s=Eu())!==o&&(u=Eu())!==o&&(a=Eu())!==o?(i=n,l=s,c=u,f=a,t=e=String.fromCharCode(parseInt("0x"+i+l+c+f))):(ys=t,t=o),t===o&&(t=ys,92===r.charCodeAt(ys)?(e="\\",ys++):(e=o,0===Ts&&_s(wt)),e!==o&&(e="\\"),(t=e)===o&&(t=ys,"''"===r.substr(ys,2)?(e="''",ys+=2):(e=o,0===Ts&&_s(ht)),e!==o&&(e="''"),(t=e)===o&&(t=ys,'""'===r.substr(ys,2)?(e='""',ys+=2):(e=o,0===Ts&&_s(yt)),e!==o&&(e='""'),(t=e)===o&&(t=ys,"``"===r.substr(ys,2)?(e="``",ys+=2):(e=o,0===Ts&&_s(Et)),e!==o&&(e="``"),t=e))))))))))))),t}function Lu(){var r,t;return(r=function(){var r,t,e,n;return r=ys,(t=Cu())!==o&&(e=du())!==o&&(n=wu())!==o?r=t={type:"bigint",value:t+e+n}:(ys=r,r=o),r===o&&(r=ys,(t=Cu())!==o&&(e=du())!==o?(t=function(r,t){const e=r+t;return ai(r)?{type:"bigint",value:e}:parseFloat(e)}(t,e),r=t):(ys=r,r=o),r===o&&(r=ys,(t=Cu())!==o&&(e=wu())!==o?(t=function(r,t){return{type:"bigint",value:r+t}}(t,e),r=t):(ys=r,r=o),r===o&&(r=ys,(t=Cu())!==o&&(t=function(r){return ai(r)?{type:"bigint",value:r}:parseFloat(r)}(t)),r=t))),r}())!==o&&(r=(t=r)&&"bigint"===t.type?t:{type:"number",value:t}),r}function Cu(){var t,e,n;return(t=hu())===o&&(t=yu())===o&&(t=ys,45===r.charCodeAt(ys)?(e="-",ys++):(e=o,0===Ts&&_s(Ur)),e===o&&(43===r.charCodeAt(ys)?(e="+",ys++):(e=o,0===Ts&&_s(xr))),e!==o&&(n=hu())!==o?t=e+=n:(ys=t,t=o),t===o&&(t=ys,45===r.charCodeAt(ys)?(e="-",ys++):(e=o,0===Ts&&_s(Ur)),e===o&&(43===r.charCodeAt(ys)?(e="+",ys++):(e=o,0===Ts&&_s(xr))),e!==o&&(n=yu())!==o?t=e=function(r,t){return r+t}(e,n):(ys=t,t=o))),t}function du(){var t,e,n;return t=ys,46===r.charCodeAt(ys)?(e=".",ys++):(e=o,0===Ts&&_s(ar)),e!==o&&(n=hu())!==o?t=e="."+n:(ys=t,t=o),t}function wu(){var t,e,n;return t=ys,(e=function(){var t,e,n,s;return t=ys,St.test(r.charAt(ys))?(e=r.charAt(ys),ys++):(e=o,0===Ts&&_s(_t)),e!==o?(gt.test(r.charAt(ys))?(n=r.charAt(ys),ys++):(n=o,0===Ts&&_s(Ot)),n===o&&(n=null),n!==o?t=e+=null!==(s=n)?s:"":(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(n=hu())!==o?t=e+=n:(ys=t,t=o),t}function hu(){var r,t;if(r=[],(t=yu())!==o)for(;t!==o;)r.push(t),t=yu();else r=o;return r!==o&&(r=r.join("")),r}function yu(){var t;return Tt.test(r.charAt(ys))?(t=r.charAt(ys),ys++):(t=o,0===Ts&&_s(It)),t}function Eu(){var t;return Nt.test(r.charAt(ys))?(t=r.charAt(ys),ys++):(t=o,0===Ts&&_s(Rt)),t}function Au(){var t,e,n,s;return t=ys,"default"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(w)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function mu(){var t,e,n,s;return t=ys,"to"===r.substr(ys,2).toLowerCase()?(e=r.substr(ys,2),ys+=2):(e=o,0===Ts&&_s(kt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Tu(){var t,e,n,s;return t=ys,"drop"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s($t)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="DROP":(ys=t,t=o)):(ys=t,t=o),t}function Iu(){var t,e,n,s;return t=ys,"update"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(jt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Nu(){var t,e,n,s;return t=ys,"create"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Ht)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Ru(){var t,e,n,s;return t=ys,"temporary"===r.substr(ys,9).toLowerCase()?(e=r.substr(ys,9),ys+=9):(e=o,0===Ts&&_s(Yt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Su(){var t,e,n,s;return t=ys,"delete"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Bt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function _u(){var t,e,n,s;return t=ys,"replace"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(Vt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function gu(){var t,e,n,s;return t=ys,"rename"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(qt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Ou(){var t,e,n,s;return t=ys,"partition"===r.substr(ys,9).toLowerCase()?(e=r.substr(ys,9),ys+=9):(e=o,0===Ts&&_s(Zt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="PARTITION":(ys=t,t=o)):(ys=t,t=o),t}function xu(){var t,e,n,s;return t=ys,"into"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(zt)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="INTO":(ys=t,t=o)):(ys=t,t=o),t}function Uu(){var t,e,n,s;return t=ys,"set"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(j)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="SET":(ys=t,t=o)):(ys=t,t=o),t}function Mu(){var t,e,n,s;return t=ys,"as"===r.substr(ys,2).toLowerCase()?(e=r.substr(ys,2),ys+=2):(e=o,0===Ts&&_s(te)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function ku(){var t,e,n,s;return t=ys,"table"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(ee)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="TABLE":(ys=t,t=o)):(ys=t,t=o),t}function Du(){var t,e,n,s;return t=ys,"tables"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(ne)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="TABLES":(ys=t,t=o)):(ys=t,t=o),t}function $u(){var t,e,n,s;return t=ys,"on"===r.substr(ys,2).toLowerCase()?(e=r.substr(ys,2),ys+=2):(e=o,0===Ts&&_s(ue)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Pu(){var t,e,n,s;return t=ys,"join"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(be)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Fu(){var t,e,n,s;return t=ys,"outer"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(ve)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Gu(){var t,e,n,s;return t=ys,"values"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Le)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function ju(){var t,e,n,s;return t=ys,"using"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(Ce)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Hu(){var t,e,n,s;return t=ys,"with"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(cr)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Yu(){var t,e,n,s;return t=ys,"by"===r.substr(ys,2).toLowerCase()?(e=r.substr(ys,2),ys+=2):(e=o,0===Ts&&_s(he)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function Bu(){var t,e,n,s;return t=ys,"all"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(Ne)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="ALL":(ys=t,t=o)):(ys=t,t=o),t}function Wu(){var t,e,n,s;return t=ys,"distinct"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(Re)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="DISTINCT":(ys=t,t=o)):(ys=t,t=o),t}function Xu(){var t,e,n,s;return t=ys,"between"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(Se)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="BETWEEN":(ys=t,t=o)):(ys=t,t=o),t}function Vu(){var t,e,n,s;return t=ys,"in"===r.substr(ys,2).toLowerCase()?(e=r.substr(ys,2),ys+=2):(e=o,0===Ts&&_s(_e)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="IN":(ys=t,t=o)):(ys=t,t=o),t}function qu(){var t,e,n,s;return t=ys,"is"===r.substr(ys,2).toLowerCase()?(e=r.substr(ys,2),ys+=2):(e=o,0===Ts&&_s(ge)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="IS":(ys=t,t=o)):(ys=t,t=o),t}function Ku(){var t,e,n,s;return t=ys,"like"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(Oe)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="LIKE":(ys=t,t=o)):(ys=t,t=o),t}function Zu(){var t,e,n,s;return t=ys,"rlike"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(xe)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="RLIKE":(ys=t,t=o)):(ys=t,t=o),t}function zu(){var t,e,n,s;return t=ys,"exists"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Ue)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="EXISTS":(ys=t,t=o)):(ys=t,t=o),t}function Qu(){var t,e,n,s;return t=ys,"not"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(Me)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="NOT":(ys=t,t=o)):(ys=t,t=o),t}function Ju(){var t,e,n,s;return t=ys,"and"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(ke)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="AND":(ys=t,t=o)):(ys=t,t=o),t}function ra(){var t,e,n,s;return t=ys,"or"===r.substr(ys,2).toLowerCase()?(e=r.substr(ys,2),ys+=2):(e=o,0===Ts&&_s(De)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="OR":(ys=t,t=o)):(ys=t,t=o),t}function ta(){var t,e,n,s;return t=ys,"case"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(Ye)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function ea(){var t,e,n,s;return t=ys,"end"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(Ve)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e=[e,n]:(ys=t,t=o)):(ys=t,t=o),t}function na(){var t,e,n,s;return t=ys,"cast"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(qe)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="CAST":(ys=t,t=o)):(ys=t,t=o),t}function sa(){var t,e,n,s;return t=ys,"char"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(Ke)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="CHAR":(ys=t,t=o)):(ys=t,t=o),t}function oa(){var t,e,n,s;return t=ys,"varchar"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(Ze)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="VARCHAR":(ys=t,t=o)):(ys=t,t=o),t}function ua(){var t,e,n,s;return t=ys,"numeric"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(ze)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="NUMERIC":(ys=t,t=o)):(ys=t,t=o),t}function aa(){var t,e,n,s;return t=ys,"decimal"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(Qe)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="DECIMAL":(ys=t,t=o)):(ys=t,t=o),t}function ia(){var t,e,n,s;return t=ys,"unsigned"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(tn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="UNSIGNED":(ys=t,t=o)):(ys=t,t=o),t}function la(){var t,e,n,s;return t=ys,"int"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(en)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="INT":(ys=t,t=o)):(ys=t,t=o),t}function ca(){var t,e,n,s;return t=ys,"integer"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(sn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="INTEGER":(ys=t,t=o)):(ys=t,t=o),t}function fa(){var t,e,n,s;return t=ys,"smallint"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(un)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="SMALLINT":(ys=t,t=o)):(ys=t,t=o),t}function ba(){var t,e,n,s;return t=ys,"tinyint"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(an)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="TINYINT":(ys=t,t=o)):(ys=t,t=o),t}function va(){var t,e,n,s;return t=ys,"bigint"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(vn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="BIGINT":(ys=t,t=o)):(ys=t,t=o),t}function pa(){var t,e,n,s;return t=ys,"float"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(pn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="FLOAT":(ys=t,t=o)):(ys=t,t=o),t}function La(){var t,e,n,s;return t=ys,"double"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Ln)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="DOUBLE":(ys=t,t=o)):(ys=t,t=o),t}function Ca(){var t,e,n,s;return t=ys,"date"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(Cn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="DATE":(ys=t,t=o)):(ys=t,t=o),t}function da(){var t,e,n,s;return t=ys,"datetime"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(dn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="DATETIME":(ys=t,t=o)):(ys=t,t=o),t}function wa(){var t,e,n,s;return t=ys,"rows"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(wn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="ROWS":(ys=t,t=o)):(ys=t,t=o),t}function ha(){var t,e,n,s;return t=ys,"time"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(hn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="TIME":(ys=t,t=o)):(ys=t,t=o),t}function ya(){var t,e,n,s;return t=ys,"timestamp"===r.substr(ys,9).toLowerCase()?(e=r.substr(ys,9),ys+=9):(e=o,0===Ts&&_s(yn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="TIMESTAMP":(ys=t,t=o)):(ys=t,t=o),t}function Ea(){var t,e,n,s;return t=ys,"current_timestamp"===r.substr(ys,17).toLowerCase()?(e=r.substr(ys,17),ys+=17):(e=o,0===Ts&&_s(xn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="CURRENT_TIMESTAMP":(ys=t,t=o)):(ys=t,t=o),t}function Aa(){var t;return(t=function(){var t;return"@@"===r.substr(ys,2)?(t="@@",ys+=2):(t=o,0===Ts&&_s(jn)),t}())===o&&(t=function(){var t;return 64===r.charCodeAt(ys)?(t="@",ys++):(t=o,0===Ts&&_s(Gn)),t}())===o&&(t=function(){var t;return 36===r.charCodeAt(ys)?(t="$",ys++):(t=o,0===Ts&&_s(Hn)),t}()),t}function ma(){var t;return 61===r.charCodeAt(ys)?(t="=",ys++):(t=o,0===Ts&&_s(yr)),t}function Ta(){var t,e,n,s;return t=ys,"add"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(Xn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="ADD":(ys=t,t=o)):(ys=t,t=o),t}function Ia(){var t,e,n,s;return t=ys,"column"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(Vn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="COLUMN":(ys=t,t=o)):(ys=t,t=o),t}function Na(){var t,e,n,s;return t=ys,"index"===r.substr(ys,5).toLowerCase()?(e=r.substr(ys,5),ys+=5):(e=o,0===Ts&&_s(qn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="INDEX":(ys=t,t=o)):(ys=t,t=o),t}function Ra(){var t,e,n,s;return t=ys,"key"===r.substr(ys,3).toLowerCase()?(e=r.substr(ys,3),ys+=3):(e=o,0===Ts&&_s(v)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="KEY":(ys=t,t=o)):(ys=t,t=o),t}function Sa(){var t,e,n,s;return t=ys,"comment"===r.substr(ys,7).toLowerCase()?(e=r.substr(ys,7),ys+=7):(e=o,0===Ts&&_s(zn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="COMMENT":(ys=t,t=o)):(ys=t,t=o),t}function _a(){var t;return 46===r.charCodeAt(ys)?(t=".",ys++):(t=o,0===Ts&&_s(ar)),t}function ga(){var t;return 44===r.charCodeAt(ys)?(t=",",ys++):(t=o,0===Ts&&_s(us)),t}function Oa(){var t;return 42===r.charCodeAt(ys)?(t="*",ys++):(t=o,0===Ts&&_s(Mr)),t}function xa(){var t;return 40===r.charCodeAt(ys)?(t="(",ys++):(t=o,0===Ts&&_s(or)),t}function Ua(){var t;return 41===r.charCodeAt(ys)?(t=")",ys++):(t=o,0===Ts&&_s(ur)),t}function Ma(){var t;return 91===r.charCodeAt(ys)?(t="[",ys++):(t=o,0===Ts&&_s(as)),t}function ka(){var t;return 93===r.charCodeAt(ys)?(t="]",ys++):(t=o,0===Ts&&_s(is)),t}function Da(){var t;return 59===r.charCodeAt(ys)?(t=";",ys++):(t=o,0===Ts&&_s(ls)),t}function $a(){var t;return(t=function(){var t;return"||"===r.substr(ys,2)?(t="||",ys+=2):(t=o,0===Ts&&_s(cs)),t}())===o&&(t=function(){var t;return"&&"===r.substr(ys,2)?(t="&&",ys+=2):(t=o,0===Ts&&_s(fs)),t}()),t}function Pa(){var r,t;for(r=[],(t=Ya())===o&&(t=Ga());t!==o;)r.push(t),(t=Ya())===o&&(t=Ga());return r}function Fa(){var r,t;if(r=[],(t=Ya())===o&&(t=Ga()),t!==o)for(;t!==o;)r.push(t),(t=Ya())===o&&(t=Ga());else r=o;return r}function Ga(){var t;return(t=function(){var t,e,n,s,u,a;if(t=ys,"/*"===r.substr(ys,2)?(e="/*",ys+=2):(e=o,0===Ts&&_s(bs)),e!==o){for(n=[],s=ys,u=ys,Ts++,"*/"===r.substr(ys,2)?(a="*/",ys+=2):(a=o,0===Ts&&_s(vs)),Ts--,a===o?u=void 0:(ys=u,u=o),u!==o&&(a=Ha())!==o?s=u=[u,a]:(ys=s,s=o);s!==o;)n.push(s),s=ys,u=ys,Ts++,"*/"===r.substr(ys,2)?(a="*/",ys+=2):(a=o,0===Ts&&_s(vs)),Ts--,a===o?u=void 0:(ys=u,u=o),u!==o&&(a=Ha())!==o?s=u=[u,a]:(ys=s,s=o);n!==o?("*/"===r.substr(ys,2)?(s="*/",ys+=2):(s=o,0===Ts&&_s(vs)),s!==o?t=e=[e,n,s]:(ys=t,t=o)):(ys=t,t=o)}else ys=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=ys,"--"===r.substr(ys,2)?(e="--",ys+=2):(e=o,0===Ts&&_s(ps)),e!==o){for(n=[],s=ys,u=ys,Ts++,a=Ba(),Ts--,a===o?u=void 0:(ys=u,u=o),u!==o&&(a=Ha())!==o?s=u=[u,a]:(ys=s,s=o);s!==o;)n.push(s),s=ys,u=ys,Ts++,a=Ba(),Ts--,a===o?u=void 0:(ys=u,u=o),u!==o&&(a=Ha())!==o?s=u=[u,a]:(ys=s,s=o);n!==o?t=e=[e,n]:(ys=t,t=o)}else ys=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=ys,35===r.charCodeAt(ys)?(e="#",ys++):(e=o,0===Ts&&_s(Ls)),e!==o){for(n=[],s=ys,u=ys,Ts++,a=Ba(),Ts--,a===o?u=void 0:(ys=u,u=o),u!==o&&(a=Ha())!==o?s=u=[u,a]:(ys=s,s=o);s!==o;)n.push(s),s=ys,u=ys,Ts++,a=Ba(),Ts--,a===o?u=void 0:(ys=u,u=o),u!==o&&(a=Ha())!==o?s=u=[u,a]:(ys=s,s=o);n!==o?t=e=[e,n]:(ys=t,t=o)}else ys=t,t=o;return t}()),t}function ja(){var r,t,e,n,s,u,a;return r=ys,(t=Sa())!==o&&Pa()!==o?((e=ma())===o&&(e=null),e!==o&&Pa()!==o&&(n=fu())!==o?(u=e,a=n,r=t={type:(s=t).toLowerCase(),keyword:s.toLowerCase(),symbol:u,value:a}):(ys=r,r=o)):(ys=r,r=o),r}function Ha(){var t;return r.length>ys?(t=r.charAt(ys),ys++):(t=o,0===Ts&&_s(Cs)),t}function Ya(){var t;return ds.test(r.charAt(ys))?(t=r.charAt(ys),ys++):(t=o,0===Ts&&_s(ws)),t}function Ba(){var t,e;if((t=function(){var t,e;return t=ys,Ts++,r.length>ys?(e=r.charAt(ys),ys++):(e=o,0===Ts&&_s(Cs)),Ts--,e===o?t=void 0:(ys=t,t=o),t}())===o)if(t=[],At.test(r.charAt(ys))?(e=r.charAt(ys),ys++):(e=o,0===Ts&&_s(mt)),e!==o)for(;e!==o;)t.push(e),At.test(r.charAt(ys))?(e=r.charAt(ys),ys++):(e=o,0===Ts&&_s(mt));else t=o;return t}function Wa(){var t,e;return t=ys,bi=[],void 0!==o&&Pa()!==o?((e=Xa())===o&&(e=function(){var t,e;return t=ys,function(){var t;return"return"===r.substr(ys,6).toLowerCase()?(t=r.substr(ys,6),ys+=6):(t=o,0===Ts&&_s(Yn)),t}()!==o&&Pa()!==o&&(e=Va())!==o?t={type:"return",expr:e}:(ys=t,t=o),t}()),e!==o?t={stmt:e,vars:bi}:(ys=t,t=o)):(ys=t,t=o),t}function Xa(){var t,e,n,s;return t=ys,(e=ri())===o&&(e=ti()),e!==o&&Pa()!==o?((n=function(){var t;return":="===r.substr(ys,2)?(t=":=",ys+=2):(t=o,0===Ts&&_s(Bn)),t}())===o&&(n=ma()),n!==o&&Pa()!==o&&(s=Va())!==o?t=e={type:"assign",left:e,symbol:n,right:s}:(ys=t,t=o)):(ys=t,t=o),t}function Va(){var r;return(r=Ks())===o&&(r=function(){var r,t,e,n,s;return r=ys,(t=ri())!==o&&Pa()!==o&&(e=vo())!==o&&Pa()!==o&&(n=ri())!==o&&Pa()!==o&&(s=Lo())!==o?r=t={type:"join",ltable:t,rtable:n,op:e,on:s}:(ys=r,r=o),r}())===o&&(r=qa())===o&&(r=function(){var r,t;return r=ys,Ma()!==o&&Pa()!==o&&(t=Ja())!==o&&Pa()!==o&&ka()!==o?r={type:"array",value:t}:(ys=r,r=o),r}()),r}function qa(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Ka())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=Wo())!==o&&(a=Pa())!==o&&(i=Ka())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=Wo())!==o&&(a=Pa())!==o&&(i=Ka())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=Er(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function Ka(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Za())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=Vo())!==o&&(a=Pa())!==o&&(i=Za())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=Vo())!==o&&(a=Pa())!==o&&(i=Za())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=Er(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function Za(){var r,t,e;return(r=lu())===o&&(r=ri())===o&&(r=Qa())===o&&(r=ou())===o&&(r=ys,xa()!==o&&Pa()!==o&&(t=qa())!==o&&Pa()!==o&&Ua()!==o?((e=t).parentheses=!0,r=e):(ys=r,r=o)),r}function za(){var r,t,e,n,s,u,a;return r=ys,(t=tu())!==o?(e=ys,(n=Pa())!==o&&(s=_a())!==o&&(u=Pa())!==o&&(a=tu())!==o?e=n=[n,s,u,a]:(ys=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){let e=r;return null!==t&&(e=`${r}.${t[3]}`),e}(t,e):(ys=r,r=o)):(ys=r,r=o),r}function Qa(){var r,t,e;return r=ys,(t=za())!==o&&Pa()!==o&&xa()!==o&&Pa()!==o?((e=Ja())===o&&(e=null),e!==o&&Pa()!==o&&Ua()!==o?r=t={type:"function",name:t,args:{type:"expr_list",value:e}}:(ys=r,r=o)):(ys=r,r=o),r===o&&(r=ys,(t=za())!==o&&(t=function(r){return{type:"function",name:r,args:null}}(t)),r=t),r}function Ja(){var r,t,e,n,s,u,a,i;if(r=ys,(t=Za())!==o){for(e=[],n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Za())!==o?n=s=[s,u,a,i]:(ys=n,n=o);n!==o;)e.push(n),n=ys,(s=Pa())!==o&&(u=ga())!==o&&(a=Pa())!==o&&(i=Za())!==o?n=s=[s,u,a,i]:(ys=n,n=o);e!==o?r=t=c(t,e):(ys=r,r=o)}else ys=r,r=o;return r}function ri(){var r,t,e,n,s;return r=ys,(t=Aa())!==o&&(e=ti())!==o?(n=t,s=e,r=t={type:"var",...s,prefix:n}):(ys=r,r=o),r}function ti(){var t,e,n,s,u;return t=ys,(e=tu())!==o&&(n=function(){var t,e,n,s;for(t=[],e=ys,46===r.charCodeAt(ys)?(n=".",ys++):(n=o,0===Ts&&_s(ar)),n!==o&&(s=tu())!==o?e=n=[n,s]:(ys=e,e=o);e!==o;)t.push(e),e=ys,46===r.charCodeAt(ys)?(n=".",ys++):(n=o,0===Ts&&_s(ar)),n!==o&&(s=tu())!==o?e=n=[n,s]:(ys=e,e=o);return t!==o&&(t=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e][1]);return t}(t)),t}())!==o?(s=e,u=n,bi.push(s),t=e={type:"var",name:s,members:u,prefix:null}):(ys=t,t=o),t===o&&(t=ys,(e=Lu())!==o&&(e={type:"var",name:e.value,members:[],quoted:null,prefix:null}),t=e),t}function ei(){var t;return(t=function(){var t,e,n,s;if(t=ys,(e=sa())===o&&(e=oa()),e!==o)if(Pa()!==o)if(xa()!==o)if(Pa()!==o){if(n=[],Tt.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(It)),s!==o)for(;s!==o;)n.push(s),Tt.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(It));else n=o;n!==o&&(s=Pa())!==o&&Ua()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(ys=t,t=o)}else ys=t,t=o;else ys=t,t=o;else ys=t,t=o;else ys=t,t=o;return t===o&&(t=ys,(e=sa())===o&&(e=oa())===o&&(e=function(){var t,e,n,s;return t=ys,"string"===r.substr(ys,6).toLowerCase()?(e=r.substr(ys,6),ys+=6):(e=o,0===Ts&&_s(rn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="STRING":(ys=t,t=o)):(ys=t,t=o),t}()),e!==o&&(e=hs(e)),t=e),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(t=ys,(e=ua())===o&&(e=aa())===o&&(e=la())===o&&(e=ca())===o&&(e=fa())===o&&(e=ba())===o&&(e=va())===o&&(e=pa())===o&&(e=La()),e!==o)if((n=Pa())!==o)if((s=xa())!==o)if((u=Pa())!==o){if(a=[],Tt.test(r.charAt(ys))?(i=r.charAt(ys),ys++):(i=o,0===Ts&&_s(It)),i!==o)for(;i!==o;)a.push(i),Tt.test(r.charAt(ys))?(i=r.charAt(ys),ys++):(i=o,0===Ts&&_s(It));else a=o;if(a!==o)if((i=Pa())!==o){if(l=ys,(c=ga())!==o)if((f=Pa())!==o){if(b=[],Tt.test(r.charAt(ys))?(v=r.charAt(ys),ys++):(v=o,0===Ts&&_s(It)),v!==o)for(;v!==o;)b.push(v),Tt.test(r.charAt(ys))?(v=r.charAt(ys),ys++):(v=o,0===Ts&&_s(It));else b=o;b!==o?l=c=[c,f,b]:(ys=l,l=o)}else ys=l,l=o;else ys=l,l=o;l===o&&(l=null),l!==o&&(c=Pa())!==o&&(f=Ua())!==o&&(b=Pa())!==o?((v=ni())===o&&(v=null),v!==o?(p=l,L=v,t=e={dataType:e,length:parseInt(a.join(""),10),scale:p&&parseInt(p[2].join(""),10),parentheses:!0,suffix:L}):(ys=t,t=o)):(ys=t,t=o)}else ys=t,t=o;else ys=t,t=o}else ys=t,t=o;else ys=t,t=o;else ys=t,t=o;else ys=t,t=o;if(t===o){if(t=ys,(e=ua())===o&&(e=aa())===o&&(e=la())===o&&(e=ca())===o&&(e=fa())===o&&(e=ba())===o&&(e=va())===o&&(e=pa())===o&&(e=La()),e!==o){if(n=[],Tt.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(It)),s!==o)for(;s!==o;)n.push(s),Tt.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(It));else n=o;n!==o&&(s=Pa())!==o?((u=ni())===o&&(u=null),u!==o?(e=function(r,t,e){return{dataType:r,length:parseInt(t.join(""),10),suffix:e}}(e,n,u),t=e):(ys=t,t=o)):(ys=t,t=o)}else ys=t,t=o;t===o&&(t=ys,(e=ua())===o&&(e=aa())===o&&(e=la())===o&&(e=ca())===o&&(e=fa())===o&&(e=ba())===o&&(e=va())===o&&(e=pa())===o&&(e=La()),e!==o&&(n=Pa())!==o?((s=ni())===o&&(s=null),s!==o&&(u=Pa())!==o?(e=function(r,t){return{dataType:r,suffix:t}}(e,s),t=e):(ys=t,t=o)):(ys=t,t=o))}return t}())===o&&(t=function(){var t,e,n,s;if(t=ys,(e=Ca())===o&&(e=da())===o&&(e=ha())===o&&(e=ya()),e!==o)if(Pa()!==o)if(xa()!==o)if(Pa()!==o){if(n=[],Tt.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(It)),s!==o)for(;s!==o;)n.push(s),Tt.test(r.charAt(ys))?(s=r.charAt(ys),ys++):(s=o,0===Ts&&_s(It));else n=o;n!==o&&(s=Pa())!==o&&Ua()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(ys=t,t=o)}else ys=t,t=o;else ys=t,t=o;else ys=t,t=o;else ys=t,t=o;return t===o&&(t=ys,(e=Ca())===o&&(e=da())===o&&(e=ha())===o&&(e=ya()),e!==o&&(e=function(r){return{dataType:r}}(e)),t=e),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ys,"json"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(on)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="JSON":(ys=t,t=o)):(ys=t,t=o),t}())!==o&&(t=hs(t)),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ys,"tinytext"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(ln)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="TINYTEXT":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"text"===r.substr(ys,4).toLowerCase()?(e=r.substr(ys,4),ys+=4):(e=o,0===Ts&&_s(cn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="TEXT":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"mediumtext"===r.substr(ys,10).toLowerCase()?(e=r.substr(ys,10),ys+=10):(e=o,0===Ts&&_s(fn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="MEDIUMTEXT":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ys,"longtext"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(bn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="LONGTEXT":(ys=t,t=o)):(ys=t,t=o),t}()),t!==o&&(t={dataType:t}),t}()),t}function ni(){var t,e,n;return t=ys,(e=ia())===o&&(e=null),e!==o&&Pa()!==o?((n=function(){var t,e,n,s;return t=ys,"zerofill"===r.substr(ys,8).toLowerCase()?(e=r.substr(ys,8),ys+=8):(e=o,0===Ts&&_s(nn)),e!==o?(n=ys,Ts++,s=eu(),Ts--,s===o?n=void 0:(ys=n,n=o),n!==o?t=e="ZEROFILL":(ys=t,t=o)):(ys=t,t=o),t}())===o&&(n=null),n!==o?t=e=function(r,t){const e=[];return r&&e.push(r),t&&e.push(t),e}(e,n):(ys=t,t=o)):(ys=t,t=o),t}const si={ALTER:!0,ALL:!0,ADD:!0,AND:!0,AS:!0,ASC:!0,BETWEEN:!0,BY:!0,CALL:!0,CASE:!0,CREATE:!0,CROSS:!0,CONTAINS:!0,CURRENT_DATE:!0,CURRENT_TIME:!0,CURRENT_TIMESTAMP:!0,CURRENT_USER:!0,DELETE:!0,DESC:!0,DISTINCT:!0,DROP:!0,ELSE:!0,END:!0,EXISTS:!0,EXPLAIN:!0,FALSE:!0,FROM:!0,FULL:!0,GROUP:!0,HAVING:!0,IN:!0,INNER:!0,INSERT:!0,INTO:!0,IS:!0,JOIN:!0,JSON:!0,KEY:!0,LEFT:!0,LIKE:!0,LIMIT:!0,LOW_PRIORITY:!0,NOT:!0,NULL:!0,ON:!0,OR:!0,ORDER:!0,OUTER:!0,RECURSIVE:!0,RENAME:!0,READ:!0,RIGHT:!0,SELECT:!0,SESSION_USER:!0,SET:!0,SHOW:!0,SYSTEM_USER:!0,TABLE:!0,THEN:!0,TRUE:!0,TRUNCATE:!0,UNION:!0,UPDATE:!0,USING:!0,VALUES:!0,WITH:!0,WHEN:!0,WHERE:!0,WRITE:!0,GLOBAL:!0,SESSION:!0,LOCAL:!0,PERSIST:!0,PERSIST_ONLY:!0};function oi(r,t){return{type:"unary_expr",operator:r,expr:t}}function ui(r,t,e){return{type:"binary_expr",operator:r,left:t,right:e}}function ai(r){const t=n(Number.MAX_SAFE_INTEGER);return!(n(r)<t)}function ii(r,t,e=3){const n=[r];for(let r=0;r<t.length;r++)delete t[r][e].tableList,delete t[r][e].columnList,n.push(t[r][e]);return n}function li(r,t){let e=r;for(let r=0;r<t.length;r++)e=ui(t[r][1],e,t[r][3]);return e}function ci(r){return Li[r]||r||null}function fi(r){const t=new Set;for(let e of r.keys()){const r=e.split("::");if(!r){t.add(e);break}r&&r[1]&&(r[1]=ci(r[1])),t.add(r.join("::"))}return Array.from(t)}let bi=[];const vi=new Set,pi=new Set,Li={};if((e=a())!==o&&ys===r.length)return e;throw e!==o&&ys<r.length&&_s({type:"end"}),function(r,t,e){return new s(s.buildMessage(r,t),r,t,e)}(ms,As<r.length?r.charAt(As):null,As<r.length?Ss(As,As+1):Ss(As,As))}}},function(r,t,e){var n=e(0);function s(r,t,e,n){this.message=r,this.expected=t,this.found=e,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,s)}!function(r,t){function e(){this.constructor=r}e.prototype=t.prototype,r.prototype=new e}(s,Error),s.buildMessage=function(r,t){var e={literal:function(r){return'"'+s(r.text)+'"'},class:function(r){var t,e="";for(t=0;t<r.parts.length;t++)e+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+e+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function n(r){return r.charCodeAt(0).toString(16).toUpperCase()}function s(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}function o(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}return"Expected "+function(r){var t,n,s,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(s=r[t],e[s.type](s));if(o.sort(),o.length>0){for(t=1,n=1;t<o.length;t++)o[t-1]!==o[t]&&(o[n]=o[t],n++);o.length=n}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+s(r)+'"':"end of input"}(t)+" found."},r.exports={SyntaxError:s,parse:function(r,t){t=void 0!==t?t:{};var e,o={},u={start:Ga},a=Ga,i=function(r,t){return mb(r,t)},l=function(r,t){return mb(r,t,1)},c=ka("IF",!0),f=ka("CASCADED",!0),b=ka("LOCAL",!0),v=ka("CHECK",!0),p=ka("OPTION",!1),L=ka("ALGORITHM",!0),C=ka("UNDEFINED",!0),d=ka("MERGE",!0),w=ka("TEMPTABLE",!0),h=ka("SQL",!0),y=ka("SECURITY",!0),E=ka("DEFINER",!0),A=ka("INVOKER",!0),m=function(r,t){return mb(r,t)},T=ka("AUTO_INCREMENT",!0),I=ka("UNIQUE",!0),N=ka("KEY",!0),R=ka("PRIMARY",!0),S=ka("@",!1),_=ka("BEFORE",!0),g=ka("AFTER",!0),O=ka("FOR",!0),x=ka("EACH",!0),U=ka("ROW",!0),M=ka("STATEMENT",!0),k=ka("FOLLOWS",!0),D=ka("PRECEDES",!0),$=ka("COLUMN_FORMAT",!0),P=ka("FIXED",!0),F=ka("DYNAMIC",!0),G=ka("DEFAULT",!0),j=ka("STORAGE",!0),H=ka("DISK",!0),Y=ka("MEMORY",!0),B=ka("GENERATED",!0),W=ka("ALWAYS",!0),X=ka("AS",!0),V=ka("STORED",!0),q=ka("VIRTUAL",!0),K=ka("if",!0),Z=ka("exists",!0),z=ka("INSTANT",!0),Q=ka("INPLACE",!0),J=ka("COPY",!0),rr=ka("LOCK",!0),tr=ka("NONE",!0),er=ka("SHARED",!0),nr=ka("EXCLUSIVE",!0),sr=ka("CHANGE",!0),or=ka("FIRST",!0),ur=ka("FOREIGN",!0),ar=ka("NOCHECK",!0),ir=ka("NOT",!0),lr=ka("REPLICATION",!0),cr=ka("FOREIGN KEY",!0),fr=ka("ENFORCED",!0),br=ka("MATCH FULL",!0),vr=ka("MATCH PARTIAL",!0),pr=ka("MATCH SIMPLE",!0),Lr=ka("RESTRICT",!0),Cr=ka("CASCADE",!0),dr=ka("SET NULL",!0),wr=ka("NO ACTION",!0),hr=ka("SET DEFAULT",!0),yr=ka("CHARACTER",!0),Er=ka("SET",!0),Ar=ka("CHARSET",!0),mr=ka("COLLATE",!0),Tr=ka("AVG_ROW_LENGTH",!0),Ir=ka("KEY_BLOCK_SIZE",!0),Nr=ka("MAX_ROWS",!0),Rr=ka("MIN_ROWS",!0),Sr=ka("STATS_SAMPLE_PAGES",!0),_r=ka("CHECKSUM",!1),gr=ka("DELAY_KEY_WRITE",!1),Or=/^[01]/,xr=Da(["0","1"],!1,!1),Ur=ka("CONNECTION",!0),Mr=ka("ENGINE_ATTRIBUTE",!0),kr=ka("SECONDARY_ENGINE_ATTRIBUTE",!0),Dr=ka("DATA",!0),$r=ka("INDEX",!0),Pr=ka("DIRECTORY",!0),Fr=ka("COMPRESSION",!0),Gr=ka("'",!1),jr=ka("ZLIB",!0),Hr=ka("LZ4",!0),Yr=ka("ENGINE",!0),Br=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.toUpperCase()}},Wr=ka("ROW_FORMAT",!0),Xr=ka("COMPRESSED",!0),Vr=ka("REDUNDANT",!0),qr=ka("COMPACT",!0),Kr=ka("READ",!0),Zr=ka("LOW_PRIORITY",!0),zr=ka("WRITE",!0),Qr=function(r,t){return mb(r,t)},Jr=ka("BINARY",!0),rt=ka("MASTER",!0),tt=ka("LOGS",!0),et=ka("TRIGGERS",!0),nt=ka("STATUS",!0),st=ka("PROCESSLIST",!0),ot=ka("PROCEDURE",!0),ut=ka("FUNCTION",!0),at=ka("BINLOG",!0),it=ka("EVENTS",!0),lt=ka("COLLATION",!0),ct=ka("DATABASES",!0),ft=ka("COLUMNS",!0),bt=ka("INDEXES",!0),vt=ka("EVENT",!0),pt=ka("GRANTS",!0),Lt=ka("VIEW",!0),Ct=ka("GRANT",!0),dt=ka("OPTION",!0),wt=function(r){return{type:"origin",value:Array.isArray(r)?r[0]:r}},ht=ka("ROUTINE",!0),yt=ka("EXECUTE",!0),Et=function(r,t){return mb(r,t)},At=ka("ADMIN",!0),mt=ka("GRANT",!1),Tt=ka("PROXY",!1),It=ka("(",!1),Nt=ka(")",!1),Rt=/^[0-9]/,St=Da([["0","9"]],!1,!1),_t=ka("IN",!0),gt=ka("SHARE",!0),Ot=ka("MODE",!0),xt=ka("WAIT",!0),Ut=ka("NOWAIT",!0),Mt=ka("SKIP",!0),kt=ka("LOCKED",!0),Dt=ka("NATURAL",!0),$t=ka("LANGUAGE",!0),Pt=ka("WITH",!0),Ft=ka("QUERY",!0),Gt=ka("EXPANSION",!0),jt=ka("BOOLEAN",!0),Ht=ka("MATCH",!0),Yt=ka("AGAINST",!1),Bt=ka("OUTFILE",!0),Wt=ka("DUMPFILE",!0),Xt=ka("BTREE",!0),Vt=ka("HASH",!0),qt=ka("PARSER",!0),Kt=ka("VISIBLE",!0),Zt=ka("INVISIBLE",!0),zt=function(r,t){return t.unshift(r),t.forEach((r=>{const{table:t,as:e}=r;gb[t]=t,e&&(gb[e]=t),function(r){const t=Nb(r);r.clear(),t.forEach((t=>r.add(t)))}(_b)})),t},Qt=/^[_0-9]/,Jt=Da(["_",["0","9"]],!1,!1),re=ka("?",!1),te=ka("=",!1),ee=ka("DUPLICATE",!0),ne=function(r,t){return Tb(r,t)},se=function(r){return r[0]+" "+r[2]},oe=ka(">=",!1),ue=ka(">",!1),ae=ka("<=",!1),ie=ka("<>",!1),le=ka("<",!1),ce=ka("!=",!1),fe=ka("ESCAPE",!0),be=ka("+",!1),ve=ka("-",!1),pe=ka("*",!1),Le=ka("/",!1),Ce=ka("%",!1),de=ka("||",!1),we=ka("div",!0),he=ka("&",!1),ye=ka(">>",!1),Ee=ka("<<",!1),Ae=ka("^",!1),me=ka("|",!1),Te=ka("!",!1),Ie=ka("~",!1),Ne=function(r){return!0===wb[r.toUpperCase()]},Re=ka('"',!1),Se=/^[^"]/,_e=Da(['"'],!0,!1),ge=function(r){return r.join("")},Oe=/^[^']/,xe=Da(["'"],!0,!1),Ue=ka("`",!1),Me=/^[^`\\]/,ke=Da(["`","\\"],!0,!1),De=function(r,t){return r+t.join("")},$e=/^[A-Za-z_]/,Pe=Da([["A","Z"],["a","z"],"_"],!1,!1),Fe=/^[A-Za-z0-9_$\x80-\uFFFF]/,Ge=Da([["A","Z"],["a","z"],["0","9"],"_","$",["",""]],!1,!1),je=/^[A-Za-z0-9_:]/,He=Da([["A","Z"],["a","z"],["0","9"],"_",":"],!1,!1),Ye=ka(":",!1),Be=ka("NOW",!0),We=ka("OVER",!0),Xe=ka("WINDOW",!0),Ve=ka("FOLLOWING",!0),qe=ka("PRECEDING",!0),Ke=ka("CURRENT",!0),Ze=ka("UNBOUNDED",!0),ze=ka("SEPARATOR",!0),Qe=ka("YEAR_MONTH",!0),Je=ka("DAY_HOUR",!0),rn=ka("DAY_MINUTE",!0),tn=ka("DAY_SECOND",!0),en=ka("DAY_MICROSECOND",!0),nn=ka("HOUR_MINUTE",!0),sn=ka("HOUR_SECOND",!0),on=ka("HOUR_MICROSECOND",!0),un=ka("MINUTE_SECOND",!0),an=ka("MINUTE_MICROSECOND",!0),ln=ka("SECOND_MICROSECOND",!0),cn=ka("TIMEZONE_HOUR",!0),fn=ka("TIMEZONE_MINUTE",!0),bn=ka("CENTURY",!0),vn=ka("DAY",!0),pn=ka("DATE",!0),Ln=ka("DECADE",!0),Cn=ka("DOW",!0),dn=ka("DOY",!0),wn=ka("EPOCH",!0),hn=ka("HOUR",!0),yn=ka("ISODOW",!0),En=ka("ISOWEEK",!0),An=ka("ISOYEAR",!0),mn=ka("MICROSECONDS",!0),Tn=ka("MILLENNIUM",!0),In=ka("MILLISECONDS",!0),Nn=ka("MINUTE",!0),Rn=ka("MONTH",!0),Sn=ka("QUARTER",!0),_n=ka("SECOND",!0),gn=ka("TIME",!0),On=ka("TIMEZONE",!0),xn=ka("WEEK",!0),Un=ka("YEAR",!0),Mn=ka("DATE_TRUNC",!0),kn=ka("BOTH",!0),Dn=ka("LEADING",!0),$n=ka("TRAILING",!0),Pn=ka("trim",!0),Fn=ka("convert",!0),Gn=ka("binary",!0),jn=ka("_binary",!0),Hn=ka("_latin1",!0),Yn=ka("X",!0),Bn=/^[0-9A-Fa-f]/,Wn=Da([["0","9"],["A","F"],["a","f"]],!1,!1),Xn=ka("b",!0),Vn=ka("0x",!0),qn=ka("N",!0),Kn=function(r,t){return{type:r.toLowerCase(),value:t[1].join("")}},Zn=/^[^"\\\0-\x1F\x7F]/,zn=Da(['"',"\\",["\0",""],""],!0,!1),Qn=/^[^'\\]/,Jn=Da(["'","\\"],!0,!1),rs=ka("\\'",!1),ts=ka('\\"',!1),es=ka("\\\\",!1),ns=ka("\\/",!1),ss=ka("\\b",!1),os=ka("\\f",!1),us=ka("\\n",!1),as=ka("\\r",!1),is=ka("\\t",!1),ls=ka("\\u",!1),cs=ka("\\",!1),fs=ka("''",!1),bs=ka('""',!1),vs=ka("``",!1),ps=/^[\n\r]/,Ls=Da(["\n","\r"],!1,!1),Cs=ka(".",!1),ds=/^[0-9a-fA-F]/,ws=Da([["0","9"],["a","f"],["A","F"]],!1,!1),hs=/^[eE]/,ys=Da(["e","E"],!1,!1),Es=/^[+\-]/,As=Da(["+","-"],!1,!1),ms=ka("NULL",!0),Ts=ka("NOT NULL",!0),Is=ka("TRUE",!0),Ns=ka("TO",!0),Rs=ka("FALSE",!0),Ss=ka("SHOW",!0),_s=ka("DROP",!0),gs=ka("USE",!0),Os=ka("ALTER",!0),xs=ka("SELECT",!0),Us=ka("UPDATE",!0),Ms=ka("CREATE",!0),ks=ka("TEMPORARY",!0),Ds=ka("DELETE",!0),$s=ka("INSERT",!0),Ps=ka("RECURSIVE",!1),Fs=ka("REPLACE",!0),Gs=ka("RENAME",!0),js=ka("IGNORE",!0),Hs=ka("PARTITION",!0),Ys=ka("INTO",!0),Bs=ka("FROM",!0),Ws=ka("UNLOCK",!0),Xs=ka("TABLE",!0),Vs=ka("TRIGGER",!0),qs=ka("TABLES",!0),Ks=ka("DATABASE",!0),Zs=ka("SCHEMA",!0),zs=ka("ON",!0),Qs=ka("LEFT",!0),Js=ka("RIGHT",!0),ro=ka("FULL",!0),to=ka("INNER",!0),eo=ka("CROSS",!0),no=ka("JOIN",!0),so=ka("OUTER",!0),oo=ka("UNION",!0),uo=ka("MINUS",!0),ao=ka("INTERSECT",!0),io=ka("VALUES",!0),lo=ka("USING",!0),co=ka("WHERE",!0),fo=ka("GO",!0),bo=ka("GROUP",!0),vo=ka("BY",!0),po=ka("ORDER",!0),Lo=ka("HAVING",!0),Co=ka("LIMIT",!0),wo=ka("OFFSET",!0),ho=ka("ASC",!0),yo=ka("DESC",!0),Eo=ka("DESCRIBE",!0),Ao=ka("ALL",!0),mo=ka("DISTINCT",!0),To=ka("BETWEEN",!0),Io=ka("IS",!0),No=ka("LIKE",!0),Ro=ka("RLIKE",!0),So=ka("REGEXP",!0),_o=ka("EXISTS",!0),go=ka("AND",!0),Oo=ka("OR",!0),xo=ka("COUNT",!0),Uo=ka("GROUP_CONCAT",!0),Mo=ka("MAX",!0),ko=ka("MIN",!0),Do=ka("SUM",!0),$o=ka("AVG",!0),Po=ka("EXTRACT",!0),Fo=ka("CALL",!0),Go=ka("CASE",!0),jo=ka("WHEN",!0),Ho=ka("THEN",!0),Yo=ka("ELSE",!0),Bo=ka("END",!0),Wo=ka("CAST",!0),Xo=ka("VARBINARY",!0),Vo=ka("BIT",!0),qo=ka("CHAR",!0),Ko=ka("VARCHAR",!0),Zo=ka("NUMERIC",!0),zo=ka("DECIMAL",!0),Qo=ka("SIGNED",!0),Jo=ka("UNSIGNED",!0),ru=ka("INT",!0),tu=ka("ZEROFILL",!0),eu=ka("INTEGER",!0),nu=ka("JSON",!0),su=ka("SMALLINT",!0),ou=ka("MEDIUMINT",!0),uu=ka("TINYINT",!0),au=ka("TINYTEXT",!0),iu=ka("TEXT",!0),lu=ka("MEDIUMTEXT",!0),cu=ka("LONGTEXT",!0),fu=ka("BIGINT",!0),bu=ka("ENUM",!0),vu=ka("FLOAT",!0),pu=ka("DOUBLE",!0),Lu=ka("DATETIME",!0),Cu=ka("ROWS",!0),du=ka("TIMESTAMP",!0),wu=ka("TRUNCATE",!0),hu=ka("USER",!0),yu=ka("CURRENT_DATE",!0),Eu=ka("INTERVAL",!0),Au=ka("MICROSECOND",!0),mu=ka("CURRENT_TIME",!0),Tu=ka("CURRENT_TIMESTAMP",!0),Iu=ka("CURRENT_USER",!0),Nu=ka("SESSION_USER",!0),Ru=ka("SYSTEM_USER",!0),Su=ka("GLOBAL",!0),_u=ka("SESSION",!0),gu=ka("PERSIST",!0),Ou=ka("PERSIST_ONLY",!0),xu=ka("GEOMETRY",!0),Uu=ka("POINT",!0),Mu=ka("LINESTRING",!0),ku=ka("POLYGON",!0),Du=ka("MULTIPOINT",!0),$u=ka("MULTILINESTRING",!0),Pu=ka("MULTIPOLYGON",!0),Fu=ka("GEOMETRYCOLLECTION",!0),Gu=ka("@@",!1),ju=ka("$",!1),Hu=ka("return",!0),Yu=ka(":=",!1),Bu=ka("DUAL",!0),Wu=ka("ADD",!0),Xu=ka("COLUMN",!0),Vu=ka("MODIFY",!0),qu=ka("FULLTEXT",!0),Ku=ka("SPATIAL",!0),Zu=ka("COMMENT",!0),zu=ka("CONSTRAINT",!0),Qu=ka("REFERENCES",!0),Ju=ka("SQL_CALC_FOUND_ROWS",!0),ra=ka("SQL_CACHE",!0),ta=ka("SQL_NO_CACHE",!0),ea=ka("SQL_SMALL_RESULT",!0),na=ka("SQL_BIG_RESULT",!0),sa=ka("SQL_BUFFER_RESULT",!0),oa=ka(",",!1),ua=ka("[",!1),aa=ka("]",!1),ia=ka(";",!1),la=ka("->",!1),ca=ka("->>",!1),fa=ka("&&",!1),ba=ka("XOR",!0),va=ka("/*",!1),pa=ka("*/",!1),La=ka("--",!1),Ca=ka("#",!1),da={type:"any"},wa=/^[ \t\n\r]/,ha=Da([" ","\t","\n","\r"],!1,!1),ya=function(r,t,e){return{type:"assign",left:r,symbol:t,right:e}},Ea=ka("boolean",!0),Aa=ka("blob",!0),ma=ka("tinyblob",!0),Ta=ka("mediumblob",!0),Ia=ka("longblob",!0),Na=function(r){return{dataType:r}},Ra=/^[0-6]/,Sa=Da([["0","6"]],!1,!1),_a=function(r){return{dataType:r}},ga=0,Oa=[{line:1,column:1}],xa=0,Ua=[],Ma=0;if("startRule"in t){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function ka(r,t){return{type:"literal",text:r,ignoreCase:t}}function Da(r,t,e){return{type:"class",parts:r,inverted:t,ignoreCase:e}}function $a(t){var e,n=Oa[t];if(n)return n;for(e=t-1;!Oa[e];)e--;for(n={line:(n=Oa[e]).line,column:n.column};e<t;)10===r.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return Oa[t]=n,n}function Pa(r,t){var e=$a(r),n=$a(t);return{start:{offset:r,line:e.line,column:e.column},end:{offset:t,line:n.line,column:n.column}}}function Fa(r){ga<xa||(ga>xa&&(xa=ga,Ua=[]),Ua.push(r))}function Ga(){var r,t,e,n,s,u,a,i;if(r=ga,(t=ja())!==o)if(Kf()!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=$c())!==o&&(a=Kf())!==o&&(i=ja())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=$c())!==o&&(a=Kf())!==o&&(i=ja())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=function(r,t){if(!t||0===t.length)return r;delete r.tableList,delete r.columnList;let e=r;for(let r=0;r<t.length;r++)delete t[r][3].tableList,delete t[r][3].columnList,e.go_next=t[r][3],e.go="go",e=e.go_next;return{tableList:Array.from(Sb),columnList:Nb(_b),ast:r}}(t,e):(ga=r,r=o)}else ga=r,r=o;else ga=r,r=o;return r}function ja(){var r,t;return r=ga,Kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=Ya())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=Wf())!==o&&(a=Kf())!==o&&(i=Ya())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=Wf())!==o&&(a=Kf())!==o&&(i=Ya())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?(t=function(r,t){const e=r&&r.ast||r,n=t&&t.length&&t[0].length>=4?[e]:e;for(let r=0;r<t.length;r++)t[r][3]&&0!==t[r][3].length&&n.push(t[r][3]&&t[r][3].ast||t[r][3]);return{tableList:Array.from(Sb),columnList:Nb(_b),ast:n}}(t,e),r=t):(ga=r,r=o)}else ga=r,r=o;return r}())!==o?r=t:(ga=r,r=o),r}function Ha(){var t;return(t=function(){var r,t,e,n,s,u,a,i,c,f,b;return r=ga,(t=cc())!==o&&Kf()!==o&&(e=Nc())!==o&&Kf()!==o?((n=Ja())===o&&(n=null),n!==o&&Kf()!==o&&(s=$i())!==o?(i=t,c=e,f=n,(b=s)&&b.forEach((r=>Sb.add(`${i}::${r.db}::${r.table}`))),r=t={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:i.toLowerCase(),keyword:c.toLowerCase(),prefix:f,name:b}}):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,(t=cc())!==o&&Kf()!==o&&(e=If())!==o&&Kf()!==o?((n=Ja())===o&&(n=null),n!==o&&Kf()!==o&&(s=$i())!==o&&Kf()!==o?((u=li())===o&&(u=null),u!==o?(t=function(r,t,e,n,s){return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),prefix:e,name:n,options:[{type:"origin",value:s}]}}}(t,e,n,s,u),r=t):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,(t=cc())!==o&&Kf()!==o&&(e=xf())!==o&&Kf()!==o&&(n=ml())!==o&&Kf()!==o&&(s=Oc())!==o&&Kf()!==o&&(u=ji())!==o&&Kf()!==o?((a=function(){var r,t,e,n,s,u;if(r=ga,(t=ti())===o&&(t=ei()),t!==o){for(e=[],n=ga,(s=Kf())!==o?((u=ti())===o&&(u=ei()),u!==o?n=s=[s,u]:(ga=n,n=o)):(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o?((u=ti())===o&&(u=ei()),u!==o?n=s=[s,u]:(ga=n,n=o)):(ga=n,n=o);e!==o?r=t=l(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())===o&&(a=null),a!==o&&Kf()!==o?(t=function(r,t,e,n,s){return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),name:e,table:n,options:s}}}(t,e,n,u,a),r=t):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,(t=cc())!==o&&Kf()!==o?((e=_c())===o&&(e=gc()),e!==o&&Kf()!==o?((n=Ja())===o&&(n=null),n!==o&&Kf()!==o&&(s=Ol())!==o?(t=function(r,t,e,n){return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),prefix:e,name:n}}}(t,e,n,s),r=t):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,(t=cc())!==o&&Kf()!==o&&(e=Rc())!==o&&Kf()!==o?((n=Ja())===o&&(n=null),n!==o&&Kf()!==o&&(s=Fi())!==o?(t=function(r,t,e,n){return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),prefix:e,name:[{schema:n.db,trigger:n.table}]}}}(t,e,n,s),r=t):(ga=r,r=o)):(ga=r,r=o))))),r}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s,u,a,l,c,f,b,v,p,L,C;return r=ga,(t=pc())!==o&&Kf()!==o?((e=Lc())===o&&(e=null),e!==o&&Kf()!==o&&Nc()!==o&&Kf()!==o?((n=Va())===o&&(n=null),n!==o&&Kf()!==o&&(s=ji())!==o&&Kf()!==o&&(u=function r(){var t,e,n;return(t=function(){var r,t;return r=ga,Xc()!==o&&Kf()!==o&&(t=$i())!==o?r={type:"like",table:t}:(ga=r,r=o),r}())===o&&(t=ga,Yf()!==o&&Kf()!==o&&(e=r())!==o&&Kf()!==o&&Bf()!==o?((n=e).parentheses=!0,t=n):(ga=t,t=o)),t}())!==o?(b=t,v=e,p=n,C=u,(L=s)&&Sb.add(`create::${L.db}::${L.table}`),r=t={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:b[0].toLowerCase(),keyword:"table",temporary:v&&v[0].toLowerCase(),if_not_exists:p,table:[L],like:C}}):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,(t=pc())!==o&&Kf()!==o?((e=Lc())===o&&(e=null),e!==o&&Kf()!==o&&Nc()!==o&&Kf()!==o?((n=Va())===o&&(n=null),n!==o&&Kf()!==o&&(s=ji())!==o&&Kf()!==o?((u=function(){var r,t,e,n,s,u,a,i;if(r=ga,Yf()!==o)if(Kf()!==o)if((t=qa())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=qa())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=qa())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o&&(n=Kf())!==o&&(s=Bf())!==o?r=m(t,e):(ga=r,r=o)}else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;return r}())===o&&(u=null),u!==o&&Kf()!==o?((a=function(){var r,t,e,n,s,u,a,l;if(r=ga,(t=bi())!==o){for(e=[],n=ga,(s=Kf())!==o?((u=jf())===o&&(u=null),u!==o&&(a=Kf())!==o&&(l=bi())!==o?n=s=[s,u,a,l]:(ga=n,n=o)):(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o?((u=jf())===o&&(u=null),u!==o&&(a=Kf())!==o&&(l=bi())!==o?n=s=[s,u,a,l]:(ga=n,n=o)):(ga=n,n=o);e!==o?r=t=i(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())===o&&(a=null),a!==o&&Kf()!==o?((l=yc())===o&&(l=wc()),l===o&&(l=null),l!==o&&Kf()!==o?((c=Ic())===o&&(c=null),c!==o&&Kf()!==o?((f=Wa())===o&&(f=null),f!==o?(t=function(r,t,e,n,s,o,u,a,i){return n&&Sb.add(`create::${n.db}::${n.table}`),{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:r[0].toLowerCase(),keyword:"table",temporary:t&&t[0].toLowerCase(),if_not_exists:e,table:[n],ignore_replace:u&&u[0].toLowerCase(),as:a&&a[0].toLowerCase(),query_expr:i&&i.ast,create_definitions:s,table_options:o}}}(t,e,n,s,u,a,l,c,f),r=t):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A;return t=ga,(e=pc())!==o&&Kf()!==o?((n=za())===o&&(n=null),n!==o&&Kf()!==o&&Rc()!==o&&Kf()!==o?((s=Va())===o&&(s=null),s!==o&&Kf()!==o&&(u=ji())!==o&&Kf()!==o&&(a=function(){var t;return"before"===r.substr(ga,6).toLowerCase()?(t=r.substr(ga,6),ga+=6):(t=o,0===Ma&&Fa(_)),t===o&&("after"===r.substr(ga,5).toLowerCase()?(t=r.substr(ga,5),ga+=5):(t=o,0===Ma&&Fa(g))),t}())!==o&&Kf()!==o&&(i=function(){var r;return(r=dc())===o&&(r=vc())===o&&(r=Cc()),r!==o&&(r={keyword:r[0].toLowerCase()}),r}())!==o&&Kf()!==o&&Oc()!==o&&Kf()!==o&&(l=ji())!==o&&Kf()!==o&&(c=function(){var t,e,n,s,u,a,i;return t=ga,"for"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(O)),e!==o&&Kf()!==o?("each"===r.substr(ga,4).toLowerCase()?(n=r.substr(ga,4),ga+=4):(n=o,0===Ma&&Fa(x)),n===o&&(n=null),n!==o&&Kf()!==o?("row"===r.substr(ga,3).toLowerCase()?(s=r.substr(ga,3),ga+=3):(s=o,0===Ma&&Fa(U)),s===o&&("statement"===r.substr(ga,9).toLowerCase()?(s=r.substr(ga,9),ga+=9):(s=o,0===Ma&&Fa(M))),s!==o?(u=e,i=s,t=e={keyword:(a=n)?`${u.toLowerCase()} ${a.toLowerCase()}`:u.toLowerCase(),args:i.toLowerCase()}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}())!==o&&Kf()!==o?((f=function(){var t,e,n;return t=ga,"follows"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(k)),e===o&&("precedes"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(D))),e!==o&&Kf()!==o&&(n=Il())!==o?t=e={keyword:e,trigger:n}:(ga=t,t=o),t}())===o&&(f=null),f!==o&&Kf()!==o&&(b=function(){var r,t;return r=ga,Tc()!==o&&Kf()!==o&&(t=Ki())!==o?r={type:"set",expr:t}:(ga=r,r=o),r}())!==o?(v=e,p=n,L=s,C=u,d=a,w=i,h=l,y=c,E=f,A=b,t=e={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:v[0].toLowerCase(),definer:p,keyword:"trigger",for_each:y,if_not_exists:L,trigger:C,time:d,events:[w],order:E,table:h,execute:A}}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,l,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T;return r=ga,(t=pc())!==o&&Kf()!==o?((e=Df())===o&&(e=Mf())===o&&(e=kf()),e===o&&(e=null),e!==o&&Kf()!==o&&(n=xf())!==o&&Kf()!==o&&(s=Il())!==o&&Kf()!==o?((u=Mi())===o&&(u=null),u!==o&&Kf()!==o&&(a=Oc())!==o&&Kf()!==o&&(l=ji())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(c=function(){var r,t,e,n,s,u,a,l;if(r=ga,(t=Xa())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(l=Xa())!==o?n=s=[s,u,a,l]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(l=Xa())!==o?n=s=[s,u,a,l]:(ga=n,n=o);e!==o?r=t=i(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?((f=ki())===o&&(f=null),f!==o&&Kf()!==o?((b=ti())===o&&(b=null),b!==o&&Kf()!==o?((v=ei())===o&&(v=null),v!==o&&Kf()!==o?(p=t,L=e,C=n,d=s,w=u,h=a,y=l,E=c,A=f,m=b,T=v,r=t={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:p[0].toLowerCase(),index_type:L&&L.toLowerCase(),keyword:C.toLowerCase(),index:d,on_kw:h[0].toLowerCase(),table:y,index_columns:E,index_using:w,index_options:A,algorithm_option:m,lock_option:T}}):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u,a,i,c,f;return r=ga,(t=pc())!==o&&Kf()!==o?((e=_c())===o&&(e=gc()),e!==o&&Kf()!==o?((n=Va())===o&&(n=null),n!==o&&Kf()!==o&&(s=Ol())!==o&&Kf()!==o?((u=function(){var r,t,e,n,s,u;if(r=ga,(t=fi())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=fi())!==o?n=s=[s,u]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=fi())!==o?n=s=[s,u]:(ga=n,n=o);e!==o?r=t=l(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())===o&&(u=null),u!==o?(a=t,i=n,c=s,f=u,r=t={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:a[0].toLowerCase(),keyword:"database",if_not_exists:i,database:c,create_definitions:f}}):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,m,T,I,N,R,S,_,g,O,x,U,M,k,D,$,P,F,G,j,H,Y;return t=ga,(e=pc())!==o&&Kf()!==o?(n=ga,(s=Zc())!==o&&(u=Kf())!==o&&(a=wc())!==o?n=s=[s,u,a]:(ga=n,n=o),n===o&&(n=null),n!==o&&(s=Kf())!==o?(u=ga,"algorithm"===r.substr(ga,9).toLowerCase()?(a=r.substr(ga,9),ga+=9):(a=o,0===Ma&&Fa(L)),a!==o&&(i=Kf())!==o&&(l=_f())!==o&&(c=Kf())!==o?("undefined"===r.substr(ga,9).toLowerCase()?(m=r.substr(ga,9),ga+=9):(m=o,0===Ma&&Fa(C)),m===o&&("merge"===r.substr(ga,5).toLowerCase()?(m=r.substr(ga,5),ga+=5):(m=o,0===Ma&&Fa(d)),m===o&&("temptable"===r.substr(ga,9).toLowerCase()?(m=r.substr(ga,9),ga+=9):(m=o,0===Ma&&Fa(w)))),m!==o?u=a=[a,i,l,c,m]:(ga=u,u=o)):(ga=u,u=o),u===o&&(u=null),u!==o&&(a=Kf())!==o?((i=za())===o&&(i=null),i!==o&&(l=Kf())!==o?(c=ga,"sql"===r.substr(ga,3).toLowerCase()?(m=r.substr(ga,3),ga+=3):(m=o,0===Ma&&Fa(h)),m!==o&&(T=Kf())!==o?("security"===r.substr(ga,8).toLowerCase()?(I=r.substr(ga,8),ga+=8):(I=o,0===Ma&&Fa(y)),I!==o&&(N=Kf())!==o?("definer"===r.substr(ga,7).toLowerCase()?(R=r.substr(ga,7),ga+=7):(R=o,0===Ma&&Fa(E)),R===o&&("invoker"===r.substr(ga,7).toLowerCase()?(R=r.substr(ga,7),ga+=7):(R=o,0===Ma&&Fa(A))),R!==o?c=m=[m,T,I,N,R]:(ga=c,c=o)):(ga=c,c=o)):(ga=c,c=o),c===o&&(c=null),c!==o&&(m=Kf())!==o&&(T=If())!==o&&(I=Kf())!==o&&(N=ji())!==o&&(R=Kf())!==o?(S=ga,(_=Yf())!==o&&(g=Kf())!==o&&(O=Tl())!==o&&(x=Kf())!==o&&(U=Bf())!==o?S=_=[_,g,O,x,U]:(ga=S,S=o),S===o&&(S=null),S!==o&&(_=Kf())!==o&&(g=Ic())!==o&&(O=Kf())!==o&&(x=Ii())!==o&&(U=Kf())!==o?((M=function(){var t,e,n,s;return t=ga,Dc()!==o&&Kf()!==o?("cascaded"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(f)),e===o&&("local"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(b))),e!==o&&Kf()!==o?("check"===r.substr(ga,5).toLowerCase()?(n=r.substr(ga,5),ga+=5):(n=o,0===Ma&&Fa(v)),n!==o&&Kf()!==o?("OPTION"===r.substr(ga,6)?(s="OPTION",ga+=6):(s=o,0===Ma&&Fa(p)),s!==o?t=`with ${e.toLowerCase()} check option`:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,Dc()!==o&&Kf()!==o?("check"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(v)),e!==o&&Kf()!==o?("OPTION"===r.substr(ga,6)?(n="OPTION",ga+=6):(n=o,0===Ma&&Fa(p)),n!==o?t="with check option":(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)),t}())===o&&(M=null),M!==o?(k=e,D=n,$=u,P=i,F=c,j=S,H=x,Y=M,(G=N).view=G.table,delete G.table,t=e={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:k[0].toLowerCase(),keyword:"view",replace:D&&"or replace",algorithm:$&&$[4],definer:P,sql_security:F&&F[4],columns:j&&j[2],select:H,view:G,with:Y}}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=ga,(e=function(){var t,e,n,s;return t=ga,"truncate"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(wu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="TRUNCATE":(ga=t,t=o)):(ga=t,t=o),t}())!==o&&Kf()!==o?((n=Nc())===o&&(n=null),n!==o&&Kf()!==o&&(s=$i())!==o?(u=e,a=n,(i=s)&&i.forEach((r=>Sb.add(`${u}::${r.db}::${r.table}`))),t=e={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:u.toLowerCase(),keyword:a&&a.toLowerCase()||"table",name:i}}):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=ga,hc()!==o&&Kf()!==o&&Nc()!==o&&Kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=Ui())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Ui())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Ui())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o?((e=t).forEach((r=>r.forEach((r=>r.table&&Sb.add(`rename::${r.db}::${r.table}`))))),r={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"rename",table:e}}):(ga=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=ga,function(){var t,e,n,s;return t=ga,"call"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Fo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="CALL":(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&(e=function(){var r;return(r=lb())===o&&(r=cb()),r}())!==o?(n=e,t={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"call",expr:n}}):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ga,function(){var t,e,n,s;return t=ga,"use"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(gs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&(e=Il())!==o?(n=e,Sb.add(`use::${n}::null`),t={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"use",db:n}}):(ga=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s;return r=ga,fc()!==o&&Kf()!==o&&Nc()!==o&&Kf()!==o&&(t=ji())!==o&&Kf()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=ri())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=ri())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=ri())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o?(n=t,s=e,Sb.add(`alter::${n.db}::${n.table}`),r={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"alter",table:[n],expr:s}}):(ga=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u;return t=ga,Tc()!==o&&Kf()!==o?((e=function(){var t,e,n,s;return t=ga,"global"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Su)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="GLOBAL":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ga,"session"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(_u)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SESSION":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ga,"local"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(b)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="LOCAL":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ga,"persist"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(gu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="PERSIST":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ga,"persist_only"===r.substr(ga,12).toLowerCase()?(e=r.substr(ga,12),ga+=12):(e=o,0===Ma&&Fa(Ou)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="PERSIST_ONLY":(ga=t,t=o)):(ga=t,t=o),t}()),e===o&&(e=null),e!==o&&Kf()!==o&&(n=nb())!==o?(s=e,(u=n).keyword=s,t={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"set",expr:u}}):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ga,function(){var t,e,n,s;return t=ga,"lock"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(rr)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&Sc()!==o&&Kf()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=vi())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=vi())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=vi())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=Qr(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o?(n=e,t={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"lock",keyword:"tables",tables:n}}):(ga=t,t=o),t}())===o&&(t=function(){var t;return t=ga,function(){var t,e,n,s;return t=ga,"unlock"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Ws)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&Sc()!==o?t={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"unlock",keyword:"tables"}}:(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;return t=ga,(e=lc())!==o&&Kf()!==o?("binary"===r.substr(ga,6).toLowerCase()?(n=r.substr(ga,6),ga+=6):(n=o,0===Ma&&Fa(Jr)),n===o&&("master"===r.substr(ga,6).toLowerCase()?(n=r.substr(ga,6),ga+=6):(n=o,0===Ma&&Fa(rt))),n!==o&&(s=Kf())!==o?("logs"===r.substr(ga,4).toLowerCase()?(u=r.substr(ga,4),ga+=4):(u=o,0===Ma&&Fa(tt)),u!==o?(f=n,t=e={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"show",suffix:"logs",keyword:f.toLowerCase()}}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=lc())!==o&&Kf()!==o&&(n=Sc())!==o?t=e={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"show",keyword:"tables"}}:(ga=t,t=o),t===o&&(t=ga,(e=lc())!==o&&Kf()!==o?("triggers"===r.substr(ga,8).toLowerCase()?(n=r.substr(ga,8),ga+=8):(n=o,0===Ma&&Fa(et)),n===o&&("status"===r.substr(ga,6).toLowerCase()?(n=r.substr(ga,6),ga+=6):(n=o,0===Ma&&Fa(nt)),n===o&&("processlist"===r.substr(ga,11).toLowerCase()?(n=r.substr(ga,11),ga+=11):(n=o,0===Ma&&Fa(st)))),n!==o?(L=n,t=e={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"show",keyword:L.toLowerCase()}}):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=lc())!==o&&Kf()!==o?("procedure"===r.substr(ga,9).toLowerCase()?(n=r.substr(ga,9),ga+=9):(n=o,0===Ma&&Fa(ot)),n===o&&("function"===r.substr(ga,8).toLowerCase()?(n=r.substr(ga,8),ga+=8):(n=o,0===Ma&&Fa(ut))),n!==o&&(s=Kf())!==o?("status"===r.substr(ga,6).toLowerCase()?(u=r.substr(ga,6),ga+=6):(u=o,0===Ma&&Fa(nt)),u!==o?(e=function(r){return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"show",keyword:r.toLowerCase(),suffix:"status"}}}(n),t=e):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=lc())!==o&&Kf()!==o?("binlog"===r.substr(ga,6).toLowerCase()?(n=r.substr(ga,6),ga+=6):(n=o,0===Ma&&Fa(at)),n!==o&&(s=Kf())!==o?("events"===r.substr(ga,6).toLowerCase()?(u=r.substr(ga,6),ga+=6):(u=o,0===Ma&&Fa(it)),u!==o&&(a=Kf())!==o?((i=Cl())===o&&(i=null),i!==o&&Kf()!==o?((l=xi())===o&&(l=null),l!==o&&Kf()!==o?((c=qi())===o&&(c=null),c!==o?(b=i,v=l,p=c,t=e={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"show",suffix:"events",keyword:"binlog",in:b,from:v,limit:p}}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=lc())!==o&&Kf()!==o?(n=ga,"character"===r.substr(ga,9).toLowerCase()?(s=r.substr(ga,9),ga+=9):(s=o,0===Ma&&Fa(yr)),s!==o&&(u=Kf())!==o?("set"===r.substr(ga,3).toLowerCase()?(a=r.substr(ga,3),ga+=3):(a=o,0===Ma&&Fa(Er)),a!==o?n=s=[s,u,a]:(ga=n,n=o)):(ga=n,n=o),n===o&&("collation"===r.substr(ga,9).toLowerCase()?(n=r.substr(ga,9),ga+=9):(n=o,0===Ma&&Fa(lt)),n===o&&("databases"===r.substr(ga,9).toLowerCase()?(n=r.substr(ga,9),ga+=9):(n=o,0===Ma&&Fa(ct)))),n!==o&&(s=Kf())!==o?((u=Ll())===o&&(u=Yi()),u===o&&(u=null),u!==o?(e=function(r,t){let e=Array.isArray(r)&&r||[r];return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"show",suffix:e[2]&&e[2].toLowerCase(),keyword:e[0].toLowerCase(),expr:t}}}(n,u),t=e):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=lc())!==o&&Kf()!==o?("columns"===r.substr(ga,7).toLowerCase()?(n=r.substr(ga,7),ga+=7):(n=o,0===Ma&&Fa(ft)),n===o&&("indexes"===r.substr(ga,7).toLowerCase()?(n=r.substr(ga,7),ga+=7):(n=o,0===Ma&&Fa(bt))),n!==o&&(s=Kf())!==o&&(u=xi())!==o?(e=function(r,t){return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"show",keyword:r.toLowerCase(),from:t}}}(n,u),t=e):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=lc())!==o&&Kf()!==o&&(n=pc())!==o&&(s=Kf())!==o?((u=If())===o&&(u=Nc())===o&&("event"===r.substr(ga,5).toLowerCase()?(u=r.substr(ga,5),ga+=5):(u=o,0===Ma&&Fa(vt)),u===o&&(u=Rc())===o&&("procedure"===r.substr(ga,9).toLowerCase()?(u=r.substr(ga,9),ga+=9):(u=o,0===Ma&&Fa(ot)))),u!==o&&(a=Kf())!==o&&(i=ji())!==o?(e=function(r,t){const e=r.toLowerCase();return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"show",keyword:"create",suffix:e,[e]:t}}}(u,i),t=e):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=function(){var t,e,n,s;return t=ga,lc()!==o&&Kf()!==o?("grants"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(pt)),e!==o&&Kf()!==o?((n=function(){var t,e,n,s,u,a,i,l,c;return t=ga,"for"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(O)),e!==o&&Kf()!==o&&(n=Il())!==o&&Kf()!==o?(s=ga,(u=Nf())!==o&&(a=Kf())!==o&&(i=Il())!==o?s=u=[u,a,i]:(ga=s,s=o),s===o&&(s=null),s!==o&&(u=Kf())!==o?((a=function(){var r,t;return r=ga,kc()!==o&&Kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=Il())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Il())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Il())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=Qr(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o?r=t:(ga=r,r=o),r}())===o&&(a=null),a!==o?(c=a,t=e={user:n,host:(l=s)&&l[2],role_list:c}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(n=null),n!==o?(s=n,t={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"show",keyword:"grants",for:s}}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}())))))))),t}())===o&&(t=function(){var t,e,n,s;return t=ga,(e=Gc())===o&&(e=function(){var t,e,n,s;return t=ga,"describe"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(Eo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DESCRIBE":(ga=t,t=o)):(ga=t,t=o),t}()),e!==o&&Kf()!==o&&(n=Il())!==o?(s=n,t=e={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"desc",table:s}}):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C;return t=ga,"grant"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Ct)),e!==o&&Kf()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=Li())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Li())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Li())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=Et(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o&&Kf()!==o&&(s=Oc())!==o&&Kf()!==o?((u=function(){var t;return(t=Nc())===o&&("function"===r.substr(ga,8).toLowerCase()?(t=r.substr(ga,8),ga+=8):(t=o,0===Ma&&Fa(ut)),t===o&&("procedure"===r.substr(ga,9).toLowerCase()?(t=r.substr(ga,9),ga+=9):(t=o,0===Ma&&Fa(ot)))),t!==o&&(t={type:"origin",value:t.toUpperCase()}),t}())===o&&(u=null),u!==o&&Kf()!==o&&(a=function(){var r,t,e,n,s,u,a;return r=ga,t=ga,(e=Il())===o&&(e=Hf()),e!==o&&(n=Kf())!==o&&(s=Gf())!==o?t=e=[e,n,s]:(ga=t,t=o),t===o&&(t=null),t!==o&&(e=Kf())!==o?((n=Il())===o&&(n=Hf()),n!==o?(a=n,r=t={prefix:(u=t)&&u[0],name:a}):(ga=r,r=o)):(ga=r,r=o),r}())!==o&&Kf()!==o&&(i=ic())!==o&&Kf()!==o&&(l=di())!==o&&Kf()!==o?((c=function(){var t,e,n;return t=ga,Dc()!==o&&Kf()!==o?("grant"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Ct)),e!==o&&Kf()!==o?("option"===r.substr(ga,6).toLowerCase()?(n=r.substr(ga,6),ga+=6):(n=o,0===Ma&&Fa(dt)),n!==o?t={type:"origin",value:"with grant option"}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(c=null),c!==o?(f=n,b=u,v=a,p=i,L=l,C=c,t=e={tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"grant",keyword:"priv",objects:f,on:{object_type:b,priv_level:[v]},to_from:p[0],user_or_roles:L,with:C}}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"GRANT"===r.substr(ga,5)?(e="GRANT",ga+=5):(e=o,0===Ma&&Fa(mt)),e!==o&&Kf()!==o?("PROXY"===r.substr(ga,5)?(n="PROXY",ga+=5):(n=o,0===Ma&&Fa(Tt)),n!==o&&Kf()!==o&&(s=Oc())!==o&&Kf()!==o&&(u=Ci())!==o&&Kf()!==o&&(a=ic())!==o&&Kf()!==o&&(i=di())!==o&&Kf()!==o?((l=wi())===o&&(l=null),l!==o?(e=function(r,t,e,n){return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"grant",keyword:"proxy",objects:[{priv:{type:"origin",value:"proxy"}}],on:r,to_from:t[0],user_or_roles:e,with:n}}}(u,a,i,l),t=e):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"GRANT"===r.substr(ga,5)?(e="GRANT",ga+=5):(e=o,0===Ma&&Fa(mt)),e!==o&&Kf()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=Il())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Il())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Il())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=Et(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o&&Kf()!==o&&(s=ic())!==o&&Kf()!==o&&(u=di())!==o&&Kf()!==o?((a=wi())===o&&(a=null),a!==o?(e=function(r,t,e,n){return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:"grant",keyword:"role",objects:r.map((r=>({priv:{type:"string",value:r}}))),to_from:t[0],user_or_roles:e,with:n}}}(n,s,u,a),t=e):(ga=t,t=o)):(ga=t,t=o))),t}()),t}function Ya(){var r;return(r=Wa())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=ga,(t=Kf())!==o?((e=yi())===o&&(e=null),e!==o&&Kf()!==o&&vc()!==o&&Kf()!==o&&(n=$i())!==o&&Kf()!==o&&Tc()!==o&&Kf()!==o&&(s=Ki())!==o&&Kf()!==o?((u=Yi())===o&&(u=null),u!==o&&Kf()!==o?((a=Wi())===o&&(a=null),a!==o&&Kf()!==o?((i=qi())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o){const u={};return t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"update";t&&(u[n]=t),n&&Sb.add(`${o}::${t}::${n}`)})),e&&e.forEach((r=>{if(r.table){const t=Ib(r.table);Sb.add(`update::${u[t]||null}::${t}`)}_b.add(`update::${r.table}::${r.column}`)})),{tableList:Array.from(Sb),columnList:Nb(_b),ast:{with:r,type:"update",table:t,set:e,where:n,orderby:s,limit:o}}}(e,n,s,u,a,i),r=t):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i,l;return r=ga,(t=rl())!==o&&Kf()!==o?((e=yc())===o&&(e=null),e!==o&&Kf()!==o?((n=Ac())===o&&(n=null),n!==o&&Kf()!==o&&(s=ji())!==o&&Kf()!==o?((u=Qi())===o&&(u=null),u!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(a=Tl())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o&&(i=zi())!==o&&Kf()!==o?((l=Ji())===o&&(l=null),l!==o?(t=function(r,t,e,n,s,o,u,a){if(n&&(Sb.add(`insert::${n.db}::${n.table}`),n.as=null),o){let r=n&&n.table||null;Array.isArray(u)&&u.forEach(((r,t)=>{if(r.value.length!=o.length)throw new Error("Error: column count doesn't match value count at row "+(t+1))})),o.forEach((t=>_b.add(`insert::${r}::${t}`)))}const i=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:r,table:[n],columns:o,values:u,partition:s,prefix:i,on_duplicate_update:a}}}(t,e,n,s,u,a,i,l),r=t):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=ga,(t=rl())!==o&&Kf()!==o?((e=yc())===o&&(e=null),e!==o&&Kf()!==o?((n=Ac())===o&&(n=null),n!==o&&Kf()!==o&&(s=ji())!==o&&Kf()!==o?((u=Qi())===o&&(u=null),u!==o&&Kf()!==o&&(a=zi())!==o&&Kf()!==o?((i=Ji())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o,u){n&&(Sb.add(`insert::${n.db}::${n.table}`),_b.add(`insert::${n.table}::(.*)`),n.as=null);const a=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:r,table:[n],columns:null,values:o,partition:s,prefix:a,on_duplicate_update:u}}}(t,e,n,s,u,a,i),r=t):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=ga,(t=rl())!==o&&Kf()!==o?((e=yc())===o&&(e=null),e!==o&&Kf()!==o?((n=Ac())===o&&(n=null),n!==o&&Kf()!==o&&(s=ji())!==o&&Kf()!==o?((u=Qi())===o&&(u=null),u!==o&&Kf()!==o&&Tc()!==o&&Kf()!==o&&(a=Ki())!==o&&Kf()!==o?((i=Ji())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o,u){n&&(Sb.add(`insert::${n.db}::${n.table}`),_b.add(`insert::${n.table}::(.*)`),n.as=null);const a=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{type:r,table:[n],columns:null,partition:s,prefix:a,set:o,on_duplicate_update:u}}}(t,e,n,s,u,a,i),r=t):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=ga,(t=Kf())!==o?((e=yi())===o&&(e=null),e!==o&&Kf()!==o&&Cc()!==o&&Kf()!==o?((n=$i())===o&&(n=null),n!==o&&Kf()!==o&&(s=xi())!==o&&Kf()!==o?((u=Yi())===o&&(u=null),u!==o&&Kf()!==o?((a=Wi())===o&&(a=null),a!==o&&Kf()!==o?((i=qi())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o){if(e&&e.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"delete";n&&Sb.add(`${o}::${t}::${n}`),s||_b.add(`delete::${n}::(.*)`)})),null===t&&1===e.length){const r=e[0];t=[{db:r.db,table:r.table,as:r.as,addition:!0}]}return{tableList:Array.from(Sb),columnList:Nb(_b),ast:{with:r,type:"delete",table:t,from:e,where:n,orderby:s,limit:o}}}(e,n,s,u,a,i),r=t):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(r=Ha())===o&&(r=function(){var r,t;for(r=[],t=eb();t!==o;)r.push(t),t=eb();return r}()),r}function Ba(){var t,e,n,s;return t=ga,(e=function(){var t,e,n,s;return t=ga,"union"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(oo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&Kf()!==o?((n=jc())===o&&(n=Hc()),n===o&&(n=null),n!==o?t=e=(s=n)?"union "+s.toLowerCase():"union":(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=function(){var t,e,n,s;return t=ga,"minus"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(uo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(e="minus"),(t=e)===o&&(t=ga,(e=function(){var t,e,n,s;return t=ga,"intersect"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(ao)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(e="intersect"),t=e)),t}function Wa(){var r,t,e,n,s,u,a,i;if(r=ga,(t=hi())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=Ba())!==o&&(a=Kf())!==o&&(i=hi())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=Ba())!==o&&(a=Kf())!==o&&(i=hi())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o&&(n=Kf())!==o?((s=Wi())===o&&(s=null),s!==o&&(u=Kf())!==o?((a=qi())===o&&(a=null),a!==o?r=t=function(r,t,e,n){let s=r;for(let r=0;r<t.length;r++)s._next=t[r][3],s.set_op=t[r][1],s=s._next;return e&&(r._orderby=e),n&&(r._limit=n),{tableList:Array.from(Sb),columnList:Nb(_b),ast:r}}(t,e,s,a):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)}else ga=r,r=o;return r}function Xa(){var r,t,e,n,s;return r=ga,(t=al())!==o?((e=Fc())===o&&(e=Gc()),e===o&&(e=null),e!==o?(n=t,s=e,r=t={...n,order_by:s&&s.toLowerCase()}):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=function(){var r,t,e;return r=ga,(t=ml())!==o&&Kf()!==o?((e=Fc())===o&&(e=Gc()),e===o&&(e=null),e!==o?(t=function(r,t){return{...r,order_by:t&&t.toLowerCase()}}(t,e),r=t):(ga=r,r=o)):(ga=r,r=o),r}()),r}function Va(){var t,e;return t=ga,"if"===r.substr(ga,2).toLowerCase()?(e=r.substr(ga,2),ga+=2):(e=o,0===Ma&&Fa(c)),e!==o&&Kf()!==o&&qc()!==o&&Kf()!==o&&Vc()!==o?t=e="IF NOT EXISTS":(ga=t,t=o),t}function qa(){var r;return(r=oi())===o&&(r=Za())===o&&(r=ni())===o&&(r=si()),r}function Ka(){var t,e,n,s,u;return t=ga,(e=function(){var t;return(t=function(){var t,e,n,s;return t=ga,"not null"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(Ts)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(t={type:"not null",value:"not null"}),t}())===o&&(e=Kl()),e!==o&&((u=e)&&!u.value&&(u.value="null"),e={nullable:u}),(t=e)===o&&(t=ga,(e=function(){var r,t;return r=ga,ac()!==o&&Kf()!==o?((t=ql())===o&&(t=al()),t!==o?r={type:"default",value:t}:(ga=r,r=o)):(ga=r,r=o),r}())!==o&&(e={default_val:e}),(t=e)===o&&(t=ga,"auto_increment"===r.substr(ga,14).toLowerCase()?(e=r.substr(ga,14),ga+=14):(e=o,0===Ma&&Fa(T)),e!==o&&(e={auto_increment:e.toLowerCase()}),(t=e)===o&&(t=ga,"unique"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(I)),e!==o&&Kf()!==o?("key"===r.substr(ga,3).toLowerCase()?(n=r.substr(ga,3),ga+=3):(n=o,0===Ma&&Fa(N)),n===o&&(n=null),n!==o?t=e=function(r){const t=["unique"];return r&&t.push(r),{unique:t.join(" ").toLowerCase("")}}(n):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"primary"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(R)),e===o&&(e=null),e!==o&&Kf()!==o?("key"===r.substr(ga,3).toLowerCase()?(n=r.substr(ga,3),ga+=3):(n=o,0===Ma&&Fa(N)),n!==o?t=e=function(r){const t=[];return r&&t.push("primary"),t.push("key"),{primary_key:t.join(" ").toLowerCase("")}}(e):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=Qf())!==o&&(e={comment:e}),(t=e)===o&&(t=ga,(e=Qa())!==o&&(e={collate:e}),(t=e)===o&&(t=ga,(e=function(){var t,e,n;return t=ga,"column_format"===r.substr(ga,13).toLowerCase()?(e=r.substr(ga,13),ga+=13):(e=o,0===Ma&&Fa($)),e!==o&&Kf()!==o?("fixed"===r.substr(ga,5).toLowerCase()?(n=r.substr(ga,5),ga+=5):(n=o,0===Ma&&Fa(P)),n===o&&("dynamic"===r.substr(ga,7).toLowerCase()?(n=r.substr(ga,7),ga+=7):(n=o,0===Ma&&Fa(F)),n===o&&("default"===r.substr(ga,7).toLowerCase()?(n=r.substr(ga,7),ga+=7):(n=o,0===Ma&&Fa(G)))),n!==o?t=e={type:"column_format",value:n.toLowerCase()}:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(e={column_format:e}),(t=e)===o&&(t=ga,(e=function(){var t,e,n;return t=ga,"storage"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(j)),e!==o&&Kf()!==o?("disk"===r.substr(ga,4).toLowerCase()?(n=r.substr(ga,4),ga+=4):(n=o,0===Ma&&Fa(H)),n===o&&("memory"===r.substr(ga,6).toLowerCase()?(n=r.substr(ga,6),ga+=6):(n=o,0===Ma&&Fa(Y))),n!==o?t=e={type:"storage",value:n.toLowerCase()}:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(e={storage:e}),(t=e)===o&&(t=ga,(e=ai())!==o&&(e={reference_definition:e}),(t=e)===o&&(t=ga,(e=function(){var t,e,n,s,u,a,i,l;return t=ga,(e=ui())===o&&(e=null),e!==o&&Kf()!==o?("check"===r.substr(ga,5).toLowerCase()?(n=r.substr(ga,5),ga+=5):(n=o,0===Ma&&Fa(v)),n!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(s=al())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?(u=ga,(a=qc())===o&&(a=null),a!==o&&(i=Kf())!==o?("enforced"===r.substr(ga,8).toLowerCase()?(l=r.substr(ga,8),ga+=8):(l=o,0===Ma&&Fa(fr)),l!==o?u=a=[a,i,l]:(ga=u,u=o)):(ga=u,u=o),u===o&&(u=null),u!==o?(e=function(r,t,e,n){const s=[];return n&&s.push(n[0],n[2]),{constraint_type:t.toLowerCase(),keyword:r&&r.keyword,constraint:r&&r.constraint,definition:[e],enforced:s.filter((r=>r)).join(" ").toLowerCase(),resource:"constraint"}}(e,n,s,u),t=e):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(e={check:e}),(t=e)===o&&(t=ga,(e=ci())!==o&&Kf()!==o?((n=_f())===o&&(n=null),n!==o&&Kf()!==o&&(s=Ol())!==o?t=e=function(r,t,e){return{character_set:{type:r,value:e,symbol:t}}}(e,n,s):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=function(){var t,e,n,s,u,a,i,l,c;if(t=ga,e=ga,(n=function(){var t,e,n,s;return t=ga,"generated"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(B)),e!==o&&(n=Kf())!==o?("always"===r.substr(ga,6).toLowerCase()?(s=r.substr(ga,6),ga+=6):(s=o,0===Ma&&Fa(W)),s!==o?t=e=[e,n,s]:(ga=t,t=o)):(ga=t,t=o),t!==o&&(t=t.join("").toLowerCase()),t}())===o&&(n=null),n!==o&&(s=Kf())!==o?("as"===r.substr(ga,2).toLowerCase()?(u=r.substr(ga,2),ga+=2):(u=o,0===Ma&&Fa(X)),u!==o?e=n=[n,s,u]:(ga=e,e=o)):(ga=e,e=o),e!==o)if((n=Kf())!==o)if((s=Yf())!==o)if((u=Kf())!==o)if((a=ql())===o&&(a=al()),a!==o)if(Kf()!==o)if(Bf()!==o)if(Kf()!==o){for(i=[],"stored"===r.substr(ga,6).toLowerCase()?(l=r.substr(ga,6),ga+=6):(l=o,0===Ma&&Fa(V)),l===o&&("virtual"===r.substr(ga,7).toLowerCase()?(l=r.substr(ga,7),ga+=7):(l=o,0===Ma&&Fa(q)));l!==o;)i.push(l),"stored"===r.substr(ga,6).toLowerCase()?(l=r.substr(ga,6),ga+=6):(l=o,0===Ma&&Fa(V)),l===o&&("virtual"===r.substr(ga,7).toLowerCase()?(l=r.substr(ga,7),ga+=7):(l=o,0===Ma&&Fa(q)));i!==o?(c=i,e={type:"generated",expr:a,value:e.filter((r=>"string"==typeof r)).join(" ").toLowerCase(),storage_type:c&&c[0]&&c[0].toLowerCase()},t=e):(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;return t}())!==o&&(e={generated:e}),t=e)))))))))))),t}function Za(){var r,t,e,n,s,u,a;return r=ga,(t=ml())!==o&&Kf()!==o&&(e=pb())!==o&&Kf()!==o?((n=function(){var r,t,e,n,s,u;if(r=ga,(t=Ka())!==o)if(Kf()!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=Ka())!==o?n=s=[s,u]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=Ka())!==o?n=s=[s,u]:(ga=n,n=o);e!==o?r=t=function(r,t){let e=r;for(let r=0;r<t.length;r++)e={...e,...t[r][1]};return e}(t,e):(ga=r,r=o)}else ga=r,r=o;else ga=r,r=o;return r}())===o&&(n=null),n!==o?(s=t,u=e,a=n,_b.add(`create::${s.table}::${s.column}`),r=t={column:s,definition:u,resource:"column",...a||{}}):(ga=r,r=o)):(ga=r,r=o),r}function za(){var t,e,n,s,u;return t=ga,"definer"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(E)),e!==o&&Kf()!==o&&_f()!==o&&Kf()!==o&&(n=Zl())!==o&&Kf()!==o?(64===r.charCodeAt(ga)?(s="@",ga++):(s=o,0===Ma&&Fa(S)),s!==o&&Kf()!==o&&(u=Zl())!==o?t=e=function(r,t){const e="single_quote_string"===r.type?"'":'"',n="single_quote_string"===t.type?"'":'"';return`DEFINER = ${e}${r.value}${e}@${n}${t.value}${n}`}(n,u):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"definer"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(E)),e!==o&&Kf()!==o&&_f()!==o&&Kf()!==o&&(n=Tf())!==o&&Kf()!==o&&(s=Yf())!==o&&Kf()!==o&&(u=Bf())!==o?t=e="DEFINER = CURRENT_USER()":(ga=t,t=o),t===o&&(t=ga,"definer"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(E)),e!==o&&Kf()!==o&&_f()!==o&&Kf()!==o&&(n=Tf())!==o?t=e="DEFINER = CURRENT_USER":(ga=t,t=o))),t}function Qa(){var t,e,n;return t=ga,function(){var t,e,n,s;return t=ga,"collate"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(mr)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="COLLATE":(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o?((e=_f())===o&&(e=null),e!==o&&Kf()!==o&&(n=Ol())!==o?t={type:"collate",symbol:e,value:n}:(ga=t,t=o)):(ga=t,t=o),t}function Ja(){var t,e,n;return t=ga,"if"===r.substr(ga,2).toLowerCase()?(e=r.substr(ga,2),ga+=2):(e=o,0===Ma&&Fa(K)),e!==o&&Kf()!==o?("exists"===r.substr(ga,6).toLowerCase()?(n=r.substr(ga,6),ga+=6):(n=o,0===Ma&&Fa(Z)),n!==o?t=e="if exists":(ga=t,t=o)):(ga=t,t=o),t}function ri(){var t,e,n;return(t=function(){var r,t;return r=ga,gf()!==o&&Kf()!==o&&(t=oi())!==o?r={action:"add",create_definitions:t,resource:"constraint",type:"alter"}:(ga=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=ga,cc()!==o&&Kf()!==o?("check"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(v)),e!==o&&Kf()!==o&&(n=Ol())!==o?t={action:"drop",constraint:n,keyword:e.toLowerCase(),resource:"constraint",type:"alter"}:(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a;return t=ga,(e=cc())!==o&&Kf()!==o?("primary"===r.substr(ga,7).toLowerCase()?(n=r.substr(ga,7),ga+=7):(n=o,0===Ma&&Fa(R)),n!==o&&(s=Kf())!==o&&(u=Uf())!==o?t=e={action:"drop",key:"",keyword:"primary key",resource:"key",type:"alter"}:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=cc())!==o&&Kf()!==o?(n=ga,"foreign"===r.substr(ga,7).toLowerCase()?(s=r.substr(ga,7),ga+=7):(s=o,0===Ma&&Fa(ur)),s===o&&(s=null),s!==o&&(u=Kf())!==o&&(a=Uf())!==o?n=s=[s,u,a]:(ga=n,n=o),n===o&&(n=xf()),n!==o&&(s=Kf())!==o&&(u=Il())!==o?(e=function(r,t){const e=Array.isArray(r)?"key":"index";return{action:"drop",[e]:t,keyword:Array.isArray(r)?""+[r[0],r[2]].filter((r=>r)).join(" ").toLowerCase():r.toLowerCase(),resource:e,type:"alter"}}(n,u),t=e):(ga=t,t=o)):(ga=t,t=o)),t}())===o&&(t=function(){var t,e,n,s;return t=ga,Dc()!==o&&Kf()!==o?("check"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(v)),e!==o&&Kf()!==o?("check"===r.substr(ga,5).toLowerCase()?(n=r.substr(ga,5),ga+=5):(n=o,0===Ma&&Fa(v)),n!==o&&Kf()!==o&&Pf()!==o&&Kf()!==o&&(s=Ol())!==o?t={action:"with",constraint:s,keyword:"check check",resource:"constraint",type:"alter"}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ga,"nocheck"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(ar)),e!==o&&Kf()!==o&&Pf()!==o&&Kf()!==o&&(n=Ol())!==o?t=e={action:"nocheck",constraint:n,resource:"constraint",type:"alter"}:(ga=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u;return r=ga,(t=gf())!==o&&Kf()!==o&&(e=Of())!==o&&Kf()!==o&&(n=Za())!==o?(s=e,u=n,r=t={action:"add",...u,keyword:s,resource:"column",type:"alter"}):(ga=r,r=o),r===o&&(r=ga,(t=gf())!==o&&Kf()!==o&&(e=Za())!==o?(t=function(r){return{action:"add",...r,resource:"column",type:"alter"}}(e),r=t):(ga=r,r=o)),r}())===o&&(t=function(){var r,t,e,n;return r=ga,(t=cc())!==o&&Kf()!==o&&(e=Of())!==o&&Kf()!==o&&(n=ml())!==o?r=t={action:"drop",column:n,keyword:e,resource:"column",type:"alter"}:(ga=r,r=o),r===o&&(r=ga,(t=cc())!==o&&Kf()!==o&&(e=ml())!==o?(t=function(r){return{action:"drop",column:r,resource:"column",type:"alter"}}(e),r=t):(ga=r,r=o)),r}())===o&&(t=function(){var t,e,n;return t=ga,function(){var t,e,n,s;return t=ga,"modify"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Vu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MODIFY":(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&(e=Za())!==o?(n=e,t={action:"modify",...n,resource:"column",type:"alter"}):(ga=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=ga,gf()!==o&&Kf()!==o&&(t=ni())!==o?(e=t,r={action:"add",type:"alter",...e}):(ga=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=ga,gf()!==o&&Kf()!==o&&(t=si())!==o?(e=t,r={action:"add",type:"alter",...e}):(ga=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u;return r=ga,hc()!==o&&Kf()!==o&&Of()!==o&&Kf()!==o&&(t=ml())!==o&&Kf()!==o?((e=ic())===o&&(e=Ic()),e===o&&(e=null),e!==o&&Kf()!==o&&(n=ml())!==o?(u=n,r={action:"rename",type:"alter",resource:"column",keyword:"column",old_column:t,prefix:(s=e)&&s[0].toLowerCase(),column:u}):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=ga,hc()!==o&&Kf()!==o?((t=ic())===o&&(t=Ic()),t===o&&(t=null),t!==o&&Kf()!==o&&(e=Il())!==o?(s=e,r={action:"rename",type:"alter",resource:"table",keyword:(n=t)&&n[0].toLowerCase(),table:s}):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(t=ti())===o&&(t=ei())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v;return t=ga,"change"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(sr)),e!==o&&Kf()!==o?((n=Of())===o&&(n=null),n!==o&&Kf()!==o&&(s=ml())!==o&&Kf()!==o&&(u=Za())!==o&&Kf()!==o?(a=ga,"first"===r.substr(ga,5).toLowerCase()?(i=r.substr(ga,5),ga+=5):(i=o,0===Ma&&Fa(or)),i===o&&("after"===r.substr(ga,5).toLowerCase()?(i=r.substr(ga,5),ga+=5):(i=o,0===Ma&&Fa(g))),i!==o&&(l=Kf())!==o&&(c=ml())!==o?a=i=[i,l,c]:(ga=a,a=o),a===o&&(a=null),a!==o?(f=n,b=u,v=a,t=e={action:"change",old_column:s,...b,keyword:f,resource:"column",type:"alter",first_after:v&&{keyword:v[0],column:v[2]}}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=ga,(e=bi())!==o&&((n=e).resource=n.keyword,n[n.keyword]=n.value,delete n.value,e={type:"alter",...n}),t=e),t}function ti(){var t,e,n,s;return t=ga,"algorithm"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(L)),e!==o&&Kf()!==o?((n=_f())===o&&(n=null),n!==o&&Kf()!==o?("default"===r.substr(ga,7).toLowerCase()?(s=r.substr(ga,7),ga+=7):(s=o,0===Ma&&Fa(G)),s===o&&("instant"===r.substr(ga,7).toLowerCase()?(s=r.substr(ga,7),ga+=7):(s=o,0===Ma&&Fa(z)),s===o&&("inplace"===r.substr(ga,7).toLowerCase()?(s=r.substr(ga,7),ga+=7):(s=o,0===Ma&&Fa(Q)),s===o&&("copy"===r.substr(ga,4).toLowerCase()?(s=r.substr(ga,4),ga+=4):(s=o,0===Ma&&Fa(J))))),s!==o?t=e={type:"alter",keyword:"algorithm",resource:"algorithm",symbol:n,algorithm:s}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}function ei(){var t,e,n,s;return t=ga,"lock"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(rr)),e!==o&&Kf()!==o?((n=_f())===o&&(n=null),n!==o&&Kf()!==o?("default"===r.substr(ga,7).toLowerCase()?(s=r.substr(ga,7),ga+=7):(s=o,0===Ma&&Fa(G)),s===o&&("none"===r.substr(ga,4).toLowerCase()?(s=r.substr(ga,4),ga+=4):(s=o,0===Ma&&Fa(tr)),s===o&&("shared"===r.substr(ga,6).toLowerCase()?(s=r.substr(ga,6),ga+=6):(s=o,0===Ma&&Fa(er)),s===o&&("exclusive"===r.substr(ga,9).toLowerCase()?(s=r.substr(ga,9),ga+=9):(s=o,0===Ma&&Fa(nr))))),s!==o?t=e={type:"alter",keyword:"lock",resource:"lock",symbol:n,lock:s}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}function ni(){var r,t,e,n,s,u,a,i;return r=ga,(t=xf())===o&&(t=Uf()),t!==o&&Kf()!==o?((e=_l())===o&&(e=null),e!==o&&Kf()!==o?((n=Mi())===o&&(n=null),n!==o&&Kf()!==o&&(s=Ti())!==o&&Kf()!==o?((u=ki())===o&&(u=null),u!==o&&Kf()!==o?(a=n,i=u,r=t={index:e,definition:s,keyword:t.toLowerCase(),index_type:a,resource:"index",index_options:i}):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}function si(){var r,t,e,n,s,u,a,i,l;return r=ga,(t=Mf())===o&&(t=kf()),t!==o&&Kf()!==o?((e=xf())===o&&(e=Uf()),e===o&&(e=null),e!==o&&Kf()!==o?((n=_l())===o&&(n=null),n!==o&&Kf()!==o&&(s=Ai())!==o&&Kf()!==o?((u=ki())===o&&(u=null),u!==o?(a=t,l=u,r=t={index:n,definition:s,keyword:(i=e)&&`${a.toLowerCase()} ${i.toLowerCase()}`||a.toLowerCase(),index_options:l,resource:"index"}):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}function oi(){var t;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p;return t=ga,(e=ui())===o&&(e=null),e!==o&&Kf()!==o?(n=ga,"primary"===r.substr(ga,7).toLowerCase()?(s=r.substr(ga,7),ga+=7):(s=o,0===Ma&&Fa(R)),s!==o&&(u=Kf())!==o?("key"===r.substr(ga,3).toLowerCase()?(a=r.substr(ga,3),ga+=3):(a=o,0===Ma&&Fa(N)),a!==o?n=s=[s,u,a]:(ga=n,n=o)):(ga=n,n=o),n!==o&&(s=Kf())!==o?((u=Mi())===o&&(u=null),u!==o&&(a=Kf())!==o&&(i=Ti())!==o&&Kf()!==o?((l=ki())===o&&(l=null),l!==o?(f=n,b=u,v=i,p=l,t=e={constraint:(c=e)&&c.constraint,definition:v,constraint_type:`${f[0].toLowerCase()} ${f[2].toLowerCase()}`,keyword:c&&c.keyword,index_type:b,resource:"constraint",index_options:p}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;return r=ga,(t=ui())===o&&(t=null),t!==o&&Kf()!==o&&(e=Df())!==o&&Kf()!==o?((n=xf())===o&&(n=Uf()),n===o&&(n=null),n!==o&&Kf()!==o?((s=_l())===o&&(s=null),s!==o&&Kf()!==o?((u=Mi())===o&&(u=null),u!==o&&Kf()!==o&&(a=Ti())!==o&&Kf()!==o?((i=ki())===o&&(i=null),i!==o?(c=e,f=n,b=s,v=u,p=a,L=i,r=t={constraint:(l=t)&&l.constraint,definition:p,constraint_type:f&&`${c.toLowerCase()} ${f.toLowerCase()}`||c.toLowerCase(),keyword:l&&l.keyword,index_type:v,index:b,resource:"constraint",index_options:L}):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=ga,(e=ui())===o&&(e=null),e!==o&&Kf()!==o?("foreign key"===r.substr(ga,11).toLowerCase()?(n=r.substr(ga,11),ga+=11):(n=o,0===Ma&&Fa(cr)),n!==o&&Kf()!==o?((s=_l())===o&&(s=null),s!==o&&Kf()!==o&&(u=Ai())!==o&&Kf()!==o?((a=ai())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l,keyword:i&&i.keyword,index:c,resource:"constraint",reference_definition:b}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,p,L;return t=ga,(e=ui())===o&&(e=null),e!==o&&Kf()!==o?("check"===r.substr(ga,5).toLowerCase()?(n=r.substr(ga,5),ga+=5):(n=o,0===Ma&&Fa(v)),n!==o&&Kf()!==o?(s=ga,"not"===r.substr(ga,3).toLowerCase()?(u=r.substr(ga,3),ga+=3):(u=o,0===Ma&&Fa(ir)),u!==o&&(a=Kf())!==o?("for"===r.substr(ga,3).toLowerCase()?(i=r.substr(ga,3),ga+=3):(i=o,0===Ma&&Fa(O)),i!==o&&(l=Kf())!==o?("replication"===r.substr(ga,11).toLowerCase()?(c=r.substr(ga,11),ga+=11):(c=o,0===Ma&&Fa(lr)),c!==o&&(f=Kf())!==o?s=u=[u,a,i,l,c,f]:(ga=s,s=o)):(ga=s,s=o)):(ga=s,s=o),s===o&&(s=null),s!==o&&(u=Yf())!==o&&(a=Kf())!==o&&(i=al())!==o&&(l=Kf())!==o&&(c=Bf())!==o?(b=e,p=s,L=i,t=e={constraint_type:n.toLowerCase(),keyword:b&&b.keyword,constraint:b&&b.constraint,index_type:p&&{keyword:"not for replication"},definition:[L],resource:"constraint"}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}()),t}function ui(){var r,t,e,n;return r=ga,(t=Pf())!==o&&Kf()!==o?((e=Il())===o&&(e=null),e!==o?(n=e,r=t={keyword:t.toLowerCase(),constraint:n}):(ga=r,r=o)):(ga=r,r=o),r}function ai(){var t,e,n,s,u,a,i,l,c,f;return t=ga,(e=Ff())!==o&&Kf()!==o&&(n=$i())!==o&&Kf()!==o&&(s=Ai())!==o&&Kf()!==o?("match full"===r.substr(ga,10).toLowerCase()?(u=r.substr(ga,10),ga+=10):(u=o,0===Ma&&Fa(br)),u===o&&("match partial"===r.substr(ga,13).toLowerCase()?(u=r.substr(ga,13),ga+=13):(u=o,0===Ma&&Fa(vr)),u===o&&("match simple"===r.substr(ga,12).toLowerCase()?(u=r.substr(ga,12),ga+=12):(u=o,0===Ma&&Fa(pr)))),u===o&&(u=null),u!==o&&Kf()!==o?((a=ii())===o&&(a=null),a!==o&&Kf()!==o?((i=ii())===o&&(i=null),i!==o?(l=u,c=a,f=i,t=e={definition:s,table:n,keyword:e.toLowerCase(),match:l&&l.toLowerCase(),on_action:[c,f].filter((r=>r))}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=ii())!==o&&(e={on_action:[e]}),t=e),t}function ii(){var t,e,n,s;return t=ga,Oc()!==o&&Kf()!==o?((e=Cc())===o&&(e=vc()),e!==o&&Kf()!==o&&(n=function(){var t,e,n;return t=ga,(e=mf())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o?((n=nl())===o&&(n=null),n!==o&&Kf()!==o&&Bf()!==o?t=e={type:"function",name:e,args:n}:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=li())===o&&("set null"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(dr)),e===o&&("no action"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(wr)),e===o&&("set default"===r.substr(ga,11).toLowerCase()?(e=r.substr(ga,11),ga+=11):(e=o,0===Ma&&Fa(hr)),e===o&&(e=mf())))),e!==o&&(e={type:"origin",value:e.toLowerCase()}),t=e),t}())!==o?(s=n,t={type:"on "+e[0].toLowerCase(),value:s}):(ga=t,t=o)):(ga=t,t=o),t}function li(){var t;return"restrict"===r.substr(ga,8).toLowerCase()?(t=r.substr(ga,8),ga+=8):(t=o,0===Ma&&Fa(Lr)),t===o&&("cascade"===r.substr(ga,7).toLowerCase()?(t=r.substr(ga,7),ga+=7):(t=o,0===Ma&&Fa(Cr))),t!==o&&(t=t.toLowerCase()),t}function ci(){var t,e,n;return t=ga,"character"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(yr)),e!==o&&Kf()!==o?("set"===r.substr(ga,3).toLowerCase()?(n=r.substr(ga,3),ga+=3):(n=o,0===Ma&&Fa(Er)),n!==o?t=e="CHARACTER SET":(ga=t,t=o)):(ga=t,t=o),t}function fi(){var t,e,n,s,u,a,i,l,c;return t=ga,(e=ac())===o&&(e=null),e!==o&&Kf()!==o?((n=ci())===o&&("charset"===r.substr(ga,7).toLowerCase()?(n=r.substr(ga,7),ga+=7):(n=o,0===Ma&&Fa(Ar)),n===o&&("collate"===r.substr(ga,7).toLowerCase()?(n=r.substr(ga,7),ga+=7):(n=o,0===Ma&&Fa(mr)))),n!==o&&Kf()!==o?((s=_f())===o&&(s=null),s!==o&&Kf()!==o&&(u=Ol())!==o?(i=n,l=s,c=u,t=e={keyword:(a=e)&&`${a[0].toLowerCase()} ${i.toLowerCase()}`||i.toLowerCase(),symbol:l,value:c}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}function bi(){var t,e,n,s,u,a,i,l,c;return t=ga,"auto_increment"===r.substr(ga,14).toLowerCase()?(e=r.substr(ga,14),ga+=14):(e=o,0===Ma&&Fa(T)),e===o&&("avg_row_length"===r.substr(ga,14).toLowerCase()?(e=r.substr(ga,14),ga+=14):(e=o,0===Ma&&Fa(Tr)),e===o&&("key_block_size"===r.substr(ga,14).toLowerCase()?(e=r.substr(ga,14),ga+=14):(e=o,0===Ma&&Fa(Ir)),e===o&&("max_rows"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(Nr)),e===o&&("min_rows"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(Rr)),e===o&&("stats_sample_pages"===r.substr(ga,18).toLowerCase()?(e=r.substr(ga,18),ga+=18):(e=o,0===Ma&&Fa(Sr))))))),e!==o&&Kf()!==o?((n=_f())===o&&(n=null),n!==o&&Kf()!==o&&(s=rc())!==o?(l=n,c=s,t=e={keyword:e.toLowerCase(),symbol:l,value:c.value}):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"CHECKSUM"===r.substr(ga,8)?(e="CHECKSUM",ga+=8):(e=o,0===Ma&&Fa(_r)),e===o&&("DELAY_KEY_WRITE"===r.substr(ga,15)?(e="DELAY_KEY_WRITE",ga+=15):(e=o,0===Ma&&Fa(gr))),e!==o&&Kf()!==o&&(n=_f())!==o&&Kf()!==o?(Or.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(xr)),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e}}(e,n,s):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=fi())===o&&(t=ga,(e=$f())===o&&("connection"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(Ur)),e===o&&("engine_attribute"===r.substr(ga,16).toLowerCase()?(e=r.substr(ga,16),ga+=16):(e=o,0===Ma&&Fa(Mr)),e===o&&("secondary_engine_attribute"===r.substr(ga,26).toLowerCase()?(e=r.substr(ga,26),ga+=26):(e=o,0===Ma&&Fa(kr))))),e!==o&&Kf()!==o?((n=_f())===o&&(n=null),n!==o&&Kf()!==o&&(s=Zl())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:`'${e.value}'`}}(e,n,s):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"data"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Dr)),e===o&&("index"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa($r))),e!==o&&Kf()!==o?("directory"===r.substr(ga,9).toLowerCase()?(n=r.substr(ga,9),ga+=9):(n=o,0===Ma&&Fa(Pr)),n!==o&&Kf()!==o?((s=_f())===o&&(s=null),s!==o&&(u=Kf())!==o&&(a=Zl())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase()+" directory",symbol:t,value:`'${e.value}'`}}(e,s,a):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"compression"===r.substr(ga,11).toLowerCase()?(e=r.substr(ga,11),ga+=11):(e=o,0===Ma&&Fa(Fr)),e!==o&&Kf()!==o?((n=_f())===o&&(n=null),n!==o&&Kf()!==o?(s=ga,39===r.charCodeAt(ga)?(u="'",ga++):(u=o,0===Ma&&Fa(Gr)),u!==o?("zlib"===r.substr(ga,4).toLowerCase()?(a=r.substr(ga,4),ga+=4):(a=o,0===Ma&&Fa(jr)),a===o&&("lz4"===r.substr(ga,3).toLowerCase()?(a=r.substr(ga,3),ga+=3):(a=o,0===Ma&&Fa(Hr)),a===o&&("none"===r.substr(ga,4).toLowerCase()?(a=r.substr(ga,4),ga+=4):(a=o,0===Ma&&Fa(tr)))),a!==o?(39===r.charCodeAt(ga)?(i="'",ga++):(i=o,0===Ma&&Fa(Gr)),i!==o?s=u=[u,a,i]:(ga=s,s=o)):(ga=s,s=o)):(ga=s,s=o),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.join("").toUpperCase()}}(e,n,s):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"engine"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Yr)),e!==o&&Kf()!==o?((n=_f())===o&&(n=null),n!==o&&Kf()!==o&&(s=Ol())!==o?t=e=Br(e,n,s):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"row_format"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(Wr)),e!==o&&Kf()!==o?((n=_f())===o&&(n=null),n!==o&&Kf()!==o?((s=ac())===o&&("dynamic"===r.substr(ga,7).toLowerCase()?(s=r.substr(ga,7),ga+=7):(s=o,0===Ma&&Fa(F)),s===o&&("fixed"===r.substr(ga,5).toLowerCase()?(s=r.substr(ga,5),ga+=5):(s=o,0===Ma&&Fa(P)),s===o&&("compressed"===r.substr(ga,10).toLowerCase()?(s=r.substr(ga,10),ga+=10):(s=o,0===Ma&&Fa(Xr)),s===o&&("redundant"===r.substr(ga,9).toLowerCase()?(s=r.substr(ga,9),ga+=9):(s=o,0===Ma&&Fa(Vr)),s===o&&("compact"===r.substr(ga,7).toLowerCase()?(s=r.substr(ga,7),ga+=7):(s=o,0===Ma&&Fa(qr))))))),s!==o?t=e=Br(e,n,s):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o))))))),t}function vi(){var t,e,n,s,u;return t=ga,(e=Fi())!==o&&Kf()!==o&&(n=function(){var t,e,n;return t=ga,"read"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Kr)),e!==o&&Kf()!==o?("local"===r.substr(ga,5).toLowerCase()?(n=r.substr(ga,5),ga+=5):(n=o,0===Ma&&Fa(b)),n===o&&(n=null),n!==o?t=e={type:"read",suffix:n&&"local"}:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"low_priority"===r.substr(ga,12).toLowerCase()?(e=r.substr(ga,12),ga+=12):(e=o,0===Ma&&Fa(Zr)),e===o&&(e=null),e!==o&&Kf()!==o?("write"===r.substr(ga,5).toLowerCase()?(n=r.substr(ga,5),ga+=5):(n=o,0===Ma&&Fa(zr)),n!==o?t=e={type:"write",prefix:e&&"low_priority"}:(ga=t,t=o)):(ga=t,t=o)),t}())!==o?(s=e,u=n,Sb.add(`lock::${s.db}::${s.table}`),t=e={table:s,lock_type:u}):(ga=t,t=o),t}function pi(){var t;return(t=function(){var t,e,n,s;return(t=jc())===o&&(t=fc())===o&&(t=ga,(e=pc())!==o&&(n=Kf())!==o?("view"===r.substr(ga,4).toLowerCase()?(s=r.substr(ga,4),ga+=4):(s=o,0===Ma&&Fa(Lt)),s!==o?t=e=[e,n,s]:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=pc())===o&&(t=Cc())===o&&(t=cc())===o&&(t=ga,"grant"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Ct)),e!==o&&(n=Kf())!==o?("option"===r.substr(ga,6).toLowerCase()?(s=r.substr(ga,6),ga+=6):(s=o,0===Ma&&Fa(dt)),s!==o?t=e=[e,n,s]:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=xf())===o&&(t=dc())===o&&(t=Ff())===o&&(t=bc())===o&&(t=ga,(e=lc())!==o&&(n=Kf())!==o&&(s=If())!==o?t=e=[e,n,s]:(ga=t,t=o),t===o&&(t=Rc())===o&&(t=vc())))),t!==o&&(t=wt(t)),t}())===o&&(t=function(){var t,e,n,s;return t=ga,(e=fc())!==o&&(n=Kf())!==o?("routine"===r.substr(ga,7).toLowerCase()?(s=r.substr(ga,7),ga+=7):(s=o,0===Ma&&Fa(ht)),s!==o?t=e=[e,n,s]:(ga=t,t=o)):(ga=t,t=o),t===o&&("execute"===r.substr(ga,7).toLowerCase()?(t=r.substr(ga,7),ga+=7):(t=o,0===Ma&&Fa(yt)),t===o&&(t=ga,"grant"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Ct)),e!==o&&(n=Kf())!==o?("option"===r.substr(ga,6).toLowerCase()?(s=r.substr(ga,6),ga+=6):(s=o,0===Ma&&Fa(dt)),s!==o?t=e=[e,n,s]:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=pc())!==o&&(n=Kf())!==o?("routine"===r.substr(ga,7).toLowerCase()?(s=r.substr(ga,7),ga+=7):(s=o,0===Ma&&Fa(ht)),s!==o?t=e=[e,n,s]:(ga=t,t=o)):(ga=t,t=o)))),t!==o&&(t=wt(t)),t}()),t}function Li(){var r,t,e,n,s,u,a,i,l;return r=ga,(t=pi())!==o&&Kf()!==o?(e=ga,(n=Yf())!==o&&(s=Kf())!==o&&(u=Bi())!==o&&(a=Kf())!==o&&(i=Bf())!==o?e=n=[n,s,u,a,i]:(ga=e,e=o),e===o&&(e=null),e!==o?r=t={priv:t,columns:(l=e)&&l[2]}:(ga=r,r=o)):(ga=r,r=o),r}function Ci(){var t,e,n,s,u,a,i;return t=ga,(e=Il())!==o&&Kf()!==o?(n=ga,64===r.charCodeAt(ga)?(s="@",ga++):(s=o,0===Ma&&Fa(S)),s!==o&&(u=Kf())!==o&&(a=Il())!==o?n=s=[s,u,a]:(ga=n,n=o),n===o&&(n=null),n!==o?t=e={name:{type:"single_quote_string",value:e},host:(i=n)?{type:"single_quote_string",value:i[2]}:null}:(ga=t,t=o)):(ga=t,t=o),t}function di(){var r,t,e,n,s,u,a,i;if(r=ga,(t=Ci())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Ci())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Ci())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=Et(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function wi(){var t,e,n;return t=ga,Dc()!==o&&Kf()!==o?("admin"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(At)),e!==o&&Kf()!==o?("option"===r.substr(ga,6).toLowerCase()?(n=r.substr(ga,6),ga+=6):(n=o,0===Ma&&Fa(dt)),n!==o?t={type:"origin",value:"with admin option"}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}function hi(){var t,e,n,s,u,a,i;return(t=Ii())===o&&(t=ga,e=ga,40===r.charCodeAt(ga)?(n="(",ga++):(n=o,0===Ma&&Fa(It)),n!==o&&(s=Kf())!==o&&(u=hi())!==o&&(a=Kf())!==o?(41===r.charCodeAt(ga)?(i=")",ga++):(i=o,0===Ma&&Fa(Nt)),i!==o?e=n=[n,s,u,a,i]:(ga=e,e=o)):(ga=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}function yi(){var t,e,n,s,u,a,i,l,c;if(t=ga,Dc()!==o)if(Kf()!==o)if((e=Ei())!==o){for(n=[],s=ga,(u=Kf())!==o&&(a=jf())!==o&&(i=Kf())!==o&&(l=Ei())!==o?s=u=[u,a,i,l]:(ga=s,s=o);s!==o;)n.push(s),s=ga,(u=Kf())!==o&&(a=jf())!==o&&(i=Kf())!==o&&(l=Ei())!==o?s=u=[u,a,i,l]:(ga=s,s=o);n!==o?t=m(e,n):(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;return t===o&&(t=ga,Kf()!==o&&Dc()!==o&&(e=Kf())!==o&&(n=function(){var t,e,n,s;return t=ga,"RECURSIVE"===r.substr(ga,9)?(e="RECURSIVE",ga+=9):(e=o,0===Ma&&Fa(Ps)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(s=Kf())!==o&&(u=Ei())!==o?((c=u).recursive=!0,t=[c]):(ga=t,t=o)),t}function Ei(){var r,t,e,n,s,u,a;return r=ga,(t=Zl())===o&&(t=Ol())===o&&(t=ji()),t!==o&&Kf()!==o?((e=Ai())===o&&(e=null),e!==o&&Kf()!==o&&Ic()!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=Wa())!==o&&Kf()!==o&&Bf()!==o?(u=e,a=n,"string"==typeof(s=t)&&(s={type:"default",value:s}),s.table&&(s={type:"default",value:s.table}),r=t={name:s,stmt:a,columns:u}):(ga=r,r=o)):(ga=r,r=o),r}function Ai(){var r,t;return r=ga,Yf()!==o&&Kf()!==o&&(t=function(){var r;return(r=Bi())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=ql())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=ql())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=ql())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}()),r}())!==o&&Kf()!==o&&Bf()!==o?r=t:(ga=r,r=o),r}function mi(){var t,e,n,s,u,a,i;if(t=ga,(e=Sl())!==o)if(Kf()!==o)if((n=Yf())!==o)if(Kf()!==o){if(s=[],Rt.test(r.charAt(ga))?(u=r.charAt(ga),ga++):(u=o,0===Ma&&Fa(St)),u!==o)for(;u!==o;)s.push(u),Rt.test(r.charAt(ga))?(u=r.charAt(ga),ga++):(u=o,0===Ma&&Fa(St));else s=o;s!==o&&(u=Kf())!==o&&Bf()!==o&&Kf()!==o?((a=Fc())===o&&(a=Gc()),a===o&&(a=null),a!==o?(i=a,t=e={type:"column_ref",column:e,suffix:`(${parseInt(s.join(""),10)})`,order_by:i}):(ga=t,t=o)):(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;return t===o&&(t=ga,(e=Sl())!==o&&Kf()!==o?((n=Fc())===o&&(n=Gc()),n===o&&(n=null),n!==o?t=e=function(r,t){return{type:"column_ref",column:r,order_by:t}}(e,n):(ga=t,t=o)):(ga=t,t=o)),t}function Ti(){var r,t;return r=ga,Yf()!==o&&Kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=mi())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=mi())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=mi())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o&&Kf()!==o&&Bf()!==o?r=t:(ga=r,r=o),r}function Ii(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d;return t=ga,Kf()!==o?((e=yi())===o&&(e=null),e!==o&&Kf()!==o&&bc()!==o&&Zf()!==o?((n=function(){var r,t,e,n,s,u;if(r=ga,(t=Ni())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=Ni())!==o?n=s=[s,u]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=Ni())!==o?n=s=[s,u]:(ga=n,n=o);e!==o?(t=function(r,t){const e=[r];for(let r=0,n=t.length;r<n;++r)e.push(t[r][1]);return e}(t,e),r=t):(ga=r,r=o)}else ga=r,r=o;return r}())===o&&(n=null),n!==o&&Kf()!==o?((s=Hc())===o&&(s=null),s!==o&&Kf()!==o&&(u=Ri())!==o&&Kf()!==o?((a=Oi())===o&&(a=null),a!==o&&Kf()!==o?((i=xi())===o&&(i=null),i!==o&&Kf()!==o?((l=Oi())===o&&(l=null),l!==o&&Kf()!==o?((c=Yi())===o&&(c=null),c!==o&&Kf()!==o?((f=function(){var t,e;return t=ga,function(){var t,e,n,s;return t=ga,"group"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(bo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&Pc()!==o&&Kf()!==o&&(e=nl())!==o?t=e.value:(ga=t,t=o),t}())===o&&(f=null),f!==o&&Kf()!==o?((b=function(){var t,e;return t=ga,function(){var t,e,n,s;return t=ga,"having"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Lo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&(e=il())!==o?t=e:(ga=t,t=o),t}())===o&&(b=null),b!==o&&Kf()!==o?((v=Wi())===o&&(v=null),v!==o&&Kf()!==o?((p=qi())===o&&(p=null),p!==o&&Kf()!==o?((L=function(){var t,e,n,s;return t=ga,(e=function(){var t,e,n,s,u;return t=ga,"for"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(O)),e!==o&&(n=Kf())!==o&&(s=vc())!==o?t=e=[e,n,s]:(ga=t,t=o),t!==o&&(t=`${(u=t)[0]} ${u[2][0]}`),t}())===o&&(e=function(){var t,e,n,s,u,a,i,l,c;return t=ga,"lock"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(rr)),e!==o&&(n=Kf())!==o?("in"===r.substr(ga,2).toLowerCase()?(s=r.substr(ga,2),ga+=2):(s=o,0===Ma&&Fa(_t)),s!==o&&(u=Kf())!==o?("share"===r.substr(ga,5).toLowerCase()?(a=r.substr(ga,5),ga+=5):(a=o,0===Ma&&Fa(gt)),a!==o&&(i=Kf())!==o?("mode"===r.substr(ga,4).toLowerCase()?(l=r.substr(ga,4),ga+=4):(l=o,0===Ma&&Fa(Ot)),l!==o?t=e=[e,n,s,u,a,i,l]:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t!==o&&(t=`${(c=t)[0]} ${c[2]} ${c[4]} ${c[6]}`),t}()),e!==o&&Kf()!==o?((n=function(){var t,e,n,s,u,a,i;return t=ga,e=ga,"wait"===r.substr(ga,4).toLowerCase()?(n=r.substr(ga,4),ga+=4):(n=o,0===Ma&&Fa(xt)),n!==o&&(s=Kf())!==o&&(u=rc())!==o?e=n=[n,s,u]:(ga=e,e=o),e!==o&&(e=`${(a=e)[0]} ${a[2].value}`),(t=e)===o&&("nowait"===r.substr(ga,6).toLowerCase()?(t=r.substr(ga,6),ga+=6):(t=o,0===Ma&&Fa(Ut)),t===o&&(t=ga,e=ga,"skip"===r.substr(ga,4).toLowerCase()?(n=r.substr(ga,4),ga+=4):(n=o,0===Ma&&Fa(Mt)),n!==o&&(s=Kf())!==o?("locked"===r.substr(ga,6).toLowerCase()?(u=r.substr(ga,6),ga+=6):(u=o,0===Ma&&Fa(kt)),u!==o?e=n=[n,s,u]:(ga=e,e=o)):(ga=e,e=o),e!==o&&(e=`${(i=e)[0]} ${i[2]}`),t=e)),t}())===o&&(n=null),n!==o?t=e+=(s=n)?" "+s:"":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(L=null),L!==o&&Kf()!==o?((C=function(){var t,e,n;return t=ga,"window"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Xe)),e!==o&&Kf()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=Pl())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Pl())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Pl())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=mb(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o?t=e={keyword:"window",type:"window",expr:n}:(ga=t,t=o),t}())===o&&(C=null),C!==o&&Kf()!==o?((d=Oi())===o&&(d=null),d!==o?t=function(r,t,e,n,s,o,u,a,i,l,c,f,b,v,p){if(s&&u||s&&p||u&&p||s&&u&&p)throw new Error("A given SQL statement can contain at most one INTO clause");return o&&o.forEach((r=>r.table&&Sb.add(`select::${r.db}::${r.table}`))),{with:r,type:"select",options:t,distinct:e,columns:n,into:{...s||u||p||{},position:(s?"column":u&&"from")||p&&"end"},from:o,where:a,groupby:i,having:l,orderby:c,limit:f,locking_read:b&&b,window:v}}(e,n,s,u,a,i,l,c,f,b,v,p,L,C,d):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}function Ni(){var t;return(t=function(){var t;return"sql_calc_found_rows"===r.substr(ga,19).toLowerCase()?(t=r.substr(ga,19),ga+=19):(t=o,0===Ma&&Fa(Ju)),t}())===o&&((t=function(){var t;return"sql_cache"===r.substr(ga,9).toLowerCase()?(t=r.substr(ga,9),ga+=9):(t=o,0===Ma&&Fa(ra)),t}())===o&&(t=function(){var t;return"sql_no_cache"===r.substr(ga,12).toLowerCase()?(t=r.substr(ga,12),ga+=12):(t=o,0===Ma&&Fa(ta)),t}()),t===o&&(t=function(){var t;return"sql_big_result"===r.substr(ga,14).toLowerCase()?(t=r.substr(ga,14),ga+=14):(t=o,0===Ma&&Fa(na)),t}())===o&&(t=function(){var t;return"sql_small_result"===r.substr(ga,16).toLowerCase()?(t=r.substr(ga,16),ga+=16):(t=o,0===Ma&&Fa(ea)),t}())===o&&(t=function(){var t;return"sql_buffer_result"===r.substr(ga,17).toLowerCase()?(t=r.substr(ga,17),ga+=17):(t=o,0===Ma&&Fa(sa)),t}())),t}function Ri(){var r,t,e,n,s,u,a,i;if(r=ga,(t=jc())===o&&(t=ga,(e=Hf())!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=Hf())),t!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=_i())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=_i())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=function(r,t){_b.add("select::null::(.*)");const e={expr:{type:"column_ref",table:null,column:"*"},as:null};return t&&t.length>0?mb(e,t):[e]}(0,e):(ga=r,r=o)}else ga=r,r=o;if(r===o)if(r=ga,(t=_i())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=_i())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=_i())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function Si(){var t,e,n,s,u,a,i;return t=ga,"match"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Ht)),e!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=Bi())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?("AGAINST"===r.substr(ga,7)?(s="AGAINST",ga+=7):(s=o,0===Ma&&Fa(Yt)),s!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(u=al())!==o&&Kf()!==o?((a=function(){var t,e,n,s,u,a,i;return t=ga,Bc()!==o&&Kf()!==o?("natural"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Dt)),e!==o&&Kf()!==o?("language"===r.substr(ga,8).toLowerCase()?(n=r.substr(ga,8),ga+=8):(n=o,0===Ma&&Fa($t)),n!==o&&Kf()!==o?("mode"===r.substr(ga,4).toLowerCase()?(s=r.substr(ga,4),ga+=4):(s=o,0===Ma&&Fa(Ot)),s!==o&&Kf()!==o?("with"===r.substr(ga,4).toLowerCase()?(u=r.substr(ga,4),ga+=4):(u=o,0===Ma&&Fa(Pt)),u!==o&&Kf()!==o?("query"===r.substr(ga,5).toLowerCase()?(a=r.substr(ga,5),ga+=5):(a=o,0===Ma&&Fa(Ft)),a!==o&&Kf()!==o?("expansion"===r.substr(ga,9).toLowerCase()?(i=r.substr(ga,9),ga+=9):(i=o,0===Ma&&Fa(Gt)),i!==o?t={type:"origin",value:"IN NATURAL LANGUAGE MODE WITH QUERY EXPANSION"}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,Bc()!==o&&Kf()!==o?("natural"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Dt)),e!==o&&Kf()!==o?("language"===r.substr(ga,8).toLowerCase()?(n=r.substr(ga,8),ga+=8):(n=o,0===Ma&&Fa($t)),n!==o&&Kf()!==o?("mode"===r.substr(ga,4).toLowerCase()?(s=r.substr(ga,4),ga+=4):(s=o,0===Ma&&Fa(Ot)),s!==o?t={type:"origin",value:"IN NATURAL LANGUAGE MODE"}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,Bc()!==o&&Kf()!==o?("boolean"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(jt)),e!==o&&Kf()!==o?("mode"===r.substr(ga,4).toLowerCase()?(n=r.substr(ga,4),ga+=4):(n=o,0===Ma&&Fa(Ot)),n!==o?t={type:"origin",value:"IN BOOLEAN MODE"}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,Dc()!==o&&Kf()!==o?("query"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Ft)),e!==o&&Kf()!==o?("expansion"===r.substr(ga,9).toLowerCase()?(n=r.substr(ga,9),ga+=9):(n=o,0===Ma&&Fa(Gt)),n!==o?t={type:"origin",value:"WITH QUERY EXPANSION"}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)))),t}())===o&&(a=null),a!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?((i=gi())===o&&(i=null),i!==o?t=e={against:"against",columns:n,expr:u,match:"match",mode:a,type:"fulltext_search",as:i}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}function _i(){var r,t,e,n,s,u,a,i;return r=ga,(t=Si())!==o&&(t=function(r){const{as:t,...e}=r;return{expr:e,as:t}}(t)),(r=t)===o&&(r=ga,(t=Il())!==o&&(e=Kf())!==o&&(n=Gf())!==o&&(s=Kf())!==o&&(u=Il())!==o&&Kf()!==o&&Gf()!==o&&Kf()!==o&&Hf()!==o?(a=t,i=u,_b.add(`select::${a}::${i}::(.*)`),r=t={expr:{type:"column_ref",db:a,table:i,column:"*"},as:null}):(ga=r,r=o),r===o&&(r=ga,t=ga,(e=Il())!==o&&(n=Kf())!==o&&(s=Gf())!==o?t=e=[e,n,s]:(ga=t,t=o),t===o&&(t=null),t!==o&&(e=Kf())!==o&&(n=Hf())!==o?r=t=function(r){return _b.add(`select::${r}::(.*)`),{expr:{type:"column_ref",table:r&&r[0]||null,column:"*"},as:null}}(t):(ga=r,r=o),r===o&&(r=ga,(t=function(){var r,t,e,n;return r=ga,(t=bb())===o&&(t=vb()),t!==o&&Kf()!==o&&(e=Sf())!==o&&Kf()!==o&&(n=sb())!==o?r=t=ya(t,e,n):(ga=r,r=o),r}())!==o&&(t={expr:t,as:null}),(r=t)===o&&(r=ga,(t=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=al())!==o){for(e=[],n=ga,(s=Kf())!==o?((u=Kc())===o&&(u=Zc())===o&&(u=qf()),u!==o&&(a=Kf())!==o&&(i=al())!==o?n=s=[s,u,a,i]:(ga=n,n=o)):(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o?((u=Kc())===o&&(u=Zc())===o&&(u=qf()),u!==o&&(a=Kf())!==o&&(i=al())!==o?n=s=[s,u,a,i]:(ga=n,n=o)):(ga=n,n=o);e!==o?(t=function(r,t){const e=r.ast;if(e&&"select"===e.type&&(!(r.parentheses_symbol||r.parentheses||r.ast.parentheses||r.ast.parentheses_symbol)||1!==e.columns.length||"*"===e.columns[0].expr.column))throw new Error("invalid column clause with select statement");if(!t||0===t.length)return r;const n=t.length;let s=t[n-1][3];for(let e=n-1;e>=0;e--){const n=0===e?r:t[e-1][3];s=Eb(t[e][1],n,s)}return s}(t,e),r=t):(ga=r,r=o)}else ga=r,r=o;return r}())!==o&&(e=Kf())!==o?((n=gi())===o&&(n=null),n!==o?r=t={expr:t,as:n}:(ga=r,r=o)):(ga=r,r=o))))),r}function gi(){var r,t,e;return r=ga,(t=Ic())!==o&&Kf()!==o&&(e=function(){var r,t;return r=ga,(t=Ol())!==o&&(function(r){if(!0===wb[r.toUpperCase()])throw new Error("Error: "+JSON.stringify(r)+" is a reserved word, can not as alias clause");return!1}(t)?o:void 0)!==o?r=t:(ga=r,r=o),r===o&&(r=ga,r=t=Nl()),r}())!==o?r=t=e:(ga=r,r=o),r===o&&(r=ga,(t=Ic())===o&&(t=null),t!==o&&Kf()!==o&&(e=Il())!==o?r=t=e:(ga=r,r=o)),r}function Oi(){var t,e,n;return t=ga,Ac()!==o&&Kf()!==o&&(e=function(){var r,t,e,n,s,u,a,l;if(r=ga,(t=bb())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(l=bb())!==o?n=s=[s,u,a,l]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(l=bb())!==o?n=s=[s,u,a,l]:(ga=n,n=o);e!==o?r=t=i(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o?t={keyword:"var",type:"into",expr:e}:(ga=t,t=o),t===o&&(t=ga,Ac()!==o&&Kf()!==o?("outfile"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Bt)),e===o&&("dumpfile"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(Wt))),e===o&&(e=null),e!==o&&Kf()!==o?((n=Zl())===o&&(n=Il()),n!==o?t={keyword:e,type:"into",expr:n}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)),t}function xi(){var r,t;return r=ga,mc()!==o&&Kf()!==o&&(t=$i())!==o?r=t:(ga=r,r=o),r}function Ui(){var r,t,e;return r=ga,(t=ji())!==o&&Kf()!==o&&ic()!==o&&Kf()!==o&&(e=ji())!==o?r=t=[t,e]:(ga=r,r=o),r}function Mi(){var t,e;return t=ga,kc()!==o&&Kf()!==o?("btree"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Xt)),e===o&&("hash"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Vt))),e!==o?t={keyword:"using",type:e.toLowerCase()}:(ga=t,t=o)):(ga=t,t=o),t}function ki(){var r,t,e,n,s,u;if(r=ga,(t=Di())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=Di())!==o?n=s=[s,u]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=Di())!==o?n=s=[s,u]:(ga=n,n=o);e!==o?r=t=function(r,t){const e=[r];for(let r=0;r<t.length;r++)e.push(t[r][1]);return e}(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function Di(){var t,e,n,s,u,a;return t=ga,(e=function(){var t,e,n,s;return t=ga,"key_block_size"===r.substr(ga,14).toLowerCase()?(e=r.substr(ga,14),ga+=14):(e=o,0===Ma&&Fa(Ir)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="KEY_BLOCK_SIZE":(ga=t,t=o)):(ga=t,t=o),t}())!==o&&Kf()!==o?((n=_f())===o&&(n=null),n!==o&&Kf()!==o&&(s=rc())!==o?(u=n,a=s,t=e={type:e.toLowerCase(),symbol:u,expr:a}):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=Mi())===o&&(t=ga,"with"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Pt)),e!==o&&Kf()!==o?("parser"===r.substr(ga,6).toLowerCase()?(n=r.substr(ga,6),ga+=6):(n=o,0===Ma&&Fa(qt)),n!==o&&Kf()!==o&&(s=Ol())!==o?t=e={type:"with parser",expr:s}:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,"visible"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Kt)),e===o&&("invisible"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(Zt))),e!==o&&(e=function(r){return{type:r.toLowerCase(),expr:r.toLowerCase()}}(e)),(t=e)===o&&(t=Qf()))),t}function $i(){var r,t,e,n;if(r=ga,(t=Fi())!==o){for(e=[],n=Pi();n!==o;)e.push(n),n=Pi();e!==o?r=t=zt(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function Pi(){var r,t,e;return r=ga,Kf()!==o&&(t=jf())!==o&&Kf()!==o&&(e=Fi())!==o?r=e:(ga=r,r=o),r===o&&(r=ga,Kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(r=ga,(t=Gi())!==o)if(Kf()!==o)if((e=Fi())!==o)if(Kf()!==o)if((n=kc())!==o)if(Kf()!==o)if(Yf()!==o)if(Kf()!==o)if((s=Ol())!==o){for(u=[],a=ga,(i=Kf())!==o&&(l=jf())!==o&&(c=Kf())!==o&&(f=Ol())!==o?a=i=[i,l,c,f]:(ga=a,a=o);a!==o;)u.push(a),a=ga,(i=Kf())!==o&&(l=jf())!==o&&(c=Kf())!==o&&(f=Ol())!==o?a=i=[i,l,c,f]:(ga=a,a=o);u!==o&&(a=Kf())!==o&&(i=Bf())!==o?(b=t,p=s,L=u,(v=e).join=b,v.using=mb(p,L),r=t=v):(ga=r,r=o)}else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;return r===o&&(r=ga,(t=Gi())!==o&&Kf()!==o&&(e=Fi())!==o&&Kf()!==o?((n=Hi())===o&&(n=null),n!==o?(t=function(r,t,e){return t.join=r,t.on=e,t}(t,e,n),r=t):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,(t=Gi())!==o&&Kf()!==o&&(e=Yf())!==o&&Kf()!==o&&(n=Wa())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?((s=gi())===o&&(s=null),s!==o&&(u=Kf())!==o?((a=Hi())===o&&(a=null),a!==o?(t=function(r,t,e,n){return t.parentheses=!0,{expr:t,as:e,join:r,on:n}}(t,n,s,a),r=t):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o))),r}())!==o?r=t:(ga=r,r=o)),r}function Fi(){var t,e,n,s,u,a;return t=ga,(e=function(){var t;return"dual"===r.substr(ga,4).toLowerCase()?(t=r.substr(ga,4),ga+=4):(t=o,0===Ma&&Fa(Bu)),t}())!==o&&(e={type:"dual"}),(t=e)===o&&(t=ga,(e=ji())!==o&&Kf()!==o?((n=gi())===o&&(n=null),n!==o?(a=n,t=e="var"===(u=e).type?(u.as=a,u):{db:u.db,table:u.table,as:a}):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=Yf())!==o&&Kf()!==o&&(n=ji())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?((s=gi())===o&&(s=null),s!==o?t=e=function(r,t,e){return"var"===r.type?(r.as=e,r.parentheses=!0,r):{db:r.db,table:r.table,as:e,parentheses:!0}}(n,0,s):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=tl())!==o&&Kf()!==o?((n=gi())===o&&(n=null),n!==o?t=e=function(r,t){return{expr:{type:"values",values:r,prefix:"row"},as:t}}(e,n):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=Yf())!==o&&Kf()!==o?((n=Wa())===o&&(n=tl()),n!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?((s=gi())===o&&(s=null),s!==o?t=e=function(r,t){return Array.isArray(r)&&(r={type:"values",values:r,prefix:"row"}),r.parentheses=!0,{expr:r,as:t}}(n,s):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o))))),t}function Gi(){var t,e,n,s;return t=ga,(e=function(){var t,e,n,s;return t=ga,"left"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Qs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(n=Kf())!==o?((s=Uc())===o&&(s=null),s!==o&&Kf()!==o&&xc()!==o?t=e="LEFT JOIN":(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=function(){var t,e,n,s;return t=ga,"right"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Js)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(n=Kf())!==o?((s=Uc())===o&&(s=null),s!==o&&Kf()!==o&&xc()!==o?t=e="RIGHT JOIN":(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=function(){var t,e,n,s;return t=ga,"full"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(ro)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(n=Kf())!==o?((s=Uc())===o&&(s=null),s!==o&&Kf()!==o&&xc()!==o?t=e="FULL JOIN":(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=function(){var t,e,n,s;return t=ga,"cross"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(eo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(n=Kf())!==o&&(s=xc())!==o?t=e="CROSS JOIN":(ga=t,t=o),t===o&&(t=ga,e=ga,(n=function(){var t,e,n,s;return t=ga,"inner"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(to)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(s=Kf())!==o?e=n=[n,s]:(ga=e,e=o),e===o&&(e=null),e!==o&&(n=xc())!==o?t=e="INNER JOIN":(ga=t,t=o))))),t}function ji(){var t,e,n,s,u,a,i,l,c;for(t=ga,e=[],Qt.test(r.charAt(ga))?(n=r.charAt(ga),ga++):(n=o,0===Ma&&Fa(Jt));n!==o;)e.push(n),Qt.test(r.charAt(ga))?(n=r.charAt(ga),ga++):(n=o,0===Ma&&Fa(Jt));return e!==o&&(n=Il())!==o?(s=ga,(u=Kf())!==o&&(a=Gf())!==o&&(i=Kf())!==o&&(l=Il())!==o?s=u=[u,a,i,l]:(ga=s,s=o),s===o&&(s=null),s!==o?t=e=function(r,t,e){const n=r?`${r.join("")}${t}`:t,s={db:null,table:n};return null!==e&&(s.db=n,s.table=e[3]),s}(e,n,s):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=bb())!==o&&((c=e).db=null,c.table=c.name,e=c),t=e),t}function Hi(){var r,t;return r=ga,Oc()!==o&&Kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=al())!==o){for(e=[],n=ga,(s=Kf())!==o?((u=Kc())===o&&(u=Zc()),u!==o&&(a=Kf())!==o&&(i=al())!==o?n=s=[s,u,a,i]:(ga=n,n=o)):(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o?((u=Kc())===o&&(u=Zc()),u!==o&&(a=Kf())!==o&&(i=al())!==o?n=s=[s,u,a,i]:(ga=n,n=o)):(ga=n,n=o);e!==o?(t=function(r,t){const e=t.length;let n=r;for(let r=0;r<e;++r)n=Eb(t[r][1],n,t[r][3]);return n}(t,e),r=t):(ga=r,r=o)}else ga=r,r=o;return r}())!==o?r=t:(ga=r,r=o),r}function Yi(){var t,e;return t=ga,function(){var t,e,n,s;return t=ga,"where"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(co)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&(e=il())!==o?t=e:(ga=t,t=o),t}function Bi(){var r,t,e,n,s,u,a,i;if(r=ga,(t=ml())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=ml())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=ml())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function Wi(){var t,e;return t=ga,function(){var t,e,n,s;return t=ga,"order"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(po)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&Pc()!==o&&Kf()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=Xi())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Xi())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Xi())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o?t=e:(ga=t,t=o),t}function Xi(){var r,t,e;return r=ga,(t=al())!==o&&Kf()!==o?((e=Gc())===o&&(e=Fc()),e===o&&(e=null),e!==o?r=t={expr:t,type:e}:(ga=r,r=o)):(ga=r,r=o),r}function Vi(){var t,e;return(t=rc())===o&&(t=kl())===o&&(t=ga,63===r.charCodeAt(ga)?(e="?",ga++):(e=o,0===Ma&&Fa(re)),e!==o&&(e={type:"origin",value:"?"}),t=e),t}function qi(){var t,e,n,s,u,a;return t=ga,function(){var t,e,n,s;return t=ga,"limit"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Co)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&(e=Vi())!==o&&Kf()!==o?(n=ga,(s=jf())===o&&(s=function(){var t,e,n,s;return t=ga,"offset"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(wo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="OFFSET":(ga=t,t=o)):(ga=t,t=o),t}()),s!==o&&(u=Kf())!==o&&(a=Vi())!==o?n=s=[s,u,a]:(ga=n,n=o),n===o&&(n=null),n!==o?t=function(r,t){const e=[r];return t&&e.push(t[2]),{seperator:t&&t[0]&&t[0].toLowerCase()||"",value:e}}(e,n):(ga=t,t=o)):(ga=t,t=o),t}function Ki(){var r,t,e,n,s,u,a,i;if(r=ga,(t=Zi())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Zi())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=Zi())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function Zi(){var t,e,n,s,u,a,i,l,c;return t=ga,e=ga,(n=Il())!==o&&(s=Kf())!==o&&(u=Gf())!==o?e=n=[n,s,u]:(ga=e,e=o),e===o&&(e=null),e!==o&&(n=Kf())!==o&&(s=Sl())!==o&&(u=Kf())!==o?(61===r.charCodeAt(ga)?(a="=",ga++):(a=o,0===Ma&&Fa(te)),a!==o&&Kf()!==o&&(i=dl())!==o?t=e={column:s,value:i,table:(c=e)&&c[0]}:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,e=ga,(n=Il())!==o&&(s=Kf())!==o&&(u=Gf())!==o?e=n=[n,s,u]:(ga=e,e=o),e===o&&(e=null),e!==o&&(n=Kf())!==o&&(s=Sl())!==o&&(u=Kf())!==o?(61===r.charCodeAt(ga)?(a="=",ga++):(a=o,0===Ma&&Fa(te)),a!==o&&Kf()!==o&&(i=Mc())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(l=ml())!==o&&Kf()!==o&&Bf()!==o?t=e=function(r,t,e){return{column:t,value:e,table:r&&r[0],keyword:"values"}}(e,s,l):(ga=t,t=o)):(ga=t,t=o)),t}function zi(){var r;return(r=tl())===o&&(r=Ii()),r}function Qi(){var r,t,e,n,s,u,a,i,l;if(r=ga,Ec()!==o)if(Kf()!==o)if((t=Yf())!==o)if(Kf()!==o)if((e=Ol())!==o){for(n=[],s=ga,(u=Kf())!==o&&(a=jf())!==o&&(i=Kf())!==o&&(l=Ol())!==o?s=u=[u,a,i,l]:(ga=s,s=o);s!==o;)n.push(s),s=ga,(u=Kf())!==o&&(a=jf())!==o&&(i=Kf())!==o&&(l=Ol())!==o?s=u=[u,a,i,l]:(ga=s,s=o);n!==o&&(s=Kf())!==o&&(u=Bf())!==o?r=Et(e,n):(ga=r,r=o)}else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;return r===o&&(r=ga,Ec()!==o&&Kf()!==o&&(t=el())!==o?r=t:(ga=r,r=o)),r}function Ji(){var t,e,n;return t=ga,Oc()!==o&&Kf()!==o?("duplicate"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(ee)),e!==o&&Kf()!==o&&Uf()!==o&&Kf()!==o&&vc()!==o&&Kf()!==o&&(n=Ki())!==o?t={keyword:"on duplicate key update",set:n}:(ga=t,t=o)):(ga=t,t=o),t}function rl(){var r,t;return r=ga,(t=dc())!==o&&(t="insert"),(r=t)===o&&(r=ga,(t=wc())!==o&&(t="replace"),r=t),r}function tl(){var r,t;return r=ga,Mc()!==o&&Kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=el())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=el())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=el())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}())!==o?r=t:(ga=r,r=o),r}function el(){var t,e,n;return t=ga,"row"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(U)),e===o&&(e=null),e!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=nl())!==o&&Kf()!==o&&Bf()!==o?t=e=n:(ga=t,t=o),t}function nl(){var r,t,e,n,s,u,a,i;if(r=ga,(t=al())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=al())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=al())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=function(r,t){const e={type:"expr_list"};return e.value=mb(r,t),e}(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function sl(){var r,t,e,n,s,u;if(r=ga,(t=ol())!==o)if(Kf()!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=ol())!==o?n=s=[s,u]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=ol())!==o?n=s=[s,u]:(ga=n,n=o);e!==o?r=t=l(t,e):(ga=r,r=o)}else ga=r,r=o;else ga=r,r=o;return r}function ol(){var t,e,n;return t=ga,function(){var t,e,n,s;return t=ga,"when"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(jo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&(e=il())!==o&&Kf()!==o&&function(){var t,e,n,s;return t=ga,"then"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Ho)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&(n=al())!==o?t={type:"when",cond:e,result:n}:(ga=t,t=o),t}function ul(){var t,e;return t=ga,function(){var t,e,n,s;return t=ga,"else"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Yo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}()!==o&&Kf()!==o&&(e=al())!==o?t={type:"else",result:e}:(ga=t,t=o),t}function al(){var r;return(r=function(){var r;return(r=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=Al())!==o){if(e=[],n=ga,(s=Kf())!==o&&(u=qf())!==o&&(a=Kf())!==o&&(i=Al())!==o?n=s=[s,u,a,i]:(ga=n,n=o),n!==o)for(;n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=qf())!==o&&(a=Kf())!==o&&(i=Al())!==o?n=s=[s,u,a,i]:(ga=n,n=o);else e=o;e!==o&&(n=Kf())!==o?((s=bl())===o&&(s=null),s!==o?(t=function(r,t,e){const n=Tb(r,t);return null===e?n:"arithmetic"===e.type?Tb(n,e.tail):Eb(e.op,n,e.right)}(t,e,s),r=t):(ga=r,r=o)):(ga=r,r=o)}else ga=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=ga,(t=ll())!==o){for(e=[],n=ga,(s=Zf())!==o&&(u=Zc())!==o&&(a=Kf())!==o&&(i=ll())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Zf())!==o&&(u=Zc())!==o&&(a=Kf())!==o&&(i=ll())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=ne(t,e):(ga=r,r=o)}else ga=r,r=o;return r}()),r}())===o&&(r=Wa()),r}function il(){var r,t,e,n,s,u,a,i;if(r=ga,(t=al())!==o){for(e=[],n=ga,(s=Kf())!==o?((u=Kc())===o&&(u=Zc())===o&&(u=jf()),u!==o&&(a=Kf())!==o&&(i=al())!==o?n=s=[s,u,a,i]:(ga=n,n=o)):(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o?((u=Kc())===o&&(u=Zc())===o&&(u=jf()),u!==o&&(a=Kf())!==o&&(i=al())!==o?n=s=[s,u,a,i]:(ga=n,n=o)):(ga=n,n=o);e!==o?r=t=function(r,t){const e=t.length;let n=r,s="";for(let r=0;r<e;++r)","===t[r][1]?(s=",",Array.isArray(n)||(n=[n]),n.push(t[r][3])):n=Eb(t[r][1],n,t[r][3]);if(","===s){const r={type:"expr_list"};return r.value=n,r}return n}(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function ll(){var r,t,e,n,s,u,a,i;if(r=ga,(t=cl())!==o){for(e=[],n=ga,(s=Zf())!==o&&(u=Kc())!==o&&(a=Kf())!==o&&(i=cl())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Zf())!==o&&(u=Kc())!==o&&(a=Kf())!==o&&(i=cl())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=Tb(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function cl(){var r,t;return(r=fl())===o&&(r=function(){var r,t,e,n,s;return r=ga,(t=function(){var r,t,e,n,s;return r=ga,t=ga,(e=qc())!==o&&(n=Kf())!==o&&(s=Vc())!==o?t=e=[e,n,s]:(ga=t,t=o),t!==o&&(t=se(t)),(r=t)===o&&(r=Vc()),r}())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(e=Wa())!==o&&Kf()!==o&&Bf()!==o?(n=t,(s=e).parentheses=!0,r=t=yb(n,s)):(ga=r,r=o),r}())===o&&(r=ga,qc()!==o&&Kf()!==o&&(t=cl())!==o?r=yb("NOT",t):(ga=r,r=o)),r}function fl(){var r,t,e,n,s;return r=ga,(t=dl())!==o&&Kf()!==o?((e=bl())===o&&(e=null),e!==o?(n=t,r=t=null===(s=e)?n:"arithmetic"===s.type?Tb(n,s.tail):Eb(s.op,n,s.right)):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=Zl())===o&&(r=ml()),r}function bl(){var t;return(t=function(){var r,t,e,n,s,u;if(r=[],t=ga,(e=Kf())!==o&&(n=vl())!==o&&(s=Kf())!==o&&(u=dl())!==o?t=e=[e,n,s,u]:(ga=t,t=o),t!==o)for(;t!==o;)r.push(t),t=ga,(e=Kf())!==o&&(n=vl())!==o&&(s=Kf())!==o&&(u=dl())!==o?t=e=[e,n,s,u]:(ga=t,t=o);else r=o;return r!==o&&(r={type:"arithmetic",tail:r}),r}())===o&&(t=Cl())===o&&(t=function(){var r,t,e,n;return r=ga,(t=function(){var r,t,e,n,s;return r=ga,t=ga,(e=qc())!==o&&(n=Kf())!==o&&(s=Yc())!==o?t=e=[e,n,s]:(ga=t,t=o),t!==o&&(t=se(t)),(r=t)===o&&(r=Yc()),r}())!==o&&Kf()!==o&&(e=dl())!==o&&Kf()!==o&&Kc()!==o&&Kf()!==o&&(n=dl())!==o?r=t={op:t,right:{type:"expr_list",value:[e,n]}}:(ga=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=ga,(t=Wc())!==o&&(e=Kf())!==o&&(n=dl())!==o?r=t={op:"IS",right:n}:(ga=r,r=o),r===o&&(r=ga,t=ga,(e=Wc())!==o&&(n=Kf())!==o&&(s=qc())!==o?t=e=[e,n,s]:(ga=t,t=o),t!==o&&(e=Kf())!==o&&(n=dl())!==o?(t=function(r){return{op:"IS NOT",right:r}}(n),r=t):(ga=r,r=o)),r}())===o&&(t=Ll())===o&&(t=function(){var t,e,n,s,u,a;return t=ga,(e=function(){var t,e,n,s,u;return t=ga,(e=qc())===o&&(e=null),e!==o&&Kf()!==o?((n=function(){var t,e,n,s;return t=ga,"regexp"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(So)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="REGEXP":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=ga,"rlike"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Ro)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="RLIKE":(ga=t,t=o)):(ga=t,t=o),t}()),n!==o?(u=n,t=e=(s=e)?`${s} ${u}`:u):(ga=t,t=o)):(ga=t,t=o),t}())!==o&&Kf()!==o?("binary"===r.substr(ga,6).toLowerCase()?(n=r.substr(ga,6),ga+=6):(n=o,0===Ma&&Fa(Jr)),n===o&&(n=null),n!==o&&Kf()!==o?((s=Xl())===o&&(s=Zl())===o&&(s=ml()),s!==o?(u=e,t=e={op:(a=n)?`${u} ${a}`:u,right:s}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}()),t}function vl(){var t;return">="===r.substr(ga,2)?(t=">=",ga+=2):(t=o,0===Ma&&Fa(oe)),t===o&&(62===r.charCodeAt(ga)?(t=">",ga++):(t=o,0===Ma&&Fa(ue)),t===o&&("<="===r.substr(ga,2)?(t="<=",ga+=2):(t=o,0===Ma&&Fa(ae)),t===o&&("<>"===r.substr(ga,2)?(t="<>",ga+=2):(t=o,0===Ma&&Fa(ie)),t===o&&(60===r.charCodeAt(ga)?(t="<",ga++):(t=o,0===Ma&&Fa(le)),t===o&&(61===r.charCodeAt(ga)?(t="=",ga++):(t=o,0===Ma&&Fa(te)),t===o&&("!="===r.substr(ga,2)?(t="!=",ga+=2):(t=o,0===Ma&&Fa(ce)))))))),t}function pl(){var r,t,e,n,s;return r=ga,t=ga,(e=qc())!==o&&(n=Kf())!==o&&(s=Bc())!==o?t=e=[e,n,s]:(ga=t,t=o),t!==o&&(t=se(t)),(r=t)===o&&(r=Bc()),r}function Ll(){var t,e,n,s,u,a,i,l,c,f;return t=ga,(e=function(){var r,t,e,n,s;return r=ga,t=ga,(e=qc())!==o&&(n=Kf())!==o&&(s=Xc())!==o?t=e=[e,n,s]:(ga=t,t=o),t!==o&&(t=se(t)),(r=t)===o&&(r=Xc()),r}())!==o&&Kf()!==o?((n=ql())===o&&(n=kl())===o&&(n=fl()),n!==o&&Kf()!==o?(s=ga,(u=Kf())!==o&&(a=Qa())!==o?s=u=[u,a]:(ga=s,s=o),s===o&&(s=null),s!==o&&(u=Kf())!==o?((a=function(){var t,e,n;return t=ga,"escape"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(fe)),e!==o&&Kf()!==o&&(n=Zl())!==o?t=e={type:"ESCAPE",value:n}:(ga=t,t=o),t}())===o&&(a=null),a!==o?(i=e,l=n,c=s,(f=a)&&(l.escape=f),c&&(l.suffix={collate:c[1]}),t=e={op:i,right:l}):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t}function Cl(){var r,t,e,n;return r=ga,(t=pl())!==o&&Kf()!==o&&(e=Yf())!==o&&Kf()!==o&&(n=nl())!==o&&Kf()!==o&&Bf()!==o?r=t={op:t,right:n}:(ga=r,r=o),r===o&&(r=ga,(t=pl())!==o&&Kf()!==o?((e=bb())===o&&(e=ml())===o&&(e=Zl()),e!==o?r=t=function(r,t){return{op:r,right:t}}(t,e):(ga=r,r=o)):(ga=r,r=o)),r}function dl(){var r,t,e,n,s,u,a,i;if(r=ga,(t=hl())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=wl())!==o&&(a=Kf())!==o&&(i=hl())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=wl())!==o&&(a=Kf())!==o&&(i=hl())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=ne(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function wl(){var t;return 43===r.charCodeAt(ga)?(t="+",ga++):(t=o,0===Ma&&Fa(be)),t===o&&(45===r.charCodeAt(ga)?(t="-",ga++):(t=o,0===Ma&&Fa(ve))),t}function hl(){var r,t,e,n,s,u,a,i;if(r=ga,(t=El())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=yl())!==o&&(a=Kf())!==o&&(i=El())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=yl())!==o&&(a=Kf())!==o&&(i=El())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=Tb(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function yl(){var t,e;return 42===r.charCodeAt(ga)?(t="*",ga++):(t=o,0===Ma&&Fa(pe)),t===o&&(47===r.charCodeAt(ga)?(t="/",ga++):(t=o,0===Ma&&Fa(Le)),t===o&&(37===r.charCodeAt(ga)?(t="%",ga++):(t=o,0===Ma&&Fa(Ce)),t===o&&("||"===r.substr(ga,2)?(t="||",ga+=2):(t=o,0===Ma&&Fa(de)),t===o&&(t=ga,"div"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(we)),e!==o&&(e="DIV"),(t=e)===o&&(38===r.charCodeAt(ga)?(t="&",ga++):(t=o,0===Ma&&Fa(he)),t===o&&(">>"===r.substr(ga,2)?(t=">>",ga+=2):(t=o,0===Ma&&Fa(ye)),t===o&&("<<"===r.substr(ga,2)?(t="<<",ga+=2):(t=o,0===Ma&&Fa(Ee)),t===o&&(94===r.charCodeAt(ga)?(t="^",ga++):(t=o,0===Ma&&Fa(Ae)),t===o&&(124===r.charCodeAt(ga)?(t="|",ga++):(t=o,0===Ma&&Fa(me))))))))))),t}function El(){var t,e,n,s,u;return(t=Al())===o&&(t=ga,(e=function(){var t;return 33===r.charCodeAt(ga)?(t="!",ga++):(t=o,0===Ma&&Fa(Te)),t===o&&(45===r.charCodeAt(ga)?(t="-",ga++):(t=o,0===Ma&&Fa(ve)),t===o&&(43===r.charCodeAt(ga)?(t="+",ga++):(t=o,0===Ma&&Fa(be)),t===o&&(126===r.charCodeAt(ga)?(t="~",ga++):(t=o,0===Ma&&Fa(Ie))))),t}())!==o?(n=ga,(s=Kf())!==o&&(u=El())!==o?n=s=[s,u]:(ga=n,n=o),n!==o?t=e=yb(e,n[1]):(ga=t,t=o)):(ga=t,t=o)),t}function Al(){var t,e,n,s;return(t=function(){var t,e,n,s,u,a,i,l,c;return t=ga,(e=rf())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=al())!==o&&Kf()!==o&&Ic()!==o&&Kf()!==o&&(s=Lb())!==o&&Kf()!==o&&(u=ci())!==o&&Kf()!==o&&(a=Ol())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?((i=Qa())===o&&(i=null),i!==o?(e=function(r,t,e,n,s,o){const{dataType:u,length:a}=e;let i=u;return void 0!==a&&(i=`${i}(${a})`),{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:`${i} ${n} ${s.toUpperCase()}`},collate:o}}(e,n,s,u,a,i),t=e):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=rf())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=al())!==o&&Kf()!==o&&Ic()!==o&&Kf()!==o&&(s=pb())!==o&&Kf()!==o&&(u=Bf())!==o?(l=n,c=s,t=e={type:"cast",keyword:e.toLowerCase(),expr:l,symbol:"as",target:c}):(ga=t,t=o),t===o&&(t=ga,(e=rf())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=al())!==o&&Kf()!==o&&Ic()!==o&&Kf()!==o&&(s=of())!==o&&Kf()!==o&&(u=Yf())!==o&&Kf()!==o&&(a=tc())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o&&(i=Bf())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+")"}}}(e,n,a),t=e):(ga=t,t=o),t===o&&(t=ga,(e=rf())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=al())!==o&&Kf()!==o&&Ic()!==o&&Kf()!==o&&(s=of())!==o&&Kf()!==o&&(u=Yf())!==o&&Kf()!==o&&(a=tc())!==o&&Kf()!==o&&jf()!==o&&Kf()!==o&&(i=tc())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o&&Bf()!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+", "+n+")"}}}(e,n,a,i),t=e):(ga=t,t=o),t===o&&(t=ga,(e=rf())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=al())!==o&&Kf()!==o&&Ic()!==o&&Kf()!==o&&(s=function(){var t;return(t=function(){var t,e,n,s;return t=ga,"signed"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Qo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SIGNED":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=uf()),t}())!==o&&Kf()!==o?((u=lf())===o&&(u=null),u!==o&&Kf()!==o&&(a=Bf())!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:e+(n?" "+n:"")}}}(e,n,s,u),t=e):(ga=t,t=o)):(ga=t,t=o))))),t}())===o&&(t=ql())===o&&(t=Si())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ga,(e=function(){var t,e,n,s;return t=ga,"count"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(xo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="COUNT":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ga,"group_concat"===r.substr(ga,12).toLowerCase()?(e=r.substr(ga,12),ga+=12):(e=o,0===Ma&&Fa(Uo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="GROUP_CONCAT":(ga=t,t=o)):(ga=t,t=o),t}()),e!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=function(){var t,e,n,s,u,a,i;return t=ga,(e=function(){var t;return 42===r.charCodeAt(ga)?(t="*",ga++):(t=o,0===Ma&&Fa(pe)),t!==o&&(t={type:"star",value:"*"}),t}())!==o&&(e={expr:e}),(t=e)===o&&(t=ga,(e=Hc())===o&&(e=null),e!==o&&Kf()!==o&&(n=Yf())!==o&&Kf()!==o&&(s=al())!==o&&Kf()!==o&&(u=Bf())!==o&&Kf()!==o?((a=Wi())===o&&(a=null),a!==o&&Kf()!==o?((i=Bl())===o&&(i=null),i!==o?t=e={distinct:e,expr:s,orderby:a,parentheses:!0,separator:i}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=Hc())===o&&(e=null),e!==o&&Kf()!==o&&(n=al())!==o&&Kf()!==o?((s=Wi())===o&&(s=null),s!==o&&Kf()!==o?((u=Bl())===o&&(u=null),u!==o?(e=function(r,t,e,n){return{distinct:r,expr:t,orderby:e,separator:n}}(e,n,s,u),t=e):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o))),t}())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?((s=$l())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:n,over:s}:(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,(e=function(){var t;return(t=function(){var t,e,n,s;return t=ga,"sum"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(Do)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SUM":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"max"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(Mo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MAX":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"min"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(ko)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MIN":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"avg"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa($o)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="AVG":(ga=t,t=o)):(ga=t,t=o),t}()),t}())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=dl())!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?((s=$l())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:{expr:n},over:s}:(ga=t,t=o)):(ga=t,t=o),t}()),t}())===o&&(t=Xl())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=ga,Qc()!==o&&Kf()!==o&&(t=sl())!==o&&Kf()!==o?((e=ul())===o&&(e=null),e!==o&&Kf()!==o&&(n=Jc())!==o&&Kf()!==o?((s=Qc())===o&&(s=null),s!==o?(a=t,(i=e)&&a.push(i),r={type:"case",expr:null,args:a}):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,Qc()!==o&&Kf()!==o&&(t=al())!==o&&Kf()!==o&&(e=sl())!==o&&Kf()!==o?((n=ul())===o&&(n=null),n!==o&&Kf()!==o&&(s=Jc())!==o&&Kf()!==o?((u=Qc())===o&&(u=null),u!==o?r=function(r,t,e){return e&&t.push(e),{type:"case",expr:r,args:t}}(t,e,n):(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o)),r}())===o&&(t=function(){var t,e,n;return t=ga,Af()!==o&&Kf()!==o&&(e=al())!==o&&Kf()!==o&&(n=function(){var t;return(t=function(){var t,e,n,s;return t=ga,"year"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Un)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="YEAR":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"quarter"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Sn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="QUARTER":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"month"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Rn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MONTH":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"week"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(xn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="WEEK":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"day"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(vn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DAY":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"hour"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(hn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="HOUR":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"minute"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Nn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MINUTE":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"second"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(_n)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SECOND":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"microsecond"===r.substr(ga,11).toLowerCase()?(e=r.substr(ga,11),ga+=11):(e=o,0===Ma&&Fa(Au)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MICROSECOND":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"second_microsecond"===r.substr(ga,18).toLowerCase()?(e=r.substr(ga,18),ga+=18):(e=o,0===Ma&&Fa(ln)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SECOND_MICROSECOND":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"minute_microsecond"===r.substr(ga,18).toLowerCase()?(e=r.substr(ga,18),ga+=18):(e=o,0===Ma&&Fa(an)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MINUTE_MICROSECOND":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"minute_second"===r.substr(ga,13).toLowerCase()?(e=r.substr(ga,13),ga+=13):(e=o,0===Ma&&Fa(un)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MINUTE_SECOND":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"hour_microsecond"===r.substr(ga,16).toLowerCase()?(e=r.substr(ga,16),ga+=16):(e=o,0===Ma&&Fa(on)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="HOUR_MICROSECOND":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"hour_second"===r.substr(ga,11).toLowerCase()?(e=r.substr(ga,11),ga+=11):(e=o,0===Ma&&Fa(sn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="HOUR_SECOND":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"hour_minute"===r.substr(ga,11).toLowerCase()?(e=r.substr(ga,11),ga+=11):(e=o,0===Ma&&Fa(nn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="HOUR_MINUTE":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"day_microsecond"===r.substr(ga,15).toLowerCase()?(e=r.substr(ga,15),ga+=15):(e=o,0===Ma&&Fa(en)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DAY_MICROSECOND":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"day_second"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(tn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DAY_SECOND":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"day_minute"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(rn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DAY_MINUTE":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"day_hour"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(Je)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DAY_HOUR":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"year_month"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(Qe)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="YEAR_MONTH":(ga=t,t=o)):(ga=t,t=o),t}()),t}())!==o?t={type:"interval",expr:e,unit:n.toLowerCase()}:(ga=t,t=o),t}())===o&&(t=ml())===o&&(t=kl())===o&&(t=ga,Yf()!==o&&(e=Kf())!==o&&(n=il())!==o&&Kf()!==o&&Bf()!==o?((s=n).parentheses=!0,t=s):(ga=t,t=o),t===o&&(t=bb())===o&&(t=ga,Kf()!==o?(63===r.charCodeAt(ga)?(e="?",ga++):(e=o,0===Ma&&Fa(re)),e!==o?t={type:"origin",value:e}:(ga=t,t=o)):(ga=t,t=o))),t}function ml(){var r,t,e,n,s,u,a,i,l,c,f,b,v;if(r=ga,t=ga,(e=Il())!==o&&(n=Kf())!==o&&(s=Gf())!==o&&(u=Kf())!==o?t=e=[e,n,s,u]:(ga=t,t=o),t===o&&(t=null),t!==o)if((e=_l())!==o)if((n=Kf())!==o){if(s=[],u=ga,(a=Vf())===o&&(a=Xf()),a!==o&&(i=Kf())!==o?((l=Zl())===o&&(l=rc()),l!==o?u=a=[a,i,l]:(ga=u,u=o)):(ga=u,u=o),u!==o)for(;u!==o;)s.push(u),u=ga,(a=Vf())===o&&(a=Xf()),a!==o&&(i=Kf())!==o?((l=Zl())===o&&(l=rc()),l!==o?u=a=[a,i,l]:(ga=u,u=o)):(ga=u,u=o);else s=o;s!==o&&(u=Kf())!==o?((a=Qa())===o&&(a=null),a!==o?r=t=function(r,t,e,n){const s=r&&r[0]||null;return _b.add(`select::${s}::${t}`),{type:"column_ref",table:s,column:t,collate:n,arrows:e.map((r=>r[0])),properties:e.map((r=>r[2]))}}(t,e,s,a):(ga=r,r=o)):(ga=r,r=o)}else ga=r,r=o;else ga=r,r=o;else ga=r,r=o;return r===o&&(r=ga,(t=Ol())===o&&(t=Rl()),t!==o&&(e=Kf())!==o&&(n=Gf())!==o&&(s=Kf())!==o?((u=Ol())===o&&(u=Rl()),u!==o&&(a=Kf())!==o&&(i=Gf())!==o&&(l=Kf())!==o&&(c=Sl())!==o?(f=t,b=u,v=c,_b.add(`select::${f}::${b}::${v}`),r=t={type:"column_ref",db:f,table:b,column:v}):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,(t=Ol())===o&&(t=Rl()),t!==o&&(e=Kf())!==o&&(n=Gf())!==o&&(s=Kf())!==o&&(u=Sl())!==o?r=t=function(r,t){return _b.add(`select::${r}::${t}`),{type:"column_ref",table:r,column:t}}(t,u):(ga=r,r=o),r===o&&(r=ga,(t=_l())!==o&&(t=function(r){return _b.add("select::null::"+r),{type:"column_ref",table:null,column:r}}(t)),r=t))),r}function Tl(){var r,t,e,n,s,u,a,i;if(r=ga,(t=_l())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=_l())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=_l())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function Il(){var r,t;return r=ga,(t=Ol())!==o&&(Ne(t)?o:void 0)!==o?r=t:(ga=r,r=o),r===o&&(r=Nl()),r}function Nl(){var t;return(t=function(){var t,e,n,s;if(t=ga,34===r.charCodeAt(ga)?(e='"',ga++):(e=o,0===Ma&&Fa(Re)),e!==o){if(n=[],Se.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(_e)),s!==o)for(;s!==o;)n.push(s),Se.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(_e));else n=o;n!==o?(34===r.charCodeAt(ga)?(s='"',ga++):(s=o,0===Ma&&Fa(Re)),s!==o?t=e=ge(n):(ga=t,t=o)):(ga=t,t=o)}else ga=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=ga,39===r.charCodeAt(ga)?(e="'",ga++):(e=o,0===Ma&&Fa(Gr)),e!==o){if(n=[],Oe.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(xe)),s!==o)for(;s!==o;)n.push(s),Oe.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(xe));else n=o;n!==o?(39===r.charCodeAt(ga)?(s="'",ga++):(s=o,0===Ma&&Fa(Gr)),s!==o?t=e=ge(n):(ga=t,t=o)):(ga=t,t=o)}else ga=t,t=o;return t}())===o&&(t=Rl()),t}function Rl(){var t,e,n,s;if(t=ga,96===r.charCodeAt(ga)?(e="`",ga++):(e=o,0===Ma&&Fa(Ue)),e!==o){if(n=[],Me.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(ke)),s===o&&(s=Jl()),s!==o)for(;s!==o;)n.push(s),Me.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(ke)),s===o&&(s=Jl());else n=o;n!==o?(96===r.charCodeAt(ga)?(s="`",ga++):(s=o,0===Ma&&Fa(Ue)),s!==o?t=e=ge(n):(ga=t,t=o)):(ga=t,t=o)}else ga=t,t=o;return t}function Sl(){var r;return r=ga,(r=gl())===o&&(r=Nl()),r}function _l(){var r,t;return r=ga,(t=gl())!==o&&(Ne(t)?o:void 0)!==o?r=t:(ga=r,r=o),r===o&&(r=Rl()),r}function gl(){var r,t,e,n;if(r=ga,(t=xl())!==o){for(e=[],n=Ml();n!==o;)e.push(n),n=Ml();e!==o?r=t=De(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function Ol(){var r,t,e,n;if(r=ga,(t=xl())!==o){for(e=[],n=Ul();n!==o;)e.push(n),n=Ul();e!==o?r=t=De(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function xl(){var t;return $e.test(r.charAt(ga))?(t=r.charAt(ga),ga++):(t=o,0===Ma&&Fa(Pe)),t}function Ul(){var t;return Fe.test(r.charAt(ga))?(t=r.charAt(ga),ga++):(t=o,0===Ma&&Fa(Ge)),t}function Ml(){var t;return je.test(r.charAt(ga))?(t=r.charAt(ga),ga++):(t=o,0===Ma&&Fa(He)),t}function kl(){var t,e,n;return t=ga,58===r.charCodeAt(ga)?(e=":",ga++):(e=o,0===Ma&&Fa(Ye)),e!==o&&(n=Ol())!==o?t=e=[e,n]:(ga=t,t=o),t!==o&&(t={type:"param",value:t[1]}),t}function Dl(){var t,e,n,s,u,a,i,l,c;return t=ga,Oc()!==o&&Kf()!==o&&vc()!==o&&Kf()!==o&&(e=mf())!==o&&Kf()!==o?(n=ga,(s=Yf())!==o&&(u=Kf())!==o?((a=nl())===o&&(a=null),a!==o&&(i=Kf())!==o&&(l=Bf())!==o?n=s=[s,u,a,i,l]:(ga=n,n=o)):(ga=n,n=o),n===o&&(n=null),n!==o?t={type:"on update",keyword:e,parentheses:!!(c=n),expr:c?c[2]:null}:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,Oc()!==o&&Kf()!==o&&vc()!==o&&Kf()!==o?("now"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(Be)),e!==o&&Kf()!==o&&(n=Yf())!==o&&(s=Kf())!==o&&(u=Bf())!==o?t=function(r){return{type:"on update",keyword:r,parentheses:!0}}(e):(ga=t,t=o)):(ga=t,t=o)),t}function $l(){var t,e,n;return t=ga,"over"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(We)),e!==o&&Kf()!==o&&(n=Fl())!==o?t=e={type:"window",as_window_specification:n}:(ga=t,t=o),t===o&&(t=Dl()),t}function Pl(){var r,t,e;return r=ga,(t=Ol())!==o&&Kf()!==o&&Ic()!==o&&Kf()!==o&&(e=Fl())!==o?r=t={name:t,as_window_specification:e}:(ga=r,r=o),r}function Fl(){var r,t;return(r=Ol())===o&&(r=ga,Yf()!==o&&Kf()!==o?((t=function(){var r,t,e,n;return r=ga,(t=function(){var r,t;return r=ga,Ec()!==o&&Kf()!==o&&Pc()!==o&&Kf()!==o&&(t=Ri())!==o?r=t:(ga=r,r=o),r}())===o&&(t=null),t!==o&&Kf()!==o?((e=Wi())===o&&(e=null),e!==o&&Kf()!==o?((n=function(){var r,t,e,n,s;return r=ga,wf()!==o&&Kf()!==o?((t=Gl())===o&&(t=jl()),t!==o?r="rows "+t.value:(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,wf()!==o&&Kf()!==o&&(t=Yc())!==o&&Kf()!==o&&(e=jl())!==o&&Kf()!==o&&Kc()!==o&&Kf()!==o&&(n=Gl())!==o?(s=n,r=`rows between ${e.value} and ${s.value}`):(ga=r,r=o)),r}())===o&&(n=null),n!==o?r=t={name:null,partitionby:t,orderby:e,window_frame_clause:n}:(ga=r,r=o)):(ga=r,r=o)):(ga=r,r=o),r}())===o&&(t=null),t!==o&&Kf()!==o&&Bf()!==o?r={window_specification:t||{},parentheses:!0}:(ga=r,r=o)):(ga=r,r=o)),r}function Gl(){var t,e,n,s;return t=ga,(e=Yl())!==o&&Kf()!==o?("following"===r.substr(ga,9).toLowerCase()?(n=r.substr(ga,9),ga+=9):(n=o,0===Ma&&Fa(Ve)),n!==o?((s=e).value+=" FOLLOWING",t=e=s):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=Hl()),t}function jl(){var t,e,n,s;return t=ga,(e=Yl())!==o&&Kf()!==o?("preceding"===r.substr(ga,9).toLowerCase()?(n=r.substr(ga,9),ga+=9):(n=o,0===Ma&&Fa(qe)),n!==o?((s=e).value+=" PRECEDING",t=e=s):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=Hl()),t}function Hl(){var t,e,n;return t=ga,"current"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Ke)),e!==o&&Kf()!==o?("row"===r.substr(ga,3).toLowerCase()?(n=r.substr(ga,3),ga+=3):(n=o,0===Ma&&Fa(U)),n!==o?t=e={type:"single_quote_string",value:"current row"}:(ga=t,t=o)):(ga=t,t=o),t}function Yl(){var t,e;return t=ga,"unbounded"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(Ze)),e!==o&&(e={type:"single_quote_string",value:e.toUpperCase()}),(t=e)===o&&(t=rc()),t}function Bl(){var t,e,n;return t=ga,"separator"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(ze)),e===o&&(e=null),e!==o&&Kf()!==o&&(n=Zl())!==o?t=e={keyword:e,value:n}:(ga=t,t=o),t}function Wl(){var t;return"year_month"===r.substr(ga,10).toLowerCase()?(t=r.substr(ga,10),ga+=10):(t=o,0===Ma&&Fa(Qe)),t===o&&("day_hour"===r.substr(ga,8).toLowerCase()?(t=r.substr(ga,8),ga+=8):(t=o,0===Ma&&Fa(Je)),t===o&&("day_minute"===r.substr(ga,10).toLowerCase()?(t=r.substr(ga,10),ga+=10):(t=o,0===Ma&&Fa(rn)),t===o&&("day_second"===r.substr(ga,10).toLowerCase()?(t=r.substr(ga,10),ga+=10):(t=o,0===Ma&&Fa(tn)),t===o&&("day_microsecond"===r.substr(ga,15).toLowerCase()?(t=r.substr(ga,15),ga+=15):(t=o,0===Ma&&Fa(en)),t===o&&("hour_minute"===r.substr(ga,11).toLowerCase()?(t=r.substr(ga,11),ga+=11):(t=o,0===Ma&&Fa(nn)),t===o&&("hour_second"===r.substr(ga,11).toLowerCase()?(t=r.substr(ga,11),ga+=11):(t=o,0===Ma&&Fa(sn)),t===o&&("hour_microsecond"===r.substr(ga,16).toLowerCase()?(t=r.substr(ga,16),ga+=16):(t=o,0===Ma&&Fa(on)),t===o&&("minute_second"===r.substr(ga,13).toLowerCase()?(t=r.substr(ga,13),ga+=13):(t=o,0===Ma&&Fa(un)),t===o&&("minute_microsecond"===r.substr(ga,18).toLowerCase()?(t=r.substr(ga,18),ga+=18):(t=o,0===Ma&&Fa(an)),t===o&&("second_microsecond"===r.substr(ga,18).toLowerCase()?(t=r.substr(ga,18),ga+=18):(t=o,0===Ma&&Fa(ln)),t===o&&("timezone_hour"===r.substr(ga,13).toLowerCase()?(t=r.substr(ga,13),ga+=13):(t=o,0===Ma&&Fa(cn)),t===o&&("timezone_minute"===r.substr(ga,15).toLowerCase()?(t=r.substr(ga,15),ga+=15):(t=o,0===Ma&&Fa(fn)),t===o&&("century"===r.substr(ga,7).toLowerCase()?(t=r.substr(ga,7),ga+=7):(t=o,0===Ma&&Fa(bn)),t===o&&("day"===r.substr(ga,3).toLowerCase()?(t=r.substr(ga,3),ga+=3):(t=o,0===Ma&&Fa(vn)),t===o&&("date"===r.substr(ga,4).toLowerCase()?(t=r.substr(ga,4),ga+=4):(t=o,0===Ma&&Fa(pn)),t===o&&("decade"===r.substr(ga,6).toLowerCase()?(t=r.substr(ga,6),ga+=6):(t=o,0===Ma&&Fa(Ln)),t===o&&("dow"===r.substr(ga,3).toLowerCase()?(t=r.substr(ga,3),ga+=3):(t=o,0===Ma&&Fa(Cn)),t===o&&("doy"===r.substr(ga,3).toLowerCase()?(t=r.substr(ga,3),ga+=3):(t=o,0===Ma&&Fa(dn)),t===o&&("epoch"===r.substr(ga,5).toLowerCase()?(t=r.substr(ga,5),ga+=5):(t=o,0===Ma&&Fa(wn)),t===o&&("hour"===r.substr(ga,4).toLowerCase()?(t=r.substr(ga,4),ga+=4):(t=o,0===Ma&&Fa(hn)),t===o&&("isodow"===r.substr(ga,6).toLowerCase()?(t=r.substr(ga,6),ga+=6):(t=o,0===Ma&&Fa(yn)),t===o&&("isoweek"===r.substr(ga,7).toLowerCase()?(t=r.substr(ga,7),ga+=7):(t=o,0===Ma&&Fa(En)),t===o&&("isoyear"===r.substr(ga,7).toLowerCase()?(t=r.substr(ga,7),ga+=7):(t=o,0===Ma&&Fa(An)),t===o&&("microseconds"===r.substr(ga,12).toLowerCase()?(t=r.substr(ga,12),ga+=12):(t=o,0===Ma&&Fa(mn)),t===o&&("millennium"===r.substr(ga,10).toLowerCase()?(t=r.substr(ga,10),ga+=10):(t=o,0===Ma&&Fa(Tn)),t===o&&("milliseconds"===r.substr(ga,12).toLowerCase()?(t=r.substr(ga,12),ga+=12):(t=o,0===Ma&&Fa(In)),t===o&&("minute"===r.substr(ga,6).toLowerCase()?(t=r.substr(ga,6),ga+=6):(t=o,0===Ma&&Fa(Nn)),t===o&&("month"===r.substr(ga,5).toLowerCase()?(t=r.substr(ga,5),ga+=5):(t=o,0===Ma&&Fa(Rn)),t===o&&("quarter"===r.substr(ga,7).toLowerCase()?(t=r.substr(ga,7),ga+=7):(t=o,0===Ma&&Fa(Sn)),t===o&&("second"===r.substr(ga,6).toLowerCase()?(t=r.substr(ga,6),ga+=6):(t=o,0===Ma&&Fa(_n)),t===o&&("time"===r.substr(ga,4).toLowerCase()?(t=r.substr(ga,4),ga+=4):(t=o,0===Ma&&Fa(gn)),t===o&&("timezone"===r.substr(ga,8).toLowerCase()?(t=r.substr(ga,8),ga+=8):(t=o,0===Ma&&Fa(On)),t===o&&("week"===r.substr(ga,4).toLowerCase()?(t=r.substr(ga,4),ga+=4):(t=o,0===Ma&&Fa(xn)),t===o&&("year"===r.substr(ga,4).toLowerCase()?(t=r.substr(ga,4),ga+=4):(t=o,0===Ma&&Fa(Un)))))))))))))))))))))))))))))))))))),t}function Xl(){var t,e,n,s,u,a,i,l;return(t=function(){var t,e,n,s,u,a,i,l;return t=ga,(e=zc())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=Wl())!==o&&Kf()!==o&&mc()!==o&&Kf()!==o?((s=yf())===o&&(s=Af())===o&&(s=hf())===o&&(s=Cf()),s!==o&&Kf()!==o&&(u=al())!==o&&Kf()!==o&&Bf()!==o?(a=n,i=s,l=u,t=e={type:e.toLowerCase(),args:{field:a,cast_type:i,source:l}}):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=zc())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=Wl())!==o&&Kf()!==o&&mc()!==o&&Kf()!==o&&(s=al())!==o&&Kf()!==o&&(u=Bf())!==o?t=e=function(r,t,e){return{type:r.toLowerCase(),args:{field:t,source:e}}}(e,n,s):(ga=t,t=o),t===o&&(t=ga,"date_trunc"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(Mn)),e!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o&&(n=al())!==o&&Kf()!==o&&jf()!==o&&Kf()!==o&&(s=Wl())!==o&&Kf()!==o&&(u=Bf())!==o?t=e=function(r,t){return{type:"function",name:"DATE_TRUNC",args:{type:"expr_list",value:[r,{type:"origin",value:t}]},over:null}}(n,s):(ga=t,t=o))),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"trim"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Pn)),e!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o?((n=function(){var t,e,n;return t=ga,(e=function(){var t;return"both"===r.substr(ga,4).toLowerCase()?(t=r.substr(ga,4),ga+=4):(t=o,0===Ma&&Fa(kn)),t===o&&("leading"===r.substr(ga,7).toLowerCase()?(t=r.substr(ga,7),ga+=7):(t=o,0===Ma&&Fa(Dn)),t===o&&("trailing"===r.substr(ga,8).toLowerCase()?(t=r.substr(ga,8),ga+=8):(t=o,0===Ma&&Fa($n)))),t}())===o&&(e=null),e!==o&&Kf()!==o?((n=Zl())===o&&(n=null),n!==o&&Kf()!==o&&mc()!==o?t=e=function(r,t,e){let n=[];return r&&n.push({type:"origin",value:r}),t&&n.push(t),n.push({type:"origin",value:"from"}),{type:"expr_list",value:n}}(e,n):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(n=null),n!==o&&Kf()!==o&&(s=al())!==o&&Kf()!==o&&Bf()!==o?t=e=function(r,t){let e=r||{type:"expr_list",value:[]};return e.value.push(t),{type:"function",name:"TRIM",args:e}}(n,s):(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=ga,"convert"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Fn)),e!==o&&Kf()!==o&&(n=Yf())!==o&&Kf()!==o&&(s=function(){var r,t,e,n,s,u;return r=ga,(t=ab())!==o&&Kf()!==o&&jf()!==o&&Kf()!==o?((e=Lb())===o&&(e=db()),e!==o&&Kf()!==o&&(n=ci())!==o&&Kf()!==o&&(s=Ol())!==o?r=t=function(r,t,e,n){const{dataType:s,length:o}=t;let u=s;return void 0!==o&&(u=`${u}(${o})`),{type:"expr_list",value:[r,{type:"origin",value:`${u} ${e} ${n}`}]}}(t,e,n,s):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,(t=ab())!==o&&Kf()!==o&&jf()!==o&&Kf()!==o&&(e=pb())!==o?(u=e,r=t={type:"expr_list",value:[t,{type:"datatype",...u}]}):(ga=r,r=o),r===o&&(r=ga,(t=il())!==o&&Kf()!==o&&kc()!==o&&Kf()!==o&&(e=Ol())!==o?r=t=function(r,t){return r.suffix="USING "+t.toUpperCase(),{type:"expr_list",value:[r]}}(t,e):(ga=r,r=o))),r}())!==o&&(u=Kf())!==o&&Bf()!==o&&Kf()!==o?((a=Qa())===o&&(a=null),a!==o?t=e={type:"function",name:"CONVERT",args:s,collate:a}:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=function(){var t;return(t=Vl())===o&&(t=Tf())===o&&(t=function(){var t,e,n,s;return t=ga,"user"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(hu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="USER":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"session_user"===r.substr(ga,12).toLowerCase()?(e=r.substr(ga,12),ga+=12):(e=o,0===Ma&&Fa(Nu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SESSION_USER":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"system_user"===r.substr(ga,11).toLowerCase()?(e=r.substr(ga,11),ga+=11):(e=o,0===Ma&&Fa(Ru)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SYSTEM_USER":(ga=t,t=o)):(ga=t,t=o),t}()),t}())!==o&&Kf()!==o&&(n=Yf())!==o&&Kf()!==o?((s=nl())===o&&(s=null),s!==o&&(u=Kf())!==o&&Bf()!==o&&Kf()!==o?((a=$l())===o&&(a=null),a!==o?t=e=function(r,t,e){return{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,s,a):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=Vl())!==o&&Kf()!==o?((n=Dl())===o&&(n=null),n!==o?t=e={type:"function",name:e,over:n}:(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=ib())!==o&&("convert"===(l=e).toLowerCase()||hb[l.toLowerCase()]?o:void 0)!==o&&(n=Kf())!==o&&Yf()!==o&&(s=Kf())!==o?((u=il())===o&&(u=null),u!==o&&Kf()!==o&&Bf()!==o&&(a=Kf())!==o?((i=$l())===o&&(i=null),i!==o?t=e=function(r,t,e){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),("TIMESTAMPDIFF"===r.toUpperCase()||"TIMESTAMPADD"===r.toUpperCase())&&t.value&&t.value[0]&&(t.value[0]={type:"origin",value:t.value[0].column}),{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,u,i):(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o))))),t}function Vl(){var t;return(t=function(){var t,e,n,s;return t=ga,"current_date"===r.substr(ga,12).toLowerCase()?(e=r.substr(ga,12),ga+=12):(e=o,0===Ma&&Fa(yu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="CURRENT_DATE":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"current_time"===r.substr(ga,12).toLowerCase()?(e=r.substr(ga,12),ga+=12):(e=o,0===Ma&&Fa(mu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="CURRENT_TIME":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=mf()),t}function ql(){var t,e,n,s,u,a,i,l,c;return t=ga,"binary"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Gn)),e===o&&("_binary"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(jn))),e===o&&(e=null),e!==o&&Kf()!==o&&(n=Zl())!==o?(s=ga,(u=Kf())!==o&&(a=Qa())!==o?s=u=[u,a]:(ga=s,s=o),s===o&&(s=null),s!==o?(l=n,c=s,(i=e)&&(l.prefix=i.toLowerCase()),c&&(l.suffix={collate:c[1]}),t=e=l):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=rc())===o&&(t=function(){var t,e;return t=ga,(e=function(){var t,e,n,s;return t=ga,"true"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Is)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(e={type:"bool",value:!0}),(t=e)===o&&(t=ga,(e=function(){var t,e,n,s;return t=ga,"false"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Rs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(e={type:"bool",value:!1}),t=e),t}())===o&&(t=Kl())===o&&(t=function(){var t,e,n,s,u,a;if(t=ga,(e=hf())===o&&(e=Cf())===o&&(e=yf())===o&&(e=df()),e!==o)if(Kf()!==o){if(n=ga,39===r.charCodeAt(ga)?(s="'",ga++):(s=o,0===Ma&&Fa(Gr)),s!==o){for(u=[],a=Ql();a!==o;)u.push(a),a=Ql();u!==o?(39===r.charCodeAt(ga)?(a="'",ga++):(a=o,0===Ma&&Fa(Gr)),a!==o?n=s=[s,u,a]:(ga=n,n=o)):(ga=n,n=o)}else ga=n,n=o;n!==o?t=e=Kn(e,n):(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o;if(t===o)if(t=ga,(e=hf())===o&&(e=Cf())===o&&(e=yf())===o&&(e=df()),e!==o)if(Kf()!==o){if(n=ga,34===r.charCodeAt(ga)?(s='"',ga++):(s=o,0===Ma&&Fa(Re)),s!==o){for(u=[],a=zl();a!==o;)u.push(a),a=zl();u!==o?(34===r.charCodeAt(ga)?(a='"',ga++):(a=o,0===Ma&&Fa(Re)),a!==o?n=s=[s,u,a]:(ga=n,n=o)):(ga=n,n=o)}else ga=n,n=o;n!==o?t=e=Kn(e,n):(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o;return t}()),t}function Kl(){var t;return(t=function(){var t,e,n,s;return t=ga,"null"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(ms)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(t={type:"null",value:null}),t}function Zl(){var t,e,n,s,u,a,i,l;if(t=ga,"_binary"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(jn)),e===o&&("_latin1"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Hn))),e===o&&(e=null),e!==o)if((n=Kf())!==o)if("x"===r.substr(ga,1).toLowerCase()?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(Yn)),s!==o){if(u=ga,39===r.charCodeAt(ga)?(a="'",ga++):(a=o,0===Ma&&Fa(Gr)),a!==o){for(i=[],Bn.test(r.charAt(ga))?(l=r.charAt(ga),ga++):(l=o,0===Ma&&Fa(Wn));l!==o;)i.push(l),Bn.test(r.charAt(ga))?(l=r.charAt(ga),ga++):(l=o,0===Ma&&Fa(Wn));i!==o?(39===r.charCodeAt(ga)?(l="'",ga++):(l=o,0===Ma&&Fa(Gr)),l!==o?u=a=[a,i,l]:(ga=u,u=o)):(ga=u,u=o)}else ga=u,u=o;u!==o?t=e={type:"hex_string",prefix:e,value:u[1].join("")}:(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;if(t===o){if(t=ga,"_binary"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(jn)),e===o&&("_latin1"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Hn))),e===o&&(e=null),e!==o)if((n=Kf())!==o)if("b"===r.substr(ga,1).toLowerCase()?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(Xn)),s!==o){if(u=ga,39===r.charCodeAt(ga)?(a="'",ga++):(a=o,0===Ma&&Fa(Gr)),a!==o){for(i=[],Bn.test(r.charAt(ga))?(l=r.charAt(ga),ga++):(l=o,0===Ma&&Fa(Wn));l!==o;)i.push(l),Bn.test(r.charAt(ga))?(l=r.charAt(ga),ga++):(l=o,0===Ma&&Fa(Wn));i!==o?(39===r.charCodeAt(ga)?(l="'",ga++):(l=o,0===Ma&&Fa(Gr)),l!==o?u=a=[a,i,l]:(ga=u,u=o)):(ga=u,u=o)}else ga=u,u=o;u!==o?t=e=function(r,t,e){return{type:"bit_string",prefix:r,value:e[1].join("")}}(e,0,u):(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;if(t===o){if(t=ga,"_binary"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(jn)),e===o&&("_latin1"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Hn))),e===o&&(e=null),e!==o)if((n=Kf())!==o)if("0x"===r.substr(ga,2).toLowerCase()?(s=r.substr(ga,2),ga+=2):(s=o,0===Ma&&Fa(Vn)),s!==o){for(u=[],Bn.test(r.charAt(ga))?(a=r.charAt(ga),ga++):(a=o,0===Ma&&Fa(Wn));a!==o;)u.push(a),Bn.test(r.charAt(ga))?(a=r.charAt(ga),ga++):(a=o,0===Ma&&Fa(Wn));u!==o?t=e=function(r,t,e){return{type:"full_hex_string",prefix:r,value:e.join("")}}(e,0,u):(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;if(t===o){if(t=ga,"n"===r.substr(ga,1).toLowerCase()?(e=r.charAt(ga),ga++):(e=o,0===Ma&&Fa(qn)),e!==o){if(n=ga,39===r.charCodeAt(ga)?(s="'",ga++):(s=o,0===Ma&&Fa(Gr)),s!==o){for(u=[],a=Ql();a!==o;)u.push(a),a=Ql();u!==o?(39===r.charCodeAt(ga)?(a="'",ga++):(a=o,0===Ma&&Fa(Gr)),a!==o?n=s=[s,u,a]:(ga=n,n=o)):(ga=n,n=o)}else ga=n,n=o;n!==o?t=e=function(r,t){return{type:"natural_string",value:t[1].join("")}}(0,n):(ga=t,t=o)}else ga=t,t=o;if(t===o){if(t=ga,e=ga,39===r.charCodeAt(ga)?(n="'",ga++):(n=o,0===Ma&&Fa(Gr)),n!==o){for(s=[],u=Ql();u!==o;)s.push(u),u=Ql();s!==o?(39===r.charCodeAt(ga)?(u="'",ga++):(u=o,0===Ma&&Fa(Gr)),u!==o?e=n=[n,s,u]:(ga=e,e=o)):(ga=e,e=o)}else ga=e,e=o;if(e!==o&&(e=function(r){return{type:"single_quote_string",value:r[1].join("")}}(e)),(t=e)===o){if(t=ga,e=ga,34===r.charCodeAt(ga)?(n='"',ga++):(n=o,0===Ma&&Fa(Re)),n!==o){for(s=[],u=zl();u!==o;)s.push(u),u=zl();s!==o?(34===r.charCodeAt(ga)?(u='"',ga++):(u=o,0===Ma&&Fa(Re)),u!==o?e=n=[n,s,u]:(ga=e,e=o)):(ga=e,e=o)}else ga=e,e=o;e!==o&&(e=function(r){return{type:"double_quote_string",value:r[1].join("")}}(e)),t=e}}}}}return t}function zl(){var t;return Zn.test(r.charAt(ga))?(t=r.charAt(ga),ga++):(t=o,0===Ma&&Fa(zn)),t===o&&(t=Jl()),t}function Ql(){var t;return Qn.test(r.charAt(ga))?(t=r.charAt(ga),ga++):(t=o,0===Ma&&Fa(Jn)),t===o&&(t=Jl()),t}function Jl(){var t,e,n,s,u,a,i,l,c,f;return t=ga,"\\'"===r.substr(ga,2)?(e="\\'",ga+=2):(e=o,0===Ma&&Fa(rs)),e!==o&&(e="\\'"),(t=e)===o&&(t=ga,'\\"'===r.substr(ga,2)?(e='\\"',ga+=2):(e=o,0===Ma&&Fa(ts)),e!==o&&(e='\\"'),(t=e)===o&&(t=ga,"\\\\"===r.substr(ga,2)?(e="\\\\",ga+=2):(e=o,0===Ma&&Fa(es)),e!==o&&(e="\\\\"),(t=e)===o&&(t=ga,"\\/"===r.substr(ga,2)?(e="\\/",ga+=2):(e=o,0===Ma&&Fa(ns)),e!==o&&(e="\\/"),(t=e)===o&&(t=ga,"\\b"===r.substr(ga,2)?(e="\\b",ga+=2):(e=o,0===Ma&&Fa(ss)),e!==o&&(e="\b"),(t=e)===o&&(t=ga,"\\f"===r.substr(ga,2)?(e="\\f",ga+=2):(e=o,0===Ma&&Fa(os)),e!==o&&(e="\f"),(t=e)===o&&(t=ga,"\\n"===r.substr(ga,2)?(e="\\n",ga+=2):(e=o,0===Ma&&Fa(us)),e!==o&&(e="\n"),(t=e)===o&&(t=ga,"\\r"===r.substr(ga,2)?(e="\\r",ga+=2):(e=o,0===Ma&&Fa(as)),e!==o&&(e="\r"),(t=e)===o&&(t=ga,"\\t"===r.substr(ga,2)?(e="\\t",ga+=2):(e=o,0===Ma&&Fa(is)),e!==o&&(e="\t"),(t=e)===o&&(t=ga,"\\u"===r.substr(ga,2)?(e="\\u",ga+=2):(e=o,0===Ma&&Fa(ls)),e!==o&&(n=uc())!==o&&(s=uc())!==o&&(u=uc())!==o&&(a=uc())!==o?(i=n,l=s,c=u,f=a,t=e=String.fromCharCode(parseInt("0x"+i+l+c+f))):(ga=t,t=o),t===o&&(t=ga,92===r.charCodeAt(ga)?(e="\\",ga++):(e=o,0===Ma&&Fa(cs)),e!==o&&(e="\\"),(t=e)===o&&(t=ga,"''"===r.substr(ga,2)?(e="''",ga+=2):(e=o,0===Ma&&Fa(fs)),e!==o&&(e="''"),(t=e)===o&&(t=ga,'""'===r.substr(ga,2)?(e='""',ga+=2):(e=o,0===Ma&&Fa(bs)),e!==o&&(e='""'),(t=e)===o&&(t=ga,"``"===r.substr(ga,2)?(e="``",ga+=2):(e=o,0===Ma&&Fa(vs)),e!==o&&(e="``"),t=e))))))))))))),t}function rc(){var r,t;return(r=function(){var r,t,e,n;return r=ga,(t=tc())!==o&&(e=ec())!==o&&(n=nc())!==o?r=t={type:"bigint",value:t+e+n}:(ga=r,r=o),r===o&&(r=ga,(t=tc())!==o&&(e=ec())!==o?(t=function(r,t){const e=r+t;return Ab(r)?{type:"bigint",value:e}:parseFloat(e)}(t,e),r=t):(ga=r,r=o),r===o&&(r=ga,(t=tc())!==o&&(e=nc())!==o?(t=function(r,t){return{type:"bigint",value:r+t}}(t,e),r=t):(ga=r,r=o),r===o&&(r=ga,(t=tc())!==o&&(t=function(r){return Ab(r)?{type:"bigint",value:r}:parseFloat(r)}(t)),r=t))),r}())!==o&&(r=(t=r)&&"bigint"===t.type?t:{type:"number",value:t}),r}function tc(){var t,e,n;return(t=sc())===o&&(t=oc())===o&&(t=ga,45===r.charCodeAt(ga)?(e="-",ga++):(e=o,0===Ma&&Fa(ve)),e===o&&(43===r.charCodeAt(ga)?(e="+",ga++):(e=o,0===Ma&&Fa(be))),e!==o&&(n=sc())!==o?t=e+=n:(ga=t,t=o),t===o&&(t=ga,45===r.charCodeAt(ga)?(e="-",ga++):(e=o,0===Ma&&Fa(ve)),e===o&&(43===r.charCodeAt(ga)?(e="+",ga++):(e=o,0===Ma&&Fa(be))),e!==o&&(n=oc())!==o?t=e=function(r,t){return r+t}(e,n):(ga=t,t=o))),t}function ec(){var t,e,n,s;return t=ga,46===r.charCodeAt(ga)?(e=".",ga++):(e=o,0===Ma&&Fa(Cs)),e!==o?((n=sc())===o&&(n=null),n!==o?t=e=(s=n)?"."+s:"":(ga=t,t=o)):(ga=t,t=o),t}function nc(){var t,e,n;return t=ga,(e=function(){var t,e,n,s;return t=ga,hs.test(r.charAt(ga))?(e=r.charAt(ga),ga++):(e=o,0===Ma&&Fa(ys)),e!==o?(Es.test(r.charAt(ga))?(n=r.charAt(ga),ga++):(n=o,0===Ma&&Fa(As)),n===o&&(n=null),n!==o?t=e+=null!==(s=n)?s:"":(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(n=sc())!==o?t=e+=n:(ga=t,t=o),t}function sc(){var r,t;if(r=[],(t=oc())!==o)for(;t!==o;)r.push(t),t=oc();else r=o;return r!==o&&(r=r.join("")),r}function oc(){var t;return Rt.test(r.charAt(ga))?(t=r.charAt(ga),ga++):(t=o,0===Ma&&Fa(St)),t}function uc(){var t;return ds.test(r.charAt(ga))?(t=r.charAt(ga),ga++):(t=o,0===Ma&&Fa(ws)),t}function ac(){var t,e,n,s;return t=ga,"default"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(G)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function ic(){var t,e,n,s;return t=ga,"to"===r.substr(ga,2).toLowerCase()?(e=r.substr(ga,2),ga+=2):(e=o,0===Ma&&Fa(Ns)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function lc(){var t,e,n,s;return t=ga,"show"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Ss)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function cc(){var t,e,n,s;return t=ga,"drop"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(_s)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DROP":(ga=t,t=o)):(ga=t,t=o),t}function fc(){var t,e,n,s;return t=ga,"alter"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Os)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function bc(){var t,e,n,s;return t=ga,"select"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(xs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function vc(){var t,e,n,s;return t=ga,"update"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Us)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function pc(){var t,e,n,s;return t=ga,"create"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Ms)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function Lc(){var t,e,n,s;return t=ga,"temporary"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(ks)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function Cc(){var t,e,n,s;return t=ga,"delete"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Ds)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function dc(){var t,e,n,s;return t=ga,"insert"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa($s)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function wc(){var t,e,n,s;return t=ga,"replace"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Fs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function hc(){var t,e,n,s;return t=ga,"rename"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Gs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function yc(){var t,e,n,s;return t=ga,"ignore"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(js)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function Ec(){var t,e,n,s;return t=ga,"partition"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(Hs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="PARTITION":(ga=t,t=o)):(ga=t,t=o),t}function Ac(){var t,e,n,s;return t=ga,"into"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Ys)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function mc(){var t,e,n,s;return t=ga,"from"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Bs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function Tc(){var t,e,n,s;return t=ga,"set"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(Er)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SET":(ga=t,t=o)):(ga=t,t=o),t}function Ic(){var t,e,n,s;return t=ga,"as"===r.substr(ga,2).toLowerCase()?(e=r.substr(ga,2),ga+=2):(e=o,0===Ma&&Fa(X)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function Nc(){var t,e,n,s;return t=ga,"table"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Xs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="TABLE":(ga=t,t=o)):(ga=t,t=o),t}function Rc(){var t,e,n,s;return t=ga,"trigger"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Vs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="TRIGGER":(ga=t,t=o)):(ga=t,t=o),t}function Sc(){var t,e,n,s;return t=ga,"tables"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(qs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="TABLES":(ga=t,t=o)):(ga=t,t=o),t}function _c(){var t,e,n,s;return t=ga,"database"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(Ks)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DATABASE":(ga=t,t=o)):(ga=t,t=o),t}function gc(){var t,e,n,s;return t=ga,"schema"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Zs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SCHEMA":(ga=t,t=o)):(ga=t,t=o),t}function Oc(){var t,e,n,s;return t=ga,"on"===r.substr(ga,2).toLowerCase()?(e=r.substr(ga,2),ga+=2):(e=o,0===Ma&&Fa(zs)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function xc(){var t,e,n,s;return t=ga,"join"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(no)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function Uc(){var t,e,n,s;return t=ga,"outer"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(so)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function Mc(){var t,e,n,s;return t=ga,"values"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(io)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function kc(){var t,e,n,s;return t=ga,"using"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(lo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function Dc(){var t,e,n,s;return t=ga,"with"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Pt)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function $c(){var t,e,n,s;return t=ga,"go"===r.substr(ga,2).toLowerCase()?(e=r.substr(ga,2),ga+=2):(e=o,0===Ma&&Fa(fo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="GO":(ga=t,t=o)):(ga=t,t=o),t}function Pc(){var t,e,n,s;return t=ga,"by"===r.substr(ga,2).toLowerCase()?(e=r.substr(ga,2),ga+=2):(e=o,0===Ma&&Fa(vo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function Fc(){var t,e,n,s;return t=ga,"asc"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(ho)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="ASC":(ga=t,t=o)):(ga=t,t=o),t}function Gc(){var t,e,n,s;return t=ga,"desc"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(yo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DESC":(ga=t,t=o)):(ga=t,t=o),t}function jc(){var t,e,n,s;return t=ga,"all"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(Ao)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="ALL":(ga=t,t=o)):(ga=t,t=o),t}function Hc(){var t,e,n,s;return t=ga,"distinct"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(mo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DISTINCT":(ga=t,t=o)):(ga=t,t=o),t}function Yc(){var t,e,n,s;return t=ga,"between"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(To)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="BETWEEN":(ga=t,t=o)):(ga=t,t=o),t}function Bc(){var t,e,n,s;return t=ga,"in"===r.substr(ga,2).toLowerCase()?(e=r.substr(ga,2),ga+=2):(e=o,0===Ma&&Fa(_t)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="IN":(ga=t,t=o)):(ga=t,t=o),t}function Wc(){var t,e,n,s;return t=ga,"is"===r.substr(ga,2).toLowerCase()?(e=r.substr(ga,2),ga+=2):(e=o,0===Ma&&Fa(Io)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="IS":(ga=t,t=o)):(ga=t,t=o),t}function Xc(){var t,e,n,s;return t=ga,"like"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(No)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="LIKE":(ga=t,t=o)):(ga=t,t=o),t}function Vc(){var t,e,n,s;return t=ga,"exists"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(_o)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="EXISTS":(ga=t,t=o)):(ga=t,t=o),t}function qc(){var t,e,n,s;return t=ga,"not"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(ir)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="NOT":(ga=t,t=o)):(ga=t,t=o),t}function Kc(){var t,e,n,s;return t=ga,"and"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(go)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="AND":(ga=t,t=o)):(ga=t,t=o),t}function Zc(){var t,e,n,s;return t=ga,"or"===r.substr(ga,2).toLowerCase()?(e=r.substr(ga,2),ga+=2):(e=o,0===Ma&&Fa(Oo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="OR":(ga=t,t=o)):(ga=t,t=o),t}function zc(){var t,e,n,s;return t=ga,"extract"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Po)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="EXTRACT":(ga=t,t=o)):(ga=t,t=o),t}function Qc(){var t,e,n,s;return t=ga,"case"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Go)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function Jc(){var t,e,n,s;return t=ga,"end"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(Bo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e=[e,n]:(ga=t,t=o)):(ga=t,t=o),t}function rf(){var t,e,n,s;return t=ga,"cast"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Wo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="CAST":(ga=t,t=o)):(ga=t,t=o),t}function tf(){var t,e,n,s;return t=ga,"binary"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Jr)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="BINARY":(ga=t,t=o)):(ga=t,t=o),t}function ef(){var t,e,n,s;return t=ga,"char"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(qo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="CHAR":(ga=t,t=o)):(ga=t,t=o),t}function nf(){var t,e,n,s;return t=ga,"varchar"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Ko)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="VARCHAR":(ga=t,t=o)):(ga=t,t=o),t}function sf(){var t,e,n,s;return t=ga,"numeric"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Zo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="NUMERIC":(ga=t,t=o)):(ga=t,t=o),t}function of(){var t,e,n,s;return t=ga,"decimal"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(zo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DECIMAL":(ga=t,t=o)):(ga=t,t=o),t}function uf(){var t,e,n,s;return t=ga,"unsigned"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(Jo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="UNSIGNED":(ga=t,t=o)):(ga=t,t=o),t}function af(){var t,e,n,s;return t=ga,"int"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(ru)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="INT":(ga=t,t=o)):(ga=t,t=o),t}function lf(){var t,e,n,s;return t=ga,"integer"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(eu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="INTEGER":(ga=t,t=o)):(ga=t,t=o),t}function cf(){var t,e,n,s;return t=ga,"smallint"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(su)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SMALLINT":(ga=t,t=o)):(ga=t,t=o),t}function ff(){var t,e,n,s;return t=ga,"mediumint"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(ou)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MEDIUMINT":(ga=t,t=o)):(ga=t,t=o),t}function bf(){var t,e,n,s;return t=ga,"tinyint"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(uu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="TINYINT":(ga=t,t=o)):(ga=t,t=o),t}function vf(){var t,e,n,s;return t=ga,"bigint"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(fu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="BIGINT":(ga=t,t=o)):(ga=t,t=o),t}function pf(){var t,e,n,s;return t=ga,"float"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(vu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="FLOAT":(ga=t,t=o)):(ga=t,t=o),t}function Lf(){var t,e,n,s;return t=ga,"double"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(pu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DOUBLE":(ga=t,t=o)):(ga=t,t=o),t}function Cf(){var t,e,n,s;return t=ga,"date"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(pn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DATE":(ga=t,t=o)):(ga=t,t=o),t}function df(){var t,e,n,s;return t=ga,"datetime"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(Lu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="DATETIME":(ga=t,t=o)):(ga=t,t=o),t}function wf(){var t,e,n,s;return t=ga,"rows"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Cu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="ROWS":(ga=t,t=o)):(ga=t,t=o),t}function hf(){var t,e,n,s;return t=ga,"time"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(gn)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="TIME":(ga=t,t=o)):(ga=t,t=o),t}function yf(){var t,e,n,s;return t=ga,"timestamp"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(du)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="TIMESTAMP":(ga=t,t=o)):(ga=t,t=o),t}function Ef(){var t,e,n,s;return t=ga,"year"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Un)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="YEAR":(ga=t,t=o)):(ga=t,t=o),t}function Af(){var t,e,n,s;return t=ga,"interval"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(Eu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="INTERVAL":(ga=t,t=o)):(ga=t,t=o),t}function mf(){var t,e,n,s;return t=ga,"current_timestamp"===r.substr(ga,17).toLowerCase()?(e=r.substr(ga,17),ga+=17):(e=o,0===Ma&&Fa(Tu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="CURRENT_TIMESTAMP":(ga=t,t=o)):(ga=t,t=o),t}function Tf(){var t,e,n,s;return t=ga,"current_user"===r.substr(ga,12).toLowerCase()?(e=r.substr(ga,12),ga+=12):(e=o,0===Ma&&Fa(Iu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="CURRENT_USER":(ga=t,t=o)):(ga=t,t=o),t}function If(){var t,e,n,s;return t=ga,"view"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(Lt)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="VIEW":(ga=t,t=o)):(ga=t,t=o),t}function Nf(){var t;return 64===r.charCodeAt(ga)?(t="@",ga++):(t=o,0===Ma&&Fa(S)),t}function Rf(){var t;return(t=function(){var t;return"@@"===r.substr(ga,2)?(t="@@",ga+=2):(t=o,0===Ma&&Fa(Gu)),t}())===o&&(t=Nf())===o&&(t=function(){var t;return 36===r.charCodeAt(ga)?(t="$",ga++):(t=o,0===Ma&&Fa(ju)),t}()),t}function Sf(){var t;return":="===r.substr(ga,2)?(t=":=",ga+=2):(t=o,0===Ma&&Fa(Yu)),t}function _f(){var t;return 61===r.charCodeAt(ga)?(t="=",ga++):(t=o,0===Ma&&Fa(te)),t}function gf(){var t,e,n,s;return t=ga,"add"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(Wu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="ADD":(ga=t,t=o)):(ga=t,t=o),t}function Of(){var t,e,n,s;return t=ga,"column"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(Xu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="COLUMN":(ga=t,t=o)):(ga=t,t=o),t}function xf(){var t,e,n,s;return t=ga,"index"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa($r)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="INDEX":(ga=t,t=o)):(ga=t,t=o),t}function Uf(){var t,e,n,s;return t=ga,"key"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(N)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="KEY":(ga=t,t=o)):(ga=t,t=o),t}function Mf(){var t,e,n,s;return t=ga,"fulltext"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(qu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="FULLTEXT":(ga=t,t=o)):(ga=t,t=o),t}function kf(){var t,e,n,s;return t=ga,"spatial"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Ku)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="SPATIAL":(ga=t,t=o)):(ga=t,t=o),t}function Df(){var t,e,n,s;return t=ga,"unique"===r.substr(ga,6).toLowerCase()?(e=r.substr(ga,6),ga+=6):(e=o,0===Ma&&Fa(I)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="UNIQUE":(ga=t,t=o)):(ga=t,t=o),t}function $f(){var t,e,n,s;return t=ga,"comment"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(Zu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="COMMENT":(ga=t,t=o)):(ga=t,t=o),t}function Pf(){var t,e,n,s;return t=ga,"constraint"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(zu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="CONSTRAINT":(ga=t,t=o)):(ga=t,t=o),t}function Ff(){var t,e,n,s;return t=ga,"references"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(Qu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="REFERENCES":(ga=t,t=o)):(ga=t,t=o),t}function Gf(){var t;return 46===r.charCodeAt(ga)?(t=".",ga++):(t=o,0===Ma&&Fa(Cs)),t}function jf(){var t;return 44===r.charCodeAt(ga)?(t=",",ga++):(t=o,0===Ma&&Fa(oa)),t}function Hf(){var t;return 42===r.charCodeAt(ga)?(t="*",ga++):(t=o,0===Ma&&Fa(pe)),t}function Yf(){var t;return 40===r.charCodeAt(ga)?(t="(",ga++):(t=o,0===Ma&&Fa(It)),t}function Bf(){var t;return 41===r.charCodeAt(ga)?(t=")",ga++):(t=o,0===Ma&&Fa(Nt)),t}function Wf(){var t;return 59===r.charCodeAt(ga)?(t=";",ga++):(t=o,0===Ma&&Fa(ia)),t}function Xf(){var t;return"->"===r.substr(ga,2)?(t="->",ga+=2):(t=o,0===Ma&&Fa(la)),t}function Vf(){var t;return"->>"===r.substr(ga,3)?(t="->>",ga+=3):(t=o,0===Ma&&Fa(ca)),t}function qf(){var t;return(t=function(){var t;return"||"===r.substr(ga,2)?(t="||",ga+=2):(t=o,0===Ma&&Fa(de)),t}())===o&&(t=function(){var t;return"&&"===r.substr(ga,2)?(t="&&",ga+=2):(t=o,0===Ma&&Fa(fa)),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"xor"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(ba)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="XOR":(ga=t,t=o)):(ga=t,t=o),t}()),t}function Kf(){var r,t;for(r=[],(t=rb())===o&&(t=zf());t!==o;)r.push(t),(t=rb())===o&&(t=zf());return r}function Zf(){var r,t;if(r=[],(t=rb())===o&&(t=zf()),t!==o)for(;t!==o;)r.push(t),(t=rb())===o&&(t=zf());else r=o;return r}function zf(){var t;return(t=function(){var t,e,n,s,u,a;if(t=ga,"/*"===r.substr(ga,2)?(e="/*",ga+=2):(e=o,0===Ma&&Fa(va)),e!==o){for(n=[],s=ga,u=ga,Ma++,"*/"===r.substr(ga,2)?(a="*/",ga+=2):(a=o,0===Ma&&Fa(pa)),Ma--,a===o?u=void 0:(ga=u,u=o),u!==o&&(a=Jf())!==o?s=u=[u,a]:(ga=s,s=o);s!==o;)n.push(s),s=ga,u=ga,Ma++,"*/"===r.substr(ga,2)?(a="*/",ga+=2):(a=o,0===Ma&&Fa(pa)),Ma--,a===o?u=void 0:(ga=u,u=o),u!==o&&(a=Jf())!==o?s=u=[u,a]:(ga=s,s=o);n!==o?("*/"===r.substr(ga,2)?(s="*/",ga+=2):(s=o,0===Ma&&Fa(pa)),s!==o?t=e=[e,n,s]:(ga=t,t=o)):(ga=t,t=o)}else ga=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=ga,"--"===r.substr(ga,2)?(e="--",ga+=2):(e=o,0===Ma&&Fa(La)),e!==o){for(n=[],s=ga,u=ga,Ma++,a=tb(),Ma--,a===o?u=void 0:(ga=u,u=o),u!==o&&(a=Jf())!==o?s=u=[u,a]:(ga=s,s=o);s!==o;)n.push(s),s=ga,u=ga,Ma++,a=tb(),Ma--,a===o?u=void 0:(ga=u,u=o),u!==o&&(a=Jf())!==o?s=u=[u,a]:(ga=s,s=o);n!==o?t=e=[e,n]:(ga=t,t=o)}else ga=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=ga,35===r.charCodeAt(ga)?(e="#",ga++):(e=o,0===Ma&&Fa(Ca)),e!==o){for(n=[],s=ga,u=ga,Ma++,a=tb(),Ma--,a===o?u=void 0:(ga=u,u=o),u!==o&&(a=Jf())!==o?s=u=[u,a]:(ga=s,s=o);s!==o;)n.push(s),s=ga,u=ga,Ma++,a=tb(),Ma--,a===o?u=void 0:(ga=u,u=o),u!==o&&(a=Jf())!==o?s=u=[u,a]:(ga=s,s=o);n!==o?t=e=[e,n]:(ga=t,t=o)}else ga=t,t=o;return t}()),t}function Qf(){var r,t,e,n,s,u,a;return r=ga,(t=$f())!==o&&Kf()!==o?((e=_f())===o&&(e=null),e!==o&&Kf()!==o&&(n=Zl())!==o?(u=e,a=n,r=t={type:(s=t).toLowerCase(),keyword:s.toLowerCase(),symbol:u,value:a}):(ga=r,r=o)):(ga=r,r=o),r}function Jf(){var t;return r.length>ga?(t=r.charAt(ga),ga++):(t=o,0===Ma&&Fa(da)),t}function rb(){var t;return wa.test(r.charAt(ga))?(t=r.charAt(ga),ga++):(t=o,0===Ma&&Fa(ha)),t}function tb(){var t,e;if((t=function(){var t,e;return t=ga,Ma++,r.length>ga?(e=r.charAt(ga),ga++):(e=o,0===Ma&&Fa(da)),Ma--,e===o?t=void 0:(ga=t,t=o),t}())===o)if(t=[],ps.test(r.charAt(ga))?(e=r.charAt(ga),ga++):(e=o,0===Ma&&Fa(Ls)),e!==o)for(;e!==o;)t.push(e),ps.test(r.charAt(ga))?(e=r.charAt(ga),ga++):(e=o,0===Ma&&Fa(Ls));else t=o;return t}function eb(){var t,e;return t=ga,Rb=[],void 0!==o&&Kf()!==o?((e=nb())===o&&(e=function(){var t,e;return t=ga,function(){var t;return"return"===r.substr(ga,6).toLowerCase()?(t=r.substr(ga,6),ga+=6):(t=o,0===Ma&&Fa(Hu)),t}()!==o&&Kf()!==o&&(e=sb())!==o?t={type:"return",expr:e}:(ga=t,t=o),t}()),e!==o?t={stmt:e,vars:Rb}:(ga=t,t=o)):(ga=t,t=o),t}function nb(){var r,t,e,n;return r=ga,(t=bb())===o&&(t=vb()),t!==o&&Kf()!==o?((e=Sf())===o&&(e=_f()),e!==o&&Kf()!==o&&(n=sb())!==o?r=t=ya(t,e,n):(ga=r,r=o)):(ga=r,r=o),r}function sb(){var t;return(t=hi())===o&&(t=function(){var r,t,e,n,s;return r=ga,(t=bb())!==o&&Kf()!==o&&(e=Gi())!==o&&Kf()!==o&&(n=bb())!==o&&Kf()!==o&&(s=Hi())!==o?r=t={type:"join",ltable:t,rtable:n,op:e,on:s}:(ga=r,r=o),r}())===o&&(t=ob())===o&&(t=function(){var t,e;return t=ga,function(){var t;return 91===r.charCodeAt(ga)?(t="[",ga++):(t=o,0===Ma&&Fa(ua)),t}()!==o&&Kf()!==o&&(e=fb())!==o&&Kf()!==o&&function(){var t;return 93===r.charCodeAt(ga)?(t="]",ga++):(t=o,0===Ma&&Fa(aa)),t}()!==o?t={type:"array",value:e}:(ga=t,t=o),t}()),t}function ob(){var r,t,e,n,s,u,a,i;if(r=ga,(t=ub())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=wl())!==o&&(a=Kf())!==o&&(i=ub())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=wl())!==o&&(a=Kf())!==o&&(i=ub())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=ne(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function ub(){var r,t,e,n,s,u,a,i;if(r=ga,(t=ab())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=yl())!==o&&(a=Kf())!==o&&(i=ab())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=yl())!==o&&(a=Kf())!==o&&(i=ab())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=ne(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function ab(){var r,t,e;return(r=lb())===o&&(r=ql())===o&&(r=bb())===o&&(r=ml())===o&&(r=cb())===o&&(r=kl())===o&&(r=ga,Yf()!==o&&Kf()!==o&&(t=ob())!==o&&Kf()!==o&&Bf()!==o?((e=t).parentheses=!0,r=e):(ga=r,r=o)),r}function ib(){var r,t,e,n,s,u,a;return r=ga,(t=Ol())===o&&(t=Nl()),t!==o?(e=ga,(n=Kf())!==o&&(s=Gf())!==o&&(u=Kf())!==o?((a=Ol())===o&&(a=Nl()),a!==o?e=n=[n,s,u,a]:(ga=e,e=o)):(ga=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){let e=r;return null!==t&&(e=`${r}.${t[3]}`),e}(t,e):(ga=r,r=o)):(ga=r,r=o),r===o&&(r=ga,(t=Ol())!==o&&(t=function(r){const t=r.toUpperCase();return!0===wb[t]?t:r}(t)),(r=t)===o&&(r=Nl())),r}function lb(){var r,t,e;return r=ga,(t=ib())!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o?((e=fb())===o&&(e=null),e!==o&&Kf()!==o&&Bf()!==o?r=t={type:"function",name:t,args:{type:"expr_list",value:e}}:(ga=r,r=o)):(ga=r,r=o),r}function cb(){var r;return(r=ib())!==o&&(r={type:"function",name:r,args:null}),r}function fb(){var r,t,e,n,s,u,a,i;if(r=ga,(t=ab())!==o){for(e=[],n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=ab())!==o?n=s=[s,u,a,i]:(ga=n,n=o);n!==o;)e.push(n),n=ga,(s=Kf())!==o&&(u=jf())!==o&&(a=Kf())!==o&&(i=ab())!==o?n=s=[s,u,a,i]:(ga=n,n=o);e!==o?r=t=m(t,e):(ga=r,r=o)}else ga=r,r=o;return r}function bb(){var r,t,e,n,s;return r=ga,(t=Rf())!==o&&(e=vb())!==o?(n=t,s=e,r=t={type:"var",...s,prefix:n}):(ga=r,r=o),r}function vb(){var t,e,n,s,u;return t=ga,(e=Ol())!==o&&(n=function(){var t,e,n,s;for(t=[],e=ga,46===r.charCodeAt(ga)?(n=".",ga++):(n=o,0===Ma&&Fa(Cs)),n!==o&&(s=Ol())!==o?e=n=[n,s]:(ga=e,e=o);e!==o;)t.push(e),e=ga,46===r.charCodeAt(ga)?(n=".",ga++):(n=o,0===Ma&&Fa(Cs)),n!==o&&(s=Ol())!==o?e=n=[n,s]:(ga=e,e=o);return t!==o&&(t=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e][1]);return t}(t)),t}())!==o?(s=e,u=n,Rb.push(s),t=e={type:"var",name:s,members:u,prefix:null}):(ga=t,t=o),t===o&&(t=ga,(e=rc())!==o&&(e={type:"var",name:e.value,members:[],quoted:null,prefix:null}),t=e),t}function pb(){var t;return(t=Lb())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(t=ga,(e=sf())===o&&(e=of())===o&&(e=af())===o&&(e=lf())===o&&(e=cf())===o&&(e=ff())===o&&(e=bf())===o&&(e=vf())===o&&(e=pf())===o&&(e=Lf())===o&&(e=function(){var t,e,n,s;return t=ga,"bit"===r.substr(ga,3).toLowerCase()?(e=r.substr(ga,3),ga+=3):(e=o,0===Ma&&Fa(Vo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="BIT":(ga=t,t=o)):(ga=t,t=o),t}()),e!==o)if((n=Kf())!==o)if((s=Yf())!==o)if((u=Kf())!==o){if(a=[],Rt.test(r.charAt(ga))?(i=r.charAt(ga),ga++):(i=o,0===Ma&&Fa(St)),i!==o)for(;i!==o;)a.push(i),Rt.test(r.charAt(ga))?(i=r.charAt(ga),ga++):(i=o,0===Ma&&Fa(St));else a=o;if(a!==o)if((i=Kf())!==o){if(l=ga,(c=jf())!==o)if((f=Kf())!==o){if(b=[],Rt.test(r.charAt(ga))?(v=r.charAt(ga),ga++):(v=o,0===Ma&&Fa(St)),v!==o)for(;v!==o;)b.push(v),Rt.test(r.charAt(ga))?(v=r.charAt(ga),ga++):(v=o,0===Ma&&Fa(St));else b=o;b!==o?l=c=[c,f,b]:(ga=l,l=o)}else ga=l,l=o;else ga=l,l=o;l===o&&(l=null),l!==o&&(c=Kf())!==o&&(f=Bf())!==o&&(b=Kf())!==o?((v=Cb())===o&&(v=null),v!==o?(p=l,L=v,t=e={dataType:e,length:parseInt(a.join(""),10),scale:p&&parseInt(p[2].join(""),10),parentheses:!0,suffix:L}):(ga=t,t=o)):(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o}else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;if(t===o){if(t=ga,(e=sf())===o&&(e=of())===o&&(e=af())===o&&(e=lf())===o&&(e=cf())===o&&(e=ff())===o&&(e=bf())===o&&(e=vf())===o&&(e=pf())===o&&(e=Lf()),e!==o){if(n=[],Rt.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(St)),s!==o)for(;s!==o;)n.push(s),Rt.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(St));else n=o;n!==o&&(s=Kf())!==o?((u=Cb())===o&&(u=null),u!==o?(e=function(r,t,e){return{dataType:r,length:parseInt(t.join(""),10),suffix:e}}(e,n,u),t=e):(ga=t,t=o)):(ga=t,t=o)}else ga=t,t=o;t===o&&(t=ga,(e=sf())===o&&(e=of())===o&&(e=af())===o&&(e=lf())===o&&(e=cf())===o&&(e=ff())===o&&(e=bf())===o&&(e=vf())===o&&(e=pf())===o&&(e=Lf()),e!==o&&(n=Kf())!==o?((s=Cb())===o&&(s=null),s!==o&&(u=Kf())!==o?(e=function(r,t){return{dataType:r,suffix:t}}(e,s),t=e):(ga=t,t=o)):(ga=t,t=o))}return t}())===o&&(t=db())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ga,"json"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(nu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="JSON":(ga=t,t=o)):(ga=t,t=o),t}())!==o&&(t=Na(t)),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ga,"tinytext"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(au)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="TINYTEXT":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"text"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(iu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="TEXT":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"mediumtext"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(lu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MEDIUMTEXT":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"longtext"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(cu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="LONGTEXT":(ga=t,t=o)):(ga=t,t=o),t}()),t!==o&&(t=_a(t)),t}())===o&&(t=function(){var t,e,n,s,u;return t=ga,(e=function(){var t,e,n,s;return t=ga,"enum"===r.substr(ga,4).toLowerCase()?(e=r.substr(ga,4),ga+=4):(e=o,0===Ma&&Fa(bu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="ENUM":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(e=Tc()),e!==o&&Kf()!==o&&(n=el())!==o?(s=e,(u=n).parentheses=!0,t=e={dataType:s,expr:u}):(ga=t,t=o),t}())===o&&(t=function(){var t;return"boolean"===r.substr(ga,7).toLowerCase()?(t=r.substr(ga,7),ga+=7):(t=o,0===Ma&&Fa(Ea)),t!==o&&(t={dataType:"BOOLEAN"}),t}())===o&&(t=function(){var t,e,n,s;if(t=ga,(e=tf())===o&&(e=function(){var t,e,n,s;return t=ga,"varbinary"===r.substr(ga,9).toLowerCase()?(e=r.substr(ga,9),ga+=9):(e=o,0===Ma&&Fa(Xo)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="VARBINARY":(ga=t,t=o)):(ga=t,t=o),t}()),e!==o)if(Kf()!==o)if(Yf()!==o)if(Kf()!==o){if(n=[],Rt.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(St)),s!==o)for(;s!==o;)n.push(s),Rt.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(St));else n=o;n!==o&&(s=Kf())!==o&&Bf()!==o?t=e={dataType:e,length:parseInt(n.join(""),10)}:(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;return t===o&&(t=ga,(e=tf())!==o&&(e=Na(e)),t=e),t}())===o&&(t=function(){var t;return"blob"===r.substr(ga,4).toLowerCase()?(t=r.substr(ga,4),ga+=4):(t=o,0===Ma&&Fa(Aa)),t===o&&("tinyblob"===r.substr(ga,8).toLowerCase()?(t=r.substr(ga,8),ga+=8):(t=o,0===Ma&&Fa(ma)),t===o&&("mediumblob"===r.substr(ga,10).toLowerCase()?(t=r.substr(ga,10),ga+=10):(t=o,0===Ma&&Fa(Ta)),t===o&&("longblob"===r.substr(ga,8).toLowerCase()?(t=r.substr(ga,8),ga+=8):(t=o,0===Ma&&Fa(Ia))))),t!==o&&(t={dataType:t.toUpperCase()}),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ga,"geometry"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(xu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="GEOMETRY":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"point"===r.substr(ga,5).toLowerCase()?(e=r.substr(ga,5),ga+=5):(e=o,0===Ma&&Fa(Uu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="POINT":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"linestring"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(Mu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="LINESTRING":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"polygon"===r.substr(ga,7).toLowerCase()?(e=r.substr(ga,7),ga+=7):(e=o,0===Ma&&Fa(ku)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="POLYGON":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"multipoint"===r.substr(ga,10).toLowerCase()?(e=r.substr(ga,10),ga+=10):(e=o,0===Ma&&Fa(Du)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MULTIPOINT":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"multilinestring"===r.substr(ga,15).toLowerCase()?(e=r.substr(ga,15),ga+=15):(e=o,0===Ma&&Fa($u)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MULTILINESTRING":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"multipolygon"===r.substr(ga,12).toLowerCase()?(e=r.substr(ga,12),ga+=12):(e=o,0===Ma&&Fa(Pu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="MULTIPOLYGON":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ga,"geometrycollection"===r.substr(ga,18).toLowerCase()?(e=r.substr(ga,18),ga+=18):(e=o,0===Ma&&Fa(Fu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="GEOMETRYCOLLECTION":(ga=t,t=o)):(ga=t,t=o),t}()),t!==o&&(t=_a(t)),t}()),t}function Lb(){var t,e,n,s;if(t=ga,(e=ef())===o&&(e=nf()),e!==o)if(Kf()!==o)if(Yf()!==o)if(Kf()!==o){if(n=[],Rt.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(St)),s!==o)for(;s!==o;)n.push(s),Rt.test(r.charAt(ga))?(s=r.charAt(ga),ga++):(s=o,0===Ma&&Fa(St));else n=o;n!==o&&(s=Kf())!==o&&Bf()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(ga=t,t=o)}else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;else ga=t,t=o;return t===o&&(t=ga,(e=ef())!==o&&(e=Na(e)),(t=e)===o&&(t=ga,(e=nf())!==o&&(e=Na(e)),t=e)),t}function Cb(){var t,e,n;return t=ga,(e=uf())===o&&(e=null),e!==o&&Kf()!==o?((n=function(){var t,e,n,s;return t=ga,"zerofill"===r.substr(ga,8).toLowerCase()?(e=r.substr(ga,8),ga+=8):(e=o,0===Ma&&Fa(tu)),e!==o?(n=ga,Ma++,s=xl(),Ma--,s===o?n=void 0:(ga=n,n=o),n!==o?t=e="ZEROFILL":(ga=t,t=o)):(ga=t,t=o),t}())===o&&(n=null),n!==o?t=e=function(r,t){const e=[];return r&&e.push(r),t&&e.push(t),e}(e,n):(ga=t,t=o)):(ga=t,t=o),t}function db(){var t,e,n,s;return t=ga,(e=Cf())===o&&(e=df())===o&&(e=hf())===o&&(e=yf())===o&&(e=Ef()),e!==o&&Kf()!==o&&Yf()!==o&&Kf()!==o?(Ra.test(r.charAt(ga))?(n=r.charAt(ga),ga++):(n=o,0===Ma&&Fa(Sa)),n!==o&&Kf()!==o&&Bf()!==o&&Kf()!==o?((s=Cb())===o&&(s=null),s!==o?t=e={dataType:e,length:parseInt(n,10),parentheses:!0}:(ga=t,t=o)):(ga=t,t=o)):(ga=t,t=o),t===o&&(t=ga,(e=Cf())===o&&(e=df())===o&&(e=hf())===o&&(e=yf())===o&&(e=Ef()),e!==o&&(e=Na(e)),t=e),t}const wb={ALTER:!0,ALL:!0,ADD:!0,AND:!0,AS:!0,ASC:!0,ANALYZE:!0,ACCESSIBLE:!0,BEFORE:!0,BETWEEN:!0,BIGINT:!0,BLOB:!0,BOTH:!0,BY:!0,BOOLEAN:!0,CALL:!0,CASCADE:!0,CASE:!0,CHAR:!0,CHECK:!0,COLLATE:!0,CONDITION:!0,CONSTRAINT:!0,CONTINUE:!0,CONVERT:!0,CREATE:!0,CROSS:!0,CURRENT_DATE:!0,CURRENT_TIME:!0,CURRENT_TIMESTAMP:!0,CURRENT_USER:!0,CURSOR:!0,DATABASE:!0,DATABASES:!0,DAY_HOUR:!0,DAY_MICROSECOND:!0,DAY_MINUTE:!0,DAY_SECOND:!0,DEC:!0,DECIMAL:!0,DECLARE:!0,DEFAULT:!0,DELAYED:!0,DELETE:!0,DESC:!0,DESCRIBE:!0,DETERMINISTIC:!0,DISTINCT:!0,DISTINCTROW:!0,DIV:!0,DROP:!0,DOUBLE:!0,DUAL:!0,ELSE:!0,EACH:!0,ELSEIF:!0,ENCLOSED:!0,ESCAPED:!0,EXCEPT:!0,EXISTS:!0,EXIT:!0,EXPLAIN:!0,FALSE:!0,FULL:!0,FROM:!0,FETCH:!0,FLOAT:!0,FLOAT4:!0,FLOAT8:!0,FOR:!0,FORCE:!0,FOREIGN:!0,FULLTEXT:!0,FUNCTION:!0,GENERATED:!0,GET:!0,GO:!0,GRANT:!0,GROUP:!0,GROUPING:!0,GROUPS:!0,HAVING:!0,HIGH_PRIORITY:!0,HOUR_MICROSECOND:!0,HOUR_MINUTE:!0,HOUR_SECOND:!0,IGNORE:!0,IN:!0,INNER:!0,INFILE:!0,INOUT:!0,INSENSITIVE:!0,INSERT:!0,INTERSECT:!0,INT:!0,INT1:!0,INT2:!0,INT3:!0,INT4:!0,INT8:!0,INTEGER:!0,INTERVAL:!0,INTO:!0,IO_AFTER_GTIDS:!0,IO_BEFORE_GTIDS:!0,IS:!0,ITERATE:!0,JOIN:!0,JSON_TABLE:!0,KEY:!0,KEYS:!0,KILL:!0,LAG:!0,LAST_VALUE:!0,LATERAL:!0,LEAD:!0,LEADING:!0,LEAVE:!0,LEFT:!0,LIKE:!0,LIMIT:!0,LINEAR:!0,LINES:!0,LOAD:!0,LOCALTIME:!0,LOCALTIMESTAMP:!0,LOCK:!0,LONG:!0,LONGBLOB:!0,LONGTEXT:!0,LOOP:!0,LOW_PRIORITY:!0,MASTER_BIND:!0,MATCH:!0,MAXVALUE:!0,MEDIUMBLOB:!0,MEDIUMINT:!0,MEDIUMTEXT:!0,MIDDLEINT:!0,MINUTE_MICROSECOND:!0,MINUTE_SECOND:!0,MINUS:!0,MOD:!0,MODIFIES:!0,NATURAL:!0,NOT:!0,NO_WRITE_TO_BINLOG:!0,NTH_VALUE:!0,NTILE:!0,NULL:!0,NUMERIC:!0,OF:!0,ON:!0,OPTIMIZE:!0,OPTIMIZER_COSTS:!0,OPTION:!0,OPTIONALLY:!0,OR:!0,ORDER:!0,OUT:!0,OUTER:!0,OUTFILE:!0,OVER:!0,PARTITION:!0,PERCENT_RANK:!0,PRECISION:!0,PRIMARY:!0,PROCEDURE:!0,PURGE:!0,RANGE:!0,RANK:!0,READ:!0,READS:!0,READ_WRITE:!0,REAL:!0,RECURSIVE:!0,REFERENCES:!0,REGEXP:!0,RELEASE:!0,RENAME:!0,REPEAT:!0,REPLACE:!0,REQUIRE:!0,RESIGNAL:!0,RESTRICT:!0,RETURN:!0,REVOKE:!0,RIGHT:!0,RLIKE:!0,ROW:!0,ROWS:!0,ROW_NUMBER:!0,SCHEMA:!0,SCHEMAS:!0,SELECT:!0,SENSITIVE:!0,SEPARATOR:!0,SET:!0,SHOW:!0,SIGNAL:!0,SMALLINT:!0,SPATIAL:!0,SPECIFIC:!0,SQL:!0,SQLEXCEPTION:!0,SQLSTATE:!0,SQLWARNING:!0,SQL_BIG_RESULT:!0,SSL:!0,STARTING:!0,STORED:!0,STRAIGHT_JOIN:!0,SYSTEM:!0,TABLE:!0,TERMINATED:!0,THEN:!0,TINYBLOB:!0,TINYINT:!0,TINYTEXT:!0,TO:!0,TRAILING:!0,TRIGGER:!0,TRUE:!0,UNION:!0,UNIQUE:!0,UNLOCK:!0,UNSIGNED:!0,UPDATE:!0,USAGE:!0,USE:!0,USING:!0,UTC_DATE:!0,UTC_TIME:!0,UTC_TIMESTAMP:!0,VALUES:!0,VARBINARY:!0,VARCHAR:!0,VARCHARACTER:!0,VARYING:!0,VIRTUAL:!0,WHEN:!0,WHERE:!0,WHILE:!0,WINDOW:!0,WITH:!0,WRITE:!0,XOR:!0,YEAR_MONTH:!0,ZEROFILL:!0},hb={avg:!0,sum:!0,count:!0,max:!0,min:!0,group_concat:!0,std:!0,variance:!0,current_date:!0,current_time:!0,current_timestamp:!0,current_user:!0,user:!0,session_user:!0,system_user:!0};function yb(r,t){return{type:"unary_expr",operator:r,expr:t}}function Eb(r,t,e){return{type:"binary_expr",operator:r,left:t,right:e}}function Ab(r){const t=n(Number.MAX_SAFE_INTEGER);return!(n(r)<t)}function mb(r,t,e=3){const n=[r];for(let r=0;r<t.length;r++)delete t[r][e].tableList,delete t[r][e].columnList,n.push(t[r][e]);return n}function Tb(r,t){let e=r;for(let r=0;r<t.length;r++)e=Eb(t[r][1],e,t[r][3]);return e}function Ib(r){return gb[r]||r||null}function Nb(r){const t=new Set;for(let e of r.keys()){const r=e.split("::");if(!r){t.add(e);break}r&&r[1]&&(r[1]=Ib(r[1])),t.add(r.join("::"))}return Array.from(t)}let Rb=[];const Sb=new Set,_b=new Set,gb={};if((e=a())!==o&&ga===r.length)return e;throw e!==o&&ga<r.length&&Fa({type:"end"}),function(r,t,e){return new s(s.buildMessage(r,t),r,t,e)}(Ua,xa<r.length?r.charAt(xa):null,xa<r.length?Pa(xa,xa+1):Pa(xa,xa))}}},function(r,t,e){var n=e(0);function s(r,t,e,n){this.message=r,this.expected=t,this.found=e,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,s)}!function(r,t){function e(){this.constructor=r}e.prototype=t.prototype,r.prototype=new e}(s,Error),s.buildMessage=function(r,t){var e={literal:function(r){return'"'+s(r.text)+'"'},class:function(r){var t,e="";for(t=0;t<r.parts.length;t++)e+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+e+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function n(r){return r.charCodeAt(0).toString(16).toUpperCase()}function s(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}function o(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}return"Expected "+function(r){var t,n,s,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(s=r[t],e[s.type](s));if(o.sort(),o.length>0){for(t=1,n=1;t<o.length;t++)o[t-1]!==o[t]&&(o[n]=o[t],n++);o.length=n}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+s(r)+'"':"end of input"}(t)+" found."},r.exports={SyntaxError:s,parse:function(r,t){t=void 0!==t?t:{};var e,o={},u={start:xa},a=xa,i=function(r,t){return ib(r,t)},l=function(r,t){return{...r,order_by:t&&t.toLowerCase()}},c=function(r,t){return ib(r,t,1)},f=Ra("IF",!0),b=Ra("CASCADED",!0),v=Ra("LOCAL",!0),p=Ra("CHECK",!0),L=Ra("OPTION",!1),C=Ra("ALGORITHM",!0),d=Ra("UNDEFINED",!0),w=Ra("MERGE",!0),h=Ra("TEMPTABLE",!0),y=Ra("SQL",!0),E=Ra("SECURITY",!0),A=Ra("DEFINER",!0),m=Ra("INVOKER",!0),T=function(r,t){return ib(r,t)},I=Ra("AUTO_INCREMENT",!0),N=Ra("UNIQUE",!0),R=Ra("KEY",!0),S=Ra("PRIMARY",!0),_=Ra("@",!1),g=Ra("BEFORE",!0),O=Ra("AFTER",!0),x=Ra("FOR",!0),U=Ra("EACH",!0),M=Ra("ROW",!0),k=Ra("STATEMENT",!0),D=Ra("FOLLOWS",!0),$=Ra("PRECEDES",!0),P=Ra("COLUMN_FORMAT",!0),F=Ra("FIXED",!0),G=Ra("DYNAMIC",!0),j=Ra("DEFAULT",!0),H=Ra("STORAGE",!0),Y=Ra("DISK",!0),B=Ra("MEMORY",!0),W=Ra("GENERATED",!0),X=Ra("ALWAYS",!0),V=Ra("AS",!0),q=Ra("STORED",!0),K=Ra("VIRTUAL",!0),Z=Ra("if",!0),z=Ra("exists",!0),Q=Ra("FOREIGN",!0),J=Ra("INSTANT",!0),rr=Ra("INPLACE",!0),tr=Ra("COPY",!0),er=Ra("LOCK",!0),nr=Ra("NONE",!0),sr=Ra("SHARED",!0),or=Ra("EXCLUSIVE",!0),ur=Ra("CHANGE",!0),ar=Ra("FIRST",!0),ir=/^[0-9]/,lr=Sa([["0","9"]],!1,!1),cr=Ra("PRIMARY KEY",!0),fr=Ra("FOREIGN KEY",!0),br=Ra("ENFORCED",!0),vr=Ra("MATCH FULL",!0),pr=Ra("MATCH PARTIAL",!0),Lr=Ra("MATCH SIMPLE",!0),Cr=Ra("RESTRICT",!0),dr=Ra("CASCADE",!0),wr=Ra("SET NULL",!0),hr=Ra("NO ACTION",!0),yr=Ra("SET DEFAULT",!0),Er=Ra("CHARACTER",!0),Ar=Ra("SET",!0),mr=Ra("CHARSET",!0),Tr=Ra("COLLATE",!0),Ir=Ra("AVG_ROW_LENGTH",!0),Nr=Ra("KEY_BLOCK_SIZE",!0),Rr=Ra("MAX_ROWS",!0),Sr=Ra("MIN_ROWS",!0),_r=Ra("STATS_SAMPLE_PAGES",!0),gr=Ra("CHECKSUM",!1),Or=Ra("DELAY_KEY_WRITE",!1),xr=/^[01]/,Ur=Sa(["0","1"],!1,!1),Mr=Ra("CONNECTION",!0),kr=Ra("COMPRESSION",!0),Dr=Ra("'",!1),$r=Ra("ZLIB",!0),Pr=Ra("LZ4",!0),Fr=Ra("ENGINE",!0),Gr=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.toUpperCase()}},jr=Ra("ROW_FORMAT",!0),Hr=Ra("COMPRESSED",!0),Yr=Ra("REDUNDANT",!0),Br=Ra("COMPACT",!0),Wr=Ra("BINARY",!0),Xr=Ra("MASTER",!0),Vr=Ra("LOGS",!0),qr=Ra("TRIGGERS",!0),Kr=Ra("STATUS",!0),Zr=Ra("PROCESSLIST",!0),zr=Ra("PROCEDURE",!0),Qr=Ra("FUNCTION",!0),Jr=Ra("BINLOG",!0),rt=Ra("EVENTS",!0),tt=Ra("COLLATION",!0),et=Ra("DATABASES",!0),nt=Ra("COLUMNS",!0),st=Ra("INDEXES",!0),ot=Ra("EVENT",!0),ut=Ra("GRANTS",!0),at=function(r,t){return ib(r,t)},it=Ra("READ",!0),lt=Ra("LOW_PRIORITY",!0),ct=Ra("WRITE",!0),ft=Ra("VIEW",!0),bt=Ra("GRANT",!0),vt=Ra("OPTION",!0),pt=function(r){return{type:"origin",value:Array.isArray(r)?r[0]:r}},Lt=Ra("ROUTINE",!0),Ct=Ra("EXECUTE",!0),dt=function(r,t){return ib(r,t)},wt=Ra("ADMIN",!0),ht=Ra("GRANT",!1),yt=Ra("PROXY",!1),Et=Ra("(",!1),At=Ra(")",!1),mt=Ra("IN",!0),Tt=Ra("SHARE",!0),It=Ra("MODE",!0),Nt=Ra("WAIT",!0),Rt=Ra("NOWAIT",!0),St=Ra("SKIP",!0),_t=Ra("LOCKED",!0),gt=Ra("NATURAL",!0),Ot=Ra("LANGUAGE",!0),xt=Ra("WITH",!0),Ut=Ra("QUERY",!0),Mt=Ra("EXPANSION",!0),kt=Ra("BOOLEAN",!0),Dt=Ra("MATCH",!0),$t=Ra("AGAINST",!1),Pt=Ra("OUTFILE",!0),Ft=Ra("DUMPFILE",!0),Gt=Ra("BTREE",!0),jt=Ra("HASH",!0),Ht=Ra("PARSER",!0),Yt=Ra("VISIBLE",!0),Bt=Ra("INVISIBLE",!0),Wt=function(r,t){return t.unshift(r),t.forEach((r=>{const{table:t,as:e}=r;Lb[t]=t,e&&(Lb[e]=t),function(r){const t=fb(r);r.clear(),t.forEach((t=>r.add(t)))}(pb)})),t},Xt=/^[_0-9]/,Vt=Sa(["_",["0","9"]],!1,!1),qt=Ra("?",!1),Kt=Ra("=",!1),Zt=Ra("DUPLICATE",!0),zt=function(r,t){return lb(r,t)},Qt=function(r){return r[0]+" "+r[2]},Jt=Ra(">=",!1),re=Ra(">",!1),te=Ra("<=",!1),ee=Ra("<>",!1),ne=Ra("<",!1),se=Ra("!=",!1),oe=Ra("ESCAPE",!0),ue=Ra("+",!1),ae=Ra("-",!1),ie=Ra("*",!1),le=Ra("/",!1),ce=Ra("%",!1),fe=Ra("||",!1),be=Ra("div",!0),ve=Ra("&",!1),pe=Ra(">>",!1),Le=Ra("<<",!1),Ce=Ra("^",!1),de=Ra("|",!1),we=Ra("!",!1),he=Ra("~",!1),ye=function(r){return!0===nb[r.toUpperCase()]},Ee=Ra('"',!1),Ae=/^[^"]/,me=Sa(['"'],!0,!1),Te=function(r){return r.join("")},Ie=/^[^']/,Ne=Sa(["'"],!0,!1),Re=Ra("`",!1),Se=/^[^`\\]/,_e=Sa(["`","\\"],!0,!1),ge=function(r,t){return r+t.join("")},Oe=/^[A-Za-z_]/,xe=Sa([["A","Z"],["a","z"],"_"],!1,!1),Ue=/^[A-Za-z0-9_$]/,Me=Sa([["A","Z"],["a","z"],["0","9"],"_","$"],!1,!1),ke=/^[A-Za-z0-9_:]/,De=Sa([["A","Z"],["a","z"],["0","9"],"_",":"],!1,!1),$e=Ra(":",!1),Pe=Ra("NOW",!0),Fe=Ra("OVER",!0),Ge=Ra("WINDOW",!0),je=Ra("FOLLOWING",!0),He=Ra("PRECEDING",!0),Ye=Ra("CURRENT",!0),Be=Ra("UNBOUNDED",!0),We=Ra("SEPARATOR",!0),Xe=Ra("YEAR_MONTH",!0),Ve=Ra("DAY_HOUR",!0),qe=Ra("DAY_MINUTE",!0),Ke=Ra("DAY_SECOND",!0),Ze=Ra("DAY_MICROSECOND",!0),ze=Ra("HOUR_MINUTE",!0),Qe=Ra("HOUR_SECOND",!0),Je=Ra("HOUR_MICROSECOND",!0),rn=Ra("MINUTE_SECOND",!0),tn=Ra("MINUTE_MICROSECOND",!0),en=Ra("SECOND_MICROSECOND",!0),nn=Ra("TIMEZONE_HOUR",!0),sn=Ra("TIMEZONE_MINUTE",!0),on=Ra("CENTURY",!0),un=Ra("DAY",!0),an=Ra("DATE",!0),ln=Ra("DECADE",!0),cn=Ra("DOW",!0),fn=Ra("DOY",!0),bn=Ra("EPOCH",!0),vn=Ra("HOUR",!0),pn=Ra("ISODOW",!0),Ln=Ra("ISOWEEK",!0),Cn=Ra("ISOYEAR",!0),dn=Ra("MICROSECONDS",!0),wn=Ra("MILLENNIUM",!0),hn=Ra("MILLISECONDS",!0),yn=Ra("MINUTE",!0),En=Ra("MONTH",!0),An=Ra("QUARTER",!0),mn=Ra("SECOND",!0),Tn=Ra("TIME",!0),In=Ra("TIMEZONE",!0),Nn=Ra("WEEK",!0),Rn=Ra("YEAR",!0),Sn=Ra("DATE_TRUNC",!0),_n=Ra("BOTH",!0),gn=Ra("LEADING",!0),On=Ra("TRAILING",!0),xn=Ra("trim",!0),Un=Ra("convert",!0),Mn=Ra("binary",!0),kn=Ra("_binary",!0),Dn=Ra("_latin1",!0),$n=Ra("X",!0),Pn=/^[0-9A-Fa-f]/,Fn=Sa([["0","9"],["A","F"],["a","f"]],!1,!1),Gn=Ra("b",!0),jn=Ra("0x",!0),Hn=Ra("N",!0),Yn=function(r,t){return{type:r.toLowerCase(),value:t[1].join("")}},Bn=/^[^"\\\0-\x1F\x7F]/,Wn=Sa(['"',"\\",["\0",""],""],!0,!1),Xn=/^[^'\\]/,Vn=Sa(["'","\\"],!0,!1),qn=Ra("\\'",!1),Kn=Ra('\\"',!1),Zn=Ra("\\\\",!1),zn=Ra("\\/",!1),Qn=Ra("\\b",!1),Jn=Ra("\\f",!1),rs=Ra("\\n",!1),ts=Ra("\\r",!1),es=Ra("\\t",!1),ns=Ra("\\u",!1),ss=Ra("\\",!1),os=Ra("''",!1),us=Ra('""',!1),as=Ra("``",!1),is=/^[\n\r]/,ls=Sa(["\n","\r"],!1,!1),cs=Ra(".",!1),fs=/^[0-9a-fA-F]/,bs=Sa([["0","9"],["a","f"],["A","F"]],!1,!1),vs=/^[eE]/,ps=Sa(["e","E"],!1,!1),Ls=/^[+\-]/,Cs=Sa(["+","-"],!1,!1),ds=Ra("NULL",!0),ws=Ra("NOT NULL",!0),hs=Ra("TRUE",!0),ys=Ra("TO",!0),Es=Ra("FALSE",!0),As=Ra("SHOW",!0),ms=Ra("DROP",!0),Ts=Ra("USE",!0),Is=Ra("ALTER",!0),Ns=Ra("SELECT",!0),Rs=Ra("UPDATE",!0),Ss=Ra("CREATE",!0),_s=Ra("TEMPORARY",!0),gs=Ra("DELETE",!0),Os=Ra("INSERT",!0),xs=Ra("RECURSIVE",!1),Us=Ra("REPLACE",!0),Ms=Ra("RENAME",!0),ks=Ra("IGNORE",!0),Ds=Ra("PARTITION",!0),$s=Ra("INTO",!0),Ps=Ra("FROM",!0),Fs=Ra("UNLOCK",!0),Gs=Ra("TABLE",!0),js=Ra("TRIGGER",!0),Hs=Ra("TABLES",!0),Ys=Ra("DATABASE",!0),Bs=Ra("SCHEMA",!0),Ws=Ra("ON",!0),Xs=Ra("LEFT",!0),Vs=Ra("RIGHT",!0),qs=Ra("FULL",!0),Ks=Ra("INNER",!0),Zs=Ra("CROSS",!0),zs=Ra("JOIN",!0),Qs=Ra("OUTER",!0),Js=Ra("UNION",!0),ro=Ra("MINUS",!0),to=Ra("INTERSECT",!0),eo=Ra("VALUES",!0),no=Ra("USING",!0),so=Ra("WHERE",!0),oo=Ra("GROUP",!0),uo=Ra("BY",!0),ao=Ra("ORDER",!0),io=Ra("HAVING",!0),lo=Ra("LIMIT",!0),co=Ra("OFFSET",!0),fo=Ra("ASC",!0),bo=Ra("DESC",!0),vo=Ra("DESCRIBE",!0),po=Ra("ALL",!0),Lo=Ra("DISTINCT",!0),Co=Ra("BETWEEN",!0),wo=Ra("IS",!0),ho=Ra("LIKE",!0),yo=Ra("RLIKE",!0),Eo=Ra("REGEXP",!0),Ao=Ra("EXISTS",!0),mo=Ra("NOT",!0),To=Ra("AND",!0),Io=Ra("OR",!0),No=Ra("COUNT",!0),Ro=Ra("GROUP_CONCAT",!0),So=Ra("MAX",!0),_o=Ra("MIN",!0),go=Ra("SUM",!0),Oo=Ra("AVG",!0),xo=Ra("EXTRACT",!0),Uo=Ra("CALL",!0),Mo=Ra("CASE",!0),ko=Ra("WHEN",!0),Do=Ra("THEN",!0),$o=Ra("ELSE",!0),Po=Ra("END",!0),Fo=Ra("CAST",!0),Go=Ra("VARBINARY",!0),jo=Ra("BIT",!0),Ho=Ra("CHAR",!0),Yo=Ra("VARCHAR",!0),Bo=Ra("NUMERIC",!0),Wo=Ra("DECIMAL",!0),Xo=Ra("SIGNED",!0),Vo=Ra("UNSIGNED",!0),qo=Ra("INT",!0),Ko=Ra("ZEROFILL",!0),Zo=Ra("INTEGER",!0),zo=Ra("JSON",!0),Qo=Ra("SMALLINT",!0),Jo=Ra("MEDIUMINT",!0),ru=Ra("TINYINT",!0),tu=Ra("TINYTEXT",!0),eu=Ra("TEXT",!0),nu=Ra("MEDIUMTEXT",!0),su=Ra("LONGTEXT",!0),ou=Ra("BIGINT",!0),uu=Ra("ENUM",!0),au=Ra("FLOAT",!0),iu=Ra("DOUBLE",!0),lu=Ra("DATETIME",!0),cu=Ra("ROWS",!0),fu=Ra("TIMESTAMP",!0),bu=Ra("TRUNCATE",!0),vu=Ra("USER",!0),pu=Ra("CURRENT_DATE",!0),Lu=Ra("INTERVAL",!0),Cu=Ra("CURRENT_TIME",!0),du=Ra("CURRENT_TIMESTAMP",!0),wu=Ra("CURRENT_USER",!0),hu=Ra("SESSION_USER",!0),yu=Ra("SYSTEM_USER",!0),Eu=Ra("GLOBAL",!0),Au=Ra("SESSION",!0),mu=Ra("PERSIST",!0),Tu=Ra("PERSIST_ONLY",!0),Iu=Ra("GEOMETRY",!0),Nu=Ra("POINT",!0),Ru=Ra("LINESTRING",!0),Su=Ra("POLYGON",!0),_u=Ra("MULTIPOINT",!0),gu=Ra("MULTILINESTRING",!0),Ou=Ra("MULTIPOLYGON",!0),xu=Ra("GEOMETRYCOLLECTION",!0),Uu=Ra("@@",!1),Mu=Ra("$",!1),ku=Ra("return",!0),Du=Ra(":=",!1),$u=Ra("DUAL",!0),Pu=Ra("ADD",!0),Fu=Ra("COLUMN",!0),Gu=Ra("INDEX",!0),ju=Ra("MODIFY",!0),Hu=Ra("FULLTEXT",!0),Yu=Ra("SPATIAL",!0),Bu=Ra("COMMENT",!0),Wu=Ra("CONSTRAINT",!0),Xu=Ra("REFERENCES",!0),Vu=Ra("SQL_CALC_FOUND_ROWS",!0),qu=Ra("SQL_CACHE",!0),Ku=Ra("SQL_NO_CACHE",!0),Zu=Ra("SQL_SMALL_RESULT",!0),zu=Ra("SQL_BIG_RESULT",!0),Qu=Ra("SQL_BUFFER_RESULT",!0),Ju=Ra(",",!1),ra=Ra("[",!1),ta=Ra("]",!1),ea=Ra(";",!1),na=Ra("&&",!1),sa=Ra("XOR",!0),oa=Ra("/*",!1),ua=Ra("*/",!1),aa=Ra("--",!1),ia=Ra("#",!1),la={type:"any"},ca=/^[ \t\n\r]/,fa=Sa([" ","\t","\n","\r"],!1,!1),ba=function(r,t,e){return{type:"assign",left:r,symbol:t,right:e}},va=Ra("boolean",!0),pa=Ra("blob",!0),La=Ra("tinyblob",!0),Ca=Ra("mediumblob",!0),da=Ra("longblob",!0),wa=function(r){return{dataType:r}},ha=/^[0-6]/,ya=Sa([["0","6"]],!1,!1),Ea=function(r){return{dataType:r}},Aa=0,ma=[{line:1,column:1}],Ta=0,Ia=[],Na=0;if("startRule"in t){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function Ra(r,t){return{type:"literal",text:r,ignoreCase:t}}function Sa(r,t,e){return{type:"class",parts:r,inverted:t,ignoreCase:e}}function _a(t){var e,n=ma[t];if(n)return n;for(e=t-1;!ma[e];)e--;for(n={line:(n=ma[e]).line,column:n.column};e<t;)10===r.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return ma[t]=n,n}function ga(r,t){var e=_a(r),n=_a(t);return{start:{offset:r,line:e.line,column:e.column},end:{offset:t,line:n.line,column:n.column}}}function Oa(r){Aa<Ta||(Aa>Ta&&(Ta=Aa,Ia=[]),Ia.push(r))}function xa(){var r,t;return r=Aa,kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Ma())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=Uf())!==o&&(a=kf())!==o&&(i=Ma())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=Uf())!==o&&(a=kf())!==o&&(i=Ma())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?(t=function(r,t){const e=r&&r.ast||r,n=t&&t.length&&t[0].length>=4?[e]:e;for(let r=0;r<t.length;r++)t[r][3]&&0!==t[r][3].length&&n.push(t[r][3]&&t[r][3].ast||t[r][3]);return{tableList:Array.from(vb),columnList:fb(pb),ast:n}}(t,e),r=t):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o?r=t:(Aa=r,r=o),r}function Ua(){var t;return(t=function(){var r,t,e,n,s,u,a,i,l,f,b;return r=Aa,(t=rc())!==o&&kf()!==o&&(e=Cc())!==o&&kf()!==o?((n=Ba())===o&&(n=null),n!==o&&kf()!==o&&(s=Ri())!==o?(i=t,l=e,f=n,(b=s)&&b.forEach((r=>vb.add(`${i}::${r.db}::${r.table}`))),r=t={tableList:Array.from(vb),columnList:fb(pb),ast:{type:i.toLowerCase(),keyword:l.toLowerCase(),prefix:f,name:b}}):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Aa,(t=rc())!==o&&kf()!==o&&(e=pf())!==o&&kf()!==o?((n=Ba())===o&&(n=null),n!==o&&kf()!==o&&(s=Ri())!==o&&kf()!==o?((u=ti())===o&&(u=null),u!==o?(t=function(r,t,e,n,s){return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),prefix:e,name:n,options:[{type:"origin",value:s}]}}}(t,e,n,s,u),r=t):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Aa,(t=rc())!==o&&kf()!==o&&(e=Ef())!==o&&kf()!==o&&(n=vl())!==o&&kf()!==o&&(s=Ec())!==o&&kf()!==o&&(u=Oi())!==o&&kf()!==o?((a=function(){var r,t,e,n,s,u;if(r=Aa,(t=Xa())===o&&(t=Va()),t!==o){for(e=[],n=Aa,(s=kf())!==o?((u=Xa())===o&&(u=Va()),u!==o?n=s=[s,u]:(Aa=n,n=o)):(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o?((u=Xa())===o&&(u=Va()),u!==o?n=s=[s,u]:(Aa=n,n=o)):(Aa=n,n=o);e!==o?r=t=c(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())===o&&(a=null),a!==o&&kf()!==o?(t=function(r,t,e,n,s){return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),name:e,table:n,options:s}}}(t,e,n,u,a),r=t):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Aa,(t=rc())!==o&&kf()!==o?((e=hc())===o&&(e=yc()),e!==o&&kf()!==o?((n=Ba())===o&&(n=null),n!==o&&kf()!==o&&(s=El())!==o?(t=function(r,t,e,n){return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),prefix:e,name:n}}}(t,e,n,s),r=t):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Aa,(t=rc())!==o&&kf()!==o&&(e=dc())!==o&&kf()!==o?((n=Ba())===o&&(n=null),n!==o&&kf()!==o&&(s=_i())!==o?(t=function(r,t,e,n){return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),prefix:e,name:[{schema:n.db,trigger:n.table}]}}}(t,e,n,s),r=t):(Aa=r,r=o)):(Aa=r,r=o))))),r}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s,u,a,l,c,f,b,v,p,L,C,d,w,h,y;return r=Aa,(t=sc())!==o&&kf()!==o?((e=oc())===o&&(e=null),e!==o&&kf()!==o&&Cc()!==o&&kf()!==o?((n=Pa())===o&&(n=null),n!==o&&kf()!==o&&(s=Ri())!==o&&kf()!==o&&(u=function(){var r,t,e,n,s,u,a,i;if(r=Aa,Of()!==o)if(kf()!==o)if((t=Fa())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Fa())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Fa())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o&&(n=kf())!==o&&(s=xf())!==o?r=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;return r}())!==o&&kf()!==o?((a=function(){var r,t,e,n,s,u,a,l;if(r=Aa,(t=si())!==o){for(e=[],n=Aa,(s=kf())!==o?((u=_f())===o&&(u=null),u!==o&&(a=kf())!==o&&(l=si())!==o?n=s=[s,u,a,l]:(Aa=n,n=o)):(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o?((u=_f())===o&&(u=null),u!==o&&(a=kf())!==o&&(l=si())!==o?n=s=[s,u,a,l]:(Aa=n,n=o)):(Aa=n,n=o);e!==o?r=t=i(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())===o&&(a=null),a!==o&&kf()!==o?((l=cc())===o&&(l=ic()),l===o&&(l=null),l!==o&&kf()!==o?((c=Lc())===o&&(c=null),c!==o&&kf()!==o?((f=Da())===o&&(f=null),f!==o?(b=t,v=e,p=n,C=u,d=a,w=l,h=c,y=f,(L=s)&&L.forEach((r=>vb.add(`create::${r.db}::${r.table}`))),r=t={tableList:Array.from(vb),columnList:fb(pb),ast:{type:b[0].toLowerCase(),keyword:"table",temporary:v&&v[0].toLowerCase(),if_not_exists:p,table:L,ignore_replace:w&&w[0].toLowerCase(),as:h&&h[0].toLowerCase(),query_expr:y&&y.ast,create_definitions:C,table_options:d}}):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Aa,(t=sc())!==o&&kf()!==o?((e=oc())===o&&(e=null),e!==o&&kf()!==o&&Cc()!==o&&kf()!==o?((n=Pa())===o&&(n=null),n!==o&&kf()!==o&&(s=Ri())!==o&&kf()!==o&&(u=function r(){var t,e,n;return(t=function(){var r,t,e;return r=Aa,(t=kc())!==o&&kf()!==o&&(e=Ri())!==o?(t=function(r){return{type:"like",table:r}}(e),r=t):(Aa=r,r=o),r}())===o&&(t=Aa,Of()!==o&&kf()!==o&&(e=r())!==o&&kf()!==o&&xf()!==o?((n=e).parentheses=!0,t=n):(Aa=t,t=o)),t}())!==o?(t=function(r,t,e,n,s){return n&&n.forEach((r=>vb.add(`create::${r.db}::${r.table}`))),{tableList:Array.from(vb),columnList:fb(pb),ast:{type:r[0].toLowerCase(),keyword:"table",temporary:t&&t[0].toLowerCase(),if_not_exists:e,table:n,like:s}}}(t,e,n,s,u),r=t):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A;return t=Aa,(e=sc())!==o&&kf()!==o?((n=Ha())===o&&(n=null),n!==o&&kf()!==o&&dc()!==o&&kf()!==o?((s=Pa())===o&&(s=null),s!==o&&kf()!==o&&(u=Oi())!==o&&kf()!==o&&(a=function(){var t;return"before"===r.substr(Aa,6).toLowerCase()?(t=r.substr(Aa,6),Aa+=6):(t=o,0===Na&&Oa(g)),t===o&&("after"===r.substr(Aa,5).toLowerCase()?(t=r.substr(Aa,5),Aa+=5):(t=o,0===Na&&Oa(O))),t}())!==o&&kf()!==o&&(i=function(){var r;return(r=ac())===o&&(r=nc())===o&&(r=uc()),r!==o&&(r={keyword:r[0].toLowerCase()}),r}())!==o&&kf()!==o&&Ec()!==o&&kf()!==o&&(l=Oi())!==o&&kf()!==o&&(c=function(){var t,e,n,s,u,a,i;return t=Aa,"for"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(x)),e!==o&&kf()!==o?("each"===r.substr(Aa,4).toLowerCase()?(n=r.substr(Aa,4),Aa+=4):(n=o,0===Na&&Oa(U)),n===o&&(n=null),n!==o&&kf()!==o?("row"===r.substr(Aa,3).toLowerCase()?(s=r.substr(Aa,3),Aa+=3):(s=o,0===Na&&Oa(M)),s===o&&("statement"===r.substr(Aa,9).toLowerCase()?(s=r.substr(Aa,9),Aa+=9):(s=o,0===Na&&Oa(k))),s!==o?(u=e,i=s,t=e={keyword:(a=n)?`${u.toLowerCase()} ${a.toLowerCase()}`:u.toLowerCase(),args:i.toLowerCase()}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&kf()!==o?((f=function(){var t,e,n;return t=Aa,"follows"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(D)),e===o&&("precedes"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa($))),e!==o&&kf()!==o&&(n=El())!==o?t=e={keyword:e,trigger:n}:(Aa=t,t=o),t}())===o&&(f=null),f!==o&&kf()!==o&&(b=function(){var r,t;return r=Aa,pc()!==o&&kf()!==o&&(t=Fi())!==o?r={type:"set",expr:t}:(Aa=r,r=o),r}())!==o?(v=e,p=n,L=s,C=u,d=a,w=i,h=l,y=c,E=f,A=b,t=e={tableList:Array.from(vb),columnList:fb(pb),ast:{type:v[0].toLowerCase(),definer:p,keyword:"trigger",for_each:y,if_not_exists:L,trigger:C,time:d,events:[w],order:E,table:h,execute:A}}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,l,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T;return r=Aa,(t=sc())!==o&&kf()!==o?((e=If())===o&&(e=mf())===o&&(e=Tf()),e===o&&(e=null),e!==o&&kf()!==o&&(n=Ef())!==o&&kf()!==o&&(s=Ll())!==o&&kf()!==o?((u=Ti())===o&&(u=null),u!==o&&kf()!==o&&(a=Ec())!==o&&kf()!==o&&(l=Oi())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(c=function(){var r,t,e,n,s,u,a,l;if(r=Aa,(t=$a())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(l=$a())!==o?n=s=[s,u,a,l]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(l=$a())!==o?n=s=[s,u,a,l]:(Aa=n,n=o);e!==o?r=t=i(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o&&kf()!==o&&xf()!==o&&kf()!==o?((f=Ii())===o&&(f=null),f!==o&&kf()!==o?((b=Xa())===o&&(b=null),b!==o&&kf()!==o?((v=Va())===o&&(v=null),v!==o&&kf()!==o?(p=t,L=e,C=n,d=s,w=u,h=a,y=l,E=c,A=f,m=b,T=v,r=t={tableList:Array.from(vb),columnList:fb(pb),ast:{type:p[0].toLowerCase(),index_type:L&&L.toLowerCase(),keyword:C.toLowerCase(),index:d,on_kw:h[0].toLowerCase(),table:y,index_columns:E,index_using:w,index_options:A,algorithm_option:m,lock_option:T}}):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l,f;return r=Aa,(t=sc())!==o&&kf()!==o?((e=hc())===o&&(e=yc()),e!==o&&kf()!==o?((n=Pa())===o&&(n=null),n!==o&&kf()!==o&&(s=El())!==o&&kf()!==o?((u=function(){var r,t,e,n,s,u;if(r=Aa,(t=ni())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=ni())!==o?n=s=[s,u]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=ni())!==o?n=s=[s,u]:(Aa=n,n=o);e!==o?r=t=c(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())===o&&(u=null),u!==o?(a=t,i=n,l=s,f=u,r=t={tableList:Array.from(vb),columnList:fb(pb),ast:{type:a[0].toLowerCase(),keyword:"database",if_not_exists:i,database:l,create_definitions:f}}):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,T,I,N,R,S,_,g,O,x,U,M,k,D,$,P,F,G,j,H,Y;return t=Aa,(e=sc())!==o&&kf()!==o?(n=Aa,(s=Fc())!==o&&(u=kf())!==o&&(a=ic())!==o?n=s=[s,u,a]:(Aa=n,n=o),n===o&&(n=null),n!==o&&(s=kf())!==o?(u=Aa,"algorithm"===r.substr(Aa,9).toLowerCase()?(a=r.substr(Aa,9),Aa+=9):(a=o,0===Na&&Oa(C)),a!==o&&(i=kf())!==o&&(l=wf())!==o&&(c=kf())!==o?("undefined"===r.substr(Aa,9).toLowerCase()?(f=r.substr(Aa,9),Aa+=9):(f=o,0===Na&&Oa(d)),f===o&&("merge"===r.substr(Aa,5).toLowerCase()?(f=r.substr(Aa,5),Aa+=5):(f=o,0===Na&&Oa(w)),f===o&&("temptable"===r.substr(Aa,9).toLowerCase()?(f=r.substr(Aa,9),Aa+=9):(f=o,0===Na&&Oa(h)))),f!==o?u=a=[a,i,l,c,f]:(Aa=u,u=o)):(Aa=u,u=o),u===o&&(u=null),u!==o&&(a=kf())!==o?((i=Ha())===o&&(i=null),i!==o&&(l=kf())!==o?(c=Aa,"sql"===r.substr(Aa,3).toLowerCase()?(f=r.substr(Aa,3),Aa+=3):(f=o,0===Na&&Oa(y)),f!==o&&(T=kf())!==o?("security"===r.substr(Aa,8).toLowerCase()?(I=r.substr(Aa,8),Aa+=8):(I=o,0===Na&&Oa(E)),I!==o&&(N=kf())!==o?("definer"===r.substr(Aa,7).toLowerCase()?(R=r.substr(Aa,7),Aa+=7):(R=o,0===Na&&Oa(A)),R===o&&("invoker"===r.substr(Aa,7).toLowerCase()?(R=r.substr(Aa,7),Aa+=7):(R=o,0===Na&&Oa(m))),R!==o?c=f=[f,T,I,N,R]:(Aa=c,c=o)):(Aa=c,c=o)):(Aa=c,c=o),c===o&&(c=null),c!==o&&(f=kf())!==o&&(T=pf())!==o&&(I=kf())!==o&&(N=Oi())!==o&&(R=kf())!==o?(S=Aa,(_=Of())!==o&&(g=kf())!==o&&(O=pl())!==o&&(x=kf())!==o&&(U=xf())!==o?S=_=[_,g,O,x,U]:(Aa=S,S=o),S===o&&(S=null),S!==o&&(_=kf())!==o&&(g=Lc())!==o&&(O=kf())!==o&&(x=Li())!==o&&(U=kf())!==o?((M=function(){var t,e,n,s;return t=Aa,Nc()!==o&&kf()!==o?("cascaded"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(b)),e===o&&("local"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(v))),e!==o&&kf()!==o?("check"===r.substr(Aa,5).toLowerCase()?(n=r.substr(Aa,5),Aa+=5):(n=o,0===Na&&Oa(p)),n!==o&&kf()!==o?("OPTION"===r.substr(Aa,6)?(s="OPTION",Aa+=6):(s=o,0===Na&&Oa(L)),s!==o?t=`with ${e.toLowerCase()} check option`:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,Nc()!==o&&kf()!==o?("check"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(p)),e!==o&&kf()!==o?("OPTION"===r.substr(Aa,6)?(n="OPTION",Aa+=6):(n=o,0===Na&&Oa(L)),n!==o?t="with check option":(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)),t}())===o&&(M=null),M!==o?(k=e,D=n,$=u,P=i,F=c,j=S,H=x,Y=M,(G=N).view=G.table,delete G.table,t=e={tableList:Array.from(vb),columnList:fb(pb),ast:{type:k[0].toLowerCase(),keyword:"view",replace:D&&"or replace",algorithm:$&&$[4],definer:P,sql_security:F&&F[4],columns:j&&j[2],select:H,view:G,with:Y}}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=Aa,(e=function(){var t,e,n,s;return t=Aa,"truncate"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(bu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="TRUNCATE":(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&kf()!==o?((n=Cc())===o&&(n=null),n!==o&&kf()!==o&&(s=Ri())!==o?(u=e,a=n,(i=s)&&i.forEach((r=>vb.add(`${u}::${r.db}::${r.table}`))),t=e={tableList:Array.from(vb),columnList:fb(pb),ast:{type:u.toLowerCase(),keyword:a&&a.toLowerCase()||"table",name:i}}):(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=Aa,lc()!==o&&kf()!==o&&Cc()!==o&&kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=mi())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=mi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=mi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o?((e=t).forEach((r=>r.forEach((r=>r.table&&vb.add(`rename::${r.db}::${r.table}`))))),r={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"rename",table:e}}):(Aa=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=Aa,function(){var t,e,n,s;return t=Aa,"call"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Uo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="CALL":(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&(e=function(){var r;return(r=Kf())===o&&(r=Zf()),r}())!==o?(n=e,t={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"call",expr:n}}):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=Aa,function(){var t,e,n,s;return t=Aa,"use"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(Ts)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&(e=Ll())!==o?(n=e,vb.add(`use::${n}::null`),t={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"use",db:n}}):(Aa=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s;return r=Aa,tc()!==o&&kf()!==o&&Cc()!==o&&kf()!==o&&(t=Oi())!==o&&kf()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Wa())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Wa())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Wa())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o?(n=t,s=e,vb.add(`alter::${n.db}::${n.table}`),r={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"alter",table:[n],expr:s}}):(Aa=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u;return t=Aa,pc()!==o&&kf()!==o?((e=function(){var t,e,n,s;return t=Aa,"global"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Eu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="GLOBAL":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Aa,"session"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Au)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="SESSION":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Aa,"local"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(v)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="LOCAL":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Aa,"persist"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(mu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="PERSIST":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Aa,"persist_only"===r.substr(Aa,12).toLowerCase()?(e=r.substr(Aa,12),Aa+=12):(e=o,0===Na&&Oa(Tu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="PERSIST_ONLY":(Aa=t,t=o)):(Aa=t,t=o),t}()),e===o&&(e=null),e!==o&&kf()!==o&&(n=Yf())!==o?(s=e,(u=n).keyword=s,t={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"set",expr:u}}):(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=Aa,function(){var t,e,n,s;return t=Aa,"lock"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(er)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&wc()!==o&&kf()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=oi())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=oi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=oi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=at(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o?(n=e,t={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"lock",keyword:"tables",tables:n}}):(Aa=t,t=o),t}())===o&&(t=function(){var t;return t=Aa,function(){var t,e,n,s;return t=Aa,"unlock"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Fs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&wc()!==o?t={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"unlock",keyword:"tables"}}:(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;return t=Aa,(e=Jl())!==o&&kf()!==o?("binary"===r.substr(Aa,6).toLowerCase()?(n=r.substr(Aa,6),Aa+=6):(n=o,0===Na&&Oa(Wr)),n===o&&("master"===r.substr(Aa,6).toLowerCase()?(n=r.substr(Aa,6),Aa+=6):(n=o,0===Na&&Oa(Xr))),n!==o&&(s=kf())!==o?("logs"===r.substr(Aa,4).toLowerCase()?(u=r.substr(Aa,4),Aa+=4):(u=o,0===Na&&Oa(Vr)),u!==o?(f=n,t=e={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"show",suffix:"logs",keyword:f.toLowerCase()}}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Jl())!==o&&kf()!==o&&(n=wc())!==o?t=e={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"show",keyword:"tables"}}:(Aa=t,t=o),t===o&&(t=Aa,(e=Jl())!==o&&kf()!==o?("triggers"===r.substr(Aa,8).toLowerCase()?(n=r.substr(Aa,8),Aa+=8):(n=o,0===Na&&Oa(qr)),n===o&&("status"===r.substr(Aa,6).toLowerCase()?(n=r.substr(Aa,6),Aa+=6):(n=o,0===Na&&Oa(Kr)),n===o&&("processlist"===r.substr(Aa,11).toLowerCase()?(n=r.substr(Aa,11),Aa+=11):(n=o,0===Na&&Oa(Zr)))),n!==o?(L=n,t=e={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"show",keyword:L.toLowerCase()}}):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Jl())!==o&&kf()!==o?("procedure"===r.substr(Aa,9).toLowerCase()?(n=r.substr(Aa,9),Aa+=9):(n=o,0===Na&&Oa(zr)),n===o&&("function"===r.substr(Aa,8).toLowerCase()?(n=r.substr(Aa,8),Aa+=8):(n=o,0===Na&&Oa(Qr))),n!==o&&(s=kf())!==o?("status"===r.substr(Aa,6).toLowerCase()?(u=r.substr(Aa,6),Aa+=6):(u=o,0===Na&&Oa(Kr)),u!==o?(e=function(r){return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:"show",keyword:r.toLowerCase(),suffix:"status"}}}(n),t=e):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Jl())!==o&&kf()!==o?("binlog"===r.substr(Aa,6).toLowerCase()?(n=r.substr(Aa,6),Aa+=6):(n=o,0===Na&&Oa(Jr)),n!==o&&(s=kf())!==o?("events"===r.substr(Aa,6).toLowerCase()?(u=r.substr(Aa,6),Aa+=6):(u=o,0===Na&&Oa(rt)),u!==o&&(a=kf())!==o?((i=ul())===o&&(i=null),i!==o&&kf()!==o?((l=Ai())===o&&(l=null),l!==o&&kf()!==o?((c=Pi())===o&&(c=null),c!==o?(b=i,v=l,p=c,t=e={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"show",suffix:"events",keyword:"binlog",in:b,from:v,limit:p}}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Jl())!==o&&kf()!==o?(n=Aa,"character"===r.substr(Aa,9).toLowerCase()?(s=r.substr(Aa,9),Aa+=9):(s=o,0===Na&&Oa(Er)),s!==o&&(u=kf())!==o?("set"===r.substr(Aa,3).toLowerCase()?(a=r.substr(Aa,3),Aa+=3):(a=o,0===Na&&Oa(Ar)),a!==o?n=s=[s,u,a]:(Aa=n,n=o)):(Aa=n,n=o),n===o&&("collation"===r.substr(Aa,9).toLowerCase()?(n=r.substr(Aa,9),Aa+=9):(n=o,0===Na&&Oa(tt)),n===o&&("databases"===r.substr(Aa,9).toLowerCase()?(n=r.substr(Aa,9),Aa+=9):(n=o,0===Na&&Oa(et)))),n!==o&&(s=kf())!==o?((u=ol())===o&&(u=Ui()),u===o&&(u=null),u!==o?(e=function(r,t){let e=Array.isArray(r)&&r||[r];return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:"show",suffix:e[2]&&e[2].toLowerCase(),keyword:e[0].toLowerCase(),expr:t}}}(n,u),t=e):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Jl())!==o&&kf()!==o?("columns"===r.substr(Aa,7).toLowerCase()?(n=r.substr(Aa,7),Aa+=7):(n=o,0===Na&&Oa(nt)),n===o&&("indexes"===r.substr(Aa,7).toLowerCase()?(n=r.substr(Aa,7),Aa+=7):(n=o,0===Na&&Oa(st))),n!==o&&(s=kf())!==o&&(u=Ai())!==o?(e=function(r,t){return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:"show",keyword:r.toLowerCase(),from:t}}}(n,u),t=e):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Jl())!==o&&kf()!==o&&(n=sc())!==o&&(s=kf())!==o?((u=pf())===o&&(u=Cc())===o&&("event"===r.substr(Aa,5).toLowerCase()?(u=r.substr(Aa,5),Aa+=5):(u=o,0===Na&&Oa(ot)),u===o&&(u=dc())===o&&("procedure"===r.substr(Aa,9).toLowerCase()?(u=r.substr(Aa,9),Aa+=9):(u=o,0===Na&&Oa(zr)))),u!==o&&(a=kf())!==o&&(i=Oi())!==o?(e=function(r,t){const e=r.toLowerCase();return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:"show",keyword:"create",suffix:e,[e]:t}}}(u,i),t=e):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=function(){var t,e,n,s;return t=Aa,Jl()!==o&&kf()!==o?("grants"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(ut)),e!==o&&kf()!==o?((n=function(){var t,e,n,s,u,a,i,l,c;return t=Aa,"for"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(x)),e!==o&&kf()!==o&&(n=Ll())!==o&&kf()!==o?(s=Aa,(u=Lf())!==o&&(a=kf())!==o&&(i=Ll())!==o?s=u=[u,a,i]:(Aa=s,s=o),s===o&&(s=null),s!==o&&(u=kf())!==o?((a=function(){var r,t;return r=Aa,Ic()!==o&&kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Ll())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Ll())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Ll())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=at(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o?r=t:(Aa=r,r=o),r}())===o&&(a=null),a!==o?(c=a,t=e={user:n,host:(l=s)&&l[2],role_list:c}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(n=null),n!==o?(s=n,t={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"show",keyword:"grants",for:s}}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}())))))))),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,(e=_c())===o&&(e=function(){var t,e,n,s;return t=Aa,"describe"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(vo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="DESCRIBE":(Aa=t,t=o)):(Aa=t,t=o),t}()),e!==o&&kf()!==o&&(n=Ll())!==o?(s=n,t=e={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"desc",table:s}}):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C;return t=Aa,"grant"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(bt)),e!==o&&kf()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=ai())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=ai())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=ai())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=dt(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o&&kf()!==o&&(s=Ec())!==o&&kf()!==o?((u=function(){var t;return(t=Cc())===o&&("function"===r.substr(Aa,8).toLowerCase()?(t=r.substr(Aa,8),Aa+=8):(t=o,0===Na&&Oa(Qr)),t===o&&("procedure"===r.substr(Aa,9).toLowerCase()?(t=r.substr(Aa,9),Aa+=9):(t=o,0===Na&&Oa(zr)))),t!==o&&(t={type:"origin",value:t.toUpperCase()}),t}())===o&&(u=null),u!==o&&kf()!==o&&(a=function(){var r,t,e,n,s,u,a;return r=Aa,t=Aa,(e=Ll())===o&&(e=gf()),e!==o&&(n=kf())!==o&&(s=Sf())!==o?t=e=[e,n,s]:(Aa=t,t=o),t===o&&(t=null),t!==o&&(e=kf())!==o?((n=Ll())===o&&(n=gf()),n!==o?(a=n,r=t={prefix:(u=t)&&u[0],name:a}):(Aa=r,r=o)):(Aa=r,r=o),r}())!==o&&kf()!==o&&(i=Ql())!==o&&kf()!==o&&(l=li())!==o&&kf()!==o?((c=function(){var t,e,n;return t=Aa,Nc()!==o&&kf()!==o?("grant"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(bt)),e!==o&&kf()!==o?("option"===r.substr(Aa,6).toLowerCase()?(n=r.substr(Aa,6),Aa+=6):(n=o,0===Na&&Oa(vt)),n!==o?t={type:"origin",value:"with grant option"}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(c=null),c!==o?(f=n,b=u,v=a,p=i,L=l,C=c,t=e={tableList:Array.from(vb),columnList:fb(pb),ast:{type:"grant",keyword:"priv",objects:f,on:{object_type:b,priv_level:[v]},to_from:p[0],user_or_roles:L,with:C}}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,"GRANT"===r.substr(Aa,5)?(e="GRANT",Aa+=5):(e=o,0===Na&&Oa(ht)),e!==o&&kf()!==o?("PROXY"===r.substr(Aa,5)?(n="PROXY",Aa+=5):(n=o,0===Na&&Oa(yt)),n!==o&&kf()!==o&&(s=Ec())!==o&&kf()!==o&&(u=ii())!==o&&kf()!==o&&(a=Ql())!==o&&kf()!==o&&(i=li())!==o&&kf()!==o?((l=ci())===o&&(l=null),l!==o?(e=function(r,t,e,n){return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:"grant",keyword:"proxy",objects:[{priv:{type:"origin",value:"proxy"}}],on:r,to_from:t[0],user_or_roles:e,with:n}}}(u,a,i,l),t=e):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,"GRANT"===r.substr(Aa,5)?(e="GRANT",Aa+=5):(e=o,0===Na&&Oa(ht)),e!==o&&kf()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Ll())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Ll())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Ll())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=dt(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o&&kf()!==o&&(s=Ql())!==o&&kf()!==o&&(u=li())!==o&&kf()!==o?((a=ci())===o&&(a=null),a!==o?(e=function(r,t,e,n){return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:"grant",keyword:"role",objects:r.map((r=>({priv:{type:"string",value:r}}))),to_from:t[0],user_or_roles:e,with:n}}}(n,s,u,a),t=e):(Aa=t,t=o)):(Aa=t,t=o))),t}()),t}function Ma(){var r;return(r=Da())===o&&(r=function(){var r,t,e,n,s,u;return r=Aa,(t=kf())!==o?((e=bi())===o&&(e=null),e!==o&&kf()!==o&&nc()!==o&&kf()!==o&&(n=Ri())!==o&&kf()!==o&&pc()!==o&&kf()!==o&&(s=Fi())!==o&&kf()!==o?((u=Ui())===o&&(u=null),u!==o?(t=function(r,t,e,n){const s={};return t&&t.forEach((r=>{const{db:t,as:e,table:n,join:o}=r,u=o?"select":"update";t&&(s[n]=t),n&&vb.add(`${u}::${t}::${n}`)})),e&&e.forEach((r=>{if(r.table){const t=cb(r.table);vb.add(`update::${s[t]||null}::${t}`)}pb.add(`update::${r.table}::${r.column}`)})),{tableList:Array.from(vb),columnList:fb(pb),ast:{with:r,type:"update",table:t,set:e,where:n}}}(e,n,s,u),r=t):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i,l;return r=Aa,(t=Bi())!==o&&kf()!==o?((e=cc())===o&&(e=null),e!==o&&kf()!==o?((n=bc())===o&&(n=null),n!==o&&kf()!==o&&(s=Oi())!==o&&kf()!==o?((u=Hi())===o&&(u=null),u!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(a=pl())!==o&&kf()!==o&&xf()!==o&&kf()!==o&&(i=ji())!==o&&kf()!==o?((l=Yi())===o&&(l=null),l!==o?(t=function(r,t,e,n,s,o,u,a){if(n&&(vb.add(`insert::${n.db}::${n.table}`),n.as=null),o){let r=n&&n.table||null;Array.isArray(u)&&u.forEach(((r,t)=>{if(r.value.length!=o.length)throw new Error("Error: column count doesn't match value count at row "+(t+1))})),o.forEach((t=>pb.add(`insert::${r}::${t}`)))}let i=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:r,table:[n],columns:o,values:u,partition:s,prefix:i,on_duplicate_update:a}}}(t,e,n,s,u,a,i,l),r=t):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=Aa,(t=Bi())!==o&&kf()!==o?((e=cc())===o&&(e=null),e!==o&&kf()!==o?((n=bc())===o&&(n=null),n!==o&&kf()!==o&&(s=Oi())!==o&&kf()!==o?((u=Hi())===o&&(u=null),u!==o&&kf()!==o&&(a=ji())!==o&&kf()!==o?((i=Yi())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o,u){n&&(vb.add(`insert::${n.db}::${n.table}`),pb.add(`insert::${n.table}::(.*)`),n.as=null);const a=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:r,table:[n],columns:null,values:o,partition:s,prefix:a,on_duplicate_update:u}}}(t,e,n,s,u,a,i),r=t):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=Aa,(t=Bi())!==o&&kf()!==o?((e=cc())===o&&(e=null),e!==o&&kf()!==o?((n=bc())===o&&(n=null),n!==o&&kf()!==o&&(s=Oi())!==o&&kf()!==o?((u=Hi())===o&&(u=null),u!==o&&kf()!==o&&pc()!==o&&kf()!==o&&(a=Fi())!==o&&kf()!==o?((i=Yi())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o,u){n&&(vb.add(`insert::${n.db}::${n.table}`),pb.add(`insert::${n.table}::(.*)`),n.as=null);const a=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(vb),columnList:fb(pb),ast:{type:r,table:[n],columns:null,partition:s,prefix:a,set:o,on_duplicate_update:u}}}(t,e,n,s,u,a,i),r=t):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u;return r=Aa,(t=kf())!==o?((e=bi())===o&&(e=null),e!==o&&kf()!==o&&uc()!==o&&kf()!==o?((n=Ri())===o&&(n=null),n!==o&&kf()!==o&&(s=Ai())!==o&&kf()!==o?((u=Ui())===o&&(u=null),u!==o?(t=function(r,t,e,n){if(e&&e.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"delete";n&&vb.add(`${o}::${t}::${n}`),s||pb.add(`delete::${n}::(.*)`)})),null===t&&1===e.length){const r=e[0];t=[{db:r.db,table:r.table,as:r.as,addition:!0}]}return{tableList:Array.from(vb),columnList:fb(pb),ast:{with:r,type:"delete",table:t,from:e,where:n}}}(e,n,s,u),r=t):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(r=Ua())===o&&(r=function(){var r,t;for(r=[],t=Hf();t!==o;)r.push(t),t=Hf();return r}()),r}function ka(){var t,e,n,s;return t=Aa,(e=function(){var t,e,n,s;return t=Aa,"union"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Js)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&kf()!==o?((n=gc())===o&&(n=Oc()),n===o&&(n=null),n!==o?t=e=(s=n)?"union "+s.toLowerCase():"union":(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=function(){var t,e,n,s;return t=Aa,"minus"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(ro)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(e="minus"),(t=e)===o&&(t=Aa,(e=function(){var t,e,n,s;return t=Aa,"intersect"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(to)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(e="intersect"),t=e)),t}function Da(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=fi())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=ka())!==o&&(a=kf())!==o&&(i=fi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=ka())!==o&&(a=kf())!==o&&(i=fi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o&&(n=kf())!==o?((s=ki())===o&&(s=null),s!==o&&(u=kf())!==o?((a=Pi())===o&&(a=null),a!==o?r=t=function(r,t,e,n){let s=r;for(let r=0;r<t.length;r++)s._next=t[r][3],s.set_op=t[r][1],s=s._next;return e&&(r._orderby=e),n&&(r._limit=n),{tableList:Array.from(vb),columnList:fb(pb),ast:r}}(t,e,s,a):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)}else Aa=r,r=o;return r}function $a(){var r,t,e;return r=Aa,(t=zi())!==o?((e=Sc())===o&&(e=_c()),e===o&&(e=null),e!==o?r=t=l(t,e):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=function(){var r,t,e;return r=Aa,(t=vl())!==o&&kf()!==o?((e=Sc())===o&&(e=_c()),e===o&&(e=null),e!==o?r=t=l(t,e):(Aa=r,r=o)):(Aa=r,r=o),r}()),r}function Pa(){var t,e;return t=Aa,"if"===r.substr(Aa,2).toLowerCase()?(e=r.substr(Aa,2),Aa+=2):(e=o,0===Na&&Oa(f)),e!==o&&kf()!==o&&$c()!==o&&kf()!==o&&Dc()!==o?t=e="IF NOT EXISTS":(Aa=t,t=o),t}function Fa(){var t;return(t=ja())===o&&(t=Za())===o&&(t=za())===o&&(t=function(){var t;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=Aa,(e=Qa())===o&&(e=null),e!==o&&kf()!==o?("primary key"===r.substr(Aa,11).toLowerCase()?(n=r.substr(Aa,11),Aa+=11):(n=o,0===Na&&Oa(cr)),n!==o&&kf()!==o?((s=Ti())===o&&(s=null),s!==o&&kf()!==o&&(u=Ka())!==o&&kf()!==o?((a=Ii())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l.toLowerCase(),keyword:i&&i.keyword,index_type:c,resource:"constraint",index_options:b}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;return r=Aa,(t=Qa())===o&&(t=null),t!==o&&kf()!==o&&(e=If())!==o&&kf()!==o?((n=Ef())===o&&(n=Af()),n===o&&(n=null),n!==o&&kf()!==o?((s=hl())===o&&(s=null),s!==o&&kf()!==o?((u=Ti())===o&&(u=null),u!==o&&kf()!==o&&(a=Ka())!==o&&kf()!==o?((i=Ii())===o&&(i=null),i!==o?(c=e,f=n,b=s,v=u,p=a,L=i,r=t={constraint:(l=t)&&l.constraint,definition:p,constraint_type:f&&`${c.toLowerCase()} ${f.toLowerCase()}`||c.toLowerCase(),keyword:l&&l.keyword,index_type:v,index:b,resource:"constraint",index_options:L}):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=Aa,(e=Qa())===o&&(e=null),e!==o&&kf()!==o?("foreign key"===r.substr(Aa,11).toLowerCase()?(n=r.substr(Aa,11),Aa+=11):(n=o,0===Na&&Oa(fr)),n!==o&&kf()!==o?((s=hl())===o&&(s=null),s!==o&&kf()!==o&&(u=pi())!==o&&kf()!==o?((a=Ja())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l,keyword:i&&i.keyword,index:c,resource:"constraint",reference_definition:b}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}()),t}()),t}function Ga(){var t,e,n,s,u;return t=Aa,(e=function(){var t;return(t=function(){var t,e,n,s;return t=Aa,"not null"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(ws)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(t={type:"not null",value:"not null"}),t}())===o&&(e=Fl()),e!==o&&((u=e)&&!u.value&&(u.value="null"),e={nullable:u}),(t=e)===o&&(t=Aa,(e=function(){var r,t;return r=Aa,zl()!==o&&kf()!==o?((t=Pl())===o&&(t=zi()),t!==o?r={type:"default",value:t}:(Aa=r,r=o)):(Aa=r,r=o),r}())!==o&&(e={default_val:e}),(t=e)===o&&(t=Aa,"auto_increment"===r.substr(Aa,14).toLowerCase()?(e=r.substr(Aa,14),Aa+=14):(e=o,0===Na&&Oa(I)),e!==o&&(e={auto_increment:e.toLowerCase()}),(t=e)===o&&(t=Aa,"unique"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(N)),e!==o&&kf()!==o?("key"===r.substr(Aa,3).toLowerCase()?(n=r.substr(Aa,3),Aa+=3):(n=o,0===Na&&Oa(R)),n===o&&(n=null),n!==o?t=e=function(r){const t=["unique"];return r&&t.push(r),{unique:t.join(" ").toLowerCase("")}}(n):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,"primary"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(S)),e===o&&(e=null),e!==o&&kf()!==o?("key"===r.substr(Aa,3).toLowerCase()?(n=r.substr(Aa,3),Aa+=3):(n=o,0===Na&&Oa(R)),n!==o?t=e=function(r){const t=[];return r&&t.push("primary"),t.push("key"),{primary_key:t.join(" ").toLowerCase("")}}(e):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Pf())!==o&&(e={comment:e}),(t=e)===o&&(t=Aa,(e=Ya())!==o&&(e={collate:e}),(t=e)===o&&(t=Aa,(e=function(){var t,e,n;return t=Aa,"column_format"===r.substr(Aa,13).toLowerCase()?(e=r.substr(Aa,13),Aa+=13):(e=o,0===Na&&Oa(P)),e!==o&&kf()!==o?("fixed"===r.substr(Aa,5).toLowerCase()?(n=r.substr(Aa,5),Aa+=5):(n=o,0===Na&&Oa(F)),n===o&&("dynamic"===r.substr(Aa,7).toLowerCase()?(n=r.substr(Aa,7),Aa+=7):(n=o,0===Na&&Oa(G)),n===o&&("default"===r.substr(Aa,7).toLowerCase()?(n=r.substr(Aa,7),Aa+=7):(n=o,0===Na&&Oa(j)))),n!==o?t=e={type:"column_format",value:n.toLowerCase()}:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(e={column_format:e}),(t=e)===o&&(t=Aa,(e=function(){var t,e,n;return t=Aa,"storage"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(H)),e!==o&&kf()!==o?("disk"===r.substr(Aa,4).toLowerCase()?(n=r.substr(Aa,4),Aa+=4):(n=o,0===Na&&Oa(Y)),n===o&&("memory"===r.substr(Aa,6).toLowerCase()?(n=r.substr(Aa,6),Aa+=6):(n=o,0===Na&&Oa(B))),n!==o?t=e={type:"storage",value:n.toLowerCase()}:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(e={storage:e}),(t=e)===o&&(t=Aa,(e=Ja())!==o&&(e={reference_definition:e}),(t=e)===o&&(t=Aa,(e=function(){var t,e,n,s,u,a,i,l;return t=Aa,(e=Qa())===o&&(e=null),e!==o&&kf()!==o?("check"===r.substr(Aa,5).toLowerCase()?(n=r.substr(Aa,5),Aa+=5):(n=o,0===Na&&Oa(p)),n!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(s=zi())!==o&&kf()!==o&&xf()!==o&&kf()!==o?(u=Aa,(a=$c())===o&&(a=null),a!==o&&(i=kf())!==o?("enforced"===r.substr(Aa,8).toLowerCase()?(l=r.substr(Aa,8),Aa+=8):(l=o,0===Na&&Oa(br)),l!==o?u=a=[a,i,l]:(Aa=u,u=o)):(Aa=u,u=o),u===o&&(u=null),u!==o?(e=function(r,t,e,n){const s=[];return n&&s.push(n[0],n[2]),{constraint_type:t.toLowerCase(),keyword:r&&r.keyword,constraint:r&&r.constraint,definition:[e],enforced:s.filter((r=>r)).join(" ").toLowerCase(),resource:"constraint"}}(e,n,s,u),t=e):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(e={check:e}),(t=e)===o&&(t=Aa,(e=ei())!==o&&kf()!==o?((n=wf())===o&&(n=null),n!==o&&kf()!==o&&(s=El())!==o?t=e=function(r,t,e){return{character_set:{type:r,value:e,symbol:t}}}(e,n,s):(Aa=t,t=o)):(Aa=t,t=o)))))))))))),t}function ja(){var t,e,n,s,u,a,i,l,c;return t=Aa,(e=vl())!==o&&kf()!==o&&(n=rb())!==o&&kf()!==o?((s=function(){var t,e,n,s,u,a,i,l,c;if(t=Aa,e=Aa,(n=function(){var t,e,n,s;return t=Aa,"generated"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(W)),e!==o&&(n=kf())!==o?("always"===r.substr(Aa,6).toLowerCase()?(s=r.substr(Aa,6),Aa+=6):(s=o,0===Na&&Oa(X)),s!==o?t=e=[e,n,s]:(Aa=t,t=o)):(Aa=t,t=o),t!==o&&(t=t.join("").toLowerCase()),t}())===o&&(n=null),n!==o&&(s=kf())!==o?("as"===r.substr(Aa,2).toLowerCase()?(u=r.substr(Aa,2),Aa+=2):(u=o,0===Na&&Oa(V)),u!==o?e=n=[n,s,u]:(Aa=e,e=o)):(Aa=e,e=o),e!==o)if((n=kf())!==o)if((s=Of())!==o)if((u=kf())!==o)if((a=Pl())===o&&(a=zi()),a!==o)if(kf()!==o)if(xf()!==o)if(kf()!==o){for(i=[],"stored"===r.substr(Aa,6).toLowerCase()?(l=r.substr(Aa,6),Aa+=6):(l=o,0===Na&&Oa(q)),l===o&&("virtual"===r.substr(Aa,7).toLowerCase()?(l=r.substr(Aa,7),Aa+=7):(l=o,0===Na&&Oa(K)));l!==o;)i.push(l),"stored"===r.substr(Aa,6).toLowerCase()?(l=r.substr(Aa,6),Aa+=6):(l=o,0===Na&&Oa(q)),l===o&&("virtual"===r.substr(Aa,7).toLowerCase()?(l=r.substr(Aa,7),Aa+=7):(l=o,0===Na&&Oa(K)));i!==o?(c=i,e={type:"generated",expr:a,value:e.filter((r=>"string"==typeof r)).join(" ").toLowerCase(),storage_type:c&&c[0]&&c[0].toLowerCase()},t=e):(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;return t}())===o&&(s=null),s!==o&&kf()!==o?((u=function(){var r,t,e,n,s,u;if(r=Aa,(t=Ga())!==o)if(kf()!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=Ga())!==o?n=s=[s,u]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=Ga())!==o?n=s=[s,u]:(Aa=n,n=o);e!==o?r=t=function(r,t){let e=r;for(let r=0;r<t.length;r++)e={...e,...t[r][1]};return e}(t,e):(Aa=r,r=o)}else Aa=r,r=o;else Aa=r,r=o;return r}())===o&&(u=null),u!==o?(a=e,i=n,l=s,c=u,pb.add(`create::${a.table}::${a.column}`),t=e={column:a,definition:i,generated:l,resource:"column",...c||{}}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}function Ha(){var t,e,n,s,u;return t=Aa,"definer"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(A)),e!==o&&kf()!==o&&wf()!==o&&kf()!==o&&(n=Gl())!==o&&kf()!==o?(64===r.charCodeAt(Aa)?(s="@",Aa++):(s=o,0===Na&&Oa(_)),s!==o&&kf()!==o&&(u=Gl())!==o?t=e=function(r,t){const e="single_quote_string"===r.type?"'":'"',n="single_quote_string"===t.type?"'":'"';return`DEFINER = ${e}${r.value}${e}@${n}${t.value}${n}`}(n,u):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,"definer"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(A)),e!==o&&kf()!==o&&wf()!==o&&kf()!==o&&(n=vf())!==o&&kf()!==o&&(s=Of())!==o&&kf()!==o&&(u=xf())!==o?t=e="DEFINER = CURRENT_USER()":(Aa=t,t=o),t===o&&(t=Aa,"definer"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(A)),e!==o&&kf()!==o&&wf()!==o&&kf()!==o&&(n=vf())!==o?t=e="DEFINER = CURRENT_USER":(Aa=t,t=o))),t}function Ya(){var t,e,n;return t=Aa,function(){var t,e,n,s;return t=Aa,"collate"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Tr)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="COLLATE":(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o?((e=wf())===o&&(e=null),e!==o&&kf()!==o&&(n=El())!==o?t={type:"collate",symbol:e,value:n}:(Aa=t,t=o)):(Aa=t,t=o),t}function Ba(){var t,e,n;return t=Aa,"if"===r.substr(Aa,2).toLowerCase()?(e=r.substr(Aa,2),Aa+=2):(e=o,0===Na&&Oa(Z)),e!==o&&kf()!==o?("exists"===r.substr(Aa,6).toLowerCase()?(n=r.substr(Aa,6),Aa+=6):(n=o,0===Na&&Oa(z)),n!==o?t=e="if exists":(Aa=t,t=o)):(Aa=t,t=o),t}function Wa(){var t,e,n;return(t=function(){var r,t,e,n,s,u,a,i;return r=Aa,(t=hf())!==o&&kf()!==o?((e=yf())===o&&(e=null),e!==o&&kf()!==o?((n=Pa())===o&&(n=null),n!==o&&kf()!==o&&(s=ja())!==o?(u=e,a=n,i=s,r=t={action:"add",...i,keyword:u,if_not_exists:a,resource:"column",type:"alter"}):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Aa,(t=hf())!==o&&kf()!==o&&(e=ja())!==o?(t=function(r){return{action:"add",...r,resource:"column",type:"alter"}}(e),r=t):(Aa=r,r=o)),r}())===o&&(t=function(){var t,e,n,s,u,a;return t=Aa,(e=rc())!==o&&kf()!==o?("primary"===r.substr(Aa,7).toLowerCase()?(n=r.substr(Aa,7),Aa+=7):(n=o,0===Na&&Oa(S)),n!==o&&(s=kf())!==o&&(u=Af())!==o?t=e={action:"drop",key:"",keyword:"primary key",resource:"key",type:"alter"}:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=rc())!==o&&kf()!==o?(n=Aa,"foreign"===r.substr(Aa,7).toLowerCase()?(s=r.substr(Aa,7),Aa+=7):(s=o,0===Na&&Oa(Q)),s===o&&(s=null),s!==o&&(u=kf())!==o&&(a=Af())!==o?n=s=[s,u,a]:(Aa=n,n=o),n===o&&(n=Ef()),n!==o&&(s=kf())!==o&&(u=Ll())!==o?(e=function(r,t){const e=Array.isArray(r)?"key":"index";return{action:"drop",[e]:t,keyword:Array.isArray(r)?""+[r[0],r[2]].filter((r=>r)).join(" ").toLowerCase():r.toLowerCase(),resource:e,type:"alter"}}(n,u),t=e):(Aa=t,t=o)):(Aa=t,t=o)),t}())===o&&(t=function(){var r,t,e,n;return r=Aa,(t=rc())!==o&&kf()!==o&&(e=yf())!==o&&kf()!==o&&(n=vl())!==o?r=t={action:"drop",column:n,keyword:e,resource:"column",type:"alter"}:(Aa=r,r=o),r===o&&(r=Aa,(t=rc())!==o&&kf()!==o&&(e=vl())!==o?(t=function(r){return{action:"drop",column:r,resource:"column",type:"alter"}}(e),r=t):(Aa=r,r=o)),r}())===o&&(t=function(){var t,e,n;return t=Aa,function(){var t,e,n,s;return t=Aa,"modify"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(ju)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="MODIFY":(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&(e=ja())!==o?(n=e,t={action:"modify",...n,resource:"column",type:"alter"}):(Aa=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=Aa,hf()!==o&&kf()!==o&&(t=Za())!==o?(e=t,r={action:"add",type:"alter",...e}):(Aa=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=Aa,hf()!==o&&kf()!==o&&(t=za())!==o?(e=t,r={action:"add",type:"alter",...e}):(Aa=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u;return r=Aa,lc()!==o&&kf()!==o&&yf()!==o&&kf()!==o&&(t=vl())!==o&&kf()!==o?((e=Ql())===o&&(e=Lc()),e===o&&(e=null),e!==o&&kf()!==o&&(n=vl())!==o?(u=n,r={action:"rename",type:"alter",resource:"column",keyword:"column",old_column:t,prefix:(s=e)&&s[0].toLowerCase(),column:u}):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=Aa,lc()!==o&&kf()!==o?((t=Ql())===o&&(t=Lc()),t===o&&(t=null),t!==o&&kf()!==o&&(e=Ll())!==o?(s=e,r={action:"rename",type:"alter",resource:"table",keyword:(n=t)&&n[0].toLowerCase(),table:s}):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(t=Xa())===o&&(t=Va())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v;return t=Aa,"change"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(ur)),e!==o&&kf()!==o?((n=yf())===o&&(n=null),n!==o&&kf()!==o&&(s=vl())!==o&&kf()!==o&&(u=ja())!==o&&kf()!==o?(a=Aa,"first"===r.substr(Aa,5).toLowerCase()?(i=r.substr(Aa,5),Aa+=5):(i=o,0===Na&&Oa(ar)),i===o&&("after"===r.substr(Aa,5).toLowerCase()?(i=r.substr(Aa,5),Aa+=5):(i=o,0===Na&&Oa(O))),i!==o&&(l=kf())!==o&&(c=vl())!==o?a=i=[i,l,c]:(Aa=a,a=o),a===o&&(a=null),a!==o?(f=n,b=u,v=a,t=e={action:"change",old_column:s,...b,keyword:f,resource:"column",type:"alter",first_after:v&&{keyword:v[0],column:v[2]}}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=Aa,(e=si())!==o&&((n=e).resource=n.keyword,n[n.keyword]=n.value,delete n.value,e={type:"alter",...n}),t=e),t}function Xa(){var t,e,n,s;return t=Aa,"algorithm"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(C)),e!==o&&kf()!==o?((n=wf())===o&&(n=null),n!==o&&kf()!==o?("default"===r.substr(Aa,7).toLowerCase()?(s=r.substr(Aa,7),Aa+=7):(s=o,0===Na&&Oa(j)),s===o&&("instant"===r.substr(Aa,7).toLowerCase()?(s=r.substr(Aa,7),Aa+=7):(s=o,0===Na&&Oa(J)),s===o&&("inplace"===r.substr(Aa,7).toLowerCase()?(s=r.substr(Aa,7),Aa+=7):(s=o,0===Na&&Oa(rr)),s===o&&("copy"===r.substr(Aa,4).toLowerCase()?(s=r.substr(Aa,4),Aa+=4):(s=o,0===Na&&Oa(tr))))),s!==o?t=e={type:"alter",keyword:"algorithm",resource:"algorithm",symbol:n,algorithm:s}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}function Va(){var t,e,n,s;return t=Aa,"lock"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(er)),e!==o&&kf()!==o?((n=wf())===o&&(n=null),n!==o&&kf()!==o?("default"===r.substr(Aa,7).toLowerCase()?(s=r.substr(Aa,7),Aa+=7):(s=o,0===Na&&Oa(j)),s===o&&("none"===r.substr(Aa,4).toLowerCase()?(s=r.substr(Aa,4),Aa+=4):(s=o,0===Na&&Oa(nr)),s===o&&("shared"===r.substr(Aa,6).toLowerCase()?(s=r.substr(Aa,6),Aa+=6):(s=o,0===Na&&Oa(sr)),s===o&&("exclusive"===r.substr(Aa,9).toLowerCase()?(s=r.substr(Aa,9),Aa+=9):(s=o,0===Na&&Oa(or))))),s!==o?t=e={type:"alter",keyword:"lock",resource:"lock",symbol:n,lock:s}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}function qa(){var t,e,n,s,u,a,i;if(t=Aa,(e=wl())!==o)if(kf()!==o)if((n=Of())!==o)if(kf()!==o){if(s=[],ir.test(r.charAt(Aa))?(u=r.charAt(Aa),Aa++):(u=o,0===Na&&Oa(lr)),u!==o)for(;u!==o;)s.push(u),ir.test(r.charAt(Aa))?(u=r.charAt(Aa),Aa++):(u=o,0===Na&&Oa(lr));else s=o;s!==o&&(u=kf())!==o&&xf()!==o&&kf()!==o?((a=Sc())===o&&(a=_c()),a===o&&(a=null),a!==o?(i=a,t=e={type:"column_ref",column:e,suffix:`(${parseInt(s.join(""),10)})`,order_by:i}):(Aa=t,t=o)):(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;return t===o&&(t=Aa,(e=wl())!==o&&kf()!==o?((n=Sc())===o&&(n=_c()),n===o&&(n=null),n!==o?t=e=function(r,t){return{type:"column_ref",column:r,order_by:t}}(e,n):(Aa=t,t=o)):(Aa=t,t=o)),t}function Ka(){var r,t;return r=Aa,Of()!==o&&kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=qa())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=qa())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=qa())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o&&kf()!==o&&xf()!==o?r=t:(Aa=r,r=o),r}function Za(){var r,t,e,n,s,u,a,i;return r=Aa,(t=Ef())===o&&(t=Af()),t!==o&&kf()!==o?((e=hl())===o&&(e=null),e!==o&&kf()!==o?((n=Ti())===o&&(n=null),n!==o&&kf()!==o&&(s=Ka())!==o&&kf()!==o?((u=Ii())===o&&(u=null),u!==o&&kf()!==o?(a=n,i=u,r=t={index:e,definition:s,keyword:t.toLowerCase(),index_type:a,resource:"index",index_options:i}):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}function za(){var r,t,e,n,s,u,a,i,l;return r=Aa,(t=mf())===o&&(t=Tf()),t!==o&&kf()!==o?((e=Ef())===o&&(e=Af()),e===o&&(e=null),e!==o&&kf()!==o?((n=hl())===o&&(n=null),n!==o&&kf()!==o&&(s=pi())!==o&&kf()!==o?((u=Ii())===o&&(u=null),u!==o&&kf()!==o?(a=t,l=u,r=t={index:n,definition:s,keyword:(i=e)&&`${a.toLowerCase()} ${i.toLowerCase()}`||a.toLowerCase(),index_options:l,resource:"index"}):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}function Qa(){var t,e,n,s;return t=Aa,(e=function(){var t,e,n,s;return t=Aa,"constraint"===r.substr(Aa,10).toLowerCase()?(e=r.substr(Aa,10),Aa+=10):(e=o,0===Na&&Oa(Wu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="CONSTRAINT":(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&kf()!==o?((n=Ll())===o&&(n=null),n!==o?(s=n,t=e={keyword:e.toLowerCase(),constraint:s}):(Aa=t,t=o)):(Aa=t,t=o),t}function Ja(){var t,e,n,s,u,a,i,l,c,f;return t=Aa,(e=Rf())!==o&&kf()!==o&&(n=Ri())!==o&&kf()!==o&&(s=pi())!==o&&kf()!==o?("match full"===r.substr(Aa,10).toLowerCase()?(u=r.substr(Aa,10),Aa+=10):(u=o,0===Na&&Oa(vr)),u===o&&("match partial"===r.substr(Aa,13).toLowerCase()?(u=r.substr(Aa,13),Aa+=13):(u=o,0===Na&&Oa(pr)),u===o&&("match simple"===r.substr(Aa,12).toLowerCase()?(u=r.substr(Aa,12),Aa+=12):(u=o,0===Na&&Oa(Lr)))),u===o&&(u=null),u!==o&&kf()!==o?((a=ri())===o&&(a=null),a!==o&&kf()!==o?((i=ri())===o&&(i=null),i!==o?(l=u,c=a,f=i,t=e={definition:s,table:n,keyword:e.toLowerCase(),match:l&&l.toLowerCase(),on_action:[c,f].filter((r=>r))}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=ri())!==o&&(e={on_action:[e]}),t=e),t}function ri(){var t,e,n,s;return t=Aa,Ec()!==o&&kf()!==o?((e=uc())===o&&(e=nc()),e!==o&&kf()!==o&&(n=function(){var t,e,n;return t=Aa,(e=bf())!==o&&kf()!==o&&Of()!==o&&kf()!==o?((n=Vi())===o&&(n=null),n!==o&&kf()!==o&&xf()!==o?t=e={type:"function",name:e,args:n}:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=ti())===o&&("set null"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(wr)),e===o&&("no action"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(hr)),e===o&&("set default"===r.substr(Aa,11).toLowerCase()?(e=r.substr(Aa,11),Aa+=11):(e=o,0===Na&&Oa(yr)),e===o&&(e=bf())))),e!==o&&(e={type:"origin",value:e.toLowerCase()}),t=e),t}())!==o?(s=n,t={type:"on "+e[0].toLowerCase(),value:s}):(Aa=t,t=o)):(Aa=t,t=o),t}function ti(){var t;return"restrict"===r.substr(Aa,8).toLowerCase()?(t=r.substr(Aa,8),Aa+=8):(t=o,0===Na&&Oa(Cr)),t===o&&("cascade"===r.substr(Aa,7).toLowerCase()?(t=r.substr(Aa,7),Aa+=7):(t=o,0===Na&&Oa(dr))),t!==o&&(t=t.toLowerCase()),t}function ei(){var t,e,n;return t=Aa,"character"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(Er)),e!==o&&kf()!==o?("set"===r.substr(Aa,3).toLowerCase()?(n=r.substr(Aa,3),Aa+=3):(n=o,0===Na&&Oa(Ar)),n!==o?t=e="CHARACTER SET":(Aa=t,t=o)):(Aa=t,t=o),t}function ni(){var t,e,n,s,u,a,i,l,c;return t=Aa,(e=zl())===o&&(e=null),e!==o&&kf()!==o?((n=ei())===o&&("charset"===r.substr(Aa,7).toLowerCase()?(n=r.substr(Aa,7),Aa+=7):(n=o,0===Na&&Oa(mr)),n===o&&("collate"===r.substr(Aa,7).toLowerCase()?(n=r.substr(Aa,7),Aa+=7):(n=o,0===Na&&Oa(Tr)))),n!==o&&kf()!==o?((s=wf())===o&&(s=null),s!==o&&kf()!==o&&(u=El())!==o?(i=n,l=s,c=u,t=e={keyword:(a=e)&&`${a[0].toLowerCase()} ${i.toLowerCase()}`||i.toLowerCase(),symbol:l,value:c}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}function si(){var t,e,n,s,u,a,i,l,c;return t=Aa,"auto_increment"===r.substr(Aa,14).toLowerCase()?(e=r.substr(Aa,14),Aa+=14):(e=o,0===Na&&Oa(I)),e===o&&("avg_row_length"===r.substr(Aa,14).toLowerCase()?(e=r.substr(Aa,14),Aa+=14):(e=o,0===Na&&Oa(Ir)),e===o&&("key_block_size"===r.substr(Aa,14).toLowerCase()?(e=r.substr(Aa,14),Aa+=14):(e=o,0===Na&&Oa(Nr)),e===o&&("max_rows"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Rr)),e===o&&("min_rows"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Sr)),e===o&&("stats_sample_pages"===r.substr(Aa,18).toLowerCase()?(e=r.substr(Aa,18),Aa+=18):(e=o,0===Na&&Oa(_r))))))),e!==o&&kf()!==o?((n=wf())===o&&(n=null),n!==o&&kf()!==o&&(s=Bl())!==o?(l=n,c=s,t=e={keyword:e.toLowerCase(),symbol:l,value:c.value}):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=ni())===o&&(t=Aa,"CHECKSUM"===r.substr(Aa,8)?(e="CHECKSUM",Aa+=8):(e=o,0===Na&&Oa(gr)),e===o&&("DELAY_KEY_WRITE"===r.substr(Aa,15)?(e="DELAY_KEY_WRITE",Aa+=15):(e=o,0===Na&&Oa(Or))),e!==o&&kf()!==o&&(n=wf())!==o&&kf()!==o?(xr.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(Ur)),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e}}(e,n,s):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Nf())===o&&("connection"===r.substr(Aa,10).toLowerCase()?(e=r.substr(Aa,10),Aa+=10):(e=o,0===Na&&Oa(Mr))),e!==o&&kf()!==o?((n=wf())===o&&(n=null),n!==o&&kf()!==o&&(s=Gl())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:`'${e.value}'`}}(e,n,s):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,"compression"===r.substr(Aa,11).toLowerCase()?(e=r.substr(Aa,11),Aa+=11):(e=o,0===Na&&Oa(kr)),e!==o&&kf()!==o?((n=wf())===o&&(n=null),n!==o&&kf()!==o?(s=Aa,39===r.charCodeAt(Aa)?(u="'",Aa++):(u=o,0===Na&&Oa(Dr)),u!==o?("zlib"===r.substr(Aa,4).toLowerCase()?(a=r.substr(Aa,4),Aa+=4):(a=o,0===Na&&Oa($r)),a===o&&("lz4"===r.substr(Aa,3).toLowerCase()?(a=r.substr(Aa,3),Aa+=3):(a=o,0===Na&&Oa(Pr)),a===o&&("none"===r.substr(Aa,4).toLowerCase()?(a=r.substr(Aa,4),Aa+=4):(a=o,0===Na&&Oa(nr)))),a!==o?(39===r.charCodeAt(Aa)?(i="'",Aa++):(i=o,0===Na&&Oa(Dr)),i!==o?s=u=[u,a,i]:(Aa=s,s=o)):(Aa=s,s=o)):(Aa=s,s=o),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.join("").toUpperCase()}}(e,n,s):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,"engine"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Fr)),e!==o&&kf()!==o?((n=wf())===o&&(n=null),n!==o&&kf()!==o&&(s=El())!==o?t=e=Gr(e,n,s):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,"row_format"===r.substr(Aa,10).toLowerCase()?(e=r.substr(Aa,10),Aa+=10):(e=o,0===Na&&Oa(jr)),e!==o&&kf()!==o?((n=wf())===o&&(n=null),n!==o&&kf()!==o?((s=zl())===o&&("dynamic"===r.substr(Aa,7).toLowerCase()?(s=r.substr(Aa,7),Aa+=7):(s=o,0===Na&&Oa(G)),s===o&&("fixed"===r.substr(Aa,5).toLowerCase()?(s=r.substr(Aa,5),Aa+=5):(s=o,0===Na&&Oa(F)),s===o&&("compressed"===r.substr(Aa,10).toLowerCase()?(s=r.substr(Aa,10),Aa+=10):(s=o,0===Na&&Oa(Hr)),s===o&&("redundant"===r.substr(Aa,9).toLowerCase()?(s=r.substr(Aa,9),Aa+=9):(s=o,0===Na&&Oa(Yr)),s===o&&("compact"===r.substr(Aa,7).toLowerCase()?(s=r.substr(Aa,7),Aa+=7):(s=o,0===Na&&Oa(Br))))))),s!==o?t=e=Gr(e,n,s):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)))))),t}function oi(){var t,e,n,s,u;return t=Aa,(e=_i())!==o&&kf()!==o&&(n=function(){var t,e,n;return t=Aa,"read"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(it)),e!==o&&kf()!==o?("local"===r.substr(Aa,5).toLowerCase()?(n=r.substr(Aa,5),Aa+=5):(n=o,0===Na&&Oa(v)),n===o&&(n=null),n!==o?t=e={type:"read",suffix:n&&"local"}:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,"low_priority"===r.substr(Aa,12).toLowerCase()?(e=r.substr(Aa,12),Aa+=12):(e=o,0===Na&&Oa(lt)),e===o&&(e=null),e!==o&&kf()!==o?("write"===r.substr(Aa,5).toLowerCase()?(n=r.substr(Aa,5),Aa+=5):(n=o,0===Na&&Oa(ct)),n!==o?t=e={type:"write",prefix:e&&"low_priority"}:(Aa=t,t=o)):(Aa=t,t=o)),t}())!==o?(s=e,u=n,vb.add(`lock::${s.db}::${s.table}`),t=e={table:s,lock_type:u}):(Aa=t,t=o),t}function ui(){var t;return(t=function(){var t,e,n,s;return(t=gc())===o&&(t=tc())===o&&(t=Aa,(e=sc())!==o&&(n=kf())!==o?("view"===r.substr(Aa,4).toLowerCase()?(s=r.substr(Aa,4),Aa+=4):(s=o,0===Na&&Oa(ft)),s!==o?t=e=[e,n,s]:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=sc())===o&&(t=uc())===o&&(t=rc())===o&&(t=Aa,"grant"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(bt)),e!==o&&(n=kf())!==o?("option"===r.substr(Aa,6).toLowerCase()?(s=r.substr(Aa,6),Aa+=6):(s=o,0===Na&&Oa(vt)),s!==o?t=e=[e,n,s]:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Ef())===o&&(t=ac())===o&&(t=Rf())===o&&(t=ec())===o&&(t=Aa,(e=Jl())!==o&&(n=kf())!==o&&(s=pf())!==o?t=e=[e,n,s]:(Aa=t,t=o),t===o&&(t=dc())===o&&(t=nc())))),t!==o&&(t=pt(t)),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,(e=tc())!==o&&(n=kf())!==o?("routine"===r.substr(Aa,7).toLowerCase()?(s=r.substr(Aa,7),Aa+=7):(s=o,0===Na&&Oa(Lt)),s!==o?t=e=[e,n,s]:(Aa=t,t=o)):(Aa=t,t=o),t===o&&("execute"===r.substr(Aa,7).toLowerCase()?(t=r.substr(Aa,7),Aa+=7):(t=o,0===Na&&Oa(Ct)),t===o&&(t=Aa,"grant"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(bt)),e!==o&&(n=kf())!==o?("option"===r.substr(Aa,6).toLowerCase()?(s=r.substr(Aa,6),Aa+=6):(s=o,0===Na&&Oa(vt)),s!==o?t=e=[e,n,s]:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=sc())!==o&&(n=kf())!==o?("routine"===r.substr(Aa,7).toLowerCase()?(s=r.substr(Aa,7),Aa+=7):(s=o,0===Na&&Oa(Lt)),s!==o?t=e=[e,n,s]:(Aa=t,t=o)):(Aa=t,t=o)))),t!==o&&(t=pt(t)),t}()),t}function ai(){var r,t,e,n,s,u,a,i,l;return r=Aa,(t=ui())!==o&&kf()!==o?(e=Aa,(n=Of())!==o&&(s=kf())!==o&&(u=Mi())!==o&&(a=kf())!==o&&(i=xf())!==o?e=n=[n,s,u,a,i]:(Aa=e,e=o),e===o&&(e=null),e!==o?r=t={priv:t,columns:(l=e)&&l[2]}:(Aa=r,r=o)):(Aa=r,r=o),r}function ii(){var t,e,n,s,u,a,i;return t=Aa,(e=Ll())!==o&&kf()!==o?(n=Aa,64===r.charCodeAt(Aa)?(s="@",Aa++):(s=o,0===Na&&Oa(_)),s!==o&&(u=kf())!==o&&(a=Ll())!==o?n=s=[s,u,a]:(Aa=n,n=o),n===o&&(n=null),n!==o?t=e={name:{type:"single_quote_string",value:e},host:(i=n)?{type:"single_quote_string",value:i[2]}:null}:(Aa=t,t=o)):(Aa=t,t=o),t}function li(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=ii())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=ii())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=ii())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=dt(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function ci(){var t,e,n;return t=Aa,Nc()!==o&&kf()!==o?("admin"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(wt)),e!==o&&kf()!==o?("option"===r.substr(Aa,6).toLowerCase()?(n=r.substr(Aa,6),Aa+=6):(n=o,0===Na&&Oa(vt)),n!==o?t={type:"origin",value:"with admin option"}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}function fi(){var t,e,n,s,u,a,i;return(t=Li())===o&&(t=Aa,e=Aa,40===r.charCodeAt(Aa)?(n="(",Aa++):(n=o,0===Na&&Oa(Et)),n!==o&&(s=kf())!==o&&(u=fi())!==o&&(a=kf())!==o?(41===r.charCodeAt(Aa)?(i=")",Aa++):(i=o,0===Na&&Oa(At)),i!==o?e=n=[n,s,u,a,i]:(Aa=e,e=o)):(Aa=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}function bi(){var t,e,n,s,u,a,i,l,c;if(t=Aa,Nc()!==o)if(kf()!==o)if((e=vi())!==o){for(n=[],s=Aa,(u=kf())!==o&&(a=_f())!==o&&(i=kf())!==o&&(l=vi())!==o?s=u=[u,a,i,l]:(Aa=s,s=o);s!==o;)n.push(s),s=Aa,(u=kf())!==o&&(a=_f())!==o&&(i=kf())!==o&&(l=vi())!==o?s=u=[u,a,i,l]:(Aa=s,s=o);n!==o?t=T(e,n):(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;return t===o&&(t=Aa,kf()!==o&&Nc()!==o&&(e=kf())!==o&&(n=function(){var t,e,n,s;return t=Aa,"RECURSIVE"===r.substr(Aa,9)?(e="RECURSIVE",Aa+=9):(e=o,0===Na&&Oa(xs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(s=kf())!==o&&(u=vi())!==o?((c=u).recursive=!0,t=[c]):(Aa=t,t=o)),t}function vi(){var r,t,e,n,s,u,a;return r=Aa,(t=Gl())===o&&(t=El())===o&&(t=Oi()),t!==o&&kf()!==o?((e=pi())===o&&(e=null),e!==o&&kf()!==o&&Lc()!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=Da())!==o&&kf()!==o&&xf()!==o?(u=e,a=n,"string"==typeof(s=t)&&(s={type:"default",value:s}),s.table&&(s={type:"default",value:s.table}),r=t={name:s,stmt:a,columns:u}):(Aa=r,r=o)):(Aa=r,r=o),r}function pi(){var r,t;return r=Aa,Of()!==o&&kf()!==o&&(t=function(){var r;return(r=Mi())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Pl())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Pl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Pl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}()),r}())!==o&&kf()!==o&&xf()!==o?r=t:(Aa=r,r=o),r}function Li(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d;return t=Aa,kf()!==o?((e=bi())===o&&(e=null),e!==o&&kf()!==o&&ec()!==o&&Df()!==o?((n=function(){var r,t,e,n,s,u;if(r=Aa,(t=Ci())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=Ci())!==o?n=s=[s,u]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=Ci())!==o?n=s=[s,u]:(Aa=n,n=o);e!==o?(t=function(r,t){const e=[r];for(let r=0,n=t.length;r<n;++r)e.push(t[r][1]);return e}(t,e),r=t):(Aa=r,r=o)}else Aa=r,r=o;return r}())===o&&(n=null),n!==o&&kf()!==o?((s=Oc())===o&&(s=null),s!==o&&kf()!==o&&(u=di())!==o&&kf()!==o?((a=Ei())===o&&(a=null),a!==o&&kf()!==o?((i=Ai())===o&&(i=null),i!==o&&kf()!==o?((l=Ei())===o&&(l=null),l!==o&&kf()!==o?((c=Ui())===o&&(c=null),c!==o&&kf()!==o?((f=function(){var t,e;return t=Aa,function(){var t,e,n,s;return t=Aa,"group"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(oo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&Rc()!==o&&kf()!==o&&(e=Vi())!==o?t=e.value:(Aa=t,t=o),t}())===o&&(f=null),f!==o&&kf()!==o?((b=function(){var t,e;return t=Aa,function(){var t,e,n,s;return t=Aa,"having"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(io)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&(e=Qi())!==o?t=e:(Aa=t,t=o),t}())===o&&(b=null),b!==o&&kf()!==o?((v=ki())===o&&(v=null),v!==o&&kf()!==o?((p=Pi())===o&&(p=null),p!==o&&kf()!==o?((L=function(){var t,e,n,s;return t=Aa,(e=function(){var t,e,n,s,u;return t=Aa,"for"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(x)),e!==o&&(n=kf())!==o&&(s=nc())!==o?t=e=[e,n,s]:(Aa=t,t=o),t!==o&&(t=`${(u=t)[0]} ${u[2][0]}`),t}())===o&&(e=function(){var t,e,n,s,u,a,i,l,c;return t=Aa,"lock"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(er)),e!==o&&(n=kf())!==o?("in"===r.substr(Aa,2).toLowerCase()?(s=r.substr(Aa,2),Aa+=2):(s=o,0===Na&&Oa(mt)),s!==o&&(u=kf())!==o?("share"===r.substr(Aa,5).toLowerCase()?(a=r.substr(Aa,5),Aa+=5):(a=o,0===Na&&Oa(Tt)),a!==o&&(i=kf())!==o?("mode"===r.substr(Aa,4).toLowerCase()?(l=r.substr(Aa,4),Aa+=4):(l=o,0===Na&&Oa(It)),l!==o?t=e=[e,n,s,u,a,i,l]:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t!==o&&(t=`${(c=t)[0]} ${c[2]} ${c[4]} ${c[6]}`),t}()),e!==o&&kf()!==o?((n=function(){var t,e,n,s,u,a,i;return t=Aa,e=Aa,"wait"===r.substr(Aa,4).toLowerCase()?(n=r.substr(Aa,4),Aa+=4):(n=o,0===Na&&Oa(Nt)),n!==o&&(s=kf())!==o&&(u=Bl())!==o?e=n=[n,s,u]:(Aa=e,e=o),e!==o&&(e=`${(a=e)[0]} ${a[2].value}`),(t=e)===o&&("nowait"===r.substr(Aa,6).toLowerCase()?(t=r.substr(Aa,6),Aa+=6):(t=o,0===Na&&Oa(Rt)),t===o&&(t=Aa,e=Aa,"skip"===r.substr(Aa,4).toLowerCase()?(n=r.substr(Aa,4),Aa+=4):(n=o,0===Na&&Oa(St)),n!==o&&(s=kf())!==o?("locked"===r.substr(Aa,6).toLowerCase()?(u=r.substr(Aa,6),Aa+=6):(u=o,0===Na&&Oa(_t)),u!==o?e=n=[n,s,u]:(Aa=e,e=o)):(Aa=e,e=o),e!==o&&(e=`${(i=e)[0]} ${i[2]}`),t=e)),t}())===o&&(n=null),n!==o?t=e+=(s=n)?" "+s:"":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(L=null),L!==o&&kf()!==o?((C=function(){var t,e,n;return t=Aa,"window"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Ge)),e!==o&&kf()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Sl())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Sl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Sl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=ib(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o?t=e={keyword:"window",type:"window",expr:n}:(Aa=t,t=o),t}())===o&&(C=null),C!==o&&kf()!==o?((d=Ei())===o&&(d=null),d!==o?t=function(r,t,e,n,s,o,u,a,i,l,c,f,b,v,p){if(s&&u||s&&p||u&&p||s&&u&&p)throw new Error("A given SQL statement can contain at most one INTO clause");return o&&o.forEach((r=>r.table&&vb.add(`select::${r.db}::${r.table}`))),{with:r,type:"select",options:t,distinct:e,columns:n,into:{...s||u||p||{},position:(s?"column":u&&"from")||p&&"end"},from:o,where:a,groupby:i,having:l,orderby:c,limit:f,locking_read:b&&b,window:v}}(e,n,s,u,a,i,l,c,f,b,v,p,L,C,d):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}function Ci(){var t;return(t=function(){var t;return"sql_calc_found_rows"===r.substr(Aa,19).toLowerCase()?(t=r.substr(Aa,19),Aa+=19):(t=o,0===Na&&Oa(Vu)),t}())===o&&((t=function(){var t;return"sql_cache"===r.substr(Aa,9).toLowerCase()?(t=r.substr(Aa,9),Aa+=9):(t=o,0===Na&&Oa(qu)),t}())===o&&(t=function(){var t;return"sql_no_cache"===r.substr(Aa,12).toLowerCase()?(t=r.substr(Aa,12),Aa+=12):(t=o,0===Na&&Oa(Ku)),t}()),t===o&&(t=function(){var t;return"sql_big_result"===r.substr(Aa,14).toLowerCase()?(t=r.substr(Aa,14),Aa+=14):(t=o,0===Na&&Oa(zu)),t}())===o&&(t=function(){var t;return"sql_small_result"===r.substr(Aa,16).toLowerCase()?(t=r.substr(Aa,16),Aa+=16):(t=o,0===Na&&Oa(Zu)),t}())===o&&(t=function(){var t;return"sql_buffer_result"===r.substr(Aa,17).toLowerCase()?(t=r.substr(Aa,17),Aa+=17):(t=o,0===Na&&Oa(Qu)),t}())),t}function di(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=gc())===o&&(t=Aa,(e=gf())!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=gf())),t!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=hi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=hi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=function(r,t){pb.add("select::null::(.*)");const e={expr:{type:"column_ref",table:null,column:"*"},as:null};return t&&t.length>0?ib(e,t):[e]}(0,e):(Aa=r,r=o)}else Aa=r,r=o;if(r===o)if(r=Aa,(t=hi())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=hi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=hi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function wi(){var t,e,n,s,u,a,i;return t=Aa,"match"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Dt)),e!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=Mi())!==o&&kf()!==o&&xf()!==o&&kf()!==o?("AGAINST"===r.substr(Aa,7)?(s="AGAINST",Aa+=7):(s=o,0===Na&&Oa($t)),s!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(u=zi())!==o&&kf()!==o?((a=function(){var t,e,n,s,u,a,i;return t=Aa,Uc()!==o&&kf()!==o?("natural"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(gt)),e!==o&&kf()!==o?("language"===r.substr(Aa,8).toLowerCase()?(n=r.substr(Aa,8),Aa+=8):(n=o,0===Na&&Oa(Ot)),n!==o&&kf()!==o?("mode"===r.substr(Aa,4).toLowerCase()?(s=r.substr(Aa,4),Aa+=4):(s=o,0===Na&&Oa(It)),s!==o&&kf()!==o?("with"===r.substr(Aa,4).toLowerCase()?(u=r.substr(Aa,4),Aa+=4):(u=o,0===Na&&Oa(xt)),u!==o&&kf()!==o?("query"===r.substr(Aa,5).toLowerCase()?(a=r.substr(Aa,5),Aa+=5):(a=o,0===Na&&Oa(Ut)),a!==o&&kf()!==o?("expansion"===r.substr(Aa,9).toLowerCase()?(i=r.substr(Aa,9),Aa+=9):(i=o,0===Na&&Oa(Mt)),i!==o?t={type:"origin",value:"IN NATURAL LANGUAGE MODE WITH QUERY EXPANSION"}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,Uc()!==o&&kf()!==o?("natural"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(gt)),e!==o&&kf()!==o?("language"===r.substr(Aa,8).toLowerCase()?(n=r.substr(Aa,8),Aa+=8):(n=o,0===Na&&Oa(Ot)),n!==o&&kf()!==o?("mode"===r.substr(Aa,4).toLowerCase()?(s=r.substr(Aa,4),Aa+=4):(s=o,0===Na&&Oa(It)),s!==o?t={type:"origin",value:"IN NATURAL LANGUAGE MODE"}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,Uc()!==o&&kf()!==o?("boolean"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(kt)),e!==o&&kf()!==o?("mode"===r.substr(Aa,4).toLowerCase()?(n=r.substr(Aa,4),Aa+=4):(n=o,0===Na&&Oa(It)),n!==o?t={type:"origin",value:"IN BOOLEAN MODE"}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,Nc()!==o&&kf()!==o?("query"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Ut)),e!==o&&kf()!==o?("expansion"===r.substr(Aa,9).toLowerCase()?(n=r.substr(Aa,9),Aa+=9):(n=o,0===Na&&Oa(Mt)),n!==o?t={type:"origin",value:"WITH QUERY EXPANSION"}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)))),t}())===o&&(a=null),a!==o&&kf()!==o&&xf()!==o&&kf()!==o?((i=yi())===o&&(i=null),i!==o?t=e={against:"against",columns:n,expr:u,match:"match",mode:a,type:"fulltext_search",as:i}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}function hi(){var r,t,e,n,s,u,a,i;return r=Aa,(t=wi())!==o&&(t=function(r){const{as:t,...e}=r;return{expr:e,as:t}}(t)),(r=t)===o&&(r=Aa,(t=Ll())!==o&&(e=kf())!==o&&(n=Sf())!==o&&(s=kf())!==o&&(u=Ll())!==o&&kf()!==o&&Sf()!==o&&kf()!==o&&gf()!==o?(a=t,i=u,pb.add(`select::${a}::${i}::(.*)`),r=t={expr:{type:"column_ref",db:a,table:i,column:"*"},as:null}):(Aa=r,r=o),r===o&&(r=Aa,t=Aa,(e=Ll())!==o&&(n=kf())!==o&&(s=Sf())!==o?t=e=[e,n,s]:(Aa=t,t=o),t===o&&(t=null),t!==o&&(e=kf())!==o&&(n=gf())!==o?r=t=function(r){return pb.add(`select::${r}::(.*)`),{expr:{type:"column_ref",table:r&&r[0]||null,column:"*"},as:null}}(t):(Aa=r,r=o),r===o&&(r=Aa,(t=function(){var r,t,e,n;return r=Aa,(t=Qf())===o&&(t=Jf()),t!==o&&kf()!==o&&(e=df())!==o&&kf()!==o&&(n=Bf())!==o?r=t=ba(t,e,n):(Aa=r,r=o),r}())!==o&&(t={expr:t,as:null}),(r=t)===o&&(r=Aa,(t=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=zi())!==o){for(e=[],n=Aa,(s=kf())!==o?((u=Pc())===o&&(u=Fc())===o&&(u=Mf()),u!==o&&(a=kf())!==o&&(i=zi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o)):(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o?((u=Pc())===o&&(u=Fc())===o&&(u=Mf()),u!==o&&(a=kf())!==o&&(i=zi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o)):(Aa=n,n=o);e!==o?(t=function(r,t){const e=r.ast;if(e&&"select"===e.type&&(!(r.parentheses_symbol||r.parentheses||r.ast.parentheses||r.ast.parentheses_symbol)||1!==e.columns.length||"*"===e.columns[0].expr.column))throw new Error("invalid column clause with select statement");if(!t||0===t.length)return r;const n=t.length;let s=t[n-1][3];for(let e=n-1;e>=0;e--){const n=0===e?r:t[e-1][3];s=ub(t[e][1],n,s)}return s}(t,e),r=t):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o&&(e=kf())!==o?((n=yi())===o&&(n=null),n!==o?r=t={expr:t,as:n}:(Aa=r,r=o)):(Aa=r,r=o))))),r}function yi(){var r,t,e;return r=Aa,(t=Lc())!==o&&kf()!==o&&(e=function(){var r,t;return r=Aa,(t=El())!==o&&(function(r){if(!0===nb[r.toUpperCase()])throw new Error("Error: "+JSON.stringify(r)+" is a reserved word, can not as alias clause");return!1}(t)?o:void 0)!==o?r=t:(Aa=r,r=o),r===o&&(r=Cl()),r}())!==o?r=t=e:(Aa=r,r=o),r===o&&(r=Aa,(t=Lc())===o&&(t=null),t!==o&&kf()!==o&&(e=Ll())!==o?r=t=e:(Aa=r,r=o)),r}function Ei(){var t,e,n;return t=Aa,bc()!==o&&kf()!==o&&(e=function(){var r,t,e,n,s,u,a,l;if(r=Aa,(t=Qf())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(l=Qf())!==o?n=s=[s,u,a,l]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(l=Qf())!==o?n=s=[s,u,a,l]:(Aa=n,n=o);e!==o?r=t=i(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o?t={keyword:"var",type:"into",expr:e}:(Aa=t,t=o),t===o&&(t=Aa,bc()!==o&&kf()!==o?("outfile"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Pt)),e===o&&("dumpfile"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Ft))),e===o&&(e=null),e!==o&&kf()!==o?((n=Gl())===o&&(n=Ll()),n!==o?t={keyword:e,type:"into",expr:n}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)),t}function Ai(){var r,t;return r=Aa,vc()!==o&&kf()!==o&&(t=Ri())!==o?r=t:(Aa=r,r=o),r}function mi(){var r,t,e;return r=Aa,(t=Oi())!==o&&kf()!==o&&Ql()!==o&&kf()!==o&&(e=Oi())!==o?r=t=[t,e]:(Aa=r,r=o),r}function Ti(){var t,e;return t=Aa,Ic()!==o&&kf()!==o?("btree"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Gt)),e===o&&("hash"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(jt))),e!==o?t={keyword:"using",type:e.toLowerCase()}:(Aa=t,t=o)):(Aa=t,t=o),t}function Ii(){var r,t,e,n,s,u;if(r=Aa,(t=Ni())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=Ni())!==o?n=s=[s,u]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=Ni())!==o?n=s=[s,u]:(Aa=n,n=o);e!==o?r=t=function(r,t){const e=[r];for(let r=0;r<t.length;r++)e.push(t[r][1]);return e}(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function Ni(){var t,e,n,s,u,a;return t=Aa,(e=function(){var t,e,n,s;return t=Aa,"key_block_size"===r.substr(Aa,14).toLowerCase()?(e=r.substr(Aa,14),Aa+=14):(e=o,0===Na&&Oa(Nr)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="KEY_BLOCK_SIZE":(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&kf()!==o?((n=wf())===o&&(n=null),n!==o&&kf()!==o&&(s=Bl())!==o?(u=n,a=s,t=e={type:e.toLowerCase(),symbol:u,expr:a}):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Ti())===o&&(t=Aa,"with"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(xt)),e!==o&&kf()!==o?("parser"===r.substr(Aa,6).toLowerCase()?(n=r.substr(Aa,6),Aa+=6):(n=o,0===Na&&Oa(Ht)),n!==o&&kf()!==o&&(s=El())!==o?t=e={type:"with parser",expr:s}:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,"visible"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Yt)),e===o&&("invisible"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(Bt))),e!==o&&(e=function(r){return{type:r.toLowerCase(),expr:r.toLowerCase()}}(e)),(t=e)===o&&(t=Pf()))),t}function Ri(){var r,t,e,n;if(r=Aa,(t=_i())!==o){for(e=[],n=Si();n!==o;)e.push(n),n=Si();e!==o?r=t=Wt(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function Si(){var r,t,e;return r=Aa,kf()!==o&&(t=_f())!==o&&kf()!==o&&(e=_i())!==o?r=e:(Aa=r,r=o),r===o&&(r=Aa,kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(r=Aa,(t=gi())!==o)if(kf()!==o)if((e=_i())!==o)if(kf()!==o)if((n=Ic())!==o)if(kf()!==o)if(Of()!==o)if(kf()!==o)if((s=El())!==o){for(u=[],a=Aa,(i=kf())!==o&&(l=_f())!==o&&(c=kf())!==o&&(f=El())!==o?a=i=[i,l,c,f]:(Aa=a,a=o);a!==o;)u.push(a),a=Aa,(i=kf())!==o&&(l=_f())!==o&&(c=kf())!==o&&(f=El())!==o?a=i=[i,l,c,f]:(Aa=a,a=o);u!==o&&(a=kf())!==o&&(i=xf())!==o?(b=t,p=s,L=u,(v=e).join=b,v.using=ib(p,L),r=t=v):(Aa=r,r=o)}else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;return r===o&&(r=Aa,(t=gi())!==o&&kf()!==o&&(e=_i())!==o&&kf()!==o?((n=xi())===o&&(n=null),n!==o?(t=function(r,t,e){return t.join=r,t.on=e,t}(t,e,n),r=t):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Aa,(t=gi())!==o&&kf()!==o&&(e=Of())!==o&&kf()!==o&&(n=Da())!==o&&kf()!==o&&xf()!==o&&kf()!==o?((s=yi())===o&&(s=null),s!==o&&(u=kf())!==o?((a=xi())===o&&(a=null),a!==o?(t=function(r,t,e,n){return t.parentheses=!0,{expr:t,as:e,join:r,on:n}}(t,n,s,a),r=t):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o))),r}())!==o?r=t:(Aa=r,r=o)),r}function _i(){var t,e,n,s,u,a;return t=Aa,(e=function(){var t;return"dual"===r.substr(Aa,4).toLowerCase()?(t=r.substr(Aa,4),Aa+=4):(t=o,0===Na&&Oa($u)),t}())!==o&&(e={type:"dual"}),(t=e)===o&&(t=Aa,(e=Oi())!==o&&kf()!==o?((n=yi())===o&&(n=null),n!==o?(a=n,t=e="var"===(u=e).type?(u.as=a,u):{db:u.db,table:u.table,as:a}):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Of())!==o&&kf()!==o&&(n=Oi())!==o&&kf()!==o&&xf()!==o&&kf()!==o?((s=yi())===o&&(s=null),s!==o?t=e=function(r,t,e){return"var"===r.type?(r.as=e,r.parentheses=!0,r):{db:r.db,table:r.table,as:e,parentheses:!0}}(n,0,s):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Wi())!==o&&kf()!==o?((n=yi())===o&&(n=null),n!==o?t=e=function(r,t){return{expr:{type:"values",values:r,prefix:"row"},as:t}}(e,n):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Of())!==o&&kf()!==o?((n=Da())===o&&(n=Wi()),n!==o&&kf()!==o&&xf()!==o&&kf()!==o?((s=yi())===o&&(s=null),s!==o?t=e=function(r,t){return Array.isArray(r)&&(r={type:"values",values:r,prefix:"row"}),r.parentheses=!0,{expr:r,as:t}}(n,s):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o))))),t}function gi(){var t,e,n,s;return t=Aa,(e=function(){var t,e,n,s;return t=Aa,"left"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Xs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(n=kf())!==o?((s=mc())===o&&(s=null),s!==o&&kf()!==o&&Ac()!==o?t=e="LEFT JOIN":(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=function(){var t,e,n,s;return t=Aa,"right"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Vs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(n=kf())!==o?((s=mc())===o&&(s=null),s!==o&&kf()!==o&&Ac()!==o?t=e="RIGHT JOIN":(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=function(){var t,e,n,s;return t=Aa,"full"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(qs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(n=kf())!==o?((s=mc())===o&&(s=null),s!==o&&kf()!==o&&Ac()!==o?t=e="FULL JOIN":(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=function(){var t,e,n,s;return t=Aa,"cross"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Zs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(n=kf())!==o&&(s=Ac())!==o?t=e="CROSS JOIN":(Aa=t,t=o),t===o&&(t=Aa,e=Aa,(n=function(){var t,e,n,s;return t=Aa,"inner"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Ks)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(s=kf())!==o?e=n=[n,s]:(Aa=e,e=o),e===o&&(e=null),e!==o&&(n=Ac())!==o?t=e="INNER JOIN":(Aa=t,t=o))))),t}function Oi(){var t,e,n,s,u,a,i,l,c;for(t=Aa,e=[],Xt.test(r.charAt(Aa))?(n=r.charAt(Aa),Aa++):(n=o,0===Na&&Oa(Vt));n!==o;)e.push(n),Xt.test(r.charAt(Aa))?(n=r.charAt(Aa),Aa++):(n=o,0===Na&&Oa(Vt));return e!==o&&(n=Ll())!==o?(s=Aa,(u=kf())!==o&&(a=Sf())!==o&&(i=kf())!==o&&(l=Ll())!==o?s=u=[u,a,i,l]:(Aa=s,s=o),s===o&&(s=null),s!==o?t=e=function(r,t,e){const n=r?`${r.join("")}${t}`:t,s={db:null,table:n};return null!==e&&(s.db=n,s.table=e[3]),s}(e,n,s):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Qf())!==o&&((c=e).db=null,c.table=c.name,e=c),t=e),t}function xi(){var r,t;return r=Aa,Ec()!==o&&kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=zi())!==o){for(e=[],n=Aa,(s=kf())!==o?((u=Pc())===o&&(u=Fc()),u!==o&&(a=kf())!==o&&(i=zi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o)):(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o?((u=Pc())===o&&(u=Fc()),u!==o&&(a=kf())!==o&&(i=zi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o)):(Aa=n,n=o);e!==o?(t=function(r,t){const e=t.length;let n=r;for(let r=0;r<e;++r)n=ub(t[r][1],n,t[r][3]);return n}(t,e),r=t):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o?r=t:(Aa=r,r=o),r}function Ui(){var t,e;return t=Aa,function(){var t,e,n,s;return t=Aa,"where"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(so)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&(e=Qi())!==o?t=e:(Aa=t,t=o),t}function Mi(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=vl())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=vl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=vl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function ki(){var t,e;return t=Aa,function(){var t,e,n,s;return t=Aa,"order"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(ao)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&Rc()!==o&&kf()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Di())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Di())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Di())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o?t=e:(Aa=t,t=o),t}function Di(){var r,t,e;return r=Aa,(t=zi())!==o&&kf()!==o?((e=_c())===o&&(e=Sc()),e===o&&(e=null),e!==o?r=t={expr:t,type:e}:(Aa=r,r=o)):(Aa=r,r=o),r}function $i(){var t,e;return(t=Bl())===o&&(t=Il())===o&&(t=Aa,63===r.charCodeAt(Aa)?(e="?",Aa++):(e=o,0===Na&&Oa(qt)),e!==o&&(e={type:"origin",value:"?"}),t=e),t}function Pi(){var t,e,n,s,u,a;return t=Aa,function(){var t,e,n,s;return t=Aa,"limit"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(lo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&(e=$i())!==o&&kf()!==o?(n=Aa,(s=_f())===o&&(s=function(){var t,e,n,s;return t=Aa,"offset"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(co)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="OFFSET":(Aa=t,t=o)):(Aa=t,t=o),t}()),s!==o&&(u=kf())!==o&&(a=$i())!==o?n=s=[s,u,a]:(Aa=n,n=o),n===o&&(n=null),n!==o?t=function(r,t){const e=[r];return t&&e.push(t[2]),{seperator:t&&t[0]&&t[0].toLowerCase()||"",value:e}}(e,n):(Aa=t,t=o)):(Aa=t,t=o),t}function Fi(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Gi())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Gi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Gi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function Gi(){var t,e,n,s,u,a,i,l,c;return t=Aa,e=Aa,(n=Ll())!==o&&(s=kf())!==o&&(u=Sf())!==o?e=n=[n,s,u]:(Aa=e,e=o),e===o&&(e=null),e!==o&&(n=kf())!==o&&(s=wl())!==o&&(u=kf())!==o?(61===r.charCodeAt(Aa)?(a="=",Aa++):(a=o,0===Na&&Oa(Kt)),a!==o&&kf()!==o&&(i=al())!==o?t=e={column:s,value:i,table:(c=e)&&c[0]}:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,e=Aa,(n=Ll())!==o&&(s=kf())!==o&&(u=Sf())!==o?e=n=[n,s,u]:(Aa=e,e=o),e===o&&(e=null),e!==o&&(n=kf())!==o&&(s=wl())!==o&&(u=kf())!==o?(61===r.charCodeAt(Aa)?(a="=",Aa++):(a=o,0===Na&&Oa(Kt)),a!==o&&kf()!==o&&(i=Tc())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(l=vl())!==o&&kf()!==o&&xf()!==o?t=e=function(r,t,e){return{column:t,value:e,table:r&&r[0],keyword:"values"}}(e,s,l):(Aa=t,t=o)):(Aa=t,t=o)),t}function ji(){var r;return(r=Wi())===o&&(r=Li()),r}function Hi(){var r,t,e,n,s,u,a,i,l;if(r=Aa,fc()!==o)if(kf()!==o)if((t=Of())!==o)if(kf()!==o)if((e=El())!==o){for(n=[],s=Aa,(u=kf())!==o&&(a=_f())!==o&&(i=kf())!==o&&(l=El())!==o?s=u=[u,a,i,l]:(Aa=s,s=o);s!==o;)n.push(s),s=Aa,(u=kf())!==o&&(a=_f())!==o&&(i=kf())!==o&&(l=El())!==o?s=u=[u,a,i,l]:(Aa=s,s=o);n!==o&&(s=kf())!==o&&(u=xf())!==o?r=dt(e,n):(Aa=r,r=o)}else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;else Aa=r,r=o;return r===o&&(r=Aa,fc()!==o&&kf()!==o&&(t=Xi())!==o?r=t:(Aa=r,r=o)),r}function Yi(){var t,e,n;return t=Aa,Ec()!==o&&kf()!==o?("duplicate"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(Zt)),e!==o&&kf()!==o&&Af()!==o&&kf()!==o&&nc()!==o&&kf()!==o&&(n=Fi())!==o?t={keyword:"on duplicate key update",set:n}:(Aa=t,t=o)):(Aa=t,t=o),t}function Bi(){var r,t;return r=Aa,(t=ac())!==o&&(t="insert"),(r=t)===o&&(r=Aa,(t=ic())!==o&&(t="replace"),r=t),r}function Wi(){var r,t;return r=Aa,Tc()!==o&&kf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Xi())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Xi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Xi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}())!==o?r=t:(Aa=r,r=o),r}function Xi(){var t,e,n;return t=Aa,"row"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(M)),e===o&&(e=null),e!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=Vi())!==o&&kf()!==o&&xf()!==o?t=e=n:(Aa=t,t=o),t}function Vi(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=zi())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=zi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=zi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=function(r,t){const e={type:"expr_list"};return e.value=ib(r,t),e}(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function qi(){var r,t,e,n,s,u;if(r=Aa,(t=Ki())!==o)if(kf()!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=Ki())!==o?n=s=[s,u]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=Ki())!==o?n=s=[s,u]:(Aa=n,n=o);e!==o?r=t=c(t,e):(Aa=r,r=o)}else Aa=r,r=o;else Aa=r,r=o;return r}function Ki(){var t,e,n;return t=Aa,function(){var t,e,n,s;return t=Aa,"when"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(ko)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&(e=Qi())!==o&&kf()!==o&&function(){var t,e,n,s;return t=Aa,"then"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Do)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&(n=zi())!==o?t={type:"when",cond:e,result:n}:(Aa=t,t=o),t}function Zi(){var t,e;return t=Aa,function(){var t,e,n,s;return t=Aa,"else"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa($o)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}()!==o&&kf()!==o&&(e=zi())!==o?t={type:"else",result:e}:(Aa=t,t=o),t}function zi(){var r;return(r=function(){var r;return(r=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=bl())!==o){if(e=[],n=Aa,(s=kf())!==o&&(u=Mf())!==o&&(a=kf())!==o&&(i=bl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o),n!==o)for(;n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=Mf())!==o&&(a=kf())!==o&&(i=bl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);else e=o;e!==o&&(n=kf())!==o?((s=el())===o&&(s=null),s!==o?(t=function(r,t,e){const n=lb(r,t);return null===e?n:"arithmetic"===e.type?lb(n,e.tail):ub(e.op,n,e.right)}(t,e,s),r=t):(Aa=r,r=o)):(Aa=r,r=o)}else Aa=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Ji())!==o){for(e=[],n=Aa,(s=Df())!==o&&(u=Fc())!==o&&(a=kf())!==o&&(i=Ji())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=Df())!==o&&(u=Fc())!==o&&(a=kf())!==o&&(i=Ji())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=zt(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}()),r}())===o&&(r=Da()),r}function Qi(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=zi())!==o){for(e=[],n=Aa,(s=kf())!==o?((u=Pc())===o&&(u=Fc())===o&&(u=_f()),u!==o&&(a=kf())!==o&&(i=zi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o)):(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o?((u=Pc())===o&&(u=Fc())===o&&(u=_f()),u!==o&&(a=kf())!==o&&(i=zi())!==o?n=s=[s,u,a,i]:(Aa=n,n=o)):(Aa=n,n=o);e!==o?r=t=function(r,t){const e=t.length;let n=r,s="";for(let r=0;r<e;++r)","===t[r][1]?(s=",",Array.isArray(n)||(n=[n]),n.push(t[r][3])):n=ub(t[r][1],n,t[r][3]);if(","===s){const r={type:"expr_list"};return r.value=n,r}return n}(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function Ji(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=rl())!==o){for(e=[],n=Aa,(s=Df())!==o&&(u=Pc())!==o&&(a=kf())!==o&&(i=rl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=Df())!==o&&(u=Pc())!==o&&(a=kf())!==o&&(i=rl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=zt(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function rl(){var r,t;return(r=tl())===o&&(r=function(){var r,t,e,n,s;return r=Aa,(t=function(){var r,t,e,n,s;return r=Aa,t=Aa,(e=$c())!==o&&(n=kf())!==o&&(s=Dc())!==o?t=e=[e,n,s]:(Aa=t,t=o),t!==o&&(t=Qt(t)),(r=t)===o&&(r=Dc()),r}())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(e=Da())!==o&&kf()!==o&&xf()!==o?(n=t,(s=e).parentheses=!0,r=t=ob(n,s)):(Aa=r,r=o),r}())===o&&(r=Aa,$c()!==o&&kf()!==o&&(t=rl())!==o?r=ob("NOT",t):(Aa=r,r=o)),r}function tl(){var r,t,e,n,s;return r=Aa,(t=al())!==o&&kf()!==o?((e=el())===o&&(e=null),e!==o?(n=t,r=t=null===(s=e)?n:"arithmetic"===s.type?lb(n,s.tail):ub(s.op,n,s.right)):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Gl())===o&&(r=vl()),r}function el(){var t;return(t=function(){var r,t,e,n,s,u;if(r=[],t=Aa,(e=kf())!==o&&(n=nl())!==o&&(s=kf())!==o&&(u=al())!==o?t=e=[e,n,s,u]:(Aa=t,t=o),t!==o)for(;t!==o;)r.push(t),t=Aa,(e=kf())!==o&&(n=nl())!==o&&(s=kf())!==o&&(u=al())!==o?t=e=[e,n,s,u]:(Aa=t,t=o);else r=o;return r!==o&&(r={type:"arithmetic",tail:r}),r}())===o&&(t=ul())===o&&(t=function(){var r,t,e,n;return r=Aa,(t=function(){var r,t,e,n,s;return r=Aa,t=Aa,(e=$c())!==o&&(n=kf())!==o&&(s=xc())!==o?t=e=[e,n,s]:(Aa=t,t=o),t!==o&&(t=Qt(t)),(r=t)===o&&(r=xc()),r}())!==o&&kf()!==o&&(e=al())!==o&&kf()!==o&&Pc()!==o&&kf()!==o&&(n=al())!==o?r=t={op:t,right:{type:"expr_list",value:[e,n]}}:(Aa=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=Aa,(t=Mc())!==o&&(e=kf())!==o&&(n=al())!==o?r=t={op:"IS",right:n}:(Aa=r,r=o),r===o&&(r=Aa,t=Aa,(e=Mc())!==o&&(n=kf())!==o&&(s=$c())!==o?t=e=[e,n,s]:(Aa=t,t=o),t!==o&&(e=kf())!==o&&(n=al())!==o?(t=function(r){return{op:"IS NOT",right:r}}(n),r=t):(Aa=r,r=o)),r}())===o&&(t=ol())===o&&(t=function(){var t,e,n,s,u,a;return t=Aa,(e=function(){var t,e,n,s,u;return t=Aa,(e=$c())===o&&(e=null),e!==o&&kf()!==o?((n=function(){var t,e,n,s;return t=Aa,"regexp"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Eo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="REGEXP":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=Aa,"rlike"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(yo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="RLIKE":(Aa=t,t=o)):(Aa=t,t=o),t}()),n!==o?(u=n,t=e=(s=e)?`${s} ${u}`:u):(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&kf()!==o?("binary"===r.substr(Aa,6).toLowerCase()?(n=r.substr(Aa,6),Aa+=6):(n=o,0===Na&&Oa(Wr)),n===o&&(n=null),n!==o&&kf()!==o?((s=Dl())===o&&(s=Gl())===o&&(s=vl()),s!==o?(u=e,t=e={op:(a=n)?`${u} ${a}`:u,right:s}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}()),t}function nl(){var t;return">="===r.substr(Aa,2)?(t=">=",Aa+=2):(t=o,0===Na&&Oa(Jt)),t===o&&(62===r.charCodeAt(Aa)?(t=">",Aa++):(t=o,0===Na&&Oa(re)),t===o&&("<="===r.substr(Aa,2)?(t="<=",Aa+=2):(t=o,0===Na&&Oa(te)),t===o&&("<>"===r.substr(Aa,2)?(t="<>",Aa+=2):(t=o,0===Na&&Oa(ee)),t===o&&(60===r.charCodeAt(Aa)?(t="<",Aa++):(t=o,0===Na&&Oa(ne)),t===o&&(61===r.charCodeAt(Aa)?(t="=",Aa++):(t=o,0===Na&&Oa(Kt)),t===o&&("!="===r.substr(Aa,2)?(t="!=",Aa+=2):(t=o,0===Na&&Oa(se)))))))),t}function sl(){var r,t,e,n,s;return r=Aa,t=Aa,(e=$c())!==o&&(n=kf())!==o&&(s=Uc())!==o?t=e=[e,n,s]:(Aa=t,t=o),t!==o&&(t=Qt(t)),(r=t)===o&&(r=Uc()),r}function ol(){var t,e,n,s,u,a,i,l,c,f;return t=Aa,(e=function(){var r,t,e,n,s;return r=Aa,t=Aa,(e=$c())!==o&&(n=kf())!==o&&(s=kc())!==o?t=e=[e,n,s]:(Aa=t,t=o),t!==o&&(t=Qt(t)),(r=t)===o&&(r=kc()),r}())!==o&&kf()!==o?((n=Pl())===o&&(n=Il())===o&&(n=tl()),n!==o&&kf()!==o?(s=Aa,(u=kf())!==o&&(a=Ya())!==o?s=u=[u,a]:(Aa=s,s=o),s===o&&(s=null),s!==o&&(u=kf())!==o?((a=function(){var t,e,n;return t=Aa,"escape"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(oe)),e!==o&&kf()!==o&&(n=Gl())!==o?t=e={type:"ESCAPE",value:n}:(Aa=t,t=o),t}())===o&&(a=null),a!==o?(i=e,l=n,c=s,(f=a)&&(l.escape=f),c&&(l.suffix={collate:c[1]}),t=e={op:i,right:l}):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t}function ul(){var r,t,e,n;return r=Aa,(t=sl())!==o&&kf()!==o&&(e=Of())!==o&&kf()!==o&&(n=Vi())!==o&&kf()!==o&&xf()!==o?r=t={op:t,right:n}:(Aa=r,r=o),r===o&&(r=Aa,(t=sl())!==o&&kf()!==o?((e=Qf())===o&&(e=vl())===o&&(e=Gl()),e!==o?r=t=function(r,t){return{op:r,right:t}}(t,e):(Aa=r,r=o)):(Aa=r,r=o)),r}function al(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=ll())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=il())!==o&&(a=kf())!==o&&(i=ll())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=il())!==o&&(a=kf())!==o&&(i=ll())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=zt(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function il(){var t;return 43===r.charCodeAt(Aa)?(t="+",Aa++):(t=o,0===Na&&Oa(ue)),t===o&&(45===r.charCodeAt(Aa)?(t="-",Aa++):(t=o,0===Na&&Oa(ae))),t}function ll(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=fl())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=cl())!==o&&(a=kf())!==o&&(i=fl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=cl())!==o&&(a=kf())!==o&&(i=fl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=lb(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function cl(){var t,e;return 42===r.charCodeAt(Aa)?(t="*",Aa++):(t=o,0===Na&&Oa(ie)),t===o&&(47===r.charCodeAt(Aa)?(t="/",Aa++):(t=o,0===Na&&Oa(le)),t===o&&(37===r.charCodeAt(Aa)?(t="%",Aa++):(t=o,0===Na&&Oa(ce)),t===o&&("||"===r.substr(Aa,2)?(t="||",Aa+=2):(t=o,0===Na&&Oa(fe)),t===o&&(t=Aa,"div"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(be)),e!==o&&(e="DIV"),(t=e)===o&&(38===r.charCodeAt(Aa)?(t="&",Aa++):(t=o,0===Na&&Oa(ve)),t===o&&(">>"===r.substr(Aa,2)?(t=">>",Aa+=2):(t=o,0===Na&&Oa(pe)),t===o&&("<<"===r.substr(Aa,2)?(t="<<",Aa+=2):(t=o,0===Na&&Oa(Le)),t===o&&(94===r.charCodeAt(Aa)?(t="^",Aa++):(t=o,0===Na&&Oa(Ce)),t===o&&(124===r.charCodeAt(Aa)?(t="|",Aa++):(t=o,0===Na&&Oa(de))))))))))),t}function fl(){var t,e,n,s,u;return(t=bl())===o&&(t=Aa,(e=function(){var t;return 33===r.charCodeAt(Aa)?(t="!",Aa++):(t=o,0===Na&&Oa(we)),t===o&&(45===r.charCodeAt(Aa)?(t="-",Aa++):(t=o,0===Na&&Oa(ae)),t===o&&(43===r.charCodeAt(Aa)?(t="+",Aa++):(t=o,0===Na&&Oa(ue)),t===o&&(126===r.charCodeAt(Aa)?(t="~",Aa++):(t=o,0===Na&&Oa(he))))),t}())!==o?(n=Aa,(s=kf())!==o&&(u=fl())!==o?n=s=[s,u]:(Aa=n,n=o),n!==o?t=e=ob(e,n[1]):(Aa=t,t=o)):(Aa=t,t=o)),t}function bl(){var t,e,n,s;return(t=function(){var t,e,n,s,u,a,i,l,c;return t=Aa,(e=Yc())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=zi())!==o&&kf()!==o&&Lc()!==o&&kf()!==o&&(s=tb())!==o&&kf()!==o&&(u=ei())!==o&&kf()!==o&&(a=El())!==o&&kf()!==o&&xf()!==o&&kf()!==o?((i=Ya())===o&&(i=null),i!==o?(e=function(r,t,e,n,s,o){const{dataType:u,length:a}=e;let i=u;return void 0!==a&&(i=`${i}(${a})`),{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:`${i} ${n} ${s.toUpperCase()}`},collate:o}}(e,n,s,u,a,i),t=e):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Yc())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=zi())!==o&&kf()!==o&&Lc()!==o&&kf()!==o&&(s=rb())!==o&&kf()!==o&&(u=xf())!==o?(l=n,c=s,t=e={type:"cast",keyword:e.toLowerCase(),expr:l,target:c}):(Aa=t,t=o),t===o&&(t=Aa,(e=Yc())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=zi())!==o&&kf()!==o&&Lc()!==o&&kf()!==o&&(s=qc())!==o&&kf()!==o&&(u=Of())!==o&&kf()!==o&&(a=Wl())!==o&&kf()!==o&&xf()!==o&&kf()!==o&&(i=xf())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,target:{dataType:"DECIMAL("+e+")"}}}(e,n,a),t=e):(Aa=t,t=o),t===o&&(t=Aa,(e=Yc())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=zi())!==o&&kf()!==o&&Lc()!==o&&kf()!==o&&(s=qc())!==o&&kf()!==o&&(u=Of())!==o&&kf()!==o&&(a=Wl())!==o&&kf()!==o&&_f()!==o&&kf()!==o&&(i=Wl())!==o&&kf()!==o&&xf()!==o&&kf()!==o&&xf()!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,target:{dataType:"DECIMAL("+e+", "+n+")"}}}(e,n,a,i),t=e):(Aa=t,t=o),t===o&&(t=Aa,(e=Yc())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=zi())!==o&&kf()!==o&&Lc()!==o&&kf()!==o&&(s=function(){var t;return(t=function(){var t,e,n,s;return t=Aa,"signed"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Xo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="SIGNED":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=Kc()),t}())!==o&&kf()!==o?((u=zc())===o&&(u=null),u!==o&&kf()!==o&&(a=xf())!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,target:{dataType:e+(n?" "+n:"")}}}(e,n,s,u),t=e):(Aa=t,t=o)):(Aa=t,t=o))))),t}())===o&&(t=Pl())===o&&(t=wi())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=Aa,(e=function(){var t,e,n,s;return t=Aa,"count"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(No)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="COUNT":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Aa,"group_concat"===r.substr(Aa,12).toLowerCase()?(e=r.substr(Aa,12),Aa+=12):(e=o,0===Na&&Oa(Ro)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="GROUP_CONCAT":(Aa=t,t=o)):(Aa=t,t=o),t}()),e!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=function(){var t,e,n,s,u,a,i;return t=Aa,(e=function(){var t;return 42===r.charCodeAt(Aa)?(t="*",Aa++):(t=o,0===Na&&Oa(ie)),t!==o&&(t={type:"star",value:"*"}),t}())!==o&&(e={expr:e}),(t=e)===o&&(t=Aa,(e=Oc())===o&&(e=null),e!==o&&kf()!==o&&(n=Of())!==o&&kf()!==o&&(s=zi())!==o&&kf()!==o&&(u=xf())!==o&&kf()!==o?((a=ki())===o&&(a=null),a!==o&&kf()!==o?((i=Ml())===o&&(i=null),i!==o?t=e={distinct:e,expr:s,orderby:a,parentheses:!0,separator:i}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Oc())===o&&(e=null),e!==o&&kf()!==o&&(n=zi())!==o&&kf()!==o?((s=ki())===o&&(s=null),s!==o&&kf()!==o?((u=Ml())===o&&(u=null),u!==o?(e=function(r,t,e,n){return{distinct:r,expr:t,orderby:e,separator:n}}(e,n,s,u),t=e):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o))),t}())!==o&&kf()!==o&&xf()!==o&&kf()!==o?((s=Rl())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:n,over:s}:(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,(e=function(){var t;return(t=function(){var t,e,n,s;return t=Aa,"sum"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(go)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="SUM":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"max"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(So)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="MAX":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"min"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(_o)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="MIN":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"avg"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(Oo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="AVG":(Aa=t,t=o)):(Aa=t,t=o),t}()),t}())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=al())!==o&&kf()!==o&&xf()!==o&&kf()!==o?((s=Rl())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:{expr:n},over:s}:(Aa=t,t=o)):(Aa=t,t=o),t}()),t}())===o&&(t=Dl())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=Aa,jc()!==o&&kf()!==o&&(t=qi())!==o&&kf()!==o?((e=Zi())===o&&(e=null),e!==o&&kf()!==o&&(n=Hc())!==o&&kf()!==o?((s=jc())===o&&(s=null),s!==o?(a=t,(i=e)&&a.push(i),r={type:"case",expr:null,args:a}):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Aa,jc()!==o&&kf()!==o&&(t=zi())!==o&&kf()!==o&&(e=qi())!==o&&kf()!==o?((n=Zi())===o&&(n=null),n!==o&&kf()!==o&&(s=Hc())!==o&&kf()!==o?((u=jc())===o&&(u=null),u!==o?r=function(r,t,e){return e&&t.push(e),{type:"case",expr:r,args:t}}(t,e,n):(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o)),r}())===o&&(t=function(){var t,e,n;return t=Aa,ff()!==o&&kf()!==o&&(e=zi())!==o&&kf()!==o&&(n=function(){var t;return(t=function(){var t,e,n,s;return t=Aa,"year"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Rn)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="YEAR":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"month"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(En)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="MONTH":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"week"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Nn)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="WEEK":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"day"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(un)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="DAY":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"hour"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(vn)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="HOUR":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"minute"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(yn)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="MINUTE":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"second"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(mn)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="SECOND":(Aa=t,t=o)):(Aa=t,t=o),t}()),t}())!==o?t={type:"interval",expr:e,unit:n.toLowerCase()}:(Aa=t,t=o),t}())===o&&(t=vl())===o&&(t=Il())===o&&(t=Aa,Of()!==o&&(e=kf())!==o&&(n=Qi())!==o&&kf()!==o&&xf()!==o?((s=n).parentheses=!0,t=s):(Aa=t,t=o),t===o&&(t=Qf())===o&&(t=Aa,kf()!==o?(63===r.charCodeAt(Aa)?(e="?",Aa++):(e=o,0===Na&&Oa(qt)),e!==o?t={type:"origin",value:e}:(Aa=t,t=o)):(Aa=t,t=o))),t}function vl(){var r,t,e,n,s,u,a;return r=Aa,(t=El())===o&&(t=dl()),t!==o&&kf()!==o&&Sf()!==o&&kf()!==o?((e=El())===o&&(e=dl()),e!==o&&kf()!==o&&Sf()!==o&&kf()!==o&&(n=wl())!==o?(s=t,u=e,a=n,pb.add(`select::${s}::${u}::${a}`),r=t={type:"column_ref",db:s,table:u,column:a}):(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Aa,(t=El())===o&&(t=dl()),t!==o&&kf()!==o&&Sf()!==o&&kf()!==o&&(e=wl())!==o?r=t=function(r,t){return pb.add(`select::${r}::${t}`),{type:"column_ref",table:r,column:t}}(t,e):(Aa=r,r=o),r===o&&(r=Aa,(t=hl())!==o&&(t=function(r){return pb.add("select::null::"+r),{type:"column_ref",table:null,column:r}}(t)),r=t)),r}function pl(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=hl())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=hl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=hl())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function Ll(){var r,t;return r=Aa,(t=El())!==o&&(ye(t)?o:void 0)!==o?r=t:(Aa=r,r=o),r===o&&(r=Cl()),r}function Cl(){var t;return(t=function(){var t,e,n,s;if(t=Aa,34===r.charCodeAt(Aa)?(e='"',Aa++):(e=o,0===Na&&Oa(Ee)),e!==o){if(n=[],Ae.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(me)),s!==o)for(;s!==o;)n.push(s),Ae.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(me));else n=o;n!==o?(34===r.charCodeAt(Aa)?(s='"',Aa++):(s=o,0===Na&&Oa(Ee)),s!==o?t=e=Te(n):(Aa=t,t=o)):(Aa=t,t=o)}else Aa=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=Aa,39===r.charCodeAt(Aa)?(e="'",Aa++):(e=o,0===Na&&Oa(Dr)),e!==o){if(n=[],Ie.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(Ne)),s!==o)for(;s!==o;)n.push(s),Ie.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(Ne));else n=o;n!==o?(39===r.charCodeAt(Aa)?(s="'",Aa++):(s=o,0===Na&&Oa(Dr)),s!==o?t=e=Te(n):(Aa=t,t=o)):(Aa=t,t=o)}else Aa=t,t=o;return t}())===o&&(t=dl()),t}function dl(){var t,e,n,s;if(t=Aa,96===r.charCodeAt(Aa)?(e="`",Aa++):(e=o,0===Na&&Oa(Re)),e!==o){if(n=[],Se.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(_e)),s===o&&(s=Yl()),s!==o)for(;s!==o;)n.push(s),Se.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(_e)),s===o&&(s=Yl());else n=o;n!==o?(96===r.charCodeAt(Aa)?(s="`",Aa++):(s=o,0===Na&&Oa(Re)),s!==o?t=e=Te(n):(Aa=t,t=o)):(Aa=t,t=o)}else Aa=t,t=o;return t}function wl(){var r;return r=Aa,(r=yl())===o&&(r=Cl()),r}function hl(){var r,t;return r=Aa,(t=yl())!==o&&(ye(t)?o:void 0)!==o?r=t:(Aa=r,r=o),r===o&&(r=dl()),r}function yl(){var r,t,e,n;if(r=Aa,(t=Al())!==o){for(e=[],n=Tl();n!==o;)e.push(n),n=Tl();e!==o?r=t=ge(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function El(){var r,t,e,n;if(r=Aa,(t=Al())!==o){for(e=[],n=ml();n!==o;)e.push(n),n=ml();e!==o?r=t=ge(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function Al(){var t;return Oe.test(r.charAt(Aa))?(t=r.charAt(Aa),Aa++):(t=o,0===Na&&Oa(xe)),t}function ml(){var t;return Ue.test(r.charAt(Aa))?(t=r.charAt(Aa),Aa++):(t=o,0===Na&&Oa(Me)),t}function Tl(){var t;return ke.test(r.charAt(Aa))?(t=r.charAt(Aa),Aa++):(t=o,0===Na&&Oa(De)),t}function Il(){var t,e,n;return t=Aa,58===r.charCodeAt(Aa)?(e=":",Aa++):(e=o,0===Na&&Oa($e)),e!==o&&(n=El())!==o?t=e=[e,n]:(Aa=t,t=o),t!==o&&(t={type:"param",value:t[1]}),t}function Nl(){var t,e,n,s,u,a,i,l,c;return t=Aa,Ec()!==o&&kf()!==o&&nc()!==o&&kf()!==o&&(e=bf())!==o&&kf()!==o?(n=Aa,(s=Of())!==o&&(u=kf())!==o?((a=Vi())===o&&(a=null),a!==o&&(i=kf())!==o&&(l=xf())!==o?n=s=[s,u,a,i,l]:(Aa=n,n=o)):(Aa=n,n=o),n===o&&(n=null),n!==o?t={type:"on update",keyword:e,parentheses:!!(c=n),expr:c?c[2]:null}:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,Ec()!==o&&kf()!==o&&nc()!==o&&kf()!==o?("now"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(Pe)),e!==o&&kf()!==o&&(n=Of())!==o&&(s=kf())!==o&&(u=xf())!==o?t=function(r){return{type:"on update",keyword:r,parentheses:!0}}(e):(Aa=t,t=o)):(Aa=t,t=o)),t}function Rl(){var t,e,n;return t=Aa,"over"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Fe)),e!==o&&kf()!==o&&(n=_l())!==o?t=e={type:"window",as_window_specification:n}:(Aa=t,t=o),t===o&&(t=Nl()),t}function Sl(){var r,t,e;return r=Aa,(t=El())!==o&&kf()!==o&&Lc()!==o&&kf()!==o&&(e=_l())!==o?r=t={name:t,as_window_specification:e}:(Aa=r,r=o),r}function _l(){var r,t;return(r=El())===o&&(r=Aa,Of()!==o&&kf()!==o?((t=function(){var r,t,e,n;return r=Aa,(t=function(){var r,t;return r=Aa,fc()!==o&&kf()!==o&&Rc()!==o&&kf()!==o&&(t=di())!==o?r=t:(Aa=r,r=o),r}())===o&&(t=null),t!==o&&kf()!==o?((e=ki())===o&&(e=null),e!==o&&kf()!==o?((n=function(){var r,t,e,n,s;return r=Aa,uf()!==o&&kf()!==o?((t=gl())===o&&(t=Ol()),t!==o?r="rows "+t.value:(Aa=r,r=o)):(Aa=r,r=o),r===o&&(r=Aa,uf()!==o&&kf()!==o&&(t=xc())!==o&&kf()!==o&&(e=Ol())!==o&&kf()!==o&&Pc()!==o&&kf()!==o&&(n=gl())!==o?(s=n,r=`rows between ${e.value} and ${s.value}`):(Aa=r,r=o)),r}())===o&&(n=null),n!==o?r=t={name:null,partitionby:t,orderby:e,window_frame_clause:n}:(Aa=r,r=o)):(Aa=r,r=o)):(Aa=r,r=o),r}())===o&&(t=null),t!==o&&kf()!==o&&xf()!==o?r={window_specification:t||{},parentheses:!0}:(Aa=r,r=o)):(Aa=r,r=o)),r}function gl(){var t,e,n,s;return t=Aa,(e=Ul())!==o&&kf()!==o?("following"===r.substr(Aa,9).toLowerCase()?(n=r.substr(Aa,9),Aa+=9):(n=o,0===Na&&Oa(je)),n!==o?((s=e).value+=" FOLLOWING",t=e=s):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=xl()),t}function Ol(){var t,e,n,s;return t=Aa,(e=Ul())!==o&&kf()!==o?("preceding"===r.substr(Aa,9).toLowerCase()?(n=r.substr(Aa,9),Aa+=9):(n=o,0===Na&&Oa(He)),n!==o?((s=e).value+=" PRECEDING",t=e=s):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=xl()),t}function xl(){var t,e,n;return t=Aa,"current"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Ye)),e!==o&&kf()!==o?("row"===r.substr(Aa,3).toLowerCase()?(n=r.substr(Aa,3),Aa+=3):(n=o,0===Na&&Oa(M)),n!==o?t=e={type:"single_quote_string",value:"current row"}:(Aa=t,t=o)):(Aa=t,t=o),t}function Ul(){var t,e;return t=Aa,"unbounded"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(Be)),e!==o&&(e={type:"single_quote_string",value:e.toUpperCase()}),(t=e)===o&&(t=Bl()),t}function Ml(){var t,e,n;return t=Aa,"separator"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(We)),e===o&&(e=null),e!==o&&kf()!==o&&(n=Gl())!==o?t=e={keyword:e,value:n}:(Aa=t,t=o),t}function kl(){var t;return"year_month"===r.substr(Aa,10).toLowerCase()?(t=r.substr(Aa,10),Aa+=10):(t=o,0===Na&&Oa(Xe)),t===o&&("day_hour"===r.substr(Aa,8).toLowerCase()?(t=r.substr(Aa,8),Aa+=8):(t=o,0===Na&&Oa(Ve)),t===o&&("day_minute"===r.substr(Aa,10).toLowerCase()?(t=r.substr(Aa,10),Aa+=10):(t=o,0===Na&&Oa(qe)),t===o&&("day_second"===r.substr(Aa,10).toLowerCase()?(t=r.substr(Aa,10),Aa+=10):(t=o,0===Na&&Oa(Ke)),t===o&&("day_microsecond"===r.substr(Aa,15).toLowerCase()?(t=r.substr(Aa,15),Aa+=15):(t=o,0===Na&&Oa(Ze)),t===o&&("hour_minute"===r.substr(Aa,11).toLowerCase()?(t=r.substr(Aa,11),Aa+=11):(t=o,0===Na&&Oa(ze)),t===o&&("hour_second"===r.substr(Aa,11).toLowerCase()?(t=r.substr(Aa,11),Aa+=11):(t=o,0===Na&&Oa(Qe)),t===o&&("hour_microsecond"===r.substr(Aa,16).toLowerCase()?(t=r.substr(Aa,16),Aa+=16):(t=o,0===Na&&Oa(Je)),t===o&&("minute_second"===r.substr(Aa,13).toLowerCase()?(t=r.substr(Aa,13),Aa+=13):(t=o,0===Na&&Oa(rn)),t===o&&("minute_microsecond"===r.substr(Aa,18).toLowerCase()?(t=r.substr(Aa,18),Aa+=18):(t=o,0===Na&&Oa(tn)),t===o&&("second_microsecond"===r.substr(Aa,18).toLowerCase()?(t=r.substr(Aa,18),Aa+=18):(t=o,0===Na&&Oa(en)),t===o&&("timezone_hour"===r.substr(Aa,13).toLowerCase()?(t=r.substr(Aa,13),Aa+=13):(t=o,0===Na&&Oa(nn)),t===o&&("timezone_minute"===r.substr(Aa,15).toLowerCase()?(t=r.substr(Aa,15),Aa+=15):(t=o,0===Na&&Oa(sn)),t===o&&("century"===r.substr(Aa,7).toLowerCase()?(t=r.substr(Aa,7),Aa+=7):(t=o,0===Na&&Oa(on)),t===o&&("day"===r.substr(Aa,3).toLowerCase()?(t=r.substr(Aa,3),Aa+=3):(t=o,0===Na&&Oa(un)),t===o&&("date"===r.substr(Aa,4).toLowerCase()?(t=r.substr(Aa,4),Aa+=4):(t=o,0===Na&&Oa(an)),t===o&&("decade"===r.substr(Aa,6).toLowerCase()?(t=r.substr(Aa,6),Aa+=6):(t=o,0===Na&&Oa(ln)),t===o&&("dow"===r.substr(Aa,3).toLowerCase()?(t=r.substr(Aa,3),Aa+=3):(t=o,0===Na&&Oa(cn)),t===o&&("doy"===r.substr(Aa,3).toLowerCase()?(t=r.substr(Aa,3),Aa+=3):(t=o,0===Na&&Oa(fn)),t===o&&("epoch"===r.substr(Aa,5).toLowerCase()?(t=r.substr(Aa,5),Aa+=5):(t=o,0===Na&&Oa(bn)),t===o&&("hour"===r.substr(Aa,4).toLowerCase()?(t=r.substr(Aa,4),Aa+=4):(t=o,0===Na&&Oa(vn)),t===o&&("isodow"===r.substr(Aa,6).toLowerCase()?(t=r.substr(Aa,6),Aa+=6):(t=o,0===Na&&Oa(pn)),t===o&&("isoweek"===r.substr(Aa,7).toLowerCase()?(t=r.substr(Aa,7),Aa+=7):(t=o,0===Na&&Oa(Ln)),t===o&&("isoyear"===r.substr(Aa,7).toLowerCase()?(t=r.substr(Aa,7),Aa+=7):(t=o,0===Na&&Oa(Cn)),t===o&&("microseconds"===r.substr(Aa,12).toLowerCase()?(t=r.substr(Aa,12),Aa+=12):(t=o,0===Na&&Oa(dn)),t===o&&("millennium"===r.substr(Aa,10).toLowerCase()?(t=r.substr(Aa,10),Aa+=10):(t=o,0===Na&&Oa(wn)),t===o&&("milliseconds"===r.substr(Aa,12).toLowerCase()?(t=r.substr(Aa,12),Aa+=12):(t=o,0===Na&&Oa(hn)),t===o&&("minute"===r.substr(Aa,6).toLowerCase()?(t=r.substr(Aa,6),Aa+=6):(t=o,0===Na&&Oa(yn)),t===o&&("month"===r.substr(Aa,5).toLowerCase()?(t=r.substr(Aa,5),Aa+=5):(t=o,0===Na&&Oa(En)),t===o&&("quarter"===r.substr(Aa,7).toLowerCase()?(t=r.substr(Aa,7),Aa+=7):(t=o,0===Na&&Oa(An)),t===o&&("second"===r.substr(Aa,6).toLowerCase()?(t=r.substr(Aa,6),Aa+=6):(t=o,0===Na&&Oa(mn)),t===o&&("time"===r.substr(Aa,4).toLowerCase()?(t=r.substr(Aa,4),Aa+=4):(t=o,0===Na&&Oa(Tn)),t===o&&("timezone"===r.substr(Aa,8).toLowerCase()?(t=r.substr(Aa,8),Aa+=8):(t=o,0===Na&&Oa(In)),t===o&&("week"===r.substr(Aa,4).toLowerCase()?(t=r.substr(Aa,4),Aa+=4):(t=o,0===Na&&Oa(Nn)),t===o&&("year"===r.substr(Aa,4).toLowerCase()?(t=r.substr(Aa,4),Aa+=4):(t=o,0===Na&&Oa(Rn)))))))))))))))))))))))))))))))))))),t}function Dl(){var t,e,n,s,u,a,i,l;return(t=function(){var t,e,n,s,u,a,i,l;return t=Aa,(e=Gc())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=kl())!==o&&kf()!==o&&vc()!==o&&kf()!==o?((s=lf())===o&&(s=ff())===o&&(s=af())===o&&(s=sf()),s!==o&&kf()!==o&&(u=zi())!==o&&kf()!==o&&xf()!==o?(a=n,i=s,l=u,t=e={type:e.toLowerCase(),args:{field:a,cast_type:i,source:l}}):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=Gc())!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=kl())!==o&&kf()!==o&&vc()!==o&&kf()!==o&&(s=zi())!==o&&kf()!==o&&(u=xf())!==o?t=e=function(r,t,e){return{type:r.toLowerCase(),args:{field:t,source:e}}}(e,n,s):(Aa=t,t=o),t===o&&(t=Aa,"date_trunc"===r.substr(Aa,10).toLowerCase()?(e=r.substr(Aa,10),Aa+=10):(e=o,0===Na&&Oa(Sn)),e!==o&&kf()!==o&&Of()!==o&&kf()!==o&&(n=zi())!==o&&kf()!==o&&_f()!==o&&kf()!==o&&(s=kl())!==o&&kf()!==o&&(u=xf())!==o?t=e=function(r,t){return{type:"function",name:"DATE_TRUNC",args:{type:"expr_list",value:[r,{type:"origin",value:t}]},over:null}}(n,s):(Aa=t,t=o))),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"trim"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(xn)),e!==o&&kf()!==o&&Of()!==o&&kf()!==o?((n=function(){var t,e,n;return t=Aa,(e=function(){var t;return"both"===r.substr(Aa,4).toLowerCase()?(t=r.substr(Aa,4),Aa+=4):(t=o,0===Na&&Oa(_n)),t===o&&("leading"===r.substr(Aa,7).toLowerCase()?(t=r.substr(Aa,7),Aa+=7):(t=o,0===Na&&Oa(gn)),t===o&&("trailing"===r.substr(Aa,8).toLowerCase()?(t=r.substr(Aa,8),Aa+=8):(t=o,0===Na&&Oa(On)))),t}())===o&&(e=null),e!==o&&kf()!==o?((n=Gl())===o&&(n=null),n!==o&&kf()!==o&&vc()!==o?t=e=function(r,t,e){let n=[];return r&&n.push({type:"origin",value:r}),t&&n.push(t),n.push({type:"origin",value:"from"}),{type:"expr_list",value:n}}(e,n):(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(n=null),n!==o&&kf()!==o&&(s=zi())!==o&&kf()!==o&&xf()!==o?t=e=function(r,t){let e=r||{type:"expr_list",value:[]};return e.value.push(t),{type:"function",name:"TRIM",args:e}}(n,s):(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=Aa,"convert"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Un)),e!==o&&kf()!==o&&(n=Of())!==o&&kf()!==o&&(s=function(){var r,t,e,n,s,u;return r=Aa,(t=Vf())!==o&&kf()!==o&&_f()!==o&&kf()!==o&&(e=tb())!==o&&kf()!==o&&(n=ei())!==o&&kf()!==o&&(s=El())!==o?r=t=function(r,t,e,n){const{dataType:s,length:o}=t;let u=s;return void 0!==o&&(u=`${u}(${o})`),{type:"expr_list",value:[r,{type:"origin",value:`${u} ${e} ${n}`}]}}(t,e,n,s):(Aa=r,r=o),r===o&&(r=Aa,(t=Vf())!==o&&kf()!==o&&_f()!==o&&kf()!==o&&(e=rb())!==o?(u=e,r=t={type:"expr_list",value:[t,{type:"datatype",...u}]}):(Aa=r,r=o),r===o&&(r=Aa,(t=Qi())!==o&&kf()!==o&&Ic()!==o&&kf()!==o&&(e=El())!==o?r=t=function(r,t){return r.suffix="USING "+t.toUpperCase(),{type:"expr_list",value:[r]}}(t,e):(Aa=r,r=o))),r}())!==o&&(u=kf())!==o&&xf()!==o&&kf()!==o?((a=Ya())===o&&(a=null),a!==o?t=e={type:"function",name:"CONVERT",args:s,collate:a}:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=function(){var t;return(t=$l())===o&&(t=vf())===o&&(t=function(){var t,e,n,s;return t=Aa,"user"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(vu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="USER":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"session_user"===r.substr(Aa,12).toLowerCase()?(e=r.substr(Aa,12),Aa+=12):(e=o,0===Na&&Oa(hu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="SESSION_USER":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"system_user"===r.substr(Aa,11).toLowerCase()?(e=r.substr(Aa,11),Aa+=11):(e=o,0===Na&&Oa(yu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="SYSTEM_USER":(Aa=t,t=o)):(Aa=t,t=o),t}()),t}())!==o&&kf()!==o&&(n=Of())!==o&&kf()!==o?((s=Vi())===o&&(s=null),s!==o&&(u=kf())!==o&&xf()!==o&&kf()!==o?((a=Rl())===o&&(a=null),a!==o?t=e=function(r,t,e){return{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,s,a):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=$l())!==o&&kf()!==o?((n=Nl())===o&&(n=null),n!==o?t=e={type:"function",name:e,over:n}:(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=qf())!==o&&("convert"===(l=e).toLowerCase()||sb[l.toLowerCase()]?o:void 0)!==o&&(n=kf())!==o&&Of()!==o&&(s=kf())!==o?((u=Qi())===o&&(u=null),u!==o&&kf()!==o&&xf()!==o&&(a=kf())!==o?((i=Rl())===o&&(i=null),i!==o?t=e=function(r,t,e){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),("TIMESTAMPDIFF"===r.toUpperCase()||"TIMESTAMPADD"===r.toUpperCase())&&t.value&&t.value[0]&&(t.value[0]={type:"origin",value:t.value[0].column}),{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,u,i):(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o))))),t}function $l(){var t;return(t=function(){var t,e,n,s;return t=Aa,"current_date"===r.substr(Aa,12).toLowerCase()?(e=r.substr(Aa,12),Aa+=12):(e=o,0===Na&&Oa(pu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="CURRENT_DATE":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"current_time"===r.substr(Aa,12).toLowerCase()?(e=r.substr(Aa,12),Aa+=12):(e=o,0===Na&&Oa(Cu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="CURRENT_TIME":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=bf()),t}function Pl(){var t,e,n,s,u,a,i,l,c;return t=Aa,"binary"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Mn)),e===o&&("_binary"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(kn))),e===o&&(e=null),e!==o&&kf()!==o&&(n=Gl())!==o?(s=Aa,(u=kf())!==o&&(a=Ya())!==o?s=u=[u,a]:(Aa=s,s=o),s===o&&(s=null),s!==o?(l=n,c=s,(i=e)&&(l.prefix=i.toLowerCase()),c&&(l.suffix={collate:c[1]}),t=e=l):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Bl())===o&&(t=function(){var t,e;return t=Aa,(e=function(){var t,e,n,s;return t=Aa,"true"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(hs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(e={type:"bool",value:!0}),(t=e)===o&&(t=Aa,(e=function(){var t,e,n,s;return t=Aa,"false"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Es)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(e={type:"bool",value:!1}),t=e),t}())===o&&(t=Fl())===o&&(t=function(){var t,e,n,s,u,a;if(t=Aa,(e=af())===o&&(e=sf())===o&&(e=lf())===o&&(e=of()),e!==o)if(kf()!==o){if(n=Aa,39===r.charCodeAt(Aa)?(s="'",Aa++):(s=o,0===Na&&Oa(Dr)),s!==o){for(u=[],a=Hl();a!==o;)u.push(a),a=Hl();u!==o?(39===r.charCodeAt(Aa)?(a="'",Aa++):(a=o,0===Na&&Oa(Dr)),a!==o?n=s=[s,u,a]:(Aa=n,n=o)):(Aa=n,n=o)}else Aa=n,n=o;n!==o?t=e=Yn(e,n):(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o;if(t===o)if(t=Aa,(e=af())===o&&(e=sf())===o&&(e=lf())===o&&(e=of()),e!==o)if(kf()!==o){if(n=Aa,34===r.charCodeAt(Aa)?(s='"',Aa++):(s=o,0===Na&&Oa(Ee)),s!==o){for(u=[],a=jl();a!==o;)u.push(a),a=jl();u!==o?(34===r.charCodeAt(Aa)?(a='"',Aa++):(a=o,0===Na&&Oa(Ee)),a!==o?n=s=[s,u,a]:(Aa=n,n=o)):(Aa=n,n=o)}else Aa=n,n=o;n!==o?t=e=Yn(e,n):(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o;return t}()),t}function Fl(){var t;return(t=function(){var t,e,n,s;return t=Aa,"null"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(ds)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(t={type:"null",value:null}),t}function Gl(){var t,e,n,s,u,a,i,l;if(t=Aa,"_binary"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(kn)),e===o&&("_latin1"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Dn))),e===o&&(e=null),e!==o)if((n=kf())!==o)if("x"===r.substr(Aa,1).toLowerCase()?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa($n)),s!==o){if(u=Aa,39===r.charCodeAt(Aa)?(a="'",Aa++):(a=o,0===Na&&Oa(Dr)),a!==o){for(i=[],Pn.test(r.charAt(Aa))?(l=r.charAt(Aa),Aa++):(l=o,0===Na&&Oa(Fn));l!==o;)i.push(l),Pn.test(r.charAt(Aa))?(l=r.charAt(Aa),Aa++):(l=o,0===Na&&Oa(Fn));i!==o?(39===r.charCodeAt(Aa)?(l="'",Aa++):(l=o,0===Na&&Oa(Dr)),l!==o?u=a=[a,i,l]:(Aa=u,u=o)):(Aa=u,u=o)}else Aa=u,u=o;u!==o?t=e={type:"hex_string",prefix:e,value:u[1].join("")}:(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;if(t===o){if(t=Aa,"_binary"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(kn)),e===o&&("_latin1"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Dn))),e===o&&(e=null),e!==o)if((n=kf())!==o)if("b"===r.substr(Aa,1).toLowerCase()?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(Gn)),s!==o){if(u=Aa,39===r.charCodeAt(Aa)?(a="'",Aa++):(a=o,0===Na&&Oa(Dr)),a!==o){for(i=[],Pn.test(r.charAt(Aa))?(l=r.charAt(Aa),Aa++):(l=o,0===Na&&Oa(Fn));l!==o;)i.push(l),Pn.test(r.charAt(Aa))?(l=r.charAt(Aa),Aa++):(l=o,0===Na&&Oa(Fn));i!==o?(39===r.charCodeAt(Aa)?(l="'",Aa++):(l=o,0===Na&&Oa(Dr)),l!==o?u=a=[a,i,l]:(Aa=u,u=o)):(Aa=u,u=o)}else Aa=u,u=o;u!==o?t=e=function(r,t,e){return{type:"bit_string",prefix:r,value:e[1].join("")}}(e,0,u):(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;if(t===o){if(t=Aa,"_binary"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(kn)),e===o&&("_latin1"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Dn))),e===o&&(e=null),e!==o)if((n=kf())!==o)if("0x"===r.substr(Aa,2).toLowerCase()?(s=r.substr(Aa,2),Aa+=2):(s=o,0===Na&&Oa(jn)),s!==o){for(u=[],Pn.test(r.charAt(Aa))?(a=r.charAt(Aa),Aa++):(a=o,0===Na&&Oa(Fn));a!==o;)u.push(a),Pn.test(r.charAt(Aa))?(a=r.charAt(Aa),Aa++):(a=o,0===Na&&Oa(Fn));u!==o?t=e=function(r,t,e){return{type:"full_hex_string",prefix:r,value:e.join("")}}(e,0,u):(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;if(t===o){if(t=Aa,"n"===r.substr(Aa,1).toLowerCase()?(e=r.charAt(Aa),Aa++):(e=o,0===Na&&Oa(Hn)),e!==o){if(n=Aa,39===r.charCodeAt(Aa)?(s="'",Aa++):(s=o,0===Na&&Oa(Dr)),s!==o){for(u=[],a=Hl();a!==o;)u.push(a),a=Hl();u!==o?(39===r.charCodeAt(Aa)?(a="'",Aa++):(a=o,0===Na&&Oa(Dr)),a!==o?n=s=[s,u,a]:(Aa=n,n=o)):(Aa=n,n=o)}else Aa=n,n=o;n!==o?t=e=function(r,t){return{type:"natural_string",value:t[1].join("")}}(0,n):(Aa=t,t=o)}else Aa=t,t=o;if(t===o){if(t=Aa,e=Aa,39===r.charCodeAt(Aa)?(n="'",Aa++):(n=o,0===Na&&Oa(Dr)),n!==o){for(s=[],u=Hl();u!==o;)s.push(u),u=Hl();s!==o?(39===r.charCodeAt(Aa)?(u="'",Aa++):(u=o,0===Na&&Oa(Dr)),u!==o?e=n=[n,s,u]:(Aa=e,e=o)):(Aa=e,e=o)}else Aa=e,e=o;if(e!==o&&(e=function(r){return{type:"single_quote_string",value:r[1].join("")}}(e)),(t=e)===o){if(t=Aa,e=Aa,34===r.charCodeAt(Aa)?(n='"',Aa++):(n=o,0===Na&&Oa(Ee)),n!==o){for(s=[],u=jl();u!==o;)s.push(u),u=jl();s!==o?(34===r.charCodeAt(Aa)?(u='"',Aa++):(u=o,0===Na&&Oa(Ee)),u!==o?e=n=[n,s,u]:(Aa=e,e=o)):(Aa=e,e=o)}else Aa=e,e=o;e!==o&&(e=function(r){return{type:"double_quote_string",value:r[1].join("")}}(e)),t=e}}}}}return t}function jl(){var t;return Bn.test(r.charAt(Aa))?(t=r.charAt(Aa),Aa++):(t=o,0===Na&&Oa(Wn)),t===o&&(t=Yl()),t}function Hl(){var t;return Xn.test(r.charAt(Aa))?(t=r.charAt(Aa),Aa++):(t=o,0===Na&&Oa(Vn)),t===o&&(t=Yl()),t}function Yl(){var t,e,n,s,u,a,i,l,c,f;return t=Aa,"\\'"===r.substr(Aa,2)?(e="\\'",Aa+=2):(e=o,0===Na&&Oa(qn)),e!==o&&(e="\\'"),(t=e)===o&&(t=Aa,'\\"'===r.substr(Aa,2)?(e='\\"',Aa+=2):(e=o,0===Na&&Oa(Kn)),e!==o&&(e='\\"'),(t=e)===o&&(t=Aa,"\\\\"===r.substr(Aa,2)?(e="\\\\",Aa+=2):(e=o,0===Na&&Oa(Zn)),e!==o&&(e="\\\\"),(t=e)===o&&(t=Aa,"\\/"===r.substr(Aa,2)?(e="\\/",Aa+=2):(e=o,0===Na&&Oa(zn)),e!==o&&(e="\\/"),(t=e)===o&&(t=Aa,"\\b"===r.substr(Aa,2)?(e="\\b",Aa+=2):(e=o,0===Na&&Oa(Qn)),e!==o&&(e="\b"),(t=e)===o&&(t=Aa,"\\f"===r.substr(Aa,2)?(e="\\f",Aa+=2):(e=o,0===Na&&Oa(Jn)),e!==o&&(e="\f"),(t=e)===o&&(t=Aa,"\\n"===r.substr(Aa,2)?(e="\\n",Aa+=2):(e=o,0===Na&&Oa(rs)),e!==o&&(e="\n"),(t=e)===o&&(t=Aa,"\\r"===r.substr(Aa,2)?(e="\\r",Aa+=2):(e=o,0===Na&&Oa(ts)),e!==o&&(e="\r"),(t=e)===o&&(t=Aa,"\\t"===r.substr(Aa,2)?(e="\\t",Aa+=2):(e=o,0===Na&&Oa(es)),e!==o&&(e="\t"),(t=e)===o&&(t=Aa,"\\u"===r.substr(Aa,2)?(e="\\u",Aa+=2):(e=o,0===Na&&Oa(ns)),e!==o&&(n=Zl())!==o&&(s=Zl())!==o&&(u=Zl())!==o&&(a=Zl())!==o?(i=n,l=s,c=u,f=a,t=e=String.fromCharCode(parseInt("0x"+i+l+c+f))):(Aa=t,t=o),t===o&&(t=Aa,92===r.charCodeAt(Aa)?(e="\\",Aa++):(e=o,0===Na&&Oa(ss)),e!==o&&(e="\\"),(t=e)===o&&(t=Aa,"''"===r.substr(Aa,2)?(e="''",Aa+=2):(e=o,0===Na&&Oa(os)),e!==o&&(e="''"),(t=e)===o&&(t=Aa,'""'===r.substr(Aa,2)?(e='""',Aa+=2):(e=o,0===Na&&Oa(us)),e!==o&&(e='""'),(t=e)===o&&(t=Aa,"``"===r.substr(Aa,2)?(e="``",Aa+=2):(e=o,0===Na&&Oa(as)),e!==o&&(e="``"),t=e))))))))))))),t}function Bl(){var r,t;return(r=function(){var r,t,e,n;return r=Aa,(t=Wl())!==o&&(e=Xl())!==o&&(n=Vl())!==o?r=t={type:"bigint",value:t+e+n}:(Aa=r,r=o),r===o&&(r=Aa,(t=Wl())!==o&&(e=Xl())!==o?(t=function(r,t){const e=r+t;return ab(r)?{type:"bigint",value:e}:parseFloat(e)}(t,e),r=t):(Aa=r,r=o),r===o&&(r=Aa,(t=Wl())!==o&&(e=Vl())!==o?(t=function(r,t){return{type:"bigint",value:r+t}}(t,e),r=t):(Aa=r,r=o),r===o&&(r=Aa,(t=Wl())!==o&&(t=function(r){return ab(r)?{type:"bigint",value:r}:parseFloat(r)}(t)),r=t))),r}())!==o&&(r=(t=r)&&"bigint"===t.type?t:{type:"number",value:t}),r}function Wl(){var t,e,n;return(t=ql())===o&&(t=Kl())===o&&(t=Aa,45===r.charCodeAt(Aa)?(e="-",Aa++):(e=o,0===Na&&Oa(ae)),e===o&&(43===r.charCodeAt(Aa)?(e="+",Aa++):(e=o,0===Na&&Oa(ue))),e!==o&&(n=ql())!==o?t=e+=n:(Aa=t,t=o),t===o&&(t=Aa,45===r.charCodeAt(Aa)?(e="-",Aa++):(e=o,0===Na&&Oa(ae)),e===o&&(43===r.charCodeAt(Aa)?(e="+",Aa++):(e=o,0===Na&&Oa(ue))),e!==o&&(n=Kl())!==o?t=e=function(r,t){return r+t}(e,n):(Aa=t,t=o))),t}function Xl(){var t,e,n,s;return t=Aa,46===r.charCodeAt(Aa)?(e=".",Aa++):(e=o,0===Na&&Oa(cs)),e!==o?((n=ql())===o&&(n=null),n!==o?t=e=(s=n)?"."+s:"":(Aa=t,t=o)):(Aa=t,t=o),t}function Vl(){var t,e,n;return t=Aa,(e=function(){var t,e,n,s;return t=Aa,vs.test(r.charAt(Aa))?(e=r.charAt(Aa),Aa++):(e=o,0===Na&&Oa(ps)),e!==o?(Ls.test(r.charAt(Aa))?(n=r.charAt(Aa),Aa++):(n=o,0===Na&&Oa(Cs)),n===o&&(n=null),n!==o?t=e+=null!==(s=n)?s:"":(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(n=ql())!==o?t=e+=n:(Aa=t,t=o),t}function ql(){var r,t;if(r=[],(t=Kl())!==o)for(;t!==o;)r.push(t),t=Kl();else r=o;return r!==o&&(r=r.join("")),r}function Kl(){var t;return ir.test(r.charAt(Aa))?(t=r.charAt(Aa),Aa++):(t=o,0===Na&&Oa(lr)),t}function Zl(){var t;return fs.test(r.charAt(Aa))?(t=r.charAt(Aa),Aa++):(t=o,0===Na&&Oa(bs)),t}function zl(){var t,e,n,s;return t=Aa,"default"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(j)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Ql(){var t,e,n,s;return t=Aa,"to"===r.substr(Aa,2).toLowerCase()?(e=r.substr(Aa,2),Aa+=2):(e=o,0===Na&&Oa(ys)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Jl(){var t,e,n,s;return t=Aa,"show"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(As)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function rc(){var t,e,n,s;return t=Aa,"drop"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(ms)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="DROP":(Aa=t,t=o)):(Aa=t,t=o),t}function tc(){var t,e,n,s;return t=Aa,"alter"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Is)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function ec(){var t,e,n,s;return t=Aa,"select"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Ns)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function nc(){var t,e,n,s;return t=Aa,"update"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Rs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function sc(){var t,e,n,s;return t=Aa,"create"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Ss)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function oc(){var t,e,n,s;return t=Aa,"temporary"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(_s)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function uc(){var t,e,n,s;return t=Aa,"delete"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(gs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function ac(){var t,e,n,s;return t=Aa,"insert"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Os)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function ic(){var t,e,n,s;return t=Aa,"replace"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Us)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function lc(){var t,e,n,s;return t=Aa,"rename"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Ms)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function cc(){var t,e,n,s;return t=Aa,"ignore"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(ks)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function fc(){var t,e,n,s;return t=Aa,"partition"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(Ds)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="PARTITION":(Aa=t,t=o)):(Aa=t,t=o),t}function bc(){var t,e,n,s;return t=Aa,"into"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa($s)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function vc(){var t,e,n,s;return t=Aa,"from"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Ps)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function pc(){var t,e,n,s;return t=Aa,"set"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(Ar)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="SET":(Aa=t,t=o)):(Aa=t,t=o),t}function Lc(){var t,e,n,s;return t=Aa,"as"===r.substr(Aa,2).toLowerCase()?(e=r.substr(Aa,2),Aa+=2):(e=o,0===Na&&Oa(V)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Cc(){var t,e,n,s;return t=Aa,"table"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Gs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="TABLE":(Aa=t,t=o)):(Aa=t,t=o),t}function dc(){var t,e,n,s;return t=Aa,"trigger"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(js)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="TRIGGER":(Aa=t,t=o)):(Aa=t,t=o),t}function wc(){var t,e,n,s;return t=Aa,"tables"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Hs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="TABLES":(Aa=t,t=o)):(Aa=t,t=o),t}function hc(){var t,e,n,s;return t=Aa,"database"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Ys)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="DATABASE":(Aa=t,t=o)):(Aa=t,t=o),t}function yc(){var t,e,n,s;return t=Aa,"schema"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Bs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="SCHEMA":(Aa=t,t=o)):(Aa=t,t=o),t}function Ec(){var t,e,n,s;return t=Aa,"on"===r.substr(Aa,2).toLowerCase()?(e=r.substr(Aa,2),Aa+=2):(e=o,0===Na&&Oa(Ws)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Ac(){var t,e,n,s;return t=Aa,"join"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(zs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function mc(){var t,e,n,s;return t=Aa,"outer"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Qs)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Tc(){var t,e,n,s;return t=Aa,"values"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(eo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Ic(){var t,e,n,s;return t=Aa,"using"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(no)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Nc(){var t,e,n,s;return t=Aa,"with"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(xt)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Rc(){var t,e,n,s;return t=Aa,"by"===r.substr(Aa,2).toLowerCase()?(e=r.substr(Aa,2),Aa+=2):(e=o,0===Na&&Oa(uo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Sc(){var t,e,n,s;return t=Aa,"asc"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(fo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="ASC":(Aa=t,t=o)):(Aa=t,t=o),t}function _c(){var t,e,n,s;return t=Aa,"desc"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(bo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="DESC":(Aa=t,t=o)):(Aa=t,t=o),t}function gc(){var t,e,n,s;return t=Aa,"all"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(po)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="ALL":(Aa=t,t=o)):(Aa=t,t=o),t}function Oc(){var t,e,n,s;return t=Aa,"distinct"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Lo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="DISTINCT":(Aa=t,t=o)):(Aa=t,t=o),t}function xc(){var t,e,n,s;return t=Aa,"between"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Co)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="BETWEEN":(Aa=t,t=o)):(Aa=t,t=o),t}function Uc(){var t,e,n,s;return t=Aa,"in"===r.substr(Aa,2).toLowerCase()?(e=r.substr(Aa,2),Aa+=2):(e=o,0===Na&&Oa(mt)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="IN":(Aa=t,t=o)):(Aa=t,t=o),t}function Mc(){var t,e,n,s;return t=Aa,"is"===r.substr(Aa,2).toLowerCase()?(e=r.substr(Aa,2),Aa+=2):(e=o,0===Na&&Oa(wo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="IS":(Aa=t,t=o)):(Aa=t,t=o),t}function kc(){var t,e,n,s;return t=Aa,"like"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(ho)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="LIKE":(Aa=t,t=o)):(Aa=t,t=o),t}function Dc(){var t,e,n,s;return t=Aa,"exists"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Ao)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="EXISTS":(Aa=t,t=o)):(Aa=t,t=o),t}function $c(){var t,e,n,s;return t=Aa,"not"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(mo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="NOT":(Aa=t,t=o)):(Aa=t,t=o),t}function Pc(){var t,e,n,s;return t=Aa,"and"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(To)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="AND":(Aa=t,t=o)):(Aa=t,t=o),t}function Fc(){var t,e,n,s;return t=Aa,"or"===r.substr(Aa,2).toLowerCase()?(e=r.substr(Aa,2),Aa+=2):(e=o,0===Na&&Oa(Io)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="OR":(Aa=t,t=o)):(Aa=t,t=o),t}function Gc(){var t,e,n,s;return t=Aa,"extract"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(xo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="EXTRACT":(Aa=t,t=o)):(Aa=t,t=o),t}function jc(){var t,e,n,s;return t=Aa,"case"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Mo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Hc(){var t,e,n,s;return t=Aa,"end"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(Po)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e=[e,n]:(Aa=t,t=o)):(Aa=t,t=o),t}function Yc(){var t,e,n,s;return t=Aa,"cast"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Fo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="CAST":(Aa=t,t=o)):(Aa=t,t=o),t}function Bc(){var t,e,n,s;return t=Aa,"binary"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Wr)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="BINARY":(Aa=t,t=o)):(Aa=t,t=o),t}function Wc(){var t,e,n,s;return t=Aa,"char"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Ho)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="CHAR":(Aa=t,t=o)):(Aa=t,t=o),t}function Xc(){var t,e,n,s;return t=Aa,"varchar"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Yo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="VARCHAR":(Aa=t,t=o)):(Aa=t,t=o),t}function Vc(){var t,e,n,s;return t=Aa,"numeric"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Bo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="NUMERIC":(Aa=t,t=o)):(Aa=t,t=o),t}function qc(){var t,e,n,s;return t=Aa,"decimal"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Wo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="DECIMAL":(Aa=t,t=o)):(Aa=t,t=o),t}function Kc(){var t,e,n,s;return t=Aa,"unsigned"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Vo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="UNSIGNED":(Aa=t,t=o)):(Aa=t,t=o),t}function Zc(){var t,e,n,s;return t=Aa,"int"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(qo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="INT":(Aa=t,t=o)):(Aa=t,t=o),t}function zc(){var t,e,n,s;return t=Aa,"integer"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Zo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="INTEGER":(Aa=t,t=o)):(Aa=t,t=o),t}function Qc(){var t,e,n,s;return t=Aa,"smallint"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Qo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="SMALLINT":(Aa=t,t=o)):(Aa=t,t=o),t}function Jc(){var t,e,n,s;return t=Aa,"mediumint"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(Jo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="MEDIUMINT":(Aa=t,t=o)):(Aa=t,t=o),t}function rf(){var t,e,n,s;return t=Aa,"tinyint"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(ru)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="TINYINT":(Aa=t,t=o)):(Aa=t,t=o),t}function tf(){var t,e,n,s;return t=Aa,"bigint"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(ou)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="BIGINT":(Aa=t,t=o)):(Aa=t,t=o),t}function ef(){var t,e,n,s;return t=Aa,"float"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(au)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="FLOAT":(Aa=t,t=o)):(Aa=t,t=o),t}function nf(){var t,e,n,s;return t=Aa,"double"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(iu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="DOUBLE":(Aa=t,t=o)):(Aa=t,t=o),t}function sf(){var t,e,n,s;return t=Aa,"date"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(an)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="DATE":(Aa=t,t=o)):(Aa=t,t=o),t}function of(){var t,e,n,s;return t=Aa,"datetime"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(lu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="DATETIME":(Aa=t,t=o)):(Aa=t,t=o),t}function uf(){var t,e,n,s;return t=Aa,"rows"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(cu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="ROWS":(Aa=t,t=o)):(Aa=t,t=o),t}function af(){var t,e,n,s;return t=Aa,"time"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Tn)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="TIME":(Aa=t,t=o)):(Aa=t,t=o),t}function lf(){var t,e,n,s;return t=Aa,"timestamp"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(fu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="TIMESTAMP":(Aa=t,t=o)):(Aa=t,t=o),t}function cf(){var t,e,n,s;return t=Aa,"year"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(Rn)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="YEAR":(Aa=t,t=o)):(Aa=t,t=o),t}function ff(){var t,e,n,s;return t=Aa,"interval"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Lu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="INTERVAL":(Aa=t,t=o)):(Aa=t,t=o),t}function bf(){var t,e,n,s;return t=Aa,"current_timestamp"===r.substr(Aa,17).toLowerCase()?(e=r.substr(Aa,17),Aa+=17):(e=o,0===Na&&Oa(du)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="CURRENT_TIMESTAMP":(Aa=t,t=o)):(Aa=t,t=o),t}function vf(){var t,e,n,s;return t=Aa,"current_user"===r.substr(Aa,12).toLowerCase()?(e=r.substr(Aa,12),Aa+=12):(e=o,0===Na&&Oa(wu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="CURRENT_USER":(Aa=t,t=o)):(Aa=t,t=o),t}function pf(){var t,e,n,s;return t=Aa,"view"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(ft)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="VIEW":(Aa=t,t=o)):(Aa=t,t=o),t}function Lf(){var t;return 64===r.charCodeAt(Aa)?(t="@",Aa++):(t=o,0===Na&&Oa(_)),t}function Cf(){var t;return(t=function(){var t;return"@@"===r.substr(Aa,2)?(t="@@",Aa+=2):(t=o,0===Na&&Oa(Uu)),t}())===o&&(t=Lf())===o&&(t=function(){var t;return 36===r.charCodeAt(Aa)?(t="$",Aa++):(t=o,0===Na&&Oa(Mu)),t}()),t}function df(){var t;return":="===r.substr(Aa,2)?(t=":=",Aa+=2):(t=o,0===Na&&Oa(Du)),t}function wf(){var t;return 61===r.charCodeAt(Aa)?(t="=",Aa++):(t=o,0===Na&&Oa(Kt)),t}function hf(){var t,e,n,s;return t=Aa,"add"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(Pu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="ADD":(Aa=t,t=o)):(Aa=t,t=o),t}function yf(){var t,e,n,s;return t=Aa,"column"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(Fu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="COLUMN":(Aa=t,t=o)):(Aa=t,t=o),t}function Ef(){var t,e,n,s;return t=Aa,"index"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Gu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="INDEX":(Aa=t,t=o)):(Aa=t,t=o),t}function Af(){var t,e,n,s;return t=Aa,"key"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(R)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="KEY":(Aa=t,t=o)):(Aa=t,t=o),t}function mf(){var t,e,n,s;return t=Aa,"fulltext"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Hu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="FULLTEXT":(Aa=t,t=o)):(Aa=t,t=o),t}function Tf(){var t,e,n,s;return t=Aa,"spatial"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Yu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="SPATIAL":(Aa=t,t=o)):(Aa=t,t=o),t}function If(){var t,e,n,s;return t=Aa,"unique"===r.substr(Aa,6).toLowerCase()?(e=r.substr(Aa,6),Aa+=6):(e=o,0===Na&&Oa(N)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="UNIQUE":(Aa=t,t=o)):(Aa=t,t=o),t}function Nf(){var t,e,n,s;return t=Aa,"comment"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Bu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="COMMENT":(Aa=t,t=o)):(Aa=t,t=o),t}function Rf(){var t,e,n,s;return t=Aa,"references"===r.substr(Aa,10).toLowerCase()?(e=r.substr(Aa,10),Aa+=10):(e=o,0===Na&&Oa(Xu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="REFERENCES":(Aa=t,t=o)):(Aa=t,t=o),t}function Sf(){var t;return 46===r.charCodeAt(Aa)?(t=".",Aa++):(t=o,0===Na&&Oa(cs)),t}function _f(){var t;return 44===r.charCodeAt(Aa)?(t=",",Aa++):(t=o,0===Na&&Oa(Ju)),t}function gf(){var t;return 42===r.charCodeAt(Aa)?(t="*",Aa++):(t=o,0===Na&&Oa(ie)),t}function Of(){var t;return 40===r.charCodeAt(Aa)?(t="(",Aa++):(t=o,0===Na&&Oa(Et)),t}function xf(){var t;return 41===r.charCodeAt(Aa)?(t=")",Aa++):(t=o,0===Na&&Oa(At)),t}function Uf(){var t;return 59===r.charCodeAt(Aa)?(t=";",Aa++):(t=o,0===Na&&Oa(ea)),t}function Mf(){var t;return(t=function(){var t;return"||"===r.substr(Aa,2)?(t="||",Aa+=2):(t=o,0===Na&&Oa(fe)),t}())===o&&(t=function(){var t;return"&&"===r.substr(Aa,2)?(t="&&",Aa+=2):(t=o,0===Na&&Oa(na)),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"xor"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(sa)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="XOR":(Aa=t,t=o)):(Aa=t,t=o),t}()),t}function kf(){var r,t;for(r=[],(t=Gf())===o&&(t=$f());t!==o;)r.push(t),(t=Gf())===o&&(t=$f());return r}function Df(){var r,t;if(r=[],(t=Gf())===o&&(t=$f()),t!==o)for(;t!==o;)r.push(t),(t=Gf())===o&&(t=$f());else r=o;return r}function $f(){var t;return(t=function(){var t,e,n,s,u,a;if(t=Aa,"/*"===r.substr(Aa,2)?(e="/*",Aa+=2):(e=o,0===Na&&Oa(oa)),e!==o){for(n=[],s=Aa,u=Aa,Na++,"*/"===r.substr(Aa,2)?(a="*/",Aa+=2):(a=o,0===Na&&Oa(ua)),Na--,a===o?u=void 0:(Aa=u,u=o),u!==o&&(a=Ff())!==o?s=u=[u,a]:(Aa=s,s=o);s!==o;)n.push(s),s=Aa,u=Aa,Na++,"*/"===r.substr(Aa,2)?(a="*/",Aa+=2):(a=o,0===Na&&Oa(ua)),Na--,a===o?u=void 0:(Aa=u,u=o),u!==o&&(a=Ff())!==o?s=u=[u,a]:(Aa=s,s=o);n!==o?("*/"===r.substr(Aa,2)?(s="*/",Aa+=2):(s=o,0===Na&&Oa(ua)),s!==o?t=e=[e,n,s]:(Aa=t,t=o)):(Aa=t,t=o)}else Aa=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=Aa,"--"===r.substr(Aa,2)?(e="--",Aa+=2):(e=o,0===Na&&Oa(aa)),e!==o){for(n=[],s=Aa,u=Aa,Na++,a=jf(),Na--,a===o?u=void 0:(Aa=u,u=o),u!==o&&(a=Ff())!==o?s=u=[u,a]:(Aa=s,s=o);s!==o;)n.push(s),s=Aa,u=Aa,Na++,a=jf(),Na--,a===o?u=void 0:(Aa=u,u=o),u!==o&&(a=Ff())!==o?s=u=[u,a]:(Aa=s,s=o);n!==o?t=e=[e,n]:(Aa=t,t=o)}else Aa=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=Aa,35===r.charCodeAt(Aa)?(e="#",Aa++):(e=o,0===Na&&Oa(ia)),e!==o){for(n=[],s=Aa,u=Aa,Na++,a=jf(),Na--,a===o?u=void 0:(Aa=u,u=o),u!==o&&(a=Ff())!==o?s=u=[u,a]:(Aa=s,s=o);s!==o;)n.push(s),s=Aa,u=Aa,Na++,a=jf(),Na--,a===o?u=void 0:(Aa=u,u=o),u!==o&&(a=Ff())!==o?s=u=[u,a]:(Aa=s,s=o);n!==o?t=e=[e,n]:(Aa=t,t=o)}else Aa=t,t=o;return t}()),t}function Pf(){var r,t,e,n,s,u,a;return r=Aa,(t=Nf())!==o&&kf()!==o?((e=wf())===o&&(e=null),e!==o&&kf()!==o&&(n=Gl())!==o?(u=e,a=n,r=t={type:(s=t).toLowerCase(),keyword:s.toLowerCase(),symbol:u,value:a}):(Aa=r,r=o)):(Aa=r,r=o),r}function Ff(){var t;return r.length>Aa?(t=r.charAt(Aa),Aa++):(t=o,0===Na&&Oa(la)),t}function Gf(){var t;return ca.test(r.charAt(Aa))?(t=r.charAt(Aa),Aa++):(t=o,0===Na&&Oa(fa)),t}function jf(){var t,e;if((t=function(){var t,e;return t=Aa,Na++,r.length>Aa?(e=r.charAt(Aa),Aa++):(e=o,0===Na&&Oa(la)),Na--,e===o?t=void 0:(Aa=t,t=o),t}())===o)if(t=[],is.test(r.charAt(Aa))?(e=r.charAt(Aa),Aa++):(e=o,0===Na&&Oa(ls)),e!==o)for(;e!==o;)t.push(e),is.test(r.charAt(Aa))?(e=r.charAt(Aa),Aa++):(e=o,0===Na&&Oa(ls));else t=o;return t}function Hf(){var t,e;return t=Aa,bb=[],void 0!==o&&kf()!==o?((e=Yf())===o&&(e=function(){var t,e;return t=Aa,function(){var t;return"return"===r.substr(Aa,6).toLowerCase()?(t=r.substr(Aa,6),Aa+=6):(t=o,0===Na&&Oa(ku)),t}()!==o&&kf()!==o&&(e=Bf())!==o?t={type:"return",expr:e}:(Aa=t,t=o),t}()),e!==o?t={stmt:e,vars:bb}:(Aa=t,t=o)):(Aa=t,t=o),t}function Yf(){var r,t,e,n;return r=Aa,(t=Qf())===o&&(t=Jf()),t!==o&&kf()!==o?((e=df())===o&&(e=wf()),e!==o&&kf()!==o&&(n=Bf())!==o?r=t=ba(t,e,n):(Aa=r,r=o)):(Aa=r,r=o),r}function Bf(){var t;return(t=fi())===o&&(t=function(){var r,t,e,n,s;return r=Aa,(t=Qf())!==o&&kf()!==o&&(e=gi())!==o&&kf()!==o&&(n=Qf())!==o&&kf()!==o&&(s=xi())!==o?r=t={type:"join",ltable:t,rtable:n,op:e,on:s}:(Aa=r,r=o),r}())===o&&(t=Wf())===o&&(t=function(){var t,e;return t=Aa,function(){var t;return 91===r.charCodeAt(Aa)?(t="[",Aa++):(t=o,0===Na&&Oa(ra)),t}()!==o&&kf()!==o&&(e=zf())!==o&&kf()!==o&&function(){var t;return 93===r.charCodeAt(Aa)?(t="]",Aa++):(t=o,0===Na&&Oa(ta)),t}()!==o?t={type:"array",value:e}:(Aa=t,t=o),t}()),t}function Wf(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Xf())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=il())!==o&&(a=kf())!==o&&(i=Xf())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=il())!==o&&(a=kf())!==o&&(i=Xf())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=zt(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function Xf(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Vf())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=cl())!==o&&(a=kf())!==o&&(i=Vf())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=cl())!==o&&(a=kf())!==o&&(i=Vf())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=zt(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function Vf(){var r,t,e;return(r=Kf())===o&&(r=Pl())===o&&(r=Qf())===o&&(r=vl())===o&&(r=Zf())===o&&(r=Il())===o&&(r=Aa,Of()!==o&&kf()!==o&&(t=Wf())!==o&&kf()!==o&&xf()!==o?((e=t).parentheses=!0,r=e):(Aa=r,r=o)),r}function qf(){var r,t,e,n,s,u,a;return r=Aa,(t=El())===o&&(t=Cl()),t!==o?(e=Aa,(n=kf())!==o&&(s=Sf())!==o&&(u=kf())!==o?((a=El())===o&&(a=Cl()),a!==o?e=n=[n,s,u,a]:(Aa=e,e=o)):(Aa=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){let e=r;return null!==t&&(e=`${r}.${t[3]}`),e}(t,e):(Aa=r,r=o)):(Aa=r,r=o),r}function Kf(){var r,t,e;return r=Aa,(t=qf())!==o&&kf()!==o&&Of()!==o&&kf()!==o?((e=zf())===o&&(e=null),e!==o&&kf()!==o&&xf()!==o?r=t={type:"function",name:t,args:{type:"expr_list",value:e}}:(Aa=r,r=o)):(Aa=r,r=o),r}function Zf(){var r;return(r=qf())!==o&&(r={type:"function",name:r,args:null}),r}function zf(){var r,t,e,n,s,u,a,i;if(r=Aa,(t=Vf())!==o){for(e=[],n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Vf())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);n!==o;)e.push(n),n=Aa,(s=kf())!==o&&(u=_f())!==o&&(a=kf())!==o&&(i=Vf())!==o?n=s=[s,u,a,i]:(Aa=n,n=o);e!==o?r=t=T(t,e):(Aa=r,r=o)}else Aa=r,r=o;return r}function Qf(){var r,t,e,n,s;return r=Aa,(t=Cf())!==o&&(e=Jf())!==o?(n=t,s=e,r=t={type:"var",...s,prefix:n}):(Aa=r,r=o),r}function Jf(){var t,e,n,s,u;return t=Aa,(e=El())!==o&&(n=function(){var t,e,n,s;for(t=[],e=Aa,46===r.charCodeAt(Aa)?(n=".",Aa++):(n=o,0===Na&&Oa(cs)),n!==o&&(s=El())!==o?e=n=[n,s]:(Aa=e,e=o);e!==o;)t.push(e),e=Aa,46===r.charCodeAt(Aa)?(n=".",Aa++):(n=o,0===Na&&Oa(cs)),n!==o&&(s=El())!==o?e=n=[n,s]:(Aa=e,e=o);return t!==o&&(t=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e][1]);return t}(t)),t}())!==o?(s=e,u=n,bb.push(s),t=e={type:"var",name:s,members:u,prefix:null}):(Aa=t,t=o),t===o&&(t=Aa,(e=Bl())!==o&&(e={type:"var",name:e.value,members:[],quoted:null,prefix:null}),t=e),t}function rb(){var t;return(t=tb())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(t=Aa,(e=Vc())===o&&(e=qc())===o&&(e=Zc())===o&&(e=zc())===o&&(e=Qc())===o&&(e=Jc())===o&&(e=rf())===o&&(e=tf())===o&&(e=ef())===o&&(e=nf())===o&&(e=function(){var t,e,n,s;return t=Aa,"bit"===r.substr(Aa,3).toLowerCase()?(e=r.substr(Aa,3),Aa+=3):(e=o,0===Na&&Oa(jo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="BIT":(Aa=t,t=o)):(Aa=t,t=o),t}()),e!==o)if((n=kf())!==o)if((s=Of())!==o)if((u=kf())!==o){if(a=[],ir.test(r.charAt(Aa))?(i=r.charAt(Aa),Aa++):(i=o,0===Na&&Oa(lr)),i!==o)for(;i!==o;)a.push(i),ir.test(r.charAt(Aa))?(i=r.charAt(Aa),Aa++):(i=o,0===Na&&Oa(lr));else a=o;if(a!==o)if((i=kf())!==o){if(l=Aa,(c=_f())!==o)if((f=kf())!==o){if(b=[],ir.test(r.charAt(Aa))?(v=r.charAt(Aa),Aa++):(v=o,0===Na&&Oa(lr)),v!==o)for(;v!==o;)b.push(v),ir.test(r.charAt(Aa))?(v=r.charAt(Aa),Aa++):(v=o,0===Na&&Oa(lr));else b=o;b!==o?l=c=[c,f,b]:(Aa=l,l=o)}else Aa=l,l=o;else Aa=l,l=o;l===o&&(l=null),l!==o&&(c=kf())!==o&&(f=xf())!==o&&(b=kf())!==o?((v=eb())===o&&(v=null),v!==o?(p=l,L=v,t=e={dataType:e,length:parseInt(a.join(""),10),scale:p&&parseInt(p[2].join(""),10),parentheses:!0,suffix:L}):(Aa=t,t=o)):(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o}else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;if(t===o){if(t=Aa,(e=Vc())===o&&(e=qc())===o&&(e=Zc())===o&&(e=zc())===o&&(e=Qc())===o&&(e=Jc())===o&&(e=rf())===o&&(e=tf())===o&&(e=ef())===o&&(e=nf()),e!==o){if(n=[],ir.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(lr)),s!==o)for(;s!==o;)n.push(s),ir.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(lr));else n=o;n!==o&&(s=kf())!==o?((u=eb())===o&&(u=null),u!==o?(e=function(r,t,e){return{dataType:r,length:parseInt(t.join(""),10),suffix:e}}(e,n,u),t=e):(Aa=t,t=o)):(Aa=t,t=o)}else Aa=t,t=o;t===o&&(t=Aa,(e=Vc())===o&&(e=qc())===o&&(e=Zc())===o&&(e=zc())===o&&(e=Qc())===o&&(e=Jc())===o&&(e=rf())===o&&(e=tf())===o&&(e=ef())===o&&(e=nf()),e!==o&&(n=kf())!==o?((s=eb())===o&&(s=null),s!==o&&(u=kf())!==o?(e=function(r,t){return{dataType:r,suffix:t}}(e,s),t=e):(Aa=t,t=o)):(Aa=t,t=o))}return t}())===o&&(t=function(){var t,e,n,s;return t=Aa,(e=sf())===o&&(e=of())===o&&(e=af())===o&&(e=lf())===o&&(e=cf()),e!==o&&kf()!==o&&Of()!==o&&kf()!==o?(ha.test(r.charAt(Aa))?(n=r.charAt(Aa),Aa++):(n=o,0===Na&&Oa(ya)),n!==o&&kf()!==o&&xf()!==o&&kf()!==o?((s=eb())===o&&(s=null),s!==o?t=e={dataType:e,length:parseInt(n,10),parentheses:!0}:(Aa=t,t=o)):(Aa=t,t=o)):(Aa=t,t=o),t===o&&(t=Aa,(e=sf())===o&&(e=of())===o&&(e=af())===o&&(e=lf())===o&&(e=cf()),e!==o&&(e=wa(e)),t=e),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=Aa,"json"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(zo)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="JSON":(Aa=t,t=o)):(Aa=t,t=o),t}())!==o&&(t=wa(t)),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=Aa,"tinytext"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(tu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="TINYTEXT":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"text"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(eu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="TEXT":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"mediumtext"===r.substr(Aa,10).toLowerCase()?(e=r.substr(Aa,10),Aa+=10):(e=o,0===Na&&Oa(nu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="MEDIUMTEXT":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"longtext"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(su)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="LONGTEXT":(Aa=t,t=o)):(Aa=t,t=o),t}()),t!==o&&(t=Ea(t)),t}())===o&&(t=function(){var t,e,n,s,u;return t=Aa,(e=function(){var t,e,n,s;return t=Aa,"enum"===r.substr(Aa,4).toLowerCase()?(e=r.substr(Aa,4),Aa+=4):(e=o,0===Na&&Oa(uu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="ENUM":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(e=pc()),e!==o&&kf()!==o&&(n=Xi())!==o?(s=e,(u=n).parentheses=!0,t=e={dataType:s,expr:u}):(Aa=t,t=o),t}())===o&&(t=function(){var t;return"boolean"===r.substr(Aa,7).toLowerCase()?(t=r.substr(Aa,7),Aa+=7):(t=o,0===Na&&Oa(va)),t!==o&&(t={dataType:"BOOLEAN"}),t}())===o&&(t=function(){var t,e,n,s;if(t=Aa,(e=Bc())===o&&(e=function(){var t,e,n,s;return t=Aa,"varbinary"===r.substr(Aa,9).toLowerCase()?(e=r.substr(Aa,9),Aa+=9):(e=o,0===Na&&Oa(Go)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="VARBINARY":(Aa=t,t=o)):(Aa=t,t=o),t}()),e!==o)if(kf()!==o)if(Of()!==o)if(kf()!==o){if(n=[],ir.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(lr)),s!==o)for(;s!==o;)n.push(s),ir.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(lr));else n=o;n!==o&&(s=kf())!==o&&xf()!==o?t=e={dataType:e,length:parseInt(n.join(""),10)}:(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;return t===o&&(t=Aa,(e=Bc())!==o&&(e=wa(e)),t=e),t}())===o&&(t=function(){var t;return"blob"===r.substr(Aa,4).toLowerCase()?(t=r.substr(Aa,4),Aa+=4):(t=o,0===Na&&Oa(pa)),t===o&&("tinyblob"===r.substr(Aa,8).toLowerCase()?(t=r.substr(Aa,8),Aa+=8):(t=o,0===Na&&Oa(La)),t===o&&("mediumblob"===r.substr(Aa,10).toLowerCase()?(t=r.substr(Aa,10),Aa+=10):(t=o,0===Na&&Oa(Ca)),t===o&&("longblob"===r.substr(Aa,8).toLowerCase()?(t=r.substr(Aa,8),Aa+=8):(t=o,0===Na&&Oa(da))))),t!==o&&(t={dataType:t.toUpperCase()}),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=Aa,"geometry"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Iu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="GEOMETRY":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"point"===r.substr(Aa,5).toLowerCase()?(e=r.substr(Aa,5),Aa+=5):(e=o,0===Na&&Oa(Nu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="POINT":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"linestring"===r.substr(Aa,10).toLowerCase()?(e=r.substr(Aa,10),Aa+=10):(e=o,0===Na&&Oa(Ru)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="LINESTRING":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"polygon"===r.substr(Aa,7).toLowerCase()?(e=r.substr(Aa,7),Aa+=7):(e=o,0===Na&&Oa(Su)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="POLYGON":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"multipoint"===r.substr(Aa,10).toLowerCase()?(e=r.substr(Aa,10),Aa+=10):(e=o,0===Na&&Oa(_u)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="MULTIPOINT":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"multilinestring"===r.substr(Aa,15).toLowerCase()?(e=r.substr(Aa,15),Aa+=15):(e=o,0===Na&&Oa(gu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="MULTILINESTRING":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"multipolygon"===r.substr(Aa,12).toLowerCase()?(e=r.substr(Aa,12),Aa+=12):(e=o,0===Na&&Oa(Ou)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="MULTIPOLYGON":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Aa,"geometrycollection"===r.substr(Aa,18).toLowerCase()?(e=r.substr(Aa,18),Aa+=18):(e=o,0===Na&&Oa(xu)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="GEOMETRYCOLLECTION":(Aa=t,t=o)):(Aa=t,t=o),t}()),t!==o&&(t=Ea(t)),t}()),t}function tb(){var t,e,n,s;if(t=Aa,(e=Wc())===o&&(e=Xc()),e!==o)if(kf()!==o)if(Of()!==o)if(kf()!==o){if(n=[],ir.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(lr)),s!==o)for(;s!==o;)n.push(s),ir.test(r.charAt(Aa))?(s=r.charAt(Aa),Aa++):(s=o,0===Na&&Oa(lr));else n=o;n!==o&&(s=kf())!==o&&xf()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(Aa=t,t=o)}else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;else Aa=t,t=o;return t===o&&(t=Aa,(e=Wc())!==o&&(e=wa(e)),(t=e)===o&&(t=Aa,(e=Xc())!==o&&(e=wa(e)),t=e)),t}function eb(){var t,e,n;return t=Aa,(e=Kc())===o&&(e=null),e!==o&&kf()!==o?((n=function(){var t,e,n,s;return t=Aa,"zerofill"===r.substr(Aa,8).toLowerCase()?(e=r.substr(Aa,8),Aa+=8):(e=o,0===Na&&Oa(Ko)),e!==o?(n=Aa,Na++,s=Al(),Na--,s===o?n=void 0:(Aa=n,n=o),n!==o?t=e="ZEROFILL":(Aa=t,t=o)):(Aa=t,t=o),t}())===o&&(n=null),n!==o?t=e=function(r,t){const e=[];return r&&e.push(r),t&&e.push(t),e}(e,n):(Aa=t,t=o)):(Aa=t,t=o),t}const nb={ALTER:!0,ALL:!0,ADD:!0,AND:!0,AS:!0,ASC:!0,BETWEEN:!0,BY:!0,BOOLEAN:!0,CALL:!0,CASCADE:!0,CASE:!0,CREATE:!0,CONTAINS:!0,CROSS:!0,CURRENT_DATE:!0,CURRENT_TIME:!0,CURRENT_TIMESTAMP:!0,CURRENT_USER:!0,DELETE:!0,DESC:!0,DISTINCT:!0,DROP:!0,ELSE:!0,END:!0,EXISTS:!0,EXPLAIN:!0,FALSE:!0,FOR:!0,FROM:!0,FULL:!0,GROUP:!0,HAVING:!0,IN:!0,INNER:!0,INSERT:!0,INTERSECT:!0,INTO:!0,IS:!0,JOIN:!0,JSON:!0,KEY:!0,LEFT:!0,LIKE:!0,LIMIT:!0,LOW_PRIORITY:!0,NATURAL:!0,MINUS:!0,NOT:!0,NULL:!0,ON:!0,OR:!0,ORDER:!0,OUTER:!0,RECURSIVE:!0,RENAME:!0,RIGHT:!0,READ:!0,SELECT:!0,SESSION_USER:!0,SET:!0,SHOW:!0,STATUS:!0,SYSTEM_USER:!0,TABLE:!0,THEN:!0,TRUE:!0,TRUNCATE:!0,UNION:!0,UPDATE:!0,USING:!0,VALUES:!0,WITH:!0,WHEN:!0,WHERE:!0,WRITE:!0,GLOBAL:!0,SESSION:!0,LOCAL:!0,PERSIST:!0,PERSIST_ONLY:!0},sb={avg:!0,sum:!0,count:!0,max:!0,min:!0,group_concat:!0,std:!0,variance:!0,current_date:!0,current_time:!0,current_timestamp:!0,current_user:!0,user:!0,session_user:!0,system_user:!0};function ob(r,t){return{type:"unary_expr",operator:r,expr:t}}function ub(r,t,e){return{type:"binary_expr",operator:r,left:t,right:e}}function ab(r){const t=n(Number.MAX_SAFE_INTEGER);return!(n(r)<t)}function ib(r,t,e=3){const n=[r];for(let r=0;r<t.length;r++)delete t[r][e].tableList,delete t[r][e].columnList,n.push(t[r][e]);return n}function lb(r,t){let e=r;for(let r=0;r<t.length;r++)e=ub(t[r][1],e,t[r][3]);return e}function cb(r){return Lb[r]||r||null}function fb(r){const t=new Set;for(let e of r.keys()){const r=e.split("::");if(!r){t.add(e);break}r&&r[1]&&(r[1]=cb(r[1])),t.add(r.join("::"))}return Array.from(t)}let bb=[];const vb=new Set,pb=new Set,Lb={};if((e=a())!==o&&Aa===r.length)return e;throw e!==o&&Aa<r.length&&Oa({type:"end"}),function(r,t,e){return new s(s.buildMessage(r,t),r,t,e)}(Ia,Ta<r.length?r.charAt(Ta):null,Ta<r.length?ga(Ta,Ta+1):ga(Ta,Ta))}}},function(r,t,e){var n=e(0);function s(r,t,e,n){this.message=r,this.expected=t,this.found=e,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,s)}!function(r,t){function e(){this.constructor=r}e.prototype=t.prototype,r.prototype=new e}(s,Error),s.buildMessage=function(r,t){var e={literal:function(r){return'"'+s(r.text)+'"'},class:function(r){var t,e="";for(t=0;t<r.parts.length;t++)e+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+e+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function n(r){return r.charCodeAt(0).toString(16).toUpperCase()}function s(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}function o(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}return"Expected "+function(r){var t,n,s,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(s=r[t],e[s.type](s));if(o.sort(),o.length>0){for(t=1,n=1;t<o.length;t++)o[t-1]!==o[t]&&(o[n]=o[t],n++);o.length=n}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+s(r)+'"':"end of input"}(t)+" found."},r.exports={SyntaxError:s,parse:function(r,t){t=void 0!==t?t:{};var e,o={},u={start:_i},a=_i,i=Ti("IF",!0),l=Ti("EXTENSION",!0),c=Ti("SCHEMA",!0),f=Ti("VERSION",!0),b=Ti("CASCADED",!0),v=Ti("LOCAL",!0),p=Ti("CHECK",!0),L=Ti("OPTION",!1),C=Ti("check_option",!0),d=Ti("security_barrier",!0),w=Ti("security_invoker",!0),h=Ti("SFUNC",!0),y=Ti("STYPE",!0),E=Ti("AGGREGATE",!0),A=Ti("RETURNS",!0),m=Ti("SETOF",!0),T=Ti("CONSTANT",!0),I=Ti(":=",!1),N=Ti("BEGIN",!0),R=Ti("DECLARE",!0),S=Ti("LANGUAGE",!1),_=Ti("TRANSORM",!0),g=Ti("FOR",!1),O=Ti("TYPE",!1),x=Ti("WINDOW",!0),U=Ti("IMMUTABLE",!0),M=Ti("STABLE",!0),k=Ti("VOLATILE",!0),D=Ti("STRICT",!0),$=Ti("NOT",!0),P=Ti("LEAKPROOF",!0),F=Ti("CALLED",!0),G=Ti("NULL",!0),j=Ti("ON",!0),H=Ti("INPUT",!0),Y=Ti("EXTERNAL",!0),B=Ti("SECURITY",!0),W=Ti("INVOKER",!0),X=Ti("DEFINER",!0),V=Ti("PARALLEL",!0),q=Ti("UNSAFE",!0),K=Ti("RESTRICTED",!0),Z=Ti("SAFE",!0),z=/^[^ s\t\n\r]/,Q=Ii([" ","s","\t","\n","\r"],!0,!1),J=/^[^ s\t\n\r;]/,rr=Ii([" ","s","\t","\n","\r",";"],!0,!1),tr=Ti("COST",!0),er=Ti("ROWS",!0),nr=Ti("SUPPORT",!0),sr=Ti("TO",!0),or=Ti("=",!1),ur=Ti("CURRENT",!0),ar=Ti("FUNCTION",!0),ir=Ti("TYPE",!0),lr=Ti("DOMAIN",!0),cr=Ti("INCREMENT",!0),fr=Ti("MINVALUE",!0),br=function(r,t){return{resource:"sequence",prefix:r.toLowerCase(),value:t}},vr=Ti("NO",!0),pr=Ti("MAXVALUE",!0),Lr=Ti("START",!0),Cr=Ti("CACHE",!0),dr=Ti("CYCLE",!0),wr=Ti("OWNED",!0),hr=Ti("NONE",!0),yr=Ti("NULLS",!0),Er=Ti("FIRST",!0),Ar=Ti("LAST",!0),mr=Ti("AUTO_INCREMENT",!0),Tr=Ti("UNIQUE",!0),Ir=Ti("KEY",!0),Nr=Ti("PRIMARY",!0),Rr=Ti("COLUMN_FORMAT",!0),Sr=Ti("FIXED",!0),_r=Ti("DYNAMIC",!0),gr=Ti("DEFAULT",!0),Or=Ti("STORAGE",!0),xr=Ti("DISK",!0),Ur=Ti("MEMORY",!0),Mr=Ti("CASCADE",!0),kr=Ti("RESTRICT",!0),Dr=Ti("OUT",!0),$r=Ti("VARIADIC",!0),Pr=Ti("INOUT",!0),Fr=Ti("OWNER",!0),Gr=Ti("CURRENT_ROLE",!0),jr=Ti("CURRENT_USER",!0),Hr=Ti("SESSION_USER",!0),Yr=Ti("ALGORITHM",!0),Br=Ti("INSTANT",!0),Wr=Ti("INPLACE",!0),Xr=Ti("COPY",!0),Vr=Ti("LOCK",!0),qr=Ti("SHARED",!0),Kr=Ti("EXCLUSIVE",!0),Zr=Ti("PRIMARY KEY",!0),zr=Ti("FOREIGN KEY",!0),Qr=Ti("MATCH FULL",!0),Jr=Ti("MATCH PARTIAL",!0),rt=Ti("MATCH SIMPLE",!0),tt=Ti("SET NULL",!0),et=Ti("NO ACTION",!0),nt=Ti("SET DEFAULT",!0),st=Ti("TRIGGER",!0),ot=Ti("BEFORE",!0),ut=Ti("AFTER",!0),at=Ti("INSTEAD OF",!0),it=Ti("EXECUTE",!0),lt=Ti("PROCEDURE",!0),ct=Ti("OF",!0),ft=Ti("DEFERRABLE",!0),bt=Ti("INITIALLY IMMEDIATE",!0),vt=Ti("INITIALLY DEFERRED",!0),pt=Ti("FOR",!0),Lt=Ti("EACH",!0),Ct=Ti("ROW",!0),dt=Ti("STATEMENT",!0),wt=Ti("CHARACTER",!0),ht=Ti("SET",!0),yt=Ti("CHARSET",!0),Et=Ti("COLLATE",!0),At=Ti("AVG_ROW_LENGTH",!0),mt=Ti("KEY_BLOCK_SIZE",!0),Tt=Ti("MAX_ROWS",!0),It=Ti("MIN_ROWS",!0),Nt=Ti("STATS_SAMPLE_PAGES",!0),Rt=Ti("CONNECTION",!0),St=Ti("COMPRESSION",!0),_t=Ti("'",!1),gt=Ti("ZLIB",!0),Ot=Ti("LZ4",!0),xt=Ti("ENGINE",!0),Ut=Ti("IN",!0),Mt=Ti("ACCESS SHARE",!0),kt=Ti("ROW SHARE",!0),Dt=Ti("ROW EXCLUSIVE",!0),$t=Ti("SHARE UPDATE EXCLUSIVE",!0),Pt=Ti("SHARE ROW EXCLUSIVE",!0),Ft=Ti("ACCESS EXCLUSIVE",!0),Gt=Ti("SHARE",!0),jt=Ti("MODE",!0),Ht=Ti("NOWAIT",!0),Yt=Ti("TABLES",!0),Bt=Ti("PREPARE",!0),Wt=Ti("USAGE",!0),Xt=function(r){return{type:"origin",value:Array.isArray(r)?r[0]:r}},Vt=Ti("CONNECT",!0),qt=Ti("PRIVILEGES",!0),Kt=function(r){return{type:"origin",value:r}},Zt=Ti("SEQUENCE",!0),zt=Ti("DATABASE",!0),Qt=Ti("DOMAIN",!1),Jt=Ti("FUNCTION",!1),re=Ti("ROUTINE",!0),te=Ti("LANGUAGE",!0),ee=Ti("LARGE",!0),ne=Ti("SCHEMA",!1),se=Ti("FUNCTIONS",!0),oe=Ti("PROCEDURES",!0),ue=Ti("ROUTINES",!0),ae=Ti("PUBLIC",!0),ie=Ti("GRANT",!0),le=Ti("OPTION",!0),ce=Ti("ADMIN",!0),fe=Ti("REVOKE",!0),be=Ti("ELSEIF",!0),ve=Ti("THEN",!0),pe=Ti("END",!0),Le=Ti("DEBUG",!0),Ce=Ti("LOG",!0),de=Ti("INFO",!0),we=Ti("NOTICE",!0),he=Ti("WARNING",!0),ye=Ti("EXCEPTION",!0),Ee=Ti("MESSAGE",!0),Ae=Ti("DETAIL",!0),me=Ti("HINT",!0),Te=Ti("ERRCODE",!0),Ie=Ti("COLUMN",!0),Ne=Ti("CONSTRAINT",!0),Re=Ti("DATATYPE",!0),Se=Ti("TABLE",!0),_e=Ti("SQLSTATE",!0),ge=Ti("RAISE",!0),Oe=Ti("LOOP",!0),xe=Ti(";",!1),Ue=Ti("(",!1),Me=Ti(")",!1),ke=Ti('"',!1),De=Ti("OUTFILE",!0),$e=Ti("DUMPFILE",!0),Pe=Ti("BTREE",!0),Fe=Ti("HASH",!0),Ge=Ti("GIST",!0),je=Ti("GIN",!0),He=Ti("WITH",!0),Ye=Ti("PARSER",!0),Be=Ti("VISIBLE",!0),We=Ti("INVISIBLE",!0),Xe=function(r,t){return t.unshift(r),t.forEach((r=>{const{table:t,as:e}=r;ip[t]=t,e&&(ip[e]=t),function(r){const t=np(r);r.clear(),t.forEach((t=>r.add(t)))}(ap)})),t},Ve=Ti("LATERAL",!0),qe=Ti("TABLESAMPLE",!0),Ke=Ti("REPEATABLE",!0),Ze=Ti("CROSS",!0),ze=Ti("FOLLOWING",!0),Qe=Ti("PRECEDING",!0),Je=Ti("UNBOUNDED",!0),rn=Ti("DO",!0),tn=Ti("NOTHING",!0),en=Ti("CONFLICT",!0),nn=function(r,t){return tp(r,t)},sn=Ti("!",!1),on=Ti(">=",!1),un=Ti(">",!1),an=Ti("<=",!1),ln=Ti("<>",!1),cn=Ti("<",!1),fn=Ti("!=",!1),bn=Ti("SIMILAR",!0),vn=Ti("!~*",!1),pn=Ti("~*",!1),Ln=Ti("~",!1),Cn=Ti("!~",!1),dn=Ti("ESCAPE",!0),wn=Ti("@>",!1),hn=Ti("<@",!1),yn=Ti("?",!1),En=Ti("?|",!1),An=Ti("?&",!1),mn=Ti("#-",!1),Tn=Ti("+",!1),In=Ti("-",!1),Nn=Ti("*",!1),Rn=Ti("/",!1),Sn=Ti("%",!1),_n=Ti("||",!1),gn=Ti("$",!1),On=Ti("E",!0),xn=function(r){return!0===Zv[r.toUpperCase()]},Un=/^[^"]/,Mn=Ii(['"'],!0,!1),kn=function(r){return r.join("")},Dn=/^[^']/,$n=Ii(["'"],!0,!1),Pn=Ti("`",!1),Fn=/^[^`]/,Gn=Ii(["`"],!0,!1),jn=/^[A-Za-z_\u4E00-\u9FA5]/,Hn=Ii([["A","Z"],["a","z"],"_",["一","龥"]],!1,!1),Yn=/^[A-Za-z0-9_\-$\u4E00-\u9FA5\xC0-\u017F]/,Bn=Ii([["A","Z"],["a","z"],["0","9"],"_","-","$",["一","龥"],["À","ſ"]],!1,!1),Wn=/^[A-Za-z0-9_\u4E00-\u9FA5]/,Xn=Ii([["A","Z"],["a","z"],["0","9"],"_",["一","龥"]],!1,!1),Vn=Ti(":",!1),qn=Ti("OVER",!0),Kn=Ti("FILTER",!0),Zn=Ti("FIRST_VALUE",!0),zn=Ti("LAST_VALUE",!0),Qn=Ti("ROW_NUMBER",!0),Jn=Ti("DENSE_RANK",!0),rs=Ti("RANK",!0),ts=Ti("LAG",!0),es=Ti("LEAD",!0),ns=Ti("NTH_VALUE",!0),ss=Ti("IGNORE",!0),os=Ti("RESPECT",!0),us=Ti("percentile_cont",!0),as=Ti("percentile_disc",!0),is=Ti("within",!0),ls=Ti("mode",!0),cs=Ti("SEPARATOR",!0),fs=Ti("BOTH",!0),bs=Ti("LEADING",!0),vs=Ti("TRAILING",!0),ps=Ti("trim",!0),Ls=Ti("crosstab",!0),Cs=Ti("now",!0),ds=Ti("at",!0),ws=Ti("zone",!0),hs=Ti("CENTURY",!0),ys=Ti("DAY",!0),Es=Ti("DATE",!0),As=Ti("DECADE",!0),ms=Ti("DOW",!0),Ts=Ti("DOY",!0),Is=Ti("EPOCH",!0),Ns=Ti("HOUR",!0),Rs=Ti("ISODOW",!0),Ss=Ti("ISOYEAR",!0),_s=Ti("MICROSECONDS",!0),gs=Ti("MILLENNIUM",!0),Os=Ti("MILLISECONDS",!0),xs=Ti("MINUTE",!0),Us=Ti("MONTH",!0),Ms=Ti("QUARTER",!0),ks=Ti("SECOND",!0),Ds=Ti("TIMEZONE",!0),$s=Ti("TIMEZONE_HOUR",!0),Ps=Ti("TIMEZONE_MINUTE",!0),Fs=Ti("WEEK",!0),Gs=Ti("YEAR",!0),js=Ti("NTILE",!0),Hs=/^[\n]/,Ys=Ii(["\n"],!1,!1),Bs=/^[^"\\\0-\x1F\x7F]/,Ws=Ii(['"',"\\",["\0",""],""],!0,!1),Xs=/^[^'\\]/,Vs=Ii(["'","\\"],!0,!1),qs=Ti("\\'",!1),Ks=Ti('\\"',!1),Zs=Ti("\\\\",!1),zs=Ti("\\/",!1),Qs=Ti("\\b",!1),Js=Ti("\\f",!1),ro=Ti("\\n",!1),to=Ti("\\r",!1),eo=Ti("\\t",!1),no=Ti("\\u",!1),so=Ti("\\",!1),oo=Ti("''",!1),uo=/^[\n\r]/,ao=Ii(["\n","\r"],!1,!1),io=Ti(".",!1),lo=/^[0-9]/,co=Ii([["0","9"]],!1,!1),fo=/^[0-9a-fA-F]/,bo=Ii([["0","9"],["a","f"],["A","F"]],!1,!1),vo=/^[eE]/,po=Ii(["e","E"],!1,!1),Lo=/^[+\-]/,Co=Ii(["+","-"],!1,!1),wo=Ti("NOT NULL",!0),ho=Ti("TRUE",!0),yo=Ti("FALSE",!0),Eo=Ti("SHOW",!0),Ao=Ti("DROP",!0),mo=Ti("USE",!0),To=Ti("ALTER",!0),Io=Ti("SELECT",!0),No=Ti("UPDATE",!0),Ro=Ti("CREATE",!0),So=Ti("TEMPORARY",!0),_o=Ti("TEMP",!0),go=Ti("DELETE",!0),Oo=Ti("INSERT",!0),xo=Ti("RECURSIVE",!1),Uo=Ti("REPLACE",!0),Mo=Ti("RETURNING",!0),ko=Ti("RENAME",!0),Do=Ti("PARTITION",!0),$o=Ti("INTO",!0),Po=Ti("FROM",!0),Fo=Ti("AS",!0),Go=Ti("TABLESPACE",!0),jo=Ti("DEALLOCATE",!0),Ho=Ti("LEFT",!0),Yo=Ti("RIGHT",!0),Bo=Ti("FULL",!0),Wo=Ti("INNER",!0),Xo=Ti("JOIN",!0),Vo=Ti("OUTER",!0),qo=Ti("UNION",!0),Ko=Ti("VALUES",!0),Zo=Ti("USING",!0),zo=Ti("WHERE",!0),Qo=Ti("GROUP",!0),Jo=Ti("BY",!0),ru=Ti("ORDER",!0),tu=Ti("HAVING",!0),eu=Ti("LIMIT",!0),nu=Ti("OFFSET",!0),su=Ti("ASC",!0),ou=Ti("DESC",!0),uu=Ti("ALL",!0),au=Ti("DISTINCT",!0),iu=Ti("BETWEEN",!0),lu=Ti("IS",!0),cu=Ti("LIKE",!0),fu=Ti("ILIKE",!0),bu=Ti("EXISTS",!0),vu=Ti("AND",!0),pu=Ti("OR",!0),Lu=Ti("ARRAY",!0),Cu=Ti("ARRAY_AGG",!0),du=Ti("COUNT",!0),wu=Ti("GROUP_CONCAT",!0),hu=Ti("MAX",!0),yu=Ti("MIN",!0),Eu=Ti("SUM",!0),Au=Ti("AVG",!0),mu=Ti("EXTRACT",!0),Tu=Ti("CALL",!0),Iu=Ti("CASE",!0),Nu=Ti("WHEN",!0),Ru=Ti("ELSE",!0),Su=Ti("CAST",!0),_u=Ti("BOOL",!0),gu=Ti("BOOLEAN",!0),Ou=Ti("CHAR",!0),xu=Ti("VARCHAR",!0),Uu=Ti("NUMERIC",!0),Mu=Ti("DECIMAL",!0),ku=Ti("SIGNED",!0),Du=Ti("UNSIGNED",!0),$u=Ti("INT",!0),Pu=Ti("ZEROFILL",!0),Fu=Ti("INTEGER",!0),Gu=Ti("JSON",!0),ju=Ti("JSONB",!0),Hu=Ti("GEOMETRY",!0),Yu=Ti("SMALLINT",!0),Bu=Ti("SERIAL",!0),Wu=Ti("TINYINT",!0),Xu=Ti("TINYTEXT",!0),Vu=Ti("TEXT",!0),qu=Ti("MEDIUMTEXT",!0),Ku=Ti("LONGTEXT",!0),Zu=Ti("BIGINT",!0),zu=Ti("ENUM",!0),Qu=Ti("FLOAT",!0),Ju=Ti("DOUBLE",!0),ra=Ti("BIGSERIAL",!0),ta=Ti("REAL",!0),ea=Ti("DATETIME",!0),na=Ti("TIME",!0),sa=Ti("TIMESTAMP",!0),oa=Ti("TRUNCATE",!0),ua=Ti("USER",!0),aa=Ti("UUID",!0),ia=Ti("OID",!0),la=Ti("REGCLASS",!0),ca=Ti("REGCOLLATION",!0),fa=Ti("REGCONFIG",!0),ba=Ti("REGDICTIONARY",!0),va=Ti("REGNAMESPACE",!0),pa=Ti("REGOPER",!0),La=Ti("REGOPERATOR",!0),Ca=Ti("REGPROC",!0),da=Ti("REGPROCEDURE",!0),wa=Ti("REGROLE",!0),ha=Ti("REGTYPE",!0),ya=Ti("CURRENT_DATE",!0),Ea=Ti("INTERVAL",!0),Aa=Ti("CURRENT_TIME",!0),ma=Ti("CURRENT_TIMESTAMP",!0),Ta=Ti("SYSTEM_USER",!0),Ia=Ti("GLOBAL",!0),Na=Ti("SESSION",!0),Ra=Ti("PERSIST",!0),Sa=Ti("PERSIST_ONLY",!0),_a=Ti("VIEW",!0),ga=Ti("@",!1),Oa=Ti("@@",!1),xa=Ti("$$",!1),Ua=Ti("return",!0),Ma=Ti("::",!1),ka=Ti("DUAL",!0),Da=Ti("ADD",!0),$a=Ti("INDEX",!0),Pa=Ti("FULLTEXT",!0),Fa=Ti("SPATIAL",!0),Ga=Ti("COMMENT",!0),ja=Ti("CONCURRENTLY",!0),Ha=Ti("REFERENCES",!0),Ya=Ti("SQL_CALC_FOUND_ROWS",!0),Ba=Ti("SQL_CACHE",!0),Wa=Ti("SQL_NO_CACHE",!0),Xa=Ti("SQL_SMALL_RESULT",!0),Va=Ti("SQL_BIG_RESULT",!0),qa=Ti("SQL_BUFFER_RESULT",!0),Ka=Ti(",",!1),Za=Ti("[",!1),za=Ti("]",!1),Qa=Ti("->",!1),Ja=Ti("->>",!1),ri=Ti("#>",!1),ti=Ti("#>>",!1),ei=Ti("&&",!1),ni=Ti("/*",!1),si=Ti("*/",!1),oi=Ti("--",!1),ui={type:"any"},ai=/^[ \t\n\r]/,ii=Ii([" ","\t","\n","\r"],!1,!1),li=/^[^$]/,ci=Ii(["$"],!0,!1),fi=function(r){return{dataType:r}},bi=Ti("bytea",!0),vi=Ti("varying",!0),pi=Ti("PRECISION",!0),Li=Ti("WITHOUT",!0),Ci=Ti("ZONE",!0),di=function(r){return{dataType:r}},wi=Ti("RECORD",!0),hi=0,yi=[{line:1,column:1}],Ei=0,Ai=[],mi=0;if("startRule"in t){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function Ti(r,t){return{type:"literal",text:r,ignoreCase:t}}function Ii(r,t,e){return{type:"class",parts:r,inverted:t,ignoreCase:e}}function Ni(t){var e,n=yi[t];if(n)return n;for(e=t-1;!yi[e];)e--;for(n={line:(n=yi[e]).line,column:n.column};e<t;)10===r.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return yi[t]=n,n}function Ri(r,t){var e=Ni(r),n=Ni(t);return{start:{offset:r,line:e.line,column:e.column},end:{offset:t,line:n.line,column:n.column}}}function Si(r){hi<Ei||(hi>Ei&&(Ei=hi,Ai=[]),Ai.push(r))}function _i(){var t,e;return t=hi,Nv()!==o?((e=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w;if(t=hi,kf()!==o)if(Nv()!==o)if(e=hi,(n=wb())!==o&&(s=Nv())!==o&&(u=jf())!==o?e=n=[n,s,u]:(hi=e,e=o),e===o&&(e=null),e!==o)if((n=Nv())!==o)if("function"===r.substr(hi,8).toLowerCase()?(s=r.substr(hi,8),hi+=8):(s=o,0===mi&&Si(ar)),s!==o)if((u=Nv())!==o)if((a=ql())!==o)if(Nv()!==o)if(dv()!==o)if(Nv()!==o)if((i=Ji())===o&&(i=null),i!==o)if(Nv()!==o)if(wv()!==o)if(Nv()!==o)if((l=function(){var t,e,n,s,u;return t=hi,"returns"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(A)),e!==o&&Nv()!==o?("setof"===r.substr(hi,5).toLowerCase()?(n=r.substr(hi,5),hi+=5):(n=o,0===mi&&Si(m)),n===o&&(n=null),n!==o&&Nv()!==o?((s=Bv())===o&&(s=ql()),s!==o?t=e={type:"returns",keyword:n,expr:s}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"returns"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(A)),e!==o&&Nv()!==o&&(n=Kf())!==o&&Nv()!==o&&(s=dv())!==o&&Nv()!==o&&(u=Pi())!==o&&Nv()!==o&&wv()!==o?t=e={type:"returns",keyword:"table",expr:u}:(hi=t,t=o)),t}())===o&&(l=null),l!==o)if(Nv()!==o){for(c=[],f=ji();f!==o;)c.push(f),f=ji();c!==o&&(f=Nv())!==o?((b=Ev())===o&&(b=null),b!==o&&Nv()!==o?(v=e,p=s,L=a,C=i,d=l,w=c,t={tableList:Array.from(up),columnList:np(ap),ast:{args:C||[],type:"create",replace:v&&"or replace",name:{schema:L.db,name:L.table},returns:d,keyword:p&&p.toLowerCase(),options:w||[]}}):(hi=t,t=o)):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;return t}())===o&&(e=Oi()),e!==o?t=e:(hi=t,t=o)):(hi=t,t=o),t}function gi(){var t;return(t=Ui())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=hi,(t=Nv())!==o?((e=Nl())===o&&(e=null),e!==o&&Nv()!==o&&Mf()!==o&&Nv()!==o&&(n=Bl())!==o&&Nv()!==o&&Vf()!==o&&Nv()!==o&&(s=lc())!==o&&Nv()!==o?((u=Fl())===o&&(u=null),u!==o&&Nv()!==o?((a=Zl())===o&&(a=null),a!==o&&Nv()!==o?((i=fc())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o){const u={};return t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"update";t&&(u[n]=t),n&&up.add(`${o}::${t}::${n}`)})),e&&e.forEach((r=>{if(r.table){const t=ep(r.table);up.add(`update::${u[t]||null}::${t}`)}ap.add(`update::${r.table}::${r.column}`)})),{tableList:Array.from(up),columnList:np(ap),ast:{with:r,type:"update",table:t,set:e,from:n,where:s,returning:o}}}(e,n,s,u,a,i),r=t):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c;return t=hi,(e=pc())!==o&&Nv()!==o?((n=Wf())===o&&(n=null),n!==o&&Nv()!==o&&(s=ql())!==o&&Nv()!==o?((u=vc())===o&&(u=null),u!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(a=Fc())!==o&&Nv()!==o&&wv()!==o&&Nv()!==o&&(i=bc())!==o&&Nv()!==o?((l=function(){var t,e,n,s;return t=hi,zf()!==o&&Nv()!==o?("conflict"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(en)),e!==o&&Nv()!==o?((n=function(){var r,t;return r=hi,dv()!==o&&Nv()!==o&&(t=zl())!==o&&Nv()!==o&&wv()!==o?r={type:"column",expr:t,parentheses:!0}:(hi=r,r=o),r}())===o&&(n=null),n!==o&&Nv()!==o&&(s=function(){var t,e,n,s,u;return t=hi,"do"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(rn)),e!==o&&Nv()!==o?("nothing"===r.substr(hi,7).toLowerCase()?(n=r.substr(hi,7),hi+=7):(n=o,0===mi&&Si(tn)),n!==o?t=e={keyword:"do",expr:{type:"origin",value:"nothing"}}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"do"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(rn)),e!==o&&Nv()!==o&&(n=Mf())!==o&&Nv()!==o&&Vf()!==o&&Nv()!==o&&(s=lc())!==o&&Nv()!==o?((u=Zl())===o&&(u=null),u!==o?t=e={keyword:"do",expr:{type:"update",set:s,where:u}}:(hi=t,t=o)):(hi=t,t=o)),t}())!==o?t={type:"conflict",keyword:"on",target:n,action:s}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(l=null),l!==o&&Nv()!==o?((c=fc())===o&&(c=null),c!==o?(e=function(r,t,e,n,s,o,u){if(t&&(up.add(`insert::${t.db}::${t.table}`),t.as=null),n){let r=t&&t.table||null;Array.isArray(s)&&s.forEach(((r,t)=>{if(r.value.length!=n.length)throw new Error("Error: column count doesn't match value count at row "+(t+1))})),n.forEach((t=>ap.add(`insert::${r}::${t}`)))}return{tableList:Array.from(up),columnList:np(ap),ast:{type:r,table:[t],columns:n,values:s,partition:e,conflict:o,returning:u}}}(e,s,u,a,i,l,c),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=hi,(t=pc())!==o&&Nv()!==o?((e=Yf())===o&&(e=null),e!==o&&Nv()!==o?((n=Wf())===o&&(n=null),n!==o&&Nv()!==o&&(s=ql())!==o&&Nv()!==o?((u=vc())===o&&(u=null),u!==o&&Nv()!==o&&(a=bc())!==o&&Nv()!==o?((i=fc())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o,u){n&&(up.add(`insert::${n.db}::${n.table}`),ap.add(`insert::${n.table}::(.*)`),n.as=null);const a=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(up),columnList:np(ap),ast:{type:r,table:[n],columns:null,values:o,partition:s,prefix:a,returning:u}}}(t,e,n,s,u,a,i),r=t):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=hi,(t=Pf())!==o&&Nv()!==o?((e=Bl())===o&&(e=null),e!==o&&Nv()!==o&&(n=Fl())!==o&&Nv()!==o?((s=Zl())===o&&(s=null),s!==o?(t=function(r,t,e){if(t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"delete";n&&up.add(`${o}::${t}::${n}`),s||ap.add(`delete::${n}::(.*)`)})),null===r&&1===t.length){const e=t[0];r=[{db:e.db,table:e.table,as:e.as,addition:!0}]}return{tableList:Array.from(up),columnList:np(ap),ast:{type:"delete",table:r,from:t,where:e}}}(e,n,s),r=t):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s,u,a,l,c,f,b,v,p;return t=hi,(e=Of())!==o&&Nv()!==o&&(n=Kf())!==o&&Nv()!==o&&(s=Bl())!==o?(b=e,v=n,(p=s)&&p.forEach((r=>up.add(`${b}::${r.db}::${r.table}`))),t=e={tableList:Array.from(up),columnList:np(ap),ast:{type:b.toLowerCase(),keyword:v.toLowerCase(),name:p}}):(hi=t,t=o),t===o&&(t=hi,(e=Of())!==o&&Nv()!==o&&(n=av())!==o&&Nv()!==o?((s=bv())===o&&(s=null),s!==o&&Nv()!==o?(u=hi,"if"===r.substr(hi,2).toLowerCase()?(a=r.substr(hi,2),hi+=2):(a=o,0===mi&&Si(i)),a!==o&&(l=Nv())!==o&&(c=Lb())!==o?u=a=[a,l,c]:(hi=u,u=o),u===o&&(u=null),u!==o&&(a=Nv())!==o&&(l=Pc())!==o&&(c=Nv())!==o?("cascade"===r.substr(hi,7).toLowerCase()?(f=r.substr(hi,7),hi+=7):(f=o,0===mi&&Si(Mr)),f===o&&("restrict"===r.substr(hi,8).toLowerCase()?(f=r.substr(hi,8),hi+=8):(f=o,0===mi&&Si(kr))),f===o&&(f=null),f!==o?(e=function(r,t,e,n,s,o){return{tableList:Array.from(up),columnList:np(ap),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),prefix:e,name:s,options:o&&[{type:"origin",value:o}]}}}(e,n,s,0,l,f),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)),t}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h;return r=hi,(t=kf())!==o&&Nv()!==o?((e=Df())===o&&(e=null),e!==o&&Nv()!==o&&Kf()!==o&&Nv()!==o?((n=Mi())===o&&(n=null),n!==o&&Nv()!==o&&(s=Bl())!==o&&Nv()!==o&&(u=function(){var r,t,e,n,s,u,a,i;if(r=hi,dv()!==o)if(Nv()!==o)if((t=Bi())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Bi())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Bi())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o&&(n=Nv())!==o&&(s=wv())!==o?r=rp(t,e):(hi=r,r=o)}else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;return r}())!==o&&Nv()!==o?((a=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Cl())!==o){for(e=[],n=hi,(s=Nv())!==o?((u=Lv())===o&&(u=null),u!==o&&(a=Nv())!==o&&(i=Cl())!==o?n=s=[s,u,a,i]:(hi=n,n=o)):(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o?((u=Lv())===o&&(u=null),u!==o&&(a=Nv())!==o&&(i=Cl())!==o?n=s=[s,u,a,i]:(hi=n,n=o)):(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())===o&&(a=null),a!==o&&Nv()!==o?((i=Yf())===o&&(i=jf()),i===o&&(i=null),i!==o&&Nv()!==o?((l=qf())===o&&(l=null),l!==o&&Nv()!==o?((c=Ui())===o&&(c=null),c!==o?(f=t,b=e,v=n,L=u,C=a,d=i,w=l,h=c,(p=s)&&p.forEach((r=>up.add(`create::${r.db}::${r.table}`))),r=t={tableList:Array.from(up),columnList:np(ap),ast:{type:f[0].toLowerCase(),keyword:"table",temporary:b&&b[0].toLowerCase(),if_not_exists:v,table:p,ignore_replace:d&&d[0].toLowerCase(),as:w&&w[0].toLowerCase(),query_expr:h&&h.ast,create_definitions:L,table_options:C}}):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,(t=kf())!==o&&Nv()!==o?((e=Df())===o&&(e=null),e!==o&&Nv()!==o&&Kf()!==o&&Nv()!==o?((n=Mi())===o&&(n=null),n!==o&&Nv()!==o&&(s=Bl())!==o&&Nv()!==o&&(u=function r(){var t,e,n;return(t=function(){var r,t;return r=hi,vb()!==o&&Nv()!==o&&(t=Bl())!==o?r={type:"like",table:t}:(hi=r,r=o),r}())===o&&(t=hi,dv()!==o&&Nv()!==o&&(e=r())!==o&&Nv()!==o&&wv()!==o?((n=e).parentheses=!0,t=n):(hi=t,t=o)),t}())!==o?(t=function(r,t,e,n,s){return n&&n.forEach((r=>up.add(`create::${r.db}::${r.table}`))),{tableList:Array.from(up),columnList:np(ap),ast:{type:r[0].toLowerCase(),keyword:"table",temporary:t&&t[0].toLowerCase(),if_not_exists:e,table:n,like:s}}}(t,e,n,s,u),r=t):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T,I,N,R,S,_,g,O,x;return t=hi,kf()!==o&&Nv()!==o?(e=hi,(n=wb())!==o&&(s=Nv())!==o&&(u=jf())!==o?e=n=[n,s,u]:(hi=e,e=o),e===o&&(e=null),e!==o&&(n=Nv())!==o?((s=fv())===o&&(s=null),s!==o&&(u=Nv())!==o?("trigger"===r.substr(hi,7).toLowerCase()?(a=r.substr(hi,7),hi+=7):(a=o,0===mi&&Si(st)),a!==o&&Nv()!==o&&(i=qc())!==o&&Nv()!==o?("before"===r.substr(hi,6).toLowerCase()?(l=r.substr(hi,6),hi+=6):(l=o,0===mi&&Si(ot)),l===o&&("after"===r.substr(hi,5).toLowerCase()?(l=r.substr(hi,5),hi+=5):(l=o,0===mi&&Si(ut)),l===o&&("instead of"===r.substr(hi,10).toLowerCase()?(l=r.substr(hi,10),hi+=10):(l=o,0===mi&&Si(at)))),l!==o&&Nv()!==o&&(c=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=vl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=wb())!==o&&(a=Nv())!==o&&(i=vl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=wb())!==o&&(a=Nv())!==o&&(i=vl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o&&Nv()!==o?("on"===r.substr(hi,2).toLowerCase()?(f=r.substr(hi,2),hi+=2):(f=o,0===mi&&Si(j)),f!==o&&Nv()!==o&&(b=ql())!==o&&Nv()!==o?(v=hi,(p=Xf())!==o&&(L=Nv())!==o&&(C=ql())!==o?v=p=[p,L,C]:(hi=v,v=o),v===o&&(v=null),v!==o&&(p=Nv())!==o?((L=function(){var t,e,n,s,u,a,i;return t=hi,e=hi,"not"===r.substr(hi,3).toLowerCase()?(n=r.substr(hi,3),hi+=3):(n=o,0===mi&&Si($)),n===o&&(n=null),n!==o&&(s=Nv())!==o?("deferrable"===r.substr(hi,10).toLowerCase()?(u=r.substr(hi,10),hi+=10):(u=o,0===mi&&Si(ft)),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o),e!==o&&(n=Nv())!==o?("initially immediate"===r.substr(hi,19).toLowerCase()?(s=r.substr(hi,19),hi+=19):(s=o,0===mi&&Si(bt)),s===o&&("initially deferred"===r.substr(hi,18).toLowerCase()?(s=r.substr(hi,18),hi+=18):(s=o,0===mi&&Si(vt))),s!==o?(i=s,t=e={keyword:(a=e)&&a[0]?a[0].toLowerCase()+" deferrable":"deferrable",args:i&&i.toLowerCase()}):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(L=null),L!==o&&(C=Nv())!==o?((d=function(){var t,e,n,s,u,a,i;return t=hi,"for"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(pt)),e!==o&&Nv()!==o?("each"===r.substr(hi,4).toLowerCase()?(n=r.substr(hi,4),hi+=4):(n=o,0===mi&&Si(Lt)),n===o&&(n=null),n!==o&&Nv()!==o?("row"===r.substr(hi,3).toLowerCase()?(s=r.substr(hi,3),hi+=3):(s=o,0===mi&&Si(Ct)),s===o&&("statement"===r.substr(hi,9).toLowerCase()?(s=r.substr(hi,9),hi+=9):(s=o,0===mi&&Si(dt))),s!==o?(u=e,i=s,t=e={keyword:(a=n)?`${u.toLowerCase()} ${a.toLowerCase()}`:u.toLowerCase(),args:i.toLowerCase()}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(d=null),d!==o&&Nv()!==o?((w=function(){var r,t;return r=hi,Eb()!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(t=mc())!==o&&Nv()!==o&&wv()!==o?r={type:"when",cond:t,parentheses:!0}:(hi=r,r=o),r}())===o&&(w=null),w!==o&&Nv()!==o?("execute"===r.substr(hi,7).toLowerCase()?(h=r.substr(hi,7),hi+=7):(h=o,0===mi&&Si(it)),h!==o&&Nv()!==o?("procedure"===r.substr(hi,9).toLowerCase()?(y=r.substr(hi,9),hi+=9):(y=o,0===mi&&Si(lt)),y===o&&("function"===r.substr(hi,8).toLowerCase()?(y=r.substr(hi,8),hi+=8):(y=o,0===mi&&Si(ar))),y!==o&&Nv()!==o&&(E=Gv())!==o?(A=s,m=a,I=c,N=b,R=v,S=L,_=d,g=w,O=y,x=E,t={type:"create",replace:e&&"or replace",constraint:i,location:(T=l)&&T.toLowerCase(),events:I,table:N,from:R&&R[2],deferrable:S,for_each:_,when:g,execute:{keyword:"execute "+O.toLowerCase(),expr:x},constraint_type:m&&m.toLowerCase(),keyword:m&&m.toLowerCase(),constraint_kw:A&&A.toLowerCase(),resource:"constraint"}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,b,v,p,L,C,d,w,h,y,E,A,m;return t=hi,kf()!==o&&Nv()!==o?("extension"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(l)),e!==o&&Nv()!==o?((n=Mi())===o&&(n=null),n!==o&&Nv()!==o?((s=qc())===o&&(s=Cf()),s!==o&&Nv()!==o?((u=eb())===o&&(u=null),u!==o&&Nv()!==o?(a=hi,"schema"===r.substr(hi,6).toLowerCase()?(i=r.substr(hi,6),hi+=6):(i=o,0===mi&&Si(c)),i!==o&&(b=Nv())!==o&&(v=qc())!==o?a=i=[i,b,v]:(hi=a,a=o),a===o&&(a=Cf()),a===o&&(a=null),a!==o&&(i=Nv())!==o?(b=hi,"version"===r.substr(hi,7).toLowerCase()?(v=r.substr(hi,7),hi+=7):(v=o,0===mi&&Si(f)),v!==o&&(p=Nv())!==o?((L=qc())===o&&(L=Cf()),L!==o?b=v=[v,p,L]:(hi=b,b=o)):(hi=b,b=o),b===o&&(b=null),b!==o&&(v=Nv())!==o?(p=hi,(L=Xf())!==o&&(C=Nv())!==o?((d=qc())===o&&(d=Cf()),d!==o?p=L=[L,C,d]:(hi=p,p=o)):(hi=p,p=o),p===o&&(p=null),p!==o?(w=n,h=s,y=u,E=a,A=b,m=p,t={type:"create",keyword:e.toLowerCase(),if_not_exists:w,extension:sp(h),with:y&&y[0].toLowerCase(),schema:sp(E&&E[2].toLowerCase()),version:sp(A&&A[2]),from:sp(m&&m[2])}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T,I,N,R,S,_,g,O;return t=hi,(e=kf())!==o&&Nv()!==o?((n=lv())===o&&(n=null),n!==o&&Nv()!==o&&(s=av())!==o&&Nv()!==o?((u=bv())===o&&(u=null),u!==o&&Nv()!==o?((a=Gc())===o&&(a=null),a!==o&&Nv()!==o&&(i=zf())!==o&&Nv()!==o&&(l=ql())!==o&&Nv()!==o?((c=jl())===o&&(c=null),c!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(f=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Yi())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Yi())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Yi())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o&&Nv()!==o&&wv()!==o&&Nv()!==o?(b=hi,(v=eb())!==o&&(p=Nv())!==o&&(L=dv())!==o&&(C=Nv())!==o&&(d=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Yl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Yl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Yl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o&&(w=Nv())!==o&&(h=wv())!==o?b=v=[v,p,L,C,d,w,h]:(hi=b,b=o),b===o&&(b=null),b!==o&&(v=Nv())!==o?(p=hi,(L=function(){var t,e,n,s;return t=hi,"tablespace"===r.substr(hi,10).toLowerCase()?(e=r.substr(hi,10),hi+=10):(e=o,0===mi&&Si(Go)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="TABLESPACE":(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(C=Nv())!==o&&(d=qc())!==o?p=L=[L,C,d]:(hi=p,p=o),p===o&&(p=null),p!==o&&(L=Nv())!==o?((C=Zl())===o&&(C=null),C!==o&&(d=Nv())!==o?(y=e,E=n,A=s,m=u,T=a,I=i,N=l,R=c,S=f,_=b,g=p,O=C,t=e={tableList:Array.from(up),columnList:np(ap),ast:{type:y[0].toLowerCase(),index_type:E&&E.toLowerCase(),keyword:A.toLowerCase(),concurrently:m&&m.toLowerCase(),index:T,on_kw:I[0].toLowerCase(),table:N,index_using:R,index_columns:S,with:_&&_[4],with_before_where:!0,tablespace:g&&{type:"origin",value:g[2]},where:O}}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C;return t=hi,(e=kf())!==o&&Nv()!==o?((n=Df())===o&&(n=$f()),n===o&&(n=null),n!==o&&Nv()!==o&&function(){var t,e,n,s;return t=hi,"sequence"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Zt)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SEQUENCE":(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o?((s=Mi())===o&&(s=null),s!==o&&Nv()!==o&&(u=ql())!==o&&Nv()!==o?(a=hi,(i=qf())!==o&&(l=Nv())!==o&&(c=Hc())!==o?a=i=[i,l,c]:(hi=a,a=o),a===o&&(a=null),a!==o&&(i=Nv())!==o?((l=function(){var r,t,e,n,s,u;if(r=hi,(t=Hi())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Hi())!==o?n=s=[s,u]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Hi())!==o?n=s=[s,u]:(hi=n,n=o);e!==o?r=t=rp(t,e,1):(hi=r,r=o)}else hi=r,r=o;return r}())===o&&(l=null),l!==o?(f=e,b=n,v=s,L=a,C=l,(p=u).as=L&&L[2],t=e={tableList:Array.from(up),columnList:np(ap),ast:{type:f[0].toLowerCase(),keyword:"sequence",temporary:b&&b[0].toLowerCase(),if_not_exists:v,sequence:[p],create_definitions:C}}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;return t=hi,(e=kf())!==o&&Nv()!==o?((n=function(){var t,e,n,s;return t=hi,"database"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(zt)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="DATABASE":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(n=Zf()),n!==o&&Nv()!==o?((s=Mi())===o&&(s=null),s!==o&&Nv()!==o&&(u=qc())!==o&&Nv()!==o?((a=function(){var r,t,e,n,s,u;if(r=hi,(t=Ll())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Ll())!==o?n=s=[s,u]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Ll())!==o?n=s=[s,u]:(hi=n,n=o);e!==o?r=t=rp(t,e,1):(hi=r,r=o)}else hi=r,r=o;return r}())===o&&(a=null),a!==o?(i=e,l=s,c=u,f=a,t=e={tableList:Array.from(up),columnList:np(ap),ast:{type:i[0].toLowerCase(),keyword:"database",if_not_exists:l,database:c,create_definitions:f}}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c;return t=hi,(e=kf())!==o&&Nv()!==o?("domain"===r.substr(hi,6).toLowerCase()?(n=r.substr(hi,6),hi+=6):(n=o,0===mi&&Si(lr)),n!==o&&Nv()!==o&&(s=ql())!==o&&Nv()!==o?((u=qf())===o&&(u=null),u!==o&&Nv()!==o&&(a=Bv())!==o&&Nv()!==o?((i=Vi())===o&&(i=null),i!==o&&Nv()!==o?((l=Ki())===o&&(l=null),l!==o&&Nv()!==o?((c=cl())===o&&(c=null),c!==o?(e=function(r,t,e,n,s,o,u,a){a&&(a.type="constraint");const i=[o,u,a].filter((r=>r));return{tableList:Array.from(up),columnList:np(ap),ast:{type:r[0].toLowerCase(),keyword:t.toLowerCase(),domain:{schema:e.db,name:e.table},as:n&&n[0]&&n[0].toLowerCase(),target:s,create_definitions:i}}}(e,n,s,u,a,i,l,c),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p;return t=hi,(e=kf())!==o&&Nv()!==o?("type"===r.substr(hi,4).toLowerCase()?(n=r.substr(hi,4),hi+=4):(n=o,0===mi&&Si(ir)),n!==o&&Nv()!==o&&(s=ql())!==o&&Nv()!==o&&(u=qf())!==o&&Nv()!==o&&(a=Gb())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o?((i=dc())===o&&(i=null),i!==o&&Nv()!==o&&wv()!==o?(l=e,c=n,f=s,b=u,v=a,(p=i).parentheses=!0,t=e={tableList:Array.from(up),columnList:np(ap),ast:{type:l[0].toLowerCase(),keyword:c.toLowerCase(),name:{schema:f.db,name:f.table},as:b&&b[0]&&b[0].toLowerCase(),resource:v.toLowerCase(),create_definitions:p}}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=kf())!==o&&Nv()!==o?("type"===r.substr(hi,4).toLowerCase()?(n=r.substr(hi,4),hi+=4):(n=o,0===mi&&Si(ir)),n!==o&&Nv()!==o&&(s=ql())!==o?(e=function(r,t,e){return{tableList:Array.from(up),columnList:np(ap),ast:{type:r[0].toLowerCase(),keyword:t.toLowerCase(),name:{schema:e.db,name:e.table}}}}(e,n,s),t=e):(hi=t,t=o)):(hi=t,t=o)),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,C,d,w,h,y,E,A,m,T,I,N,R,S,_,g,O,x;return t=hi,(e=kf())!==o&&Nv()!==o?(n=hi,(s=wb())!==o&&(u=Nv())!==o&&(a=jf())!==o?n=s=[s,u,a]:(hi=n,n=o),n===o&&(n=null),n!==o&&(s=Nv())!==o?((u=$f())===o&&(u=Df()),u===o&&(u=null),u!==o&&(a=Nv())!==o?((i=Gf())===o&&(i=null),i!==o&&Nv()!==o&&function(){var t,e,n,s;return t=hi,"view"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(_a)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="VIEW":(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o&&(l=ql())!==o&&Nv()!==o?(c=hi,(f=dv())!==o&&(C=Nv())!==o&&(d=Fc())!==o&&(w=Nv())!==o&&(h=wv())!==o?c=f=[f,C,d,w,h]:(hi=c,c=o),c===o&&(c=null),c!==o&&(f=Nv())!==o?(C=hi,(d=eb())!==o&&(w=Nv())!==o&&(h=dv())!==o&&(y=Nv())!==o&&(E=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=ki())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=ki())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=ki())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o&&(A=Nv())!==o&&(m=wv())!==o?C=d=[d,w,h,y,E,A,m]:(hi=C,C=o),C===o&&(C=null),C!==o&&(d=Nv())!==o&&(w=qf())!==o&&(h=Nv())!==o&&(y=_l())!==o&&(E=Nv())!==o?((A=function(){var t,e,n,s;return t=hi,eb()!==o&&Nv()!==o?("cascaded"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(b)),e===o&&("local"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(v))),e!==o&&Nv()!==o?("check"===r.substr(hi,5).toLowerCase()?(n=r.substr(hi,5),hi+=5):(n=o,0===mi&&Si(p)),n!==o&&Nv()!==o?("OPTION"===r.substr(hi,6)?(s="OPTION",hi+=6):(s=o,0===mi&&Si(L)),s!==o?t=`with ${e.toLowerCase()} check option`:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,eb()!==o&&Nv()!==o?("check"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(p)),e!==o&&Nv()!==o?("OPTION"===r.substr(hi,6)?(n="OPTION",hi+=6):(n=o,0===mi&&Si(L)),n!==o?t="with check option":(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)),t}())===o&&(A=null),A!==o?(T=e,I=n,N=u,R=i,_=c,g=C,O=y,x=A,(S=l).view=S.table,delete S.table,t=e={tableList:Array.from(up),columnList:np(ap),ast:{type:T[0].toLowerCase(),keyword:"view",replace:I&&"or replace",temporary:N&&N[0].toLowerCase(),recursive:R&&R.toLowerCase(),columns:_&&_[2],select:O,view:S,with_options:g&&g[4],with:x}}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=hi,kf()!==o&&Nv()!==o?(e=hi,(n=wb())!==o&&(s=Nv())!==o&&(u=jf())!==o?e=n=[n,s,u]:(hi=e,e=o),e===o&&(e=null),e!==o&&(n=Nv())!==o?("aggregate"===r.substr(hi,9).toLowerCase()?(s=r.substr(hi,9),hi+=9):(s=o,0===mi&&Si(E)),s!==o&&(u=Nv())!==o&&(a=ql())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(i=Zi())!==o&&Nv()!==o&&wv()!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(l=function(){var t,e,n,s,u,a,i,l;if(t=hi,(e=function(){var t,e,n,s,u,a,i;return t=hi,"sfunc"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(h)),e!==o&&Nv()!==o&&sv()!==o&&Nv()!==o&&(n=ql())!==o&&Nv()!==o&&Lv()!==o&&Nv()!==o?("stype"===r.substr(hi,5).toLowerCase()?(s=r.substr(hi,5),hi+=5):(s=o,0===mi&&Si(y)),s!==o&&Nv()!==o&&sv()!==o&&Nv()!==o&&(u=Bv())!==o?(i=u,t=e=[{type:"sfunc",symbol:"=",value:{schema:(a=n).db,name:a.table}},{type:"stype",symbol:"=",value:i}]):(hi=t,t=o)):(hi=t,t=o),t}())!==o){for(n=[],s=hi,(u=Nv())!==o&&(a=Lv())!==o&&(i=Nv())!==o&&(l=Di())!==o?s=u=[u,a,i,l]:(hi=s,s=o);s!==o;)n.push(s),s=hi,(u=Nv())!==o&&(a=Lv())!==o&&(i=Nv())!==o&&(l=Di())!==o?s=u=[u,a,i,l]:(hi=s,s=o);n!==o?t=e=rp(e,n):(hi=t,t=o)}else hi=t,t=o;return t}())!==o&&Nv()!==o&&wv()!==o?(c=a,f=i,b=l,t={tableList:Array.from(up),columnList:np(ap),ast:{type:"create",keyword:"aggregate",name:{schema:c.db,name:c.table},args:{parentheses:!0,expr:f,orderby:f.orderby},options:b}}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}()),t}())===o&&(t=Gi())===o&&(t=function(){var r,t,e,n,s,u,a;return r=hi,(t=Zb())!==o&&Nv()!==o?((e=Kf())===o&&(e=null),e!==o&&Nv()!==o&&(n=Bl())!==o?(s=t,u=e,(a=n)&&a.forEach((r=>up.add(`${s}::${r.db}::${r.table}`))),r=t={tableList:Array.from(up),columnList:np(ap),ast:{type:s.toLowerCase(),keyword:u&&u.toLowerCase()||"table",name:a}}):(hi=r,r=o)):(hi=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=hi,Hf()!==o&&Nv()!==o&&Kf()!==o&&Nv()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Gl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Gl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Gl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o?((e=t).forEach((r=>r.forEach((r=>r.table&&up.add(`rename::${r.db}::${r.table}`))))),r={tableList:Array.from(up),columnList:np(ap),ast:{type:"rename",table:e}}):(hi=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=hi,function(){var t,e,n,s;return t=hi,"call"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Tu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CALL":(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o&&(e=Gv())!==o?(n=e,t={tableList:Array.from(up),columnList:np(ap),ast:{type:"call",expr:n}}):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=hi,function(){var t,e,n,s;return t=hi,"use"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(mo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o&&(e=Gc())!==o?(n=e,up.add(`use::${n}::null`),t={tableList:Array.from(up),columnList:np(ap),ast:{type:"use",db:n}}):(hi=t,t=o),t}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s;return r=hi,xf()!==o&&Nv()!==o&&Kf()!==o&&Nv()!==o&&(t=Bl())!==o&&Nv()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=rl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=rl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=rl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o?(s=e,(n=t)&&n.length>0&&n.forEach((r=>up.add(`alter::${r.db}::${r.table}`))),r={tableList:Array.from(up),columnList:np(ap),ast:{type:"alter",table:n,expr:s}}):(hi=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=hi,(t=xf())!==o&&Nv()!==o&&(e=Zf())!==o&&Nv()!==o&&(n=qc())!==o&&Nv()!==o?((s=tl())===o&&(s=el())===o&&(s=nl()),s!==o?(t=function(r,t,e){const n=r.toLowerCase();return e.resource=n,e[n]=e.table,delete e.table,{tableList:Array.from(up),columnList:np(ap),ast:{type:"alter",keyword:n,schema:t,expr:e}}}(e,n,s),r=t):(hi=r,r=o)):(hi=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u;return t=hi,(e=xf())!==o&&Nv()!==o?("domain"===r.substr(hi,6).toLowerCase()?(n=r.substr(hi,6),hi+=6):(n=o,0===mi&&Si(lr)),n===o&&("type"===r.substr(hi,4).toLowerCase()?(n=r.substr(hi,4),hi+=4):(n=o,0===mi&&Si(ir))),n!==o&&Nv()!==o&&(s=ql())!==o&&Nv()!==o?((u=tl())===o&&(u=el())===o&&(u=nl()),u!==o?(e=function(r,t,e){const n=r.toLowerCase();return e.resource=n,e[n]=e.table,delete e.table,{tableList:Array.from(up),columnList:np(ap),ast:{type:"alter",keyword:n,name:{schema:t.db,name:t.table},expr:e}}}(n,s,u),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;return t=hi,(e=xf())!==o&&Nv()!==o?("function"===r.substr(hi,8).toLowerCase()?(n=r.substr(hi,8),hi+=8):(n=o,0===mi&&Si(ar)),n!==o&&Nv()!==o&&(s=ql())!==o&&Nv()!==o?(u=hi,(a=dv())!==o&&(i=Nv())!==o?((l=Ji())===o&&(l=null),l!==o&&(c=Nv())!==o&&(f=wv())!==o?u=a=[a,i,l,c,f]:(hi=u,u=o)):(hi=u,u=o),u===o&&(u=null),u!==o&&(a=Nv())!==o?((i=tl())===o&&(i=el())===o&&(i=nl()),i!==o?(e=function(r,t,e,n){const s=r.toLowerCase();n.resource=s,n[s]=n.table,delete n.table;const o={};return e&&e[0]&&(o.parentheses=!0),o.expr=e&&e[2],{tableList:Array.from(up),columnList:np(ap),ast:{type:"alter",keyword:s,name:{schema:t.db,name:t.table},args:o,expr:n}}}(n,s,u,i),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a;return t=hi,(e=xf())!==o&&Nv()!==o?("aggregate"===r.substr(hi,9).toLowerCase()?(n=r.substr(hi,9),hi+=9):(n=o,0===mi&&Si(E)),n!==o&&Nv()!==o&&(s=ql())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(u=Zi())!==o&&Nv()!==o&&wv()!==o&&Nv()!==o?((a=tl())===o&&(a=el())===o&&(a=nl()),a!==o?(e=function(r,t,e,n){const s=r.toLowerCase();return n.resource=s,n[s]=n.table,delete n.table,{tableList:Array.from(up),columnList:np(ap),ast:{type:"alter",keyword:s,name:{schema:t.db,name:t.table},args:{parentheses:!0,expr:e,orderby:e.orderby},expr:n}}}(n,s,u,a),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u;return t=hi,Vf()!==o&&Nv()!==o?((e=function(){var t,e,n,s;return t=hi,"global"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Ia)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="GLOBAL":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=hi,"session"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Na)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SESSION":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=hi,"local"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(v)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="LOCAL":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=hi,"persist"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Ra)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="PERSIST":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=hi,"persist_only"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(Sa)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="PERSIST_ONLY":(hi=t,t=o)):(hi=t,t=o),t}()),e===o&&(e=null),e!==o&&Nv()!==o&&(n=Mv())!==o?(s=e,(u=n).keyword=s,t={tableList:Array.from(up),columnList:np(ap),ast:{type:"set",expr:u}}):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;return t=hi,(e=function(){var t,e,n,s;return t=hi,"lock"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Vr)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&Nv()!==o?((n=Kf())===o&&(n=null),n!==o&&Nv()!==o&&(s=Bl())!==o&&Nv()!==o?((u=function(){var t,e,n,s;return t=hi,"in"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(Ut)),e!==o&&Nv()!==o?("access share"===r.substr(hi,12).toLowerCase()?(n=r.substr(hi,12),hi+=12):(n=o,0===mi&&Si(Mt)),n===o&&("row share"===r.substr(hi,9).toLowerCase()?(n=r.substr(hi,9),hi+=9):(n=o,0===mi&&Si(kt)),n===o&&("row exclusive"===r.substr(hi,13).toLowerCase()?(n=r.substr(hi,13),hi+=13):(n=o,0===mi&&Si(Dt)),n===o&&("share update exclusive"===r.substr(hi,22).toLowerCase()?(n=r.substr(hi,22),hi+=22):(n=o,0===mi&&Si($t)),n===o&&("share row exclusive"===r.substr(hi,19).toLowerCase()?(n=r.substr(hi,19),hi+=19):(n=o,0===mi&&Si(Pt)),n===o&&("exclusive"===r.substr(hi,9).toLowerCase()?(n=r.substr(hi,9),hi+=9):(n=o,0===mi&&Si(Kr)),n===o&&("access exclusive"===r.substr(hi,16).toLowerCase()?(n=r.substr(hi,16),hi+=16):(n=o,0===mi&&Si(Ft)),n===o&&("share"===r.substr(hi,5).toLowerCase()?(n=r.substr(hi,5),hi+=5):(n=o,0===mi&&Si(Gt))))))))),n!==o&&Nv()!==o?("mode"===r.substr(hi,4).toLowerCase()?(s=r.substr(hi,4),hi+=4):(s=o,0===mi&&Si(jt)),s!==o?t=e={mode:`in ${n.toLowerCase()} mode`}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(u=null),u!==o&&Nv()!==o?("nowait"===r.substr(hi,6).toLowerCase()?(a=r.substr(hi,6),hi+=6):(a=o,0===mi&&Si(Ht)),a===o&&(a=null),a!==o?(i=n,c=u,f=a,(l=s)&&l.forEach((r=>up.add(`lock::${r.db}::${r.table}`))),e={tableList:Array.from(up),columnList:np(ap),ast:{type:"lock",keyword:i&&i.toLowerCase(),tables:l.map((r=>({table:r}))),lock_mode:c,nowait:f}},t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=hi,gf()!==o&&Nv()!==o?("tables"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Yt)),e!==o?t={tableList:Array.from(up),columnList:np(ap),ast:{type:"show",keyword:"tables"}}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,gf()!==o&&Nv()!==o&&(e=Yv())!==o?(n=e,t={tableList:Array.from(up),columnList:np(ap),ast:{type:"show",keyword:"var",var:n}}):(hi=t,t=o)),t}())===o&&(t=function(){var t,e,n,s,u;return t=hi,function(){var t,e,n,s;return t=hi,"deallocate"===r.substr(hi,10).toLowerCase()?(e=r.substr(hi,10),hi+=10):(e=o,0===mi&&Si(jo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="DEALLOCATE":(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o?("prepare"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Bt)),e===o&&(e=null),e!==o&&Nv()!==o?((n=qc())===o&&(n=ib()),n!==o?(s=e,u=n,t={tableList:Array.from(up),columnList:np(ap),ast:{type:"deallocate",keyword:s,expr:{type:"default",value:u}}}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v;return t=hi,(e=ml())!==o&&Nv()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=hl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=hl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=hl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o&&Nv()!==o&&(s=zf())!==o&&Nv()!==o?((u=function(){var t,e,n;return t=hi,(e=Kf())===o&&("sequence"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Zt)),e===o&&("database"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(zt)),e===o&&("DOMAIN"===r.substr(hi,6)?(e="DOMAIN",hi+=6):(e=o,0===mi&&Si(Qt)),e===o&&("FUNCTION"===r.substr(hi,8)?(e="FUNCTION",hi+=8):(e=o,0===mi&&Si(Jt)),e===o&&("procedure"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(lt)),e===o&&("routine"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(re)),e===o&&("language"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(te)),e===o&&("large"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(ee)),e===o&&("SCHEMA"===r.substr(hi,6)?(e="SCHEMA",hi+=6):(e=o,0===mi&&Si(ne))))))))))),e!==o&&(e={type:"origin",value:e.toUpperCase()}),(t=e)===o&&(t=hi,(e=ib())!==o&&Nv()!==o?("tables"===r.substr(hi,6).toLowerCase()?(n=r.substr(hi,6),hi+=6):(n=o,0===mi&&Si(Yt)),n===o&&("sequence"===r.substr(hi,8).toLowerCase()?(n=r.substr(hi,8),hi+=8):(n=o,0===mi&&Si(Zt)),n===o&&("functions"===r.substr(hi,9).toLowerCase()?(n=r.substr(hi,9),hi+=9):(n=o,0===mi&&Si(se)),n===o&&("procedures"===r.substr(hi,10).toLowerCase()?(n=r.substr(hi,10),hi+=10):(n=o,0===mi&&Si(oe)),n===o&&("routines"===r.substr(hi,8).toLowerCase()?(n=r.substr(hi,8),hi+=8):(n=o,0===mi&&Si(ue)))))),n!==o&&Nv()!==o&&fb()!==o&&Nv()!==o&&Zf()!==o?t=e={type:"origin",value:`all ${n} in schema`}:(hi=t,t=o)):(hi=t,t=o)),t}())===o&&(u=null),u!==o&&(a=Nv())!==o&&(i=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=yl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=yl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=yl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o&&(l=Nv())!==o?((c=_f())===o&&(c=Xf()),c!==o?(v=c,({revoke:"from",grant:"to"}[e.type].toLowerCase()===v[0].toLowerCase()?void 0:o)!==o&&Nv()!==o&&(f=Al())!==o&&Nv()!==o?((b=function(){var t,e,n;return t=hi,eb()!==o&&Nv()!==o?("grant"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(ie)),e!==o&&Nv()!==o?("option"===r.substr(hi,6).toLowerCase()?(n=r.substr(hi,6),hi+=6):(n=o,0===mi&&Si(le)),n!==o?t={type:"origin",value:"with grant option"}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(b=null),b!==o?(e=function(r,t,e,n,s,o,u){return{tableList:Array.from(up),columnList:np(ap),ast:{...r,keyword:"priv",objects:t,on:{object_type:e,priv_level:n},to_from:s[0],user_or_roles:o,with:u}}}(e,n,u,i,c,f,b),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=ml())!==o&&Nv()!==o&&(n=jc())!==o&&Nv()!==o?((s=_f())===o&&(s=Xf()),s!==o&&(function(r,t,e){return{revoke:"from",grant:"to"}[r.type].toLowerCase()===e[0].toLowerCase()}(e,0,s)?void 0:o)!==o&&(u=Nv())!==o&&(a=Al())!==o&&(i=Nv())!==o?((l=function(){var t,e,n;return t=hi,eb()!==o&&Nv()!==o?("admin"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(ce)),e!==o&&Nv()!==o?("option"===r.substr(hi,6).toLowerCase()?(n=r.substr(hi,6),hi+=6):(n=o,0===mi&&Si(le)),n!==o?t={type:"origin",value:"with admin option"}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(l=null),l!==o?(e=function(r,t,e,n,s){return{tableList:Array.from(up),columnList:np(ap),ast:{...r,keyword:"role",objects:t.map((r=>({priv:{type:"string",value:r}}))),to_from:e[0],user_or_roles:n,with:s}}}(e,n,s,a,l),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)),t}())===o&&(t=function(){var t,e,n,s,u,a,l,c,f,b,v,p,L,C,d,w,h,y,E;return t=hi,"if"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(i)),e!==o&&Nv()!==o&&(n=mc())!==o&&Nv()!==o?("then"===r.substr(hi,4).toLowerCase()?(s=r.substr(hi,4),hi+=4):(s=o,0===mi&&Si(ve)),s!==o&&Nv()!==o&&(u=gi())!==o&&Nv()!==o?((a=Ev())===o&&(a=null),a!==o&&Nv()!==o?((l=function(){var r,t,e,n,s,u;if(r=hi,(t=Tl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Tl())!==o?n=s=[s,u]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Tl())!==o?n=s=[s,u]:(hi=n,n=o);e!==o?r=t=rp(t,e,1):(hi=r,r=o)}else hi=r,r=o;return r}())===o&&(l=null),l!==o&&Nv()!==o?(c=hi,(f=Ab())!==o&&(b=Nv())!==o&&(v=gi())!==o?c=f=[f,b,v]:(hi=c,c=o),c===o&&(c=null),c!==o&&(f=Nv())!==o?((b=Ev())===o&&(b=null),b!==o&&(v=Nv())!==o?("end"===r.substr(hi,3).toLowerCase()?(p=r.substr(hi,3),hi+=3):(p=o,0===mi&&Si(pe)),p!==o&&Nv()!==o?("if"===r.substr(hi,2).toLowerCase()?(L=r.substr(hi,2),hi+=2):(L=o,0===mi&&Si(i)),L!==o?(C=n,d=u,w=a,h=l,y=c,E=b,t=e={tableList:Array.from(up),columnList:np(ap),ast:{type:"if",keyword:"if",boolean_expr:C,semicolons:[w||"",E||""],prefix:{type:"origin",value:"then"},if_expr:d,elseif_expr:h,else_expr:y&&y[2],suffix:{type:"origin",value:"end if"}}}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l;return t=hi,"raise"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(ge)),e!==o&&Nv()!==o?((n=function(){var t;return"debug"===r.substr(hi,5).toLowerCase()?(t=r.substr(hi,5),hi+=5):(t=o,0===mi&&Si(Le)),t===o&&("log"===r.substr(hi,3).toLowerCase()?(t=r.substr(hi,3),hi+=3):(t=o,0===mi&&Si(Ce)),t===o&&("info"===r.substr(hi,4).toLowerCase()?(t=r.substr(hi,4),hi+=4):(t=o,0===mi&&Si(de)),t===o&&("notice"===r.substr(hi,6).toLowerCase()?(t=r.substr(hi,6),hi+=6):(t=o,0===mi&&Si(we)),t===o&&("warning"===r.substr(hi,7).toLowerCase()?(t=r.substr(hi,7),hi+=7):(t=o,0===mi&&Si(he)),t===o&&("exception"===r.substr(hi,9).toLowerCase()?(t=r.substr(hi,9),hi+=9):(t=o,0===mi&&Si(ye))))))),t}())===o&&(n=null),n!==o&&Nv()!==o?((s=function(){var t,e,n,s,u,a,i,l,c;if(t=hi,(e=Cf())!==o){for(n=[],s=hi,(u=Nv())!==o&&(a=Lv())!==o&&(i=Nv())!==o&&(l=Pv())!==o?s=u=[u,a,i,l]:(hi=s,s=o);s!==o;)n.push(s),s=hi,(u=Nv())!==o&&(a=Lv())!==o&&(i=Nv())!==o&&(l=Pv())!==o?s=u=[u,a,i,l]:(hi=s,s=o);n!==o?(e={type:"format",keyword:e,expr:(c=n)&&c.map((r=>r[3]))},t=e):(hi=t,t=o)}else hi=t,t=o;return t===o&&(t=hi,"sqlstate"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(_e)),e!==o&&(n=Nv())!==o&&(s=Cf())!==o?t=e={type:"sqlstate",keyword:{type:"origin",value:"SQLSTATE"},expr:[s]}:(hi=t,t=o),t===o&&(t=hi,(e=Gc())!==o&&(e={type:"condition",expr:[{type:"default",value:e}]}),t=e)),t}())===o&&(s=null),s!==o&&Nv()!==o?((u=function(){var t,e,n,s,u,a,i,l,f,b;if(t=hi,(e=tb())!==o)if(Nv()!==o)if("message"===r.substr(hi,7).toLowerCase()?(n=r.substr(hi,7),hi+=7):(n=o,0===mi&&Si(Ee)),n===o&&("detail"===r.substr(hi,6).toLowerCase()?(n=r.substr(hi,6),hi+=6):(n=o,0===mi&&Si(Ae)),n===o&&("hint"===r.substr(hi,4).toLowerCase()?(n=r.substr(hi,4),hi+=4):(n=o,0===mi&&Si(me)),n===o&&("errcode"===r.substr(hi,7).toLowerCase()?(n=r.substr(hi,7),hi+=7):(n=o,0===mi&&Si(Te)),n===o&&("column"===r.substr(hi,6).toLowerCase()?(n=r.substr(hi,6),hi+=6):(n=o,0===mi&&Si(Ie)),n===o&&("constraint"===r.substr(hi,10).toLowerCase()?(n=r.substr(hi,10),hi+=10):(n=o,0===mi&&Si(Ne)),n===o&&("datatype"===r.substr(hi,8).toLowerCase()?(n=r.substr(hi,8),hi+=8):(n=o,0===mi&&Si(Re)),n===o&&("table"===r.substr(hi,5).toLowerCase()?(n=r.substr(hi,5),hi+=5):(n=o,0===mi&&Si(Se)),n===o&&("schema"===r.substr(hi,6).toLowerCase()?(n=r.substr(hi,6),hi+=6):(n=o,0===mi&&Si(c)))))))))),n!==o)if(Nv()!==o)if(sv()!==o)if(Nv()!==o)if((s=mc())!==o){for(u=[],a=hi,(i=Nv())!==o&&(l=Lv())!==o&&(f=Nv())!==o&&(b=mc())!==o?a=i=[i,l,f,b]:(hi=a,a=o);a!==o;)u.push(a),a=hi,(i=Nv())!==o&&(l=Lv())!==o&&(f=Nv())!==o&&(b=mc())!==o?a=i=[i,l,f,b]:(hi=a,a=o);u!==o?(e=function(r,t,e){const n=[t];return e&&e.forEach((r=>n.push(r[3]))),{type:"using",option:r,symbol:"=",expr:n}}(n,s,u),t=e):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;return t}())===o&&(u=null),u!==o?(a=n,i=s,l=u,t=e={tableList:Array.from(up),columnList:np(ap),ast:{type:"raise",level:a,using:l,raise:i}}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=hi,"execute"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(it)),e!==o&&Nv()!==o&&(n=Gc())!==o&&Nv()!==o?(s=hi,(u=dv())!==o&&(a=Nv())!==o&&(i=jv())!==o&&(l=Nv())!==o&&(c=wv())!==o?s=u=[u,a,i,l,c]:(hi=s,s=o),s===o&&(s=null),s!==o?(f=n,b=s,t=e={tableList:Array.from(up),columnList:np(ap),ast:{type:"execute",name:f,args:b&&{type:"expr_list",value:b[2]}}}):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;return t=hi,(e=function(){var t,e,n;return t=hi,"for"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(pt)),e!==o&&(e={label:null,keyword:"for"}),(t=e)===o&&(t=hi,(e=Gc())!==o&&Nv()!==o?("for"===r.substr(hi,3).toLowerCase()?(n=r.substr(hi,3),hi+=3):(n=o,0===mi&&Si(pt)),n!==o?t=e={label:e,keyword:"for"}:(hi=t,t=o)):(hi=t,t=o)),t}())!==o&&Nv()!==o&&(n=Gc())!==o&&Nv()!==o&&fb()!==o&&Nv()!==o&&(s=Il())!==o&&Nv()!==o?("loop"===r.substr(hi,4).toLowerCase()?(u=r.substr(hi,4),hi+=4):(u=o,0===mi&&Si(Oe)),u!==o&&Nv()!==o&&(a=Oi())!==o&&Nv()!==o&&mb()!==o&&Nv()!==o?("loop"===r.substr(hi,4).toLowerCase()?(i=r.substr(hi,4),hi+=4):(i=o,0===mi&&Si(Oe)),i!==o&&Nv()!==o?((l=Gc())===o&&(l=null),l!==o?(f=l,((c=e).label&&f&&c.label===f||!c.label&&!f?void 0:o)!==o?(e=function(r,t,e,n,s){return{tableList:Array.from(up),columnList:np(ap),ast:{type:"for",label:s,target:t,query:e,stmts:n.ast}}}(0,n,s,a,l),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}()),t}())===o&&(t=function(){var r,t;for(r=[],t=Uv();t!==o;)r.push(t),t=Uv();return r}()),t}function Oi(){var r,t,e,n,s,u,a,i;if(r=hi,(t=gi())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Ev())!==o&&(a=Nv())!==o&&(i=gi())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Ev())!==o&&(a=Nv())!==o&&(i=gi())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=function(r,t){const e=r&&r.ast||r,n=t&&t.length&&t[0].length>=4?[e]:e;for(let r=0;r<t.length;r++)t[r][3]&&0!==t[r][3].length&&n.push(t[r][3]&&t[r][3].ast||t[r][3]);return{tableList:Array.from(up),columnList:np(ap),ast:n}}(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function xi(){var t,e,n;return t=hi,function(){var t,e,n,s;return t=hi,"union"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(qo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o?((e=ib())===o&&(e=lb()),e===o&&(e=null),e!==o?t=(n=e)?"union "+n.toLowerCase():"union":(hi=t,t=o)):(hi=t,t=o),t}function Ui(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Il())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=xi())!==o&&(a=Nv())!==o&&(i=Il())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=xi())!==o&&(a=Nv())!==o&&(i=Il())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o&&(n=Nv())!==o?((s=oc())===o&&(s=null),s!==o&&(u=Nv())!==o?((a=ic())===o&&(a=null),a!==o?r=t=function(r,t,e,n){let s=r;for(let r=0;r<t.length;r++)s._next=t[r][3],s.set_op=t[r][1],s=s._next;return e&&(r._orderby=e),n&&n.value&&n.value.length>0&&(r._limit=n),{tableList:Array.from(up),columnList:np(ap),ast:r}}(t,e,s,a):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)}else hi=r,r=o;return r}function Mi(){var t,e;return t=hi,"if"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(i)),e!==o&&Nv()!==o&&Cb()!==o&&Nv()!==o&&Lb()!==o?t=e="IF NOT EXISTS":(hi=t,t=o),t}function ki(){var t,e,n;return t=hi,"check_option"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(C)),e!==o&&Nv()!==o&&sv()!==o&&Nv()!==o?("cascaded"===r.substr(hi,8).toLowerCase()?(n=r.substr(hi,8),hi+=8):(n=o,0===mi&&Si(b)),n===o&&("local"===r.substr(hi,5).toLowerCase()?(n=r.substr(hi,5),hi+=5):(n=o,0===mi&&Si(v))),n!==o?t=e={type:"check_option",value:n,symbol:"="}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"security_barrier"===r.substr(hi,16).toLowerCase()?(e=r.substr(hi,16),hi+=16):(e=o,0===mi&&Si(d)),e===o&&("security_invoker"===r.substr(hi,16).toLowerCase()?(e=r.substr(hi,16),hi+=16):(e=o,0===mi&&Si(w))),e!==o&&Nv()!==o&&sv()!==o&&Nv()!==o&&(n=Lf())!==o?t=e=function(r,t){return{type:r.toLowerCase(),value:t.value?"true":"false",symbol:"="}}(e,n):(hi=t,t=o)),t}function Di(){var r,t,e,n;return r=hi,(t=Gc())!==o&&Nv()!==o&&sv()!==o&&Nv()!==o?((e=Gc())===o&&(e=mc()),e!==o?r=t={type:t,symbol:"=",value:"string"==typeof(n=e)?{type:"default",value:n}:n}:(hi=r,r=o)):(hi=r,r=o),r}function $i(){var r,t,e;return r=hi,(t=Pc())!==o&&Nv()!==o&&(e=Bv())!==o?r=t={column:t,definition:e}:(hi=r,r=o),r}function Pi(){var r,t,e,n,s,u,a,i;if(r=hi,(t=$i())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=$i())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=$i())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Fi(){var t,e,n,s,u,a,i,l,c,f,b,v;return t=hi,(e=qc())!==o&&("begin"!==e.toLowerCase()?void 0:o)!==o&&Nv()!==o?("constant"===r.substr(hi,8).toLowerCase()?(n=r.substr(hi,8),hi+=8):(n=o,0===mi&&Si(T)),n===o&&(n=null),n!==o&&Nv()!==o&&(s=Bv())!==o&&Nv()!==o?((u=Vi())===o&&(u=null),u!==o&&Nv()!==o?(a=hi,(i=Cb())!==o&&(l=Nv())!==o&&(c=Rf())!==o?a=i=[i,l,c]:(hi=a,a=o),a===o&&(a=null),a!==o&&(i=Nv())!==o?(l=hi,(c=Sf())===o&&(":="===r.substr(hi,2)?(c=":=",hi+=2):(c=o,0===mi&&Si(I))),c===o&&(c=null),c!==o&&(f=Nv())!==o?(b=hi,mi++,"begin"===r.substr(hi,5).toLowerCase()?(v=r.substr(hi,5),hi+=5):(v=o,0===mi&&Si(N)),mi--,v!==o?(hi=b,b=void 0):b=o,b===o&&(b=ff())===o&&(b=mc()),b!==o?l=c=[c,f,b]:(hi=l,l=o)):(hi=l,l=o),l===o&&(l=null),l!==o&&(c=Nv())!==o?((f=Ev())===o&&(f=null),f!==o?t=e=function(r,t,e,n,s,o,u){return{keyword:"variable",name:r,constant:t,datatype:e,collate:n,not_null:s&&"not null",definition:o&&o[0]&&{type:"default",keyword:o[0],value:o[2]}}}(e,n,s,u,a,l):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}function Gi(){var t,e,n,s;return t=hi,"declare"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(R)),e!==o&&Nv()!==o&&(n=function(){var r,t,e,n,s,u;if(r=hi,(t=Fi())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Fi())!==o?n=s=[s,u]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Fi())!==o?n=s=[s,u]:(hi=n,n=o);e!==o?r=t=rp(t,e,1):(hi=r,r=o)}else hi=r,r=o;return r}())!==o?(s=n,t=e={tableList:Array.from(up),columnList:np(ap),ast:{type:"declare",declare:s,symbol:";"}}):(hi=t,t=o),t}function ji(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w;if(t=hi,"LANGUAGE"===r.substr(hi,8)?(e="LANGUAGE",hi+=8):(e=o,0===mi&&Si(S)),e!==o&&(n=Nv())!==o&&(s=qc())!==o&&(u=Nv())!==o?t=e={prefix:"LANGUAGE",type:"default",value:s}:(hi=t,t=o),t===o&&(t=hi,"transorm"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(_)),e!==o&&(n=Nv())!==o?(s=hi,"FOR"===r.substr(hi,3)?(u="FOR",hi+=3):(u=o,0===mi&&Si(g)),u!==o&&(a=Nv())!==o?("TYPE"===r.substr(hi,4)?(i="TYPE",hi+=4):(i=o,0===mi&&Si(O)),i!==o&&(l=Nv())!==o&&(c=qc())!==o?s=u=[u,a,i,l,c]:(hi=s,s=o)):(hi=s,s=o),s===o&&(s=null),s!==o&&(u=Nv())!==o?t=e=(w=s)?{prefix:["TRANSORM",w[0].toUpperCase(),w[2].toUpperCase()].join(" "),type:"default",value:w[4]}:{type:"origin",value:"TRANSORM"}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"window"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(x)),e===o&&("immutable"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(U)),e===o&&("stable"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(M)),e===o&&("volatile"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(k)),e===o&&("strict"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(D)))))),e!==o&&(n=Nv())!==o?t=e={type:"origin",value:e}:(hi=t,t=o),t===o&&(t=hi,"not"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si($)),e===o&&(e=null),e!==o&&(n=Nv())!==o?("leakproof"===r.substr(hi,9).toLowerCase()?(s=r.substr(hi,9),hi+=9):(s=o,0===mi&&Si(P)),s!==o&&(u=Nv())!==o?t=e={type:"origin",value:[e,"LEAKPROOF"].filter((r=>r)).join(" ")}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"called"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(F)),e===o&&(e=hi,"returns"===r.substr(hi,7).toLowerCase()?(n=r.substr(hi,7),hi+=7):(n=o,0===mi&&Si(A)),n!==o&&(s=Nv())!==o?("null"===r.substr(hi,4).toLowerCase()?(u=r.substr(hi,4),hi+=4):(u=o,0===mi&&Si(G)),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o)),e===o&&(e=null),e!==o&&(n=Nv())!==o?("on"===r.substr(hi,2).toLowerCase()?(s=r.substr(hi,2),hi+=2):(s=o,0===mi&&Si(j)),s!==o&&(u=Nv())!==o?("null"===r.substr(hi,4).toLowerCase()?(a=r.substr(hi,4),hi+=4):(a=o,0===mi&&Si(G)),a!==o&&(i=Nv())!==o?("input"===r.substr(hi,5).toLowerCase()?(l=r.substr(hi,5),hi+=5):(l=o,0===mi&&Si(H)),l!==o&&(c=Nv())!==o?t=e=function(r){return Array.isArray(r)&&(r=[r[0],r[2]].join(" ")),{type:"origin",value:r+" ON NULL INPUT"}}(e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"external"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Y)),e===o&&(e=null),e!==o&&(n=Nv())!==o?("security"===r.substr(hi,8).toLowerCase()?(s=r.substr(hi,8),hi+=8):(s=o,0===mi&&Si(B)),s!==o&&(u=Nv())!==o?("invoker"===r.substr(hi,7).toLowerCase()?(a=r.substr(hi,7),hi+=7):(a=o,0===mi&&Si(W)),a===o&&("definer"===r.substr(hi,7).toLowerCase()?(a=r.substr(hi,7),hi+=7):(a=o,0===mi&&Si(X))),a!==o&&(i=Nv())!==o?t=e=function(r,t){return{type:"origin",value:[r,"SECURITY",t].filter((r=>r)).join(" ")}}(e,a):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"parallel"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(V)),e!==o&&(n=Nv())!==o?("unsafe"===r.substr(hi,6).toLowerCase()?(s=r.substr(hi,6),hi+=6):(s=o,0===mi&&Si(q)),s===o&&("restricted"===r.substr(hi,10).toLowerCase()?(s=r.substr(hi,10),hi+=10):(s=o,0===mi&&Si(K)),s===o&&("safe"===r.substr(hi,4).toLowerCase()?(s=r.substr(hi,4),hi+=4):(s=o,0===mi&&Si(Z)))),s!==o&&(u=Nv())!==o?t=e=function(r){return{type:"origin",value:["PARALLEL",r].join(" ")}}(s):(hi=t,t=o)):(hi=t,t=o),t===o))))))){if(t=hi,(e=qf())!==o)if((n=Nv())!==o){if(s=[],z.test(r.charAt(hi))?(u=r.charAt(hi),hi++):(u=o,0===mi&&Si(Q)),u!==o)for(;u!==o;)s.push(u),z.test(r.charAt(hi))?(u=r.charAt(hi),hi++):(u=o,0===mi&&Si(Q));else s=o;if(s!==o)if((u=Nv())!==o)if((a=Gi())===o&&(a=null),a!==o)if((i=Nv())!==o)if("begin"===r.substr(hi,5).toLowerCase()?(l=r.substr(hi,5),hi+=5):(l=o,0===mi&&Si(N)),l===o&&(l=null),l!==o)if((c=Nv())!==o)if((f=Oi())!==o)if(Nv()!==o)if((b=mb())===o&&(b=null),b!==o)if(d=b,((C=l)&&d||!C&&!d?void 0:o)!==o)if(Nv()!==o)if((v=Ev())===o&&(v=null),v!==o)if(Nv()!==o){if(p=[],J.test(r.charAt(hi))?(L=r.charAt(hi),hi++):(L=o,0===mi&&Si(rr)),L!==o)for(;L!==o;)p.push(L),J.test(r.charAt(hi))?(L=r.charAt(hi),hi++):(L=o,0===mi&&Si(rr));else p=o;p!==o&&(L=Nv())!==o?t=e=function(r,t,e,n,s,o){const u=r.join(""),a=o.join("");if(u!==a)throw new Error(`start symbol '${u}'is not same with end symbol '${a}'`);return{type:"as",declare:t&&t.ast,begin:e,expr:Array.isArray(n.ast)?n.ast.flat():[n.ast],end:s&&s[0],symbol:u}}(s,a,l,f,b,p):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o}else hi=t,t=o;else hi=t,t=o;t===o&&(t=hi,"cost"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(tr)),e===o&&("rows"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(er))),e!==o&&(n=Nv())!==o&&(s=yf())!==o&&(u=Nv())!==o?t=e=function(r,t){return t.prefix=r,t}(e,s):(hi=t,t=o),t===o&&(t=hi,"support"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(nr)),e!==o&&(n=Nv())!==o&&(s=Fv())!==o&&(u=Nv())!==o?t=e=function(r){return{prefix:"support",type:"default",value:r}}(s):(hi=t,t=o),t===o&&(t=hi,(e=Vf())!==o&&(n=Nv())!==o&&(s=qc())!==o&&(u=Nv())!==o?(a=hi,"to"===r.substr(hi,2).toLowerCase()?(i=r.substr(hi,2),hi+=2):(i=o,0===mi&&Si(sr)),i===o&&(61===r.charCodeAt(hi)?(i="=",hi++):(i=o,0===mi&&Si(or))),i!==o&&(l=Nv())!==o&&(c=jc())!==o?a=i=[i,l,c]:(hi=a,a=o),a===o&&(a=hi,(i=Xf())!==o&&(l=Nv())!==o?("current"===r.substr(hi,7).toLowerCase()?(c=r.substr(hi,7),hi+=7):(c=o,0===mi&&Si(ur)),c!==o?a=i=[i,l,c]:(hi=a,a=o)):(hi=a,a=o)),a===o&&(a=null),a!==o&&(i=Nv())!==o?t=e=function(r,t){let e;if(t){const r=Array.isArray(t[2])?t[2]:[t[2]];e={prefix:t[0],expr:r.map((r=>({type:"default",value:r})))}}return{type:"set",parameter:r,value:e}}(s,a):(hi=t,t=o)):(hi=t,t=o))))}return t}function Hi(){var t;return(t=function(){var t,e,n,s,u,a;return t=hi,"increment"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(cr)),e!==o&&Nv()!==o?((n=sb())===o&&(n=null),n!==o&&Nv()!==o&&(s=yf())!==o?(u=e,a=s,t=e={resource:"sequence",prefix:n?u.toLowerCase()+" by":u.toLowerCase(),value:a}):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=hi,"minvalue"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(fr)),e!==o&&Nv()!==o&&(n=yf())!==o?t=e=br(e,n):(hi=t,t=o),t===o&&(t=hi,"no"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(vr)),e!==o&&Nv()!==o?("minvalue"===r.substr(hi,8).toLowerCase()?(n=r.substr(hi,8),hi+=8):(n=o,0===mi&&Si(fr)),n!==o?t=e={resource:"sequence",value:{type:"origin",value:"no minvalue"}}:(hi=t,t=o)):(hi=t,t=o)),t}())===o&&(t=function(){var t,e,n;return t=hi,"maxvalue"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(pr)),e!==o&&Nv()!==o&&(n=yf())!==o?t=e=br(e,n):(hi=t,t=o),t===o&&(t=hi,"no"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(vr)),e!==o&&Nv()!==o?("maxvalue"===r.substr(hi,8).toLowerCase()?(n=r.substr(hi,8),hi+=8):(n=o,0===mi&&Si(pr)),n!==o?t=e={resource:"sequence",value:{type:"origin",value:"no maxvalue"}}:(hi=t,t=o)):(hi=t,t=o)),t}())===o&&(t=function(){var t,e,n,s,u,a;return t=hi,"start"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Lr)),e!==o&&Nv()!==o?((n=eb())===o&&(n=null),n!==o&&Nv()!==o&&(s=yf())!==o?(u=e,a=s,t=e={resource:"sequence",prefix:n?u.toLowerCase()+" with":u.toLowerCase(),value:a}):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=hi,"cache"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Cr)),e!==o&&Nv()!==o&&(n=yf())!==o?t=e=br(e,n):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=hi,"no"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(vr)),e===o&&(e=null),e!==o&&Nv()!==o?("cycle"===r.substr(hi,5).toLowerCase()?(n=r.substr(hi,5),hi+=5):(n=o,0===mi&&Si(dr)),n!==o?t=e={resource:"sequence",value:{type:"origin",value:e?"no cycle":"cycle"}}:(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=hi,"owned"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(wr)),e!==o&&Nv()!==o&&sb()!==o&&Nv()!==o?("none"===r.substr(hi,4).toLowerCase()?(n=r.substr(hi,4),hi+=4):(n=o,0===mi&&Si(hr)),n!==o?t=e={resource:"sequence",prefix:"owned by",value:{type:"origin",value:"none"}}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"owned"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(wr)),e!==o&&Nv()!==o&&sb()!==o&&Nv()!==o&&(n=Pc())!==o?t=e={resource:"sequence",prefix:"owned by",value:n}:(hi=t,t=o)),t}()),t}function Yi(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;return t=hi,(e=mc())!==o&&Nv()!==o?((n=Vi())===o&&(n=null),n!==o&&Nv()!==o?((s=Gc())===o&&(s=null),s!==o&&Nv()!==o?((u=ub())===o&&(u=ab()),u===o&&(u=null),u!==o&&Nv()!==o?(a=hi,"nulls"===r.substr(hi,5).toLowerCase()?(i=r.substr(hi,5),hi+=5):(i=o,0===mi&&Si(yr)),i!==o&&(l=Nv())!==o?("first"===r.substr(hi,5).toLowerCase()?(c=r.substr(hi,5),hi+=5):(c=o,0===mi&&Si(Er)),c===o&&("last"===r.substr(hi,4).toLowerCase()?(c=r.substr(hi,4),hi+=4):(c=o,0===mi&&Si(Ar))),c!==o?a=i=[i,l,c]:(hi=a,a=o)):(hi=a,a=o),a===o&&(a=null),a!==o?(f=e,b=n,v=s,p=u,L=a,t=e={...f,collate:b,opclass:v,order_by:p&&p.toLowerCase(),nulls:L&&`${L[0].toLowerCase()} ${L[2].toLowerCase()}`}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}function Bi(){var r;return(r=Xi())===o&&(r=ul())===o&&(r=al())===o&&(r=il()),r}function Wi(){var t,e,n,s;return(t=function(){var r,t,e,n,s;return r=hi,(t=pf())===o&&(t=vf()),t!==o&&Nv()!==o?((e=Ki())===o&&(e=null),e!==o?(s=e,(n=t)&&!n.value&&(n.value="null"),r=t={default_val:s,nullable:n}):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,(t=Ki())!==o&&Nv()!==o?((e=pf())===o&&(e=vf()),e===o&&(e=null),e!==o?(t=function(r,t){return t&&!t.value&&(t.value="null"),{default_val:r,nullable:t}}(t,e),r=t):(hi=r,r=o)):(hi=r,r=o)),r}())===o&&(t=hi,"auto_increment"===r.substr(hi,14).toLowerCase()?(e=r.substr(hi,14),hi+=14):(e=o,0===mi&&Si(mr)),e!==o&&(e={auto_increment:e.toLowerCase()}),(t=e)===o&&(t=hi,"unique"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Tr)),e!==o&&Nv()!==o?("key"===r.substr(hi,3).toLowerCase()?(n=r.substr(hi,3),hi+=3):(n=o,0===mi&&Si(Ir)),n===o&&(n=null),n!==o?t=e=function(r){const t=["unique"];return r&&t.push(r),{unique:t.join(" ").toLowerCase("")}}(n):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"primary"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Nr)),e===o&&(e=null),e!==o&&Nv()!==o?("key"===r.substr(hi,3).toLowerCase()?(n=r.substr(hi,3),hi+=3):(n=o,0===mi&&Si(Ir)),n!==o?t=e=function(r){const t=[];return r&&t.push("primary"),t.push("key"),{primary_key:t.join(" ").toLowerCase("")}}(e):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=_v())!==o&&(e={comment:e}),(t=e)===o&&(t=hi,(e=Vi())!==o&&(e={collate:e}),(t=e)===o&&(t=hi,(e=function(){var t,e,n;return t=hi,"column_format"===r.substr(hi,13).toLowerCase()?(e=r.substr(hi,13),hi+=13):(e=o,0===mi&&Si(Rr)),e!==o&&Nv()!==o?("fixed"===r.substr(hi,5).toLowerCase()?(n=r.substr(hi,5),hi+=5):(n=o,0===mi&&Si(Sr)),n===o&&("dynamic"===r.substr(hi,7).toLowerCase()?(n=r.substr(hi,7),hi+=7):(n=o,0===mi&&Si(_r)),n===o&&("default"===r.substr(hi,7).toLowerCase()?(n=r.substr(hi,7),hi+=7):(n=o,0===mi&&Si(gr)))),n!==o?t=e={type:"column_format",value:n.toLowerCase()}:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(e={column_format:e}),(t=e)===o&&(t=hi,(e=function(){var t,e,n;return t=hi,"storage"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Or)),e!==o&&Nv()!==o?("disk"===r.substr(hi,4).toLowerCase()?(n=r.substr(hi,4),hi+=4):(n=o,0===mi&&Si(xr)),n===o&&("memory"===r.substr(hi,6).toLowerCase()?(n=r.substr(hi,6),hi+=6):(n=o,0===mi&&Si(Ur))),n!==o?t=e={type:"storage",value:n.toLowerCase()}:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(e={storage:e}),(t=e)===o&&(t=hi,(e=fl())!==o&&(e={reference_definition:e}),(t=e)===o&&(t=hi,(e=pl())!==o&&Nv()!==o?((n=sv())===o&&(n=null),n!==o&&Nv()!==o&&(s=qc())!==o?t=e=function(r,t,e){return{character_set:{type:r,value:e,symbol:t}}}(e,n,s):(hi=t,t=o)):(hi=t,t=o)))))))))),t}function Xi(){var r,t,e,n,s,u,a;return r=hi,(t=Pc())!==o&&Nv()!==o&&(e=Bv())!==o&&Nv()!==o?((n=function(){var r,t,e,n,s,u;if(r=hi,(t=Wi())!==o)if(Nv()!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Wi())!==o?n=s=[s,u]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Wi())!==o?n=s=[s,u]:(hi=n,n=o);e!==o?r=t=function(r,t){let e=r;for(let r=0;r<t.length;r++)e={...e,...t[r][1]};return e}(t,e):(hi=r,r=o)}else hi=r,r=o;else hi=r,r=o;return r}())===o&&(n=null),n!==o?(s=t,u=e,a=n,ap.add(`create::${s.table}::${s.column}`),r=t={column:s,definition:u,resource:"column",...a||{}}):(hi=r,r=o)):(hi=r,r=o),r}function Vi(){var t,e,n;return t=hi,function(){var t,e,n,s;return t=hi,"collate"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Et)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="COLLATE":(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o?((e=sv())===o&&(e=null),e!==o&&Nv()!==o&&(n=Gc())!==o?t={type:"collate",symbol:e,value:n}:(hi=t,t=o)):(hi=t,t=o),t}function qi(){var r,t,e,n,s;return r=hi,(t=Sf())===o&&(t=sv()),t===o&&(t=null),t!==o&&Nv()!==o?((e=ff())===o&&(e=mc()),e!==o?(s=e,r=t={type:"default",keyword:(n=t)&&n[0],value:s}):(hi=r,r=o)):(hi=r,r=o),r}function Ki(){var r,t;return r=hi,Sf()!==o&&Nv()!==o?((t=ff())===o&&(t=mc()),t!==o?r={type:"default",value:t}:(hi=r,r=o)):(hi=r,r=o),r}function Zi(){var r,t,e;return r=hi,(t=Cv())!==o&&(t=[{name:"*"}]),(r=t)===o&&(r=hi,(t=Ji())===o&&(t=null),t!==o&&Nv()!==o&&ob()!==o&&Nv()!==o&&sb()!==o&&Nv()!==o&&(e=Ji())!==o?r=t=function(r,t){const e=r||[];return e.orderby=t,e}(t,e):(hi=r,r=o),r===o&&(r=Ji())),r}function zi(){var t;return(t=fb())===o&&("out"===r.substr(hi,3).toLowerCase()?(t=r.substr(hi,3),hi+=3):(t=o,0===mi&&Si(Dr)),t===o&&("variadic"===r.substr(hi,8).toLowerCase()?(t=r.substr(hi,8),hi+=8):(t=o,0===mi&&Si($r)),t===o&&("inout"===r.substr(hi,5).toLowerCase()?(t=r.substr(hi,5),hi+=5):(t=o,0===mi&&Si(Pr))))),t!==o&&(t=t.toUpperCase()),t}function Qi(){var r,t,e,n,s;return r=hi,(t=zi())===o&&(t=null),t!==o&&Nv()!==o&&(e=Bv())!==o&&Nv()!==o?((n=qi())===o&&(n=null),n!==o?r=t={mode:t,type:e,default:n}:(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,(t=zi())===o&&(t=null),t!==o&&Nv()!==o&&(e=qc())!==o&&Nv()!==o&&(n=Bv())!==o&&Nv()!==o?((s=qi())===o&&(s=null),s!==o?r=t=function(r,t,e,n){return{mode:r,name:t,type:e,default:n}}(t,e,n,s):(hi=r,r=o)):(hi=r,r=o)),r}function Ji(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Qi())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Qi())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Qi())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function rl(){var r;return(r=function(){var r,t,e,n,s;return r=hi,ov()!==o&&Nv()!==o?((t=uv())===o&&(t=null),t!==o&&Nv()!==o&&(e=Xi())!==o?(n=t,s=e,r={action:"add",...s,keyword:n,resource:"column",type:"alter"}):(hi=r,r=o)):(hi=r,r=o),r}())===o&&(r=function(){var r,t;return r=hi,ov()!==o&&Nv()!==o&&(t=il())!==o?r={action:"add",create_definitions:t,resource:"constraint",type:"alter"}:(hi=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=hi,Of()!==o&&Nv()!==o?((t=uv())===o&&(t=null),t!==o&&Nv()!==o&&(e=Pc())!==o?r={action:"drop",column:e,keyword:t,resource:"column",type:"alter"}:(hi=r,r=o)):(hi=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=hi,ov()!==o&&Nv()!==o&&(t=ul())!==o?(e=t,r={action:"add",type:"alter",...e}):(hi=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=hi,ov()!==o&&Nv()!==o&&(t=al())!==o?(e=t,r={action:"add",type:"alter",...e}):(hi=r,r=o),r}())===o&&(r=tl())===o&&(r=sl())===o&&(r=ol()),r}function tl(){var r,t,e,n,s;return r=hi,Hf()!==o&&Nv()!==o?((t=_f())===o&&(t=qf()),t===o&&(t=null),t!==o&&Nv()!==o&&(e=Gc())!==o?(s=e,r={action:"rename",type:"alter",resource:"table",keyword:(n=t)&&n[0].toLowerCase(),table:s}):(hi=r,r=o)):(hi=r,r=o),r}function el(){var t,e,n;return t=hi,"owner"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Fr)),e!==o&&Nv()!==o&&_f()!==o&&Nv()!==o?((n=Gc())===o&&("current_role"===r.substr(hi,12).toLowerCase()?(n=r.substr(hi,12),hi+=12):(n=o,0===mi&&Si(Gr)),n===o&&("current_user"===r.substr(hi,12).toLowerCase()?(n=r.substr(hi,12),hi+=12):(n=o,0===mi&&Si(jr)),n===o&&("session_user"===r.substr(hi,12).toLowerCase()?(n=r.substr(hi,12),hi+=12):(n=o,0===mi&&Si(Hr))))),n!==o?t=e={action:"owner",type:"alter",resource:"table",keyword:"to",table:n}:(hi=t,t=o)):(hi=t,t=o),t}function nl(){var r,t;return r=hi,Vf()!==o&&Nv()!==o&&Zf()!==o&&Nv()!==o&&(t=Gc())!==o?r={action:"set",type:"alter",resource:"table",keyword:"schema",table:t}:(hi=r,r=o),r}function sl(){var t,e,n,s;return t=hi,"algorithm"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(Yr)),e!==o&&Nv()!==o?((n=sv())===o&&(n=null),n!==o&&Nv()!==o?("default"===r.substr(hi,7).toLowerCase()?(s=r.substr(hi,7),hi+=7):(s=o,0===mi&&Si(gr)),s===o&&("instant"===r.substr(hi,7).toLowerCase()?(s=r.substr(hi,7),hi+=7):(s=o,0===mi&&Si(Br)),s===o&&("inplace"===r.substr(hi,7).toLowerCase()?(s=r.substr(hi,7),hi+=7):(s=o,0===mi&&Si(Wr)),s===o&&("copy"===r.substr(hi,4).toLowerCase()?(s=r.substr(hi,4),hi+=4):(s=o,0===mi&&Si(Xr))))),s!==o?t=e={type:"alter",keyword:"algorithm",resource:"algorithm",symbol:n,algorithm:s}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}function ol(){var t,e,n,s;return t=hi,"lock"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Vr)),e!==o&&Nv()!==o?((n=sv())===o&&(n=null),n!==o&&Nv()!==o?("default"===r.substr(hi,7).toLowerCase()?(s=r.substr(hi,7),hi+=7):(s=o,0===mi&&Si(gr)),s===o&&("none"===r.substr(hi,4).toLowerCase()?(s=r.substr(hi,4),hi+=4):(s=o,0===mi&&Si(hr)),s===o&&("shared"===r.substr(hi,6).toLowerCase()?(s=r.substr(hi,6),hi+=6):(s=o,0===mi&&Si(qr)),s===o&&("exclusive"===r.substr(hi,9).toLowerCase()?(s=r.substr(hi,9),hi+=9):(s=o,0===mi&&Si(Kr))))),s!==o?t=e={type:"alter",keyword:"lock",resource:"lock",symbol:n,lock:s}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}function ul(){var r,t,e,n,s,u,a,i;return r=hi,(t=av())===o&&(t=iv()),t!==o&&Nv()!==o?((e=Xc())===o&&(e=null),e!==o&&Nv()!==o?((n=jl())===o&&(n=null),n!==o&&Nv()!==o&&(s=Sl())!==o&&Nv()!==o?((u=Hl())===o&&(u=null),u!==o&&Nv()!==o?(a=n,i=u,r=t={index:e,definition:s,keyword:t.toLowerCase(),index_type:a,resource:"index",index_options:i}):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r}function al(){var t,e,n,s,u,a,i,l,c;return t=hi,(e=function(){var t,e,n,s;return t=hi,"fulltext"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Pa)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="FULLTEXT":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=hi,"spatial"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Fa)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SPATIAL":(hi=t,t=o)):(hi=t,t=o),t}()),e!==o&&Nv()!==o?((n=av())===o&&(n=iv()),n===o&&(n=null),n!==o&&Nv()!==o?((s=Xc())===o&&(s=null),s!==o&&Nv()!==o&&(u=Sl())!==o&&Nv()!==o?((a=Hl())===o&&(a=null),a!==o&&Nv()!==o?(i=e,c=a,t=e={index:s,definition:u,keyword:(l=n)&&`${i.toLowerCase()} ${l.toLowerCase()}`||i.toLowerCase(),index_options:c,resource:"index"}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}function il(){var t;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=hi,(e=ll())===o&&(e=null),e!==o&&Nv()!==o?("primary key"===r.substr(hi,11).toLowerCase()?(n=r.substr(hi,11),hi+=11):(n=o,0===mi&&Si(Zr)),n!==o&&Nv()!==o?((s=jl())===o&&(s=null),s!==o&&Nv()!==o&&(u=Sl())!==o&&Nv()!==o?((a=Hl())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l.toLowerCase(),keyword:i&&i.keyword,index_type:c,resource:"constraint",index_options:b}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;return r=hi,(t=ll())===o&&(t=null),t!==o&&Nv()!==o&&(e=lv())!==o&&Nv()!==o?((n=av())===o&&(n=iv()),n===o&&(n=null),n!==o&&Nv()!==o?((s=Xc())===o&&(s=null),s!==o&&Nv()!==o?((u=jl())===o&&(u=null),u!==o&&Nv()!==o&&(a=Sl())!==o&&Nv()!==o?((i=Hl())===o&&(i=null),i!==o?(c=e,f=n,b=s,v=u,p=a,L=i,r=t={constraint:(l=t)&&l.constraint,definition:p,constraint_type:f&&`${c.toLowerCase()} ${f.toLowerCase()}`||c.toLowerCase(),keyword:l&&l.keyword,index_type:v,index:b,resource:"constraint",index_options:L}):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=hi,(e=ll())===o&&(e=null),e!==o&&Nv()!==o?("foreign key"===r.substr(hi,11).toLowerCase()?(n=r.substr(hi,11),hi+=11):(n=o,0===mi&&Si(zr)),n!==o&&Nv()!==o?((s=Xc())===o&&(s=null),s!==o&&Nv()!==o&&(u=Sl())!==o&&Nv()!==o?((a=fl())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l,keyword:i&&i.keyword,index:c,resource:"constraint",reference_definition:b}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=cl()),t}function ll(){var r,t,e,n;return r=hi,(t=fv())!==o&&Nv()!==o?((e=Gc())===o&&(e=null),e!==o?(n=e,r=t={keyword:t.toLowerCase(),constraint:n}):(hi=r,r=o)):(hi=r,r=o),r}function cl(){var t,e,n,s,u,a,i;return t=hi,(e=ll())===o&&(e=null),e!==o&&Nv()!==o?("check"===r.substr(hi,5).toLowerCase()?(n=r.substr(hi,5),hi+=5):(n=o,0===mi&&Si(p)),n!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(s=Tc())!==o&&Nv()!==o&&wv()!==o?(a=n,i=s,t=e={constraint:(u=e)&&u.constraint,definition:[i],constraint_type:a.toLowerCase(),keyword:u&&u.keyword,resource:"constraint"}):(hi=t,t=o)):(hi=t,t=o),t}function fl(){var t,e,n,s,u,a,i,l,c,f;return t=hi,(e=vv())!==o&&Nv()!==o&&(n=ql())!==o&&Nv()!==o&&(s=Sl())!==o&&Nv()!==o?("match full"===r.substr(hi,10).toLowerCase()?(u=r.substr(hi,10),hi+=10):(u=o,0===mi&&Si(Qr)),u===o&&("match partial"===r.substr(hi,13).toLowerCase()?(u=r.substr(hi,13),hi+=13):(u=o,0===mi&&Si(Jr)),u===o&&("match simple"===r.substr(hi,12).toLowerCase()?(u=r.substr(hi,12),hi+=12):(u=o,0===mi&&Si(rt)))),u===o&&(u=null),u!==o&&Nv()!==o?((a=bl())===o&&(a=null),a!==o&&Nv()!==o?((i=bl())===o&&(i=null),i!==o?(l=u,c=a,f=i,t=e={definition:s,table:[n],keyword:e.toLowerCase(),match:l&&l.toLowerCase(),on_action:[c,f].filter((r=>r))}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=bl())!==o&&(e={on_action:[e]}),t=e),t}function bl(){var t,e,n,s;return t=hi,zf()!==o&&Nv()!==o?((e=Pf())===o&&(e=Mf()),e!==o&&Nv()!==o&&(n=function(){var t,e,n;return t=hi,(e=Qb())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o?((n=dc())===o&&(n=null),n!==o&&Nv()!==o&&wv()!==o?t=e={type:"function",name:e,args:n}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"restrict"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(kr)),e===o&&("cascade"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Mr)),e===o&&("set null"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(tt)),e===o&&("no action"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(et)),e===o&&("set default"===r.substr(hi,11).toLowerCase()?(e=r.substr(hi,11),hi+=11):(e=o,0===mi&&Si(nt)),e===o&&(e=Qb()))))),e!==o&&(e={type:"origin",value:e.toLowerCase()}),t=e),t}())!==o?(s=n,t={type:"on "+e[0].toLowerCase(),value:s}):(hi=t,t=o)):(hi=t,t=o),t}function vl(){var t,e,n,s,u,a,i;return t=hi,(e=Ff())===o&&(e=Pf())===o&&(e=Zb()),e!==o&&(i=e,e={keyword:Array.isArray(i)?i[0].toLowerCase():i.toLowerCase()}),(t=e)===o&&(t=hi,(e=Mf())!==o&&Nv()!==o?(n=hi,"of"===r.substr(hi,2).toLowerCase()?(s=r.substr(hi,2),hi+=2):(s=o,0===mi&&Si(ct)),s!==o&&(u=Nv())!==o&&(a=zl())!==o?n=s=[s,u,a]:(hi=n,n=o),n===o&&(n=null),n!==o?t=e=function(r,t){return{keyword:r&&r[0]&&r[0].toLowerCase(),args:t&&{keyword:t[0],columns:t[2]}||null}}(e,n):(hi=t,t=o)):(hi=t,t=o)),t}function pl(){var t,e,n;return t=hi,"character"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(wt)),e!==o&&Nv()!==o?("set"===r.substr(hi,3).toLowerCase()?(n=r.substr(hi,3),hi+=3):(n=o,0===mi&&Si(ht)),n!==o?t=e="CHARACTER SET":(hi=t,t=o)):(hi=t,t=o),t}function Ll(){var t,e,n,s,u,a,i,l,c;return t=hi,(e=Sf())===o&&(e=null),e!==o&&Nv()!==o?((n=pl())===o&&("charset"===r.substr(hi,7).toLowerCase()?(n=r.substr(hi,7),hi+=7):(n=o,0===mi&&Si(yt)),n===o&&("collate"===r.substr(hi,7).toLowerCase()?(n=r.substr(hi,7),hi+=7):(n=o,0===mi&&Si(Et)))),n!==o&&Nv()!==o?((s=sv())===o&&(s=null),s!==o&&Nv()!==o&&(u=qc())!==o?(i=n,l=s,c=u,t=e={keyword:(a=e)&&`${a[0].toLowerCase()} ${i.toLowerCase()}`||i.toLowerCase(),symbol:l,value:c}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}function Cl(){var t,e,n,s,u,a,i,l,c;return t=hi,"auto_increment"===r.substr(hi,14).toLowerCase()?(e=r.substr(hi,14),hi+=14):(e=o,0===mi&&Si(mr)),e===o&&("avg_row_length"===r.substr(hi,14).toLowerCase()?(e=r.substr(hi,14),hi+=14):(e=o,0===mi&&Si(At)),e===o&&("key_block_size"===r.substr(hi,14).toLowerCase()?(e=r.substr(hi,14),hi+=14):(e=o,0===mi&&Si(mt)),e===o&&("max_rows"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Tt)),e===o&&("min_rows"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(It)),e===o&&("stats_sample_pages"===r.substr(hi,18).toLowerCase()?(e=r.substr(hi,18),hi+=18):(e=o,0===mi&&Si(Nt))))))),e!==o&&Nv()!==o?((n=sv())===o&&(n=null),n!==o&&Nv()!==o&&(s=yf())!==o?(l=n,c=s,t=e={keyword:e.toLowerCase(),symbol:l,value:c.value}):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=Ll())===o&&(t=hi,(e=cv())===o&&("connection"===r.substr(hi,10).toLowerCase()?(e=r.substr(hi,10),hi+=10):(e=o,0===mi&&Si(Rt))),e!==o&&Nv()!==o?((n=sv())===o&&(n=null),n!==o&&Nv()!==o&&(s=Cf())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:`'${e.value}'`}}(e,n,s):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"compression"===r.substr(hi,11).toLowerCase()?(e=r.substr(hi,11),hi+=11):(e=o,0===mi&&Si(St)),e!==o&&Nv()!==o?((n=sv())===o&&(n=null),n!==o&&Nv()!==o?(s=hi,39===r.charCodeAt(hi)?(u="'",hi++):(u=o,0===mi&&Si(_t)),u!==o?("zlib"===r.substr(hi,4).toLowerCase()?(a=r.substr(hi,4),hi+=4):(a=o,0===mi&&Si(gt)),a===o&&("lz4"===r.substr(hi,3).toLowerCase()?(a=r.substr(hi,3),hi+=3):(a=o,0===mi&&Si(Ot)),a===o&&("none"===r.substr(hi,4).toLowerCase()?(a=r.substr(hi,4),hi+=4):(a=o,0===mi&&Si(hr)))),a!==o?(39===r.charCodeAt(hi)?(i="'",hi++):(i=o,0===mi&&Si(_t)),i!==o?s=u=[u,a,i]:(hi=s,s=o)):(hi=s,s=o)):(hi=s,s=o),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.join("").toUpperCase()}}(e,n,s):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"engine"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(xt)),e!==o&&Nv()!==o?((n=sv())===o&&(n=null),n!==o&&Nv()!==o&&(s=qc())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.toUpperCase()}}(e,n,s):(hi=t,t=o)):(hi=t,t=o)))),t}function dl(){var t,e,n,s;return t=hi,ib()!==o?(e=hi,(n=Nv())!==o?("privileges"===r.substr(hi,10).toLowerCase()?(s=r.substr(hi,10),hi+=10):(s=o,0===mi&&Si(qt)),s!==o?e=n=[n,s]:(hi=e,e=o)):(hi=e,e=o),e===o&&(e=null),e!==o?t={type:"origin",value:e?"all privileges":"all"}:(hi=t,t=o)):(hi=t,t=o),t}function wl(){var t;return(t=function(){var t,e;return(t=Uf())===o&&(t=Ff())===o&&(t=Mf())===o&&(t=Pf())===o&&(t=Zb())===o&&(t=vv())===o&&("trigger"===r.substr(hi,7).toLowerCase()?(t=r.substr(hi,7),hi+=7):(t=o,0===mi&&Si(st))),t!==o&&(e=t,t={type:"origin",value:Array.isArray(e)?e[0]:e}),t}())===o&&(t=function(){var t;return"usage"===r.substr(hi,5).toLowerCase()?(t=r.substr(hi,5),hi+=5):(t=o,0===mi&&Si(Wt)),t===o&&(t=Uf())===o&&(t=Mf()),t!==o&&(t=Xt(t)),t}())===o&&(t=function(){var t;return(t=kf())===o&&("connect"===r.substr(hi,7).toLowerCase()?(t=r.substr(hi,7),hi+=7):(t=o,0===mi&&Si(Vt)),t===o&&(t=Df())===o&&(t=$f())),t!==o&&(t=Xt(t)),t}())===o&&(t=function(){var t,e;return t=hi,"usage"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Wt)),e!==o&&(e=Kt(e)),(t=e)===o&&(t=dl()),t}())===o&&(t=function(){var t,e;return t=hi,"execute"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(it)),e!==o&&(e=Kt(e)),(t=e)===o&&(t=dl()),t}()),t}function hl(){var r,t,e,n,s,u,a,i,l;return r=hi,(t=wl())!==o&&Nv()!==o?(e=hi,(n=dv())!==o&&(s=Nv())!==o&&(u=zl())!==o&&(a=Nv())!==o&&(i=wv())!==o?e=n=[n,s,u,a,i]:(hi=e,e=o),e===o&&(e=null),e!==o?r=t={priv:t,columns:(l=e)&&l[2]}:(hi=r,r=o)):(hi=r,r=o),r}function yl(){var r,t,e,n,s,u,a;return r=hi,t=hi,(e=Gc())!==o&&(n=Nv())!==o&&(s=pv())!==o?t=e=[e,n,s]:(hi=t,t=o),t===o&&(t=null),t!==o&&(e=Nv())!==o?((n=Gc())===o&&(n=Cv()),n!==o?(a=n,r=t={prefix:(u=t)&&u[0],name:a}):(hi=r,r=o)):(hi=r,r=o),r}function El(){var t,e,n,s;return t=hi,(e=nb())===o&&(e=null),e!==o&&Nv()!==o&&(n=Gc())!==o?(s=n,t=e={name:{type:"origin",value:e?`${group} ${s}`:s}}):(hi=t,t=o),t===o&&(t=hi,"public"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(ae)),e===o&&(e=function(){var t,e,n,s;return t=hi,"current_role"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(Gr)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CURRENT_ROLE":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(e=Jb())===o&&(e=rv()),e!==o&&(e=function(r){return{name:{type:"origin",value:r}}}(e)),t=e),t}function Al(){var r,t,e,n,s,u,a,i;if(r=hi,(t=El())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=El())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=El())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function ml(){var t,e,n,s,u,a,i,l;return t=hi,"grant"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(ie)),e!==o&&(e={type:"grant"}),(t=e)===o&&(t=hi,"revoke"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(fe)),e!==o&&Nv()!==o?(n=hi,"grant"===r.substr(hi,5).toLowerCase()?(s=r.substr(hi,5),hi+=5):(s=o,0===mi&&Si(ie)),s!==o&&(u=Nv())!==o?("option"===r.substr(hi,6).toLowerCase()?(a=r.substr(hi,6),hi+=6):(a=o,0===mi&&Si(le)),a!==o&&(i=Nv())!==o?("for"===r.substr(hi,3).toLowerCase()?(l=r.substr(hi,3),hi+=3):(l=o,0===mi&&Si(pt)),l!==o?n=s=[s,u,a,i,l]:(hi=n,n=o)):(hi=n,n=o)):(hi=n,n=o),n===o&&(n=null),n!==o?t=e={type:"revoke",grant_option_for:n&&{type:"origin",value:"grant option for"}}:(hi=t,t=o)):(hi=t,t=o)),t}function Tl(){var t,e,n,s,u,a;return t=hi,"elseif"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(be)),e!==o&&Nv()!==o&&(n=mc())!==o&&Nv()!==o?("then"===r.substr(hi,4).toLowerCase()?(s=r.substr(hi,4),hi+=4):(s=o,0===mi&&Si(ve)),s!==o&&Nv()!==o&&(u=gi())!==o&&Nv()!==o?((a=Ev())===o&&(a=null),a!==o?t=e={type:"elseif",boolean_expr:n,then:u,semicolon:a}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}function Il(){var t,e,n,s,u,a,i;return t=hi,(e=Uf())!==o&&(n=Nv())!==o?(59===r.charCodeAt(hi)?(s=";",hi++):(s=o,0===mi&&Si(xe)),s!==o?t=e={type:"select"}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=_l())===o&&(t=hi,e=hi,40===r.charCodeAt(hi)?(n="(",hi++):(n=o,0===mi&&Si(Ue)),n!==o&&(s=Nv())!==o&&(u=Il())!==o&&(a=Nv())!==o?(41===r.charCodeAt(hi)?(i=")",hi++):(i=o,0===mi&&Si(Me)),i!==o?e=n=[n,s,u,a,i]:(hi=e,e=o)):(hi=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}function Nl(){var r,t,e,n,s,u,a,i,l;if(r=hi,eb()!==o)if(Nv()!==o)if((t=Rl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Rl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Rl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=rp(t,e):(hi=r,r=o)}else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;return r===o&&(r=hi,Nv()!==o&&eb()!==o&&(t=Nv())!==o&&(e=Gf())!==o&&(n=Nv())!==o&&(s=Rl())!==o?((l=s).recursive=!0,r=[l]):(hi=r,r=o)),r}function Rl(){var r,t,e,n,s,u;return r=hi,(t=Cf())===o&&(t=qc()),t!==o&&Nv()!==o?((e=Sl())===o&&(e=null),e!==o&&Nv()!==o&&qf()!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(n=gi())!==o&&Nv()!==o&&wv()!==o?(u=e,"string"==typeof(s=t)&&(s={type:"default",value:s}),r=t={name:s,stmt:n.ast,columns:u}):(hi=r,r=o)):(hi=r,r=o),r}function Sl(){var r,t;return r=hi,dv()!==o&&Nv()!==o&&(t=zl())!==o&&Nv()!==o&&wv()!==o?r=t:(hi=r,r=o),r}function _l(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C;return t=hi,Nv()!==o?((e=Nl())===o&&(e=null),e!==o&&Nv()!==o&&Uf()!==o&&Rv()!==o?((n=function(){var r,t,e,n,s,u;if(r=hi,(t=gl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=gl())!==o?n=s=[s,u]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=gl())!==o?n=s=[s,u]:(hi=n,n=o);e!==o?(t=function(r,t){const e=[r];for(let r=0,n=t.length;r<n;++r)e.push(t[r][1]);return e}(t,e),r=t):(hi=r,r=o)}else hi=r,r=o;return r}())===o&&(n=null),n!==o&&Nv()!==o?((s=function(){var r,t,e;return r=hi,(t=lb())!==o&&Nv()!==o&&zf()!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(e=zl())!==o&&Nv()!==o&&wv()!==o?r=t={type:t+" ON",columns:e}:(hi=r,r=o),r===o&&(r=hi,(t=lb())===o&&(t=null),t!==o&&(t=function(r){return{type:r}}(t)),r=t),r}())===o&&(s=null),s!==o&&Nv()!==o&&(u=Ol())!==o&&Nv()!==o?((a=Pl())===o&&(a=null),a!==o&&Nv()!==o?((i=Fl())===o&&(i=null),i!==o&&Nv()!==o?((l=Pl())===o&&(l=null),l!==o&&Nv()!==o?((c=Zl())===o&&(c=null),c!==o&&Nv()!==o?((f=function(){var r,t;return r=hi,nb()!==o&&Nv()!==o&&sb()!==o&&Nv()!==o&&(t=dc())!==o?r=t.value:(hi=r,r=o),r}())===o&&(f=null),f!==o&&Nv()!==o?((b=function(){var t,e;return t=hi,function(){var t,e,n,s;return t=hi,"having"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(tu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o&&(e=Tc())!==o?t=e:(hi=t,t=o),t}())===o&&(b=null),b!==o&&Nv()!==o?((v=oc())===o&&(v=null),v!==o&&Nv()!==o?((p=ic())===o&&(p=null),p!==o&&Nv()!==o?((L=function(){var t,e;return t=hi,function(){var t,e,n,s;return t=hi,"window"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(x)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Ql())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Ql())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Ql())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o?t={keyword:"window",type:"window",expr:e}:(hi=t,t=o),t}())===o&&(L=null),L!==o&&Nv()!==o?((C=Pl())===o&&(C=null),C!==o?t=function(r,t,e,n,s,o,u,a,i,l,c,f,b,v){if(s&&u||s&&v||u&&v||s&&u&&v)throw new Error("A given SQL statement can contain at most one INTO clause");return o&&o.forEach((r=>r.table&&up.add(`select::${r.db}::${r.table}`))),{with:r,type:"select",options:t,distinct:e,columns:n,into:{...s||u||v||{},position:(s?"column":u&&"from")||v&&"end"},from:o,where:a,groupby:i,having:l,orderby:c,limit:f,window:b}}(e,n,s,u,a,i,l,c,f,b,v,p,L,C):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}function gl(){var t;return(t=function(){var t;return"sql_calc_found_rows"===r.substr(hi,19).toLowerCase()?(t=r.substr(hi,19),hi+=19):(t=o,0===mi&&Si(Ya)),t}())===o&&((t=function(){var t;return"sql_cache"===r.substr(hi,9).toLowerCase()?(t=r.substr(hi,9),hi+=9):(t=o,0===mi&&Si(Ba)),t}())===o&&(t=function(){var t;return"sql_no_cache"===r.substr(hi,12).toLowerCase()?(t=r.substr(hi,12),hi+=12):(t=o,0===mi&&Si(Wa)),t}()),t===o&&(t=function(){var t;return"sql_big_result"===r.substr(hi,14).toLowerCase()?(t=r.substr(hi,14),hi+=14):(t=o,0===mi&&Si(Va)),t}())===o&&(t=function(){var t;return"sql_small_result"===r.substr(hi,16).toLowerCase()?(t=r.substr(hi,16),hi+=16):(t=o,0===mi&&Si(Xa)),t}())===o&&(t=function(){var t;return"sql_buffer_result"===r.substr(hi,17).toLowerCase()?(t=r.substr(hi,17),hi+=17):(t=o,0===mi&&Si(qa)),t}())),t}function Ol(){var r,t,e,n,s,u,a,i;if(r=hi,(t=ib())===o&&(t=hi,(e=Cv())!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=Cv())),t!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=kl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=kl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=function(r,t){ap.add("select::null::(.*)");const e={expr:{type:"column_ref",table:null,column:"*"},as:null};return t&&t.length>0?rp(e,t):[e]}(0,e):(hi=r,r=o)}else hi=r,r=o;if(r===o)if(r=hi,(t=kl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=kl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=kl())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function xl(){var r,t;return r=hi,hv()!==o&&Nv()!==o?((t=yf())===o&&(t=Cf()),t!==o&&Nv()!==o&&yv()!==o?r={brackets:!0,index:t}:(hi=r,r=o)):(hi=r,r=o),r}function Ul(){var r,t,e,n,s;return r=hi,(t=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=mc())!==o){for(e=[],n=hi,(s=Nv())!==o?((u=db())===o&&(u=wb())===o&&(u=Iv()),u!==o&&(a=Nv())!==o&&(i=mc())!==o?n=s=[s,u,a,i]:(hi=n,n=o)):(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o?((u=db())===o&&(u=wb())===o&&(u=Iv()),u!==o&&(a=Nv())!==o&&(i=mc())!==o?n=s=[s,u,a,i]:(hi=n,n=o)):(hi=n,n=o);e!==o?(t=function(r,t){const e=r.ast;if(e&&"select"===e.type&&(!(r.parentheses_symbol||r.parentheses||r.ast.parentheses||r.ast.parentheses_symbol)||1!==e.columns.length||"*"===e.columns[0].expr.column))throw new Error("invalid column clause with select statement");if(!t||0===t.length)return r;const n=t.length;let s=t[n-1][3];for(let e=n-1;e>=0;e--){const n=0===e?r:t[e-1][3];s=Qv(t[e][1],n,s)}return s}(t,e),r=t):(hi=r,r=o)}else hi=r,r=o;return r}())!==o&&Nv()!==o?((e=xl())===o&&(e=null),e!==o?(n=t,(s=e)&&(n.array_index=s),r=t=n):(hi=r,r=o)):(hi=r,r=o),r}function Ml(){var t,e,n,s;return t=hi,34===r.charCodeAt(hi)?(e='"',hi++):(e=o,0===mi&&Si(ke)),e===o&&(e=null),e!==o&&(n=Bv())!==o?(34===r.charCodeAt(hi)?(s='"',hi++):(s=o,0===mi&&Si(ke)),s===o&&(s=null),s!==o?t=e=function(r,t,e){if(r&&!e||!r&&e)throw new Error("double quoted not match");return r&&e&&(t.quoted='"'),t}(e,n,s):(hi=t,t=o)):(hi=t,t=o),t}function kl(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d;if(r=hi,(t=$c())!==o&&(t={expr:t,as:null}),(r=t)===o){if(r=hi,(t=Ul())!==o)if((e=Nv())!==o)if((n=nv())!==o)if((s=Nv())!==o)if((u=Ml())!==o)if((a=Nv())!==o){for(i=[],l=hi,(c=mv())===o&&(c=Av()),c!==o&&(f=Nv())!==o?((b=Cf())===o&&(b=yf()),b!==o?l=c=[c,f,b]:(hi=l,l=o)):(hi=l,l=o);l!==o;)i.push(l),l=hi,(c=mv())===o&&(c=Av()),c!==o&&(f=Nv())!==o?((b=Cf())===o&&(b=yf()),b!==o?l=c=[c,f,b]:(hi=l,l=o)):(hi=l,l=o);if(i!==o)if((l=Nv())!==o){for(c=[],f=hi,(b=Nv())!==o?((v=xc())===o&&(v=Mc()),v!==o&&(p=Nv())!==o&&(L=Ul())!==o?f=b=[b,v,p,L]:(hi=f,f=o)):(hi=f,f=o);f!==o;)c.push(f),f=hi,(b=Nv())!==o?((v=xc())===o&&(v=Mc()),v!==o&&(p=Nv())!==o&&(L=Ul())!==o?f=b=[b,v,p,L]:(hi=f,f=o)):(hi=f,f=o);c!==o&&(f=Nv())!==o?((b=$l())===o&&(b=null),b!==o?(C=i,r=t={as:b,type:"cast",expr:t,symbol:"::",target:u,tail:(d=c)&&d[0]&&{operator:d[0][1],expr:d[0][3]},arrows:C.map((r=>r[0])),properties:C.map((r=>r[2]))}):(hi=r,r=o)):(hi=r,r=o)}else hi=r,r=o;else hi=r,r=o}else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;r===o&&(r=hi,(t=Gc())!==o&&(e=Nv())!==o&&(n=pv())!==o?(s=hi,(u=Gc())!==o&&(a=Nv())!==o&&(i=pv())!==o?s=u=[u,a,i]:(hi=s,s=o),s===o&&(s=null),s!==o&&(u=Nv())!==o&&(a=Cv())!==o?r=t=function(r,t){const e=t&&t[0];let n;return e&&(n=r,r=e),ap.add(`select::${r}::(.*)`),{expr:{type:"column_ref",table:r,schema:n,column:"*"},as:null}}(t,s):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,t=hi,(e=Gc())!==o&&(n=Nv())!==o&&(s=pv())!==o?t=e=[e,n,s]:(hi=t,t=o),t===o&&(t=null),t!==o&&(e=Nv())!==o&&(n=Cv())!==o?r=t=function(r){const t=r&&r[0]||null;return ap.add(`select::${t}::(.*)`),{expr:{type:"column_ref",table:t,column:"*"},as:null}}(t):(hi=r,r=o),r===o&&(r=hi,(t=Bc())!==o&&(e=Nv())!==o?((n=pv())===o&&(n=null),n!==o&&(s=(s=function(r,t){if(t)return!0}(0,n))?o:void 0)!==o&&(u=Nv())!==o?((a=$l())===o&&(a=null),a!==o?r=t=function(r,t,e){return ap.add("select::null::"+r),{type:"expr",expr:{type:"column_ref",table:null,column:r},as:e}}(t,0,a):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,(t=Ul())!==o&&(e=Nv())!==o?((n=$l())===o&&(n=null),n!==o?r=t=function(r,t){return{type:"expr",expr:r,as:t}}(t,n):(hi=r,r=o)):(hi=r,r=o)))))}return r}function Dl(){var r,t,e;return r=hi,(t=qf())===o&&(t=null),t!==o&&Nv()!==o&&(e=Hc())!==o?r=t=e:(hi=r,r=o),r}function $l(){var r,t,e;return r=hi,(t=qf())!==o&&Nv()!==o&&(e=Hc())!==o?r=t=e:(hi=r,r=o),r===o&&(r=hi,(t=qf())===o&&(t=null),t!==o&&Nv()!==o&&(e=Gc())!==o?r=t=e:(hi=r,r=o)),r}function Pl(){var t,e,n;return t=hi,Wf()!==o&&Nv()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Hv())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Hv())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Hv())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o?t={keyword:"var",type:"into",expr:e}:(hi=t,t=o),t===o&&(t=hi,Wf()!==o&&Nv()!==o?("outfile"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(De)),e===o&&("dumpfile"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si($e))),e===o&&(e=null),e!==o&&Nv()!==o?((n=Cf())===o&&(n=Gc()),n!==o?t={keyword:e,type:"into",expr:n}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)),t}function Fl(){var r,t;return r=hi,Xf()!==o&&Nv()!==o&&(t=Bl())!==o?r=t:(hi=r,r=o),r}function Gl(){var r,t,e;return r=hi,(t=ql())!==o&&Nv()!==o&&_f()!==o&&Nv()!==o&&(e=ql())!==o?r=t=[t,e]:(hi=r,r=o),r}function jl(){var t,e;return t=hi,tb()!==o&&Nv()!==o?("btree"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Pe)),e===o&&("hash"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Fe)),e===o&&("gist"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Ge)),e===o&&("gin"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(je))))),e!==o?t={keyword:"using",type:e.toLowerCase()}:(hi=t,t=o)):(hi=t,t=o),t}function Hl(){var r,t,e,n,s,u;if(r=hi,(t=Yl())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Yl())!==o?n=s=[s,u]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Yl())!==o?n=s=[s,u]:(hi=n,n=o);e!==o?r=t=function(r,t){const e=[r];for(let r=0;r<t.length;r++)e.push(t[r][1]);return e}(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Yl(){var t,e,n,s,u,a;return t=hi,(e=function(){var t,e,n,s;return t=hi,"key_block_size"===r.substr(hi,14).toLowerCase()?(e=r.substr(hi,14),hi+=14):(e=o,0===mi&&Si(mt)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="KEY_BLOCK_SIZE":(hi=t,t=o)):(hi=t,t=o),t}())!==o&&Nv()!==o?((n=sv())===o&&(n=null),n!==o&&Nv()!==o&&(s=yf())!==o?(u=n,a=s,t=e={type:e.toLowerCase(),symbol:u,expr:a}):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=qc())!==o&&Nv()!==o&&(n=sv())!==o&&Nv()!==o?((s=yf())===o&&(s=Gc()),s!==o?t=e=function(r,t,e){return{type:r.toLowerCase(),symbol:t,expr:"string"==typeof e&&{type:"origin",value:e}||e}}(e,n,s):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=jl())===o&&(t=hi,"with"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(He)),e!==o&&Nv()!==o?("parser"===r.substr(hi,6).toLowerCase()?(n=r.substr(hi,6),hi+=6):(n=o,0===mi&&Si(Ye)),n!==o&&Nv()!==o&&(s=qc())!==o?t=e={type:"with parser",expr:s}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"visible"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Be)),e===o&&("invisible"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(We))),e!==o&&(e=function(r){return{type:r.toLowerCase(),expr:r.toLowerCase()}}(e)),(t=e)===o&&(t=_v())))),t}function Bl(){var r,t,e,n;if(r=hi,(t=Xl())!==o){for(e=[],n=Wl();n!==o;)e.push(n),n=Wl();e!==o?r=t=Xe(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Wl(){var r,t,e;return r=hi,Nv()!==o&&(t=Lv())!==o&&Nv()!==o&&(e=Xl())!==o?r=e:(hi=r,r=o),r===o&&(r=hi,Nv()!==o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(r=hi,(t=Vl())!==o)if(Nv()!==o)if((e=Xl())!==o)if(Nv()!==o)if((n=tb())!==o)if(Nv()!==o)if(dv()!==o)if(Nv()!==o)if((s=function(){var r;return(r=qc())===o&&(r=Yc()),r}())!==o){for(u=[],a=hi,(i=Nv())!==o&&(l=Lv())!==o&&(c=Nv())!==o&&(f=qc())!==o?a=i=[i,l,c,f]:(hi=a,a=o);a!==o;)u.push(a),a=hi,(i=Nv())!==o&&(l=Lv())!==o&&(c=Nv())!==o&&(f=qc())!==o?a=i=[i,l,c,f]:(hi=a,a=o);u!==o&&(a=Nv())!==o&&(i=wv())!==o?(b=t,p=s,L=u,(v=e).join=b,v.using=rp(p,L),r=t=v):(hi=r,r=o)}else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;return r===o&&(r=hi,(t=Vl())!==o&&Nv()!==o&&(e=Xl())!==o&&Nv()!==o?((n=Kl())===o&&(n=null),n!==o?(t=function(r,t,e){return t.join=r,t.on=e,t}(t,e,n),r=t):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,(t=Vl())!==o&&Nv()!==o&&(e=dv())!==o&&Nv()!==o?((n=Ui())===o&&(n=Bl()),n!==o&&Nv()!==o&&wv()!==o&&Nv()!==o?((s=$l())===o&&(s=null),s!==o&&(u=Nv())!==o?((a=Kl())===o&&(a=null),a!==o?(t=function(r,t,e,n){return Array.isArray(t)&&(t={type:"tables",expr:t}),t.parentheses=!0,{expr:t,as:e,join:r,on:n}}(t,n,s,a),r=t):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o))),r}())!==o?r=t:(hi=r,r=o)),r}function Xl(){var t,e,n,s,u,a,i,l,c,f,b,v;return t=hi,(e=function(){var t;return"dual"===r.substr(hi,4).toLowerCase()?(t=r.substr(hi,4),hi+=4):(t=o,0===mi&&Si(ka)),t}())!==o&&(e={type:"dual"}),(t=e)===o&&(t=hi,(e=Lc())!==o&&Nv()!==o?((n=Dl())===o&&(n=null),n!==o?t=e={expr:{type:"values",values:e},as:n}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"lateral"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Ve)),e===o&&(e=null),e!==o&&Nv()!==o&&(n=dv())!==o&&Nv()!==o?((s=Ui())===o&&(s=Lc()),s!==o&&Nv()!==o&&(u=wv())!==o&&(a=Nv())!==o?((i=Dl())===o&&(i=null),i!==o?t=e=function(r,t,e){return Array.isArray(t)&&(t={type:"values",values:t}),t.parentheses=!0,{prefix:r,expr:t,as:e}}(e,s,i):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"lateral"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Ve)),e===o&&(e=null),e!==o&&Nv()!==o&&(n=dv())!==o&&Nv()!==o&&(s=Bl())!==o&&Nv()!==o&&(u=wv())!==o&&(a=Nv())!==o?((i=Dl())===o&&(i=null),i!==o?t=e=function(r,t,e){return{prefix:r,expr:t={type:"tables",expr:t,parentheses:!0},as:e}}(e,s,i):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"lateral"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Ve)),e===o&&(e=null),e!==o&&Nv()!==o&&(n=uf())!==o&&Nv()!==o?((s=$l())===o&&(s=null),s!==o?t=e=function(r,t,e){return{prefix:r,type:"expr",expr:t,as:e}}(e,n,s):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=ql())!==o&&Nv()!==o?("tablesample"===r.substr(hi,11).toLowerCase()?(n=r.substr(hi,11),hi+=11):(n=o,0===mi&&Si(qe)),n!==o&&Nv()!==o&&(s=uf())!==o&&Nv()!==o?(u=hi,"repeatable"===r.substr(hi,10).toLowerCase()?(a=r.substr(hi,10),hi+=10):(a=o,0===mi&&Si(Ke)),a!==o&&(i=Nv())!==o&&(l=dv())!==o&&(c=Nv())!==o&&(f=yf())!==o&&(b=Nv())!==o&&(v=wv())!==o?u=a=[a,i,l,c,f,b,v]:(hi=u,u=o),u===o&&(u=null),u!==o&&(a=Nv())!==o?((i=$l())===o&&(i=null),i!==o?t=e=function(r,t,e,n){return{...r,as:n,tablesample:{expr:t,repeatable:e&&e[4]}}}(e,s,u,i):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=ql())!==o&&Nv()!==o?((n=$l())===o&&(n=null),n!==o?t=e=function(r,t){return"var"===r.type?(r.as=t,r):{...r,as:t}}(e,n):(hi=t,t=o)):(hi=t,t=o))))))),t}function Vl(){var t,e,n,s;return t=hi,(e=function(){var t,e,n,s;return t=hi,"left"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Ho)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(n=Nv())!==o?((s=Jf())===o&&(s=null),s!==o&&Nv()!==o&&Qf()!==o?t=e="LEFT JOIN":(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=function(){var t,e,n,s;return t=hi,"right"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Yo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(n=Nv())!==o?((s=Jf())===o&&(s=null),s!==o&&Nv()!==o&&Qf()!==o?t=e="RIGHT JOIN":(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=function(){var t,e,n,s;return t=hi,"full"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Bo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(n=Nv())!==o?((s=Jf())===o&&(s=null),s!==o&&Nv()!==o&&Qf()!==o?t=e="FULL JOIN":(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"cross"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Ze)),e!==o&&(n=Nv())!==o&&(s=Qf())!==o?t=e="CROSS JOIN":(hi=t,t=o),t===o&&(t=hi,e=hi,(n=function(){var t,e,n,s;return t=hi,"inner"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Wo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(s=Nv())!==o?e=n=[n,s]:(hi=e,e=o),e===o&&(e=null),e!==o&&(n=Qf())!==o?t=e="INNER JOIN":(hi=t,t=o))))),t}function ql(){var r,t,e,n,s,u,a,i,l;return r=hi,(t=Gc())!==o?(e=hi,(n=Nv())!==o&&(s=pv())!==o&&(u=Nv())!==o?((a=Gc())===o&&(a=Cv()),a!==o?e=n=[n,s,u,a]:(hi=e,e=o)):(hi=e,e=o),e===o&&(e=null),e!==o?(n=hi,(s=Nv())!==o&&(u=pv())!==o&&(a=Nv())!==o?((i=Gc())===o&&(i=Cv()),i!==o?n=s=[s,u,a,i]:(hi=n,n=o)):(hi=n,n=o),n===o&&(n=null),n!==o?r=t=function(r,t,e){const n={db:null,table:r};return null!==e?(n.db=r,n.schema=t[3],n.table=e[3],n):(null!==t&&(n.db=r,n.table=t[3]),n)}(t,e,n):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,(t=Hv())!==o&&((l=t).db=null,l.table=l.name,t=l),r=t),r}function Kl(){var r,t;return r=hi,zf()!==o&&Nv()!==o&&(t=Tc())!==o?r=t:(hi=r,r=o),r}function Zl(){var t,e;return t=hi,function(){var t,e,n,s;return t=hi,"where"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(zo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o&&(e=Tc())!==o?t=e:(hi=t,t=o),t}function zl(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Pc())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Pc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Pc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Ql(){var r,t,e;return r=hi,(t=qc())!==o&&Nv()!==o&&qf()!==o&&Nv()!==o&&(e=Jl())!==o?r=t={name:t,as_window_specification:e}:(hi=r,r=o),r}function Jl(){var r,t;return(r=qc())===o&&(r=hi,dv()!==o&&Nv()!==o?((t=function(){var r,t,e,n;return r=hi,(t=sc())===o&&(t=null),t!==o&&Nv()!==o?((e=oc())===o&&(e=null),e!==o&&Nv()!==o?((n=function(){var r,t,e,n,s;return r=hi,Vb()!==o&&Nv()!==o?((t=rc())===o&&(t=tc()),t!==o?r="rows "+t.value:(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,Vb()!==o&&Nv()!==o&&(t=cb())!==o&&Nv()!==o&&(e=tc())!==o&&Nv()!==o&&db()!==o&&Nv()!==o&&(n=rc())!==o?(s=n,r=`rows between ${e.value} and ${s.value}`):(hi=r,r=o)),r}())===o&&(n=null),n!==o?r=t={name:null,partitionby:t,orderby:e,window_frame_clause:n}:(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r}())===o&&(t=null),t!==o&&Nv()!==o&&wv()!==o?r={window_specification:t||{},parentheses:!0}:(hi=r,r=o)):(hi=r,r=o)),r}function rc(){var t,e,n,s;return t=hi,(e=nc())!==o&&Nv()!==o?("following"===r.substr(hi,9).toLowerCase()?(n=r.substr(hi,9),hi+=9):(n=o,0===mi&&Si(ze)),n!==o?((s=e).value+=" FOLLOWING",t=e=s):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=ec()),t}function tc(){var t,e,n,s;return t=hi,(e=nc())!==o&&Nv()!==o?("preceding"===r.substr(hi,9).toLowerCase()?(n=r.substr(hi,9),hi+=9):(n=o,0===mi&&Si(Qe)),n!==o?((s=e).value+=" PRECEDING",t=e=s):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=ec()),t}function ec(){var t,e,n;return t=hi,"current"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(ur)),e!==o&&Nv()!==o?("row"===r.substr(hi,3).toLowerCase()?(n=r.substr(hi,3),hi+=3):(n=o,0===mi&&Si(Ct)),n!==o?t=e={type:"single_quote_string",value:"current row"}:(hi=t,t=o)):(hi=t,t=o),t}function nc(){var t,e;return t=hi,"unbounded"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(Je)),e!==o&&(e={type:"single_quote_string",value:e.toUpperCase()}),(t=e)===o&&(t=yf()),t}function sc(){var r,t;return r=hi,Bf()!==o&&Nv()!==o&&sb()!==o&&Nv()!==o&&(t=Ol())!==o?r=t:(hi=r,r=o),r}function oc(){var r,t;return r=hi,ob()!==o&&Nv()!==o&&sb()!==o&&Nv()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=uc())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=uc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=uc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o?r=t:(hi=r,r=o),r}function uc(){var t,e,n,s,u,a,i;return t=hi,(e=mc())!==o&&Nv()!==o?((n=ab())===o&&(n=ub()),n===o&&(n=null),n!==o&&Nv()!==o?(s=hi,"nulls"===r.substr(hi,5).toLowerCase()?(u=r.substr(hi,5),hi+=5):(u=o,0===mi&&Si(yr)),u!==o&&(a=Nv())!==o?("first"===r.substr(hi,5).toLowerCase()?(i=r.substr(hi,5),hi+=5):(i=o,0===mi&&Si(Er)),i===o&&("last"===r.substr(hi,4).toLowerCase()?(i=r.substr(hi,4),hi+=4):(i=o,0===mi&&Si(Ar))),i===o&&(i=null),i!==o?s=u=[u,a,i]:(hi=s,s=o)):(hi=s,s=o),s===o&&(s=null),s!==o?t=e=function(r,t,e){const n={expr:r,type:t};return n.nulls=e&&[e[0],e[2]].filter((r=>r)).join(" "),n}(e,n,s):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}function ac(){var r;return(r=yf())===o&&(r=Hv())===o&&(r=Qc()),r}function ic(){var t,e,n,s,u,a,i;return t=hi,e=hi,(n=function(){var t,e,n,s;return t=hi,"limit"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(eu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(s=Nv())!==o?((u=ac())===o&&(u=ib()),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o),e===o&&(e=null),e!==o&&(n=Nv())!==o?(s=hi,(u=function(){var t,e,n,s;return t=hi,"offset"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(nu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="OFFSET":(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(a=Nv())!==o&&(i=ac())!==o?s=u=[u,a,i]:(hi=s,s=o),s===o&&(s=null),s!==o?t=e=function(r,t){const e=[];return r&&e.push("string"==typeof r[2]?{type:"origin",value:"all"}:r[2]),t&&e.push(t[2]),{seperator:t&&t[0]&&t[0].toLowerCase()||"",value:e}}(e,s):(hi=t,t=o)):(hi=t,t=o),t}function lc(){var r,t,e,n,s,u,a,i;if(r=hi,(t=cc())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=cc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=cc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function cc(){var t,e,n,s,u,a,i,l,c;return t=hi,e=hi,(n=Gc())!==o&&(s=Nv())!==o&&(u=pv())!==o?e=n=[n,s,u]:(hi=e,e=o),e===o&&(e=null),e!==o&&(n=Nv())!==o&&(s=Wc())!==o&&(u=Nv())!==o?(61===r.charCodeAt(hi)?(a="=",hi++):(a=o,0===mi&&Si(or)),a!==o&&Nv()!==o&&(i=Oc())!==o?t=e={column:s,value:i,table:(c=e)&&c[0]}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,e=hi,(n=Gc())!==o&&(s=Nv())!==o&&(u=pv())!==o?e=n=[n,s,u]:(hi=e,e=o),e===o&&(e=null),e!==o&&(n=Nv())!==o&&(s=Wc())!==o&&(u=Nv())!==o?(61===r.charCodeAt(hi)?(a="=",hi++):(a=o,0===mi&&Si(or)),a!==o&&Nv()!==o&&(i=rb())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(l=Pc())!==o&&Nv()!==o&&wv()!==o?t=e=function(r,t,e){return{column:t,value:e,table:r&&r[0],keyword:"values"}}(e,s,l):(hi=t,t=o)):(hi=t,t=o)),t}function fc(){var t,e,n,s,u;return t=hi,(e=function(){var t,e,n,s;return t=hi,"returning"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(Mo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="RETURNING":(hi=t,t=o)):(hi=t,t=o),t}())!==o&&Nv()!==o?((n=Ol())===o&&(n=Il()),n!==o?(u=n,t=e={type:(s=e)&&s.toLowerCase()||"returning",columns:"*"===u&&[{type:"expr",expr:{type:"column_ref",table:null,column:"*"},as:null}]||u}):(hi=t,t=o)):(hi=t,t=o),t}function bc(){var r;return(r=Lc())===o&&(r=_l()),r}function vc(){var r,t,e,n,s,u,a,i,l;if(r=hi,Bf()!==o)if(Nv()!==o)if((t=dv())!==o)if(Nv()!==o)if((e=qc())!==o){for(n=[],s=hi,(u=Nv())!==o&&(a=Lv())!==o&&(i=Nv())!==o&&(l=qc())!==o?s=u=[u,a,i,l]:(hi=s,s=o);s!==o;)n.push(s),s=hi,(u=Nv())!==o&&(a=Lv())!==o&&(i=Nv())!==o&&(l=qc())!==o?s=u=[u,a,i,l]:(hi=s,s=o);n!==o&&(s=Nv())!==o&&(u=wv())!==o?r=rp(e,n):(hi=r,r=o)}else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;return r===o&&(r=hi,Bf()!==o&&Nv()!==o&&(t=Cc())!==o?r=t:(hi=r,r=o)),r}function pc(){var r,t;return r=hi,(t=Ff())!==o&&(t="insert"),(r=t)===o&&(r=hi,(t=jf())!==o&&(t="replace"),r=t),r}function Lc(){var r,t;return r=hi,rb()!==o&&Nv()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Cc())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Cc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Cc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())!==o?r=t:(hi=r,r=o),r}function Cc(){var r,t;return r=hi,dv()!==o&&Nv()!==o&&(t=dc())!==o&&Nv()!==o&&wv()!==o?r=t:(hi=r,r=o),r}function dc(){var r,t,e,n,s,u,a,i;if(r=hi,(t=mc())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=mc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=mc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=function(r,t){const e={type:"expr_list"};return e.value=rp(r,t),e}(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function wc(){var t,e,n;return t=hi,zb()!==o&&Nv()!==o&&(e=mc())!==o&&Nv()!==o&&(n=function(){var t;return(t=function(){var t,e,n,s;return t=hi,"year"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Gs)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="YEAR":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"month"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Us)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="MONTH":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"day"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(ys)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="DAY":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"hour"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Ns)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="HOUR":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"minute"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(xs)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="MINUTE":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"second"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(ks)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SECOND":(hi=t,t=o)):(hi=t,t=o),t}()),t}())!==o?t={type:"interval",expr:e,unit:n.toLowerCase()}:(hi=t,t=o),t===o&&(t=hi,zb()!==o&&Nv()!==o&&(e=Cf())!==o?t=function(r){return{type:"interval",expr:r,unit:""}}(e):(hi=t,t=o)),t}function hc(){var r,t,e,n,s,u,a,i;return r=hi,yb()!==o&&Nv()!==o&&(t=yc())!==o&&Nv()!==o?((e=Ac())===o&&(e=null),e!==o&&Nv()!==o&&(n=mb())!==o&&Nv()!==o?((s=yb())===o&&(s=null),s!==o?(a=t,(i=e)&&a.push(i),r={type:"case",expr:null,args:a}):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,yb()!==o&&Nv()!==o&&(t=mc())!==o&&Nv()!==o&&(e=yc())!==o&&Nv()!==o?((n=Ac())===o&&(n=null),n!==o&&Nv()!==o&&(s=mb())!==o&&Nv()!==o?((u=yb())===o&&(u=null),u!==o?r=function(r,t,e){return e&&t.push(e),{type:"case",expr:r,args:t}}(t,e,n):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)),r}function yc(){var r,t,e,n,s,u;if(r=hi,(t=Ec())!==o)if(Nv()!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Ec())!==o?n=s=[s,u]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Ec())!==o?n=s=[s,u]:(hi=n,n=o);e!==o?r=t=rp(t,e,1):(hi=r,r=o)}else hi=r,r=o;else hi=r,r=o;return r}function Ec(){var t,e,n;return t=hi,Eb()!==o&&Nv()!==o&&(e=Tc())!==o&&Nv()!==o&&function(){var t,e,n,s;return t=hi,"then"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(ve)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o&&(n=mc())!==o?t={type:"when",cond:e,result:n}:(hi=t,t=o),t}function Ac(){var r,t;return r=hi,Ab()!==o&&Nv()!==o&&(t=mc())!==o?r={type:"else",result:t}:(hi=r,r=o),r}function mc(){var r;return(r=function(){var r;return(r=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Dc())!==o){if(e=[],n=hi,(s=Nv())!==o&&(u=Iv())!==o&&(a=Nv())!==o&&(i=Dc())!==o?n=s=[s,u,a,i]:(hi=n,n=o),n!==o)for(;n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Iv())!==o&&(a=Nv())!==o&&(i=Dc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);else e=o;e!==o&&(n=Nv())!==o?((s=Sc())===o&&(s=null),s!==o?(t=function(r,t,e){const n=tp(r,t);return null===e?n:"arithmetic"===e.type?tp(n,e.tail):Qv(e.op,n,e.right)}(t,e,s),r=t):(hi=r,r=o)):(hi=r,r=o)}else hi=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Ic())!==o){for(e=[],n=hi,(s=Rv())!==o&&(u=wb())!==o&&(a=Nv())!==o&&(i=Ic())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Rv())!==o&&(u=wb())!==o&&(a=Nv())!==o&&(i=Ic())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=nn(t,e):(hi=r,r=o)}else hi=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u;if(r=hi,(t=xc())!==o){if(e=[],n=hi,(s=Nv())!==o&&(u=Dc())!==o?n=s=[s,u]:(hi=n,n=o),n!==o)for(;n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Dc())!==o?n=s=[s,u]:(hi=n,n=o);else e=o;e!==o?r=t=zv(t,e[0][1]):(hi=r,r=o)}else hi=r,r=o;return r}()),r}())===o&&(r=Ui()),r}function Tc(){var r,t,e,n,s,u,a,i;if(r=hi,(t=mc())!==o){for(e=[],n=hi,(s=Nv())!==o?((u=db())===o&&(u=wb())===o&&(u=Lv()),u!==o&&(a=Nv())!==o&&(i=mc())!==o?n=s=[s,u,a,i]:(hi=n,n=o)):(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o?((u=db())===o&&(u=wb())===o&&(u=Lv()),u!==o&&(a=Nv())!==o&&(i=mc())!==o?n=s=[s,u,a,i]:(hi=n,n=o)):(hi=n,n=o);e!==o?r=t=function(r,t){const e=t.length;let n=r,s="";for(let r=0;r<e;++r)","===t[r][1]?(s=",",Array.isArray(n)||(n=[n]),n.push(t[r][3])):n=Qv(t[r][1],n,t[r][3]);if(","===s){const r={type:"expr_list"};return r.value=n,r}return n}(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Ic(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Nc())!==o){for(e=[],n=hi,(s=Rv())!==o&&(u=db())!==o&&(a=Nv())!==o&&(i=Nc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Rv())!==o&&(u=db())!==o&&(a=Nv())!==o&&(i=Nc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=nn(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Nc(){var t,e,n,s,u;return(t=Rc())===o&&(t=function(){var r,t,e,n,s;return r=hi,(t=function(){var r,t,e,n,s,u;return r=hi,t=hi,(e=Cb())!==o&&(n=Nv())!==o&&(s=Lb())!==o?t=e=[e,n,s]:(hi=t,t=o),t!==o&&(t=(u=t)[0]+" "+u[2]),(r=t)===o&&(r=Lb()),r}())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(e=Ui())!==o&&Nv()!==o&&wv()!==o?(n=t,(s=e).parentheses=!0,r=t=zv(n,s)):(hi=r,r=o),r}())===o&&(t=hi,(e=Cb())===o&&(e=hi,33===r.charCodeAt(hi)?(n="!",hi++):(n=o,0===mi&&Si(sn)),n!==o?(s=hi,mi++,61===r.charCodeAt(hi)?(u="=",hi++):(u=o,0===mi&&Si(or)),mi--,u===o?s=void 0:(hi=s,s=o),s!==o?e=n=[n,s]:(hi=e,e=o)):(hi=e,e=o)),e!==o&&(n=Nv())!==o&&(s=Nc())!==o?t=e=zv("NOT",s):(hi=t,t=o)),t}function Rc(){var r,t,e,n,s;return r=hi,(t=Oc())!==o&&Nv()!==o?((e=Sc())===o&&(e=null),e!==o?(n=t,r=t=null===(s=e)?n:"arithmetic"===s.type?tp(n,s.tail):Qv(s.op,n,s.right)):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=Cf())===o&&(r=Pc()),r}function Sc(){var t;return(t=function(){var r,t,e,n,s,u;if(r=[],t=hi,(e=Nv())!==o&&(n=_c())!==o&&(s=Nv())!==o&&(u=Oc())!==o?t=e=[e,n,s,u]:(hi=t,t=o),t!==o)for(;t!==o;)r.push(t),t=hi,(e=Nv())!==o&&(n=_c())!==o&&(s=Nv())!==o&&(u=Oc())!==o?t=e=[e,n,s,u]:(hi=t,t=o);else r=o;return r!==o&&(r={type:"arithmetic",tail:r}),r}())===o&&(t=function(){var r,t,e,n;return r=hi,(t=gc())!==o&&Nv()!==o&&(e=dv())!==o&&Nv()!==o&&(n=dc())!==o&&Nv()!==o&&wv()!==o?r=t={op:t,right:n}:(hi=r,r=o),r===o&&(r=hi,(t=gc())!==o&&Nv()!==o?((e=Hv())===o&&(e=Cf()),e!==o?(t=function(r,t){return{op:r,right:t}}(t,e),r=t):(hi=r,r=o)):(hi=r,r=o)),r}())===o&&(t=function(){var r,t,e,n;return r=hi,(t=function(){var r,t,e,n,s,u;return r=hi,t=hi,(e=Cb())!==o&&(n=Nv())!==o&&(s=cb())!==o?t=e=[e,n,s]:(hi=t,t=o),t!==o&&(t=(u=t)[0]+" "+u[2]),(r=t)===o&&(r=cb()),r}())!==o&&Nv()!==o&&(e=Oc())!==o&&Nv()!==o&&db()!==o&&Nv()!==o&&(n=Oc())!==o?r=t={op:t,right:{type:"expr_list",value:[e,n]}}:(hi=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l;return r=hi,(t=bb())!==o&&(e=Nv())!==o&&(n=Oc())!==o?r=t={op:"IS",right:n}:(hi=r,r=o),r===o&&(r=hi,(t=bb())!==o&&(e=Nv())!==o?(n=hi,(s=lb())!==o&&(u=Nv())!==o&&(a=Xf())!==o&&(i=Nv())!==o&&(l=ql())!==o?n=s=[s,u,a,i,l]:(hi=n,n=o),n!==o?(t=function(r){const{db:t,table:e}=r.pop(),n="*"===e?"*":`"${e}"`;return{op:"IS",right:{type:"default",value:"DISTINCT FROM "+(t?`"${t}".${n}`:n)}}}(n),r=t):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,t=hi,(e=bb())!==o&&(n=Nv())!==o&&(s=Cb())!==o?t=e=[e,n,s]:(hi=t,t=o),t!==o&&(e=Nv())!==o&&(n=Oc())!==o?(t=function(r){return{op:"IS NOT",right:r}}(n),r=t):(hi=r,r=o))),r}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=hi,(e=function(){var t,e,n,s,u,a;return t=hi,e=hi,(n=Cb())!==o&&(s=Nv())!==o?((u=vb())===o&&(u=pb()),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o),e!==o&&(e=(a=e)[0]+" "+a[2]),(t=e)===o&&(t=vb())===o&&(t=pb())===o&&(t=hi,"similar"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(bn)),e!==o&&(n=Nv())!==o&&(s=_f())!==o?t=e="SIMILAR TO":(hi=t,t=o),t===o&&(t=hi,(e=Cb())!==o&&(n=Nv())!==o?("similar"===r.substr(hi,7).toLowerCase()?(s=r.substr(hi,7),hi+=7):(s=o,0===mi&&Si(bn)),s!==o&&(u=Nv())!==o&&_f()!==o?t=e="NOT SIMILAR TO":(hi=t,t=o)):(hi=t,t=o))),t}())!==o&&Nv()!==o?((n=ff())===o&&(n=Rc()),n!==o&&Nv()!==o?((s=function(){var t,e,n;return t=hi,"escape"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(dn)),e!==o&&Nv()!==o&&(n=Cf())!==o?t=e={type:"ESCAPE",value:n}:(hi=t,t=o),t}())===o&&(s=null),s!==o?(u=e,a=n,(i=s)&&(a.escape=i),t=e={op:u,right:a}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"@>"===r.substr(hi,2)?(e="@>",hi+=2):(e=o,0===mi&&Si(wn)),e===o&&("<@"===r.substr(hi,2)?(e="<@",hi+=2):(e=o,0===mi&&Si(hn)),e===o&&(e=Tv())===o&&(e=function(){var t;return"#>>"===r.substr(hi,3)?(t="#>>",hi+=3):(t=o,0===mi&&Si(ti)),t}())===o&&(e=function(){var t;return"#>"===r.substr(hi,2)?(t="#>",hi+=2):(t=o,0===mi&&Si(ri)),t}())===o&&(63===r.charCodeAt(hi)?(e="?",hi++):(e=o,0===mi&&Si(yn)),e===o&&("?|"===r.substr(hi,2)?(e="?|",hi+=2):(e=o,0===mi&&Si(En)),e===o&&("?&"===r.substr(hi,2)?(e="?&",hi+=2):(e=o,0===mi&&Si(An)),e===o&&("#-"===r.substr(hi,2)?(e="#-",hi+=2):(e=o,0===mi&&Si(mn))))))),e!==o&&Nv()!==o&&(n=kl())!==o?t=e={op:e,right:(s=n)&&s.expr||s}:(hi=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=hi,(e=function(){var t;return"!~*"===r.substr(hi,3)?(t="!~*",hi+=3):(t=o,0===mi&&Si(vn)),t===o&&("~*"===r.substr(hi,2)?(t="~*",hi+=2):(t=o,0===mi&&Si(pn)),t===o&&(126===r.charCodeAt(hi)?(t="~",hi++):(t=o,0===mi&&Si(Ln)),t===o&&("!~"===r.substr(hi,2)?(t="!~",hi+=2):(t=o,0===mi&&Si(Cn))))),t}())!==o&&Nv()!==o?((n=ff())===o&&(n=Rc()),n!==o?t=e={op:e,right:n}:(hi=t,t=o)):(hi=t,t=o),t}()),t}function _c(){var t;return">="===r.substr(hi,2)?(t=">=",hi+=2):(t=o,0===mi&&Si(on)),t===o&&(62===r.charCodeAt(hi)?(t=">",hi++):(t=o,0===mi&&Si(un)),t===o&&("<="===r.substr(hi,2)?(t="<=",hi+=2):(t=o,0===mi&&Si(an)),t===o&&("<>"===r.substr(hi,2)?(t="<>",hi+=2):(t=o,0===mi&&Si(ln)),t===o&&(60===r.charCodeAt(hi)?(t="<",hi++):(t=o,0===mi&&Si(cn)),t===o&&(61===r.charCodeAt(hi)?(t="=",hi++):(t=o,0===mi&&Si(or)),t===o&&("!="===r.substr(hi,2)?(t="!=",hi+=2):(t=o,0===mi&&Si(fn)))))))),t}function gc(){var r,t,e,n,s,u;return r=hi,t=hi,(e=Cb())!==o&&(n=Nv())!==o&&(s=fb())!==o?t=e=[e,n,s]:(hi=t,t=o),t!==o&&(t=(u=t)[0]+" "+u[2]),(r=t)===o&&(r=fb()),r}function Oc(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Uc())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=xc())!==o&&(a=Nv())!==o&&(i=Uc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=xc())!==o&&(a=Nv())!==o&&(i=Uc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=nn(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function xc(){var t;return 43===r.charCodeAt(hi)?(t="+",hi++):(t=o,0===mi&&Si(Tn)),t===o&&(45===r.charCodeAt(hi)?(t="-",hi++):(t=o,0===mi&&Si(In))),t}function Uc(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Dc())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Mc())!==o&&(a=Nv())!==o&&(i=Dc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Mc())!==o&&(a=Nv())!==o&&(i=Dc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=tp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Mc(){var t;return 42===r.charCodeAt(hi)?(t="*",hi++):(t=o,0===mi&&Si(Nn)),t===o&&(47===r.charCodeAt(hi)?(t="/",hi++):(t=o,0===mi&&Si(Rn)),t===o&&(37===r.charCodeAt(hi)?(t="%",hi++):(t=o,0===mi&&Si(Sn)),t===o&&("||"===r.substr(hi,2)?(t="||",hi+=2):(t=o,0===mi&&Si(_n))))),t}function kc(){var r,t,e,n,s;return r=hi,(t=Pc())!==o&&Nv()!==o?((e=xl())===o&&(e=null),e!==o?(n=t,(s=e)&&(n.array_index=s),r=t=n):(hi=r,r=o)):(hi=r,r=o),r}function Dc(){var t,e,n,s,u,a;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C;if(t=hi,(e=Tb())!==o)if(Nv()!==o)if((n=dv())!==o)if(Nv()!==o)if((s=mc())!==o)if(Nv()!==o)if((u=qf())!==o)if(Nv()!==o)if((a=Bv())!==o)if(Nv()!==o)if((i=wv())!==o)if(Nv()!==o){for(l=[],c=hi,(f=mv())===o&&(f=Av()),f!==o&&(b=Nv())!==o?((v=Cf())===o&&(v=yf()),v!==o?c=f=[f,b,v]:(hi=c,c=o)):(hi=c,c=o);c!==o;)l.push(c),c=hi,(f=mv())===o&&(f=Av()),f!==o&&(b=Nv())!==o?((v=Cf())===o&&(v=yf()),v!==o?c=f=[f,b,v]:(hi=c,c=o)):(hi=c,c=o);l!==o?(p=s,L=a,C=l,e={type:"cast",keyword:e.toLowerCase(),expr:p,symbol:"as",target:L,arrows:C.map((r=>r[0])),properties:C.map((r=>r[2]))},t=e):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;return t===o&&(t=hi,(e=Tb())!==o&&Nv()!==o&&(n=dv())!==o&&Nv()!==o&&(s=mc())!==o&&Nv()!==o&&(u=qf())!==o&&Nv()!==o&&(a=Sb())!==o&&Nv()!==o&&(i=dv())!==o&&Nv()!==o&&(l=Ef())!==o&&(c=Nv())!==o&&(f=wv())!==o&&(b=Nv())!==o&&(v=wv())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+")"}}}(e,s,l),t=e):(hi=t,t=o),t===o&&(t=hi,(e=Tb())!==o&&Nv()!==o&&(n=dv())!==o&&Nv()!==o&&(s=mc())!==o&&Nv()!==o&&(u=qf())!==o&&Nv()!==o&&(a=Sb())!==o&&Nv()!==o&&(i=dv())!==o&&Nv()!==o&&(l=Ef())!==o&&(c=Nv())!==o&&(f=Lv())!==o&&(b=Nv())!==o&&(v=Ef())!==o&&Nv()!==o&&wv()!==o&&Nv()!==o&&wv()!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+", "+n+")"}}}(e,s,l,v),t=e):(hi=t,t=o),t===o&&(t=hi,(e=Tb())!==o&&Nv()!==o&&(n=dv())!==o&&Nv()!==o&&(s=mc())!==o&&Nv()!==o&&(u=qf())!==o&&Nv()!==o&&(a=function(){var t;return(t=function(){var t,e,n,s;return t=hi,"signed"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(ku)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SIGNED":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=_b()),t}())!==o&&Nv()!==o?((i=Ob())===o&&(i=null),i!==o&&Nv()!==o&&(l=wv())!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:e+(n?" "+n:"")}}}(e,s,a,i),t=e):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=dv())!==o&&Nv()!==o?((n=ff())===o&&(n=tf())===o&&(n=ef())===o&&(n=uf())===o&&(n=hc())===o&&(n=wc())===o&&(n=kc())===o&&(n=Qc()),n!==o&&Nv()!==o&&(s=wv())!==o&&Nv()!==o?((u=cf())===o&&(u=null),u!==o?(e=function(r,t){return r.parentheses=!0,t?{type:"cast",keyword:"cast",expr:r,...t}:r}(n,u),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=ff())===o&&(e=tf())===o&&(e=ef())===o&&(e=uf())===o&&(e=hc())===o&&(e=wc())===o&&(e=kc())===o&&(e=Qc()),e!==o&&Nv()!==o?((n=cf())===o&&(n=null),n!==o?(e=function(r,t){return t?{type:"cast",keyword:"cast",expr:r,...t}:r}(e,n),t=e):(hi=t,t=o)):(hi=t,t=o)))))),t}())===o&&(t=hi,dv()!==o&&(e=Nv())!==o&&(n=Tc())!==o&&(s=Nv())!==o&&(u=wv())!==o?((a=n).parentheses=!0,t=a):(hi=t,t=o),t===o&&(t=Hv())===o&&(t=hi,Nv()!==o?(36===r.charCodeAt(hi)?(e="$",hi++):(e=o,0===mi&&Si(gn)),e!==o?(60===r.charCodeAt(hi)?(n="<",hi++):(n=o,0===mi&&Si(cn)),n!==o&&(s=yf())!==o?(62===r.charCodeAt(hi)?(u=">",hi++):(u=o,0===mi&&Si(un)),u!==o?t={type:"origin",value:`$<${s.value}>`}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o))),t}function $c(){var t,e,n,s,u,a;if(t=hi,"e"===r.substr(hi,1).toLowerCase()?(e=r.charAt(hi),hi++):(e=o,0===mi&&Si(On)),e!==o)if(39===r.charCodeAt(hi)?(n="'",hi++):(n=o,0===mi&&Si(_t)),n!==o)if(Nv()!==o){for(s=[],u=wf();u!==o;)s.push(u),u=wf();s!==o&&(u=Nv())!==o?(39===r.charCodeAt(hi)?(a="'",hi++):(a=o,0===mi&&Si(_t)),a!==o?t=e={type:"origin",value:`E'${s.join("")}'`}:(hi=t,t=o)):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;return t}function Pc(){var r,t,e,n,s,u,a,i,l,c,f,b,v;if((r=$c())===o&&(r=hi,t=hi,(e=Gc())!==o&&(n=Nv())!==o&&(s=pv())!==o?t=e=[e,n,s]:(hi=t,t=o),t===o&&(t=null),t!==o&&(e=Nv())!==o&&(n=Cv())!==o?r=t=function(r){const t=r&&r[0]||null;return ap.add(`select::${t}::(.*)`),{type:"column_ref",table:t,column:"*"}}(t):(hi=r,r=o),r===o)){if(r=hi,t=hi,(e=Gc())!==o&&(n=Nv())!==o&&(s=pv())!==o?t=e=[e,n,s]:(hi=t,t=o),t===o&&(t=null),t!==o)if((e=Nv())!==o)if((n=Xc())!==o)if((s=Nv())!==o){if(u=[],a=hi,(i=mv())===o&&(i=Av()),i!==o&&(l=Nv())!==o?((c=Cf())===o&&(c=yf()),c!==o?a=i=[i,l,c]:(hi=a,a=o)):(hi=a,a=o),a!==o)for(;a!==o;)u.push(a),a=hi,(i=mv())===o&&(i=Av()),i!==o&&(l=Nv())!==o?((c=Cf())===o&&(c=yf()),c!==o?a=i=[i,l,c]:(hi=a,a=o)):(hi=a,a=o);else u=o;u!==o?r=t=function(r,t,e){const n=r&&r[0]||null;return ap.add(`select::${n}::${t}`),{type:"column_ref",table:n,column:t,arrows:e.map((r=>r[0])),properties:e.map((r=>r[2]))}}(t,n,u):(hi=r,r=o)}else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;r===o&&(r=hi,(t=Gc())!==o?(e=hi,(n=Nv())!==o&&(s=pv())!==o&&(u=Nv())!==o&&(a=Gc())!==o?e=n=[n,s,u,a]:(hi=e,e=o),e!==o?(n=hi,(s=Nv())!==o&&(u=pv())!==o&&(a=Nv())!==o&&(i=Xc())!==o?n=s=[s,u,a,i]:(hi=n,n=o),n!==o?(f=t,b=e,v=n,ap.add(`select::${f}.${b[3]}::${v[3]}`),r=t={type:"column_ref",schema:f,table:b[3],column:v[3]}):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,(t=Gc())!==o&&(e=Nv())!==o&&(n=pv())!==o&&(s=Nv())!==o&&(u=Xc())!==o?r=t=function(r,t){return ap.add(`select::${r}::${t}`),{type:"column_ref",table:r,column:t}}(t,u):(hi=r,r=o),r===o&&(r=hi,(t=Xc())!==o&&(t=function(r){return ap.add("select::null::"+r),{type:"column_ref",table:null,column:r}}(t)),r=t)))}return r}function Fc(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Xc())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Xc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Xc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Gc(){var r,t;return r=hi,(t=qc())!==o&&(xn(t)?o:void 0)!==o?r=t:(hi=r,r=o),r===o&&(r=hi,r=t=Yc()),r}function jc(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Gc())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Gc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Gc())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Hc(){var r,t,e,n,s,u,a,i,l;return r=hi,(t=qc())!==o&&(!0===Zv[t.toUpperCase()]?o:void 0)!==o?(e=hi,(n=Nv())!==o&&(s=dv())!==o&&(u=Nv())!==o&&(a=Fc())!==o&&(i=Nv())!==o&&(l=wv())!==o?e=n=[n,s,u,a,i,l]:(hi=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){return t?`${r}(${t[3].join(", ")})`:r}(t,e):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,r=t=Yc()),r}function Yc(){var t;return(t=Bc())===o&&(t=function(){var t,e,n,s;if(t=hi,39===r.charCodeAt(hi)?(e="'",hi++):(e=o,0===mi&&Si(_t)),e!==o){if(n=[],Dn.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si($n)),s!==o)for(;s!==o;)n.push(s),Dn.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si($n));else n=o;n!==o?(39===r.charCodeAt(hi)?(s="'",hi++):(s=o,0===mi&&Si(_t)),s!==o?t=e=kn(n):(hi=t,t=o)):(hi=t,t=o)}else hi=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=hi,96===r.charCodeAt(hi)?(e="`",hi++):(e=o,0===mi&&Si(Pn)),e!==o){if(n=[],Fn.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(Gn)),s!==o)for(;s!==o;)n.push(s),Fn.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(Gn));else n=o;n!==o?(96===r.charCodeAt(hi)?(s="`",hi++):(s=o,0===mi&&Si(Pn)),s!==o?t=e=kn(n):(hi=t,t=o)):(hi=t,t=o)}else hi=t,t=o;return t}()),t}function Bc(){var t,e,n,s;if(t=hi,34===r.charCodeAt(hi)?(e='"',hi++):(e=o,0===mi&&Si(ke)),e!==o){if(n=[],Un.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(Mn)),s!==o)for(;s!==o;)n.push(s),Un.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(Mn));else n=o;n!==o?(34===r.charCodeAt(hi)?(s='"',hi++):(s=o,0===mi&&Si(ke)),s!==o?t=e=kn(n):(hi=t,t=o)):(hi=t,t=o)}else hi=t,t=o;return t}function Wc(){var r;return(r=Vc())===o&&(r=Yc()),r}function Xc(){var r,t;return r=hi,(t=Vc())!==o&&(xn(t)?o:void 0)!==o?r=t:(hi=r,r=o),r===o&&(r=Yc()),r}function Vc(){var r,t,e,n;if(r=hi,(t=Kc())!==o){for(e=[],n=zc();n!==o;)e.push(n),n=zc();e!==o?r=t+=e.join(""):(hi=r,r=o)}else hi=r,r=o;return r}function qc(){var r,t,e,n;if(r=hi,(t=Kc())!==o){for(e=[],n=Zc();n!==o;)e.push(n),n=Zc();e!==o?r=t+=e.join(""):(hi=r,r=o)}else hi=r,r=o;return r}function Kc(){var t;return jn.test(r.charAt(hi))?(t=r.charAt(hi),hi++):(t=o,0===mi&&Si(Hn)),t}function Zc(){var t;return Yn.test(r.charAt(hi))?(t=r.charAt(hi),hi++):(t=o,0===mi&&Si(Bn)),t}function zc(){var t;return Wn.test(r.charAt(hi))?(t=r.charAt(hi),hi++):(t=o,0===mi&&Si(Xn)),t}function Qc(){var t,e,n;return t=hi,58===r.charCodeAt(hi)?(e=":",hi++):(e=o,0===mi&&Si(Vn)),e!==o&&(n=qc())!==o?t=e=[e,n]:(hi=t,t=o),t!==o&&(t={type:"param",value:t[1]}),t}function Jc(){var r,t,e;return r=hi,zf()!==o&&Nv()!==o&&Mf()!==o&&Nv()!==o&&(t=Qb())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o?((e=dc())===o&&(e=null),e!==o&&Nv()!==o&&wv()!==o?r={type:"on update",keyword:t,parentheses:!0,expr:e}:(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,zf()!==o&&Nv()!==o&&Mf()!==o&&Nv()!==o&&(t=Qb())!==o?r=function(r){return{type:"on update",keyword:r}}(t):(hi=r,r=o)),r}function rf(){var t,e,n,s,u;return t=hi,"over"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(qn)),e!==o&&Nv()!==o&&(n=Jl())!==o?t=e={type:"window",as_window_specification:n}:(hi=t,t=o),t===o&&(t=hi,"over"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(qn)),e!==o&&Nv()!==o&&(n=dv())!==o&&Nv()!==o?((s=sc())===o&&(s=null),s!==o&&Nv()!==o?((u=oc())===o&&(u=null),u!==o&&Nv()!==o&&wv()!==o?t=e={partitionby:s,orderby:u}:(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=Jc())),t}function tf(){var t,e,n,s,u;return t=hi,(e=function(){var t,e,n,s,u,a,i,l,c;return t=hi,(e=function(){var t,e,n,s;return t=hi,"count"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(du)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="COUNT":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=hi,"group_concat"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(wu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="GROUP_CONCAT":(hi=t,t=o)):(hi=t,t=o),t}()),e!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(n=function(){var t,e;return t=hi,(e=function(){var t;return 42===r.charCodeAt(hi)?(t="*",hi++):(t=o,0===mi&&Si(Nn)),t!==o&&(t={type:"star",value:"*"}),t}())!==o&&(e={expr:e}),(t=e)===o&&(t=of()),t}())!==o&&Nv()!==o&&(s=wv())!==o&&Nv()!==o?((u=rf())===o&&(u=null),u!==o?t=e={type:"aggr_func",name:e,args:n,over:u}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"percentile_cont"===r.substr(hi,15).toLowerCase()?(e=r.substr(hi,15),hi+=15):(e=o,0===mi&&Si(us)),e===o&&("percentile_disc"===r.substr(hi,15).toLowerCase()?(e=r.substr(hi,15),hi+=15):(e=o,0===mi&&Si(as))),e!==o&&Nv()!==o&&dv()!==o&&Nv()!==o?((n=yf())===o&&(n=bf()),n!==o&&Nv()!==o&&(s=wv())!==o&&Nv()!==o?("within"===r.substr(hi,6).toLowerCase()?(u=r.substr(hi,6),hi+=6):(u=o,0===mi&&Si(is)),u!==o&&Nv()!==o&&nb()!==o&&Nv()!==o&&(a=dv())!==o&&Nv()!==o&&(i=oc())!==o&&Nv()!==o&&(l=wv())!==o&&Nv()!==o?((c=rf())===o&&(c=null),c!==o?(e=function(r,t,e,n){return{type:"aggr_func",name:r.toUpperCase(),args:{expr:t},within_group_orderby:e,over:n}}(e,n,i,c),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,"mode"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(ls)),e!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(n=wv())!==o&&Nv()!==o?("within"===r.substr(hi,6).toLowerCase()?(s=r.substr(hi,6),hi+=6):(s=o,0===mi&&Si(is)),s!==o&&Nv()!==o&&(u=nb())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(a=oc())!==o&&Nv()!==o&&(i=wv())!==o&&Nv()!==o?((l=rf())===o&&(l=null),l!==o?(e=function(r,t,e){return{type:"aggr_func",name:r.toUpperCase(),args:{expr:{}},within_group_orderby:t,over:e}}(e,a,l),t=e):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o))),t}())===o&&(e=function(){var t,e,n,s;return t=hi,(e=function(){var t;return(t=function(){var t,e,n,s;return t=hi,"sum"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(Eu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SUM":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"max"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(hu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="MAX":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"min"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(yu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="MIN":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"avg"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(Au)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="AVG":(hi=t,t=o)):(hi=t,t=o),t}()),t}())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(n=Oc())!==o&&Nv()!==o&&wv()!==o&&Nv()!==o?((s=rf())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:{expr:n},over:s}:(hi=t,t=o)):(hi=t,t=o),t}())===o&&(e=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=hi,e=hi,(n=Gc())!==o&&(s=Nv())!==o&&(u=pv())!==o?e=n=[n,s,u]:(hi=e,e=o),e===o&&(e=null),e!==o&&(n=Nv())!==o&&(s=function(){var t,e,n,s;return t=hi,"array_agg"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(Cu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="ARRAY_AGG":(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(u=Nv())!==o&&dv()!==o&&Nv()!==o&&(a=of())!==o&&Nv()!==o?((i=oc())===o&&(i=null),i!==o&&Nv()!==o&&wv()!==o?(c=s,f=a,b=i,t=e={type:"aggr_func",name:(l=e)?`${l[0]}.${c}`:c,args:f,orderby:b}):(hi=t,t=o)):(hi=t,t=o),t}()),e!==o&&Nv()!==o?((n=function(){var t,e,n;return t=hi,"filter"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Kn)),e!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(n=Zl())!==o&&Nv()!==o&&wv()!==o?t=e={keyword:"filter",parentheses:!0,where:n}:(hi=t,t=o),t}())===o&&(n=null),n!==o?(s=e,(u=n)&&(s.filter=u),t=e=s):(hi=t,t=o)):(hi=t,t=o),t}function ef(){var t;return(t=function(){var t,e,n;return t=hi,(e=function(){var t;return"row_number"===r.substr(hi,10).toLowerCase()?(t=r.substr(hi,10),hi+=10):(t=o,0===mi&&Si(Qn)),t===o&&("dense_rank"===r.substr(hi,10).toLowerCase()?(t=r.substr(hi,10),hi+=10):(t=o,0===mi&&Si(Jn)),t===o&&("rank"===r.substr(hi,4).toLowerCase()?(t=r.substr(hi,4),hi+=4):(t=o,0===mi&&Si(rs)))),t}())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&wv()!==o&&Nv()!==o&&(n=rf())!==o?t=e={type:"window_func",name:e,over:n}:(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=hi,(e=function(){var t;return"lag"===r.substr(hi,3).toLowerCase()?(t=r.substr(hi,3),hi+=3):(t=o,0===mi&&Si(ts)),t===o&&("lead"===r.substr(hi,4).toLowerCase()?(t=r.substr(hi,4),hi+=4):(t=o,0===mi&&Si(es)),t===o&&("nth_value"===r.substr(hi,9).toLowerCase()?(t=r.substr(hi,9),hi+=9):(t=o,0===mi&&Si(ns)))),t}())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(n=dc())!==o&&Nv()!==o&&wv()!==o&&Nv()!==o?((s=nf())===o&&(s=null),s!==o&&Nv()!==o&&(u=rf())!==o?t=e={type:"window_func",name:e,args:n,over:u,consider_nulls:s}:(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=hi,(e=function(){var t;return"first_value"===r.substr(hi,11).toLowerCase()?(t=r.substr(hi,11),hi+=11):(t=o,0===mi&&Si(Zn)),t===o&&("last_value"===r.substr(hi,10).toLowerCase()?(t=r.substr(hi,10),hi+=10):(t=o,0===mi&&Si(zn))),t}())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(n=mc())!==o&&Nv()!==o?((s=nf())===o&&(s=null),s!==o&&Nv()!==o&&wv()!==o&&Nv()!==o&&(u=rf())!==o?t=e={type:"window_func",name:e,args:{type:"expr_list",value:[n]},over:u,consider_nulls:s}:(hi=t,t=o)):(hi=t,t=o),t}()),t}function nf(){var t,e,n;return t=hi,"ignore"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(ss)),e===o&&("respect"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(os))),e!==o&&Nv()!==o?("nulls"===r.substr(hi,5).toLowerCase()?(n=r.substr(hi,5),hi+=5):(n=o,0===mi&&Si(yr)),n!==o?t=e=e.toUpperCase()+" NULLS":(hi=t,t=o)):(hi=t,t=o),t}function sf(){var t,e,n;return t=hi,"separator"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(cs)),e===o&&(e=null),e!==o&&Nv()!==o&&(n=Cf())!==o?t=e={keyword:e,value:n}:(hi=t,t=o),t}function of(){var r,t,e,n,s,u,a;return r=hi,(t=lb())===o&&(t=null),t!==o&&Nv()!==o&&(e=dv())!==o&&Nv()!==o&&(n=mc())!==o&&Nv()!==o&&(s=wv())!==o&&Nv()!==o?((u=oc())===o&&(u=null),u!==o&&Nv()!==o?((a=sf())===o&&(a=null),a!==o?r=t={distinct:t,expr:n,orderby:u,parentheses:!0,separator:a}:(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,(t=lb())===o&&(t=null),t!==o&&Nv()!==o&&(e=mc())!==o&&Nv()!==o?((n=oc())===o&&(n=null),n!==o&&Nv()!==o?((s=sf())===o&&(s=null),s!==o?r=t=function(r,t,e,n){return{distinct:r,expr:t,orderby:e,parentheses:!1,separator:n}}(t,e,n,s):(hi=r,r=o)):(hi=r,r=o)):(hi=r,r=o)),r}function uf(){var t,e,n,s,u,a,i,l,c,f;return(t=function(){var t,e,n,s;return t=hi,"trim"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(ps)),e!==o&&Nv()!==o&&dv()!==o&&Nv()!==o?((n=function(){var t,e,n;return t=hi,(e=function(){var t;return"both"===r.substr(hi,4).toLowerCase()?(t=r.substr(hi,4),hi+=4):(t=o,0===mi&&Si(fs)),t===o&&("leading"===r.substr(hi,7).toLowerCase()?(t=r.substr(hi,7),hi+=7):(t=o,0===mi&&Si(bs)),t===o&&("trailing"===r.substr(hi,8).toLowerCase()?(t=r.substr(hi,8),hi+=8):(t=o,0===mi&&Si(vs)))),t}())===o&&(e=null),e!==o&&Nv()!==o?((n=Cf())===o&&(n=null),n!==o&&Nv()!==o&&Xf()!==o?t=e=function(r,t,e){let n=[];return r&&n.push({type:"origin",value:r}),t&&n.push(t),n.push({type:"origin",value:"from"}),{type:"expr_list",value:n}}(e,n):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(n=null),n!==o&&Nv()!==o&&(s=mc())!==o&&Nv()!==o&&wv()!==o?t=e=function(r,t){let e=r||{type:"expr_list",value:[]};return e.value.push(t),{type:"function",name:"TRIM",args:e}}(n,s):(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=hi,"crosstab"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Ls)),e!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(n=dc())!==o&&Nv()!==o&&wv()!==o&&Nv()!==o&&qf()!==o&&Nv()!==o&&(s=qc())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(u=Pi())!==o&&Nv()!==o&&wv()!==o?t=e={type:"tablefunc",name:"crosstab",args:n,as:{type:"function",name:s,args:{type:"expr_list",value:u.map((r=>({...r,type:"column_definition"})))}}}:(hi=t,t=o),t}())===o&&(t=hi,"now"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(Cs)),e!==o&&Nv()!==o&&(n=dv())!==o&&Nv()!==o?((s=dc())===o&&(s=null),s!==o&&Nv()!==o&&wv()!==o&&Nv()!==o?("at"===r.substr(hi,2).toLowerCase()?(u=r.substr(hi,2),hi+=2):(u=o,0===mi&&Si(ds)),u!==o&&Nv()!==o&&qb()!==o&&Nv()!==o?("zone"===r.substr(hi,4).toLowerCase()?(a=r.substr(hi,4),hi+=4):(a=o,0===mi&&Si(ws)),a!==o&&Nv()!==o&&(i=Cf())!==o?(l=e,c=s,(f=i).prefix="at time zone",t=e={type:"function",name:l,args:c||{type:"expr_list",value:[]},suffix:f}):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=function(){var t;return(t=lf())===o&&(t=Jb())===o&&(t=function(){var t,e,n,s;return t=hi,"user"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(ua)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="USER":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=rv())===o&&(t=function(){var t,e,n,s;return t=hi,"system_user"===r.substr(hi,11).toLowerCase()?(e=r.substr(hi,11),hi+=11):(e=o,0===mi&&Si(Ta)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SYSTEM_USER":(hi=t,t=o)):(hi=t,t=o),t}())===o&&("ntile"===r.substr(hi,5).toLowerCase()?(t=r.substr(hi,5),hi+=5):(t=o,0===mi&&Si(js))),t}())!==o&&Nv()!==o&&(n=dv())!==o&&Nv()!==o?((s=dc())===o&&(s=null),s!==o&&Nv()!==o&&wv()!==o&&Nv()!==o?((u=rf())===o&&(u=null),u!==o?t=e=function(r,t,e){return{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,s,u):(hi=t,t=o)):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=hi,(t=hb())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(e=af())!==o&&Nv()!==o&&Xf()!==o&&Nv()!==o?((n=Kb())===o&&(n=zb())===o&&(n=qb())===o&&(n=Wb()),n===o&&(n=null),n!==o&&Nv()!==o&&(s=mc())!==o&&Nv()!==o&&wv()!==o?(u=e,a=n,i=s,r=t={type:t.toLowerCase(),args:{field:u,cast_type:a,source:i}}):(hi=r,r=o)):(hi=r,r=o),r===o&&(r=hi,(t=hb())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o&&(e=af())!==o&&Nv()!==o&&Xf()!==o&&Nv()!==o&&(n=mc())!==o&&Nv()!==o&&(s=wv())!==o?(t=function(r,t,e){return{type:r.toLowerCase(),args:{field:t,source:e}}}(t,e,n),r=t):(hi=r,r=o)),r}())===o&&(t=hi,(e=lf())!==o&&Nv()!==o?((n=Jc())===o&&(n=null),n!==o?t=e={type:"function",name:e,over:n}:(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=Fv())!==o&&Nv()!==o&&(n=dv())!==o&&Nv()!==o?((s=Tc())===o&&(s=null),s!==o&&Nv()!==o&&wv()!==o?t=e=function(r,t){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),{type:"function",name:r,args:t||{type:"expr_list",value:[]}}}(e,s):(hi=t,t=o)):(hi=t,t=o))))),t}function af(){var t;return"century"===r.substr(hi,7).toLowerCase()?(t=r.substr(hi,7),hi+=7):(t=o,0===mi&&Si(hs)),t===o&&("day"===r.substr(hi,3).toLowerCase()?(t=r.substr(hi,3),hi+=3):(t=o,0===mi&&Si(ys)),t===o&&("date"===r.substr(hi,4).toLowerCase()?(t=r.substr(hi,4),hi+=4):(t=o,0===mi&&Si(Es)),t===o&&("decade"===r.substr(hi,6).toLowerCase()?(t=r.substr(hi,6),hi+=6):(t=o,0===mi&&Si(As)),t===o&&("dow"===r.substr(hi,3).toLowerCase()?(t=r.substr(hi,3),hi+=3):(t=o,0===mi&&Si(ms)),t===o&&("doy"===r.substr(hi,3).toLowerCase()?(t=r.substr(hi,3),hi+=3):(t=o,0===mi&&Si(Ts)),t===o&&("epoch"===r.substr(hi,5).toLowerCase()?(t=r.substr(hi,5),hi+=5):(t=o,0===mi&&Si(Is)),t===o&&("hour"===r.substr(hi,4).toLowerCase()?(t=r.substr(hi,4),hi+=4):(t=o,0===mi&&Si(Ns)),t===o&&("isodow"===r.substr(hi,6).toLowerCase()?(t=r.substr(hi,6),hi+=6):(t=o,0===mi&&Si(Rs)),t===o&&("isoyear"===r.substr(hi,7).toLowerCase()?(t=r.substr(hi,7),hi+=7):(t=o,0===mi&&Si(Ss)),t===o&&("microseconds"===r.substr(hi,12).toLowerCase()?(t=r.substr(hi,12),hi+=12):(t=o,0===mi&&Si(_s)),t===o&&("millennium"===r.substr(hi,10).toLowerCase()?(t=r.substr(hi,10),hi+=10):(t=o,0===mi&&Si(gs)),t===o&&("milliseconds"===r.substr(hi,12).toLowerCase()?(t=r.substr(hi,12),hi+=12):(t=o,0===mi&&Si(Os)),t===o&&("minute"===r.substr(hi,6).toLowerCase()?(t=r.substr(hi,6),hi+=6):(t=o,0===mi&&Si(xs)),t===o&&("month"===r.substr(hi,5).toLowerCase()?(t=r.substr(hi,5),hi+=5):(t=o,0===mi&&Si(Us)),t===o&&("quarter"===r.substr(hi,7).toLowerCase()?(t=r.substr(hi,7),hi+=7):(t=o,0===mi&&Si(Ms)),t===o&&("second"===r.substr(hi,6).toLowerCase()?(t=r.substr(hi,6),hi+=6):(t=o,0===mi&&Si(ks)),t===o&&("timezone"===r.substr(hi,8).toLowerCase()?(t=r.substr(hi,8),hi+=8):(t=o,0===mi&&Si(Ds)),t===o&&("timezone_hour"===r.substr(hi,13).toLowerCase()?(t=r.substr(hi,13),hi+=13):(t=o,0===mi&&Si($s)),t===o&&("timezone_minute"===r.substr(hi,15).toLowerCase()?(t=r.substr(hi,15),hi+=15):(t=o,0===mi&&Si(Ps)),t===o&&("week"===r.substr(hi,4).toLowerCase()?(t=r.substr(hi,4),hi+=4):(t=o,0===mi&&Si(Fs)),t===o&&("year"===r.substr(hi,4).toLowerCase()?(t=r.substr(hi,4),hi+=4):(t=o,0===mi&&Si(Gs))))))))))))))))))))))),t}function lf(){var t;return(t=function(){var t,e,n,s;return t=hi,"current_date"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(ya)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CURRENT_DATE":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"current_time"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(Aa)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CURRENT_TIME":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=Qb()),t}function cf(){var r,t,e,n,s,u,a,i;if(r=hi,nv()!==o)if(Nv()!==o)if((t=Bv())!==o)if(Nv()!==o){for(e=[],n=hi,(s=mv())===o&&(s=Av()),s!==o&&(u=Nv())!==o?((a=Cf())===o&&(a=yf()),a!==o?n=s=[s,u,a]:(hi=n,n=o)):(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=mv())===o&&(s=Av()),s!==o&&(u=Nv())!==o?((a=Cf())===o&&(a=yf()),a!==o?n=s=[s,u,a]:(hi=n,n=o)):(hi=n,n=o);e!==o&&(n=Nv())!==o?((s=$l())===o&&(s=null),s!==o?r={as:s,symbol:"::",target:t,arrows:(i=e).map((r=>r[0])),properties:i.map((r=>r[2]))}:(hi=r,r=o)):(hi=r,r=o)}else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;else hi=r,r=o;return r}function ff(){var t;return(t=Cf())===o&&(t=yf())===o&&(t=Lf())===o&&(t=vf())===o&&(t=function(){var t,e,n,s,u,a,i;if(t=hi,(e=qb())===o&&(e=Wb())===o&&(e=Kb())===o&&(e=Xb()),e!==o)if(Nv()!==o){if(n=hi,39===r.charCodeAt(hi)?(s="'",hi++):(s=o,0===mi&&Si(_t)),s!==o){for(u=[],a=wf();a!==o;)u.push(a),a=wf();u!==o?(39===r.charCodeAt(hi)?(a="'",hi++):(a=o,0===mi&&Si(_t)),a!==o?n=s=[s,u,a]:(hi=n,n=o)):(hi=n,n=o)}else hi=n,n=o;n!==o?(i=n,t=e={type:e.toLowerCase(),value:i[1].join("")}):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;if(t===o)if(t=hi,(e=qb())===o&&(e=Wb())===o&&(e=Kb())===o&&(e=Xb()),e!==o)if(Nv()!==o){if(n=hi,34===r.charCodeAt(hi)?(s='"',hi++):(s=o,0===mi&&Si(ke)),s!==o){for(u=[],a=df();a!==o;)u.push(a),a=df();u!==o?(34===r.charCodeAt(hi)?(a='"',hi++):(a=o,0===mi&&Si(ke)),a!==o?n=s=[s,u,a]:(hi=n,n=o)):(hi=n,n=o)}else hi=n,n=o;n!==o?(e=function(r,t){return{type:r.toLowerCase(),value:t[1].join("")}}(e,n),t=e):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;return t}())===o&&(t=bf()),t}function bf(){var t,e;return t=hi,function(){var t,e,n,s;return t=hi,"array"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Lu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="ARRAY":(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o&&hv()!==o&&Nv()!==o?((e=dc())===o&&(e=null),e!==o&&Nv()!==o&&yv()!==o?t={expr_list:e||{type:"origin",value:""},type:"array",keyword:"array",brackets:!0}:(hi=t,t=o)):(hi=t,t=o),t}function vf(){var r;return(r=Rf())!==o&&(r={type:"null",value:null}),r}function pf(){var t;return(t=function(){var t,e,n,s;return t=hi,"not null"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(wo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(t={type:"not null",value:"not null"}),t}function Lf(){var t,e;return t=hi,(e=function(){var t,e,n,s;return t=hi,"true"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(ho)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(e={type:"bool",value:!0}),(t=e)===o&&(t=hi,(e=function(){var t,e,n,s;return t=hi,"false"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(yo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(e={type:"bool",value:!1}),t=e),t}function Cf(){var t,e,n,s,u,a,i,l,c;if(t=hi,e=hi,39===r.charCodeAt(hi)?(n="'",hi++):(n=o,0===mi&&Si(_t)),n!==o){for(s=[],u=wf();u!==o;)s.push(u),u=wf();s!==o?(39===r.charCodeAt(hi)?(u="'",hi++):(u=o,0===mi&&Si(_t)),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o)}else hi=e,e=o;if(e!==o){if(n=[],Hs.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(Ys)),s!==o)for(;s!==o;)n.push(s),Hs.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(Ys));else n=o;if(n!==o)if((s=Nv())!==o){if(u=hi,39===r.charCodeAt(hi)?(a="'",hi++):(a=o,0===mi&&Si(_t)),a!==o){for(i=[],l=wf();l!==o;)i.push(l),l=wf();i!==o?(39===r.charCodeAt(hi)?(l="'",hi++):(l=o,0===mi&&Si(_t)),l!==o?u=a=[a,i,l]:(hi=u,u=o)):(hi=u,u=o)}else hi=u,u=o;u!==o?(c=u,t=e={type:"single_quote_string",value:`${e[1].join("")}${c[1].join("")}`}):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o}else hi=t,t=o;if(t===o){if(t=hi,e=hi,39===r.charCodeAt(hi)?(n="'",hi++):(n=o,0===mi&&Si(_t)),n!==o){for(s=[],u=wf();u!==o;)s.push(u),u=wf();s!==o?(39===r.charCodeAt(hi)?(u="'",hi++):(u=o,0===mi&&Si(_t)),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o)}else hi=e,e=o;if(e!==o&&(e=function(r){return{type:"single_quote_string",value:r[1].join("")}}(e)),(t=e)===o){if(t=hi,e=hi,34===r.charCodeAt(hi)?(n='"',hi++):(n=o,0===mi&&Si(ke)),n!==o){for(s=[],u=df();u!==o;)s.push(u),u=df();s!==o?(34===r.charCodeAt(hi)?(u='"',hi++):(u=o,0===mi&&Si(ke)),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o)}else hi=e,e=o;e!==o?(n=hi,mi++,s=pv(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=function(r){return{type:"double_quote_string",value:r[1].join("")}}(e):(hi=t,t=o)):(hi=t,t=o)}}return t}function df(){var t;return Bs.test(r.charAt(hi))?(t=r.charAt(hi),hi++):(t=o,0===mi&&Si(Ws)),t===o&&(t=hf()),t}function wf(){var t;return Xs.test(r.charAt(hi))?(t=r.charAt(hi),hi++):(t=o,0===mi&&Si(Vs)),t===o&&(t=hf()),t}function hf(){var t,e,n,s,u,a,i,l,c,f;return t=hi,"\\'"===r.substr(hi,2)?(e="\\'",hi+=2):(e=o,0===mi&&Si(qs)),e!==o&&(e="\\'"),(t=e)===o&&(t=hi,'\\"'===r.substr(hi,2)?(e='\\"',hi+=2):(e=o,0===mi&&Si(Ks)),e!==o&&(e='\\"'),(t=e)===o&&(t=hi,"\\\\"===r.substr(hi,2)?(e="\\\\",hi+=2):(e=o,0===mi&&Si(Zs)),e!==o&&(e="\\\\"),(t=e)===o&&(t=hi,"\\/"===r.substr(hi,2)?(e="\\/",hi+=2):(e=o,0===mi&&Si(zs)),e!==o&&(e="\\/"),(t=e)===o&&(t=hi,"\\b"===r.substr(hi,2)?(e="\\b",hi+=2):(e=o,0===mi&&Si(Qs)),e!==o&&(e="\b"),(t=e)===o&&(t=hi,"\\f"===r.substr(hi,2)?(e="\\f",hi+=2):(e=o,0===mi&&Si(Js)),e!==o&&(e="\f"),(t=e)===o&&(t=hi,"\\n"===r.substr(hi,2)?(e="\\n",hi+=2):(e=o,0===mi&&Si(ro)),e!==o&&(e="\n"),(t=e)===o&&(t=hi,"\\r"===r.substr(hi,2)?(e="\\r",hi+=2):(e=o,0===mi&&Si(to)),e!==o&&(e="\r"),(t=e)===o&&(t=hi,"\\t"===r.substr(hi,2)?(e="\\t",hi+=2):(e=o,0===mi&&Si(eo)),e!==o&&(e="\t"),(t=e)===o&&(t=hi,"\\u"===r.substr(hi,2)?(e="\\u",hi+=2):(e=o,0===mi&&Si(no)),e!==o&&(n=Nf())!==o&&(s=Nf())!==o&&(u=Nf())!==o&&(a=Nf())!==o?(i=n,l=s,c=u,f=a,t=e=String.fromCharCode(parseInt("0x"+i+l+c+f))):(hi=t,t=o),t===o&&(t=hi,92===r.charCodeAt(hi)?(e="\\",hi++):(e=o,0===mi&&Si(so)),e!==o&&(e="\\"),(t=e)===o&&(t=hi,"''"===r.substr(hi,2)?(e="''",hi+=2):(e=o,0===mi&&Si(oo)),e!==o&&(e="''"),t=e))))))))))),t}function yf(){var r,t;return(r=function(){var r,t,e,n;return r=hi,(t=Ef())===o&&(t=null),t!==o&&(e=Af())!==o&&(n=mf())!==o?r=t={type:"bigint",value:(t||"")+e+n}:(hi=r,r=o),r===o&&(r=hi,(t=Ef())===o&&(t=null),t!==o&&(e=Af())!==o?(t=function(r,t){const e=(r||"")+t;return r&&Jv(r)?{type:"bigint",value:e}:parseFloat(e)}(t,e),r=t):(hi=r,r=o),r===o&&(r=hi,(t=Ef())!==o&&(e=mf())!==o?(t=function(r,t){return{type:"bigint",value:r+t}}(t,e),r=t):(hi=r,r=o),r===o&&(r=hi,(t=Ef())!==o&&(t=function(r){return Jv(r)?{type:"bigint",value:r}:parseFloat(r)}(t)),r=t))),r}())!==o&&(r=(t=r)&&"bigint"===t.type?t:{type:"number",value:t}),r}function Ef(){var t,e,n;return(t=Tf())===o&&(t=If())===o&&(t=hi,45===r.charCodeAt(hi)?(e="-",hi++):(e=o,0===mi&&Si(In)),e===o&&(43===r.charCodeAt(hi)?(e="+",hi++):(e=o,0===mi&&Si(Tn))),e!==o&&(n=Tf())!==o?t=e+=n:(hi=t,t=o),t===o&&(t=hi,45===r.charCodeAt(hi)?(e="-",hi++):(e=o,0===mi&&Si(In)),e===o&&(43===r.charCodeAt(hi)?(e="+",hi++):(e=o,0===mi&&Si(Tn))),e!==o&&(n=If())!==o?t=e=function(r,t){return r+t}(e,n):(hi=t,t=o))),t}function Af(){var t,e,n;return t=hi,46===r.charCodeAt(hi)?(e=".",hi++):(e=o,0===mi&&Si(io)),e!==o&&(n=Tf())!==o?t=e="."+n:(hi=t,t=o),t}function mf(){var t,e,n;return t=hi,(e=function(){var t,e,n,s;return t=hi,vo.test(r.charAt(hi))?(e=r.charAt(hi),hi++):(e=o,0===mi&&Si(po)),e!==o?(Lo.test(r.charAt(hi))?(n=r.charAt(hi),hi++):(n=o,0===mi&&Si(Co)),n===o&&(n=null),n!==o?t=e+=null!==(s=n)?s:"":(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(n=Tf())!==o?t=e+=n:(hi=t,t=o),t}function Tf(){var r,t;if(r=[],(t=If())!==o)for(;t!==o;)r.push(t),t=If();else r=o;return r!==o&&(r=r.join("")),r}function If(){var t;return lo.test(r.charAt(hi))?(t=r.charAt(hi),hi++):(t=o,0===mi&&Si(co)),t}function Nf(){var t;return fo.test(r.charAt(hi))?(t=r.charAt(hi),hi++):(t=o,0===mi&&Si(bo)),t}function Rf(){var t,e,n,s;return t=hi,"null"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(G)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Sf(){var t,e,n,s;return t=hi,"default"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(gr)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function _f(){var t,e,n,s;return t=hi,"to"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(sr)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function gf(){var t,e,n,s;return t=hi,"show"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Eo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Of(){var t,e,n,s;return t=hi,"drop"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Ao)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="DROP":(hi=t,t=o)):(hi=t,t=o),t}function xf(){var t,e,n,s;return t=hi,"alter"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(To)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Uf(){var t,e,n,s;return t=hi,"select"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Io)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Mf(){var t,e,n,s;return t=hi,"update"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(No)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function kf(){var t,e,n,s;return t=hi,"create"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Ro)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Df(){var t,e,n,s;return t=hi,"temporary"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(So)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function $f(){var t,e,n,s;return t=hi,"temp"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(_o)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Pf(){var t,e,n,s;return t=hi,"delete"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(go)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Ff(){var t,e,n,s;return t=hi,"insert"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Oo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Gf(){var t,e,n,s;return t=hi,"RECURSIVE"===r.substr(hi,9)?(e="RECURSIVE",hi+=9):(e=o,0===mi&&Si(xo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="RECURSIVE":(hi=t,t=o)):(hi=t,t=o),t}function jf(){var t,e,n,s;return t=hi,"replace"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Uo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Hf(){var t,e,n,s;return t=hi,"rename"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(ko)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Yf(){var t,e,n,s;return t=hi,"ignore"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(ss)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Bf(){var t,e,n,s;return t=hi,"partition"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(Do)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="PARTITION":(hi=t,t=o)):(hi=t,t=o),t}function Wf(){var t,e,n,s;return t=hi,"into"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si($o)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Xf(){var t,e,n,s;return t=hi,"from"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Po)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Vf(){var t,e,n,s;return t=hi,"set"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(ht)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SET":(hi=t,t=o)):(hi=t,t=o),t}function qf(){var t,e,n,s;return t=hi,"as"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(Fo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Kf(){var t,e,n,s;return t=hi,"table"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Se)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="TABLE":(hi=t,t=o)):(hi=t,t=o),t}function Zf(){var t,e,n,s;return t=hi,"schema"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(c)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SCHEMA":(hi=t,t=o)):(hi=t,t=o),t}function zf(){var t,e,n,s;return t=hi,"on"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(j)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Qf(){var t,e,n,s;return t=hi,"join"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Xo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Jf(){var t,e,n,s;return t=hi,"outer"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Vo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function rb(){var t,e,n,s;return t=hi,"values"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Ko)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function tb(){var t,e,n,s;return t=hi,"using"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Zo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function eb(){var t,e,n,s;return t=hi,"with"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(He)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function nb(){var t,e,n,s;return t=hi,"group"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Qo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function sb(){var t,e,n,s;return t=hi,"by"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(Jo)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function ob(){var t,e,n,s;return t=hi,"order"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(ru)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function ub(){var t,e,n,s;return t=hi,"asc"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(su)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="ASC":(hi=t,t=o)):(hi=t,t=o),t}function ab(){var t,e,n,s;return t=hi,"desc"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(ou)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="DESC":(hi=t,t=o)):(hi=t,t=o),t}function ib(){var t,e,n,s;return t=hi,"all"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(uu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="ALL":(hi=t,t=o)):(hi=t,t=o),t}function lb(){var t,e,n,s;return t=hi,"distinct"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(au)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="DISTINCT":(hi=t,t=o)):(hi=t,t=o),t}function cb(){var t,e,n,s;return t=hi,"between"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(iu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="BETWEEN":(hi=t,t=o)):(hi=t,t=o),t}function fb(){var t,e,n,s;return t=hi,"in"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(Ut)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="IN":(hi=t,t=o)):(hi=t,t=o),t}function bb(){var t,e,n,s;return t=hi,"is"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(lu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="IS":(hi=t,t=o)):(hi=t,t=o),t}function vb(){var t,e,n,s;return t=hi,"like"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(cu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="LIKE":(hi=t,t=o)):(hi=t,t=o),t}function pb(){var t,e,n,s;return t=hi,"ilike"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(fu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="ILIKE":(hi=t,t=o)):(hi=t,t=o),t}function Lb(){var t,e,n,s;return t=hi,"exists"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(bu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="EXISTS":(hi=t,t=o)):(hi=t,t=o),t}function Cb(){var t,e,n,s;return t=hi,"not"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si($)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="NOT":(hi=t,t=o)):(hi=t,t=o),t}function db(){var t,e,n,s;return t=hi,"and"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(vu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="AND":(hi=t,t=o)):(hi=t,t=o),t}function wb(){var t,e,n,s;return t=hi,"or"===r.substr(hi,2).toLowerCase()?(e=r.substr(hi,2),hi+=2):(e=o,0===mi&&Si(pu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="OR":(hi=t,t=o)):(hi=t,t=o),t}function hb(){var t,e,n,s;return t=hi,"extract"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(mu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="EXTRACT":(hi=t,t=o)):(hi=t,t=o),t}function yb(){var t,e,n,s;return t=hi,"case"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Iu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Eb(){var t,e,n,s;return t=hi,"when"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Nu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Ab(){var t,e,n,s;return t=hi,"else"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Ru)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function mb(){var t,e,n,s;return t=hi,"end"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(pe)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e=[e,n]:(hi=t,t=o)):(hi=t,t=o),t}function Tb(){var t,e,n,s;return t=hi,"cast"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Su)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CAST":(hi=t,t=o)):(hi=t,t=o),t}function Ib(){var t,e,n,s;return t=hi,"char"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Ou)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CHAR":(hi=t,t=o)):(hi=t,t=o),t}function Nb(){var t,e,n,s;return t=hi,"varchar"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(xu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="VARCHAR":(hi=t,t=o)):(hi=t,t=o),t}function Rb(){var t,e,n,s;return t=hi,"numeric"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Uu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="NUMERIC":(hi=t,t=o)):(hi=t,t=o),t}function Sb(){var t,e,n,s;return t=hi,"decimal"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Mu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="DECIMAL":(hi=t,t=o)):(hi=t,t=o),t}function _b(){var t,e,n,s;return t=hi,"unsigned"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Du)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="UNSIGNED":(hi=t,t=o)):(hi=t,t=o),t}function gb(){var t,e,n,s;return t=hi,"int"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si($u)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="INT":(hi=t,t=o)):(hi=t,t=o),t}function Ob(){var t,e,n,s;return t=hi,"integer"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Fu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="INTEGER":(hi=t,t=o)):(hi=t,t=o),t}function xb(){var t,e,n,s;return t=hi,"smallint"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Yu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SMALLINT":(hi=t,t=o)):(hi=t,t=o),t}function Ub(){var t,e,n,s;return t=hi,"serial"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Bu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SERIAL":(hi=t,t=o)):(hi=t,t=o),t}function Mb(){var t,e,n,s;return t=hi,"tinyint"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Wu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="TINYINT":(hi=t,t=o)):(hi=t,t=o),t}function kb(){var t,e,n,s;return t=hi,"tinytext"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Xu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="TINYTEXT":(hi=t,t=o)):(hi=t,t=o),t}function Db(){var t,e,n,s;return t=hi,"text"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Vu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="TEXT":(hi=t,t=o)):(hi=t,t=o),t}function $b(){var t,e,n,s;return t=hi,"mediumtext"===r.substr(hi,10).toLowerCase()?(e=r.substr(hi,10),hi+=10):(e=o,0===mi&&Si(qu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="MEDIUMTEXT":(hi=t,t=o)):(hi=t,t=o),t}function Pb(){var t,e,n,s;return t=hi,"longtext"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Ku)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="LONGTEXT":(hi=t,t=o)):(hi=t,t=o),t}function Fb(){var t,e,n,s;return t=hi,"bigint"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Zu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="BIGINT":(hi=t,t=o)):(hi=t,t=o),t}function Gb(){var t,e,n,s;return t=hi,"enum"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(zu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="ENUM":(hi=t,t=o)):(hi=t,t=o),t}function jb(){var t,e,n,s;return t=hi,"float"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(Qu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="FLOAT":(hi=t,t=o)):(hi=t,t=o),t}function Hb(){var t,e,n,s;return t=hi,"double"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Ju)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="DOUBLE":(hi=t,t=o)):(hi=t,t=o),t}function Yb(){var t,e,n,s;return t=hi,"bigserial"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(ra)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="BIGSERIAL":(hi=t,t=o)):(hi=t,t=o),t}function Bb(){var t,e,n,s;return t=hi,"real"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(ta)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REAL":(hi=t,t=o)):(hi=t,t=o),t}function Wb(){var t,e,n,s;return t=hi,"date"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Es)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="DATE":(hi=t,t=o)):(hi=t,t=o),t}function Xb(){var t,e,n,s;return t=hi,"datetime"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(ea)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="DATETIME":(hi=t,t=o)):(hi=t,t=o),t}function Vb(){var t,e,n,s;return t=hi,"rows"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(er)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="ROWS":(hi=t,t=o)):(hi=t,t=o),t}function qb(){var t,e,n,s;return t=hi,"time"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(na)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="TIME":(hi=t,t=o)):(hi=t,t=o),t}function Kb(){var t,e,n,s;return t=hi,"timestamp"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(sa)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="TIMESTAMP":(hi=t,t=o)):(hi=t,t=o),t}function Zb(){var t,e,n,s;return t=hi,"truncate"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(oa)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="TRUNCATE":(hi=t,t=o)):(hi=t,t=o),t}function zb(){var t,e,n,s;return t=hi,"interval"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Ea)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="INTERVAL":(hi=t,t=o)):(hi=t,t=o),t}function Qb(){var t,e,n,s;return t=hi,"current_timestamp"===r.substr(hi,17).toLowerCase()?(e=r.substr(hi,17),hi+=17):(e=o,0===mi&&Si(ma)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CURRENT_TIMESTAMP":(hi=t,t=o)):(hi=t,t=o),t}function Jb(){var t,e,n,s;return t=hi,"current_user"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(jr)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CURRENT_USER":(hi=t,t=o)):(hi=t,t=o),t}function rv(){var t,e,n,s;return t=hi,"session_user"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(Hr)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="SESSION_USER":(hi=t,t=o)):(hi=t,t=o),t}function tv(){var t;return 36===r.charCodeAt(hi)?(t="$",hi++):(t=o,0===mi&&Si(gn)),t}function ev(){var t;return"$$"===r.substr(hi,2)?(t="$$",hi+=2):(t=o,0===mi&&Si(xa)),t}function nv(){var t;return"::"===r.substr(hi,2)?(t="::",hi+=2):(t=o,0===mi&&Si(Ma)),t}function sv(){var t;return 61===r.charCodeAt(hi)?(t="=",hi++):(t=o,0===mi&&Si(or)),t}function ov(){var t,e,n,s;return t=hi,"add"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(Da)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="ADD":(hi=t,t=o)):(hi=t,t=o),t}function uv(){var t,e,n,s;return t=hi,"column"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Ie)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="COLUMN":(hi=t,t=o)):(hi=t,t=o),t}function av(){var t,e,n,s;return t=hi,"index"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si($a)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="INDEX":(hi=t,t=o)):(hi=t,t=o),t}function iv(){var t,e,n,s;return t=hi,"key"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(Ir)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="KEY":(hi=t,t=o)):(hi=t,t=o),t}function lv(){var t,e,n,s;return t=hi,"unique"===r.substr(hi,6).toLowerCase()?(e=r.substr(hi,6),hi+=6):(e=o,0===mi&&Si(Tr)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="UNIQUE":(hi=t,t=o)):(hi=t,t=o),t}function cv(){var t,e,n,s;return t=hi,"comment"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Ga)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="COMMENT":(hi=t,t=o)):(hi=t,t=o),t}function fv(){var t,e,n,s;return t=hi,"constraint"===r.substr(hi,10).toLowerCase()?(e=r.substr(hi,10),hi+=10):(e=o,0===mi&&Si(Ne)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CONSTRAINT":(hi=t,t=o)):(hi=t,t=o),t}function bv(){var t,e,n,s;return t=hi,"concurrently"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(ja)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CONCURRENTLY":(hi=t,t=o)):(hi=t,t=o),t}function vv(){var t,e,n,s;return t=hi,"references"===r.substr(hi,10).toLowerCase()?(e=r.substr(hi,10),hi+=10):(e=o,0===mi&&Si(Ha)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REFERENCES":(hi=t,t=o)):(hi=t,t=o),t}function pv(){var t;return 46===r.charCodeAt(hi)?(t=".",hi++):(t=o,0===mi&&Si(io)),t}function Lv(){var t;return 44===r.charCodeAt(hi)?(t=",",hi++):(t=o,0===mi&&Si(Ka)),t}function Cv(){var t;return 42===r.charCodeAt(hi)?(t="*",hi++):(t=o,0===mi&&Si(Nn)),t}function dv(){var t;return 40===r.charCodeAt(hi)?(t="(",hi++):(t=o,0===mi&&Si(Ue)),t}function wv(){var t;return 41===r.charCodeAt(hi)?(t=")",hi++):(t=o,0===mi&&Si(Me)),t}function hv(){var t;return 91===r.charCodeAt(hi)?(t="[",hi++):(t=o,0===mi&&Si(Za)),t}function yv(){var t;return 93===r.charCodeAt(hi)?(t="]",hi++):(t=o,0===mi&&Si(za)),t}function Ev(){var t;return 59===r.charCodeAt(hi)?(t=";",hi++):(t=o,0===mi&&Si(xe)),t}function Av(){var t;return"->"===r.substr(hi,2)?(t="->",hi+=2):(t=o,0===mi&&Si(Qa)),t}function mv(){var t;return"->>"===r.substr(hi,3)?(t="->>",hi+=3):(t=o,0===mi&&Si(Ja)),t}function Tv(){var t;return"||"===r.substr(hi,2)?(t="||",hi+=2):(t=o,0===mi&&Si(_n)),t}function Iv(){var t;return(t=Tv())===o&&(t=function(){var t;return"&&"===r.substr(hi,2)?(t="&&",hi+=2):(t=o,0===mi&&Si(ei)),t}()),t}function Nv(){var r,t;for(r=[],(t=Ov())===o&&(t=Sv());t!==o;)r.push(t),(t=Ov())===o&&(t=Sv());return r}function Rv(){var r,t;if(r=[],(t=Ov())===o&&(t=Sv()),t!==o)for(;t!==o;)r.push(t),(t=Ov())===o&&(t=Sv());else r=o;return r}function Sv(){var t;return(t=function t(){var e,n,s,u,a,i,l;if(e=hi,"/*"===r.substr(hi,2)?(n="/*",hi+=2):(n=o,0===mi&&Si(ni)),n!==o){for(s=[],u=hi,a=hi,mi++,"*/"===r.substr(hi,2)?(i="*/",hi+=2):(i=o,0===mi&&Si(si)),mi--,i===o?a=void 0:(hi=a,a=o),a!==o?(i=hi,mi++,"/*"===r.substr(hi,2)?(l="/*",hi+=2):(l=o,0===mi&&Si(ni)),mi--,l===o?i=void 0:(hi=i,i=o),i!==o&&(l=gv())!==o?u=a=[a,i,l]:(hi=u,u=o)):(hi=u,u=o),u===o&&(u=t());u!==o;)s.push(u),u=hi,a=hi,mi++,"*/"===r.substr(hi,2)?(i="*/",hi+=2):(i=o,0===mi&&Si(si)),mi--,i===o?a=void 0:(hi=a,a=o),a!==o?(i=hi,mi++,"/*"===r.substr(hi,2)?(l="/*",hi+=2):(l=o,0===mi&&Si(ni)),mi--,l===o?i=void 0:(hi=i,i=o),i!==o&&(l=gv())!==o?u=a=[a,i,l]:(hi=u,u=o)):(hi=u,u=o),u===o&&(u=t());s!==o?("*/"===r.substr(hi,2)?(u="*/",hi+=2):(u=o,0===mi&&Si(si)),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o)}else hi=e,e=o;return e}())===o&&(t=function(){var t,e,n,s,u,a;if(t=hi,"--"===r.substr(hi,2)?(e="--",hi+=2):(e=o,0===mi&&Si(oi)),e!==o){for(n=[],s=hi,u=hi,mi++,a=xv(),mi--,a===o?u=void 0:(hi=u,u=o),u!==o&&(a=gv())!==o?s=u=[u,a]:(hi=s,s=o);s!==o;)n.push(s),s=hi,u=hi,mi++,a=xv(),mi--,a===o?u=void 0:(hi=u,u=o),u!==o&&(a=gv())!==o?s=u=[u,a]:(hi=s,s=o);n!==o?t=e=[e,n]:(hi=t,t=o)}else hi=t,t=o;return t}()),t}function _v(){var r,t,e,n,s,u,a;return r=hi,(t=cv())!==o&&Nv()!==o?((e=sv())===o&&(e=null),e!==o&&Nv()!==o&&(n=Cf())!==o?(u=e,a=n,r=t={type:(s=t).toLowerCase(),keyword:s.toLowerCase(),symbol:u,value:a}):(hi=r,r=o)):(hi=r,r=o),r}function gv(){var t;return r.length>hi?(t=r.charAt(hi),hi++):(t=o,0===mi&&Si(ui)),t}function Ov(){var t;return ai.test(r.charAt(hi))?(t=r.charAt(hi),hi++):(t=o,0===mi&&Si(ii)),t}function xv(){var t,e;if((t=function(){var t,e;return t=hi,mi++,r.length>hi?(e=r.charAt(hi),hi++):(e=o,0===mi&&Si(ui)),mi--,e===o?t=void 0:(hi=t,t=o),t}())===o)if(t=[],uo.test(r.charAt(hi))?(e=r.charAt(hi),hi++):(e=o,0===mi&&Si(ao)),e!==o)for(;e!==o;)t.push(e),uo.test(r.charAt(hi))?(e=r.charAt(hi),hi++):(e=o,0===mi&&Si(ao));else t=o;return t}function Uv(){var t,e;return t=hi,op=[],void 0!==o&&Nv()!==o?((e=Mv())===o&&(e=function(){var t,e;return t=hi,function(){var t;return"return"===r.substr(hi,6).toLowerCase()?(t=r.substr(hi,6),hi+=6):(t=o,0===mi&&Si(Ua)),t}()!==o&&Nv()!==o&&(e=kv())!==o?t={type:"return",expr:e}:(hi=t,t=o),t}()),e!==o?t={type:"proc",stmt:e,vars:op}:(hi=t,t=o)):(hi=t,t=o),t}function Mv(){var t,e,n,s;return t=hi,(e=Hv())===o&&(e=Yv()),e!==o&&Nv()!==o?((n=function(){var t;return":="===r.substr(hi,2)?(t=":=",hi+=2):(t=o,0===mi&&Si(I)),t}())===o&&(n=sv()),n!==o&&Nv()!==o&&(s=kv())!==o?t=e={type:"assign",left:e,symbol:n,right:s}:(hi=t,t=o)):(hi=t,t=o),t}function kv(){var r;return(r=Il())===o&&(r=function(){var r,t,e,n,s;return r=hi,(t=Hv())!==o&&Nv()!==o&&(e=Vl())!==o&&Nv()!==o&&(n=Hv())!==o&&Nv()!==o&&(s=Kl())!==o?r=t={type:"join",ltable:t,rtable:n,op:e,on:s}:(hi=r,r=o),r}())===o&&(r=Dv())===o&&(r=function(){var r,t;return r=hi,hv()!==o&&Nv()!==o&&(t=jv())!==o&&Nv()!==o&&yv()!==o?r={type:"array",value:t}:(hi=r,r=o),r}()),r}function Dv(){var r,t,e,n,s,u,a,i;if(r=hi,(t=$v())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=xc())!==o&&(a=Nv())!==o&&(i=$v())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=xc())!==o&&(a=Nv())!==o&&(i=$v())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=nn(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function $v(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Pv())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Mc())!==o&&(a=Nv())!==o&&(i=Pv())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Mc())!==o&&(a=Nv())!==o&&(i=Pv())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=nn(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Pv(){var r,t,e,n,s,u,a,i,l;return(r=ff())===o&&(r=Hv())===o&&(r=Gv())===o&&(r=Qc())===o&&(r=hi,(t=dv())!==o&&(e=Nv())!==o&&(n=Dv())!==o&&(s=Nv())!==o&&(u=wv())!==o?((l=n).parentheses=!0,r=t=l):(hi=r,r=o),r===o&&(r=hi,(t=qc())!==o?(e=hi,(n=pv())!==o&&(s=Nv())!==o&&(u=qc())!==o?e=n=[n,s,u]:(hi=e,e=o),e===o&&(e=null),e!==o?(a=t,r=t=(i=e)?{type:"column_ref",table:a,column:i[2]}:{type:"var",name:a,prefix:null}):(hi=r,r=o)):(hi=r,r=o))),r}function Fv(){var r,t,e,n,s,u,a;return r=hi,(t=qc())!==o?(e=hi,(n=Nv())!==o&&(s=pv())!==o&&(u=Nv())!==o&&(a=qc())!==o?e=n=[n,s,u,a]:(hi=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){let e=r;return null!==t&&(e=`${r}.${t[3]}`),e}(t,e):(hi=r,r=o)):(hi=r,r=o),r}function Gv(){var r,t,e;return r=hi,(t=Fv())!==o&&Nv()!==o&&dv()!==o&&Nv()!==o?((e=jv())===o&&(e=null),e!==o&&Nv()!==o&&wv()!==o?r=t={type:"function",name:t,args:{type:"expr_list",value:e}}:(hi=r,r=o)):(hi=r,r=o),r}function jv(){var r,t,e,n,s,u,a,i;if(r=hi,(t=Pv())!==o){for(e=[],n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Pv())!==o?n=s=[s,u,a,i]:(hi=n,n=o);n!==o;)e.push(n),n=hi,(s=Nv())!==o&&(u=Lv())!==o&&(a=Nv())!==o&&(i=Pv())!==o?n=s=[s,u,a,i]:(hi=n,n=o);e!==o?r=t=rp(t,e):(hi=r,r=o)}else hi=r,r=o;return r}function Hv(){var t,e,n,s,u,a,i;if(t=hi,(e=ev())!==o){for(n=[],li.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(ci));s!==o;)n.push(s),li.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(ci));n!==o&&(s=ev())!==o?t=e={type:"var",name:n.join(""),prefix:"$$",suffix:"$$"}:(hi=t,t=o)}else hi=t,t=o;if(t===o){if(t=hi,(e=tv())!==o)if((n=Xc())!==o)if((s=tv())!==o){for(u=[],li.test(r.charAt(hi))?(a=r.charAt(hi),hi++):(a=o,0===mi&&Si(ci));a!==o;)u.push(a),li.test(r.charAt(hi))?(a=r.charAt(hi),hi++):(a=o,0===mi&&Si(ci));u!==o&&(a=tv())!==o&&(i=Xc())!==o&&(function(r,t,e){if(r!==e)return!0}(n,0,i)?o:void 0)!==o&&tv()!==o?t=e=function(r,t,e){return{type:"var",name:t.join(""),prefix:`$${r}$`,suffix:`$${e}$`}}(n,u,i):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;t===o&&(t=hi,(e=function(){var t;return(t=function(){var t;return"@@"===r.substr(hi,2)?(t="@@",hi+=2):(t=o,0===mi&&Si(Oa)),t}())===o&&(t=function(){var t;return 64===r.charCodeAt(hi)?(t="@",hi++):(t=o,0===mi&&Si(ga)),t}())===o&&(t=tv())===o&&(t=tv()),t}())!==o&&(n=Yv())!==o?t=e=function(r,t){return{type:"var",...t,prefix:r}}(e,n):(hi=t,t=o))}return t}function Yv(){var t,e,n,s,u;return t=hi,34===r.charCodeAt(hi)?(e='"',hi++):(e=o,0===mi&&Si(ke)),e===o&&(e=null),e!==o&&(n=qc())!==o&&(s=function(){var t,e,n,s;for(t=[],e=hi,46===r.charCodeAt(hi)?(n=".",hi++):(n=o,0===mi&&Si(io)),n!==o&&(s=qc())!==o?e=n=[n,s]:(hi=e,e=o);e!==o;)t.push(e),e=hi,46===r.charCodeAt(hi)?(n=".",hi++):(n=o,0===mi&&Si(io)),n!==o&&(s=qc())!==o?e=n=[n,s]:(hi=e,e=o);return t!==o&&(t=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e][1]);return t}(t)),t}())!==o?(34===r.charCodeAt(hi)?(u='"',hi++):(u=o,0===mi&&Si(ke)),u===o&&(u=null),u!==o?t=e=function(r,t,e,n){if(r&&!n||!r&&n)throw new Error("double quoted not match");return op.push(t),{type:"var",name:t,members:e,quoted:r&&n?'"':null,prefix:null}}(e,n,s,u):(hi=t,t=o)):(hi=t,t=o),t===o&&(t=hi,(e=yf())!==o&&(e={type:"var",name:e.value,members:[],quoted:null,prefix:null}),t=e),t}function Bv(){var t;return(t=function(){var r,t,e;return r=hi,(t=qv())===o&&(t=Xv()),t!==o&&Nv()!==o&&hv()!==o&&Nv()!==o&&yv()!==o&&Nv()!==o&&hv()!==o&&Nv()!==o&&yv()!==o?(e=t,r=t={...e,array:"two"}):(hi=r,r=o),r===o&&(r=hi,(t=qv())===o&&(t=Xv()),t!==o&&Nv()!==o&&hv()!==o&&Nv()!==o&&yv()!==o?(t=function(r){return{...r,array:"one"}}(t),r=t):(hi=r,r=o)),r}())===o&&(t=Xv())===o&&(t=qv())===o&&(t=function(){var t,e,n,s;if(t=hi,(e=Wb())===o&&(e=Xb()),e!==o)if(Nv()!==o)if(dv()!==o)if(Nv()!==o){if(n=[],lo.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(co)),s!==o)for(;s!==o;)n.push(s),lo.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(co));else n=o;n!==o&&(s=Nv())!==o&&wv()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;return t===o&&(t=hi,(e=Wb())===o&&(e=Xb()),e!==o&&(e=di(e)),(t=e)===o&&(t=function(){var t,e,n,s,u,a;if(t=hi,(e=qb())===o&&(e=Kb()),e!==o)if(Nv()!==o)if((n=dv())!==o)if(Nv()!==o){if(s=[],lo.test(r.charAt(hi))?(u=r.charAt(hi),hi++):(u=o,0===mi&&Si(co)),u!==o)for(;u!==o;)s.push(u),lo.test(r.charAt(hi))?(u=r.charAt(hi),hi++):(u=o,0===mi&&Si(co));else s=o;s!==o&&(u=Nv())!==o&&wv()!==o&&Nv()!==o?((a=Kv())===o&&(a=null),a!==o?(e=function(r,t,e){return{dataType:r,length:parseInt(t.join(""),10),parentheses:!0,suffix:e}}(e,s,a),t=e):(hi=t,t=o)):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;return t===o&&(t=hi,(e=qb())===o&&(e=Kb()),e!==o&&Nv()!==o?((n=Kv())===o&&(n=null),n!==o?(e=function(r,t){return{dataType:r,suffix:t}}(e,n),t=e):(hi=t,t=o)):(hi=t,t=o)),t}())),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=hi,"json"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(Gu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="JSON":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"jsonb"===r.substr(hi,5).toLowerCase()?(e=r.substr(hi,5),hi+=5):(e=o,0===mi&&Si(ju)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="JSONB":(hi=t,t=o)):(hi=t,t=o),t}()),t!==o&&(t=di(t)),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=hi,"geometry"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Hu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="GEOMETRY":(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(t={dataType:t}),t}())===o&&(t=function(){var r,t;return r=hi,(t=kb())===o&&(t=Db())===o&&(t=$b())===o&&(t=Pb()),t!==o&&hv()!==o&&Nv()!==o&&yv()!==o?r=t={dataType:t+"[]"}:(hi=r,r=o),r===o&&(r=hi,(t=kb())===o&&(t=Db())===o&&(t=$b())===o&&(t=Pb()),t!==o&&(t=function(r){return{dataType:r}}(t)),r=t),r}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=hi,"uuid"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(aa)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="UUID":(hi=t,t=o)):(hi=t,t=o),t}())!==o&&(t={dataType:t}),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=hi,"bool"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(_u)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="BOOL":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"boolean"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(gu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="BOOLEAN":(hi=t,t=o)):(hi=t,t=o),t}()),t!==o&&(t=fi(t)),t}())===o&&(t=function(){var r,t,e,n,s;return r=hi,(t=Gb())!==o&&Nv()!==o&&(e=Cc())!==o?(n=t,(s=e).parentheses=!0,r=t={dataType:n,expr:s}):(hi=r,r=o),r}())===o&&(t=function(){var r;return(r=Ub())===o&&(r=zb()),r!==o&&(r=di(r)),r}())===o&&(t=function(){var t;return"bytea"===r.substr(hi,5).toLowerCase()?(t=r.substr(hi,5),hi+=5):(t=o,0===mi&&Si(bi)),t!==o&&(t={dataType:"BYTEA"}),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=hi,"oid"===r.substr(hi,3).toLowerCase()?(e=r.substr(hi,3),hi+=3):(e=o,0===mi&&Si(ia)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="OID":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regclass"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(la)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGCLASS":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regcollation"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(ca)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGCOLLATION":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regconfig"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(fa)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGCONFIG":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regdictionary"===r.substr(hi,13).toLowerCase()?(e=r.substr(hi,13),hi+=13):(e=o,0===mi&&Si(ba)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGDICTIONARY":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regnamespace"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(va)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGNAMESPACE":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regoper"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(pa)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGOPER":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regoperator"===r.substr(hi,11).toLowerCase()?(e=r.substr(hi,11),hi+=11):(e=o,0===mi&&Si(La)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGOPERATOR":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regproc"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Ca)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGPROC":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regprocedure"===r.substr(hi,12).toLowerCase()?(e=r.substr(hi,12),hi+=12):(e=o,0===mi&&Si(da)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGPROCEDURE":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regrole"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(wa)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGROLE":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=hi,"regtype"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(ha)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="REGTYPE":(hi=t,t=o)):(hi=t,t=o),t}()),t!==o&&(t=fi(t)),t}())===o&&(t=function(){var t;return"record"===r.substr(hi,6).toLowerCase()?(t=r.substr(hi,6),hi+=6):(t=o,0===mi&&Si(wi)),t!==o&&(t={dataType:"RECORD"}),t}()),t}function Wv(){var t,e;return t=hi,function(){var t,e,n,s;return t=hi,"character"===r.substr(hi,9).toLowerCase()?(e=r.substr(hi,9),hi+=9):(e=o,0===mi&&Si(wt)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="CHARACTER":(hi=t,t=o)):(hi=t,t=o),t}()!==o&&Nv()!==o?("varying"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(vi)),e===o&&(e=null),e!==o?t="CHARACTER VARYING":(hi=t,t=o)):(hi=t,t=o),t}function Xv(){var t,e,n,s;if(t=hi,(e=Ib())===o&&(e=Nb())===o&&(e=Wv()),e!==o)if(Nv()!==o)if(dv()!==o)if(Nv()!==o){if(n=[],lo.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(co)),s!==o)for(;s!==o;)n.push(s),lo.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(co));else n=o;n!==o&&(s=Nv())!==o&&wv()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;return t===o&&(t=hi,(e=Ib())===o&&(e=Wv())===o&&(e=Nb()),e!==o&&(e=function(r){return{dataType:r}}(e)),t=e),t}function Vv(){var t,e,n;return t=hi,(e=_b())===o&&(e=null),e!==o&&Nv()!==o?((n=function(){var t,e,n,s;return t=hi,"zerofill"===r.substr(hi,8).toLowerCase()?(e=r.substr(hi,8),hi+=8):(e=o,0===mi&&Si(Pu)),e!==o?(n=hi,mi++,s=Kc(),mi--,s===o?n=void 0:(hi=n,n=o),n!==o?t=e="ZEROFILL":(hi=t,t=o)):(hi=t,t=o),t}())===o&&(n=null),n!==o?t=e=function(r,t){const e=[];return r&&e.push(r),t&&e.push(t),e}(e,n):(hi=t,t=o)):(hi=t,t=o),t}function qv(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d;if(t=hi,(e=Rb())===o&&(e=Sb())===o&&(e=gb())===o&&(e=Ob())===o&&(e=xb())===o&&(e=Mb())===o&&(e=Fb())===o&&(e=jb())===o&&(e=hi,(n=Hb())!==o&&(s=Nv())!==o?("precision"===r.substr(hi,9).toLowerCase()?(u=r.substr(hi,9),hi+=9):(u=o,0===mi&&Si(pi)),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o),e===o&&(e=Hb())===o&&(e=Ub())===o&&(e=Yb())===o&&(e=Bb())),e!==o)if((n=Nv())!==o)if((s=dv())!==o)if((u=Nv())!==o){if(a=[],lo.test(r.charAt(hi))?(i=r.charAt(hi),hi++):(i=o,0===mi&&Si(co)),i!==o)for(;i!==o;)a.push(i),lo.test(r.charAt(hi))?(i=r.charAt(hi),hi++):(i=o,0===mi&&Si(co));else a=o;if(a!==o)if((i=Nv())!==o){if(l=hi,(c=Lv())!==o)if((f=Nv())!==o){if(b=[],lo.test(r.charAt(hi))?(v=r.charAt(hi),hi++):(v=o,0===mi&&Si(co)),v!==o)for(;v!==o;)b.push(v),lo.test(r.charAt(hi))?(v=r.charAt(hi),hi++):(v=o,0===mi&&Si(co));else b=o;b!==o?l=c=[c,f,b]:(hi=l,l=o)}else hi=l,l=o;else hi=l,l=o;l===o&&(l=null),l!==o&&(c=Nv())!==o&&(f=wv())!==o&&(b=Nv())!==o?((v=Vv())===o&&(v=null),v!==o?(p=e,L=a,C=l,d=v,t=e={dataType:Array.isArray(p)?`${p[0].toUpperCase()} ${p[2].toUpperCase()}`:p,length:parseInt(L.join(""),10),scale:C&&parseInt(C[2].join(""),10),parentheses:!0,suffix:d}):(hi=t,t=o)):(hi=t,t=o)}else hi=t,t=o;else hi=t,t=o}else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;else hi=t,t=o;if(t===o){if(t=hi,(e=Rb())===o&&(e=Sb())===o&&(e=gb())===o&&(e=Ob())===o&&(e=xb())===o&&(e=Mb())===o&&(e=Fb())===o&&(e=jb())===o&&(e=hi,(n=Hb())!==o&&(s=Nv())!==o?("precision"===r.substr(hi,9).toLowerCase()?(u=r.substr(hi,9),hi+=9):(u=o,0===mi&&Si(pi)),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o),e===o&&(e=Hb())===o&&(e=Ub())===o&&(e=Yb())===o&&(e=Bb())),e!==o){if(n=[],lo.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(co)),s!==o)for(;s!==o;)n.push(s),lo.test(r.charAt(hi))?(s=r.charAt(hi),hi++):(s=o,0===mi&&Si(co));else n=o;n!==o&&(s=Nv())!==o?((u=Vv())===o&&(u=null),u!==o?t=e=function(r,t,e){return{dataType:Array.isArray(r)?`${r[0].toUpperCase()} ${r[2].toUpperCase()}`:r,length:parseInt(t.join(""),10),suffix:e}}(e,n,u):(hi=t,t=o)):(hi=t,t=o)}else hi=t,t=o;t===o&&(t=hi,(e=Rb())===o&&(e=Sb())===o&&(e=gb())===o&&(e=Ob())===o&&(e=xb())===o&&(e=Mb())===o&&(e=Fb())===o&&(e=jb())===o&&(e=hi,(n=Hb())!==o&&(s=Nv())!==o?("precision"===r.substr(hi,9).toLowerCase()?(u=r.substr(hi,9),hi+=9):(u=o,0===mi&&Si(pi)),u!==o?e=n=[n,s,u]:(hi=e,e=o)):(hi=e,e=o),e===o&&(e=Hb())===o&&(e=Ub())===o&&(e=Yb())===o&&(e=Bb())),e!==o&&(n=Nv())!==o?((s=Vv())===o&&(s=null),s!==o&&(u=Nv())!==o?t=e=function(r,t){return{dataType:Array.isArray(r)?`${r[0].toUpperCase()} ${r[2].toUpperCase()}`:r,suffix:t}}(e,s):(hi=t,t=o)):(hi=t,t=o))}return t}function Kv(){var t,e,n;return t=hi,"without"===r.substr(hi,7).toLowerCase()?(e=r.substr(hi,7),hi+=7):(e=o,0===mi&&Si(Li)),e===o&&("with"===r.substr(hi,4).toLowerCase()?(e=r.substr(hi,4),hi+=4):(e=o,0===mi&&Si(He))),e!==o&&Nv()!==o&&qb()!==o&&Nv()!==o?("zone"===r.substr(hi,4).toLowerCase()?(n=r.substr(hi,4),hi+=4):(n=o,0===mi&&Si(Ci)),n!==o?t=e=[e.toUpperCase(),"TIME","ZONE"]:(hi=t,t=o)):(hi=t,t=o),t}const Zv={ALTER:!0,ALL:!0,ADD:!0,AND:!0,AS:!0,ASC:!0,BETWEEN:!0,BY:!0,CALL:!0,CASE:!0,CREATE:!0,CONTAINS:!0,CURRENT_DATE:!0,CURRENT_TIME:!0,CURRENT_TIMESTAMP:!0,CURRENT_USER:!0,DELETE:!0,DESC:!0,DISTINCT:!0,DROP:!0,ELSE:!0,END:!0,EXISTS:!0,EXPLAIN:!0,FALSE:!0,FROM:!0,FULL:!0,GROUP:!0,HAVING:!0,IN:!0,INNER:!0,INSERT:!0,INTO:!0,IS:!0,JOIN:!0,JSON:!0,LEFT:!0,LIKE:!0,LIMIT:!0,NOT:!0,NULL:!0,NULLS:!0,OFFSET:!0,ON:!0,OR:!0,ORDER:!0,OUTER:!0,RECURSIVE:!0,RENAME:!0,RIGHT:!0,SELECT:!0,SESSION_USER:!0,SET:!0,SHOW:!0,SYSTEM_USER:!0,TABLE:!0,THEN:!0,TRUE:!0,TRUNCATE:!0,UNION:!0,UPDATE:!0,USING:!0,WITH:!0,WHEN:!0,WHERE:!0,WINDOW:!0,GLOBAL:!0,SESSION:!0,LOCAL:!0,PERSIST:!0,PERSIST_ONLY:!0};function zv(r,t){return{type:"unary_expr",operator:r,expr:t}}function Qv(r,t,e){return{type:"binary_expr",operator:r,left:t,right:e}}function Jv(r){const t=n(Number.MAX_SAFE_INTEGER);return!(n(r)<t)}function rp(r,t,e=3){const n=Array.isArray(r)?r:[r];for(let r=0;r<t.length;r++)delete t[r][e].tableList,delete t[r][e].columnList,n.push(t[r][e]);return n}function tp(r,t){let e=r;for(let r=0;r<t.length;r++)e=Qv(t[r][1],e,t[r][3]);return e}function ep(r){return ip[r]||r||null}function np(r){const t=new Set;for(let e of r.keys()){const r=e.split("::");if(!r){t.add(e);break}r&&r[1]&&(r[1]=ep(r[1])),t.add(r.join("::"))}return Array.from(t)}function sp(r){return"string"==typeof r?{type:"same",value:r}:r}let op=[];const up=new Set,ap=new Set,ip={};if((e=a())!==o&&hi===r.length)return e;throw e!==o&&hi<r.length&&Si({type:"end"}),function(r,t,e){return new s(s.buildMessage(r,t),r,t,e)}(Ai,Ei<r.length?r.charAt(Ei):null,Ei<r.length?Ri(Ei,Ei+1):Ri(Ei,Ei))}}},function(r,t,e){var n=e(0);function s(r,t,e,n){this.message=r,this.expected=t,this.found=e,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,s)}!function(r,t){function e(){this.constructor=r}e.prototype=t.prototype,r.prototype=new e}(s,Error),s.buildMessage=function(r,t){var e={literal:function(r){return'"'+s(r.text)+'"'},class:function(r){var t,e="";for(t=0;t<r.parts.length;t++)e+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+e+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function n(r){return r.charCodeAt(0).toString(16).toUpperCase()}function s(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}function o(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}return"Expected "+function(r){var t,n,s,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(s=r[t],e[s.type](s));if(o.sort(),o.length>0){for(t=1,n=1;t<o.length;t++)o[t-1]!==o[t]&&(o[n]=o[t],n++);o.length=n}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+s(r)+'"':"end of input"}(t)+" found."},r.exports={SyntaxError:s,parse:function(r,t){t=void 0!==t?t:{};var e,o={},u={start:fo},a=fo,i=function(r,t){return Qi(r,t,1)},l=uo("IF",!0),c=uo("TRIGGER",!0),f=uo("BEFORE",!0),b=uo("AFTER",!0),v=uo("INSTEAD OF",!0),p=uo("ON",!0),L=uo("OF",!0),C=function(r,t){return Qi(r,t)},d=uo("BEGIN",!0),w=uo("END",!0),h=uo("FOR",!0),y=uo("EACH",!0),E=uo("ROW",!0),A=uo("STATEMENT",!0),m=uo("LOCAL",!0),T=uo("CHECK",!0),I=function(r,t){return Qi(r,t)},N=uo("AUTO_INCREMENT",!0),R=uo("AUTOINCREMENT",!0),S=uo("UNIQUE",!0),_=uo("KEY",!0),g=uo("PRIMARY",!0),O=uo("COLUMN_FORMAT",!0),x=uo("FIXED",!0),U=uo("DYNAMIC",!0),M=uo("DEFAULT",!0),k=uo("STORAGE",!0),D=uo("DISK",!0),$=uo("MEMORY",!0),P=uo("ALGORITHM",!0),F=uo("INSTANT",!0),G=uo("INPLACE",!0),j=uo("COPY",!0),H=uo("LOCK",!0),Y=uo("NONE",!0),B=uo("SHARED",!0),W=uo("EXCLUSIVE",!0),X=uo("NOT",!0),V=uo("REPLICATION",!0),q=uo("FOREIGN KEY",!0),K=uo("MATCH FULL",!0),Z=uo("MATCH PARTIAL",!0),z=uo("MATCH SIMPLE",!0),Q=uo("RESTRICT",!0),J=uo("CASCADE",!0),rr=uo("SET NULL",!0),tr=uo("NO ACTION",!0),er=uo("SET DEFAULT",!0),nr=uo("CHARACTER",!0),sr=uo("SET",!0),or=uo("CHARSET",!0),ur=uo("COLLATE",!0),ar=uo("AVG_ROW_LENGTH",!0),ir=uo("KEY_BLOCK_SIZE",!0),lr=uo("MAX_ROWS",!0),cr=uo("MIN_ROWS",!0),fr=uo("STATS_SAMPLE_PAGES",!0),br=uo("CONNECTION",!0),vr=uo("COMPRESSION",!0),pr=uo("'",!1),Lr=uo("ZLIB",!0),Cr=uo("LZ4",!0),dr=uo("ENGINE",!0),wr=uo("READ",!0),hr=uo("LOW_PRIORITY",!0),yr=uo("WRITE",!0),Er=function(r,t){return Qi(r,t)},Ar=uo("BINARY",!0),mr=uo("MASTER",!0),Tr=uo("LOGS",!0),Ir=uo("BINLOG",!0),Nr=uo("EVENTS",!0),Rr=uo("COLLATION",!0),Sr=uo("GRANTS",!0),_r=uo("(",!1),gr=uo(")",!1),Or=uo("BTREE",!0),xr=uo("HASH",!0),Ur=uo("WITH",!0),Mr=uo("PARSER",!0),kr=uo("VISIBLE",!0),Dr=uo("INVISIBLE",!0),$r=function(r,t){return t.unshift(r),t.forEach((r=>{const{table:t,as:e}=r;ol[t]=t,e&&(ol[e]=t),function(r){const t=tl(r);r.clear(),t.forEach((t=>r.add(t)))}(sl)})),t},Pr=uo("=",!1),Fr=uo("DUPLICATE",!0),Gr=function(r,t){return Ji(r,t)},jr=uo("!",!1),Hr=function(r){return r[0]+" "+r[2]},Yr=uo(">=",!1),Br=uo(">",!1),Wr=uo("<=",!1),Xr=uo("<>",!1),Vr=uo("<",!1),qr=uo("!=",!1),Kr=uo("glob",!0),Zr=uo("+",!1),zr=uo("-",!1),Qr=uo("*",!1),Jr=uo("/",!1),rt=uo("%",!1),tt=uo("||",!1),et=uo("?",!1),nt=function(r){return!0===qi[r.toUpperCase()]},st=uo('"',!1),ot=/^[^"]/,ut=ao(['"'],!0,!1),at=function(r){return r.join("")},it=/^[^']/,lt=ao(["'"],!0,!1),ct=uo("`",!1),ft=/^[^`]/,bt=ao(["`"],!0,!1),vt=function(r,t){return r+t.join("")},pt=/^[A-Za-z_]/,Lt=ao([["A","Z"],["a","z"],"_"],!1,!1),Ct=/^[A-Za-z0-9_]/,dt=ao([["A","Z"],["a","z"],["0","9"],"_"],!1,!1),wt=/^[A-Za-z0-9_:]/,ht=ao([["A","Z"],["a","z"],["0","9"],"_",":"],!1,!1),yt=uo(":",!1),Et=uo("_binary",!0),At=uo("X",!0),mt=/^[0-9A-Fa-f]/,Tt=ao([["0","9"],["A","F"],["a","f"]],!1,!1),It=uo("b",!0),Nt=uo("0x",!1),Rt=function(r,t){return{type:r.toLowerCase(),value:t[1].join("")}},St=/^[^"\\\0-\x1F\x7F]/,_t=ao(['"',"\\",["\0",""],""],!0,!1),gt=/^[^'\\]/,Ot=ao(["'","\\"],!0,!1),xt=uo("\\'",!1),Ut=uo('\\"',!1),Mt=uo("\\\\",!1),kt=uo("\\/",!1),Dt=uo("\\b",!1),$t=uo("\\f",!1),Pt=uo("\\n",!1),Ft=uo("\\r",!1),Gt=uo("\\t",!1),jt=uo("\\u",!1),Ht=uo("\\",!1),Yt=uo("''",!1),Bt=uo('""',!1),Wt=uo("``",!1),Xt=/^[\n\r]/,Vt=ao(["\n","\r"],!1,!1),qt=uo(".",!1),Kt=/^[0-9]/,Zt=ao([["0","9"]],!1,!1),zt=/^[0-9a-fA-F]/,Qt=ao([["0","9"],["a","f"],["A","F"]],!1,!1),Jt=/^[eE]/,re=ao(["e","E"],!1,!1),te=/^[+\-]/,ee=ao(["+","-"],!1,!1),ne=uo("ANALYZE",!0),se=uo("ATTACH",!0),oe=uo("NULL",!0),ue=uo("NOT NULL",!0),ae=uo("TRUE",!0),ie=uo("TO",!0),le=uo("FALSE",!0),ce=uo("SHOW",!0),fe=uo("DROP",!0),be=uo("USE",!0),ve=uo("ALTER",!0),pe=uo("SELECT",!0),Le=uo("UPDATE",!0),Ce=uo("CREATE",!0),de=uo("TEMPORARY",!0),we=uo("TEMP",!0),he=uo("DELETE",!0),ye=uo("INSERT",!0),Ee=uo("RECURSIVE",!1),Ae=uo("REPLACE",!0),me=uo("RENAME",!0),Te=uo("IGNORE",!0),Ie=uo("PARTITION",!0),Ne=uo("INTO",!0),Re=uo("FROM",!0),Se=uo("UNLOCK",!0),_e=uo("AS",!0),ge=uo("TABLE",!0),Oe=uo("TABLES",!0),xe=uo("DATABASE",!0),Ue=uo("SCHEME",!0),Me=uo("LEFT",!0),ke=uo("INNER",!0),De=uo("JOIN",!0),$e=uo("OUTER",!0),Pe=uo("OVER",!0),Fe=uo("UNION",!0),Ge=uo("VALUES",!0),je=uo("USING",!0),He=uo("WHERE",!0),Ye=uo("GROUP",!0),Be=uo("BY",!0),We=uo("ORDER",!0),Xe=uo("HAVING",!0),Ve=uo("LIMIT",!0),qe=uo("OFFSET",!0),Ke=uo("ASC",!0),Ze=uo("DESC",!0),ze=uo("DESCRIBE",!0),Qe=uo("ALL",!0),Je=uo("DISTINCT",!0),rn=uo("BETWEEN",!0),tn=uo("IN",!0),en=uo("IS",!0),nn=uo("LIKE",!0),sn=uo("RLIKE",!0),on=uo("REGEXP",!0),un=uo("EXISTS",!0),an=uo("AND",!0),ln=uo("OR",!0),cn=uo("COUNT",!0),fn=uo("MAX",!0),bn=uo("MIN",!0),vn=uo("SUM",!0),pn=uo("AVG",!0),Ln=uo("CALL",!0),Cn=uo("CASE",!0),dn=uo("WHEN",!0),wn=uo("THEN",!0),hn=uo("ELSE",!0),yn=uo("CAST",!0),En=uo("BIT",!0),An=uo("CHAR",!0),mn=uo("VARCHAR",!0),Tn=uo("NUMERIC",!0),In=uo("DECIMAL",!0),Nn=uo("SIGNED",!0),Rn=uo("UNSIGNED",!0),Sn=uo("INT",!0),_n=uo("ZEROFILL",!0),gn=uo("INTEGER",!0),On=uo("JSON",!0),xn=uo("SMALLINT",!0),Un=uo("TINYINT",!0),Mn=uo("TINYTEXT",!0),kn=uo("TEXT",!0),Dn=uo("MEDIUMTEXT",!0),$n=uo("LONGTEXT",!0),Pn=uo("BIGINT",!0),Fn=uo("ENUM",!0),Gn=uo("FLOAT",!0),jn=uo("DOUBLE",!0),Hn=uo("REAL",!0),Yn=uo("DATE",!0),Bn=uo("DATETIME",!0),Wn=uo("TIME",!0),Xn=uo("TIMESTAMP",!0),Vn=uo("TRUNCATE",!0),qn=uo("USER",!0),Kn=uo("CURRENT_DATE",!0),Zn=uo("INTERVAL",!0),zn=uo("YEAR",!0),Qn=uo("MONTH",!0),Jn=uo("DAY",!0),rs=uo("HOUR",!0),ts=uo("MINUTE",!0),es=uo("SECOND",!0),ns=uo("CURRENT_TIME",!0),ss=uo("CURRENT_TIMESTAMP",!0),os=uo("CURRENT_USER",!0),us=uo("SESSION_USER",!0),as=uo("SYSTEM_USER",!0),is=uo("GLOBAL",!0),ls=uo("SESSION",!0),cs=uo("PERSIST",!0),fs=uo("PERSIST_ONLY",!0),bs=uo("VIEW",!0),vs=uo("@",!1),ps=uo("@@",!1),Ls=uo("$",!1),Cs=uo("return",!0),ds=uo(":=",!1),ws=uo("DUAL",!0),hs=uo("ADD",!0),ys=uo("COLUMN",!0),Es=uo("INDEX",!0),As=uo("FULLTEXT",!0),ms=uo("SPATIAL",!0),Ts=uo("COMMENT",!0),Is=uo("CONSTRAINT",!0),Ns=uo("REFERENCES",!0),Rs=uo("SQL_CALC_FOUND_ROWS",!0),Ss=uo("SQL_CACHE",!0),_s=uo("SQL_NO_CACHE",!0),gs=uo("SQL_SMALL_RESULT",!0),Os=uo("SQL_BIG_RESULT",!0),xs=uo("SQL_BUFFER_RESULT",!0),Us=uo(",",!1),Ms=uo("[",!1),ks=uo("]",!1),Ds=uo(";",!1),$s=uo("->",!1),Ps=uo("->>",!1),Fs=uo("&&",!1),Gs=uo("/*",!1),js=uo("*/",!1),Hs=uo("--",!1),Ys=uo("#",!1),Bs={type:"any"},Ws=/^[ \t\n\r]/,Xs=ao([" ","\t","\n","\r"],!1,!1),Vs=uo("blob",!0),qs=uo("tinyblob",!0),Ks=uo("mediumblob",!0),Zs=uo("longblob",!0),zs=uo("boolean",!0),Qs=function(r){return{dataType:r}},Js=/^[0-6]/,ro=ao([["0","6"]],!1,!1),to=0,eo=[{line:1,column:1}],no=0,so=[],oo=0;if("startRule"in t){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function uo(r,t){return{type:"literal",text:r,ignoreCase:t}}function ao(r,t,e){return{type:"class",parts:r,inverted:t,ignoreCase:e}}function io(t){var e,n=eo[t];if(n)return n;for(e=t-1;!eo[e];)e--;for(n={line:(n=eo[e]).line,column:n.column};e<t;)10===r.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return eo[t]=n,n}function lo(r,t){var e=io(r),n=io(t);return{start:{offset:r,line:e.line,column:e.column},end:{offset:t,line:n.line,column:n.column}}}function co(r){to<no||(to>no&&(no=to,so=[]),so.push(r))}function fo(){var r,t;return r=to,Si()!==o&&(t=po())!==o?r=t:(to=r,r=o),r}function bo(){var t;return(t=function(){var t,e,n,s,u;return t=to,(e=function(){var t,e,n,s;return t=to,"analyze"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(ne)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="ANALYZE":(to=t,t=o)):(to=t,t=o),t}())!==o&&Si()!==o&&(n=Qo())!==o&&Si()!==o?(s=e,u=n,nl.add(`${s}::${u.db}::${u.table}`),t=e={tableList:Array.from(nl),columnList:tl(sl),ast:{type:s.toLowerCase(),table:u}}):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=to,(e=function(){var t,e,n,s;return t=to,"attach"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(se)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="ATTACH":(to=t,t=o)):(to=t,t=o),t}())!==o&&Si()!==o&&(n=Na())!==o&&Si()!==o&&(s=du())!==o&&Si()!==o&&(u=ma())!==o&&Si()!==o&&(a=Mu())!==o&&Si()!==o?(i=e,l=n,c=s,f=u,b=a,t=e={tableList:Array.from(nl),columnList:tl(sl),ast:{type:i.toLowerCase(),database:l,expr:c,as:f&&f[0].toLowerCase(),schema:b}}):(to=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,l,c;return r=to,(t=ca())!==o&&Si()!==o&&(e=Ta())!==o&&Si()!==o&&(n=qo())!==o?(a=t,l=e,(c=n)&&c.forEach((r=>nl.add(`${a}::${r.db}::${r.table}`))),r=t={tableList:Array.from(nl),columnList:tl(sl),ast:{type:a.toLowerCase(),keyword:l.toLowerCase(),name:c}}):(to=r,r=o),r===o&&(r=to,(t=ca())!==o&&Si()!==o&&(e=Ci())!==o&&Si()!==o&&(n=xu())!==o&&Si()!==o&&Ra()!==o&&Si()!==o&&(s=Qo())!==o&&Si()!==o?((u=function(){var r,t,e,n,s,u;if(r=to,(t=Io())===o&&(t=No()),t!==o){for(e=[],n=to,(s=Si())!==o?((u=Io())===o&&(u=No()),u!==o?n=s=[s,u]:(to=n,n=o)):(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o?((u=Io())===o&&(u=No()),u!==o?n=s=[s,u]:(to=n,n=o)):(to=n,n=o);e!==o?r=t=i(t,e):(to=r,r=o)}else to=r,r=o;return r}())===o&&(u=null),u!==o&&Si()!==o?(t=function(r,t,e,n,s){return{tableList:Array.from(nl),columnList:tl(sl),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),name:e,table:n,options:s}}}(t,e,n,s,u),r=t):(to=r,r=o)):(to=r,r=o)),r}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L,d,w,h,y;return r=to,(t=ba())!==o&&Si()!==o?((e=va())===o&&(e=null),e!==o&&Si()!==o&&Ta()!==o&&Si()!==o?((n=wo())===o&&(n=null),n!==o&&Si()!==o&&(s=Qo())!==o&&Si()!==o?((u=function(){var r,t,e,n,s,u,a,i;if(r=to,Ai()!==o)if(Si()!==o)if((t=yo())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=yo())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=yo())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o&&(n=Si())!==o&&(s=mi())!==o?r=I(t,e):(to=r,r=o)}else to=r,r=o;else to=r,r=o;else to=r,r=o;return r}())===o&&(u=null),u!==o&&Si()!==o?((a=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=xo())!==o){for(e=[],n=to,(s=Si())!==o?((u=yi())===o&&(u=null),u!==o&&(a=Si())!==o&&(i=xo())!==o?n=s=[s,u,a,i]:(to=n,n=o)):(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o?((u=yi())===o&&(u=null),u!==o&&(a=Si())!==o&&(i=xo())!==o?n=s=[s,u,a,i]:(to=n,n=o)):(to=n,n=o);e!==o?r=t=C(t,e):(to=r,r=o)}else to=r,r=o;return r}())===o&&(a=null),a!==o&&Si()!==o?((i=ha())===o&&(i=da()),i===o&&(i=null),i!==o&&Si()!==o?((l=ma())===o&&(l=null),l!==o&&Si()!==o?((c=Co())===o&&(c=null),c!==o?(f=t,b=e,v=n,L=u,d=a,w=i,h=l,y=c,(p=s)&&nl.add(`create::${p.db}::${p.table}`),r=t={tableList:Array.from(nl),columnList:tl(sl),ast:{type:f[0].toLowerCase(),keyword:"table",temporary:b&&b[0].toLowerCase(),if_not_exists:v,table:[p],ignore_replace:w&&w[0].toLowerCase(),as:h&&h[0].toLowerCase(),query_expr:y&&y.ast,create_definitions:L,table_options:d}}):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o),r===o&&(r=to,(t=ba())!==o&&Si()!==o?((e=va())===o&&(e=null),e!==o&&Si()!==o&&Ta()!==o&&Si()!==o?((n=wo())===o&&(n=null),n!==o&&Si()!==o&&(s=Qo())!==o&&Si()!==o&&(u=function r(){var t,e,n;return(t=function(){var r,t,e;return r=to,(t=Fa())!==o&&Si()!==o&&(e=qo())!==o?(t=function(r){return{type:"like",table:r}}(e),r=t):(to=r,r=o),r}())===o&&(t=to,Ai()!==o&&Si()!==o&&(e=r())!==o&&Si()!==o&&mi()!==o?((n=e).parentheses=!0,t=n):(to=t,t=o)),t}())!==o?(t=function(r,t,e,n,s){return n&&nl.add(`create::${n.db}::${n.table}`),{tableList:Array.from(nl),columnList:tl(sl),ast:{type:r[0].toLowerCase(),keyword:"table",temporary:t&&t[0].toLowerCase(),if_not_exists:e,table:[n],like:s}}}(t,e,n,s,u),r=t):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)),r}())===o&&(t=function(){var t,e,n,s,u,a,l,c,f,b;return t=to,(e=ba())!==o&&Si()!==o?((n=Na())===o&&(n=function(){var t,e,n,s;return t=to,"scheme"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Ue)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="SCHEME":(to=t,t=o)):(to=t,t=o),t}()),n!==o&&Si()!==o?((s=wo())===o&&(s=null),s!==o&&Si()!==o&&(u=Fu())!==o&&Si()!==o?((a=function(){var r,t,e,n,s,u;if(r=to,(t=Oo())!==o){for(e=[],n=to,(s=Si())!==o&&(u=Oo())!==o?n=s=[s,u]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Oo())!==o?n=s=[s,u]:(to=n,n=o);e!==o?r=t=i(t,e):(to=r,r=o)}else to=r,r=o;return r}())===o&&(a=null),a!==o?(l=e,c=s,f=u,b=a,t=e={tableList:Array.from(nl),columnList:tl(sl),ast:{type:l[0].toLowerCase(),keyword:"database",if_not_exists:c,database:f,create_definitions:b}}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,L,m,T,I,N,R,S,_,g,O,x,U,M,k;return t=to,ba()!==o&&Si()!==o?((e=va())===o&&(e=pa()),e===o&&(e=null),e!==o&&Si()!==o?("trigger"===r.substr(to,7).toLowerCase()?(n=r.substr(to,7),to+=7):(n=o,0===oo&&co(c)),n!==o&&Si()!==o?((s=wo())===o&&(s=null),s!==o&&Si()!==o&&(u=Qo())!==o&&Si()!==o?("before"===r.substr(to,6).toLowerCase()?(a=r.substr(to,6),to+=6):(a=o,0===oo&&co(f)),a===o&&("after"===r.substr(to,5).toLowerCase()?(a=r.substr(to,5),to+=5):(a=o,0===oo&&co(b)),a===o&&("instead of"===r.substr(to,10).toLowerCase()?(a=r.substr(to,10),to+=10):(a=o,0===oo&&co(v)))),a===o&&(a=null),a!==o&&Si()!==o&&(i=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=ho())!==o){for(e=[],n=to,(s=Si())!==o&&(u=Ya())!==o&&(a=Si())!==o&&(i=ho())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Ya())!==o&&(a=Si())!==o&&(i=ho())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=C(t,e):(to=r,r=o)}else to=r,r=o;return r}())!==o&&Si()!==o?("on"===r.substr(to,2).toLowerCase()?(l=r.substr(to,2),to+=2):(l=o,0===oo&&co(p)),l!==o&&Si()!==o&&(L=Qo())!==o&&Si()!==o?((m=function(){var t,e,n,s,u,a,i;return t=to,"for"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(h)),e!==o&&Si()!==o?("each"===r.substr(to,4).toLowerCase()?(n=r.substr(to,4),to+=4):(n=o,0===oo&&co(y)),n===o&&(n=null),n!==o&&Si()!==o?("row"===r.substr(to,3).toLowerCase()?(s=r.substr(to,3),to+=3):(s=o,0===oo&&co(E)),s===o&&("statement"===r.substr(to,9).toLowerCase()?(s=r.substr(to,9),to+=9):(s=o,0===oo&&co(A))),s!==o?(u=e,i=s,t=e={keyword:(a=n)?`${u.toLowerCase()} ${a.toLowerCase()}`:u.toLowerCase(),args:i.toLowerCase()}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}())===o&&(m=null),m!==o&&Si()!==o?((T=function(){var r,t;return r=to,Wa()!==o&&Si()!==o&&(t=du())!==o?r={type:"when",cond:t}:(to=r,r=o),r}())===o&&(T=null),T!==o&&Si()!==o&&(I=function(){var t,e,n,s;return t=to,"begin"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(d)),e!==o&&Si()!==o&&(n=po())!==o&&Si()!==o?("end"===r.substr(to,3).toLowerCase()?(s=r.substr(to,3),to+=3):(s=o,0===oo&&co(w)),s!==o?t=e={type:"multiple",prefix:e,expr:n,suffix:s}:(to=t,t=o)):(to=t,t=o),t}())!==o?(R=n,S=s,_=u,g=a,O=i,x=L,U=m,M=T,k=I,t={type:"create",temporary:(N=e)&&N[0].toLowerCase(),time:g&&g.toLowerCase(),events:O,trigger:_,table:x,for_each:U,if_not_exists:S,when:M,execute:k,keyword:R&&R.toLowerCase()}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w;return t=to,(e=ba())!==o&&Si()!==o?((n=pa())===o&&(n=va()),n===o&&(n=null),n!==o&&Si()!==o&&function(){var t,e,n,s;return t=to,"view"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(bs)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="VIEW":(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o?((s=wo())===o&&(s=null),s!==o&&Si()!==o&&(u=Qo())!==o&&Si()!==o?(a=to,(i=Ai())!==o&&(l=Si())!==o&&(c=Uu())!==o&&(f=Si())!==o&&(b=mi())!==o?a=i=[i,l,c,f,b]:(to=a,a=o),a===o&&(a=null),a!==o&&(i=Si())!==o&&(l=ma())!==o&&(c=Si())!==o&&(f=Po())!==o?(v=e,p=n,L=s,d=a,w=f,(C=u).view=C.table,delete C.table,t=e={tableList:Array.from(nl),columnList:tl(sl),ast:{type:v[0].toLowerCase(),keyword:"view",if_not_exists:L,temporary:p&&p[0].toLowerCase(),columns:d&&d[2],select:w,view:C}}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=to,(e=function(){var t,e,n,s;return t=to,"truncate"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(Vn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="TRUNCATE":(to=t,t=o)):(to=t,t=o),t}())!==o&&Si()!==o?((n=Ta())===o&&(n=null),n!==o&&Si()!==o&&(s=qo())!==o?(u=e,a=n,(i=s)&&i.forEach((r=>nl.add(`${u}::${r.db}::${r.table}`))),t=e={tableList:Array.from(nl),columnList:tl(sl),ast:{type:u.toLowerCase(),keyword:a&&a.toLowerCase()||"table",name:i}}):(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=to,wa()!==o&&Si()!==o&&Ta()!==o&&Si()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=Bo())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=Bo())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=Bo())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=I(t,e):(to=r,r=o)}else to=r,r=o;return r}())!==o?((e=t).forEach((r=>r.forEach((r=>r.table&&nl.add(`rename::${r.db}::${r.table}`))))),r={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"rename",table:e}}):(to=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=to,function(){var t,e,n,s;return t=to,"call"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Ln)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="CALL":(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&(e=Hi())!==o?(n=e,t={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"call",expr:n}}):(to=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=to,function(){var t,e,n,s;return t=to,"use"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(be)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&(e=Mu())!==o?(n=e,nl.add(`use::${n}::null`),t={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"use",db:n}}):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=to,function(){var t,e,n,s;return t=to,"alter"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(ve)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&Ta()!==o&&Si()!==o&&(e=qo())!==o&&Si()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=To())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=To())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=To())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=I(t,e):(to=r,r=o)}else to=r,r=o;return r}())!==o?(u=n,(s=e)&&s.length>0&&s.forEach((r=>nl.add(`alter::${r.db}::${r.table}`))),t={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"alter",table:s,expr:u}}):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=to,Aa()!==o&&Si()!==o?((e=function(){var t,e,n,s;return t=to,"global"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(is)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="GLOBAL":(to=t,t=o)):(to=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=to,"session"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(ls)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="SESSION":(to=t,t=o)):(to=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=to,"local"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(m)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="LOCAL":(to=t,t=o)):(to=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=to,"persist"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(cs)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="PERSIST":(to=t,t=o)):(to=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=to,"persist_only"===r.substr(to,12).toLowerCase()?(e=r.substr(to,12),to+=12):(e=o,0===oo&&co(fs)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="PERSIST_ONLY":(to=t,t=o)):(to=t,t=o),t}()),e===o&&(e=null),e!==o&&Si()!==o&&(n=Di())!==o?(s=e,(u=n).keyword=s,t={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"set",expr:u}}):(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=to,function(){var t,e,n,s;return t=to,"lock"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(H)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&Ia()!==o&&Si()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=Uo())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=Uo())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=Uo())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=Er(t,e):(to=r,r=o)}else to=r,r=o;return r}())!==o?(n=e,t={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"lock",keyword:"tables",tables:n}}):(to=t,t=o),t}())===o&&(t=function(){var t;return t=to,function(){var t,e,n,s;return t=to,"unlock"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Se)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&Ia()!==o?t={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"unlock",keyword:"tables"}}:(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p;return t=to,(e=la())!==o&&Si()!==o?("binary"===r.substr(to,6).toLowerCase()?(n=r.substr(to,6),to+=6):(n=o,0===oo&&co(Ar)),n===o&&("master"===r.substr(to,6).toLowerCase()?(n=r.substr(to,6),to+=6):(n=o,0===oo&&co(mr))),n!==o&&(s=Si())!==o?("logs"===r.substr(to,4).toLowerCase()?(u=r.substr(to,4),to+=4):(u=o,0===oo&&co(Tr)),u!==o?(f=n,t=e={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"show",suffix:"logs",keyword:f.toLowerCase()}}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,(e=la())!==o&&Si()!==o?("binlog"===r.substr(to,6).toLowerCase()?(n=r.substr(to,6),to+=6):(n=o,0===oo&&co(Ir)),n!==o&&(s=Si())!==o?("events"===r.substr(to,6).toLowerCase()?(u=r.substr(to,6),to+=6):(u=o,0===oo&&co(Nr)),u!==o&&(a=Si())!==o?((i=Nu())===o&&(i=null),i!==o&&Si()!==o?((l=Yo())===o&&(l=null),l!==o&&Si()!==o?((c=ou())===o&&(c=null),c!==o?(b=i,v=l,p=c,t=e={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"show",suffix:"events",keyword:"binlog",in:b,from:v,limit:p}}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,(e=la())!==o&&Si()!==o?(n=to,"character"===r.substr(to,9).toLowerCase()?(s=r.substr(to,9),to+=9):(s=o,0===oo&&co(nr)),s!==o&&(u=Si())!==o?("set"===r.substr(to,3).toLowerCase()?(a=r.substr(to,3),to+=3):(a=o,0===oo&&co(sr)),a!==o?n=s=[s,u,a]:(to=n,n=o)):(to=n,n=o),n===o&&("collation"===r.substr(to,9).toLowerCase()?(n=r.substr(to,9),to+=9):(n=o,0===oo&&co(Rr))),n!==o&&(s=Si())!==o?((u=Iu())===o&&(u=ru()),u===o&&(u=null),u!==o?(e=function(r,t){let e=Array.isArray(r)&&r||[r];return{tableList:Array.from(nl),columnList:tl(sl),ast:{type:"show",suffix:e[2]&&e[2].toLowerCase(),keyword:e[0].toLowerCase(),expr:t}}}(n,u),t=e):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t===o&&(t=function(){var t,e,n,s;return t=to,la()!==o&&Si()!==o?("grants"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Sr)),e!==o&&Si()!==o?((n=function(){var t,e,n,s,u,a,i,l,c;return t=to,"for"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(h)),e!==o&&Si()!==o&&(n=Mu())!==o&&Si()!==o?(s=to,(u=bi())!==o&&(a=Si())!==o&&(i=Mu())!==o?s=u=[u,a,i]:(to=s,s=o),s===o&&(s=null),s!==o&&(u=Si())!==o?((a=function(){var r,t;return r=to,ga()!==o&&Si()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=Mu())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=Mu())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=Mu())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=Er(t,e):(to=r,r=o)}else to=r,r=o;return r}())!==o?r=t:(to=r,r=o),r}())===o&&(a=null),a!==o?(c=a,t=e={user:n,host:(l=s)&&l[2],role_list:c}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}())===o&&(n=null),n!==o?(s=n,t={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"show",keyword:"grants",for:s}}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}()))),t}())===o&&(t=function(){var t,e,n,s;return t=to,(e=Ua())===o&&(e=function(){var t,e,n,s;return t=to,"describe"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(ze)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="DESCRIBE":(to=t,t=o)):(to=t,t=o),t}()),e!==o&&Si()!==o&&(n=Mu())!==o?(s=n,t=e={tableList:Array.from(nl),columnList:tl(sl),ast:{type:"desc",table:s}}):(to=t,t=o),t}()),t}function vo(){var r;return(r=Co())===o&&(r=function(){var r,t,e,n,s,u,a;return r=to,(t=fa())!==o&&Si()!==o&&(e=qo())!==o&&Si()!==o&&Aa()!==o&&Si()!==o&&(n=uu())!==o&&Si()!==o?((s=ru())===o&&(s=null),s!==o&&Si()!==o?((u=eu())===o&&(u=null),u!==o&&Si()!==o?((a=ou())===o&&(a=null),a!==o?(t=function(r,t,e,n,s){const o={};return r&&r.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,u=s?"select":"update";t&&(o[n]=t),n&&nl.add(`${u}::${t}::${n}`)})),t&&t.forEach((r=>{if(r.table){const t=rl(r.table);nl.add(`update::${o[t]||null}::${t}`)}sl.add(`update::${r.table}::${r.column}`)})),{tableList:Array.from(nl),columnList:tl(sl),ast:{type:"update",table:r,set:t,where:e,orderby:n,limit:s}}}(e,n,s,u,a),r=t):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=to,(t=fu())!==o&&Si()!==o?((e=Ea())===o&&(e=null),e!==o&&Si()!==o&&(n=Qo())!==o&&Si()!==o?((s=lu())===o&&(s=null),s!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&(u=Uu())!==o&&Si()!==o&&mi()!==o&&Si()!==o&&(a=iu())!==o&&Si()!==o?((i=cu())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o){if(t&&(nl.add(`insert::${t.db}::${t.table}`),t.as=null),n){let r=t&&t.table||null;Array.isArray(s)&&s.forEach(((r,t)=>{if(r.value.length!=n.length)throw new Error("Error: column count doesn't match value count at row "+(t+1))})),n.forEach((t=>sl.add(`insert::${r}::${t}`)))}return{tableList:Array.from(nl),columnList:tl(sl),ast:{type:r,table:[t],columns:n,values:s,partition:e,on_duplicate_update:o}}}(t,n,s,u,a,i),r=t):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=to,(t=fu())!==o&&Si()!==o?((e=ha())===o&&(e=null),e!==o&&Si()!==o?((n=Ea())===o&&(n=null),n!==o&&Si()!==o&&(s=Qo())!==o&&Si()!==o?((u=lu())===o&&(u=null),u!==o&&Si()!==o&&(a=iu())!==o&&Si()!==o?((i=cu())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o,u){n&&(nl.add(`insert::${n.db}::${n.table}`),sl.add(`insert::${n.table}::(.*)`),n.as=null);const a=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(nl),columnList:tl(sl),ast:{type:r,table:[n],columns:null,values:o,partition:s,prefix:a,on_duplicate_update:u}}}(t,e,n,s,u,a,i),r=t):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i,l,c,f;return r=to,(t=fu())!==o&&Si()!==o&&Ea()!==o&&Si()!==o&&(e=Qo())!==o&&Si()!==o?((n=lu())===o&&(n=null),n!==o&&Si()!==o&&Aa()!==o&&Si()!==o&&(s=uu())!==o&&Si()!==o?((u=cu())===o&&(u=null),u!==o?(a=t,l=n,c=s,f=u,(i=e)&&(nl.add(`insert::${i.db}::${i.table}`),sl.add(`insert::${i.table}::(.*)`),i.as=null),r=t={tableList:Array.from(nl),columnList:tl(sl),ast:{type:a,table:[i],columns:null,partition:l,set:c,on_duplicate_update:f}}):(to=r,r=o)):(to=r,r=o)):(to=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a;return r=to,(t=La())!==o&&Si()!==o?((e=qo())===o&&(e=null),e!==o&&Si()!==o&&(n=Yo())!==o&&Si()!==o?((s=ru())===o&&(s=null),s!==o&&Si()!==o?((u=eu())===o&&(u=null),u!==o&&Si()!==o?((a=ou())===o&&(a=null),a!==o?(t=function(r,t,e,n,s){if(t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"delete";n&&nl.add(`${o}::${t}::${n}`),s||sl.add(`delete::${n}::(.*)`)})),null===r&&1===t.length){const e=t[0];r=[{db:e.db,table:e.table,as:e.as,addition:!0}]}return{tableList:Array.from(nl),columnList:tl(sl),ast:{type:"delete",table:r,from:t,where:e,orderby:n,limit:s}}}(e,n,s,u,a),r=t):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o),r}())===o&&(r=bo())===o&&(r=function(){var r,t;for(r=[],t=ki();t!==o;)r.push(t),t=ki();return r}()),r}function po(){var r,t,e,n,s,u,a,i;if(r=to,(t=vo())!==o){for(e=[],n=to,(s=Si())!==o&&(u=Ti())!==o&&(a=Si())!==o&&(i=vo())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Ti())!==o&&(a=Si())!==o&&(i=vo())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=function(r,t){const e=r&&r.ast||r,n=t&&t.length&&t[0].length>=4?[e]:e;t||(t=[]);for(let r=0;r<t.length;r++)t[r][3]&&0!==t[r][3].length&&n.push(t[r][3]&&t[r][3].ast||t[r][3]);return{tableList:Array.from(nl),columnList:tl(sl),ast:n}}(t,e):(to=r,r=o)}else to=r,r=o;return r}function Lo(){var t,e,n;return t=to,function(){var t,e,n,s;return t=to,"union"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(Fe)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o?((e=Ma())===o&&(e=ka()),e===o&&(e=null),e!==o?t=(n=e)?"union "+n.toLowerCase():"union":(to=t,t=o)):(to=t,t=o),t}function Co(){var r,t,e,n,s,u,a,i;if(r=to,(t=Mo())!==o){for(e=[],n=to,(s=Si())!==o&&(u=Lo())!==o&&(a=Si())!==o&&(i=Mo())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Lo())!==o&&(a=Si())!==o&&(i=Mo())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o&&(n=Si())!==o?((s=eu())===o&&(s=null),s!==o&&(u=Si())!==o?((a=ou())===o&&(a=null),a!==o?r=t=function(r,t,e,n){let s=r;for(let r=0;r<t.length;r++)s._next=t[r][3],s.set_op=t[r][1],s=s._next;return e&&(r._orderby=e),n&&(r._limit=n),{tableList:Array.from(nl),columnList:tl(sl),ast:r}}(t,e,s,a):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)}else to=r,r=o;return r}function wo(){var t,e;return t=to,"if"===r.substr(to,2).toLowerCase()?(e=r.substr(to,2),to+=2):(e=o,0===oo&&co(l)),e!==o&&Si()!==o&&ja()!==o&&Si()!==o&&Ga()!==o?t=e="IF NOT EXISTS":(to=t,t=o),t}function ho(){var t,e,n,s,u,a;return t=to,(e=Ca())===o&&(e=La()),e!==o&&(e={keyword:e[0].toLowerCase()}),(t=e)===o&&(t=to,(e=fa())!==o&&Si()!==o?(n=to,"of"===r.substr(to,2).toLowerCase()?(s=r.substr(to,2),to+=2):(s=o,0===oo&&co(L)),s!==o&&(u=Si())!==o&&(a=tu())!==o?n=s=[s,u,a]:(to=n,n=o),n===o&&(n=null),n!==o?t=e=function(r,t){return{keyword:r[0].toLowerCase(),args:t&&{keyword:t[0],columns:t[2]}||null}}(e,n):(to=t,t=o)):(to=t,t=o)),t}function yo(){var t;return(t=function(){var t;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p;return t=to,(e=Ro())===o&&(e=null),e!==o&&Si()!==o?(n=to,"primary"===r.substr(to,7).toLowerCase()?(s=r.substr(to,7),to+=7):(s=o,0===oo&&co(g)),s!==o&&(u=Si())!==o?("key"===r.substr(to,3).toLowerCase()?(a=r.substr(to,3),to+=3):(a=o,0===oo&&co(_)),a!==o?n=s=[s,u,a]:(to=n,n=o)):(to=n,n=o),n!==o&&(s=Si())!==o?((u=Wo())===o&&(u=null),u!==o&&(a=Si())!==o&&(i=$o())!==o&&Si()!==o?((l=Xo())===o&&(l=null),l!==o?(f=n,b=u,v=i,p=l,t=e={constraint:(c=e)&&c.constraint,definition:v,constraint_type:`${f[0].toLowerCase()} ${f[2].toLowerCase()}`,keyword:c&&c.keyword,index_type:b,resource:"constraint",index_options:p}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C;return t=to,(e=Ro())===o&&(e=null),e!==o&&Si()!==o&&(n=function(){var t,e,n,s;return t=to,"unique"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(S)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="UNIQUE":(to=t,t=o)):(to=t,t=o),t}())!==o&&Si()!==o?((s=Ci())===o&&(s=di()),s===o&&(s=null),s!==o&&Si()!==o?((u=$u())===o&&(u=null),u!==o&&Si()!==o?((a=Wo())===o&&(a=null),a!==o&&Si()!==o&&(i=$o())!==o&&Si()!==o?((l=Xo())===o&&(l=null),l!==o?(f=n,b=s,v=u,p=a,L=i,C=l,t=e={constraint:(c=e)&&c.constraint,definition:L,constraint_type:b&&`${f.toLowerCase()} ${b.toLowerCase()}`||f.toLowerCase(),keyword:c&&c.keyword,index_type:p,index:v,resource:"constraint",index_options:C}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=to,(e=Ro())===o&&(e=null),e!==o&&Si()!==o?("foreign key"===r.substr(to,11).toLowerCase()?(n=r.substr(to,11),to+=11):(n=o,0===oo&&co(q)),n!==o&&Si()!==o?((s=$u())===o&&(s=null),s!==o&&Si()!==o&&(u=$o())!==o&&Si()!==o?((a=So())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l,keyword:i&&i.keyword,index:c,resource:"constraint",reference_definition:b}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p;return t=to,(e=Ro())===o&&(e=null),e!==o&&Si()!==o?("check"===r.substr(to,5).toLowerCase()?(n=r.substr(to,5),to+=5):(n=o,0===oo&&co(T)),n!==o&&Si()!==o?(s=to,"not"===r.substr(to,3).toLowerCase()?(u=r.substr(to,3),to+=3):(u=o,0===oo&&co(X)),u!==o&&(a=Si())!==o?("for"===r.substr(to,3).toLowerCase()?(i=r.substr(to,3),to+=3):(i=o,0===oo&&co(h)),i!==o&&(l=Si())!==o?("replication"===r.substr(to,11).toLowerCase()?(c=r.substr(to,11),to+=11):(c=o,0===oo&&co(V)),c!==o&&(f=Si())!==o?s=u=[u,a,i,l,c,f]:(to=s,s=o)):(to=s,s=o)):(to=s,s=o),s===o&&(s=null),s!==o&&(u=Ai())!==o&&(a=Si())!==o&&(i=du())!==o&&(l=Si())!==o&&(c=mi())!==o?(b=e,v=s,p=i,t=e={constraint_type:n.toLowerCase(),keyword:b&&b.keyword,constraint:b&&b.constraint,index_type:v&&{keyword:"not for replication"},definition:[p],resource:"constraint"}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}()),t}())===o&&(t=Ao())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=to,(t=Ci())===o&&(t=di()),t!==o&&Si()!==o?((e=$u())===o&&(e=null),e!==o&&Si()!==o?((n=Wo())===o&&(n=null),n!==o&&Si()!==o&&(s=$o())!==o&&Si()!==o?((u=Xo())===o&&(u=null),u!==o&&Si()!==o?(a=n,i=u,r=t={index:e,definition:s,keyword:t.toLowerCase(),index_type:a,resource:"index",index_options:i}):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)):(to=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c;return t=to,(e=function(){var t,e,n,s;return t=to,"fulltext"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(As)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="FULLTEXT":(to=t,t=o)):(to=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=to,"spatial"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(ms)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="SPATIAL":(to=t,t=o)):(to=t,t=o),t}()),e!==o&&Si()!==o?((n=Ci())===o&&(n=di()),n===o&&(n=null),n!==o&&Si()!==o?((s=$u())===o&&(s=null),s!==o&&Si()!==o&&(u=$o())!==o&&Si()!==o?((a=Xo())===o&&(a=null),a!==o&&Si()!==o?(i=e,c=a,t=e={index:s,definition:u,keyword:(l=n)&&`${i.toLowerCase()} ${l.toLowerCase()}`||i.toLowerCase(),index_options:c,resource:"index"}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}()),t}function Eo(){var t,e,n,s,u;return t=to,(e=function(){var t;return(t=function(){var t,e,n,s;return t=to,"not null"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(ue)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}())!==o&&(t={type:"not null",value:"not null"}),t}())===o&&(e=Ku()),e!==o&&((u=e)&&!u.value&&(u.value="null"),e={nullable:u}),(t=e)===o&&(t=to,(e=function(){var r,t;return r=to,aa()!==o&&Si()!==o?((t=qu())===o&&(t=du()),t!==o?r={type:"default",value:t}:(to=r,r=o)):(to=r,r=o),r}())!==o&&(e={default_val:e}),(t=e)===o&&(t=to,"auto_increment"===r.substr(to,14).toLowerCase()?(e=r.substr(to,14),to+=14):(e=o,0===oo&&co(N)),e===o&&("autoincrement"===r.substr(to,13).toLowerCase()?(e=r.substr(to,13),to+=13):(e=o,0===oo&&co(R))),e!==o&&(e={auto_increment:e.toLowerCase()}),(t=e)===o&&(t=to,"unique"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(S)),e!==o&&Si()!==o?("key"===r.substr(to,3).toLowerCase()?(n=r.substr(to,3),to+=3):(n=o,0===oo&&co(_)),n===o&&(n=null),n!==o?t=e=function(r){const t=["unique"];return r&&t.push(r),{unique:t.join(" ").toLowerCase("")}}(n):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,"primary"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(g)),e===o&&(e=null),e!==o&&Si()!==o?("key"===r.substr(to,3).toLowerCase()?(n=r.substr(to,3),to+=3):(n=o,0===oo&&co(_)),n!==o?t=e=function(r){const t=[];return r&&t.push("primary"),t.push("key"),{primary_key:t.join(" ").toLowerCase("")}}(e):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,(e=Oi())!==o&&(e={comment:e}),(t=e)===o&&(t=to,(e=mo())!==o&&(e={collate:e}),(t=e)===o&&(t=to,(e=function(){var t,e,n;return t=to,"column_format"===r.substr(to,13).toLowerCase()?(e=r.substr(to,13),to+=13):(e=o,0===oo&&co(O)),e!==o&&Si()!==o?("fixed"===r.substr(to,5).toLowerCase()?(n=r.substr(to,5),to+=5):(n=o,0===oo&&co(x)),n===o&&("dynamic"===r.substr(to,7).toLowerCase()?(n=r.substr(to,7),to+=7):(n=o,0===oo&&co(U)),n===o&&("default"===r.substr(to,7).toLowerCase()?(n=r.substr(to,7),to+=7):(n=o,0===oo&&co(M)))),n!==o?t=e={type:"column_format",value:n.toLowerCase()}:(to=t,t=o)):(to=t,t=o),t}())!==o&&(e={column_format:e}),(t=e)===o&&(t=to,(e=function(){var t,e,n;return t=to,"storage"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(k)),e!==o&&Si()!==o?("disk"===r.substr(to,4).toLowerCase()?(n=r.substr(to,4),to+=4):(n=o,0===oo&&co(D)),n===o&&("memory"===r.substr(to,6).toLowerCase()?(n=r.substr(to,6),to+=6):(n=o,0===oo&&co($))),n!==o?t=e={type:"storage",value:n.toLowerCase()}:(to=t,t=o)):(to=t,t=o),t}())!==o&&(e={storage:e}),(t=e)===o&&(t=to,(e=So())!==o&&(e={reference_definition:e}),(t=e)===o&&(t=to,(e=go())!==o&&Si()!==o?((n=pi())===o&&(n=null),n!==o&&Si()!==o&&(s=Fu())!==o?t=e=function(r,t,e){return{character_set:{type:r,value:e,symbol:t}}}(e,n,s):(to=t,t=o)):(to=t,t=o))))))))))),t}function Ao(){var r,t,e,n,s,u,a;return r=to,(t=xu())!==o&&Si()!==o?((e=Xi())===o&&(e=null),e!==o&&Si()!==o?((n=function(){var r,t,e,n,s,u;if(r=to,(t=Eo())!==o)if(Si()!==o){for(e=[],n=to,(s=Si())!==o&&(u=Eo())!==o?n=s=[s,u]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Eo())!==o?n=s=[s,u]:(to=n,n=o);e!==o?r=t=function(r,t){let e=r;for(let r=0;r<t.length;r++)e={...e,...t[r][1]};return e}(t,e):(to=r,r=o)}else to=r,r=o;else to=r,r=o;return r}())===o&&(n=null),n!==o?(s=t,u=e,a=n,sl.add(`create::${s.table}::${s.column}`),r=t={column:s,definition:u,resource:"column",...a||{}}):(to=r,r=o)):(to=r,r=o)):(to=r,r=o),r}function mo(){var t,e,n;return t=to,function(){var t,e,n,s;return t=to,"collate"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(ur)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="COLLATE":(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o?((e=pi())===o&&(e=null),e!==o&&Si()!==o&&(n=Fu())!==o?t={type:"collate",symbol:e,value:n}:(to=t,t=o)):(to=t,t=o),t}function To(){var t;return(t=function(){var t,e,n,s,u;return t=to,function(){var t,e,n,s;return t=to,"add"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(hs)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="ADD":(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o?((e=Li())===o&&(e=null),e!==o&&Si()!==o&&(n=Ao())!==o?(s=e,u=n,t={action:"add",...u,keyword:s,resource:"column",type:"alter"}):(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=to,ca()!==o&&Si()!==o?((t=Li())===o&&(t=null),t!==o&&Si()!==o&&(e=xu())!==o?r={action:"drop",column:e,keyword:t,resource:"column",type:"alter"}:(to=r,r=o)):(to=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=to,wa()!==o&&Si()!==o?((t=ia())===o&&(t=ma()),t===o&&(t=null),t!==o&&Si()!==o&&(e=Mu())!==o?(s=e,r={action:"rename",type:"alter",resource:"table",keyword:(n=t)&&n[0].toLowerCase(),table:s}):(to=r,r=o)):(to=r,r=o),r}()),t}function Io(){var t,e,n,s;return t=to,"algorithm"===r.substr(to,9).toLowerCase()?(e=r.substr(to,9),to+=9):(e=o,0===oo&&co(P)),e!==o&&Si()!==o?((n=pi())===o&&(n=null),n!==o&&Si()!==o?("default"===r.substr(to,7).toLowerCase()?(s=r.substr(to,7),to+=7):(s=o,0===oo&&co(M)),s===o&&("instant"===r.substr(to,7).toLowerCase()?(s=r.substr(to,7),to+=7):(s=o,0===oo&&co(F)),s===o&&("inplace"===r.substr(to,7).toLowerCase()?(s=r.substr(to,7),to+=7):(s=o,0===oo&&co(G)),s===o&&("copy"===r.substr(to,4).toLowerCase()?(s=r.substr(to,4),to+=4):(s=o,0===oo&&co(j))))),s!==o?t=e={type:"alter",keyword:"algorithm",resource:"algorithm",symbol:n,algorithm:s}:(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}function No(){var t,e,n,s;return t=to,"lock"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(H)),e!==o&&Si()!==o?((n=pi())===o&&(n=null),n!==o&&Si()!==o?("default"===r.substr(to,7).toLowerCase()?(s=r.substr(to,7),to+=7):(s=o,0===oo&&co(M)),s===o&&("none"===r.substr(to,4).toLowerCase()?(s=r.substr(to,4),to+=4):(s=o,0===oo&&co(Y)),s===o&&("shared"===r.substr(to,6).toLowerCase()?(s=r.substr(to,6),to+=6):(s=o,0===oo&&co(B)),s===o&&("exclusive"===r.substr(to,9).toLowerCase()?(s=r.substr(to,9),to+=9):(s=o,0===oo&&co(W))))),s!==o?t=e={type:"alter",keyword:"lock",resource:"lock",symbol:n,lock:s}:(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}function Ro(){var t,e,n,s;return t=to,(e=function(){var t,e,n,s;return t=to,"constraint"===r.substr(to,10).toLowerCase()?(e=r.substr(to,10),to+=10):(e=o,0===oo&&co(Is)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="CONSTRAINT":(to=t,t=o)):(to=t,t=o),t}())!==o&&Si()!==o?((n=Mu())===o&&(n=null),n!==o?(s=n,t=e={keyword:e.toLowerCase(),constraint:s}):(to=t,t=o)):(to=t,t=o),t}function So(){var t,e,n,s,u,a,i,l,c,f;return t=to,(e=function(){var t,e,n,s;return t=to,"references"===r.substr(to,10).toLowerCase()?(e=r.substr(to,10),to+=10):(e=o,0===oo&&co(Ns)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="REFERENCES":(to=t,t=o)):(to=t,t=o),t}())!==o&&Si()!==o&&(n=qo())!==o&&Si()!==o&&(s=$o())!==o&&Si()!==o?("match full"===r.substr(to,10).toLowerCase()?(u=r.substr(to,10),to+=10):(u=o,0===oo&&co(K)),u===o&&("match partial"===r.substr(to,13).toLowerCase()?(u=r.substr(to,13),to+=13):(u=o,0===oo&&co(Z)),u===o&&("match simple"===r.substr(to,12).toLowerCase()?(u=r.substr(to,12),to+=12):(u=o,0===oo&&co(z)))),u===o&&(u=null),u!==o&&Si()!==o?((a=_o())===o&&(a=null),a!==o&&Si()!==o?((i=_o())===o&&(i=null),i!==o?(l=u,c=a,f=i,t=e={definition:s,table:n,keyword:e.toLowerCase(),match:l&&l.toLowerCase(),on_action:[c,f].filter((r=>r))}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,(e=_o())!==o&&(e={on_action:[e]}),t=e),t}function _o(){var t,e,n,s;return t=to,Ra()!==o&&Si()!==o?((e=La())===o&&(e=fa()),e!==o&&Si()!==o&&(n=function(){var t,e,n;return t=to,(e=fi())!==o&&Si()!==o&&Ai()!==o&&Si()!==o?((n=vu())===o&&(n=null),n!==o&&Si()!==o&&mi()!==o?t=e={type:"function",name:e,args:n}:(to=t,t=o)):(to=t,t=o),t===o&&(t=to,"restrict"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(Q)),e===o&&("cascade"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(J)),e===o&&("set null"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(rr)),e===o&&("no action"===r.substr(to,9).toLowerCase()?(e=r.substr(to,9),to+=9):(e=o,0===oo&&co(tr)),e===o&&("set default"===r.substr(to,11).toLowerCase()?(e=r.substr(to,11),to+=11):(e=o,0===oo&&co(er)),e===o&&(e=fi()))))),e!==o&&(e={type:"origin",value:e.toLowerCase()}),t=e),t}())!==o?(s=n,t={type:"on "+e[0].toLowerCase(),value:s}):(to=t,t=o)):(to=t,t=o),t}function go(){var t,e,n;return t=to,"character"===r.substr(to,9).toLowerCase()?(e=r.substr(to,9),to+=9):(e=o,0===oo&&co(nr)),e!==o&&Si()!==o?("set"===r.substr(to,3).toLowerCase()?(n=r.substr(to,3),to+=3):(n=o,0===oo&&co(sr)),n!==o?t=e="CHARACTER SET":(to=t,t=o)):(to=t,t=o),t}function Oo(){var t,e,n,s,u,a,i,l,c;return t=to,(e=aa())===o&&(e=null),e!==o&&Si()!==o?((n=go())===o&&("charset"===r.substr(to,7).toLowerCase()?(n=r.substr(to,7),to+=7):(n=o,0===oo&&co(or)),n===o&&("collate"===r.substr(to,7).toLowerCase()?(n=r.substr(to,7),to+=7):(n=o,0===oo&&co(ur)))),n!==o&&Si()!==o?((s=pi())===o&&(s=null),s!==o&&Si()!==o&&(u=Fu())!==o?(i=n,l=s,c=u,t=e={keyword:(a=e)&&`${a[0].toLowerCase()} ${i.toLowerCase()}`||i.toLowerCase(),symbol:l,value:c}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}function xo(){var t,e,n,s,u,a,i,l,c;return t=to,"auto_increment"===r.substr(to,14).toLowerCase()?(e=r.substr(to,14),to+=14):(e=o,0===oo&&co(N)),e===o&&("avg_row_length"===r.substr(to,14).toLowerCase()?(e=r.substr(to,14),to+=14):(e=o,0===oo&&co(ar)),e===o&&("key_block_size"===r.substr(to,14).toLowerCase()?(e=r.substr(to,14),to+=14):(e=o,0===oo&&co(ir)),e===o&&("max_rows"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(lr)),e===o&&("min_rows"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(cr)),e===o&&("stats_sample_pages"===r.substr(to,18).toLowerCase()?(e=r.substr(to,18),to+=18):(e=o,0===oo&&co(fr))))))),e!==o&&Si()!==o?((n=pi())===o&&(n=null),n!==o&&Si()!==o&&(s=ra())!==o?(l=n,c=s,t=e={keyword:e.toLowerCase(),symbol:l,value:c.value}):(to=t,t=o)):(to=t,t=o),t===o&&(t=Oo())===o&&(t=to,(e=wi())===o&&("connection"===r.substr(to,10).toLowerCase()?(e=r.substr(to,10),to+=10):(e=o,0===oo&&co(br))),e!==o&&Si()!==o?((n=pi())===o&&(n=null),n!==o&&Si()!==o&&(s=Zu())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:`'${e.value}'`}}(e,n,s):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,"compression"===r.substr(to,11).toLowerCase()?(e=r.substr(to,11),to+=11):(e=o,0===oo&&co(vr)),e!==o&&Si()!==o?((n=pi())===o&&(n=null),n!==o&&Si()!==o?(s=to,39===r.charCodeAt(to)?(u="'",to++):(u=o,0===oo&&co(pr)),u!==o?("zlib"===r.substr(to,4).toLowerCase()?(a=r.substr(to,4),to+=4):(a=o,0===oo&&co(Lr)),a===o&&("lz4"===r.substr(to,3).toLowerCase()?(a=r.substr(to,3),to+=3):(a=o,0===oo&&co(Cr)),a===o&&("none"===r.substr(to,4).toLowerCase()?(a=r.substr(to,4),to+=4):(a=o,0===oo&&co(Y)))),a!==o?(39===r.charCodeAt(to)?(i="'",to++):(i=o,0===oo&&co(pr)),i!==o?s=u=[u,a,i]:(to=s,s=o)):(to=s,s=o)):(to=s,s=o),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.join("").toUpperCase()}}(e,n,s):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,"engine"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(dr)),e!==o&&Si()!==o?((n=pi())===o&&(n=null),n!==o&&Si()!==o&&(s=Fu())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.toUpperCase()}}(e,n,s):(to=t,t=o)):(to=t,t=o)))),t}function Uo(){var t,e,n,s,u;return t=to,(e=Zo())!==o&&Si()!==o&&(n=function(){var t,e,n;return t=to,"read"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(wr)),e!==o&&Si()!==o?("local"===r.substr(to,5).toLowerCase()?(n=r.substr(to,5),to+=5):(n=o,0===oo&&co(m)),n===o&&(n=null),n!==o?t=e={type:"read",suffix:n&&"local"}:(to=t,t=o)):(to=t,t=o),t===o&&(t=to,"low_priority"===r.substr(to,12).toLowerCase()?(e=r.substr(to,12),to+=12):(e=o,0===oo&&co(hr)),e===o&&(e=null),e!==o&&Si()!==o?("write"===r.substr(to,5).toLowerCase()?(n=r.substr(to,5),to+=5):(n=o,0===oo&&co(yr)),n!==o?t=e={type:"write",prefix:e&&"low_priority"}:(to=t,t=o)):(to=t,t=o)),t}())!==o?(s=e,u=n,nl.add(`lock::${s.db}::${s.table}`),t=e={table:s,lock_type:u}):(to=t,t=o),t}function Mo(){var t,e,n,s,u,a,i;return(t=Po())===o&&(t=to,e=to,40===r.charCodeAt(to)?(n="(",to++):(n=o,0===oo&&co(_r)),n!==o&&(s=Si())!==o&&(u=Mo())!==o&&(a=Si())!==o?(41===r.charCodeAt(to)?(i=")",to++):(i=o,0===oo&&co(gr)),i!==o?e=n=[n,s,u,a,i]:(to=e,e=o)):(to=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}function ko(){var t,e,n,s,u,a,i,l,c;if(t=to,Oa()!==o)if(Si()!==o)if((e=Do())!==o){for(n=[],s=to,(u=Si())!==o&&(a=yi())!==o&&(i=Si())!==o&&(l=Do())!==o?s=u=[u,a,i,l]:(to=s,s=o);s!==o;)n.push(s),s=to,(u=Si())!==o&&(a=yi())!==o&&(i=Si())!==o&&(l=Do())!==o?s=u=[u,a,i,l]:(to=s,s=o);n!==o?t=I(e,n):(to=t,t=o)}else to=t,t=o;else to=t,t=o;else to=t,t=o;return t===o&&(t=to,Si()!==o&&Oa()!==o&&(e=Si())!==o&&(n=function(){var t,e,n,s;return t=to,"RECURSIVE"===r.substr(to,9)?(e="RECURSIVE",to+=9):(e=o,0===oo&&co(Ee)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}())!==o&&(s=Si())!==o&&(u=Do())!==o?((c=u).recursive=!0,t=[c]):(to=t,t=o)),t}function Do(){var r,t,e,n,s,u,a;return r=to,(t=Zu())===o&&(t=Fu())===o&&(t=Qo()),t!==o&&Si()!==o?((e=$o())===o&&(e=null),e!==o&&Si()!==o&&ma()!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&(n=Co())!==o&&Si()!==o&&mi()!==o?(u=e,a=n,"string"==typeof(s=t)&&(s={type:"default",value:s}),s.table&&(s={type:"default",value:s.table}),r=t={name:s,stmt:a,columns:u}):(to=r,r=o)):(to=r,r=o),r}function $o(){var r,t;return r=to,Ai()!==o&&Si()!==o&&(t=function(){var r;return(r=tu())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=qu())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=qu())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=qu())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=I(t,e):(to=r,r=o)}else to=r,r=o;return r}()),r}())!==o&&Si()!==o&&mi()!==o?r=t:(to=r,r=o),r}function Po(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,y,E,A,m,T,I,N,R,S;return t=to,Si()!==o?((e=ko())===o&&(e=null),e!==o&&Si()!==o&&function(){var t,e,n,s;return t=to,"select"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(pe)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&_i()!==o?((n=function(){var r,t,e,n,s,u;if(r=to,(t=Fo())!==o){for(e=[],n=to,(s=Si())!==o&&(u=Fo())!==o?n=s=[s,u]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Fo())!==o?n=s=[s,u]:(to=n,n=o);e!==o?(t=function(r,t){const e=[r];for(let r=0,n=t.length;r<n;++r)e.push(t[r][1]);return e}(t,e),r=t):(to=r,r=o)}else to=r,r=o;return r}())===o&&(n=null),n!==o&&Si()!==o?((s=ka())===o&&(s=null),s!==o&&Si()!==o&&(u=Go())!==o&&Si()!==o?((a=Yo())===o&&(a=null),a!==o&&Si()!==o?((i=ru())===o&&(i=null),i!==o&&Si()!==o?((l=function(){var t,e;return t=to,function(){var t,e,n,s;return t=to,"group"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(Ye)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&xa()!==o&&Si()!==o&&(e=vu())!==o?t=e.value:(to=t,t=o),t}())===o&&(l=null),l!==o&&Si()!==o?((c=function(){var t,e;return t=to,function(){var t,e,n,s;return t=to,"having"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Xe)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&(e=wu())!==o?t=e:(to=t,t=o),t}())===o&&(c=null),c!==o&&Si()!==o?((f=eu())===o&&(f=null),f!==o&&Si()!==o?((b=ou())===o&&(b=null),b!==o?(v=to,"for"===r.substr(to,3).toLowerCase()?(p=r.substr(to,3),to+=3):(p=o,0===oo&&co(h)),p!==o&&(L=Si())!==o&&(C=fa())!==o?v=p=[p,L,C]:(to=v,v=o),v===o&&(v=null),v!==o?(d=e,w=n,y=s,E=u,m=i,T=l,I=c,N=f,R=b,S=v,(A=a)&&A.forEach((r=>r.table&&nl.add(`select::${r.db}::${r.table}`))),t={with:d,type:"select",options:w,distinct:y,columns:E,from:A,where:m,groupby:T,having:I,orderby:N,limit:R,for_update:S&&`${S[0]} ${S[2][0]}`}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t}function Fo(){var t;return(t=function(){var t;return"sql_calc_found_rows"===r.substr(to,19).toLowerCase()?(t=r.substr(to,19),to+=19):(t=o,0===oo&&co(Rs)),t}())===o&&((t=function(){var t;return"sql_cache"===r.substr(to,9).toLowerCase()?(t=r.substr(to,9),to+=9):(t=o,0===oo&&co(Ss)),t}())===o&&(t=function(){var t;return"sql_no_cache"===r.substr(to,12).toLowerCase()?(t=r.substr(to,12),to+=12):(t=o,0===oo&&co(_s)),t}()),t===o&&(t=function(){var t;return"sql_big_result"===r.substr(to,14).toLowerCase()?(t=r.substr(to,14),to+=14):(t=o,0===oo&&co(Os)),t}())===o&&(t=function(){var t;return"sql_small_result"===r.substr(to,16).toLowerCase()?(t=r.substr(to,16),to+=16):(t=o,0===oo&&co(gs)),t}())===o&&(t=function(){var t;return"sql_buffer_result"===r.substr(to,17).toLowerCase()?(t=r.substr(to,17),to+=17):(t=o,0===oo&&co(xs)),t}())),t}function Go(){var r,t,e,n,s,u,a,i;if(r=to,(t=Ma())===o&&(t=to,(e=Ei())!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t===o&&(t=Ei())),t!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=jo())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=jo())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=function(r,t){sl.add("select::null::(.*)");const e={expr:{type:"column_ref",table:null,column:"*"},as:null};return t&&t.length>0?Qi(e,t):[e]}(0,e):(to=r,r=o)}else to=r,r=o;if(r===o)if(r=to,(t=jo())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=jo())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=jo())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=I(t,e):(to=r,r=o)}else to=r,r=o;return r}function jo(){var r,t,e,n,s;return r=to,t=to,(e=Mu())!==o&&(n=Si())!==o&&(s=hi())!==o?t=e=[e,n,s]:(to=t,t=o),t===o&&(t=null),t!==o&&(e=Si())!==o&&(n=Ei())!==o?r=t=function(r){const t=r&&r[0]||null;return sl.add(`select::${t}::(.*)`),{expr:{type:"column_ref",table:t,column:"*"},as:null}}(t):(to=r,r=o),r===o&&(r=to,(t=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=du())!==o){for(e=[],n=to,(s=Si())!==o?((u=Ha())===o&&(u=Ya())===o&&(u=Ri()),u!==o&&(a=Si())!==o&&(i=du())!==o?n=s=[s,u,a,i]:(to=n,n=o)):(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o?((u=Ha())===o&&(u=Ya())===o&&(u=Ri()),u!==o&&(a=Si())!==o&&(i=du())!==o?n=s=[s,u,a,i]:(to=n,n=o)):(to=n,n=o);e!==o?(t=function(r,t){const e=r.ast;if(e&&"select"===e.type&&(!(r.parentheses_symbol||r.parentheses||r.ast.parentheses||r.ast.parentheses_symbol)||1!==e.columns.length||"*"===e.columns[0].expr.column))throw new Error("invalid column clause with select statement");if(!t||0===t.length)return r;const n=t.length;let s=t[n-1][3];for(let e=n-1;e>=0;e--){const n=0===e?r:t[e-1][3];s=Zi(t[e][1],n,s)}return s}(t,e),r=t):(to=r,r=o)}else to=r,r=o;return r}())!==o&&(e=Si())!==o?((n=Ho())===o&&(n=null),n!==o?r=t={expr:t,as:n}:(to=r,r=o)):(to=r,r=o)),r}function Ho(){var r,t,e;return r=to,(t=ma())!==o&&_i()!==o&&(e=function(){var r,t;return r=to,(t=Fu())!==o&&(function(r){if(!0===qi[r.toUpperCase()])throw new Error("Error: "+JSON.stringify(r)+" is a reserved word, can not as alias clause");return!1}(t)?o:void 0)!==o?r=t:(to=r,r=o),r===o&&(r=to,r=t=ku()),r}())!==o?r=t=e:(to=r,r=o),r===o&&(r=to,(t=ma())===o&&(t=null),t!==o&&Si()!==o&&(e=Mu())!==o?r=t=e:(to=r,r=o)),r}function Yo(){var t,e;return t=to,function(){var t,e,n,s;return t=to,"from"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Re)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&(e=qo())!==o?t=e:(to=t,t=o),t}function Bo(){var r,t,e;return r=to,(t=Qo())!==o&&Si()!==o&&ia()!==o&&Si()!==o&&(e=Qo())!==o?r=t=[t,e]:(to=r,r=o),r}function Wo(){var t,e;return t=to,ga()!==o&&Si()!==o?("btree"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(Or)),e===o&&("hash"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(xr))),e!==o?t={keyword:"using",type:e.toLowerCase()}:(to=t,t=o)):(to=t,t=o),t}function Xo(){var r,t,e,n,s,u;if(r=to,(t=Vo())!==o){for(e=[],n=to,(s=Si())!==o&&(u=Vo())!==o?n=s=[s,u]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Vo())!==o?n=s=[s,u]:(to=n,n=o);e!==o?r=t=function(r,t){const e=[r];for(let r=0;r<t.length;r++)e.push(t[r][1]);return e}(t,e):(to=r,r=o)}else to=r,r=o;return r}function Vo(){var t,e,n,s,u,a;return t=to,(e=function(){var t,e,n,s;return t=to,"key_block_size"===r.substr(to,14).toLowerCase()?(e=r.substr(to,14),to+=14):(e=o,0===oo&&co(ir)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="KEY_BLOCK_SIZE":(to=t,t=o)):(to=t,t=o),t}())!==o&&Si()!==o?((n=pi())===o&&(n=null),n!==o&&Si()!==o&&(s=ra())!==o?(u=n,a=s,t=e={type:e.toLowerCase(),symbol:u,expr:a}):(to=t,t=o)):(to=t,t=o),t===o&&(t=Wo())===o&&(t=to,"with"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Ur)),e!==o&&Si()!==o?("parser"===r.substr(to,6).toLowerCase()?(n=r.substr(to,6),to+=6):(n=o,0===oo&&co(Mr)),n!==o&&Si()!==o&&(s=Fu())!==o?t=e={type:"with parser",expr:s}:(to=t,t=o)):(to=t,t=o),t===o&&(t=to,"visible"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(kr)),e===o&&("invisible"===r.substr(to,9).toLowerCase()?(e=r.substr(to,9),to+=9):(e=o,0===oo&&co(Dr))),e!==o&&(e=function(r){return{type:r.toLowerCase(),expr:r.toLowerCase()}}(e)),(t=e)===o&&(t=Oi()))),t}function qo(){var r,t,e,n;if(r=to,(t=Zo())!==o){for(e=[],n=Ko();n!==o;)e.push(n),n=Ko();e!==o?r=t=$r(t,e):(to=r,r=o)}else to=r,r=o;return r}function Ko(){var r,t,e;return r=to,Si()!==o&&(t=yi())!==o&&Si()!==o&&(e=Zo())!==o?r=e:(to=r,r=o),r===o&&(r=to,Si()!==o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(r=to,(t=zo())!==o)if(Si()!==o)if((e=Zo())!==o)if(Si()!==o)if((n=ga())!==o)if(Si()!==o)if(Ai()!==o)if(Si()!==o)if((s=Fu())!==o){for(u=[],a=to,(i=Si())!==o&&(l=yi())!==o&&(c=Si())!==o&&(f=Fu())!==o?a=i=[i,l,c,f]:(to=a,a=o);a!==o;)u.push(a),a=to,(i=Si())!==o&&(l=yi())!==o&&(c=Si())!==o&&(f=Fu())!==o?a=i=[i,l,c,f]:(to=a,a=o);u!==o&&(a=Si())!==o&&(i=mi())!==o?(b=t,p=s,L=u,(v=e).join=b,v.using=Qi(p,L),r=t=v):(to=r,r=o)}else to=r,r=o;else to=r,r=o;else to=r,r=o;else to=r,r=o;else to=r,r=o;else to=r,r=o;else to=r,r=o;else to=r,r=o;else to=r,r=o;return r===o&&(r=to,(t=zo())!==o&&Si()!==o&&(e=Zo())!==o&&Si()!==o?((n=Jo())===o&&(n=null),n!==o?(t=function(r,t,e){return t.join=r,t.on=e,t}(t,e,n),r=t):(to=r,r=o)):(to=r,r=o),r===o&&(r=to,(t=zo())!==o&&Si()!==o&&(e=Ai())!==o&&Si()!==o&&(n=Co())!==o&&Si()!==o&&mi()!==o&&Si()!==o?((s=Ho())===o&&(s=null),s!==o&&(u=Si())!==o?((a=Jo())===o&&(a=null),a!==o?(t=function(r,t,e,n){return t.parentheses=!0,{expr:t,as:e,join:r,on:n}}(t,n,s,a),r=t):(to=r,r=o)):(to=r,r=o)):(to=r,r=o))),r}())!==o?r=t:(to=r,r=o)),r}function Zo(){var t,e,n,s,u,a;return t=to,(e=function(){var t;return"dual"===r.substr(to,4).toLowerCase()?(t=r.substr(to,4),to+=4):(t=o,0===oo&&co(ws)),t}())!==o&&(e={type:"dual"}),(t=e)===o&&(t=to,(e=Fu())!==o&&Si()!==o&&(n=Ai())!==o&&Si()!==o&&(s=vu())!==o&&Si()!==o&&(u=mi())!==o&&Si()!==o?((a=Ho())===o&&(a=null),a!==o?t=e={expr:{type:"function",name:e,args:s},as:a}:(to=t,t=o)):(to=t,t=o),t===o&&(t=to,(e=Qo())!==o&&Si()!==o?((n=Ho())===o&&(n=null),n!==o?t=e=function(r,t){return"var"===r.type?(r.as=t,r):{db:r.db,table:r.table,as:t}}(e,n):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,(e=Ai())!==o&&Si()!==o&&(n=Co())!==o&&Si()!==o&&(s=mi())!==o&&Si()!==o?((u=Ho())===o&&(u=null),u!==o?t=e=function(r,t){return r.parentheses=!0,{expr:r,as:t}}(n,u):(to=t,t=o)):(to=t,t=o)))),t}function zo(){var t,e,n,s;return t=to,(e=function(){var t,e,n,s;return t=to,"left"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Me)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}())!==o&&(n=Si())!==o?((s=function(){var t,e,n,s;return t=to,"outer"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co($e)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}())===o&&(s=null),s!==o&&Si()!==o&&Sa()!==o?t=e="LEFT JOIN":(to=t,t=o)):(to=t,t=o),t===o&&(t=to,e=to,(n=function(){var t,e,n,s;return t=to,"inner"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(ke)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}())!==o&&(s=Si())!==o?e=n=[n,s]:(to=e,e=o),e===o&&(e=null),e!==o&&(n=Sa())!==o?t=e="INNER JOIN":(to=t,t=o)),t}function Qo(){var r,t,e,n,s,u,a,i;return r=to,(t=Mu())!==o?(e=to,(n=Si())!==o&&(s=hi())!==o&&(u=Si())!==o&&(a=Mu())!==o?e=n=[n,s,u,a]:(to=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){const e={db:null,table:r};return null!==t&&(e.db=r,e.table=t[3]),e}(t,e):(to=r,r=o)):(to=r,r=o),r===o&&(r=to,(t=Bi())!==o&&((i=t).db=null,i.table=i.name,t=i),r=t),r}function Jo(){var r,t;return r=to,Ra()!==o&&Si()!==o&&(t=wu())!==o?r=t:(to=r,r=o),r}function ru(){var t,e;return t=to,function(){var t,e,n,s;return t=to,"where"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(He)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&(e=wu())!==o?t=e:(to=t,t=o),t}function tu(){var r,t,e,n,s,u,a,i;if(r=to,(t=xu())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=xu())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=xu())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=I(t,e):(to=r,r=o)}else to=r,r=o;return r}function eu(){var t,e;return t=to,function(){var t,e,n,s;return t=to,"order"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(We)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&xa()!==o&&Si()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=nu())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=nu())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=nu())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=I(t,e):(to=r,r=o)}else to=r,r=o;return r}())!==o?t=e:(to=t,t=o),t}function nu(){var t,e,n;return t=to,(e=du())!==o&&Si()!==o?((n=Ua())===o&&(n=function(){var t,e,n,s;return t=to,"asc"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(Ke)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="ASC":(to=t,t=o)):(to=t,t=o),t}()),n===o&&(n=null),n!==o?t=e={expr:e,type:n}:(to=t,t=o)):(to=t,t=o),t}function su(){var r;return(r=ra())===o&&(r=Yu()),r}function ou(){var t,e,n,s,u,a;return t=to,function(){var t,e,n,s;return t=to,"limit"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(Ve)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&(e=su())!==o&&Si()!==o?(n=to,(s=yi())===o&&(s=function(){var t,e,n,s;return t=to,"offset"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(qe)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="OFFSET":(to=t,t=o)):(to=t,t=o),t}()),s!==o&&(u=Si())!==o&&(a=su())!==o?n=s=[s,u,a]:(to=n,n=o),n===o&&(n=null),n!==o?t=function(r,t){const e=[r];return t&&e.push(t[2]),{seperator:t&&t[0]&&t[0].toLowerCase()||"",value:e}}(e,n):(to=t,t=o)):(to=t,t=o),t}function uu(){var r,t,e,n,s,u,a,i;if(r=to,(t=au())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=au())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=au())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=I(t,e):(to=r,r=o)}else to=r,r=o;return r}function au(){var t,e,n,s,u,a,i,l,c;return t=to,e=to,(n=Mu())!==o&&(s=Si())!==o&&(u=hi())!==o?e=n=[n,s,u]:(to=e,e=o),e===o&&(e=null),e!==o&&(n=Si())!==o&&(s=Du())!==o&&(u=Si())!==o?(61===r.charCodeAt(to)?(a="=",to++):(a=o,0===oo&&co(Pr)),a!==o&&Si()!==o&&(i=Ru())!==o?t=e={column:s,value:i,table:(c=e)&&c[0]}:(to=t,t=o)):(to=t,t=o),t===o&&(t=to,e=to,(n=Mu())!==o&&(s=Si())!==o&&(u=hi())!==o?e=n=[n,s,u]:(to=e,e=o),e===o&&(e=null),e!==o&&(n=Si())!==o&&(s=Du())!==o&&(u=Si())!==o?(61===r.charCodeAt(to)?(a="=",to++):(a=o,0===oo&&co(Pr)),a!==o&&Si()!==o&&(i=_a())!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&(l=xu())!==o&&Si()!==o&&mi()!==o?t=e=function(r,t,e){return{column:t,value:e,table:r&&r[0],keyword:"values"}}(e,s,l):(to=t,t=o)):(to=t,t=o)),t}function iu(){var r;return(r=function(){var r,t;return r=to,_a()!==o&&Si()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=bu())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=bu())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=bu())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=I(t,e):(to=r,r=o)}else to=r,r=o;return r}())!==o?r=t:(to=r,r=o),r}())===o&&(r=Po()),r}function lu(){var r,t,e,n,s,u,a,i,l;if(r=to,ya()!==o)if(Si()!==o)if((t=Ai())!==o)if(Si()!==o)if((e=Fu())!==o){for(n=[],s=to,(u=Si())!==o&&(a=yi())!==o&&(i=Si())!==o&&(l=Fu())!==o?s=u=[u,a,i,l]:(to=s,s=o);s!==o;)n.push(s),s=to,(u=Si())!==o&&(a=yi())!==o&&(i=Si())!==o&&(l=Fu())!==o?s=u=[u,a,i,l]:(to=s,s=o);n!==o&&(s=Si())!==o&&(u=mi())!==o?r=Qi(e,n):(to=r,r=o)}else to=r,r=o;else to=r,r=o;else to=r,r=o;else to=r,r=o;else to=r,r=o;return r===o&&(r=to,ya()!==o&&Si()!==o&&(t=bu())!==o?r=t:(to=r,r=o)),r}function cu(){var t,e,n;return t=to,Ra()!==o&&Si()!==o?("duplicate"===r.substr(to,9).toLowerCase()?(e=r.substr(to,9),to+=9):(e=o,0===oo&&co(Fr)),e!==o&&Si()!==o&&di()!==o&&Si()!==o&&fa()!==o&&Si()!==o&&(n=uu())!==o?t={keyword:"on duplicate key update",set:n}:(to=t,t=o)):(to=t,t=o),t}function fu(){var r,t;return r=to,(t=Ca())!==o&&(t="insert"),(r=t)===o&&(r=to,(t=da())!==o&&(t="replace"),r=t),r}function bu(){var r,t;return r=to,Ai()!==o&&Si()!==o&&(t=vu())!==o&&Si()!==o&&mi()!==o?r=t:(to=r,r=o),r}function vu(){var r,t,e,n,s,u,a,i;if(r=to,(t=du())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=du())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=du())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=function(r,t){const e={type:"expr_list"};return e.value=Qi(r,t),e}(t,e):(to=r,r=o)}else to=r,r=o;return r}function pu(){var r,t,e,n,s,u;if(r=to,(t=Lu())!==o)if(Si()!==o){for(e=[],n=to,(s=Si())!==o&&(u=Lu())!==o?n=s=[s,u]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Lu())!==o?n=s=[s,u]:(to=n,n=o);e!==o?r=t=i(t,e):(to=r,r=o)}else to=r,r=o;else to=r,r=o;return r}function Lu(){var t,e,n;return t=to,Wa()!==o&&Si()!==o&&(e=wu())!==o&&Si()!==o&&function(){var t,e,n,s;return t=to,"then"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(wn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&(n=du())!==o?t={type:"when",cond:e,result:n}:(to=t,t=o),t}function Cu(){var t,e;return t=to,function(){var t,e,n,s;return t=to,"else"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(hn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&(e=du())!==o?t={type:"else",result:e}:(to=t,t=o),t}function du(){var r;return(r=function(){var r;return(r=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=Ou())!==o){if(e=[],n=to,(s=Si())!==o&&(u=Ri())!==o&&(a=Si())!==o&&(i=Ou())!==o?n=s=[s,u,a,i]:(to=n,n=o),n!==o)for(;n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Ri())!==o&&(a=Si())!==o&&(i=Ou())!==o?n=s=[s,u,a,i]:(to=n,n=o);else e=o;e!==o&&(n=Si())!==o?((s=Au())===o&&(s=null),s!==o?(t=function(r,t,e){const n=Ji(r,t);return null===e?n:"arithmetic"===e.type?Ji(n,e.tail):Zi(e.op,n,e.right)}(t,e,s),r=t):(to=r,r=o)):(to=r,r=o)}else to=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=to,(t=hu())!==o){for(e=[],n=to,(s=_i())!==o&&(u=Ya())!==o&&(a=Si())!==o&&(i=hu())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=_i())!==o&&(u=Ya())!==o&&(a=Si())!==o&&(i=hu())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=Gr(t,e):(to=r,r=o)}else to=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u;if(r=to,(t=Su())!==o){if(e=[],n=to,(s=Si())!==o&&(u=Ou())!==o?n=s=[s,u]:(to=n,n=o),n!==o)for(;n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Ou())!==o?n=s=[s,u]:(to=n,n=o);else e=o;e!==o?r=t=Ki(t,e[0][1]):(to=r,r=o)}else to=r,r=o;return r}()),r}())===o&&(r=Co()),r}function wu(){var r,t,e,n,s,u,a,i;if(r=to,(t=du())!==o){for(e=[],n=to,(s=Si())!==o?((u=Ha())===o&&(u=Ya())===o&&(u=yi()),u!==o&&(a=Si())!==o&&(i=du())!==o?n=s=[s,u,a,i]:(to=n,n=o)):(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o?((u=Ha())===o&&(u=Ya())===o&&(u=yi()),u!==o&&(a=Si())!==o&&(i=du())!==o?n=s=[s,u,a,i]:(to=n,n=o)):(to=n,n=o);e!==o?r=t=function(r,t){const e=t.length;let n=r,s="";for(let r=0;r<e;++r)","===t[r][1]?(s=",",Array.isArray(n)||(n=[n]),n.push(t[r][3])):n=Zi(t[r][1],n,t[r][3]);if(","===s){const r={type:"expr_list"};return r.value=n,r}return n}(t,e):(to=r,r=o)}else to=r,r=o;return r}function hu(){var r,t,e,n,s,u,a,i;if(r=to,(t=yu())!==o){for(e=[],n=to,(s=_i())!==o&&(u=Ha())!==o&&(a=Si())!==o&&(i=yu())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=_i())!==o&&(u=Ha())!==o&&(a=Si())!==o&&(i=yu())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=Gr(t,e):(to=r,r=o)}else to=r,r=o;return r}function yu(){var t,e,n,s,u;return(t=Eu())===o&&(t=function(){var r,t,e,n,s;return r=to,(t=function(){var r,t,e,n,s;return r=to,t=to,(e=ja())!==o&&(n=Si())!==o&&(s=Ga())!==o?t=e=[e,n,s]:(to=t,t=o),t!==o&&(t=Hr(t)),(r=t)===o&&(r=Ga()),r}())!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&(e=Co())!==o&&Si()!==o&&mi()!==o?(n=t,(s=e).parentheses=!0,r=t=Ki(n,s)):(to=r,r=o),r}())===o&&(t=to,(e=ja())===o&&(e=to,33===r.charCodeAt(to)?(n="!",to++):(n=o,0===oo&&co(jr)),n!==o?(s=to,oo++,61===r.charCodeAt(to)?(u="=",to++):(u=o,0===oo&&co(Pr)),oo--,u===o?s=void 0:(to=s,s=o),s!==o?e=n=[n,s]:(to=e,e=o)):(to=e,e=o)),e!==o&&(n=Si())!==o&&(s=yu())!==o?t=e=Ki("NOT",s):(to=t,t=o)),t}function Eu(){var r,t,e,n,s;return r=to,(t=Ru())!==o&&Si()!==o?((e=Au())===o&&(e=null),e!==o?(n=t,r=t=null===(s=e)?n:"arithmetic"===s.type?Ji(n,s.tail):Zi(s.op,n,s.right)):(to=r,r=o)):(to=r,r=o),r===o&&(r=Zu())===o&&(r=xu()),r}function Au(){var t;return(t=function(){var r,t,e,n,s,u;if(r=[],t=to,(e=Si())!==o&&(n=mu())!==o&&(s=Si())!==o&&(u=Ru())!==o?t=e=[e,n,s,u]:(to=t,t=o),t!==o)for(;t!==o;)r.push(t),t=to,(e=Si())!==o&&(n=mu())!==o&&(s=Si())!==o&&(u=Ru())!==o?t=e=[e,n,s,u]:(to=t,t=o);else r=o;return r!==o&&(r={type:"arithmetic",tail:r}),r}())===o&&(t=Nu())===o&&(t=function(){var r,t,e,n;return r=to,(t=function(){var r,t,e,n,s;return r=to,t=to,(e=ja())!==o&&(n=Si())!==o&&(s=Da())!==o?t=e=[e,n,s]:(to=t,t=o),t!==o&&(t=Hr(t)),(r=t)===o&&(r=Da()),r}())!==o&&Si()!==o&&(e=Ru())!==o&&Si()!==o&&Ha()!==o&&Si()!==o&&(n=Ru())!==o?r=t={op:t,right:{type:"expr_list",value:[e,n]}}:(to=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=to,(t=Pa())!==o&&(e=Si())!==o&&(n=Ru())!==o?r=t={op:"IS",right:n}:(to=r,r=o),r===o&&(r=to,t=to,(e=Pa())!==o&&(n=Si())!==o&&(s=ja())!==o?t=e=[e,n,s]:(to=t,t=o),t!==o&&(e=Si())!==o&&(n=Ru())!==o?(t=function(r){return{op:"IS NOT",right:r}}(n),r=t):(to=r,r=o)),r}())===o&&(t=Iu())===o&&(t=function(){var t,e,n,s,u,a;return t=to,(e=function(){var t,e,n,s,u;return t=to,(e=ja())===o&&(e=null),e!==o&&Si()!==o?((n=function(){var t,e,n,s;return t=to,"regexp"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(on)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="REGEXP":(to=t,t=o)):(to=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=to,"rlike"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(sn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="RLIKE":(to=t,t=o)):(to=t,t=o),t}()),n!==o?(u=n,t=e=(s=e)?`${s} ${u}`:u):(to=t,t=o)):(to=t,t=o),t}())!==o&&Si()!==o?("binary"===r.substr(to,6).toLowerCase()?(n=r.substr(to,6),to+=6):(n=o,0===oo&&co(Ar)),n===o&&(n=null),n!==o&&Si()!==o?((s=Xu())===o&&(s=Zu())===o&&(s=xu()),s!==o?(u=e,t=e={op:(a=n)?`${u} ${a}`:u,right:s}):(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,"glob"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Kr)),e!==o&&Si()!==o&&(n=Zu())!==o?(e=function(r){return{op:"GLOB",right:r}}(n),t=e):(to=t,t=o)),t}()),t}function mu(){var t;return">="===r.substr(to,2)?(t=">=",to+=2):(t=o,0===oo&&co(Yr)),t===o&&(62===r.charCodeAt(to)?(t=">",to++):(t=o,0===oo&&co(Br)),t===o&&("<="===r.substr(to,2)?(t="<=",to+=2):(t=o,0===oo&&co(Wr)),t===o&&("<>"===r.substr(to,2)?(t="<>",to+=2):(t=o,0===oo&&co(Xr)),t===o&&(60===r.charCodeAt(to)?(t="<",to++):(t=o,0===oo&&co(Vr)),t===o&&(61===r.charCodeAt(to)?(t="=",to++):(t=o,0===oo&&co(Pr)),t===o&&("!="===r.substr(to,2)?(t="!=",to+=2):(t=o,0===oo&&co(qr)))))))),t}function Tu(){var r,t,e,n,s;return r=to,t=to,(e=ja())!==o&&(n=Si())!==o&&(s=$a())!==o?t=e=[e,n,s]:(to=t,t=o),t!==o&&(t=Hr(t)),(r=t)===o&&(r=$a()),r}function Iu(){var r,t,e;return r=to,(t=function(){var r,t,e,n,s;return r=to,t=to,(e=ja())!==o&&(n=Si())!==o&&(s=Fa())!==o?t=e=[e,n,s]:(to=t,t=o),t!==o&&(t=Hr(t)),(r=t)===o&&(r=Fa()),r}())!==o&&Si()!==o?((e=qu())===o&&(e=Eu()),e!==o?r=t={op:t,right:e}:(to=r,r=o)):(to=r,r=o),r}function Nu(){var r,t,e,n;return r=to,(t=Tu())!==o&&Si()!==o&&(e=Ai())!==o&&Si()!==o&&(n=vu())!==o&&Si()!==o&&mi()!==o?r=t={op:t,right:n}:(to=r,r=o),r===o&&(r=to,(t=Tu())!==o&&Si()!==o?((e=Bi())===o&&(e=Zu()),e!==o?r=t=function(r,t){return{op:r,right:t}}(t,e):(to=r,r=o)):(to=r,r=o)),r}function Ru(){var r,t,e,n,s,u,a,i;if(r=to,(t=_u())!==o){for(e=[],n=to,(s=Si())!==o&&(u=Su())!==o&&(a=Si())!==o&&(i=_u())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Su())!==o&&(a=Si())!==o&&(i=_u())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=Gr(t,e):(to=r,r=o)}else to=r,r=o;return r}function Su(){var t;return 43===r.charCodeAt(to)?(t="+",to++):(t=o,0===oo&&co(Zr)),t===o&&(45===r.charCodeAt(to)?(t="-",to++):(t=o,0===oo&&co(zr))),t}function _u(){var r,t,e,n,s,u,a,i;if(r=to,(t=Ou())!==o){for(e=[],n=to,(s=Si())!==o&&(u=gu())!==o&&(a=Si())!==o&&(i=Ou())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=gu())!==o&&(a=Si())!==o&&(i=Ou())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=Ji(t,e):(to=r,r=o)}else to=r,r=o;return r}function gu(){var t;return 42===r.charCodeAt(to)?(t="*",to++):(t=o,0===oo&&co(Qr)),t===o&&(47===r.charCodeAt(to)?(t="/",to++):(t=o,0===oo&&co(Jr)),t===o&&(37===r.charCodeAt(to)?(t="%",to++):(t=o,0===oo&&co(rt)),t===o&&("||"===r.substr(to,2)?(t="||",to+=2):(t=o,0===oo&&co(tt))))),t}function Ou(){var t,e,n,s;return(t=function(){var t,e,n,s,u,a,i,l,c;return t=to,(e=Va())!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&(n=du())!==o&&Si()!==o&&ma()!==o&&Si()!==o&&(s=Xi())!==o&&Si()!==o&&(u=mi())!==o?(l=n,c=s,t=e={type:"cast",keyword:e.toLowerCase(),expr:l,symbol:"as",target:c}):(to=t,t=o),t===o&&(t=to,(e=Va())!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&(n=du())!==o&&Si()!==o&&ma()!==o&&Si()!==o&&(s=za())!==o&&Si()!==o&&(u=Ai())!==o&&Si()!==o&&(a=ta())!==o&&Si()!==o&&mi()!==o&&Si()!==o&&(i=mi())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+")"}}}(e,n,a),t=e):(to=t,t=o),t===o&&(t=to,(e=Va())!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&(n=du())!==o&&Si()!==o&&ma()!==o&&Si()!==o&&(s=za())!==o&&Si()!==o&&(u=Ai())!==o&&Si()!==o&&(a=ta())!==o&&Si()!==o&&yi()!==o&&Si()!==o&&(i=ta())!==o&&Si()!==o&&mi()!==o&&Si()!==o&&mi()!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+", "+n+")"}}}(e,n,a,i),t=e):(to=t,t=o),t===o&&(t=to,(e=Va())!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&(n=du())!==o&&Si()!==o&&ma()!==o&&Si()!==o&&(s=function(){var t;return(t=function(){var t,e,n,s;return t=to,"signed"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Nn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="SIGNED":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=Qa()),t}())!==o&&Si()!==o?((u=ri())===o&&(u=null),u!==o&&Si()!==o&&(a=mi())!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:e+(n?" "+n:"")}}}(e,n,s,u),t=e):(to=t,t=o)):(to=t,t=o)))),t}())===o&&(t=qu())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=to,(e=function(){var t,e,n,s;return t=to,"count"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(cn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="COUNT":(to=t,t=o)):(to=t,t=o),t}())!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&(n=function(){var t,e,n,s,u;return t=to,(e=function(){var t;return 42===r.charCodeAt(to)?(t="*",to++):(t=o,0===oo&&co(Qr)),t!==o&&(t={type:"star",value:"*"}),t}())!==o&&(e={expr:e}),(t=e)===o&&(t=to,(e=ka())===o&&(e=null),e!==o&&Si()!==o&&(n=Ai())!==o&&Si()!==o&&(s=du())!==o&&Si()!==o&&mi()!==o&&Si()!==o?((u=eu())===o&&(u=null),u!==o?t=e={distinct:e,expr:s,orderby:u,parentheses:!0}:(to=t,t=o)):(to=t,t=o),t===o&&(t=to,(e=ka())===o&&(e=null),e!==o&&Si()!==o&&(n=du())!==o&&Si()!==o?((s=eu())===o&&(s=null),s!==o?(e=function(r,t,e){return{distinct:r,expr:t,orderby:e,parentheses:!1}}(e,n,s),t=e):(to=t,t=o)):(to=t,t=o))),t}())!==o&&Si()!==o&&mi()!==o&&Si()!==o?((s=Wu())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:n,over:s}:(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=to,(e=function(){var t;return(t=function(){var t,e,n,s;return t=to,"sum"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(vn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="SUM":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"max"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(fn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="MAX":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"min"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(bn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="MIN":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"avg"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(pn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="AVG":(to=t,t=o)):(to=t,t=o),t}()),t}())!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&(n=Ru())!==o&&Si()!==o&&mi()!==o?t=e={type:"aggr_func",name:e,args:{expr:n}}:(to=t,t=o),t}()),t}())===o&&(t=Xu())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=to,Ba()!==o&&Si()!==o&&(t=pu())!==o&&Si()!==o?((e=Cu())===o&&(e=null),e!==o&&Si()!==o&&(n=Xa())!==o&&Si()!==o?((s=Ba())===o&&(s=null),s!==o?(a=t,(i=e)&&a.push(i),r={type:"case",expr:null,args:a}):(to=r,r=o)):(to=r,r=o)):(to=r,r=o),r===o&&(r=to,Ba()!==o&&Si()!==o&&(t=du())!==o&&Si()!==o&&(e=pu())!==o&&Si()!==o?((n=Cu())===o&&(n=null),n!==o&&Si()!==o&&(s=Xa())!==o&&Si()!==o?((u=Ba())===o&&(u=null),u!==o?r=function(r,t,e){return e&&t.push(e),{type:"case",expr:r,args:t}}(t,e,n):(to=r,r=o)):(to=r,r=o)):(to=r,r=o)),r}())===o&&(t=function(){var t,e,n;return t=to,function(){var t,e,n,s;return t=to,"interval"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(Zn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="INTERVAL":(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&(e=du())!==o&&Si()!==o&&(n=function(){var t;return(t=function(){var t,e,n,s;return t=to,"year"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(zn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="YEAR":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"month"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(Qn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="MONTH":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"day"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(Jn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="DAY":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"hour"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(rs)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="HOUR":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"minute"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(ts)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="MINUTE":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"second"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(es)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="SECOND":(to=t,t=o)):(to=t,t=o),t}()),t}())!==o?t={type:"interval",expr:e,unit:n.toLowerCase()}:(to=t,t=o),t}())===o&&(t=xu())===o&&(t=Yu())===o&&(t=to,Ai()!==o&&(e=Si())!==o&&(n=wu())!==o&&Si()!==o&&mi()!==o?((s=n).parentheses=!0,t=s):(to=t,t=o),t===o&&(t=Bi())===o&&(t=to,Si()!==o?(63===r.charCodeAt(to)?(e="?",to++):(e=o,0===oo&&co(et)),e!==o?t={type:"origin",value:e}:(to=t,t=o)):(to=t,t=o))),t}function xu(){var r,t,e,n,s,u,a,i,l,c,f;if(r=to,t=to,(e=Mu())!==o&&(n=Si())!==o&&(s=hi())!==o&&(u=Si())!==o?t=e=[e,n,s,u]:(to=t,t=o),t===o&&(t=null),t!==o)if((e=$u())!==o)if((n=Si())!==o){if(s=[],u=to,(a=Ni())===o&&(a=Ii()),a!==o&&(i=Si())!==o?((l=Zu())===o&&(l=ra()),l!==o?u=a=[a,i,l]:(to=u,u=o)):(to=u,u=o),u!==o)for(;u!==o;)s.push(u),u=to,(a=Ni())===o&&(a=Ii()),a!==o&&(i=Si())!==o?((l=Zu())===o&&(l=ra()),l!==o?u=a=[a,i,l]:(to=u,u=o)):(to=u,u=o);else s=o;s!==o&&(u=Si())!==o?((a=mo())===o&&(a=null),a!==o?r=t=function(r,t,e,n){const s=r&&r[0]||null;return sl.add(`select::${s}::${t}`),{type:"column_ref",table:s,column:t,collate:n,arrows:e.map((r=>r[0])),properties:e.map((r=>r[2]))}}(t,e,s,a):(to=r,r=o)):(to=r,r=o)}else to=r,r=o;else to=r,r=o;else to=r,r=o;return r===o&&(r=to,(t=Mu())!==o&&(e=Si())!==o&&(n=hi())!==o&&(s=Si())!==o&&(u=Du())!==o?(c=t,f=u,sl.add(`select::${c}::${f}`),r=t={type:"column_ref",table:c,column:f}):(to=r,r=o),r===o&&(r=to,(t=Du())!==o&&(t=function(r){return sl.add("select::null::"+r),{type:"column_ref",table:null,column:r}}(t)),r=t)),r}function Uu(){var r,t,e,n,s,u,a,i;if(r=to,(t=$u())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=$u())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=$u())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=I(t,e):(to=r,r=o)}else to=r,r=o;return r}function Mu(){var r,t;return r=to,(t=Fu())!==o&&(nt(t)?o:void 0)!==o?r=t:(to=r,r=o),r===o&&(r=to,r=t=ku()),r}function ku(){var t;return(t=function(){var t,e,n,s;if(t=to,34===r.charCodeAt(to)?(e='"',to++):(e=o,0===oo&&co(st)),e!==o){if(n=[],ot.test(r.charAt(to))?(s=r.charAt(to),to++):(s=o,0===oo&&co(ut)),s!==o)for(;s!==o;)n.push(s),ot.test(r.charAt(to))?(s=r.charAt(to),to++):(s=o,0===oo&&co(ut));else n=o;n!==o?(34===r.charCodeAt(to)?(s='"',to++):(s=o,0===oo&&co(st)),s!==o?t=e=at(n):(to=t,t=o)):(to=t,t=o)}else to=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=to,39===r.charCodeAt(to)?(e="'",to++):(e=o,0===oo&&co(pr)),e!==o){if(n=[],it.test(r.charAt(to))?(s=r.charAt(to),to++):(s=o,0===oo&&co(lt)),s!==o)for(;s!==o;)n.push(s),it.test(r.charAt(to))?(s=r.charAt(to),to++):(s=o,0===oo&&co(lt));else n=o;n!==o?(39===r.charCodeAt(to)?(s="'",to++):(s=o,0===oo&&co(pr)),s!==o?t=e=at(n):(to=t,t=o)):(to=t,t=o)}else to=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=to,96===r.charCodeAt(to)?(e="`",to++):(e=o,0===oo&&co(ct)),e!==o){if(n=[],ft.test(r.charAt(to))?(s=r.charAt(to),to++):(s=o,0===oo&&co(bt)),s!==o)for(;s!==o;)n.push(s),ft.test(r.charAt(to))?(s=r.charAt(to),to++):(s=o,0===oo&&co(bt));else n=o;n!==o?(96===r.charCodeAt(to)?(s="`",to++):(s=o,0===oo&&co(ct)),s!==o?t=e=at(n):(to=t,t=o)):(to=t,t=o)}else to=t,t=o;return t}()),t}function Du(){var r;return r=to,(r=Pu())===o&&(r=ku()),r}function $u(){var r,t;return r=to,(t=Pu())!==o&&(nt(t)?o:void 0)!==o?r=t:(to=r,r=o),r===o&&(r=ku()),r}function Pu(){var r,t,e,n;if(r=to,(t=Gu())!==o){for(e=[],n=Hu();n!==o;)e.push(n),n=Hu();e!==o?r=t=vt(t,e):(to=r,r=o)}else to=r,r=o;return r}function Fu(){var r,t,e,n;if(r=to,(t=Gu())!==o){for(e=[],n=ju();n!==o;)e.push(n),n=ju();e!==o?r=t=vt(t,e):(to=r,r=o)}else to=r,r=o;return r}function Gu(){var t;return pt.test(r.charAt(to))?(t=r.charAt(to),to++):(t=o,0===oo&&co(Lt)),t}function ju(){var t;return Ct.test(r.charAt(to))?(t=r.charAt(to),to++):(t=o,0===oo&&co(dt)),t}function Hu(){var t;return wt.test(r.charAt(to))?(t=r.charAt(to),to++):(t=o,0===oo&&co(ht)),t}function Yu(){var t,e,n;return t=to,58===r.charCodeAt(to)?(e=":",to++):(e=o,0===oo&&co(yt)),e!==o&&(n=Fu())!==o?t=e=[e,n]:(to=t,t=o),t!==o&&(t={type:"param",value:t[1]}),t}function Bu(){var r,t,e;return r=to,Ra()!==o&&Si()!==o&&fa()!==o&&Si()!==o&&(t=fi())!==o&&Si()!==o&&Ai()!==o&&Si()!==o?((e=vu())===o&&(e=null),e!==o&&Si()!==o&&mi()!==o?r={type:"on update",keyword:t,parentheses:!0,expr:e}:(to=r,r=o)):(to=r,r=o),r===o&&(r=to,Ra()!==o&&Si()!==o&&fa()!==o&&Si()!==o&&(t=fi())!==o?r=function(r){return{type:"on update",keyword:r}}(t):(to=r,r=o)),r}function Wu(){var t,e,n;return t=to,function(){var t,e,n,s;return t=to,"over"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Pe)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}()!==o&&Si()!==o&&Ai()!==o&&Si()!==o&&ya()!==o&&Si()!==o&&xa()!==o&&Si()!==o&&(e=Go())!==o&&Si()!==o?((n=eu())===o&&(n=null),n!==o&&Si()!==o&&mi()!==o?t={partitionby:e,orderby:n}:(to=t,t=o)):(to=t,t=o),t===o&&(t=Bu()),t}function Xu(){var t,e,n,s,u;return t=to,(e=function(){var t;return(t=Vu())===o&&(t=function(){var t,e,n,s;return t=to,"current_user"===r.substr(to,12).toLowerCase()?(e=r.substr(to,12),to+=12):(e=o,0===oo&&co(os)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="CURRENT_USER":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"user"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(qn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="USER":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"session_user"===r.substr(to,12).toLowerCase()?(e=r.substr(to,12),to+=12):(e=o,0===oo&&co(us)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="SESSION_USER":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"system_user"===r.substr(to,11).toLowerCase()?(e=r.substr(to,11),to+=11):(e=o,0===oo&&co(as)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="SYSTEM_USER":(to=t,t=o)):(to=t,t=o),t}()),t}())!==o&&Si()!==o&&(n=Ai())!==o&&Si()!==o?((s=vu())===o&&(s=null),s!==o&&Si()!==o&&mi()!==o&&Si()!==o?((u=Wu())===o&&(u=null),u!==o?t=e={type:"function",name:e,args:s||{type:"expr_list",value:[]},over:u}:(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,(e=Vu())!==o&&Si()!==o?((n=Bu())===o&&(n=null),n!==o?t=e={type:"function",name:e,over:n}:(to=t,t=o)):(to=t,t=o),t===o&&(t=to,(e=ji())!==o&&Si()!==o&&(n=Ai())!==o&&Si()!==o?((s=wu())===o&&(s=null),s!==o&&Si()!==o&&mi()!==o&&Si()!==o?((u=Wu())===o&&(u=null),u!==o?t=e=function(r,t,e){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,s,u):(to=t,t=o)):(to=t,t=o)):(to=t,t=o))),t}function Vu(){var t;return(t=function(){var t,e,n,s;return t=to,"current_date"===r.substr(to,12).toLowerCase()?(e=r.substr(to,12),to+=12):(e=o,0===oo&&co(Kn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="CURRENT_DATE":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"current_time"===r.substr(to,12).toLowerCase()?(e=r.substr(to,12),to+=12):(e=o,0===oo&&co(ns)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="CURRENT_TIME":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=fi()),t}function qu(){var t,e,n,s,u,a,i,l,c;return t=to,"binary"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Ar)),e===o&&(e=null),e!==o&&Si()!==o&&(n=Zu())!==o?(s=to,(u=Si())!==o&&(a=mo())!==o?s=u=[u,a]:(to=s,s=o),s===o&&(s=null),s!==o?(l=n,c=s,(i=e)&&(l.prefix=i.toLowerCase()),c&&(l.suffix={collate:c[1]}),t=e=l):(to=t,t=o)):(to=t,t=o),t===o&&(t=ra())===o&&(t=function(){var t,e;return t=to,(e=function(){var t,e,n,s;return t=to,"true"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(ae)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}())!==o&&(e={type:"bool",value:!0}),(t=e)===o&&(t=to,(e=function(){var t,e,n,s;return t=to,"false"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(le)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}())!==o&&(e={type:"bool",value:!1}),t=e),t}())===o&&(t=Ku())===o&&(t=function(){var t,e,n,s,u,a;if(t=to,(e=li())===o&&(e=ai())===o&&(e=ci())===o&&(e=ii()),e!==o)if(Si()!==o){if(n=to,39===r.charCodeAt(to)?(s="'",to++):(s=o,0===oo&&co(pr)),s!==o){for(u=[],a=Qu();a!==o;)u.push(a),a=Qu();u!==o?(39===r.charCodeAt(to)?(a="'",to++):(a=o,0===oo&&co(pr)),a!==o?n=s=[s,u,a]:(to=n,n=o)):(to=n,n=o)}else to=n,n=o;n!==o?t=e=Rt(e,n):(to=t,t=o)}else to=t,t=o;else to=t,t=o;if(t===o)if(t=to,(e=li())===o&&(e=ai())===o&&(e=ci())===o&&(e=ii()),e!==o)if(Si()!==o){if(n=to,34===r.charCodeAt(to)?(s='"',to++):(s=o,0===oo&&co(st)),s!==o){for(u=[],a=zu();a!==o;)u.push(a),a=zu();u!==o?(34===r.charCodeAt(to)?(a='"',to++):(a=o,0===oo&&co(st)),a!==o?n=s=[s,u,a]:(to=n,n=o)):(to=n,n=o)}else to=n,n=o;n!==o?t=e=Rt(e,n):(to=t,t=o)}else to=t,t=o;else to=t,t=o;return t}()),t}function Ku(){var t;return(t=function(){var t,e,n,s;return t=to,"null"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(oe)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}())!==o&&(t={type:"null",value:null}),t}function Zu(){var t,e,n,s,u,a,i,l;if(t=to,"_binary"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(Et)),e===o&&(e=null),e!==o)if((n=Si())!==o)if("x"===r.substr(to,1).toLowerCase()?(s=r.charAt(to),to++):(s=o,0===oo&&co(At)),s!==o){if(u=to,39===r.charCodeAt(to)?(a="'",to++):(a=o,0===oo&&co(pr)),a!==o){for(i=[],mt.test(r.charAt(to))?(l=r.charAt(to),to++):(l=o,0===oo&&co(Tt));l!==o;)i.push(l),mt.test(r.charAt(to))?(l=r.charAt(to),to++):(l=o,0===oo&&co(Tt));i!==o?(39===r.charCodeAt(to)?(l="'",to++):(l=o,0===oo&&co(pr)),l!==o?u=a=[a,i,l]:(to=u,u=o)):(to=u,u=o)}else to=u,u=o;u!==o?t=e={type:"hex_string",prefix:e,value:u[1].join("")}:(to=t,t=o)}else to=t,t=o;else to=t,t=o;else to=t,t=o;if(t===o){if(t=to,"_binary"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(Et)),e===o&&(e=null),e!==o)if((n=Si())!==o)if("b"===r.substr(to,1).toLowerCase()?(s=r.charAt(to),to++):(s=o,0===oo&&co(It)),s!==o){if(u=to,39===r.charCodeAt(to)?(a="'",to++):(a=o,0===oo&&co(pr)),a!==o){for(i=[],mt.test(r.charAt(to))?(l=r.charAt(to),to++):(l=o,0===oo&&co(Tt));l!==o;)i.push(l),mt.test(r.charAt(to))?(l=r.charAt(to),to++):(l=o,0===oo&&co(Tt));i!==o?(39===r.charCodeAt(to)?(l="'",to++):(l=o,0===oo&&co(pr)),l!==o?u=a=[a,i,l]:(to=u,u=o)):(to=u,u=o)}else to=u,u=o;u!==o?t=e=function(r,t,e){return{type:"bit_string",prefix:r,value:e[1].join("")}}(e,0,u):(to=t,t=o)}else to=t,t=o;else to=t,t=o;else to=t,t=o;if(t===o){if(t=to,"_binary"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(Et)),e===o&&(e=null),e!==o)if((n=Si())!==o)if("0x"===r.substr(to,2)?(s="0x",to+=2):(s=o,0===oo&&co(Nt)),s!==o){for(u=[],mt.test(r.charAt(to))?(a=r.charAt(to),to++):(a=o,0===oo&&co(Tt));a!==o;)u.push(a),mt.test(r.charAt(to))?(a=r.charAt(to),to++):(a=o,0===oo&&co(Tt));u!==o?t=e=function(r,t,e){return{type:"full_hex_string",prefix:r,value:e.join("")}}(e,0,u):(to=t,t=o)}else to=t,t=o;else to=t,t=o;else to=t,t=o;if(t===o){if(t=to,e=to,39===r.charCodeAt(to)?(n="'",to++):(n=o,0===oo&&co(pr)),n!==o){for(s=[],u=Qu();u!==o;)s.push(u),u=Qu();s!==o?(39===r.charCodeAt(to)?(u="'",to++):(u=o,0===oo&&co(pr)),u!==o?e=n=[n,s,u]:(to=e,e=o)):(to=e,e=o)}else to=e,e=o;if(e!==o&&(e=function(r){return{type:"single_quote_string",value:r[1].join("")}}(e)),(t=e)===o){if(t=to,e=to,34===r.charCodeAt(to)?(n='"',to++):(n=o,0===oo&&co(st)),n!==o){for(s=[],u=zu();u!==o;)s.push(u),u=zu();s!==o?(34===r.charCodeAt(to)?(u='"',to++):(u=o,0===oo&&co(st)),u!==o?e=n=[n,s,u]:(to=e,e=o)):(to=e,e=o)}else to=e,e=o;e!==o&&(e=function(r){return{type:"double_quote_string",value:r[1].join("")}}(e)),t=e}}}}return t}function zu(){var t;return St.test(r.charAt(to))?(t=r.charAt(to),to++):(t=o,0===oo&&co(_t)),t===o&&(t=Ju()),t}function Qu(){var t;return gt.test(r.charAt(to))?(t=r.charAt(to),to++):(t=o,0===oo&&co(Ot)),t===o&&(t=Ju()),t}function Ju(){var t,e,n,s,u,a,i,l,c,f;return t=to,"\\'"===r.substr(to,2)?(e="\\'",to+=2):(e=o,0===oo&&co(xt)),e!==o&&(e="\\'"),(t=e)===o&&(t=to,'\\"'===r.substr(to,2)?(e='\\"',to+=2):(e=o,0===oo&&co(Ut)),e!==o&&(e='\\"'),(t=e)===o&&(t=to,"\\\\"===r.substr(to,2)?(e="\\\\",to+=2):(e=o,0===oo&&co(Mt)),e!==o&&(e="\\\\"),(t=e)===o&&(t=to,"\\/"===r.substr(to,2)?(e="\\/",to+=2):(e=o,0===oo&&co(kt)),e!==o&&(e="\\/"),(t=e)===o&&(t=to,"\\b"===r.substr(to,2)?(e="\\b",to+=2):(e=o,0===oo&&co(Dt)),e!==o&&(e="\b"),(t=e)===o&&(t=to,"\\f"===r.substr(to,2)?(e="\\f",to+=2):(e=o,0===oo&&co($t)),e!==o&&(e="\f"),(t=e)===o&&(t=to,"\\n"===r.substr(to,2)?(e="\\n",to+=2):(e=o,0===oo&&co(Pt)),e!==o&&(e="\n"),(t=e)===o&&(t=to,"\\r"===r.substr(to,2)?(e="\\r",to+=2):(e=o,0===oo&&co(Ft)),e!==o&&(e="\r"),(t=e)===o&&(t=to,"\\t"===r.substr(to,2)?(e="\\t",to+=2):(e=o,0===oo&&co(Gt)),e!==o&&(e="\t"),(t=e)===o&&(t=to,"\\u"===r.substr(to,2)?(e="\\u",to+=2):(e=o,0===oo&&co(jt)),e!==o&&(n=ua())!==o&&(s=ua())!==o&&(u=ua())!==o&&(a=ua())!==o?(i=n,l=s,c=u,f=a,t=e=String.fromCharCode(parseInt("0x"+i+l+c+f))):(to=t,t=o),t===o&&(t=to,92===r.charCodeAt(to)?(e="\\",to++):(e=o,0===oo&&co(Ht)),e!==o&&(e="\\"),(t=e)===o&&(t=to,"''"===r.substr(to,2)?(e="''",to+=2):(e=o,0===oo&&co(Yt)),e!==o&&(e="''"),(t=e)===o&&(t=to,'""'===r.substr(to,2)?(e='""',to+=2):(e=o,0===oo&&co(Bt)),e!==o&&(e='""'),(t=e)===o&&(t=to,"``"===r.substr(to,2)?(e="``",to+=2):(e=o,0===oo&&co(Wt)),e!==o&&(e="``"),t=e))))))))))))),t}function ra(){var r,t;return(r=function(){var r,t,e,n;return r=to,(t=ta())!==o&&(e=ea())!==o&&(n=na())!==o?r=t={type:"bigint",value:t+e+n}:(to=r,r=o),r===o&&(r=to,(t=ta())!==o&&(e=ea())!==o?(t=function(r,t){const e=r+t;return zi(r)?{type:"bigint",value:e}:parseFloat(e)}(t,e),r=t):(to=r,r=o),r===o&&(r=to,(t=ta())!==o&&(e=na())!==o?(t=function(r,t){return{type:"bigint",value:r+t}}(t,e),r=t):(to=r,r=o),r===o&&(r=to,(t=ta())!==o&&(t=function(r){return zi(r)?{type:"bigint",value:r}:parseFloat(r)}(t)),r=t))),r}())!==o&&(r=(t=r)&&"bigint"===t.type?t:{type:"number",value:t}),r}function ta(){var t,e,n;return(t=sa())===o&&(t=oa())===o&&(t=to,45===r.charCodeAt(to)?(e="-",to++):(e=o,0===oo&&co(zr)),e===o&&(43===r.charCodeAt(to)?(e="+",to++):(e=o,0===oo&&co(Zr))),e!==o&&(n=sa())!==o?t=e+=n:(to=t,t=o),t===o&&(t=to,45===r.charCodeAt(to)?(e="-",to++):(e=o,0===oo&&co(zr)),e===o&&(43===r.charCodeAt(to)?(e="+",to++):(e=o,0===oo&&co(Zr))),e!==o&&(n=oa())!==o?t=e=function(r,t){return r+t}(e,n):(to=t,t=o))),t}function ea(){var t,e,n,s;return t=to,46===r.charCodeAt(to)?(e=".",to++):(e=o,0===oo&&co(qt)),e!==o?((n=sa())===o&&(n=null),n!==o?t=e=(s=n)?"."+s:"":(to=t,t=o)):(to=t,t=o),t}function na(){var t,e,n;return t=to,(e=function(){var t,e,n,s;return t=to,Jt.test(r.charAt(to))?(e=r.charAt(to),to++):(e=o,0===oo&&co(re)),e!==o?(te.test(r.charAt(to))?(n=r.charAt(to),to++):(n=o,0===oo&&co(ee)),n===o&&(n=null),n!==o?t=e+=null!==(s=n)?s:"":(to=t,t=o)):(to=t,t=o),t}())!==o&&(n=sa())!==o?t=e+=n:(to=t,t=o),t}function sa(){var r,t;if(r=[],(t=oa())!==o)for(;t!==o;)r.push(t),t=oa();else r=o;return r!==o&&(r=r.join("")),r}function oa(){var t;return Kt.test(r.charAt(to))?(t=r.charAt(to),to++):(t=o,0===oo&&co(Zt)),t}function ua(){var t;return zt.test(r.charAt(to))?(t=r.charAt(to),to++):(t=o,0===oo&&co(Qt)),t}function aa(){var t,e,n,s;return t=to,"default"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(M)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function ia(){var t,e,n,s;return t=to,"to"===r.substr(to,2).toLowerCase()?(e=r.substr(to,2),to+=2):(e=o,0===oo&&co(ie)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function la(){var t,e,n,s;return t=to,"show"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(ce)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function ca(){var t,e,n,s;return t=to,"drop"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(fe)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="DROP":(to=t,t=o)):(to=t,t=o),t}function fa(){var t,e,n,s;return t=to,"update"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Le)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function ba(){var t,e,n,s;return t=to,"create"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Ce)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function va(){var t,e,n,s;return t=to,"temporary"===r.substr(to,9).toLowerCase()?(e=r.substr(to,9),to+=9):(e=o,0===oo&&co(de)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function pa(){var t,e,n,s;return t=to,"temp"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(we)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function La(){var t,e,n,s;return t=to,"delete"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(he)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function Ca(){var t,e,n,s;return t=to,"insert"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(ye)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function da(){var t,e,n,s;return t=to,"replace"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(Ae)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function wa(){var t,e,n,s;return t=to,"rename"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(me)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function ha(){var t,e,n,s;return t=to,"ignore"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Te)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function ya(){var t,e,n,s;return t=to,"partition"===r.substr(to,9).toLowerCase()?(e=r.substr(to,9),to+=9):(e=o,0===oo&&co(Ie)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="PARTITION":(to=t,t=o)):(to=t,t=o),t}function Ea(){var t,e,n,s;return t=to,"into"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Ne)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function Aa(){var t,e,n,s;return t=to,"set"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(sr)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="SET":(to=t,t=o)):(to=t,t=o),t}function ma(){var t,e,n,s;return t=to,"as"===r.substr(to,2).toLowerCase()?(e=r.substr(to,2),to+=2):(e=o,0===oo&&co(_e)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function Ta(){var t,e,n,s;return t=to,"table"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(ge)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="TABLE":(to=t,t=o)):(to=t,t=o),t}function Ia(){var t,e,n,s;return t=to,"tables"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Oe)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="TABLES":(to=t,t=o)):(to=t,t=o),t}function Na(){var t,e,n,s;return t=to,"database"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(xe)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="DATABASE":(to=t,t=o)):(to=t,t=o),t}function Ra(){var t,e,n,s;return t=to,"on"===r.substr(to,2).toLowerCase()?(e=r.substr(to,2),to+=2):(e=o,0===oo&&co(p)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function Sa(){var t,e,n,s;return t=to,"join"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(De)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function _a(){var t,e,n,s;return t=to,"values"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Ge)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function ga(){var t,e,n,s;return t=to,"using"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(je)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function Oa(){var t,e,n,s;return t=to,"with"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Ur)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function xa(){var t,e,n,s;return t=to,"by"===r.substr(to,2).toLowerCase()?(e=r.substr(to,2),to+=2):(e=o,0===oo&&co(Be)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function Ua(){var t,e,n,s;return t=to,"desc"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Ze)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="DESC":(to=t,t=o)):(to=t,t=o),t}function Ma(){var t,e,n,s;return t=to,"all"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(Qe)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="ALL":(to=t,t=o)):(to=t,t=o),t}function ka(){var t,e,n,s;return t=to,"distinct"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(Je)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="DISTINCT":(to=t,t=o)):(to=t,t=o),t}function Da(){var t,e,n,s;return t=to,"between"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(rn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="BETWEEN":(to=t,t=o)):(to=t,t=o),t}function $a(){var t,e,n,s;return t=to,"in"===r.substr(to,2).toLowerCase()?(e=r.substr(to,2),to+=2):(e=o,0===oo&&co(tn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="IN":(to=t,t=o)):(to=t,t=o),t}function Pa(){var t,e,n,s;return t=to,"is"===r.substr(to,2).toLowerCase()?(e=r.substr(to,2),to+=2):(e=o,0===oo&&co(en)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="IS":(to=t,t=o)):(to=t,t=o),t}function Fa(){var t,e,n,s;return t=to,"like"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(nn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="LIKE":(to=t,t=o)):(to=t,t=o),t}function Ga(){var t,e,n,s;return t=to,"exists"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(un)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="EXISTS":(to=t,t=o)):(to=t,t=o),t}function ja(){var t,e,n,s;return t=to,"not"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(X)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="NOT":(to=t,t=o)):(to=t,t=o),t}function Ha(){var t,e,n,s;return t=to,"and"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(an)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="AND":(to=t,t=o)):(to=t,t=o),t}function Ya(){var t,e,n,s;return t=to,"or"===r.substr(to,2).toLowerCase()?(e=r.substr(to,2),to+=2):(e=o,0===oo&&co(ln)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="OR":(to=t,t=o)):(to=t,t=o),t}function Ba(){var t,e,n,s;return t=to,"case"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Cn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function Wa(){var t,e,n,s;return t=to,"when"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(dn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function Xa(){var t,e,n,s;return t=to,"end"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(w)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e=[e,n]:(to=t,t=o)):(to=t,t=o),t}function Va(){var t,e,n,s;return t=to,"cast"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(yn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="CAST":(to=t,t=o)):(to=t,t=o),t}function qa(){var t,e,n,s;return t=to,"char"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(An)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="CHAR":(to=t,t=o)):(to=t,t=o),t}function Ka(){var t,e,n,s;return t=to,"varchar"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(mn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="VARCHAR":(to=t,t=o)):(to=t,t=o),t}function Za(){var t,e,n,s;return t=to,"numeric"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(Tn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="NUMERIC":(to=t,t=o)):(to=t,t=o),t}function za(){var t,e,n,s;return t=to,"decimal"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(In)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="DECIMAL":(to=t,t=o)):(to=t,t=o),t}function Qa(){var t,e,n,s;return t=to,"unsigned"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(Rn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="UNSIGNED":(to=t,t=o)):(to=t,t=o),t}function Ja(){var t,e,n,s;return t=to,"int"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(Sn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="INT":(to=t,t=o)):(to=t,t=o),t}function ri(){var t,e,n,s;return t=to,"integer"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(gn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="INTEGER":(to=t,t=o)):(to=t,t=o),t}function ti(){var t,e,n,s;return t=to,"smallint"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(xn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="SMALLINT":(to=t,t=o)):(to=t,t=o),t}function ei(){var t,e,n,s;return t=to,"tinyint"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(Un)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="TINYINT":(to=t,t=o)):(to=t,t=o),t}function ni(){var t,e,n,s;return t=to,"bigint"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(Pn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="BIGINT":(to=t,t=o)):(to=t,t=o),t}function si(){var t,e,n,s;return t=to,"float"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(Gn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="FLOAT":(to=t,t=o)):(to=t,t=o),t}function oi(){var t,e,n,s;return t=to,"double"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(jn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="DOUBLE":(to=t,t=o)):(to=t,t=o),t}function ui(){var t,e,n,s;return t=to,"real"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Hn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="REAL":(to=t,t=o)):(to=t,t=o),t}function ai(){var t,e,n,s;return t=to,"date"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Yn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="DATE":(to=t,t=o)):(to=t,t=o),t}function ii(){var t,e,n,s;return t=to,"datetime"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(Bn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="DATETIME":(to=t,t=o)):(to=t,t=o),t}function li(){var t,e,n,s;return t=to,"time"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Wn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="TIME":(to=t,t=o)):(to=t,t=o),t}function ci(){var t,e,n,s;return t=to,"timestamp"===r.substr(to,9).toLowerCase()?(e=r.substr(to,9),to+=9):(e=o,0===oo&&co(Xn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="TIMESTAMP":(to=t,t=o)):(to=t,t=o),t}function fi(){var t,e,n,s;return t=to,"current_timestamp"===r.substr(to,17).toLowerCase()?(e=r.substr(to,17),to+=17):(e=o,0===oo&&co(ss)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="CURRENT_TIMESTAMP":(to=t,t=o)):(to=t,t=o),t}function bi(){var t;return 64===r.charCodeAt(to)?(t="@",to++):(t=o,0===oo&&co(vs)),t}function vi(){var t;return(t=function(){var t;return"@@"===r.substr(to,2)?(t="@@",to+=2):(t=o,0===oo&&co(ps)),t}())===o&&(t=bi())===o&&(t=function(){var t;return 36===r.charCodeAt(to)?(t="$",to++):(t=o,0===oo&&co(Ls)),t}()),t}function pi(){var t;return 61===r.charCodeAt(to)?(t="=",to++):(t=o,0===oo&&co(Pr)),t}function Li(){var t,e,n,s;return t=to,"column"===r.substr(to,6).toLowerCase()?(e=r.substr(to,6),to+=6):(e=o,0===oo&&co(ys)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="COLUMN":(to=t,t=o)):(to=t,t=o),t}function Ci(){var t,e,n,s;return t=to,"index"===r.substr(to,5).toLowerCase()?(e=r.substr(to,5),to+=5):(e=o,0===oo&&co(Es)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="INDEX":(to=t,t=o)):(to=t,t=o),t}function di(){var t,e,n,s;return t=to,"key"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(_)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="KEY":(to=t,t=o)):(to=t,t=o),t}function wi(){var t,e,n,s;return t=to,"comment"===r.substr(to,7).toLowerCase()?(e=r.substr(to,7),to+=7):(e=o,0===oo&&co(Ts)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="COMMENT":(to=t,t=o)):(to=t,t=o),t}function hi(){var t;return 46===r.charCodeAt(to)?(t=".",to++):(t=o,0===oo&&co(qt)),t}function yi(){var t;return 44===r.charCodeAt(to)?(t=",",to++):(t=o,0===oo&&co(Us)),t}function Ei(){var t;return 42===r.charCodeAt(to)?(t="*",to++):(t=o,0===oo&&co(Qr)),t}function Ai(){var t;return 40===r.charCodeAt(to)?(t="(",to++):(t=o,0===oo&&co(_r)),t}function mi(){var t;return 41===r.charCodeAt(to)?(t=")",to++):(t=o,0===oo&&co(gr)),t}function Ti(){var t;return 59===r.charCodeAt(to)?(t=";",to++):(t=o,0===oo&&co(Ds)),t}function Ii(){var t;return"->"===r.substr(to,2)?(t="->",to+=2):(t=o,0===oo&&co($s)),t}function Ni(){var t;return"->>"===r.substr(to,3)?(t="->>",to+=3):(t=o,0===oo&&co(Ps)),t}function Ri(){var t;return(t=function(){var t;return"||"===r.substr(to,2)?(t="||",to+=2):(t=o,0===oo&&co(tt)),t}())===o&&(t=function(){var t;return"&&"===r.substr(to,2)?(t="&&",to+=2):(t=o,0===oo&&co(Fs)),t}()),t}function Si(){var r,t;for(r=[],(t=Ui())===o&&(t=gi());t!==o;)r.push(t),(t=Ui())===o&&(t=gi());return r}function _i(){var r,t;if(r=[],(t=Ui())===o&&(t=gi()),t!==o)for(;t!==o;)r.push(t),(t=Ui())===o&&(t=gi());else r=o;return r}function gi(){var t;return(t=function(){var t,e,n,s,u,a;if(t=to,"/*"===r.substr(to,2)?(e="/*",to+=2):(e=o,0===oo&&co(Gs)),e!==o){for(n=[],s=to,u=to,oo++,"*/"===r.substr(to,2)?(a="*/",to+=2):(a=o,0===oo&&co(js)),oo--,a===o?u=void 0:(to=u,u=o),u!==o&&(a=xi())!==o?s=u=[u,a]:(to=s,s=o);s!==o;)n.push(s),s=to,u=to,oo++,"*/"===r.substr(to,2)?(a="*/",to+=2):(a=o,0===oo&&co(js)),oo--,a===o?u=void 0:(to=u,u=o),u!==o&&(a=xi())!==o?s=u=[u,a]:(to=s,s=o);n!==o?("*/"===r.substr(to,2)?(s="*/",to+=2):(s=o,0===oo&&co(js)),s!==o?t=e=[e,n,s]:(to=t,t=o)):(to=t,t=o)}else to=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=to,"--"===r.substr(to,2)?(e="--",to+=2):(e=o,0===oo&&co(Hs)),e!==o){for(n=[],s=to,u=to,oo++,a=Mi(),oo--,a===o?u=void 0:(to=u,u=o),u!==o&&(a=xi())!==o?s=u=[u,a]:(to=s,s=o);s!==o;)n.push(s),s=to,u=to,oo++,a=Mi(),oo--,a===o?u=void 0:(to=u,u=o),u!==o&&(a=xi())!==o?s=u=[u,a]:(to=s,s=o);n!==o?t=e=[e,n]:(to=t,t=o)}else to=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=to,35===r.charCodeAt(to)?(e="#",to++):(e=o,0===oo&&co(Ys)),e!==o){for(n=[],s=to,u=to,oo++,a=Mi(),oo--,a===o?u=void 0:(to=u,u=o),u!==o&&(a=xi())!==o?s=u=[u,a]:(to=s,s=o);s!==o;)n.push(s),s=to,u=to,oo++,a=Mi(),oo--,a===o?u=void 0:(to=u,u=o),u!==o&&(a=xi())!==o?s=u=[u,a]:(to=s,s=o);n!==o?t=e=[e,n]:(to=t,t=o)}else to=t,t=o;return t}()),t}function Oi(){var r,t,e,n,s,u,a;return r=to,(t=wi())!==o&&Si()!==o?((e=pi())===o&&(e=null),e!==o&&Si()!==o&&(n=Zu())!==o?(u=e,a=n,r=t={type:(s=t).toLowerCase(),keyword:s.toLowerCase(),symbol:u,value:a}):(to=r,r=o)):(to=r,r=o),r}function xi(){var t;return r.length>to?(t=r.charAt(to),to++):(t=o,0===oo&&co(Bs)),t}function Ui(){var t;return Ws.test(r.charAt(to))?(t=r.charAt(to),to++):(t=o,0===oo&&co(Xs)),t}function Mi(){var t,e;if((t=function(){var t,e;return t=to,oo++,r.length>to?(e=r.charAt(to),to++):(e=o,0===oo&&co(Bs)),oo--,e===o?t=void 0:(to=t,t=o),t}())===o)if(t=[],Xt.test(r.charAt(to))?(e=r.charAt(to),to++):(e=o,0===oo&&co(Vt)),e!==o)for(;e!==o;)t.push(e),Xt.test(r.charAt(to))?(e=r.charAt(to),to++):(e=o,0===oo&&co(Vt));else t=o;return t}function ki(){var t,e;return t=to,el=[],void 0!==o&&Si()!==o?((e=Di())===o&&(e=function(){var t,e;return t=to,function(){var t;return"return"===r.substr(to,6).toLowerCase()?(t=r.substr(to,6),to+=6):(t=o,0===oo&&co(Cs)),t}()!==o&&Si()!==o&&(e=$i())!==o?t={type:"return",expr:e}:(to=t,t=o),t}()),e!==o?t={stmt:e,vars:el}:(to=t,t=o)):(to=t,t=o),t}function Di(){var t,e,n,s;return t=to,(e=Bi())===o&&(e=Wi()),e!==o&&Si()!==o?((n=function(){var t;return":="===r.substr(to,2)?(t=":=",to+=2):(t=o,0===oo&&co(ds)),t}())===o&&(n=pi()),n!==o&&Si()!==o&&(s=$i())!==o?t=e={type:"assign",left:e,symbol:n,right:s}:(to=t,t=o)):(to=t,t=o),t}function $i(){var t;return(t=Mo())===o&&(t=function(){var r,t,e,n,s;return r=to,(t=Bi())!==o&&Si()!==o&&(e=zo())!==o&&Si()!==o&&(n=Bi())!==o&&Si()!==o&&(s=Jo())!==o?r=t={type:"join",ltable:t,rtable:n,op:e,on:s}:(to=r,r=o),r}())===o&&(t=Pi())===o&&(t=function(){var t,e;return t=to,function(){var t;return 91===r.charCodeAt(to)?(t="[",to++):(t=o,0===oo&&co(Ms)),t}()!==o&&Si()!==o&&(e=Yi())!==o&&Si()!==o&&function(){var t;return 93===r.charCodeAt(to)?(t="]",to++):(t=o,0===oo&&co(ks)),t}()!==o?t={type:"array",value:e}:(to=t,t=o),t}()),t}function Pi(){var r,t,e,n,s,u,a,i;if(r=to,(t=Fi())!==o){for(e=[],n=to,(s=Si())!==o&&(u=Su())!==o&&(a=Si())!==o&&(i=Fi())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=Su())!==o&&(a=Si())!==o&&(i=Fi())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=Gr(t,e):(to=r,r=o)}else to=r,r=o;return r}function Fi(){var r,t,e,n,s,u,a,i;if(r=to,(t=Gi())!==o){for(e=[],n=to,(s=Si())!==o&&(u=gu())!==o&&(a=Si())!==o&&(i=Gi())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=gu())!==o&&(a=Si())!==o&&(i=Gi())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=Gr(t,e):(to=r,r=o)}else to=r,r=o;return r}function Gi(){var r,t,e;return(r=qu())===o&&(r=Bi())===o&&(r=Hi())===o&&(r=Yu())===o&&(r=to,Ai()!==o&&Si()!==o&&(t=Pi())!==o&&Si()!==o&&mi()!==o?((e=t).parentheses=!0,r=e):(to=r,r=o)),r}function ji(){var r,t,e,n,s,u,a;return r=to,(t=Fu())!==o?(e=to,(n=Si())!==o&&(s=hi())!==o&&(u=Si())!==o&&(a=Fu())!==o?e=n=[n,s,u,a]:(to=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){let e=r;return null!==t&&(e=`${r}.${t[3]}`),e}(t,e):(to=r,r=o)):(to=r,r=o),r}function Hi(){var r,t,e;return r=to,(t=ji())!==o&&Si()!==o&&Ai()!==o&&Si()!==o?((e=Yi())===o&&(e=null),e!==o&&Si()!==o&&mi()!==o?r=t={type:"function",name:t,args:{type:"expr_list",value:e}}:(to=r,r=o)):(to=r,r=o),r===o&&(r=to,(t=ji())!==o&&(t=function(r){return{type:"function",name:r,args:null}}(t)),r=t),r}function Yi(){var r,t,e,n,s,u,a,i;if(r=to,(t=Gi())!==o){for(e=[],n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=Gi())!==o?n=s=[s,u,a,i]:(to=n,n=o);n!==o;)e.push(n),n=to,(s=Si())!==o&&(u=yi())!==o&&(a=Si())!==o&&(i=Gi())!==o?n=s=[s,u,a,i]:(to=n,n=o);e!==o?r=t=I(t,e):(to=r,r=o)}else to=r,r=o;return r}function Bi(){var r,t,e,n,s;return r=to,(t=vi())!==o&&(e=Wi())!==o?(n=t,s=e,r=t={type:"var",...s,prefix:n}):(to=r,r=o),r}function Wi(){var t,e,n,s,u;return t=to,(e=Fu())!==o&&(n=function(){var t,e,n,s;for(t=[],e=to,46===r.charCodeAt(to)?(n=".",to++):(n=o,0===oo&&co(qt)),n!==o&&(s=Fu())!==o?e=n=[n,s]:(to=e,e=o);e!==o;)t.push(e),e=to,46===r.charCodeAt(to)?(n=".",to++):(n=o,0===oo&&co(qt)),n!==o&&(s=Fu())!==o?e=n=[n,s]:(to=e,e=o);return t!==o&&(t=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e][1]);return t}(t)),t}())!==o?(s=e,u=n,el.push(s),t=e={type:"var",name:s,members:u,prefix:null}):(to=t,t=o),t===o&&(t=to,(e=ra())!==o&&(e={type:"var",name:e.value,members:[],quoted:null,prefix:null}),t=e),t}function Xi(){var t;return(t=function(){var t,e,n,s;if(t=to,(e=qa())===o&&(e=Ka()),e!==o)if(Si()!==o)if(Ai()!==o)if(Si()!==o){if(n=[],Kt.test(r.charAt(to))?(s=r.charAt(to),to++):(s=o,0===oo&&co(Zt)),s!==o)for(;s!==o;)n.push(s),Kt.test(r.charAt(to))?(s=r.charAt(to),to++):(s=o,0===oo&&co(Zt));else n=o;n!==o&&(s=Si())!==o&&mi()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(to=t,t=o)}else to=t,t=o;else to=t,t=o;else to=t,t=o;else to=t,t=o;return t===o&&(t=to,(e=qa())!==o&&(e=Qs(e)),(t=e)===o&&(t=to,(e=Ka())!==o&&(e=Qs(e)),t=e)),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(t=to,(e=Za())===o&&(e=za())===o&&(e=Ja())===o&&(e=ri())===o&&(e=ti())===o&&(e=ei())===o&&(e=ni())===o&&(e=si())===o&&(e=oi())===o&&(e=function(){var t,e,n,s;return t=to,"bit"===r.substr(to,3).toLowerCase()?(e=r.substr(to,3),to+=3):(e=o,0===oo&&co(En)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="BIT":(to=t,t=o)):(to=t,t=o),t}())===o&&(e=ui()),e!==o)if((n=Si())!==o)if((s=Ai())!==o)if((u=Si())!==o){if(a=[],Kt.test(r.charAt(to))?(i=r.charAt(to),to++):(i=o,0===oo&&co(Zt)),i!==o)for(;i!==o;)a.push(i),Kt.test(r.charAt(to))?(i=r.charAt(to),to++):(i=o,0===oo&&co(Zt));else a=o;if(a!==o)if((i=Si())!==o){if(l=to,(c=yi())!==o)if((f=Si())!==o){if(b=[],Kt.test(r.charAt(to))?(v=r.charAt(to),to++):(v=o,0===oo&&co(Zt)),v!==o)for(;v!==o;)b.push(v),Kt.test(r.charAt(to))?(v=r.charAt(to),to++):(v=o,0===oo&&co(Zt));else b=o;b!==o?l=c=[c,f,b]:(to=l,l=o)}else to=l,l=o;else to=l,l=o;l===o&&(l=null),l!==o&&(c=Si())!==o&&(f=mi())!==o&&(b=Si())!==o?((v=Vi())===o&&(v=null),v!==o?(p=l,L=v,t=e={dataType:e,length:parseInt(a.join(""),10),scale:p&&parseInt(p[2].join(""),10),parentheses:!0,suffix:L}):(to=t,t=o)):(to=t,t=o)}else to=t,t=o;else to=t,t=o}else to=t,t=o;else to=t,t=o;else to=t,t=o;else to=t,t=o;if(t===o){if(t=to,(e=Za())===o&&(e=za())===o&&(e=Ja())===o&&(e=ri())===o&&(e=ti())===o&&(e=ei())===o&&(e=ni())===o&&(e=si())===o&&(e=oi())===o&&(e=ui()),e!==o){if(n=[],Kt.test(r.charAt(to))?(s=r.charAt(to),to++):(s=o,0===oo&&co(Zt)),s!==o)for(;s!==o;)n.push(s),Kt.test(r.charAt(to))?(s=r.charAt(to),to++):(s=o,0===oo&&co(Zt));else n=o;n!==o&&(s=Si())!==o?((u=Vi())===o&&(u=null),u!==o?(e=function(r,t,e){return{dataType:r,length:parseInt(t.join(""),10),suffix:e}}(e,n,u),t=e):(to=t,t=o)):(to=t,t=o)}else to=t,t=o;t===o&&(t=to,(e=Za())===o&&(e=za())===o&&(e=Ja())===o&&(e=ri())===o&&(e=ti())===o&&(e=ei())===o&&(e=ni())===o&&(e=si())===o&&(e=oi())===o&&(e=ui()),e!==o&&(n=Si())!==o?((s=Vi())===o&&(s=null),s!==o&&(u=Si())!==o?(e=function(r,t){return{dataType:r,suffix:t}}(e,s),t=e):(to=t,t=o)):(to=t,t=o))}return t}())===o&&(t=function(){var t,e,n,s;return t=to,(e=ai())===o&&(e=ii())===o&&(e=li())===o&&(e=ci()),e!==o&&Si()!==o&&Ai()!==o&&Si()!==o?(Js.test(r.charAt(to))?(n=r.charAt(to),to++):(n=o,0===oo&&co(ro)),n!==o&&Si()!==o&&mi()!==o&&Si()!==o?((s=Vi())===o&&(s=null),s!==o?t=e={dataType:e,length:parseInt(n,10),parentheses:!0}:(to=t,t=o)):(to=t,t=o)):(to=t,t=o),t===o&&(t=to,(e=ai())===o&&(e=ii())===o&&(e=li())===o&&(e=ci()),e!==o&&(e=Qs(e)),t=e),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=to,"json"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(On)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="JSON":(to=t,t=o)):(to=t,t=o),t}())!==o&&(t=Qs(t)),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=to,"tinytext"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(Mn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="TINYTEXT":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"text"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(kn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="TEXT":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"mediumtext"===r.substr(to,10).toLowerCase()?(e=r.substr(to,10),to+=10):(e=o,0===oo&&co(Dn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="MEDIUMTEXT":(to=t,t=o)):(to=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=to,"longtext"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co($n)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="LONGTEXT":(to=t,t=o)):(to=t,t=o),t}()),t!==o&&(t={dataType:t}),t}())===o&&(t=function(){var t,e,n,s,u;return t=to,(e=function(){var t,e,n,s;return t=to,"enum"===r.substr(to,4).toLowerCase()?(e=r.substr(to,4),to+=4):(e=o,0===oo&&co(Fn)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="ENUM":(to=t,t=o)):(to=t,t=o),t}())!==o&&Si()!==o&&(n=bu())!==o?(s=e,(u=n).parentheses=!0,t=e={dataType:s,expr:u}):(to=t,t=o),t}())===o&&(t=function(){var t;return"boolean"===r.substr(to,7).toLowerCase()?(t=r.substr(to,7),to+=7):(t=o,0===oo&&co(zs)),t!==o&&(t={dataType:"BOOLEAN"}),t}())===o&&(t=function(){var t;return"blob"===r.substr(to,4).toLowerCase()?(t=r.substr(to,4),to+=4):(t=o,0===oo&&co(Vs)),t===o&&("tinyblob"===r.substr(to,8).toLowerCase()?(t=r.substr(to,8),to+=8):(t=o,0===oo&&co(qs)),t===o&&("mediumblob"===r.substr(to,10).toLowerCase()?(t=r.substr(to,10),to+=10):(t=o,0===oo&&co(Ks)),t===o&&("longblob"===r.substr(to,8).toLowerCase()?(t=r.substr(to,8),to+=8):(t=o,0===oo&&co(Zs))))),t!==o&&(t={dataType:t.toUpperCase()}),t}()),t}function Vi(){var t,e,n;return t=to,(e=Qa())===o&&(e=null),e!==o&&Si()!==o?((n=function(){var t,e,n,s;return t=to,"zerofill"===r.substr(to,8).toLowerCase()?(e=r.substr(to,8),to+=8):(e=o,0===oo&&co(_n)),e!==o?(n=to,oo++,s=Gu(),oo--,s===o?n=void 0:(to=n,n=o),n!==o?t=e="ZEROFILL":(to=t,t=o)):(to=t,t=o),t}())===o&&(n=null),n!==o?t=e=function(r,t){const e=[];return r&&e.push(r),t&&e.push(t),e}(e,n):(to=t,t=o)):(to=t,t=o),t}const qi={ALTER:!0,ALL:!0,ADD:!0,AND:!0,AS:!0,ASC:!0,BETWEEN:!0,BY:!0,CALL:!0,CASE:!0,CREATE:!0,CONTAINS:!0,CURRENT_DATE:!0,CURRENT_TIME:!0,CURRENT_TIMESTAMP:!0,CURRENT_USER:!0,DELETE:!0,DESC:!0,DISTINCT:!0,DROP:!0,ELSE:!0,END:!0,EXISTS:!0,EXPLAIN:!0,FALSE:!0,FROM:!0,FULL:!0,GROUP:!0,HAVING:!0,IN:!0,INNER:!0,INSERT:!0,INTO:!0,IS:!0,JOIN:!0,KEY:!0,LEFT:!0,LIKE:!0,LIMIT:!0,LOW_PRIORITY:!0,NOT:!0,NULL:!0,ON:!0,OR:!0,ORDER:!0,OUTER:!0,RECURSIVE:!0,RENAME:!0,READ:!0,RIGHT:!0,SELECT:!0,SESSION_USER:!0,SET:!0,SHOW:!0,SYSTEM_USER:!0,TABLE:!0,THEN:!0,TRUE:!0,TRUNCATE:!0,UNION:!0,UPDATE:!0,USING:!0,VALUES:!0,WITH:!0,WHEN:!0,WHERE:!0,WRITE:!0,GLOBAL:!0,SESSION:!0,LOCAL:!0,PERSIST:!0,PERSIST_ONLY:!0};function Ki(r,t){return{type:"unary_expr",operator:r,expr:t}}function Zi(r,t,e){return{type:"binary_expr",operator:r,left:t,right:e}}function zi(r){const t=n(Number.MAX_SAFE_INTEGER);return!(n(r)<t)}function Qi(r,t,e=3){const n=[r];for(let r=0;r<t.length;r++)delete t[r][e].tableList,delete t[r][e].columnList,n.push(t[r][e]);return n}function Ji(r,t){let e=r;for(let r=0;r<t.length;r++)e=Zi(t[r][1],e,t[r][3]);return e}function rl(r){return ol[r]||r||null}function tl(r){const t=new Set;for(let e of r.keys()){const r=e.split("::");if(!r){t.add(e);break}r&&r[1]&&(r[1]=rl(r[1])),t.add(r.join("::"))}return Array.from(t)}let el=[];const nl=new Set,sl=new Set,ol={};if((e=a())!==o&&to===r.length)return e;throw e!==o&&to<r.length&&co({type:"end"}),function(r,t,e){return new s(s.buildMessage(r,t),r,t,e)}(so,no<r.length?r.charAt(no):null,no<r.length?lo(no,no+1):lo(no,no))}}},function(r,t,e){var n=e(0);function s(r,t,e,n){this.message=r,this.expected=t,this.found=e,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,s)}!function(r,t){function e(){this.constructor=r}e.prototype=t.prototype,r.prototype=new e}(s,Error),s.buildMessage=function(r,t){var e={literal:function(r){return'"'+s(r.text)+'"'},class:function(r){var t,e="";for(t=0;t<r.parts.length;t++)e+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+e+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function n(r){return r.charCodeAt(0).toString(16).toUpperCase()}function s(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}function o(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}return"Expected "+function(r){var t,n,s,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(s=r[t],e[s.type](s));if(o.sort(),o.length>0){for(t=1,n=1;t<o.length;t++)o[t-1]!==o[t]&&(o[n]=o[t],n++);o.length=n}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+s(r)+'"':"end of input"}(t)+" found."},r.exports={SyntaxError:s,parse:function(r,t){t=void 0!==t?t:{};var e,o={},u={start:su},a=su,i=function(r,t){return Ac(r,t)},l=Jo("INCLUDE",!0),c=Jo("FILESTREAM_ON",!0),f=function(r,t){return Ac(r,t,1)},b=Jo("IF",!0),v=function(r,t){return Ac(r,t)},p=Jo("UNIQUE",!0),L=Jo("KEY",!0),C=Jo("PRIMARY",!0),d=Jo("IDENTITY",!0),w=Jo("COLUMN_FORMAT",!0),h=Jo("FIXED",!0),y=Jo("DYNAMIC",!0),E=Jo("DEFAULT",!0),A=Jo("STORAGE",!0),m=Jo("DISK",!0),T=Jo("MEMORY",!0),I=Jo("CURSOR",!0),N=Jo("EXECUTE",!0),R=Jo("EXEC",!0),S=Jo("@",!1),_=Jo("if",!0),g=Jo("exists",!0),O=Jo("PROCEDURE",!0),x=Jo("ENCRYPTION",!0),U=Jo("SCHEMABINDING",!0),M=Jo("VIEW_METADATA",!0),k=Jo("CHECK",!0),D=Jo("OPTION",!0),$=Jo("ALGORITHM",!0),P=Jo("INSTANT",!0),F=Jo("INPLACE",!0),G=Jo("COPY",!0),j=Jo("LOCK",!0),H=Jo("NONE",!0),Y=Jo("SHARED",!0),B=Jo("EXCLUSIVE",!0),W=Jo("NOCHECK",!0),X=Jo("PRIMARY KEY",!0),V=Jo("NOT",!0),q=Jo("FOR",!0),K=Jo("REPLICATION",!0),Z=Jo("FOREIGN KEY",!0),z=Jo("MATCH FULL",!0),Q=Jo("MATCH PARTIAL",!0),J=Jo("MATCH SIMPLE",!0),rr=Jo("RESTRICT",!0),tr=Jo("CASCADE",!0),er=Jo("SET NULL",!0),nr=Jo("NO ACTION",!0),sr=Jo("SET DEFAULT",!0),or=Jo("CHARACTER",!0),ur=Jo("SET",!0),ar=Jo("CHARSET",!0),ir=Jo("COLLATE",!0),lr=Jo("AUTO_INCREMENT",!0),cr=Jo("AVG_ROW_LENGTH",!0),fr=Jo("KEY_BLOCK_SIZE",!0),br=Jo("MAX_ROWS",!0),vr=Jo("MIN_ROWS",!0),pr=Jo("STATS_SAMPLE_PAGES",!0),Lr=Jo("CONNECTION",!0),Cr=Jo("COMPRESSION",!0),dr=Jo("'",!1),wr=Jo("ZLIB",!0),hr=Jo("LZ4",!0),yr=Jo("ENGINE",!0),Er=Jo("TEXTIMAGE_ON",!0),Ar=Jo("READ",!0),mr=Jo("LOCAL",!0),Tr=Jo("LOW_PRIORITY",!0),Ir=Jo("WRITE",!0),Nr=Jo("(",!1),Rr=Jo(")",!1),Sr=Jo("PERCENT",!0),_r=Jo("BTREE",!0),gr=Jo("HASH",!0),Or=Jo("PARTITIONS",!0),xr=function(r,t,e){return{type:r.toLowerCase(),symbol:t,expr:e}},Ur=Jo("FILLFACTOR",!0),Mr=Jo("MAX_DURATION",!0),kr=Jo("MAXDOP",!0),Dr=Jo("WITH",!0),$r=Jo("PARSER",!0),Pr=Jo("VISIBLE",!0),Fr=Jo("INVISIBLE",!0),Gr=Jo("PAD_INDEX",!0),jr=Jo("SORT_IN_TEMPDB",!0),Hr=Jo("IGNORE_DUP_KEY",!0),Yr=Jo("STATISTICS_NORECOMPUTE",!0),Br=Jo("STATISTICS_INCREMENTAL",!0),Wr=Jo("DROP_EXISTING",!0),Xr=Jo("ONLINE",!0),Vr=Jo("RESUMABLE",!0),qr=Jo("ALLOW_ROW_LOCKS",!0),Kr=Jo("ALLOW_PAGE_LOCKS",!0),Zr=Jo("OPTIMIZE_FOR_SEQUENTIAL_KEY",!0),zr=Jo("DATA_COMPRESSION",!0),Qr=Jo("ROW",!0),Jr=Jo("PAGE",!1),rt=function(r,t){return t.unshift(r),t.forEach((r=>{const{table:t,as:e}=r;_c[t]=t,e&&(_c[e]=t),function(r){const t=Ic(r);r.clear(),t.forEach((t=>r.add(t)))}(Sc)})),t},tt=Jo("FORCESEEK",!0),et=Jo("SPATIAL_WINDOW_MAX_CELLS",!0),nt=Jo("NOEXPAND",!0),st=Jo("FORCESCAN",!0),ot=Jo("HOLDLOCK",!0),ut=Jo("NOLOCK",!0),at=Jo("NOWAIT",!0),it=Jo("PAGLOCK",!0),lt=Jo("READCOMMITTED",!0),ct=Jo("READCOMMITTEDLOCK",!0),ft=Jo("READPAST",!0),bt=Jo("READUNCOMMITTED",!0),vt=Jo("REPEATABLEREAD ",!0),pt=Jo("ROWLOCK",!0),Lt=Jo("SERIALIZABLE",!0),Ct=Jo("SNAPSHOT",!0),dt=Jo("TABLOCK",!0),wt=Jo("TABLOCKX",!0),ht=Jo("UPDLOCK",!0),yt=Jo("XLOCK",!0),Et=Jo("RAW",!0),At=Jo("AUTO",!0),mt=Jo("EXPLICIT",!0),Tt=Jo("PATH",!0),It=Jo("XML",!0),Nt=Jo("=",!1),Rt=function(r,t){return mc(r,t)},St=Jo("!",!1),_t=function(r){return r[0]+" "+r[2]},gt=Jo(">=",!1),Ot=Jo(">",!1),xt=Jo("<=",!1),Ut=Jo("<>",!1),Mt=Jo("<",!1),kt=Jo("!=",!1),Dt=Jo("+",!1),$t=Jo("-",!1),Pt=Jo("*",!1),Ft=Jo("/",!1),Gt=Jo("%",!1),jt=function(r){return!0===wc[r.toUpperCase()]},Ht=Jo('"',!1),Yt=/^[^"]/,Bt=ru(['"'],!0,!1),Wt=function(r){return r.join("")},Xt=/^[^']/,Vt=ru(["'"],!0,!1),qt=Jo("`",!1),Kt=/^[^`]/,Zt=ru(["`"],!0,!1),zt=Jo("[",!1),Qt=/^[^\]]/,Jt=ru(["]"],!0,!1),re=Jo("]",!1),te=function(r,t){return r+t.join("")},ee=/^[A-Za-z_@#]/,ne=ru([["A","Z"],["a","z"],"_","@","#"],!1,!1),se=/^[A-Za-z0-9_\-@$]/,oe=ru([["A","Z"],["a","z"],["0","9"],"_","-","@","$"],!1,!1),ue=/^[A-Za-z0-9_:]/,ae=ru([["A","Z"],["a","z"],["0","9"],"_",":"],!1,!1),ie=Jo(":",!1),le=Jo("OVER",!0),ce=Jo("FOLLOWING",!0),fe=Jo("PRECEDING",!0),be=Jo("CURRENT",!0),ve=Jo("UNBOUNDED",!0),pe=Jo("N",!0),Le=function(r,t){return{type:r.toLowerCase(),value:t[1].join("")}},Ce=/^[^"\\\0-\x1F\x7F]/,de=ru(['"',"\\",["\0",""],""],!0,!1),we=/^[^'\\]/,he=ru(["'","\\"],!0,!1),ye=Jo("\\'",!1),Ee=Jo('\\"',!1),Ae=Jo("\\\\",!1),me=Jo("\\/",!1),Te=Jo("\\b",!1),Ie=Jo("\\f",!1),Ne=Jo("\\n",!1),Re=Jo("\\r",!1),Se=Jo("\\t",!1),_e=Jo("\\u",!1),ge=Jo("\\",!1),Oe=Jo("''",!1),xe=Jo('""',!1),Ue=Jo("``",!1),Me=/^[\n\r]/,ke=ru(["\n","\r"],!1,!1),De=Jo(".",!1),$e=/^[0-9]/,Pe=ru([["0","9"]],!1,!1),Fe=/^[0-9a-fA-F]/,Ge=ru([["0","9"],["a","f"],["A","F"]],!1,!1),je=/^[eE]/,He=ru(["e","E"],!1,!1),Ye=/^[+\-]/,Be=ru(["+","-"],!1,!1),We=Jo("NULL",!0),Xe=Jo("NOT NULL",!0),Ve=Jo("TRUE",!0),qe=Jo("TO",!0),Ke=Jo("TOP",!0),Ze=Jo("FALSE",!0),ze=Jo("DROP",!0),Qe=Jo("DECLARE",!0),Je=Jo("USE",!0),rn=Jo("ALTER",!0),tn=Jo("SELECT",!0),en=Jo("UPDATE",!0),nn=Jo("CREATE",!0),sn=Jo("TEMPORARY",!0),on=Jo("DELETE",!0),un=Jo("INSERT",!0),an=Jo("RECURSIVE",!1),ln=Jo("REPLACE",!0),cn=Jo("RENAME",!0),fn=Jo("IGNORE",!0),bn=Jo("PARTITION",!0),vn=Jo("INTO",!0),pn=Jo("FROM",!0),Ln=Jo("UNLOCK",!0),Cn=Jo("AS",!0),dn=Jo("TABLE",!0),wn=Jo("VIEW",!0),hn=Jo("DATABASE",!0),yn=Jo("SCHEME",!0),En=Jo("TABLES",!0),An=Jo("ON",!0),mn=Jo("OFF",!0),Tn=Jo("LEFT",!0),In=Jo("RIGHT",!0),Nn=Jo("FULL",!0),Rn=Jo("INNER",!0),Sn=Jo("CROSS",!0),_n=Jo("JOIN",!0),gn=Jo("OUTER",!0),On=Jo("UNION",!0),xn=Jo("VALUES",!0),Un=Jo("USING",!0),Mn=Jo("WHERE",!0),kn=Jo("GO",!0),Dn=Jo("GROUP",!0),$n=Jo("BY",!0),Pn=Jo("ORDER",!0),Fn=Jo("HAVING",!0),Gn=Jo("LIMIT",!0),jn=Jo("OFFSET",!0),Hn=Jo("ASC",!0),Yn=Jo("DESC",!0),Bn=Jo("ALL",!0),Wn=Jo("DISTINCT",!0),Xn=Jo("BETWEEN",!0),Vn=Jo("IN",!0),qn=Jo("IS",!0),Kn=Jo("LIKE",!0),Zn=Jo("EXISTS",!0),zn=Jo("AND",!0),Qn=Jo("OR",!0),Jn=Jo("COUNT",!0),rs=Jo("MAX",!0),ts=Jo("MIN",!0),es=Jo("SUM",!0),ns=Jo("AVG",!0),ss=Jo("CALL",!0),os=Jo("CASE",!0),us=Jo("WHEN",!0),as=Jo("THEN",!0),is=Jo("ELSE",!0),ls=Jo("END",!0),cs=Jo("CAST",!0),fs=Jo("BIT",!0),bs=Jo("MONEY",!0),vs=Jo("SMALLMONEY",!0),ps=Jo("CHAR",!0),Ls=Jo("VARCHAR",!0),Cs=Jo("NCHAR",!0),ds=Jo("NVARCHAR",!0),ws=Jo("NUMERIC",!0),hs=Jo("DECIMAL",!0),ys=Jo("SIGNED",!0),Es=Jo("UNSIGNED",!0),As=Jo("INT",!0),ms=Jo("ZEROFILL",!0),Ts=Jo("INTEGER",!0),Is=Jo("JSON",!0),Ns=Jo("SMALLINT",!0),Rs=Jo("TINYINT",!0),Ss=Jo("TINYTEXT",!0),_s=Jo("TEXT",!0),gs=Jo("MEDIUMTEXT",!0),Os=Jo("LONGTEXT",!0),xs=Jo("BIGINT",!0),Us=Jo("FLOAT",!0),Ms=Jo("REAL",!0),ks=Jo("DOUBLE",!0),Ds=Jo("DATE",!0),$s=Jo("SMALLDATETIME",!0),Ps=Jo("DATETIME",!0),Fs=Jo("DATETIME2",!0),Gs=Jo("DATETIMEOFFSET",!0),js=Jo("ROWS",!0),Hs=Jo("TIME",!0),Ys=Jo("TIMESTAMP",!0),Bs=Jo("TRUNCATE",!0),Ws=Jo("UNIQUEIDENTIFIER",!0),Xs=Jo("USER",!0),Vs=Jo("CURRENT_DATE",!0),qs=Jo("INTERVAL",!0),Ks=Jo("YEAR",!0),Zs=Jo("MONTH",!0),zs=Jo("DAY",!0),Qs=Jo("HOUR",!0),Js=Jo("MINUTE",!0),ro=Jo("SECOND",!0),to=Jo("CURRENT_TIME",!0),eo=Jo("CURRENT_TIMESTAMP",!0),no=Jo("CURRENT_USER",!0),so=Jo("SESSION_USER",!0),oo=Jo("SYSTEM_USER",!0),uo=Jo("GLOBAL",!0),ao=Jo("SESSION",!0),io=Jo("PIVOT",!0),lo=Jo("UNPIVOT",!0),co=Jo("PERSIST",!0),fo=Jo("PERSIST_ONLY",!0),bo=Jo("@@",!1),vo=Jo("$",!1),po=Jo("return",!0),Lo=Jo(":=",!1),Co=Jo("DUAL",!0),wo=Jo("ADD",!0),ho=Jo("COLUMN",!0),yo=Jo("INDEX",!0),Eo=Jo("FULLTEXT",!0),Ao=Jo("SPATIAL",!0),mo=Jo("CLUSTERED",!0),To=Jo("NONCLUSTERED",!0),Io=Jo("COMMENT",!0),No=Jo("CONSTRAINT",!0),Ro=Jo("REFERENCES",!0),So=Jo("SQL_CALC_FOUND_ROWS",!0),_o=Jo("SQL_CACHE",!0),go=Jo("SQL_NO_CACHE",!0),Oo=Jo("SQL_SMALL_RESULT",!0),xo=Jo("SQL_BIG_RESULT",!0),Uo=Jo("SQL_BUFFER_RESULT",!0),Mo=Jo(",",!1),ko=Jo(";",!1),Do=Jo("||",!1),$o=Jo("&&",!1),Po=Jo("/*",!1),Fo=Jo("*/",!1),Go=Jo("--",!1),jo=Jo("#",!1),Ho={type:"any"},Yo=/^[ \t\n\r]/,Bo=ru([" ","\t","\n","\r"],!1,!1),Wo=function(r,t,e){return r&&!e||!r&&e},Xo=function(r,t,e){return{dataType:t}},Vo=function(r,t,e){return{dataType:t}},qo=0,Ko=[{line:1,column:1}],Zo=0,zo=[],Qo=0;if("startRule"in t){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function Jo(r,t){return{type:"literal",text:r,ignoreCase:t}}function ru(r,t,e){return{type:"class",parts:r,inverted:t,ignoreCase:e}}function tu(t){var e,n=Ko[t];if(n)return n;for(e=t-1;!Ko[e];)e--;for(n={line:(n=Ko[e]).line,column:n.column};e<t;)10===r.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return Ko[t]=n,n}function eu(r,t){var e=tu(r),n=tu(t);return{start:{offset:r,line:e.line,column:e.column},end:{offset:t,line:n.line,column:n.column}}}function nu(r){qo<Zo||(qo>Zo&&(Zo=qo,zo=[]),zo.push(r))}function su(){var r,t,e,n,s,u,a,i;if(r=qo,(t=ou())!==o)if(Ql()!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Wi())!==o&&(a=Ql())!==o?((i=ou())===o&&(i=null),i!==o?n=s=[s,u,a,i]:(qo=n,n=o)):(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Wi())!==o&&(a=Ql())!==o?((i=ou())===o&&(i=null),i!==o?n=s=[s,u,a,i]:(qo=n,n=o)):(qo=n,n=o);e!==o?r=t=function(r,t){if(!t||0===t.length)return r;delete r.tableList,delete r.columnList;let e=r;for(let r=0;r<t.length;r++){const n=t[r][3]||[];delete n.tableList,delete n.columnList,e.go_next=n,e.go="go",e=e.go_next}return{tableList:Array.from(Rc),columnList:Ic(Sc),ast:r}}(t,e):(qo=r,r=o)}else qo=r,r=o;else qo=r,r=o;return r}function ou(){var r,t,e;return r=qo,Ql()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=au())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Zl())!==o&&(a=Ql())!==o&&(i=au())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Zl())!==o&&(a=Ql())!==o&&(i=au())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?(t=function(r,t){const e=r&&r.ast||r,n=t&&t.length&&t[0].length>=4?[e]:e;for(let r=0;r<t.length;r++)t[r][3]&&0!==t[r][3].length&&n.push(t[r][3]&&t[r][3].ast||t[r][3]);return{tableList:Array.from(Rc),columnList:Ic(Sc),ast:n}}(t,e),r=t):(qo=r,r=o)}else qo=r,r=o;return r}())!==o&&Ql()!==o?((e=Zl())===o&&(e=null),e!==o?r=t:(qo=r,r=o)):(qo=r,r=o),r}function uu(){var t;return(t=function(){var t,e,n,s,u,a,i,l,c,b,v;return t=qo,(e=Ai())!==o&&Ql()!==o&&(n=Di())!==o&&Ql()!==o?((s=hu())===o&&(s=null),s!==o&&Ql()!==o&&(u=Ju())!==o?(l=e,c=n,b=s,(v=u)&&v.forEach((r=>Rc.add(`${l}::${r.db}::${r.table}`))),t=e={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:l.toLowerCase(),keyword:c.toLowerCase(),prefix:b,name:v}}):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=Ai())!==o&&Ql()!==o?("procedure"===r.substr(qo,9).toLowerCase()?(n=r.substr(qo,9),qo+=9):(n=o,0===Qo&&nu(O)),n!==o&&Ql()!==o&&(s=Fa())!==o?(e=function(r,t,e){return{tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),name:e}}}(e,n,s),t=e):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=Ai())!==o&&Ql()!==o&&(n=Dl())!==o&&Ql()!==o&&(s=$a())!==o&&Ql()!==o&&(u=Fi())!==o&&Ql()!==o&&(a=oa())!==o&&Ql()!==o?((i=function(){var r,t,e,n,s,u;if(r=qo,(t=Au())===o&&(t=mu()),t!==o){for(e=[],n=qo,(s=Ql())!==o?((u=Au())===o&&(u=mu()),u!==o?n=s=[s,u]:(qo=n,n=o)):(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o?((u=Au())===o&&(u=mu()),u!==o?n=s=[s,u]:(qo=n,n=o)):(qo=n,n=o);e!==o?r=t=f(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())===o&&(i=null),i!==o&&Ql()!==o?(e=function(r,t,e,n,s){return{tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),name:e,table:n,options:s}}}(e,n,s,a,i),t=e):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=Ai())!==o&&Ql()!==o&&(n=$i())!==o&&Ql()!==o?((s=hu())===o&&(s=null),s!==o&&Ql()!==o&&(u=Ju())!==o?(e=function(r,t,e,n){return{tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),prefix:e,name:n}}}(e,n,s,u),t=e):(qo=t,t=o)):(qo=t,t=o)))),t}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s,u,a,l,c,f,b,v,p,L,C,d,w,h,y;return r=qo,(t=Ni())!==o&&Ql()!==o?((e=Ri())===o&&(e=null),e!==o&&Ql()!==o&&Di()!==o&&Ql()!==o?((n=bu())===o&&(n=null),n!==o&&Ql()!==o&&(s=Ju())!==o&&Ql()!==o&&(u=vu())!==o&&Ql()!==o?((a=function(){var r,t,e,n,s,u,a,l;if(r=qo,(t=Uu())!==o){for(e=[],n=qo,(s=Ql())!==o?((u=Bl())===o&&(u=null),u!==o&&(a=Ql())!==o&&(l=Uu())!==o?n=s=[s,u,a,l]:(qo=n,n=o)):(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o?((u=Bl())===o&&(u=null),u!==o&&(a=Ql())!==o&&(l=Uu())!==o?n=s=[s,u,a,l]:(qo=n,n=o)):(qo=n,n=o);e!==o?r=t=i(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())===o&&(a=null),a!==o&&Ql()!==o?((l=Oi())===o&&(l=_i()),l===o&&(l=null),l!==o&&Ql()!==o?((c=ki())===o&&(c=null),c!==o&&Ql()!==o?((f=lu())===o&&(f=null),f!==o?(b=t,v=e,p=n,C=u,d=a,w=l,h=c,y=f,(L=s)&&L.forEach((r=>Rc.add(`create::${r.db}::${r.table}`))),r=t={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:b[0].toLowerCase(),keyword:"table",temporary:v&&v[0].toLowerCase(),if_not_exists:p,table:L,ignore_replace:w&&w[0].toLowerCase(),as:h&&h[0].toLowerCase(),query_expr:y&&y.ast,create_definitions:C,table_options:d}}):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o),r===o&&(r=qo,(t=Ni())!==o&&Ql()!==o?((e=Ri())===o&&(e=null),e!==o&&Ql()!==o&&Di()!==o&&Ql()!==o?((n=bu())===o&&(n=null),n!==o&&Ql()!==o&&(s=Ju())!==o&&Ql()!==o&&(u=function r(){var t,e,n;return(t=function(){var r,t,e;return r=qo,(t=rl())!==o&&Ql()!==o&&(e=Ju())!==o?(t=function(r){return{type:"like",table:r}}(e),r=t):(qo=r,r=o),r}())===o&&(t=qo,Xl()!==o&&Ql()!==o&&(e=r())!==o&&Ql()!==o&&Vl()!==o?((n=e).parentheses=!0,t=n):(qo=t,t=o)),t}())!==o?(t=function(r,t,e,n,s){return n&&n.forEach((r=>Rc.add(`create::${r.db}::${r.table}`))),{tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:r[0].toLowerCase(),keyword:"table",temporary:t&&t[0].toLowerCase(),if_not_exists:e,table:n,like:s}}}(t,e,n,s,u),r=t):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)),r}())===o&&(t=function(){var t,e,n,s,u,a,i,f,b,v,p,L,C,d,w,h,y,E,A,m,T,I,N,R,S,_,g,O,x,U;return t=qo,(e=Ni())!==o&&Ql()!==o?((n=Pl())===o&&(n=Fl())===o&&(n=Gl()),n===o&&(n=null),n!==o&&Ql()!==o&&(s=Dl())!==o&&Ql()!==o&&(u=Fa())!==o&&Ql()!==o&&(a=Fi())!==o&&Ql()!==o&&(i=oa())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(f=cu())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o?((b=function(){var t,e,n,s,u;return t=qo,"include"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(l)),e!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=Pa())!==o&&Ql()!==o&&Vl()!==o?(u=n,t=e={type:(s=e).toLowerCase(),keyword:s.toLowerCase(),columns:u}):(qo=t,t=o),t}())===o&&(b=null),b!==o&&Ql()!==o?((v=aa())===o&&(v=null),v!==o&&Ql()!==o?(p=qo,(L=Bi())!==o&&(C=Ql())!==o&&(d=Xl())!==o&&(w=Ql())!==o&&(h=Ku())!==o&&(y=Ql())!==o&&(E=Vl())!==o?p=L=[L,C,d,w,h,y,E]:(qo=p,p=o),p===o&&(p=null),p!==o&&(L=Ql())!==o?((C=ua())===o&&(C=null),C!==o&&(d=Ql())!==o?(w=qo,"filestream_on"===r.substr(qo,13).toLowerCase()?(h=r.substr(qo,13),qo+=13):(h=o,0===Qo&&nu(c)),h!==o&&(y=Ql())!==o&&(E=Fa())!==o?w=h=[h,y,E]:(qo=w,w=o),w===o&&(w=null),w!==o?(A=e,m=n,T=s,I=u,N=a,R=i,S=f,_=b,g=v,O=p,x=C,U=w,t=e={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:A[0].toLowerCase(),index_type:m&&m.toLowerCase(),keyword:T.toLowerCase(),index:I,on_kw:N[0].toLowerCase(),table:R,index_columns:S,include:_,where:g,with:O&&O[4],on:x,filestream_on:U&&{value:U[2]}}}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,b;return t=qo,(e=Ni())!==o&&Ql()!==o?((n=function(){var t,e,n,s;return t=qo,"database"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(hn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DATABASE":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=qo,"scheme"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(yn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SCHEME":(qo=t,t=o)):(qo=t,t=o),t}()),n!==o&&Ql()!==o?((s=bu())===o&&(s=null),s!==o&&Ql()!==o&&(u=Ba())!==o&&Ql()!==o?((a=function(){var r,t,e,n,s,u;if(r=qo,(t=xu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=xu())!==o?n=s=[s,u]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=xu())!==o?n=s=[s,u]:(qo=n,n=o);e!==o?r=t=f(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())===o&&(a=null),a!==o?(i=e,l=s,c=u,b=a,t=e={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:i[0].toLowerCase(),keyword:"database",if_not_exists:l,database:c,create_definitions:b}}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=qo,(e=function(){var t,e,n,s;return t=qo,"truncate"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(Bs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="TRUNCATE":(qo=t,t=o)):(qo=t,t=o),t}())!==o&&Ql()!==o?((n=Di())===o&&(n=null),n!==o&&Ql()!==o&&(s=Ju())!==o?(u=e,a=n,(i=s)&&i.forEach((r=>Rc.add(`${u}::${r.db}::${r.table}`))),t=e={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:u.toLowerCase(),keyword:a&&a.toLowerCase()||"table",name:i}}):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var r,t,e;return r=qo,gi()!==o&&Ql()!==o&&Di()!==o&&Ql()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=Vu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Vu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Vu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o?((e=t).forEach((r=>r.forEach((r=>r.table&&Rc.add(`rename::${r.db}::${r.table}`))))),r={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"rename",table:e}}):(qo=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=qo,function(){var t,e,n,s;return t=qo,"call"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(ss)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="CALL":(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&(e=bc())!==o?(n=e,t={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"call",expr:n}}):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=qo,function(){var t,e,n,s;return t=qo,"use"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(Je)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&(e=Fa())!==o?(n=e,Rc.add(`use::${n}::null`),t={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"use",db:n}}):(qo=t,t=o),t}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s;return r=qo,Ti()!==o&&Ql()!==o&&Di()!==o&&Ql()!==o&&(t=Ju())!==o&&Ql()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=Eu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Eu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Eu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o?(s=e,(n=t)&&n.length>0&&n.forEach((r=>Rc.add(`alter::${r.db}::${r.table}`))),r={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"alter",keyword:"table",table:n,expr:s}}):(qo=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,l,c,f,b,p,L,C,d,w;return t=qo,Ti()!==o&&Ql()!==o&&$i()!==o&&Ql()!==o&&(e=oa())!==o&&Ql()!==o?(n=qo,(s=Xl())!==o&&(u=Ql())!==o&&(a=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=$a())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=$a())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=$a())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o&&(l=Ql())!==o&&(c=Vl())!==o?n=s=[s,u,a,l,c]:(qo=n,n=o),n===o&&(n=null),n!==o&&(s=Ql())!==o?(u=qo,(a=Bi())!==o&&(l=Ql())!==o&&(c=function(){var r,t,e,n,s,u,a,l;if(r=qo,(t=yu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=yu())!==o?n=s=[s,u,a,l]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=yu())!==o?n=s=[s,u,a,l]:(qo=n,n=o);e!==o?r=t=i(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o?u=a=[a,l,c]:(qo=u,u=o),u===o&&(u=null),u!==o&&(a=Ql())!==o&&(l=ki())!==o&&(c=Ql())!==o&&(f=Fu())!==o&&Ql()!==o?((b=function(){var t,e,n;return t=qo,Bi()!==o&&Ql()!==o?("check"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(k)),e!==o&&Ql()!==o?("option"===r.substr(qo,6).toLowerCase()?(n=r.substr(qo,6),qo+=6):(n=o,0===Qo&&nu(D)),n!==o?t="with check option":(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(b=null),b!==o?(L=n,C=u,d=f,w=b,(p=e)&&p.length>0&&p.forEach((r=>Rc.add(`alter::${r.db}::${r.table}`))),t={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"alter",keyword:"view",view:p,columns:L&&L[2],attributes:C&&C[2],select:d,with:w}}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u;return t=qo,Mi()!==o&&Ql()!==o?((e=function(){var t,e,n,s;return t=qo,"global"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(uo)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="GLOBAL":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=qo,"session"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(ao)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SESSION":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=qo,"local"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(mr)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="LOCAL":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=qo,"persist"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(co)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="PERSIST":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=qo,"persist_only"===r.substr(qo,12).toLowerCase()?(e=r.substr(qo,12),qo+=12):(e=o,0===Qo&&nu(fo)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="PERSIST_ONLY":(qo=t,t=o)):(qo=t,t=o),t}()),e===o&&(e=null),e!==o&&Ql()!==o&&(n=uc())!==o?(s=e,(u=n).keyword=s,t={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"set",expr:u}}):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=qo,function(){var t,e,n,s;return t=qo,"lock"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(j)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&Pi()!==o&&Ql()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=Mu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Mu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Mu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=Ac(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o?(n=e,t={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"lock",keyword:"tables",tables:n}}):(qo=t,t=o),t}())===o&&(t=function(){var t;return t=qo,function(){var t,e,n,s;return t=qo,"unlock"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(Ln)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&Pi()!==o?t={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"unlock",keyword:"tables"}}:(qo=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l;return r=qo,mi()!==o&&Ql()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=du())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=du())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=du())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o?(u=t,r={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"declare",declare:u,symbol:","}}):(qo=r,r=o),r===o&&(r=qo,mi()!==o&&Ql()!==o&&(t=Ol())!==o&&Ql()!==o&&(e=Ba())!==o&&Ql()!==o?((n=ki())===o&&(n=null),n!==o&&Ql()!==o&&Di()!==o&&Ql()!==o&&(s=vu())!==o?(a=e,i=n,l=s,r={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"declare",declare:[{at:"@",name:a,as:i&&i[0].toLowerCase(),keyword:"table",prefix:"table",definition:l}]}}):(qo=r,r=o)):(qo=r,r=o)),r}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=qo,"execute"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(N)),e===o&&("exec"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(R))),e!==o&&Ql()!==o&&(n=oa())!==o&&Ql()!==o?((s=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=wu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=wu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=wu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=Ac(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())===o&&(s=null),s!==o?(u=e,a=n,i=s,t=e={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"exec",keyword:u,module:a,parameters:i}}):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d;return t=qo,"if"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu(_)),e!==o&&Ql()!==o&&(n=ma())!==o&&Ql()!==o&&(s=au())!==o&&Ql()!==o?((u=Zl())===o&&(u=null),u!==o&&Ql()!==o?((a=Wi())===o&&(a=null),a!==o&&Ql()!==o?(i=qo,(l=ul())!==o&&(c=Ql())!==o&&(f=au())!==o?i=l=[l,c,f]:(qo=i,i=o),i===o&&(i=null),i!==o&&(l=Ql())!==o?((c=Zl())===o&&(c=null),c!==o?(b=n,v=s,p=u,L=a,C=i,d=c,t=e={tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"if",keyword:"if",boolean_expr:b,semicolons:[p||"",d||""],go:L,if_expr:v,else_expr:C&&C[2]}}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}()),t}function au(){var r;return(r=lu())===o&&(r=function(){var r,t,e,n,s,u;return r=qo,(t=Ql())!==o?((e=Du())===o&&(e=null),e!==o&&Ql()!==o&&Ii()!==o&&Ql()!==o&&(n=Ju())!==o&&Ql()!==o&&Mi()!==o&&Ql()!==o&&(s=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=va())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=va())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=va())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o&&Ql()!==o?((u=aa())===o&&(u=null),u!==o?(t=function(r,t,e,n){const s={};return t&&t.forEach((r=>{const{db:t,as:e,table:n,join:o}=r,u=o?"select":"update";t&&(s[n]=t),n&&Rc.add(`${u}::${t}::${n}`)})),e&&e.forEach((r=>{if(r.table){const t=Tc(r.table);Rc.add(`update::${s[t]||null}::${t}`)}Sc.add(`update::${r.table}::${r.column}`)})),{tableList:Array.from(Rc),columnList:Ic(Sc),ast:{with:r,type:"update",table:t,set:e,where:n}}}(e,n,s,u),r=t):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a;return r=qo,(t=Ca())!==o&&Ql()!==o?((e=Ui())===o&&(e=null),e!==o&&Ql()!==o&&(n=oa())!==o&&Ql()!==o?((s=La())===o&&(s=null),s!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(u=Pa())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o&&(a=pa())!==o?(t=function(r,t,e,n,s){if(t&&(Rc.add(`insert::${t.db}::${t.table}`),t.as=null),n){let r=t&&t.table||null;Array.isArray(s)&&s.forEach(((r,t)=>{if(r.value.length!=n.length)throw new Error("Error: column count doesn't match value count at row "+(t+1))})),n.forEach((t=>Sc.add(`insert::${r}::${t}`)))}return{tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:r,table:[t],columns:n,values:s,partition:e}}}(t,n,s,u,a),r=t):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a;return r=qo,(t=Ca())!==o&&Ql()!==o?((e=Oi())===o&&(e=null),e!==o&&Ql()!==o?((n=Ui())===o&&(n=null),n!==o&&Ql()!==o&&(s=oa())!==o&&Ql()!==o?((u=La())===o&&(u=null),u!==o&&Ql()!==o&&(a=pa())!==o?(t=function(r,t,e,n,s,o){n&&(Rc.add(`insert::${n.db}::${n.table}`),Sc.add(`insert::${n.table}::(.*)`),n.as=null);const u=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:r,table:[n],columns:null,values:o,partition:s,prefix:u}}}(t,e,n,s,u,a),r=t):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s;return r=qo,(t=Si())!==o&&Ql()!==o?((e=Ju())===o&&(e=null),e!==o&&Ql()!==o&&(n=Wu())!==o&&Ql()!==o?((s=aa())===o&&(s=null),s!==o?(t=function(r,t,e){if(t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"delete";n&&Rc.add(`${o}::${t}::${n}`),s||Sc.add(`delete::${n}::(.*)`)})),null===r&&1===t.length){const e=t[0];r=[{db:e.db,table:e.table,as:e.as,addition:!0}]}return{tableList:Array.from(Rc),columnList:Ic(Sc),ast:{type:"delete",table:r,from:t,where:e}}}(e,n,s),r=t):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o),r}())===o&&(r=uu())===o&&(r=function(){var r,t;if(r=[],(t=oc())!==o)for(;t!==o;)r.push(t),t=oc();else r=o;return r}()),r}function iu(){var r,t;return r=qo,(t=ji())!==o&&Ql()!==o&&Ki()!==o?r=t="union all":(qo=r,r=o),r===o&&(r=qo,(t=ji())!==o&&(t="union"),r=t),r}function lu(){var r,t,e,n,s,u,a,i;if(r=qo,(t=ku())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=iu())!==o&&(a=Ql())!==o&&(i=ku())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=iu())!==o&&(a=Ql())!==o&&(i=ku())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o&&(n=Ql())!==o?((s=la())===o&&(s=null),s!==o&&(u=Ql())!==o?((a=ba())===o&&(a=null),a!==o?r=t=function(r,t,e,n){let s=r;for(let r=0;r<t.length;r++)s._next=t[r][3],s.set_op=t[r][1],s=s._next;return e&&(r._orderby=e),n&&(r._limit=n),{tableList:Array.from(Rc),columnList:Ic(Sc),ast:r}}(t,e,s,a):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)}else qo=r,r=o;return r}function cu(){var r,t,e,n,s,u,a,l;if(r=qo,(t=fu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=fu())!==o?n=s=[s,u,a,l]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=fu())!==o?n=s=[s,u,a,l]:(qo=n,n=o);e!==o?r=t=i(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function fu(){var r,t,e,n,s;return r=qo,ql()!==o&&Ql()!==o&&(t=$a())!==o&&Ql()!==o&&Kl()!==o&&Ql()!==o?((e=Vi())===o&&(e=qi()),e!==o?(n=t,s=e,r={...n,order_by:s.toLowerCase()}):(qo=r,r=o)):(qo=r,r=o),r===o&&(r=qo,ql()!==o&&Ql()!==o&&(t=$a())!==o&&Ql()!==o&&Kl()!==o&&Ql()!==o?r=t:(qo=r,r=o),r===o&&(r=function(){var r,t,e;return r=qo,(t=$a())!==o&&Ql()!==o?((e=Vi())===o&&(e=qi()),e!==o?(t=function(r,t){return{...r,order_by:t.toLowerCase()}}(t,e),r=t):(qo=r,r=o)):(qo=r,r=o),r===o&&(r=$a()),r}())),r}function bu(){var t,e;return t=qo,"if"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu(b)),e!==o&&Ql()!==o&&el()!==o&&Ql()!==o&&tl()!==o?t=e="IF NOT EXISTS":(qo=t,t=o),t}function vu(){var r,t,e,n,s,u,a,i;if(r=qo,Xl()!==o)if(Ql()!==o)if((t=pu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=pu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=pu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o&&(n=Ql())!==o?((s=Bl())===o&&(s=null),s!==o&&(u=Ql())!==o&&(a=Vl())!==o?r=v(t,e):(qo=r,r=o)):(qo=r,r=o)}else qo=r,r=o;else qo=r,r=o;else qo=r,r=o;return r}function pu(){var r;return(r=Nu())===o&&(r=Cu())===o&&(r=Tu())===o&&(r=Iu()),r}function Lu(){var t,e,n,s,u;return t=qo,(e=function(){var t;return(t=function(){var t,e,n,s;return t=qo,"not null"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(Xe)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(t={type:"not null",value:"not null"}),t}())===o&&(e=ui()),e!==o&&((u=e)&&!u.value&&(u.value="null"),e={nullable:u}),(t=e)===o&&(t=qo,(e=function(){var r,t;return r=qo,hi()!==o&&Ql()!==o?((t=oi())===o&&(t=ma()),t!==o?r={type:"default",value:t}:(qo=r,r=o)):(qo=r,r=o),r}())!==o&&(e={default_val:e}),(t=e)===o&&(t=qo,(e=Su())!==o&&(e={check:e}),(t=e)===o&&(t=qo,"unique"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(p)),e!==o&&Ql()!==o?("key"===r.substr(qo,3).toLowerCase()?(n=r.substr(qo,3),qo+=3):(n=o,0===Qo&&nu(L)),n===o&&(n=null),n!==o?t=e=function(r){const t=["unique"];return r&&t.push(r),{unique:t.join(" ").toLowerCase("")}}(n):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,"primary"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(C)),e===o&&(e=null),e!==o&&Ql()!==o?("key"===r.substr(qo,3).toLowerCase()?(n=r.substr(qo,3),qo+=3):(n=o,0===Qo&&nu(L)),n!==o?t=e=function(r){const t=[];return r&&t.push("primary"),t.push("key"),{primary_key:t.join(" ").toLowerCase("")}}(e):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p;return t=qo,"identity"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(d)),e!==o&&Ql()!==o?(n=qo,(s=Xl())!==o&&(u=Ql())!==o&&(a=fi())!==o&&(i=Ql())!==o&&(l=Bl())!==o&&(c=Ql())!==o&&(f=fi())!==o&&(b=Ql())!==o&&(v=Vl())!==o?n=s=[s,u,a,i,l,c,f,b,v]:(qo=n,n=o),n===o&&(n=null),n!==o?t=e={keyword:"identity",seed:(p=n)&&p[2],increment:p&&p[6],parentheses:!!p}:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(e={auto_increment:e}),(t=e)===o&&(t=qo,(e=tc())!==o&&(e={comment:e}),(t=e)===o&&(t=qo,(e=function(){var t,e,n;return t=qo,function(){var t,e,n,s;return t=qo,"collate"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(ir)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="COLLATE":(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o?((e=Ul())===o&&(e=null),e!==o&&Ql()!==o&&(n=Ba())!==o?t={type:"collate",symbol:e,value:n}:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(e={collate:e}),(t=e)===o&&(t=qo,(e=function(){var t,e,n;return t=qo,"column_format"===r.substr(qo,13).toLowerCase()?(e=r.substr(qo,13),qo+=13):(e=o,0===Qo&&nu(w)),e!==o&&Ql()!==o?("fixed"===r.substr(qo,5).toLowerCase()?(n=r.substr(qo,5),qo+=5):(n=o,0===Qo&&nu(h)),n===o&&("dynamic"===r.substr(qo,7).toLowerCase()?(n=r.substr(qo,7),qo+=7):(n=o,0===Qo&&nu(y)),n===o&&("default"===r.substr(qo,7).toLowerCase()?(n=r.substr(qo,7),qo+=7):(n=o,0===Qo&&nu(E)))),n!==o?t=e={type:"column_format",value:n.toLowerCase()}:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(e={column_format:e}),(t=e)===o&&(t=qo,(e=function(){var t,e,n;return t=qo,"storage"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(A)),e!==o&&Ql()!==o?("disk"===r.substr(qo,4).toLowerCase()?(n=r.substr(qo,4),qo+=4):(n=o,0===Qo&&nu(m)),n===o&&("memory"===r.substr(qo,6).toLowerCase()?(n=r.substr(qo,6),qo+=6):(n=o,0===Qo&&nu(T))),n!==o?t=e={type:"storage",value:n.toLowerCase()}:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(e={storage:e}),(t=e)===o&&(t=qo,(e=_u())!==o&&(e={reference_definition:e}),(t=e)===o&&(t=qo,(e=Ou())!==o&&Ql()!==o?((n=Ul())===o&&(n=null),n!==o&&Ql()!==o&&(s=Ba())!==o?t=e=function(r,t,e){return{character_set:{type:r,value:e,symbol:t}}}(e,n,s):(qo=t,t=o)):(qo=t,t=o)))))))))))),t}function Cu(){var r,t,e,n,s,u,a,i,l;return r=qo,(t=$a())!==o&&Ql()!==o&&(e=Cc())!==o&&(n=Ql())!==o?((s=function(){var r,t,e,n,s,u;if(r=qo,(t=Lu())!==o)if(Ql()!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Lu())!==o?n=s=[s,u]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Lu())!==o?n=s=[s,u]:(qo=n,n=o);e!==o?r=t=function(r,t){let e=r;for(let r=0;r<t.length;r++)e={...e,...t[r][1]};return e}(t,e):(qo=r,r=o)}else qo=r,r=o;else qo=r,r=o;return r}())===o&&(s=null),s!==o?(a=t,i=e,l=s,Sc.add(`create::${a.table}::${a.column}`),r=t={column:a,definition:i,resource:"column",...l||{}}):(qo=r,r=o)):(qo=r,r=o),r===o&&(r=qo,(t=$a())!==o&&Ql()!==o?(e=qo,(n=ki())!==o&&(s=Ql())!==o&&(u=ma())!==o?e=n=[n,s,u]:(qo=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){return t&&(r.as=t[2]),{column:r,resource:"column"}}(t,e):(qo=r,r=o)):(qo=r,r=o)),r}function du(){var t,e,n,s,u,a,i,l,c,f,b;return t=qo,Ol()!==o&&Ql()!==o&&(e=Ba())!==o&&Ql()!==o?((n=ki())===o&&(n=null),n!==o&&Ql()!==o&&(s=Cc())!==o&&Ql()!==o?(u=qo,(a=Ul())!==o&&(i=Ql())!==o&&(l=ma())!==o?u=a=[a,i,l]:(qo=u,u=o),u===o&&(u=null),u!==o?(f=s,b=u,t={at:"@",name:e,as:(c=n)&&c[0].toLowerCase(),datatype:f,keyword:"variable",definition:b&&{type:"default",keyword:b[0],value:b[2]}}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,Ol()!==o&&Ql()!==o&&(e=Ba())!==o&&Ql()!==o?("cursor"===r.substr(qo,6).toLowerCase()?(n=r.substr(qo,6),qo+=6):(n=o,0===Qo&&nu(I)),n!==o?t=function(r,t){return{at:"@",name:t,keyword:"cursor",prefix:"cursor"}}(0,e):(qo=t,t=o)):(qo=t,t=o)),t}function wu(){var t,e,n,s;return t=qo,64===r.charCodeAt(qo)?(e="@",qo++):(e=o,0===Qo&&nu(S)),e!==o&&(n=Fa())!==o&&Ql()!==o&&Ul()!==o&&Ql()!==o&&(s=ma())!==o?t=e={type:"variable",name:n,value:s}:(qo=t,t=o),t}function hu(){var t,e,n;return t=qo,"if"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu(_)),e!==o&&Ql()!==o?("exists"===r.substr(qo,6).toLowerCase()?(n=r.substr(qo,6),qo+=6):(n=o,0===Qo&&nu(g)),n!==o?t=e="if exists":(qo=t,t=o)):(qo=t,t=o),t}function yu(){var t;return"encryption"===r.substr(qo,10).toLowerCase()?(t=r.substr(qo,10),qo+=10):(t=o,0===Qo&&nu(x)),t===o&&("schemabinding"===r.substr(qo,13).toLowerCase()?(t=r.substr(qo,13),qo+=13):(t=o,0===Qo&&nu(U)),t===o&&("view_metadata"===r.substr(qo,13).toLowerCase()?(t=r.substr(qo,13),qo+=13):(t=o,0===Qo&&nu(M)))),t}function Eu(){var t;return(t=function(){var r,t;return r=qo,Ml()!==o&&Ql()!==o&&(t=Nu())!==o?r={action:"add",create_definitions:t,resource:"constraint",type:"alter"}:(qo=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=qo,Ai()!==o&&Ql()!==o&&(t=Hl())!==o&&Ql()!==o&&(e=Ba())!==o?r={action:"drop",constraint:e,keyword:t.toLowerCase(),resource:"constraint",type:"alter"}:(qo=r,r=o),r}())===o&&(t=function(){var t,e,n,s;return t=qo,Bi()!==o&&Ql()!==o?("check"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(k)),e!==o&&Ql()!==o?("check"===r.substr(qo,5).toLowerCase()?(n=r.substr(qo,5),qo+=5):(n=o,0===Qo&&nu(k)),n!==o&&Ql()!==o&&Hl()!==o&&Ql()!==o&&(s=Ba())!==o?t={action:"with",constraint:s,keyword:"check check constraint",resource:"constraint",type:"alter"}:(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=qo,"nocheck"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(W)),e!==o&&Ql()!==o&&Hl()!==o&&Ql()!==o&&(n=Ba())!==o?t=e={action:"nocheck",keyword:"constraint",constraint:n,resource:"constraint",type:"alter"}:(qo=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u;return r=qo,(t=Ml())===o&&(t=Ti()),t!==o&&Ql()!==o?((e=kl())===o&&(e=null),e!==o&&Ql()!==o&&(n=Cu())!==o?(s=e,u=n,r=t={action:t.toLowerCase(),...u,keyword:s,resource:"column",type:"alter"}):(qo=r,r=o)):(qo=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=qo,Ai()!==o&&Ql()!==o?((t=kl())===o&&(t=null),t!==o&&Ql()!==o&&(e=$a())!==o?r={action:"drop",column:e,keyword:t,resource:"column",type:"alter"}:(qo=r,r=o)):(qo=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=qo,Ml()!==o&&Ql()!==o&&(t=Tu())!==o?(e=t,r={action:"add",type:"alter",...e}):(qo=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=qo,Ml()!==o&&Ql()!==o&&(t=Iu())!==o?(e=t,r={action:"add",type:"alter",...e}):(qo=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=qo,gi()!==o&&Ql()!==o?((t=yi())===o&&(t=ki()),t===o&&(t=null),t!==o&&Ql()!==o&&(e=Fa())!==o?(s=e,r={action:"rename",type:"alter",resource:"table",keyword:(n=t)&&n[0].toLowerCase(),table:s}):(qo=r,r=o)):(qo=r,r=o),r}())===o&&(t=Au())===o&&(t=mu()),t}function Au(){var t,e,n,s;return t=qo,"algorithm"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu($)),e!==o&&Ql()!==o?((n=Ul())===o&&(n=null),n!==o&&Ql()!==o?("default"===r.substr(qo,7).toLowerCase()?(s=r.substr(qo,7),qo+=7):(s=o,0===Qo&&nu(E)),s===o&&("instant"===r.substr(qo,7).toLowerCase()?(s=r.substr(qo,7),qo+=7):(s=o,0===Qo&&nu(P)),s===o&&("inplace"===r.substr(qo,7).toLowerCase()?(s=r.substr(qo,7),qo+=7):(s=o,0===Qo&&nu(F)),s===o&&("copy"===r.substr(qo,4).toLowerCase()?(s=r.substr(qo,4),qo+=4):(s=o,0===Qo&&nu(G))))),s!==o?t=e={type:"alter",keyword:"algorithm",resource:"algorithm",symbol:n,algorithm:s}:(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}function mu(){var t,e,n,s;return t=qo,"lock"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(j)),e!==o&&Ql()!==o?((n=Ul())===o&&(n=null),n!==o&&Ql()!==o?("default"===r.substr(qo,7).toLowerCase()?(s=r.substr(qo,7),qo+=7):(s=o,0===Qo&&nu(E)),s===o&&("none"===r.substr(qo,4).toLowerCase()?(s=r.substr(qo,4),qo+=4):(s=o,0===Qo&&nu(H)),s===o&&("shared"===r.substr(qo,6).toLowerCase()?(s=r.substr(qo,6),qo+=6):(s=o,0===Qo&&nu(Y)),s===o&&("exclusive"===r.substr(qo,9).toLowerCase()?(s=r.substr(qo,9),qo+=9):(s=o,0===Qo&&nu(B))))),s!==o?t=e={type:"alter",keyword:"lock",resource:"lock",symbol:n,lock:s}:(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}function Tu(){var r,t,e,n,s,u,a,i;return r=qo,(t=Dl())===o&&(t=$l()),t!==o&&Ql()!==o?((e=Ha())===o&&(e=null),e!==o&&Ql()!==o?((n=qu())===o&&(n=null),n!==o&&Ql()!==o&&(s=Pu())!==o&&Ql()!==o?((u=Zu())===o&&(u=null),u!==o&&Ql()!==o?(a=n,i=u,r=t={index:e,definition:s,keyword:t.toLowerCase(),index_type:a,resource:"index",index_options:i}):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o),r}function Iu(){var t,e,n,s,u,a,i,l,c;return t=qo,(e=function(){var t,e,n,s;return t=qo,"fulltext"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(Eo)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="FULLTEXT":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=qo,"spatial"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(Ao)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SPATIAL":(qo=t,t=o)):(qo=t,t=o),t}()),e!==o&&Ql()!==o?((n=Dl())===o&&(n=$l()),n===o&&(n=null),n!==o&&Ql()!==o?((s=Ha())===o&&(s=null),s!==o&&Ql()!==o&&(u=Pu())!==o&&Ql()!==o?((a=Zu())===o&&(a=null),a!==o&&Ql()!==o?(i=e,c=a,t=e={index:s,definition:u,keyword:(l=n)&&`${i.toLowerCase()} ${l.toLowerCase()}`||i.toLowerCase(),index_options:c,resource:"index"}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}function Nu(){var t;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=qo,(e=Ru())===o&&(e=null),e!==o&&Ql()!==o?("primary key"===r.substr(qo,11).toLowerCase()?(n=r.substr(qo,11),qo+=11):(n=o,0===Qo&&nu(X)),n!==o&&Ql()!==o?((s=qu())===o&&(s=null),s!==o&&Ql()!==o&&(u=Pu())!==o&&Ql()!==o?((a=function(){var r,t,e,n;return r=qo,(t=Bi())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(e=Ku())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o&&Fi()!==o&&Ql()!==o&&ql()!==o&&Ql()!==o&&(n=Ba())!==o&&Ql()!==o&&Kl()!==o?r=t={with:e,on:n}:(qo=r,r=o),r===o&&(r=qo,(t=Zu())===o&&(t=Ku()),t!==o&&(t=function(r){return{index_options:r}}(t)),r=t),r}())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l.toLowerCase(),keyword:i&&i.keyword,index_type:c,resource:"constraint",...b}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;return r=qo,(t=Ru())===o&&(t=null),t!==o&&Ql()!==o&&(e=Pl())!==o&&Ql()!==o?((n=Dl())===o&&(n=$l()),n===o&&(n=null),n!==o&&Ql()!==o?((s=Ha())===o&&(s=null),s!==o&&Ql()!==o?((u=qu())===o&&(u=null),u!==o&&Ql()!==o&&(a=Pu())!==o&&Ql()!==o?((i=Zu())===o&&(i=null),i!==o?(c=e,f=n,b=s,v=u,p=a,L=i,r=t={constraint:(l=t)&&l.constraint,definition:p,constraint_type:f&&`${c.toLowerCase()} ${f.toLowerCase()}`||c.toLowerCase(),keyword:l&&l.keyword,index_type:v,index:b,resource:"constraint",index_options:L}):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=qo,(e=Ru())===o&&(e=null),e!==o&&Ql()!==o?("foreign key"===r.substr(qo,11).toLowerCase()?(n=r.substr(qo,11),qo+=11):(n=o,0===Qo&&nu(Z)),n!==o&&Ql()!==o?((s=Ha())===o&&(s=null),s!==o&&Ql()!==o&&(u=Pu())!==o&&Ql()!==o?((a=_u())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l,keyword:i&&i.keyword,index:c,resource:"constraint",reference_definition:b}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=Su()),t}function Ru(){var r,t,e,n;return r=qo,(t=Hl())!==o&&Ql()!==o?((e=Fa())===o&&(e=null),e!==o?(n=e,r=t={keyword:t.toLowerCase(),constraint:n}):(qo=r,r=o)):(qo=r,r=o),r}function Su(){var t,e,n,s,u,a,i,l,c,f,b,v,p;return t=qo,(e=Ru())===o&&(e=null),e!==o&&Ql()!==o?("check"===r.substr(qo,5).toLowerCase()?(n=r.substr(qo,5),qo+=5):(n=o,0===Qo&&nu(k)),n!==o&&Ql()!==o?(s=qo,"not"===r.substr(qo,3).toLowerCase()?(u=r.substr(qo,3),qo+=3):(u=o,0===Qo&&nu(V)),u!==o&&(a=Ql())!==o?("for"===r.substr(qo,3).toLowerCase()?(i=r.substr(qo,3),qo+=3):(i=o,0===Qo&&nu(q)),i!==o&&(l=Ql())!==o?("replication"===r.substr(qo,11).toLowerCase()?(c=r.substr(qo,11),qo+=11):(c=o,0===Qo&&nu(K)),c!==o&&(f=Ql())!==o?s=u=[u,a,i,l,c,f]:(qo=s,s=o)):(qo=s,s=o)):(qo=s,s=o),s===o&&(s=null),s!==o&&(u=Xl())!==o&&(a=Ql())!==o&&(i=Ta())!==o&&(l=Ql())!==o&&(c=Vl())!==o?(b=e,v=s,p=i,t=e={constraint_type:n.toLowerCase(),keyword:b&&b.keyword,constraint:b&&b.constraint,index_type:v&&{keyword:"not for replication",type:""},definition:[p],resource:"constraint"}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}function _u(){var t,e,n,s,u,a,i,l,c,f;return t=qo,(e=function(){var t,e,n,s;return t=qo,"references"===r.substr(qo,10).toLowerCase()?(e=r.substr(qo,10),qo+=10):(e=o,0===Qo&&nu(Ro)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="REFERENCES":(qo=t,t=o)):(qo=t,t=o),t}())!==o&&Ql()!==o&&(n=Ju())!==o&&Ql()!==o&&(s=Pu())!==o&&Ql()!==o?("match full"===r.substr(qo,10).toLowerCase()?(u=r.substr(qo,10),qo+=10):(u=o,0===Qo&&nu(z)),u===o&&("match partial"===r.substr(qo,13).toLowerCase()?(u=r.substr(qo,13),qo+=13):(u=o,0===Qo&&nu(Q)),u===o&&("match simple"===r.substr(qo,12).toLowerCase()?(u=r.substr(qo,12),qo+=12):(u=o,0===Qo&&nu(J)))),u===o&&(u=null),u!==o&&Ql()!==o?((a=gu())===o&&(a=null),a!==o&&Ql()!==o?((i=gu())===o&&(i=null),i!==o?(l=u,c=a,f=i,t=e={definition:s,table:n,keyword:e.toLowerCase(),match:l&&l.toLowerCase(),on_action:[c,f].filter((r=>r))}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=gu())!==o&&(e={on_action:[e]}),t=e),t}function gu(){var t,e,n,s;return t=qo,Fi()!==o&&Ql()!==o?((e=Si())===o&&(e=Ii()),e!==o&&Ql()!==o&&(n=function(){var t,e,n;return t=qo,(e=gl())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o?((n=ha())===o&&(n=null),n!==o&&Ql()!==o&&Vl()!==o?t=e={type:"function",name:e,args:n}:(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,"restrict"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(rr)),e===o&&("cascade"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(tr)),e===o&&("set null"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(er)),e===o&&("no action"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(nr)),e===o&&("set default"===r.substr(qo,11).toLowerCase()?(e=r.substr(qo,11),qo+=11):(e=o,0===Qo&&nu(sr)),e===o&&(e=gl()))))),e!==o&&(e={type:"origin",value:e.toLowerCase()}),t=e),t}())!==o?(s=n,t={type:"on "+e[0].toLowerCase(),value:s}):(qo=t,t=o)):(qo=t,t=o),t}function Ou(){var t,e,n;return t=qo,"character"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(or)),e!==o&&Ql()!==o?("set"===r.substr(qo,3).toLowerCase()?(n=r.substr(qo,3),qo+=3):(n=o,0===Qo&&nu(ur)),n!==o?t=e="CHARACTER SET":(qo=t,t=o)):(qo=t,t=o),t}function xu(){var t,e,n,s,u,a,i,l,c;return t=qo,(e=hi())===o&&(e=null),e!==o&&Ql()!==o?((n=Ou())===o&&("charset"===r.substr(qo,7).toLowerCase()?(n=r.substr(qo,7),qo+=7):(n=o,0===Qo&&nu(ar)),n===o&&("collate"===r.substr(qo,7).toLowerCase()?(n=r.substr(qo,7),qo+=7):(n=o,0===Qo&&nu(ir)))),n!==o&&Ql()!==o?((s=Ul())===o&&(s=null),s!==o&&Ql()!==o&&(u=Ba())!==o?(i=n,l=s,c=u,t=e={keyword:(a=e)&&`${a[0].toLowerCase()} ${i.toLowerCase()}`||i.toLowerCase(),symbol:l,value:c}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}function Uu(){var t,e,n,s,u,a,i,l,c;return t=qo,"auto_increment"===r.substr(qo,14).toLowerCase()?(e=r.substr(qo,14),qo+=14):(e=o,0===Qo&&nu(lr)),e===o&&("avg_row_length"===r.substr(qo,14).toLowerCase()?(e=r.substr(qo,14),qo+=14):(e=o,0===Qo&&nu(cr)),e===o&&("key_block_size"===r.substr(qo,14).toLowerCase()?(e=r.substr(qo,14),qo+=14):(e=o,0===Qo&&nu(fr)),e===o&&("max_rows"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(br)),e===o&&("min_rows"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(vr)),e===o&&("stats_sample_pages"===r.substr(qo,18).toLowerCase()?(e=r.substr(qo,18),qo+=18):(e=o,0===Qo&&nu(pr))))))),e!==o&&Ql()!==o?((n=Ul())===o&&(n=null),n!==o&&Ql()!==o&&(s=fi())!==o?(l=n,c=s,t=e={keyword:e.toLowerCase(),symbol:l,value:c.value}):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=xu())===o&&(t=qo,(e=jl())===o&&("connection"===r.substr(qo,10).toLowerCase()?(e=r.substr(qo,10),qo+=10):(e=o,0===Qo&&nu(Lr))),e!==o&&Ql()!==o?((n=Ul())===o&&(n=null),n!==o&&Ql()!==o&&(s=ai())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:`'${e.value}'`}}(e,n,s):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,"compression"===r.substr(qo,11).toLowerCase()?(e=r.substr(qo,11),qo+=11):(e=o,0===Qo&&nu(Cr)),e!==o&&Ql()!==o?((n=Ul())===o&&(n=null),n!==o&&Ql()!==o?(s=qo,39===r.charCodeAt(qo)?(u="'",qo++):(u=o,0===Qo&&nu(dr)),u!==o?("zlib"===r.substr(qo,4).toLowerCase()?(a=r.substr(qo,4),qo+=4):(a=o,0===Qo&&nu(wr)),a===o&&("lz4"===r.substr(qo,3).toLowerCase()?(a=r.substr(qo,3),qo+=3):(a=o,0===Qo&&nu(hr)),a===o&&("none"===r.substr(qo,4).toLowerCase()?(a=r.substr(qo,4),qo+=4):(a=o,0===Qo&&nu(H)))),a!==o?(39===r.charCodeAt(qo)?(i="'",qo++):(i=o,0===Qo&&nu(dr)),i!==o?s=u=[u,a,i]:(qo=s,s=o)):(qo=s,s=o)):(qo=s,s=o),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.join("").toUpperCase()}}(e,n,s):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,"engine"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(yr)),e!==o&&Ql()!==o?((n=Ul())===o&&(n=null),n!==o&&Ql()!==o&&(s=Ba())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.toUpperCase()}}(e,n,s):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=Fi())!==o&&Ql()!==o&&(n=ql())!==o&&Ql()!==o&&(s=Ba())!==o&&(u=Ql())!==o&&(a=Kl())!==o?t=e={keyword:"on",value:`[${s}]`}:(qo=t,t=o),t===o&&(t=qo,"textimage_on"===r.substr(qo,12).toLowerCase()?(e=r.substr(qo,12),qo+=12):(e=o,0===Qo&&nu(Er)),e!==o&&Ql()!==o&&(n=ql())!==o&&Ql()!==o&&(s=Ba())!==o&&(u=Ql())!==o&&(a=Kl())!==o?t=e={keyword:"textimage_on",value:`[${s}]`}:(qo=t,t=o)))))),t}function Mu(){var t,e,n,s,u;return t=qo,(e=na())!==o&&Ql()!==o&&(n=function(){var t,e,n;return t=qo,"read"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Ar)),e!==o&&Ql()!==o?("local"===r.substr(qo,5).toLowerCase()?(n=r.substr(qo,5),qo+=5):(n=o,0===Qo&&nu(mr)),n===o&&(n=null),n!==o?t=e={type:"read",suffix:n&&"local"}:(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,"low_priority"===r.substr(qo,12).toLowerCase()?(e=r.substr(qo,12),qo+=12):(e=o,0===Qo&&nu(Tr)),e===o&&(e=null),e!==o&&Ql()!==o?("write"===r.substr(qo,5).toLowerCase()?(n=r.substr(qo,5),qo+=5):(n=o,0===Qo&&nu(Ir)),n!==o?t=e={type:"write",prefix:e&&"low_priority"}:(qo=t,t=o)):(qo=t,t=o)),t}())!==o?(s=e,u=n,Rc.add(`lock::${s.db}::${s.table}`),t=e={table:s,lock_type:u}):(qo=t,t=o),t}function ku(){var t,e,n,s,u,a,i;return(t=Fu())===o&&(t=qo,e=qo,40===r.charCodeAt(qo)?(n="(",qo++):(n=o,0===Qo&&nu(Nr)),n!==o&&(s=Ql())!==o&&(u=ku())!==o&&(a=Ql())!==o?(41===r.charCodeAt(qo)?(i=")",qo++):(i=o,0===Qo&&nu(Rr)),i!==o?e=n=[n,s,u,a,i]:(qo=e,e=o)):(qo=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}function Du(){var t,e,n,s,u,a,i,l,c;if(t=qo,Bi()!==o)if(Ql()!==o)if((e=$u())!==o){for(n=[],s=qo,(u=Ql())!==o&&(a=Bl())!==o&&(i=Ql())!==o&&(l=$u())!==o?s=u=[u,a,i,l]:(qo=s,s=o);s!==o;)n.push(s),s=qo,(u=Ql())!==o&&(a=Bl())!==o&&(i=Ql())!==o&&(l=$u())!==o?s=u=[u,a,i,l]:(qo=s,s=o);n!==o?t=v(e,n):(qo=t,t=o)}else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;return t===o&&(t=qo,Ql()!==o&&Bi()!==o&&(e=Ql())!==o&&(n=function(){var t,e,n,s;return t=qo,"RECURSIVE"===r.substr(qo,9)?(e="RECURSIVE",qo+=9):(e=o,0===Qo&&nu(an)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(s=Ql())!==o&&(u=$u())!==o?((c=u).recursive=!0,t=[c]):(qo=t,t=o)),t}function $u(){var r,t,e,n,s;return r=qo,(t=ai())===o&&(t=Ba()),t!==o&&Ql()!==o?((e=Pu())===o&&(e=null),e!==o&&Ql()!==o&&ki()!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=lu())!==o&&Ql()!==o&&Vl()!==o?("string"==typeof(s=t)&&(s={type:"default",value:s}),r=t={name:s,stmt:n,columns:e}):(qo=r,r=o)):(qo=r,r=o),r}function Pu(){var r,t;return r=qo,Xl()!==o&&Ql()!==o&&(t=ia())!==o&&Ql()!==o&&Vl()!==o?r=t:(qo=r,r=o),r}function Fu(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T,I,N;return t=qo,Ql()!==o?((e=Du())===o&&(e=null),e!==o&&Ql()!==o&&function(){var t,e,n,s;return t=qo,"select"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(tn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Jl()!==o?((n=function(){var r,t,e,n,s,u;if(r=qo,(t=Gu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Gu())!==o?n=s=[s,u]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Gu())!==o?n=s=[s,u]:(qo=n,n=o);e!==o?(t=function(r,t){const e=[r];for(let r=0,n=t.length;r<n;++r)e.push(t[r][1]);return e}(t,e),r=t):(qo=r,r=o)}else qo=r,r=o;return r}())===o&&(n=null),n!==o&&Ql()!==o?((s=function(){var t,e,n,s,u,a;return t=qo,(e=Ei())!==o&&Ql()!==o&&(n=Xl())!==o&&Ql()!==o&&(s=bi())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o?("percent"===r.substr(qo,7).toLowerCase()?(u=r.substr(qo,7),qo+=7):(u=o,0===Qo&&nu(Sr)),u===o&&(u=null),u!==o?t=e={value:s,percent:(a=u)&&a.toLowerCase(),parentheses:!0}:(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=Ei())!==o&&Ql()!==o&&(n=bi())!==o&&Ql()!==o?("percent"===r.substr(qo,7).toLowerCase()?(s=r.substr(qo,7),qo+=7):(s=o,0===Qo&&nu(Sr)),s===o&&(s=null),s!==o?(e=function(r,t){return{value:r,percent:t&&t.toLowerCase()}}(n,s),t=e):(qo=t,t=o)):(qo=t,t=o)),t}())===o&&(s=null),s!==o&&Ql()!==o?((u=Zi())===o&&(u=null),u!==o&&Ql()!==o&&(a=ju())!==o&&Ql()!==o?((i=Wu())===o&&(i=null),i!==o&&Ql()!==o?((l=aa())===o&&(l=null),l!==o&&Ql()!==o?((c=function(){var t,e;return t=qo,function(){var t,e,n,s;return t=qo,"group"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Dn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&Xi()!==o&&Ql()!==o&&(e=ha())!==o?t=e.value:(qo=t,t=o),t}())===o&&(c=null),c!==o&&Ql()!==o?((f=function(){var t,e;return t=qo,function(){var t,e,n,s;return t=qo,"having"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(Fn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&(e=Ta())!==o?t=e:(qo=t,t=o),t}())===o&&(f=null),f!==o&&Ql()!==o?((b=la())===o&&(b=null),b!==o&&Ql()!==o?((v=ba())===o&&(v=null),v!==o&&Ql()!==o?((p=function(){var t,e,n,s,u;return t=qo,"for"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(q)),e!==o&&Ql()!==o?("xml"===r.substr(qo,3).toLowerCase()?(n=r.substr(qo,3),qo+=3):(n=o,0===Qo&&nu(It)),n!==o&&Ql()!==o&&(s=function(){var t,e,n,s,u,a,i,l;return t=qo,"raw"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(Et)),e===o&&("auto"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(At)),e===o&&("explicit"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(mt)))),e!==o&&(e={keyword:e}),(t=e)===o&&(t=qo,"path"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Tt)),e!==o&&Ql()!==o?(n=qo,(s=Xl())!==o&&(u=Ql())!==o?((a=$a())===o&&(a=ai()),a===o&&(a=null),a!==o&&(i=Ql())!==o&&(l=Vl())!==o?n=s=[s,u,a,i,l]:(qo=n,n=o)):(qo=n,n=o),n===o&&(n=null),n!==o?(e=function(r,t){return{keyword:r,expr:t&&t[2]}}(e,n),t=e):(qo=t,t=o)):(qo=t,t=o)),t}())!==o?(u=s,t=e={type:"for xml",...u}):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(p=null),p!==o?(L=e,C=n,d=s,w=u,h=a,E=l,A=c,m=f,T=b,I=v,N=p,(y=i)&&y.forEach((r=>r.table&&Rc.add(`select::${r.db}::${r.table}`))),t={with:L,type:"select",options:C,distinct:w,columns:h,from:y,for:N,where:E,groupby:A,having:m,top:d,orderby:T,limit:I}):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}function Gu(){var t;return(t=function(){var t;return"sql_calc_found_rows"===r.substr(qo,19).toLowerCase()?(t=r.substr(qo,19),qo+=19):(t=o,0===Qo&&nu(So)),t}())===o&&((t=function(){var t;return"sql_cache"===r.substr(qo,9).toLowerCase()?(t=r.substr(qo,9),qo+=9):(t=o,0===Qo&&nu(_o)),t}())===o&&(t=function(){var t;return"sql_no_cache"===r.substr(qo,12).toLowerCase()?(t=r.substr(qo,12),qo+=12):(t=o,0===Qo&&nu(go)),t}()),t===o&&(t=function(){var t;return"sql_big_result"===r.substr(qo,14).toLowerCase()?(t=r.substr(qo,14),qo+=14):(t=o,0===Qo&&nu(xo)),t}())===o&&(t=function(){var t;return"sql_small_result"===r.substr(qo,16).toLowerCase()?(t=r.substr(qo,16),qo+=16):(t=o,0===Qo&&nu(Oo)),t}())===o&&(t=function(){var t;return"sql_buffer_result"===r.substr(qo,17).toLowerCase()?(t=r.substr(qo,17),qo+=17):(t=o,0===Qo&&nu(Uo)),t}())),t}function ju(){var r,t,e,n,s,u,a,i;if(r=qo,(t=Ki())===o&&(t=qo,(e=Wl())!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t===o&&(t=Wl())),t!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Hu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Hu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=function(r,t){Sc.add("select::null::(.*)");const e={expr:{type:"column_ref",table:null,column:"*"},as:null};return t&&t.length>0?Ac(e,t):[e]}(0,e):(qo=r,r=o)}else qo=r,r=o;if(r===o)if(r=qo,(t=Hu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Hu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Hu())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function Hu(){var r,t,e,n,s;return r=qo,t=qo,(e=Fa())!==o&&(n=Ql())!==o&&(s=Yl())!==o?t=e=[e,n,s]:(qo=t,t=o),t===o&&(t=null),t!==o&&(e=Ql())!==o&&(n=Wl())!==o?r=t=function(r){const t=r&&r[0]||null;return Sc.add(`select::${t}::(.*)`),{expr:{type:"column_ref",table:t,column:"*"},as:null}}(t):(qo=r,r=o),r===o&&(r=qo,(t=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=ma())!==o){for(e=[],n=qo,(s=Ql())!==o?((u=nl())===o&&(u=sl())===o&&(u=zl()),u!==o&&(a=Ql())!==o&&(i=ma())!==o?n=s=[s,u,a,i]:(qo=n,n=o)):(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o?((u=nl())===o&&(u=sl())===o&&(u=zl()),u!==o&&(a=Ql())!==o&&(i=ma())!==o?n=s=[s,u,a,i]:(qo=n,n=o)):(qo=n,n=o);e!==o?(t=function(r,t){const e=r.ast;if(e&&"select"===e.type&&(!(r.parentheses_symbol||r.parentheses||r.ast.parentheses||r.ast.parentheses_symbol)||1!==e.columns.length||"*"===e.columns[0].expr.column))throw new Error("invalid column clause with select statement");if(!t||0===t.length)return r;const n=t.length;let s=t[n-1][3];for(let e=n-1;e>=0;e--){const n=0===e?r:t[e-1][3];s=yc(t[e][1],n,s)}return s}(t,e),r=t):(qo=r,r=o)}else qo=r,r=o;return r}())!==o&&(e=Ql())!==o?((n=Bu())===o&&(n=null),n!==o?r=t={expr:t,as:n}:(qo=r,r=o)):(qo=r,r=o)),r}function Yu(){var r,t,e,n,s,u,a,i,l,c,f,b;return r=qo,(t=ki())===o&&(t=null),t!==o&&Ql()!==o&&(e=Ba())!==o?(n=qo,(s=Ql())!==o&&(u=Xl())!==o&&(a=Ql())!==o&&(i=Pa())!==o&&(l=Ql())!==o&&(c=Vl())!==o?n=s=[s,u,a,i,l,c]:(qo=n,n=o),n===o&&(n=null),n!==o?(f=e,r=t=(b=n)?`${f}(${b[3].join(", ")})`:f):(qo=r,r=o)):(qo=r,r=o),r}function Bu(){var r,t,e;return r=qo,(t=ki())!==o&&Ql()!==o&&(e=function(){var r,t;return r=qo,(t=Ba())!==o&&(function(r){if(!0===wc[r.toUpperCase()])throw new Error("Error: "+JSON.stringify(r)+" is a reserved word, can not as alias clause");return!1}(t)?o:void 0)!==o?r=t:(qo=r,r=o),r===o&&(r=qo,r=t=Ga()),r}())!==o?r=t=e:(qo=r,r=o),r===o&&(r=qo,(t=ki())===o&&(t=null),t!==o&&Ql()!==o&&(e=Fa())!==o?r=t=e:(qo=r,r=o)),r}function Wu(){var t,e,n,s,u;return t=qo,function(){var t,e,n,s;return t=qo,"from"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(pn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&(e=Ju())!==o&&Ql()!==o?((n=function(){var t,e,n,s,u,a,i;return t=qo,(e=function(){var t,e,n,s;return t=qo,"pivot"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(io)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="PIVOT":(qo=t,t=o)):(qo=t,t=o),t}())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=Za())!==o&&Ql()!==o&&(s=Xu())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o?((u=Bu())===o&&(u=null),u!==o?(a=s,i=u,t=e={type:"pivot",expr:n,...a,as:i}):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=function(){var t,e,n,s;return t=qo,"unpivot"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(lo)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="UNPIVOT":(qo=t,t=o)):(qo=t,t=o),t}())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=$a())!==o&&Ql()!==o&&(s=Xu())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o?((u=Bu())===o&&(u=null),u!==o?(e=function(r,t,e){return{type:"unpivot",expr:r,...t,as:e}}(n,s,u),t=e):(qo=t,t=o)):(qo=t,t=o)),t}())===o&&(n=null),n!==o?(u=n,(s=e)[0]&&(s[0].operator=u),t=s):(qo=t,t=o)):(qo=t,t=o),t}function Xu(){var t,e,n,s;return t=qo,"for"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(q)),e!==o&&Ql()!==o&&(n=$a())!==o&&Ql()!==o&&(s=Oa())!==o?t=e={column:n,in_expr:s}:(qo=t,t=o),t}function Vu(){var r,t,e;return r=qo,(t=oa())!==o&&Ql()!==o&&yi()!==o&&Ql()!==o&&(e=oa())!==o?r=t=[t,e]:(qo=r,r=o),r}function qu(){var t,e,n;return t=qo,(e=Yi())!==o&&Ql()!==o?("btree"===r.substr(qo,5).toLowerCase()?(n=r.substr(qo,5),qo+=5):(n=o,0===Qo&&nu(_r)),n===o&&("hash"===r.substr(qo,4).toLowerCase()?(n=r.substr(qo,4),qo+=4):(n=o,0===Qo&&nu(gr))),n!==o?t=e={keyword:"using",type:n.toLowerCase()}:(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=Fl())===o&&(e=Gl()),e!==o&&(e={keyword:e.toLowerCase()}),t=e),t}function Ku(){var r,t,e,n,s,u,a,l;if(r=qo,(t=Qu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=Qu())!==o?n=s=[s,u,a,l]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=Qu())!==o?n=s=[s,u,a,l]:(qo=n,n=o);e!==o?r=t=i(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function Zu(){var r,t,e,n,s,u;if(r=qo,(t=Qu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Qu())!==o?n=s=[s,u]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Qu())!==o?n=s=[s,u]:(qo=n,n=o);e!==o?r=t=function(r,t){const e=[r];for(let r=0;r<t.length;r++)e.push(t[r][1]);return e}(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function zu(){var r,t,e,n;return r=qo,(t=fi())!==o&&Ql()!==o&&(e=yi())!==o&&Ql()!==o&&fi()!==o?(n=t,r=t={type:"range",symbol:e[0],start:n,end:n}):(qo=r,r=o),r===o&&(r=fi()),r}function Qu(){var t,e,n,s,u,a;return t=qo,(e=function(){var t,e,n,s;return t=qo,"key_block_size"===r.substr(qo,14).toLowerCase()?(e=r.substr(qo,14),qo+=14):(e=o,0===Qo&&nu(fr)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="KEY_BLOCK_SIZE":(qo=t,t=o)):(qo=t,t=o),t}())!==o&&Ql()!==o?((n=Ul())===o&&(n=null),n!==o&&Ql()!==o&&(s=fi())!==o?t=e=xr(e,n,s):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,"fillfactor"===r.substr(qo,10).toLowerCase()?(e=r.substr(qo,10),qo+=10):(e=o,0===Qo&&nu(Ur)),e===o&&("max_duration"===r.substr(qo,12).toLowerCase()?(e=r.substr(qo,12),qo+=12):(e=o,0===Qo&&nu(Mr)),e===o&&("maxdop"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(kr)))),e!==o&&Ql()!==o&&(n=Ul())!==o&&Ql()!==o&&(s=fi())!==o?t=e=xr(e,n,s):(qo=t,t=o),t===o&&(t=qu())===o&&(t=qo,"with"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Dr)),e!==o&&Ql()!==o?("parser"===r.substr(qo,6).toLowerCase()?(n=r.substr(qo,6),qo+=6):(n=o,0===Qo&&nu($r)),n!==o&&Ql()!==o&&(s=Ba())!==o?t=e={type:"with parser",expr:s}:(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,"visible"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(Pr)),e===o&&("invisible"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(Fr))),e!==o&&(e={type:(a=e).toLowerCase(),expr:a.toLowerCase()}),(t=e)===o&&(t=qo,"pad_index"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(Gr)),e===o&&("sort_in_tempdb"===r.substr(qo,14).toLowerCase()?(e=r.substr(qo,14),qo+=14):(e=o,0===Qo&&nu(jr)),e===o&&("ignore_dup_key"===r.substr(qo,14).toLowerCase()?(e=r.substr(qo,14),qo+=14):(e=o,0===Qo&&nu(Hr)),e===o&&("statistics_norecompute"===r.substr(qo,22).toLowerCase()?(e=r.substr(qo,22),qo+=22):(e=o,0===Qo&&nu(Yr)),e===o&&("statistics_incremental"===r.substr(qo,22).toLowerCase()?(e=r.substr(qo,22),qo+=22):(e=o,0===Qo&&nu(Br)),e===o&&("drop_existing"===r.substr(qo,13).toLowerCase()?(e=r.substr(qo,13),qo+=13):(e=o,0===Qo&&nu(Wr)),e===o&&("online"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(Xr)),e===o&&("resumable"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(Vr)),e===o&&("allow_row_locks"===r.substr(qo,15).toLowerCase()?(e=r.substr(qo,15),qo+=15):(e=o,0===Qo&&nu(qr)),e===o&&("allow_page_locks"===r.substr(qo,16).toLowerCase()?(e=r.substr(qo,16),qo+=16):(e=o,0===Qo&&nu(Kr)),e===o&&("optimize_for_sequential_key"===r.substr(qo,27).toLowerCase()?(e=r.substr(qo,27),qo+=27):(e=o,0===Qo&&nu(Zr)))))))))))),e!==o&&Ql()!==o&&(n=Ul())!==o&&Ql()!==o?((s=Fi())===o&&(s=function(){var t,e,n,s;return t=qo,"off"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(mn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()),s!==o?t=e=function(r,t,e){return{type:r.toLowerCase(),symbol:t,expr:{type:"origin",value:e[0]}}}(e,n,s):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,"data_compression"===r.substr(qo,16).toLowerCase()?(e=r.substr(qo,16),qo+=16):(e=o,0===Qo&&nu(zr)),e!==o&&Ql()!==o&&(n=Ul())!==o&&Ql()!==o?("none"===r.substr(qo,4).toLowerCase()?(s=r.substr(qo,4),qo+=4):(s=o,0===Qo&&nu(H)),s===o&&("row"===r.substr(qo,3).toLowerCase()?(s=r.substr(qo,3),qo+=3):(s=o,0===Qo&&nu(Qr)),s===o&&("PAGE"===r.substr(qo,4)?(s="PAGE",qo+=4):(s=o,0===Qo&&nu(Jr)))),s!==o&&Ql()!==o?((u=function(){var t,e,n;return t=qo,Fi()!==o&&Ql()!==o?("partitions"===r.substr(qo,10).toLowerCase()?(e=r.substr(qo,10),qo+=10):(e=o,0===Qo&&nu(Or)),e!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=function(){var r,t,e,n,s,u,a,l;if(r=qo,(t=zu())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=zu())!==o?n=s=[s,u,a,l]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=zu())!==o?n=s=[s,u,a,l]:(qo=n,n=o);e!==o?r=t=i(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o&&Ql()!==o&&Vl()!==o?t={type:"on partitions",partitions:n}:(qo=t,t=o)):(qo=t,t=o),t}())===o&&(u=null),u!==o?t=e=function(r,t,e,n){return{type:r.toLowerCase(),symbol:t,expr:{value:e,on:n}}}(e,n,s,u):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=tc())))))),t}function Ju(){var r,t,e,n;if(r=qo,(t=na())!==o){for(e=[],n=ra();n!==o;)e.push(n),n=ra();e!==o?r=t=rt(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function ra(){var r,t,e;return r=qo,Ql()!==o&&(t=Bl())!==o&&Ql()!==o&&(e=na())!==o?r=e:(qo=r,r=o),r===o&&(r=qo,Ql()!==o&&(t=function(){var r,t,e,n,s,u,a,i,l;return r=qo,(t=sa())!==o&&Ql()!==o&&(e=na())!==o&&Ql()!==o&&(n=Yi())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(s=Wa())!==o&&Ql()!==o&&(u=Vl())!==o?(a=t,l=s,(i=e).join=a,i.using=l,r=t=i):(qo=r,r=o),r===o&&(r=qo,(t=sa())!==o&&Ql()!==o&&(e=na())!==o&&Ql()!==o?((n=ua())===o&&(n=null),n!==o?(t=function(r,t,e){return t.join=r,t.on=e,t}(t,e,n),r=t):(qo=r,r=o)):(qo=r,r=o),r===o&&(r=qo,(t=sa())!==o&&Ql()!==o&&(e=Xl())!==o&&Ql()!==o&&(n=lu())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o?((s=Bu())===o&&(s=null),s!==o&&Ql()!==o?((u=ua())===o&&(u=null),u!==o?(t=function(r,t,e,n){return t.parentheses=!0,{expr:t,as:e,join:r,on:n}}(t,n,s,u),r=t):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o))),r}())!==o?r=t:(qo=r,r=o)),r}function ta(){var t,e,n,s,u,a;return t=qo,"forceseek"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(tt)),e!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=Fa())!==o&&Ql()!==o&&(s=Xl())!==o&&Ql()!==o&&(u=ia())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o&&Vl()!==o?t=e={keyword:"forceseek",index:n,index_columns:u,parentheses:!0}:(qo=t,t=o),t===o&&(t=qo,"spatial_window_max_cells"===r.substr(qo,24).toLowerCase()?(e=r.substr(qo,24),qo+=24):(e=o,0===Qo&&nu(et)),e!==o&&Ql()!==o&&Ul()!==o&&Ql()!==o&&(n=fi())!==o?t=e={keyword:"spatial_window_max_cells",expr:n}:(qo=t,t=o),t===o&&(t=qo,"noexpand"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(nt)),e===o&&(e=null),e!==o&&Ql()!==o&&Dl()!==o&&Ql()!==o&&(n=Xl())!==o&&Ql()!==o&&(s=Wa())!==o&&Ql()!==o&&(u=Vl())!==o?t=e={keyword:"index",expr:s,parentheses:!0,prefix:(a=e)&&a.toLowerCase()}:(qo=t,t=o),t===o&&(t=qo,"noexpand"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(nt)),e===o&&(e=null),e!==o&&Ql()!==o&&Dl()!==o&&Ql()!==o&&(n=Ul())!==o&&Ql()!==o&&(s=Fa())!==o?t=e=function(r,t){return{keyword:"index",expr:t,prefix:r&&r.toLowerCase()}}(e,s):(qo=t,t=o),t===o&&(t=qo,"noexpand"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(nt)),e===o&&("forcescan"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(st)),e===o&&("forceseek"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(tt)),e===o&&("holdlock"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(ot)),e===o&&("nolock"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(ut)),e===o&&("nowait"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(at)),e===o&&("paglock"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(it)),e===o&&("readcommitted"===r.substr(qo,13).toLowerCase()?(e=r.substr(qo,13),qo+=13):(e=o,0===Qo&&nu(lt)),e===o&&("readcommittedlock"===r.substr(qo,17).toLowerCase()?(e=r.substr(qo,17),qo+=17):(e=o,0===Qo&&nu(ct)),e===o&&("readpast"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(ft)),e===o&&("readuncommitted"===r.substr(qo,15).toLowerCase()?(e=r.substr(qo,15),qo+=15):(e=o,0===Qo&&nu(bt)),e===o&&("repeatableread "===r.substr(qo,15).toLowerCase()?(e=r.substr(qo,15),qo+=15):(e=o,0===Qo&&nu(vt)),e===o&&("rowlock"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(pt)),e===o&&("serializable"===r.substr(qo,12).toLowerCase()?(e=r.substr(qo,12),qo+=12):(e=o,0===Qo&&nu(Lt)),e===o&&("snapshot"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(Ct)),e===o&&("tablock"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(dt)),e===o&&("tablockx"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(wt)),e===o&&("updlock"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(ht)),e===o&&("xlock"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(yt)))))))))))))))))))),e!==o&&(e=function(r){return{keyword:"literal_string",expr:{type:"origin",value:r}}}(e)),t=e)))),t}function ea(){var r,t,e,n,s;return r=qo,(t=Bi())===o&&(t=null),t!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(e=function(){var r,t,e,n,s,u,a,l;if(r=qo,(t=ta())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=ta())!==o?n=s=[s,u,a,l]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=ta())!==o?n=s=[s,u,a,l]:(qo=n,n=o);e!==o?r=t=i(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o&&Ql()!==o&&Vl()!==o?(s=e,r=t={keyword:(n=t)&&n[0].toLowerCase(),expr:s,parentheses:!0}):(qo=r,r=o),r}function na(){var t,e,n,s,u,a,i,l;return t=qo,(e=function(){var t;return"dual"===r.substr(qo,4).toLowerCase()?(t=r.substr(qo,4),qo+=4):(t=o,0===Qo&&nu(Co)),t}())!==o&&(e={type:"dual"}),(t=e)===o&&(t=qo,(e=oa())!==o&&Ql()!==o?((n=Bu())===o&&(n=null),n!==o&&Ql()!==o?((s=ea())===o&&(s=null),s!==o?(i=n,l=s,(a=e).as=i,a.table_hint=l,t=e=a):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=da())!==o&&Ql()!==o?((n=Yu())===o&&(n=null),n!==o?t=e=function(r,t){return{expr:{type:"values",values:r},as:t}}(e,n):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=Xl())!==o&&Ql()!==o?((n=lu())===o&&(n=da()),n!==o&&Ql()!==o&&(s=Vl())!==o&&Ql()!==o?((u=Yu())===o&&(u=null),u!==o?t=e=function(r,t){return Array.isArray(r)&&(r={type:"values",values:r}),r.parentheses=!0,{expr:r,as:t}}(n,u):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)))),t}function sa(){var t,e,n,s;return t=qo,(e=function(){var t,e,n,s;return t=qo,"left"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Tn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=qo,"right"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(In)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=qo,"full"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Nn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()),e!==o&&Ql()!==o?((n=function(){var t,e,n,s;return t=qo,"outer"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(gn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())===o&&(n=null),n!==o&&Ql()!==o&&Gi()!==o?(s=n,t=e=[e[0].toUpperCase(),s&&s[0],"JOIN"].filter((r=>r)).join(" ")):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=function(){var t,e,n,s;return t=qo,"cross"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Sn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&Ql()!==o&&(n=Gi())!==o?t=e="CROSS JOIN":(qo=t,t=o),t===o&&(t=qo,(e=function(){var t,e,n,s;return t=qo,"inner"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Rn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())===o&&(e=null),e!==o&&Ql()!==o&&(n=Gi())!==o?t=e=function(r){return r?"INNER JOIN":"JOIN"}(e):(qo=t,t=o))),t}function oa(){var r,t,e,n,s,u,a,i,l,c;return r=qo,(t=Fa())!==o&&(e=Ql())!==o&&(n=Yl())!==o&&(s=Ql())!==o&&(u=Fa())!==o&&(a=Ql())!==o&&Yl()!==o&&Ql()!==o&&(i=Fa())!==o&&Ql()!==o&&Yl()!==o&&Ql()!==o&&(l=Fa())!==o?r=t={server:t,db:u,schema:i,table:l}:(qo=r,r=o),r===o&&(r=qo,(t=Fa())!==o&&(e=Ql())!==o&&(n=Yl())!==o&&(s=Ql())!==o&&(u=Fa())!==o&&(a=Ql())!==o&&Yl()!==o&&Ql()!==o&&(i=Fa())!==o?r=t=function(r,t,e){return{db:r,schema:t,table:e}}(t,u,i):(qo=r,r=o),r===o&&(r=qo,(t=Fa())!==o?(e=qo,(n=Ql())!==o&&(s=Yl())!==o&&(u=Ql())!==o&&(a=Fa())!==o?e=n=[n,s,u,a]:(qo=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){const e={db:null,table:r};return null!==t&&(e.db=r,e.table=t[3]),e}(t,e):(qo=r,r=o)):(qo=r,r=o),r===o&&(r=qo,(t=pc())!==o&&((c=t).db=null,c.table=c.name,t=c),r=t))),r}function ua(){var r,t;return r=qo,Fi()!==o&&Ql()!==o&&(t=Ta())!==o?r=t:(qo=r,r=o),r}function aa(){var t,e;return t=qo,function(){var t,e,n,s;return t=qo,"where"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Mn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&(e=Ta())!==o?t=e:(qo=t,t=o),t}function ia(){var r;return(r=cu())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=oi())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=oi())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=oi())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}()),r}function la(){var t,e;return t=qo,function(){var t,e,n,s;return t=qo,"order"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Pn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&Xi()!==o&&Ql()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=ca())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=ca())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=ca())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o?t=e:(qo=t,t=o),t}function ca(){var r,t,e;return r=qo,(t=ma())!==o&&Ql()!==o?((e=qi())===o&&(e=Vi()),e===o&&(e=null),e!==o?r=t={expr:t,type:e}:(qo=r,r=o)):(qo=r,r=o),r}function fa(){var r;return(r=fi())===o&&(r=Ka()),r}function ba(){var t,e,n,s,u,a;return t=qo,function(){var t,e,n,s;return t=qo,"limit"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Gn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&(e=fa())!==o&&Ql()!==o?(n=qo,(s=Bl())===o&&(s=function(){var t,e,n,s;return t=qo,"offset"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(jn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="OFFSET":(qo=t,t=o)):(qo=t,t=o),t}()),s!==o&&(u=Ql())!==o&&(a=fa())!==o?n=s=[s,u,a]:(qo=n,n=o),n===o&&(n=null),n!==o?t=function(r,t){const e=[r];return t&&e.push(t[2]),{seperator:t&&t[0]&&t[0].toLowerCase()||"",value:e}}(e,n):(qo=t,t=o)):(qo=t,t=o),t}function va(){var t,e,n,s,u,a,i,l,c;return t=qo,e=qo,(n=Fa())!==o&&(s=Ql())!==o&&(u=Yl())!==o?e=n=[n,s,u]:(qo=e,e=o),e===o&&(e=null),e!==o&&(n=Ql())!==o&&(s=ja())!==o&&(u=Ql())!==o?(61===r.charCodeAt(qo)?(a="=",qo++):(a=o,0===Qo&&nu(Nt)),a!==o&&Ql()!==o&&(i=xa())!==o?t=e={column:s,value:i,table:(c=e)&&c[0]}:(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,e=qo,(n=Fa())!==o&&(s=Ql())!==o&&(u=Yl())!==o?e=n=[n,s,u]:(qo=e,e=o),e===o&&(e=null),e!==o&&(n=Ql())!==o&&(s=ja())!==o&&(u=Ql())!==o?(61===r.charCodeAt(qo)?(a="=",qo++):(a=o,0===Qo&&nu(Nt)),a!==o&&Ql()!==o&&(i=Hi())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(l=$a())!==o&&Ql()!==o&&Vl()!==o?t=e=function(r,t,e){return{column:t,value:e,table:r&&r[0],keyword:"values"}}(e,s,l):(qo=t,t=o)):(qo=t,t=o)),t}function pa(){var r;return(r=da())===o&&(r=Fu()),r}function La(){var r,t,e;return r=qo,xi()!==o&&Ql()!==o&&(t=Xl())!==o&&Ql()!==o&&(e=Wa())!==o&&Ql()!==o&&Vl()!==o?r=e:(qo=r,r=o),r===o&&(r=qo,xi()!==o&&Ql()!==o&&(t=wa())!==o?r=t:(qo=r,r=o)),r}function Ca(){var t,e;return t=qo,(e=function(){var t,e,n,s;return t=qo,"insert"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(un)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(e="insert"),(t=e)===o&&(t=qo,(e=_i())!==o&&(e="replace"),t=e),t}function da(){var r,t;return r=qo,Hi()!==o&&Ql()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=wa())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=wa())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=wa())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())!==o?r=t:(qo=r,r=o),r}function wa(){var r,t;return r=qo,Xl()!==o&&Ql()!==o&&(t=ha())!==o&&Ql()!==o&&Vl()!==o?r=t:(qo=r,r=o),r}function ha(){var r,t,e,n,s,u,a,i;if(r=qo,(t=ma())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=ma())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=ma())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=function(r,t){const e={type:"expr_list"};return e.value=Ac(r,t),e}(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function ya(){var r,t,e,n,s,u;if(r=qo,(t=Ea())!==o)if(Ql()!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Ea())!==o?n=s=[s,u]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Ea())!==o?n=s=[s,u]:(qo=n,n=o);e!==o?r=t=f(t,e):(qo=r,r=o)}else qo=r,r=o;else qo=r,r=o;return r}function Ea(){var t,e,n;return t=qo,function(){var t,e,n,s;return t=qo,"when"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(us)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&(e=Ta())!==o&&Ql()!==o&&function(){var t,e,n,s;return t=qo,"then"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(as)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&(n=ma())!==o?t={type:"when",cond:e,result:n}:(qo=t,t=o),t}function Aa(){var r,t;return r=qo,ul()!==o&&Ql()!==o&&(t=ma())!==o?r={type:"else",result:t}:(qo=r,r=o),r}function ma(){var r;return(r=function(){var r;return(r=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=Da())!==o){if(e=[],n=qo,(s=Ql())!==o&&(u=zl())!==o&&(a=Ql())!==o&&(i=Da())!==o?n=s=[s,u,a,i]:(qo=n,n=o),n!==o)for(;n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=zl())!==o&&(a=Ql())!==o&&(i=Da())!==o?n=s=[s,u,a,i]:(qo=n,n=o);else e=o;e!==o&&(n=Ql())!==o?((s=Sa())===o&&(s=null),s!==o?(t=function(r,t,e){const n=mc(r,t);return null===e?n:"arithmetic"===e.type?mc(n,e.tail):yc(e.op,n,e.right)}(t,e,s),r=t):(qo=r,r=o)):(qo=r,r=o)}else qo=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=qo,(t=Ia())!==o){for(e=[],n=qo,(s=Jl())!==o&&(u=sl())!==o&&(a=Ql())!==o&&(i=Ia())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Jl())!==o&&(u=sl())!==o&&(a=Ql())!==o&&(i=Ia())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=Rt(t,e):(qo=r,r=o)}else qo=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u;if(r=qo,(t=Ua())!==o){if(e=[],n=qo,(s=Ql())!==o&&(u=Da())!==o?n=s=[s,u]:(qo=n,n=o),n!==o)for(;n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Da())!==o?n=s=[s,u]:(qo=n,n=o);else e=o;e!==o?r=t=hc(t,e[0][1]):(qo=r,r=o)}else qo=r,r=o;return r}()),r}())===o&&(r=lu()),r}function Ta(){var r,t,e,n,s,u,a,i;if(r=qo,(t=ma())!==o){for(e=[],n=qo,(s=Ql())!==o?((u=nl())===o&&(u=sl())===o&&(u=Bl()),u!==o&&(a=Ql())!==o&&(i=ma())!==o?n=s=[s,u,a,i]:(qo=n,n=o)):(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o?((u=nl())===o&&(u=sl())===o&&(u=Bl()),u!==o&&(a=Ql())!==o&&(i=ma())!==o?n=s=[s,u,a,i]:(qo=n,n=o)):(qo=n,n=o);e!==o?r=t=function(r,t){const e=t.length;let n=r,s="";for(let r=0;r<e;++r)","===t[r][1]?(s=",",Array.isArray(n)||(n=[n]),n.push(t[r][3])):n=yc(t[r][1],n,t[r][3]);if(","===s){const r={type:"expr_list"};return r.value=n,r}return n}(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function Ia(){var r,t,e,n,s,u,a,i;if(r=qo,(t=Na())!==o){for(e=[],n=qo,(s=Jl())!==o&&(u=nl())!==o&&(a=Ql())!==o&&(i=Na())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Jl())!==o&&(u=nl())!==o&&(a=Ql())!==o&&(i=Na())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=Rt(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function Na(){var t,e,n,s,u;return(t=Ra())===o&&(t=function(){var r,t,e,n,s;return r=qo,(t=function(){var r,t,e,n,s;return r=qo,t=qo,(e=el())!==o&&(n=Ql())!==o&&(s=tl())!==o?t=e=[e,n,s]:(qo=t,t=o),t!==o&&(t=_t(t)),(r=t)===o&&(r=tl()),r}())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(e=lu())!==o&&Ql()!==o&&Vl()!==o?(n=t,(s=e).parentheses=!0,r=t=hc(n,s)):(qo=r,r=o),r}())===o&&(t=qo,(e=el())===o&&(e=qo,33===r.charCodeAt(qo)?(n="!",qo++):(n=o,0===Qo&&nu(St)),n!==o?(s=qo,Qo++,61===r.charCodeAt(qo)?(u="=",qo++):(u=o,0===Qo&&nu(Nt)),Qo--,u===o?s=void 0:(qo=s,s=o),s!==o?e=n=[n,s]:(qo=e,e=o)):(qo=e,e=o)),e!==o&&(n=Ql())!==o&&(s=Na())!==o?t=e=hc("NOT",s):(qo=t,t=o)),t}function Ra(){var r,t,e,n,s;return r=qo,(t=xa())!==o&&Ql()!==o?((e=Sa())===o&&(e=null),e!==o?(n=t,r=t=null===(s=e)?n:"arithmetic"===s.type?mc(n,s.tail):yc(s.op,n,s.right)):(qo=r,r=o)):(qo=r,r=o),r===o&&(r=ai())===o&&(r=$a()),r}function Sa(){var r;return(r=function(){var r,t,e,n,s,u;if(r=[],t=qo,(e=Ql())!==o&&(n=_a())!==o&&(s=Ql())!==o&&(u=xa())!==o?t=e=[e,n,s,u]:(qo=t,t=o),t!==o)for(;t!==o;)r.push(t),t=qo,(e=Ql())!==o&&(n=_a())!==o&&(s=Ql())!==o&&(u=xa())!==o?t=e=[e,n,s,u]:(qo=t,t=o);else r=o;return r!==o&&(r={type:"arithmetic",tail:r}),r}())===o&&(r=Oa())===o&&(r=function(){var r,t,e,n;return r=qo,(t=function(){var r,t,e,n,s;return r=qo,t=qo,(e=el())!==o&&(n=Ql())!==o&&(s=zi())!==o?t=e=[e,n,s]:(qo=t,t=o),t!==o&&(t=_t(t)),(r=t)===o&&(r=zi()),r}())!==o&&Ql()!==o&&(e=xa())!==o&&Ql()!==o&&nl()!==o&&Ql()!==o&&(n=xa())!==o?r=t={op:t,right:{type:"expr_list",value:[e,n]}}:(qo=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s;return r=qo,(t=Ji())!==o&&(e=Ql())!==o&&(n=xa())!==o?r=t={op:"IS",right:n}:(qo=r,r=o),r===o&&(r=qo,t=qo,(e=Ji())!==o&&(n=Ql())!==o&&(s=el())!==o?t=e=[e,n,s]:(qo=t,t=o),t!==o&&(e=Ql())!==o&&(n=xa())!==o?(t=function(r){return{op:"IS NOT",right:r}}(n),r=t):(qo=r,r=o)),r}())===o&&(r=function(){var r,t,e;return r=qo,(t=function(){var r,t,e,n,s;return r=qo,t=qo,(e=el())!==o&&(n=Ql())!==o&&(s=rl())!==o?t=e=[e,n,s]:(qo=t,t=o),t!==o&&(t=_t(t)),(r=t)===o&&(r=rl()),r}())!==o&&Ql()!==o?((e=oi())===o&&(e=Ra()),e!==o?r=t={op:t,right:e}:(qo=r,r=o)):(qo=r,r=o),r}()),r}function _a(){var t;return">="===r.substr(qo,2)?(t=">=",qo+=2):(t=o,0===Qo&&nu(gt)),t===o&&(62===r.charCodeAt(qo)?(t=">",qo++):(t=o,0===Qo&&nu(Ot)),t===o&&("<="===r.substr(qo,2)?(t="<=",qo+=2):(t=o,0===Qo&&nu(xt)),t===o&&("<>"===r.substr(qo,2)?(t="<>",qo+=2):(t=o,0===Qo&&nu(Ut)),t===o&&(60===r.charCodeAt(qo)?(t="<",qo++):(t=o,0===Qo&&nu(Mt)),t===o&&(61===r.charCodeAt(qo)?(t="=",qo++):(t=o,0===Qo&&nu(Nt)),t===o&&("!="===r.substr(qo,2)?(t="!=",qo+=2):(t=o,0===Qo&&nu(kt)))))))),t}function ga(){var r,t,e,n,s;return r=qo,t=qo,(e=el())!==o&&(n=Ql())!==o&&(s=Qi())!==o?t=e=[e,n,s]:(qo=t,t=o),t!==o&&(t=_t(t)),(r=t)===o&&(r=Qi()),r}function Oa(){var r,t,e,n;return r=qo,(t=ga())!==o&&Ql()!==o&&(e=Xl())!==o&&Ql()!==o&&(n=ha())!==o&&Ql()!==o&&Vl()!==o?r=t={op:t,right:n}:(qo=r,r=o),r===o&&(r=qo,(t=ga())!==o&&Ql()!==o?((e=pc())===o&&(e=ai()),e!==o?r=t=function(r,t){return{op:r,right:t}}(t,e):(qo=r,r=o)):(qo=r,r=o)),r}function xa(){var r,t,e,n,s,u,a,i;if(r=qo,(t=Ma())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Ua())!==o&&(a=Ql())!==o&&(i=Ma())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Ua())!==o&&(a=Ql())!==o&&(i=Ma())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=Rt(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function Ua(){var t;return 43===r.charCodeAt(qo)?(t="+",qo++):(t=o,0===Qo&&nu(Dt)),t===o&&(45===r.charCodeAt(qo)?(t="-",qo++):(t=o,0===Qo&&nu($t))),t}function Ma(){var r,t,e,n,s,u,a,i;if(r=qo,(t=Da())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=ka())!==o&&(a=Ql())!==o&&(i=Da())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=ka())!==o&&(a=Ql())!==o&&(i=Da())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=mc(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function ka(){var t;return 42===r.charCodeAt(qo)?(t="*",qo++):(t=o,0===Qo&&nu(Pt)),t===o&&(47===r.charCodeAt(qo)?(t="/",qo++):(t=o,0===Qo&&nu(Ft)),t===o&&(37===r.charCodeAt(qo)?(t="%",qo++):(t=o,0===Qo&&nu(Gt)))),t}function Da(){var t,e,n;return(t=function(){var t,e,n,s,u,a,i,l,c;return t=qo,(e=il())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=ma())!==o&&Ql()!==o&&ki()!==o&&Ql()!==o&&(s=Cc())!==o&&Ql()!==o&&(u=Vl())!==o?(l=n,c=s,t=e={type:"cast",keyword:e.toLowerCase(),expr:l,symbol:"as",target:c}):(qo=t,t=o),t===o&&(t=qo,(e=il())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=ma())!==o&&Ql()!==o&&ki()!==o&&Ql()!==o&&(s=vl())!==o&&Ql()!==o&&(u=Xl())!==o&&Ql()!==o&&(a=vi())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o&&(i=Vl())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+")"}}}(e,n,a),t=e):(qo=t,t=o),t===o&&(t=qo,(e=il())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=ma())!==o&&Ql()!==o&&ki()!==o&&Ql()!==o&&(s=vl())!==o&&Ql()!==o&&(u=Xl())!==o&&Ql()!==o&&(a=vi())!==o&&Ql()!==o&&Bl()!==o&&Ql()!==o&&(i=vi())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o&&Vl()!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+", "+n+")"}}}(e,n,a,i),t=e):(qo=t,t=o),t===o&&(t=qo,(e=il())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=ma())!==o&&Ql()!==o&&ki()!==o&&Ql()!==o&&(s=function(){var t;return(t=function(){var t,e,n,s;return t=qo,"signed"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(ys)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SIGNED":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=pl()),t}())!==o&&Ql()!==o?((u=Cl())===o&&(u=null),u!==o&&Ql()!==o&&(a=Vl())!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:e+(n?" "+n:"")}}}(e,n,s,u),t=e):(qo=t,t=o)):(qo=t,t=o)))),t}())===o&&(t=oi())===o&&(t=Za())===o&&(t=function(){var t,e,n,s,u;return t=qo,(e=function(){var t;return(t=si())===o&&(t=function(){var t,e,n,s;return t=qo,"current_user"===r.substr(qo,12).toLowerCase()?(e=r.substr(qo,12),qo+=12):(e=o,0===Qo&&nu(no)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="CURRENT_USER":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"user"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Xs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="USER":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"session_user"===r.substr(qo,12).toLowerCase()?(e=r.substr(qo,12),qo+=12):(e=o,0===Qo&&nu(so)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SESSION_USER":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"system_user"===r.substr(qo,11).toLowerCase()?(e=r.substr(qo,11),qo+=11):(e=o,0===Qo&&nu(oo)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SYSTEM_USER":(qo=t,t=o)):(qo=t,t=o),t}()),t}())!==o&&Ql()!==o&&(n=Xl())!==o&&Ql()!==o?((s=ha())===o&&(s=null),s!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o?((u=Qa())===o&&(u=null),u!==o?t=e={type:"function",name:e,args:s||{type:"expr_list",value:[]},over:u}:(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=si())!==o&&Ql()!==o?((n=za())===o&&(n=null),n!==o?t=e={type:"function",name:e,over:n}:(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=fc())!==o&&Ql()!==o&&(n=Xl())!==o&&Ql()!==o?((s=Ta())===o&&(s=null),s!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o?((u=Qa())===o&&(u=null),u!==o?(e=function(r,t,e){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,s,u),t=e):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o))),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=qo,ol()!==o&&Ql()!==o&&(t=ya())!==o&&Ql()!==o?((e=Aa())===o&&(e=null),e!==o&&Ql()!==o&&(n=al())!==o&&Ql()!==o?((s=ol())===o&&(s=null),s!==o?(a=t,(i=e)&&a.push(i),r={type:"case",expr:null,args:a}):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o),r===o&&(r=qo,ol()!==o&&Ql()!==o&&(t=ma())!==o&&Ql()!==o&&(e=ya())!==o&&Ql()!==o?((n=Aa())===o&&(n=null),n!==o&&Ql()!==o&&(s=al())!==o&&Ql()!==o?((u=ol())===o&&(u=null),u!==o?r=function(r,t,e){return e&&t.push(e),{type:"case",expr:r,args:t}}(t,e,n):(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o)),r}())===o&&(t=function(){var t,e,n;return t=qo,function(){var t,e,n,s;return t=qo,"interval"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(qs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="INTERVAL":(qo=t,t=o)):(qo=t,t=o),t}()!==o&&Ql()!==o&&(e=ma())!==o&&Ql()!==o&&(n=function(){var t;return(t=function(){var t,e,n,s;return t=qo,"year"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Ks)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="YEAR":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"month"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Zs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="MONTH":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"day"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(zs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DAY":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"hour"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Qs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="HOUR":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"minute"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(Js)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="MINUTE":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"second"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(ro)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SECOND":(qo=t,t=o)):(qo=t,t=o),t}()),t}())!==o?t={type:"interval",expr:e,unit:n.toLowerCase()}:(qo=t,t=o),t}())===o&&(t=$a())===o&&(t=Ka())===o&&(t=qo,Xl()!==o&&Ql()!==o&&(e=Ta())!==o&&Ql()!==o&&Vl()!==o?((n=e).parentheses=!0,t=n):(qo=t,t=o),t===o&&(t=pc())),t}function $a(){var r,t,e,n,s;return r=qo,(t=Fa())!==o&&Ql()!==o&&Yl()!==o&&Ql()!==o&&(e=Ha())!==o?(n=t,s=e,Sc.add(`select::${n}::${s}`),r=t={type:"column_ref",table:n,column:s}):(qo=r,r=o),r===o&&(r=qo,(t=Ha())!==o&&(t=function(r){return Sc.add("select::null::"+r),{type:"column_ref",table:null,column:r}}(t)),r=t),r}function Pa(){var r,t,e,n,s,u,a,i;if(r=qo,(t=Ha())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Ha())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=Ha())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function Fa(){var r,t;return r=qo,(t=Ba())!==o&&(jt(t)?o:void 0)!==o?r=t:(qo=r,r=o),r===o&&(r=qo,r=t=Ga()),r}function Ga(){var t;return(t=function(){var t,e,n,s;if(t=qo,34===r.charCodeAt(qo)?(e='"',qo++):(e=o,0===Qo&&nu(Ht)),e!==o){if(n=[],Yt.test(r.charAt(qo))?(s=r.charAt(qo),qo++):(s=o,0===Qo&&nu(Bt)),s!==o)for(;s!==o;)n.push(s),Yt.test(r.charAt(qo))?(s=r.charAt(qo),qo++):(s=o,0===Qo&&nu(Bt));else n=o;n!==o?(34===r.charCodeAt(qo)?(s='"',qo++):(s=o,0===Qo&&nu(Ht)),s!==o?t=e=Wt(n):(qo=t,t=o)):(qo=t,t=o)}else qo=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=qo,39===r.charCodeAt(qo)?(e="'",qo++):(e=o,0===Qo&&nu(dr)),e!==o){if(n=[],Xt.test(r.charAt(qo))?(s=r.charAt(qo),qo++):(s=o,0===Qo&&nu(Vt)),s!==o)for(;s!==o;)n.push(s),Xt.test(r.charAt(qo))?(s=r.charAt(qo),qo++):(s=o,0===Qo&&nu(Vt));else n=o;n!==o?(39===r.charCodeAt(qo)?(s="'",qo++):(s=o,0===Qo&&nu(dr)),s!==o?t=e=Wt(n):(qo=t,t=o)):(qo=t,t=o)}else qo=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=qo,96===r.charCodeAt(qo)?(e="`",qo++):(e=o,0===Qo&&nu(qt)),e!==o){if(n=[],Kt.test(r.charAt(qo))?(s=r.charAt(qo),qo++):(s=o,0===Qo&&nu(Zt)),s!==o)for(;s!==o;)n.push(s),Kt.test(r.charAt(qo))?(s=r.charAt(qo),qo++):(s=o,0===Qo&&nu(Zt));else n=o;n!==o?(96===r.charCodeAt(qo)?(s="`",qo++):(s=o,0===Qo&&nu(qt)),s!==o?t=e=Wt(n):(qo=t,t=o)):(qo=t,t=o)}else qo=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=qo,91===r.charCodeAt(qo)?(e="[",qo++):(e=o,0===Qo&&nu(zt)),e!==o){if(n=[],Qt.test(r.charAt(qo))?(s=r.charAt(qo),qo++):(s=o,0===Qo&&nu(Jt)),s!==o)for(;s!==o;)n.push(s),Qt.test(r.charAt(qo))?(s=r.charAt(qo),qo++):(s=o,0===Qo&&nu(Jt));else n=o;n!==o?(93===r.charCodeAt(qo)?(s="]",qo++):(s=o,0===Qo&&nu(re)),s!==o?t=e=Wt(n):(qo=t,t=o)):(qo=t,t=o)}else qo=t,t=o;return t}()),t}function ja(){var r;return r=qo,(r=Ya())===o&&(r=Ga()),r}function Ha(){var r,t;return r=qo,(t=Ya())!==o&&(jt(t)?o:void 0)!==o?r=t:(qo=r,r=o),r===o&&(r=Ga()),r}function Ya(){var r,t,e,n;if(r=qo,(t=Xa())!==o){for(e=[],n=qa();n!==o;)e.push(n),n=qa();e!==o?r=t=te(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function Ba(){var r,t,e,n;if(r=qo,(t=Xa())!==o){for(e=[],n=Va();n!==o;)e.push(n),n=Va();e!==o?r=t=te(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function Wa(){var r,t,e,n,s,u,a,l;if(r=qo,(t=Ba())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=Ba())!==o?n=s=[s,u,a,l]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(l=Ba())!==o?n=s=[s,u,a,l]:(qo=n,n=o);e!==o?r=t=i(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function Xa(){var t;return ee.test(r.charAt(qo))?(t=r.charAt(qo),qo++):(t=o,0===Qo&&nu(ne)),t}function Va(){var t;return se.test(r.charAt(qo))?(t=r.charAt(qo),qo++):(t=o,0===Qo&&nu(oe)),t}function qa(){var t;return ue.test(r.charAt(qo))?(t=r.charAt(qo),qo++):(t=o,0===Qo&&nu(ae)),t}function Ka(){var t,e,n;return t=qo,58===r.charCodeAt(qo)?(e=":",qo++):(e=o,0===Qo&&nu(ie)),e!==o&&(n=Ba())!==o?t=e=[e,n]:(qo=t,t=o),t!==o&&(t={type:"param",value:t[1]}),t}function Za(){var t;return(t=function(){var t,e,n,s;return t=qo,(e=function(){var t,e,n,s;return t=qo,"count"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Jn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="COUNT":(qo=t,t=o)):(qo=t,t=o),t}())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=function(){var t,e,n,s,u;return t=qo,(e=function(){var t;return 42===r.charCodeAt(qo)?(t="*",qo++):(t=o,0===Qo&&nu(Pt)),t!==o&&(t={type:"star",value:"*"}),t}())!==o&&(e={expr:e}),(t=e)===o&&(t=qo,(e=Zi())===o&&(e=null),e!==o&&Ql()!==o&&(n=Xl())!==o&&Ql()!==o&&(s=ma())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o?((u=la())===o&&(u=null),u!==o?t=e={distinct:e,expr:s,orderby:u,parentheses:!0}:(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=Zi())===o&&(e=null),e!==o&&Ql()!==o&&(n=ma())!==o&&Ql()!==o?((s=la())===o&&(s=null),s!==o?(e=function(r,t,e){return{distinct:r,expr:t,orderby:e}}(e,n,s),t=e):(qo=t,t=o)):(qo=t,t=o))),t}())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o?((s=Qa())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:n,over:s}:(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,(e=function(){var t;return(t=function(){var t,e,n,s;return t=qo,"sum"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(es)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SUM":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"max"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(rs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="MAX":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"min"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(ts)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="MIN":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"avg"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(ns)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="AVG":(qo=t,t=o)):(qo=t,t=o),t}()),t}())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o&&(n=xa())!==o&&Ql()!==o&&Vl()!==o&&Ql()!==o?((s=Qa())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:{expr:n},over:s}:(qo=t,t=o)):(qo=t,t=o),t}()),t}function za(){var r,t,e;return r=qo,Fi()!==o&&Ql()!==o&&Ii()!==o&&Ql()!==o&&(t=gl())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o?((e=ha())===o&&(e=null),e!==o&&Ql()!==o&&Vl()!==o?r={type:"on update",keyword:t,parentheses:!0,expr:e}:(qo=r,r=o)):(qo=r,r=o),r===o&&(r=qo,Fi()!==o&&Ql()!==o&&Ii()!==o&&Ql()!==o&&(t=gl())!==o?r=function(r){return{type:"on update",keyword:r}}(t):(qo=r,r=o)),r}function Qa(){var t,e,n;return t=qo,"over"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(le)),e!==o&&Ql()!==o&&(n=function(){var r,t;return(r=Ba())===o&&(r=qo,Xl()!==o&&Ql()!==o?((t=function(){var r,t,e,n;return r=qo,(t=function(){var r,t;return r=qo,xi()!==o&&Ql()!==o&&Xi()!==o&&Ql()!==o&&(t=ju())!==o?r=t:(qo=r,r=o),r}())===o&&(t=null),t!==o&&Ql()!==o?((e=la())===o&&(e=null),e!==o&&Ql()!==o?((n=function(){var r,t,e,n,s;return r=qo,Rl()!==o&&Ql()!==o?((t=ri())===o&&(t=ti()),t!==o?r="rows "+t.value:(qo=r,r=o)):(qo=r,r=o),r===o&&(r=qo,Rl()!==o&&Ql()!==o&&(t=zi())!==o&&Ql()!==o&&(e=Ja())!==o&&Ql()!==o&&nl()!==o&&Ql()!==o&&(n=Ja())!==o?(s=n,r=`rows between ${e.value} and ${s.value}`):(qo=r,r=o)),r}())===o&&(n=null),n!==o?r=t={name:null,partitionby:t,orderby:e,window_frame_clause:n}:(qo=r,r=o)):(qo=r,r=o)):(qo=r,r=o),r}())===o&&(t=null),t!==o&&Ql()!==o&&Vl()!==o?r={window_specification:t||{},parentheses:!0}:(qo=r,r=o)):(qo=r,r=o)),r}())!==o?t=e={type:"window",as_window_specification:n}:(qo=t,t=o),t===o&&(t=za()),t}function Ja(){var r;return(r=ti())===o&&(r=ri()),r}function ri(){var t,e,n,s;return t=qo,(e=ni())!==o&&Ql()!==o?("following"===r.substr(qo,9).toLowerCase()?(n=r.substr(qo,9),qo+=9):(n=o,0===Qo&&nu(ce)),n!==o?((s=e).value+=" FOLLOWING",t=e=s):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=ei()),t}function ti(){var t,e,n,s;return t=qo,(e=ni())!==o&&Ql()!==o?("preceding"===r.substr(qo,9).toLowerCase()?(n=r.substr(qo,9),qo+=9):(n=o,0===Qo&&nu(fe)),n!==o?((s=e).value+=" PRECEDING",t=e=s):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=ei()),t}function ei(){var t,e,n;return t=qo,"current"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(be)),e!==o&&Ql()!==o?("row"===r.substr(qo,3).toLowerCase()?(n=r.substr(qo,3),qo+=3):(n=o,0===Qo&&nu(Qr)),n!==o?t=e={type:"single_quote_string",value:"current row"}:(qo=t,t=o)):(qo=t,t=o),t}function ni(){var t,e;return t=qo,"unbounded"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(ve)),e!==o&&(e={type:"single_quote_string",value:e.toUpperCase()}),(t=e)===o&&(t=fi()),t}function si(){var t;return(t=function(){var t,e,n,s;return t=qo,"current_date"===r.substr(qo,12).toLowerCase()?(e=r.substr(qo,12),qo+=12):(e=o,0===Qo&&nu(Vs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="CURRENT_DATE":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,"current_time"===r.substr(qo,12).toLowerCase()?(e=r.substr(qo,12),qo+=12):(e=o,0===Qo&&nu(to)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="CURRENT_TIME":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=gl()),t}function oi(){var t;return(t=ai())===o&&(t=fi())===o&&(t=function(){var t,e;return t=qo,(e=function(){var t,e,n,s;return t=qo,"true"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Ve)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(e={type:"bool",value:!0}),(t=e)===o&&(t=qo,(e=function(){var t,e,n,s;return t=qo,"false"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Ze)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(e={type:"bool",value:!1}),t=e),t}())===o&&(t=ui())===o&&(t=function(){var t,e,n,s,u,a;if(t=qo,(e=Sl())===o&&(e=ml())===o&&(e=_l())===o&&(e=Tl()),e!==o)if(Ql()!==o){if(n=qo,39===r.charCodeAt(qo)?(s="'",qo++):(s=o,0===Qo&&nu(dr)),s!==o){for(u=[],a=li();a!==o;)u.push(a),a=li();u!==o?(39===r.charCodeAt(qo)?(a="'",qo++):(a=o,0===Qo&&nu(dr)),a!==o?n=s=[s,u,a]:(qo=n,n=o)):(qo=n,n=o)}else qo=n,n=o;n!==o?t=e=Le(e,n):(qo=t,t=o)}else qo=t,t=o;else qo=t,t=o;if(t===o)if(t=qo,(e=Sl())===o&&(e=ml())===o&&(e=_l())===o&&(e=Tl()),e!==o)if(Ql()!==o){if(n=qo,34===r.charCodeAt(qo)?(s='"',qo++):(s=o,0===Qo&&nu(Ht)),s!==o){for(u=[],a=ii();a!==o;)u.push(a),a=ii();u!==o?(34===r.charCodeAt(qo)?(a='"',qo++):(a=o,0===Qo&&nu(Ht)),a!==o?n=s=[s,u,a]:(qo=n,n=o)):(qo=n,n=o)}else qo=n,n=o;n!==o?t=e=Le(e,n):(qo=t,t=o)}else qo=t,t=o;else qo=t,t=o;return t}()),t}function ui(){var t;return(t=function(){var t,e,n,s;return t=qo,"null"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(We)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(t={type:"null",value:null}),t}function ai(){var t,e,n,s,u,a;if(t=qo,"n"===r.substr(qo,1).toLowerCase()?(e=r.charAt(qo),qo++):(e=o,0===Qo&&nu(pe)),e===o&&(e=null),e!==o){if(n=qo,39===r.charCodeAt(qo)?(s="'",qo++):(s=o,0===Qo&&nu(dr)),s!==o){for(u=[],a=li();a!==o;)u.push(a),a=li();u!==o?(39===r.charCodeAt(qo)?(a="'",qo++):(a=o,0===Qo&&nu(dr)),a!==o?n=s=[s,u,a]:(qo=n,n=o)):(qo=n,n=o)}else qo=n,n=o;n!==o?t=e={type:e?"var_string":"single_quote_string",value:n[1].join("")}:(qo=t,t=o)}else qo=t,t=o;if(t===o){if(t=qo,e=qo,34===r.charCodeAt(qo)?(n='"',qo++):(n=o,0===Qo&&nu(Ht)),n!==o){for(s=[],u=ii();u!==o;)s.push(u),u=ii();s!==o?(34===r.charCodeAt(qo)?(u='"',qo++):(u=o,0===Qo&&nu(Ht)),u!==o?e=n=[n,s,u]:(qo=e,e=o)):(qo=e,e=o)}else qo=e,e=o;e!==o&&(e=function(r){return{type:"double_quote_string",value:r[1].join("")}}(e)),t=e}return t}function ii(){var t;return Ce.test(r.charAt(qo))?(t=r.charAt(qo),qo++):(t=o,0===Qo&&nu(de)),t===o&&(t=ci()),t}function li(){var t;return we.test(r.charAt(qo))?(t=r.charAt(qo),qo++):(t=o,0===Qo&&nu(he)),t===o&&(t=ci()),t}function ci(){var t,e,n,s,u,a,i,l,c,f;return t=qo,"\\'"===r.substr(qo,2)?(e="\\'",qo+=2):(e=o,0===Qo&&nu(ye)),e!==o&&(e="\\'"),(t=e)===o&&(t=qo,'\\"'===r.substr(qo,2)?(e='\\"',qo+=2):(e=o,0===Qo&&nu(Ee)),e!==o&&(e='\\"'),(t=e)===o&&(t=qo,"\\\\"===r.substr(qo,2)?(e="\\\\",qo+=2):(e=o,0===Qo&&nu(Ae)),e!==o&&(e="\\\\"),(t=e)===o&&(t=qo,"\\/"===r.substr(qo,2)?(e="\\/",qo+=2):(e=o,0===Qo&&nu(me)),e!==o&&(e="\\/"),(t=e)===o&&(t=qo,"\\b"===r.substr(qo,2)?(e="\\b",qo+=2):(e=o,0===Qo&&nu(Te)),e!==o&&(e="\b"),(t=e)===o&&(t=qo,"\\f"===r.substr(qo,2)?(e="\\f",qo+=2):(e=o,0===Qo&&nu(Ie)),e!==o&&(e="\f"),(t=e)===o&&(t=qo,"\\n"===r.substr(qo,2)?(e="\\n",qo+=2):(e=o,0===Qo&&nu(Ne)),e!==o&&(e="\n"),(t=e)===o&&(t=qo,"\\r"===r.substr(qo,2)?(e="\\r",qo+=2):(e=o,0===Qo&&nu(Re)),e!==o&&(e="\r"),(t=e)===o&&(t=qo,"\\t"===r.substr(qo,2)?(e="\\t",qo+=2):(e=o,0===Qo&&nu(Se)),e!==o&&(e="\t"),(t=e)===o&&(t=qo,"\\u"===r.substr(qo,2)?(e="\\u",qo+=2):(e=o,0===Qo&&nu(_e)),e!==o&&(n=wi())!==o&&(s=wi())!==o&&(u=wi())!==o&&(a=wi())!==o?(i=n,l=s,c=u,f=a,t=e=String.fromCharCode(parseInt("0x"+i+l+c+f))):(qo=t,t=o),t===o&&(t=qo,92===r.charCodeAt(qo)?(e="\\",qo++):(e=o,0===Qo&&nu(ge)),e!==o&&(e="\\"),(t=e)===o&&(t=qo,"''"===r.substr(qo,2)?(e="''",qo+=2):(e=o,0===Qo&&nu(Oe)),e!==o&&(e="''"),(t=e)===o&&(t=qo,'""'===r.substr(qo,2)?(e='""',qo+=2):(e=o,0===Qo&&nu(xe)),e!==o&&(e='""'),(t=e)===o&&(t=qo,"``"===r.substr(qo,2)?(e="``",qo+=2):(e=o,0===Qo&&nu(Ue)),e!==o&&(e="``"),t=e))))))))))))),t}function fi(){var r,t;return(r=bi())!==o&&(r=(t=r)&&"bigint"===t.type?t:{type:"number",value:t}),r}function bi(){var r,t,e,n;return r=qo,(t=vi())!==o&&(e=pi())!==o&&(n=Li())!==o?r=t={type:"bigint",value:t+e+n}:(qo=r,r=o),r===o&&(r=qo,(t=vi())!==o&&(e=pi())!==o?r=t=function(r,t){const e=r+t;return Ec(r)?{type:"bigint",value:e}:parseFloat(e)}(t,e):(qo=r,r=o),r===o&&(r=qo,(t=vi())!==o&&(e=Li())!==o?r=t=function(r,t){return{type:"bigint",value:r+t}}(t,e):(qo=r,r=o),r===o&&(r=qo,(t=vi())!==o&&(t=function(r){return Ec(r)?{type:"bigint",value:r}:parseFloat(r)}(t)),r=t))),r}function vi(){var t,e,n;return(t=Ci())===o&&(t=di())===o&&(t=qo,45===r.charCodeAt(qo)?(e="-",qo++):(e=o,0===Qo&&nu($t)),e===o&&(43===r.charCodeAt(qo)?(e="+",qo++):(e=o,0===Qo&&nu(Dt))),e!==o&&(n=Ci())!==o?t=e+=n:(qo=t,t=o),t===o&&(t=qo,45===r.charCodeAt(qo)?(e="-",qo++):(e=o,0===Qo&&nu($t)),e===o&&(43===r.charCodeAt(qo)?(e="+",qo++):(e=o,0===Qo&&nu(Dt))),e!==o&&(n=di())!==o?t=e=function(r,t){return r+t}(e,n):(qo=t,t=o))),t}function pi(){var t,e,n;return t=qo,46===r.charCodeAt(qo)?(e=".",qo++):(e=o,0===Qo&&nu(De)),e!==o&&(n=Ci())!==o?t=e="."+n:(qo=t,t=o),t}function Li(){var t,e,n;return t=qo,(e=function(){var t,e,n,s;return t=qo,je.test(r.charAt(qo))?(e=r.charAt(qo),qo++):(e=o,0===Qo&&nu(He)),e!==o?(Ye.test(r.charAt(qo))?(n=r.charAt(qo),qo++):(n=o,0===Qo&&nu(Be)),n===o&&(n=null),n!==o?t=e+=null!==(s=n)?s:"":(qo=t,t=o)):(qo=t,t=o),t}())!==o&&(n=Ci())!==o?t=e+=n:(qo=t,t=o),t}function Ci(){var r,t;if(r=[],(t=di())!==o)for(;t!==o;)r.push(t),t=di();else r=o;return r!==o&&(r=r.join("")),r}function di(){var t;return $e.test(r.charAt(qo))?(t=r.charAt(qo),qo++):(t=o,0===Qo&&nu(Pe)),t}function wi(){var t;return Fe.test(r.charAt(qo))?(t=r.charAt(qo),qo++):(t=o,0===Qo&&nu(Ge)),t}function hi(){var t,e,n,s;return t=qo,"default"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(E)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function yi(){var t,e,n,s;return t=qo,"to"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu(qe)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Ei(){var t,e,n,s;return t=qo,"top"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(Ke)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Ai(){var t,e,n,s;return t=qo,"drop"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(ze)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DROP":(qo=t,t=o)):(qo=t,t=o),t}function mi(){var t,e,n,s;return t=qo,"declare"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(Qe)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DECLARE":(qo=t,t=o)):(qo=t,t=o),t}function Ti(){var t,e,n,s;return t=qo,"alter"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(rn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="ALTER":(qo=t,t=o)):(qo=t,t=o),t}function Ii(){var t,e,n,s;return t=qo,"update"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(en)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Ni(){var t,e,n,s;return t=qo,"create"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(nn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Ri(){var t,e,n,s;return t=qo,"temporary"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(sn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Si(){var t,e,n,s;return t=qo,"delete"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(on)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function _i(){var t,e,n,s;return t=qo,"replace"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(ln)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function gi(){var t,e,n,s;return t=qo,"rename"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(cn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Oi(){var t,e,n,s;return t=qo,"ignore"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(fn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function xi(){var t,e,n,s;return t=qo,"partition"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(bn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="PARTITION":(qo=t,t=o)):(qo=t,t=o),t}function Ui(){var t,e,n,s;return t=qo,"into"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(vn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Mi(){var t,e,n,s;return t=qo,"set"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(ur)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SET":(qo=t,t=o)):(qo=t,t=o),t}function ki(){var t,e,n,s;return t=qo,"as"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu(Cn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Di(){var t,e,n,s;return t=qo,"table"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(dn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="TABLE":(qo=t,t=o)):(qo=t,t=o),t}function $i(){var t,e,n,s;return t=qo,"view"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(wn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="VIEW":(qo=t,t=o)):(qo=t,t=o),t}function Pi(){var t,e,n,s;return t=qo,"tables"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(En)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="TABLES":(qo=t,t=o)):(qo=t,t=o),t}function Fi(){var t,e,n,s;return t=qo,"on"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu(An)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Gi(){var t,e,n,s;return t=qo,"join"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(_n)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function ji(){var t,e,n,s;return t=qo,"union"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(On)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Hi(){var t,e,n,s;return t=qo,"values"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(xn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Yi(){var t,e,n,s;return t=qo,"using"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Un)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Bi(){var t,e,n,s;return t=qo,"with"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Dr)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Wi(){var t,e,n,s;return t=qo,"go"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu(kn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="GO":(qo=t,t=o)):(qo=t,t=o),t}function Xi(){var t,e,n,s;return t=qo,"by"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu($n)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function Vi(){var t,e,n,s;return t=qo,"asc"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(Hn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="ASC":(qo=t,t=o)):(qo=t,t=o),t}function qi(){var t,e,n,s;return t=qo,"desc"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Yn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DESC":(qo=t,t=o)):(qo=t,t=o),t}function Ki(){var t,e,n,s;return t=qo,"all"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(Bn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="ALL":(qo=t,t=o)):(qo=t,t=o),t}function Zi(){var t,e,n,s;return t=qo,"distinct"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(Wn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DISTINCT":(qo=t,t=o)):(qo=t,t=o),t}function zi(){var t,e,n,s;return t=qo,"between"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(Xn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="BETWEEN":(qo=t,t=o)):(qo=t,t=o),t}function Qi(){var t,e,n,s;return t=qo,"in"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu(Vn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="IN":(qo=t,t=o)):(qo=t,t=o),t}function Ji(){var t,e,n,s;return t=qo,"is"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu(qn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="IS":(qo=t,t=o)):(qo=t,t=o),t}function rl(){var t,e,n,s;return t=qo,"like"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Kn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="LIKE":(qo=t,t=o)):(qo=t,t=o),t}function tl(){var t,e,n,s;return t=qo,"exists"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(Zn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="EXISTS":(qo=t,t=o)):(qo=t,t=o),t}function el(){var t,e,n,s;return t=qo,"not"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(V)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="NOT":(qo=t,t=o)):(qo=t,t=o),t}function nl(){var t,e,n,s;return t=qo,"and"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(zn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="AND":(qo=t,t=o)):(qo=t,t=o),t}function sl(){var t,e,n,s;return t=qo,"or"===r.substr(qo,2).toLowerCase()?(e=r.substr(qo,2),qo+=2):(e=o,0===Qo&&nu(Qn)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="OR":(qo=t,t=o)):(qo=t,t=o),t}function ol(){var t,e,n,s;return t=qo,"case"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(os)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function ul(){var t,e,n,s;return t=qo,"else"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(is)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function al(){var t,e,n,s;return t=qo,"end"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(ls)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e=[e,n]:(qo=t,t=o)):(qo=t,t=o),t}function il(){var t,e,n,s;return t=qo,"cast"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(cs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="CAST":(qo=t,t=o)):(qo=t,t=o),t}function ll(){var t,e,n,s;return t=qo,"char"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(ps)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="CHAR":(qo=t,t=o)):(qo=t,t=o),t}function cl(){var t,e,n,s;return t=qo,"varchar"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(Ls)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="VARCHAR":(qo=t,t=o)):(qo=t,t=o),t}function fl(){var t,e,n,s;return t=qo,"nvarchar"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(ds)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="NVARCHAR":(qo=t,t=o)):(qo=t,t=o),t}function bl(){var t,e,n,s;return t=qo,"numeric"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(ws)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="NUMERIC":(qo=t,t=o)):(qo=t,t=o),t}function vl(){var t,e,n,s;return t=qo,"decimal"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(hs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DECIMAL":(qo=t,t=o)):(qo=t,t=o),t}function pl(){var t,e,n,s;return t=qo,"unsigned"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(Es)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="UNSIGNED":(qo=t,t=o)):(qo=t,t=o),t}function Ll(){var t,e,n,s;return t=qo,"int"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(As)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="INT":(qo=t,t=o)):(qo=t,t=o),t}function Cl(){var t,e,n,s;return t=qo,"integer"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(Ts)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="INTEGER":(qo=t,t=o)):(qo=t,t=o),t}function dl(){var t,e,n,s;return t=qo,"smallint"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(Ns)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SMALLINT":(qo=t,t=o)):(qo=t,t=o),t}function wl(){var t,e,n,s;return t=qo,"tinyint"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(Rs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="TINYINT":(qo=t,t=o)):(qo=t,t=o),t}function hl(){var t,e,n,s;return t=qo,"bigint"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(xs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="BIGINT":(qo=t,t=o)):(qo=t,t=o),t}function yl(){var t,e,n,s;return t=qo,"float"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Us)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="FLOAT":(qo=t,t=o)):(qo=t,t=o),t}function El(){var t,e,n,s;return t=qo,"real"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Ms)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="REAL":(qo=t,t=o)):(qo=t,t=o),t}function Al(){var t,e,n,s;return t=qo,"double"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(ks)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DOUBLE":(qo=t,t=o)):(qo=t,t=o),t}function ml(){var t,e,n,s;return t=qo,"date"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Ds)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DATE":(qo=t,t=o)):(qo=t,t=o),t}function Tl(){var t,e,n,s;return t=qo,"datetime"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(Ps)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DATETIME":(qo=t,t=o)):(qo=t,t=o),t}function Il(){var t,e,n,s;return t=qo,"datetime2"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(Fs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DATETIME2":(qo=t,t=o)):(qo=t,t=o),t}function Nl(){var t,e,n,s;return t=qo,"datetimeoffset"===r.substr(qo,14).toLowerCase()?(e=r.substr(qo,14),qo+=14):(e=o,0===Qo&&nu(Gs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="DATETIMEOFFSET":(qo=t,t=o)):(qo=t,t=o),t}function Rl(){var t,e,n,s;return t=qo,"rows"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(js)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="ROWS":(qo=t,t=o)):(qo=t,t=o),t}function Sl(){var t,e,n,s;return t=qo,"time"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Hs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="TIME":(qo=t,t=o)):(qo=t,t=o),t}function _l(){var t,e,n,s;return t=qo,"timestamp"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(Ys)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="TIMESTAMP":(qo=t,t=o)):(qo=t,t=o),t}function gl(){var t,e,n,s;return t=qo,"current_timestamp"===r.substr(qo,17).toLowerCase()?(e=r.substr(qo,17),qo+=17):(e=o,0===Qo&&nu(eo)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="CURRENT_TIMESTAMP":(qo=t,t=o)):(qo=t,t=o),t}function Ol(){var t;return 64===r.charCodeAt(qo)?(t="@",qo++):(t=o,0===Qo&&nu(S)),t}function xl(){var t;return(t=function(){var t;return"@@"===r.substr(qo,2)?(t="@@",qo+=2):(t=o,0===Qo&&nu(bo)),t}())===o&&(t=Ol())===o&&(t=function(){var t;return 36===r.charCodeAt(qo)?(t="$",qo++):(t=o,0===Qo&&nu(vo)),t}()),t}function Ul(){var t;return 61===r.charCodeAt(qo)?(t="=",qo++):(t=o,0===Qo&&nu(Nt)),t}function Ml(){var t,e,n,s;return t=qo,"add"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(wo)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="ADD":(qo=t,t=o)):(qo=t,t=o),t}function kl(){var t,e,n,s;return t=qo,"column"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(ho)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="COLUMN":(qo=t,t=o)):(qo=t,t=o),t}function Dl(){var t,e,n,s;return t=qo,"index"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(yo)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="INDEX":(qo=t,t=o)):(qo=t,t=o),t}function $l(){var t,e,n,s;return t=qo,"key"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(L)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="KEY":(qo=t,t=o)):(qo=t,t=o),t}function Pl(){var t,e,n,s;return t=qo,"unique"===r.substr(qo,6).toLowerCase()?(e=r.substr(qo,6),qo+=6):(e=o,0===Qo&&nu(p)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="UNIQUE":(qo=t,t=o)):(qo=t,t=o),t}function Fl(){var t,e,n,s;return t=qo,"clustered"===r.substr(qo,9).toLowerCase()?(e=r.substr(qo,9),qo+=9):(e=o,0===Qo&&nu(mo)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="CLUSTERED":(qo=t,t=o)):(qo=t,t=o),t}function Gl(){var t,e,n,s;return t=qo,"nonclustered"===r.substr(qo,12).toLowerCase()?(e=r.substr(qo,12),qo+=12):(e=o,0===Qo&&nu(To)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="NONCLUSTERED":(qo=t,t=o)):(qo=t,t=o),t}function jl(){var t,e,n,s;return t=qo,"comment"===r.substr(qo,7).toLowerCase()?(e=r.substr(qo,7),qo+=7):(e=o,0===Qo&&nu(Io)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="COMMENT":(qo=t,t=o)):(qo=t,t=o),t}function Hl(){var t,e,n,s;return t=qo,"constraint"===r.substr(qo,10).toLowerCase()?(e=r.substr(qo,10),qo+=10):(e=o,0===Qo&&nu(No)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="CONSTRAINT":(qo=t,t=o)):(qo=t,t=o),t}function Yl(){var t;return 46===r.charCodeAt(qo)?(t=".",qo++):(t=o,0===Qo&&nu(De)),t}function Bl(){var t;return 44===r.charCodeAt(qo)?(t=",",qo++):(t=o,0===Qo&&nu(Mo)),t}function Wl(){var t;return 42===r.charCodeAt(qo)?(t="*",qo++):(t=o,0===Qo&&nu(Pt)),t}function Xl(){var t;return 40===r.charCodeAt(qo)?(t="(",qo++):(t=o,0===Qo&&nu(Nr)),t}function Vl(){var t;return 41===r.charCodeAt(qo)?(t=")",qo++):(t=o,0===Qo&&nu(Rr)),t}function ql(){var t;return 91===r.charCodeAt(qo)?(t="[",qo++):(t=o,0===Qo&&nu(zt)),t}function Kl(){var t;return 93===r.charCodeAt(qo)?(t="]",qo++):(t=o,0===Qo&&nu(re)),t}function Zl(){var t;return 59===r.charCodeAt(qo)?(t=";",qo++):(t=o,0===Qo&&nu(ko)),t}function zl(){var t;return(t=function(){var t;return"||"===r.substr(qo,2)?(t="||",qo+=2):(t=o,0===Qo&&nu(Do)),t}())===o&&(t=function(){var t;return"&&"===r.substr(qo,2)?(t="&&",qo+=2):(t=o,0===Qo&&nu($o)),t}()),t}function Ql(){var r,t;for(r=[],(t=nc())===o&&(t=rc());t!==o;)r.push(t),(t=nc())===o&&(t=rc());return r}function Jl(){var r,t;if(r=[],(t=nc())===o&&(t=rc()),t!==o)for(;t!==o;)r.push(t),(t=nc())===o&&(t=rc());else r=o;return r}function rc(){var t;return(t=function t(){var e,n,s,u,a,i,l;if(e=qo,"/*"===r.substr(qo,2)?(n="/*",qo+=2):(n=o,0===Qo&&nu(Po)),n!==o){for(s=[],u=qo,a=qo,Qo++,"*/"===r.substr(qo,2)?(i="*/",qo+=2):(i=o,0===Qo&&nu(Fo)),Qo--,i===o?a=void 0:(qo=a,a=o),a!==o?(i=qo,Qo++,"/*"===r.substr(qo,2)?(l="/*",qo+=2):(l=o,0===Qo&&nu(Po)),Qo--,l===o?i=void 0:(qo=i,i=o),i!==o&&(l=ec())!==o?u=a=[a,i,l]:(qo=u,u=o)):(qo=u,u=o),u===o&&(u=t());u!==o;)s.push(u),u=qo,a=qo,Qo++,"*/"===r.substr(qo,2)?(i="*/",qo+=2):(i=o,0===Qo&&nu(Fo)),Qo--,i===o?a=void 0:(qo=a,a=o),a!==o?(i=qo,Qo++,"/*"===r.substr(qo,2)?(l="/*",qo+=2):(l=o,0===Qo&&nu(Po)),Qo--,l===o?i=void 0:(qo=i,i=o),i!==o&&(l=ec())!==o?u=a=[a,i,l]:(qo=u,u=o)):(qo=u,u=o),u===o&&(u=t());s!==o?("*/"===r.substr(qo,2)?(u="*/",qo+=2):(u=o,0===Qo&&nu(Fo)),u!==o?e=n=[n,s,u]:(qo=e,e=o)):(qo=e,e=o)}else qo=e,e=o;return e}())===o&&(t=function(){var t,e,n,s,u,a;if(t=qo,"--"===r.substr(qo,2)?(e="--",qo+=2):(e=o,0===Qo&&nu(Go)),e!==o){for(n=[],s=qo,u=qo,Qo++,a=sc(),Qo--,a===o?u=void 0:(qo=u,u=o),u!==o&&(a=ec())!==o?s=u=[u,a]:(qo=s,s=o);s!==o;)n.push(s),s=qo,u=qo,Qo++,a=sc(),Qo--,a===o?u=void 0:(qo=u,u=o),u!==o&&(a=ec())!==o?s=u=[u,a]:(qo=s,s=o);n!==o?t=e=[e,n]:(qo=t,t=o)}else qo=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=qo,35===r.charCodeAt(qo)?(e="#",qo++):(e=o,0===Qo&&nu(jo)),e!==o){for(n=[],s=qo,u=qo,Qo++,a=sc(),Qo--,a===o?u=void 0:(qo=u,u=o),u!==o&&(a=ec())!==o?s=u=[u,a]:(qo=s,s=o);s!==o;)n.push(s),s=qo,u=qo,Qo++,a=sc(),Qo--,a===o?u=void 0:(qo=u,u=o),u!==o&&(a=ec())!==o?s=u=[u,a]:(qo=s,s=o);n!==o?t=e=[e,n]:(qo=t,t=o)}else qo=t,t=o;return t}()),t}function tc(){var r,t,e,n,s,u,a;return r=qo,(t=jl())!==o&&Ql()!==o?((e=Ul())===o&&(e=null),e!==o&&Ql()!==o&&(n=ai())!==o?(u=e,a=n,r=t={type:(s=t).toLowerCase(),keyword:s.toLowerCase(),symbol:u,value:a}):(qo=r,r=o)):(qo=r,r=o),r}function ec(){var t;return r.length>qo?(t=r.charAt(qo),qo++):(t=o,0===Qo&&nu(Ho)),t}function nc(){var t;return Yo.test(r.charAt(qo))?(t=r.charAt(qo),qo++):(t=o,0===Qo&&nu(Bo)),t}function sc(){var t,e;if((t=function(){var t,e;return t=qo,Qo++,r.length>qo?(e=r.charAt(qo),qo++):(e=o,0===Qo&&nu(Ho)),Qo--,e===o?t=void 0:(qo=t,t=o),t}())===o)if(t=[],Me.test(r.charAt(qo))?(e=r.charAt(qo),qo++):(e=o,0===Qo&&nu(ke)),e!==o)for(;e!==o;)t.push(e),Me.test(r.charAt(qo))?(e=r.charAt(qo),qo++):(e=o,0===Qo&&nu(ke));else t=o;return t}function oc(){var t,e;return t=qo,Nc=[],void 0!==o&&Ql()!==o?((e=uc())===o&&(e=function(){var t,e;return t=qo,function(){var t;return"return"===r.substr(qo,6).toLowerCase()?(t=r.substr(qo,6),qo+=6):(t=o,0===Qo&&nu(po)),t}()!==o&&Ql()!==o&&(e=ac())!==o?t={type:"return",expr:e}:(qo=t,t=o),t}()),e!==o?t={stmt:e,vars:Nc}:(qo=t,t=o)):(qo=t,t=o),t}function uc(){var t,e,n,s;return t=qo,(e=pc())===o&&(e=Lc()),e!==o&&Ql()!==o?((n=function(){var t;return":="===r.substr(qo,2)?(t=":=",qo+=2):(t=o,0===Qo&&nu(Lo)),t}())===o&&(n=Ul()),n!==o&&Ql()!==o&&(s=ac())!==o?t=e={type:"assign",left:e,symbol:n,right:s}:(qo=t,t=o)):(qo=t,t=o),t}function ac(){var r;return(r=ku())===o&&(r=function(){var r,t,e,n,s;return r=qo,(t=pc())!==o&&Ql()!==o&&(e=sa())!==o&&Ql()!==o&&(n=pc())!==o&&Ql()!==o&&(s=ua())!==o?r=t={type:"join",ltable:t,rtable:n,op:e,on:s}:(qo=r,r=o),r}())===o&&(r=ic())===o&&(r=function(){var r,t;return r=qo,ql()!==o&&Ql()!==o&&(t=vc())!==o&&Ql()!==o&&Kl()!==o?r={type:"array",value:t}:(qo=r,r=o),r}()),r}function ic(){var r,t,e,n,s,u,a,i;if(r=qo,(t=lc())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Ua())!==o&&(a=Ql())!==o&&(i=lc())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Ua())!==o&&(a=Ql())!==o&&(i=lc())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=Rt(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function lc(){var r,t,e,n,s,u,a,i;if(r=qo,(t=cc())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=ka())!==o&&(a=Ql())!==o&&(i=cc())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=ka())!==o&&(a=Ql())!==o&&(i=cc())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=Rt(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function cc(){var r,t,e;return(r=oi())===o&&(r=pc())===o&&(r=bc())===o&&(r=Ka())===o&&(r=qo,Xl()!==o&&Ql()!==o&&(t=ic())!==o&&Ql()!==o&&Vl()!==o?((e=t).parentheses=!0,r=e):(qo=r,r=o)),r}function fc(){var r,t,e,n,s,u,a;return r=qo,(t=Ba())!==o?(e=qo,(n=Ql())!==o&&(s=Yl())!==o&&(u=Ql())!==o&&(a=Ba())!==o?e=n=[n,s,u,a]:(qo=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){let e=r;return null!==t&&(e=`${r}.${t[3]}`),e}(t,e):(qo=r,r=o)):(qo=r,r=o),r}function bc(){var r,t,e;return r=qo,(t=fc())!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o?((e=vc())===o&&(e=null),e!==o&&Ql()!==o&&Vl()!==o?r=t={type:"function",name:t,args:{type:"expr_list",value:e}}:(qo=r,r=o)):(qo=r,r=o),r===o&&(r=qo,(t=fc())!==o&&(t=function(r){return{type:"function",name:r,args:null}}(t)),r=t),r}function vc(){var r,t,e,n,s,u,a,i;if(r=qo,(t=cc())!==o){for(e=[],n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=cc())!==o?n=s=[s,u,a,i]:(qo=n,n=o);n!==o;)e.push(n),n=qo,(s=Ql())!==o&&(u=Bl())!==o&&(a=Ql())!==o&&(i=cc())!==o?n=s=[s,u,a,i]:(qo=n,n=o);e!==o?r=t=v(t,e):(qo=r,r=o)}else qo=r,r=o;return r}function pc(){var r,t,e,n,s;return r=qo,(t=xl())!==o&&(e=Lc())!==o?(n=t,s=e,r=t={type:"var",...s,prefix:n}):(qo=r,r=o),r}function Lc(){var t,e,n,s,u;return t=qo,(e=Ba())!==o&&(n=function(){var t,e,n,s;for(t=[],e=qo,46===r.charCodeAt(qo)?(n=".",qo++):(n=o,0===Qo&&nu(De)),n!==o&&(s=Ba())!==o?e=n=[n,s]:(qo=e,e=o);e!==o;)t.push(e),e=qo,46===r.charCodeAt(qo)?(n=".",qo++):(n=o,0===Qo&&nu(De)),n!==o&&(s=Ba())!==o?e=n=[n,s]:(qo=e,e=o);return t!==o&&(t=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e][1]);return t}(t)),t}())!==o?(s=e,u=n,Nc.push(s),t=e={type:"var",name:s,members:u,prefix:null}):(qo=t,t=o),t===o&&(t=qo,(e=fi())!==o&&(e={type:"var",name:e.value,members:[],quoted:null,prefix:null}),t=e),t}function Cc(){var t;return(t=function(){var t,e,n,s,u,a;if(t=qo,(e=ql())===o&&(e=null),e!==o)if(Ql()!==o)if((n=ll())===o&&(n=cl())===o&&(n=function(){var t,e,n,s;return t=qo,"nchar"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(Cs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="NCHAR":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(n=fl()),n!==o)if(Ql()!==o)if((s=Kl())===o&&(s=null),s!==o)if((Wo(e,0,s)?o:void 0)!==o)if(Ql()!==o)if(Xl()!==o)if(Ql()!==o){if(u=[],$e.test(r.charAt(qo))?(a=r.charAt(qo),qo++):(a=o,0===Qo&&nu(Pe)),a!==o)for(;a!==o;)u.push(a),$e.test(r.charAt(qo))?(a=r.charAt(qo),qo++):(a=o,0===Qo&&nu(Pe));else u=o;u!==o&&(a=Ql())!==o&&Vl()!==o?t=e={dataType:n,length:parseInt(u.join(""),10),parentheses:!0}:(qo=t,t=o)}else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;return t===o&&(t=qo,(e=ql())===o&&(e=null),e!==o&&Ql()!==o?((n=ll())===o&&(n=cl()),n!==o&&Ql()!==o?((s=Kl())===o&&(s=null),s!==o&&(Wo(e,0,s)?o:void 0)!==o?t=e=Xo(0,n):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t===o&&(t=qo,(e=ql())===o&&(e=null),e!==o&&Ql()!==o&&(n=fl())!==o&&Ql()!==o?((s=Kl())===o&&(s=null),s!==o&&(Wo(e,0,s)?o:void 0)!==o&&Ql()!==o&&Xl()!==o&&Ql()!==o?("max"===r.substr(qo,3).toLowerCase()?(u=r.substr(qo,3),qo+=3):(u=o,0===Qo&&nu(rs)),u!==o&&(a=Ql())!==o&&Vl()!==o?(e=function(r,t,e,n){return{dataType:t,length:"max"}}(0,n),t=e):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o))),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w;if(t=qo,(e=ql())===o&&(e=null),e!==o)if(Ql()!==o)if((n=bl())===o&&(n=vl())===o&&(n=Ll())===o&&(n=Cl())===o&&(n=dl())===o&&(n=wl())===o&&(n=hl())===o&&(n=yl())===o&&(n=El())===o&&(n=Al()),n!==o)if((s=Ql())!==o)if((u=Kl())===o&&(u=null),u!==o)if((Wo(e,0,u)?o:void 0)!==o)if((a=Ql())!==o)if((i=Xl())!==o)if((l=Ql())!==o){if(c=[],$e.test(r.charAt(qo))?(f=r.charAt(qo),qo++):(f=o,0===Qo&&nu(Pe)),f!==o)for(;f!==o;)c.push(f),$e.test(r.charAt(qo))?(f=r.charAt(qo),qo++):(f=o,0===Qo&&nu(Pe));else c=o;if(c!==o)if((f=Ql())!==o){if(b=qo,(v=Bl())!==o)if((p=Ql())!==o){if(L=[],$e.test(r.charAt(qo))?(C=r.charAt(qo),qo++):(C=o,0===Qo&&nu(Pe)),C!==o)for(;C!==o;)L.push(C),$e.test(r.charAt(qo))?(C=r.charAt(qo),qo++):(C=o,0===Qo&&nu(Pe));else L=o;L!==o?b=v=[v,p,L]:(qo=b,b=o)}else qo=b,b=o;else qo=b,b=o;b===o&&(b=null),b!==o&&(v=Ql())!==o&&(p=Vl())!==o&&(L=Ql())!==o?((C=dc())===o&&(C=null),C!==o?(d=b,w=C,t=e={dataType:n,length:parseInt(c.join(""),10),scale:d&&parseInt(d[2].join(""),10),parentheses:!0,suffix:w}):(qo=t,t=o)):(qo=t,t=o)}else qo=t,t=o;else qo=t,t=o}else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;if(t===o){if(t=qo,(e=ql())===o&&(e=null),e!==o)if(Ql()!==o)if((n=bl())===o&&(n=vl())===o&&(n=Ll())===o&&(n=Cl())===o&&(n=dl())===o&&(n=wl())===o&&(n=hl())===o&&(n=yl())===o&&(n=El())===o&&(n=Al()),n!==o)if((s=Kl())===o&&(s=null),s!==o)if((u=(u=Wo(e,0,s))?o:void 0)!==o)if(Ql()!==o){if(a=[],$e.test(r.charAt(qo))?(i=r.charAt(qo),qo++):(i=o,0===Qo&&nu(Pe)),i!==o)for(;i!==o;)a.push(i),$e.test(r.charAt(qo))?(i=r.charAt(qo),qo++):(i=o,0===Qo&&nu(Pe));else a=o;a!==o&&(i=Ql())!==o?((l=dc())===o&&(l=null),l!==o?(e=function(r,t,e,n,s){return{dataType:t,length:parseInt(n.join(""),10),suffix:s}}(0,n,0,a,l),t=e):(qo=t,t=o)):(qo=t,t=o)}else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;t===o&&(t=qo,(e=ql())===o&&(e=null),e!==o&&Ql()!==o?((n=bl())===o&&(n=vl())===o&&(n=Ll())===o&&(n=Cl())===o&&(n=dl())===o&&(n=wl())===o&&(n=hl())===o&&(n=yl())===o&&(n=El())===o&&(n=Al())===o&&(n=function(){var t,e,n,s;return t=qo,"bit"===r.substr(qo,3).toLowerCase()?(e=r.substr(qo,3),qo+=3):(e=o,0===Qo&&nu(fs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="BIT":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=qo,"money"===r.substr(qo,5).toLowerCase()?(e=r.substr(qo,5),qo+=5):(e=o,0===Qo&&nu(bs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="MONEY":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=qo,"smallmoney"===r.substr(qo,10).toLowerCase()?(e=r.substr(qo,10),qo+=10):(e=o,0===Qo&&nu(vs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SMALLMONEY":(qo=t,t=o)):(qo=t,t=o),t}()),n!==o&&(s=Ql())!==o?((u=Kl())===o&&(u=null),u!==o&&(Wo(e,0,u)?o:void 0)!==o&&(a=Ql())!==o?((i=dc())===o&&(i=null),i!==o&&(l=Ql())!==o?(e=function(r,t,e,n){return{dataType:t,suffix:n}}(0,n,0,i),t=e):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o))}return t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;if(t=qo,(e=ql())===o&&(e=null),e!==o)if(Ql()!==o)if((n=Il())===o&&(n=Nl())===o&&(n=Sl()),n!==o)if(Ql()!==o)if((s=Kl())===o&&(s=null),s!==o)if((Wo(e,0,s)?o:void 0)!==o)if(Xl()!==o)if(Ql()!==o){if(u=[],$e.test(r.charAt(qo))?(a=r.charAt(qo),qo++):(a=o,0===Qo&&nu(Pe)),a!==o)for(;a!==o;)u.push(a),$e.test(r.charAt(qo))?(a=r.charAt(qo),qo++):(a=o,0===Qo&&nu(Pe));else u=o;if(u!==o)if((a=Ql())!==o){if(i=qo,(l=Bl())!==o)if((c=Ql())!==o){if(f=[],$e.test(r.charAt(qo))?(b=r.charAt(qo),qo++):(b=o,0===Qo&&nu(Pe)),b!==o)for(;b!==o;)f.push(b),$e.test(r.charAt(qo))?(b=r.charAt(qo),qo++):(b=o,0===Qo&&nu(Pe));else f=o;f!==o?i=l=[l,c,f]:(qo=i,i=o)}else qo=i,i=o;else qo=i,i=o;i===o&&(i=null),i!==o&&(l=Ql())!==o&&(c=Vl())!==o?t=e={dataType:n,length:parseInt(u.join(""),10),parentheses:!0}:(qo=t,t=o)}else qo=t,t=o;else qo=t,t=o}else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;else qo=t,t=o;return t===o&&(t=qo,(e=ql())===o&&(e=null),e!==o&&Ql()!==o?((n=ml())===o&&(n=function(){var t,e,n,s;return t=qo,"smalldatetime"===r.substr(qo,13).toLowerCase()?(e=r.substr(qo,13),qo+=13):(e=o,0===Qo&&nu($s)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="SMALLDATETIME":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(n=Il())===o&&(n=Tl())===o&&(n=Nl())===o&&(n=Sl())===o&&(n=_l()),n!==o&&Ql()!==o?((s=Kl())===o&&(s=null),s!==o&&(Wo(e,0,s)?o:void 0)!==o?t=e=Xo(0,n):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o)),t}())===o&&(t=function(){var t,e,n,s;return t=qo,(e=ql())===o&&(e=null),e!==o&&Ql()!==o&&(n=function(){var t,e,n,s;return t=qo,"json"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(Is)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="JSON":(qo=t,t=o)):(qo=t,t=o),t}())!==o&&Ql()!==o?((s=Kl())===o&&(s=null),s!==o&&(Wo(e,0,s)?o:void 0)!==o?t=e=Xo(0,n):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,(e=ql())===o&&(e=null),e!==o&&Ql()!==o?((n=function(){var t,e,n,s;return t=qo,"tinytext"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(Ss)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="TINYTEXT":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=qo,"text"===r.substr(qo,4).toLowerCase()?(e=r.substr(qo,4),qo+=4):(e=o,0===Qo&&nu(_s)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="TEXT":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=qo,"mediumtext"===r.substr(qo,10).toLowerCase()?(e=r.substr(qo,10),qo+=10):(e=o,0===Qo&&nu(gs)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="MEDIUMTEXT":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=qo,"longtext"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(Os)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="LONGTEXT":(qo=t,t=o)):(qo=t,t=o),t}()),n!==o&&Ql()!==o?((s=Kl())===o&&(s=null),s!==o&&(Wo(e,0,s)?o:void 0)!==o?t=e=Vo(0,n):(qo=t,t=o)):(qo=t,t=o)):(qo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=qo,(e=ql())===o&&(e=null),e!==o&&Ql()!==o&&(n=function(){var t,e,n,s;return t=qo,"uniqueidentifier"===r.substr(qo,16).toLowerCase()?(e=r.substr(qo,16),qo+=16):(e=o,0===Qo&&nu(Ws)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="UNIQUEIDENTIFIER":(qo=t,t=o)):(qo=t,t=o),t}())!==o&&Ql()!==o?((s=Kl())===o&&(s=null),s!==o&&(Wo(e,0,s)?o:void 0)!==o?t=e=Vo(0,n):(qo=t,t=o)):(qo=t,t=o),t}()),t}function dc(){var t,e,n;return t=qo,(e=pl())===o&&(e=null),e!==o&&Ql()!==o?((n=function(){var t,e,n,s;return t=qo,"zerofill"===r.substr(qo,8).toLowerCase()?(e=r.substr(qo,8),qo+=8):(e=o,0===Qo&&nu(ms)),e!==o?(n=qo,Qo++,s=Xa(),Qo--,s===o?n=void 0:(qo=n,n=o),n!==o?t=e="ZEROFILL":(qo=t,t=o)):(qo=t,t=o),t}())===o&&(n=null),n!==o?t=e=function(r,t){const e=[];return r&&e.push(r),t&&e.push(t),e}(e,n):(qo=t,t=o)):(qo=t,t=o),t}const wc={ALTER:!0,ALL:!0,ADD:!0,AND:!0,AS:!0,ASC:!0,BETWEEN:!0,BY:!0,CALL:!0,CASE:!0,CREATE:!0,CONTAINS:!0,CURRENT_DATE:!0,CURRENT_TIME:!0,CURRENT_TIMESTAMP:!0,CURRENT_USER:!0,DELETE:!0,DESC:!0,DISTINCT:!0,DROP:!0,ELSE:!0,END:!0,EXISTS:!0,EXPLAIN:!0,FALSE:!0,FROM:!0,FULL:!0,GROUP:!0,HAVING:!0,IN:!0,INNER:!0,INSERT:!0,INTO:!0,IS:!0,JOIN:!0,JSON:!0,KEY:!0,LEFT:!0,LIKE:!0,LIMIT:!0,LOW_PRIORITY:!0,NOT:!0,NULL:!0,NOCHECK:!0,ON:!0,OR:!0,ORDER:!0,OUTER:!0,RECURSIVE:!0,RENAME:!0,READ:!0,SELECT:!0,SESSION_USER:!0,SET:!0,SHOW:!0,SYSTEM_USER:!0,TABLE:!0,THEN:!0,TRUE:!0,TRUNCATE:!0,UNION:!0,UPDATE:!0,USING:!0,VALUES:!0,WITH:!0,WHEN:!0,WHERE:!0,WRITE:!0,GLOBAL:!0,SESSION:!0,LOCAL:!0,PERSIST:!0,PERSIST_ONLY:!0};function hc(r,t){return{type:"unary_expr",operator:r,expr:t}}function yc(r,t,e){return{type:"binary_expr",operator:r,left:t,right:e}}function Ec(r){const t=n(Number.MAX_SAFE_INTEGER);return!(n(r)<t)}function Ac(r,t,e=3){const n=[r];for(let r=0;r<t.length;r++)delete t[r][e].tableList,delete t[r][e].columnList,n.push(t[r][e]);return n}function mc(r,t){let e=r;for(let r=0;r<t.length;r++)e=yc(t[r][1],e,t[r][3]);return e}function Tc(r){return _c[r]||r||null}function Ic(r){const t=new Set;for(let e of r.keys()){const r=e.split("::");if(!r){t.add(e);break}r&&r[1]&&(r[1]=Tc(r[1])),t.add(r.join("::"))}return Array.from(t)}let Nc=[];const Rc=new Set,Sc=new Set,_c={};if((e=a())!==o&&qo===r.length)return e;throw e!==o&&qo<r.length&&nu({type:"end"}),function(r,t,e){return new s(s.buildMessage(r,t),r,t,e)}(zo,Zo<r.length?r.charAt(Zo):null,Zo<r.length?eu(Zo,Zo+1):eu(Zo,Zo))}}},function(r,t,e){var n=e(0);function s(r,t,e,n){this.message=r,this.expected=t,this.found=e,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,s)}!function(r,t){function e(){this.constructor=r}e.prototype=t.prototype,r.prototype=new e}(s,Error),s.buildMessage=function(r,t){var e={literal:function(r){return'"'+s(r.text)+'"'},class:function(r){var t,e="";for(t=0;t<r.parts.length;t++)e+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+e+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function n(r){return r.charCodeAt(0).toString(16).toUpperCase()}function s(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}function o(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}return"Expected "+function(r){var t,n,s,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(s=r[t],e[s.type](s));if(o.sort(),o.length>0){for(t=1,n=1;t<o.length;t++)o[t-1]!==o[t]&&(o[n]=o[t],n++);o.length=n}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+s(r)+'"':"end of input"}(t)+" found."},r.exports={SyntaxError:s,parse:function(r,t){t=void 0!==t?t:{};var e,o={},u={start:ru},a=ru,i=Ko("IF",!0),l=Ko("EXTENSION",!0),c=Ko("SCHEMA",!0),f=Ko("VERSION",!0),b=function(r,t){return Kl(r,t,1)},v=Ko("NULLS",!0),p=Ko("FIRST",!0),L=Ko("LAST",!0),C=Ko("AUTO_INCREMENT",!0),d=Ko("UNIQUE",!0),w=Ko("KEY",!0),h=Ko("PRIMARY",!0),y=Ko("COLUMN_FORMAT",!0),E=Ko("FIXED",!0),A=Ko("DYNAMIC",!0),m=Ko("DEFAULT",!0),T=Ko("STORAGE",!0),I=Ko("DISK",!0),N=Ko("MEMORY",!0),R=Ko("ALGORITHM",!0),S=Ko("INSTANT",!0),_=Ko("INPLACE",!0),g=Ko("COPY",!0),O=Ko("LOCK",!0),x=Ko("NONE",!0),U=Ko("SHARED",!0),M=Ko("EXCLUSIVE",!0),k=Ko("PRIMARY KEY",!0),D=Ko("FOREIGN KEY",!0),$=Ko("MATCH FULL",!0),P=Ko("MATCH PARTIAL",!0),F=Ko("MATCH SIMPLE",!0),G=Ko("RESTRICT",!0),j=Ko("CASCADE",!0),H=Ko("SET NULL",!0),Y=Ko("NO ACTION",!0),B=Ko("SET DEFAULT",!0),W=Ko("TRIGGER",!0),X=Ko("BEFORE",!0),V=Ko("AFTER",!0),q=Ko("INSTEAD OF",!0),K=Ko("ON",!0),Z=Ko("EXECUTE",!0),z=Ko("PROCEDURE",!0),Q=Ko("FUNCTION",!0),J=Ko("OF",!0),rr=Ko("NOT",!0),tr=Ko("DEFERRABLE",!0),er=Ko("INITIALLY IMMEDIATE",!0),nr=Ko("INITIALLY DEFERRED",!0),sr=Ko("FOR",!0),or=Ko("EACH",!0),ur=Ko("ROW",!0),ar=Ko("STATEMENT",!0),ir=Ko("CHARACTER",!0),lr=Ko("SET",!0),cr=Ko("CHARSET",!0),fr=Ko("COLLATE",!0),br=Ko("AVG_ROW_LENGTH",!0),vr=Ko("KEY_BLOCK_SIZE",!0),pr=Ko("MAX_ROWS",!0),Lr=Ko("MIN_ROWS",!0),Cr=Ko("STATS_SAMPLE_PAGES",!0),dr=Ko("CONNECTION",!0),wr=Ko("COMPRESSION",!0),hr=Ko("'",!1),yr=Ko("ZLIB",!0),Er=Ko("LZ4",!0),Ar=Ko("ENGINE",!0),mr=Ko("IN",!0),Tr=Ko("ACCESS SHARE",!0),Ir=Ko("ROW SHARE",!0),Nr=Ko("ROW EXCLUSIVE",!0),Rr=Ko("SHARE UPDATE EXCLUSIVE",!0),Sr=Ko("SHARE ROW EXCLUSIVE",!0),_r=Ko("ACCESS EXCLUSIVE",!0),gr=Ko("SHARE",!0),Or=Ko("MODE",!0),xr=Ko("NOWAIT",!0),Ur=Ko("(",!1),Mr=Ko(")",!1),kr=Ko("BTREE",!0),Dr=Ko("HASH",!0),$r=Ko("GIST",!0),Pr=Ko("GIN",!0),Fr=Ko("WITH",!0),Gr=Ko("PARSER",!0),jr=Ko("VISIBLE",!0),Hr=Ko("INVISIBLE",!0),Yr=function(r,t){return t.unshift(r),t.forEach((r=>{const{table:t,as:e}=r;nc[t]=t,e&&(nc[e]=t),function(r){const t=Ql(r);r.clear(),t.forEach((t=>r.add(t)))}(ec)})),t},Br=Ko("DESCRIPTOR",!0),Wr=Ko("=",!1),Xr=function(r,t){return Zl(r,t)},Vr=Ko("!",!1),qr=Ko(">=",!1),Kr=Ko(">",!1),Zr=Ko("<=",!1),zr=Ko("<>",!1),Qr=Ko("<",!1),Jr=Ko("!=",!1),rt=Ko("ESCAPE",!0),tt=Ko("@>",!1),et=Ko("<@",!1),nt=Ko("?",!1),st=Ko("?|",!1),ot=Ko("?&",!1),ut=Ko("#-",!1),at=Ko("+",!1),it=Ko("-",!1),lt=Ko("*",!1),ct=Ko("/",!1),ft=Ko("%",!1),bt=Ko("$",!1),vt=function(r){return!0===Wl[r.toUpperCase()]},pt=Ko('"',!1),Lt=/^[^"]/,Ct=Zo(['"'],!0,!1),dt=function(r){return r.join("")},wt=/^[^']/,ht=Zo(["'"],!0,!1),yt=Ko("`",!1),Et=/^[^`]/,At=Zo(["`"],!0,!1),mt=/^[A-Za-z_]/,Tt=Zo([["A","Z"],["a","z"],"_"],!1,!1),It=/^[A-Za-z0-9_\-]/,Nt=Zo([["A","Z"],["a","z"],["0","9"],"_","-"],!1,!1),Rt=/^[A-Za-z0-9_]/,St=Zo([["A","Z"],["a","z"],["0","9"],"_"],!1,!1),_t=Ko(":",!1),gt=Ko("OVER",!0),Ot=Ko("POSITION",!0),xt=Ko("BOTH",!0),Ut=Ko("LEADING",!0),Mt=Ko("TRAILING",!0),kt=Ko("trim",!0),Dt=Ko("placing",!0),$t=Ko("for",!0),Pt=Ko("overlay",!0),Ft=Ko("SUBSTRING",!0),Gt=Ko("CENTURY",!0),jt=Ko("DAY",!0),Ht=Ko("DATE",!0),Yt=Ko("DECADE",!0),Bt=Ko("DOW",!0),Wt=Ko("DOY",!0),Xt=Ko("EPOCH",!0),Vt=Ko("HOUR",!0),qt=Ko("ISODOW",!0),Kt=Ko("ISOYEAR",!0),Zt=Ko("MICROSECONDS",!0),zt=Ko("MILLENNIUM",!0),Qt=Ko("MILLISECONDS",!0),Jt=Ko("MINUTE",!0),re=Ko("MONTH",!0),te=Ko("QUARTER",!0),ee=Ko("SECOND",!0),ne=Ko("TIMEZONE",!0),se=Ko("TIMEZONE_HOUR",!0),oe=Ko("TIMEZONE_MINUTE",!0),ue=Ko("WEEK",!0),ae=Ko("YEAR",!0),ie=/^[^"\\\0-\x1F\x7F]/,le=Zo(['"',"\\",["\0",""],""],!0,!1),ce=/^[^'\\]/,fe=Zo(["'","\\"],!0,!1),be=Ko("\\'",!1),ve=Ko('\\"',!1),pe=Ko("\\\\",!1),Le=Ko("\\/",!1),Ce=Ko("\\b",!1),de=Ko("\\f",!1),we=Ko("\\n",!1),he=Ko("\\r",!1),ye=Ko("\\t",!1),Ee=Ko("\\u",!1),Ae=Ko("\\",!1),me=Ko("''",!1),Te=Ko('""',!1),Ie=Ko("``",!1),Ne=/^[\n\r]/,Re=Zo(["\n","\r"],!1,!1),Se=Ko(".",!1),_e=/^[0-9]/,ge=Zo([["0","9"]],!1,!1),Oe=/^[0-9a-fA-F]/,xe=Zo([["0","9"],["a","f"],["A","F"]],!1,!1),Ue=/^[eE]/,Me=Zo(["e","E"],!1,!1),ke=/^[+\-]/,De=Zo(["+","-"],!1,!1),$e=Ko("NULL",!0),Pe=Ko("NOT NULL",!0),Fe=Ko("TRUE",!0),Ge=Ko("TO",!0),je=Ko("FALSE",!0),He=Ko("DROP",!0),Ye=Ko("USE",!0),Be=Ko("ALTER",!0),We=Ko("SELECT",!0),Xe=Ko("UPDATE",!0),Ve=Ko("CREATE",!0),qe=Ko("TEMPORARY",!0),Ke=Ko("DELETE",!0),Ze=Ko("INSERT",!0),ze=Ko("RECURSIVE",!1),Qe=Ko("REPLACE",!0),Je=Ko("RETURNING",!0),rn=Ko("RENAME",!0),tn=Ko("IGNORE",!0),en=Ko("PARTITION",!0),nn=Ko("INTO",!0),sn=Ko("FROM",!0),on=Ko("AS",!0),un=Ko("TABLE",!0),an=Ko("TABLESPACE",!0),ln=Ko("DATABASE",!0),cn=Ko("SCHEME",!0),fn=Ko("NATURAL",!0),bn=Ko("LEFT",!0),vn=Ko("RIGHT",!0),pn=Ko("FULL",!0),Ln=Ko("INNER",!0),Cn=Ko("JOIN",!0),dn=Ko("CROSS",!0),wn=Ko("APPLY",!0),hn=Ko("OUTER",!0),yn=Ko("UNION",!0),En=Ko("INTERSECT",!0),An=Ko("EXCEPT",!0),mn=Ko("VALUES",!0),Tn=Ko("USING",!0),In=Ko("WHERE",!0),Nn=Ko("GROUP",!0),Rn=Ko("BY",!0),Sn=Ko("ORDER",!0),_n=Ko("HAVING",!0),gn=Ko("LIMIT",!0),On=Ko("OFFSET",!0),xn=Ko("ASC",!0),Un=Ko("DESC",!0),Mn=Ko("ALL",!0),kn=Ko("DISTINCT",!0),Dn=Ko("BETWEEN",!0),$n=Ko("IS",!0),Pn=Ko("LIKE",!0),Fn=Ko("SIMILAR",!0),Gn=Ko("EXISTS",!0),jn=Ko("AND",!0),Hn=Ko("OR",!0),Yn=Ko("COUNT",!0),Bn=Ko("MAX",!0),Wn=Ko("MIN",!0),Xn=Ko("SUM",!0),Vn=Ko("AVG",!0),qn=Ko("COLLECT",!0),Kn=Ko("RANK",!0),Zn=Ko("DENSE_RANK",!0),zn=Ko("LISTAGG",!0),Qn=Ko("ROW_NUMBER",!0),Jn=Ko("TUMBLE",!0),rs=Ko("EXTRACT",!0),ts=Ko("CALL",!0),es=Ko("CASE",!0),ns=Ko("WHEN",!0),ss=Ko("THEN",!0),os=Ko("ELSE",!0),us=Ko("END",!0),as=Ko("CAST",!0),is=Ko("TRY_CAST",!0),ls=Ko("BOOL",!0),cs=Ko("BOOLEAN",!0),fs=Ko("CHAR",!0),bs=Ko("VARCHAR",!0),vs=Ko("STRING",!0),ps=Ko("NUMERIC",!0),Ls=Ko("DECIMAL",!0),Cs=Ko("SIGNED",!0),ds=Ko("UNSIGNED",!0),ws=Ko("INT",!0),hs=Ko("ZEROFILL",!0),ys=Ko("INTEGER",!0),Es=Ko("JSON",!0),As=Ko("JSONB",!0),ms=Ko("GEOMETRY",!0),Ts=Ko("SMALLINT",!0),Is=Ko("TINYINT",!0),Ns=Ko("TINYTEXT",!0),Rs=Ko("TEXT",!0),Ss=Ko("MEDIUMTEXT",!0),_s=Ko("LONGTEXT",!0),gs=Ko("BIGINT",!0),Os=Ko("FLOAT",!0),xs=Ko("DOUBLE",!0),Us=Ko("DATETIME",!0),Ms=Ko("TIME",!0),ks=Ko("TIMESTAMP",!0),Ds=Ko("TRUNCATE",!0),$s=Ko("USER",!0),Ps=Ko("UUID",!0),Fs=Ko("ARRAY",!0),Gs=Ko("MAP",!0),js=Ko("CURRENT_DATE",!0),Hs=Ko("INTERVAL",!0),Ys=Ko("CURRENT_TIME",!0),Bs=Ko("CURRENT_TIMESTAMP",!0),Ws=Ko("CURRENT_USER",!0),Xs=Ko("SESSION_USER",!0),Vs=Ko("SYSTEM_USER",!0),qs=Ko("GLOBAL",!0),Ks=Ko("SESSION",!0),Zs=Ko("LOCAL",!0),zs=Ko("PERSIST",!0),Qs=Ko("PERSIST_ONLY",!0),Js=Ko("@",!1),ro=Ko("@@",!1),to=Ko("return",!0),eo=Ko(":=",!1),no=Ko("::",!1),so=Ko("DUAL",!0),oo=Ko("ADD",!0),uo=Ko("COLUMN",!0),ao=Ko("INDEX",!0),io=Ko("FULLTEXT",!0),lo=Ko("SPATIAL",!0),co=Ko("COMMENT",!0),fo=Ko("CONSTRAINT",!0),bo=Ko("CONCURRENTLY",!0),vo=Ko("REFERENCES",!0),po=Ko("SQL_CALC_FOUND_ROWS",!0),Lo=Ko("SQL_CACHE",!0),Co=Ko("SQL_NO_CACHE",!0),wo=Ko("SQL_SMALL_RESULT",!0),ho=Ko("SQL_BIG_RESULT",!0),yo=Ko("SQL_BUFFER_RESULT",!0),Eo=Ko(",",!1),Ao=Ko("[",!1),mo=Ko("]",!1),To=Ko(";",!1),Io=Ko("->",!1),No=Ko("->>",!1),Ro=Ko("#>",!1),So=Ko("#>>",!1),_o=Ko("||",!1),go=Ko("&&",!1),Oo=Ko("/*",!1),xo=Ko("*/",!1),Uo=Ko("--",!1),Mo={type:"any"},ko=Ko("years",!0),Do=Ko("months",!0),$o=Ko("days",!0),Po=Ko("hours",!0),Fo=Ko("minutes",!0),Go=Ko("seconds",!0),jo=/^[ \t\n\r]/,Ho=Zo([" ","\t","\n","\r"],!1,!1),Yo=function(r){return{dataType:r}},Bo=0,Wo=[{line:1,column:1}],Xo=0,Vo=[],qo=0;if("startRule"in t){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function Ko(r,t){return{type:"literal",text:r,ignoreCase:t}}function Zo(r,t,e){return{type:"class",parts:r,inverted:t,ignoreCase:e}}function zo(t){var e,n=Wo[t];if(n)return n;for(e=t-1;!Wo[e];)e--;for(n={line:(n=Wo[e]).line,column:n.column};e<t;)10===r.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return Wo[t]=n,n}function Qo(r,t){var e=zo(r),n=zo(t);return{start:{offset:r,line:e.line,column:e.column},end:{offset:t,line:n.line,column:n.column}}}function Jo(r){Bo<Xo||(Bo>Xo&&(Xo=Bo,Vo=[]),Vo.push(r))}function ru(){var r,t;return r=Bo,Il()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=eu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=yl())!==o&&(a=Il())!==o&&(i=eu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=yl())!==o&&(a=Il())!==o&&(i=eu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?(t=function(r,t){const e=r&&r.ast||r,n=t&&t.length&&t[0].length>=4?[e]:e;for(let r=0;r<t.length;r++)t[r][3]&&0!==t[r][3].length&&n.push(t[r][3]&&t[r][3].ast||t[r][3]);return{tableList:Array.from(tc),columnList:Ql(ec),ast:n}}(t,e),r=t):(Bo=r,r=o)}else Bo=r,r=o;return r}())!==o?r=t:(Bo=r,r=o),r}function tu(){var t;return(t=function(){var r,t,e,n,s,u,a,i,l;return r=Bo,(t=za())!==o&&Il()!==o&&(e=fi())!==o&&Il()!==o&&(n=ku())!==o?(a=t,i=e,(l=n)&&l.forEach((r=>tc.add(`${a}::${r.db}::${r.table}`))),r=t={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:a.toLowerCase(),keyword:i.toLowerCase(),name:l}}):(Bo=r,r=o),r===o&&(r=Bo,(t=za())!==o&&Il()!==o&&(e=il())!==o&&Il()!==o&&(n=ha())!==o&&Il()!==o&&bi()!==o&&Il()!==o&&(s=Fu())!==o&&Il()!==o?((u=function(){var r,t,e,n,s,u;if(r=Bo,(t=bu())===o&&(t=vu()),t!==o){for(e=[],n=Bo,(s=Il())!==o?((u=bu())===o&&(u=vu()),u!==o?n=s=[s,u]:(Bo=n,n=o)):(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o?((u=bu())===o&&(u=vu()),u!==o?n=s=[s,u]:(Bo=n,n=o)):(Bo=n,n=o);e!==o?r=t=b(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())===o&&(u=null),u!==o&&Il()!==o?(t=function(r,t,e,n,s){return{tableList:Array.from(tc),columnList:Ql(ec),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),name:e,table:n,options:s}}}(t,e,n,s,u),r=t):(Bo=r,r=o)):(Bo=r,r=o)),r}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h;return r=Bo,(t=Ja())!==o&&Il()!==o?((e=ri())===o&&(e=null),e!==o&&Il()!==o&&fi()!==o&&Il()!==o?((n=ou())===o&&(n=null),n!==o&&Il()!==o&&(s=ku())!==o&&Il()!==o&&(u=function(){var r,t,e,n,s,u,a,i;if(r=Bo,Cl()!==o)if(Il()!==o)if((t=au())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=au())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=au())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o&&(n=Il())!==o&&(s=dl())!==o?r=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;return r}())!==o&&Il()!==o?((a=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=Eu())!==o){for(e=[],n=Bo,(s=Il())!==o?((u=pl())===o&&(u=null),u!==o&&(a=Il())!==o&&(i=Eu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o)):(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o?((u=pl())===o&&(u=null),u!==o&&(a=Il())!==o&&(i=Eu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o)):(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())===o&&(a=null),a!==o&&Il()!==o?((i=oi())===o&&(i=ni()),i===o&&(i=null),i!==o&&Il()!==o?((l=ci())===o&&(l=null),l!==o&&Il()!==o?((c=su())===o&&(c=null),c!==o?(f=t,b=e,v=n,L=u,C=a,d=i,w=l,h=c,(p=s)&&p.forEach((r=>tc.add(`create::${r.db}::${r.table}`))),r=t={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:f[0].toLowerCase(),keyword:"table",temporary:b&&b[0].toLowerCase(),if_not_exists:v,table:p,ignore_replace:d&&d[0].toLowerCase(),as:w&&w[0].toLowerCase(),query_expr:h&&h.ast,create_definitions:L,table_options:C}}):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o),r===o&&(r=Bo,(t=Ja())!==o&&Il()!==o?((e=ri())===o&&(e=null),e!==o&&Il()!==o&&fi()!==o&&Il()!==o?((n=ou())===o&&(n=null),n!==o&&Il()!==o&&(s=ku())!==o&&Il()!==o&&(u=function r(){var t,e,n;return(t=function(){var r,t;return r=Bo,Ri()!==o&&Il()!==o&&(t=ku())!==o?r={type:"like",table:t}:(Bo=r,r=o),r}())===o&&(t=Bo,Cl()!==o&&Il()!==o&&(e=r())!==o&&Il()!==o&&dl()!==o?((n=e).parentheses=!0,t=n):(Bo=t,t=o)),t}())!==o?(t=function(r,t,e,n,s){return n&&n.forEach((r=>tc.add(`create::${r.db}::${r.table}`))),{tableList:Array.from(tc),columnList:Ql(ec),ast:{type:r[0].toLowerCase(),keyword:"table",temporary:t&&t[0].toLowerCase(),if_not_exists:e,table:n,like:s}}}(t,e,n,s,u),r=t):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T,I,N,R,S,_,g,O,x;return t=Bo,Ja()!==o&&Il()!==o?(e=Bo,(n=xi())!==o&&(s=Il())!==o&&(u=ni())!==o?e=n=[n,s,u]:(Bo=e,e=o),e===o&&(e=null),e!==o&&(n=Il())!==o?((s=bl())===o&&(s=null),s!==o&&(u=Il())!==o?("trigger"===r.substr(Bo,7).toLowerCase()?(a=r.substr(Bo,7),Bo+=7):(a=o,0===qo&&Jo(W)),a!==o&&Il()!==o&&(i=Ia())!==o&&Il()!==o?("before"===r.substr(Bo,6).toLowerCase()?(l=r.substr(Bo,6),Bo+=6):(l=o,0===qo&&Jo(X)),l===o&&("after"===r.substr(Bo,5).toLowerCase()?(l=r.substr(Bo,5),Bo+=5):(l=o,0===qo&&Jo(V)),l===o&&("instead of"===r.substr(Bo,10).toLowerCase()?(l=r.substr(Bo,10),Bo+=10):(l=o,0===qo&&Jo(q)))),l!==o&&Il()!==o&&(c=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=hu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=xi())!==o&&(a=Il())!==o&&(i=hu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=xi())!==o&&(a=Il())!==o&&(i=hu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())!==o&&Il()!==o?("on"===r.substr(Bo,2).toLowerCase()?(f=r.substr(Bo,2),Bo+=2):(f=o,0===qo&&Jo(K)),f!==o&&Il()!==o&&(b=Fu())!==o&&Il()!==o?(v=Bo,(p=ii())!==o&&(L=Il())!==o&&(C=Fu())!==o?v=p=[p,L,C]:(Bo=v,v=o),v===o&&(v=null),v!==o&&(p=Il())!==o?((L=function(){var t,e,n,s,u,a,i;return t=Bo,e=Bo,"not"===r.substr(Bo,3).toLowerCase()?(n=r.substr(Bo,3),Bo+=3):(n=o,0===qo&&Jo(rr)),n===o&&(n=null),n!==o&&(s=Il())!==o?("deferrable"===r.substr(Bo,10).toLowerCase()?(u=r.substr(Bo,10),Bo+=10):(u=o,0===qo&&Jo(tr)),u!==o?e=n=[n,s,u]:(Bo=e,e=o)):(Bo=e,e=o),e!==o&&(n=Il())!==o?("initially immediate"===r.substr(Bo,19).toLowerCase()?(s=r.substr(Bo,19),Bo+=19):(s=o,0===qo&&Jo(er)),s===o&&("initially deferred"===r.substr(Bo,18).toLowerCase()?(s=r.substr(Bo,18),Bo+=18):(s=o,0===qo&&Jo(nr))),s!==o?(i=s,t=e={keyword:(a=e)&&a[0]?a[0].toLowerCase()+" deferrable":"deferrable",args:i&&i.toLowerCase()}):(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(L=null),L!==o&&(C=Il())!==o?((d=function(){var t,e,n,s,u,a,i;return t=Bo,"for"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(sr)),e!==o&&Il()!==o?("each"===r.substr(Bo,4).toLowerCase()?(n=r.substr(Bo,4),Bo+=4):(n=o,0===qo&&Jo(or)),n===o&&(n=null),n!==o&&Il()!==o?("row"===r.substr(Bo,3).toLowerCase()?(s=r.substr(Bo,3),Bo+=3):(s=o,0===qo&&Jo(ur)),s===o&&("statement"===r.substr(Bo,9).toLowerCase()?(s=r.substr(Bo,9),Bo+=9):(s=o,0===qo&&Jo(ar))),s!==o?(u=e,i=s,t=e={keyword:(a=n)?`${u.toLowerCase()} ${a.toLowerCase()}`:u.toLowerCase(),args:i.toLowerCase()}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(d=null),d!==o&&Il()!==o?((w=function(){var r,t;return r=Bo,ki()!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(t=na())!==o&&Il()!==o&&dl()!==o?r={type:"when",cond:t,parentheses:!0}:(Bo=r,r=o),r}())===o&&(w=null),w!==o&&Il()!==o?("execute"===r.substr(Bo,7).toLowerCase()?(h=r.substr(Bo,7),Bo+=7):(h=o,0===qo&&Jo(Z)),h!==o&&Il()!==o?("procedure"===r.substr(Bo,9).toLowerCase()?(y=r.substr(Bo,9),Bo+=9):(y=o,0===qo&&Jo(z)),y===o&&("function"===r.substr(Bo,8).toLowerCase()?(y=r.substr(Bo,8),Bo+=8):(y=o,0===qo&&Jo(Q))),y!==o&&Il()!==o&&(E=Fl())!==o?(A=s,m=a,I=c,N=b,R=v,S=L,_=d,g=w,O=y,x=E,t={type:"create",replace:e&&"or replace",constraint:i,location:(T=l)&&T.toLowerCase(),events:I,table:N,from:R&&R[2],deferrable:S,for_each:_,when:g,execute:{keyword:"execute "+O.toLowerCase(),expr:x},constraint_type:m&&m.toLowerCase(),keyword:m&&m.toLowerCase(),constraint_kw:A&&A.toLowerCase(),resource:"constraint"}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,b,v,p,L,C,d,w,h,y,E,A,m;return t=Bo,Ja()!==o&&Il()!==o?("extension"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(l)),e!==o&&Il()!==o?((n=ou())===o&&(n=null),n!==o&&Il()!==o?((s=Ia())===o&&(s=Pa()),s!==o&&Il()!==o?((u=wi())===o&&(u=null),u!==o&&Il()!==o?(a=Bo,"schema"===r.substr(Bo,6).toLowerCase()?(i=r.substr(Bo,6),Bo+=6):(i=o,0===qo&&Jo(c)),i!==o&&(b=Il())!==o&&(v=Ia())!==o?a=i=[i,b,v]:(Bo=a,a=o),a===o&&(a=Pa()),a===o&&(a=null),a!==o&&(i=Il())!==o?(b=Bo,"version"===r.substr(Bo,7).toLowerCase()?(v=r.substr(Bo,7),Bo+=7):(v=o,0===qo&&Jo(f)),v!==o&&(p=Il())!==o?((L=Ia())===o&&(L=Pa()),L!==o?b=v=[v,p,L]:(Bo=b,b=o)):(Bo=b,b=o),b===o&&(b=null),b!==o&&(v=Il())!==o?(p=Bo,(L=ii())!==o&&(C=Il())!==o?((d=Ia())===o&&(d=Pa()),d!==o?p=L=[L,C,d]:(Bo=p,p=o)):(Bo=p,p=o),p===o&&(p=null),p!==o?(w=n,h=s,y=u,E=a,A=b,m=p,t={type:"create",keyword:e.toLowerCase(),if_not_exists:w,extension:Jl(h),with:y&&y[0].toLowerCase(),schema:Jl(E&&E[2].toLowerCase()),version:Jl(A&&A[2]),from:Jl(m&&m[2])}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T,I,N,R,S,_,g,O;return t=Bo,(e=Ja())!==o&&Il()!==o?((n=cl())===o&&(n=null),n!==o&&Il()!==o&&(s=il())!==o&&Il()!==o?((u=function(){var t,e,n,s;return t=Bo,"concurrently"===r.substr(Bo,12).toLowerCase()?(e=r.substr(Bo,12),Bo+=12):(e=o,0===qo&&Jo(bo)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="CONCURRENTLY":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(u=null),u!==o&&Il()!==o?((a=ya())===o&&(a=null),a!==o&&Il()!==o&&(i=bi())!==o&&Il()!==o&&(l=Fu())!==o&&Il()!==o?((c=xu())===o&&(c=null),c!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(f=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=uu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=uu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=uu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())!==o&&Il()!==o&&dl()!==o&&Il()!==o?(b=Bo,(v=wi())!==o&&(p=Il())!==o&&(L=Cl())!==o&&(C=Il())!==o&&(d=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=Mu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Mu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Mu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())!==o&&(w=Il())!==o&&(h=dl())!==o?b=v=[v,p,L,C,d,w,h]:(Bo=b,b=o),b===o&&(b=null),b!==o&&(v=Il())!==o?(p=Bo,(L=function(){var t,e,n,s;return t=Bo,"tablespace"===r.substr(Bo,10).toLowerCase()?(e=r.substr(Bo,10),Bo+=10):(e=o,0===qo&&Jo(an)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="TABLESPACE":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(C=Il())!==o&&(d=Ia())!==o?p=L=[L,C,d]:(Bo=p,p=o),p===o&&(p=null),p!==o&&(L=Il())!==o?((C=ju())===o&&(C=null),C!==o&&(d=Il())!==o?(y=e,E=n,A=s,m=u,T=a,I=i,N=l,R=c,S=f,_=b,g=p,O=C,t=e={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:y[0].toLowerCase(),index_type:E&&E.toLowerCase(),keyword:A.toLowerCase(),concurrently:m&&m.toLowerCase(),index:T,on_kw:I[0].toLowerCase(),table:N,index_using:R,index_columns:S,with:_&&_[4],with_before_where:!0,tablespace:g&&{type:"origin",value:g[2]},where:O}}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;return t=Bo,(e=Ja())!==o&&Il()!==o?((n=function(){var t,e,n,s;return t=Bo,"database"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(ln)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="DATABASE":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(n=function(){var t,e,n,s;return t=Bo,"scheme"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(cn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SCHEME":(Bo=t,t=o)):(Bo=t,t=o),t}()),n!==o&&Il()!==o?((s=ou())===o&&(s=null),s!==o&&Il()!==o&&(u=Ia())!==o&&Il()!==o?((a=function(){var r,t,e,n,s,u;if(r=Bo,(t=yu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=yu())!==o?n=s=[s,u]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=yu())!==o?n=s=[s,u]:(Bo=n,n=o);e!==o?r=t=b(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())===o&&(a=null),a!==o?(i=e,l=s,c=u,f=a,t=e={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:i[0].toLowerCase(),keyword:"database",if_not_exists:l,database:c,create_definitions:f}}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}()),t}())===o&&(t=function(){var r,t,e,n,s,u,a;return r=Bo,(t=rl())!==o&&Il()!==o?((e=fi())===o&&(e=null),e!==o&&Il()!==o&&(n=ku())!==o?(s=t,u=e,(a=n)&&a.forEach((r=>tc.add(`${s}::${r.db}::${r.table}`))),r=t={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:s.toLowerCase(),keyword:u&&u.toLowerCase()||"table",name:a}}):(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=Bo,si()!==o&&Il()!==o&&fi()!==o&&Il()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=Ou())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Ou())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Ou())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())!==o?((e=t).forEach((r=>r.forEach((r=>r.table&&tc.add(`rename::${r.db}::${r.table}`))))),r={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:"rename",table:e}}):(Bo=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=Bo,function(){var t,e,n,s;return t=Bo,"call"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(ts)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="CALL":(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o&&(e=Fl())!==o?(n=e,t={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:"call",expr:n}}):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=Bo,function(){var t,e,n,s;return t=Bo,"use"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(Ye)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o&&(e=ya())!==o?(n=e,tc.add(`use::${n}::null`),t={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:"use",db:n}}):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=Bo,function(){var t,e,n,s;return t=Bo,"alter"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(Be)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o&&fi()!==o&&Il()!==o&&(e=ku())!==o&&Il()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=fu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=fu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=fu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())!==o?(u=n,(s=e)&&s.length>0&&s.forEach((r=>tc.add(`alter::${r.db}::${r.table}`))),t={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:"alter",table:s,expr:u}}):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=Bo,li()!==o&&Il()!==o?((e=function(){var t,e,n,s;return t=Bo,"global"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(qs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="GLOBAL":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Bo,"session"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(Ks)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SESSION":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Bo,"local"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(Zs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="LOCAL":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Bo,"persist"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(zs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="PERSIST":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Bo,"persist_only"===r.substr(Bo,12).toLowerCase()?(e=r.substr(Bo,12),Bo+=12):(e=o,0===qo&&Jo(Qs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="PERSIST_ONLY":(Bo=t,t=o)):(Bo=t,t=o),t}()),e===o&&(e=null),e!==o&&Il()!==o&&(n=Ul())!==o?(s=e,(u=n).keyword=s,t={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:"set",expr:u}}):(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"lock"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(O)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&Il()!==o?((n=fi())===o&&(n=null),n!==o&&Il()!==o&&(s=ku())!==o&&Il()!==o?((u=function(){var t,e,n,s;return t=Bo,"in"===r.substr(Bo,2).toLowerCase()?(e=r.substr(Bo,2),Bo+=2):(e=o,0===qo&&Jo(mr)),e!==o&&Il()!==o?("access share"===r.substr(Bo,12).toLowerCase()?(n=r.substr(Bo,12),Bo+=12):(n=o,0===qo&&Jo(Tr)),n===o&&("row share"===r.substr(Bo,9).toLowerCase()?(n=r.substr(Bo,9),Bo+=9):(n=o,0===qo&&Jo(Ir)),n===o&&("row exclusive"===r.substr(Bo,13).toLowerCase()?(n=r.substr(Bo,13),Bo+=13):(n=o,0===qo&&Jo(Nr)),n===o&&("share update exclusive"===r.substr(Bo,22).toLowerCase()?(n=r.substr(Bo,22),Bo+=22):(n=o,0===qo&&Jo(Rr)),n===o&&("share row exclusive"===r.substr(Bo,19).toLowerCase()?(n=r.substr(Bo,19),Bo+=19):(n=o,0===qo&&Jo(Sr)),n===o&&("exclusive"===r.substr(Bo,9).toLowerCase()?(n=r.substr(Bo,9),Bo+=9):(n=o,0===qo&&Jo(M)),n===o&&("access exclusive"===r.substr(Bo,16).toLowerCase()?(n=r.substr(Bo,16),Bo+=16):(n=o,0===qo&&Jo(_r)),n===o&&("share"===r.substr(Bo,5).toLowerCase()?(n=r.substr(Bo,5),Bo+=5):(n=o,0===qo&&Jo(gr))))))))),n!==o&&Il()!==o?("mode"===r.substr(Bo,4).toLowerCase()?(s=r.substr(Bo,4),Bo+=4):(s=o,0===qo&&Jo(Or)),s!==o?t=e={mode:`in ${n.toLowerCase()} mode`}:(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(u=null),u!==o&&Il()!==o?("nowait"===r.substr(Bo,6).toLowerCase()?(a=r.substr(Bo,6),Bo+=6):(a=o,0===qo&&Jo(xr)),a===o&&(a=null),a!==o?(i=n,c=u,f=a,(l=s)&&l.forEach((r=>tc.add(`lock::${r.db}::${r.table}`))),e={tableList:Array.from(tc),columnList:Ql(ec),ast:{type:"lock",keyword:i&&i.toLowerCase(),tables:l.map((r=>({table:r}))),lock_mode:c,nowait:f}},t=e):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}()),t}function eu(){var r;return(r=su())===o&&(r=function(){var r,t,e,n,s,u;return r=Bo,(t=Qa())!==o&&Il()!==o&&(e=ku())!==o&&Il()!==o&&li()!==o&&Il()!==o&&(n=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=Vu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Vu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Vu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())!==o&&Il()!==o?((s=ju())===o&&(s=null),s!==o&&Il()!==o?((u=qu())===o&&(u=null),u!==o?(t=function(r,t,e,n){const s={};return r&&r.forEach((r=>{const{db:t,as:e,table:n,join:o}=r,u=o?"select":"update";t&&(s[n]=t),n&&tc.add(`${u}::${t}::${n}`)})),t&&t.forEach((r=>{if(r.table){const t=zl(r.table);tc.add(`update::${s[t]||null}::${t}`)}ec.add(`update::${r.table}::${r.column}`)})),{tableList:Array.from(tc),columnList:Ql(ec),ast:{type:"update",table:r,set:t,where:e,returning:n}}}(e,n,s,u),r=t):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=Bo,(t=zu())!==o&&Il()!==o?((e=ai())===o&&(e=null),e!==o&&Il()!==o&&(n=Fu())!==o&&Il()!==o?((s=Zu())===o&&(s=null),s!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(u=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=ma())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=ma())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=ma())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())!==o&&Il()!==o&&dl()!==o&&Il()!==o&&(a=Ku())!==o&&Il()!==o?((i=qu())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o){if(t&&(tc.add(`insert::${t.db}::${t.table}`),t.as=null),n){let r=t&&t.table||null;Array.isArray(s)&&s.forEach(((r,t)=>{if(r.value.length!=n.length)throw new Error("Error: column count doesn't match value count at row "+(t+1))})),n.forEach((t=>ec.add(`insert::${r}::${t}`)))}return{tableList:Array.from(tc),columnList:Ql(ec),ast:{type:r,table:[t],columns:n,values:s,partition:e,returning:o}}}(t,n,s,u,a,i),r=t):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;return r=Bo,(t=zu())!==o&&Il()!==o?((e=oi())===o&&(e=null),e!==o&&Il()!==o?((n=ai())===o&&(n=null),n!==o&&Il()!==o&&(s=Fu())!==o&&Il()!==o?((u=Zu())===o&&(u=null),u!==o&&Il()!==o&&(a=Ku())!==o&&Il()!==o?((i=qu())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o,u){n&&(tc.add(`insert::${n.db}::${n.table}`),ec.add(`insert::${n.table}::(.*)`),n.as=null);const a=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(tc),columnList:Ql(ec),ast:{type:r,table:[n],columns:null,values:o,partition:s,prefix:a,returning:u}}}(t,e,n,s,u,a,i),r=t):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s;return r=Bo,(t=ti())!==o&&Il()!==o?((e=ku())===o&&(e=null),e!==o&&Il()!==o&&(n=gu())!==o&&Il()!==o?((s=ju())===o&&(s=null),s!==o?(t=function(r,t,e){if(t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"delete";n&&tc.add(`${o}::${t}::${n}`),s||ec.add(`delete::${n}::(.*)`)})),null===r&&1===t.length){const e=t[0];r=[{db:e.db,table:e.table,as:e.as,addition:!0}]}return{tableList:Array.from(tc),columnList:Ql(ec),ast:{type:"delete",table:r,from:t,where:e}}}(e,n,s),r=t):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(r=tu())===o&&(r=function(){var r,t;for(r=[],t=xl();t!==o;)r.push(t),t=xl();return r}()),r}function nu(){var t,e,n,s,u;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"union"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(yn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="UNION":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Bo,"intersect"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(En)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="INTERSECT":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Bo,"except"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(An)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="EXCEPT":(Bo=t,t=o)):(Bo=t,t=o),t}()),e!==o&&Il()!==o?((n=Ai())===o&&(n=mi()),n===o&&(n=null),n!==o?(s=e,t=e=(u=n)?`${s.toLowerCase()} ${u.toLowerCase()}`:""+s.toLowerCase()):(Bo=t,t=o)):(Bo=t,t=o),t}function su(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=Au())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=nu())!==o&&(a=Il())!==o&&(i=Au())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=nu())!==o&&(a=Il())!==o&&(i=Au())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o&&(n=Il())!==o?((s=Yu())===o&&(s=null),s!==o&&(u=Il())!==o?((a=Xu())===o&&(a=null),a!==o?r=t=function(r,t,e,n){let s=r;for(let r=0;r<t.length;r++)s._next=t[r][3],s.set_op=t[r][1],s=s._next;return e&&(r._orderby=e),n&&(r._limit=n),{tableList:Array.from(tc),columnList:Ql(ec),ast:r}}(t,e,s,a):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)}else Bo=r,r=o;return r}function ou(){var t,e;return t=Bo,"if"===r.substr(Bo,2).toLowerCase()?(e=r.substr(Bo,2),Bo+=2):(e=o,0===qo&&Jo(i)),e!==o&&Il()!==o&&gi()!==o&&Il()!==o&&_i()!==o?t=e="IF NOT EXISTS":(Bo=t,t=o),t}function uu(){var t,e,n,s,u,a,i,l,c,f,b,C,d,w;return t=Bo,(e=na())!==o&&Il()!==o?((n=cu())===o&&(n=null),n!==o&&Il()!==o?((s=ya())===o&&(s=null),s!==o&&Il()!==o?((u=yi())===o&&(u=Ei()),u===o&&(u=null),u!==o&&Il()!==o?(a=Bo,"nulls"===r.substr(Bo,5).toLowerCase()?(i=r.substr(Bo,5),Bo+=5):(i=o,0===qo&&Jo(v)),i!==o&&(l=Il())!==o?("first"===r.substr(Bo,5).toLowerCase()?(c=r.substr(Bo,5),Bo+=5):(c=o,0===qo&&Jo(p)),c===o&&("last"===r.substr(Bo,4).toLowerCase()?(c=r.substr(Bo,4),Bo+=4):(c=o,0===qo&&Jo(L))),c!==o?a=i=[i,l,c]:(Bo=a,a=o)):(Bo=a,a=o),a===o&&(a=null),a!==o?(f=e,b=n,C=s,d=u,w=a,t=e={...f,collate:b,opclass:C,order_by:d&&d.toLowerCase(),nulls:w&&`${w[0].toLowerCase()} ${w[2].toLowerCase()}`}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}function au(){var t;return(t=lu())===o&&(t=pu())===o&&(t=Lu())===o&&(t=function(){var t;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=Bo,(e=Cu())===o&&(e=null),e!==o&&Il()!==o?("primary key"===r.substr(Bo,11).toLowerCase()?(n=r.substr(Bo,11),Bo+=11):(n=o,0===qo&&Jo(k)),n!==o&&Il()!==o?((s=xu())===o&&(s=null),s!==o&&Il()!==o&&(u=Tu())!==o&&Il()!==o?((a=Uu())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l.toLowerCase(),keyword:i&&i.keyword,index_type:c,resource:"constraint",index_options:b}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;return r=Bo,(t=Cu())===o&&(t=null),t!==o&&Il()!==o&&(e=cl())!==o&&Il()!==o?((n=il())===o&&(n=ll()),n===o&&(n=null),n!==o&&Il()!==o?((s=ma())===o&&(s=null),s!==o&&Il()!==o?((u=xu())===o&&(u=null),u!==o&&Il()!==o&&(a=Tu())!==o&&Il()!==o?((i=Uu())===o&&(i=null),i!==o?(c=e,f=n,b=s,v=u,p=a,L=i,r=t={constraint:(l=t)&&l.constraint,definition:p,constraint_type:f&&`${c.toLowerCase()} ${f.toLowerCase()}`||c.toLowerCase(),keyword:l&&l.keyword,index_type:v,index:b,resource:"constraint",index_options:L}):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=Bo,(e=Cu())===o&&(e=null),e!==o&&Il()!==o?("foreign key"===r.substr(Bo,11).toLowerCase()?(n=r.substr(Bo,11),Bo+=11):(n=o,0===qo&&Jo(D)),n!==o&&Il()!==o?((s=ma())===o&&(s=null),s!==o&&Il()!==o&&(u=Tu())!==o&&Il()!==o?((a=du())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l,keyword:i&&i.keyword,index:c,resource:"constraint",reference_definition:b}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}()),t}()),t}function iu(){var t,e,n,s;return t=Bo,(e=function(){var t;return(t=function(){var t,e,n,s;return t=Bo,"not null"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(Pe)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(t={type:"not null",value:"not null"}),t}())===o&&(e=$a()),e!==o&&((s=e)&&!s.value&&(s.value="null"),e={nullable:s}),(t=e)===o&&(t=Bo,(e=function(){var r,t;return r=Bo,Ka()!==o&&Il()!==o?((t=Da())===o&&(t=na()),t!==o?r={type:"default",value:t}:(Bo=r,r=o)):(Bo=r,r=o),r}())!==o&&(e={default_val:e}),(t=e)===o&&(t=Bo,"auto_increment"===r.substr(Bo,14).toLowerCase()?(e=r.substr(Bo,14),Bo+=14):(e=o,0===qo&&Jo(C)),e!==o&&(e={auto_increment:e.toLowerCase()}),(t=e)===o&&(t=Bo,"unique"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(d)),e!==o&&Il()!==o?("key"===r.substr(Bo,3).toLowerCase()?(n=r.substr(Bo,3),Bo+=3):(n=o,0===qo&&Jo(w)),n===o&&(n=null),n!==o?t=e=function(r){const t=["unique"];return r&&t.push(r),{unique:t.join(" ").toLowerCase("")}}(n):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,"primary"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(h)),e===o&&(e=null),e!==o&&Il()!==o?("key"===r.substr(Bo,3).toLowerCase()?(n=r.substr(Bo,3),Bo+=3):(n=o,0===qo&&Jo(w)),n!==o?t=e=function(r){const t=[];return r&&t.push("primary"),t.push("key"),{primary_key:t.join(" ").toLowerCase("")}}(e):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,(e=Sl())!==o&&(e={comment:e}),(t=e)===o&&(t=Bo,(e=cu())!==o&&(e={collate:e}),(t=e)===o&&(t=Bo,(e=function(){var t,e,n;return t=Bo,"column_format"===r.substr(Bo,13).toLowerCase()?(e=r.substr(Bo,13),Bo+=13):(e=o,0===qo&&Jo(y)),e!==o&&Il()!==o?("fixed"===r.substr(Bo,5).toLowerCase()?(n=r.substr(Bo,5),Bo+=5):(n=o,0===qo&&Jo(E)),n===o&&("dynamic"===r.substr(Bo,7).toLowerCase()?(n=r.substr(Bo,7),Bo+=7):(n=o,0===qo&&Jo(A)),n===o&&("default"===r.substr(Bo,7).toLowerCase()?(n=r.substr(Bo,7),Bo+=7):(n=o,0===qo&&Jo(m)))),n!==o?t=e={type:"column_format",value:n.toLowerCase()}:(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(e={column_format:e}),(t=e)===o&&(t=Bo,(e=function(){var t,e,n;return t=Bo,"storage"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(T)),e!==o&&Il()!==o?("disk"===r.substr(Bo,4).toLowerCase()?(n=r.substr(Bo,4),Bo+=4):(n=o,0===qo&&Jo(I)),n===o&&("memory"===r.substr(Bo,6).toLowerCase()?(n=r.substr(Bo,6),Bo+=6):(n=o,0===qo&&Jo(N))),n!==o?t=e={type:"storage",value:n.toLowerCase()}:(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(e={storage:e}),(t=e)===o&&(t=Bo,(e=du())!==o&&(e={reference_definition:e}),t=e))))))))),t}function lu(){var r,t,e,n,s,u,a;return r=Bo,(t=ha())!==o&&Il()!==o&&(e=Yl())!==o&&Il()!==o?((n=function(){var r,t,e,n,s,u;if(r=Bo,(t=iu())!==o)if(Il()!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=iu())!==o?n=s=[s,u]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=iu())!==o?n=s=[s,u]:(Bo=n,n=o);e!==o?r=t=function(r,t){let e=r;for(let r=0;r<t.length;r++)e={...e,...t[r][1]};return e}(t,e):(Bo=r,r=o)}else Bo=r,r=o;else Bo=r,r=o;return r}())===o&&(n=null),n!==o?(s=t,u=e,a=n,ec.add(`create::${s.table}::${s.column}`),r=t={column:s,definition:u,resource:"column",...a||{}}):(Bo=r,r=o)):(Bo=r,r=o),r}function cu(){var t,e;return t=Bo,function(){var t,e,n,s;return t=Bo,"collate"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(fr)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="COLLATE":(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o&&(e=ya())!==o?t={type:"collate",value:e}:(Bo=t,t=o),t}function fu(){var r;return(r=function(){var r,t,e,n,s;return r=Bo,ul()!==o&&Il()!==o?((t=al())===o&&(t=null),t!==o&&Il()!==o&&(e=lu())!==o?(n=t,s=e,r={action:"add",...s,keyword:n,resource:"column",type:"alter"}):(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=Bo,za()!==o&&Il()!==o?((t=al())===o&&(t=null),t!==o&&Il()!==o&&(e=ha())!==o?r={action:"drop",column:e,keyword:t,resource:"column",type:"alter"}:(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=Bo,ul()!==o&&Il()!==o&&(t=pu())!==o?(e=t,r={action:"add",type:"alter",...e}):(Bo=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=Bo,ul()!==o&&Il()!==o&&(t=Lu())!==o?(e=t,r={action:"add",type:"alter",...e}):(Bo=r,r=o),r}())===o&&(r=function(){var r,t,e,n,s;return r=Bo,si()!==o&&Il()!==o?((t=Za())===o&&(t=ci()),t===o&&(t=null),t!==o&&Il()!==o&&(e=ya())!==o?(s=e,r={action:"rename",type:"alter",resource:"table",keyword:(n=t)&&n[0].toLowerCase(),table:s}):(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(r=bu())===o&&(r=vu()),r}function bu(){var t,e,n,s;return t=Bo,"algorithm"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(R)),e!==o&&Il()!==o?((n=ol())===o&&(n=null),n!==o&&Il()!==o?("default"===r.substr(Bo,7).toLowerCase()?(s=r.substr(Bo,7),Bo+=7):(s=o,0===qo&&Jo(m)),s===o&&("instant"===r.substr(Bo,7).toLowerCase()?(s=r.substr(Bo,7),Bo+=7):(s=o,0===qo&&Jo(S)),s===o&&("inplace"===r.substr(Bo,7).toLowerCase()?(s=r.substr(Bo,7),Bo+=7):(s=o,0===qo&&Jo(_)),s===o&&("copy"===r.substr(Bo,4).toLowerCase()?(s=r.substr(Bo,4),Bo+=4):(s=o,0===qo&&Jo(g))))),s!==o?t=e={type:"alter",keyword:"algorithm",resource:"algorithm",symbol:n,algorithm:s}:(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}function vu(){var t,e,n,s;return t=Bo,"lock"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(O)),e!==o&&Il()!==o?((n=ol())===o&&(n=null),n!==o&&Il()!==o?("default"===r.substr(Bo,7).toLowerCase()?(s=r.substr(Bo,7),Bo+=7):(s=o,0===qo&&Jo(m)),s===o&&("none"===r.substr(Bo,4).toLowerCase()?(s=r.substr(Bo,4),Bo+=4):(s=o,0===qo&&Jo(x)),s===o&&("shared"===r.substr(Bo,6).toLowerCase()?(s=r.substr(Bo,6),Bo+=6):(s=o,0===qo&&Jo(U)),s===o&&("exclusive"===r.substr(Bo,9).toLowerCase()?(s=r.substr(Bo,9),Bo+=9):(s=o,0===qo&&Jo(M))))),s!==o?t=e={type:"alter",keyword:"lock",resource:"lock",symbol:n,lock:s}:(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}function pu(){var r,t,e,n,s,u,a,i;return r=Bo,(t=il())===o&&(t=ll()),t!==o&&Il()!==o?((e=ma())===o&&(e=null),e!==o&&Il()!==o?((n=xu())===o&&(n=null),n!==o&&Il()!==o&&(s=Tu())!==o&&Il()!==o?((u=Uu())===o&&(u=null),u!==o&&Il()!==o?(a=n,i=u,r=t={index:e,definition:s,keyword:t.toLowerCase(),index_type:a,resource:"index",index_options:i}):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o),r}function Lu(){var t,e,n,s,u,a,i,l,c;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"fulltext"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(io)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="FULLTEXT":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=Bo,"spatial"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(lo)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SPATIAL":(Bo=t,t=o)):(Bo=t,t=o),t}()),e!==o&&Il()!==o?((n=il())===o&&(n=ll()),n===o&&(n=null),n!==o&&Il()!==o?((s=ma())===o&&(s=null),s!==o&&Il()!==o&&(u=Tu())!==o&&Il()!==o?((a=Uu())===o&&(a=null),a!==o&&Il()!==o?(i=e,c=a,t=e={index:s,definition:u,keyword:(l=n)&&`${i.toLowerCase()} ${l.toLowerCase()}`||i.toLowerCase(),index_options:c,resource:"index"}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}function Cu(){var r,t,e,n;return r=Bo,(t=bl())!==o&&Il()!==o?((e=ya())===o&&(e=null),e!==o?(n=e,r=t={keyword:t.toLowerCase(),constraint:n}):(Bo=r,r=o)):(Bo=r,r=o),r}function du(){var t,e,n,s,u,a,i,l,c,f;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"references"===r.substr(Bo,10).toLowerCase()?(e=r.substr(Bo,10),Bo+=10):(e=o,0===qo&&Jo(vo)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="REFERENCES":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&Il()!==o&&(n=ku())!==o&&Il()!==o&&(s=Tu())!==o&&Il()!==o?("match full"===r.substr(Bo,10).toLowerCase()?(u=r.substr(Bo,10),Bo+=10):(u=o,0===qo&&Jo($)),u===o&&("match partial"===r.substr(Bo,13).toLowerCase()?(u=r.substr(Bo,13),Bo+=13):(u=o,0===qo&&Jo(P)),u===o&&("match simple"===r.substr(Bo,12).toLowerCase()?(u=r.substr(Bo,12),Bo+=12):(u=o,0===qo&&Jo(F)))),u===o&&(u=null),u!==o&&Il()!==o?((a=wu())===o&&(a=null),a!==o&&Il()!==o?((i=wu())===o&&(i=null),i!==o?(l=u,c=a,f=i,t=e={definition:s,table:n,keyword:e.toLowerCase(),match:l&&l.toLowerCase(),on_action:[c,f].filter((r=>r))}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}function wu(){var t,e,n,s;return t=Bo,bi()!==o&&Il()!==o?((e=ti())===o&&(e=Qa()),e!==o&&Il()!==o&&(n=function(){var t,e,n;return t=Bo,(e=el())!==o&&Il()!==o&&Cl()!==o&&Il()!==o?((n=Ju())===o&&(n=null),n!==o&&Il()!==o&&dl()!==o?t=e={type:"function",name:e,args:n}:(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,"restrict"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(G)),e===o&&("cascade"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(j)),e===o&&("set null"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(H)),e===o&&("no action"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(Y)),e===o&&("set default"===r.substr(Bo,11).toLowerCase()?(e=r.substr(Bo,11),Bo+=11):(e=o,0===qo&&Jo(B)),e===o&&(e=el()))))),e!==o&&(e={type:"origin",value:e.toLowerCase()}),t=e),t}())!==o?(s=n,t={type:"on "+e[0].toLowerCase(),value:s}):(Bo=t,t=o)):(Bo=t,t=o),t}function hu(){var t,e,n,s,u,a,i;return t=Bo,(e=ei())===o&&(e=ti())===o&&(e=rl()),e!==o&&(i=e,e={keyword:Array.isArray(i)?i[0].toLowerCase():i.toLowerCase()}),(t=e)===o&&(t=Bo,(e=Qa())!==o&&Il()!==o?(n=Bo,"of"===r.substr(Bo,2).toLowerCase()?(s=r.substr(Bo,2),Bo+=2):(s=o,0===qo&&Jo(J)),s!==o&&(u=Il())!==o&&(a=Hu())!==o?n=s=[s,u,a]:(Bo=n,n=o),n===o&&(n=null),n!==o?t=e=function(r,t){return{keyword:r&&r[0]&&r[0].toLowerCase(),args:t&&{keyword:t[0],columns:t[2]}||null}}(e,n):(Bo=t,t=o)):(Bo=t,t=o)),t}function yu(){var t,e,n,s,u,a,i,l,c;return t=Bo,(e=Ka())===o&&(e=null),e!==o&&Il()!==o?((n=function(){var t,e,n;return t=Bo,"character"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(ir)),e!==o&&Il()!==o?("set"===r.substr(Bo,3).toLowerCase()?(n=r.substr(Bo,3),Bo+=3):(n=o,0===qo&&Jo(lr)),n!==o?t=e="CHARACTER SET":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&("charset"===r.substr(Bo,7).toLowerCase()?(n=r.substr(Bo,7),Bo+=7):(n=o,0===qo&&Jo(cr)),n===o&&("collate"===r.substr(Bo,7).toLowerCase()?(n=r.substr(Bo,7),Bo+=7):(n=o,0===qo&&Jo(fr)))),n!==o&&Il()!==o?((s=ol())===o&&(s=null),s!==o&&Il()!==o&&(u=Ia())!==o?(i=n,l=s,c=u,t=e={keyword:(a=e)&&`${a[0].toLowerCase()} ${i.toLowerCase()}`||i.toLowerCase(),symbol:l,value:c}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}function Eu(){var t,e,n,s,u,a,i,l,c;return t=Bo,"auto_increment"===r.substr(Bo,14).toLowerCase()?(e=r.substr(Bo,14),Bo+=14):(e=o,0===qo&&Jo(C)),e===o&&("avg_row_length"===r.substr(Bo,14).toLowerCase()?(e=r.substr(Bo,14),Bo+=14):(e=o,0===qo&&Jo(br)),e===o&&("key_block_size"===r.substr(Bo,14).toLowerCase()?(e=r.substr(Bo,14),Bo+=14):(e=o,0===qo&&Jo(vr)),e===o&&("max_rows"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(pr)),e===o&&("min_rows"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(Lr)),e===o&&("stats_sample_pages"===r.substr(Bo,18).toLowerCase()?(e=r.substr(Bo,18),Bo+=18):(e=o,0===qo&&Jo(Cr))))))),e!==o&&Il()!==o?((n=ol())===o&&(n=null),n!==o&&Il()!==o&&(s=Ha())!==o?(l=n,c=s,t=e={keyword:e.toLowerCase(),symbol:l,value:c.value}):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=yu())===o&&(t=Bo,(e=fl())===o&&("connection"===r.substr(Bo,10).toLowerCase()?(e=r.substr(Bo,10),Bo+=10):(e=o,0===qo&&Jo(dr))),e!==o&&Il()!==o?((n=ol())===o&&(n=null),n!==o&&Il()!==o&&(s=Pa())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:`'${e.value}'`}}(e,n,s):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,"compression"===r.substr(Bo,11).toLowerCase()?(e=r.substr(Bo,11),Bo+=11):(e=o,0===qo&&Jo(wr)),e!==o&&Il()!==o?((n=ol())===o&&(n=null),n!==o&&Il()!==o?(s=Bo,39===r.charCodeAt(Bo)?(u="'",Bo++):(u=o,0===qo&&Jo(hr)),u!==o?("zlib"===r.substr(Bo,4).toLowerCase()?(a=r.substr(Bo,4),Bo+=4):(a=o,0===qo&&Jo(yr)),a===o&&("lz4"===r.substr(Bo,3).toLowerCase()?(a=r.substr(Bo,3),Bo+=3):(a=o,0===qo&&Jo(Er)),a===o&&("none"===r.substr(Bo,4).toLowerCase()?(a=r.substr(Bo,4),Bo+=4):(a=o,0===qo&&Jo(x)))),a!==o?(39===r.charCodeAt(Bo)?(i="'",Bo++):(i=o,0===qo&&Jo(hr)),i!==o?s=u=[u,a,i]:(Bo=s,s=o)):(Bo=s,s=o)):(Bo=s,s=o),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.join("").toUpperCase()}}(e,n,s):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,"engine"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(Ar)),e!==o&&Il()!==o?((n=ol())===o&&(n=null),n!==o&&Il()!==o&&(s=Ia())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.toUpperCase()}}(e,n,s):(Bo=t,t=o)):(Bo=t,t=o)))),t}function Au(){var t,e,n,s,u,a,i;return(t=Iu())===o&&(t=Bo,e=Bo,40===r.charCodeAt(Bo)?(n="(",Bo++):(n=o,0===qo&&Jo(Ur)),n!==o&&(s=Il())!==o&&(u=Au())!==o&&(a=Il())!==o?(41===r.charCodeAt(Bo)?(i=")",Bo++):(i=o,0===qo&&Jo(Mr)),i!==o?e=n=[n,s,u,a,i]:(Bo=e,e=o)):(Bo=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}function mu(){var r,t,e,n,s;return r=Bo,(t=Pa())===o&&(t=Ia()),t!==o&&Il()!==o?((e=Tu())===o&&(e=null),e!==o&&Il()!==o&&ci()!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(n=su())!==o&&Il()!==o&&dl()!==o?("string"==typeof(s=t)&&(s={type:"default",value:s}),r=t={name:s,stmt:n,columns:e}):(Bo=r,r=o)):(Bo=r,r=o),r}function Tu(){var r,t;return r=Bo,Cl()!==o&&Il()!==o&&(t=Hu())!==o&&Il()!==o&&dl()!==o?r=t:(Bo=r,r=o),r}function Iu(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A;return t=Bo,Il()!==o?((e=function(){var t,e,n,s,u,a,i,l,c;if(t=Bo,wi()!==o)if(Il()!==o)if((e=mu())!==o){for(n=[],s=Bo,(u=Il())!==o&&(a=pl())!==o&&(i=Il())!==o&&(l=mu())!==o?s=u=[u,a,i,l]:(Bo=s,s=o);s!==o;)n.push(s),s=Bo,(u=Il())!==o&&(a=pl())!==o&&(i=Il())!==o&&(l=mu())!==o?s=u=[u,a,i,l]:(Bo=s,s=o);n!==o?t=Kl(e,n):(Bo=t,t=o)}else Bo=t,t=o;else Bo=t,t=o;else Bo=t,t=o;return t===o&&(t=Bo,Il()!==o&&wi()!==o&&(e=Il())!==o&&(n=function(){var t,e,n,s;return t=Bo,"RECURSIVE"===r.substr(Bo,9)?(e="RECURSIVE",Bo+=9):(e=o,0===qo&&Jo(ze)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(s=Il())!==o&&(u=mu())!==o?((c=u).recursive=!0,t=[c]):(Bo=t,t=o)),t}())===o&&(e=null),e!==o&&Il()!==o&&function(){var t,e,n,s;return t=Bo,"select"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(We)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Nl()!==o?((n=function(){var r,t,e,n,s,u;if(r=Bo,(t=Nu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=Nu())!==o?n=s=[s,u]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=Nu())!==o?n=s=[s,u]:(Bo=n,n=o);e!==o?(t=function(r,t){const e=[r];for(let r=0,n=t.length;r<n;++r)e.push(t[r][1]);return e}(t,e),r=t):(Bo=r,r=o)}else Bo=r,r=o;return r}())===o&&(n=null),n!==o&&Il()!==o?((s=mi())===o&&(s=null),s!==o&&Il()!==o&&(u=Ru())!==o&&Il()!==o?((a=gu())===o&&(a=null),a!==o&&Il()!==o?((i=ju())===o&&(i=null),i!==o&&Il()!==o?((l=function(){var t,e;return t=Bo,function(){var t,e,n,s;return t=Bo,"group"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(Nn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o&&hi()!==o&&Il()!==o&&(e=Ju())!==o?t=e.value:(Bo=t,t=o),t}())===o&&(l=null),l!==o&&Il()!==o?((c=function(){var t,e;return t=Bo,function(){var t,e,n,s;return t=Bo,"having"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(_n)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o&&(e=oa())!==o?t=e:(Bo=t,t=o),t}())===o&&(c=null),c!==o&&Il()!==o?((f=Yu())===o&&(f=null),f!==o&&Il()!==o?((b=Xu())===o&&(b=null),b!==o?(v=e,p=n,L=s,C=u,w=i,h=l,y=c,E=f,A=b,(d=a)&&d.forEach((r=>r.table&&tc.add(`select::${r.db}::${r.table}`))),t={with:v,type:"select",options:p,distinct:L,columns:C,from:d,where:w,groupby:h,having:y,orderby:E,limit:A}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}function Nu(){var t;return(t=function(){var t;return"sql_calc_found_rows"===r.substr(Bo,19).toLowerCase()?(t=r.substr(Bo,19),Bo+=19):(t=o,0===qo&&Jo(po)),t}())===o&&((t=function(){var t;return"sql_cache"===r.substr(Bo,9).toLowerCase()?(t=r.substr(Bo,9),Bo+=9):(t=o,0===qo&&Jo(Lo)),t}())===o&&(t=function(){var t;return"sql_no_cache"===r.substr(Bo,12).toLowerCase()?(t=r.substr(Bo,12),Bo+=12):(t=o,0===qo&&Jo(Co)),t}()),t===o&&(t=function(){var t;return"sql_big_result"===r.substr(Bo,14).toLowerCase()?(t=r.substr(Bo,14),Bo+=14):(t=o,0===qo&&Jo(ho)),t}())===o&&(t=function(){var t;return"sql_small_result"===r.substr(Bo,16).toLowerCase()?(t=r.substr(Bo,16),Bo+=16):(t=o,0===qo&&Jo(wo)),t}())===o&&(t=function(){var t;return"sql_buffer_result"===r.substr(Bo,17).toLowerCase()?(t=r.substr(Bo,17),Bo+=17):(t=o,0===qo&&Jo(yo)),t}())),t}function Ru(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=Ai())===o&&(t=Bo,(e=Ll())!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Ll())),t!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Su())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Su())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=function(r,t){ec.add("select::null::(.*)");const e={expr:{type:"column_ref",table:null,column:"*"},as:null};return t&&t.length>0?Kl(e,t):[e]}(0,e):(Bo=r,r=o)}else Bo=r,r=o;if(r===o)if(r=Bo,(t=Su())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Su())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Su())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function Su(){var r,t,e,n,s;return r=Bo,(t=sa())!==o&&(e=sl())!==o&&(n=Yl())!==o?r=t={type:"cast",expr:t,symbol:"::",target:n}:(Bo=r,r=o),r===o&&(r=Bo,t=Bo,(e=ya())!==o&&(n=Il())!==o&&(s=vl())!==o?t=e=[e,n,s]:(Bo=t,t=o),t===o&&(t=null),t!==o&&(e=Il())!==o&&(n=Ll())!==o?r=t=function(r){const t=r&&r[0]||null;return ec.add(`select::${t}::(.*)`),{expr:{type:"column_ref",table:t,column:"*"},as:null}}(t):(Bo=r,r=o),r===o&&(r=Bo,(t=sa())!==o&&(e=Il())!==o?((n=_u())===o&&(n=null),n!==o?r=t=function(r,t){return{type:"expr",expr:r,as:t}}(t,n):(Bo=r,r=o)):(Bo=r,r=o))),r}function _u(){var r,t,e;return r=Bo,(t=ci())!==o&&Il()!==o&&(e=function(){var r,t;return r=Bo,(t=Ia())!==o&&(function(r){if(!0===Wl[r.toUpperCase()])throw new Error("Error: "+JSON.stringify(r)+" is a reserved word, can not as alias clause");return!1}(t)?o:void 0)!==o?r=t:(Bo=r,r=o),r===o&&(r=Bo,r=t=Ea()),r}())!==o?r=t=e:(Bo=r,r=o),r===o&&(r=Bo,(t=ci())===o&&(t=null),t!==o&&Il()!==o&&(e=ya())!==o?r=t=e:(Bo=r,r=o)),r}function gu(){var r,t;return r=Bo,ii()!==o&&Il()!==o&&(t=ku())!==o?r=t:(Bo=r,r=o),r}function Ou(){var r,t,e;return r=Bo,(t=Fu())!==o&&Il()!==o&&Za()!==o&&Il()!==o&&(e=Fu())!==o?r=t=[t,e]:(Bo=r,r=o),r}function xu(){var t,e;return t=Bo,di()!==o&&Il()!==o?("btree"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(kr)),e===o&&("hash"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Dr)),e===o&&("gist"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo($r)),e===o&&("gin"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(Pr))))),e!==o?t={keyword:"using",type:e.toLowerCase()}:(Bo=t,t=o)):(Bo=t,t=o),t}function Uu(){var r,t,e,n,s,u;if(r=Bo,(t=Mu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=Mu())!==o?n=s=[s,u]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=Mu())!==o?n=s=[s,u]:(Bo=n,n=o);e!==o?r=t=function(r,t){const e=[r];for(let r=0;r<t.length;r++)e.push(t[r][1]);return e}(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function Mu(){var t,e,n,s,u,a;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"key_block_size"===r.substr(Bo,14).toLowerCase()?(e=r.substr(Bo,14),Bo+=14):(e=o,0===qo&&Jo(vr)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="KEY_BLOCK_SIZE":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&Il()!==o?((n=ol())===o&&(n=null),n!==o&&Il()!==o&&(s=Ha())!==o?(u=n,a=s,t=e={type:e.toLowerCase(),symbol:u,expr:a}):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,(e=Ia())!==o&&Il()!==o&&(n=ol())!==o&&Il()!==o?((s=Ha())===o&&(s=ya()),s!==o?t=e=function(r,t,e){return{type:r.toLowerCase(),symbol:t,expr:"string"==typeof e&&{type:"origin",value:e}||e}}(e,n,s):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=xu())===o&&(t=Bo,"with"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Fr)),e!==o&&Il()!==o?("parser"===r.substr(Bo,6).toLowerCase()?(n=r.substr(Bo,6),Bo+=6):(n=o,0===qo&&Jo(Gr)),n!==o&&Il()!==o&&(s=Ia())!==o?t=e={type:"with parser",expr:s}:(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,"visible"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(jr)),e===o&&("invisible"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(Hr))),e!==o&&(e=function(r){return{type:r.toLowerCase(),expr:r.toLowerCase()}}(e)),(t=e)===o&&(t=Sl())))),t}function ku(){var r,t,e,n;if(r=Bo,(t=$u())!==o){for(e=[],n=Du();n!==o;)e.push(n),n=Du();e!==o?r=t=Yr(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function Du(){var r,t,e;return r=Bo,Il()!==o&&(t=pl())!==o&&Il()!==o&&(e=$u())!==o?r=e:(Bo=r,r=o),r===o&&(r=Bo,Il()!==o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(r=Bo,(t=Pu())!==o)if(Il()!==o)if((e=$u())!==o)if(Il()!==o)if((n=di())!==o)if(Il()!==o)if(Cl()!==o)if(Il()!==o)if((s=Ia())!==o){for(u=[],a=Bo,(i=Il())!==o&&(l=pl())!==o&&(c=Il())!==o&&(f=Ia())!==o?a=i=[i,l,c,f]:(Bo=a,a=o);a!==o;)u.push(a),a=Bo,(i=Il())!==o&&(l=pl())!==o&&(c=Il())!==o&&(f=Ia())!==o?a=i=[i,l,c,f]:(Bo=a,a=o);u!==o&&(a=Il())!==o&&(i=dl())!==o?(b=t,p=s,L=u,(v=e).join=b,v.using=Kl(p,L),r=t=v):(Bo=r,r=o)}else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;return r===o&&(r=Bo,(t=Pu())!==o&&Il()!==o&&(e=$u())!==o&&Il()!==o?((n=Gu())===o&&(n=null),n!==o?(t=function(r,t,e){return t.join=r,t.on=e,t}(t,e,n),r=t):(Bo=r,r=o)):(Bo=r,r=o),r===o&&(r=Bo,(t=Pu())!==o&&Il()!==o&&(e=Cl())!==o&&Il()!==o&&(n=su())!==o&&Il()!==o&&dl()!==o&&Il()!==o?((s=_u())===o&&(s=null),s!==o&&(u=Il())!==o?((a=Gu())===o&&(a=null),a!==o?(t=function(r,t,e,n){return t.parentheses=!0,{expr:t,as:e,join:r,on:n}}(t,n,s,a),r=t):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o))),r}())!==o?r=t:(Bo=r,r=o)),r}function $u(){var t,e,n,s,u,a,i,l,c,f,b;return t=Bo,(e=function(){var t;return"dual"===r.substr(Bo,4).toLowerCase()?(t=r.substr(Bo,4),Bo+=4):(t=o,0===qo&&Jo(so)),t}())!==o&&(e={type:"dual"}),(t=e)===o&&(t=Bo,(e=Fu())!==o&&Il()!==o?((n=_u())===o&&(n=null),n!==o?(b=n,t=e="var"===(f=e).type?(f.as=b,f):{db:f.db,table:f.table,as:b}):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,(e=Cl())!==o&&Il()!==o&&(n=su())!==o&&Il()!==o&&dl()!==o&&Il()!==o?((s=_u())===o&&(s=null),s!==o?t=e=function(r,t){return r.parentheses=!0,{expr:r,as:t}}(n,s):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,(e=fi())!==o&&Il()!==o&&(n=Cl())!==o&&Il()!==o&&function(){var t,e,n,s;return t=Bo,"tumble"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(Jn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="TUMBLE":(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o&&(s=Cl())!==o&&Il()!==o&&fi()!==o&&Il()!==o&&(u=Fu())!==o&&Il()!==o&&pl()!==o&&Il()!==o?("descriptor"===r.substr(Bo,10).toLowerCase()?(a=r.substr(Bo,10),Bo+=10):(a=o,0===qo&&Jo(Br)),a!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(i=ha())!==o&&Il()!==o&&dl()!==o&&Il()!==o&&pl()!==o&&Il()!==o&&(l=ra())!==o&&Il()!==o&&dl()!==o&&Il()!==o&&dl()!==o&&Il()!==o?((c=_u())===o&&(c=null),c!==o?t=e=function(r,t,e,n){return{expr:{type:"tumble",data:r,timecol:t,size:e},as:n}}(u,i,l,c):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)))),t}function Pu(){var t,e,n,s,u,a;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"natural"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(fn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="NATURAL":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(e=null),e!==o&&(n=Il())!==o?((s=function(){var t,e,n,s;return t=Bo,"left"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(bn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="LEFT":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(s=function(){var t,e,n,s;return t=Bo,"right"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(vn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="RIGHT":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(s=function(){var t,e,n,s;return t=Bo,"full"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(pn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="FULL":(Bo=t,t=o)):(Bo=t,t=o),t}()),s===o&&(s=null),s!==o&&Il()!==o?((u=Li())===o&&(u=null),u!==o&&Il()!==o&&vi()!==o?t=e=`${e?"NATURAL ":""}${(a=s)?a+" ":""}${u?"OUTER ":""}JOIN`:(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,e=Bo,(n=function(){var t,e,n,s;return t=Bo,"inner"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(Ln)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="INNER":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(s=Il())!==o?e=n=[n,s]:(Bo=e,e=o),e===o&&(e=null),e!==o&&(n=vi())!==o?t=e=e?"INNER JOIN":"JOIN":(Bo=t,t=o),t===o&&(t=Bo,(e=pi())!==o&&(n=Il())!==o&&(s=vi())!==o?t=e="CROSS JOIN":(Bo=t,t=o),t===o&&(t=Bo,(e=pi())===o&&(e=Li()),e!==o&&(n=Il())!==o&&(s=function(){var t,e,n,s;return t=Bo,"apply"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(wn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}())!==o?t=e=e[0].toUpperCase()+" APPLY":(Bo=t,t=o)))),t}function Fu(){var r,t,e,n,s,u,a,i,l,c;return r=Bo,(t=ya())!==o?(e=Bo,(n=Il())!==o&&(s=vl())!==o&&(u=Il())!==o&&(a=ya())!==o?e=n=[n,s,u,a]:(Bo=e,e=o),e!==o?(n=Bo,(s=Il())!==o&&(u=vl())!==o&&(a=Il())!==o&&(i=ya())!==o?n=s=[s,u,a,i]:(Bo=n,n=o),n!==o?r=t=function(r,t,e){const n={db:null,table:r};return null!==e&&(n.db=`${r}.${t[3]}`,n.table=e[3]),n}(t,e,n):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o),r===o&&(r=Bo,(t=ya())!==o&&(e=Il())!==o&&(n=vl())!==o&&(s=Il())!==o&&(u=Ll())!==o?(c=t,tc.add(`select::${c}::(.*)`),r=t={db:c,table:"*"}):(Bo=r,r=o),r===o&&(r=Bo,(t=ya())!==o?(e=Bo,(n=Il())!==o&&(s=vl())!==o&&(u=Il())!==o&&(a=ya())!==o?e=n=[n,s,u,a]:(Bo=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){const e={db:null,table:r};return null!==t&&(e.db=r,e.table=t[3]),e}(t,e):(Bo=r,r=o)):(Bo=r,r=o),r===o&&(r=Bo,(t=jl())!==o&&((l=t).db=null,l.table=l.name,t=l),r=t))),r}function Gu(){var r,t;return r=Bo,bi()!==o&&Il()!==o&&(t=oa())!==o?r=t:(Bo=r,r=o),r}function ju(){var t,e;return t=Bo,function(){var t,e,n,s;return t=Bo,"where"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(In)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o?((e=oa())===o&&(e=na()),e!==o?t=e:(Bo=t,t=o)):(Bo=t,t=o),t}function Hu(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=ha())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=ha())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=ha())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function Yu(){var t,e;return t=Bo,function(){var t,e,n,s;return t=Bo,"order"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(Sn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o&&hi()!==o&&Il()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=Bu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Bu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Bu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())!==o?t=e:(Bo=t,t=o),t}function Bu(){var r,t,e;return r=Bo,(t=na())!==o&&Il()!==o?((e=Ei())===o&&(e=yi()),e===o&&(e=null),e!==o?r=t={expr:t,type:e}:(Bo=r,r=o)):(Bo=r,r=o),r}function Wu(){var r;return(r=Ha())===o&&(r=_a()),r}function Xu(){var t,e,n,s,u,a;return t=Bo,function(){var t,e,n,s;return t=Bo,"limit"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(gn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o?((e=Wu())===o&&(e=Ai()),e!==o&&Il()!==o?(n=Bo,(s=function(){var t,e,n,s;return t=Bo,"offset"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(On)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="OFFSET":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(u=Il())!==o&&(a=Wu())!==o?n=s=[s,u,a]:(Bo=n,n=o),n===o&&(n=null),n!==o?t=function(r,t){const e=[];return"string"==typeof r?e.push({type:"origin",value:"all"}):e.push(r),t&&e.push(t[2]),{seperator:t&&t[0]&&t[0].toLowerCase()||"",value:e}}(e,n):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}function Vu(){var t,e,n,s,u,a,i,l,c;return t=Bo,e=Bo,(n=ya())!==o&&(s=Il())!==o&&(u=vl())!==o?e=n=[n,s,u]:(Bo=e,e=o),e===o&&(e=null),e!==o&&(n=Il())!==o&&(s=Aa())!==o&&(u=Il())!==o?(61===r.charCodeAt(Bo)?(a="=",Bo++):(a=o,0===qo&&Jo(Wr)),a!==o&&Il()!==o&&(i=pa())!==o?t=e={column:s,value:i,table:(c=e)&&c[0]}:(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,e=Bo,(n=ya())!==o&&(s=Il())!==o&&(u=vl())!==o?e=n=[n,s,u]:(Bo=e,e=o),e===o&&(e=null),e!==o&&(n=Il())!==o&&(s=Aa())!==o&&(u=Il())!==o?(61===r.charCodeAt(Bo)?(a="=",Bo++):(a=o,0===qo&&Jo(Wr)),a!==o&&Il()!==o&&(i=Ci())!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(l=ha())!==o&&Il()!==o&&dl()!==o?t=e=function(r,t,e){return{column:t,value:e,table:r&&r[0],keyword:"values"}}(e,s,l):(Bo=t,t=o)):(Bo=t,t=o)),t}function qu(){var t,e,n,s,u;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"returning"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(Je)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="RETURNING":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&Il()!==o?((n=Ll())===o&&(n=Hu()),n!==o?(u=n,t=e={type:(s=e)&&s.toLowerCase()||"returning",columns:"*"===u&&[{type:"columne_ref",table:null,column:"*"}]||u}):(Bo=t,t=o)):(Bo=t,t=o),t}function Ku(){var r;return(r=function(){var r,t;return r=Bo,Ci()!==o&&Il()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=Qu())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Qu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=Qu())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())!==o?r=t:(Bo=r,r=o),r}())===o&&(r=Iu()),r}function Zu(){var r,t,e,n,s,u,a,i,l;if(r=Bo,ui()!==o)if(Il()!==o)if((t=Cl())!==o)if(Il()!==o)if((e=Ia())!==o){for(n=[],s=Bo,(u=Il())!==o&&(a=pl())!==o&&(i=Il())!==o&&(l=Ia())!==o?s=u=[u,a,i,l]:(Bo=s,s=o);s!==o;)n.push(s),s=Bo,(u=Il())!==o&&(a=pl())!==o&&(i=Il())!==o&&(l=Ia())!==o?s=u=[u,a,i,l]:(Bo=s,s=o);n!==o&&(s=Il())!==o&&(u=dl())!==o?r=Kl(e,n):(Bo=r,r=o)}else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;return r===o&&(r=Bo,ui()!==o&&Il()!==o&&(t=Qu())!==o?r=t:(Bo=r,r=o)),r}function zu(){var r,t;return r=Bo,(t=ei())!==o&&(t="insert"),(r=t)===o&&(r=Bo,(t=ni())!==o&&(t="replace"),r=t),r}function Qu(){var r,t;return r=Bo,Cl()!==o&&Il()!==o&&(t=Ju())!==o&&Il()!==o&&dl()!==o?r=t:(Bo=r,r=o),r}function Ju(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=na())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=na())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=na())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=function(r,t){const e={type:"expr_list"};return e.value=Kl(r,t),e}(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function ra(){var t,e,n;return t=Bo,tl()!==o&&Il()!==o&&(e=na())!==o&&Il()!==o&&(n=function(){var t,e;return(t=function(){var t,e,n,s;return t=Bo,"year"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(ae)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="YEAR":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"month"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(re)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="MONTH":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"day"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(jt)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="DAY":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"hour"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Vt)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="HOUR":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"minute"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(Jt)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="MINUTE":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"second"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(ee)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SECOND":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=Bo,"years"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(ko)),e===o&&("months"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(Do)),e===o&&("days"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo($o)),e===o&&("hours"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(Po)),e===o&&("minutes"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(Fo)),e===o&&("seconds"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(Go))))))),e!==o&&(e=e.toUpperCase()),t=e),t}())!==o?t={type:"interval",expr:e,unit:n.toLowerCase()}:(Bo=t,t=o),t===o&&(t=Bo,tl()!==o&&Il()!==o&&(e=Pa())!==o?t=function(r){return{type:"interval",expr:r,unit:""}}(e):(Bo=t,t=o)),t}function ta(){var t,e,n,s,u,a,i,l;return t=Bo,Mi()!==o&&Il()!==o?((e=na())===o&&(e=null),e!==o&&Il()!==o&&(n=function(){var r,t,e,n,s,u;if(r=Bo,(t=ea())!==o)if(Il()!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=ea())!==o?n=s=[s,u]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=ea())!==o?n=s=[s,u]:(Bo=n,n=o);e!==o?r=t=b(t,e):(Bo=r,r=o)}else Bo=r,r=o;else Bo=r,r=o;return r}())!==o&&Il()!==o?((s=function(){var t,e;return t=Bo,function(){var t,e,n,s;return t=Bo,"else"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(os)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o&&(e=na())!==o?t={type:"else",result:e}:(Bo=t,t=o),t}())===o&&(s=null),s!==o&&Il()!==o&&function(){var t,e,n,s;return t=Bo,"end"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(us)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o?((u=Mi())===o&&(u=null),u!==o?(a=e,i=n,(l=s)&&i.push(l),t={type:"case",expr:a||null,args:i}):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}function ea(){var t,e,n;return t=Bo,ki()!==o&&Il()!==o&&(e=oa())!==o&&Il()!==o&&function(){var t,e,n,s;return t=Bo,"then"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(ss)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}()!==o&&Il()!==o&&(n=na())!==o?t={type:"when",cond:e,result:n}:(Bo=t,t=o),t}function na(){var r;return(r=function(){var r;return(r=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=wa())!==o){if(e=[],n=Bo,(s=Il())!==o&&(u=Tl())!==o&&(a=Il())!==o&&(i=wa())!==o?n=s=[s,u,a,i]:(Bo=n,n=o),n!==o)for(;n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=Tl())!==o&&(a=Il())!==o&&(i=wa())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);else e=o;e!==o&&(n=Il())!==o?((s=ca())===o&&(s=null),s!==o?(t=function(r,t,e){const n=Zl(r,t);return null===e?n:"arithmetic"===e.type?Zl(n,e.tail):Vl(e.op,n,e.right)}(t,e,s),r=t):(Bo=r,r=o)):(Bo=r,r=o)}else Bo=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=ua())!==o){for(e=[],n=Bo,(s=Nl())!==o&&(u=xi())!==o&&(a=Il())!==o&&(i=ua())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Nl())!==o&&(u=xi())!==o&&(a=Il())!==o&&(i=ua())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Xr(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u;if(r=Bo,(t=La())!==o){if(e=[],n=Bo,(s=Il())!==o&&(u=wa())!==o?n=s=[s,u]:(Bo=n,n=o),n!==o)for(;n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=wa())!==o?n=s=[s,u]:(Bo=n,n=o);else e=o;e!==o?r=t=Xl(t,e[0][1]):(Bo=r,r=o)}else Bo=r,r=o;return r}()),r}())===o&&(r=su()),r}function sa(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=na())!==o){for(e=[],n=Bo,(s=Il())!==o?((u=Oi())===o&&(u=xi())===o&&(u=Tl()),u!==o&&(a=Il())!==o&&(i=na())!==o?n=s=[s,u,a,i]:(Bo=n,n=o)):(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o?((u=Oi())===o&&(u=xi())===o&&(u=Tl()),u!==o&&(a=Il())!==o&&(i=na())!==o?n=s=[s,u,a,i]:(Bo=n,n=o)):(Bo=n,n=o);e!==o?r=t=function(r,t){const e=r.ast;if(e&&"select"===e.type&&(!(r.parentheses_symbol||r.parentheses||r.ast.parentheses||r.ast.parentheses_symbol)||1!==e.columns.length||"*"===e.columns[0].expr.column))throw new Error("invalid column clause with select statement");if(!t||0===t.length)return r;const n=t.length;let s=t[n-1][3];for(let e=n-1;e>=0;e--){const n=0===e?r:t[e-1][3];s=Vl(t[e][1],n,s)}return s}(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function oa(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=na())!==o){for(e=[],n=Bo,(s=Il())!==o?((u=Oi())===o&&(u=xi())===o&&(u=pl()),u!==o&&(a=Il())!==o&&(i=na())!==o?n=s=[s,u,a,i]:(Bo=n,n=o)):(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o?((u=Oi())===o&&(u=xi())===o&&(u=pl()),u!==o&&(a=Il())!==o&&(i=na())!==o?n=s=[s,u,a,i]:(Bo=n,n=o)):(Bo=n,n=o);e!==o?r=t=function(r,t){const e=t.length;let n=r,s="";for(let r=0;r<e;++r)","===t[r][1]?(s=",",Array.isArray(n)||(n=[n]),n.push(t[r][3])):n=Vl(t[r][1],n,t[r][3]);if(","===s){const r={type:"expr_list"};return r.value=n,r}return n}(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function ua(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=aa())!==o){for(e=[],n=Bo,(s=Nl())!==o&&(u=Oi())!==o&&(a=Il())!==o&&(i=aa())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Nl())!==o&&(u=Oi())!==o&&(a=Il())!==o&&(i=aa())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Xr(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function aa(){var t,e,n,s,u;return(t=ia())===o&&(t=function(){var r,t,e,n,s;return r=Bo,(t=la())!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(e=su())!==o&&Il()!==o&&dl()!==o?(n=t,(s=e).parentheses=!0,r=t=Xl(n,s)):(Bo=r,r=o),r}())===o&&(t=Bo,(e=gi())===o&&(e=Bo,33===r.charCodeAt(Bo)?(n="!",Bo++):(n=o,0===qo&&Jo(Vr)),n!==o?(s=Bo,qo++,61===r.charCodeAt(Bo)?(u="=",Bo++):(u=o,0===qo&&Jo(Wr)),qo--,u===o?s=void 0:(Bo=s,s=o),s!==o?e=n=[n,s]:(Bo=e,e=o)):(Bo=e,e=o)),e!==o&&(n=Il())!==o&&(s=aa())!==o?t=e=Xl("NOT",s):(Bo=t,t=o)),t}function ia(){var r,t,e,n,s;return r=Bo,(t=pa())!==o&&Il()!==o?((e=ca())===o&&(e=null),e!==o?(n=t,r=t=null===(s=e)?n:"arithmetic"===s.type?Zl(n,s.tail):Vl(s.op,n,s.right)):(Bo=r,r=o)):(Bo=r,r=o),r===o&&(r=Pa())===o&&(r=ha()),r}function la(){var r,t,e,n,s,u;return r=Bo,t=Bo,(e=gi())!==o&&(n=Il())!==o&&(s=_i())!==o?t=e=[e,n,s]:(Bo=t,t=o),t!==o&&(t=(u=t)[0]+" "+u[2]),(r=t)===o&&(r=_i()),r}function ca(){var t;return(t=function(){var r,t,e,n,s,u;if(r=[],t=Bo,(e=Il())!==o&&(n=fa())!==o&&(s=Il())!==o&&(u=pa())!==o?t=e=[e,n,s,u]:(Bo=t,t=o),t!==o)for(;t!==o;)r.push(t),t=Bo,(e=Il())!==o&&(n=fa())!==o&&(s=Il())!==o&&(u=pa())!==o?t=e=[e,n,s,u]:(Bo=t,t=o);else r=o;return r!==o&&(r={type:"arithmetic",tail:r}),r}())===o&&(t=function(){var r,t,e,n;return r=Bo,(t=va())!==o&&Il()!==o&&(e=Cl())!==o&&Il()!==o&&(n=Ju())!==o&&Il()!==o&&dl()!==o?r=t={op:t,right:n}:(Bo=r,r=o),r===o&&(r=Bo,(t=va())!==o&&Il()!==o?((e=jl())===o&&(e=Pa()),e!==o?(t=function(r,t){return{op:r,right:t}}(t,e),r=t):(Bo=r,r=o)):(Bo=r,r=o)),r}())===o&&(t=function(){var r,t,e;return r=Bo,(t=la())!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(e=Ju())!==o&&Il()!==o&&dl()!==o?r=t={op:t,right:e}:(Bo=r,r=o),r}())===o&&(t=function(){var r,t,e,n;return r=Bo,(t=function(){var r,t,e,n,s,u;return r=Bo,t=Bo,(e=gi())!==o&&(n=Il())!==o&&(s=Ti())!==o?t=e=[e,n,s]:(Bo=t,t=o),t!==o&&(t=(u=t)[0]+" "+u[2]),(r=t)===o&&(r=Ti()),r}())!==o&&Il()!==o&&(e=pa())!==o&&Il()!==o&&Oi()!==o&&Il()!==o&&(n=pa())!==o?r=t={op:t,right:{type:"expr_list",value:[e,n]}}:(Bo=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=Bo,(t=function(){var r;return r=Bo,Ni()!==o&&Il()!==o&&gi()!==o&&Il()!==o&&mi()!==o&&Il()!==o&&ii()!==o?r="IS NOT DISTINCT FROM":(Bo=r,r=o),r===o&&(r=Bo,Ni()!==o&&Il()!==o&&mi()!==o&&Il()!==o&&ii()!==o?r="IS DISTINCT FROM":(Bo=r,r=o)),r}())!==o&&Il()!==o&&(e=na())!==o?r=t={op:t,right:e}:(Bo=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l;return r=Bo,(t=Ni())!==o&&(e=Il())!==o&&(n=pa())!==o?r=t={op:"IS",right:n}:(Bo=r,r=o),r===o&&(r=Bo,(t=Ni())!==o&&(e=Il())!==o?(n=Bo,(s=mi())!==o&&(u=Il())!==o&&(a=ii())!==o&&(i=Il())!==o&&(l=Fu())!==o?n=s=[s,u,a,i,l]:(Bo=n,n=o),n!==o?(t=function(r){const{db:t,table:e}=r.pop(),n="*"===e?"*":`"${e}"`;return{op:"IS",right:{type:"origin",value:"DISTINCT FROM "+(t?`"${t}".${n}`:n)}}}(n),r=t):(Bo=r,r=o)):(Bo=r,r=o),r===o&&(r=Bo,t=Bo,(e=Ni())!==o&&(n=Il())!==o&&(s=gi())!==o?t=e=[e,n,s]:(Bo=t,t=o),t!==o&&(e=Il())!==o&&(n=pa())!==o?(t=function(r){return{op:"IS NOT",right:r}}(n),r=t):(Bo=r,r=o))),r}())===o&&(t=function(){var r,t,e,n,s,u,a;return r=Bo,(t=function(){var r,t,e,n,s,u;return r=Bo,t=Bo,(e=gi())!==o&&(n=Il())!==o&&(s=Ri())!==o?t=e=[e,n,s]:(Bo=t,t=o),t!==o&&(t=(u=t)[0]+" "+u[2]),(r=t)===o&&(r=Ri()),r}())!==o&&Il()!==o?((e=Da())===o&&(e=ia()),e!==o&&Il()!==o?((n=ba())===o&&(n=null),n!==o?(s=t,u=e,(a=n)&&(u.escape=a),r=t={op:s,right:u}):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u,a;return r=Bo,(t=function(){var r,t,e,n,s,u,a;return r=Bo,t=Bo,(e=gi())!==o&&(n=Il())!==o&&(s=Si())!==o&&(u=Il())!==o&&(a=Za())!==o?t=e=[e,n,s,u,a]:(Bo=t,t=o),t!==o&&(t="NOT SIMILAR TO"),(r=t)===o&&(r=Bo,(t=Si())!==o&&(e=Il())!==o&&(n=Za())!==o?r=t="SIMILAR TO":(Bo=r,r=o)),r}())!==o&&Il()!==o?((e=Da())===o&&(e=ia()),e!==o&&Il()!==o?((n=ba())===o&&(n=null),n!==o?(s=t,u=e,(a=n)&&(u.escape=a),r=t={op:s,right:u}):(Bo=r,r=o)):(Bo=r,r=o)):(Bo=r,r=o),r}())===o&&(t=function(){var t,e,n,s;return t=Bo,"@>"===r.substr(Bo,2)?(e="@>",Bo+=2):(e=o,0===qo&&Jo(tt)),e===o&&("<@"===r.substr(Bo,2)?(e="<@",Bo+=2):(e=o,0===qo&&Jo(et)),e===o&&(e=ml())===o&&(e=function(){var t;return"#>>"===r.substr(Bo,3)?(t="#>>",Bo+=3):(t=o,0===qo&&Jo(So)),t}())===o&&(e=function(){var t;return"#>"===r.substr(Bo,2)?(t="#>",Bo+=2):(t=o,0===qo&&Jo(Ro)),t}())===o&&(63===r.charCodeAt(Bo)?(e="?",Bo++):(e=o,0===qo&&Jo(nt)),e===o&&("?|"===r.substr(Bo,2)?(e="?|",Bo+=2):(e=o,0===qo&&Jo(st)),e===o&&("?&"===r.substr(Bo,2)?(e="?&",Bo+=2):(e=o,0===qo&&Jo(ot)),e===o&&("#-"===r.substr(Bo,2)?(e="#-",Bo+=2):(e=o,0===qo&&Jo(ut))))))),e!==o&&Il()!==o&&(n=Su())!==o?t=e={op:e,right:(s=n)&&s.expr||s}:(Bo=t,t=o),t}()),t}function fa(){var t;return">="===r.substr(Bo,2)?(t=">=",Bo+=2):(t=o,0===qo&&Jo(qr)),t===o&&(62===r.charCodeAt(Bo)?(t=">",Bo++):(t=o,0===qo&&Jo(Kr)),t===o&&("<="===r.substr(Bo,2)?(t="<=",Bo+=2):(t=o,0===qo&&Jo(Zr)),t===o&&("<>"===r.substr(Bo,2)?(t="<>",Bo+=2):(t=o,0===qo&&Jo(zr)),t===o&&(60===r.charCodeAt(Bo)?(t="<",Bo++):(t=o,0===qo&&Jo(Qr)),t===o&&(61===r.charCodeAt(Bo)?(t="=",Bo++):(t=o,0===qo&&Jo(Wr)),t===o&&("!="===r.substr(Bo,2)?(t="!=",Bo+=2):(t=o,0===qo&&Jo(Jr)))))))),t}function ba(){var t,e,n;return t=Bo,"escape"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(rt)),e!==o&&Il()!==o&&(n=Pa())!==o?t=e={type:"ESCAPE",value:n}:(Bo=t,t=o),t}function va(){var r,t,e,n,s,u;return r=Bo,t=Bo,(e=gi())!==o&&(n=Il())!==o&&(s=Ii())!==o?t=e=[e,n,s]:(Bo=t,t=o),t!==o&&(t=(u=t)[0]+" "+u[2]),(r=t)===o&&(r=Ii()),r}function pa(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=Ca())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=La())!==o&&(a=Il())!==o&&(i=Ca())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=La())!==o&&(a=Il())!==o&&(i=Ca())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Xr(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function La(){var t;return 43===r.charCodeAt(Bo)?(t="+",Bo++):(t=o,0===qo&&Jo(at)),t===o&&(45===r.charCodeAt(Bo)?(t="-",Bo++):(t=o,0===qo&&Jo(it))),t}function Ca(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=wa())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=da())!==o&&(a=Il())!==o&&(i=wa())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=da())!==o&&(a=Il())!==o&&(i=wa())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Zl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function da(){var t;return 42===r.charCodeAt(Bo)?(t="*",Bo++):(t=o,0===qo&&Jo(lt)),t===o&&(47===r.charCodeAt(Bo)?(t="/",Bo++):(t=o,0===qo&&Jo(ct)),t===o&&(37===r.charCodeAt(Bo)?(t="%",Bo++):(t=o,0===qo&&Jo(ft)))),t}function wa(){var t,e,n,s;return(t=function(){var t,e,n,s,u,a,i,l;return t=Bo,(e=Da())===o&&(e=ga())===o&&(e=Ua())===o&&(e=ta())===o&&(e=ra())===o&&(e=ha())===o&&(e=_a()),e!==o&&sl()!==o&&(n=Yl())!==o?t=e={type:"cast",keyword:"cast",expr:e,symbol:"::",target:n}:(Bo=t,t=o),t===o&&(t=Bo,(e=Di())===o&&(e=$i()),e!==o&&Il()!==o&&(n=Cl())!==o&&Il()!==o&&(s=na())!==o&&Il()!==o&&ci()!==o&&Il()!==o&&(u=Yl())!==o&&Il()!==o&&(a=dl())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:e}}(e,s,u),t=e):(Bo=t,t=o),t===o&&(t=Bo,(e=Di())===o&&(e=$i()),e!==o&&Il()!==o&&(n=Cl())!==o&&Il()!==o&&(s=na())!==o&&Il()!==o&&ci()!==o&&Il()!==o&&(u=ji())!==o&&Il()!==o&&(a=Cl())!==o&&Il()!==o&&(i=Ya())!==o&&Il()!==o&&dl()!==o&&Il()!==o&&(l=dl())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+")"}}}(e,s,i),t=e):(Bo=t,t=o),t===o&&(t=Bo,(e=Di())===o&&(e=$i()),e!==o&&Il()!==o&&(n=Cl())!==o&&Il()!==o&&(s=na())!==o&&Il()!==o&&ci()!==o&&Il()!==o&&(u=ji())!==o&&Il()!==o&&(a=Cl())!==o&&Il()!==o&&(i=Ya())!==o&&Il()!==o&&pl()!==o&&Il()!==o&&(l=Ya())!==o&&Il()!==o&&dl()!==o&&Il()!==o&&dl()!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+", "+n+")"}}}(e,s,i,l),t=e):(Bo=t,t=o),t===o&&(t=Bo,(e=Di())===o&&(e=$i()),e!==o&&Il()!==o&&(n=Cl())!==o&&Il()!==o&&(s=na())!==o&&Il()!==o&&ci()!==o&&Il()!==o&&(u=function(){var t;return(t=function(){var t,e,n,s;return t=Bo,"signed"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(Cs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SIGNED":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=Hi()),t}())!==o&&Il()!==o?((a=Bi())===o&&(a=null),a!==o&&Il()!==o&&(i=dl())!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:e+(n?" "+n:"")}}}(e,s,u,a),t=e):(Bo=t,t=o)):(Bo=t,t=o))))),t}())===o&&(t=Da())===o&&(t=ga())===o&&(t=Ua())===o&&(t=ta())===o&&(t=ra())===o&&(t=ha())===o&&(t=_a())===o&&(t=Bo,Cl()!==o&&(e=Il())!==o&&(n=oa())!==o&&Il()!==o&&dl()!==o?((s=n).parentheses=!0,t=s):(Bo=t,t=o),t===o&&(t=jl())===o&&(t=Bo,Il()!==o?(36===r.charCodeAt(Bo)?(e="$",Bo++):(e=o,0===qo&&Jo(bt)),e!==o&&(n=Ha())!==o?t={type:"origin",value:"$"+n.value}:(Bo=t,t=o)):(Bo=t,t=o))),t}function ha(){var r,t,e,n,s,u,a,i,l,c,f,b;if(r=Bo,t=Bo,(e=ya())!==o&&(n=Il())!==o&&(s=vl())!==o?t=e=[e,n,s]:(Bo=t,t=o),t===o&&(t=null),t!==o&&(e=Il())!==o&&(n=Ll())!==o?r=t=function(r){const t=r&&r[0]||null;return ec.add(`select::${t}::(.*)`),{type:"column_ref",table:t,column:"*"}}(t):(Bo=r,r=o),r===o){if(r=Bo,t=Bo,(e=ya())!==o&&(n=Il())!==o&&(s=vl())!==o?t=e=[e,n,s]:(Bo=t,t=o),t===o&&(t=null),t!==o)if((e=Il())!==o)if((n=ma())!==o)if((s=Il())!==o){if(u=[],a=Bo,(i=Al())===o&&(i=El()),i!==o&&(l=Il())!==o?((c=Pa())===o&&(c=Ha()),c!==o?a=i=[i,l,c]:(Bo=a,a=o)):(Bo=a,a=o),a!==o)for(;a!==o;)u.push(a),a=Bo,(i=Al())===o&&(i=El()),i!==o&&(l=Il())!==o?((c=Pa())===o&&(c=Ha()),c!==o?a=i=[i,l,c]:(Bo=a,a=o)):(Bo=a,a=o);else u=o;u!==o?r=t=function(r,t,e){const n=r&&r[0]||null;return ec.add(`select::${n}::${t}`),{type:"column_ref",table:n,column:t,arrows:e.map((r=>r[0])),properties:e.map((r=>r[2]))}}(t,n,u):(Bo=r,r=o)}else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;else Bo=r,r=o;r===o&&(r=Bo,(t=ya())!==o&&(e=Il())!==o&&(n=vl())!==o&&(s=Il())!==o&&(u=ma())!==o?(f=t,b=u,ec.add(`select::${f}::${b}`),r=t={type:"column_ref",table:f,column:b}):(Bo=r,r=o),r===o&&(r=Bo,(t=ma())!==o&&(t=function(r){return ec.add("select::null::"+r),{type:"column_ref",table:null,column:r}}(t)),r=t))}return r}function ya(){var r,t;return r=Bo,(t=Ia())!==o&&(vt(t)?o:void 0)!==o?r=t:(Bo=r,r=o),r===o&&(r=Bo,r=t=Ea()),r}function Ea(){var t;return(t=function(){var t,e,n,s;if(t=Bo,34===r.charCodeAt(Bo)?(e='"',Bo++):(e=o,0===qo&&Jo(pt)),e!==o){if(n=[],Lt.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(Ct)),s!==o)for(;s!==o;)n.push(s),Lt.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(Ct));else n=o;n!==o?(34===r.charCodeAt(Bo)?(s='"',Bo++):(s=o,0===qo&&Jo(pt)),s!==o?t=e=dt(n):(Bo=t,t=o)):(Bo=t,t=o)}else Bo=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=Bo,39===r.charCodeAt(Bo)?(e="'",Bo++):(e=o,0===qo&&Jo(hr)),e!==o){if(n=[],wt.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(ht)),s!==o)for(;s!==o;)n.push(s),wt.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(ht));else n=o;n!==o?(39===r.charCodeAt(Bo)?(s="'",Bo++):(s=o,0===qo&&Jo(hr)),s!==o?t=e=dt(n):(Bo=t,t=o)):(Bo=t,t=o)}else Bo=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=Bo,96===r.charCodeAt(Bo)?(e="`",Bo++):(e=o,0===qo&&Jo(yt)),e!==o){if(n=[],Et.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(At)),s!==o)for(;s!==o;)n.push(s),Et.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(At));else n=o;n!==o?(96===r.charCodeAt(Bo)?(s="`",Bo++):(s=o,0===qo&&Jo(yt)),s!==o?t=e=dt(n):(Bo=t,t=o)):(Bo=t,t=o)}else Bo=t,t=o;return t}()),t}function Aa(){var r;return r=Bo,(r=Ta())===o&&(r=Ea()),r}function ma(){var r,t;return r=Bo,(t=Ta())!==o&&(vt(t)?o:void 0)!==o?r=t:(Bo=r,r=o),r===o&&(r=Ea()),r}function Ta(){var r,t,e,n;if(r=Bo,(t=Na())!==o){for(e=[],n=Sa();n!==o;)e.push(n),n=Sa();e!==o?r=t+=e.join(""):(Bo=r,r=o)}else Bo=r,r=o;return r}function Ia(){var r,t,e,n;if(r=Bo,(t=Na())!==o){for(e=[],n=Ra();n!==o;)e.push(n),n=Ra();e!==o?r=t+=e.join(""):(Bo=r,r=o)}else Bo=r,r=o;return r}function Na(){var t;return mt.test(r.charAt(Bo))?(t=r.charAt(Bo),Bo++):(t=o,0===qo&&Jo(Tt)),t}function Ra(){var t;return It.test(r.charAt(Bo))?(t=r.charAt(Bo),Bo++):(t=o,0===qo&&Jo(Nt)),t}function Sa(){var t;return Rt.test(r.charAt(Bo))?(t=r.charAt(Bo),Bo++):(t=o,0===qo&&Jo(St)),t}function _a(){var t,e,n;return t=Bo,58===r.charCodeAt(Bo)?(e=":",Bo++):(e=o,0===qo&&Jo(_t)),e!==o&&(n=Ia())!==o?t=e=[e,n]:(Bo=t,t=o),t!==o&&(t={type:"param",value:t[1]}),t}function ga(){var t;return(t=function(){var t,e,n;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"count"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(Yn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="COUNT":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(n=function(){var t,e,n,s,u;return t=Bo,(e=function(){var t;return 42===r.charCodeAt(Bo)?(t="*",Bo++):(t=o,0===qo&&Jo(lt)),t!==o&&(t={type:"star",value:"*"}),t}())!==o&&(e={expr:e}),(t=e)===o&&(t=Bo,(e=mi())===o&&(e=null),e!==o&&Il()!==o&&(n=Cl())!==o&&Il()!==o&&(s=na())!==o&&Il()!==o&&dl()!==o&&Il()!==o?((u=Yu())===o&&(u=null),u!==o?t=e={distinct:e,expr:s,orderby:u,parentheses:!0}:(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,(e=mi())===o&&(e=null),e!==o&&Il()!==o&&(n=na())!==o&&Il()!==o?((s=Yu())===o&&(s=null),s!==o?(e=function(r,t,e){return{distinct:r,expr:t,orderby:e,parentheses:!1}}(e,n,s),t=e):(Bo=t,t=o)):(Bo=t,t=o))),t}())!==o&&Il()!==o&&dl()!==o?t=e={type:"aggr_func",name:e,args:n}:(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l;return t=Bo,(e=function(){var t;return(t=function(){var t,e,n,s;return t=Bo,"sum"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(Xn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SUM":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"max"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(Bn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="MAX":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"min"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(Wn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="MIN":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"avg"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(Vn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="AVG":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"collect"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(qn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="COLLECT":(Bo=t,t=o)):(Bo=t,t=o),t}()),t}())!==o&&Il()!==o&&Cl()!==o&&Il()!==o?((n=mi())===o&&(n=null),n!==o&&(s=Il())!==o&&(u=pa())!==o&&(a=Il())!==o&&(i=dl())!==o?t=e={type:"aggr_func",name:e,args:{expr:u,distinct:n}}:(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,(e=function(){var t;return(t=function(){var t,e,n,s;return t=Bo,"rank"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Kn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="RANK":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"dense_rank"===r.substr(Bo,10).toLowerCase()?(e=r.substr(Bo,10),Bo+=10):(e=o,0===qo&&Jo(Zn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="DENSE_RANK":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"row_number"===r.substr(Bo,10).toLowerCase()?(e=r.substr(Bo,10),Bo+=10):(e=o,0===qo&&Jo(Qn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="ROW_NUMBER":(Bo=t,t=o)):(Bo=t,t=o),t}()),t}())!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(n=dl())!==o?(e=function(r){return{type:"aggr_func",name:r}}(e),t=e):(Bo=t,t=o),t===o&&(t=Bo,(e=function(){var t,e,n,s;return t=Bo,"listagg"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(zn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="LISTAGG":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(n=pa())!==o?(s=Bo,(u=Il())!==o&&(a=pl())!==o&&(i=Il())!==o&&(l=Pa())!==o?s=u=[u,a,i,l]:(Bo=s,s=o),s===o&&(s=null),s!==o&&(u=Il())!==o&&(a=dl())!==o?(e=function(r,t,e){return{type:"aggr_func",name:r,args:{expr:t,separator:e}}}(e,n,s),t=e):(Bo=t,t=o)):(Bo=t,t=o))),t}()),t}function Oa(){var r,t,e;return r=Bo,bi()!==o&&Il()!==o&&Qa()!==o&&Il()!==o&&(t=el())!==o&&Il()!==o&&Cl()!==o&&Il()!==o?((e=Ju())===o&&(e=null),e!==o&&Il()!==o&&dl()!==o?r={type:"on update",keyword:t,parentheses:!0,expr:e}:(Bo=r,r=o)):(Bo=r,r=o),r===o&&(r=Bo,bi()!==o&&Il()!==o&&Qa()!==o&&Il()!==o&&(t=el())!==o?r=function(r){return{type:"on update",keyword:r}}(t):(Bo=r,r=o)),r}function xa(){var t,e,n,s;return t=Bo,"over"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(gt)),e!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&ui()!==o&&Il()!==o&&hi()!==o&&Il()!==o&&(n=Ru())!==o&&Il()!==o?((s=Yu())===o&&(s=null),s!==o&&Il()!==o&&dl()!==o?t=e={partitionby:n,orderby:s}:(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Oa()),t}function Ua(){var t,e,n,s,u;return(t=function(){var t,e,n;return t=Bo,"position"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(Ot)),e!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(n=function(){var r,t,e,n,s,u,a,i;return r=Bo,(t=Pa())!==o&&Il()!==o&&Ii()!==o&&Il()!==o&&(e=na())!==o?(n=Bo,(s=Il())!==o&&(u=ii())!==o&&(a=Il())!==o&&(i=Ha())!==o?n=s=[s,u,a,i]:(Bo=n,n=o),n===o&&(n=null),n!==o?r=t=function(r,t,e){let n=[r,{type:"origin",value:"in"},t];return e&&(n.push({type:"origin",value:"from"}),n.push(e[3])),{type:"expr_list",value:n}}(t,e,n):(Bo=r,r=o)):(Bo=r,r=o),r}())!==o&&Il()!==o&&dl()!==o?t=e={type:"function",name:"POSITION",separator:" ",args:n}:(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"trim"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(kt)),e!==o&&Il()!==o&&Cl()!==o&&Il()!==o?((n=function(){var t,e,n;return t=Bo,(e=function(){var t;return"both"===r.substr(Bo,4).toLowerCase()?(t=r.substr(Bo,4),Bo+=4):(t=o,0===qo&&Jo(xt)),t===o&&("leading"===r.substr(Bo,7).toLowerCase()?(t=r.substr(Bo,7),Bo+=7):(t=o,0===qo&&Jo(Ut)),t===o&&("trailing"===r.substr(Bo,8).toLowerCase()?(t=r.substr(Bo,8),Bo+=8):(t=o,0===qo&&Jo(Mt)))),t}())===o&&(e=null),e!==o&&Il()!==o?((n=Pa())===o&&(n=null),n!==o&&Il()!==o&&ii()!==o?t=e=function(r,t,e){let n=[];return r&&n.push({type:"origin",value:r}),t&&n.push(t),n.push({type:"origin",value:"from"}),{type:"expr_list",value:n}}(e,n):(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(n=null),n!==o&&Il()!==o&&(s=na())!==o&&Il()!==o&&dl()!==o?t=e=function(r,t){let e=r||{type:"expr_list",value:[]};return e.value.push(t),{type:"function",name:"TRIM",args:e}}(n,s):(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=Bo,"substring"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(Ft)),e!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(n=function(){var t,e,n,s,u,a,i,l;return t=Bo,(e=na())!==o&&Il()!==o&&ii()!==o&&Il()!==o&&(n=Ha())!==o?(s=Bo,(u=Il())!==o?("for"===r.substr(Bo,3).toLowerCase()?(a=r.substr(Bo,3),Bo+=3):(a=o,0===qo&&Jo($t)),a!==o&&(i=Il())!==o&&(l=Ha())!==o?s=u=[u,a,i,l]:(Bo=s,s=o)):(Bo=s,s=o),s===o&&(s=null),s!==o?t=e=function(r,t,e){let n=[r,{type:"origin",value:"from"},t];return e&&(n.push({type:"origin",value:"for"}),n.push(e[3])),{type:"expr_list",value:n}}(e,n,s):(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&Il()!==o&&dl()!==o?t=e={type:"function",name:"SUBSTRING",separator:" ",args:n}:(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=Bo,"overlay"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(Pt)),e!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(n=function(){var t,e,n,s,u,a,i,l,c,f;return t=Bo,(e=na())!==o&&Il()!==o?("placing"===r.substr(Bo,7).toLowerCase()?(n=r.substr(Bo,7),Bo+=7):(n=o,0===qo&&Jo(Dt)),n!==o&&Il()!==o&&(s=na())!==o&&Il()!==o&&ii()!==o&&Il()!==o&&(u=Ha())!==o?(a=Bo,(i=Il())!==o?("for"===r.substr(Bo,3).toLowerCase()?(l=r.substr(Bo,3),Bo+=3):(l=o,0===qo&&Jo($t)),l!==o&&(c=Il())!==o&&(f=Ha())!==o?a=i=[i,l,c,f]:(Bo=a,a=o)):(Bo=a,a=o),a===o&&(a=null),a!==o?t=e=function(r,t,e,n){let s=[r,{type:"origin",value:"placing"},t,{type:"origin",value:"from"},e];return n&&(s.push({type:"origin",value:"for"}),s.push(n[3])),{type:"expr_list",value:s}}(e,s,u,a):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&Il()!==o&&dl()!==o?t=e={type:"function",name:"OVERLAY",separator:" ",args:n}:(Bo=t,t=o),t}())===o&&(t=Bo,(e=function(){var t;return(t=ka())===o&&(t=function(){var t,e,n,s;return t=Bo,"current_user"===r.substr(Bo,12).toLowerCase()?(e=r.substr(Bo,12),Bo+=12):(e=o,0===qo&&Jo(Ws)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="CURRENT_USER":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"user"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo($s)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="USER":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"session_user"===r.substr(Bo,12).toLowerCase()?(e=r.substr(Bo,12),Bo+=12):(e=o,0===qo&&Jo(Xs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SESSION_USER":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"system_user"===r.substr(Bo,11).toLowerCase()?(e=r.substr(Bo,11),Bo+=11):(e=o,0===qo&&Jo(Vs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SYSTEM_USER":(Bo=t,t=o)):(Bo=t,t=o),t}()),t}())!==o&&Il()!==o&&(n=Cl())!==o&&Il()!==o?((s=Ju())===o&&(s=null),s!==o&&Il()!==o&&dl()!==o&&Il()!==o?((u=xa())===o&&(u=null),u!==o?t=e={type:"function",name:e,args:s||{type:"expr_list",value:[]},over:u}:(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=Bo,(t=Ui())!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(e=Ma())!==o&&Il()!==o&&ii()!==o&&Il()!==o?((n=Ji())===o&&(n=tl())===o&&(n=Qi())===o&&(n=Zi()),n!==o&&Il()!==o&&(s=na())!==o&&Il()!==o&&dl()!==o?(u=e,a=n,i=s,r=t={type:t.toLowerCase(),args:{field:u,cast_type:a,source:i}}):(Bo=r,r=o)):(Bo=r,r=o),r===o&&(r=Bo,(t=Ui())!==o&&Il()!==o&&Cl()!==o&&Il()!==o&&(e=Ma())!==o&&Il()!==o&&ii()!==o&&Il()!==o&&(n=na())!==o&&Il()!==o&&(s=dl())!==o?(t=function(r,t,e){return{type:r.toLowerCase(),args:{field:t,source:e}}}(t,e,n),r=t):(Bo=r,r=o)),r}())===o&&(t=Bo,(e=ka())!==o&&Il()!==o?((n=Oa())===o&&(n=null),n!==o?t=e={type:"function",name:e,over:n}:(Bo=t,t=o)):(Bo=t,t=o),t===o&&(t=Bo,(e=Pl())!==o&&Il()!==o&&(n=Cl())!==o&&Il()!==o?((s=oa())===o&&(s=null),s!==o&&Il()!==o&&dl()!==o&&Il()!==o?((u=xa())===o&&(u=null),u!==o?t=e=function(r,t,e){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,s,u):(Bo=t,t=o)):(Bo=t,t=o)):(Bo=t,t=o)))),t}function Ma(){var t;return"century"===r.substr(Bo,7).toLowerCase()?(t=r.substr(Bo,7),Bo+=7):(t=o,0===qo&&Jo(Gt)),t===o&&("day"===r.substr(Bo,3).toLowerCase()?(t=r.substr(Bo,3),Bo+=3):(t=o,0===qo&&Jo(jt)),t===o&&("date"===r.substr(Bo,4).toLowerCase()?(t=r.substr(Bo,4),Bo+=4):(t=o,0===qo&&Jo(Ht)),t===o&&("decade"===r.substr(Bo,6).toLowerCase()?(t=r.substr(Bo,6),Bo+=6):(t=o,0===qo&&Jo(Yt)),t===o&&("dow"===r.substr(Bo,3).toLowerCase()?(t=r.substr(Bo,3),Bo+=3):(t=o,0===qo&&Jo(Bt)),t===o&&("doy"===r.substr(Bo,3).toLowerCase()?(t=r.substr(Bo,3),Bo+=3):(t=o,0===qo&&Jo(Wt)),t===o&&("epoch"===r.substr(Bo,5).toLowerCase()?(t=r.substr(Bo,5),Bo+=5):(t=o,0===qo&&Jo(Xt)),t===o&&("hour"===r.substr(Bo,4).toLowerCase()?(t=r.substr(Bo,4),Bo+=4):(t=o,0===qo&&Jo(Vt)),t===o&&("isodow"===r.substr(Bo,6).toLowerCase()?(t=r.substr(Bo,6),Bo+=6):(t=o,0===qo&&Jo(qt)),t===o&&("isoyear"===r.substr(Bo,7).toLowerCase()?(t=r.substr(Bo,7),Bo+=7):(t=o,0===qo&&Jo(Kt)),t===o&&("microseconds"===r.substr(Bo,12).toLowerCase()?(t=r.substr(Bo,12),Bo+=12):(t=o,0===qo&&Jo(Zt)),t===o&&("millennium"===r.substr(Bo,10).toLowerCase()?(t=r.substr(Bo,10),Bo+=10):(t=o,0===qo&&Jo(zt)),t===o&&("milliseconds"===r.substr(Bo,12).toLowerCase()?(t=r.substr(Bo,12),Bo+=12):(t=o,0===qo&&Jo(Qt)),t===o&&("minute"===r.substr(Bo,6).toLowerCase()?(t=r.substr(Bo,6),Bo+=6):(t=o,0===qo&&Jo(Jt)),t===o&&("month"===r.substr(Bo,5).toLowerCase()?(t=r.substr(Bo,5),Bo+=5):(t=o,0===qo&&Jo(re)),t===o&&("quarter"===r.substr(Bo,7).toLowerCase()?(t=r.substr(Bo,7),Bo+=7):(t=o,0===qo&&Jo(te)),t===o&&("second"===r.substr(Bo,6).toLowerCase()?(t=r.substr(Bo,6),Bo+=6):(t=o,0===qo&&Jo(ee)),t===o&&("timezone"===r.substr(Bo,8).toLowerCase()?(t=r.substr(Bo,8),Bo+=8):(t=o,0===qo&&Jo(ne)),t===o&&("timezone_hour"===r.substr(Bo,13).toLowerCase()?(t=r.substr(Bo,13),Bo+=13):(t=o,0===qo&&Jo(se)),t===o&&("timezone_minute"===r.substr(Bo,15).toLowerCase()?(t=r.substr(Bo,15),Bo+=15):(t=o,0===qo&&Jo(oe)),t===o&&("week"===r.substr(Bo,4).toLowerCase()?(t=r.substr(Bo,4),Bo+=4):(t=o,0===qo&&Jo(ue)),t===o&&("year"===r.substr(Bo,4).toLowerCase()?(t=r.substr(Bo,4),Bo+=4):(t=o,0===qo&&Jo(ae))))))))))))))))))))))),t}function ka(){var t;return(t=function(){var t,e,n,s;return t=Bo,"current_date"===r.substr(Bo,12).toLowerCase()?(e=r.substr(Bo,12),Bo+=12):(e=o,0===qo&&Jo(js)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="CURRENT_DATE":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"current_time"===r.substr(Bo,12).toLowerCase()?(e=r.substr(Bo,12),Bo+=12):(e=o,0===qo&&Jo(Ys)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="CURRENT_TIME":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=el()),t}function Da(){var t;return(t=Pa())===o&&(t=Ha())===o&&(t=function(){var t,e;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"true"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Fe)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(e={type:"bool",value:!0}),(t=e)===o&&(t=Bo,(e=function(){var t,e,n,s;return t=Bo,"false"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(je)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(e={type:"bool",value:!1}),t=e),t}())===o&&(t=$a())===o&&(t=function(){var t,e,n,s,u,a,i;if(t=Bo,(e=Qi())===o&&(e=Zi())===o&&(e=Ji())===o&&(e=zi()),e!==o)if(Il()!==o){if(n=Bo,39===r.charCodeAt(Bo)?(s="'",Bo++):(s=o,0===qo&&Jo(hr)),s!==o){for(u=[],a=Ga();a!==o;)u.push(a),a=Ga();u!==o?(39===r.charCodeAt(Bo)?(a="'",Bo++):(a=o,0===qo&&Jo(hr)),a!==o?n=s=[s,u,a]:(Bo=n,n=o)):(Bo=n,n=o)}else Bo=n,n=o;n!==o?(i=n,t=e={type:e.toLowerCase(),value:i[1].join("")}):(Bo=t,t=o)}else Bo=t,t=o;else Bo=t,t=o;if(t===o)if(t=Bo,(e=Qi())===o&&(e=Zi())===o&&(e=Ji())===o&&(e=zi()),e!==o)if(Il()!==o){if(n=Bo,34===r.charCodeAt(Bo)?(s='"',Bo++):(s=o,0===qo&&Jo(pt)),s!==o){for(u=[],a=Fa();a!==o;)u.push(a),a=Fa();u!==o?(34===r.charCodeAt(Bo)?(a='"',Bo++):(a=o,0===qo&&Jo(pt)),a!==o?n=s=[s,u,a]:(Bo=n,n=o)):(Bo=n,n=o)}else Bo=n,n=o;n!==o?(e=function(r,t){return{type:r.toLowerCase(),value:t[1].join("")}}(e,n),t=e):(Bo=t,t=o)}else Bo=t,t=o;else Bo=t,t=o;return t}()),t}function $a(){var t;return(t=function(){var t,e,n,s;return t=Bo,"null"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo($e)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(t={type:"null",value:null}),t}function Pa(){var t,e,n,s,u;if(t=Bo,e=Bo,39===r.charCodeAt(Bo)?(n="'",Bo++):(n=o,0===qo&&Jo(hr)),n!==o){for(s=[],u=Ga();u!==o;)s.push(u),u=Ga();s!==o?(39===r.charCodeAt(Bo)?(u="'",Bo++):(u=o,0===qo&&Jo(hr)),u!==o?e=n=[n,s,u]:(Bo=e,e=o)):(Bo=e,e=o)}else Bo=e,e=o;if(e!==o&&(e={type:"single_quote_string",value:e[1].join("")}),(t=e)===o){if(t=Bo,e=Bo,34===r.charCodeAt(Bo)?(n='"',Bo++):(n=o,0===qo&&Jo(pt)),n!==o){for(s=[],u=Fa();u!==o;)s.push(u),u=Fa();s!==o?(34===r.charCodeAt(Bo)?(u='"',Bo++):(u=o,0===qo&&Jo(pt)),u!==o?e=n=[n,s,u]:(Bo=e,e=o)):(Bo=e,e=o)}else Bo=e,e=o;e!==o?(n=Bo,qo++,s=vl(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=function(r){return{type:"double_quote_string",value:r[1].join("")}}(e):(Bo=t,t=o)):(Bo=t,t=o)}return t}function Fa(){var t;return ie.test(r.charAt(Bo))?(t=r.charAt(Bo),Bo++):(t=o,0===qo&&Jo(le)),t===o&&(t=ja()),t}function Ga(){var t;return ce.test(r.charAt(Bo))?(t=r.charAt(Bo),Bo++):(t=o,0===qo&&Jo(fe)),t===o&&(t=ja()),t}function ja(){var t,e,n,s,u,a,i,l,c,f;return t=Bo,"\\'"===r.substr(Bo,2)?(e="\\'",Bo+=2):(e=o,0===qo&&Jo(be)),e!==o&&(e="\\'"),(t=e)===o&&(t=Bo,'\\"'===r.substr(Bo,2)?(e='\\"',Bo+=2):(e=o,0===qo&&Jo(ve)),e!==o&&(e='\\"'),(t=e)===o&&(t=Bo,"\\\\"===r.substr(Bo,2)?(e="\\\\",Bo+=2):(e=o,0===qo&&Jo(pe)),e!==o&&(e="\\\\"),(t=e)===o&&(t=Bo,"\\/"===r.substr(Bo,2)?(e="\\/",Bo+=2):(e=o,0===qo&&Jo(Le)),e!==o&&(e="\\/"),(t=e)===o&&(t=Bo,"\\b"===r.substr(Bo,2)?(e="\\b",Bo+=2):(e=o,0===qo&&Jo(Ce)),e!==o&&(e="\b"),(t=e)===o&&(t=Bo,"\\f"===r.substr(Bo,2)?(e="\\f",Bo+=2):(e=o,0===qo&&Jo(de)),e!==o&&(e="\f"),(t=e)===o&&(t=Bo,"\\n"===r.substr(Bo,2)?(e="\\n",Bo+=2):(e=o,0===qo&&Jo(we)),e!==o&&(e="\n"),(t=e)===o&&(t=Bo,"\\r"===r.substr(Bo,2)?(e="\\r",Bo+=2):(e=o,0===qo&&Jo(he)),e!==o&&(e="\r"),(t=e)===o&&(t=Bo,"\\t"===r.substr(Bo,2)?(e="\\t",Bo+=2):(e=o,0===qo&&Jo(ye)),e!==o&&(e="\t"),(t=e)===o&&(t=Bo,"\\u"===r.substr(Bo,2)?(e="\\u",Bo+=2):(e=o,0===qo&&Jo(Ee)),e!==o&&(n=qa())!==o&&(s=qa())!==o&&(u=qa())!==o&&(a=qa())!==o?(i=n,l=s,c=u,f=a,t=e=String.fromCharCode(parseInt("0x"+i+l+c+f))):(Bo=t,t=o),t===o&&(t=Bo,92===r.charCodeAt(Bo)?(e="\\",Bo++):(e=o,0===qo&&Jo(Ae)),e!==o&&(e="\\"),(t=e)===o&&(t=Bo,"''"===r.substr(Bo,2)?(e="''",Bo+=2):(e=o,0===qo&&Jo(me)),e!==o&&(e="''"),(t=e)===o&&(t=Bo,'""'===r.substr(Bo,2)?(e='""',Bo+=2):(e=o,0===qo&&Jo(Te)),e!==o&&(e='""'),(t=e)===o&&(t=Bo,"``"===r.substr(Bo,2)?(e="``",Bo+=2):(e=o,0===qo&&Jo(Ie)),e!==o&&(e="``"),t=e))))))))))))),t}function Ha(){var r,t;return(r=function(){var r,t,e,n;return r=Bo,(t=Ya())!==o&&(e=Ba())!==o&&(n=Wa())!==o?r=t={type:"bigint",value:t+e+n}:(Bo=r,r=o),r===o&&(r=Bo,(t=Ya())!==o&&(e=Ba())!==o?(t=function(r,t){const e=r+t;return ql(r)?{type:"bigint",value:e}:parseFloat(e)}(t,e),r=t):(Bo=r,r=o),r===o&&(r=Bo,(t=Ya())!==o&&(e=Wa())!==o?(t=function(r,t){return{type:"bigint",value:r+t}}(t,e),r=t):(Bo=r,r=o),r===o&&(r=Bo,(t=Ya())!==o&&(t=function(r){return ql(r)?{type:"bigint",value:r}:parseFloat(r)}(t)),r=t))),r}())!==o&&(r=(t=r)&&"bigint"===t.type?t:{type:"number",value:t}),r}function Ya(){var t,e,n;return(t=Xa())===o&&(t=Va())===o&&(t=Bo,45===r.charCodeAt(Bo)?(e="-",Bo++):(e=o,0===qo&&Jo(it)),e===o&&(43===r.charCodeAt(Bo)?(e="+",Bo++):(e=o,0===qo&&Jo(at))),e!==o&&(n=Xa())!==o?t=e+=n:(Bo=t,t=o),t===o&&(t=Bo,45===r.charCodeAt(Bo)?(e="-",Bo++):(e=o,0===qo&&Jo(it)),e===o&&(43===r.charCodeAt(Bo)?(e="+",Bo++):(e=o,0===qo&&Jo(at))),e!==o&&(n=Va())!==o?t=e=function(r,t){return r+t}(e,n):(Bo=t,t=o))),t}function Ba(){var t,e,n;return t=Bo,46===r.charCodeAt(Bo)?(e=".",Bo++):(e=o,0===qo&&Jo(Se)),e!==o&&(n=Xa())!==o?t=e="."+n:(Bo=t,t=o),t}function Wa(){var t,e,n;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,Ue.test(r.charAt(Bo))?(e=r.charAt(Bo),Bo++):(e=o,0===qo&&Jo(Me)),e!==o?(ke.test(r.charAt(Bo))?(n=r.charAt(Bo),Bo++):(n=o,0===qo&&Jo(De)),n===o&&(n=null),n!==o?t=e+=null!==(s=n)?s:"":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(n=Xa())!==o?t=e+=n:(Bo=t,t=o),t}function Xa(){var r,t;if(r=[],(t=Va())!==o)for(;t!==o;)r.push(t),t=Va();else r=o;return r!==o&&(r=r.join("")),r}function Va(){var t;return _e.test(r.charAt(Bo))?(t=r.charAt(Bo),Bo++):(t=o,0===qo&&Jo(ge)),t}function qa(){var t;return Oe.test(r.charAt(Bo))?(t=r.charAt(Bo),Bo++):(t=o,0===qo&&Jo(xe)),t}function Ka(){var t,e,n,s;return t=Bo,"default"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(m)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function Za(){var t,e,n,s;return t=Bo,"to"===r.substr(Bo,2).toLowerCase()?(e=r.substr(Bo,2),Bo+=2):(e=o,0===qo&&Jo(Ge)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function za(){var t,e,n,s;return t=Bo,"drop"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(He)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="DROP":(Bo=t,t=o)):(Bo=t,t=o),t}function Qa(){var t,e,n,s;return t=Bo,"update"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(Xe)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function Ja(){var t,e,n,s;return t=Bo,"create"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(Ve)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function ri(){var t,e,n,s;return t=Bo,"temporary"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(qe)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function ti(){var t,e,n,s;return t=Bo,"delete"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(Ke)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function ei(){var t,e,n,s;return t=Bo,"insert"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(Ze)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function ni(){var t,e,n,s;return t=Bo,"replace"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(Qe)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function si(){var t,e,n,s;return t=Bo,"rename"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(rn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function oi(){var t,e,n,s;return t=Bo,"ignore"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(tn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function ui(){var t,e,n,s;return t=Bo,"partition"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(en)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="PARTITION":(Bo=t,t=o)):(Bo=t,t=o),t}function ai(){var t,e,n,s;return t=Bo,"into"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(nn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function ii(){var t,e,n,s;return t=Bo,"from"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(sn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function li(){var t,e,n,s;return t=Bo,"set"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(lr)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SET":(Bo=t,t=o)):(Bo=t,t=o),t}function ci(){var t,e,n,s;return t=Bo,"as"===r.substr(Bo,2).toLowerCase()?(e=r.substr(Bo,2),Bo+=2):(e=o,0===qo&&Jo(on)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function fi(){var t,e,n,s;return t=Bo,"table"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(un)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="TABLE":(Bo=t,t=o)):(Bo=t,t=o),t}function bi(){var t,e,n,s;return t=Bo,"on"===r.substr(Bo,2).toLowerCase()?(e=r.substr(Bo,2),Bo+=2):(e=o,0===qo&&Jo(K)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function vi(){var t,e,n,s;return t=Bo,"join"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Cn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function pi(){var t,e,n,s;return t=Bo,"cross"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(dn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function Li(){var t,e,n,s;return t=Bo,"outer"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(hn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function Ci(){var t,e,n,s;return t=Bo,"values"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(mn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function di(){var t,e,n,s;return t=Bo,"using"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(Tn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function wi(){var t,e,n,s;return t=Bo,"with"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Fr)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function hi(){var t,e,n,s;return t=Bo,"by"===r.substr(Bo,2).toLowerCase()?(e=r.substr(Bo,2),Bo+=2):(e=o,0===qo&&Jo(Rn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function yi(){var t,e,n,s;return t=Bo,"asc"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(xn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="ASC":(Bo=t,t=o)):(Bo=t,t=o),t}function Ei(){var t,e,n,s;return t=Bo,"desc"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Un)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="DESC":(Bo=t,t=o)):(Bo=t,t=o),t}function Ai(){var t,e,n,s;return t=Bo,"all"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(Mn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="ALL":(Bo=t,t=o)):(Bo=t,t=o),t}function mi(){var t,e,n,s;return t=Bo,"distinct"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(kn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="DISTINCT":(Bo=t,t=o)):(Bo=t,t=o),t}function Ti(){var t,e,n,s;return t=Bo,"between"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(Dn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="BETWEEN":(Bo=t,t=o)):(Bo=t,t=o),t}function Ii(){var t,e,n,s;return t=Bo,"in"===r.substr(Bo,2).toLowerCase()?(e=r.substr(Bo,2),Bo+=2):(e=o,0===qo&&Jo(mr)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="IN":(Bo=t,t=o)):(Bo=t,t=o),t}function Ni(){var t,e,n,s;return t=Bo,"is"===r.substr(Bo,2).toLowerCase()?(e=r.substr(Bo,2),Bo+=2):(e=o,0===qo&&Jo($n)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="IS":(Bo=t,t=o)):(Bo=t,t=o),t}function Ri(){var t,e,n,s;return t=Bo,"like"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Pn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="LIKE":(Bo=t,t=o)):(Bo=t,t=o),t}function Si(){var t,e,n,s;return t=Bo,"similar"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(Fn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SIMILAR":(Bo=t,t=o)):(Bo=t,t=o),t}function _i(){var t,e,n,s;return t=Bo,"exists"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(Gn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="EXISTS":(Bo=t,t=o)):(Bo=t,t=o),t}function gi(){var t,e,n,s;return t=Bo,"not"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(rr)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="NOT":(Bo=t,t=o)):(Bo=t,t=o),t}function Oi(){var t,e,n,s;return t=Bo,"and"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(jn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="AND":(Bo=t,t=o)):(Bo=t,t=o),t}function xi(){var t,e,n,s;return t=Bo,"or"===r.substr(Bo,2).toLowerCase()?(e=r.substr(Bo,2),Bo+=2):(e=o,0===qo&&Jo(Hn)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="OR":(Bo=t,t=o)):(Bo=t,t=o),t}function Ui(){var t,e,n,s;return t=Bo,"extract"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(rs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="EXTRACT":(Bo=t,t=o)):(Bo=t,t=o),t}function Mi(){var t,e,n,s;return t=Bo,"case"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(es)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function ki(){var t,e,n,s;return t=Bo,"when"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(ns)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e=[e,n]:(Bo=t,t=o)):(Bo=t,t=o),t}function Di(){var t,e,n,s;return t=Bo,"cast"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(as)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="CAST":(Bo=t,t=o)):(Bo=t,t=o),t}function $i(){var t,e,n,s;return t=Bo,"try_cast"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(is)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="TRY_CAST":(Bo=t,t=o)):(Bo=t,t=o),t}function Pi(){var t,e,n,s;return t=Bo,"char"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(fs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="CHAR":(Bo=t,t=o)):(Bo=t,t=o),t}function Fi(){var t,e,n,s;return t=Bo,"varchar"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(bs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="VARCHAR":(Bo=t,t=o)):(Bo=t,t=o),t}function Gi(){var t,e,n,s;return t=Bo,"numeric"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(ps)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="NUMERIC":(Bo=t,t=o)):(Bo=t,t=o),t}function ji(){var t,e,n,s;return t=Bo,"decimal"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(Ls)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="DECIMAL":(Bo=t,t=o)):(Bo=t,t=o),t}function Hi(){var t,e,n,s;return t=Bo,"unsigned"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(ds)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="UNSIGNED":(Bo=t,t=o)):(Bo=t,t=o),t}function Yi(){var t,e,n,s;return t=Bo,"int"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(ws)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="INT":(Bo=t,t=o)):(Bo=t,t=o),t}function Bi(){var t,e,n,s;return t=Bo,"integer"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(ys)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="INTEGER":(Bo=t,t=o)):(Bo=t,t=o),t}function Wi(){var t,e,n,s;return t=Bo,"smallint"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(Ts)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="SMALLINT":(Bo=t,t=o)):(Bo=t,t=o),t}function Xi(){var t,e,n,s;return t=Bo,"tinyint"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(Is)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="TINYINT":(Bo=t,t=o)):(Bo=t,t=o),t}function Vi(){var t,e,n,s;return t=Bo,"bigint"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(gs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="BIGINT":(Bo=t,t=o)):(Bo=t,t=o),t}function qi(){var t,e,n,s;return t=Bo,"float"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(Os)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="FLOAT":(Bo=t,t=o)):(Bo=t,t=o),t}function Ki(){var t,e,n,s;return t=Bo,"double"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(xs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="DOUBLE":(Bo=t,t=o)):(Bo=t,t=o),t}function Zi(){var t,e,n,s;return t=Bo,"date"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Ht)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="DATE":(Bo=t,t=o)):(Bo=t,t=o),t}function zi(){var t,e,n,s;return t=Bo,"datetime"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(Us)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="DATETIME":(Bo=t,t=o)):(Bo=t,t=o),t}function Qi(){var t,e,n,s;return t=Bo,"time"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Ms)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="TIME":(Bo=t,t=o)):(Bo=t,t=o),t}function Ji(){var t,e,n,s;return t=Bo,"timestamp"===r.substr(Bo,9).toLowerCase()?(e=r.substr(Bo,9),Bo+=9):(e=o,0===qo&&Jo(ks)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="TIMESTAMP":(Bo=t,t=o)):(Bo=t,t=o),t}function rl(){var t,e,n,s;return t=Bo,"truncate"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(Ds)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="TRUNCATE":(Bo=t,t=o)):(Bo=t,t=o),t}function tl(){var t,e,n,s;return t=Bo,"interval"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(Hs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="INTERVAL":(Bo=t,t=o)):(Bo=t,t=o),t}function el(){var t,e,n,s;return t=Bo,"current_timestamp"===r.substr(Bo,17).toLowerCase()?(e=r.substr(Bo,17),Bo+=17):(e=o,0===qo&&Jo(Bs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="CURRENT_TIMESTAMP":(Bo=t,t=o)):(Bo=t,t=o),t}function nl(){var t;return(t=function(){var t;return"@@"===r.substr(Bo,2)?(t="@@",Bo+=2):(t=o,0===qo&&Jo(ro)),t}())===o&&(t=function(){var t;return 64===r.charCodeAt(Bo)?(t="@",Bo++):(t=o,0===qo&&Jo(Js)),t}())===o&&(t=function(){var t;return 36===r.charCodeAt(Bo)?(t="$",Bo++):(t=o,0===qo&&Jo(bt)),t}()),t}function sl(){var t;return"::"===r.substr(Bo,2)?(t="::",Bo+=2):(t=o,0===qo&&Jo(no)),t}function ol(){var t;return 61===r.charCodeAt(Bo)?(t="=",Bo++):(t=o,0===qo&&Jo(Wr)),t}function ul(){var t,e,n,s;return t=Bo,"add"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(oo)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="ADD":(Bo=t,t=o)):(Bo=t,t=o),t}function al(){var t,e,n,s;return t=Bo,"column"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(uo)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="COLUMN":(Bo=t,t=o)):(Bo=t,t=o),t}function il(){var t,e,n,s;return t=Bo,"index"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(ao)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="INDEX":(Bo=t,t=o)):(Bo=t,t=o),t}function ll(){var t,e,n,s;return t=Bo,"key"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(w)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="KEY":(Bo=t,t=o)):(Bo=t,t=o),t}function cl(){var t,e,n,s;return t=Bo,"unique"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(d)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="UNIQUE":(Bo=t,t=o)):(Bo=t,t=o),t}function fl(){var t,e,n,s;return t=Bo,"comment"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(co)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="COMMENT":(Bo=t,t=o)):(Bo=t,t=o),t}function bl(){var t,e,n,s;return t=Bo,"constraint"===r.substr(Bo,10).toLowerCase()?(e=r.substr(Bo,10),Bo+=10):(e=o,0===qo&&Jo(fo)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="CONSTRAINT":(Bo=t,t=o)):(Bo=t,t=o),t}function vl(){var t;return 46===r.charCodeAt(Bo)?(t=".",Bo++):(t=o,0===qo&&Jo(Se)),t}function pl(){var t;return 44===r.charCodeAt(Bo)?(t=",",Bo++):(t=o,0===qo&&Jo(Eo)),t}function Ll(){var t;return 42===r.charCodeAt(Bo)?(t="*",Bo++):(t=o,0===qo&&Jo(lt)),t}function Cl(){var t;return 40===r.charCodeAt(Bo)?(t="(",Bo++):(t=o,0===qo&&Jo(Ur)),t}function dl(){var t;return 41===r.charCodeAt(Bo)?(t=")",Bo++):(t=o,0===qo&&Jo(Mr)),t}function wl(){var t;return 60===r.charCodeAt(Bo)?(t="<",Bo++):(t=o,0===qo&&Jo(Qr)),t}function hl(){var t;return 62===r.charCodeAt(Bo)?(t=">",Bo++):(t=o,0===qo&&Jo(Kr)),t}function yl(){var t;return 59===r.charCodeAt(Bo)?(t=";",Bo++):(t=o,0===qo&&Jo(To)),t}function El(){var t;return"->"===r.substr(Bo,2)?(t="->",Bo+=2):(t=o,0===qo&&Jo(Io)),t}function Al(){var t;return"->>"===r.substr(Bo,3)?(t="->>",Bo+=3):(t=o,0===qo&&Jo(No)),t}function ml(){var t;return"||"===r.substr(Bo,2)?(t="||",Bo+=2):(t=o,0===qo&&Jo(_o)),t}function Tl(){var t;return(t=ml())===o&&(t=function(){var t;return"&&"===r.substr(Bo,2)?(t="&&",Bo+=2):(t=o,0===qo&&Jo(go)),t}()),t}function Il(){var r,t;for(r=[],(t=gl())===o&&(t=Rl());t!==o;)r.push(t),(t=gl())===o&&(t=Rl());return r}function Nl(){var r,t;if(r=[],(t=gl())===o&&(t=Rl()),t!==o)for(;t!==o;)r.push(t),(t=gl())===o&&(t=Rl());else r=o;return r}function Rl(){var t;return(t=function(){var t,e,n,s,u,a;if(t=Bo,"/*"===r.substr(Bo,2)?(e="/*",Bo+=2):(e=o,0===qo&&Jo(Oo)),e!==o){for(n=[],s=Bo,u=Bo,qo++,"*/"===r.substr(Bo,2)?(a="*/",Bo+=2):(a=o,0===qo&&Jo(xo)),qo--,a===o?u=void 0:(Bo=u,u=o),u!==o&&(a=_l())!==o?s=u=[u,a]:(Bo=s,s=o);s!==o;)n.push(s),s=Bo,u=Bo,qo++,"*/"===r.substr(Bo,2)?(a="*/",Bo+=2):(a=o,0===qo&&Jo(xo)),qo--,a===o?u=void 0:(Bo=u,u=o),u!==o&&(a=_l())!==o?s=u=[u,a]:(Bo=s,s=o);n!==o?("*/"===r.substr(Bo,2)?(s="*/",Bo+=2):(s=o,0===qo&&Jo(xo)),s!==o?t=e=[e,n,s]:(Bo=t,t=o)):(Bo=t,t=o)}else Bo=t,t=o;return t}())===o&&(t=function(){var t,e,n,s,u,a;if(t=Bo,"--"===r.substr(Bo,2)?(e="--",Bo+=2):(e=o,0===qo&&Jo(Uo)),e!==o){for(n=[],s=Bo,u=Bo,qo++,a=Ol(),qo--,a===o?u=void 0:(Bo=u,u=o),u!==o&&(a=_l())!==o?s=u=[u,a]:(Bo=s,s=o);s!==o;)n.push(s),s=Bo,u=Bo,qo++,a=Ol(),qo--,a===o?u=void 0:(Bo=u,u=o),u!==o&&(a=_l())!==o?s=u=[u,a]:(Bo=s,s=o);n!==o?t=e=[e,n]:(Bo=t,t=o)}else Bo=t,t=o;return t}()),t}function Sl(){var r,t,e,n,s,u,a;return r=Bo,(t=fl())!==o&&Il()!==o?((e=ol())===o&&(e=null),e!==o&&Il()!==o&&(n=Pa())!==o?(u=e,a=n,r=t={type:(s=t).toLowerCase(),keyword:s.toLowerCase(),symbol:u,value:a}):(Bo=r,r=o)):(Bo=r,r=o),r}function _l(){var t;return r.length>Bo?(t=r.charAt(Bo),Bo++):(t=o,0===qo&&Jo(Mo)),t}function gl(){var t;return jo.test(r.charAt(Bo))?(t=r.charAt(Bo),Bo++):(t=o,0===qo&&Jo(Ho)),t}function Ol(){var t,e;if((t=function(){var t,e;return t=Bo,qo++,r.length>Bo?(e=r.charAt(Bo),Bo++):(e=o,0===qo&&Jo(Mo)),qo--,e===o?t=void 0:(Bo=t,t=o),t}())===o)if(t=[],Ne.test(r.charAt(Bo))?(e=r.charAt(Bo),Bo++):(e=o,0===qo&&Jo(Re)),e!==o)for(;e!==o;)t.push(e),Ne.test(r.charAt(Bo))?(e=r.charAt(Bo),Bo++):(e=o,0===qo&&Jo(Re));else t=o;return t}function xl(){var t,e;return t=Bo,rc=[],void 0!==o&&Il()!==o?((e=Ul())===o&&(e=function(){var t,e;return t=Bo,function(){var t;return"return"===r.substr(Bo,6).toLowerCase()?(t=r.substr(Bo,6),Bo+=6):(t=o,0===qo&&Jo(to)),t}()!==o&&Il()!==o&&(e=Ml())!==o?t={type:"return",expr:e}:(Bo=t,t=o),t}()),e!==o?t={type:"proc",stmt:e,vars:rc}:(Bo=t,t=o)):(Bo=t,t=o),t}function Ul(){var t,e,n,s;return t=Bo,(e=jl())===o&&(e=Hl()),e!==o&&Il()!==o?((n=function(){var t;return":="===r.substr(Bo,2)?(t=":=",Bo+=2):(t=o,0===qo&&Jo(eo)),t}())===o&&(n=ol()),n!==o&&Il()!==o&&(s=Ml())!==o?t=e={type:"assign",left:e,symbol:n,right:s}:(Bo=t,t=o)):(Bo=t,t=o),t}function Ml(){var t;return(t=Au())===o&&(t=function(){var r,t,e,n,s;return r=Bo,(t=jl())!==o&&Il()!==o&&(e=Pu())!==o&&Il()!==o&&(n=jl())!==o&&Il()!==o&&(s=Gu())!==o?r=t={type:"join",ltable:t,rtable:n,op:e,on:s}:(Bo=r,r=o),r}())===o&&(t=kl())===o&&(t=function(){var t,e;return t=Bo,function(){var t;return 91===r.charCodeAt(Bo)?(t="[",Bo++):(t=o,0===qo&&Jo(Ao)),t}()!==o&&Il()!==o&&(e=Gl())!==o&&Il()!==o&&function(){var t;return 93===r.charCodeAt(Bo)?(t="]",Bo++):(t=o,0===qo&&Jo(mo)),t}()!==o?t={type:"array",value:e}:(Bo=t,t=o),t}()),t}function kl(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=Dl())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=La())!==o&&(a=Il())!==o&&(i=Dl())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=La())!==o&&(a=Il())!==o&&(i=Dl())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Xr(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function Dl(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=$l())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=da())!==o&&(a=Il())!==o&&(i=$l())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=da())!==o&&(a=Il())!==o&&(i=$l())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Xr(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function $l(){var r,t,e;return(r=Da())===o&&(r=jl())===o&&(r=Fl())===o&&(r=_a())===o&&(r=Bo,Cl()!==o&&Il()!==o&&(t=kl())!==o&&Il()!==o&&dl()!==o?((e=t).parentheses=!0,r=e):(Bo=r,r=o)),r}function Pl(){var r,t,e,n,s,u,a;return r=Bo,(t=Ia())!==o?(e=Bo,(n=Il())!==o&&(s=vl())!==o&&(u=Il())!==o&&(a=Ia())!==o?e=n=[n,s,u,a]:(Bo=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){let e=r;return null!==t&&(e=`${r}.${t[3]}`),e}(t,e):(Bo=r,r=o)):(Bo=r,r=o),r}function Fl(){var r,t,e;return r=Bo,(t=Pl())!==o&&Il()!==o&&Cl()!==o&&Il()!==o?((e=Gl())===o&&(e=null),e!==o&&Il()!==o&&dl()!==o?r=t={type:"function",name:t,args:{type:"expr_list",value:e}}:(Bo=r,r=o)):(Bo=r,r=o),r===o&&(r=Bo,(t=Pl())!==o&&(t=function(r){return{type:"function",name:r,args:null}}(t)),r=t),r}function Gl(){var r,t,e,n,s,u,a,i;if(r=Bo,(t=$l())!==o){for(e=[],n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=$l())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);n!==o;)e.push(n),n=Bo,(s=Il())!==o&&(u=pl())!==o&&(a=Il())!==o&&(i=$l())!==o?n=s=[s,u,a,i]:(Bo=n,n=o);e!==o?r=t=Kl(t,e):(Bo=r,r=o)}else Bo=r,r=o;return r}function jl(){var r,t,e,n,s;return r=Bo,(t=nl())!==o&&(e=Hl())!==o?(n=t,s=e,r=t={type:"var",...s,prefix:n}):(Bo=r,r=o),r}function Hl(){var t,e,n,s,u;return t=Bo,(e=Ia())!==o&&(n=function(){var t,e,n,s;for(t=[],e=Bo,46===r.charCodeAt(Bo)?(n=".",Bo++):(n=o,0===qo&&Jo(Se)),n!==o&&(s=Ia())!==o?e=n=[n,s]:(Bo=e,e=o);e!==o;)t.push(e),e=Bo,46===r.charCodeAt(Bo)?(n=".",Bo++):(n=o,0===qo&&Jo(Se)),n!==o&&(s=Ia())!==o?e=n=[n,s]:(Bo=e,e=o);return t!==o&&(t=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e][1]);return t}(t)),t}())!==o?(s=e,u=n,rc.push(s),t=e={type:"var",name:s,members:u,prefix:null}):(Bo=t,t=o),t===o&&(t=Bo,(e=Ha())!==o&&(e={type:"var",name:e.value,members:[],quoted:null,prefix:null}),t=e),t}function Yl(){var t;return(t=function(){var t,e,n,s;if(t=Bo,(e=Pi())===o&&(e=Fi()),e!==o)if(Il()!==o)if(Cl()!==o)if(Il()!==o){if(n=[],_e.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(ge)),s!==o)for(;s!==o;)n.push(s),_e.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(ge));else n=o;n!==o&&(s=Il())!==o&&dl()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(Bo=t,t=o)}else Bo=t,t=o;else Bo=t,t=o;else Bo=t,t=o;else Bo=t,t=o;return t===o&&(t=Bo,(e=Pi())!==o&&(e=function(r){return{dataType:r}}(e)),(t=e)===o&&(t=Bo,(e=Fi())!==o&&(e=Yo(e)),(t=e)===o&&(t=Bo,(e=function(){var t,e,n,s;return t=Bo,"string"===r.substr(Bo,6).toLowerCase()?(e=r.substr(Bo,6),Bo+=6):(e=o,0===qo&&Jo(vs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="STRING":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(e=function(r){return{dataType:r}}(e)),t=e))),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(t=Bo,(e=Gi())===o&&(e=ji())===o&&(e=Yi())===o&&(e=Bi())===o&&(e=Wi())===o&&(e=Xi())===o&&(e=Vi())===o&&(e=qi())===o&&(e=Ki()),e!==o)if((n=Il())!==o)if((s=Cl())!==o)if((u=Il())!==o){if(a=[],_e.test(r.charAt(Bo))?(i=r.charAt(Bo),Bo++):(i=o,0===qo&&Jo(ge)),i!==o)for(;i!==o;)a.push(i),_e.test(r.charAt(Bo))?(i=r.charAt(Bo),Bo++):(i=o,0===qo&&Jo(ge));else a=o;if(a!==o)if((i=Il())!==o){if(l=Bo,(c=pl())!==o)if((f=Il())!==o){if(b=[],_e.test(r.charAt(Bo))?(v=r.charAt(Bo),Bo++):(v=o,0===qo&&Jo(ge)),v!==o)for(;v!==o;)b.push(v),_e.test(r.charAt(Bo))?(v=r.charAt(Bo),Bo++):(v=o,0===qo&&Jo(ge));else b=o;b!==o?l=c=[c,f,b]:(Bo=l,l=o)}else Bo=l,l=o;else Bo=l,l=o;l===o&&(l=null),l!==o&&(c=Il())!==o&&(f=dl())!==o&&(b=Il())!==o?((v=Bl())===o&&(v=null),v!==o?(p=l,L=v,t=e={dataType:e,length:parseInt(a.join(""),10),scale:p&&parseInt(p[2].join(""),10),parentheses:!0,suffix:L}):(Bo=t,t=o)):(Bo=t,t=o)}else Bo=t,t=o;else Bo=t,t=o}else Bo=t,t=o;else Bo=t,t=o;else Bo=t,t=o;else Bo=t,t=o;if(t===o){if(t=Bo,(e=Gi())===o&&(e=ji())===o&&(e=Yi())===o&&(e=Bi())===o&&(e=Wi())===o&&(e=Xi())===o&&(e=Vi())===o&&(e=qi())===o&&(e=Ki()),e!==o){if(n=[],_e.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(ge)),s!==o)for(;s!==o;)n.push(s),_e.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(ge));else n=o;n!==o&&(s=Il())!==o?((u=Bl())===o&&(u=null),u!==o?(e=function(r,t,e){return{dataType:r,length:parseInt(t.join(""),10),suffix:e}}(e,n,u),t=e):(Bo=t,t=o)):(Bo=t,t=o)}else Bo=t,t=o;t===o&&(t=Bo,(e=Gi())===o&&(e=ji())===o&&(e=Yi())===o&&(e=Bi())===o&&(e=Wi())===o&&(e=Xi())===o&&(e=Vi())===o&&(e=qi())===o&&(e=Ki()),e!==o&&(n=Il())!==o?((s=Bl())===o&&(s=null),s!==o&&(u=Il())!==o?(e=function(r,t){return{dataType:r,suffix:t}}(e,s),t=e):(Bo=t,t=o)):(Bo=t,t=o))}return t}())===o&&(t=function(){var t,e,n,s;if(t=Bo,(e=Zi())===o&&(e=zi())===o&&(e=Qi())===o&&(e=Ji()),e!==o)if(Il()!==o)if(Cl()!==o)if(Il()!==o){if(n=[],_e.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(ge)),s!==o)for(;s!==o;)n.push(s),_e.test(r.charAt(Bo))?(s=r.charAt(Bo),Bo++):(s=o,0===qo&&Jo(ge));else n=o;n!==o&&(s=Il())!==o&&dl()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(Bo=t,t=o)}else Bo=t,t=o;else Bo=t,t=o;else Bo=t,t=o;else Bo=t,t=o;return t===o&&(t=Bo,(e=Zi())===o&&(e=zi())===o&&(e=Qi())===o&&(e=Ji()),e!==o&&(e=Yo(e)),t=e),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=Bo,"json"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Es)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="JSON":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"jsonb"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(As)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="JSONB":(Bo=t,t=o)):(Bo=t,t=o),t}()),t!==o&&(t=Yo(t)),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=Bo,"geometry"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(ms)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="GEOMETRY":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(t={dataType:t}),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=Bo,"tinytext"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(Ns)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="TINYTEXT":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"text"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Rs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="TEXT":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"mediumtext"===r.substr(Bo,10).toLowerCase()?(e=r.substr(Bo,10),Bo+=10):(e=o,0===qo&&Jo(Ss)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="MEDIUMTEXT":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"longtext"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(_s)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="LONGTEXT":(Bo=t,t=o)):(Bo=t,t=o),t}()),t!==o&&(t={dataType:t}),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=Bo,"uuid"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(Ps)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="UUID":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(t={dataType:t}),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=Bo,"bool"===r.substr(Bo,4).toLowerCase()?(e=r.substr(Bo,4),Bo+=4):(e=o,0===qo&&Jo(ls)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="BOOL":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=Bo,"boolean"===r.substr(Bo,7).toLowerCase()?(e=r.substr(Bo,7),Bo+=7):(e=o,0===qo&&Jo(cs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="BOOLEAN":(Bo=t,t=o)):(Bo=t,t=o),t}()),t!==o&&(t={dataType:t}),t}())===o&&(t=function(){var t,e,n;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"array"===r.substr(Bo,5).toLowerCase()?(e=r.substr(Bo,5),Bo+=5):(e=o,0===qo&&Jo(Fs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="ARRAY":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&wl()!==o&&(n=Yl())!==o&&hl()!==o?t=e={dataType:e,subType:n}:(Bo=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=Bo,(e=function(){var t,e,n,s;return t=Bo,"map"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(Gs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="MAP":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&wl()!==o&&Yl()!==o&&pl()!==o&&(n=Yl())!==o&&hl()!==o?t=e={dataType:e,subType:n}:(Bo=t,t=o),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=Bo,"row"===r.substr(Bo,3).toLowerCase()?(e=r.substr(Bo,3),Bo+=3):(e=o,0===qo&&Jo(ur)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="ROW":(Bo=t,t=o)):(Bo=t,t=o),t}())!==o&&(t={dataType:t}),t}()),t}function Bl(){var t,e,n;return t=Bo,(e=Hi())===o&&(e=null),e!==o&&Il()!==o?((n=function(){var t,e,n,s;return t=Bo,"zerofill"===r.substr(Bo,8).toLowerCase()?(e=r.substr(Bo,8),Bo+=8):(e=o,0===qo&&Jo(hs)),e!==o?(n=Bo,qo++,s=Na(),qo--,s===o?n=void 0:(Bo=n,n=o),n!==o?t=e="ZEROFILL":(Bo=t,t=o)):(Bo=t,t=o),t}())===o&&(n=null),n!==o?t=e=function(r,t){const e=[];return r&&e.push(r),t&&e.push(t),e}(e,n):(Bo=t,t=o)):(Bo=t,t=o),t}const Wl={ABS:!0,ALL:!0,ALLOCATE:!0,ALLOW:!0,ALTER:!0,AND:!0,ANY:!0,ARE:!0,ARRAY:!0,ARRAY_MAX_CARDINALITY:!0,AS:!0,ASENSITIVE:!0,ASYMMETRIC:!0,AT:!0,ATOMIC:!0,AUTHORIZATION:!0,AVG:!0,BEGIN:!0,BEGIN_FRAME:!0,BEGIN_PARTITION:!0,BETWEEN:!0,BIGINT:!0,BINARY:!0,BIT:!0,BLOB:!0,BOOLEAN:!0,BOTH:!0,BY:!0,CALL:!0,CALLED:!0,CARDINALITY:!0,CASCADED:!0,CASE:!0,CAST:!0,CEIL:!0,CEILING:!0,CHAR:!0,CHARACTER:!0,CHARACTER_LENGTH:!0,CHAR_LENGTH:!0,CHECK:!0,CLASSIFIER:!0,CLOB:!0,CLOSE:!0,COALESCE:!0,COLLATE:!0,COLLECT:!0,COLUMN:!0,COMMIT:!0,CONDITION:!0,CONNECT:!0,CONSTRAINT:!0,CONTAINS:!0,CONVERT:!0,CORR:!0,CORRESPONDING:!0,COUNT:!0,COVAR_POP:!0,COVAR_SAMP:!0,CREATE:!0,CROSS:!0,CUBE:!0,CUME_DIST:!0,CURRENT:!0,CURRENT_CATALOG:!0,CURRENT_DATE:!0,CURRENT_DEFAULT_TRANSFORM_GROUP:!0,CURRENT_PATH:!0,CURRENT_ROLE:!0,CURRENT_ROW:!0,CURRENT_SCHEMA:!0,CURRENT_TIME:!0,CURRENT_TIMESTAMP:!0,CURRENT_TRANSFORM_GROUP_FOR_TYPE:!0,CURRENT_USER:!0,CURSOR:!0,CYCLE:!0,DATE:!0,DAY:!0,DEALLOCATE:!0,DEC:!0,DECIMAL:!0,DECLARE:!0,DEFAULT:!0,DEFINE:!0,DELETE:!0,DENSE_RANK:!0,DEREF:!0,DESCRIBE:!0,DETERMINISTIC:!0,DISALLOW:!0,DISCONNECT:!0,DISTINCT:!0,DOUBLE:!0,DROP:!0,DYNAMIC:!0,EACH:!0,ELEMENT:!0,ELSE:!0,EMPTY:!0,END:!0,"END-EXEC":!0,END_FRAME:!0,END_PARTITION:!0,EQUALS:!0,ESCAPE:!0,EVERY:!0,EXCEPT:!0,EXEC:!0,EXECUTE:!0,EXISTS:!0,EXP:!0,EXPLAIN:!0,EXTEND:!0,EXTERNAL:!0,EXTRACT:!0,FALSE:!0,FETCH:!0,FILTER:!0,FIRST_VALUE:!0,FLOAT:!0,FLOOR:!0,FOR:!0,FOREIGN:!0,FRAME_ROW:!0,FREE:!0,FROM:!0,FULL:!0,FUNCTION:!0,FUSION:!0,GET:!0,GLOBAL:!0,GRANT:!0,GROUP:!0,GROUPING:!0,GROUPS:!0,HAVING:!0,HOLD:!0,HOUR:!0,IDENTITY:!0,IMPORT:!0,IN:!0,INDICATOR:!0,INITIAL:!0,INNER:!0,INOUT:!0,INSENSITIVE:!0,INSERT:!0,INT:!0,INTEGER:!0,INTERSECT:!0,INTERSECTION:!0,INTERVAL:!0,INTO:!0,IS:!0,JOIN:!0,JSON_ARRAY:!0,JSON_ARRAYAGG:!0,JSON_EXISTS:!0,JSON_OBJECT:!0,JSON_OBJECTAGG:!0,JSON_QUERY:!0,JSON_VALUE:!0,LAG:!0,LANGUAGE:!0,LARGE:!0,LAST_VALUE:!0,LATERAL:!0,LEAD:!0,LEADING:!0,LEFT:!0,LIKE:!0,LIKE_REGEX:!0,LIMIT:!0,LN:!0,LOCAL:!0,LOCALTIME:!0,LOCALTIMESTAMP:!0,LOWER:!0,MATCH:!0,MATCHES:!0,MATCH_NUMBER:!0,MATCH_RECOGNIZE:!0,MAX:!0,MEASURES:!0,MEMBER:!0,MERGE:!0,METHOD:!0,MIN:!0,MINUS:!0,MINUTE:!0,MOD:!0,MODIFIES:!0,MODULE:!0,MONTH:!0,MULTISET:!0,NATIONAL:!0,NATURAL:!0,NCHAR:!0,NCLOB:!0,NEW:!0,NEXT:!0,NO:!0,NONE:!0,NORMALIZE:!0,NOT:!0,NTH_VALUE:!0,NTILE:!0,NULL:!0,NULLIF:!0,NUMERIC:!0,OCCURRENCES_REGEX:!0,OCTET_LENGTH:!0,OF:!0,OFFSET:!0,OLD:!0,OMIT:!0,ON:!0,ONE:!0,ONLY:!0,OPEN:!0,OR:!0,ORDER:!0,OUT:!0,OUTER:!0,OVER:!0,OVERLAPS:!0,OVERLAY:!0,PARAMETER:!0,PARTITION:!0,PATTERN:!0,PER:!0,PERCENT:!0,PERCENTILE_CONT:!0,PERCENTILE_DISC:!0,PERCENT_RANK:!0,PERIOD:!0,PERMUTE:!0,PORTION:!0,POSITION:!0,POSITION_REGEX:!0,POWER:!0,PRECEDES:!0,PRECISION:!0,PREPARE:!0,PREV:!0,PRIMARY:!0,PROCEDURE:!0,RANGE:!0,RANK:!0,READS:!0,REAL:!0,RECURSIVE:!0,REF:!0,REFERENCES:!0,REFERENCING:!0,REGR_AVGX:!0,REGR_AVGY:!0,REGR_COUNT:!0,REGR_INTERCEPT:!0,REGR_R2:!0,REGR_SLOPE:!0,REGR_SXX:!0,REGR_SXY:!0,REGR_SYY:!0,RELEASE:!0,RESET:!0,RESULT:!0,RETURN:!0,RETURNS:!0,REVOKE:!0,RIGHT:!0,ROLLBACK:!0,ROLLUP:!0,ROW:!0,ROWS:!0,ROW_NUMBER:!0,RUNNING:!0,SAVEPOINT:!0,SCOPE:!0,SCROLL:!0,SEARCH:!0,SECOND:!0,SEEK:!0,SELECT:!0,SENSITIVE:!0,SESSION_USER:!0,SET:!0,SHOW:!0,SIMILAR:!0,SIMILAR:!0,SKIP:!0,SMALLINT:!0,SOME:!0,SPECIFIC:!0,SPECIFICTYPE:!0,SQL:!0,SQLEXCEPTION:!0,SQLSTATE:!0,SQLWARNING:!0,SQRT:!0,START:!0,STATIC:!0,STDDEV_POP:!0,STDDEV_SAMP:!0,STREAM:!0,SUBMULTISET:!0,SUBSET:!0,SUBSTRING:!0,SUBSTRING_REGEX:!0,SUCCEEDS:!0,SUM:!0,SYMMETRIC:!0,SYSTEM:!0,SYSTEM_TIME:!0,SYSTEM_USER:!0,TABLE:!0,TABLESAMPLE:!0,THEN:!0,TO:!0,TIME:!0,TIMESTAMP:!0,TIMEZONE_HOUR:!0,TIMEZONE_MINUTE:!0,TINYINT:!0,TO:!0,TRAILING:!0,TRANSLATE:!0,TRANSLATE_REGEX:!0,TRANSLATION:!0,TREAT:!0,TRIGGER:!0,TRIM:!0,TRIM_ARRAY:!0,TRUE:!0,TRUNCATE:!0,UESCAPE:!0,UNION:!0,UNIQUE:!0,UNKNOWN:!0,UNNEST:!0,UPDATE:!0,UPPER:!0,UPSERT:!0,USER:!0,USING:!0,VALUE:!0,VALUES:!0,VALUE_OF:!0,VARBINARY:!0,VARCHAR:!0,VARYING:!0,VAR_POP:!0,VAR_SAMP:!0,VERSIONING:!0,WHEN:!0,WHENEVER:!0,WHERE:!0,WIDTH_BUCKET:!0,WINDOW:!0,WITH:!0,WITHIN:!0,WITHOUT:!0,YEAR:!0};function Xl(r,t){return{type:"unary_expr",operator:r,expr:t}}function Vl(r,t,e){return{type:"binary_expr",operator:r,left:t,right:e}}function ql(r){const t=n(Number.MAX_SAFE_INTEGER);return!(n(r)<t)}function Kl(r,t,e=3){const n=[r];for(let r=0;r<t.length;r++)delete t[r][e].tableList,delete t[r][e].columnList,n.push(t[r][e]);return n}function Zl(r,t){let e=r;for(let r=0;r<t.length;r++)e=Vl(t[r][1],e,t[r][3]);return e}function zl(r){return nc[r]||r||null}function Ql(r){const t=new Set;for(let e of r.keys()){const r=e.split("::");if(!r){t.add(e);break}r&&r[1]&&(r[1]=zl(r[1])),t.add(r.join("::"))}return Array.from(t)}function Jl(r){return"string"==typeof r?{type:"same",value:r}:r}let rc=[];const tc=new Set,ec=new Set,nc={};if((e=a())!==o&&Bo===r.length)return e;throw e!==o&&Bo<r.length&&Jo({type:"end"}),function(r,t,e){return new s(s.buildMessage(r,t),r,t,e)}(Vo,Xo<r.length?r.charAt(Xo):null,Xo<r.length?Qo(Xo,Xo+1):Qo(Xo,Xo))}}},function(r,t,e){var n=e(0);function s(r,t,e,n){this.message=r,this.expected=t,this.found=e,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,s)}!function(r,t){function e(){this.constructor=r}e.prototype=t.prototype,r.prototype=new e}(s,Error),s.buildMessage=function(r,t){var e={literal:function(r){return'"'+s(r.text)+'"'},class:function(r){var t,e="";for(t=0;t<r.parts.length;t++)e+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+e+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function n(r){return r.charCodeAt(0).toString(16).toUpperCase()}function s(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}function o(r){return r.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(r){return"\\x0"+n(r)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(r){return"\\x"+n(r)}))}return"Expected "+function(r){var t,n,s,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(s=r[t],e[s.type](s));if(o.sort(),o.length>0){for(t=1,n=1;t<o.length;t++)o[t-1]!==o[t]&&(o[n]=o[t],n++);o.length=n}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+s(r)+'"':"end of input"}(t)+" found."},r.exports={SyntaxError:s,parse:function(r,t){t=void 0!==t?t:{};var e,o={},u={start:wa},a=wa,i=va("IF",!0),l=va("EXTENSION",!0),c=va("SCHEMA",!0),f=va("VERSION",!0),b=va("CASCADED",!0),v=va("LOCAL",!0),p=va("CHECK",!0),L=va("OPTION",!1),C=va("check_option",!0),d=va("security_barrier",!0),w=va("security_invoker",!0),h=va("TYPE",!0),y=va("DOMAIN",!0),E=va("INCREMENT",!0),A=va("MINVALUE",!0),m=function(r,t){return{resource:"sequence",prefix:r.toLowerCase(),value:t}},T=va("NO",!0),I=va("MAXVALUE",!0),N=va("START",!0),R=va("CACHE",!0),S=va("CYCLE",!0),_=va("OWNED",!0),g=va("NONE",!0),O=va("NULLS",!0),x=va("FIRST",!0),U=va("LAST",!0),M=va("AUTO_INCREMENT",!0),k=va("UNIQUE",!0),D=va("KEY",!0),$=va("PRIMARY",!0),P=va("COLUMN_FORMAT",!0),F=va("FIXED",!0),G=va("DYNAMIC",!0),j=va("DEFAULT",!0),H=va("STORAGE",!0),Y=va("DISK",!0),B=va("MEMORY",!0),W=va("CASCADE",!0),X=va("RESTRICT",!0),V=va("OUT",!0),q=va("VARIADIC",!0),K=va("INOUT",!0),Z=va("AGGREGATE",!0),z=va("FUNCTION",!0),Q=va("OWNER",!0),J=va("CURRENT_ROLE",!0),rr=va("CURRENT_USER",!0),tr=va("SESSION_USER",!0),er=va("ALGORITHM",!0),nr=va("INSTANT",!0),sr=va("INPLACE",!0),or=va("COPY",!0),ur=va("LOCK",!0),ar=va("SHARED",!0),ir=va("EXCLUSIVE",!0),lr=va("PRIMARY KEY",!0),cr=va("FOREIGN KEY",!0),fr=va("MATCH FULL",!0),br=va("MATCH PARTIAL",!0),vr=va("MATCH SIMPLE",!0),pr=va("SET NULL",!0),Lr=va("NO ACTION",!0),Cr=va("SET DEFAULT",!0),dr=va("TRIGGER",!0),wr=va("BEFORE",!0),hr=va("AFTER",!0),yr=va("INSTEAD OF",!0),Er=va("ON",!0),Ar=va("EXECUTE",!0),mr=va("PROCEDURE",!0),Tr=va("OF",!0),Ir=va("NOT",!0),Nr=va("DEFERRABLE",!0),Rr=va("INITIALLY IMMEDIATE",!0),Sr=va("INITIALLY DEFERRED",!0),_r=va("FOR",!0),gr=va("EACH",!0),Or=va("ROW",!0),xr=va("STATEMENT",!0),Ur=va("CHARACTER",!0),Mr=va("SET",!0),kr=va("CHARSET",!0),Dr=va("COLLATE",!0),$r=va("AVG_ROW_LENGTH",!0),Pr=va("KEY_BLOCK_SIZE",!0),Fr=va("MAX_ROWS",!0),Gr=va("MIN_ROWS",!0),jr=va("STATS_SAMPLE_PAGES",!0),Hr=va("CONNECTION",!0),Yr=va("COMPRESSION",!0),Br=va("'",!1),Wr=va("ZLIB",!0),Xr=va("LZ4",!0),Vr=va("ENGINE",!0),qr=va("IN",!0),Kr=va("ACCESS SHARE",!0),Zr=va("ROW SHARE",!0),zr=va("ROW EXCLUSIVE",!0),Qr=va("SHARE UPDATE EXCLUSIVE",!0),Jr=va("SHARE ROW EXCLUSIVE",!0),rt=va("ACCESS EXCLUSIVE",!0),tt=va("SHARE",!0),et=va("MODE",!0),nt=va("NOWAIT",!0),st=va("TABLES",!0),ot=va("PREPARE",!0),ut=va(";",!1),at=va("(",!1),it=va(")",!1),lt=va('"',!1),ct=va("OUTFILE",!0),ft=va("DUMPFILE",!0),bt=va("BTREE",!0),vt=va("HASH",!0),pt=va("GIST",!0),Lt=va("GIN",!0),Ct=va("WITH",!0),dt=va("PARSER",!0),wt=va("VISIBLE",!0),ht=va("INVISIBLE",!0),yt=function(r,t){return t.unshift(r),t.forEach((r=>{const{table:t,as:e}=r;Sb[t]=t,e&&(Sb[e]=t),function(r){const t=mb(r);r.clear(),t.forEach((t=>r.add(t)))}(Rb)})),t},Et=va("LATERAL",!0),At=va("TABLESAMPLE",!0),mt=va("REPEATABLE",!0),Tt=va("CROSS",!0),It=va("FOLLOWING",!0),Nt=va("PRECEDING",!0),Rt=va("CURRENT",!0),St=va("UNBOUNDED",!0),_t=va("=",!1),gt=va("DO",!0),Ot=va("NOTHING",!0),xt=va("CONFLICT",!0),Ut=function(r,t){return Eb(r,t)},Mt=va("!",!1),kt=va(">=",!1),Dt=va(">",!1),$t=va("<=",!1),Pt=va("<>",!1),Ft=va("<",!1),Gt=va("!=",!1),jt=va("SIMILAR",!0),Ht=va("!~*",!1),Yt=va("~*",!1),Bt=va("~",!1),Wt=va("!~",!1),Xt=va("ESCAPE",!0),Vt=va("@>",!1),qt=va("<@",!1),Kt=va("?",!1),Zt=va("?|",!1),zt=va("?&",!1),Qt=va("#-",!1),Jt=va("+",!1),re=va("-",!1),te=va("*",!1),ee=va("/",!1),ne=va("%",!1),se=va("||",!1),oe=va("$",!1),ue=va("E",!0),ae=function(r){return!0===Cb[r.toUpperCase()]},ie=/^[^"]/,le=pa(['"'],!0,!1),ce=function(r){return r.join("")},fe=/^[^']/,be=pa(["'"],!0,!1),ve=va("`",!1),pe=/^[^`]/,Le=pa(["`"],!0,!1),Ce=/^[A-Za-z_\u4E00-\u9FA5]/,de=pa([["A","Z"],["a","z"],"_",["一","龥"]],!1,!1),we=/^[A-Za-z0-9_\-$\u4E00-\u9FA5]/,he=pa([["A","Z"],["a","z"],["0","9"],"_","-","$",["一","龥"]],!1,!1),ye=/^[A-Za-z0-9_\u4E00-\u9FA5]/,Ee=pa([["A","Z"],["a","z"],["0","9"],"_",["一","龥"]],!1,!1),Ae=va(":",!1),me=va("OVER",!0),Te=va("FILTER",!0),Ie=va("FIRST_VALUE",!0),Ne=va("LAST_VALUE",!0),Re=va("ROW_NUMBER",!0),Se=va("DENSE_RANK",!0),_e=va("RANK",!0),ge=va("LAG",!0),Oe=va("LEAD",!0),xe=va("NTH_VALUE",!0),Ue=va("IGNORE",!0),Me=va("RESPECT",!0),ke=va("percentile_cont",!0),De=va("percentile_disc",!0),$e=va("within",!0),Pe=va("mode",!0),Fe=va("SEPARATOR",!0),Ge=va("BOTH",!0),je=va("LEADING",!0),He=va("TRAILING",!0),Ye=va("trim",!0),Be=va("INPUT",!0),We=va("=>",!1),Xe=va("PATH",!0),Ve=va("OUTER",!0),qe=va("RECURSIVE",!0),Ke=va("now",!0),Ze=va("at",!0),ze=va("zone",!0),Qe=va("FLATTEN",!0),Je=va("CENTURY",!0),rn=va("DAY",!0),tn=va("DATE",!0),en=va("DECADE",!0),nn=va("DOW",!0),sn=va("DOY",!0),on=va("EPOCH",!0),un=va("HOUR",!0),an=va("ISODOW",!0),ln=va("ISOYEAR",!0),cn=va("MICROSECONDS",!0),fn=va("MILLENNIUM",!0),bn=va("MILLISECONDS",!0),vn=va("MINUTE",!0),pn=va("MONTH",!0),Ln=va("QUARTER",!0),Cn=va("SECOND",!0),dn=va("TIMEZONE",!0),wn=va("TIMEZONE_HOUR",!0),hn=va("TIMEZONE_MINUTE",!0),yn=va("WEEK",!0),En=va("YEAR",!0),An=va("NTILE",!0),mn=/^[\n]/,Tn=pa(["\n"],!1,!1),In=/^[^"\\\0-\x1F\x7F]/,Nn=pa(['"',"\\",["\0",""],""],!0,!1),Rn=/^[^'\\]/,Sn=pa(["'","\\"],!0,!1),_n=va("\\'",!1),gn=va('\\"',!1),On=va("\\\\",!1),xn=va("\\/",!1),Un=va("\\b",!1),Mn=va("\\f",!1),kn=va("\\n",!1),Dn=va("\\r",!1),$n=va("\\t",!1),Pn=va("\\u",!1),Fn=va("\\",!1),Gn=va("''",!1),jn=/^[\n\r]/,Hn=pa(["\n","\r"],!1,!1),Yn=va(".",!1),Bn=/^[0-9]/,Wn=pa([["0","9"]],!1,!1),Xn=/^[0-9a-fA-F]/,Vn=pa([["0","9"],["a","f"],["A","F"]],!1,!1),qn=/^[eE]/,Kn=pa(["e","E"],!1,!1),Zn=/^[+\-]/,zn=pa(["+","-"],!1,!1),Qn=va("NULL",!0),Jn=va("NOT NULL",!0),rs=va("TRUE",!0),ts=va("TO",!0),es=va("FALSE",!0),ns=va("SHOW",!0),ss=va("DROP",!0),os=va("USE",!0),us=va("ALTER",!0),as=va("SELECT",!0),is=va("UPDATE",!0),ls=va("CREATE",!0),cs=va("TEMPORARY",!0),fs=va("TEMP",!0),bs=va("DELETE",!0),vs=va("INSERT",!0),ps=va("RECURSIVE",!1),Ls=va("REPLACE",!0),Cs=va("RETURNING",!0),ds=va("RENAME",!0),ws=va("PARTITION",!0),hs=va("INTO",!0),ys=va("FROM",!0),Es=va("AS",!0),As=va("TABLE",!0),ms=va("DATABASE",!0),Ts=va("SEQUENCE",!0),Is=va("TABLESPACE",!0),Ns=va("DEALLOCATE",!0),Rs=va("LEFT",!0),Ss=va("RIGHT",!0),_s=va("FULL",!0),gs=va("INNER",!0),Os=va("JOIN",!0),xs=va("UNION",!0),Us=va("VALUES",!0),Ms=va("USING",!0),ks=va("WHERE",!0),Ds=va("GROUP",!0),$s=va("BY",!0),Ps=va("ORDER",!0),Fs=va("HAVING",!0),Gs=va("WINDOW",!0),js=va("LIMIT",!0),Hs=va("OFFSET",!0),Ys=va("ASC",!0),Bs=va("DESC",!0),Ws=va("ALL",!0),Xs=va("DISTINCT",!0),Vs=va("BETWEEN",!0),qs=va("IS",!0),Ks=va("LIKE",!0),Zs=va("ILIKE",!0),zs=va("EXISTS",!0),Qs=va("AND",!0),Js=va("OR",!0),ro=va("ARRAY",!0),to=va("ARRAY_AGG",!0),eo=va("COUNT",!0),no=va("GROUP_CONCAT",!0),so=va("MAX",!0),oo=va("MIN",!0),uo=va("SUM",!0),ao=va("AVG",!0),io=va("EXTRACT",!0),lo=va("CALL",!0),co=va("CASE",!0),fo=va("WHEN",!0),bo=va("THEN",!0),vo=va("ELSE",!0),po=va("END",!0),Lo=va("CAST",!0),Co=va("BOOL",!0),wo=va("BOOLEAN",!0),ho=va("CHAR",!0),yo=va("VARCHAR",!0),Eo=va("NUMERIC",!0),Ao=va("DECIMAL",!0),mo=va("SIGNED",!0),To=va("UNSIGNED",!0),Io=va("INT",!0),No=va("ZEROFILL",!0),Ro=va("INTEGER",!0),So=va("JSON",!0),_o=va("JSONB",!0),go=va("GEOMETRY",!0),Oo=va("SMALLINT",!0),xo=va("SERIAL",!0),Uo=va("TINYINT",!0),Mo=va("TINYTEXT",!0),ko=va("TEXT",!0),Do=va("MEDIUMTEXT",!0),$o=va("LONGTEXT",!0),Po=va("BIGINT",!0),Fo=va("ENUM",!0),Go=va("FLOAT",!0),jo=va("DOUBLE",!0),Ho=va("BIGSERIAL",!0),Yo=va("REAL",!0),Bo=va("DATETIME",!0),Wo=va("ROWS",!0),Xo=va("TIME",!0),Vo=va("TIMESTAMP",!0),qo=va("TRUNCATE",!0),Ko=va("USER",!0),Zo=va("UUID",!0),zo=va("OID",!0),Qo=va("REGCLASS",!0),Jo=va("REGCOLLATION",!0),ru=va("REGCONFIG",!0),tu=va("REGDICTIONARY",!0),eu=va("REGNAMESPACE",!0),nu=va("REGOPER",!0),su=va("REGOPERATOR",!0),ou=va("REGPROC",!0),uu=va("REGPROCEDURE",!0),au=va("REGROLE",!0),iu=va("REGTYPE",!0),lu=va("CURRENT_DATE",!0),cu=va("INTERVAL",!0),fu=va("CURRENT_TIME",!0),bu=va("CURRENT_TIMESTAMP",!0),vu=va("SYSTEM_USER",!0),pu=va("GLOBAL",!0),Lu=va("SESSION",!0),Cu=va("PERSIST",!0),du=va("PERSIST_ONLY",!0),wu=va("VIEW",!0),hu=va("@",!1),yu=va("@@",!1),Eu=va("$$",!1),Au=va("return",!0),mu=va(":=",!1),Tu=va("::",!1),Iu=va("DUAL",!0),Nu=va("ADD",!0),Ru=va("COLUMN",!0),Su=va("INDEX",!0),_u=va("FULLTEXT",!0),gu=va("SPATIAL",!0),Ou=va("COMMENT",!0),xu=va("CONSTRAINT",!0),Uu=va("CONCURRENTLY",!0),Mu=va("REFERENCES",!0),ku=va("SQL_CALC_FOUND_ROWS",!0),Du=va("SQL_CACHE",!0),$u=va("SQL_NO_CACHE",!0),Pu=va("SQL_SMALL_RESULT",!0),Fu=va("SQL_BIG_RESULT",!0),Gu=va("SQL_BUFFER_RESULT",!0),ju=va(",",!1),Hu=va("[",!1),Yu=va("]",!1),Bu=va("->",!1),Wu=va("->>",!1),Xu=va("#>",!1),Vu=va("#>>",!1),qu=va("&&",!1),Ku=va("/*",!1),Zu=va("*/",!1),zu=va("--",!1),Qu={type:"any"},Ju=/^[ \t\n\r]/,ra=pa([" ","\t","\n","\r"],!1,!1),ta=/^[^$]/,ea=pa(["$"],!0,!1),na=function(r){return{dataType:r}},sa=va("bytea",!0),oa=function(r){return{dataType:r}},ua=va("WITHOUT",!0),aa=va("ZONE",!0),ia=0,la=[{line:1,column:1}],ca=0,fa=[],ba=0;if("startRule"in t){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function va(r,t){return{type:"literal",text:r,ignoreCase:t}}function pa(r,t,e){return{type:"class",parts:r,inverted:t,ignoreCase:e}}function La(t){var e,n=la[t];if(n)return n;for(e=t-1;!la[e];)e--;for(n={line:(n=la[e]).line,column:n.column};e<t;)10===r.charCodeAt(e)?(n.line++,n.column=1):n.column++,e++;return la[t]=n,n}function Ca(r,t){var e=La(r),n=La(t);return{start:{offset:r,line:e.line,column:e.column},end:{offset:t,line:n.line,column:n.column}}}function da(r){ia<ca||(ia>ca&&(ca=ia,fa=[]),fa.push(r))}function wa(){var r,t;return r=ia,Vf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=ha())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Hf())!==o&&(a=Vf())!==o&&(i=ha())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Hf())!==o&&(a=Vf())!==o&&(i=ha())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?(t=function(r,t){const e=r&&r.ast||r,n=t&&t.length&&t[0].length>=4?[e]:e;for(let r=0;r<t.length;r++)t[r][3]&&0!==t[r][3].length&&n.push(t[r][3]&&t[r][3].ast||t[r][3]);return{tableList:Array.from(Nb),columnList:mb(Rb),ast:n}}(t,e),r=t):(ia=r,r=o)}else ia=r,r=o;return r}())!==o?r=t:(ia=r,r=o),r}function ha(){var t;return(t=Ea())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=ia,(t=Vf())!==o?((e=Qa())===o&&(e=null),e!==o&&Vf()!==o&&sc()!==o&&Vf()!==o&&(n=Ci())!==o&&Vf()!==o&&dc()!==o&&Vf()!==o&&(s=ki())!==o&&Vf()!==o?((u=fi())===o&&(u=null),u!==o&&Vf()!==o?((a=Ai())===o&&(a=null),a!==o&&Vf()!==o?((i=$i())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o){const u={};return t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"update";t&&(u[n]=t),n&&Nb.add(`${o}::${t}::${n}`)})),e&&e.forEach((r=>{if(r.table){const t=Ab(r.table);Nb.add(`update::${u[t]||null}::${t}`)}Rb.add(`update::${r.table}::${r.column}`)})),{tableList:Array.from(Nb),columnList:mb(Rb),ast:{with:r,type:"update",table:t,set:e,from:n,where:s,returning:o}}}(e,n,s,u,a,i),r=t):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c;return t=ia,(e=Gi())!==o&&Vf()!==o?((n=Lc())===o&&(n=null),n!==o&&Vf()!==o&&(s=yi())!==o&&Vf()!==o?((u=Fi())===o&&(u=null),u!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(a=fl())!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o&&(i=Pi())!==o&&Vf()!==o?((l=function(){var t,e,n,s;return t=ia,Ec()!==o&&Vf()!==o?("conflict"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(xt)),e!==o&&Vf()!==o?((n=function(){var r,t;return r=ia,Pf()!==o&&Vf()!==o&&(t=mi())!==o&&Vf()!==o&&Ff()!==o?r={type:"column",expr:t,parentheses:!0}:(ia=r,r=o),r}())===o&&(n=null),n!==o&&Vf()!==o&&(s=function(){var t,e,n,s,u;return t=ia,"do"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(gt)),e!==o&&Vf()!==o?("nothing"===r.substr(ia,7).toLowerCase()?(n=r.substr(ia,7),ia+=7):(n=o,0===ba&&da(Ot)),n!==o?t=e={keyword:"do",expr:{type:"origin",value:"nothing"}}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"do"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(gt)),e!==o&&Vf()!==o&&(n=sc())!==o&&Vf()!==o&&dc()!==o&&Vf()!==o&&(s=ki())!==o&&Vf()!==o?((u=Ai())===o&&(u=null),u!==o?t=e={keyword:"do",expr:{type:"update",set:s,where:u}}:(ia=t,t=o)):(ia=t,t=o)),t}())!==o?t={type:"conflict",keyword:"on",target:n,action:s}:(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(l=null),l!==o&&Vf()!==o?((c=$i())===o&&(c=null),c!==o?(e=function(r,t,e,n,s,o,u){if(t&&(Nb.add(`insert::${t.db}::${t.table}`),t.as=null),n){let r=t&&t.table||null;Array.isArray(s)&&s.forEach(((r,t)=>{if(r.value.length!=n.length)throw new Error("Error: column count doesn't match value count at row "+(t+1))})),n.forEach((t=>Rb.add(`insert::${r}::${t}`)))}return{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:r,table:[t],columns:n,values:s,partition:e,conflict:o,returning:u}}}(e,s,u,a,i,l,c),t=e):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=ia,(t=Gi())!==o&&Vf()!==o?((e=vc())===o&&(e=null),e!==o&&Vf()!==o?((n=Lc())===o&&(n=null),n!==o&&Vf()!==o&&(s=yi())!==o&&Vf()!==o?((u=Fi())===o&&(u=null),u!==o&&Vf()!==o&&(a=Pi())!==o&&Vf()!==o?((i=$i())===o&&(i=null),i!==o?(t=function(r,t,e,n,s,o,u){n&&(Nb.add(`insert::${n.db}::${n.table}`),Rb.add(`insert::${n.table}::(.*)`),n.as=null);const a=[t,e].filter((r=>r)).map((r=>r[0]&&r[0].toLowerCase())).join(" ");return{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:r,table:[n],columns:null,values:o,partition:s,prefix:a,returning:u}}}(t,e,n,s,u,a,i),r=t):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=ia,(t=ic())!==o&&Vf()!==o?((e=Ci())===o&&(e=null),e!==o&&Vf()!==o&&(n=fi())!==o&&Vf()!==o?((s=Ai())===o&&(s=null),s!==o?(t=function(r,t,e){if(t&&t.forEach((r=>{const{db:t,as:e,table:n,join:s}=r,o=s?"select":"delete";n&&Nb.add(`${o}::${t}::${n}`),s||Rb.add(`delete::${n}::(.*)`)})),null===r&&1===t.length){const e=t[0];r=[{db:e.db,table:e.table,as:e.as,addition:!0}]}return{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"delete",table:r,from:t,where:e}}}(e,n,s),r=t):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s,u,a,l,c,f,b,v,p;return t=ia,(e=tc())!==o&&Vf()!==o&&(n=hc())!==o&&Vf()!==o&&(s=Ci())!==o?(b=e,v=n,(p=s)&&p.forEach((r=>Nb.add(`${b}::${r.db}::${r.table}`))),t=e={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:b.toLowerCase(),keyword:v.toLowerCase(),name:p}}):(ia=t,t=o),t===o&&(t=ia,(e=tc())!==o&&Vf()!==o&&(n=_f())!==o&&Vf()!==o?((s=Mf())===o&&(s=null),s!==o&&Vf()!==o?(u=ia,"if"===r.substr(ia,2).toLowerCase()?(a=r.substr(ia,2),ia+=2):(a=o,0===ba&&da(i)),a!==o&&(l=Vf())!==o&&(c=Fc())!==o?u=a=[a,l,c]:(ia=u,u=o),u===o&&(u=null),u!==o&&(a=Vf())!==o&&(l=cl())!==o&&(c=Vf())!==o?("cascade"===r.substr(ia,7).toLowerCase()?(f=r.substr(ia,7),ia+=7):(f=o,0===ba&&da(W)),f===o&&("restrict"===r.substr(ia,8).toLowerCase()?(f=r.substr(ia,8),ia+=8):(f=o,0===ba&&da(X))),f===o&&(f=null),f!==o?(e=function(r,t,e,n,s,o){return{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:r.toLowerCase(),keyword:t.toLowerCase(),prefix:e,name:s,options:o&&[{type:"origin",value:o}]}}}(e,n,s,0,l,f),t=e):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)),t}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h;return r=ia,(t=oc())!==o&&Vf()!==o?((e=uc())===o&&(e=null),e!==o&&Vf()!==o&&hc()!==o&&Vf()!==o?((n=Aa())===o&&(n=null),n!==o&&Vf()!==o&&(s=Ci())!==o&&Vf()!==o&&(u=function(){var r,t,e,n,s,u,a,i;if(r=ia,Pf()!==o)if(Vf()!==o)if((t=Na())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Na())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Na())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o&&(n=Vf())!==o&&(s=Ff())!==o?r=yb(t,e):(ia=r,r=o)}else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;return r}())!==o&&Vf()!==o?((a=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Za())!==o){for(e=[],n=ia,(s=Vf())!==o?((u=Df())===o&&(u=null),u!==o&&(a=Vf())!==o&&(i=Za())!==o?n=s=[s,u,a,i]:(ia=n,n=o)):(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o?((u=Df())===o&&(u=null),u!==o&&(a=Vf())!==o&&(i=Za())!==o?n=s=[s,u,a,i]:(ia=n,n=o)):(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())===o&&(a=null),a!==o&&Vf()!==o?((i=vc())===o&&(i=fc()),i===o&&(i=null),i!==o&&Vf()!==o?((l=wc())===o&&(l=null),l!==o&&Vf()!==o?((c=Ea())===o&&(c=null),c!==o?(f=t,b=e,v=n,L=u,C=a,d=i,w=l,h=c,(p=s)&&p.forEach((r=>Nb.add(`create::${r.db}::${r.table}`))),r=t={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:f[0].toLowerCase(),keyword:"table",temporary:b&&b[0].toLowerCase(),if_not_exists:v,table:p,ignore_replace:d&&d[0].toLowerCase(),as:w&&w[0].toLowerCase(),query_expr:h&&h.ast,create_definitions:L,table_options:C}}):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,(t=oc())!==o&&Vf()!==o?((e=uc())===o&&(e=null),e!==o&&Vf()!==o&&hc()!==o&&Vf()!==o?((n=Aa())===o&&(n=null),n!==o&&Vf()!==o&&(s=Ci())!==o&&Vf()!==o&&(u=function r(){var t,e,n;return(t=function(){var r,t;return r=ia,$c()!==o&&Vf()!==o&&(t=Ci())!==o?r={type:"like",table:t}:(ia=r,r=o),r}())===o&&(t=ia,Pf()!==o&&Vf()!==o&&(e=r())!==o&&Vf()!==o&&Ff()!==o?((n=e).parentheses=!0,t=n):(ia=t,t=o)),t}())!==o?(t=function(r,t,e,n,s){return n&&n.forEach((r=>Nb.add(`create::${r.db}::${r.table}`))),{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:r[0].toLowerCase(),keyword:"table",temporary:t&&t[0].toLowerCase(),if_not_exists:e,table:n,like:s}}}(t,e,n,s,u),r=t):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T,I,N,R,S,_,g,O,x;return t=ia,oc()!==o&&Vf()!==o?(e=ia,(n=Hc())!==o&&(s=Vf())!==o&&(u=fc())!==o?e=n=[n,s,u]:(ia=e,e=o),e===o&&(e=null),e!==o&&(n=Vf())!==o?((s=Uf())===o&&(s=null),s!==o&&(u=Vf())!==o?("trigger"===r.substr(ia,7).toLowerCase()?(a=r.substr(ia,7),ia+=7):(a=o,0===ba&&da(dr)),a!==o&&Vf()!==o&&(i=hl())!==o&&Vf()!==o?("before"===r.substr(ia,6).toLowerCase()?(l=r.substr(ia,6),ia+=6):(l=o,0===ba&&da(wr)),l===o&&("after"===r.substr(ia,5).toLowerCase()?(l=r.substr(ia,5),ia+=5):(l=o,0===ba&&da(hr)),l===o&&("instead of"===r.substr(ia,10).toLowerCase()?(l=r.substr(ia,10),ia+=10):(l=o,0===ba&&da(yr)))),l!==o&&Vf()!==o&&(c=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Va())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Hc())!==o&&(a=Vf())!==o&&(i=Va())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Hc())!==o&&(a=Vf())!==o&&(i=Va())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())!==o&&Vf()!==o?("on"===r.substr(ia,2).toLowerCase()?(f=r.substr(ia,2),ia+=2):(f=o,0===ba&&da(Er)),f!==o&&Vf()!==o&&(b=yi())!==o&&Vf()!==o?(v=ia,(p=Cc())!==o&&(L=Vf())!==o&&(C=yi())!==o?v=p=[p,L,C]:(ia=v,v=o),v===o&&(v=null),v!==o&&(p=Vf())!==o?((L=function(){var t,e,n,s,u,a,i;return t=ia,e=ia,"not"===r.substr(ia,3).toLowerCase()?(n=r.substr(ia,3),ia+=3):(n=o,0===ba&&da(Ir)),n===o&&(n=null),n!==o&&(s=Vf())!==o?("deferrable"===r.substr(ia,10).toLowerCase()?(u=r.substr(ia,10),ia+=10):(u=o,0===ba&&da(Nr)),u!==o?e=n=[n,s,u]:(ia=e,e=o)):(ia=e,e=o),e!==o&&(n=Vf())!==o?("initially immediate"===r.substr(ia,19).toLowerCase()?(s=r.substr(ia,19),ia+=19):(s=o,0===ba&&da(Rr)),s===o&&("initially deferred"===r.substr(ia,18).toLowerCase()?(s=r.substr(ia,18),ia+=18):(s=o,0===ba&&da(Sr))),s!==o?(i=s,t=e={keyword:(a=e)&&a[0]?a[0].toLowerCase()+" deferrable":"deferrable",args:i&&i.toLowerCase()}):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(L=null),L!==o&&(C=Vf())!==o?((d=function(){var t,e,n,s,u,a,i;return t=ia,"for"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(_r)),e!==o&&Vf()!==o?("each"===r.substr(ia,4).toLowerCase()?(n=r.substr(ia,4),ia+=4):(n=o,0===ba&&da(gr)),n===o&&(n=null),n!==o&&Vf()!==o?("row"===r.substr(ia,3).toLowerCase()?(s=r.substr(ia,3),ia+=3):(s=o,0===ba&&da(Or)),s===o&&("statement"===r.substr(ia,9).toLowerCase()?(s=r.substr(ia,9),ia+=9):(s=o,0===ba&&da(xr))),s!==o?(u=e,i=s,t=e={keyword:(a=n)?`${u.toLowerCase()} ${a.toLowerCase()}`:u.toLowerCase(),args:i.toLowerCase()}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(d=null),d!==o&&Vf()!==o?((w=function(){var r,t;return r=ia,Wc()!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(t=Ki())!==o&&Vf()!==o&&Ff()!==o?r={type:"when",cond:t,parentheses:!0}:(ia=r,r=o),r}())===o&&(w=null),w!==o&&Vf()!==o?("execute"===r.substr(ia,7).toLowerCase()?(h=r.substr(ia,7),ia+=7):(h=o,0===ba&&da(Ar)),h!==o&&Vf()!==o?("procedure"===r.substr(ia,9).toLowerCase()?(y=r.substr(ia,9),ia+=9):(y=o,0===ba&&da(mr)),y===o&&("function"===r.substr(ia,8).toLowerCase()?(y=r.substr(ia,8),ia+=8):(y=o,0===ba&&da(z))),y!==o&&Vf()!==o&&(E=ab())!==o?(A=s,m=a,I=c,N=b,R=v,S=L,_=d,g=w,O=y,x=E,t={type:"create",replace:e&&"or replace",constraint:i,location:(T=l)&&T.toLowerCase(),events:I,table:N,from:R&&R[2],deferrable:S,for_each:_,when:g,execute:{keyword:"execute "+O.toLowerCase(),expr:x},constraint_type:m&&m.toLowerCase(),keyword:m&&m.toLowerCase(),constraint_kw:A&&A.toLowerCase(),resource:"constraint"}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,b,v,p,L,C,d,w,h,y,E,A,m;return t=ia,oc()!==o&&Vf()!==o?("extension"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(l)),e!==o&&Vf()!==o?((n=Aa())===o&&(n=null),n!==o&&Vf()!==o?((s=hl())===o&&(s=jl()),s!==o&&Vf()!==o?((u=Nc())===o&&(u=null),u!==o&&Vf()!==o?(a=ia,"schema"===r.substr(ia,6).toLowerCase()?(i=r.substr(ia,6),ia+=6):(i=o,0===ba&&da(c)),i!==o&&(b=Vf())!==o&&(v=hl())!==o?a=i=[i,b,v]:(ia=a,a=o),a===o&&(a=jl()),a===o&&(a=null),a!==o&&(i=Vf())!==o?(b=ia,"version"===r.substr(ia,7).toLowerCase()?(v=r.substr(ia,7),ia+=7):(v=o,0===ba&&da(f)),v!==o&&(p=Vf())!==o?((L=hl())===o&&(L=jl()),L!==o?b=v=[v,p,L]:(ia=b,b=o)):(ia=b,b=o),b===o&&(b=null),b!==o&&(v=Vf())!==o?(p=ia,(L=Cc())!==o&&(C=Vf())!==o?((d=hl())===o&&(d=jl()),d!==o?p=L=[L,C,d]:(ia=p,p=o)):(ia=p,p=o),p===o&&(p=null),p!==o?(w=n,h=s,y=u,E=a,A=b,m=p,t={type:"create",keyword:e.toLowerCase(),if_not_exists:w,extension:Tb(h),with:y&&y[0].toLowerCase(),schema:Tb(E&&E[2].toLowerCase()),version:Tb(A&&A[2]),from:Tb(m&&m[2])}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d,w,h,y,E,A,m,T,I,N,R,S,_,g,O;return t=ia,(e=oc())!==o&&Vf()!==o?((n=Of())===o&&(n=null),n!==o&&Vf()!==o&&(s=_f())!==o&&Vf()!==o?((u=Mf())===o&&(u=null),u!==o&&Vf()!==o?((a=bl())===o&&(a=null),a!==o&&Vf()!==o&&(i=Ec())!==o&&Vf()!==o&&(l=yi())!==o&&Vf()!==o?((c=vi())===o&&(c=null),c!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(f=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Ia())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Ia())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Ia())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o?(b=ia,(v=Nc())!==o&&(p=Vf())!==o&&(L=Pf())!==o&&(C=Vf())!==o&&(d=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Li())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Li())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Li())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())!==o&&(w=Vf())!==o&&(h=Ff())!==o?b=v=[v,p,L,C,d,w,h]:(ia=b,b=o),b===o&&(b=null),b!==o&&(v=Vf())!==o?(p=ia,(L=function(){var t,e,n,s;return t=ia,"tablespace"===r.substr(ia,10).toLowerCase()?(e=r.substr(ia,10),ia+=10):(e=o,0===ba&&da(Is)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="TABLESPACE":(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(C=Vf())!==o&&(d=hl())!==o?p=L=[L,C,d]:(ia=p,p=o),p===o&&(p=null),p!==o&&(L=Vf())!==o?((C=Ai())===o&&(C=null),C!==o&&(d=Vf())!==o?(y=e,E=n,A=s,m=u,T=a,I=i,N=l,R=c,S=f,_=b,g=p,O=C,t=e={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:y[0].toLowerCase(),index_type:E&&E.toLowerCase(),keyword:A.toLowerCase(),concurrently:m&&m.toLowerCase(),index:T,on_kw:I[0].toLowerCase(),table:N,index_using:R,index_columns:S,with:_&&_[4],with_before_where:!0,tablespace:g&&{type:"origin",value:g[2]},where:O}}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C;return t=ia,(e=oc())!==o&&Vf()!==o?((n=uc())===o&&(n=ac()),n===o&&(n=null),n!==o&&Vf()!==o&&function(){var t,e,n,s;return t=ia,"sequence"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(Ts)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SEQUENCE":(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o?((s=Aa())===o&&(s=null),s!==o&&Vf()!==o&&(u=yi())!==o&&Vf()!==o?(a=ia,(i=wc())!==o&&(l=Vf())!==o&&(c=vl())!==o?a=i=[i,l,c]:(ia=a,a=o),a===o&&(a=null),a!==o&&(i=Vf())!==o?((l=function(){var r,t,e,n,s,u;if(r=ia,(t=Ta())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Ta())!==o?n=s=[s,u]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Ta())!==o?n=s=[s,u]:(ia=n,n=o);e!==o?r=t=yb(t,e,1):(ia=r,r=o)}else ia=r,r=o;return r}())===o&&(l=null),l!==o?(f=e,b=n,v=s,L=a,C=l,(p=u).as=L&&L[2],t=e={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:f[0].toLowerCase(),keyword:"sequence",temporary:b&&b[0].toLowerCase(),if_not_exists:v,sequence:[p],create_definitions:C}}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;return t=ia,(e=oc())!==o&&Vf()!==o?((n=function(){var t,e,n,s;return t=ia,"database"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(ms)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="DATABASE":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(n=yc()),n!==o&&Vf()!==o?((s=Aa())===o&&(s=null),s!==o&&Vf()!==o&&(u=hl())!==o&&Vf()!==o?((a=function(){var r,t,e,n,s,u;if(r=ia,(t=Ka())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Ka())!==o?n=s=[s,u]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Ka())!==o?n=s=[s,u]:(ia=n,n=o);e!==o?r=t=yb(t,e,1):(ia=r,r=o)}else ia=r,r=o;return r}())===o&&(a=null),a!==o?(i=e,l=s,c=u,f=a,t=e={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:i[0].toLowerCase(),keyword:"database",if_not_exists:l,database:c,create_definitions:f}}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c;return t=ia,(e=oc())!==o&&Vf()!==o?("domain"===r.substr(ia,6).toLowerCase()?(n=r.substr(ia,6),ia+=6):(n=o,0===ba&&da(y)),n!==o&&Vf()!==o&&(s=yi())!==o&&Vf()!==o?((u=wc())===o&&(u=null),u!==o&&Vf()!==o&&(a=fb())!==o&&Vf()!==o?((i=_a())===o&&(i=null),i!==o&&Vf()!==o?((l=ga())===o&&(l=null),l!==o&&Vf()!==o?((c=Ba())===o&&(c=null),c!==o?(e=function(r,t,e,n,s,o,u,a){a&&(a.type="constraint");const i=[o,u,a].filter((r=>r));return{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:r[0].toLowerCase(),keyword:t.toLowerCase(),domain:{schema:e.db,name:e.table},as:n&&n[0]&&n[0].toLowerCase(),target:s,create_definitions:i}}}(e,n,s,u,a,i,l,c),t=e):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p;return t=ia,(e=oc())!==o&&Vf()!==o?("type"===r.substr(ia,4).toLowerCase()?(n=r.substr(ia,4),ia+=4):(n=o,0===ba&&da(h)),n!==o&&Vf()!==o&&(s=yi())!==o&&Vf()!==o&&(u=wc())!==o&&Vf()!==o&&(a=cf())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o?((i=Yi())===o&&(i=null),i!==o&&Vf()!==o&&Ff()!==o?(l=e,c=n,f=s,b=u,v=a,(p=i).parentheses=!0,t=e={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:l[0].toLowerCase(),keyword:c.toLowerCase(),name:{schema:f.db,name:f.table},as:b&&b[0]&&b[0].toLowerCase(),resource:v.toLowerCase(),create_definitions:p}}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=oc())!==o&&Vf()!==o?("type"===r.substr(ia,4).toLowerCase()?(n=r.substr(ia,4),ia+=4):(n=o,0===ba&&da(h)),n!==o&&Vf()!==o&&(s=yi())!==o?(e=function(r,t,e){return{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:r[0].toLowerCase(),keyword:t.toLowerCase(),name:{schema:e.db,name:e.table}}}}(e,n,s),t=e):(ia=t,t=o)):(ia=t,t=o)),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,C,d,w,h,y,E,A,m,T,I,N,R,S,_,g,O,x;return t=ia,(e=oc())!==o&&Vf()!==o?(n=ia,(s=Hc())!==o&&(u=Vf())!==o&&(a=fc())!==o?n=s=[s,u,a]:(ia=n,n=o),n===o&&(n=null),n!==o&&(s=Vf())!==o?((u=ac())===o&&(u=uc()),u===o&&(u=null),u!==o&&(a=Vf())!==o?((i=cc())===o&&(i=null),i!==o&&Vf()!==o&&function(){var t,e,n,s;return t=ia,"view"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(wu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="VIEW":(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o&&(l=yi())!==o&&Vf()!==o?(c=ia,(f=Pf())!==o&&(C=Vf())!==o&&(d=fl())!==o&&(w=Vf())!==o&&(h=Ff())!==o?c=f=[f,C,d,w,h]:(ia=c,c=o),c===o&&(c=null),c!==o&&(f=Vf())!==o?(C=ia,(d=Nc())!==o&&(w=Vf())!==o&&(h=Pf())!==o&&(y=Vf())!==o&&(E=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=ma())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=ma())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=ma())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())!==o&&(A=Vf())!==o&&(m=Ff())!==o?C=d=[d,w,h,y,E,A,m]:(ia=C,C=o),C===o&&(C=null),C!==o&&(d=Vf())!==o&&(w=wc())!==o&&(h=Vf())!==o&&(y=ti())!==o&&(E=Vf())!==o?((A=function(){var t,e,n,s;return t=ia,Nc()!==o&&Vf()!==o?("cascaded"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(b)),e===o&&("local"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(v))),e!==o&&Vf()!==o?("check"===r.substr(ia,5).toLowerCase()?(n=r.substr(ia,5),ia+=5):(n=o,0===ba&&da(p)),n!==o&&Vf()!==o?("OPTION"===r.substr(ia,6)?(s="OPTION",ia+=6):(s=o,0===ba&&da(L)),s!==o?t=`with ${e.toLowerCase()} check option`:(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,Nc()!==o&&Vf()!==o?("check"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(p)),e!==o&&Vf()!==o?("OPTION"===r.substr(ia,6)?(n="OPTION",ia+=6):(n=o,0===ba&&da(L)),n!==o?t="with check option":(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)),t}())===o&&(A=null),A!==o?(T=e,I=n,N=u,R=i,_=c,g=C,O=y,x=A,(S=l).view=S.table,delete S.table,t=e={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:T[0].toLowerCase(),keyword:"view",replace:I&&"or replace",temporary:N&&N[0].toLowerCase(),recursive:R&&R.toLowerCase(),columns:_&&_[2],select:O,view:S,with_options:g&&g[4],with:x}}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}()),t}())===o&&(t=function(){var r,t,e,n,s,u,a;return r=ia,(t=yf())!==o&&Vf()!==o?((e=hc())===o&&(e=null),e!==o&&Vf()!==o&&(n=Ci())!==o?(s=t,u=e,(a=n)&&a.forEach((r=>Nb.add(`${s}::${r.db}::${r.table}`))),r=t={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:s.toLowerCase(),keyword:u&&u.toLowerCase()||"table",name:a}}):(ia=r,r=o)):(ia=r,r=o),r}())===o&&(t=function(){var r,t,e;return r=ia,bc()!==o&&Vf()!==o&&hc()!==o&&Vf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=bi())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=bi())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=bi())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())!==o?((e=t).forEach((r=>r.forEach((r=>r.table&&Nb.add(`rename::${r.db}::${r.table}`))))),r={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"rename",table:e}}):(ia=r,r=o),r}())===o&&(t=function(){var t,e,n;return t=ia,function(){var t,e,n,s;return t=ia,"call"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(lo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="CALL":(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o&&(e=ab())!==o?(n=e,t={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"call",expr:n}}):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ia,function(){var t,e,n,s;return t=ia,"use"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(os)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o&&(e=bl())!==o?(n=e,Nb.add(`use::${n}::null`),t={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"use",db:n}}):(ia=t,t=o),t}())===o&&(t=function(){var t;return(t=function(){var r,t,e,n,s;return r=ia,ec()!==o&&Vf()!==o&&hc()!==o&&Vf()!==o&&(t=Ci())!==o&&Vf()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Ma())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Ma())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Ma())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())!==o?(s=e,(n=t)&&n.length>0&&n.forEach((r=>Nb.add(`alter::${r.db}::${r.table}`))),r={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"alter",table:n,expr:s}}):(ia=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s;return r=ia,(t=ec())!==o&&Vf()!==o&&(e=yc())!==o&&Vf()!==o&&(n=hl())!==o&&Vf()!==o?((s=ka())===o&&(s=Da())===o&&(s=$a()),s!==o?(t=function(r,t,e){const n=r.toLowerCase();return e.resource=n,e[n]=e.table,delete e.table,{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"alter",keyword:n,schema:t,expr:e}}}(e,n,s),r=t):(ia=r,r=o)):(ia=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u;return t=ia,(e=ec())!==o&&Vf()!==o?("domain"===r.substr(ia,6).toLowerCase()?(n=r.substr(ia,6),ia+=6):(n=o,0===ba&&da(y)),n===o&&("type"===r.substr(ia,4).toLowerCase()?(n=r.substr(ia,4),ia+=4):(n=o,0===ba&&da(h))),n!==o&&Vf()!==o&&(s=yi())!==o&&Vf()!==o?((u=ka())===o&&(u=Da())===o&&(u=$a()),u!==o?(e=function(r,t,e){const n=r.toLowerCase();return e.resource=n,e[n]=e.table,delete e.table,{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"alter",keyword:n,name:{schema:t.db,name:t.table},expr:e}}}(n,s,u),t=e):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;return t=ia,(e=ec())!==o&&Vf()!==o?("function"===r.substr(ia,8).toLowerCase()?(n=r.substr(ia,8),ia+=8):(n=o,0===ba&&da(z)),n!==o&&Vf()!==o&&(s=yi())!==o&&Vf()!==o?(u=ia,(a=Pf())!==o&&(i=Vf())!==o?((l=Ua())===o&&(l=null),l!==o&&(c=Vf())!==o&&(f=Ff())!==o?u=a=[a,i,l,c,f]:(ia=u,u=o)):(ia=u,u=o),u===o&&(u=null),u!==o&&(a=Vf())!==o?((i=ka())===o&&(i=Da())===o&&(i=$a()),i!==o?(e=function(r,t,e,n){const s=r.toLowerCase();n.resource=s,n[s]=n.table,delete n.table;const o={};return e&&e[0]&&(o.parentheses=!0),o.expr=e&&e[2],{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"alter",keyword:s,name:{schema:t.db,name:t.table},args:o,expr:n}}}(n,s,u,i),t=e):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a;return t=ia,(e=ec())!==o&&Vf()!==o?("aggregate"===r.substr(ia,9).toLowerCase()?(n=r.substr(ia,9),ia+=9):(n=o,0===ba&&da(Z)),n!==o&&Vf()!==o&&(s=yi())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(u=function(){var r,t,e;return r=ia,(t=$f())!==o&&(t=[{name:"*"}]),(r=t)===o&&(r=ia,(t=Ua())===o&&(t=null),t!==o&&Vf()!==o&&_c()!==o&&Vf()!==o&&Sc()!==o&&Vf()!==o&&(e=Ua())!==o?(t=function(r,t){const e=r||[];return e.orderby=t,e}(t,e),r=t):(ia=r,r=o),r===o&&(r=Ua())),r}())!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o?((a=ka())===o&&(a=Da())===o&&(a=$a()),a!==o?(e=function(r,t,e,n){const s=r.toLowerCase();return n.resource=s,n[s]=n.table,delete n.table,{tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"alter",keyword:s,name:{schema:t.db,name:t.table},args:{parentheses:!0,expr:e,orderby:e.orderby},expr:n}}}(n,s,u,a),t=e):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}()),t}())===o&&(t=function(){var t,e,n,s,u;return t=ia,dc()!==o&&Vf()!==o?((e=function(){var t,e,n,s;return t=ia,"global"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(pu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="GLOBAL":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ia,"session"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Lu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SESSION":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ia,"local"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(v)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="LOCAL":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ia,"persist"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Cu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="PERSIST":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ia,"persist_only"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(du)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="PERSIST_ONLY":(ia=t,t=o)):(ia=t,t=o),t}()),e===o&&(e=null),e!==o&&Vf()!==o&&(n=tb())!==o?(s=e,(u=n).keyword=s,t={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"set",expr:u}}):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f;return t=ia,(e=function(){var t,e,n,s;return t=ia,"lock"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(ur)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&Vf()!==o?((n=hc())===o&&(n=null),n!==o&&Vf()!==o&&(s=Ci())!==o&&Vf()!==o?((u=function(){var t,e,n,s;return t=ia,"in"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(qr)),e!==o&&Vf()!==o?("access share"===r.substr(ia,12).toLowerCase()?(n=r.substr(ia,12),ia+=12):(n=o,0===ba&&da(Kr)),n===o&&("row share"===r.substr(ia,9).toLowerCase()?(n=r.substr(ia,9),ia+=9):(n=o,0===ba&&da(Zr)),n===o&&("row exclusive"===r.substr(ia,13).toLowerCase()?(n=r.substr(ia,13),ia+=13):(n=o,0===ba&&da(zr)),n===o&&("share update exclusive"===r.substr(ia,22).toLowerCase()?(n=r.substr(ia,22),ia+=22):(n=o,0===ba&&da(Qr)),n===o&&("share row exclusive"===r.substr(ia,19).toLowerCase()?(n=r.substr(ia,19),ia+=19):(n=o,0===ba&&da(Jr)),n===o&&("exclusive"===r.substr(ia,9).toLowerCase()?(n=r.substr(ia,9),ia+=9):(n=o,0===ba&&da(ir)),n===o&&("access exclusive"===r.substr(ia,16).toLowerCase()?(n=r.substr(ia,16),ia+=16):(n=o,0===ba&&da(rt)),n===o&&("share"===r.substr(ia,5).toLowerCase()?(n=r.substr(ia,5),ia+=5):(n=o,0===ba&&da(tt))))))))),n!==o&&Vf()!==o?("mode"===r.substr(ia,4).toLowerCase()?(s=r.substr(ia,4),ia+=4):(s=o,0===ba&&da(et)),s!==o?t=e={mode:`in ${n.toLowerCase()} mode`}:(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(u=null),u!==o&&Vf()!==o?("nowait"===r.substr(ia,6).toLowerCase()?(a=r.substr(ia,6),ia+=6):(a=o,0===ba&&da(nt)),a===o&&(a=null),a!==o?(i=n,c=u,f=a,(l=s)&&l.forEach((r=>Nb.add(`lock::${r.db}::${r.table}`))),e={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"lock",keyword:i&&i.toLowerCase(),tables:l.map((r=>({table:r}))),lock_mode:c,nowait:f}},t=e):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ia,rc()!==o&&Vf()!==o?("tables"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(st)),e!==o?t={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"show",keyword:"tables"}}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,rc()!==o&&Vf()!==o&&(e=cb())!==o?(n=e,t={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"show",keyword:"var",var:n}}):(ia=t,t=o)),t}())===o&&(t=function(){var t,e,n,s,u;return t=ia,function(){var t,e,n,s;return t=ia,"deallocate"===r.substr(ia,10).toLowerCase()?(e=r.substr(ia,10),ia+=10):(e=o,0===ba&&da(Ns)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="DEALLOCATE":(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o?("prepare"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(ot)),e===o&&(e=null),e!==o&&Vf()!==o?((n=hl())===o&&(n=xc()),n!==o?(s=e,u=n,t={tableList:Array.from(Nb),columnList:mb(Rb),ast:{type:"deallocate",keyword:s,expr:{type:"default",value:u}}}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}()),t}())===o&&(t=function(){var r,t;for(r=[],t=rb();t!==o;)r.push(t),t=rb();return r}()),t}function ya(){var t,e;return t=ia,function(){var t,e,n,s;return t=ia,"union"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(xs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o?((e=xc())===o&&(e=null),e!==o?t=e?"union all":"union":(ia=t,t=o)):(ia=t,t=o),t}function Ea(){var r,t,e,n,s,u,a,i;if(r=ia,(t=za())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=ya())!==o&&(a=Vf())!==o&&(i=za())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=ya())!==o&&(a=Vf())!==o&&(i=za())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o&&(n=Vf())!==o?((s=Oi())===o&&(s=null),s!==o&&(u=Vf())!==o?((a=Mi())===o&&(a=null),a!==o?r=t=function(r,t,e,n){let s=r;for(let r=0;r<t.length;r++)s._next=t[r][3],s.set_op=t[r][1],s=s._next;return e&&(r._orderby=e),n&&n.value&&n.value.length>0&&(r._limit=n),{tableList:Array.from(Nb),columnList:mb(Rb),ast:r}}(t,e,s,a):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)}else ia=r,r=o;return r}function Aa(){var t,e;return t=ia,"if"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(i)),e!==o&&Vf()!==o&&Gc()!==o&&Vf()!==o&&Fc()!==o?t=e="IF NOT EXISTS":(ia=t,t=o),t}function ma(){var t,e,n;return t=ia,"check_option"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(C)),e!==o&&Vf()!==o&&Nf()!==o&&Vf()!==o?("cascaded"===r.substr(ia,8).toLowerCase()?(n=r.substr(ia,8),ia+=8):(n=o,0===ba&&da(b)),n===o&&("local"===r.substr(ia,5).toLowerCase()?(n=r.substr(ia,5),ia+=5):(n=o,0===ba&&da(v))),n!==o?t=e={type:"check_option",value:n,symbol:"="}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"security_barrier"===r.substr(ia,16).toLowerCase()?(e=r.substr(ia,16),ia+=16):(e=o,0===ba&&da(d)),e===o&&("security_invoker"===r.substr(ia,16).toLowerCase()?(e=r.substr(ia,16),ia+=16):(e=o,0===ba&&da(w))),e!==o&&Vf()!==o&&Nf()!==o&&Vf()!==o&&(n=Gl())!==o?t=e=function(r,t){return{type:r.toLowerCase(),value:t.value?"true":"false",symbol:"="}}(e,n):(ia=t,t=o)),t}function Ta(){var t;return(t=function(){var t,e,n,s,u,a;return t=ia,"increment"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(E)),e!==o&&Vf()!==o?((n=Sc())===o&&(n=null),n!==o&&Vf()!==o&&(s=Wl())!==o?(u=e,a=s,t=e={resource:"sequence",prefix:n?u.toLowerCase()+" by":u.toLowerCase(),value:a}):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ia,"minvalue"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(A)),e!==o&&Vf()!==o&&(n=Wl())!==o?t=e=m(e,n):(ia=t,t=o),t===o&&(t=ia,"no"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(T)),e!==o&&Vf()!==o?("minvalue"===r.substr(ia,8).toLowerCase()?(n=r.substr(ia,8),ia+=8):(n=o,0===ba&&da(A)),n!==o?t=e={resource:"sequence",value:{type:"origin",value:"no minvalue"}}:(ia=t,t=o)):(ia=t,t=o)),t}())===o&&(t=function(){var t,e,n;return t=ia,"maxvalue"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(I)),e!==o&&Vf()!==o&&(n=Wl())!==o?t=e=m(e,n):(ia=t,t=o),t===o&&(t=ia,"no"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(T)),e!==o&&Vf()!==o?("maxvalue"===r.substr(ia,8).toLowerCase()?(n=r.substr(ia,8),ia+=8):(n=o,0===ba&&da(I)),n!==o?t=e={resource:"sequence",value:{type:"origin",value:"no maxvalue"}}:(ia=t,t=o)):(ia=t,t=o)),t}())===o&&(t=function(){var t,e,n,s,u,a;return t=ia,"start"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(N)),e!==o&&Vf()!==o?((n=Nc())===o&&(n=null),n!==o&&Vf()!==o&&(s=Wl())!==o?(u=e,a=s,t=e={resource:"sequence",prefix:n?u.toLowerCase()+" with":u.toLowerCase(),value:a}):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ia,"cache"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(R)),e!==o&&Vf()!==o&&(n=Wl())!==o?t=e=m(e,n):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ia,"no"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(T)),e===o&&(e=null),e!==o&&Vf()!==o?("cycle"===r.substr(ia,5).toLowerCase()?(n=r.substr(ia,5),ia+=5):(n=o,0===ba&&da(S)),n!==o?t=e={resource:"sequence",value:{type:"origin",value:e?"no cycle":"cycle"}}:(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ia,"owned"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(_)),e!==o&&Vf()!==o&&Sc()!==o&&Vf()!==o?("none"===r.substr(ia,4).toLowerCase()?(n=r.substr(ia,4),ia+=4):(n=o,0===ba&&da(g)),n!==o?t=e={resource:"sequence",prefix:"owned by",value:{type:"origin",value:"none"}}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"owned"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(_)),e!==o&&Vf()!==o&&Sc()!==o&&Vf()!==o&&(n=cl())!==o?t=e={resource:"sequence",prefix:"owned by",value:n}:(ia=t,t=o)),t}()),t}function Ia(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;return t=ia,(e=Ki())!==o&&Vf()!==o?((n=_a())===o&&(n=null),n!==o&&Vf()!==o?((s=bl())===o&&(s=null),s!==o&&Vf()!==o?((u=gc())===o&&(u=Oc()),u===o&&(u=null),u!==o&&Vf()!==o?(a=ia,"nulls"===r.substr(ia,5).toLowerCase()?(i=r.substr(ia,5),ia+=5):(i=o,0===ba&&da(O)),i!==o&&(l=Vf())!==o?("first"===r.substr(ia,5).toLowerCase()?(c=r.substr(ia,5),ia+=5):(c=o,0===ba&&da(x)),c===o&&("last"===r.substr(ia,4).toLowerCase()?(c=r.substr(ia,4),ia+=4):(c=o,0===ba&&da(U))),c!==o?a=i=[i,l,c]:(ia=a,a=o)):(ia=a,a=o),a===o&&(a=null),a!==o?(f=e,b=n,v=s,p=u,L=a,t=e={...f,collate:b,opclass:v,order_by:p&&p.toLowerCase(),nulls:L&&`${L[0].toLowerCase()} ${L[2].toLowerCase()}`}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}function Na(){var r;return(r=Sa())===o&&(r=Ga())===o&&(r=ja())===o&&(r=Ha()),r}function Ra(){var t,e,n,s;return(t=function(){var r,t,e,n,s;return r=ia,(t=Fl())===o&&(t=Pl()),t!==o&&Vf()!==o?((e=ga())===o&&(e=null),e!==o?(s=e,(n=t)&&!n.value&&(n.value="null"),r=t={default_val:s,nullable:n}):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,(t=ga())!==o&&Vf()!==o?((e=Fl())===o&&(e=Pl()),e===o&&(e=null),e!==o?(t=function(r,t){return t&&!t.value&&(t.value="null"),{default_val:r,nullable:t}}(t,e),r=t):(ia=r,r=o)):(ia=r,r=o)),r}())===o&&(t=ia,"auto_increment"===r.substr(ia,14).toLowerCase()?(e=r.substr(ia,14),ia+=14):(e=o,0===ba&&da(M)),e!==o&&(e={auto_increment:e.toLowerCase()}),(t=e)===o&&(t=ia,"unique"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(k)),e!==o&&Vf()!==o?("key"===r.substr(ia,3).toLowerCase()?(n=r.substr(ia,3),ia+=3):(n=o,0===ba&&da(D)),n===o&&(n=null),n!==o?t=e=function(r){const t=["unique"];return r&&t.push(r),{unique:t.join(" ").toLowerCase("")}}(n):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"primary"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da($)),e===o&&(e=null),e!==o&&Vf()!==o?("key"===r.substr(ia,3).toLowerCase()?(n=r.substr(ia,3),ia+=3):(n=o,0===ba&&da(D)),n!==o?t=e=function(r){const t=[];return r&&t.push("primary"),t.push("key"),{primary_key:t.join(" ").toLowerCase("")}}(e):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=Zf())!==o&&(e={comment:e}),(t=e)===o&&(t=ia,(e=_a())!==o&&(e={collate:e}),(t=e)===o&&(t=ia,(e=function(){var t,e,n;return t=ia,"column_format"===r.substr(ia,13).toLowerCase()?(e=r.substr(ia,13),ia+=13):(e=o,0===ba&&da(P)),e!==o&&Vf()!==o?("fixed"===r.substr(ia,5).toLowerCase()?(n=r.substr(ia,5),ia+=5):(n=o,0===ba&&da(F)),n===o&&("dynamic"===r.substr(ia,7).toLowerCase()?(n=r.substr(ia,7),ia+=7):(n=o,0===ba&&da(G)),n===o&&("default"===r.substr(ia,7).toLowerCase()?(n=r.substr(ia,7),ia+=7):(n=o,0===ba&&da(j)))),n!==o?t=e={type:"column_format",value:n.toLowerCase()}:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(e={column_format:e}),(t=e)===o&&(t=ia,(e=function(){var t,e,n;return t=ia,"storage"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(H)),e!==o&&Vf()!==o?("disk"===r.substr(ia,4).toLowerCase()?(n=r.substr(ia,4),ia+=4):(n=o,0===ba&&da(Y)),n===o&&("memory"===r.substr(ia,6).toLowerCase()?(n=r.substr(ia,6),ia+=6):(n=o,0===ba&&da(B))),n!==o?t=e={type:"storage",value:n.toLowerCase()}:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(e={storage:e}),(t=e)===o&&(t=ia,(e=Wa())!==o&&(e={reference_definition:e}),(t=e)===o&&(t=ia,(e=qa())!==o&&Vf()!==o?((n=Nf())===o&&(n=null),n!==o&&Vf()!==o&&(s=hl())!==o?t=e=function(r,t,e){return{character_set:{type:r,value:e,symbol:t}}}(e,n,s):(ia=t,t=o)):(ia=t,t=o)))))))))),t}function Sa(){var r,t,e,n,s,u,a;return r=ia,(t=cl())!==o&&Vf()!==o&&(e=fb())!==o&&Vf()!==o?((n=function(){var r,t,e,n,s,u;if(r=ia,(t=Ra())!==o)if(Vf()!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Ra())!==o?n=s=[s,u]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Ra())!==o?n=s=[s,u]:(ia=n,n=o);e!==o?r=t=function(r,t){let e=r;for(let r=0;r<t.length;r++)e={...e,...t[r][1]};return e}(t,e):(ia=r,r=o)}else ia=r,r=o;else ia=r,r=o;return r}())===o&&(n=null),n!==o?(s=t,u=e,a=n,Rb.add(`create::${s.table}::${s.column}`),r=t={column:s,definition:u,resource:"column",...a||{}}):(ia=r,r=o)):(ia=r,r=o),r}function _a(){var t,e,n;return t=ia,function(){var t,e,n,s;return t=ia,"collate"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Dr)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="COLLATE":(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o?((e=Nf())===o&&(e=null),e!==o&&Vf()!==o&&(n=bl())!==o?t={type:"collate",symbol:e,value:n}:(ia=t,t=o)):(ia=t,t=o),t}function ga(){var r,t;return r=ia,Ql()!==o&&Vf()!==o?((t=Dl())===o&&(t=Ki()),t!==o?r={type:"default",value:t}:(ia=r,r=o)):(ia=r,r=o),r}function Oa(){var t;return(t=kc())===o&&("out"===r.substr(ia,3).toLowerCase()?(t=r.substr(ia,3),ia+=3):(t=o,0===ba&&da(V)),t===o&&("variadic"===r.substr(ia,8).toLowerCase()?(t=r.substr(ia,8),ia+=8):(t=o,0===ba&&da(q)),t===o&&("inout"===r.substr(ia,5).toLowerCase()?(t=r.substr(ia,5),ia+=5):(t=o,0===ba&&da(K))))),t!==o&&(t=t.toUpperCase()),t}function xa(){var r,t,e,n;return r=ia,(t=Oa())===o&&(t=null),t!==o&&Vf()!==o&&(e=fb())!==o?r=t={mode:t,type:e}:(ia=r,r=o),r===o&&(r=ia,(t=Oa())===o&&(t=null),t!==o&&Vf()!==o&&(e=hl())!==o&&Vf()!==o&&(n=fb())!==o?r=t=function(r,t,e){return{mode:r,name:t,type:e}}(t,e,n):(ia=r,r=o)),r}function Ua(){var r,t,e,n,s,u,a,i;if(r=ia,(t=xa())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=xa())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=xa())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function Ma(){var r;return(r=function(){var r,t,e,n,s;return r=ia,Rf()!==o&&Vf()!==o?((t=Sf())===o&&(t=null),t!==o&&Vf()!==o&&(e=Sa())!==o?(n=t,s=e,r={action:"add",...s,keyword:n,resource:"column",type:"alter"}):(ia=r,r=o)):(ia=r,r=o),r}())===o&&(r=function(){var r,t;return r=ia,Rf()!==o&&Vf()!==o&&(t=Ha())!==o?r={action:"add",create_definitions:t,resource:"constraint",type:"alter"}:(ia=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=ia,tc()!==o&&Vf()!==o?((t=Sf())===o&&(t=null),t!==o&&Vf()!==o&&(e=cl())!==o?r={action:"drop",column:e,keyword:t,resource:"column",type:"alter"}:(ia=r,r=o)):(ia=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=ia,Rf()!==o&&Vf()!==o&&(t=Ga())!==o?(e=t,r={action:"add",type:"alter",...e}):(ia=r,r=o),r}())===o&&(r=function(){var r,t,e;return r=ia,Rf()!==o&&Vf()!==o&&(t=ja())!==o?(e=t,r={action:"add",type:"alter",...e}):(ia=r,r=o),r}())===o&&(r=ka())===o&&(r=Pa())===o&&(r=Fa()),r}function ka(){var r,t,e,n,s;return r=ia,bc()!==o&&Vf()!==o?((t=Jl())===o&&(t=wc()),t===o&&(t=null),t!==o&&Vf()!==o&&(e=bl())!==o?(s=e,r={action:"rename",type:"alter",resource:"table",keyword:(n=t)&&n[0].toLowerCase(),table:s}):(ia=r,r=o)):(ia=r,r=o),r}function Da(){var t,e,n;return t=ia,"owner"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Q)),e!==o&&Vf()!==o&&Jl()!==o&&Vf()!==o?((n=bl())===o&&("current_role"===r.substr(ia,12).toLowerCase()?(n=r.substr(ia,12),ia+=12):(n=o,0===ba&&da(J)),n===o&&("current_user"===r.substr(ia,12).toLowerCase()?(n=r.substr(ia,12),ia+=12):(n=o,0===ba&&da(rr)),n===o&&("session_user"===r.substr(ia,12).toLowerCase()?(n=r.substr(ia,12),ia+=12):(n=o,0===ba&&da(tr))))),n!==o?t=e={action:"owner",type:"alter",resource:"table",keyword:"to",table:n}:(ia=t,t=o)):(ia=t,t=o),t}function $a(){var r,t;return r=ia,dc()!==o&&Vf()!==o&&yc()!==o&&Vf()!==o&&(t=bl())!==o?r={action:"set",type:"alter",resource:"table",keyword:"schema",table:t}:(ia=r,r=o),r}function Pa(){var t,e,n,s;return t=ia,"algorithm"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(er)),e!==o&&Vf()!==o?((n=Nf())===o&&(n=null),n!==o&&Vf()!==o?("default"===r.substr(ia,7).toLowerCase()?(s=r.substr(ia,7),ia+=7):(s=o,0===ba&&da(j)),s===o&&("instant"===r.substr(ia,7).toLowerCase()?(s=r.substr(ia,7),ia+=7):(s=o,0===ba&&da(nr)),s===o&&("inplace"===r.substr(ia,7).toLowerCase()?(s=r.substr(ia,7),ia+=7):(s=o,0===ba&&da(sr)),s===o&&("copy"===r.substr(ia,4).toLowerCase()?(s=r.substr(ia,4),ia+=4):(s=o,0===ba&&da(or))))),s!==o?t=e={type:"alter",keyword:"algorithm",resource:"algorithm",symbol:n,algorithm:s}:(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}function Fa(){var t,e,n,s;return t=ia,"lock"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(ur)),e!==o&&Vf()!==o?((n=Nf())===o&&(n=null),n!==o&&Vf()!==o?("default"===r.substr(ia,7).toLowerCase()?(s=r.substr(ia,7),ia+=7):(s=o,0===ba&&da(j)),s===o&&("none"===r.substr(ia,4).toLowerCase()?(s=r.substr(ia,4),ia+=4):(s=o,0===ba&&da(g)),s===o&&("shared"===r.substr(ia,6).toLowerCase()?(s=r.substr(ia,6),ia+=6):(s=o,0===ba&&da(ar)),s===o&&("exclusive"===r.substr(ia,9).toLowerCase()?(s=r.substr(ia,9),ia+=9):(s=o,0===ba&&da(ir))))),s!==o?t=e={type:"alter",keyword:"lock",resource:"lock",symbol:n,lock:s}:(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}function Ga(){var r,t,e,n,s,u,a,i;return r=ia,(t=_f())===o&&(t=gf()),t!==o&&Vf()!==o?((e=dl())===o&&(e=null),e!==o&&Vf()!==o?((n=vi())===o&&(n=null),n!==o&&Vf()!==o&&(s=ri())!==o&&Vf()!==o?((u=pi())===o&&(u=null),u!==o&&Vf()!==o?(a=n,i=u,r=t={index:e,definition:s,keyword:t.toLowerCase(),index_type:a,resource:"index",index_options:i}):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r}function ja(){var t,e,n,s,u,a,i,l,c;return t=ia,(e=function(){var t,e,n,s;return t=ia,"fulltext"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(_u)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="FULLTEXT":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ia,"spatial"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(gu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SPATIAL":(ia=t,t=o)):(ia=t,t=o),t}()),e!==o&&Vf()!==o?((n=_f())===o&&(n=gf()),n===o&&(n=null),n!==o&&Vf()!==o?((s=dl())===o&&(s=null),s!==o&&Vf()!==o&&(u=ri())!==o&&Vf()!==o?((a=pi())===o&&(a=null),a!==o&&Vf()!==o?(i=e,c=a,t=e={index:s,definition:u,keyword:(l=n)&&`${i.toLowerCase()} ${l.toLowerCase()}`||i.toLowerCase(),index_options:c,resource:"index"}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}function Ha(){var t;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=ia,(e=Ya())===o&&(e=null),e!==o&&Vf()!==o?("primary key"===r.substr(ia,11).toLowerCase()?(n=r.substr(ia,11),ia+=11):(n=o,0===ba&&da(lr)),n!==o&&Vf()!==o?((s=vi())===o&&(s=null),s!==o&&Vf()!==o&&(u=ri())!==o&&Vf()!==o?((a=pi())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l.toLowerCase(),keyword:i&&i.keyword,index_type:c,resource:"constraint",index_options:b}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;return r=ia,(t=Ya())===o&&(t=null),t!==o&&Vf()!==o&&(e=Of())!==o&&Vf()!==o?((n=_f())===o&&(n=gf()),n===o&&(n=null),n!==o&&Vf()!==o?((s=dl())===o&&(s=null),s!==o&&Vf()!==o?((u=vi())===o&&(u=null),u!==o&&Vf()!==o&&(a=ri())!==o&&Vf()!==o?((i=pi())===o&&(i=null),i!==o?(c=e,f=n,b=s,v=u,p=a,L=i,r=t={constraint:(l=t)&&l.constraint,definition:p,constraint_type:f&&`${c.toLowerCase()} ${f.toLowerCase()}`||c.toLowerCase(),keyword:l&&l.keyword,index_type:v,index:b,resource:"constraint",index_options:L}):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r}())===o&&(t=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=ia,(e=Ya())===o&&(e=null),e!==o&&Vf()!==o?("foreign key"===r.substr(ia,11).toLowerCase()?(n=r.substr(ia,11),ia+=11):(n=o,0===ba&&da(cr)),n!==o&&Vf()!==o?((s=dl())===o&&(s=null),s!==o&&Vf()!==o&&(u=ri())!==o&&Vf()!==o?((a=Wa())===o&&(a=null),a!==o?(l=n,c=s,f=u,b=a,t=e={constraint:(i=e)&&i.constraint,definition:f,constraint_type:l,keyword:i&&i.keyword,index:c,resource:"constraint",reference_definition:b}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=Ba()),t}function Ya(){var r,t,e,n;return r=ia,(t=Uf())!==o&&Vf()!==o?((e=bl())===o&&(e=null),e!==o?(n=e,r=t={keyword:t.toLowerCase(),constraint:n}):(ia=r,r=o)):(ia=r,r=o),r}function Ba(){var t,e,n,s,u,a,i;return t=ia,(e=Ya())===o&&(e=null),e!==o&&Vf()!==o?("check"===r.substr(ia,5).toLowerCase()?(n=r.substr(ia,5),ia+=5):(n=o,0===ba&&da(p)),n!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(s=Zi())!==o&&Vf()!==o&&Ff()!==o?(a=n,i=s,t=e={constraint:(u=e)&&u.constraint,definition:[i],constraint_type:a.toLowerCase(),keyword:u&&u.keyword,resource:"constraint"}):(ia=t,t=o)):(ia=t,t=o),t}function Wa(){var t,e,n,s,u,a,i,l,c,f;return t=ia,(e=function(){var t,e,n,s;return t=ia,"references"===r.substr(ia,10).toLowerCase()?(e=r.substr(ia,10),ia+=10):(e=o,0===ba&&da(Mu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REFERENCES":(ia=t,t=o)):(ia=t,t=o),t}())!==o&&Vf()!==o&&(n=yi())!==o&&Vf()!==o&&(s=ri())!==o&&Vf()!==o?("match full"===r.substr(ia,10).toLowerCase()?(u=r.substr(ia,10),ia+=10):(u=o,0===ba&&da(fr)),u===o&&("match partial"===r.substr(ia,13).toLowerCase()?(u=r.substr(ia,13),ia+=13):(u=o,0===ba&&da(br)),u===o&&("match simple"===r.substr(ia,12).toLowerCase()?(u=r.substr(ia,12),ia+=12):(u=o,0===ba&&da(vr)))),u===o&&(u=null),u!==o&&Vf()!==o?((a=Xa())===o&&(a=null),a!==o&&Vf()!==o?((i=Xa())===o&&(i=null),i!==o?(l=u,c=a,f=i,t=e={definition:s,table:[n],keyword:e.toLowerCase(),match:l&&l.toLowerCase(),on_action:[c,f].filter((r=>r))}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=Xa())!==o&&(e={on_action:[e]}),t=e),t}function Xa(){var t,e,n,s;return t=ia,Ec()!==o&&Vf()!==o?((e=ic())===o&&(e=sc()),e!==o&&Vf()!==o&&(n=function(){var t,e,n;return t=ia,(e=Af())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o?((n=Yi())===o&&(n=null),n!==o&&Vf()!==o&&Ff()!==o?t=e={type:"function",name:e,args:n}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"restrict"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(X)),e===o&&("cascade"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(W)),e===o&&("set null"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(pr)),e===o&&("no action"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(Lr)),e===o&&("set default"===r.substr(ia,11).toLowerCase()?(e=r.substr(ia,11),ia+=11):(e=o,0===ba&&da(Cr)),e===o&&(e=Af()))))),e!==o&&(e={type:"origin",value:e.toLowerCase()}),t=e),t}())!==o?(s=n,t={type:"on "+e[0].toLowerCase(),value:s}):(ia=t,t=o)):(ia=t,t=o),t}function Va(){var t,e,n,s,u,a,i;return t=ia,(e=lc())===o&&(e=ic())===o&&(e=yf()),e!==o&&(i=e,e={keyword:Array.isArray(i)?i[0].toLowerCase():i.toLowerCase()}),(t=e)===o&&(t=ia,(e=sc())!==o&&Vf()!==o?(n=ia,"of"===r.substr(ia,2).toLowerCase()?(s=r.substr(ia,2),ia+=2):(s=o,0===ba&&da(Tr)),s!==o&&(u=Vf())!==o&&(a=mi())!==o?n=s=[s,u,a]:(ia=n,n=o),n===o&&(n=null),n!==o?t=e=function(r,t){return{keyword:r&&r[0]&&r[0].toLowerCase(),args:t&&{keyword:t[0],columns:t[2]}||null}}(e,n):(ia=t,t=o)):(ia=t,t=o)),t}function qa(){var t,e,n;return t=ia,"character"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(Ur)),e!==o&&Vf()!==o?("set"===r.substr(ia,3).toLowerCase()?(n=r.substr(ia,3),ia+=3):(n=o,0===ba&&da(Mr)),n!==o?t=e="CHARACTER SET":(ia=t,t=o)):(ia=t,t=o),t}function Ka(){var t,e,n,s,u,a,i,l,c;return t=ia,(e=Ql())===o&&(e=null),e!==o&&Vf()!==o?((n=qa())===o&&("charset"===r.substr(ia,7).toLowerCase()?(n=r.substr(ia,7),ia+=7):(n=o,0===ba&&da(kr)),n===o&&("collate"===r.substr(ia,7).toLowerCase()?(n=r.substr(ia,7),ia+=7):(n=o,0===ba&&da(Dr)))),n!==o&&Vf()!==o?((s=Nf())===o&&(s=null),s!==o&&Vf()!==o&&(u=hl())!==o?(i=n,l=s,c=u,t=e={keyword:(a=e)&&`${a[0].toLowerCase()} ${i.toLowerCase()}`||i.toLowerCase(),symbol:l,value:c}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}function Za(){var t,e,n,s,u,a,i,l,c;return t=ia,"auto_increment"===r.substr(ia,14).toLowerCase()?(e=r.substr(ia,14),ia+=14):(e=o,0===ba&&da(M)),e===o&&("avg_row_length"===r.substr(ia,14).toLowerCase()?(e=r.substr(ia,14),ia+=14):(e=o,0===ba&&da($r)),e===o&&("key_block_size"===r.substr(ia,14).toLowerCase()?(e=r.substr(ia,14),ia+=14):(e=o,0===ba&&da(Pr)),e===o&&("max_rows"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(Fr)),e===o&&("min_rows"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(Gr)),e===o&&("stats_sample_pages"===r.substr(ia,18).toLowerCase()?(e=r.substr(ia,18),ia+=18):(e=o,0===ba&&da(jr))))))),e!==o&&Vf()!==o?((n=Nf())===o&&(n=null),n!==o&&Vf()!==o&&(s=Wl())!==o?(l=n,c=s,t=e={keyword:e.toLowerCase(),symbol:l,value:c.value}):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=Ka())===o&&(t=ia,(e=xf())===o&&("connection"===r.substr(ia,10).toLowerCase()?(e=r.substr(ia,10),ia+=10):(e=o,0===ba&&da(Hr))),e!==o&&Vf()!==o?((n=Nf())===o&&(n=null),n!==o&&Vf()!==o&&(s=jl())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:`'${e.value}'`}}(e,n,s):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"compression"===r.substr(ia,11).toLowerCase()?(e=r.substr(ia,11),ia+=11):(e=o,0===ba&&da(Yr)),e!==o&&Vf()!==o?((n=Nf())===o&&(n=null),n!==o&&Vf()!==o?(s=ia,39===r.charCodeAt(ia)?(u="'",ia++):(u=o,0===ba&&da(Br)),u!==o?("zlib"===r.substr(ia,4).toLowerCase()?(a=r.substr(ia,4),ia+=4):(a=o,0===ba&&da(Wr)),a===o&&("lz4"===r.substr(ia,3).toLowerCase()?(a=r.substr(ia,3),ia+=3):(a=o,0===ba&&da(Xr)),a===o&&("none"===r.substr(ia,4).toLowerCase()?(a=r.substr(ia,4),ia+=4):(a=o,0===ba&&da(g)))),a!==o?(39===r.charCodeAt(ia)?(i="'",ia++):(i=o,0===ba&&da(Br)),i!==o?s=u=[u,a,i]:(ia=s,s=o)):(ia=s,s=o)):(ia=s,s=o),s!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.join("").toUpperCase()}}(e,n,s):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"engine"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Vr)),e!==o&&Vf()!==o?((n=Nf())===o&&(n=null),n!==o&&Vf()!==o&&(s=hl())!==o?t=e=function(r,t,e){return{keyword:r.toLowerCase(),symbol:t,value:e.toUpperCase()}}(e,n,s):(ia=t,t=o)):(ia=t,t=o)))),t}function za(){var t,e,n,s,u,a,i;return t=ia,(e=nc())!==o&&(n=Vf())!==o?(59===r.charCodeAt(ia)?(s=";",ia++):(s=o,0===ba&&da(ut)),s!==o?t=e={type:"select"}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ti())===o&&(t=ia,e=ia,40===r.charCodeAt(ia)?(n="(",ia++):(n=o,0===ba&&da(at)),n!==o&&(s=Vf())!==o&&(u=za())!==o&&(a=Vf())!==o?(41===r.charCodeAt(ia)?(i=")",ia++):(i=o,0===ba&&da(it)),i!==o?e=n=[n,s,u,a,i]:(ia=e,e=o)):(ia=e,e=o),e!==o&&(e={...e[2],parentheses_symbol:!0}),t=e),t}function Qa(){var r,t,e,n,s,u,a,i,l;if(r=ia,Nc()!==o)if(Vf()!==o)if((t=Ja())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Ja())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Ja())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=yb(t,e):(ia=r,r=o)}else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;return r===o&&(r=ia,Vf()!==o&&Nc()!==o&&(t=Vf())!==o&&(e=cc())!==o&&(n=Vf())!==o&&(s=Ja())!==o?((l=s).recursive=!0,r=[l]):(ia=r,r=o)),r}function Ja(){var r,t,e,n,s,u;return r=ia,(t=jl())===o&&(t=hl()),t!==o&&Vf()!==o?((e=ri())===o&&(e=null),e!==o&&Vf()!==o&&wc()!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(n=ha())!==o&&Vf()!==o&&Ff()!==o?(u=e,"string"==typeof(s=t)&&(s={type:"default",value:s}),r=t={name:s,stmt:n.ast,columns:u}):(ia=r,r=o)):(ia=r,r=o),r}function ri(){var r,t;return r=ia,Pf()!==o&&Vf()!==o&&(t=mi())!==o&&Vf()!==o&&Ff()!==o?r=t:(ia=r,r=o),r}function ti(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C;return t=ia,Vf()!==o?((e=Qa())===o&&(e=null),e!==o&&Vf()!==o&&nc()!==o&&qf()!==o?((n=function(){var r,t,e,n,s,u;if(r=ia,(t=ei())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=ei())!==o?n=s=[s,u]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=ei())!==o?n=s=[s,u]:(ia=n,n=o);e!==o?(t=function(r,t){const e=[r];for(let r=0,n=t.length;r<n;++r)e.push(t[r][1]);return e}(t,e),r=t):(ia=r,r=o)}else ia=r,r=o;return r}())===o&&(n=null),n!==o&&Vf()!==o?((s=function(){var r,t,e;return r=ia,(t=Uc())!==o&&Vf()!==o&&Ec()!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(e=mi())!==o&&Vf()!==o&&Ff()!==o?r=t={type:t+" ON",columns:e}:(ia=r,r=o),r===o&&(r=ia,(t=Uc())===o&&(t=null),t!==o&&(t=function(r){return{type:r}}(t)),r=t),r}())===o&&(s=null),s!==o&&Vf()!==o&&(u=ni())!==o&&Vf()!==o?((a=ci())===o&&(a=null),a!==o&&Vf()!==o?((i=fi())===o&&(i=null),i!==o&&Vf()!==o?((l=ci())===o&&(l=null),l!==o&&Vf()!==o?((c=Ai())===o&&(c=null),c!==o&&Vf()!==o?((f=function(){var r,t;return r=ia,Rc()!==o&&Vf()!==o&&Sc()!==o&&Vf()!==o&&(t=Yi())!==o?r=t.value:(ia=r,r=o),r}())===o&&(f=null),f!==o&&Vf()!==o?((b=function(){var t,e;return t=ia,function(){var t,e,n,s;return t=ia,"having"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Fs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o&&(e=Zi())!==o?t=e:(ia=t,t=o),t}())===o&&(b=null),b!==o&&Vf()!==o?((v=Oi())===o&&(v=null),v!==o&&Vf()!==o?((p=Mi())===o&&(p=null),p!==o&&Vf()!==o?((L=function(){var t,e;return t=ia,function(){var t,e,n,s;return t=ia,"window"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Gs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Ti())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Ti())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Ti())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())!==o?t={keyword:"window",type:"window",expr:e}:(ia=t,t=o),t}())===o&&(L=null),L!==o&&Vf()!==o?((C=ci())===o&&(C=null),C!==o?t=function(r,t,e,n,s,o,u,a,i,l,c,f,b,v){if(s&&u||s&&v||u&&v||s&&u&&v)throw new Error("A given SQL statement can contain at most one INTO clause");return o&&o.forEach((r=>r.table&&Nb.add(`select::${r.db}::${r.table}`))),{with:r,type:"select",options:t,distinct:e,columns:n,into:{...s||u||v||{},position:(s?"column":u&&"from")||v&&"end"},from:o,where:a,groupby:i,having:l,orderby:c,limit:f,window:b}}(e,n,s,u,a,i,l,c,f,b,v,p,L,C):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}function ei(){var t;return(t=function(){var t;return"sql_calc_found_rows"===r.substr(ia,19).toLowerCase()?(t=r.substr(ia,19),ia+=19):(t=o,0===ba&&da(ku)),t}())===o&&((t=function(){var t;return"sql_cache"===r.substr(ia,9).toLowerCase()?(t=r.substr(ia,9),ia+=9):(t=o,0===ba&&da(Du)),t}())===o&&(t=function(){var t;return"sql_no_cache"===r.substr(ia,12).toLowerCase()?(t=r.substr(ia,12),ia+=12):(t=o,0===ba&&da($u)),t}()),t===o&&(t=function(){var t;return"sql_big_result"===r.substr(ia,14).toLowerCase()?(t=r.substr(ia,14),ia+=14):(t=o,0===ba&&da(Fu)),t}())===o&&(t=function(){var t;return"sql_small_result"===r.substr(ia,16).toLowerCase()?(t=r.substr(ia,16),ia+=16):(t=o,0===ba&&da(Pu)),t}())===o&&(t=function(){var t;return"sql_buffer_result"===r.substr(ia,17).toLowerCase()?(t=r.substr(ia,17),ia+=17):(t=o,0===ba&&da(Gu)),t}())),t}function ni(){var r,t,e,n,s,u,a,i;if(r=ia,(t=xc())===o&&(t=ia,(e=$f())!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=$f())),t!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=ai())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=ai())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=function(r,t){Rb.add("select::null::(.*)");const e={expr:{type:"column_ref",table:null,column:"*"},as:null};return t&&t.length>0?yb(e,t):[e]}(0,e):(ia=r,r=o)}else ia=r,r=o;if(r===o)if(r=ia,(t=ai())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=ai())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=ai())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function si(){var r,t;return r=ia,Gf()!==o&&Vf()!==o?((t=Wl())===o&&(t=jl()),t!==o&&Vf()!==o&&jf()!==o?r={brackets:!0,index:t}:(ia=r,r=o)):(ia=r,r=o),r}function oi(){var r,t,e,n,s;return r=ia,(t=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Ki())!==o){for(e=[],n=ia,(s=Vf())!==o?((u=jc())===o&&(u=Hc())===o&&(u=Xf()),u!==o&&(a=Vf())!==o&&(i=Ki())!==o?n=s=[s,u,a,i]:(ia=n,n=o)):(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o?((u=jc())===o&&(u=Hc())===o&&(u=Xf()),u!==o&&(a=Vf())!==o&&(i=Ki())!==o?n=s=[s,u,a,i]:(ia=n,n=o)):(ia=n,n=o);e!==o?(t=function(r,t){const e=r.ast;if(e&&"select"===e.type&&(!(r.parentheses_symbol||r.parentheses||r.ast.parentheses||r.ast.parentheses_symbol)||1!==e.columns.length||"*"===e.columns[0].expr.column))throw new Error("invalid column clause with select statement");if(!t||0===t.length)return r;const n=t.length;let s=t[n-1][3];for(let e=n-1;e>=0;e--){const n=0===e?r:t[e-1][3];s=wb(t[e][1],n,s)}return s}(t,e),r=t):(ia=r,r=o)}else ia=r,r=o;return r}())!==o&&Vf()!==o?((e=si())===o&&(e=null),e!==o?(n=t,(s=e)&&(n.array_index=s),r=t=n):(ia=r,r=o)):(ia=r,r=o),r}function ui(){var t,e,n,s;return t=ia,34===r.charCodeAt(ia)?(e='"',ia++):(e=o,0===ba&&da(lt)),e===o&&(e=null),e!==o&&(n=fb())!==o?(34===r.charCodeAt(ia)?(s='"',ia++):(s=o,0===ba&&da(lt)),s===o&&(s=null),s!==o?t=e=function(r,t,e){if(r&&!e||!r&&e)throw new Error("double quoted not match");return r&&e&&(t.quoted='"'),t}(e,n,s):(ia=t,t=o)):(ia=t,t=o),t}function ai(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L,C,d;if(r=ia,(t=ll())!==o&&(t={expr:t,as:null}),(r=t)===o){if(r=ia,(t=oi())!==o)if((e=Vf())!==o)if((n=If())!==o)if((s=Vf())!==o)if((u=ui())!==o)if((a=Vf())!==o){for(i=[],l=ia,(c=Bf())===o&&(c=Yf()),c!==o&&(f=Vf())!==o?((b=jl())===o&&(b=Wl()),b!==o?l=c=[c,f,b]:(ia=l,l=o)):(ia=l,l=o);l!==o;)i.push(l),l=ia,(c=Bf())===o&&(c=Yf()),c!==o&&(f=Vf())!==o?((b=jl())===o&&(b=Wl()),b!==o?l=c=[c,f,b]:(ia=l,l=o)):(ia=l,l=o);if(i!==o)if((l=Vf())!==o){for(c=[],f=ia,(b=Vf())!==o?((v=sl())===o&&(v=ul()),v!==o&&(p=Vf())!==o&&(L=oi())!==o?f=b=[b,v,p,L]:(ia=f,f=o)):(ia=f,f=o);f!==o;)c.push(f),f=ia,(b=Vf())!==o?((v=sl())===o&&(v=ul()),v!==o&&(p=Vf())!==o&&(L=oi())!==o?f=b=[b,v,p,L]:(ia=f,f=o)):(ia=f,f=o);c!==o&&(f=Vf())!==o?((b=li())===o&&(b=null),b!==o?(C=i,r=t={as:b,type:"cast",expr:t,symbol:"::",target:u,tail:(d=c)&&d[0]&&{operator:d[0][1],expr:d[0][3]},arrows:C.map((r=>r[0])),properties:C.map((r=>r[2]))}):(ia=r,r=o)):(ia=r,r=o)}else ia=r,r=o;else ia=r,r=o}else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;r===o&&(r=ia,(t=bl())!==o&&(e=Vf())!==o&&(n=kf())!==o?(s=ia,(u=bl())!==o&&(a=Vf())!==o&&(i=kf())!==o?s=u=[u,a,i]:(ia=s,s=o),s===o&&(s=null),s!==o&&(u=Vf())!==o&&(a=$f())!==o?r=t=function(r,t){const e=t&&t[0];let n;return e&&(n=r,r=e),Rb.add(`select::${r}::(.*)`),{expr:{type:"column_ref",table:r,schema:n,column:"*"},as:null}}(t,s):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,t=ia,(e=bl())!==o&&(n=Vf())!==o&&(s=kf())!==o?t=e=[e,n,s]:(ia=t,t=o),t===o&&(t=null),t!==o&&(e=Vf())!==o&&(n=$f())!==o?r=t=function(r){const t=r&&r[0]||null;return Rb.add(`select::${t}::(.*)`),{expr:{type:"column_ref",table:t,column:"*"},as:null}}(t):(ia=r,r=o),r===o&&(r=ia,(t=Ll())!==o&&(e=Vf())!==o?((n=kf())===o&&(n=null),n!==o&&(s=(s=function(r,t){if(t)return!0}(0,n))?o:void 0)!==o&&(u=Vf())!==o?((a=li())===o&&(a=null),a!==o?r=t=function(r,t,e){return Rb.add("select::null::"+r),{type:"expr",expr:{type:"column_ref",table:null,column:r},as:e}}(t,0,a):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,(t=oi())!==o&&(e=Vf())!==o?((n=li())===o&&(n=null),n!==o?r=t=function(r,t){return{type:"expr",expr:r,as:t}}(t,n):(ia=r,r=o)):(ia=r,r=o)))))}return r}function ii(){var r,t,e;return r=ia,(t=wc())===o&&(t=null),t!==o&&Vf()!==o&&(e=vl())!==o?r=t=e:(ia=r,r=o),r}function li(){var r,t,e;return r=ia,(t=wc())!==o&&Vf()!==o&&(e=vl())!==o?r=t=e:(ia=r,r=o),r===o&&(r=ia,(t=wc())===o&&(t=null),t!==o&&Vf()!==o&&(e=bl())!==o?r=t=e:(ia=r,r=o)),r}function ci(){var t,e,n;return t=ia,Lc()!==o&&Vf()!==o&&(e=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=lb())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=lb())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=lb())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())!==o?t={keyword:"var",type:"into",expr:e}:(ia=t,t=o),t===o&&(t=ia,Lc()!==o&&Vf()!==o?("outfile"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(ct)),e===o&&("dumpfile"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(ft))),e===o&&(e=null),e!==o&&Vf()!==o?((n=jl())===o&&(n=bl()),n!==o?t={keyword:e,type:"into",expr:n}:(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)),t}function fi(){var r,t;return r=ia,Cc()!==o&&Vf()!==o&&(t=Ci())!==o?r=t:(ia=r,r=o),r}function bi(){var r,t,e;return r=ia,(t=yi())!==o&&Vf()!==o&&Jl()!==o&&Vf()!==o&&(e=yi())!==o?r=t=[t,e]:(ia=r,r=o),r}function vi(){var t,e;return t=ia,Ic()!==o&&Vf()!==o?("btree"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(bt)),e===o&&("hash"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(vt)),e===o&&("gist"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(pt)),e===o&&("gin"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(Lt))))),e!==o?t={keyword:"using",type:e.toLowerCase()}:(ia=t,t=o)):(ia=t,t=o),t}function pi(){var r,t,e,n,s,u;if(r=ia,(t=Li())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Li())!==o?n=s=[s,u]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Li())!==o?n=s=[s,u]:(ia=n,n=o);e!==o?r=t=function(r,t){const e=[r];for(let r=0;r<t.length;r++)e.push(t[r][1]);return e}(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function Li(){var t,e,n,s,u,a;return t=ia,(e=function(){var t,e,n,s;return t=ia,"key_block_size"===r.substr(ia,14).toLowerCase()?(e=r.substr(ia,14),ia+=14):(e=o,0===ba&&da(Pr)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="KEY_BLOCK_SIZE":(ia=t,t=o)):(ia=t,t=o),t}())!==o&&Vf()!==o?((n=Nf())===o&&(n=null),n!==o&&Vf()!==o&&(s=Wl())!==o?(u=n,a=s,t=e={type:e.toLowerCase(),symbol:u,expr:a}):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=hl())!==o&&Vf()!==o&&(n=Nf())!==o&&Vf()!==o?((s=Wl())===o&&(s=bl()),s!==o?t=e=function(r,t,e){return{type:r.toLowerCase(),symbol:t,expr:"string"==typeof e&&{type:"origin",value:e}||e}}(e,n,s):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=vi())===o&&(t=ia,"with"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Ct)),e!==o&&Vf()!==o?("parser"===r.substr(ia,6).toLowerCase()?(n=r.substr(ia,6),ia+=6):(n=o,0===ba&&da(dt)),n!==o&&Vf()!==o&&(s=hl())!==o?t=e={type:"with parser",expr:s}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"visible"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(wt)),e===o&&("invisible"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(ht))),e!==o&&(e=function(r){return{type:r.toLowerCase(),expr:r.toLowerCase()}}(e)),(t=e)===o&&(t=Zf())))),t}function Ci(){var r,t,e,n;if(r=ia,(t=wi())!==o){for(e=[],n=di();n!==o;)e.push(n),n=di();e!==o?r=t=yt(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function di(){var r,t,e;return r=ia,Vf()!==o&&(t=Df())!==o&&Vf()!==o&&(e=wi())!==o?r=e:(ia=r,r=o),r===o&&(r=ia,Vf()!==o&&(t=function(){var r,t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(r=ia,(t=hi())!==o)if(Vf()!==o)if((e=wi())!==o)if(Vf()!==o)if((n=Ic())!==o)if(Vf()!==o)if(Pf()!==o)if(Vf()!==o)if((s=hl())!==o){for(u=[],a=ia,(i=Vf())!==o&&(l=Df())!==o&&(c=Vf())!==o&&(f=hl())!==o?a=i=[i,l,c,f]:(ia=a,a=o);a!==o;)u.push(a),a=ia,(i=Vf())!==o&&(l=Df())!==o&&(c=Vf())!==o&&(f=hl())!==o?a=i=[i,l,c,f]:(ia=a,a=o);u!==o&&(a=Vf())!==o&&(i=Ff())!==o?(b=t,p=s,L=u,(v=e).join=b,v.using=yb(p,L),r=t=v):(ia=r,r=o)}else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;return r===o&&(r=ia,(t=hi())!==o&&Vf()!==o&&(e=wi())!==o&&Vf()!==o?((n=Ei())===o&&(n=null),n!==o?(t=function(r,t,e){return t.join=r,t.on=e,t}(t,e,n),r=t):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,(t=hi())!==o&&Vf()!==o&&(e=Pf())!==o&&Vf()!==o?((n=Ea())===o&&(n=Ci()),n!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o?((s=li())===o&&(s=null),s!==o&&(u=Vf())!==o?((a=Ei())===o&&(a=null),a!==o?(t=function(r,t,e,n){return Array.isArray(t)&&(t={type:"tables",expr:t}),t.parentheses=!0,{expr:t,as:e,join:r,on:n}}(t,n,s,a),r=t):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o))),r}())!==o?r=t:(ia=r,r=o)),r}function wi(){var t,e,n,s,u,a,i,l,c,f,b,v;return t=ia,(e=function(){var t;return"dual"===r.substr(ia,4).toLowerCase()?(t=r.substr(ia,4),ia+=4):(t=o,0===ba&&da(Iu)),t}())!==o&&(e={type:"dual"}),(t=e)===o&&(t=ia,(e=ji())!==o&&Vf()!==o?((n=ii())===o&&(n=null),n!==o?t=e={expr:{type:"values",values:e},as:n}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"lateral"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Et)),e===o&&(e=null),e!==o&&Vf()!==o&&(n=Pf())!==o&&Vf()!==o?((s=Ea())===o&&(s=ji()),s!==o&&Vf()!==o&&(u=Ff())!==o&&(a=Vf())!==o?((i=ii())===o&&(i=null),i!==o?t=e=function(r,t,e){return Array.isArray(t)&&(t={type:"values",values:t}),t.parentheses=!0,{prefix:r,expr:t,as:e}}(e,s,i):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"lateral"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Et)),e===o&&(e=null),e!==o&&Vf()!==o&&(n=Pf())!==o&&Vf()!==o&&(s=Ci())!==o&&Vf()!==o&&(u=Ff())!==o&&(a=Vf())!==o?((i=ii())===o&&(i=null),i!==o?t=e=function(r,t,e){return{prefix:r,expr:t={type:"tables",expr:t,parentheses:!0},as:e}}(e,s,i):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"lateral"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Et)),e===o&&(e=null),e!==o&&Vf()!==o&&(n=xl())!==o&&Vf()!==o?((s=li())===o&&(s=null),s!==o?t=e=function(r,t,e){return{prefix:r,type:"expr",expr:t,as:e}}(e,n,s):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=yi())!==o&&Vf()!==o?("tablesample"===r.substr(ia,11).toLowerCase()?(n=r.substr(ia,11),ia+=11):(n=o,0===ba&&da(At)),n!==o&&Vf()!==o&&(s=xl())!==o&&Vf()!==o?(u=ia,"repeatable"===r.substr(ia,10).toLowerCase()?(a=r.substr(ia,10),ia+=10):(a=o,0===ba&&da(mt)),a!==o&&(i=Vf())!==o&&(l=Pf())!==o&&(c=Vf())!==o&&(f=Wl())!==o&&(b=Vf())!==o&&(v=Ff())!==o?u=a=[a,i,l,c,f,b,v]:(ia=u,u=o),u===o&&(u=null),u!==o&&(a=Vf())!==o?((i=li())===o&&(i=null),i!==o?t=e=function(r,t,e,n){return{...r,as:n,tablesample:{expr:t,repeatable:e&&e[4]}}}(e,s,u,i):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=yi())!==o&&Vf()!==o?((n=li())===o&&(n=null),n!==o?t=e=function(r,t){return"var"===r.type?(r.as=t,r):{...r,as:t}}(e,n):(ia=t,t=o)):(ia=t,t=o))))))),t}function hi(){var t,e,n,s;return t=ia,(e=function(){var t,e,n,s;return t=ia,"left"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Rs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(n=Vf())!==o?((s=mc())===o&&(s=null),s!==o&&Vf()!==o&&Ac()!==o?t=e="LEFT JOIN":(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=function(){var t,e,n,s;return t=ia,"right"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Ss)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(n=Vf())!==o?((s=mc())===o&&(s=null),s!==o&&Vf()!==o&&Ac()!==o?t=e="RIGHT JOIN":(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=function(){var t,e,n,s;return t=ia,"full"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(_s)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(n=Vf())!==o?((s=mc())===o&&(s=null),s!==o&&Vf()!==o&&Ac()!==o?t=e="FULL JOIN":(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"cross"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Tt)),e!==o&&(n=Vf())!==o&&(s=Ac())!==o?t=e="CROSS JOIN":(ia=t,t=o),t===o&&(t=ia,e=ia,(n=function(){var t,e,n,s;return t=ia,"inner"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(gs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(s=Vf())!==o?e=n=[n,s]:(ia=e,e=o),e===o&&(e=null),e!==o&&(n=Ac())!==o?t=e="INNER JOIN":(ia=t,t=o))))),t}function yi(){var r,t,e,n,s,u,a,i,l,c;return r=ia,(t=bl())!==o?(e=ia,(n=Vf())!==o&&(s=kf())!==o&&(u=Vf())!==o&&(a=bl())!==o?e=n=[n,s,u,a]:(ia=e,e=o),e!==o?(n=ia,(s=Vf())!==o&&(u=kf())!==o&&(a=Vf())!==o&&(i=bl())!==o?n=s=[s,u,a,i]:(ia=n,n=o),n!==o?r=t=function(r,t,e){const n={db:null,table:r};return null!==e&&(n.db=r,n.schema=t[3],n.table=e[3]),n}(t,e,n):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,(t=bl())!==o&&(e=Vf())!==o&&(n=kf())!==o&&(s=Vf())!==o&&(u=$f())!==o?(c=t,Nb.add(`select::${c}::(.*)`),r=t={db:c,table:"*"}):(ia=r,r=o),r===o&&(r=ia,(t=bl())!==o?(e=ia,(n=Vf())!==o&&(s=kf())!==o&&(u=Vf())!==o&&(a=bl())!==o?e=n=[n,s,u,a]:(ia=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){const e={db:null,table:r};return null!==t&&(e.db=r,e.table=t[3]),e}(t,e):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,(t=lb())!==o&&((l=t).db=null,l.table=l.name,t=l),r=t))),r}function Ei(){var r,t;return r=ia,Ec()!==o&&Vf()!==o&&(t=Zi())!==o?r=t:(ia=r,r=o),r}function Ai(){var t,e;return t=ia,function(){var t,e,n,s;return t=ia,"where"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(ks)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o&&(e=Zi())!==o?t=e:(ia=t,t=o),t}function mi(){var r,t,e,n,s,u,a,i;if(r=ia,(t=cl())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=cl())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=cl())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function Ti(){var r,t,e;return r=ia,(t=hl())!==o&&Vf()!==o&&wc()!==o&&Vf()!==o&&(e=Ii())!==o?r=t={name:t,as_window_specification:e}:(ia=r,r=o),r}function Ii(){var r,t;return(r=hl())===o&&(r=ia,Pf()!==o&&Vf()!==o?((t=function(){var r,t,e,n;return r=ia,(t=gi())===o&&(t=null),t!==o&&Vf()!==o?((e=Oi())===o&&(e=null),e!==o&&Vf()!==o?((n=function(){var r,t,e,n,s;return r=ia,df()!==o&&Vf()!==o?((t=Ni())===o&&(t=Ri()),t!==o?r="rows "+t.value:(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,df()!==o&&Vf()!==o&&(t=Mc())!==o&&Vf()!==o&&(e=Ri())!==o&&Vf()!==o&&jc()!==o&&Vf()!==o&&(n=Ni())!==o?(s=n,r=`rows between ${e.value} and ${s.value}`):(ia=r,r=o)),r}())===o&&(n=null),n!==o?r=t={name:null,partitionby:t,orderby:e,window_frame_clause:n}:(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r}())===o&&(t=null),t!==o&&Vf()!==o&&Ff()!==o?r={window_specification:t||{},parentheses:!0}:(ia=r,r=o)):(ia=r,r=o)),r}function Ni(){var t,e,n,s;return t=ia,(e=_i())!==o&&Vf()!==o?("following"===r.substr(ia,9).toLowerCase()?(n=r.substr(ia,9),ia+=9):(n=o,0===ba&&da(It)),n!==o?((s=e).value+=" FOLLOWING",t=e=s):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=Si()),t}function Ri(){var t,e,n,s;return t=ia,(e=_i())!==o&&Vf()!==o?("preceding"===r.substr(ia,9).toLowerCase()?(n=r.substr(ia,9),ia+=9):(n=o,0===ba&&da(Nt)),n!==o?((s=e).value+=" PRECEDING",t=e=s):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=Si()),t}function Si(){var t,e,n;return t=ia,"current"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Rt)),e!==o&&Vf()!==o?("row"===r.substr(ia,3).toLowerCase()?(n=r.substr(ia,3),ia+=3):(n=o,0===ba&&da(Or)),n!==o?t=e={type:"single_quote_string",value:"current row"}:(ia=t,t=o)):(ia=t,t=o),t}function _i(){var t,e;return t=ia,"unbounded"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(St)),e!==o&&(e={type:"single_quote_string",value:e.toUpperCase()}),(t=e)===o&&(t=Wl()),t}function gi(){var r,t;return r=ia,pc()!==o&&Vf()!==o&&Sc()!==o&&Vf()!==o&&(t=ni())!==o?r=t:(ia=r,r=o),r}function Oi(){var r,t;return r=ia,_c()!==o&&Vf()!==o&&Sc()!==o&&Vf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=xi())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=xi())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=xi())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())!==o?r=t:(ia=r,r=o),r}function xi(){var t,e,n,s,u,a,i;return t=ia,(e=Ki())!==o&&Vf()!==o?((n=Oc())===o&&(n=gc()),n===o&&(n=null),n!==o&&Vf()!==o?(s=ia,"nulls"===r.substr(ia,5).toLowerCase()?(u=r.substr(ia,5),ia+=5):(u=o,0===ba&&da(O)),u!==o&&(a=Vf())!==o?("first"===r.substr(ia,5).toLowerCase()?(i=r.substr(ia,5),ia+=5):(i=o,0===ba&&da(x)),i===o&&("last"===r.substr(ia,4).toLowerCase()?(i=r.substr(ia,4),ia+=4):(i=o,0===ba&&da(U))),i===o&&(i=null),i!==o?s=u=[u,a,i]:(ia=s,s=o)):(ia=s,s=o),s===o&&(s=null),s!==o?t=e=function(r,t,e){const n={expr:r,type:t};return n.nulls=e&&[e[0],e[2]].filter((r=>r)).join(" "),n}(e,n,s):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}function Ui(){var r;return(r=Wl())===o&&(r=lb())===o&&(r=ml()),r}function Mi(){var t,e,n,s,u,a,i;return t=ia,e=ia,(n=function(){var t,e,n,s;return t=ia,"limit"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(js)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(s=Vf())!==o?((u=Ui())===o&&(u=xc()),u!==o?e=n=[n,s,u]:(ia=e,e=o)):(ia=e,e=o),e===o&&(e=null),e!==o&&(n=Vf())!==o?(s=ia,(u=function(){var t,e,n,s;return t=ia,"offset"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Hs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="OFFSET":(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(a=Vf())!==o&&(i=Ui())!==o?s=u=[u,a,i]:(ia=s,s=o),s===o&&(s=null),s!==o?t=e=function(r,t){const e=[];return r&&e.push("string"==typeof r[2]?{type:"origin",value:"all"}:r[2]),t&&e.push(t[2]),{seperator:t&&t[0]&&t[0].toLowerCase()||"",value:e}}(e,s):(ia=t,t=o)):(ia=t,t=o),t}function ki(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Di())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Di())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Di())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function Di(){var t,e,n,s,u,a,i,l,c;return t=ia,e=ia,(n=bl())!==o&&(s=Vf())!==o&&(u=kf())!==o?e=n=[n,s,u]:(ia=e,e=o),e===o&&(e=null),e!==o&&(n=Vf())!==o&&(s=Cl())!==o&&(u=Vf())!==o?(61===r.charCodeAt(ia)?(a="=",ia++):(a=o,0===ba&&da(_t)),a!==o&&Vf()!==o&&(i=nl())!==o?t=e={column:s,value:i,table:(c=e)&&c[0]}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,e=ia,(n=bl())!==o&&(s=Vf())!==o&&(u=kf())!==o?e=n=[n,s,u]:(ia=e,e=o),e===o&&(e=null),e!==o&&(n=Vf())!==o&&(s=Cl())!==o&&(u=Vf())!==o?(61===r.charCodeAt(ia)?(a="=",ia++):(a=o,0===ba&&da(_t)),a!==o&&Vf()!==o&&(i=Tc())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(l=cl())!==o&&Vf()!==o&&Ff()!==o?t=e=function(r,t,e){return{column:t,value:e,table:r&&r[0],keyword:"values"}}(e,s,l):(ia=t,t=o)):(ia=t,t=o)),t}function $i(){var t,e,n,s,u;return t=ia,(e=function(){var t,e,n,s;return t=ia,"returning"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(Cs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="RETURNING":(ia=t,t=o)):(ia=t,t=o),t}())!==o&&Vf()!==o?((n=ni())===o&&(n=za()),n!==o?(u=n,t=e={type:(s=e)&&s.toLowerCase()||"returning",columns:"*"===u&&[{type:"expr",expr:{type:"column_ref",table:null,column:"*"},as:null}]||u}):(ia=t,t=o)):(ia=t,t=o),t}function Pi(){var r;return(r=ji())===o&&(r=ti()),r}function Fi(){var r,t,e,n,s,u,a,i,l;if(r=ia,pc()!==o)if(Vf()!==o)if((t=Pf())!==o)if(Vf()!==o)if((e=hl())!==o){for(n=[],s=ia,(u=Vf())!==o&&(a=Df())!==o&&(i=Vf())!==o&&(l=hl())!==o?s=u=[u,a,i,l]:(ia=s,s=o);s!==o;)n.push(s),s=ia,(u=Vf())!==o&&(a=Df())!==o&&(i=Vf())!==o&&(l=hl())!==o?s=u=[u,a,i,l]:(ia=s,s=o);n!==o&&(s=Vf())!==o&&(u=Ff())!==o?r=yb(e,n):(ia=r,r=o)}else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;return r===o&&(r=ia,pc()!==o&&Vf()!==o&&(t=Hi())!==o?r=t:(ia=r,r=o)),r}function Gi(){var r,t;return r=ia,(t=lc())!==o&&(t="insert"),(r=t)===o&&(r=ia,(t=fc())!==o&&(t="replace"),r=t),r}function ji(){var r,t;return r=ia,Tc()!==o&&Vf()!==o&&(t=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Hi())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Hi())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Hi())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())!==o?r=t:(ia=r,r=o),r}function Hi(){var r,t;return r=ia,Pf()!==o&&Vf()!==o&&(t=Yi())!==o&&Vf()!==o&&Ff()!==o?r=t:(ia=r,r=o),r}function Yi(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Ki())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Ki())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=Ki())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=function(r,t){const e={type:"expr_list"};return e.value=yb(r,t),e}(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function Bi(){var t,e,n;return t=ia,Ef()!==o&&Vf()!==o&&(e=Ki())!==o&&Vf()!==o&&(n=function(){var t;return(t=function(){var t,e,n,s;return t=ia,"year"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(En)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="YEAR":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"month"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(pn)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="MONTH":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"day"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(rn)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="DAY":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"hour"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(un)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="HOUR":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"minute"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(vn)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="MINUTE":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"second"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Cn)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SECOND":(ia=t,t=o)):(ia=t,t=o),t}()),t}())!==o?t={type:"interval",expr:e,unit:n.toLowerCase()}:(ia=t,t=o),t===o&&(t=ia,Ef()!==o&&Vf()!==o&&(e=jl())!==o?t=function(r){return{type:"interval",expr:r,unit:""}}(e):(ia=t,t=o)),t}function Wi(){var r,t,e,n,s,u,a,i;return r=ia,Bc()!==o&&Vf()!==o&&(t=Xi())!==o&&Vf()!==o?((e=qi())===o&&(e=null),e!==o&&Vf()!==o&&(n=Xc())!==o&&Vf()!==o?((s=Bc())===o&&(s=null),s!==o?(a=t,(i=e)&&a.push(i),r={type:"case",expr:null,args:a}):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,Bc()!==o&&Vf()!==o&&(t=Ki())!==o&&Vf()!==o&&(e=Xi())!==o&&Vf()!==o?((n=qi())===o&&(n=null),n!==o&&Vf()!==o&&(s=Xc())!==o&&Vf()!==o?((u=Bc())===o&&(u=null),u!==o?r=function(r,t,e){return e&&t.push(e),{type:"case",expr:r,args:t}}(t,e,n):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)),r}function Xi(){var r,t,e,n,s,u;if(r=ia,(t=Vi())!==o)if(Vf()!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Vi())!==o?n=s=[s,u]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Vi())!==o?n=s=[s,u]:(ia=n,n=o);e!==o?r=t=yb(t,e,1):(ia=r,r=o)}else ia=r,r=o;else ia=r,r=o;return r}function Vi(){var t,e,n;return t=ia,Wc()!==o&&Vf()!==o&&(e=Zi())!==o&&Vf()!==o&&function(){var t,e,n,s;return t=ia,"then"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(bo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o&&(n=Ki())!==o?t={type:"when",cond:e,result:n}:(ia=t,t=o),t}function qi(){var t,e;return t=ia,function(){var t,e,n,s;return t=ia,"else"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(vo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o&&(e=Ki())!==o?t={type:"else",result:e}:(ia=t,t=o),t}function Ki(){var r;return(r=function(){var r;return(r=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=il())!==o){if(e=[],n=ia,(s=Vf())!==o&&(u=Xf())!==o&&(a=Vf())!==o&&(i=il())!==o?n=s=[s,u,a,i]:(ia=n,n=o),n!==o)for(;n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Xf())!==o&&(a=Vf())!==o&&(i=il())!==o?n=s=[s,u,a,i]:(ia=n,n=o);else e=o;e!==o&&(n=Vf())!==o?((s=rl())===o&&(s=null),s!==o?(t=function(r,t,e){const n=Eb(r,t);return null===e?n:"arithmetic"===e.type?Eb(n,e.tail):wb(e.op,n,e.right)}(t,e,s),r=t):(ia=r,r=o)):(ia=r,r=o)}else ia=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u,a,i;if(r=ia,(t=zi())!==o){for(e=[],n=ia,(s=qf())!==o&&(u=Hc())!==o&&(a=Vf())!==o&&(i=zi())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=qf())!==o&&(u=Hc())!==o&&(a=Vf())!==o&&(i=zi())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=Ut(t,e):(ia=r,r=o)}else ia=r,r=o;return r}())===o&&(r=function(){var r,t,e,n,s,u;if(r=ia,(t=sl())!==o){if(e=[],n=ia,(s=Vf())!==o&&(u=il())!==o?n=s=[s,u]:(ia=n,n=o),n!==o)for(;n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=il())!==o?n=s=[s,u]:(ia=n,n=o);else e=o;e!==o?r=t=db(t,e[0][1]):(ia=r,r=o)}else ia=r,r=o;return r}()),r}())===o&&(r=Ea()),r}function Zi(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Ki())!==o){for(e=[],n=ia,(s=Vf())!==o?((u=jc())===o&&(u=Hc())===o&&(u=Df()),u!==o&&(a=Vf())!==o&&(i=Ki())!==o?n=s=[s,u,a,i]:(ia=n,n=o)):(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o?((u=jc())===o&&(u=Hc())===o&&(u=Df()),u!==o&&(a=Vf())!==o&&(i=Ki())!==o?n=s=[s,u,a,i]:(ia=n,n=o)):(ia=n,n=o);e!==o?r=t=function(r,t){const e=t.length;let n=r,s="";for(let r=0;r<e;++r)","===t[r][1]?(s=",",Array.isArray(n)||(n=[n]),n.push(t[r][3])):n=wb(t[r][1],n,t[r][3]);if(","===s){const r={type:"expr_list"};return r.value=n,r}return n}(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function zi(){var r,t,e,n,s,u,a,i;if(r=ia,(t=Qi())!==o){for(e=[],n=ia,(s=qf())!==o&&(u=jc())!==o&&(a=Vf())!==o&&(i=Qi())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=qf())!==o&&(u=jc())!==o&&(a=Vf())!==o&&(i=Qi())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=Ut(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function Qi(){var t,e,n,s,u;return(t=Ji())===o&&(t=function(){var r,t,e,n,s;return r=ia,(t=function(){var r,t,e,n,s,u;return r=ia,t=ia,(e=Gc())!==o&&(n=Vf())!==o&&(s=Fc())!==o?t=e=[e,n,s]:(ia=t,t=o),t!==o&&(t=(u=t)[0]+" "+u[2]),(r=t)===o&&(r=Fc()),r}())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(e=Ea())!==o&&Vf()!==o&&Ff()!==o?(n=t,(s=e).parentheses=!0,r=t=db(n,s)):(ia=r,r=o),r}())===o&&(t=ia,(e=Gc())===o&&(e=ia,33===r.charCodeAt(ia)?(n="!",ia++):(n=o,0===ba&&da(Mt)),n!==o?(s=ia,ba++,61===r.charCodeAt(ia)?(u="=",ia++):(u=o,0===ba&&da(_t)),ba--,u===o?s=void 0:(ia=s,s=o),s!==o?e=n=[n,s]:(ia=e,e=o)):(ia=e,e=o)),e!==o&&(n=Vf())!==o&&(s=Qi())!==o?t=e=db("NOT",s):(ia=t,t=o)),t}function Ji(){var r,t,e,n,s;return r=ia,(t=nl())!==o&&Vf()!==o?((e=rl())===o&&(e=null),e!==o?(n=t,r=t=null===(s=e)?n:"arithmetic"===s.type?Eb(n,s.tail):wb(s.op,n,s.right)):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=jl())===o&&(r=cl()),r}function rl(){var t;return(t=function(){var r,t,e,n,s,u;if(r=[],t=ia,(e=Vf())!==o&&(n=tl())!==o&&(s=Vf())!==o&&(u=nl())!==o?t=e=[e,n,s,u]:(ia=t,t=o),t!==o)for(;t!==o;)r.push(t),t=ia,(e=Vf())!==o&&(n=tl())!==o&&(s=Vf())!==o&&(u=nl())!==o?t=e=[e,n,s,u]:(ia=t,t=o);else r=o;return r!==o&&(r={type:"arithmetic",tail:r}),r}())===o&&(t=function(){var r,t,e,n;return r=ia,(t=el())!==o&&Vf()!==o&&(e=Pf())!==o&&Vf()!==o&&(n=Yi())!==o&&Vf()!==o&&Ff()!==o?r=t={op:t,right:n}:(ia=r,r=o),r===o&&(r=ia,(t=el())!==o&&Vf()!==o?((e=lb())===o&&(e=jl()),e!==o?(t=function(r,t){return{op:r,right:t}}(t,e),r=t):(ia=r,r=o)):(ia=r,r=o)),r}())===o&&(t=function(){var r,t,e,n;return r=ia,(t=function(){var r,t,e,n,s,u;return r=ia,t=ia,(e=Gc())!==o&&(n=Vf())!==o&&(s=Mc())!==o?t=e=[e,n,s]:(ia=t,t=o),t!==o&&(t=(u=t)[0]+" "+u[2]),(r=t)===o&&(r=Mc()),r}())!==o&&Vf()!==o&&(e=nl())!==o&&Vf()!==o&&jc()!==o&&Vf()!==o&&(n=nl())!==o?r=t={op:t,right:{type:"expr_list",value:[e,n]}}:(ia=r,r=o),r}())===o&&(t=function(){var r,t,e,n,s,u,a,i,l;return r=ia,(t=Dc())!==o&&(e=Vf())!==o&&(n=nl())!==o?r=t={op:"IS",right:n}:(ia=r,r=o),r===o&&(r=ia,(t=Dc())!==o&&(e=Vf())!==o?(n=ia,(s=Uc())!==o&&(u=Vf())!==o&&(a=Cc())!==o&&(i=Vf())!==o&&(l=yi())!==o?n=s=[s,u,a,i,l]:(ia=n,n=o),n!==o?(t=function(r){const{db:t,table:e}=r.pop(),n="*"===e?"*":`"${e}"`;return{op:"IS",right:{type:"default",value:"DISTINCT FROM "+(t?`"${t}".${n}`:n)}}}(n),r=t):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,t=ia,(e=Dc())!==o&&(n=Vf())!==o&&(s=Gc())!==o?t=e=[e,n,s]:(ia=t,t=o),t!==o&&(e=Vf())!==o&&(n=nl())!==o?(t=function(r){return{op:"IS NOT",right:r}}(n),r=t):(ia=r,r=o))),r}())===o&&(t=function(){var t,e,n,s,u,a,i;return t=ia,(e=function(){var t,e,n,s,u,a;return t=ia,e=ia,(n=Gc())!==o&&(s=Vf())!==o?((u=$c())===o&&(u=Pc()),u!==o?e=n=[n,s,u]:(ia=e,e=o)):(ia=e,e=o),e!==o&&(e=(a=e)[0]+" "+a[2]),(t=e)===o&&(t=$c())===o&&(t=Pc())===o&&(t=ia,"similar"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(jt)),e!==o&&(n=Vf())!==o&&(s=Jl())!==o?t=e="SIMILAR TO":(ia=t,t=o),t===o&&(t=ia,(e=Gc())!==o&&(n=Vf())!==o?("similar"===r.substr(ia,7).toLowerCase()?(s=r.substr(ia,7),ia+=7):(s=o,0===ba&&da(jt)),s!==o&&(u=Vf())!==o&&Jl()!==o?t=e="NOT SIMILAR TO":(ia=t,t=o)):(ia=t,t=o))),t}())!==o&&Vf()!==o?((n=Dl())===o&&(n=Ji()),n!==o&&Vf()!==o?((s=function(){var t,e,n;return t=ia,"escape"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Xt)),e!==o&&Vf()!==o&&(n=jl())!==o?t=e={type:"ESCAPE",value:n}:(ia=t,t=o),t}())===o&&(s=null),s!==o?(u=e,a=n,(i=s)&&(a.escape=i),t=e={op:u,right:a}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"@>"===r.substr(ia,2)?(e="@>",ia+=2):(e=o,0===ba&&da(Vt)),e===o&&("<@"===r.substr(ia,2)?(e="<@",ia+=2):(e=o,0===ba&&da(qt)),e===o&&(e=Wf())===o&&(e=function(){var t;return"#>>"===r.substr(ia,3)?(t="#>>",ia+=3):(t=o,0===ba&&da(Vu)),t}())===o&&(e=function(){var t;return"#>"===r.substr(ia,2)?(t="#>",ia+=2):(t=o,0===ba&&da(Xu)),t}())===o&&(63===r.charCodeAt(ia)?(e="?",ia++):(e=o,0===ba&&da(Kt)),e===o&&("?|"===r.substr(ia,2)?(e="?|",ia+=2):(e=o,0===ba&&da(Zt)),e===o&&("?&"===r.substr(ia,2)?(e="?&",ia+=2):(e=o,0===ba&&da(zt)),e===o&&("#-"===r.substr(ia,2)?(e="#-",ia+=2):(e=o,0===ba&&da(Qt))))))),e!==o&&Vf()!==o&&(n=ai())!==o?t=e={op:e,right:(s=n)&&s.expr||s}:(ia=t,t=o),t}())===o&&(t=function(){var t,e,n;return t=ia,(e=function(){var t;return"!~*"===r.substr(ia,3)?(t="!~*",ia+=3):(t=o,0===ba&&da(Ht)),t===o&&("~*"===r.substr(ia,2)?(t="~*",ia+=2):(t=o,0===ba&&da(Yt)),t===o&&(126===r.charCodeAt(ia)?(t="~",ia++):(t=o,0===ba&&da(Bt)),t===o&&("!~"===r.substr(ia,2)?(t="!~",ia+=2):(t=o,0===ba&&da(Wt))))),t}())!==o&&Vf()!==o?((n=Dl())===o&&(n=Ji()),n!==o?t=e={op:e,right:n}:(ia=t,t=o)):(ia=t,t=o),t}()),t}function tl(){var t;return">="===r.substr(ia,2)?(t=">=",ia+=2):(t=o,0===ba&&da(kt)),t===o&&(62===r.charCodeAt(ia)?(t=">",ia++):(t=o,0===ba&&da(Dt)),t===o&&("<="===r.substr(ia,2)?(t="<=",ia+=2):(t=o,0===ba&&da($t)),t===o&&("<>"===r.substr(ia,2)?(t="<>",ia+=2):(t=o,0===ba&&da(Pt)),t===o&&(60===r.charCodeAt(ia)?(t="<",ia++):(t=o,0===ba&&da(Ft)),t===o&&(61===r.charCodeAt(ia)?(t="=",ia++):(t=o,0===ba&&da(_t)),t===o&&("!="===r.substr(ia,2)?(t="!=",ia+=2):(t=o,0===ba&&da(Gt)))))))),t}function el(){var r,t,e,n,s,u;return r=ia,t=ia,(e=Gc())!==o&&(n=Vf())!==o&&(s=kc())!==o?t=e=[e,n,s]:(ia=t,t=o),t!==o&&(t=(u=t)[0]+" "+u[2]),(r=t)===o&&(r=kc()),r}function nl(){var r,t,e,n,s,u,a,i;if(r=ia,(t=ol())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=sl())!==o&&(a=Vf())!==o&&(i=ol())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=sl())!==o&&(a=Vf())!==o&&(i=ol())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=Ut(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function sl(){var t;return 43===r.charCodeAt(ia)?(t="+",ia++):(t=o,0===ba&&da(Jt)),t===o&&(45===r.charCodeAt(ia)?(t="-",ia++):(t=o,0===ba&&da(re))),t}function ol(){var r,t,e,n,s,u,a,i;if(r=ia,(t=il())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=ul())!==o&&(a=Vf())!==o&&(i=il())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=ul())!==o&&(a=Vf())!==o&&(i=il())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=Eb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function ul(){var t;return 42===r.charCodeAt(ia)?(t="*",ia++):(t=o,0===ba&&da(te)),t===o&&(47===r.charCodeAt(ia)?(t="/",ia++):(t=o,0===ba&&da(ee)),t===o&&(37===r.charCodeAt(ia)?(t="%",ia++):(t=o,0===ba&&da(ne)),t===o&&("||"===r.substr(ia,2)?(t="||",ia+=2):(t=o,0===ba&&da(se))))),t}function al(){var r,t,e,n,s;return r=ia,(t=cl())!==o&&Vf()!==o?((e=si())===o&&(e=null),e!==o?(n=t,(s=e)&&(n.array_index=s),r=t=n):(ia=r,r=o)):(ia=r,r=o),r}function il(){var t,e,n,s,u,a;return(t=function(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L,C;if(t=ia,(e=Vc())!==o)if(Vf()!==o)if((n=Pf())!==o)if(Vf()!==o)if((s=Ki())!==o)if(Vf()!==o)if((u=wc())!==o)if(Vf()!==o)if((a=fb())!==o)if(Vf()!==o)if((i=Ff())!==o)if(Vf()!==o){for(l=[],c=ia,(f=Bf())===o&&(f=Yf()),f!==o&&(b=Vf())!==o?((v=jl())===o&&(v=Wl()),v!==o?c=f=[f,b,v]:(ia=c,c=o)):(ia=c,c=o);c!==o;)l.push(c),c=ia,(f=Bf())===o&&(f=Yf()),f!==o&&(b=Vf())!==o?((v=jl())===o&&(v=Wl()),v!==o?c=f=[f,b,v]:(ia=c,c=o)):(ia=c,c=o);l!==o?(p=s,L=a,C=l,e={type:"cast",keyword:e.toLowerCase(),expr:p,symbol:"as",target:L,arrows:C.map((r=>r[0])),properties:C.map((r=>r[2]))},t=e):(ia=t,t=o)}else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;return t===o&&(t=ia,(e=Vc())!==o&&Vf()!==o&&(n=Pf())!==o&&Vf()!==o&&(s=Ki())!==o&&Vf()!==o&&(u=wc())!==o&&Vf()!==o&&(a=zc())!==o&&Vf()!==o&&(i=Pf())!==o&&Vf()!==o&&(l=Xl())!==o&&(c=Vf())!==o&&(f=Ff())!==o&&(b=Vf())!==o&&(v=Ff())!==o?(e=function(r,t,e){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+")"}}}(e,s,l),t=e):(ia=t,t=o),t===o&&(t=ia,(e=Vc())!==o&&Vf()!==o&&(n=Pf())!==o&&Vf()!==o&&(s=Ki())!==o&&Vf()!==o&&(u=wc())!==o&&Vf()!==o&&(a=zc())!==o&&Vf()!==o&&(i=Pf())!==o&&Vf()!==o&&(l=Xl())!==o&&(c=Vf())!==o&&(f=Df())!==o&&(b=Vf())!==o&&(v=Xl())!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o&&Ff()!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:"DECIMAL("+e+", "+n+")"}}}(e,s,l,v),t=e):(ia=t,t=o),t===o&&(t=ia,(e=Vc())!==o&&Vf()!==o&&(n=Pf())!==o&&Vf()!==o&&(s=Ki())!==o&&Vf()!==o&&(u=wc())!==o&&Vf()!==o&&(a=function(){var t;return(t=function(){var t,e,n,s;return t=ia,"signed"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(mo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SIGNED":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=Qc()),t}())!==o&&Vf()!==o?((i=rf())===o&&(i=null),i!==o&&Vf()!==o&&(l=Ff())!==o?(e=function(r,t,e,n){return{type:"cast",keyword:r.toLowerCase(),expr:t,symbol:"as",target:{dataType:e+(n?" "+n:"")}}}(e,s,a,i),t=e):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=Pf())!==o&&Vf()!==o?((n=Dl())===o&&(n=Nl())===o&&(n=Rl())===o&&(n=xl())===o&&(n=Wi())===o&&(n=Bi())===o&&(n=al())===o&&(n=ml()),n!==o&&Vf()!==o&&(s=Ff())!==o&&Vf()!==o?((u=kl())===o&&(u=null),u!==o?(e=function(r,t){return r.parentheses=!0,t?{type:"cast",keyword:"cast",expr:r,...t}:r}(n,u),t=e):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=Dl())===o&&(e=Nl())===o&&(e=Rl())===o&&(e=xl())===o&&(e=Wi())===o&&(e=Bi())===o&&(e=al())===o&&(e=ml()),e!==o&&Vf()!==o?((n=kl())===o&&(n=null),n!==o?(e=function(r,t){return t?{type:"cast",keyword:"cast",expr:r,...t}:r}(e,n),t=e):(ia=t,t=o)):(ia=t,t=o)))))),t}())===o&&(t=ia,Pf()!==o&&(e=Vf())!==o&&(n=Zi())!==o&&(s=Vf())!==o&&(u=Ff())!==o?((a=n).parentheses=!0,t=a):(ia=t,t=o),t===o&&(t=lb())===o&&(t=ia,Vf()!==o?(36===r.charCodeAt(ia)?(e="$",ia++):(e=o,0===ba&&da(oe)),e!==o?(60===r.charCodeAt(ia)?(n="<",ia++):(n=o,0===ba&&da(Ft)),n!==o&&(s=Wl())!==o?(62===r.charCodeAt(ia)?(u=">",ia++):(u=o,0===ba&&da(Dt)),u!==o?t={type:"origin",value:`$<${s.value}>`}:(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o))),t}function ll(){var t,e,n,s,u,a;if(t=ia,"e"===r.substr(ia,1).toLowerCase()?(e=r.charAt(ia),ia++):(e=o,0===ba&&da(ue)),e!==o)if(39===r.charCodeAt(ia)?(n="'",ia++):(n=o,0===ba&&da(Br)),n!==o)if(Vf()!==o){for(s=[],u=Yl();u!==o;)s.push(u),u=Yl();s!==o&&(u=Vf())!==o?(39===r.charCodeAt(ia)?(a="'",ia++):(a=o,0===ba&&da(Br)),a!==o?t=e={type:"origin",value:`E'${s.join("")}'`}:(ia=t,t=o)):(ia=t,t=o)}else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;return t}function cl(){var r,t,e,n,s,u,a,i,l,c,f,b,v;if((r=ll())===o&&(r=ia,t=ia,(e=bl())!==o&&(n=Vf())!==o&&(s=kf())!==o?t=e=[e,n,s]:(ia=t,t=o),t===o&&(t=null),t!==o&&(e=Vf())!==o&&(n=$f())!==o?r=t=function(r){const t=r&&r[0]||null;return Rb.add(`select::${t}::(.*)`),{type:"column_ref",table:t,column:"*"}}(t):(ia=r,r=o),r===o)){if(r=ia,t=ia,(e=bl())!==o&&(n=Vf())!==o&&(s=kf())!==o?t=e=[e,n,s]:(ia=t,t=o),t===o&&(t=null),t!==o)if((e=Vf())!==o)if((n=dl())!==o)if((s=Vf())!==o){if(u=[],a=ia,(i=Bf())===o&&(i=Yf()),i!==o&&(l=Vf())!==o?((c=jl())===o&&(c=Wl()),c!==o?a=i=[i,l,c]:(ia=a,a=o)):(ia=a,a=o),a!==o)for(;a!==o;)u.push(a),a=ia,(i=Bf())===o&&(i=Yf()),i!==o&&(l=Vf())!==o?((c=jl())===o&&(c=Wl()),c!==o?a=i=[i,l,c]:(ia=a,a=o)):(ia=a,a=o);else u=o;u!==o?r=t=function(r,t,e){const n=r&&r[0]||null;return Rb.add(`select::${n}::${t}`),{type:"column_ref",table:n,column:t,arrows:e.map((r=>r[0])),properties:e.map((r=>r[2]))}}(t,n,u):(ia=r,r=o)}else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;r===o&&(r=ia,(t=bl())!==o?(e=ia,(n=Vf())!==o&&(s=kf())!==o&&(u=Vf())!==o&&(a=bl())!==o?e=n=[n,s,u,a]:(ia=e,e=o),e!==o?(n=ia,(s=Vf())!==o&&(u=kf())!==o&&(a=Vf())!==o&&(i=dl())!==o?n=s=[s,u,a,i]:(ia=n,n=o),n!==o?(f=t,b=e,v=n,Rb.add(`select::${f}.${b[3]}::${v[3]}`),r=t={type:"column_ref",schema:f,table:b[3],column:v[3]}):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,(t=bl())!==o&&(e=Vf())!==o&&(n=kf())!==o&&(s=Vf())!==o&&(u=dl())!==o?r=t=function(r,t){return Rb.add(`select::${r}::${t}`),{type:"column_ref",table:r,column:t}}(t,u):(ia=r,r=o),r===o&&(r=ia,(t=dl())!==o&&(t=function(r){return Rb.add("select::null::"+r),{type:"column_ref",table:null,column:r}}(t)),r=t)))}return r}function fl(){var r,t,e,n,s,u,a,i;if(r=ia,(t=dl())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=dl())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=dl())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function bl(){var r,t;return r=ia,(t=hl())!==o&&(ae(t)?o:void 0)!==o?r=t:(ia=r,r=o),r===o&&(r=ia,r=t=pl()),r}function vl(){var r,t,e,n,s,u,a,i,l;return r=ia,(t=hl())!==o&&(!0===Cb[t.toUpperCase()]?o:void 0)!==o?(e=ia,(n=Vf())!==o&&(s=Pf())!==o&&(u=Vf())!==o&&(a=fl())!==o&&(i=Vf())!==o&&(l=Ff())!==o?e=n=[n,s,u,a,i,l]:(ia=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){return t?`${r}(${t[3].join(", ")})`:r}(t,e):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,r=t=pl()),r}function pl(){var t;return(t=Ll())===o&&(t=function(){var t,e,n,s;if(t=ia,39===r.charCodeAt(ia)?(e="'",ia++):(e=o,0===ba&&da(Br)),e!==o){if(n=[],fe.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(be)),s!==o)for(;s!==o;)n.push(s),fe.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(be));else n=o;n!==o?(39===r.charCodeAt(ia)?(s="'",ia++):(s=o,0===ba&&da(Br)),s!==o?t=e=ce(n):(ia=t,t=o)):(ia=t,t=o)}else ia=t,t=o;return t}())===o&&(t=function(){var t,e,n,s;if(t=ia,96===r.charCodeAt(ia)?(e="`",ia++):(e=o,0===ba&&da(ve)),e!==o){if(n=[],pe.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(Le)),s!==o)for(;s!==o;)n.push(s),pe.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(Le));else n=o;n!==o?(96===r.charCodeAt(ia)?(s="`",ia++):(s=o,0===ba&&da(ve)),s!==o?t=e=ce(n):(ia=t,t=o)):(ia=t,t=o)}else ia=t,t=o;return t}()),t}function Ll(){var t,e,n,s;if(t=ia,34===r.charCodeAt(ia)?(e='"',ia++):(e=o,0===ba&&da(lt)),e!==o){if(n=[],ie.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(le)),s!==o)for(;s!==o;)n.push(s),ie.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(le));else n=o;n!==o?(34===r.charCodeAt(ia)?(s='"',ia++):(s=o,0===ba&&da(lt)),s!==o?t=e=ce(n):(ia=t,t=o)):(ia=t,t=o)}else ia=t,t=o;return t}function Cl(){var r;return r=ia,(r=wl())===o&&(r=pl()),r}function dl(){var r,t;return r=ia,(t=wl())!==o&&(ae(t)?o:void 0)!==o?r=t:(ia=r,r=o),r===o&&(r=pl()),r}function wl(){var r,t,e,n;if(r=ia,(t=yl())!==o){for(e=[],n=Al();n!==o;)e.push(n),n=Al();e!==o?r=t+=e.join(""):(ia=r,r=o)}else ia=r,r=o;return r}function hl(){var r,t,e,n;if(r=ia,(t=yl())!==o){for(e=[],n=El();n!==o;)e.push(n),n=El();e!==o?r=t+=e.join(""):(ia=r,r=o)}else ia=r,r=o;return r}function yl(){var t;return Ce.test(r.charAt(ia))?(t=r.charAt(ia),ia++):(t=o,0===ba&&da(de)),t}function El(){var t;return we.test(r.charAt(ia))?(t=r.charAt(ia),ia++):(t=o,0===ba&&da(he)),t}function Al(){var t;return ye.test(r.charAt(ia))?(t=r.charAt(ia),ia++):(t=o,0===ba&&da(Ee)),t}function ml(){var t,e,n;return t=ia,58===r.charCodeAt(ia)?(e=":",ia++):(e=o,0===ba&&da(Ae)),e!==o&&(n=hl())!==o?t=e=[e,n]:(ia=t,t=o),t!==o&&(t={type:"param",value:t[1]}),t}function Tl(){var r,t,e;return r=ia,Ec()!==o&&Vf()!==o&&sc()!==o&&Vf()!==o&&(t=Af())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o?((e=Yi())===o&&(e=null),e!==o&&Vf()!==o&&Ff()!==o?r={type:"on update",keyword:t,parentheses:!0,expr:e}:(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,Ec()!==o&&Vf()!==o&&sc()!==o&&Vf()!==o&&(t=Af())!==o?r=function(r){return{type:"on update",keyword:r}}(t):(ia=r,r=o)),r}function Il(){var t,e,n,s,u;return t=ia,"over"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(me)),e!==o&&Vf()!==o&&(n=Ii())!==o?t=e={type:"window",as_window_specification:n}:(ia=t,t=o),t===o&&(t=ia,"over"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(me)),e!==o&&Vf()!==o&&(n=Pf())!==o&&Vf()!==o?((s=gi())===o&&(s=null),s!==o&&Vf()!==o?((u=Oi())===o&&(u=null),u!==o&&Vf()!==o&&Ff()!==o?t=e={partitionby:s,orderby:u}:(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=Tl())),t}function Nl(){var t,e,n,s,u;return t=ia,(e=function(){var t,e,n,s,u,a,i,l,c;return t=ia,(e=function(){var t,e,n,s;return t=ia,"count"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(eo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="COUNT":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(e=function(){var t,e,n,s;return t=ia,"group_concat"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(no)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="GROUP_CONCAT":(ia=t,t=o)):(ia=t,t=o),t}()),e!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(n=function(){var t,e;return t=ia,(e=function(){var t;return 42===r.charCodeAt(ia)?(t="*",ia++):(t=o,0===ba&&da(te)),t!==o&&(t={type:"star",value:"*"}),t}())!==o&&(e={expr:e}),(t=e)===o&&(t=gl()),t}())!==o&&Vf()!==o&&(s=Ff())!==o&&Vf()!==o?((u=Il())===o&&(u=null),u!==o?t=e={type:"aggr_func",name:e,args:n,over:u}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"percentile_cont"===r.substr(ia,15).toLowerCase()?(e=r.substr(ia,15),ia+=15):(e=o,0===ba&&da(ke)),e===o&&("percentile_disc"===r.substr(ia,15).toLowerCase()?(e=r.substr(ia,15),ia+=15):(e=o,0===ba&&da(De))),e!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o?((n=Wl())===o&&(n=$l()),n!==o&&Vf()!==o&&(s=Ff())!==o&&Vf()!==o?("within"===r.substr(ia,6).toLowerCase()?(u=r.substr(ia,6),ia+=6):(u=o,0===ba&&da($e)),u!==o&&Vf()!==o&&Rc()!==o&&Vf()!==o&&(a=Pf())!==o&&Vf()!==o&&(i=Oi())!==o&&Vf()!==o&&(l=Ff())!==o&&Vf()!==o?((c=Il())===o&&(c=null),c!==o?(e=function(r,t,e,n){return{type:"aggr_func",name:r.toUpperCase(),args:{expr:t},within_group_orderby:e,over:n}}(e,n,i,c),t=e):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"mode"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Pe)),e!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(n=Ff())!==o&&Vf()!==o?("within"===r.substr(ia,6).toLowerCase()?(s=r.substr(ia,6),ia+=6):(s=o,0===ba&&da($e)),s!==o&&Vf()!==o&&(u=Rc())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(a=Oi())!==o&&Vf()!==o&&(i=Ff())!==o&&Vf()!==o?((l=Il())===o&&(l=null),l!==o?(e=function(r,t,e){return{type:"aggr_func",name:r.toUpperCase(),args:{expr:{}},within_group_orderby:t,over:e}}(e,a,l),t=e):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o))),t}())===o&&(e=function(){var t,e,n,s;return t=ia,(e=function(){var t;return(t=function(){var t,e,n,s;return t=ia,"sum"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(uo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SUM":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"max"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(so)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="MAX":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"min"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(oo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="MIN":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"avg"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(ao)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="AVG":(ia=t,t=o)):(ia=t,t=o),t}()),t}())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(n=nl())!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o?((s=Il())===o&&(s=null),s!==o?t=e={type:"aggr_func",name:e,args:{expr:n},over:s}:(ia=t,t=o)):(ia=t,t=o),t}())===o&&(e=function(){var t,e,n,s,u,a,i,l,c,f,b;return t=ia,e=ia,(n=bl())!==o&&(s=Vf())!==o&&(u=kf())!==o?e=n=[n,s,u]:(ia=e,e=o),e===o&&(e=null),e!==o&&(n=Vf())!==o&&(s=function(){var t,e,n,s;return t=ia,"array_agg"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(to)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="ARRAY_AGG":(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(u=Vf())!==o&&Pf()!==o&&Vf()!==o&&(a=gl())!==o&&Vf()!==o?((i=Oi())===o&&(i=null),i!==o&&Vf()!==o&&Ff()!==o?(c=s,f=a,b=i,t=e={type:"aggr_func",name:(l=e)?`${l[0]}.${c}`:c,args:f,orderby:b}):(ia=t,t=o)):(ia=t,t=o),t}()),e!==o&&Vf()!==o?((n=function(){var t,e,n;return t=ia,"filter"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Te)),e!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(n=Ai())!==o&&Vf()!==o&&Ff()!==o?t=e={keyword:"filter",parentheses:!0,where:n}:(ia=t,t=o),t}())===o&&(n=null),n!==o?(s=e,(u=n)&&(s.filter=u),t=e=s):(ia=t,t=o)):(ia=t,t=o),t}function Rl(){var t;return(t=function(){var t,e,n;return t=ia,(e=function(){var t;return"row_number"===r.substr(ia,10).toLowerCase()?(t=r.substr(ia,10),ia+=10):(t=o,0===ba&&da(Re)),t===o&&("dense_rank"===r.substr(ia,10).toLowerCase()?(t=r.substr(ia,10),ia+=10):(t=o,0===ba&&da(Se)),t===o&&("rank"===r.substr(ia,4).toLowerCase()?(t=r.substr(ia,4),ia+=4):(t=o,0===ba&&da(_e)))),t}())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o&&(n=Il())!==o?t=e={type:"window_func",name:e,over:n}:(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=ia,(e=function(){var t;return"lag"===r.substr(ia,3).toLowerCase()?(t=r.substr(ia,3),ia+=3):(t=o,0===ba&&da(ge)),t===o&&("lead"===r.substr(ia,4).toLowerCase()?(t=r.substr(ia,4),ia+=4):(t=o,0===ba&&da(Oe)),t===o&&("nth_value"===r.substr(ia,9).toLowerCase()?(t=r.substr(ia,9),ia+=9):(t=o,0===ba&&da(xe)))),t}())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(n=Yi())!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o?((s=Sl())===o&&(s=null),s!==o&&Vf()!==o&&(u=Il())!==o?t=e={type:"window_func",name:e,args:n,over:u,consider_nulls:s}:(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s,u;return t=ia,(e=function(){var t;return"first_value"===r.substr(ia,11).toLowerCase()?(t=r.substr(ia,11),ia+=11):(t=o,0===ba&&da(Ie)),t===o&&("last_value"===r.substr(ia,10).toLowerCase()?(t=r.substr(ia,10),ia+=10):(t=o,0===ba&&da(Ne))),t}())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(n=Ki())!==o&&Vf()!==o?((s=Sl())===o&&(s=null),s!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o&&(u=Il())!==o?t=e={type:"window_func",name:e,args:{type:"expr_list",value:[n]},over:u,consider_nulls:s}:(ia=t,t=o)):(ia=t,t=o),t}()),t}function Sl(){var t,e,n;return t=ia,"ignore"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Ue)),e===o&&("respect"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Me))),e!==o&&Vf()!==o?("nulls"===r.substr(ia,5).toLowerCase()?(n=r.substr(ia,5),ia+=5):(n=o,0===ba&&da(O)),n!==o?t=e=e.toUpperCase()+" NULLS":(ia=t,t=o)):(ia=t,t=o),t}function _l(){var t,e,n;return t=ia,"separator"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(Fe)),e===o&&(e=null),e!==o&&Vf()!==o&&(n=jl())!==o?t=e={keyword:e,value:n}:(ia=t,t=o),t}function gl(){var r,t,e,n,s,u,a;return r=ia,(t=Uc())===o&&(t=null),t!==o&&Vf()!==o&&(e=Pf())!==o&&Vf()!==o&&(n=Ki())!==o&&Vf()!==o&&(s=Ff())!==o&&Vf()!==o?((u=Oi())===o&&(u=null),u!==o&&Vf()!==o?((a=_l())===o&&(a=null),a!==o?r=t={distinct:t,expr:n,orderby:u,parentheses:!0,separator:a}:(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,(t=Uc())===o&&(t=null),t!==o&&Vf()!==o&&(e=Ki())!==o&&Vf()!==o?((n=Oi())===o&&(n=null),n!==o&&Vf()!==o?((s=_l())===o&&(s=null),s!==o?r=t=function(r,t,e,n){return{distinct:r,expr:t,orderby:e,parentheses:!1,separator:n}}(t,e,n,s):(ia=r,r=o)):(ia=r,r=o)):(ia=r,r=o)),r}function Ol(){var t,e,n,s,u,a,i,l,c,f;return t=ia,(e=function(){var t,e,n,s;return t=ia,"input"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Be)),e!==o&&Vf()!==o?("=>"===r.substr(ia,2)?(n="=>",ia+=2):(n=o,0===ba&&da(We)),n!==o&&Vf()!==o&&(s=Ki())!==o?t=e={type:"input",symbol:"=>",value:s}:(ia=t,t=o)):(ia=t,t=o),t}())!==o?(n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=function(){var t,e,n,s;return t=ia,"path"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Xe)),e!==o&&Vf()!==o?("=>"===r.substr(ia,2)?(n="=>",ia+=2):(n=o,0===ba&&da(We)),n!==o&&Vf()!==o&&(s=jl())!==o?t=e={type:"path",symbol:"=>",value:s}:(ia=t,t=o)):(ia=t,t=o),t}())!==o?n=s=[s,u,a,i]:(ia=n,n=o),n===o&&(n=null),n!==o?(s=ia,(u=Vf())!==o&&(a=Df())!==o&&(i=Vf())!==o&&(l=function(){var t,e,n,s;return t=ia,"outer"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Ve)),e!==o&&Vf()!==o?("=>"===r.substr(ia,2)?(n="=>",ia+=2):(n=o,0===ba&&da(We)),n!==o&&Vf()!==o&&(s=Gl())!==o?t=e={type:"outer",symbol:"=>",value:s}:(ia=t,t=o)):(ia=t,t=o),t}())!==o?s=u=[u,a,i,l]:(ia=s,s=o),s===o&&(s=null),s!==o?(u=ia,(a=Vf())!==o&&(i=Df())!==o&&(l=Vf())!==o&&(c=function(){var t,e,n,s;return t=ia,"recursive"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(qe)),e!==o&&Vf()!==o?("=>"===r.substr(ia,2)?(n="=>",ia+=2):(n=o,0===ba&&da(We)),n!==o&&Vf()!==o&&(s=Gl())!==o?t=e={type:"recursive",symbol:"=>",value:s}:(ia=t,t=o)):(ia=t,t=o),t}())!==o?u=a=[a,i,l,c]:(ia=u,u=o),u===o&&(u=null),u!==o?(a=ia,(i=Vf())!==o&&(l=Df())!==o&&(c=Vf())!==o&&(f=function(){var t,e,n,s;return t=ia,"mode"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(et)),e!==o&&Vf()!==o?("=>"===r.substr(ia,2)?(n="=>",ia+=2):(n=o,0===ba&&da(We)),n!==o&&Vf()!==o&&(s=jl())!==o?t=e=function(r){const t=new Set(["object","array","both"]);if(!r.value||!t.has(r.value.toLowerCase()))throw new Error((r&&r.value)+" is not valid mode in object, array and both");return r.value=r.value.toUpperCase(),{type:"mode",symbol:"=>",value:r}}(s):(ia=t,t=o)):(ia=t,t=o),t}())!==o?a=i=[i,l,c,f]:(ia=a,a=o),a===o&&(a=null),a!==o?t=e=function(r,t,e,n,s){return{type:"flattern",input:r,path:t&&t[3],outer:e&&e[3],recursive:n&&n[3],mode:s&&s[3]}}(e,n,s,u,a):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t}function xl(){var t,e,n,s,u,a,i,l,c,f;return(t=function(){var t,e,n,s;return t=ia,"trim"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Ye)),e!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o?((n=function(){var t,e,n;return t=ia,(e=function(){var t;return"both"===r.substr(ia,4).toLowerCase()?(t=r.substr(ia,4),ia+=4):(t=o,0===ba&&da(Ge)),t===o&&("leading"===r.substr(ia,7).toLowerCase()?(t=r.substr(ia,7),ia+=7):(t=o,0===ba&&da(je)),t===o&&("trailing"===r.substr(ia,8).toLowerCase()?(t=r.substr(ia,8),ia+=8):(t=o,0===ba&&da(He)))),t}())===o&&(e=null),e!==o&&Vf()!==o?((n=jl())===o&&(n=null),n!==o&&Vf()!==o&&Cc()!==o?t=e=function(r,t,e){let n=[];return r&&n.push({type:"origin",value:r}),t&&n.push(t),n.push({type:"origin",value:"from"}),{type:"expr_list",value:n}}(e,n):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(n=null),n!==o&&Vf()!==o&&(s=Ki())!==o&&Vf()!==o&&Ff()!==o?t=e=function(r,t){let e=r||{type:"expr_list",value:[]};return e.value.push(t),{type:"function",name:"TRIM",args:e}}(n,s):(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=ia,"now"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(Ke)),e!==o&&Vf()!==o&&(n=Pf())!==o&&Vf()!==o?((s=Yi())===o&&(s=null),s!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o?("at"===r.substr(ia,2).toLowerCase()?(u=r.substr(ia,2),ia+=2):(u=o,0===ba&&da(Ze)),u!==o&&Vf()!==o&&wf()!==o&&Vf()!==o?("zone"===r.substr(ia,4).toLowerCase()?(a=r.substr(ia,4),ia+=4):(a=o,0===ba&&da(ze)),a!==o&&Vf()!==o&&(i=jl())!==o?(l=e,c=s,(f=i).prefix="at time zone",t=e={type:"function",name:l,args:c||{type:"expr_list",value:[]},suffix:f}):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,"flatten"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Qe)),e!==o&&Vf()!==o&&(n=Pf())!==o&&Vf()!==o&&(s=Ol())!==o&&Vf()!==o&&Ff()!==o?t=e=function(r,t){return{type:"flatten",name:r,args:t}}(e,s):(ia=t,t=o),t===o&&(t=ia,(e=function(){var t;return(t=Ml())===o&&(t=function(){var t,e,n,s;return t=ia,"current_user"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(rr)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="CURRENT_USER":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"user"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Ko)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="USER":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"session_user"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(tr)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SESSION_USER":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"system_user"===r.substr(ia,11).toLowerCase()?(e=r.substr(ia,11),ia+=11):(e=o,0===ba&&da(vu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SYSTEM_USER":(ia=t,t=o)):(ia=t,t=o),t}())===o&&("ntile"===r.substr(ia,5).toLowerCase()?(t=r.substr(ia,5),ia+=5):(t=o,0===ba&&da(An))),t}())!==o&&Vf()!==o&&(n=Pf())!==o&&Vf()!==o?((s=Yi())===o&&(s=null),s!==o&&Vf()!==o&&Ff()!==o&&Vf()!==o?((u=Il())===o&&(u=null),u!==o?t=e=function(r,t,e){return{type:"function",name:r,args:t||{type:"expr_list",value:[]},over:e}}(e,s,u):(ia=t,t=o)):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=function(){var r,t,e,n,s,u,a,i;return r=ia,(t=Yc())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(e=Ul())!==o&&Vf()!==o&&Cc()!==o&&Vf()!==o?((n=hf())===o&&(n=Ef())===o&&(n=wf())===o&&(n=Lf()),n===o&&(n=null),n!==o&&Vf()!==o&&(s=Ki())!==o&&Vf()!==o&&Ff()!==o?(u=e,a=n,i=s,r=t={type:t.toLowerCase(),args:{field:u,cast_type:a,source:i}}):(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,(t=Yc())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o&&(e=Ul())!==o&&Vf()!==o&&Cc()!==o&&Vf()!==o&&(n=Ki())!==o&&Vf()!==o&&(s=Ff())!==o?(t=function(r,t,e){return{type:r.toLowerCase(),args:{field:t,source:e}}}(t,e,n),r=t):(ia=r,r=o)),r}())===o&&(t=ia,(e=Ml())!==o&&Vf()!==o?((n=Tl())===o&&(n=null),n!==o?t=e={type:"function",name:e,over:n}:(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=ub())!==o&&Vf()!==o&&(n=Pf())!==o&&Vf()!==o?((s=Zi())===o&&(s=null),s!==o&&Vf()!==o&&Ff()!==o?t=e=function(r,t){return t&&"expr_list"!==t.type&&(t={type:"expr_list",value:[t]}),{type:"function",name:r,args:t||{type:"expr_list",value:[]}}}(e,s):(ia=t,t=o)):(ia=t,t=o)))))),t}function Ul(){var t;return"century"===r.substr(ia,7).toLowerCase()?(t=r.substr(ia,7),ia+=7):(t=o,0===ba&&da(Je)),t===o&&("day"===r.substr(ia,3).toLowerCase()?(t=r.substr(ia,3),ia+=3):(t=o,0===ba&&da(rn)),t===o&&("date"===r.substr(ia,4).toLowerCase()?(t=r.substr(ia,4),ia+=4):(t=o,0===ba&&da(tn)),t===o&&("decade"===r.substr(ia,6).toLowerCase()?(t=r.substr(ia,6),ia+=6):(t=o,0===ba&&da(en)),t===o&&("dow"===r.substr(ia,3).toLowerCase()?(t=r.substr(ia,3),ia+=3):(t=o,0===ba&&da(nn)),t===o&&("doy"===r.substr(ia,3).toLowerCase()?(t=r.substr(ia,3),ia+=3):(t=o,0===ba&&da(sn)),t===o&&("epoch"===r.substr(ia,5).toLowerCase()?(t=r.substr(ia,5),ia+=5):(t=o,0===ba&&da(on)),t===o&&("hour"===r.substr(ia,4).toLowerCase()?(t=r.substr(ia,4),ia+=4):(t=o,0===ba&&da(un)),t===o&&("isodow"===r.substr(ia,6).toLowerCase()?(t=r.substr(ia,6),ia+=6):(t=o,0===ba&&da(an)),t===o&&("isoyear"===r.substr(ia,7).toLowerCase()?(t=r.substr(ia,7),ia+=7):(t=o,0===ba&&da(ln)),t===o&&("microseconds"===r.substr(ia,12).toLowerCase()?(t=r.substr(ia,12),ia+=12):(t=o,0===ba&&da(cn)),t===o&&("millennium"===r.substr(ia,10).toLowerCase()?(t=r.substr(ia,10),ia+=10):(t=o,0===ba&&da(fn)),t===o&&("milliseconds"===r.substr(ia,12).toLowerCase()?(t=r.substr(ia,12),ia+=12):(t=o,0===ba&&da(bn)),t===o&&("minute"===r.substr(ia,6).toLowerCase()?(t=r.substr(ia,6),ia+=6):(t=o,0===ba&&da(vn)),t===o&&("month"===r.substr(ia,5).toLowerCase()?(t=r.substr(ia,5),ia+=5):(t=o,0===ba&&da(pn)),t===o&&("quarter"===r.substr(ia,7).toLowerCase()?(t=r.substr(ia,7),ia+=7):(t=o,0===ba&&da(Ln)),t===o&&("second"===r.substr(ia,6).toLowerCase()?(t=r.substr(ia,6),ia+=6):(t=o,0===ba&&da(Cn)),t===o&&("timezone"===r.substr(ia,8).toLowerCase()?(t=r.substr(ia,8),ia+=8):(t=o,0===ba&&da(dn)),t===o&&("timezone_hour"===r.substr(ia,13).toLowerCase()?(t=r.substr(ia,13),ia+=13):(t=o,0===ba&&da(wn)),t===o&&("timezone_minute"===r.substr(ia,15).toLowerCase()?(t=r.substr(ia,15),ia+=15):(t=o,0===ba&&da(hn)),t===o&&("week"===r.substr(ia,4).toLowerCase()?(t=r.substr(ia,4),ia+=4):(t=o,0===ba&&da(yn)),t===o&&("year"===r.substr(ia,4).toLowerCase()?(t=r.substr(ia,4),ia+=4):(t=o,0===ba&&da(En))))))))))))))))))))))),t}function Ml(){var t;return(t=function(){var t,e,n,s;return t=ia,"current_date"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(lu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="CURRENT_DATE":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"current_time"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(fu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="CURRENT_TIME":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=Af()),t}function kl(){var r,t,e,n,s,u,a,i;if(r=ia,If()!==o)if(Vf()!==o)if((t=fb())!==o)if(Vf()!==o){for(e=[],n=ia,(s=Bf())===o&&(s=Yf()),s!==o&&(u=Vf())!==o?((a=jl())===o&&(a=Wl()),a!==o?n=s=[s,u,a]:(ia=n,n=o)):(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Bf())===o&&(s=Yf()),s!==o&&(u=Vf())!==o?((a=jl())===o&&(a=Wl()),a!==o?n=s=[s,u,a]:(ia=n,n=o)):(ia=n,n=o);e!==o&&(n=Vf())!==o?((s=li())===o&&(s=null),s!==o?r={as:s,symbol:"::",target:t,arrows:(i=e).map((r=>r[0])),properties:i.map((r=>r[2]))}:(ia=r,r=o)):(ia=r,r=o)}else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;else ia=r,r=o;return r}function Dl(){var t;return(t=jl())===o&&(t=Wl())===o&&(t=Gl())===o&&(t=Pl())===o&&(t=function(){var t,e,n,s,u,a,i;if(t=ia,(e=wf())===o&&(e=Lf())===o&&(e=hf())===o&&(e=Cf()),e!==o)if(Vf()!==o){if(n=ia,39===r.charCodeAt(ia)?(s="'",ia++):(s=o,0===ba&&da(Br)),s!==o){for(u=[],a=Yl();a!==o;)u.push(a),a=Yl();u!==o?(39===r.charCodeAt(ia)?(a="'",ia++):(a=o,0===ba&&da(Br)),a!==o?n=s=[s,u,a]:(ia=n,n=o)):(ia=n,n=o)}else ia=n,n=o;n!==o?(i=n,t=e={type:e.toLowerCase(),value:i[1].join("")}):(ia=t,t=o)}else ia=t,t=o;else ia=t,t=o;if(t===o)if(t=ia,(e=wf())===o&&(e=Lf())===o&&(e=hf())===o&&(e=Cf()),e!==o)if(Vf()!==o){if(n=ia,34===r.charCodeAt(ia)?(s='"',ia++):(s=o,0===ba&&da(lt)),s!==o){for(u=[],a=Hl();a!==o;)u.push(a),a=Hl();u!==o?(34===r.charCodeAt(ia)?(a='"',ia++):(a=o,0===ba&&da(lt)),a!==o?n=s=[s,u,a]:(ia=n,n=o)):(ia=n,n=o)}else ia=n,n=o;n!==o?(e=function(r,t){return{type:r.toLowerCase(),value:t[1].join("")}}(e,n),t=e):(ia=t,t=o)}else ia=t,t=o;else ia=t,t=o;return t}())===o&&(t=$l()),t}function $l(){var t,e;return t=ia,function(){var t,e,n,s;return t=ia,"array"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(ro)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="ARRAY":(ia=t,t=o)):(ia=t,t=o),t}()!==o&&Vf()!==o&&Gf()!==o&&Vf()!==o?((e=Yi())===o&&(e=null),e!==o&&Vf()!==o&&jf()!==o?t={expr_list:e||{type:"origin",value:""},type:"array",keyword:"array",brackets:!0}:(ia=t,t=o)):(ia=t,t=o),t}function Pl(){var t;return(t=function(){var t,e,n,s;return t=ia,"null"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Qn)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(t={type:"null",value:null}),t}function Fl(){var t;return(t=function(){var t,e,n,s;return t=ia,"not null"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(Jn)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(t={type:"not null",value:"not null"}),t}function Gl(){var t,e;return t=ia,(e=function(){var t,e,n,s;return t=ia,"true"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(rs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(e={type:"bool",value:!0}),(t=e)===o&&(t=ia,(e=function(){var t,e,n,s;return t=ia,"false"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(es)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(e={type:"bool",value:!1}),t=e),t}function jl(){var t,e,n,s,u,a,i,l,c;if(t=ia,e=ia,39===r.charCodeAt(ia)?(n="'",ia++):(n=o,0===ba&&da(Br)),n!==o){for(s=[],u=Yl();u!==o;)s.push(u),u=Yl();s!==o?(39===r.charCodeAt(ia)?(u="'",ia++):(u=o,0===ba&&da(Br)),u!==o?e=n=[n,s,u]:(ia=e,e=o)):(ia=e,e=o)}else ia=e,e=o;if(e!==o){if(n=[],mn.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(Tn)),s!==o)for(;s!==o;)n.push(s),mn.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(Tn));else n=o;if(n!==o)if((s=Vf())!==o){if(u=ia,39===r.charCodeAt(ia)?(a="'",ia++):(a=o,0===ba&&da(Br)),a!==o){for(i=[],l=Yl();l!==o;)i.push(l),l=Yl();i!==o?(39===r.charCodeAt(ia)?(l="'",ia++):(l=o,0===ba&&da(Br)),l!==o?u=a=[a,i,l]:(ia=u,u=o)):(ia=u,u=o)}else ia=u,u=o;u!==o?(c=u,t=e={type:"single_quote_string",value:`${e[1].join("")}${c[1].join("")}`}):(ia=t,t=o)}else ia=t,t=o;else ia=t,t=o}else ia=t,t=o;if(t===o){if(t=ia,e=ia,39===r.charCodeAt(ia)?(n="'",ia++):(n=o,0===ba&&da(Br)),n!==o){for(s=[],u=Yl();u!==o;)s.push(u),u=Yl();s!==o?(39===r.charCodeAt(ia)?(u="'",ia++):(u=o,0===ba&&da(Br)),u!==o?e=n=[n,s,u]:(ia=e,e=o)):(ia=e,e=o)}else ia=e,e=o;if(e!==o&&(e=function(r){return{type:"single_quote_string",value:r[1].join("")}}(e)),(t=e)===o){if(t=ia,e=ia,34===r.charCodeAt(ia)?(n='"',ia++):(n=o,0===ba&&da(lt)),n!==o){for(s=[],u=Hl();u!==o;)s.push(u),u=Hl();s!==o?(34===r.charCodeAt(ia)?(u='"',ia++):(u=o,0===ba&&da(lt)),u!==o?e=n=[n,s,u]:(ia=e,e=o)):(ia=e,e=o)}else ia=e,e=o;e!==o?(n=ia,ba++,s=kf(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=function(r){return{type:"double_quote_string",value:r[1].join("")}}(e):(ia=t,t=o)):(ia=t,t=o)}}return t}function Hl(){var t;return In.test(r.charAt(ia))?(t=r.charAt(ia),ia++):(t=o,0===ba&&da(Nn)),t===o&&(t=Bl()),t}function Yl(){var t;return Rn.test(r.charAt(ia))?(t=r.charAt(ia),ia++):(t=o,0===ba&&da(Sn)),t===o&&(t=Bl()),t}function Bl(){var t,e,n,s,u,a,i,l,c,f;return t=ia,"\\'"===r.substr(ia,2)?(e="\\'",ia+=2):(e=o,0===ba&&da(_n)),e!==o&&(e="\\'"),(t=e)===o&&(t=ia,'\\"'===r.substr(ia,2)?(e='\\"',ia+=2):(e=o,0===ba&&da(gn)),e!==o&&(e='\\"'),(t=e)===o&&(t=ia,"\\\\"===r.substr(ia,2)?(e="\\\\",ia+=2):(e=o,0===ba&&da(On)),e!==o&&(e="\\\\"),(t=e)===o&&(t=ia,"\\/"===r.substr(ia,2)?(e="\\/",ia+=2):(e=o,0===ba&&da(xn)),e!==o&&(e="\\/"),(t=e)===o&&(t=ia,"\\b"===r.substr(ia,2)?(e="\\b",ia+=2):(e=o,0===ba&&da(Un)),e!==o&&(e="\b"),(t=e)===o&&(t=ia,"\\f"===r.substr(ia,2)?(e="\\f",ia+=2):(e=o,0===ba&&da(Mn)),e!==o&&(e="\f"),(t=e)===o&&(t=ia,"\\n"===r.substr(ia,2)?(e="\\n",ia+=2):(e=o,0===ba&&da(kn)),e!==o&&(e="\n"),(t=e)===o&&(t=ia,"\\r"===r.substr(ia,2)?(e="\\r",ia+=2):(e=o,0===ba&&da(Dn)),e!==o&&(e="\r"),(t=e)===o&&(t=ia,"\\t"===r.substr(ia,2)?(e="\\t",ia+=2):(e=o,0===ba&&da($n)),e!==o&&(e="\t"),(t=e)===o&&(t=ia,"\\u"===r.substr(ia,2)?(e="\\u",ia+=2):(e=o,0===ba&&da(Pn)),e!==o&&(n=zl())!==o&&(s=zl())!==o&&(u=zl())!==o&&(a=zl())!==o?(i=n,l=s,c=u,f=a,t=e=String.fromCharCode(parseInt("0x"+i+l+c+f))):(ia=t,t=o),t===o&&(t=ia,92===r.charCodeAt(ia)?(e="\\",ia++):(e=o,0===ba&&da(Fn)),e!==o&&(e="\\"),(t=e)===o&&(t=ia,"''"===r.substr(ia,2)?(e="''",ia+=2):(e=o,0===ba&&da(Gn)),e!==o&&(e="''"),t=e))))))))))),t}function Wl(){var r,t;return(r=function(){var r,t,e,n;return r=ia,(t=Xl())===o&&(t=null),t!==o&&(e=Vl())!==o&&(n=ql())!==o?r=t={type:"bigint",value:(t||"")+e+n}:(ia=r,r=o),r===o&&(r=ia,(t=Xl())===o&&(t=null),t!==o&&(e=Vl())!==o?(t=function(r,t){const e=(r||"")+t;return r&&hb(r)?{type:"bigint",value:e}:parseFloat(e)}(t,e),r=t):(ia=r,r=o),r===o&&(r=ia,(t=Xl())!==o&&(e=ql())!==o?(t=function(r,t){return{type:"bigint",value:r+t}}(t,e),r=t):(ia=r,r=o),r===o&&(r=ia,(t=Xl())!==o&&(t=function(r){return hb(r)?{type:"bigint",value:r}:parseFloat(r)}(t)),r=t))),r}())!==o&&(r=(t=r)&&"bigint"===t.type?t:{type:"number",value:t}),r}function Xl(){var t,e,n;return(t=Kl())===o&&(t=Zl())===o&&(t=ia,45===r.charCodeAt(ia)?(e="-",ia++):(e=o,0===ba&&da(re)),e===o&&(43===r.charCodeAt(ia)?(e="+",ia++):(e=o,0===ba&&da(Jt))),e!==o&&(n=Kl())!==o?t=e+=n:(ia=t,t=o),t===o&&(t=ia,45===r.charCodeAt(ia)?(e="-",ia++):(e=o,0===ba&&da(re)),e===o&&(43===r.charCodeAt(ia)?(e="+",ia++):(e=o,0===ba&&da(Jt))),e!==o&&(n=Zl())!==o?t=e=function(r,t){return r+t}(e,n):(ia=t,t=o))),t}function Vl(){var t,e,n;return t=ia,46===r.charCodeAt(ia)?(e=".",ia++):(e=o,0===ba&&da(Yn)),e!==o&&(n=Kl())!==o?t=e="."+n:(ia=t,t=o),t}function ql(){var t,e,n;return t=ia,(e=function(){var t,e,n,s;return t=ia,qn.test(r.charAt(ia))?(e=r.charAt(ia),ia++):(e=o,0===ba&&da(Kn)),e!==o?(Zn.test(r.charAt(ia))?(n=r.charAt(ia),ia++):(n=o,0===ba&&da(zn)),n===o&&(n=null),n!==o?t=e+=null!==(s=n)?s:"":(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(n=Kl())!==o?t=e+=n:(ia=t,t=o),t}function Kl(){var r,t;if(r=[],(t=Zl())!==o)for(;t!==o;)r.push(t),t=Zl();else r=o;return r!==o&&(r=r.join("")),r}function Zl(){var t;return Bn.test(r.charAt(ia))?(t=r.charAt(ia),ia++):(t=o,0===ba&&da(Wn)),t}function zl(){var t;return Xn.test(r.charAt(ia))?(t=r.charAt(ia),ia++):(t=o,0===ba&&da(Vn)),t}function Ql(){var t,e,n,s;return t=ia,"default"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(j)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Jl(){var t,e,n,s;return t=ia,"to"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(ts)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function rc(){var t,e,n,s;return t=ia,"show"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(ns)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function tc(){var t,e,n,s;return t=ia,"drop"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(ss)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="DROP":(ia=t,t=o)):(ia=t,t=o),t}function ec(){var t,e,n,s;return t=ia,"alter"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(us)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function nc(){var t,e,n,s;return t=ia,"select"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(as)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function sc(){var t,e,n,s;return t=ia,"update"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(is)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function oc(){var t,e,n,s;return t=ia,"create"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(ls)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function uc(){var t,e,n,s;return t=ia,"temporary"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(cs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function ac(){var t,e,n,s;return t=ia,"temp"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(fs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function ic(){var t,e,n,s;return t=ia,"delete"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(bs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function lc(){var t,e,n,s;return t=ia,"insert"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(vs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function cc(){var t,e,n,s;return t=ia,"RECURSIVE"===r.substr(ia,9)?(e="RECURSIVE",ia+=9):(e=o,0===ba&&da(ps)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="RECURSIVE":(ia=t,t=o)):(ia=t,t=o),t}function fc(){var t,e,n,s;return t=ia,"replace"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Ls)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function bc(){var t,e,n,s;return t=ia,"rename"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(ds)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function vc(){var t,e,n,s;return t=ia,"ignore"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Ue)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function pc(){var t,e,n,s;return t=ia,"partition"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(ws)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="PARTITION":(ia=t,t=o)):(ia=t,t=o),t}function Lc(){var t,e,n,s;return t=ia,"into"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(hs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Cc(){var t,e,n,s;return t=ia,"from"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(ys)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function dc(){var t,e,n,s;return t=ia,"set"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(Mr)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SET":(ia=t,t=o)):(ia=t,t=o),t}function wc(){var t,e,n,s;return t=ia,"as"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(Es)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function hc(){var t,e,n,s;return t=ia,"table"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(As)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="TABLE":(ia=t,t=o)):(ia=t,t=o),t}function yc(){var t,e,n,s;return t=ia,"schema"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(c)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SCHEMA":(ia=t,t=o)):(ia=t,t=o),t}function Ec(){var t,e,n,s;return t=ia,"on"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(Er)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Ac(){var t,e,n,s;return t=ia,"join"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Os)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function mc(){var t,e,n,s;return t=ia,"outer"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Ve)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Tc(){var t,e,n,s;return t=ia,"values"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Us)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Ic(){var t,e,n,s;return t=ia,"using"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Ms)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Nc(){var t,e,n,s;return t=ia,"with"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Ct)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Rc(){var t,e,n,s;return t=ia,"group"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Ds)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Sc(){var t,e,n,s;return t=ia,"by"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da($s)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function _c(){var t,e,n,s;return t=ia,"order"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Ps)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function gc(){var t,e,n,s;return t=ia,"asc"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(Ys)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="ASC":(ia=t,t=o)):(ia=t,t=o),t}function Oc(){var t,e,n,s;return t=ia,"desc"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Bs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="DESC":(ia=t,t=o)):(ia=t,t=o),t}function xc(){var t,e,n,s;return t=ia,"all"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(Ws)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="ALL":(ia=t,t=o)):(ia=t,t=o),t}function Uc(){var t,e,n,s;return t=ia,"distinct"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(Xs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="DISTINCT":(ia=t,t=o)):(ia=t,t=o),t}function Mc(){var t,e,n,s;return t=ia,"between"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Vs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="BETWEEN":(ia=t,t=o)):(ia=t,t=o),t}function kc(){var t,e,n,s;return t=ia,"in"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(qr)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="IN":(ia=t,t=o)):(ia=t,t=o),t}function Dc(){var t,e,n,s;return t=ia,"is"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(qs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="IS":(ia=t,t=o)):(ia=t,t=o),t}function $c(){var t,e,n,s;return t=ia,"like"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Ks)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="LIKE":(ia=t,t=o)):(ia=t,t=o),t}function Pc(){var t,e,n,s;return t=ia,"ilike"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Zs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="ILIKE":(ia=t,t=o)):(ia=t,t=o),t}function Fc(){var t,e,n,s;return t=ia,"exists"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(zs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="EXISTS":(ia=t,t=o)):(ia=t,t=o),t}function Gc(){var t,e,n,s;return t=ia,"not"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(Ir)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="NOT":(ia=t,t=o)):(ia=t,t=o),t}function jc(){var t,e,n,s;return t=ia,"and"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(Qs)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="AND":(ia=t,t=o)):(ia=t,t=o),t}function Hc(){var t,e,n,s;return t=ia,"or"===r.substr(ia,2).toLowerCase()?(e=r.substr(ia,2),ia+=2):(e=o,0===ba&&da(Js)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="OR":(ia=t,t=o)):(ia=t,t=o),t}function Yc(){var t,e,n,s;return t=ia,"extract"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(io)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="EXTRACT":(ia=t,t=o)):(ia=t,t=o),t}function Bc(){var t,e,n,s;return t=ia,"case"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(co)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Wc(){var t,e,n,s;return t=ia,"when"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(fo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Xc(){var t,e,n,s;return t=ia,"end"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(po)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e=[e,n]:(ia=t,t=o)):(ia=t,t=o),t}function Vc(){var t,e,n,s;return t=ia,"cast"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Lo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="CAST":(ia=t,t=o)):(ia=t,t=o),t}function qc(){var t,e,n,s;return t=ia,"char"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(ho)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="CHAR":(ia=t,t=o)):(ia=t,t=o),t}function Kc(){var t,e,n,s;return t=ia,"varchar"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(yo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="VARCHAR":(ia=t,t=o)):(ia=t,t=o),t}function Zc(){var t,e,n,s;return t=ia,"numeric"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Eo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="NUMERIC":(ia=t,t=o)):(ia=t,t=o),t}function zc(){var t,e,n,s;return t=ia,"decimal"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Ao)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="DECIMAL":(ia=t,t=o)):(ia=t,t=o),t}function Qc(){var t,e,n,s;return t=ia,"unsigned"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(To)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="UNSIGNED":(ia=t,t=o)):(ia=t,t=o),t}function Jc(){var t,e,n,s;return t=ia,"int"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(Io)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="INT":(ia=t,t=o)):(ia=t,t=o),t}function rf(){var t,e,n,s;return t=ia,"integer"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Ro)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="INTEGER":(ia=t,t=o)):(ia=t,t=o),t}function tf(){var t,e,n,s;return t=ia,"smallint"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(Oo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SMALLINT":(ia=t,t=o)):(ia=t,t=o),t}function ef(){var t,e,n,s;return t=ia,"serial"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(xo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="SERIAL":(ia=t,t=o)):(ia=t,t=o),t}function nf(){var t,e,n,s;return t=ia,"tinyint"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Uo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="TINYINT":(ia=t,t=o)):(ia=t,t=o),t}function sf(){var t,e,n,s;return t=ia,"tinytext"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(Mo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="TINYTEXT":(ia=t,t=o)):(ia=t,t=o),t}function of(){var t,e,n,s;return t=ia,"text"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(ko)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="TEXT":(ia=t,t=o)):(ia=t,t=o),t}function uf(){var t,e,n,s;return t=ia,"mediumtext"===r.substr(ia,10).toLowerCase()?(e=r.substr(ia,10),ia+=10):(e=o,0===ba&&da(Do)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="MEDIUMTEXT":(ia=t,t=o)):(ia=t,t=o),t}function af(){var t,e,n,s;return t=ia,"longtext"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da($o)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="LONGTEXT":(ia=t,t=o)):(ia=t,t=o),t}function lf(){var t,e,n,s;return t=ia,"bigint"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Po)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="BIGINT":(ia=t,t=o)):(ia=t,t=o),t}function cf(){var t,e,n,s;return t=ia,"enum"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Fo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="ENUM":(ia=t,t=o)):(ia=t,t=o),t}function ff(){var t,e,n,s;return t=ia,"float"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Go)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="FLOAT":(ia=t,t=o)):(ia=t,t=o),t}function bf(){var t,e,n,s;return t=ia,"double"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(jo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="DOUBLE":(ia=t,t=o)):(ia=t,t=o),t}function vf(){var t,e,n,s;return t=ia,"bigserial"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(Ho)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="BIGSERIAL":(ia=t,t=o)):(ia=t,t=o),t}function pf(){var t,e,n,s;return t=ia,"real"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Yo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REAL":(ia=t,t=o)):(ia=t,t=o),t}function Lf(){var t,e,n,s;return t=ia,"date"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(tn)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="DATE":(ia=t,t=o)):(ia=t,t=o),t}function Cf(){var t,e,n,s;return t=ia,"datetime"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(Bo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="DATETIME":(ia=t,t=o)):(ia=t,t=o),t}function df(){var t,e,n,s;return t=ia,"rows"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Wo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="ROWS":(ia=t,t=o)):(ia=t,t=o),t}function wf(){var t,e,n,s;return t=ia,"time"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Xo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="TIME":(ia=t,t=o)):(ia=t,t=o),t}function hf(){var t,e,n,s;return t=ia,"timestamp"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(Vo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="TIMESTAMP":(ia=t,t=o)):(ia=t,t=o),t}function yf(){var t,e,n,s;return t=ia,"truncate"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(qo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="TRUNCATE":(ia=t,t=o)):(ia=t,t=o),t}function Ef(){var t,e,n,s;return t=ia,"interval"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(cu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="INTERVAL":(ia=t,t=o)):(ia=t,t=o),t}function Af(){var t,e,n,s;return t=ia,"current_timestamp"===r.substr(ia,17).toLowerCase()?(e=r.substr(ia,17),ia+=17):(e=o,0===ba&&da(bu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="CURRENT_TIMESTAMP":(ia=t,t=o)):(ia=t,t=o),t}function mf(){var t;return 36===r.charCodeAt(ia)?(t="$",ia++):(t=o,0===ba&&da(oe)),t}function Tf(){var t;return"$$"===r.substr(ia,2)?(t="$$",ia+=2):(t=o,0===ba&&da(Eu)),t}function If(){var t;return"::"===r.substr(ia,2)?(t="::",ia+=2):(t=o,0===ba&&da(Tu)),t}function Nf(){var t;return 61===r.charCodeAt(ia)?(t="=",ia++):(t=o,0===ba&&da(_t)),t}function Rf(){var t,e,n,s;return t=ia,"add"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(Nu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="ADD":(ia=t,t=o)):(ia=t,t=o),t}function Sf(){var t,e,n,s;return t=ia,"column"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(Ru)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="COLUMN":(ia=t,t=o)):(ia=t,t=o),t}function _f(){var t,e,n,s;return t=ia,"index"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(Su)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="INDEX":(ia=t,t=o)):(ia=t,t=o),t}function gf(){var t,e,n,s;return t=ia,"key"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(D)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="KEY":(ia=t,t=o)):(ia=t,t=o),t}function Of(){var t,e,n,s;return t=ia,"unique"===r.substr(ia,6).toLowerCase()?(e=r.substr(ia,6),ia+=6):(e=o,0===ba&&da(k)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="UNIQUE":(ia=t,t=o)):(ia=t,t=o),t}function xf(){var t,e,n,s;return t=ia,"comment"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(Ou)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="COMMENT":(ia=t,t=o)):(ia=t,t=o),t}function Uf(){var t,e,n,s;return t=ia,"constraint"===r.substr(ia,10).toLowerCase()?(e=r.substr(ia,10),ia+=10):(e=o,0===ba&&da(xu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="CONSTRAINT":(ia=t,t=o)):(ia=t,t=o),t}function Mf(){var t,e,n,s;return t=ia,"concurrently"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(Uu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="CONCURRENTLY":(ia=t,t=o)):(ia=t,t=o),t}function kf(){var t;return 46===r.charCodeAt(ia)?(t=".",ia++):(t=o,0===ba&&da(Yn)),t}function Df(){var t;return 44===r.charCodeAt(ia)?(t=",",ia++):(t=o,0===ba&&da(ju)),t}function $f(){var t;return 42===r.charCodeAt(ia)?(t="*",ia++):(t=o,0===ba&&da(te)),t}function Pf(){var t;return 40===r.charCodeAt(ia)?(t="(",ia++):(t=o,0===ba&&da(at)),t}function Ff(){var t;return 41===r.charCodeAt(ia)?(t=")",ia++):(t=o,0===ba&&da(it)),t}function Gf(){var t;return 91===r.charCodeAt(ia)?(t="[",ia++):(t=o,0===ba&&da(Hu)),t}function jf(){var t;return 93===r.charCodeAt(ia)?(t="]",ia++):(t=o,0===ba&&da(Yu)),t}function Hf(){var t;return 59===r.charCodeAt(ia)?(t=";",ia++):(t=o,0===ba&&da(ut)),t}function Yf(){var t;return"->"===r.substr(ia,2)?(t="->",ia+=2):(t=o,0===ba&&da(Bu)),t}function Bf(){var t;return"->>"===r.substr(ia,3)?(t="->>",ia+=3):(t=o,0===ba&&da(Wu)),t}function Wf(){var t;return"||"===r.substr(ia,2)?(t="||",ia+=2):(t=o,0===ba&&da(se)),t}function Xf(){var t;return(t=Wf())===o&&(t=function(){var t;return"&&"===r.substr(ia,2)?(t="&&",ia+=2):(t=o,0===ba&&da(qu)),t}()),t}function Vf(){var r,t;for(r=[],(t=Qf())===o&&(t=Kf());t!==o;)r.push(t),(t=Qf())===o&&(t=Kf());return r}function qf(){var r,t;if(r=[],(t=Qf())===o&&(t=Kf()),t!==o)for(;t!==o;)r.push(t),(t=Qf())===o&&(t=Kf());else r=o;return r}function Kf(){var t;return(t=function t(){var e,n,s,u,a,i,l;if(e=ia,"/*"===r.substr(ia,2)?(n="/*",ia+=2):(n=o,0===ba&&da(Ku)),n!==o){for(s=[],u=ia,a=ia,ba++,"*/"===r.substr(ia,2)?(i="*/",ia+=2):(i=o,0===ba&&da(Zu)),ba--,i===o?a=void 0:(ia=a,a=o),a!==o?(i=ia,ba++,"/*"===r.substr(ia,2)?(l="/*",ia+=2):(l=o,0===ba&&da(Ku)),ba--,l===o?i=void 0:(ia=i,i=o),i!==o&&(l=zf())!==o?u=a=[a,i,l]:(ia=u,u=o)):(ia=u,u=o),u===o&&(u=t());u!==o;)s.push(u),u=ia,a=ia,ba++,"*/"===r.substr(ia,2)?(i="*/",ia+=2):(i=o,0===ba&&da(Zu)),ba--,i===o?a=void 0:(ia=a,a=o),a!==o?(i=ia,ba++,"/*"===r.substr(ia,2)?(l="/*",ia+=2):(l=o,0===ba&&da(Ku)),ba--,l===o?i=void 0:(ia=i,i=o),i!==o&&(l=zf())!==o?u=a=[a,i,l]:(ia=u,u=o)):(ia=u,u=o),u===o&&(u=t());s!==o?("*/"===r.substr(ia,2)?(u="*/",ia+=2):(u=o,0===ba&&da(Zu)),u!==o?e=n=[n,s,u]:(ia=e,e=o)):(ia=e,e=o)}else ia=e,e=o;return e}())===o&&(t=function(){var t,e,n,s,u,a;if(t=ia,"--"===r.substr(ia,2)?(e="--",ia+=2):(e=o,0===ba&&da(zu)),e!==o){for(n=[],s=ia,u=ia,ba++,a=Jf(),ba--,a===o?u=void 0:(ia=u,u=o),u!==o&&(a=zf())!==o?s=u=[u,a]:(ia=s,s=o);s!==o;)n.push(s),s=ia,u=ia,ba++,a=Jf(),ba--,a===o?u=void 0:(ia=u,u=o),u!==o&&(a=zf())!==o?s=u=[u,a]:(ia=s,s=o);n!==o?t=e=[e,n]:(ia=t,t=o)}else ia=t,t=o;return t}()),t}function Zf(){var r,t,e,n,s,u,a;return r=ia,(t=xf())!==o&&Vf()!==o?((e=Nf())===o&&(e=null),e!==o&&Vf()!==o&&(n=jl())!==o?(u=e,a=n,r=t={type:(s=t).toLowerCase(),keyword:s.toLowerCase(),symbol:u,value:a}):(ia=r,r=o)):(ia=r,r=o),r}function zf(){var t;return r.length>ia?(t=r.charAt(ia),ia++):(t=o,0===ba&&da(Qu)),t}function Qf(){var t;return Ju.test(r.charAt(ia))?(t=r.charAt(ia),ia++):(t=o,0===ba&&da(ra)),t}function Jf(){var t,e;if((t=function(){var t,e;return t=ia,ba++,r.length>ia?(e=r.charAt(ia),ia++):(e=o,0===ba&&da(Qu)),ba--,e===o?t=void 0:(ia=t,t=o),t}())===o)if(t=[],jn.test(r.charAt(ia))?(e=r.charAt(ia),ia++):(e=o,0===ba&&da(Hn)),e!==o)for(;e!==o;)t.push(e),jn.test(r.charAt(ia))?(e=r.charAt(ia),ia++):(e=o,0===ba&&da(Hn));else t=o;return t}function rb(){var t,e;return t=ia,Ib=[],void 0!==o&&Vf()!==o?((e=tb())===o&&(e=function(){var t,e;return t=ia,function(){var t;return"return"===r.substr(ia,6).toLowerCase()?(t=r.substr(ia,6),ia+=6):(t=o,0===ba&&da(Au)),t}()!==o&&Vf()!==o&&(e=eb())!==o?t={type:"return",expr:e}:(ia=t,t=o),t}()),e!==o?t={type:"proc",stmt:e,vars:Ib}:(ia=t,t=o)):(ia=t,t=o),t}function tb(){var t,e,n,s;return t=ia,(e=lb())===o&&(e=cb()),e!==o&&Vf()!==o?((n=function(){var t;return":="===r.substr(ia,2)?(t=":=",ia+=2):(t=o,0===ba&&da(mu)),t}())===o&&(n=Nf()),n!==o&&Vf()!==o&&(s=eb())!==o?t=e={type:"assign",left:e,symbol:n,right:s}:(ia=t,t=o)):(ia=t,t=o),t}function eb(){var r;return(r=za())===o&&(r=function(){var r,t,e,n,s;return r=ia,(t=lb())!==o&&Vf()!==o&&(e=hi())!==o&&Vf()!==o&&(n=lb())!==o&&Vf()!==o&&(s=Ei())!==o?r=t={type:"join",ltable:t,rtable:n,op:e,on:s}:(ia=r,r=o),r}())===o&&(r=nb())===o&&(r=function(){var r,t;return r=ia,Gf()!==o&&Vf()!==o&&(t=ib())!==o&&Vf()!==o&&jf()!==o?r={type:"array",value:t}:(ia=r,r=o),r}()),r}function nb(){var r,t,e,n,s,u,a,i;if(r=ia,(t=sb())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=sl())!==o&&(a=Vf())!==o&&(i=sb())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=sl())!==o&&(a=Vf())!==o&&(i=sb())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=Ut(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function sb(){var r,t,e,n,s,u,a,i;if(r=ia,(t=ob())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=ul())!==o&&(a=Vf())!==o&&(i=ob())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=ul())!==o&&(a=Vf())!==o&&(i=ob())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=Ut(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function ob(){var r,t,e;return(r=Dl())===o&&(r=lb())===o&&(r=ab())===o&&(r=ml())===o&&(r=ia,Pf()!==o&&Vf()!==o&&(t=nb())!==o&&Vf()!==o&&Ff()!==o?((e=t).parentheses=!0,r=e):(ia=r,r=o)),r}function ub(){var r,t,e,n,s,u,a;return r=ia,(t=hl())!==o?(e=ia,(n=Vf())!==o&&(s=kf())!==o&&(u=Vf())!==o&&(a=hl())!==o?e=n=[n,s,u,a]:(ia=e,e=o),e===o&&(e=null),e!==o?r=t=function(r,t){let e=r;return null!==t&&(e=`${r}.${t[3]}`),e}(t,e):(ia=r,r=o)):(ia=r,r=o),r}function ab(){var r,t,e;return r=ia,(t=ub())!==o&&Vf()!==o&&Pf()!==o&&Vf()!==o?((e=ib())===o&&(e=null),e!==o&&Vf()!==o&&Ff()!==o?r=t={type:"function",name:t,args:{type:"expr_list",value:e}}:(ia=r,r=o)):(ia=r,r=o),r===o&&(r=ia,(t=ub())!==o&&(t=function(r){return{type:"function",name:r,args:null}}(t)),r=t),r}function ib(){var r,t,e,n,s,u,a,i;if(r=ia,(t=ob())!==o){for(e=[],n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=ob())!==o?n=s=[s,u,a,i]:(ia=n,n=o);n!==o;)e.push(n),n=ia,(s=Vf())!==o&&(u=Df())!==o&&(a=Vf())!==o&&(i=ob())!==o?n=s=[s,u,a,i]:(ia=n,n=o);e!==o?r=t=yb(t,e):(ia=r,r=o)}else ia=r,r=o;return r}function lb(){var t,e,n,s,u,a,i;if(t=ia,(e=Tf())!==o){for(n=[],ta.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(ea));s!==o;)n.push(s),ta.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(ea));n!==o&&(s=Tf())!==o?t=e={type:"var",name:n.join(""),prefix:"$$",suffix:"$$"}:(ia=t,t=o)}else ia=t,t=o;if(t===o){if(t=ia,(e=mf())!==o)if((n=dl())!==o)if((s=mf())!==o){for(u=[],ta.test(r.charAt(ia))?(a=r.charAt(ia),ia++):(a=o,0===ba&&da(ea));a!==o;)u.push(a),ta.test(r.charAt(ia))?(a=r.charAt(ia),ia++):(a=o,0===ba&&da(ea));u!==o&&(a=mf())!==o&&(i=dl())!==o&&(function(r,t,e){if(r!==e)return!0}(n,0,i)?o:void 0)!==o&&mf()!==o?t=e=function(r,t,e){return{type:"var",name:t.join(""),prefix:`$${r}$`,suffix:`$${e}$`}}(n,u,i):(ia=t,t=o)}else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;t===o&&(t=ia,(e=function(){var t;return(t=function(){var t;return"@@"===r.substr(ia,2)?(t="@@",ia+=2):(t=o,0===ba&&da(yu)),t}())===o&&(t=function(){var t;return 64===r.charCodeAt(ia)?(t="@",ia++):(t=o,0===ba&&da(hu)),t}())===o&&(t=mf())===o&&(t=mf()),t}())!==o&&(n=cb())!==o?t=e=function(r,t){return{type:"var",...t,prefix:r}}(e,n):(ia=t,t=o))}return t}function cb(){var t,e,n,s,u;return t=ia,34===r.charCodeAt(ia)?(e='"',ia++):(e=o,0===ba&&da(lt)),e===o&&(e=null),e!==o&&(n=hl())!==o&&(s=function(){var t,e,n,s;for(t=[],e=ia,46===r.charCodeAt(ia)?(n=".",ia++):(n=o,0===ba&&da(Yn)),n!==o&&(s=hl())!==o?e=n=[n,s]:(ia=e,e=o);e!==o;)t.push(e),e=ia,46===r.charCodeAt(ia)?(n=".",ia++):(n=o,0===ba&&da(Yn)),n!==o&&(s=hl())!==o?e=n=[n,s]:(ia=e,e=o);return t!==o&&(t=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e][1]);return t}(t)),t}())!==o?(34===r.charCodeAt(ia)?(u='"',ia++):(u=o,0===ba&&da(lt)),u===o&&(u=null),u!==o?t=e=function(r,t,e,n){if(r&&!n||!r&&n)throw new Error("double quoted not match");return Ib.push(t),{type:"var",name:t,members:e,quoted:r&&n?'"':null,prefix:null}}(e,n,s,u):(ia=t,t=o)):(ia=t,t=o),t===o&&(t=ia,(e=Wl())!==o&&(e={type:"var",name:e.value,members:[],quoted:null,prefix:null}),t=e),t}function fb(){var t;return(t=function(){var r,t,e;return r=ia,(t=pb())===o&&(t=bb()),t!==o&&Vf()!==o&&Gf()!==o&&Vf()!==o&&jf()!==o&&Vf()!==o&&Gf()!==o&&Vf()!==o&&jf()!==o?(e=t,r=t={...e,array:"two"}):(ia=r,r=o),r===o&&(r=ia,(t=pb())===o&&(t=bb()),t!==o&&Vf()!==o&&Gf()!==o&&Vf()!==o&&jf()!==o?(t=function(r){return{...r,array:"one"}}(t),r=t):(ia=r,r=o)),r}())===o&&(t=bb())===o&&(t=pb())===o&&(t=function(){var t,e,n,s;if(t=ia,(e=Lf())===o&&(e=Cf()),e!==o)if(Vf()!==o)if(Pf()!==o)if(Vf()!==o){if(n=[],Bn.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(Wn)),s!==o)for(;s!==o;)n.push(s),Bn.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(Wn));else n=o;n!==o&&(s=Vf())!==o&&Ff()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(ia=t,t=o)}else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;return t===o&&(t=ia,(e=Lf())===o&&(e=Cf()),e!==o&&(e=oa(e)),(t=e)===o&&(t=function(){var t,e,n,s,u,a;if(t=ia,(e=wf())===o&&(e=hf()),e!==o)if(Vf()!==o)if((n=Pf())!==o)if(Vf()!==o){if(s=[],Bn.test(r.charAt(ia))?(u=r.charAt(ia),ia++):(u=o,0===ba&&da(Wn)),u!==o)for(;u!==o;)s.push(u),Bn.test(r.charAt(ia))?(u=r.charAt(ia),ia++):(u=o,0===ba&&da(Wn));else s=o;s!==o&&(u=Vf())!==o&&Ff()!==o&&Vf()!==o?((a=Lb())===o&&(a=null),a!==o?(e=function(r,t,e){return{dataType:r,length:parseInt(t.join(""),10),parentheses:!0,suffix:e}}(e,s,a),t=e):(ia=t,t=o)):(ia=t,t=o)}else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;return t===o&&(t=ia,(e=wf())===o&&(e=hf()),e!==o&&Vf()!==o?((n=Lb())===o&&(n=null),n!==o?(e=function(r,t){return{dataType:r,suffix:t}}(e,n),t=e):(ia=t,t=o)):(ia=t,t=o)),t}())),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ia,"json"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(So)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="JSON":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"jsonb"===r.substr(ia,5).toLowerCase()?(e=r.substr(ia,5),ia+=5):(e=o,0===ba&&da(_o)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="JSONB":(ia=t,t=o)):(ia=t,t=o),t}()),t!==o&&(t=oa(t)),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ia,"geometry"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(go)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="GEOMETRY":(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(t={dataType:t}),t}())===o&&(t=function(){var r,t;return r=ia,(t=sf())===o&&(t=of())===o&&(t=uf())===o&&(t=af()),t!==o&&Gf()!==o&&Vf()!==o&&jf()!==o?r=t={dataType:t+"[]"}:(ia=r,r=o),r===o&&(r=ia,(t=sf())===o&&(t=of())===o&&(t=uf())===o&&(t=af()),t!==o&&(t=function(r){return{dataType:r}}(t)),r=t),r}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ia,"uuid"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Zo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="UUID":(ia=t,t=o)):(ia=t,t=o),t}())!==o&&(t={dataType:t}),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ia,"bool"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Co)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="BOOL":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"boolean"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(wo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="BOOLEAN":(ia=t,t=o)):(ia=t,t=o),t}()),t!==o&&(t=na(t)),t}())===o&&(t=function(){var r,t,e,n,s;return r=ia,(t=cf())!==o&&Vf()!==o&&(e=Hi())!==o?(n=t,(s=e).parentheses=!0,r=t={dataType:n,expr:s}):(ia=r,r=o),r}())===o&&(t=function(){var r;return(r=ef())===o&&(r=Ef()),r!==o&&(r=oa(r)),r}())===o&&(t=function(){var t;return"bytea"===r.substr(ia,5).toLowerCase()?(t=r.substr(ia,5),ia+=5):(t=o,0===ba&&da(sa)),t!==o&&(t={dataType:"BYTEA"}),t}())===o&&(t=function(){var t;return(t=function(){var t,e,n,s;return t=ia,"oid"===r.substr(ia,3).toLowerCase()?(e=r.substr(ia,3),ia+=3):(e=o,0===ba&&da(zo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="OID":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regclass"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(Qo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGCLASS":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regcollation"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(Jo)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGCOLLATION":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regconfig"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(ru)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGCONFIG":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regdictionary"===r.substr(ia,13).toLowerCase()?(e=r.substr(ia,13),ia+=13):(e=o,0===ba&&da(tu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGDICTIONARY":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regnamespace"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(eu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGNAMESPACE":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regoper"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(nu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGOPER":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regoperator"===r.substr(ia,11).toLowerCase()?(e=r.substr(ia,11),ia+=11):(e=o,0===ba&&da(su)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGOPERATOR":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regproc"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(ou)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGPROC":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regprocedure"===r.substr(ia,12).toLowerCase()?(e=r.substr(ia,12),ia+=12):(e=o,0===ba&&da(uu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGPROCEDURE":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regrole"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(au)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGROLE":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(t=function(){var t,e,n,s;return t=ia,"regtype"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(iu)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="REGTYPE":(ia=t,t=o)):(ia=t,t=o),t}()),t!==o&&(t=na(t)),t}()),t}function bb(){var t,e,n,s;if(t=ia,(e=qc())===o&&(e=Kc()),e!==o)if(Vf()!==o)if(Pf()!==o)if(Vf()!==o){if(n=[],Bn.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(Wn)),s!==o)for(;s!==o;)n.push(s),Bn.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(Wn));else n=o;n!==o&&(s=Vf())!==o&&Ff()!==o?t=e={dataType:e,length:parseInt(n.join(""),10),parentheses:!0}:(ia=t,t=o)}else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;return t===o&&(t=ia,(e=qc())===o&&(e=function(){var t,e,n,s;return t=ia,"character"===r.substr(ia,9).toLowerCase()?(e=r.substr(ia,9),ia+=9):(e=o,0===ba&&da(Ur)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="CHARACTER":(ia=t,t=o)):(ia=t,t=o),t}()),e!==o&&(e=function(r){return{dataType:r}}(e)),(t=e)===o&&(t=ia,(e=Kc())!==o&&(e=oa(e)),t=e)),t}function vb(){var t,e,n;return t=ia,(e=Qc())===o&&(e=null),e!==o&&Vf()!==o?((n=function(){var t,e,n,s;return t=ia,"zerofill"===r.substr(ia,8).toLowerCase()?(e=r.substr(ia,8),ia+=8):(e=o,0===ba&&da(No)),e!==o?(n=ia,ba++,s=yl(),ba--,s===o?n=void 0:(ia=n,n=o),n!==o?t=e="ZEROFILL":(ia=t,t=o)):(ia=t,t=o),t}())===o&&(n=null),n!==o?t=e=function(r,t){const e=[];return r&&e.push(r),t&&e.push(t),e}(e,n):(ia=t,t=o)):(ia=t,t=o),t}function pb(){var t,e,n,s,u,a,i,l,c,f,b,v,p,L;if(t=ia,(e=Zc())===o&&(e=zc())===o&&(e=Jc())===o&&(e=rf())===o&&(e=tf())===o&&(e=nf())===o&&(e=lf())===o&&(e=ff())===o&&(e=bf())===o&&(e=ef())===o&&(e=vf())===o&&(e=pf()),e!==o)if((n=Vf())!==o)if((s=Pf())!==o)if((u=Vf())!==o){if(a=[],Bn.test(r.charAt(ia))?(i=r.charAt(ia),ia++):(i=o,0===ba&&da(Wn)),i!==o)for(;i!==o;)a.push(i),Bn.test(r.charAt(ia))?(i=r.charAt(ia),ia++):(i=o,0===ba&&da(Wn));else a=o;if(a!==o)if((i=Vf())!==o){if(l=ia,(c=Df())!==o)if((f=Vf())!==o){if(b=[],Bn.test(r.charAt(ia))?(v=r.charAt(ia),ia++):(v=o,0===ba&&da(Wn)),v!==o)for(;v!==o;)b.push(v),Bn.test(r.charAt(ia))?(v=r.charAt(ia),ia++):(v=o,0===ba&&da(Wn));else b=o;b!==o?l=c=[c,f,b]:(ia=l,l=o)}else ia=l,l=o;else ia=l,l=o;l===o&&(l=null),l!==o&&(c=Vf())!==o&&(f=Ff())!==o&&(b=Vf())!==o?((v=vb())===o&&(v=null),v!==o?(p=l,L=v,t=e={dataType:e,length:parseInt(a.join(""),10),scale:p&&parseInt(p[2].join(""),10),parentheses:!0,suffix:L}):(ia=t,t=o)):(ia=t,t=o)}else ia=t,t=o;else ia=t,t=o}else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;else ia=t,t=o;if(t===o){if(t=ia,(e=Zc())===o&&(e=zc())===o&&(e=Jc())===o&&(e=rf())===o&&(e=tf())===o&&(e=nf())===o&&(e=lf())===o&&(e=ff())===o&&(e=bf())===o&&(e=ef())===o&&(e=vf())===o&&(e=pf()),e!==o){if(n=[],Bn.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(Wn)),s!==o)for(;s!==o;)n.push(s),Bn.test(r.charAt(ia))?(s=r.charAt(ia),ia++):(s=o,0===ba&&da(Wn));else n=o;n!==o&&(s=Vf())!==o?((u=vb())===o&&(u=null),u!==o?t=e=function(r,t,e){return{dataType:r,length:parseInt(t.join(""),10),suffix:e}}(e,n,u):(ia=t,t=o)):(ia=t,t=o)}else ia=t,t=o;t===o&&(t=ia,(e=Zc())===o&&(e=zc())===o&&(e=Jc())===o&&(e=rf())===o&&(e=tf())===o&&(e=nf())===o&&(e=lf())===o&&(e=ff())===o&&(e=bf())===o&&(e=ef())===o&&(e=vf())===o&&(e=pf()),e!==o&&(n=Vf())!==o?((s=vb())===o&&(s=null),s!==o&&(u=Vf())!==o?t=e=function(r,t){return{dataType:r,suffix:t}}(e,s):(ia=t,t=o)):(ia=t,t=o))}return t}function Lb(){var t,e,n;return t=ia,"without"===r.substr(ia,7).toLowerCase()?(e=r.substr(ia,7),ia+=7):(e=o,0===ba&&da(ua)),e===o&&("with"===r.substr(ia,4).toLowerCase()?(e=r.substr(ia,4),ia+=4):(e=o,0===ba&&da(Ct))),e!==o&&Vf()!==o&&wf()!==o&&Vf()!==o?("zone"===r.substr(ia,4).toLowerCase()?(n=r.substr(ia,4),ia+=4):(n=o,0===ba&&da(aa)),n!==o?t=e=[e.toUpperCase(),"TIME","ZONE"]:(ia=t,t=o)):(ia=t,t=o),t}const Cb={ALTER:!0,ALL:!0,ADD:!0,AND:!0,AS:!0,ASC:!0,BETWEEN:!0,BY:!0,CALL:!0,CASE:!0,CREATE:!0,CONTAINS:!0,CURRENT_DATE:!0,CURRENT_TIME:!0,CURRENT_TIMESTAMP:!0,CURRENT_USER:!0,DELETE:!0,DESC:!0,DISTINCT:!0,DROP:!0,ELSE:!0,END:!0,EXISTS:!0,EXPLAIN:!0,FALSE:!0,FROM:!0,FULL:!0,GROUP:!0,HAVING:!0,IN:!0,INNER:!0,INSERT:!0,INTO:!0,IS:!0,JOIN:!0,JSON:!0,LEFT:!0,LIKE:!0,LIMIT:!0,NOT:!0,NULL:!0,NULLS:!0,OFFSET:!0,ON:!0,OR:!0,ORDER:!0,OUTER:!0,RECURSIVE:!0,RENAME:!0,RIGHT:!0,SELECT:!0,SESSION_USER:!0,SET:!0,SHOW:!0,SYSTEM_USER:!0,TABLE:!0,THEN:!0,TRUE:!0,TRUNCATE:!0,UNION:!0,UPDATE:!0,USING:!0,WITH:!0,WHEN:!0,WHERE:!0,WINDOW:!0,GLOBAL:!0,SESSION:!0,LOCAL:!0,PERSIST:!0,PERSIST_ONLY:!0};function db(r,t){return{type:"unary_expr",operator:r,expr:t}}function wb(r,t,e){return{type:"binary_expr",operator:r,left:t,right:e}}function hb(r){const t=n(Number.MAX_SAFE_INTEGER);return!(n(r)<t)}function yb(r,t,e=3){const n=[r];for(let r=0;r<t.length;r++)delete t[r][e].tableList,delete t[r][e].columnList,n.push(t[r][e]);return n}function Eb(r,t){let e=r;for(let r=0;r<t.length;r++)e=wb(t[r][1],e,t[r][3]);return e}function Ab(r){return Sb[r]||r||null}function mb(r){const t=new Set;for(let e of r.keys()){const r=e.split("::");if(!r){t.add(e);break}r&&r[1]&&(r[1]=Ab(r[1])),t.add(r.join("::"))}return Array.from(t)}function Tb(r){return"string"==typeof r?{type:"same",value:r}:r}let Ib=[];const Nb=new Set,Rb=new Set,Sb={};if((e=a())!==o&&ia===r.length)return e;throw e!==o&&ia<r.length&&da({type:"end"}),function(r,t,e){return new s(s.buildMessage(r,t),r,t,e)}(fa,ca<r.length?r.charAt(ca):null,ca<r.length?Ca(ca,ca+1):Ca(ca,ca))}}},function(r,t,e){r.exports=e(12)},function(r,t,e){e.r(t),e.d(t,"Parser",(function(){return At})),e.d(t,"util",(function(){return n}));var n={};function s(r){return function(r){if(Array.isArray(r))return o(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,t){if(r){if("string"==typeof r)return o(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(r,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function u(r){if(!r)return[];var t=r.keyword,e=r.type;return[t.toUpperCase(),vr(e)]}function a(r){if(r){var t=r.type,e=r.expr,n=r.symbol,o=t.toUpperCase(),a=[];switch(a.push(o),o){case"KEY_BLOCK_SIZE":n&&a.push(n),a.push(Lr(e));break;case"BTREE":case"HASH":a.length=0,a.push.apply(a,s(u(r)));break;case"WITH PARSER":a.push(e);break;case"VISIBLE":case"INVISIBLE":break;case"COMMENT":a.shift(),a.push(yr(r));break;case"DATA_COMPRESSION":a.push(n,vr(e.value),dr(e.on));break;default:a.push(n,Lr(e))}return a.filter(pr).join(" ")}}function i(r){return r?r.map(a):[]}function l(r){var t=r.constraint_type,e=r.index_type,n=r.index_options,o=void 0===n?[]:n,a=r.definition,l=r.on,c=r.with,f=[];if(f.push.apply(f,s(u(e))),a&&a.length){var b="CHECK"===vr(t)?"(".concat(st(a[0]),")"):"(".concat(a.map((function(r){return st(r)})).join(", "),")");f.push(b)}return f.push(i(o).join(" ")),c&&f.push("WITH (".concat(i(c).join(", "),")")),l&&f.push("ON [".concat(l,"]")),f}function c(r){return function(r){if(Array.isArray(r))return f(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,t){if(r){if("string"==typeof r)return f(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?f(r,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function b(r){if(r){var t=r.constraint,e=r.constraint_type,n=r.enforced,s=r.index,o=r.keyword,u=r.reference_definition,a=[],i=ar().database;a.push(vr(o)),a.push(fr(t));var f=vr(e);return"sqlite"===i&&"UNIQUE KEY"===f&&(f="UNIQUE"),a.push(f),a.push("sqlite"!==i&&fr(s)),a.push.apply(a,c(l(r))),a.push.apply(a,c(V(u))),a.push(vr(n)),a.filter(pr).join(" ")}}function v(r){if("string"==typeof r)return r;var t=r.window_specification;return"(".concat(function(r){var t=r.name,e=r.partitionby,n=r.orderby,s=r.window_frame_clause;return[t,ut(e,"partition by"),ut(n,"order by"),vr(s)].filter(pr).join(" ")}(t),")")}function L(r){var t=r.name,e=r.as_window_specification;return"".concat(t," AS ").concat(v(e))}function C(r){var t=r.args,e=r.name,n=r.consider_nulls,s=void 0===n?"":n,o=t?st(t).join(", "):"",u=function(r){switch(vr(r)){case"NTH_VALUE":case"LEAD":case"LAG":return!1;default:return!0}}(e);return[e,"(",o,!u&&")",s&&" ",s,u&&")"].filter(pr).join("")}function d(r){if(r){var t=r.as_window_specification,e=r.expr,n=r.keyword,s=r.type,o=r.parentheses,u=vr(s);if("WINDOW"===u)return"OVER ".concat(v(t));if("ON UPDATE"===u){var a="".concat(vr(s)," ").concat(vr(n)),i=st(e)||[];return o&&(a="".concat(a,"(").concat(i.join(", "),")")),a}throw new Error("unknown over type")}}function w(r){var t=r.arrows,e=void 0===t?[]:t,n=r.collate,s=r.target,o=r.expr,u=r.keyword,a=r.symbol,i=r.as,l=r.tail,c=r.properties,f=void 0===c?[]:c,b=s.length,v=s.dataType,p=s.parentheses,L=s.quoted,C=s.scale,d=s.suffix,w="";null!=b&&(w=C?"".concat(b,", ").concat(C):b),p&&(w="(".concat(w,")")),d&&d.length&&(w+=" ".concat(d.join(" ")));var h=st(o),y="::",E="";return"as"===a&&(h="".concat(vr(u),"(").concat(h),E=")",y=" ".concat(a.toUpperCase()," ")),E+=e.map((function(r,t){return er(r,Lr,f[t])})).join(" "),l&&(E+=" ".concat(l.operator," ").concat(st(l.expr))),i&&(E+=" AS ".concat(fr(i))),n&&(E+=" ".concat(br(n).join(" "))),[h,y,L,v,L,function(r){if(!r||!r.array)return"";switch(r.array){case"one":return"[]";case"two":return"[][]"}}(s),w,E].filter(pr).join("")}function h(r){var t=r.args,e=r.name,n=r.args_parentheses,s=r.parentheses,o=r.over,u=r.collate,a=r.suffix,i=br(u).join(" "),l=d(o),c=st(a);if(!t)return[e,l].filter(pr).join(" ");var f=r.separator||", ";"TRIM"===vr(e)&&(f=" ");var b=[e];return b.push(!1===n?" ":"("),b.push(st(t).join(f)),!1!==n&&b.push(")"),b=[b.join(""),c].filter(pr).join(" "),[s?"(".concat(b,")"):b,i,l].filter(pr).join(" ")}function y(r){var t=r.operator||r.op,e=st(r.right),n=!1;if(Array.isArray(e)){switch(t){case"=":t="IN";break;case"!=":t="NOT IN";break;case"BETWEEN":case"NOT BETWEEN":n=!0,e="".concat(e[0]," AND ").concat(e[1])}n||(e="(".concat(e.join(", "),")"))}var s=r.right.escape||{},o=[st(r.left),t,e,vr(s.type),st(s.value)].filter(pr).join(" ");return r.parentheses?"(".concat(o,")"):o}function E(r){return function(r){if(Array.isArray(r))return A(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,t){if(r){if("string"==typeof r)return A(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?A(r,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function m(r){return r?[vr(r.prefix),st(r.value),vr(r.suffix)]:[]}function T(r){return r?r.fetch?(e=(t=r).fetch,n=t.offset,[].concat(E(m(n)),E(m(e))).filter(pr).join(" ")):function(r){var t=r.seperator,e=r.value;return 1===e.length&&"offset"===t?nr("OFFSET",st(e[0])):nr("LIMIT",e.map(st).join("".concat("offset"===t?" ":"").concat(vr(t)," ")))}(r):"";var t,e,n}function I(r){if(r&&0!==r.length){var t=r[0].recursive?"RECURSIVE ":"",e=r.map((function(r){var t=r.name,e=r.stmt,n=r.columns,s=Array.isArray(n)?"(".concat(n.map(W).join(", "),")"):"";return"".concat("default"===t.type?fr(t.value):Lr(t)).concat(s," AS (").concat(st(e),")")})).join(", ");return"WITH ".concat(t).concat(e)}}function N(r){if(r&&r.position){var t=r.keyword,e=r.expr,n=[],s=vr(t);return"VAR"===s?n.push(e.map(nt).join(", ")):n.push(s,"string"==typeof e?fr(e):st(e)),n.filter(pr).join(" ")}}function R(r){var t=r.as_struct_val,e=r.columns,n=r.distinct,s=r.for,o=r.from,u=r.for_sys_time_as_of,a=void 0===u?{}:u,i=r.locking_read,l=r.groupby,c=r.having,f=r.into,b=void 0===f?{}:f,v=r.limit,p=r.options,L=r.orderby,C=r.parentheses_symbol,d=r.qualify,w=r.top,h=r.window,y=r.with,E=r.where,A=[I(y),"SELECT",vr(t)];A.push(lr(w)),Array.isArray(p)&&A.push(p.join(" ")),A.push(function(r){if(r){if("string"==typeof r)return r;var t=r.type,e=r.columns,n=[vr(t)];return e&&n.push("(".concat(e.map(W).join(", "),")")),n.filter(pr).join(" ")}}(n),Q(e,o));var m=b.position,R="";m&&(R=er("INTO",N,b)),"column"===m&&A.push(R),A.push(er("FROM",j,o)),"from"===m&&A.push(R);var S=a||{},_=S.keyword,g=S.expr;A.push(er(_,st,g)),A.push(er("WHERE",st,E)),A.push(nr("GROUP BY",ot(l).join(", "))),A.push(er("HAVING",st,c)),A.push(er("QUALIFY",st,d)),A.push(er("WINDOW",st,h)),A.push(ut(L,"order by")),A.push(T(v)),A.push(vr(i)),"end"===m&&A.push(R),A.push(function(r){if(r){var t=r.expr,e=r.keyword,n=[vr(r.type),vr(e)];return t?"".concat(n.join(" "),"(").concat(st(t),")"):n.join(" ")}}(s));var O=A.filter(pr).join(" ");return C?"(".concat(O,")"):O}function S(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function _(r){if(!r||0===r.length)return"";var t,e=[],n=function(r,t){var e="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=function(r,t){if(r){if("string"==typeof r)return S(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?S(r,t):void 0}}(r))||t&&r&&"number"==typeof r.length){e&&(r=e);var n=0,s=function(){};return{s:s,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){e=e.call(r)},n:function(){var r=e.next();return u=r.done,r},e:function(r){a=!0,o=r},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw o}}}}(r);try{for(n.s();!(t=n.n()).done;){var s=t.value,o=s.table,u=s.column,a=s.value,i=[[o,u].filter(pr).map((function(r){return fr(r)})).join(".")],l="";a&&(l=st(a),i.push("=",l)),e.push(i.filter(pr).join(" "))}}catch(r){n.e(r)}finally{n.f()}return e.join(", ")}function g(r){if("select"===r.type)return R(r);var t=r.map(st);return"(".concat(t.join("), ("),")")}function O(r){if(!r)return"";var t=["PARTITION","("];if(Array.isArray(r))t.push(r.map(fr).join(", "));else{var e=r.value;t.push(e.map(st).join(", "))}return t.push(")"),t.filter(pr).join("")}function x(r){return r?"column"===r.type?"(".concat(r.expr.map(W).join(", "),")"):void 0:""}function U(r){var t=r.expr,e=r.keyword,n=t.type,s=[vr(e)];switch(n){case"origin":s.push(Lr(t));break;case"update":s.push("UPDATE",er("SET",_,t.set),er("WHERE",st,t.where))}return s.filter(pr).join(" ")}function M(r){if(!r)return"";var t=r.action;return[x(r.target),U(t)].filter(pr).join(" ")}function k(r){var t=r.table,e=r.type,n=r.prefix,s=void 0===n?"into":n,o=r.columns,u=r.conflict,a=r.values,i=r.where,l=r.on_duplicate_update,c=r.partition,f=r.returning,b=r.set,v=l||{},p=v.keyword,L=v.set,C=[vr(e),vr(s),j(t),O(c)];return Array.isArray(o)&&C.push("(".concat(o.map(fr).join(", "),")")),C.push(er(Array.isArray(a)?"VALUES":"",g,a)),C.push(er("ON CONFLICT",M,u)),C.push(er("SET",_,b)),C.push(er("WHERE",st,i)),C.push(Ar(f)),C.push(er(p,_,L)),C.filter(pr).join(" ")}function D(r){var t=r.expr,e=r.unit;return["INTERVAL",st(t),vr(e)].filter(pr).join(" ")}function $(r){var t=r.type,e=r.as,n=r.expr,s=r.with_offset;return["".concat(vr(t),"(").concat(n&&st(n)||"",")"),er("AS",fr,e),er(vr(s&&s.keyword),fr,s&&s.as)].filter(pr).join(" ")}function P(r){if(r)switch(r.type){case"pivot":case"unpivot":return function(r){var t=r.as,e=r.column,n=r.expr,s=r.in_expr,o=r.type,u=[st(n),"FOR",W(e),y(s)],a=["".concat(vr(o),"(").concat(u.join(" "),")")];return t&&a.push("AS",fr(t)),a.join(" ")}(r);default:return""}}function F(r){if(r){var t=r.keyword,e=r.expr,n=r.index,s=r.index_columns,o=r.parentheses,u=r.prefix,a=[];switch(t.toLowerCase()){case"forceseek":a.push(vr(t),"(".concat(fr(n)),"(".concat(s.map(st).filter(pr).join(", "),"))"));break;case"spatial_window_max_cells":a.push(vr(t),"=",st(e));break;case"index":a.push(vr(u),vr(t),o?"(".concat(e.map(fr).join(", "),")"):"= ".concat(fr(e)));break;default:a.push(st(e))}return a.filter(pr).join(" ")}}function G(r){if("UNNEST"===vr(r.type))return $(r);var t=r.table,e=r.db,n=r.as,s=r.expr,o=r.operator,u=r.prefix,a=r.schema,i=r.server,l=r.tablesample,c=r.table_hint,f=fr(i),b=fr(e),v=fr(a),p=t&&fr(t);if(s)switch(s.type){case"values":var L=s.parentheses,C=s.values,d=s.prefix,w=[L&&"(","",L&&")"],h=g(C);d&&(h=h.split("(").slice(1).map((function(r){return"".concat(vr(d),"(").concat(r)})).join("")),w[1]="VALUES ".concat(h),p=w.filter(pr).join("");break;case"tumble":p=function(r){if(!r)return"";var t=r.data,e=r.timecol,n=r.size;return["TABLE(TUMBLE(TABLE",[fr(t.db),fr(t.table)].filter(pr).join("."),"DESCRIPTOR(".concat(W(e),")"),"".concat(D(n),"))")].filter(pr).join(" ")}(s);break;default:p=st(s)}var y=[f,b,v,p=[vr(u),p].filter(pr).join(" ")].filter(pr).join(".");r.parentheses&&(y="(".concat(y,")"));var E=[y];if(l){var A=["TABLESAMPLE",st(l.expr),Lr(l.repeatable)].filter(pr).join(" ");E.push(A)}return E.push(er("AS",fr,n),P(o)),c&&E.push(vr(c.keyword),"(".concat(c.expr.map(F).filter(pr).join(", "),")")),E.filter(pr).join(" ")}function j(r){if(!r)return"";if(!Array.isArray(r)){var t=r.expr,e=r.parentheses,n=j(t);return e?"(".concat(n,")"):n}var s=r[0],o=[];if("dual"===s.type)return"DUAL";o.push(G(s));for(var u=1;u<r.length;++u){var a=r[u],i=a.on,l=a.using,c=a.join,f=[];f.push(c?" ".concat(vr(c)):","),f.push(G(a)),f.push(er("ON",st,i)),l&&f.push("USING (".concat(l.map(fr).join(", "),")")),o.push(f.filter(pr).join(" "))}return o.filter(pr).join("")}function H(r){var t=r.keyword,e=r.symbol,n=r.value,s=[t.toUpperCase()];e&&s.push(e);var o=n;switch(t){case"partition by":case"default collate":o=st(n);break;case"options":o="(".concat(n.map((function(r){return[r.keyword,r.symbol,st(r.value)].join(" ")})).join(", "),")");break;case"cluster by":o=n.map(st).join(", ")}return s.push(o),s.join(" ")}function Y(r){return function(r){if(Array.isArray(r))return B(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,t){if(r){if("string"==typeof r)return B(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?B(r,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function W(r){var t=r.array_index,e=r.arrows,n=void 0===e?[]:e,s=r.as,o=r.collate,u=r.column,a=r.db,i=r.isDual,l=r.schema,c=r.table,f=r.parentheses,b=r.properties,v=r.suffix,p=r.order_by,L=r.subFields,C=void 0===L?[]:L,d="*"===u?"*":function(r,t){if("string"==typeof r)return fr(r,t);var e=r.expr,n=r.offset,s=r.suffix,o=n&&n.map((function(r){return["[",r.name,"".concat(r.name?"(":""),Lr(r.value),"".concat(r.name?")":""),"]"].filter(pr).join("")})).join("");return[st(e),o,s].filter(pr).join("")}(u,i),w=[l,a,c].filter(pr).map((function(r){return"".concat(fr(r))})).join(".");w&&(d="".concat(w,".").concat(d)),t&&(d="".concat(d,"[").concat(Lr(t.index),"]"),t.property&&(d="".concat(d,".").concat(Lr(t.property))));var h=[d=[d].concat(Y(C)).join("."),er("AS",st,s),n.map((function(r,t){return er(r,Lr,b[t])})).join(" ")];o&&h.push(br(o).join(" ")),h.push(vr(v)),h.push(vr(p));var y=h.filter(pr).join(" ");return f?"(".concat(y,")"):y}function X(r){var t=r||{},e=t.dataType,n=t.length,s=t.suffix,o=t.scale,u=t.expr,a=e;return null!=n&&(a+="(".concat([n,o].filter((function(r){return null!=r})).join(", "),")")),s&&s.length&&(a+=" ".concat(s.join(" "))),u&&(a+=st(u)),a}function V(r){var t=[];if(!r)return t;var e=r.definition,n=r.keyword,s=r.match,o=r.table,u=r.on_action;return t.push(vr(n)),t.push(j(o)),t.push(e&&"(".concat(e.map((function(r){return st(r)})).join(", "),")")),t.push(vr(s)),u.map((function(r){return t.push(vr(r.type),st(r.value))})),t.filter(pr)}function q(r){var t=r.column,e=r.collate,n=r.nulls,s=r.opclass,o=r.order_by;return[st("string"==typeof t?{type:"column_ref",table:r.table,column:t}:r),er(e&&e.type,fr,e&&e.value),s,vr(o),vr(n)].filter(pr).join(" ")}function K(r){var t=[],e=W(r.column),n=X(r.definition);t.push(e),t.push(n);var s=function(r){var t=[],e=r.nullable,n=r.character_set,s=r.check,o=r.comment,u=r.collate,a=r.storage,i=r.default_val,l=r.auto_increment,c=r.unique,f=r.primary_key,v=r.column_format,p=r.reference_definition;if(t.push(vr(e&&e.value)),i){var L=i.type,C=i.value;t.push(L.toUpperCase(),st(C))}var d=ar().database;return t.push(b(s)),t.push(Tr(l),vr(f),vr(c),yr(o)),t.push.apply(t,Y(br(n))),"sqlite"!==d&&t.push.apply(t,Y(br(u))),t.push.apply(t,Y(br(v))),t.push.apply(t,Y(br(a))),t.push.apply(t,Y(V(p))),t.filter(pr).join(" ")}(r);t.push(s);var o=function(r){if(r)return[vr(r.value),"(".concat(st(r.expr),")"),vr(r.storage_type)].filter(pr).join(" ")}(r.generated);return t.push(o),t.filter(pr).join(" ")}function Z(r){return r?["AS",/^(`?)[a-z_][0-9a-z_]*(`?)$/i.test(r)?fr(r):cr(r)].join(" "):""}function z(r,t){var e=r.expr,n=r.type;if("cast"===n)return w(r);t&&(e.isDual=t);var s=st(e),o=r.expr_list;if(o){var u=[s],a=o.map((function(r){return z(r,t)})).join(", ");return u.push([vr(n),n&&"(",a,n&&")"].filter(pr).join("")),u.filter(pr).join(" ")}return e.parentheses&&Reflect.has(e,"array_index")&&(s="(".concat(s,")")),e.array_index&&"column_ref"!==e.type&&(s="".concat(s,"[").concat(Lr(e.array_index.index),"]")),[s,Z(r.as)].filter(pr).join(" ")}function Q(r,t){if(!r||"*"===r)return r;var e=function(r){var t=Array.isArray(r)&&r[0];return!(!t||"dual"!==t.type)}(t);return r.map((function(r){return z(r,e)})).join(", ")}function J(r){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}e.r(n),e.d(n,"arrayStructTypeToSQL",(function(){return hr})),e.d(n,"autoIncrementToSQL",(function(){return Tr})),e.d(n,"columnOrderListToSQL",(function(){return Ir})),e.d(n,"commonKeywordArgsToSQL",(function(){return mr})),e.d(n,"commonOptionConnector",(function(){return er})),e.d(n,"connector",(function(){return nr})),e.d(n,"commonTypeValue",(function(){return br})),e.d(n,"commentToSQL",(function(){return yr})),e.d(n,"createBinaryExpr",(function(){return or})),e.d(n,"createValueExpr",(function(){return sr})),e.d(n,"dataTypeToSQL",(function(){return wr})),e.d(n,"DEFAULT_OPT",(function(){return rr})),e.d(n,"escape",(function(){return ur})),e.d(n,"literalToSQL",(function(){return Lr})),e.d(n,"columnIdentifierToSql",(function(){return cr})),e.d(n,"getParserOpt",(function(){return ar})),e.d(n,"identifierToSql",(function(){return fr})),e.d(n,"onPartitionsToSQL",(function(){return dr})),e.d(n,"replaceParams",(function(){return Cr})),e.d(n,"returningToSQL",(function(){return Ar})),e.d(n,"hasVal",(function(){return pr})),e.d(n,"setParserOpt",(function(){return ir})),e.d(n,"toUpper",(function(){return vr})),e.d(n,"topToSQL",(function(){return lr})),e.d(n,"triggerEventToSQL",(function(){return Er}));var rr={database:"mysql",type:"table"},tr=rr;function er(r,t,e){if(e)return r?"".concat(r.toUpperCase()," ").concat(t(e)):t(e)}function nr(r,t){if(t)return"".concat(r.toUpperCase()," ").concat(t)}function sr(r){var t=J(r);if(Array.isArray(r))return{type:"expr_list",value:r.map(sr)};if(null===r)return{type:"null",value:null};switch(t){case"boolean":return{type:"bool",value:r};case"string":return{type:"string",value:r};case"number":return{type:"number",value:r};default:throw new Error('Cannot convert value "'.concat(t,'" to SQL'))}}function or(r,t,e){var n={operator:r,type:"binary_expr"};return n.left=t.type?t:sr(t),"BETWEEN"===r||"NOT BETWEEN"===r?(n.right={type:"expr_list",value:[sr(e[0]),sr(e[1])]},n):(n.right=e.type?e:sr(e),n)}function ur(r){return r}function ar(){return tr}function ir(r){tr=r}function lr(r){if(r){var t=r.value,e=r.percent,n=r.parentheses?"(".concat(t,")"):t,s="TOP ".concat(n);return e?"".concat(s," ").concat(e.toUpperCase()):s}}function cr(r){var t=ar().database;if(r)switch(t&&t.toLowerCase()){case"postgresql":case"db2":case"snowflake":return'"'.concat(r,'"');case"transactsql":return"[".concat(r,"]");default:return"`".concat(r,"`")}}function fr(r,t){var e=ar().database;if(!0===t)return"'".concat(r,"'");if(r){if("*"===r)return r;switch(e&&e.toLowerCase()){case"mysql":case"mariadb":case"sqlite":default:return"`".concat(r,"`");case"postgresql":case"snowflake":return'"'.concat(r,'"');case"transactsql":return"[".concat(r,"]");case"bigquery":case"db2":return r}}}function br(r){var t=[];if(!r)return t;var e=r.type,n=r.symbol,s=r.value;return t.push(e.toUpperCase()),n&&t.push(n),t.push(s.toUpperCase()),t}function vr(r){if(r)return r.toUpperCase()}function pr(r){return r}function Lr(r){if(r){var t=r.prefix,e=r.type,n=r.parentheses,s=r.suffix,o=r.value,u="string"==typeof r?r:o;switch(e){case"backticks_quote_string":u="`".concat(o,"`");break;case"string":case"single_quote_string":u="'".concat(o,"'");break;case"regex_string":u='r"'.concat(o,'"');break;case"hex_string":u="X'".concat(o,"'");break;case"full_hex_string":u="0x".concat(o);break;case"natural_string":case"var_string":u="N'".concat(o,"'");break;case"bit_string":u="b'".concat(o,"'");break;case"double_quote_string":u='"'.concat(o,'"');break;case"boolean":case"bool":u=o?"TRUE":"FALSE";break;case"null":u="NULL";break;case"star":u="*";break;case"param":u="".concat(t||":").concat(o),t=null;break;case"origin":u=o.toUpperCase();break;case"date":case"datetime":case"time":case"timestamp":u="".concat(e.toUpperCase()," '").concat(o,"'")}var a=[];return t&&a.push(vr(t)),a.push(u),s&&a.push("object"===J(s)&&s.collate?br(s.collate).join(" "):vr(s)),u=a.join(" "),n?"(".concat(u,")"):u}}function Cr(r,t){return function r(t,e){return Object.keys(t).filter((function(r){var e=t[r];return Array.isArray(e)||"object"===J(e)&&null!==e})).forEach((function(n){var s=t[n];if("object"!==J(s)||"param"!==s.type)return r(s,e);if(void 0===e[s.value])throw new Error("no value for parameter :".concat(s.value," found"));return t[n]=sr(e[s.value]),null})),t}(JSON.parse(JSON.stringify(r)),t)}function dr(r){var t=r.type,e=r.partitions;return[vr(t),"(".concat(e.map((function(r){if("range"!==r.type)return Lr(r);var t=r.start,e=r.end,n=r.symbol;return"".concat(Lr(t)," ").concat(vr(n)," ").concat(Lr(e))})).join(", "),")")].join(" ")}function wr(r){var t=r.dataType,e=r.length,n=r.parentheses,s=r.scale,o=r.suffix,u="";return null!=e&&(u=s?"".concat(e,", ").concat(s):e),n&&(u="(".concat(u,")")),o&&o.length&&(u+=" ".concat(o.join(" "))),"".concat(t).concat(u)}function hr(r){if(r){var t=r.dataType,e=r.definition,n=r.anglebracket,s=vr(t);if("ARRAY"!==s&&"STRUCT"!==s)return s;var o=e&&e.map((function(r){return[r.field_name,hr(r.field_type)].filter(pr).join(" ")})).join(", ");return n?"".concat(s,"<").concat(o,">"):"".concat(s," ").concat(o)}}function yr(r){if(r){var t=[],e=r.keyword,n=r.symbol,s=r.value;return t.push(e.toUpperCase()),n&&t.push(n),t.push(Lr(s)),t.join(" ")}}function Er(r){return r.map((function(r){var t=r.keyword,e=r.args,n=[vr(t)];if(e){var s=e.keyword,o=e.columns;n.push(vr(s),o.map(W).join(", "))}return n.join(" ")})).join(" OR ")}function Ar(r){return r?["RETURNING",r.columns.map(z).filter(pr).join(", ")].join(" "):""}function mr(r){return r?[vr(r.keyword),vr(r.args)]:[]}function Tr(r){if(r){if("string"==typeof r){var t=ar().database;return"sqlite"===(t&&t.toLowerCase())?"AUTOINCREMENT":"AUTO_INCREMENT"}var e=r.keyword,n=r.seed,s=r.increment,o=r.parentheses,u=vr(e);return o&&(u+="(".concat(Lr(n),", ").concat(Lr(s),")")),u}}function Ir(r){if(r)return r.map(q).filter(pr).join(", ")}var Nr=["analyze","attach","select","deallocate","delete","exec","update","insert","drop","rename","truncate","call","desc","use","alter","set","create","lock","unlock","declare","show","replace","if","grant","revoke","proc","raise","execute"];function Rr(r){var t=r&&r.ast?r.ast:r;if(!Nr.includes(t.type))throw new Error("".concat(t.type," statements not supported at the moment"))}function Sr(r){return Array.isArray(r)?(r.forEach(Rr),Yr(r)):(Rr(r),Hr(r))}function _r(r){return"go"===r.go?function r(t){if(!t||0===t.length)return"";var e=[Sr(t.ast)];return t.go_next&&e.push(t.go.toUpperCase(),r(t.go_next)),e.filter((function(r){return r})).join(" ")}(r):Sr(r)}function gr(r,t){var e="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=xr(r))||t&&r&&"number"==typeof r.length){e&&(r=e);var n=0,s=function(){};return{s:s,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){e=e.call(r)},n:function(){var r=e.next();return u=r.done,r},e:function(r){a=!0,o=r},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw o}}}}function Or(r){return function(r){if(Array.isArray(r))return Ur(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||xr(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xr(r,t){if(r){if("string"==typeof r)return Ur(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ur(r,t):void 0}}function Ur(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function Mr(r){var t=r.type,e=r.keyword,n=r.name,s=r.prefix,o=[vr(t),vr(e),vr(s)];switch(e){case"table":o.push(j(n));break;case"trigger":o.push([n[0].schema?"".concat(fr(n[0].schema),"."):"",fr(n[0].trigger)].filter(pr).join(""));break;case"database":case"schema":case"procedure":o.push(fr(n));break;case"view":o.push(j(n),r.options&&r.options.map(st).filter(pr).join(" "));break;case"index":o.push.apply(o,[W(n)].concat(Or(r.table?["ON",G(r.table)]:[]),[r.options&&r.options.map(st).filter(pr).join(" ")]))}return o.filter(pr).join(" ")}function kr(r){var t=r.type,e=r.keyword,n=r.tables,s=[t.toUpperCase(),vr(e)];if("UNLOCK"===t.toUpperCase())return s.join(" ");var o,u=[],a=gr(n);try{var i=function(){var r=o.value,t=r.table,e=r.lock_type,n=[G(t)];e&&n.push(["prefix","type","suffix"].map((function(r){return vr(e[r])})).filter(pr).join(" ")),u.push(n.join(" "))};for(a.s();!(o=a.n()).done;)i()}catch(r){a.e(r)}finally{a.f()}return s.push.apply(s,[u.join(", ")].concat(Or(function(r){var t=r.lock_mode,e=r.nowait,n=[];if(t){var s=t.mode;n.push(s.toUpperCase())}return e&&n.push(e.toUpperCase()),n}(r)))),s.filter(pr).join(" ")}function Dr(r){var t=r.name,e=r.host,n=[Lr(t)];return e&&n.push("@",Lr(e)),n.join("")}function $r(r){var t=r.type,e=r.grant_option_for,n=r.keyword,s=r.objects,o=r.on,u=r.to_from,a=r.user_or_roles,i=r.with,l=[vr(t),Lr(e)],c=s.map((function(r){var t=r.priv,e=r.columns,n=[st(t)];return e&&n.push("(".concat(e.map(W).join(", "),")")),n.join(" ")})).join(", ");if(l.push(c),o)switch(l.push("ON"),n){case"priv":l.push(Lr(o.object_type),o.priv_level.map((function(r){return[fr(r.prefix),fr(r.name)].filter(pr).join(".")})).join(", "));break;case"proxy":l.push(Dr(o))}return l.push(vr(u),a.map(Dr).join(", ")),l.push(Lr(i)),l.filter(pr).join(" ")}function Pr(r){var t=r.name,e=r.value;return["@".concat(t),"=",st(e)].filter(pr).join(" ")}function Fr(r){var t=r.left,e=r.right,n=r.symbol,s=r.keyword;t.keyword=s;var o=st(t),u=st(e);return"".concat(o," ").concat(n," ").concat(u)}function Gr(r){var t,e,n,s,o=r.keyword,u=r.suffix,a="";switch(vr(o)){case"BINLOG":e=(t=r).in,n=t.from,s=t.limit,a=[er("IN",Lr,e&&e.right),er("FROM",j,n),T(s)].filter(pr).join(" ");break;case"CHARACTER":case"COLLATION":a=function(r){var t=r.expr;if(t)return"LIKE"===vr(t.op)?er("LIKE",Lr,t.right):er("WHERE",st,t)}(r);break;case"COLUMNS":case"INDEXES":a=er("FROM",j,r.from);break;case"GRANTS":a=function(r){var t=r.for;if(t){var e=t.user,n=t.host,s=t.role_list,o="'".concat(e,"'");return n&&(o+="@'".concat(n,"'")),["FOR",o,s&&"USING",s&&s.map((function(r){return"'".concat(r,"'")})).join(", ")].filter(pr).join(" ")}}(r);break;case"CREATE":a=er("",G,r[u]);break;case"VAR":a=nt(r.var),o=""}return["SHOW",vr(o),vr(u),a].filter(pr).join(" ")}var jr={alter:function(r){var t=r.keyword;switch(void 0===t?"table":t){case"aggregate":return function(r){var t=r.args,e=r.expr,n=r.keyword,s=r.name,o=r.type,u=t.expr,a=t.orderby;return[vr(o),vr(n),[[fr(s.schema),fr(s.name)].filter(pr).join("."),"(".concat(u.map(Qr).join(", ")).concat(a?[" ORDER","BY",a.map(Qr).join(", ")].join(" "):"",")")].filter(pr).join(""),zr(e)].filter(pr).join(" ")}(r);case"table":return function(r){var t=r.type,e=r.table,n=r.expr,s=void 0===n?[]:n;return[vr(t),"TABLE",j(e),s.map(st).join(", ")].filter(pr).join(" ")}(r);case"schema":return function(r){var t=r.expr,e=r.keyword,n=r.schema;return[vr(r.type),vr(e),fr(n),zr(t)].filter(pr).join(" ")}(r);case"domain":case"type":return function(r){var t=r.expr,e=r.keyword,n=r.name;return[vr(r.type),vr(e),[fr(n.schema),fr(n.name)].filter(pr).join("."),zr(t)].filter(pr).join(" ")}(r);case"function":return function(r){var t=r.args,e=r.expr,n=r.keyword,s=r.name;return[vr(r.type),vr(n),[[fr(s.schema),fr(s.name)].filter(pr).join("."),t&&"(".concat(t.expr?t.expr.map(Qr).join(", "):"",")")].filter(pr).join(""),zr(e)].filter(pr).join(" ")}(r);case"view":return function(r){var t=r.type,e=r.columns,n=r.attributes,s=r.select,o=r.view,u=r.with,a=[vr(t),"VIEW",G(o)];return e&&a.push("(".concat(e.map(W).join(", "),")")),n&&a.push("WITH ".concat(n.map(vr).join(", "))),a.push("AS",R(s)),u&&a.push(vr(u)),a.filter(pr).join(" ")}(r)}},analyze:function(r){var t=r.type,e=r.table;return[vr(t),G(e)].join(" ")},attach:function(r){var t=r.type,e=r.database,n=r.expr,s=r.as,o=r.schema;return[vr(t),vr(e),st(n),vr(s),fr(o)].filter(pr).join(" ")},create:function(r){var t=r.keyword,e="";switch(t.toLowerCase()){case"aggregate":e=function(r){var t=r.type,e=r.replace,n=r.keyword,s=r.name,o=r.args,u=r.options,a=[vr(t),vr(e),vr(n)],i=[fr(s.schema),s.name].filter(pr).join("."),l="".concat(o.expr.map(Qr).join(", ")).concat(o.orderby?[" ORDER","BY",o.orderby.map(Qr).join(", ")].join(" "):"");return a.push("".concat(i,"(").concat(l,")"),"(".concat(u.map(Zr).join(", "),")")),a.filter(pr).join(" ")}(r);break;case"table":e=function(r){var t=r.type,e=r.keyword,n=r.table,s=r.like,o=r.as,u=r.temporary,a=r.if_not_exists,i=r.create_definitions,l=r.table_options,c=r.ignore_replace,f=r.or_replace,b=r.query_expr,v=[vr(t),vr(f),vr(u),vr(e),vr(a),j(n)];if(s){var p=s.type,L=j(s.table);return v.push(vr(p),L),v.filter(pr).join(" ")}return i&&v.push("(".concat(i.map(Vr).join(", "),")")),l&&v.push(l.map(H).join(" ")),v.push(vr(c),vr(o)),b&&v.push(Hr(b)),v.filter(pr).join(" ")}(r);break;case"trigger":e="constraint"===r.resource?function(r){var t=r.constraint,e=r.constraint_kw,n=r.deferrable,s=r.events,o=r.execute,u=r.for_each,a=r.from,i=r.location,l=r.keyword,c=r.or,f=r.type,b=r.table,v=r.when,p=[vr(f),vr(c),vr(e),vr(l),fr(t),vr(i)],L=Er(s);return p.push(L,"ON",G(b)),a&&p.push("FROM",G(a)),p.push.apply(p,Br(mr(n)).concat(Br(mr(u)))),v&&p.push(vr(v.type),st(v.cond)),p.push(vr(o.keyword),h(o.expr)),p.filter(pr).join(" ")}(r):function(r){var t=r.definer,e=r.for_each,n=r.keyword,s=r.execute,o=r.type,u=r.table,a=r.if_not_exists,i=r.temporary,l=r.trigger,c=r.events,f=r.order,b=r.time,v=r.when,p=[vr(o),vr(i),t,vr(n),vr(a),G(l),vr(b),c.map((function(r){var t=[vr(r.keyword)],e=r.args;return e&&t.push(vr(e.keyword),e.columns.map(W).join(", ")),t.join(" ")})),"ON",G(u),vr(e&&e.keyword),vr(e&&e.args),f&&"".concat(vr(f.keyword)," ").concat(fr(f.trigger)),er("WHEN",st,v),vr(s.prefix)];switch(s.type){case"set":p.push(er("SET",_,s.expr));break;case"multiple":p.push(Yr(s.expr.ast))}return p.push(vr(s.suffix)),p.filter(pr).join(" ")}(r);break;case"extension":e=function(r){var t=r.extension,e=r.from,n=r.if_not_exists,s=r.keyword,o=r.schema,u=r.type,a=r.with,i=r.version;return[vr(u),vr(s),vr(n),Lr(t),vr(a),er("SCHEMA",Lr,o),er("VERSION",Lr,i),er("FROM",Lr,e)].filter(pr).join(" ")}(r);break;case"function":e=function(r){var t=r.type,e=r.replace,n=r.keyword,s=r.name,o=r.args,u=r.returns,a=r.options,i=r.last,l=[vr(t),vr(e),vr(n)],c=[fr(s.schema),s.name].filter(pr).join("."),f=o.map(Qr).filter(pr).join(", ");return l.push("".concat(c,"(").concat(f,")"),function(r){var t=r.type,e=r.keyword,n=r.expr;return[vr(t),vr(e),Array.isArray(n)?"(".concat(n.map(K).join(", "),")"):qr(n)].filter(pr).join(" ")}(u),a.map(Kr).join(" "),i),l.filter(pr).join(" ")}(r);break;case"index":e=function(r){var t=r.concurrently,e=r.filestream_on,n=r.keyword,s=r.include,o=r.index_columns,a=r.index_type,l=r.index_using,c=r.index,f=r.on,b=r.index_options,v=r.algorithm_option,p=r.lock_option,L=r.on_kw,C=r.table,d=r.tablespace,w=r.type,h=r.where,y=r.with,E=r.with_before_where,A=y&&"WITH (".concat(i(y).join(", "),")"),m=s&&"".concat(vr(s.keyword)," (").concat(s.columns.map((function(r){return fr(r)})).join(", "),")"),T=[vr(w),vr(a),vr(n),vr(t),fr(c),vr(L),G(C)].concat(Br(u(l)),["(".concat(Ir(o),")"),m,i(b).join(" "),zr(v),zr(p),er("TABLESPACE",Lr,d)]);return E?T.push(A,er("WHERE",st,h)):T.push(er("WHERE",st,h),A),T.push(er("ON",st,f),er("FILESTREAM_ON",Lr,e)),T.filter(pr).join(" ")}(r);break;case"sequence":e=function(r){var t=r.type,e=r.keyword,n=r.sequence,s=r.temporary,o=r.if_not_exists,u=r.create_definitions,a=[vr(t),vr(s),vr(e),vr(o),j(n)];return u&&a.push(u.map(Vr).join(" ")),a.filter(pr).join(" ")}(r);break;case"database":e=function(r){var t=r.type,e=r.keyword,n=r.database,s=r.if_not_exists,o=r.create_definitions,u=[vr(t),vr(e),vr(s),cr(n)];return o&&u.push(o.map(H).join(" ")),u.filter(pr).join(" ")}(r);break;case"view":e=function(r){var t=r.algorithm,e=r.columns,n=r.definer,s=r.if_not_exists,o=r.keyword,u=r.recursive,a=r.replace,i=r.select,l=r.sql_security,c=r.temporary,f=r.type,b=r.view,v=r.with,p=r.with_options,L=b.db,C=b.view,d=[fr(L),fr(C)].filter(pr).join(".");return[vr(f),vr(a),vr(c),vr(u),t&&"ALGORITHM = ".concat(vr(t)),n,l&&"SQL SECURITY ".concat(vr(l)),vr(o),vr(s),d,e&&"(".concat(e.map(cr).join(", "),")"),p&&["WITH","(".concat(p.map((function(r){return br(r).join(" ")})).join(", "),")")].join(" "),"AS",Hr(i),vr(v)].filter(pr).join(" ")}(r);break;case"domain":e=function(r){var t=r.as,e=r.domain,n=r.type,s=r.keyword,o=r.target,u=r.create_definitions,a=[vr(n),vr(s),[fr(e.schema),fr(e.name)].filter(pr).join("."),vr(t),wr(o)];if(u&&u.length>0){var i,l=[],c=function(r,t){var e="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=Wr(r))){e&&(r=e);var n=0,s=function(){};return{s:s,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){e=e.call(r)},n:function(){var r=e.next();return u=r.done,r},e:function(r){a=!0,o=r},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw o}}}}(u);try{for(c.s();!(i=c.n()).done;){var f=i.value,v=f.type;switch(v){case"collate":l.push(br(f).join(" "));break;case"default":l.push(vr(v),st(f.value));break;case"constraint":l.push(b(f))}}}catch(r){c.e(r)}finally{c.f()}a.push(l.filter(pr).join(" "))}return a.filter(pr).join(" ")}(r);break;case"type":e=function(r){var t=r.as,e=r.create_definitions,n=r.keyword,s=r.name,o=r.resource,u=[vr(r.type),vr(n),[fr(s.schema),fr(s.name)].filter(pr).join("."),vr(t),vr(o)];if(e){var a=[];"enum"===o&&a.push(st(e)),u.push(a.filter(pr).join(" "))}return u.filter(pr).join(" ")}(r);break;default:throw new Error("unknown create resource ".concat(t))}return e},select:R,deallocate:function(r){var t=r.type,e=r.keyword,n=r.expr;return[vr(t),vr(e),st(n)].filter(pr).join(" ")},delete:function(r){var t=r.columns,e=r.from,n=r.table,s=r.where,o=r.orderby,u=r.with,a=r.limit,i=[I(u),"DELETE"],l=Q(t,e);return i.push(l),Array.isArray(n)&&(1===n.length&&!0===n[0].addition||i.push(j(n))),i.push(er("FROM",j,e)),i.push(er("WHERE",st,s)),i.push(ut(o,"order by")),i.push(T(a)),i.filter(pr).join(" ")},exec:function(r){var t=r.keyword,e=r.module,n=r.parameters;return[vr(t),G(e),(n||[]).map(Pr).filter(pr).join(", ")].filter(pr).join(" ")},execute:function(r){var t=r.type,e=r.name,n=r.args,s=[vr(t)],o=[e];return n&&o.push("(".concat(st(n).join(", "),")")),s.push(o.join("")),s.filter(pr).join(" ")},for:function(r){var t=r.type,e=r.label,n=r.target,s=r.query,o=r.stmts;return[e,vr(t),n,"IN",Yr([s]),"LOOP",Yr(o),"END LOOP",e].filter(pr).join(" ")},update:function(r){var t=r.from,e=r.table,n=r.set,s=r.where,o=r.orderby,u=r.with,a=r.limit,i=r.returning;return[I(u),"UPDATE",j(e),er("SET",_,n),er("FROM",j,t),er("WHERE",st,s),ut(o,"order by"),T(a),Ar(i)].filter(pr).join(" ")},if:function(r){var t=r.boolean_expr,e=r.else_expr,n=r.elseif_expr,s=r.if_expr,o=r.prefix,u=r.go,a=r.semicolons,i=r.suffix,l=[vr(r.type),st(t),Lr(o),"".concat(_r(s.ast||s)).concat(a[0]),vr(u)];return n&&l.push(n.map((function(r){return[vr(r.type),st(r.boolean_expr),"THEN",_r(r.then.ast||r.then),r.semicolon].filter(pr).join(" ")})).join(" ")),e&&l.push("ELSE","".concat(_r(e.ast||e)).concat(a[1])),l.push(Lr(i)),l.filter(pr).join(" ")},insert:k,drop:Mr,truncate:Mr,replace:k,declare:function(r){var t=r.type,e=r.declare,n=r.symbol,s=[vr(t)],o=e.map((function(r){var t=r.at,e=r.name,n=r.as,s=r.constant,o=r.datatype,u=r.not_null,a=r.prefix,i=r.definition,l=r.keyword,c=[[t,e].filter(pr).join(""),vr(n),vr(s)];switch(l){case"variable":c.push.apply(c,[X(o)].concat(Or(br(r.collate)),[vr(u)])),i&&c.push(vr(i.keyword),st(i.value));break;case"cursor":c.push(vr(a));break;case"table":c.push(vr(a),"(".concat(i.map(Vr).join(", "),")"))}return c.filter(pr).join(" ")})).join("".concat(n," "));return s.push(o),s.join(" ")},use:function(r){var t=r.type,e=r.db,n=vr(t),s=fr(e);return"".concat(n," ").concat(s)},rename:function(r){var t=r.type,e=r.table,n=[],s="".concat(t&&t.toUpperCase()," TABLE");if(e){var o,u=gr(e);try{for(u.s();!(o=u.n()).done;){var a=o.value.map(G);n.push(a.join(" TO "))}}catch(r){u.e(r)}finally{u.f()}}return"".concat(s," ").concat(n.join(", "))},call:function(r){var t=st(r.expr);return"".concat("CALL"," ").concat(t)},desc:function(r){var t=r.type,e=r.table,n=vr(t);return"".concat(n," ").concat(fr(e))},set:function(r){var t=st(r.expr);return"".concat("SET"," ").concat(t)},lock:kr,unlock:kr,show:Gr,grant:$r,revoke:$r,proc:function(r){var t=r.stmt;switch(t.type){case"assign":return Fr(t);case"return":return function(r){var t=r.type,e=r.expr;return[vr(t),st(e)].join(" ")}(t)}},raise:function(r){var t=r.type,e=r.level,n=r.raise,s=r.using,o=[vr(t),vr(e)];return n&&o.push([Lr(n.keyword),"format"===n.type&&n.expr.length>0&&","].filter(pr).join(""),n.expr.map((function(r){return st(r)})).join(", ")),s&&o.push(vr(s.type),vr(s.option),s.symbol,s.expr.map((function(r){return st(r)})).join(", ")),o.filter(pr).join(" ")}};function Hr(r){if(!r)return"";for(var t=jr[r.type],e=r,n=e._parentheses,s=e._orderby,o=e._limit,u=[n&&"(",t(r)];r._next;){var a=jr[r._next.type],i=vr(r.set_op);u.push(i,a(r._next)),r=r._next}return u.push(n&&")",ut(s,"order by"),T(o)),u.filter(pr).join(" ")}function Yr(r){for(var t=[],e=0,n=r.length;e<n;++e){var s=r[e]&&r[e].ast?r[e].ast:r[e];t.push(Hr(s))}return t.join(" ; ")}function Br(r){return function(r){if(Array.isArray(r))return Xr(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||Wr(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wr(r,t){if(r){if("string"==typeof r)return Xr(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Xr(r,t):void 0}}function Xr(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function Vr(r){if(!r)return[];var t,e,n,o,u=r.resource;switch(u){case"column":return K(r);case"index":return e=[],n=(t=r).keyword,o=t.index,e.push(vr(n)),e.push(o),e.push.apply(e,s(l(t))),e.filter(pr).join(" ");case"constraint":return b(r);case"sequence":return[vr(r.prefix),st(r.value)].filter(pr).join(" ");default:throw new Error("unknown resource = ".concat(u," type"))}}function qr(r){return r.dataType?wr(r):[fr(r.db),fr(r.schema),fr(r.table)].filter(pr).join(".")}function Kr(r){var t=r.type;switch(t){case"as":return[vr(t),r.symbol,Hr(r.declare),vr(r.begin),Yr(r.expr),vr(r.end),r.symbol].filter(pr).join(" ");case"set":return[vr(t),r.parameter,vr(r.value&&r.value.prefix),r.value&&r.value.expr.map(st).join(", ")].filter(pr).join(" ");default:return st(r)}}function Zr(r){var t=r.type,e=r.symbol,n=r.value,s=[vr(t),e];switch(vr(t)){case"SFUNC":s.push([fr(n.schema),n.name].filter(pr).join("."));break;case"STYPE":case"MSTYPE":s.push(wr(n));break;default:s.push(st(n))}return s.filter(pr).join(" ")}function zr(r){if(!r)return"";var t=r.action,e=r.create_definitions,n=r.first_after,s=r.if_not_exists,o=r.keyword,u=r.old_column,a=r.prefix,i=r.resource,c=r.symbol,f="",b=[];switch(i){case"column":b=[K(r)];break;case"index":b=l(r),f=r[i];break;case"table":case"schema":case"aggregate":case"function":case"domain":case"type":case"key":f=fr(r[i]);break;case"algorithm":case"lock":case"table-option":f=[c,vr(r[i])].filter(pr).join(" ");break;case"constraint":f=fr(r[i]),b=[Vr(e)];break;default:f=[c,r[i]].filter((function(r){return null!==r})).join(" ")}return[vr(t),vr(o),vr(s),u&&W(u),vr(a),f&&f.trim(),b.filter(pr).join(" "),n&&"".concat(vr(n.keyword)," ").concat(W(n.column))].filter(pr).join(" ")}function Qr(r){var t=r.default&&[vr(r.default.keyword),st(r.default.value)].join(" ");return[vr(r.mode),r.name,wr(r.type),t].filter(pr).join(" ")}function Jr(r){return(Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function rt(r){var t=r.definition,e=[vr(r.keyword)];return t&&"object"===Jr(t)&&(e.length=0,e.push(hr(t))),e.push(function(r){var t=r.expr_list;switch(vr(r.type)){case"STRUCT":return"(".concat(Q(t),")");case"ARRAY":return function(r){var t=r.array_path,e=r.brackets,n=r.expr_list,s=r.parentheses;if(!n)return"[".concat(Q(t),"]");var o=Array.isArray(n)?n.map((function(r){return"(".concat(Q(r),")")})).filter(pr).join(", "):st(n);return e?"[".concat(o,"]"):s?"(".concat(o,")"):o}(r);default:return""}}(r)),e.filter(pr).join("")}function tt(r){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}var et={alter:zr,aggr_func:function(r){var t=r.args,e=r.filter,n=r.over,s=r.within_group_orderby,o=st(t.expr),u=r.name,a=d(n),i=" ";t.parentheses&&(i="",o="(".concat(o,")")),t.distinct&&(o=["DISTINCT",o].join(i)),t.orderby&&(o="".concat(o," ").concat(ut(t.orderby,"order by"))),t.separator&&(o=[o,vr(t.separator.keyword),Lr(t.separator.value)].filter(pr).join(" "));var l=s?"WITHIN GROUP (".concat(ut(s,"order by"),")"):"",c=e?"FILTER (WHERE ".concat(st(e.where),")"):"";return["".concat(u,"(").concat(o,")"),l,a,c].filter(pr).join(" ")},any_value:function(r){var t=r.args,e=r.type,n=r.over,s=t.expr,o=t.having,u="".concat(vr(e),"(").concat(st(s));return o&&(u="".concat(u," HAVING ").concat(vr(o.prefix)," ").concat(st(o.expr))),[u="".concat(u,")"),d(n)].filter(pr).join(" ")},window_func:function(r){var t=r.over;return[C(r),d(t)].filter(pr).join(" ")},array:rt,assign:Fr,binary_expr:y,case:function(r){var t=["CASE"],e=r.args;r.expr&&t.push(st(r.expr));for(var n=0,s=e.length;n<s;++n)t.push(e[n].type.toUpperCase()),e[n].cond&&(t.push(st(e[n].cond)),t.push("THEN")),t.push(st(e[n].result));return t.push("END"),t.join(" ")},cast:w,column_ref:W,column_definition:K,datatype:wr,extract:function(r){var t=r.args,e=r.type,n=t.field,s=t.cast_type,o=t.source,u=["".concat(vr(e),"(").concat(vr(n)),"FROM",vr(s),st(o)];return"".concat(u.filter(pr).join(" "),")")},flatten:function(r){var t=r.args,e=r.type,n=["input","path","outer","recursive","mode"].map((function(r){return function(r){if(!r)return"";var t=r.type,e=r.symbol,n=r.value;return[vr(t),e,st(n)].filter(pr).join(" ")}(t[r])})).filter(pr).join(", ");return"".concat(vr(e),"(").concat(n,")")},fulltext_search:function(r){var t=r.against,e=r.as,n=r.columns,s=r.match,o=r.mode;return[[vr(s),"(".concat(n.map((function(r){return W(r)})).join(", "),")")].join(" "),[vr(t),["(",st(r.expr),o&&" ".concat(Lr(o)),")"].filter(pr).join("")].join(" "),Z(e)].filter(pr).join(" ")},function:h,insert:Hr,interval:D,json:function(r){var t=r.keyword,e=r.expr_list;return[vr(t),e.map((function(r){return st(r)})).join(", ")].join(" ")},show:Gr,struct:rt,tablefunc:function(r){var t=r.as,e=r.name,n=r.args;return["".concat(e,"(").concat(st(n).join(", "),")"),"AS",h(t)].join(" ")},tables:j,unnest:$,window:function(r){return r.expr.map(L).join(", ")}};function nt(r){var t=r.prefix,e=void 0===t?"@":t,n=r.name,s=r.members,o=r.keyword,u=r.quoted,a=r.suffix,i=[];o&&i.push(o);var l=s&&s.length>0?"".concat(n,".").concat(s.join(".")):n,c="".concat(e||"").concat(l);return a&&(c+=a),i.push(c),[u,i.join(" "),u].filter(pr).join("")}function st(r){if(r){var t=r;if(r.ast){var e=t.ast;Reflect.deleteProperty(t,e);for(var n=0,s=Object.keys(e);n<s.length;n++){var o=s[n];t[o]=e[o]}}return et[t.type]?et[t.type](t):Lr(t)}}function ot(r){return r?r.map(st):[]}function ut(r,t){if(!Array.isArray(r))return"";var e=[],n=vr(t);return e="ORDER BY"===n?r.map((function(r){return[st(r.expr),r.type||"ASC",vr(r.nulls)].filter(pr).join(" ")})):r.map((function(r){return st(r.expr)})),nr(n,e.join(", "))}et.var=nt,et.expr_list=function(r){var t=ot(r.value);return r.parentheses?"(".concat(t.join(", "),")"):t},et.select=function(r){var t="object"===tt(r._next)?Hr(r):R(r);return r.parentheses?"(".concat(t,")"):t},et.unary_expr=function(r){var t=r.operator,e=r.parentheses,n=r.expr,s="-"===t||"+"===t||"~"===t||"!"===t?"":" ",o="".concat(t).concat(s).concat(st(n));return e?"(".concat(o,")"):o};var at=e(1),it=e(2),lt=e(3),ct=e(4),ft=e(5),bt=e(6),vt=e(7),pt=e(8),Lt=e(9),Ct=e(10),dt={bigquery:at.parse,db2:it.parse,hive:lt.parse,mysql:ct.parse,mariadb:ft.parse,postgresql:bt.parse,snowflake:Ct.parse,sqlite:vt.parse,transactsql:pt.parse,flinksql:Lt.parse};function wt(r){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function ht(r,t){var e="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=function(r,t){if(r){if("string"==typeof r)return yt(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);return"Object"===e&&r.constructor&&(e=r.constructor.name),"Map"===e||"Set"===e?Array.from(r):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?yt(r,t):void 0}}(r))||t&&r&&"number"==typeof r.length){e&&(r=e);var n=0,s=function(){};return{s:s,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){e=e.call(r)},n:function(){var r=e.next();return u=r.done,r},e:function(r){a=!0,o=r},f:function(){try{u||null==e.return||e.return()}finally{if(a)throw o}}}}function yt(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}function Et(r){var t=function(r,t){if("object"!=wt(r)||!r)return r;var e=r[Symbol.toPrimitive];if(void 0!==e){var n=e.call(r,"string");if("object"!=wt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(r);return"symbol"==wt(t)?t:String(t)}var At=function(){function r(){!function(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r)}var t,e;return t=r,(e=[{key:"astify",value:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rr,e=this.parse(r,t);return e&&e.ast}},{key:"sqlify",value:function(r){return ir(arguments.length>1&&void 0!==arguments[1]?arguments[1]:rr),_r(r)}},{key:"exprToSQL",value:function(r){return ir(arguments.length>1&&void 0!==arguments[1]?arguments[1]:rr),st(r)}},{key:"parse",value:function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rr,e=t.database,n=void 0===e?"mysql":e;ir(t);var s=n.toLowerCase();if(dt[s])return dt[s](r.trim());throw new Error("".concat(n," is not supported currently"))}},{key:"whiteListCheck",value:function(r,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rr;if(t&&0!==t.length){var n=e.type,s=void 0===n?"table":n;if(!this["".concat(s,"List")]||"function"!=typeof this["".concat(s,"List")])throw new Error("".concat(s," is not valid check mode"));var o,u=!0,a="",i=ht(this["".concat(s,"List")].bind(this)(r,e));try{for(i.s();!(o=i.n()).done;){var l,c=o.value,f=!1,b=ht(t);try{for(b.s();!(l=b.n()).done;){var v=l.value;if(new RegExp(v,"i").test(c)){f=!0;break}}}catch(r){b.e(r)}finally{b.f()}if(!f){a=c,u=!1;break}}}catch(r){i.e(r)}finally{i.f()}if(!u)throw new Error("authority = '".concat(a,"' is required in ").concat(s," whiteList to execute SQL = '").concat(r,"'"))}}},{key:"tableList",value:function(r,t){var e=this.parse(r,t);return e&&e.tableList}},{key:"columnList",value:function(r,t){var e=this.parse(r,t);return e&&e.columnList}}])&&function(r,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,Et(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),r}();function mt(r){return(mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}"object"===("undefined"==typeof self?"undefined":mt(self))&&self&&(self.NodeSQLParser={Parser:At,util:n}),void 0===p&&"object"===("undefined"==typeof window?"undefined":mt(window))&&window&&(window.global=window),"object"===(void 0===p?"undefined":mt(p))&&p&&p.window&&(p.window.NodeSQLParser={Parser:At,util:n})}]));const w=new L.Parser,h={database:"MYSQL"};function y(r,t){return`query: ${r}\nerror: ${t}`}function E(r){let t={};try{t=w.astify(r,h)}catch(t){console.error(y(r,t))}const e=Array.isArray(t)?t[0]:t;return"select"===e.type?e:null}function A(r){try{return w.tableList(r,h).map((r=>r.split("::")[2]))}catch(t){return void console.error(y(r,t))}}function m(r){return{expr:{type:"column_ref",table:null,column:r},as:null}}function T(r){return w.sqlify(r,h)}function I(r,t,e){const n=E(r),s=function(r,t){return"*"===r?[m("*")]:r.map((r=>({expr:{type:"column_ref",table:t&&r.sourceTable?r.sourceTable:null,column:r.name},as:null})))}(t,!!(e&&e.length>1));if(!n)return"";if(!e||0===e.length)return T(Object.assign(Object.assign({},n),{columns:s,from:[{db:null,table:null,as:null}],where:N(n.where)}));return T(Object.assign(Object.assign({},n),{columns:s,from:e.map((r=>({db:null,table:r,as:null}))),where:N(n.where)}))}function N(r){return r?(r.args&&N(r.args),r.expr&&N(r.expr),r.left&&N(r.left),r.value&&("string"==typeof r.value&&(r.value=R(r.value)),Array.isArray(r.value)&&r.value.forEach((r=>N(r)))),r.right&&N(r.right),r):null}function R(r){return r.includes("\\'")?r:r.replace(/'/g,"\\'")}class S{constructor(r,t){this.href=r,this.as=null!=t?t:r}hrefPathname(r){const t=_(this.href);return r?`${t}/${r}`:t}asPathname(r){const t=_(this.as);return r?`${t}/${r}`:t}getQuery(){if("string"!=typeof this.href)return this.href.query}getHash(){var r;return"string"==typeof this.href?"":null!==(r=this.href.hash)&&void 0!==r?r:""}addStatic(r){return new S(this.hrefPathname(r),this.asPathname(r))}maybeAddStatic(r){return new S(this.hrefPathname(r),this.asPathname(r))}addDynamic(r,t,e=!1){const n=e?encodeURIComponent(t):t;return new S(this.hrefPathname(`[${r}]`),this.asPathname(n))}withQuery(r){const t=function(r){return Object.keys(r).reduce(((t,e)=>{const n=r[e];return null!=n&&n.length>0?Object.assign(Object.assign({},t),{[e]:n}):t}),{})}(r);return new S({pathname:this.hrefPathname(),query:t,hash:this.getHash()},{pathname:this.asPathname(),query:t,hash:this.getHash()})}withHash(r){return new S({pathname:this.hrefPathname(),query:this.getQuery(),hash:r},{pathname:this.asPathname(),query:this.getQuery(),hash:r})}}function _(r){var t;return r?"string"==typeof r?r:null!==(t=r.pathname)&&void 0!==t?t:"":""}const g=/\S+@\S+\.\S+/;const O=/^[-a-z0-9_]{3,32}$/g,x=/^-|^_|-$|_$|--|__|-_|_-/;function U(r){return r.length<3?"Username too short":r.length>32?"Username too long":r.toLowerCase()!==r?"Username cannot have uppercase letters":r.match(O)?r.match(x)?"Username invalid":"":"Username invalid"}exports.NULL_VALUE=f,exports.Route=S,exports.areTimeAgosEqual=function(r,t){return u(r)===u(t)},exports.compareArray=function(r,t){if(r.length!==t.length)return!1;const e=r.sort(),n=t.sort();for(let t=0;t<r.length;t++)if(e[t]!==n[t])return!1;return!0},exports.convertToSqlWithNewColNames=function(r,t,e){const n=E(r),s=function(r){return"*"===r?[m("*")]:r.map((r=>m(r)))}(t);return n?T(Object.assign(Object.assign({},n),{columns:s,from:[{db:null,table:e,as:null}],where:N(n.where)})):""},exports.convertToSqlWithNewCols=I,exports.convertToSqlWithNewCondition=function(r,t,e){const n=E(r);if(!n)return r;const s=function(r,t,e){const n=b(t),s=R(t),o={type:"binary_expr",operator:n?"IS":"=",left:{type:"column_ref",table:null,column:r},right:{type:n?"null":"string",value:n?null:s}};if(!e.where)return o;const u={type:"binary_expr",operator:"AND",left:Object.assign({},N(e.where)),right:o};return u}(t,e,n);return T(Object.assign(Object.assign({},n),{where:s}))},exports.convertToSqlWithOrderBy=function(r,t,e){const n=E(r);if(!n)return r;const s=function(r,t,e){var n;if(!e)return r.orderby?r.orderby.filter((r=>r.expr.column!==t)):null;const s=null===(n=r.orderby)||void 0===n?void 0:n.find((r=>r.expr.column===t));if(s)return s.type=e,r.orderby;const o={expr:{type:"column_ref",column:t},type:e};return r.orderby?[...r.orderby,o]:[o]}(n,t,e);return T(Object.assign(Object.assign({},n),{orderby:s}))},exports.convertToUTCDate=function(r){const t=new Date(r);return t.setUTCFullYear(r.getFullYear()),t.setUTCMonth(r.getMonth()),t.setUTCDate(r.getDate()),t.setUTCHours(r.getHours()),t.setUTCMinutes(r.getMinutes()),t.setUTCSeconds(r.getSeconds()),t},exports.dedupe=function(r){return Array.from(new Set(r))},exports.emailValidator=function(r){return{isValid:!!r.match(g),errorMsg:"Email format invalid"}},exports.enumKeys=function(r){return Object.keys(r).filter((r=>Number.isNaN(+r))).map((r=>r))},exports.excerpt=function(r,t=100){return r.length<t?r:((r,t)=>`${r.slice(0,t-1)}…`)(r,t)},exports.fakeEscapePress=function(){document.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape"})),document.dispatchEvent(new KeyboardEvent("keyup",{key:"Escape"}))},exports.formatNumber=function(r){return new Intl.NumberFormat("en-US").format(r)},exports.formatToRoundedUsd=function(r){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(r)},exports.formatToUsd=function(r){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(r)},exports.getColumns=function(r){const t=E(r);return null==t?void 0:t.columns},exports.getDateMinusHours=function(r,t){return 0===t||r.setHours(r.getHours()-t),r},exports.getDateString=function(r){const t=l(r.getMonth()+1),e=l(r.getDate());return`${r.getFullYear()}-${t}-${e}`},exports.getDisplayValue=function(r){return b(r)?"NULL":r},exports.getDisplayValueForApi=function(r){return b(r)?null:r},exports.getLongDateTimeString=function(r){const[t,e,n]=r.toLocaleString().split(" "),s=n?` ${n}`:"";return`${t} ${e.slice(0,-3)}${s}`},exports.getNow=c,exports.getTableName=function(r){if(!r)return;const t=A(r);return t&&0!==t.length?t[0]:void 0},exports.getTimeAgoString=function(r){return u(new Date(r))},exports.getTimeWithSeconds=function(r){return`${function(r){return`${l(r.getHours())}:${l(r.getMinutes())}`}(r)}:${l(r.getSeconds())}`},exports.getUTCDateAndTimeString=function(r){return`${a(r)} ${`${i(r)}:${l(r.getUTCSeconds())}`}`},exports.getUTCDateString=a,exports.getUTCNowDateString=function(){return a(c())},exports.getUTCTimeString=i,exports.initialUppercase=function(r){const[t,...e]=r;return[t.toLocaleUpperCase(),...e].join("")},exports.isMultipleQueries=function(r){try{const{ast:t}=w.parse(r);return Array.isArray(t)&&t.length>1}catch(r){return!1}},exports.isMutation=function(r){if(!r)return!1;const t=function(r){let t={};try{t=w.astify(r,h)}catch(t){return void console.error(y(r,t))}const e=Array.isArray(t)?t[0]:t;if(e)return e.type}(r);if(!t){const t=r.toLowerCase();if(t.startsWith("insert")||t.startsWith("alter")||t.startsWith("create")||t.startsWith("drop")||t.startsWith("update")||t.startsWith("revoke")||t.startsWith("grant")||t.startsWith("flush")||t.startsWith("with")&&(t.includes("update")&&t.includes("set")||t.includes("delete from")))return!0}return!!t&&"select"!==t&&"desc"!==t&&"show"!==t},exports.isNullValue=b,exports.makeQueryExecutable=function(r){return r.replace(/'/g,"\\'").replace(/\r\n|\n|\r/gm," ").trim()},exports.nTimes=function(r,t,e=[]){const n=[];for(let s=0;s<r;s++)n.push(t(...e));return n},exports.nTimesWithIndex=function(r,t){const e=[];for(let n=0;n<r;n++)e.push(t(n));return e},exports.oneHour=36e5,exports.parseSelectQuery=E,exports.pluralize=function(r,t){return 1===r?t:function(r){switch(r){case"person":return"people";case"repository":return"repositories";case"repository updated today":return"repositories updated today";case"database":return"databases";case"database updated today":return"databases updated today";default:return`${r}s`}}(t)},exports.prettyJSON=function(r){try{return JSON.stringify(r,null,2)}catch(t){return console.error(t),`${r}`}},exports.prettyJSONText=function(r){try{return JSON.stringify(JSON.parse(r),null,2)}catch(t){return console.error(t),r}},exports.queryHasOrderBy=function(r,t,e){const n=E(r);return!!n&&(n.orderby?e?n.orderby.some((r=>r.expr.column===t&&r.type===e)):!n.orderby.some((r=>r.expr.column===t)):!e)},exports.randomArrayItem=function(r){if(0===r.length)throw new Error("Can't take random element of empty array");return r[Math.floor(Math.random()*r.length)]},exports.randomNum=function(r,t){return Math.floor(Math.random()*(t-r)+r)},exports.removeColumnFromQuery=function(r,t,e){return I(r,e.filter((r=>r.name!==t)),A(r))},exports.requireTableNameForSelect=function(r){var t;return null!==(t=A(r))&&void 0!==t?t:function(r){const t=/\b(?:from|join)\s+`?(\w+)`?(?:\s*(?:join|,)\s+`?(\w+)`?)*\b/gi,e=[...r.matchAll(t)];return e.flatMap((r=>r.slice(1).filter(Boolean)))}(r)},exports.safeJSONParse=function(r){try{return JSON.parse(r)}catch(t){return r}},exports.tuplify=function(...r){return r},exports.usernameValidator=function(r){return{isValid:!!r.match(O)&&!r.match(x),errorMsg:"Username can only contain lowercase letters, dashes, and underscores and be between 3 and 32 characters",detailedErrorMsg:U(r)}};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|