Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sql-formatter

Package Overview
Dependencies
Maintainers
3
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-formatter - npm Package Compare versions

Comparing version 4.0.0-beta.3 to 4.0.0-beta.4

lib/languages/MariaDbFormatter.js

2

dist/sql-formatter.min.js

@@ -1,2 +0,2 @@

!function(E,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sqlFormatter=e():E.sqlFormatter=e()}(window,(function(){return function(E){var e={};function t(n){if(e[n])return e[n].exports;var T=e[n]={i:n,l:!1,exports:{}};return E[n].call(T.exports,T,T.exports,t),T.l=!0,T.exports}return t.m=E,t.c=e,t.d=function(E,e,n){t.o(E,e)||Object.defineProperty(E,e,{enumerable:!0,get:n})},t.r=function(E){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(E,"__esModule",{value:!0})},t.t=function(E,e){if(1&e&&(E=t(E)),8&e)return E;if(4&e&&"object"==typeof E&&E&&E.__esModule)return E;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:E}),2&e&&"string"!=typeof E)for(var T in E)t.d(n,T,function(e){return E[e]}.bind(null,T));return n},t.n=function(E){var e=E&&E.__esModule?function(){return E.default}:function(){return E};return t.d(e,"a",e),e},t.o=function(E,e){return Object.prototype.hasOwnProperty.call(E,e)},t.p="",t(t.s=0)}([function(E,e,t){"use strict";t.r(e),t.d(e,"format",(function(){return ie})),t.d(e,"supportedDialects",(function(){return Ce}));var n={WORD:"word",STRING:"string",RESERVED:"reserved",RESERVED_TOP_LEVEL:"reserved-top-level",RESERVED_TOP_LEVEL_NO_INDENT:"reserved-top-level-no-indent",RESERVED_NEWLINE:"reserved-newline",OPERATOR:"operator",OPEN_PAREN:"open-paren",CLOSE_PAREN:"close-paren",LINE_COMMENT:"line-comment",BLOCK_COMMENT:"block-comment",NUMBER:"number",PLACEHOLDER:"placeholder"},T=function(E){return E.replace(/[\t ]+$/,"")},R=function(E){return E.replace(/[\$\(-\+\.\?\[-\^\{-\}]/g,"\\$&")},r=function(E){return E.sort((function(E,e){return e.length-E.length||E.localeCompare(e)}))};function N(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}var A=function(){function E(e){!function(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),this.indent=e||" ",this.indentTypes=[]}var e,t,n;return e=E,(t=[{key:"getIndent",value:function(){return this.indent.repeat(this.indentTypes.length)}},{key:"increaseTopLevel",value:function(){this.indentTypes.push("top-level")}},{key:"increaseBlockLevel",value:function(){this.indentTypes.push("block-level")}},{key:"decreaseTopLevel",value:function(){var E;this.indentTypes.length>0&&"top-level"===(E=this.indentTypes)[E.length-1]&&this.indentTypes.pop()}},{key:"decreaseBlockLevel",value:function(){for(;this.indentTypes.length>0&&"top-level"===this.indentTypes.pop(););}},{key:"resetIndentation",value:function(){this.indentTypes=[]}}])&&N(e.prototype,t),n&&N(e,n),E}();function o(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}var O=function(){function E(){!function(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),this.level=0}var e,t,T;return e=E,(t=[{key:"beginIfPossible",value:function(E,e){0===this.level&&this.isInlineBlock(E,e)?this.level=1:this.level>0?this.level++:this.level=0}},{key:"end",value:function(){this.level--}},{key:"isActive",value:function(){return this.level>0}},{key:"isInlineBlock",value:function(E,e){for(var t=0,T=0,R=e;R<E.length;R++){var r=E[R];if((t+=r.value.length)>50)return!1;if(r.type===n.OPEN_PAREN)T++;else if(r.type===n.CLOSE_PAREN&&0==--T)return!0;if(this.isForbiddenToken(r))return!1}return!1}},{key:"isForbiddenToken",value:function(E){var e=E.type,t=E.value;return e===n.RESERVED_TOP_LEVEL||e===n.RESERVED_NEWLINE||e===n.COMMENT||e===n.BLOCK_COMMENT||";"===t}}])&&o(e.prototype,t),T&&o(e,T),E}();function I(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}var S=function(){function E(e){!function(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),this.params=e,this.index=0}var e,t,n;return e=E,(t=[{key:"get",value:function(E){var e=E.key,t=E.value;return this.params?e?this.params[e]:this.params[this.index++]:t}}])&&I(e.prototype,t),n&&I(e,n),E}(),L=function(E,e){return function(t){return(null==t?void 0:t.type)===E&&e.test(null==t?void 0:t.value)}},i=L(n.RESERVED_NEWLINE,/^AND$/i),C=L(n.RESERVED,/^BETWEEN$/i),u=L(n.RESERVED_TOP_LEVEL,/^LIMIT$/i),c=L(n.RESERVED_TOP_LEVEL,/^[S\u017F]ET$/i),a=L(n.RESERVED,/^BY$/i),s=L(n.RESERVED_TOP_LEVEL,/^WINDOW$/i),l=L(n.CLOSE_PAREN,/^END$/i);function D(E,e,t){return e in E?Object.defineProperty(E,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):E[e]=t,E}function f(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}var U=function(){function E(e){!function(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),this.cfg=e,this.indentation=new A(this.cfg.indent),this.inlineBlock=new O,this.params=new S(this.cfg.params),this.previousReservedToken={},this.tokens=[],this.index=0}var e,t,R;return e=E,(t=[{key:"tokenizer",value:function(){throw new Error("tokenizer() not implemented by subclass")}},{key:"tokenOverride",value:function(E){return E}},{key:"format",value:function(E){return this.tokens=this.tokenizer().tokenize(E),this.getFormattedQueryFromTokens().trim()}},{key:"getFormattedQueryFromTokens",value:function(){var E=this,e="";return this.tokens.forEach((function(t,T){E.index=T,(t=E.tokenOverride(t)).type===n.LINE_COMMENT?e=E.formatLineComment(t,e):t.type===n.BLOCK_COMMENT?e=E.formatBlockComment(t,e):t.type===n.RESERVED_TOP_LEVEL?(e=E.formatTopLevelReservedWord(t,e),E.previousReservedToken=t):t.type===n.RESERVED_TOP_LEVEL_NO_INDENT?(e=E.formatTopLevelReservedWordNoIndent(t,e),E.previousReservedToken=t):t.type===n.RESERVED_NEWLINE?(e=E.formatNewlineReservedWord(t,e),E.previousReservedToken=t):t.type===n.RESERVED?(e=E.formatWithSpaces(t,e),E.previousReservedToken=t):e=t.type===n.OPEN_PAREN?E.formatOpeningParentheses(t,e):t.type===n.CLOSE_PAREN?E.formatClosingParentheses(t,e):t.type===n.PLACEHOLDER?E.formatPlaceholder(t,e):","===t.value?E.formatComma(t,e):":"===t.value?E.formatWithSpaceAfter(t,e):"."===t.value?E.formatWithoutSpaces(t,e):";"===t.value?E.formatQuerySeparator(t,e):E.formatWithSpaces(t,e)})),e}},{key:"formatLineComment",value:function(E,e){return this.addNewline(e+this.show(E))}},{key:"formatBlockComment",value:function(E,e){return this.addNewline(this.addNewline(e)+this.indentComment(E.value))}},{key:"indentComment",value:function(E){return E.replace(/\n[\t ]*/g,"\n"+this.indentation.getIndent()+" ")}},{key:"formatTopLevelReservedWordNoIndent",value:function(E,e){return this.indentation.decreaseTopLevel(),e=this.addNewline(e)+this.equalizeWhitespace(this.show(E)),this.addNewline(e)}},{key:"formatTopLevelReservedWord",value:function(E,e){return this.indentation.decreaseTopLevel(),e=this.addNewline(e),this.indentation.increaseTopLevel(),e+=this.equalizeWhitespace(this.show(E)),this.addNewline(e)}},{key:"formatNewlineReservedWord",value:function(E,e){return i(E)&&C(this.tokenLookBehind(2))?this.formatWithSpaces(E,e):this.addNewline(e)+this.equalizeWhitespace(this.show(E))+" "}},{key:"equalizeWhitespace",value:function(E){return E.replace(/[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+/g," ")}},{key:"formatOpeningParentheses",value:function(E,e){var t,R,r=(D(t={},n.OPEN_PAREN,!0),D(t,n.LINE_COMMENT,!0),D(t,n.OPERATOR,!0),t);return 0!==E.whitespaceBefore.length||r[null===(R=this.tokenLookBehind())||void 0===R?void 0:R.type]||(e=T(e)),e+=this.show(E),this.inlineBlock.beginIfPossible(this.tokens,this.index),this.inlineBlock.isActive()||(this.indentation.increaseBlockLevel(),e=this.addNewline(e)),e}},{key:"formatClosingParentheses",value:function(E,e){return this.inlineBlock.isActive()?(this.inlineBlock.end(),this.formatWithSpaceAfter(E,e)):(this.indentation.decreaseBlockLevel(),this.formatWithSpaces(E,this.addNewline(e)))}},{key:"formatPlaceholder",value:function(E,e){return e+this.params.get(E)+" "}},{key:"formatComma",value:function(E,e){return e=T(e)+this.show(E)+" ",this.inlineBlock.isActive()||u(this.previousReservedToken)?e:this.addNewline(e)}},{key:"formatWithSpaceAfter",value:function(E,e){return T(e)+this.show(E)+" "}},{key:"formatWithoutSpaces",value:function(E,e){return T(e)+this.show(E)}},{key:"formatWithSpaces",value:function(E,e){return e+this.show(E)+" "}},{key:"formatQuerySeparator",value:function(E,e){return this.indentation.resetIndentation(),T(e)+this.show(E)+"\n".repeat(this.cfg.linesBetweenQueries||1)}},{key:"show",value:function(E){var e=E.type,t=E.value;return!this.cfg.uppercase||e!==n.RESERVED&&e!==n.RESERVED_TOP_LEVEL&&e!==n.RESERVED_TOP_LEVEL_NO_INDENT&&e!==n.RESERVED_NEWLINE&&e!==n.OPEN_PAREN&&e!==n.CLOSE_PAREN?t:t.toUpperCase()}},{key:"addNewline",value:function(E){return(E=T(E)).endsWith("\n")||(E+="\n"),E+this.indentation.getIndent()}},{key:"tokenLookBehind",value:function(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.tokens[this.index-E]}},{key:"tokenLookAhead",value:function(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.tokens[this.index+E]}}])&&f(e.prototype,t),R&&f(e,R),E}();function P(E){if(0===E.length)return new RegExp("^\b$","u");var e=r(E).join("|").replace(/ /g,"\\s+");return new RegExp("^(".concat(e,")\\b"),"iu")}function M(E){var e={"``":"((`[^`]*($|`))+)","{}":"((\\{[^\\}]*($|\\}))+)","[]":"((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)",'""':'(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',"''":"(('[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)","N''":"((N'[^N'\\\\]*(?:\\\\.[^N'\\\\]*)*('|$))+)","U&''":"((U&'[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)",'U&""':'((U&"[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',$$:"((?<tag>\\$\\w*\\$)[\\s\\S]*?(?:\\k<tag>|$))"};return E.map((function(E){return e[E]})).join("|")}function p(E){return new RegExp("^("+E.map(y).join("|")+")","iu")}function y(E){return 1===E.length?R(E):"\\b"+E+"\\b"}function _(E,e){if(t=E,!Array.isArray(t)||0===t.length)return!1;var t,n=E.map(R).join("|");return new RegExp("^((?:".concat(n,")(?:").concat(e,"))"),"u")}function h(E,e){var t=Object.keys(E);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(E);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(E,e).enumerable}))),t.push.apply(t,n)}return t}function d(E){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?h(Object(t),!0).forEach((function(e){v(E,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(e){Object.defineProperty(E,e,Object.getOwnPropertyDescriptor(t,e))}))}return E}function v(E,e,t){return e in E?Object.defineProperty(E,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):E[e]=t,E}function G(E){return function(E){if(Array.isArray(E))return F(E)}(E)||function(E){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(E))return Array.from(E)}(E)||function(E,e){if(!E)return;if("string"==typeof E)return F(E,e);var t=Object.prototype.toString.call(E).slice(8,-1);"Object"===t&&E.constructor&&(t=E.constructor.name);if("Map"===t||"Set"===t)return Array.from(E);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return F(E,e)}(E)||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(E,e){(null==e||e>E.length)&&(e=E.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=E[t];return n}function H(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}var B=function(){function E(e){var t,n,T;!function(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),this.WHITESPACE_REGEX=/^([\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+)/,this.NUMBER_REGEX=/^((\x2D[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?[0-9]+(\.[0-9]+)?([Ee]\x2D?[0-9]+(\.[0-9]+)?)?|0x[0-9A-Fa-f]+|0b[01]+)\b/,this.OPERATOR_REGEX=(t=[].concat(G(e.operators||[]),["!=","<>","==","<=",">=","!<","!>","||",":="]),new RegExp("^(".concat(r(t).map(R).join("|"),"|.)"),"u")),this.BLOCK_COMMENT_REGEX=/^(\/\*(?:(?![])[\s\S])*?(?:\*\/|$))/,this.LINE_COMMENT_REGEX=(n=e.lineCommentTypes,new RegExp("^((?:".concat(n.map((function(E){return R(E)})).join("|"),").*?)(?:\r\n|\r|\n|$)"),"u")),this.RESERVED_TOP_LEVEL_REGEX=P(e.reservedTopLevelWords),this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX=P(e.reservedTopLevelWordsNoIndent),this.RESERVED_NEWLINE_REGEX=P(e.reservedNewlineWords),this.RESERVED_PLAIN_REGEX=P(e.reservedWords),this.WORD_REGEX=function(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new RegExp("^([\\p{Alphabetic}\\p{Mark}\\p{Decimal_Number}\\p{Connector_Punctuation}\\p{Join_Control}".concat(E.join(""),"]+)"),"u")}(e.specialWordChars),this.STRING_REGEX=(T=e.stringTypes,new RegExp("^("+M(T)+")","u")),this.OPEN_PAREN_REGEX=p(e.openParens),this.CLOSE_PAREN_REGEX=p(e.closeParens),this.INDEXED_PLACEHOLDER_REGEX=_(e.indexedPlaceholderTypes,"[0-9]*"),this.IDENT_NAMED_PLACEHOLDER_REGEX=_(e.namedPlaceholderTypes,"[a-zA-Z0-9._$]+"),this.STRING_NAMED_PLACEHOLDER_REGEX=_(e.namedPlaceholderTypes,M(e.stringTypes))}var e,t,T;return e=E,(t=[{key:"tokenize",value:function(E){for(var e,t=[];E.length;){var n=this.getWhitespace(E);(E=E.substring(n.length)).length&&(e=this.getNextToken(E,e),E=E.substring(e.value.length),t.push(d(d({},e),{},{whitespaceBefore:n})))}return t}},{key:"getWhitespace",value:function(E){var e=E.match(this.WHITESPACE_REGEX);return e?e[1]:""}},{key:"getNextToken",value:function(E,e){return this.getCommentToken(E)||this.getStringToken(E)||this.getOpenParenToken(E)||this.getCloseParenToken(E)||this.getPlaceholderToken(E)||this.getNumberToken(E)||this.getReservedWordToken(E,e)||this.getWordToken(E)||this.getOperatorToken(E)}},{key:"getCommentToken",value:function(E){return this.getLineCommentToken(E)||this.getBlockCommentToken(E)}},{key:"getLineCommentToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.LINE_COMMENT,regex:this.LINE_COMMENT_REGEX})}},{key:"getBlockCommentToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.BLOCK_COMMENT,regex:this.BLOCK_COMMENT_REGEX})}},{key:"getStringToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.STRING,regex:this.STRING_REGEX})}},{key:"getOpenParenToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.OPEN_PAREN,regex:this.OPEN_PAREN_REGEX})}},{key:"getCloseParenToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.CLOSE_PAREN,regex:this.CLOSE_PAREN_REGEX})}},{key:"getPlaceholderToken",value:function(E){return this.getIdentNamedPlaceholderToken(E)||this.getStringNamedPlaceholderToken(E)||this.getIndexedPlaceholderToken(E)}},{key:"getIdentNamedPlaceholderToken",value:function(E){return this.getPlaceholderTokenWithKey({input:E,regex:this.IDENT_NAMED_PLACEHOLDER_REGEX,parseKey:function(E){return E.slice(1)}})}},{key:"getStringNamedPlaceholderToken",value:function(E){var e=this;return this.getPlaceholderTokenWithKey({input:E,regex:this.STRING_NAMED_PLACEHOLDER_REGEX,parseKey:function(E){return e.getEscapedPlaceholderKey({key:E.slice(2,-1),quoteChar:E.slice(-1)})}})}},{key:"getIndexedPlaceholderToken",value:function(E){return this.getPlaceholderTokenWithKey({input:E,regex:this.INDEXED_PLACEHOLDER_REGEX,parseKey:function(E){return E.slice(1)}})}},{key:"getPlaceholderTokenWithKey",value:function(E){var e=E.input,t=E.regex,T=E.parseKey,R=this.getTokenOnFirstMatch({input:e,regex:t,type:n.PLACEHOLDER});return R&&(R.key=T(R.value)),R}},{key:"getEscapedPlaceholderKey",value:function(E){var e=E.key,t=E.quoteChar;return e.replace(new RegExp(R("\\"+t),"gu"),t)}},{key:"getNumberToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.NUMBER,regex:this.NUMBER_REGEX})}},{key:"getOperatorToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.OPERATOR,regex:this.OPERATOR_REGEX})}},{key:"getReservedWordToken",value:function(E,e){if(!e||!e.value||"."!==e.value)return this.getTopLevelReservedToken(E)||this.getNewlineReservedToken(E)||this.getTopLevelReservedTokenNoIndent(E)||this.getPlainReservedToken(E)}},{key:"getTopLevelReservedToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.RESERVED_TOP_LEVEL,regex:this.RESERVED_TOP_LEVEL_REGEX})}},{key:"getNewlineReservedToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.RESERVED_NEWLINE,regex:this.RESERVED_NEWLINE_REGEX})}},{key:"getTopLevelReservedTokenNoIndent",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.RESERVED_TOP_LEVEL_NO_INDENT,regex:this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX})}},{key:"getPlainReservedToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.RESERVED,regex:this.RESERVED_PLAIN_REGEX})}},{key:"getWordToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:n.WORD,regex:this.WORD_REGEX})}},{key:"getTokenOnFirstMatch",value:function(E){var e=E.input,t=E.type,n=E.regex,T=e.match(n);return T?{type:t,value:T[1]}:void 0}}])&&H(e.prototype,t),T&&H(e,T),E}();function b(E){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function Y(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function V(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}function m(E,e){return(m=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function W(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,n=k(E);if(e){var T=k(this).constructor;t=Reflect.construct(n,arguments,T)}else t=n.apply(this,arguments);return g(this,t)}}function g(E,e){return!e||"object"!==b(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function k(E){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var X=["ABS","ACTIVATE","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","ANY","ARE","ARRAY","AS","ASC","ASENSITIVE","ASSOCIATE","ASUTIME","ASYMMETRIC","AT","ATOMIC","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","AVG","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CCSID","CEIL","CEILING","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLONE","CLOSE","CLUSTER","COALESCE","COLLATE","COLLECT","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","CONVERT","CORR","CORRESPONDING","COUNT","COUNT_BIG","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DATE","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DEREF","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DOUBLE","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELEMENT","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPTION","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXP","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FILTER","FINAL","FIRST","FLOAT","FLOOR","FOR","FOREIGN","FREE","FULL","FUNCTION","FUSION","GENERAL","GENERATED","GET","GLOBAL","GOTO","GRANT","GRAPHIC","GROUP","GROUPING","HANDLER","HASH","HASHED_VALUE","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTEGRITY","INTERSECTION","INTERVAL","INTO","IS","ISOBID","ISOLATION","ITERATE","JAR","JAVA","KEEP","KEY","LABEL","LANGUAGE","LARGE","LATERAL","LC_CTYPE","LEADING","LEAVE","LEFT","LIKE","LINKTYPE","LN","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","LOWER","MAINTAINED","MATCH","MATERIALIZED","MAX","MAXVALUE","MEMBER","MERGE","METHOD","MICROSECOND","MICROSECONDS","MIN","MINUTE","MINUTES","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MONTHS","MULTISET","NAN","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZE","NORMALIZED","NOT","NULL","NULLIF","NULLS","NUMERIC","NUMPARTS","OBID","OCTET_LENGTH","OF","OFFSET","OLD","OLD_TABLE","ON","ONLY","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PIECESIZE","PLAN","POSITION","POWER","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","REAL","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCOPE","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SIGNAL","SIMILAR","SIMPLE","SMALLINT","SNAN","SOME","SOURCE","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLID","SQLSTATE","SQLWARNING","SQRT","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STDDEV_POP","STDDEV_SAMP","STOGROUP","STORES","STYLE","SUBMULTISET","SUBSTRING","SUM","SUMMARY","SYMMETRIC","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","TABLESPACE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TYPE","UESCAPE","UNDO","UNIQUE","UNKNOWN","UNNEST","UNTIL","UPPER","USAGE","USER","USING","VALIDPROC","VALUE","VARCHAR","VARIABLE","VARIANT","VARYING","VAR_POP","VAR_SAMP","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHILE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],w=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INTERSECT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],K=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],j=["AND","CROSS JOIN","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN"],J=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&m(E,e)}(R,E);var e,t,n,T=W(R);function R(){return Y(this,R),T.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:X,reservedTopLevelWords:w,reservedNewlineWords:j,reservedTopLevelWordsNoIndent:K,stringTypes:['""',"''","``","[]"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["#","@"]})}}])&&V(e.prototype,t),n&&V(e,n),R}(U);function x(E){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function Q(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function Z(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}function $(E,e){return($=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function z(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,n=EE(E);if(e){var T=EE(this).constructor;t=Reflect.construct(n,arguments,T)}else t=n.apply(this,arguments);return q(this,t)}}function q(E,e){return!e||"object"!==x(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function EE(E){return(EE=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var eE=["ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","CONNECT","CONTINUE","CORRELATE","COVER","CREATE","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FIRST","FLATTEN","FOR","FORCE","FROM","FUNCTION","GRANT","GROUP","GSI","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LAST","LEFT","LET","LETTING","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MISSING","NAMESPACE","NEST","NOT","NULL","NUMBER","OBJECT","OFFSET","ON","OPTION","OR","ORDER","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROCEDURE","PUBLIC","RAW","REALM","REDUCE","RENAME","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","SATISFIES","SCHEMA","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TO","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WITH","WITHIN","WORK","XOR"],tE=["DELETE FROM","EXCEPT ALL","EXCEPT","EXPLAIN DELETE FROM","EXPLAIN UPDATE","EXPLAIN UPSERT","FROM","GROUP BY","HAVING","INFER","INSERT INTO","LET","LIMIT","MERGE","NEST","ORDER BY","PREPARE","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNNEST","UPDATE","UPSERT","USE KEYS","VALUES","WHERE"],nE=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],TE=["AND","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","XOR"],RE=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&$(E,e)}(R,E);var e,t,n,T=z(R);function R(){return Q(this,R),T.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:eE,reservedTopLevelWords:tE,reservedNewlineWords:TE,reservedTopLevelWordsNoIndent:nE,stringTypes:['""',"''","``"],openParens:["(","[","{"],closeParens:[")","]","}"],namedPlaceholderTypes:["$"],lineCommentTypes:["#","--"]})}}])&&Z(e.prototype,t),n&&Z(e,n),R}(U);function rE(E){return(rE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function NE(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function AE(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}function oE(E,e){return(oE=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function OE(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,n=SE(E);if(e){var T=SE(this).constructor;t=Reflect.construct(n,arguments,T)}else t=n.apply(this,arguments);return IE(this,t)}}function IE(E,e){return!e||"object"!==rE(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function SE(E){return(SE=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var LE=["A","ACCESSIBLE","AGENT","AGGREGATE","ALL","ALTER","ANY","ARRAY","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BETWEEN","BFILE_BASE","BINARY_INTEGER","BINARY","BLOB_BASE","BLOCK","BODY","BOOLEAN","BOTH","BOUND","BREADTH","BULK","BY","BYTE","C","CALL","CALLING","CASCADE","CASE","CHAR_BASE","CHAR","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLONE","CLOSE","CLUSTER","CLUSTERS","COALESCE","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONTINUE","CONVERT","COUNT","CRASH","CREATE","CREDENTIAL","CURRENT","CURRVAL","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE_BASE","DATE","DAY","DECIMAL","DEFAULT","DEFINE","DELETE","DEPTH","DESC","DETERMINISTIC","DIRECTORY","DISTINCT","DO","DOUBLE","DROP","DURATION","ELEMENT","ELSIF","EMPTY","END","ESCAPE","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTENDS","EXTERNAL","EXTRACT","FALSE","FETCH","FINAL","FIRST","FIXED","FLOAT","FOR","FORALL","FORCE","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSTANTIABLE","INT","INTEGER","INTERFACE","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMITED","LOCAL","LOCK","LONG","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUTE","MLSLABEL","MOD","MODE","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NATURAL","NATURALN","NCHAR","NEW","NEXTVAL","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NULLIF","NUMBER_BASE","NUMBER","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","OLD","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","ORACLE","ORADATA","ORDER","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERLAPS","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARENT","PARTITION","PASCAL","PCTFREE","PIPE","PIPELINED","PLS_INTEGER","PLUGGABLE","POSITIVE","POSITIVEN","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","REAL","RECORD","REF","REFERENCE","RELEASE","RELIES_ON","REM","REMAINDER","RENAME","RESOURCE","RESULT_CACHE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","ROWID","ROWNUM","ROWTYPE","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SEARCH","SECOND","SEGMENT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SHARE","SHORT","SIZE_T","SIZE","SMALLINT","SOME","SPACE","SPARSE","SQL","SQLCODE","SQLDATA","SQLERRM","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUCCESSFUL","SUM","SYNONYM","SYSDATE","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSACTION","TRANSACTIONAL","TRIGGER","TRUE","TRUSTED","TYPE","UB1","UB2","UB4","UID","UNDER","UNIQUE","UNPLUG","UNSIGNED","UNTRUSTED","USE","USER","USING","VALIDATE","VALIST","VALUE","VARCHAR","VARCHAR2","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHENEVER","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],iE=["ADD","ALTER COLUMN","ALTER TABLE","BEGIN","CONNECT BY","DECLARE","DELETE FROM","DELETE","END","EXCEPT","EXCEPTION","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","LOOP","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","START WITH","UPDATE","VALUES","WHERE"],CE=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],uE=["AND","CROSS APPLY","CROSS JOIN","ELSE","END","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"],cE=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&oE(E,e)}(r,E);var e,t,T,R=OE(r);function r(){return NE(this,r),R.apply(this,arguments)}return e=r,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:LE,reservedTopLevelWords:iE,reservedNewlineWords:uE,reservedTopLevelWordsNoIndent:CE,stringTypes:['""',"N''","''","``"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["_","$","#",".","@"]})}},{key:"tokenOverride",value:function(E){return c(E)&&a(this.previousReservedToken)?{type:n.RESERVED,value:E.value}:E}}])&&AE(e.prototype,t),T&&AE(e,T),r}(U);function aE(E){return(aE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function sE(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function lE(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}function DE(E,e){return(DE=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function fE(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,n=PE(E);if(e){var T=PE(this).constructor;t=Reflect.construct(n,arguments,T)}else t=n.apply(this,arguments);return UE(this,t)}}function UE(E,e){return!e||"object"!==aE(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function PE(E){return(PE=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var ME=["ABORT","ABSOLUTE","ACCESS","ACTION","ADD","ADMIN","AFTER","AGGREGATE","ALL","ALSO","ALTER","ALWAYS","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASSERTION","ASSIGNMENT","ASYMMETRIC","AT","ATTACH","ATTRIBUTE","AUTHORIZATION","BACKWARD","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BIT","BOOLEAN","BOTH","BY","CACHE","CALL","CALLED","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAIN","CHAR","CHARACTER","CHARACTERISTICS","CHECK","CHECKPOINT","CLASS","CLOSE","CLUSTER","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMENTS","COMMIT","COMMITTED","CONCURRENTLY","CONFIGURATION","CONFLICT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTENT","CONTINUE","CONVERSION","COPY","COST","CREATE","CROSS","CSV","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINER","DELETE","DELIMITER","DELIMITERS","DEPENDS","DESC","DETACH","DICTIONARY","DISABLE","DISCARD","DISTINCT","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","EACH","ELSE","ENABLE","ENCODING","ENCRYPTED","END","ENUM","ESCAPE","EVENT","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXPLAIN","EXPRESSION","EXTENSION","EXTERNAL","EXTRACT","FALSE","FAMILY","FETCH","FILTER","FIRST","FLOAT","FOLLOWING","FOR","FORCE","FOREIGN","FORWARD","FREEZE","FROM","FULL","FUNCTION","FUNCTIONS","GENERATED","GLOBAL","GRANT","GRANTED","GREATEST","GROUP","GROUPING","GROUPS","HANDLER","HAVING","HEADER","HOLD","HOUR","IDENTITY","IF","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDE","INCLUDING","INCREMENT","INDEX","INDEXES","INHERIT","INHERITS","INITIALLY","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","INVOKER","IS","ISNULL","ISOLATION","JOIN","KEY","LABEL","LANGUAGE","LARGE","LAST","LATERAL","LEADING","LEAKPROOF","LEAST","LEFT","LEVEL","LIKE","LIMIT","LISTEN","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LOCKED","LOGGED","MAPPING","MATCH","MATERIALIZED","MAXVALUE","METHOD","MINUTE","MINVALUE","MODE","MONTH","MOVE","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NEW","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NORMALIZE","NORMALIZED","NOT","NOTHING","NOTIFY","NOTNULL","NOWAIT","NULL","NULLIF","NULLS","NUMERIC","OBJECT","OF","OFF","OFFSET","OIDS","OLD","ON","ONLY","OPERATOR","OPTION","OPTIONS","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","OWNED","OWNER","PARALLEL","PARSER","PARTIAL","PARTITION","PASSING","PASSWORD","PLACING","PLANS","POLICY","POSITION","PRECEDING","PRECISION","PREPARE","PREPARED","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROGRAM","PUBLICATION","QUOTE","RANGE","READ","REAL","REASSIGN","RECHECK","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REINDEX","RELATIVE","RELEASE","RENAME","REPEATABLE","REPLACE","REPLICA","RESET","RESTART","RESTRICT","RETURNING","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROUTINES","ROW","ROWS","RULE","SAVEPOINT","SCHEMA","SCHEMAS","SCROLL","SEARCH","SECOND","SECURITY","SELECT","SEQUENCE","SEQUENCES","SERIALIZABLE","SERVER","SESSION","SESSION_USER","SET","SETOF","SETS","SHARE","SHOW","SIMILAR","SIMPLE","SKIP","SMALLINT","SNAPSHOT","SOME","SQL","STABLE","STANDALONE","START","STATEMENT","STATISTICS","STDIN","STDOUT","STORAGE","STORED","STRICT","STRIP","SUBSCRIPTION","SUBSTRING","SUPPORT","SYMMETRIC","SYSID","SYSTEM","TABLE","TABLES","TABLESAMPLE","TABLESPACE","TEMP","TEMPLATE","TEMPORARY","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRANSFORM","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TRUSTED","TYPE","TYPES","UESCAPE","UNBOUNDED","UNCOMMITTED","UNENCRYPTED","UNION","UNIQUE","UNKNOWN","UNLISTEN","UNLOGGED","UNTIL","UPDATE","USER","USING","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARCHAR","VARIADIC","VARYING","VERBOSE","VERSION","VIEW","VIEWS","VOLATILE","WHEN","WHERE","WHITESPACE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","XML","XMLATTRIBUTES","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","YEAR","YES","ZONE"],pE=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","CASE","DELETE FROM","END","EXCEPT","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],yE=["INTERSECT","INTERSECT ALL","UNION","UNION ALL"],_E=["AND","CROSS JOIN","ELSE","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN"],hE=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&DE(E,e)}(R,E);var e,t,n,T=fE(R);function R(){return sE(this,R),T.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:ME,reservedTopLevelWords:pE,reservedNewlineWords:_E,reservedTopLevelWordsNoIndent:yE,stringTypes:['""',"''","U&''",'U&""',"$$"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["$"],namedPlaceholderTypes:[],lineCommentTypes:["--"],operators:["<<",">>","||/","|/","::","->>","->","~~*","~~","!~~*","!~~","~*","!~*","!~"]})}}])&&lE(e.prototype,t),n&&lE(e,n),R}(U);function dE(E){return(dE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function vE(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function GE(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}function FE(E,e){return(FE=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function HE(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,n=bE(E);if(e){var T=bE(this).constructor;t=Reflect.construct(n,arguments,T)}else t=n.apply(this,arguments);return BE(this,t)}}function BE(E,e){return!e||"object"!==dE(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function bE(E){return(bE=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var YE=["AES128","AES256","ALLOWOVERWRITE","ANALYSE","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GZIP","IDENTITY","IGNORE","ILIKE","INITIALLY","INTO","LEADING","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY13","MOSTLY32","MOSTLY8","NATURAL","NEW","NULLS","OFF","OFFLINE","OFFSET","OLD","ON","ONLY","OPEN","ORDER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","REJECTLOG","RESORT","RESTORE","SESSION_USER","SIMILAR","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WITH","WITHOUT","PREDICATE","COLUMNS","COMPROWS","COMPRESSION","COPY","FORMAT","DELIMITER","FIXEDWIDTH","AVRO","JSON","ENCRYPTED","BZIP2","GZIP","LZOP","PARQUET","ORC","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","NULL AS","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","MANIFEST","REGION","IAM_ROLE","MASTER_SYMMETRIC_KEY","SSH","ACCEPTANYDATE","ACCEPTINVCHARS","ACCESS_KEY_ID","SECRET_ACCESS_KEY","AVRO","BLANKSASNULL","BZIP2","COMPROWS","COMPUPDATE","CREDENTIALS","DATEFORMAT","DELIMITER","EMPTYASNULL","ENCODING","ENCRYPTED","ESCAPE","EXPLICIT_IDS","FILLRECORD","FIXEDWIDTH","FORMAT","IAM_ROLE","GZIP","IGNOREBLANKLINES","IGNOREHEADER","JSON","LZOP","MANIFEST","MASTER_SYMMETRIC_KEY","MAXERROR","NOLOAD","NULL AS","READRATIO","REGION","REMOVEQUOTES","ROUNDEC","SSH","STATUPDATE","TIMEFORMAT","SESSION_TOKEN","TRIMBLANKS","TRUNCATECOLUMNS","EXTERNAL","DATA CATALOG","HIVE METASTORE","CATALOG_ROLE","VACUUM","COPY","UNLOAD","EVEN","ALL"],VE=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","INTERSECT","TOP","LIMIT","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNION ALL","UNION","UPDATE","VALUES","WHERE","VACUUM","COPY","UNLOAD","ANALYZE","ANALYSE","DISTKEY","SORTKEY","COMPOUND","INTERLEAVED","FORMAT","DELIMITER","FIXEDWIDTH","AVRO","JSON","ENCRYPTED","BZIP2","GZIP","LZOP","PARQUET","ORC","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","NULL AS","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","MANIFEST","REGION","IAM_ROLE","MASTER_SYMMETRIC_KEY","SSH","ACCEPTANYDATE","ACCEPTINVCHARS","ACCESS_KEY_ID","SECRET_ACCESS_KEY","AVRO","BLANKSASNULL","BZIP2","COMPROWS","COMPUPDATE","CREDENTIALS","DATEFORMAT","DELIMITER","EMPTYASNULL","ENCODING","ENCRYPTED","ESCAPE","EXPLICIT_IDS","FILLRECORD","FIXEDWIDTH","FORMAT","IAM_ROLE","GZIP","IGNOREBLANKLINES","IGNOREHEADER","JSON","LZOP","MANIFEST","MASTER_SYMMETRIC_KEY","MAXERROR","NOLOAD","NULL AS","READRATIO","REGION","REMOVEQUOTES","ROUNDEC","SSH","STATUPDATE","TIMEFORMAT","SESSION_TOKEN","TRIMBLANKS","TRUNCATECOLUMNS","EXTERNAL","DATA CATALOG","HIVE METASTORE","CATALOG_ROLE"],mE=[],WE=["AND","CROSS JOIN","ELSE","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","VACUUM","COPY","UNLOAD","ANALYZE","ANALYSE","DISTKEY","SORTKEY","COMPOUND","INTERLEAVED"],gE=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&FE(E,e)}(R,E);var e,t,n,T=HE(R);function R(){return vE(this,R),T.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:YE,reservedTopLevelWords:VE,reservedNewlineWords:WE,reservedTopLevelWordsNoIndent:mE,stringTypes:['""',"''","``"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@","#","$"],lineCommentTypes:["--"]})}}])&&GE(e.prototype,t),n&&GE(e,n),R}(U);function kE(E){return(kE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function XE(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function wE(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}function KE(E,e){return(KE=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function jE(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,n=xE(E);if(e){var T=xE(this).constructor;t=Reflect.construct(n,arguments,T)}else t=n.apply(this,arguments);return JE(this,t)}}function JE(E,e){return!e||"object"!==kE(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function xE(E){return(xE=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var QE=["ALL","ALTER","ANALYSE","ANALYZE","ARRAY_ZIP","ARRAY","AS","ASC","AVG","BETWEEN","CASCADE","CASE","CAST","COALESCE","COLLECT_LIST","COLLECT_SET","COLUMN","COLUMNS","COMMENT","CONSTRAINT","CONTAINS","CONVERT","COUNT","CUME_DIST","CURRENT ROW","CURRENT_DATE","CURRENT_TIMESTAMP","DATABASE","DATABASES","DATE_ADD","DATE_SUB","DATE_TRUNC","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DAY","DAYS","DECODE","DEFAULT","DELETE","DENSE_RANK","DESC","DESCRIBE","DISTINCT","DISTINCTROW","DIV","DROP","ELSE","ENCODE","END","EXISTS","EXPLAIN","EXPLODE_OUTER","EXPLODE","FILTER","FIRST_VALUE","FIRST","FIXED","FLATTEN","FOLLOWING","FROM_UNIXTIME","FULL","GREATEST","GROUP_CONCAT","HOUR_MINUTE","HOUR_SECOND","HOUR","HOURS","IF","IFNULL","IN","INSERT","INTERVAL","INTO","IS","LAG","LAST_VALUE","LAST","LEAD","LEADING","LEAST","LEVEL","LIKE","MAX","MERGE","MIN","MINUTE_SECOND","MINUTE","MONTH","NATURAL","NOT","NOW()","NTILE","NULL","NULLIF","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPTIMIZE","OVER","PERCENT_RANK","PRECEDING","RANGE","RANK","REGEXP","RENAME","RLIKE","ROW","ROWS","SECOND","SEPARATOR","SEQUENCE","SIZE","STRING","STRUCT","SUM","TABLE","TABLES","TEMPORARY","THEN","TO_DATE","TO_JSON","TO","TRAILING","TRANSFORM","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNIQUE","UNIX_TIMESTAMP","UNLOCK","UNSIGNED","USING","VARIABLES","VIEW","WHEN","WITH","YEAR_MONTH"],ZE=["ADD","AFTER","ALTER COLUMN","ALTER DATABASE","ALTER SCHEMA","ALTER TABLE","CLUSTER BY","CLUSTERED BY","DELETE FROM","DISTRIBUTE BY","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","OPTIONS","ORDER BY","PARTITION BY","PARTITIONED BY","RANGE","ROWS","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","TBLPROPERTIES","UPDATE","USING","VALUES","WHERE","WINDOW"],$E=["EXCEPT ALL","EXCEPT","INTERSECT ALL","INTERSECT","UNION ALL","UNION"],zE=["AND","ANTI JOIN","CREATE OR","CREATE","CROSS JOIN","ELSE","FULL OUTER JOIN","INNER JOIN","JOIN","LATERAL VIEW","LEFT ANTI JOIN","LEFT JOIN","LEFT OUTER JOIN","LEFT SEMI JOIN","NATURAL ANTI JOIN","NATURAL FULL OUTER JOIN","NATURAL INNER JOIN","NATURAL JOIN","NATURAL LEFT ANTI JOIN","NATURAL LEFT OUTER JOIN","NATURAL LEFT SEMI JOIN","NATURAL OUTER JOIN","NATURAL RIGHT OUTER JOIN","NATURAL RIGHT SEMI JOIN","NATURAL SEMI JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","RIGHT SEMI JOIN","SEMI JOIN","WHEN","XOR"],qE=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&KE(E,e)}(r,E);var e,t,T,R=jE(r);function r(){return XE(this,r),R.apply(this,arguments)}return e=r,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:QE,reservedTopLevelWords:ZE,reservedNewlineWords:zE,reservedTopLevelWordsNoIndent:$E,stringTypes:['""',"''","``","{}"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["$"],lineCommentTypes:["--"]})}},{key:"tokenOverride",value:function(E){if(s(E)){var e=this.tokenLookAhead();if(e&&e.type===n.OPEN_PAREN)return{type:n.RESERVED,value:E.value}}if(l(E)){var t=this.tokenLookBehind();if(t&&t.type===n.OPERATOR&&"."===t.value)return{type:n.WORD,value:E.value}}return E}}])&&wE(e.prototype,t),T&&wE(e,T),r}(U);function Ee(E){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function ee(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function te(E,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(E,n.key,n)}}function ne(E,e){return(ne=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function Te(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,n=re(E);if(e){var T=re(this).constructor;t=Reflect.construct(n,arguments,T)}else t=n.apply(this,arguments);return Re(this,t)}}function Re(E,e){return!e||"object"!==Ee(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function re(E){return(re=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var Ne=["ACCESSIBLE","ACTION","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ANALYSE","ANALYZE","AS","ASC","AUTOCOMMIT","AUTO_INCREMENT","BACKUP","BEGIN","BETWEEN","BINLOG","BOTH","CASCADE","CHANGE","CHANGED","CHARACTER SET","CHARSET","CHECK","CHECKSUM","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPRESSED","CONCURRENT","CONSTRAINT","CONTAINS","CONVERT","CREATE","CROSS","CURRENT_TIMESTAMP","DATABASE","DATABASES","DAY","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DEFAULT","DEFINER","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO","DROP","DUMPFILE","DUPLICATE","DYNAMIC","ELSE","ENCLOSED","ENGINE","ENGINES","ENGINE_TYPE","ESCAPE","ESCAPED","EVENTS","EXEC","EXECUTE","EXISTS","EXPLAIN","EXTENDED","FAST","FETCH","FIELDS","FILE","FIRST","FIXED","FLUSH","FOR","FORCE","FOREIGN","FULL","FULLTEXT","FUNCTION","GLOBAL","GRANT","GRANTS","GROUP_CONCAT","HEAP","HIGH_PRIORITY","HOSTS","HOUR","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IFNULL","IGNORE","IN","INDEX","INDEXES","INFILE","INSERT","INSERT_ID","INSERT_METHOD","INTERVAL","INTO","INVOKER","IS","ISOLATION","KEY","KEYS","KILL","LAST_INSERT_ID","LEADING","LEVEL","LIKE","LINEAR","LINES","LOAD","LOCAL","LOCK","LOCKS","LOGS","LOW_PRIORITY","MARIA","MASTER","MASTER_CONNECT_RETRY","MASTER_HOST","MASTER_LOG_FILE","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MERGE","MINUTE","MINUTE_SECOND","MIN_ROWS","MODE","MODIFY","MONTH","MRG_MYISAM","MYISAM","NAMES","NATURAL","NOT","NOW()","NULL","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPEN","OPTIMIZE","OPTION","OPTIONALLY","OUTFILE","PACK_KEYS","PAGE","PARTIAL","PARTITION","PARTITIONS","PASSWORD","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PURGE","QUICK","RAID0","RAID_CHUNKS","RAID_CHUNKSIZE","RAID_TYPE","RANGE","READ","READ_ONLY","READ_WRITE","REFERENCES","REGEXP","RELOAD","RENAME","REPAIR","REPEATABLE","REPLACE","REPLICATION","RESET","RESTORE","RESTRICT","RETURN","RETURNS","REVOKE","RLIKE","ROLLBACK","ROW","ROWS","ROW_FORMAT","SECOND","SECURITY","SEPARATOR","SERIALIZABLE","SESSION","SHARE","SHOW","SHUTDOWN","SLAVE","SONAME","SOUNDS","SQL","SQL_AUTO_IS_NULL","SQL_BIG_RESULT","SQL_BIG_SELECTS","SQL_BIG_TABLES","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_LOG_BIN","SQL_LOG_OFF","SQL_LOG_UPDATE","SQL_LOW_PRIORITY_UPDATES","SQL_MAX_JOIN_SIZE","SQL_NO_CACHE","SQL_QUOTE_SHOW_CREATE","SQL_SAFE_UPDATES","SQL_SELECT_LIMIT","SQL_SLAVE_SKIP_COUNTER","SQL_SMALL_RESULT","SQL_WARNINGS","START","STARTING","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","STRIPED","SUPER","TABLE","TABLES","TEMPORARY","TERMINATED","THEN","TO","TRAILING","TRANSACTIONAL","TRUE","TRUNCATE","TYPE","TYPES","UNCOMMITTED","UNIQUE","UNLOCK","UNSIGNED","USAGE","USE","USING","VARIABLES","VIEW","WITH","WORK","WRITE","YEAR_MONTH"],Ae=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","CASE","DELETE FROM","END","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INSERT","LIMIT","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],oe=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],Oe=["AND","CROSS APPLY","CROSS JOIN","ELSE","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"],Ie=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&ne(E,e)}(R,E);var e,t,n,T=Te(R);function R(){return ee(this,R),T.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:Ne,reservedTopLevelWords:Ae,reservedNewlineWords:Oe,reservedTopLevelWordsNoIndent:oe,stringTypes:['""',"N''","''","``","[]"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@",":"],lineCommentTypes:["#","--"]})}}])&&te(e.prototype,t),n&&te(e,n),R}(U);function Se(E){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}var Le={db2:J,n1ql:RE,"pl/sql":cE,plsql:cE,postgresql:hE,redshift:gE,spark:qE,sql:Ie},ie=function(E){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof E)throw new Error("Invalid query argument. Extected string, instead got "+Se(E));var t=Ie;if(void 0!==e.language&&(t=Le[e.language]),void 0===t)throw Error("Unsupported SQL dialect: ".concat(e.language));return new t(e).format(E)},Ce=Object.keys(Le)}])}));
!function(E,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.sqlFormatter=e():E.sqlFormatter=e()}(window,(function(){return function(E){var e={};function t(T){if(e[T])return e[T].exports;var n=e[T]={i:T,l:!1,exports:{}};return E[T].call(n.exports,n,n.exports,t),n.l=!0,n.exports}return t.m=E,t.c=e,t.d=function(E,e,T){t.o(E,e)||Object.defineProperty(E,e,{enumerable:!0,get:T})},t.r=function(E){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(E,"__esModule",{value:!0})},t.t=function(E,e){if(1&e&&(E=t(E)),8&e)return E;if(4&e&&"object"==typeof E&&E&&E.__esModule)return E;var T=Object.create(null);if(t.r(T),Object.defineProperty(T,"default",{enumerable:!0,value:E}),2&e&&"string"!=typeof E)for(var n in E)t.d(T,n,function(e){return E[e]}.bind(null,n));return T},t.n=function(E){var e=E&&E.__esModule?function(){return E.default}:function(){return E};return t.d(e,"a",e),e},t.o=function(E,e){return Object.prototype.hasOwnProperty.call(E,e)},t.p="",t(t.s=0)}([function(E,e,t){"use strict";t.r(e),t.d(e,"format",(function(){return pe})),t.d(e,"supportedDialects",(function(){return ye}));var T={WORD:"word",STRING:"string",RESERVED:"reserved",RESERVED_TOP_LEVEL:"reserved-top-level",RESERVED_TOP_LEVEL_NO_INDENT:"reserved-top-level-no-indent",RESERVED_NEWLINE:"reserved-newline",OPERATOR:"operator",OPEN_PAREN:"open-paren",CLOSE_PAREN:"close-paren",LINE_COMMENT:"line-comment",BLOCK_COMMENT:"block-comment",NUMBER:"number",PLACEHOLDER:"placeholder"},n=function(E){return E.replace(/[\t ]+$/,"")},R=function(E){return E.replace(/[\$\(-\+\.\?\[-\^\{-\}]/g,"\\$&")},r=function(E){return E.sort((function(E,e){return e.length-E.length||E.localeCompare(e)}))};function N(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}var A=function(){function E(e){!function(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),this.indent=e||" ",this.indentTypes=[]}var e,t,T;return e=E,(t=[{key:"getIndent",value:function(){return this.indent.repeat(this.indentTypes.length)}},{key:"increaseTopLevel",value:function(){this.indentTypes.push("top-level")}},{key:"increaseBlockLevel",value:function(){this.indentTypes.push("block-level")}},{key:"decreaseTopLevel",value:function(){var E;this.indentTypes.length>0&&"top-level"===(E=this.indentTypes)[E.length-1]&&this.indentTypes.pop()}},{key:"decreaseBlockLevel",value:function(){for(;this.indentTypes.length>0&&"top-level"===this.indentTypes.pop(););}},{key:"resetIndentation",value:function(){this.indentTypes=[]}}])&&N(e.prototype,t),T&&N(e,T),E}();function O(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}var I=function(){function E(){!function(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),this.level=0}var e,t,n;return e=E,(t=[{key:"beginIfPossible",value:function(E,e){0===this.level&&this.isInlineBlock(E,e)?this.level=1:this.level>0?this.level++:this.level=0}},{key:"end",value:function(){this.level--}},{key:"isActive",value:function(){return this.level>0}},{key:"isInlineBlock",value:function(E,e){for(var t=0,n=0,R=e;R<E.length;R++){var r=E[R];if((t+=r.value.length)>50)return!1;if(r.type===T.OPEN_PAREN)n++;else if(r.type===T.CLOSE_PAREN&&0==--n)return!0;if(this.isForbiddenToken(r))return!1}return!1}},{key:"isForbiddenToken",value:function(E){var e=E.type,t=E.value;return e===T.RESERVED_TOP_LEVEL||e===T.RESERVED_NEWLINE||e===T.COMMENT||e===T.BLOCK_COMMENT||";"===t}}])&&O(e.prototype,t),n&&O(e,n),E}();function o(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}var S=function(){function E(e){!function(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),this.params=e,this.index=0}var e,t,T;return e=E,(t=[{key:"get",value:function(E){var e=E.key,t=E.value;return this.params?e?this.params[e]:this.params[this.index++]:t}}])&&o(e.prototype,t),T&&o(e,T),E}(),L=function(E,e){return function(t){return(null==t?void 0:t.type)===E&&e.test(null==t?void 0:t.value)}},i=L(T.RESERVED_NEWLINE,/^AND$/i),C=L(T.RESERVED,/^BETWEEN$/i),u=L(T.RESERVED_TOP_LEVEL,/^LIMIT$/i),c=L(T.RESERVED_TOP_LEVEL,/^[S\u017F]ET$/i),a=L(T.RESERVED,/^BY$/i),s=L(T.RESERVED_TOP_LEVEL,/^WINDOW$/i),D=L(T.CLOSE_PAREN,/^END$/i);function l(E,e,t){return e in E?Object.defineProperty(E,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):E[e]=t,E}function f(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}var U=function(){function E(e){!function(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),this.cfg=e,this.indentation=new A(this.cfg.indent),this.inlineBlock=new I,this.params=new S(this.cfg.params),this.previousReservedToken={},this.tokens=[],this.index=0}var e,t,R;return e=E,(t=[{key:"tokenizer",value:function(){throw new Error("tokenizer() not implemented by subclass")}},{key:"tokenOverride",value:function(E){return E}},{key:"format",value:function(E){return this.tokens=this.tokenizer().tokenize(E),this.getFormattedQueryFromTokens().trim()}},{key:"getFormattedQueryFromTokens",value:function(){var E=this,e="";return this.tokens.forEach((function(t,n){E.index=n,(t=E.tokenOverride(t)).type===T.LINE_COMMENT?e=E.formatLineComment(t,e):t.type===T.BLOCK_COMMENT?e=E.formatBlockComment(t,e):t.type===T.RESERVED_TOP_LEVEL?(e=E.formatTopLevelReservedWord(t,e),E.previousReservedToken=t):t.type===T.RESERVED_TOP_LEVEL_NO_INDENT?(e=E.formatTopLevelReservedWordNoIndent(t,e),E.previousReservedToken=t):t.type===T.RESERVED_NEWLINE?(e=E.formatNewlineReservedWord(t,e),E.previousReservedToken=t):t.type===T.RESERVED?(e=E.formatWithSpaces(t,e),E.previousReservedToken=t):e=t.type===T.OPEN_PAREN?E.formatOpeningParentheses(t,e):t.type===T.CLOSE_PAREN?E.formatClosingParentheses(t,e):t.type===T.PLACEHOLDER?E.formatPlaceholder(t,e):","===t.value?E.formatComma(t,e):":"===t.value?E.formatWithSpaceAfter(t,e):"."===t.value?E.formatWithoutSpaces(t,e):";"===t.value?E.formatQuerySeparator(t,e):E.formatWithSpaces(t,e)})),e}},{key:"formatLineComment",value:function(E,e){return this.addNewline(e+this.show(E))}},{key:"formatBlockComment",value:function(E,e){return this.addNewline(this.addNewline(e)+this.indentComment(E.value))}},{key:"indentComment",value:function(E){return E.replace(/\n[\t ]*/g,"\n"+this.indentation.getIndent()+" ")}},{key:"formatTopLevelReservedWordNoIndent",value:function(E,e){return this.indentation.decreaseTopLevel(),e=this.addNewline(e)+this.equalizeWhitespace(this.show(E)),this.addNewline(e)}},{key:"formatTopLevelReservedWord",value:function(E,e){return this.indentation.decreaseTopLevel(),e=this.addNewline(e),this.indentation.increaseTopLevel(),e+=this.equalizeWhitespace(this.show(E)),this.addNewline(e)}},{key:"formatNewlineReservedWord",value:function(E,e){return i(E)&&C(this.tokenLookBehind(2))?this.formatWithSpaces(E,e):this.addNewline(e)+this.equalizeWhitespace(this.show(E))+" "}},{key:"equalizeWhitespace",value:function(E){return E.replace(/[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+/g," ")}},{key:"formatOpeningParentheses",value:function(E,e){var t,R,r=(l(t={},T.OPEN_PAREN,!0),l(t,T.LINE_COMMENT,!0),l(t,T.OPERATOR,!0),t);return 0!==E.whitespaceBefore.length||r[null===(R=this.tokenLookBehind())||void 0===R?void 0:R.type]||(e=n(e)),e+=this.show(E),this.inlineBlock.beginIfPossible(this.tokens,this.index),this.inlineBlock.isActive()||(this.indentation.increaseBlockLevel(),e=this.addNewline(e)),e}},{key:"formatClosingParentheses",value:function(E,e){return this.inlineBlock.isActive()?(this.inlineBlock.end(),this.formatWithSpaceAfter(E,e)):(this.indentation.decreaseBlockLevel(),this.formatWithSpaces(E,this.addNewline(e)))}},{key:"formatPlaceholder",value:function(E,e){return e+this.params.get(E)+" "}},{key:"formatComma",value:function(E,e){return e=n(e)+this.show(E)+" ",this.inlineBlock.isActive()||u(this.previousReservedToken)?e:this.addNewline(e)}},{key:"formatWithSpaceAfter",value:function(E,e){return n(e)+this.show(E)+" "}},{key:"formatWithoutSpaces",value:function(E,e){return n(e)+this.show(E)}},{key:"formatWithSpaces",value:function(E,e){return e+this.show(E)+" "}},{key:"formatQuerySeparator",value:function(E,e){return this.indentation.resetIndentation(),n(e)+this.show(E)+"\n".repeat(this.cfg.linesBetweenQueries||1)}},{key:"show",value:function(E){var e=E.type,t=E.value;return!this.cfg.uppercase||e!==T.RESERVED&&e!==T.RESERVED_TOP_LEVEL&&e!==T.RESERVED_TOP_LEVEL_NO_INDENT&&e!==T.RESERVED_NEWLINE&&e!==T.OPEN_PAREN&&e!==T.CLOSE_PAREN?t:t.toUpperCase()}},{key:"addNewline",value:function(E){return(E=n(E)).endsWith("\n")||(E+="\n"),E+this.indentation.getIndent()}},{key:"tokenLookBehind",value:function(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.tokens[this.index-E]}},{key:"tokenLookAhead",value:function(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.tokens[this.index+E]}}])&&f(e.prototype,t),R&&f(e,R),E}();function P(E){if(0===E.length)return new RegExp("^\b$","u");var e=r(E).join("|").replace(/ /g,"\\s+");return new RegExp("^(".concat(e,")\\b"),"iu")}function M(E){var e={"``":"((`[^`]*($|`))+)","{}":"((\\{[^\\}]*($|\\}))+)","[]":"((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)",'""':'(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',"''":"(('[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)","N''":"((N'[^N'\\\\]*(?:\\\\.[^N'\\\\]*)*('|$))+)","U&''":"((U&'[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)",'U&""':'((U&"[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',$$:"((?<tag>\\$\\w*\\$)[\\s\\S]*?(?:\\k<tag>|$))"};return E.map((function(E){return e[E]})).join("|")}function p(E){return new RegExp("^("+E.map(y).join("|")+")","iu")}function y(E){return 1===E.length?R(E):"\\b"+E+"\\b"}function _(E,e){if(t=E,!Array.isArray(t)||0===t.length)return!1;var t,T=E.map(R).join("|");return new RegExp("^((?:".concat(T,")(?:").concat(e,"))"),"u")}function h(E,e){var t=Object.keys(E);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(E);e&&(T=T.filter((function(e){return Object.getOwnPropertyDescriptor(E,e).enumerable}))),t.push.apply(t,T)}return t}function d(E){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?h(Object(t),!0).forEach((function(e){G(E,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach((function(e){Object.defineProperty(E,e,Object.getOwnPropertyDescriptor(t,e))}))}return E}function G(E,e,t){return e in E?Object.defineProperty(E,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):E[e]=t,E}function v(E){return function(E){if(Array.isArray(E))return F(E)}(E)||function(E){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(E))return Array.from(E)}(E)||function(E,e){if(!E)return;if("string"==typeof E)return F(E,e);var t=Object.prototype.toString.call(E).slice(8,-1);"Object"===t&&E.constructor&&(t=E.constructor.name);if("Map"===t||"Set"===t)return Array.from(E);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return F(E,e)}(E)||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(E,e){(null==e||e>E.length)&&(e=E.length);for(var t=0,T=new Array(e);t<e;t++)T[t]=E[t];return T}function H(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}var B=function(){function E(e){var t,T,n;!function(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}(this,E),this.WHITESPACE_REGEX=/^([\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+)/,this.NUMBER_REGEX=/^((\x2D[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?[0-9]+(\.[0-9]+)?([Ee]\x2D?[0-9]+(\.[0-9]+)?)?|0x[0-9A-Fa-f]+|0b[01]+)\b/,this.OPERATOR_REGEX=(t=[].concat(v(e.operators||[]),["!=","<>","==","<=",">=","!<","!>","||",":="]),new RegExp("^(".concat(r(t).map(R).join("|"),"|.)"),"u")),this.BLOCK_COMMENT_REGEX=/^(\/\*(?:(?![])[\s\S])*?(?:\*\/|$))/,this.LINE_COMMENT_REGEX=(T=e.lineCommentTypes,new RegExp("^((?:".concat(T.map((function(E){return R(E)})).join("|"),").*?)(?:\r\n|\r|\n|$)"),"u")),this.RESERVED_TOP_LEVEL_REGEX=P(e.reservedTopLevelWords),this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX=P(e.reservedTopLevelWordsNoIndent),this.RESERVED_NEWLINE_REGEX=P(e.reservedNewlineWords),this.RESERVED_PLAIN_REGEX=P(e.reservedWords),this.WORD_REGEX=function(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new RegExp("^([\\p{Alphabetic}\\p{Mark}\\p{Decimal_Number}\\p{Connector_Punctuation}\\p{Join_Control}".concat(E.join(""),"]+)"),"u")}(e.specialWordChars),this.STRING_REGEX=(n=e.stringTypes,new RegExp("^("+M(n)+")","u")),this.OPEN_PAREN_REGEX=p(e.openParens),this.CLOSE_PAREN_REGEX=p(e.closeParens),this.INDEXED_PLACEHOLDER_REGEX=_(e.indexedPlaceholderTypes,"[0-9]*"),this.IDENT_NAMED_PLACEHOLDER_REGEX=_(e.namedPlaceholderTypes,"[a-zA-Z0-9._$]+"),this.STRING_NAMED_PLACEHOLDER_REGEX=_(e.namedPlaceholderTypes,M(e.stringTypes))}var e,t,n;return e=E,(t=[{key:"tokenize",value:function(E){for(var e,t=[];E.length;){var T=this.getWhitespace(E);(E=E.substring(T.length)).length&&(e=this.getNextToken(E,e),E=E.substring(e.value.length),t.push(d(d({},e),{},{whitespaceBefore:T})))}return t}},{key:"getWhitespace",value:function(E){var e=E.match(this.WHITESPACE_REGEX);return e?e[1]:""}},{key:"getNextToken",value:function(E,e){return this.getCommentToken(E)||this.getStringToken(E)||this.getOpenParenToken(E)||this.getCloseParenToken(E)||this.getPlaceholderToken(E)||this.getNumberToken(E)||this.getReservedWordToken(E,e)||this.getWordToken(E)||this.getOperatorToken(E)}},{key:"getCommentToken",value:function(E){return this.getLineCommentToken(E)||this.getBlockCommentToken(E)}},{key:"getLineCommentToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.LINE_COMMENT,regex:this.LINE_COMMENT_REGEX})}},{key:"getBlockCommentToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.BLOCK_COMMENT,regex:this.BLOCK_COMMENT_REGEX})}},{key:"getStringToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.STRING,regex:this.STRING_REGEX})}},{key:"getOpenParenToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.OPEN_PAREN,regex:this.OPEN_PAREN_REGEX})}},{key:"getCloseParenToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.CLOSE_PAREN,regex:this.CLOSE_PAREN_REGEX})}},{key:"getPlaceholderToken",value:function(E){return this.getIdentNamedPlaceholderToken(E)||this.getStringNamedPlaceholderToken(E)||this.getIndexedPlaceholderToken(E)}},{key:"getIdentNamedPlaceholderToken",value:function(E){return this.getPlaceholderTokenWithKey({input:E,regex:this.IDENT_NAMED_PLACEHOLDER_REGEX,parseKey:function(E){return E.slice(1)}})}},{key:"getStringNamedPlaceholderToken",value:function(E){var e=this;return this.getPlaceholderTokenWithKey({input:E,regex:this.STRING_NAMED_PLACEHOLDER_REGEX,parseKey:function(E){return e.getEscapedPlaceholderKey({key:E.slice(2,-1),quoteChar:E.slice(-1)})}})}},{key:"getIndexedPlaceholderToken",value:function(E){return this.getPlaceholderTokenWithKey({input:E,regex:this.INDEXED_PLACEHOLDER_REGEX,parseKey:function(E){return E.slice(1)}})}},{key:"getPlaceholderTokenWithKey",value:function(E){var e=E.input,t=E.regex,n=E.parseKey,R=this.getTokenOnFirstMatch({input:e,regex:t,type:T.PLACEHOLDER});return R&&(R.key=n(R.value)),R}},{key:"getEscapedPlaceholderKey",value:function(E){var e=E.key,t=E.quoteChar;return e.replace(new RegExp(R("\\"+t),"gu"),t)}},{key:"getNumberToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.NUMBER,regex:this.NUMBER_REGEX})}},{key:"getOperatorToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.OPERATOR,regex:this.OPERATOR_REGEX})}},{key:"getReservedWordToken",value:function(E,e){if(!e||!e.value||"."!==e.value)return this.getTopLevelReservedToken(E)||this.getNewlineReservedToken(E)||this.getTopLevelReservedTokenNoIndent(E)||this.getPlainReservedToken(E)}},{key:"getTopLevelReservedToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.RESERVED_TOP_LEVEL,regex:this.RESERVED_TOP_LEVEL_REGEX})}},{key:"getNewlineReservedToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.RESERVED_NEWLINE,regex:this.RESERVED_NEWLINE_REGEX})}},{key:"getTopLevelReservedTokenNoIndent",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.RESERVED_TOP_LEVEL_NO_INDENT,regex:this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX})}},{key:"getPlainReservedToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.RESERVED,regex:this.RESERVED_PLAIN_REGEX})}},{key:"getWordToken",value:function(E){return this.getTokenOnFirstMatch({input:E,type:T.WORD,regex:this.WORD_REGEX})}},{key:"getTokenOnFirstMatch",value:function(E){var e=E.input,t=E.type,T=E.regex,n=e.match(T);return n?{type:t,value:n[1]}:void 0}}])&&H(e.prototype,t),n&&H(e,n),E}();function b(E){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function Y(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function V(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}function W(E,e){return(W=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function m(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,T=k(E);if(e){var n=k(this).constructor;t=Reflect.construct(T,arguments,n)}else t=T.apply(this,arguments);return g(this,t)}}function g(E,e){return!e||"object"!==b(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function k(E){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var X=["ABS","ACTIVATE","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","ANY","ARE","ARRAY","AS","ASC","ASENSITIVE","ASSOCIATE","ASUTIME","ASYMMETRIC","AT","ATOMIC","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","AVG","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CCSID","CEIL","CEILING","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLONE","CLOSE","CLUSTER","COALESCE","COLLATE","COLLECT","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","CONVERT","CORR","CORRESPONDING","COUNT","COUNT_BIG","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DATE","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DEREF","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DOUBLE","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELEMENT","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPTION","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXP","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FILTER","FINAL","FIRST","FLOAT","FLOOR","FOR","FOREIGN","FREE","FULL","FUNCTION","FUSION","GENERAL","GENERATED","GET","GLOBAL","GOTO","GRANT","GRAPHIC","GROUP","GROUPING","HANDLER","HASH","HASHED_VALUE","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTEGRITY","INTERSECTION","INTERVAL","INTO","IS","ISOBID","ISOLATION","ITERATE","JAR","JAVA","KEEP","KEY","LABEL","LANGUAGE","LARGE","LATERAL","LC_CTYPE","LEADING","LEAVE","LEFT","LIKE","LINKTYPE","LN","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","LOWER","MAINTAINED","MATCH","MATERIALIZED","MAX","MAXVALUE","MEMBER","MERGE","METHOD","MICROSECOND","MICROSECONDS","MIN","MINUTE","MINUTES","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MONTHS","MULTISET","NAN","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZE","NORMALIZED","NOT","NULL","NULLIF","NULLS","NUMERIC","NUMPARTS","OBID","OCTET_LENGTH","OF","OFFSET","OLD","OLD_TABLE","ON","ONLY","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PIECESIZE","PLAN","POSITION","POWER","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","REAL","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCOPE","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SIGNAL","SIMILAR","SIMPLE","SMALLINT","SNAN","SOME","SOURCE","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLID","SQLSTATE","SQLWARNING","SQRT","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STDDEV_POP","STDDEV_SAMP","STOGROUP","STORES","STYLE","SUBMULTISET","SUBSTRING","SUM","SUMMARY","SYMMETRIC","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","TABLESPACE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TYPE","UESCAPE","UNDO","UNIQUE","UNKNOWN","UNNEST","UNTIL","UPPER","USAGE","USER","USING","VALIDPROC","VALUE","VARCHAR","VARIABLE","VARIANT","VARYING","VAR_POP","VAR_SAMP","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHILE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],w=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INTERSECT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],K=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],J=["AND","CROSS JOIN","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN"],j=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&W(E,e)}(R,E);var e,t,T,n=m(R);function R(){return Y(this,R),n.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:X,reservedTopLevelWords:w,reservedNewlineWords:J,reservedTopLevelWordsNoIndent:K,stringTypes:['""',"''","``","[]"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["#","@"]})}}])&&V(e.prototype,t),T&&V(e,T),R}(U);function x(E){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function Q(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function Z(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}function $(E,e){return($=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function z(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,T=EE(E);if(e){var n=EE(this).constructor;t=Reflect.construct(T,arguments,n)}else t=T.apply(this,arguments);return q(this,t)}}function q(E,e){return!e||"object"!==x(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function EE(E){return(EE=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var eE=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BIGINT","BINARY","BLOB","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHAR","CHARACTER","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEC","DECIMAL","DECLARE","DEFAULT","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO_DOMAIN_IDS","DOUBLE","DROP","DUAL","EACH","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FLOAT","FLOAT4","FLOAT8","FOR","FORCE","FOREIGN","FROM","FULLTEXT","GENERAL","GRANT","GROUP","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IGNORE_DOMAIN_IDS","IGNORE_SERVER_IDS","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERSECT","INTERVAL","INTO","IS","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER_HEARTBEAT_PERIOD","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NULL","NUMERIC","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PAGE_CHECKSUM","PARSE_VCOL_EXPR","PARTITION","POSITION","PRECISION","PRIMARY","PROCEDURE","PURGE","RANGE","READ","READS","READ_WRITE","REAL","RECURSIVE","REF_SYSTEM_ID","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","RETURNING","REVOKE","RIGHT","RLIKE","ROWS","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SLOW","SMALLINT","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STRAIGHT_JOIN","TABLE","TERMINATED","THEN","TINYBLOB","TINYINT","TINYTEXT","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARYING","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],tE=["ADD","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET","UPDATE","VALUES","WHERE"],TE=["INTERSECT","INTERSECT ALL","UNION","UNION ALL"],nE=["AND","CROSS JOIN","ELSE","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN"],RE=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&$(E,e)}(R,E);var e,t,T,n=z(R);function R(){return Q(this,R),n.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:eE,reservedTopLevelWords:tE,reservedNewlineWords:nE,reservedTopLevelWordsNoIndent:TE,stringTypes:["``","''",'""'],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[],lineCommentTypes:["--","#"],specialWordChars:["@"],operators:[":=","<<",">>","!=","<=>","&&","||"]})}}])&&Z(e.prototype,t),T&&Z(e,T),R}(U);function rE(E){return(rE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function NE(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function AE(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}function OE(E,e){return(OE=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function IE(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,T=SE(E);if(e){var n=SE(this).constructor;t=Reflect.construct(T,arguments,n)}else t=T.apply(this,arguments);return oE(this,t)}}function oE(E,e){return!e||"object"!==rE(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function SE(E){return(SE=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var LE=["ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","CONNECT","CONTINUE","CORRELATE","COVER","CREATE","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FIRST","FLATTEN","FOR","FORCE","FROM","FUNCTION","GRANT","GROUP","GSI","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LAST","LEFT","LET","LETTING","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MISSING","NAMESPACE","NEST","NOT","NULL","NUMBER","OBJECT","OFFSET","ON","OPTION","OR","ORDER","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROCEDURE","PUBLIC","RAW","REALM","REDUCE","RENAME","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","SATISFIES","SCHEMA","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TO","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WITH","WITHIN","WORK","XOR"],iE=["DELETE FROM","EXCEPT ALL","EXCEPT","EXPLAIN DELETE FROM","EXPLAIN UPDATE","EXPLAIN UPSERT","FROM","GROUP BY","HAVING","INFER","INSERT INTO","LET","LIMIT","MERGE","NEST","ORDER BY","PREPARE","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNNEST","UPDATE","UPSERT","USE KEYS","VALUES","WHERE"],CE=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],uE=["AND","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","XOR"],cE=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&OE(E,e)}(R,E);var e,t,T,n=IE(R);function R(){return NE(this,R),n.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:LE,reservedTopLevelWords:iE,reservedNewlineWords:uE,reservedTopLevelWordsNoIndent:CE,stringTypes:['""',"''","``"],openParens:["(","[","{"],closeParens:[")","]","}"],namedPlaceholderTypes:["$"],lineCommentTypes:["#","--"]})}}])&&AE(e.prototype,t),T&&AE(e,T),R}(U);function aE(E){return(aE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function sE(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function DE(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}function lE(E,e){return(lE=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function fE(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,T=PE(E);if(e){var n=PE(this).constructor;t=Reflect.construct(T,arguments,n)}else t=T.apply(this,arguments);return UE(this,t)}}function UE(E,e){return!e||"object"!==aE(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function PE(E){return(PE=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var ME=["A","ACCESSIBLE","AGENT","AGGREGATE","ALL","ALTER","ANY","ARRAY","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BETWEEN","BFILE_BASE","BINARY_INTEGER","BINARY","BLOB_BASE","BLOCK","BODY","BOOLEAN","BOTH","BOUND","BREADTH","BULK","BY","BYTE","C","CALL","CALLING","CASCADE","CASE","CHAR_BASE","CHAR","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLONE","CLOSE","CLUSTER","CLUSTERS","COALESCE","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONTINUE","CONVERT","COUNT","CRASH","CREATE","CREDENTIAL","CURRENT","CURRVAL","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE_BASE","DATE","DAY","DECIMAL","DEFAULT","DEFINE","DELETE","DEPTH","DESC","DETERMINISTIC","DIRECTORY","DISTINCT","DO","DOUBLE","DROP","DURATION","ELEMENT","ELSIF","EMPTY","END","ESCAPE","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTENDS","EXTERNAL","EXTRACT","FALSE","FETCH","FINAL","FIRST","FIXED","FLOAT","FOR","FORALL","FORCE","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSTANTIABLE","INT","INTEGER","INTERFACE","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMITED","LOCAL","LOCK","LONG","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUTE","MLSLABEL","MOD","MODE","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NATURAL","NATURALN","NCHAR","NEW","NEXTVAL","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NULLIF","NUMBER_BASE","NUMBER","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","OLD","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","ORACLE","ORADATA","ORDER","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERLAPS","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARENT","PARTITION","PASCAL","PCTFREE","PIPE","PIPELINED","PLS_INTEGER","PLUGGABLE","POSITIVE","POSITIVEN","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","REAL","RECORD","REF","REFERENCE","RELEASE","RELIES_ON","REM","REMAINDER","RENAME","RESOURCE","RESULT_CACHE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","ROWID","ROWNUM","ROWTYPE","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SEARCH","SECOND","SEGMENT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SHARE","SHORT","SIZE_T","SIZE","SMALLINT","SOME","SPACE","SPARSE","SQL","SQLCODE","SQLDATA","SQLERRM","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUCCESSFUL","SUM","SYNONYM","SYSDATE","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSACTION","TRANSACTIONAL","TRIGGER","TRUE","TRUSTED","TYPE","UB1","UB2","UB4","UID","UNDER","UNIQUE","UNPLUG","UNSIGNED","UNTRUSTED","USE","USER","USING","VALIDATE","VALIST","VALUE","VARCHAR","VARCHAR2","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHENEVER","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],pE=["ADD","ALTER COLUMN","ALTER TABLE","BEGIN","CONNECT BY","DECLARE","DELETE FROM","DELETE","END","EXCEPT","EXCEPTION","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","LOOP","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","START WITH","UPDATE","VALUES","WHERE"],yE=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],_E=["AND","CROSS APPLY","CROSS JOIN","ELSE","END","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"],hE=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&lE(E,e)}(r,E);var e,t,n,R=fE(r);function r(){return sE(this,r),R.apply(this,arguments)}return e=r,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:ME,reservedTopLevelWords:pE,reservedNewlineWords:_E,reservedTopLevelWordsNoIndent:yE,stringTypes:['""',"N''","''","``"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["_","$","#",".","@"]})}},{key:"tokenOverride",value:function(E){return c(E)&&a(this.previousReservedToken)?{type:T.RESERVED,value:E.value}:E}}])&&DE(e.prototype,t),n&&DE(e,n),r}(U);function dE(E){return(dE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function GE(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function vE(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}function FE(E,e){return(FE=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function HE(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,T=bE(E);if(e){var n=bE(this).constructor;t=Reflect.construct(T,arguments,n)}else t=T.apply(this,arguments);return BE(this,t)}}function BE(E,e){return!e||"object"!==dE(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function bE(E){return(bE=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var YE=["ABORT","ABSOLUTE","ACCESS","ACTION","ADD","ADMIN","AFTER","AGGREGATE","ALL","ALSO","ALTER","ALWAYS","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASSERTION","ASSIGNMENT","ASYMMETRIC","AT","ATTACH","ATTRIBUTE","AUTHORIZATION","BACKWARD","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BIT","BOOLEAN","BOTH","BY","CACHE","CALL","CALLED","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAIN","CHAR","CHARACTER","CHARACTERISTICS","CHECK","CHECKPOINT","CLASS","CLOSE","CLUSTER","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMENTS","COMMIT","COMMITTED","CONCURRENTLY","CONFIGURATION","CONFLICT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTENT","CONTINUE","CONVERSION","COPY","COST","CREATE","CROSS","CSV","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINER","DELETE","DELIMITER","DELIMITERS","DEPENDS","DESC","DETACH","DICTIONARY","DISABLE","DISCARD","DISTINCT","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","EACH","ELSE","ENABLE","ENCODING","ENCRYPTED","END","ENUM","ESCAPE","EVENT","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXPLAIN","EXPRESSION","EXTENSION","EXTERNAL","EXTRACT","FALSE","FAMILY","FETCH","FILTER","FIRST","FLOAT","FOLLOWING","FOR","FORCE","FOREIGN","FORWARD","FREEZE","FROM","FULL","FUNCTION","FUNCTIONS","GENERATED","GLOBAL","GRANT","GRANTED","GREATEST","GROUP","GROUPING","GROUPS","HANDLER","HAVING","HEADER","HOLD","HOUR","IDENTITY","IF","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDE","INCLUDING","INCREMENT","INDEX","INDEXES","INHERIT","INHERITS","INITIALLY","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","INVOKER","IS","ISNULL","ISOLATION","JOIN","KEY","LABEL","LANGUAGE","LARGE","LAST","LATERAL","LEADING","LEAKPROOF","LEAST","LEFT","LEVEL","LIKE","LIMIT","LISTEN","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LOCKED","LOGGED","MAPPING","MATCH","MATERIALIZED","MAXVALUE","METHOD","MINUTE","MINVALUE","MODE","MONTH","MOVE","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NEW","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NORMALIZE","NORMALIZED","NOT","NOTHING","NOTIFY","NOTNULL","NOWAIT","NULL","NULLIF","NULLS","NUMERIC","OBJECT","OF","OFF","OFFSET","OIDS","OLD","ON","ONLY","OPERATOR","OPTION","OPTIONS","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","OWNED","OWNER","PARALLEL","PARSER","PARTIAL","PARTITION","PASSING","PASSWORD","PLACING","PLANS","POLICY","POSITION","PRECEDING","PRECISION","PREPARE","PREPARED","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROGRAM","PUBLICATION","QUOTE","RANGE","READ","REAL","REASSIGN","RECHECK","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REINDEX","RELATIVE","RELEASE","RENAME","REPEATABLE","REPLACE","REPLICA","RESET","RESTART","RESTRICT","RETURNING","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROUTINES","ROW","ROWS","RULE","SAVEPOINT","SCHEMA","SCHEMAS","SCROLL","SEARCH","SECOND","SECURITY","SELECT","SEQUENCE","SEQUENCES","SERIALIZABLE","SERVER","SESSION","SESSION_USER","SET","SETOF","SETS","SHARE","SHOW","SIMILAR","SIMPLE","SKIP","SMALLINT","SNAPSHOT","SOME","SQL","STABLE","STANDALONE","START","STATEMENT","STATISTICS","STDIN","STDOUT","STORAGE","STORED","STRICT","STRIP","SUBSCRIPTION","SUBSTRING","SUPPORT","SYMMETRIC","SYSID","SYSTEM","TABLE","TABLES","TABLESAMPLE","TABLESPACE","TEMP","TEMPLATE","TEMPORARY","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRANSFORM","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TRUSTED","TYPE","TYPES","UESCAPE","UNBOUNDED","UNCOMMITTED","UNENCRYPTED","UNION","UNIQUE","UNKNOWN","UNLISTEN","UNLOGGED","UNTIL","UPDATE","USER","USING","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARCHAR","VARIADIC","VARYING","VERBOSE","VERSION","VIEW","VIEWS","VOLATILE","WHEN","WHERE","WHITESPACE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","XML","XMLATTRIBUTES","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","YEAR","YES","ZONE"],VE=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","CASE","DELETE FROM","END","EXCEPT","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],WE=["INTERSECT","INTERSECT ALL","UNION","UNION ALL"],mE=["AND","CROSS JOIN","ELSE","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN"],gE=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&FE(E,e)}(R,E);var e,t,T,n=HE(R);function R(){return GE(this,R),n.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:YE,reservedTopLevelWords:VE,reservedNewlineWords:mE,reservedTopLevelWordsNoIndent:WE,stringTypes:['""',"''","U&''",'U&""',"$$"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["$"],namedPlaceholderTypes:[],lineCommentTypes:["--"],operators:["<<",">>","||/","|/","::","->>","->","~~*","~~","!~~*","!~~","~*","!~*","!~"]})}}])&&vE(e.prototype,t),T&&vE(e,T),R}(U);function kE(E){return(kE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function XE(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function wE(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}function KE(E,e){return(KE=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function JE(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,T=xE(E);if(e){var n=xE(this).constructor;t=Reflect.construct(T,arguments,n)}else t=T.apply(this,arguments);return jE(this,t)}}function jE(E,e){return!e||"object"!==kE(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function xE(E){return(xE=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var QE=["AES128","AES256","ALLOWOVERWRITE","ANALYSE","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GZIP","IDENTITY","IGNORE","ILIKE","INITIALLY","INTO","LEADING","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY13","MOSTLY32","MOSTLY8","NATURAL","NEW","NULLS","OFF","OFFLINE","OFFSET","OLD","ON","ONLY","OPEN","ORDER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","REJECTLOG","RESORT","RESTORE","SESSION_USER","SIMILAR","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WITH","WITHOUT","PREDICATE","COLUMNS","COMPROWS","COMPRESSION","COPY","FORMAT","DELIMITER","FIXEDWIDTH","AVRO","JSON","ENCRYPTED","BZIP2","GZIP","LZOP","PARQUET","ORC","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","NULL AS","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","MANIFEST","REGION","IAM_ROLE","MASTER_SYMMETRIC_KEY","SSH","ACCEPTANYDATE","ACCEPTINVCHARS","ACCESS_KEY_ID","SECRET_ACCESS_KEY","AVRO","BLANKSASNULL","BZIP2","COMPROWS","COMPUPDATE","CREDENTIALS","DATEFORMAT","DELIMITER","EMPTYASNULL","ENCODING","ENCRYPTED","ESCAPE","EXPLICIT_IDS","FILLRECORD","FIXEDWIDTH","FORMAT","IAM_ROLE","GZIP","IGNOREBLANKLINES","IGNOREHEADER","JSON","LZOP","MANIFEST","MASTER_SYMMETRIC_KEY","MAXERROR","NOLOAD","NULL AS","READRATIO","REGION","REMOVEQUOTES","ROUNDEC","SSH","STATUPDATE","TIMEFORMAT","SESSION_TOKEN","TRIMBLANKS","TRUNCATECOLUMNS","EXTERNAL","DATA CATALOG","HIVE METASTORE","CATALOG_ROLE","VACUUM","COPY","UNLOAD","EVEN","ALL"],ZE=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","INTERSECT","TOP","LIMIT","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNION ALL","UNION","UPDATE","VALUES","WHERE","VACUUM","COPY","UNLOAD","ANALYZE","ANALYSE","DISTKEY","SORTKEY","COMPOUND","INTERLEAVED","FORMAT","DELIMITER","FIXEDWIDTH","AVRO","JSON","ENCRYPTED","BZIP2","GZIP","LZOP","PARQUET","ORC","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","NULL AS","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","MANIFEST","REGION","IAM_ROLE","MASTER_SYMMETRIC_KEY","SSH","ACCEPTANYDATE","ACCEPTINVCHARS","ACCESS_KEY_ID","SECRET_ACCESS_KEY","AVRO","BLANKSASNULL","BZIP2","COMPROWS","COMPUPDATE","CREDENTIALS","DATEFORMAT","DELIMITER","EMPTYASNULL","ENCODING","ENCRYPTED","ESCAPE","EXPLICIT_IDS","FILLRECORD","FIXEDWIDTH","FORMAT","IAM_ROLE","GZIP","IGNOREBLANKLINES","IGNOREHEADER","JSON","LZOP","MANIFEST","MASTER_SYMMETRIC_KEY","MAXERROR","NOLOAD","NULL AS","READRATIO","REGION","REMOVEQUOTES","ROUNDEC","SSH","STATUPDATE","TIMEFORMAT","SESSION_TOKEN","TRIMBLANKS","TRUNCATECOLUMNS","EXTERNAL","DATA CATALOG","HIVE METASTORE","CATALOG_ROLE"],$E=[],zE=["AND","CROSS JOIN","ELSE","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","VACUUM","COPY","UNLOAD","ANALYZE","ANALYSE","DISTKEY","SORTKEY","COMPOUND","INTERLEAVED"],qE=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&KE(E,e)}(R,E);var e,t,T,n=JE(R);function R(){return XE(this,R),n.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:QE,reservedTopLevelWords:ZE,reservedNewlineWords:zE,reservedTopLevelWordsNoIndent:$E,stringTypes:['""',"''","``"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@","#","$"],lineCommentTypes:["--"]})}}])&&wE(e.prototype,t),T&&wE(e,T),R}(U);function Ee(E){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function ee(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function te(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}function Te(E,e){return(Te=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function ne(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,T=re(E);if(e){var n=re(this).constructor;t=Reflect.construct(T,arguments,n)}else t=T.apply(this,arguments);return Re(this,t)}}function Re(E,e){return!e||"object"!==Ee(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function re(E){return(re=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var Ne=["ALL","ALTER","ANALYSE","ANALYZE","ARRAY_ZIP","ARRAY","AS","ASC","AVG","BETWEEN","CASCADE","CASE","CAST","COALESCE","COLLECT_LIST","COLLECT_SET","COLUMN","COLUMNS","COMMENT","CONSTRAINT","CONTAINS","CONVERT","COUNT","CUME_DIST","CURRENT ROW","CURRENT_DATE","CURRENT_TIMESTAMP","DATABASE","DATABASES","DATE_ADD","DATE_SUB","DATE_TRUNC","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DAY","DAYS","DECODE","DEFAULT","DELETE","DENSE_RANK","DESC","DESCRIBE","DISTINCT","DISTINCTROW","DIV","DROP","ELSE","ENCODE","END","EXISTS","EXPLAIN","EXPLODE_OUTER","EXPLODE","FILTER","FIRST_VALUE","FIRST","FIXED","FLATTEN","FOLLOWING","FROM_UNIXTIME","FULL","GREATEST","GROUP_CONCAT","HOUR_MINUTE","HOUR_SECOND","HOUR","HOURS","IF","IFNULL","IN","INSERT","INTERVAL","INTO","IS","LAG","LAST_VALUE","LAST","LEAD","LEADING","LEAST","LEVEL","LIKE","MAX","MERGE","MIN","MINUTE_SECOND","MINUTE","MONTH","NATURAL","NOT","NOW()","NTILE","NULL","NULLIF","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPTIMIZE","OVER","PERCENT_RANK","PRECEDING","RANGE","RANK","REGEXP","RENAME","RLIKE","ROW","ROWS","SECOND","SEPARATOR","SEQUENCE","SIZE","STRING","STRUCT","SUM","TABLE","TABLES","TEMPORARY","THEN","TO_DATE","TO_JSON","TO","TRAILING","TRANSFORM","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNIQUE","UNIX_TIMESTAMP","UNLOCK","UNSIGNED","USING","VARIABLES","VIEW","WHEN","WITH","YEAR_MONTH"],Ae=["ADD","AFTER","ALTER COLUMN","ALTER DATABASE","ALTER SCHEMA","ALTER TABLE","CLUSTER BY","CLUSTERED BY","DELETE FROM","DISTRIBUTE BY","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","OPTIONS","ORDER BY","PARTITION BY","PARTITIONED BY","RANGE","ROWS","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","TBLPROPERTIES","UPDATE","USING","VALUES","WHERE","WINDOW"],Oe=["EXCEPT ALL","EXCEPT","INTERSECT ALL","INTERSECT","UNION ALL","UNION"],Ie=["AND","ANTI JOIN","CREATE OR","CREATE","CROSS JOIN","ELSE","FULL OUTER JOIN","INNER JOIN","JOIN","LATERAL VIEW","LEFT ANTI JOIN","LEFT JOIN","LEFT OUTER JOIN","LEFT SEMI JOIN","NATURAL ANTI JOIN","NATURAL FULL OUTER JOIN","NATURAL INNER JOIN","NATURAL JOIN","NATURAL LEFT ANTI JOIN","NATURAL LEFT OUTER JOIN","NATURAL LEFT SEMI JOIN","NATURAL OUTER JOIN","NATURAL RIGHT OUTER JOIN","NATURAL RIGHT SEMI JOIN","NATURAL SEMI JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","RIGHT SEMI JOIN","SEMI JOIN","WHEN","XOR"],oe=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&Te(E,e)}(r,E);var e,t,n,R=ne(r);function r(){return ee(this,r),R.apply(this,arguments)}return e=r,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:Ne,reservedTopLevelWords:Ae,reservedNewlineWords:Ie,reservedTopLevelWordsNoIndent:Oe,stringTypes:['""',"''","``","{}"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["$"],lineCommentTypes:["--"]})}},{key:"tokenOverride",value:function(E){if(s(E)){var e=this.tokenLookAhead();if(e&&e.type===T.OPEN_PAREN)return{type:T.RESERVED,value:E.value}}if(D(E)){var t=this.tokenLookBehind();if(t&&t.type===T.OPERATOR&&"."===t.value)return{type:T.WORD,value:E.value}}return E}}])&&te(e.prototype,t),n&&te(e,n),r}(U);function Se(E){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}function Le(E,e){if(!(E instanceof e))throw new TypeError("Cannot call a class as a function")}function ie(E,e){for(var t=0;t<e.length;t++){var T=e[t];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(E,T.key,T)}}function Ce(E,e){return(Ce=Object.setPrototypeOf||function(E,e){return E.__proto__=e,E})(E,e)}function ue(E){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(E){return!1}}();return function(){var t,T=ae(E);if(e){var n=ae(this).constructor;t=Reflect.construct(T,arguments,n)}else t=T.apply(this,arguments);return ce(this,t)}}function ce(E,e){return!e||"object"!==Se(e)&&"function"!=typeof e?function(E){if(void 0===E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(E):e}function ae(E){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(E)}var se=["ACCESSIBLE","ACTION","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ANALYSE","ANALYZE","AS","ASC","AUTOCOMMIT","AUTO_INCREMENT","BACKUP","BEGIN","BETWEEN","BINLOG","BOTH","CASCADE","CHANGE","CHANGED","CHARACTER SET","CHARSET","CHECK","CHECKSUM","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPRESSED","CONCURRENT","CONSTRAINT","CONTAINS","CONVERT","CREATE","CROSS","CURRENT_TIMESTAMP","DATABASE","DATABASES","DAY","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DEFAULT","DEFINER","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO","DROP","DUMPFILE","DUPLICATE","DYNAMIC","ELSE","ENCLOSED","ENGINE","ENGINES","ENGINE_TYPE","ESCAPE","ESCAPED","EVENTS","EXEC","EXECUTE","EXISTS","EXPLAIN","EXTENDED","FAST","FETCH","FIELDS","FILE","FIRST","FIXED","FLUSH","FOR","FORCE","FOREIGN","FULL","FULLTEXT","FUNCTION","GLOBAL","GRANT","GRANTS","GROUP_CONCAT","HEAP","HIGH_PRIORITY","HOSTS","HOUR","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IFNULL","IGNORE","IN","INDEX","INDEXES","INFILE","INSERT","INSERT_ID","INSERT_METHOD","INTERVAL","INTO","INVOKER","IS","ISOLATION","KEY","KEYS","KILL","LAST_INSERT_ID","LEADING","LEVEL","LIKE","LINEAR","LINES","LOAD","LOCAL","LOCK","LOCKS","LOGS","LOW_PRIORITY","MARIA","MASTER","MASTER_CONNECT_RETRY","MASTER_HOST","MASTER_LOG_FILE","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MERGE","MINUTE","MINUTE_SECOND","MIN_ROWS","MODE","MODIFY","MONTH","MRG_MYISAM","MYISAM","NAMES","NATURAL","NOT","NOW()","NULL","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPEN","OPTIMIZE","OPTION","OPTIONALLY","OUTFILE","PACK_KEYS","PAGE","PARTIAL","PARTITION","PARTITIONS","PASSWORD","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PURGE","QUICK","RAID0","RAID_CHUNKS","RAID_CHUNKSIZE","RAID_TYPE","RANGE","READ","READ_ONLY","READ_WRITE","REFERENCES","REGEXP","RELOAD","RENAME","REPAIR","REPEATABLE","REPLACE","REPLICATION","RESET","RESTORE","RESTRICT","RETURN","RETURNS","REVOKE","RLIKE","ROLLBACK","ROW","ROWS","ROW_FORMAT","SECOND","SECURITY","SEPARATOR","SERIALIZABLE","SESSION","SHARE","SHOW","SHUTDOWN","SLAVE","SONAME","SOUNDS","SQL","SQL_AUTO_IS_NULL","SQL_BIG_RESULT","SQL_BIG_SELECTS","SQL_BIG_TABLES","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_LOG_BIN","SQL_LOG_OFF","SQL_LOG_UPDATE","SQL_LOW_PRIORITY_UPDATES","SQL_MAX_JOIN_SIZE","SQL_NO_CACHE","SQL_QUOTE_SHOW_CREATE","SQL_SAFE_UPDATES","SQL_SELECT_LIMIT","SQL_SLAVE_SKIP_COUNTER","SQL_SMALL_RESULT","SQL_WARNINGS","START","STARTING","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","STRIPED","SUPER","TABLE","TABLES","TEMPORARY","TERMINATED","THEN","TO","TRAILING","TRANSACTIONAL","TRUE","TRUNCATE","TYPE","TYPES","UNCOMMITTED","UNIQUE","UNLOCK","UNSIGNED","USAGE","USE","USING","VARIABLES","VIEW","WITH","WORK","WRITE","YEAR_MONTH"],De=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","CASE","DELETE FROM","END","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INSERT","LIMIT","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],le=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],fe=["AND","CROSS APPLY","CROSS JOIN","ELSE","INNER JOIN","JOIN","LEFT JOIN","LEFT OUTER JOIN","OR","OUTER APPLY","OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","WHEN","XOR"],Ue=function(E){!function(E,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(e&&e.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),e&&Ce(E,e)}(R,E);var e,t,T,n=ue(R);function R(){return Le(this,R),n.apply(this,arguments)}return e=R,(t=[{key:"tokenizer",value:function(){return new B({reservedWords:se,reservedTopLevelWords:De,reservedNewlineWords:fe,reservedTopLevelWordsNoIndent:le,stringTypes:['""',"N''","''","``","[]"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@",":"],lineCommentTypes:["#","--"]})}}])&&ie(e.prototype,t),T&&ie(e,T),R}(U);function Pe(E){return(Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(E)}var Me={db2:j,mariadb:RE,n1ql:cE,"pl/sql":hE,plsql:hE,postgresql:gE,redshift:qE,spark:oe,sql:Ue},pe=function(E){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof E)throw new Error("Invalid query argument. Extected string, instead got "+Pe(E));var t=Ue;if(void 0!==e.language&&(t=Me[e.language]),void 0===t)throw Error("Unsupported SQL dialect: ".concat(e.language));return new t(e).format(E)},ye=Object.keys(Me)}])}));
//# sourceMappingURL=sql-formatter.min.js.map

@@ -60,3 +60,2 @@ "use strict";

reservedTopLevelWordsNoIndent: reservedTopLevelWordsNoIndent,
// TODO: support $$ dollar-quoted strings $$
stringTypes: ["\"\"", "''", "U&''", 'U&""', '$$'],

@@ -63,0 +62,0 @@ openParens: ['(', 'CASE'],

@@ -10,2 +10,4 @@ "use strict";

var _MariaDbFormatter = _interopRequireDefault(require("./languages/MariaDbFormatter"));
var _N1qlFormatter = _interopRequireDefault(require("./languages/N1qlFormatter"));

@@ -29,2 +31,3 @@

db2: _Db2Formatter["default"],
mariadb: _MariaDbFormatter["default"],
n1ql: _N1qlFormatter["default"],

@@ -31,0 +34,0 @@ 'pl/sql': _PlSqlFormatter["default"],

{
"name": "sql-formatter",
"version": "4.0.0-beta.3",
"version": "4.0.0-beta.4",
"description": "Format whitespace in a SQL query to make it more readable",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -9,2 +9,3 @@ # SQL Formatter [![NPM version](https://img.shields.io/npm/v/sql-formatter.svg)](https://npmjs.com/package/sql-formatter) [![Build Status](https://travis-ci.org/zeroturnaround/sql-formatter.svg?branch=master)](https://travis-ci.org/zeroturnaround/sql-formatter) [![Coverage Status](https://coveralls.io/repos/github/zeroturnaround/sql-formatter/badge.svg?branch=master)](https://coveralls.io/github/zeroturnaround/sql-formatter?branch=master)

- **sql** - [Standard SQL][]
- **mariadb** - [MariaDB][]
- **postgresql** - [PostgreSQL][]

@@ -160,1 +161,2 @@ - **db2** - [IBM DB2][]

[postgresql]: https://www.postgresql.org/
[mariadb]: https://mariadb.com/

@@ -507,3 +507,2 @@ import Formatter from '../core/Formatter';

reservedTopLevelWordsNoIndent,
// TODO: support $$ dollar-quoted strings $$
stringTypes: [`""`, "''", "U&''", 'U&""', '$$'],

@@ -510,0 +509,0 @@ openParens: ['(', 'CASE'],

import Db2Formatter from './languages/Db2Formatter';
import MariaDbFormatter from './languages/MariaDbFormatter';
import N1qlFormatter from './languages/N1qlFormatter';

@@ -11,2 +12,3 @@ import PlSqlFormatter from './languages/PlSqlFormatter';

db2: Db2Formatter,
mariadb: MariaDbFormatter,
n1ql: N1qlFormatter,

@@ -13,0 +15,0 @@ 'pl/sql': PlSqlFormatter,

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc