@kusto/monaco-kusto
Advanced tools
Comparing version 7.7.1 to 7.7.2
{ | ||
"name": "@kusto/monaco-kusto", | ||
"version": "7.7.1", | ||
"version": "7.7.2", | ||
"description": "CSL, KQL plugin for the Monaco Editor", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -75,3 +75,3 @@ # Monaco Kusto | ||
### 7.7.1 | ||
### 7.7.2 | ||
@@ -78,0 +78,0 @@ - fix: `KustoWorker#setParameters` will now apply changes immediately |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-kusto version: 7.7.1(f7f3c57600d1a3143717d12d346f874c1cd61f97) | ||
* monaco-kusto version: 7.7.2(36941000968d2e5b64053b2c801e7dd2500b0188) | ||
* Released under the MIT license | ||
@@ -8,3 +8,3 @@ * https://https://github.com/Azure/monaco-kusto/blob/master/README.md | ||
define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-4f4ca9c2'], (function (require, exports, monaco, schema) { 'use strict'; | ||
define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-2ff631e8'], (function (require, exports, monaco, schema) { 'use strict'; | ||
@@ -11,0 +11,0 @@ function _interopNamespaceDefault(e) { |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-kusto version: 7.7.1(f7f3c57600d1a3143717d12d346f874c1cd61f97) | ||
* monaco-kusto version: 7.7.2(36941000968d2e5b64053b2c801e7dd2500b0188) | ||
* Released under the MIT license | ||
@@ -5,0 +5,0 @@ * https://https://github.com/Azure/monaco-kusto/blob/master/README.md |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-kusto version: 7.7.1(f7f3c57600d1a3143717d12d346f874c1cd61f97) | ||
* monaco-kusto version: 7.7.2(36941000968d2e5b64053b2c801e7dd2500b0188) | ||
* Released under the MIT license | ||
@@ -9,4 +9,4 @@ * https://https://github.com/Azure/monaco-kusto/blob/master/README.md | ||
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; | ||
import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-edd20bc2.js'; | ||
export { s as showSchema } from './schema-edd20bc2.js'; | ||
import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-e9715f6c.js'; | ||
export { s as showSchema } from './schema-e9715f6c.js'; | ||
@@ -13,0 +13,0 @@ function getCurrentCommandRange(editor, cursorPosition) { |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-kusto version: 7.7.1(f7f3c57600d1a3143717d12d346f874c1cd61f97) | ||
* monaco-kusto version: 7.7.2(36941000968d2e5b64053b2c801e7dd2500b0188) | ||
* Released under the MIT license | ||
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md | ||
*-----------------------------------------------------------------------------*/ | ||
define("vs/language/kusto/kustoMode",["exports","vs/editor/editor.main","./main-c17ac82b"],(function(t,e,n){"use strict";function r(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var o=r(e),i=["onDidProvideCompletionItems"];function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function s(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}var l=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._monacoInstance=e,this._defaults=n,this._worker=null,this._idleCheckInterval=self.setInterval((function(){return r._checkIfIdle()}),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((function(){return r._saveStateAndStopWorker()}))}var e,n,r;return e=t,n=[{key:"_stopWorker",value:function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}},{key:"_saveStateAndStopWorker",value:function(){var t=this;this._worker&&this._worker.getProxy().then((function(e){e.getSchema().then((function(e){t._storedState={schema:e},t._stopWorker()}))}))}},{key:"dispose",value:function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}},{key:"_checkIfIdle",value:function(){if(this._worker){var t=this._defaults.getWorkerMaxIdleTime(),e=Date.now()-this._lastUsedTime;t>0&&e>t&&this._saveStateAndStopWorker()}}},{key:"_getClient",value:function(){var t=this;this._lastUsedTime=Date.now();var e=this._defaults.languageSettings;e.onDidProvideCompletionItems;var n=u(e,i);return this._client||(this._worker=this._monacoInstance.editor.createWebWorker({moduleId:"vs/language/kusto/kustoWorker",label:"kusto",createData:{languageSettings:n,languageId:"kusto"}}),this._client=this._worker.getProxy().then((function(e){return t._storedState?e.setSchema(t._storedState.schema).then((function(){return e})):e}))),this._client}},{key:"getLanguageServiceWorker",value:function(){for(var t,e=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this._getClient().then((function(e){t=e})).then((function(t){return e._worker.withSyncedResources(r)})).then((function(e){return t}))}}],n&&c(e.prototype,n),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),f={name:"kusto",mimeTypes:["text/kusto"],displayName:"Kusto",defaultToken:"invalid",brackets:[["[","]","delimiter.square"],["(",")","delimiter.parenthesis"]],wordDefinition:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,promotedOperatorCommandTokens:["where","count","extend","join","limit","order","project","project-away","project-rename","project-reorder","project-keep","render","sort","summarize","distinct","take","top","top-nested","top-hitters","union","mv-expand","mv-apply","reduce","evaluate","parse","parse-where","parse-kv","sample","sample-distinct","make-series","getschema","serialize","invoke","as","scan"],operatorCommandTokens:["filter","fork","facet","range","consume","find","search","print","partition","lookup","where","count","extend","join","limit","order","project","project-away","project-rename","project-reorder","project-keep","render","sort","summarize","distinct","take","top","top-nested","top-hitters","union","mv-expand","mv-apply","reduce","evaluate","parse","parse-where","parse-kv","sample","sample-distinct","make-series","getschema","serialize","invoke","as","scan"],keywords:["by","on","contains","notcontains","containscs","notcontainscs","startswith","has","matches","regex","true","false","and","or","typeof","int","string","date","datetime","time","long","real","boolean","bool"],operators:["+","-","*","/",">","<","==","<>","<=",">=","~","!~"],builtinFunctions:["countof","bin","extentid","extract","extractjson","floor","iif","isnull","isnotnull","notnull","isempty","isnotempty","notempty","now","re2","strcat","strlen","toupper","tostring","count","cnt","sum","min","max","avg"],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@dqstrings"},{include:"@literals"},{include:"@comments"},[/[;,.]/,"delimiter"],[/[()\[\]]/,"@brackets"],[/[<>=!%&+\-*/|~^]/,"operator"],[/[\w@#\-$]+/,{cases:{"@keywords":"keyword","@promotedOperatorCommandTokens":"operator.sql","@operatorCommandTokens":"keyword","@operators":"operator","@builtinFunctions":"predefined","@default":"identifier"}}]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\/+.*","comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/H'/,{token:"string.quote",bracket:"@open",next:"@string"}],[/h'/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'/,{token:"string.quote",bracket:"@open",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],dqstrings:[[/H"/,{token:"string.quote",bracket:"@open",next:"@dqstring"}],[/h"/,{token:"string.quote",bracket:"@open",next:"@dqstring"}],[/"/,{token:"string.quote",bracket:"@open",next:"@dqstring"}]],dqstring:[[/[^"]+/,"string"],[/""/,"string"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],literals:[[/datetime\(\d{4}-\d{2}-\d{2}(\s+\d{2}:\d{2}(:\d{2}(\.\d{0,3})?)?)?\)/,"number"],[/time\((\d+(s(ec(onds?)?)?|m(in(utes?)?)?|h(ours?)?|d(ays?)?)|(\s*(('[^']+')|("[^"]+"))\s*))\)/,"number"],[/guid\([\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}\)/,"number"],[/typeof\((int|string|date|datetime|time|long|real|boolean|bool)\)/,"number"]]}};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function p(t){var e=d(t);return null!=t&&("object"==e||"function"==e)}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}var m="object"==("undefined"==typeof global?"undefined":h(global))&&global&&global.Object===Object&&global;function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}var v="object"==("undefined"==typeof self?"undefined":g(self))&&self&&self.Object===Object&&self,y=m||v||Function("return this")(),b=function(){return y.Date.now()},w=/\s/;var k=/^\s+/;function _(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&w.test(t.charAt(e)););return e}(t)+1).replace(k,""):t}var S=y.Symbol,x=Object.prototype,L=x.hasOwnProperty,C=x.toString,I=S?S.toStringTag:void 0;var O=Object.prototype.toString;var j="[object Null]",P="[object Undefined]",E=S?S.toStringTag:void 0;function T(t){return null==t?void 0===t?P:j:E&&E in Object(t)?function(t){var e=L.call(t,I),n=t[I];try{t[I]=void 0;var r=!0}catch(t){}var o=C.call(t);return r&&(e?t[I]=n:delete t[I]),o}(t):function(t){return O.call(t)}(t)}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}var F="[object Symbol]";function M(t){return"symbol"==A(t)||function(t){return null!=t&&"object"==D(t)}(t)&&T(t)==F}var N=NaN,V=/^[-+]0x[0-9a-f]+$/i,K=/^0b[01]+$/i,R=/^0o[0-7]+$/i,q=parseInt;function W(t){if("number"==typeof t)return t;if(M(t))return N;if(p(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=p(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=_(t);var n=K.test(t);return n||R.test(t)?q(t.slice(2),n?2:8):V.test(t)?N:+t}var z=Math.max,G=Math.min;function U(t,e,n){var r,o,i,a,u,c,s=0,l=!1,f=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function h(e){var n=r,i=o;return r=o=void 0,s=e,a=t.apply(i,n)}function m(t){var n=t-c;return void 0===c||n>=e||n<0||f&&t-s>=i}function g(){var t=b();if(m(t))return v(t);u=setTimeout(g,function(t){var n=e-(t-c);return f?G(n,i-(t-s)):n}(t))}function v(t){return u=void 0,d&&r?h(t):(r=o=void 0,a)}function y(){var t=b(),n=m(t);if(r=arguments,o=this,c=t,n){if(void 0===u)return function(t){return s=t,u=setTimeout(g,e),l?h(t):a}(c);if(f)return clearTimeout(u),u=setTimeout(g,e),h(c)}return void 0===u&&(u=setTimeout(g,e)),a}return e=W(e)||0,p(n)&&(l=!!n.leading,i=(f="maxWait"in n)?z(W(n.maxWait)||0,e):i,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==u&&clearTimeout(u),s=0,r=c=o=u=void 0},y.flush=function(){return void 0===u?a:v(b())},y}function B(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Q(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function H(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||Q(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(t){return function(t){if(Array.isArray(t))return Y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Q(t)||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 Q(t,e){if(t){if("string"==typeof t)return Y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(t,e):void 0}}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function X(t){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(t)}function J(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */J=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),u=new L(o||[]);return r(a,"_invoke",{value:k(t,n,u)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function d(){}function p(){}function h(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(C([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=h.prototype=d.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(r,i,a,u){var c=l(t[r],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==X(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function k(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=_(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function C(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=h,r(y,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),c(y,u,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=C,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Z(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function tt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Z(i,r,o,a,u,"next",t)}function u(t){Z(i,r,o,a,u,"throw",t)}a(void 0)}))}}function et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,it(r.key),r)}}function rt(t,e,n){return e&&nt(t.prototype,e),n&&nt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ot(t,e,n){return(e=it(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function it(t){var e=function(t,e){if("object"!==X(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===X(e)?e:String(e)}var at=function(){function t(e,n,r,i,a){var u=this;et(this,t),ot(this,"_disposables",[]),ot(this,"_contentListener",Object.create(null)),ot(this,"_configurationListener",Object.create(null)),ot(this,"_schemaListener",Object.create(null)),ot(this,"_cursorListener",Object.create(null)),ot(this,"_debouncedValidations",Object.create(null)),this._monacoInstance=e,this._languageId=n,this._worker=r,this.defaults=i;var c,s=function(t){var e=t.getLanguageId(),n=t.uri.toString();if(e===u._languageId){var r=u.getOrCreateDebouncedValidation(t,e);u._contentListener[n]=t.onDidChangeContent((function(t){var e=ut(t);r(e)})),u._configurationListener[n]=u.defaults.onDidChange((function(){self.setTimeout((function(){return u._doValidate(t,e,[])}),0)})),u._schemaListener[n]=a((function(){self.setTimeout((function(){return u._doValidate(t,e,[])}),0)}))}},l=function(t){var e=t.getId();u._cursorListener[e]||(t.onDidDispose((function(){var t;null===(t=u._cursorListener[e])||void 0===t||t.dispose(),delete u._cursorListener[e]})),u._cursorListener[e]=t.onDidChangeCursorSelection((function(e){var n=t.getModel(),r=n.getLanguageId();if(r===u._languageId){var o=n.getOffsetAt(e.selection.getPosition());u.getOrCreateDebouncedValidation(n,r)([{start:o,end:o}])}})))},f=function(t){u._monacoInstance.editor.setModelMarkers(t,u._languageId,[]);var e=t.uri.toString(),n=u._contentListener[e];n&&(n.dispose(),delete u._contentListener[e]);var r=u._configurationListener[e];r&&(r.dispose(),delete u._configurationListener[e]);var o=u._schemaListener[e];o&&(o.dispose(),delete u._schemaListener[e]);var i=u._debouncedValidations[e];i&&(i.cancel(),delete u._debouncedValidations[e])};this.defaults.languageSettings.enableQuickFixes&&this._disposables.push(o.languages.registerCodeActionProvider(this._languageId,{provideCodeActions:(c=tt(J().mark((function t(e,n,r,o){var i,a,c,s;return J().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.getOffsetAt(n.getStartPosition()),a=e.getOffsetAt(n.getEndPosition()),c=r.markers.length>0,t.next=5,u.getMonacoCodeActions(e,i,a,c);case 5:return s=t.sent,t.abrupt("return",{actions:s,dispose:function(){}});case 7:case"end":return t.stop()}}),t)}))),function(t,e,n,r){return c.apply(this,arguments)})})),this._disposables.push(this._monacoInstance.editor.onDidCreateEditor(l)),this._disposables.push(this._monacoInstance.editor.onDidCreateModel(s)),this._disposables.push(this._monacoInstance.editor.onWillDisposeModel(f)),this._disposables.push(this._monacoInstance.editor.onDidChangeModelLanguage((function(t){f(t.model),s(t.model)}))),this._disposables.push({dispose:function(){for(var t in u._contentListener)u._contentListener[t].dispose();for(var e in u._cursorListener)u._cursorListener[e].dispose();for(var n in u._debouncedValidations)u._debouncedValidations[n].cancel()}}),this._monacoInstance.editor.getModels().forEach(s),this._monacoInstance.editor.getEditors().forEach(l)}var e;return rt(t,[{key:"getMonacoCodeActions",value:(e=tt(J().mark((function t(e,n,r,o){var i,a,u,c,s,l,f,d=this;return J().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=[],t.next=3,this._worker(e.uri);case 3:return a=t.sent,u=e.uri,t.next=7,a.getResultActions(u.toString(),n,r);case 7:c=t.sent,s=J().mark((function t(){var n,r,a,u,s;return J().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=c[l]).kind.includes("Extract Function")){t.next=3;break}return t.abrupt("return","continue");case 3:if("quickfix"!=(a=null!==(n=d.defaults.languageSettings.quickFixCodeActions)&&void 0!==n&&n.find((function(t){return r.kind.includes(t)}))?"quickfix":"custom")||o){t.next=6;break}return t.abrupt("return",{v:void 0});case 6:u=r.changes,s=u.map((function(t){var n,r=e.getPositionAt(t.start),o=e.getPositionAt(t.start+t.deleteLength);return{resource:e.uri,textEdit:{range:{startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:o.lineNumber,endColumn:o.column},text:null!==(n=t.insertText)&&void 0!==n?n:""}}})),i.push({title:r.title,diagnostics:[],kind:a,edit:{edits:$(s)}});case 9:case"end":return t.stop()}}),t)})),l=0;case 10:if(!(l<c.length)){t.next=20;break}return t.delegateYield(s(),"t0",12);case 12:if("continue"!==(f=t.t0)){t.next=15;break}return t.abrupt("continue",17);case 15:if("object"!==X(f)){t.next=17;break}return t.abrupt("return",f.v);case 17:l++,t.next=10;break;case 20:return t.abrupt("return",i);case 21:case"end":return t.stop()}}),t,this)}))),function(t,n,r,o){return e.apply(this,arguments)})},{key:"getOrCreateDebouncedValidation",value:function(t,e){var n=this,r=t.uri.toString();return this._debouncedValidations[r]||(this._debouncedValidations[r]=U((function(r){return n._doValidate(t,e,r)}),500)),this._debouncedValidations[r]}},{key:"dispose",value:function(){this._disposables.forEach((function(t){return t&&t.dispose()})),this._disposables=[]}},{key:"_doValidate",value:function(t,e,n){var r=this;if(!t.isDisposed()){var i=t.uri,a=t.getVersionId();this._worker(i).then((function(t){return t.doValidation(i.toString(),n)})).then((function(t){if(r._monacoInstance.editor.getModel(i).getVersionId()===a){var n=t.map((function(t){return n="number"==typeof(e=t).code?String(e.code):e.code,{severity:ct(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:n,source:e.source};var e,n})),u=r._monacoInstance.editor.getModel(i),c=u.getAllDecorations().filter((function(t){return"squiggly-error"==t.options.className})).map((function(t){return t.id}));if(u&&u.getLanguageId()===e){var s=r.defaults.languageSettings.syntaxErrorAsMarkDown;if(s&&s.enableSyntaxErrorAsMarkDown){var l=s.header?"**".concat(s.header,"** \n\n"):"",f=s.icon?""):"",d="".concat(f," ").concat(l),p=n.map((function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn},options:{hoverMessage:{value:d+t.message},className:"squiggly-error",zIndex:100,overviewRuler:{color:"rgb(255, 18, 18, 0.7)",position:o.editor.OverviewRulerLane.Right},minimap:{color:"rgb(255, 18, 18, 0.7)",position:o.editor.MinimapPosition.Inline}}}})),h=o.editor.getModelMarkers({owner:e,resource:i});h&&h.length>0&&(c=[],r._monacoInstance.editor.setModelMarkers(u,e,[])),u.deltaDecorations(c,p)}else u.deltaDecorations(c,[]),r._monacoInstance.editor.setModelMarkers(u,e,n)}}})).then(void 0,(function(t){console.error(t)}))}}}]),t}();function ut(t){return t.changes.map((function(t){return{start:t.rangeOffset,end:t.rangeOffset+t.text.length}}))}function ct(t){switch(t){case n.DiagnosticSeverity.Error:return o.MarkerSeverity.Error;case n.DiagnosticSeverity.Warning:return o.MarkerSeverity.Warning;case n.DiagnosticSeverity.Information:return o.MarkerSeverity.Info;case n.DiagnosticSeverity.Hint:return o.MarkerSeverity.Hint;default:return o.MarkerSeverity.Info}}for(var st={PlainText:0,Comment:1,Punctuation:2,Directive:3,Literal:4,StringLiteral:5,Type:6,Column:7,Table:8,Database:9,Function:10,Parameter:11,Variable:12,Identifier:13,ClientParameter:14,QueryParameter:15,ScalarOperator:16,MathOperator:17,QueryOperator:18,Command:19,Keyword:20,MaterializedView:21,SchemaMember:22,SignatureParameter:23,Option:24},lt={},ft=0,dt=Object.entries(st);ft<dt.length;ft++){var pt=H(dt[ft],2),ht=pt[0],mt=pt[1];lt[mt]=ht}var gt={Column:"C71585",Comment:"008000",Database:"C71585",Function:"0000FF",Identifier:"000000",Keyword:"0000FF",Literal:"B22222",ScalarOperator:"0000FF",MaterializedView:"C71585",MathOperator:"000000",Command:"0000FF",Parameter:"2B91AF",PlainText:"000000",Punctuation:"000000",QueryOperator:"CC3700",QueryParameter:"CC3700",StringLiteral:"B22222",Table:"C71585",Type:"0000FF",Variable:"191970",Directive:"9400D3",ClientParameter:"b5cea8",SchemaMember:"C71585",SignatureParameter:"2B91AF",Option:"000000"},vt={Column:"4ec9b0",Comment:"6A9B34",Database:"c586c0",Function:"dcdcaa",Identifier:"d4d4d4",Keyword:"569cd6",Literal:"ce9178",ScalarOperator:"569cd6",MaterializedView:"c586c0",MathOperator:"d4d4d4",Command:"d4d4d4",Parameter:"2B91AF",PlainText:"d4d4d4",Punctuation:"d4d4d4",QueryOperator:"9cdcfe",QueryParameter:"9cdcfe",StringLiteral:"ce9178",Table:"c586c0",Type:"569cd6",Variable:"d7ba7d",Directive:"b5cea8",ClientParameter:"b5cea8",SchemaMember:"4ec9b0",SignatureParameter:"2B91AF",Option:"d4d4d4"},yt=function(){function t(e,n,r,o,i){var a,u,c,s=this;et(this,t),ot(this,"_disposables",[]),ot(this,"_contentListener",Object.create(null)),ot(this,"_configurationListener",Object.create(null)),ot(this,"_schemaListener",Object.create(null)),ot(this,"decorations",[]),this._monacoInstance=e,this._languageId=n,this._worker=r,a=document.getElementsByTagName("head")[0],(u=document.createElement("style")).type="text/css",u.media="screen",a.appendChild(u),u.innerHTML=(c=Object.keys(st).map((function(t){return{classification:t,colorLight:gt[t],colorDark:vt[t]}})),c).map((function(t){return".vs .".concat(t.classification," {color: #").concat(t.colorLight,";} .vs-dark .").concat(t.classification," {color: #").concat(t.colorDark,";}")})).join("\n");var l=function(t){var e=t.getLanguageId();if(e===s._languageId){var n=U((function(n){return s._doColorization(t,e,n)}),500);s._contentListener[t.uri.toString()]=t.onDidChangeContent((function(t){var e=ut(t);n(e)})),s._configurationListener[t.uri.toString()]=o.onDidChange((function(){self.setTimeout((function(){return s._doColorization(t,e,[])}),0)})),s._schemaListener[t.uri.toString()]=i((function(){self.setTimeout((function(){return s._doColorization(t,e,[])}),0)}))}},f=function(t){t.deltaDecorations(s.decorations,[]);var e=t.uri.toString(),n=s._contentListener[e];n&&(n.dispose(),delete s._contentListener[e]);var r=s._configurationListener[e];r&&(r.dispose(),delete s._configurationListener[e]);var o=s._configurationListener[e];o&&(o.dispose(),delete s._schemaListener[e])};this._disposables.push(this._monacoInstance.editor.onDidCreateModel(l)),this._disposables.push(this._monacoInstance.editor.onWillDisposeModel(f)),this._disposables.push(this._monacoInstance.editor.onDidChangeModelLanguage((function(t){f(t.model),l(t.model)}))),this._disposables.push({dispose:function(){for(var t in s._contentListener)s._contentListener[t].dispose()}}),this._monacoInstance.editor.getModels().forEach(l)}return rt(t,[{key:"dispose",value:function(){this._disposables.forEach((function(t){return t&&t.dispose()})),this._disposables=[]}},{key:"_rangeDoesNotIntersectAny",value:function(t,e){return e.every((function(e){return t.startLineNumber>e.lastImpactedLine||t.endLineNumber<e.firstImpactedLine}))}},{key:"_doColorization",value:function(t,e,n){var r=this;if(!t.isDisposed()){var i=t.uri,a=t.getVersionId();this._worker(i).then((function(t){return t.doColorization(i.toString(),n)})).then((function(n){if(r._monacoInstance.editor.getModel(t.uri).getVersionId()===a){var i=n.map((function(e){var n=e.classifications.map((function(e){return function(t,e){var n=t.getPositionAt(e.start),r=t.getPositionAt(e.start+e.length),i=new o.Range(n.lineNumber,n.column,r.lineNumber,r.column),a=lt[e.kind];return{range:i,options:{inlineClassName:a,stickiness:o.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}}(t,e)})).filter((function(t){return"PlainText"!==t.options.inlineClassName&&"Identifier"!=t.options.inlineClassName})),r=t.getPositionAt(e.absoluteStart).lineNumber,i=t.getPositionAt(e.absoluteEnd);return{decorations:n,firstImpactedLine:r,lastImpactedLine:1==i.column&&i.lineNumber>1?i.lineNumber-1:i.lineNumber}})),u=i.map((function(e){return t.getLinesDecorations(e.firstImpactedLine,e.lastImpactedLine).filter((function(t){return gt[t.options.inlineClassName]})).map((function(t){return t.id}))})).reduce((function(t,e){return t.concat(e)}),[]),c=i.reduce((function(t,e){return t.concat(e.decorations)}),[]);t&&t.getLanguageId()===e&&(r.decorations=t.deltaDecorations(u,c))}})).then(void 0,(function(t){console.error(t)}))}}}]),t}();function bt(t){if(t)return{character:t.column-1,line:t.lineNumber-1}}function wt(t){if(t)return new o.Range(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function kt(t){var e=o.languages.CompletionItemKind;switch(t){case n.CompletionItemKind.Text:return e.Text;case n.CompletionItemKind.Method:return e.Method;case n.CompletionItemKind.Function:return e.Function;case n.CompletionItemKind.Constructor:return e.Constructor;case n.CompletionItemKind.Field:return e.Field;case n.CompletionItemKind.Variable:return e.Variable;case n.CompletionItemKind.Class:return e.Class;case n.CompletionItemKind.Interface:return e.Interface;case n.CompletionItemKind.Module:return e.Module;case n.CompletionItemKind.Property:return e.Property;case n.CompletionItemKind.Unit:return e.Unit;case n.CompletionItemKind.Value:return e.Value;case n.CompletionItemKind.Enum:return e.Enum;case n.CompletionItemKind.Keyword:return e.Keyword;case n.CompletionItemKind.Snippet:return e.Snippet;case n.CompletionItemKind.Color:return e.Color;case n.CompletionItemKind.File:return e.File;case n.CompletionItemKind.Reference:return e.Reference}return e.Property}function _t(t){if(t)return{range:wt(t.range),text:t.newText}}var St=function(){function t(e,n){et(this,t),this._worker=e,this.languageSettings=n}return rt(t,[{key:"triggerCharacters",get:function(){return[" "]}},{key:"provideCompletionItems",value:function(t,e,r,i){var a=this,u=t.getWordUntilPosition(e),c=new o.Range(e.lineNumber,u.startColumn,e.lineNumber,u.endColumn),s=t.uri,l=this.languageSettings.onDidProvideCompletionItems;return this._worker(s).then((function(t){return t.doComplete(s.toString(),bt(e))})).then((function(t){return l?l(t):t})).then((function(t){if(t){var e=t.items.map((function(t){var e,r={label:t.label,insertText:t.insertText,sortText:t.sortText,filterText:t.filterText,documentation:a.formatDocLink(null===(e=t.documentation)||void 0===e?void 0:e.value),detail:t.detail,range:c,kind:kt(t.kind)};return t.textEdit&&(r.range=wt(t.textEdit.range),r.insertText=t.textEdit.newText),t.insertTextFormat===n.InsertTextFormat.Snippet&&(r.insertTextRules=o.languages.CompletionItemInsertTextRule.InsertAsSnippet),r}));return{isIncomplete:t.isIncomplete,suggestions:e}}}))}},{key:"formatDocLink",value:function(t){if(t){var e=this.languageSettings,n=e.documentationBaseUrl,r=void 0===n?"https://learn.microsoft.com/azure/data-explorer/kusto/query":n,i=e.documentationSuffix;return{value:t,isTrusted:!0,uris:new Proxy({},{get:function(t,e,n){var a=e.toString().replace(".md","");a.startsWith("https")||(a="".concat(r,"/").concat(a));var u=o.Uri.parse(a);return i&&(u.toString=function(){return a+i}),u}})}}}}]),t}();function xt(t){return"string"==typeof t?{value:t}:(e=t)&&"object"===X(e)&&"string"==typeof e.kind?"plaintext"===t.kind?{value:t.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:t.value}:{value:"```"+t.value+"\n"+t.value+"\n```\n"};var e}function Lt(t){if(t)return Array.isArray(t)?t.map(xt):[xt(t)]}function Ct(t){return{uri:o.Uri.parse(t.uri),range:wt(t.range)}}var It=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideDefinition",value:function(t,e,n){var r=t.uri;return this._worker(r).then((function(t){return t.findDefinition(r.toString(),bt(e))})).then((function(t){if(t&&0!=t.length)return[Ct(t[0])]}))}}]),t}(),Ot=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideReferences",value:function(t,e,n,r){var o=t.uri;return this._worker(o).then((function(t){return t.findReferences(o.toString(),bt(e))})).then((function(t){if(t)return t.map(Ct)}))}}]),t}();var jt=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideRenameEdits",value:function(t,e,n,r){var i=t.uri;return this._worker(i).then((function(t){return t.doRename(i.toString(),bt(e),n)})).then((function(t){return function(t){if(t&&t.changes){var e=[];for(var n in t.changes){var r,i=o.Uri.parse(n),a=B(t.changes[n]);try{for(a.s();!(r=a.n()).done;){var u=r.value;e.push({resource:i,textEdit:{range:wt(u.range),text:u.newText},versionId:void 0})}}catch(t){a.e(t)}finally{a.f()}}return{edits:e}}}(t)}))}}]),t}(),Pt=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideDocumentFormattingEdits",value:function(t,e,n){var r=t.uri;return this._worker(r).then((function(t){return t.doDocumentFormat(r.toString()).then((function(t){return t.map((function(t){return _t(t)}))}))}))}}]),t}(),Et=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideDocumentRangeFormattingEdits",value:function(t,e,n,r){var o=t.uri;return this._worker(o).then((function(t){return t.doRangeFormat(o.toString(),function(t){if(t)return{start:bt(t.getStartPosition()),end:bt(t.getEndPosition())}}(e)).then((function(t){return t.map((function(t){return _t(t)}))}))}))}}]),t}(),Tt=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideFoldingRanges",value:function(t,e,n){var r=t.uri;return this._worker(r).then((function(t){return t.doFolding(r.toString()).then((function(t){return t.map((function(t){return function(t){return{start:t.startLine+1,end:t.endLine+1,kind:o.languages.FoldingRangeKind.Region}}(t)}))}))}))}}]),t}();var Dt,At,Ft=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideHover",value:function(t,e,n){var r=t.uri;return this._worker(r).then((function(t){return t.doHover(r.toString(),bt(e))})).then((function(t){if(t)return{range:wt(t.range),contents:Lt(t.contents)}}))}}]),t}();function Mt(t){return Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mt(t)}function Nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Vt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(n),!0).forEach((function(e){Kt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Kt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Mt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Rt(t){return function(t){if(Array.isArray(t))return qt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qt(t,e)}(t)||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 qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Wt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Wt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),u=new L(o||[]);return r(a,"_invoke",{value:k(t,n,u)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function d(){}function p(){}function h(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(C([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=h.prototype=d.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(r,i,a,u){var c=l(t[r],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==Mt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function k(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=_(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function C(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=h,r(y,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),c(y,u,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=C,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function zt(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Gt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){zt(i,r,o,a,u,"next",t)}function u(t){zt(i,r,o,a,u,"throw",t)}a(void 0)}))}}var Ut=new Promise((function(t,e){At=t}));t.getKustoWorker=function(){return Ut.then((function(){return Dt}))},t.setupMode=function(t,e){var n,r=new o.Emitter,i=[],a=new l(e,t);i.push(a);var u=function(t){for(var e=function(){var t=Gt(Wt().mark((function t(e,n){var o;return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=n.setSchema(e),t.next=3,o.then((function(){r.fire(e)}));case 3:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return a.getLanguageServiceWorker.apply(a,Rt([t].concat(o))).then((function(t){return Vt(Vt({},t),{},{setSchema:function(n){return e(n,t)},setSchemaFromShowSchema:function(n,r,o,i,a){return Gt(Wt().mark((function u(){return Wt().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,t.normalizeSchema(n,r,o).then((function(n){(i||a)&&(n=Vt(Vt({},n),{},{globalScalarParameters:i,globalTabularParameters:a})),e(n,t)}));case 2:case"end":return u.stop()}}),u)})))()}})}))},c="kusto";return i.push(e.languages.registerCompletionItemProvider(c,new St(u,t.languageSettings))),t.languageSettings.useTokenColorization&&(n=e.languages.setMonarchTokensProvider(c,f)),t.onDidChange((function(t){t.languageSettings.useTokenColorization||void 0===n||(n.dispose(),n=void 0),t.languageSettings.useTokenColorization&&null==n&&(n=e.languages.setMonarchTokensProvider(c,f))})),i.push(new at(e,c,u,t,r.event)),i.push(new yt(e,c,u,t,r.event)),i.push(e.languages.registerDocumentRangeFormattingEditProvider(c,new Et(u))),i.push(e.languages.registerFoldingRangeProvider(c,new Tt(u))),i.push(e.languages.registerDefinitionProvider(c,new It(u))),i.push(e.languages.registerRenameProvider(c,new jt(u))),i.push(e.languages.registerReferenceProvider(c,new Ot(u))),t.languageSettings.enableHover&&i.push(e.languages.registerHoverProvider(c,new Ft(u))),e.languages.registerDocumentFormattingEditProvider(c,new Pt(u)),Dt=u,At(u),e.languages.setLanguageConfiguration(c,{folding:{offSide:!1,markers:{start:/^\s*[\r\n]/gm,end:/^\s*[\r\n]/gm}},comments:{lineComment:"//",blockComment:null}}),Dt}})); | ||
define("vs/language/kusto/kustoMode",["exports","vs/editor/editor.main","./main-cd0a8f0a"],(function(t,e,n){"use strict";function r(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var o=r(e),i=["onDidProvideCompletionItems"];function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function s(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}var l=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._monacoInstance=e,this._defaults=n,this._worker=null,this._idleCheckInterval=self.setInterval((function(){return r._checkIfIdle()}),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((function(){return r._saveStateAndStopWorker()}))}var e,n,r;return e=t,n=[{key:"_stopWorker",value:function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}},{key:"_saveStateAndStopWorker",value:function(){var t=this;this._worker&&this._worker.getProxy().then((function(e){e.getSchema().then((function(e){t._storedState={schema:e},t._stopWorker()}))}))}},{key:"dispose",value:function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}},{key:"_checkIfIdle",value:function(){if(this._worker){var t=this._defaults.getWorkerMaxIdleTime(),e=Date.now()-this._lastUsedTime;t>0&&e>t&&this._saveStateAndStopWorker()}}},{key:"_getClient",value:function(){var t=this;this._lastUsedTime=Date.now();var e=this._defaults.languageSettings;e.onDidProvideCompletionItems;var n=u(e,i);return this._client||(this._worker=this._monacoInstance.editor.createWebWorker({moduleId:"vs/language/kusto/kustoWorker",label:"kusto",createData:{languageSettings:n,languageId:"kusto"}}),this._client=this._worker.getProxy().then((function(e){return t._storedState?e.setSchema(t._storedState.schema).then((function(){return e})):e}))),this._client}},{key:"getLanguageServiceWorker",value:function(){for(var t,e=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this._getClient().then((function(e){t=e})).then((function(t){return e._worker.withSyncedResources(r)})).then((function(e){return t}))}}],n&&c(e.prototype,n),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),f={name:"kusto",mimeTypes:["text/kusto"],displayName:"Kusto",defaultToken:"invalid",brackets:[["[","]","delimiter.square"],["(",")","delimiter.parenthesis"]],wordDefinition:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,promotedOperatorCommandTokens:["where","count","extend","join","limit","order","project","project-away","project-rename","project-reorder","project-keep","render","sort","summarize","distinct","take","top","top-nested","top-hitters","union","mv-expand","mv-apply","reduce","evaluate","parse","parse-where","parse-kv","sample","sample-distinct","make-series","getschema","serialize","invoke","as","scan"],operatorCommandTokens:["filter","fork","facet","range","consume","find","search","print","partition","lookup","where","count","extend","join","limit","order","project","project-away","project-rename","project-reorder","project-keep","render","sort","summarize","distinct","take","top","top-nested","top-hitters","union","mv-expand","mv-apply","reduce","evaluate","parse","parse-where","parse-kv","sample","sample-distinct","make-series","getschema","serialize","invoke","as","scan"],keywords:["by","on","contains","notcontains","containscs","notcontainscs","startswith","has","matches","regex","true","false","and","or","typeof","int","string","date","datetime","time","long","real","boolean","bool"],operators:["+","-","*","/",">","<","==","<>","<=",">=","~","!~"],builtinFunctions:["countof","bin","extentid","extract","extractjson","floor","iif","isnull","isnotnull","notnull","isempty","isnotempty","notempty","now","re2","strcat","strlen","toupper","tostring","count","cnt","sum","min","max","avg"],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@dqstrings"},{include:"@literals"},{include:"@comments"},[/[;,.]/,"delimiter"],[/[()\[\]]/,"@brackets"],[/[<>=!%&+\-*/|~^]/,"operator"],[/[\w@#\-$]+/,{cases:{"@keywords":"keyword","@promotedOperatorCommandTokens":"operator.sql","@operatorCommandTokens":"keyword","@operators":"operator","@builtinFunctions":"predefined","@default":"identifier"}}]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\/+.*","comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/H'/,{token:"string.quote",bracket:"@open",next:"@string"}],[/h'/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'/,{token:"string.quote",bracket:"@open",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],dqstrings:[[/H"/,{token:"string.quote",bracket:"@open",next:"@dqstring"}],[/h"/,{token:"string.quote",bracket:"@open",next:"@dqstring"}],[/"/,{token:"string.quote",bracket:"@open",next:"@dqstring"}]],dqstring:[[/[^"]+/,"string"],[/""/,"string"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],literals:[[/datetime\(\d{4}-\d{2}-\d{2}(\s+\d{2}:\d{2}(:\d{2}(\.\d{0,3})?)?)?\)/,"number"],[/time\((\d+(s(ec(onds?)?)?|m(in(utes?)?)?|h(ours?)?|d(ays?)?)|(\s*(('[^']+')|("[^"]+"))\s*))\)/,"number"],[/guid\([\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}\)/,"number"],[/typeof\((int|string|date|datetime|time|long|real|boolean|bool)\)/,"number"]]}};function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function p(t){var e=d(t);return null!=t&&("object"==e||"function"==e)}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}var m="object"==("undefined"==typeof global?"undefined":h(global))&&global&&global.Object===Object&&global;function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}var v="object"==("undefined"==typeof self?"undefined":g(self))&&self&&self.Object===Object&&self,y=m||v||Function("return this")(),b=function(){return y.Date.now()},w=/\s/;var k=/^\s+/;function _(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&w.test(t.charAt(e)););return e}(t)+1).replace(k,""):t}var S=y.Symbol,x=Object.prototype,L=x.hasOwnProperty,C=x.toString,I=S?S.toStringTag:void 0;var O=Object.prototype.toString;var j="[object Null]",P="[object Undefined]",E=S?S.toStringTag:void 0;function T(t){return null==t?void 0===t?P:j:E&&E in Object(t)?function(t){var e=L.call(t,I),n=t[I];try{t[I]=void 0;var r=!0}catch(t){}var o=C.call(t);return r&&(e?t[I]=n:delete t[I]),o}(t):function(t){return O.call(t)}(t)}function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}var F="[object Symbol]";function M(t){return"symbol"==A(t)||function(t){return null!=t&&"object"==D(t)}(t)&&T(t)==F}var N=NaN,V=/^[-+]0x[0-9a-f]+$/i,K=/^0b[01]+$/i,R=/^0o[0-7]+$/i,q=parseInt;function W(t){if("number"==typeof t)return t;if(M(t))return N;if(p(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=p(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=_(t);var n=K.test(t);return n||R.test(t)?q(t.slice(2),n?2:8):V.test(t)?N:+t}var z=Math.max,G=Math.min;function U(t,e,n){var r,o,i,a,u,c,s=0,l=!1,f=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function h(e){var n=r,i=o;return r=o=void 0,s=e,a=t.apply(i,n)}function m(t){var n=t-c;return void 0===c||n>=e||n<0||f&&t-s>=i}function g(){var t=b();if(m(t))return v(t);u=setTimeout(g,function(t){var n=e-(t-c);return f?G(n,i-(t-s)):n}(t))}function v(t){return u=void 0,d&&r?h(t):(r=o=void 0,a)}function y(){var t=b(),n=m(t);if(r=arguments,o=this,c=t,n){if(void 0===u)return function(t){return s=t,u=setTimeout(g,e),l?h(t):a}(c);if(f)return clearTimeout(u),u=setTimeout(g,e),h(c)}return void 0===u&&(u=setTimeout(g,e)),a}return e=W(e)||0,p(n)&&(l=!!n.leading,i=(f="maxWait"in n)?z(W(n.maxWait)||0,e):i,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==u&&clearTimeout(u),s=0,r=c=o=u=void 0},y.flush=function(){return void 0===u?a:v(b())},y}function B(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Q(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function H(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,e)||Q(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(t){return function(t){if(Array.isArray(t))return Y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Q(t)||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 Q(t,e){if(t){if("string"==typeof t)return Y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(t,e):void 0}}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function X(t){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(t)}function J(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */J=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),u=new L(o||[]);return r(a,"_invoke",{value:k(t,n,u)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function d(){}function p(){}function h(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(C([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=h.prototype=d.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(r,i,a,u){var c=l(t[r],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==X(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function k(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=_(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function C(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=h,r(y,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),c(y,u,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=C,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Z(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function tt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Z(i,r,o,a,u,"next",t)}function u(t){Z(i,r,o,a,u,"throw",t)}a(void 0)}))}}function et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,it(r.key),r)}}function rt(t,e,n){return e&&nt(t.prototype,e),n&&nt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ot(t,e,n){return(e=it(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function it(t){var e=function(t,e){if("object"!==X(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===X(e)?e:String(e)}var at=function(){function t(e,n,r,i,a){var u=this;et(this,t),ot(this,"_disposables",[]),ot(this,"_contentListener",Object.create(null)),ot(this,"_configurationListener",Object.create(null)),ot(this,"_schemaListener",Object.create(null)),ot(this,"_cursorListener",Object.create(null)),ot(this,"_debouncedValidations",Object.create(null)),this._monacoInstance=e,this._languageId=n,this._worker=r,this.defaults=i;var c,s=function(t){var e=t.getLanguageId(),n=t.uri.toString();if(e===u._languageId){var r=u.getOrCreateDebouncedValidation(t,e);u._contentListener[n]=t.onDidChangeContent((function(t){var e=ut(t);r(e)})),u._configurationListener[n]=u.defaults.onDidChange((function(){self.setTimeout((function(){return u._doValidate(t,e,[])}),0)})),u._schemaListener[n]=a((function(){self.setTimeout((function(){return u._doValidate(t,e,[])}),0)}))}},l=function(t){var e=t.getId();u._cursorListener[e]||(t.onDidDispose((function(){var t;null===(t=u._cursorListener[e])||void 0===t||t.dispose(),delete u._cursorListener[e]})),u._cursorListener[e]=t.onDidChangeCursorSelection((function(e){var n=t.getModel(),r=n.getLanguageId();if(r===u._languageId){var o=n.getOffsetAt(e.selection.getPosition());u.getOrCreateDebouncedValidation(n,r)([{start:o,end:o}])}})))},f=function(t){u._monacoInstance.editor.setModelMarkers(t,u._languageId,[]);var e=t.uri.toString(),n=u._contentListener[e];n&&(n.dispose(),delete u._contentListener[e]);var r=u._configurationListener[e];r&&(r.dispose(),delete u._configurationListener[e]);var o=u._schemaListener[e];o&&(o.dispose(),delete u._schemaListener[e]);var i=u._debouncedValidations[e];i&&(i.cancel(),delete u._debouncedValidations[e])};this.defaults.languageSettings.enableQuickFixes&&this._disposables.push(o.languages.registerCodeActionProvider(this._languageId,{provideCodeActions:(c=tt(J().mark((function t(e,n,r,o){var i,a,c,s;return J().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.getOffsetAt(n.getStartPosition()),a=e.getOffsetAt(n.getEndPosition()),c=r.markers.length>0,t.next=5,u.getMonacoCodeActions(e,i,a,c);case 5:return s=t.sent,t.abrupt("return",{actions:s,dispose:function(){}});case 7:case"end":return t.stop()}}),t)}))),function(t,e,n,r){return c.apply(this,arguments)})})),this._disposables.push(this._monacoInstance.editor.onDidCreateEditor(l)),this._disposables.push(this._monacoInstance.editor.onDidCreateModel(s)),this._disposables.push(this._monacoInstance.editor.onWillDisposeModel(f)),this._disposables.push(this._monacoInstance.editor.onDidChangeModelLanguage((function(t){f(t.model),s(t.model)}))),this._disposables.push({dispose:function(){for(var t in u._contentListener)u._contentListener[t].dispose();for(var e in u._cursorListener)u._cursorListener[e].dispose();for(var n in u._debouncedValidations)u._debouncedValidations[n].cancel()}}),this._monacoInstance.editor.getModels().forEach(s),this._monacoInstance.editor.getEditors().forEach(l)}var e;return rt(t,[{key:"getMonacoCodeActions",value:(e=tt(J().mark((function t(e,n,r,o){var i,a,u,c,s,l,f,d=this;return J().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=[],t.next=3,this._worker(e.uri);case 3:return a=t.sent,u=e.uri,t.next=7,a.getResultActions(u.toString(),n,r);case 7:c=t.sent,s=J().mark((function t(){var n,r,a,u,s;return J().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=c[l]).kind.includes("Extract Function")){t.next=3;break}return t.abrupt("return","continue");case 3:if("quickfix"!=(a=null!==(n=d.defaults.languageSettings.quickFixCodeActions)&&void 0!==n&&n.find((function(t){return r.kind.includes(t)}))?"quickfix":"custom")||o){t.next=6;break}return t.abrupt("return",{v:void 0});case 6:u=r.changes,s=u.map((function(t){var n,r=e.getPositionAt(t.start),o=e.getPositionAt(t.start+t.deleteLength);return{resource:e.uri,textEdit:{range:{startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:o.lineNumber,endColumn:o.column},text:null!==(n=t.insertText)&&void 0!==n?n:""}}})),i.push({title:r.title,diagnostics:[],kind:a,edit:{edits:$(s)}});case 9:case"end":return t.stop()}}),t)})),l=0;case 10:if(!(l<c.length)){t.next=20;break}return t.delegateYield(s(),"t0",12);case 12:if("continue"!==(f=t.t0)){t.next=15;break}return t.abrupt("continue",17);case 15:if("object"!==X(f)){t.next=17;break}return t.abrupt("return",f.v);case 17:l++,t.next=10;break;case 20:return t.abrupt("return",i);case 21:case"end":return t.stop()}}),t,this)}))),function(t,n,r,o){return e.apply(this,arguments)})},{key:"getOrCreateDebouncedValidation",value:function(t,e){var n=this,r=t.uri.toString();return this._debouncedValidations[r]||(this._debouncedValidations[r]=U((function(r){return n._doValidate(t,e,r)}),500)),this._debouncedValidations[r]}},{key:"dispose",value:function(){this._disposables.forEach((function(t){return t&&t.dispose()})),this._disposables=[]}},{key:"_doValidate",value:function(t,e,n){var r=this;if(!t.isDisposed()){var i=t.uri,a=t.getVersionId();this._worker(i).then((function(t){return t.doValidation(i.toString(),n)})).then((function(t){if(r._monacoInstance.editor.getModel(i).getVersionId()===a){var n=t.map((function(t){return n="number"==typeof(e=t).code?String(e.code):e.code,{severity:ct(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:n,source:e.source};var e,n})),u=r._monacoInstance.editor.getModel(i),c=u.getAllDecorations().filter((function(t){return"squiggly-error"==t.options.className})).map((function(t){return t.id}));if(u&&u.getLanguageId()===e){var s=r.defaults.languageSettings.syntaxErrorAsMarkDown;if(s&&s.enableSyntaxErrorAsMarkDown){var l=s.header?"**".concat(s.header,"** \n\n"):"",f=s.icon?""):"",d="".concat(f," ").concat(l),p=n.map((function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn},options:{hoverMessage:{value:d+t.message},className:"squiggly-error",zIndex:100,overviewRuler:{color:"rgb(255, 18, 18, 0.7)",position:o.editor.OverviewRulerLane.Right},minimap:{color:"rgb(255, 18, 18, 0.7)",position:o.editor.MinimapPosition.Inline}}}})),h=o.editor.getModelMarkers({owner:e,resource:i});h&&h.length>0&&(c=[],r._monacoInstance.editor.setModelMarkers(u,e,[])),u.deltaDecorations(c,p)}else u.deltaDecorations(c,[]),r._monacoInstance.editor.setModelMarkers(u,e,n)}}})).then(void 0,(function(t){console.error(t)}))}}}]),t}();function ut(t){return t.changes.map((function(t){return{start:t.rangeOffset,end:t.rangeOffset+t.text.length}}))}function ct(t){switch(t){case n.DiagnosticSeverity.Error:return o.MarkerSeverity.Error;case n.DiagnosticSeverity.Warning:return o.MarkerSeverity.Warning;case n.DiagnosticSeverity.Information:return o.MarkerSeverity.Info;case n.DiagnosticSeverity.Hint:return o.MarkerSeverity.Hint;default:return o.MarkerSeverity.Info}}for(var st={PlainText:0,Comment:1,Punctuation:2,Directive:3,Literal:4,StringLiteral:5,Type:6,Column:7,Table:8,Database:9,Function:10,Parameter:11,Variable:12,Identifier:13,ClientParameter:14,QueryParameter:15,ScalarOperator:16,MathOperator:17,QueryOperator:18,Command:19,Keyword:20,MaterializedView:21,SchemaMember:22,SignatureParameter:23,Option:24},lt={},ft=0,dt=Object.entries(st);ft<dt.length;ft++){var pt=H(dt[ft],2),ht=pt[0],mt=pt[1];lt[mt]=ht}var gt={Column:"C71585",Comment:"008000",Database:"C71585",Function:"0000FF",Identifier:"000000",Keyword:"0000FF",Literal:"B22222",ScalarOperator:"0000FF",MaterializedView:"C71585",MathOperator:"000000",Command:"0000FF",Parameter:"2B91AF",PlainText:"000000",Punctuation:"000000",QueryOperator:"CC3700",QueryParameter:"CC3700",StringLiteral:"B22222",Table:"C71585",Type:"0000FF",Variable:"191970",Directive:"9400D3",ClientParameter:"b5cea8",SchemaMember:"C71585",SignatureParameter:"2B91AF",Option:"000000"},vt={Column:"4ec9b0",Comment:"6A9B34",Database:"c586c0",Function:"dcdcaa",Identifier:"d4d4d4",Keyword:"569cd6",Literal:"ce9178",ScalarOperator:"569cd6",MaterializedView:"c586c0",MathOperator:"d4d4d4",Command:"d4d4d4",Parameter:"2B91AF",PlainText:"d4d4d4",Punctuation:"d4d4d4",QueryOperator:"9cdcfe",QueryParameter:"9cdcfe",StringLiteral:"ce9178",Table:"c586c0",Type:"569cd6",Variable:"d7ba7d",Directive:"b5cea8",ClientParameter:"b5cea8",SchemaMember:"4ec9b0",SignatureParameter:"2B91AF",Option:"d4d4d4"},yt=function(){function t(e,n,r,o,i){var a,u,c,s=this;et(this,t),ot(this,"_disposables",[]),ot(this,"_contentListener",Object.create(null)),ot(this,"_configurationListener",Object.create(null)),ot(this,"_schemaListener",Object.create(null)),ot(this,"decorations",[]),this._monacoInstance=e,this._languageId=n,this._worker=r,a=document.getElementsByTagName("head")[0],(u=document.createElement("style")).type="text/css",u.media="screen",a.appendChild(u),u.innerHTML=(c=Object.keys(st).map((function(t){return{classification:t,colorLight:gt[t],colorDark:vt[t]}})),c).map((function(t){return".vs .".concat(t.classification," {color: #").concat(t.colorLight,";} .vs-dark .").concat(t.classification," {color: #").concat(t.colorDark,";}")})).join("\n");var l=function(t){var e=t.getLanguageId();if(e===s._languageId){var n=U((function(n){return s._doColorization(t,e,n)}),500);s._contentListener[t.uri.toString()]=t.onDidChangeContent((function(t){var e=ut(t);n(e)})),s._configurationListener[t.uri.toString()]=o.onDidChange((function(){self.setTimeout((function(){return s._doColorization(t,e,[])}),0)})),s._schemaListener[t.uri.toString()]=i((function(){self.setTimeout((function(){return s._doColorization(t,e,[])}),0)}))}},f=function(t){t.deltaDecorations(s.decorations,[]);var e=t.uri.toString(),n=s._contentListener[e];n&&(n.dispose(),delete s._contentListener[e]);var r=s._configurationListener[e];r&&(r.dispose(),delete s._configurationListener[e]);var o=s._configurationListener[e];o&&(o.dispose(),delete s._schemaListener[e])};this._disposables.push(this._monacoInstance.editor.onDidCreateModel(l)),this._disposables.push(this._monacoInstance.editor.onWillDisposeModel(f)),this._disposables.push(this._monacoInstance.editor.onDidChangeModelLanguage((function(t){f(t.model),l(t.model)}))),this._disposables.push({dispose:function(){for(var t in s._contentListener)s._contentListener[t].dispose()}}),this._monacoInstance.editor.getModels().forEach(l)}return rt(t,[{key:"dispose",value:function(){this._disposables.forEach((function(t){return t&&t.dispose()})),this._disposables=[]}},{key:"_rangeDoesNotIntersectAny",value:function(t,e){return e.every((function(e){return t.startLineNumber>e.lastImpactedLine||t.endLineNumber<e.firstImpactedLine}))}},{key:"_doColorization",value:function(t,e,n){var r=this;if(!t.isDisposed()){var i=t.uri,a=t.getVersionId();this._worker(i).then((function(t){return t.doColorization(i.toString(),n)})).then((function(n){if(r._monacoInstance.editor.getModel(t.uri).getVersionId()===a){var i=n.map((function(e){var n=e.classifications.map((function(e){return function(t,e){var n=t.getPositionAt(e.start),r=t.getPositionAt(e.start+e.length),i=new o.Range(n.lineNumber,n.column,r.lineNumber,r.column),a=lt[e.kind];return{range:i,options:{inlineClassName:a,stickiness:o.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}}(t,e)})).filter((function(t){return"PlainText"!==t.options.inlineClassName&&"Identifier"!=t.options.inlineClassName})),r=t.getPositionAt(e.absoluteStart).lineNumber,i=t.getPositionAt(e.absoluteEnd);return{decorations:n,firstImpactedLine:r,lastImpactedLine:1==i.column&&i.lineNumber>1?i.lineNumber-1:i.lineNumber}})),u=i.map((function(e){return t.getLinesDecorations(e.firstImpactedLine,e.lastImpactedLine).filter((function(t){return gt[t.options.inlineClassName]})).map((function(t){return t.id}))})).reduce((function(t,e){return t.concat(e)}),[]),c=i.reduce((function(t,e){return t.concat(e.decorations)}),[]);t&&t.getLanguageId()===e&&(r.decorations=t.deltaDecorations(u,c))}})).then(void 0,(function(t){console.error(t)}))}}}]),t}();function bt(t){if(t)return{character:t.column-1,line:t.lineNumber-1}}function wt(t){if(t)return new o.Range(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function kt(t){var e=o.languages.CompletionItemKind;switch(t){case n.CompletionItemKind.Text:return e.Text;case n.CompletionItemKind.Method:return e.Method;case n.CompletionItemKind.Function:return e.Function;case n.CompletionItemKind.Constructor:return e.Constructor;case n.CompletionItemKind.Field:return e.Field;case n.CompletionItemKind.Variable:return e.Variable;case n.CompletionItemKind.Class:return e.Class;case n.CompletionItemKind.Interface:return e.Interface;case n.CompletionItemKind.Module:return e.Module;case n.CompletionItemKind.Property:return e.Property;case n.CompletionItemKind.Unit:return e.Unit;case n.CompletionItemKind.Value:return e.Value;case n.CompletionItemKind.Enum:return e.Enum;case n.CompletionItemKind.Keyword:return e.Keyword;case n.CompletionItemKind.Snippet:return e.Snippet;case n.CompletionItemKind.Color:return e.Color;case n.CompletionItemKind.File:return e.File;case n.CompletionItemKind.Reference:return e.Reference}return e.Property}function _t(t){if(t)return{range:wt(t.range),text:t.newText}}var St=function(){function t(e,n){et(this,t),this._worker=e,this.languageSettings=n}return rt(t,[{key:"triggerCharacters",get:function(){return[" "]}},{key:"provideCompletionItems",value:function(t,e,r,i){var a=this,u=t.getWordUntilPosition(e),c=new o.Range(e.lineNumber,u.startColumn,e.lineNumber,u.endColumn),s=t.uri,l=this.languageSettings.onDidProvideCompletionItems;return this._worker(s).then((function(t){return t.doComplete(s.toString(),bt(e))})).then((function(t){return l?l(t):t})).then((function(t){if(t){var e=t.items.map((function(t){var e,r={label:t.label,insertText:t.insertText,sortText:t.sortText,filterText:t.filterText,documentation:a.formatDocLink(null===(e=t.documentation)||void 0===e?void 0:e.value),detail:t.detail,range:c,kind:kt(t.kind)};return t.textEdit&&(r.range=wt(t.textEdit.range),r.insertText=t.textEdit.newText),t.insertTextFormat===n.InsertTextFormat.Snippet&&(r.insertTextRules=o.languages.CompletionItemInsertTextRule.InsertAsSnippet),r}));return{isIncomplete:t.isIncomplete,suggestions:e}}}))}},{key:"formatDocLink",value:function(t){if(t){var e=this.languageSettings,n=e.documentationBaseUrl,r=void 0===n?"https://learn.microsoft.com/azure/data-explorer/kusto/query":n,i=e.documentationSuffix;return{value:t,isTrusted:!0,uris:new Proxy({},{get:function(t,e,n){var a=e.toString().replace(".md","");a.startsWith("https")||(a="".concat(r,"/").concat(a));var u=o.Uri.parse(a);return i&&(u.toString=function(){return a+i}),u}})}}}}]),t}();function xt(t){return"string"==typeof t?{value:t}:(e=t)&&"object"===X(e)&&"string"==typeof e.kind?"plaintext"===t.kind?{value:t.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:t.value}:{value:"```"+t.value+"\n"+t.value+"\n```\n"};var e}function Lt(t){if(t)return Array.isArray(t)?t.map(xt):[xt(t)]}function Ct(t){return{uri:o.Uri.parse(t.uri),range:wt(t.range)}}var It=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideDefinition",value:function(t,e,n){var r=t.uri;return this._worker(r).then((function(t){return t.findDefinition(r.toString(),bt(e))})).then((function(t){if(t&&0!=t.length)return[Ct(t[0])]}))}}]),t}(),Ot=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideReferences",value:function(t,e,n,r){var o=t.uri;return this._worker(o).then((function(t){return t.findReferences(o.toString(),bt(e))})).then((function(t){if(t)return t.map(Ct)}))}}]),t}();var jt=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideRenameEdits",value:function(t,e,n,r){var i=t.uri;return this._worker(i).then((function(t){return t.doRename(i.toString(),bt(e),n)})).then((function(t){return function(t){if(t&&t.changes){var e=[];for(var n in t.changes){var r,i=o.Uri.parse(n),a=B(t.changes[n]);try{for(a.s();!(r=a.n()).done;){var u=r.value;e.push({resource:i,textEdit:{range:wt(u.range),text:u.newText},versionId:void 0})}}catch(t){a.e(t)}finally{a.f()}}return{edits:e}}}(t)}))}}]),t}(),Pt=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideDocumentFormattingEdits",value:function(t,e,n){var r=t.uri;return this._worker(r).then((function(t){return t.doDocumentFormat(r.toString()).then((function(t){return t.map((function(t){return _t(t)}))}))}))}}]),t}(),Et=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideDocumentRangeFormattingEdits",value:function(t,e,n,r){var o=t.uri;return this._worker(o).then((function(t){return t.doRangeFormat(o.toString(),function(t){if(t)return{start:bt(t.getStartPosition()),end:bt(t.getEndPosition())}}(e)).then((function(t){return t.map((function(t){return _t(t)}))}))}))}}]),t}(),Tt=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideFoldingRanges",value:function(t,e,n){var r=t.uri;return this._worker(r).then((function(t){return t.doFolding(r.toString()).then((function(t){return t.map((function(t){return function(t){return{start:t.startLine+1,end:t.endLine+1,kind:o.languages.FoldingRangeKind.Region}}(t)}))}))}))}}]),t}();var Dt,At,Ft=function(){function t(e){et(this,t),this._worker=e}return rt(t,[{key:"provideHover",value:function(t,e,n){var r=t.uri;return this._worker(r).then((function(t){return t.doHover(r.toString(),bt(e))})).then((function(t){if(t)return{range:wt(t.range),contents:Lt(t.contents)}}))}}]),t}();function Mt(t){return Mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mt(t)}function Nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Vt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(n),!0).forEach((function(e){Kt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Kt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Mt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Mt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Rt(t){return function(t){if(Array.isArray(t))return qt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qt(t,e)}(t)||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 qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Wt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Wt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),u=new L(o||[]);return r(a,"_invoke",{value:k(t,n,u)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var f={};function d(){}function p(){}function h(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(C([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=h.prototype=d.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(r,i,a,u){var c=l(t[r],t,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==Mt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,u)}))}u(c.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function k(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return I()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=_(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function _(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function C(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=h,r(y,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:p,configurable:!0}),p.displayName=c(h,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(y),c(y,u,"Generator"),c(y,i,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=C,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function zt(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Gt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){zt(i,r,o,a,u,"next",t)}function u(t){zt(i,r,o,a,u,"throw",t)}a(void 0)}))}}var Ut=new Promise((function(t,e){At=t}));t.getKustoWorker=function(){return Ut.then((function(){return Dt}))},t.setupMode=function(t,e){var n,r=new o.Emitter,i=[],a=new l(e,t);i.push(a);var u=function(t){for(var e=function(){var t=Gt(Wt().mark((function t(e,n){var o;return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=n.setSchema(e),t.next=3,o.then((function(){r.fire(e)}));case 3:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return a.getLanguageServiceWorker.apply(a,Rt([t].concat(o))).then((function(t){return Vt(Vt({},t),{},{setSchema:function(n){return e(n,t)},setSchemaFromShowSchema:function(n,r,o,i,a){return Gt(Wt().mark((function u(){return Wt().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,t.normalizeSchema(n,r,o).then((function(n){(i||a)&&(n=Vt(Vt({},n),{},{globalScalarParameters:i,globalTabularParameters:a})),e(n,t)}));case 2:case"end":return u.stop()}}),u)})))()}})}))},c="kusto";return i.push(e.languages.registerCompletionItemProvider(c,new St(u,t.languageSettings))),t.languageSettings.useTokenColorization&&(n=e.languages.setMonarchTokensProvider(c,f)),t.onDidChange((function(t){t.languageSettings.useTokenColorization||void 0===n||(n.dispose(),n=void 0),t.languageSettings.useTokenColorization&&null==n&&(n=e.languages.setMonarchTokensProvider(c,f))})),i.push(new at(e,c,u,t,r.event)),i.push(new yt(e,c,u,t,r.event)),i.push(e.languages.registerDocumentRangeFormattingEditProvider(c,new Et(u))),i.push(e.languages.registerFoldingRangeProvider(c,new Tt(u))),i.push(e.languages.registerDefinitionProvider(c,new It(u))),i.push(e.languages.registerRenameProvider(c,new jt(u))),i.push(e.languages.registerReferenceProvider(c,new Ot(u))),t.languageSettings.enableHover&&i.push(e.languages.registerHoverProvider(c,new Ft(u))),e.languages.registerDocumentFormattingEditProvider(c,new Pt(u)),Dt=u,At(u),e.languages.setLanguageConfiguration(c,{folding:{offSide:!1,markers:{start:/^\s*[\r\n]/gm,end:/^\s*[\r\n]/gm}},comments:{lineComment:"//",blockComment:null}}),Dt}})); |
/*!----------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* monaco-kusto version: 7.7.1(f7f3c57600d1a3143717d12d346f874c1cd61f97) | ||
* monaco-kusto version: 7.7.2(36941000968d2e5b64053b2c801e7dd2500b0188) | ||
* Released under the MIT license | ||
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md | ||
*-----------------------------------------------------------------------------*/ | ||
define("vs/language/kusto/monaco.contribution",["require","exports","vs/editor/editor.main","./schema-36f34887"],(function(e,t,n,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=r(n);function a(e,t){for(var n=t.lineNumber-1,o=e.getModel().getLinesContent(),r=0,a=[],u=0;u<o.length;u++){if(""===o[u].trim()?a.push({commandOrdinal:r++,lineNumber:u}):a.push({commandOrdinal:r,lineNumber:u}),u>n&&r>a[n].commandOrdinal)break}var s=a[n].commandOrdinal,l=a.filter((function(e){return e.commandOrdinal===s})),c=l[0].lineNumber+1,d=l[l.length-1].lineNumber+1,g=o[d-1].length+1;return new i.Range(c,1,d,g)}function u(e){return u="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},u(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,c(o.key),o)}}function l(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}var d=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"disposables",[]),l(this,"decorations",[]),this.editor=t,this.editor.onDidChangeCursorSelection((function(e){"kusto"===n.editor.getModel().getLanguageId()&&n.highlightCommandUnderCursor(e)}))}var t,n,o;return t=e,(n=[{key:"getId",value:function(){return e.ID}},{key:"dispose",value:function(){this.disposables.forEach((function(e){return e.dispose()}))}},{key:"highlightCommandUnderCursor",value:function(t){if(t.selection.isEmpty()){var n=[{range:a(this.editor,t.selection.getStartPosition()),options:e.CURRENT_COMMAND_HIGHLIGHT}];this.decorations=this.editor.deltaDecorations(this.decorations,n)}else this.decorations=this.editor.deltaDecorations(this.decorations,[])}}])&&s(t.prototype,n),o&&s(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function g(e){return g="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},g(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,y(o.key),o)}}function m(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==g(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===g(t)?t:String(t)}l(d,"ID","editor.contrib.kustoCommandHighlighter"),l(d,"CURRENT_COMMAND_HIGHLIGHT",{className:"selectionHighlight"});var b=m((function e(t){var n,o,r,a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,r=!1,(o=y(o="actionAdded"))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,this.editor=t,t.onDidChangeCursorSelection((function(e){"kusto"===a.editor.getModel().getLanguageId()&&(a.actionAdded||(t.addAction({id:"editor.action.kusto.formatCurrentCommand",label:"Format Command Under Cursor",keybindings:[i.KeyMod.chord(i.KeyMod.CtrlCmd|i.KeyCode.KeyK,i.KeyMod.CtrlCmd|i.KeyCode.KeyF)],run:function(e){t.trigger("KustoCommandFormatter","editor.action.formatSelection",null)},contextMenuGroupId:"1_modification"}),a.actionAdded=!0))}))}));function p(e){return p="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},p(e)}function k(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,h(o.key),o)}}function h(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===p(t)?t:String(t)}function v(){return new Promise((function(e,t){C((function(n){n.getKustoWorker().then(e,t)}))}))}function C(t){new Promise((function(t,n){e(["./kustoMode"],t,n)})).then(t)}var S=new(function(){function e(t){var n,o,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,o="_onDidChange",r=new i.Emitter,(o=h(o))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,this.setLanguageSettings(t),this._workerMaxIdleTime=0}var t,n,o;return t=e,(n=[{key:"onDidChange",get:function(){return this._onDidChange.event}},{key:"languageSettings",get:function(){return this._languageSettings}},{key:"setLanguageSettings",value:function(e){this._languageSettings=e||Object.create(null),this._onDidChange.fire(this)}},{key:"setMaximumWorkerIdleTime",value:function(e){this._workerMaxIdleTime=e}},{key:"getWorkerMaxIdleTime",value:function(){return this._workerMaxIdleTime}}])&&k(t.prototype,n),o&&k(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}())({includeControlCommands:!0,newlineAfterPipe:!0,openSuggestionDialogAfterPreviousSuggestionAccepted:!0,useIntellisenseV2:!0,useSemanticColorization:!0,useTokenColorization:!1,enableHover:!0,formatter:{indentationSize:4,pipeOperatorStyle:"Smart"},syntaxErrorAsMarkDown:{enableSyntaxErrorAsMarkDown:!1},enableQueryWarnings:!1,enableQuerySuggestions:!1,disabledDiagnosticCodes:[],quickFixCodeActions:["Change to","FixAll"],enableQuickFixes:!1}),w={light:"kusto-light",dark:"kusto-dark",dark2:"kusto-dark2"};i.languages.onLanguage("kusto",(function(){C((function(e){return e.setupMode(S,i)}))})),i.languages.register({id:"kusto",extensions:[".csl",".kql"]}),i.editor.defineTheme(w.light,{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"008000"},{token:"variable.predefined",foreground:"800080"},{token:"function",foreground:"0000FF"},{token:"operator.sql",foreground:"CC3700"},{token:"string",foreground:"B22222"},{token:"operator.scss",foreground:"0000FF"},{token:"variable",foreground:"C71585"},{token:"variable.parameter",foreground:"9932CC"},{token:"",foreground:"000000"},{token:"type",foreground:"0000FF"},{token:"tag",foreground:"0000FF"},{token:"annotation",foreground:"2B91AF"},{token:"keyword",foreground:"0000FF"},{token:"number",foreground:"191970"},{token:"annotation",foreground:"9400D3"},{token:"invalid",background:"cd3131"}],colors:{}}),i.editor.defineTheme(w.dark,{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"608B4E"},{token:"variable.predefined",foreground:"4ec9b0"},{token:"function",foreground:"dcdcaa"},{token:"operator.sql",foreground:"9cdcfe"},{token:"string",foreground:"ce9178"},{token:"operator.scss",foreground:"569cd6"},{token:"variable",foreground:"4ec9b0"},{token:"variable.parameter",foreground:"c586c0"},{token:"",foreground:"d4d4d4"},{token:"type",foreground:"569cd6"},{token:"tag",foreground:"569cd6"},{token:"annotation",foreground:"9cdcfe"},{token:"keyword",foreground:"569cd6"},{token:"number",foreground:"d7ba7d"},{token:"annotation",foreground:"b5cea8"},{token:"invalid",background:"cd3131"}],colors:{}}),i.editor.defineTheme(w.dark2,{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#1B1A19","editorSuggestWidget.selectedBackground":"#004E8C"}}),i.editor.onDidCreateEditor((function(e){var t;null!==(t=window.MonacoEnvironment)&&void 0!==t&&t.globalAPI&&function(e){Object.getPrototypeOf(e).getCurrentCommandRange=function(e){a(this,e)}}(e),new d(e),function(e){return void 0!==e.addAction}(e)&&new b(e),function(e){e.onDidChangeCursorSelection((function(t){if(S&&S.languageSettings&&S.languageSettings.openSuggestionDialogAfterPreviousSuggestionAccepted){if(!("snippet"===t.source&&t.reason===i.editor.CursorChangeReason.NotSet)||null!==e.getModel().getWordAtPosition(t.selection.getPosition()))return;t.selection,setTimeout((function(){return e.trigger("monaco-kusto","editor.action.triggerSuggest",{})}),10)}}))}(e)}));var T={getCslTypeNameFromClrType:o.getCslTypeNameFromClrType,getCallName:o.getCallName,getExpression:o.getExpression,getInputParametersAsCslString:o.getInputParametersAsCslString,getEntityDataTypeFromCslType:o.getEntityDataTypeFromCslType,kustoDefaults:S,getKustoWorker:v,getCurrentCommandRange:a,themeNames:w};i.languages.kusto=T,t.getCallName=o.getCallName,t.getCslTypeNameFromClrType=o.getCslTypeNameFromClrType,t.getEntityDataTypeFromCslType=o.getEntityDataTypeFromCslType,t.getExpression=o.getExpression,t.getInputParametersAsCslString=o.getInputParametersAsCslString,Object.defineProperty(t,"showSchema",{enumerable:!0,get:function(){return o.showSchema}}),t.getCurrentCommandRange=a,t.getKustoWorker=v,t.kustoDefaults=S,t.themeNames=w})); | ||
define("vs/language/kusto/monaco.contribution",["require","exports","vs/editor/editor.main","./schema-debb9db9"],(function(e,t,n,o){"use strict";function r(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=r(n);function a(e,t){for(var n=t.lineNumber-1,o=e.getModel().getLinesContent(),r=0,a=[],u=0;u<o.length;u++){if(""===o[u].trim()?a.push({commandOrdinal:r++,lineNumber:u}):a.push({commandOrdinal:r,lineNumber:u}),u>n&&r>a[n].commandOrdinal)break}var s=a[n].commandOrdinal,l=a.filter((function(e){return e.commandOrdinal===s})),c=l[0].lineNumber+1,d=l[l.length-1].lineNumber+1,g=o[d-1].length+1;return new i.Range(c,1,d,g)}function u(e){return u="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},u(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,c(o.key),o)}}function l(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==u(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}var d=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,"disposables",[]),l(this,"decorations",[]),this.editor=t,this.editor.onDidChangeCursorSelection((function(e){"kusto"===n.editor.getModel().getLanguageId()&&n.highlightCommandUnderCursor(e)}))}var t,n,o;return t=e,(n=[{key:"getId",value:function(){return e.ID}},{key:"dispose",value:function(){this.disposables.forEach((function(e){return e.dispose()}))}},{key:"highlightCommandUnderCursor",value:function(t){if(t.selection.isEmpty()){var n=[{range:a(this.editor,t.selection.getStartPosition()),options:e.CURRENT_COMMAND_HIGHLIGHT}];this.decorations=this.editor.deltaDecorations(this.decorations,n)}else this.decorations=this.editor.deltaDecorations(this.decorations,[])}}])&&s(t.prototype,n),o&&s(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function g(e){return g="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},g(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,y(o.key),o)}}function m(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==g(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===g(t)?t:String(t)}l(d,"ID","editor.contrib.kustoCommandHighlighter"),l(d,"CURRENT_COMMAND_HIGHLIGHT",{className:"selectionHighlight"});var b=m((function e(t){var n,o,r,a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,r=!1,(o=y(o="actionAdded"))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,this.editor=t,t.onDidChangeCursorSelection((function(e){"kusto"===a.editor.getModel().getLanguageId()&&(a.actionAdded||(t.addAction({id:"editor.action.kusto.formatCurrentCommand",label:"Format Command Under Cursor",keybindings:[i.KeyMod.chord(i.KeyMod.CtrlCmd|i.KeyCode.KeyK,i.KeyMod.CtrlCmd|i.KeyCode.KeyF)],run:function(e){t.trigger("KustoCommandFormatter","editor.action.formatSelection",null)},contextMenuGroupId:"1_modification"}),a.actionAdded=!0))}))}));function p(e){return p="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},p(e)}function k(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,h(o.key),o)}}function h(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!==p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===p(t)?t:String(t)}function v(){return new Promise((function(e,t){C((function(n){n.getKustoWorker().then(e,t)}))}))}function C(t){new Promise((function(t,n){e(["./kustoMode"],t,n)})).then(t)}var S=new(function(){function e(t){var n,o,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,o="_onDidChange",r=new i.Emitter,(o=h(o))in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,this.setLanguageSettings(t),this._workerMaxIdleTime=0}var t,n,o;return t=e,(n=[{key:"onDidChange",get:function(){return this._onDidChange.event}},{key:"languageSettings",get:function(){return this._languageSettings}},{key:"setLanguageSettings",value:function(e){this._languageSettings=e||Object.create(null),this._onDidChange.fire(this)}},{key:"setMaximumWorkerIdleTime",value:function(e){this._workerMaxIdleTime=e}},{key:"getWorkerMaxIdleTime",value:function(){return this._workerMaxIdleTime}}])&&k(t.prototype,n),o&&k(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}())({includeControlCommands:!0,newlineAfterPipe:!0,openSuggestionDialogAfterPreviousSuggestionAccepted:!0,useIntellisenseV2:!0,useSemanticColorization:!0,useTokenColorization:!1,enableHover:!0,formatter:{indentationSize:4,pipeOperatorStyle:"Smart"},syntaxErrorAsMarkDown:{enableSyntaxErrorAsMarkDown:!1},enableQueryWarnings:!1,enableQuerySuggestions:!1,disabledDiagnosticCodes:[],quickFixCodeActions:["Change to","FixAll"],enableQuickFixes:!1}),w={light:"kusto-light",dark:"kusto-dark",dark2:"kusto-dark2"};i.languages.onLanguage("kusto",(function(){C((function(e){return e.setupMode(S,i)}))})),i.languages.register({id:"kusto",extensions:[".csl",".kql"]}),i.editor.defineTheme(w.light,{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"008000"},{token:"variable.predefined",foreground:"800080"},{token:"function",foreground:"0000FF"},{token:"operator.sql",foreground:"CC3700"},{token:"string",foreground:"B22222"},{token:"operator.scss",foreground:"0000FF"},{token:"variable",foreground:"C71585"},{token:"variable.parameter",foreground:"9932CC"},{token:"",foreground:"000000"},{token:"type",foreground:"0000FF"},{token:"tag",foreground:"0000FF"},{token:"annotation",foreground:"2B91AF"},{token:"keyword",foreground:"0000FF"},{token:"number",foreground:"191970"},{token:"annotation",foreground:"9400D3"},{token:"invalid",background:"cd3131"}],colors:{}}),i.editor.defineTheme(w.dark,{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"608B4E"},{token:"variable.predefined",foreground:"4ec9b0"},{token:"function",foreground:"dcdcaa"},{token:"operator.sql",foreground:"9cdcfe"},{token:"string",foreground:"ce9178"},{token:"operator.scss",foreground:"569cd6"},{token:"variable",foreground:"4ec9b0"},{token:"variable.parameter",foreground:"c586c0"},{token:"",foreground:"d4d4d4"},{token:"type",foreground:"569cd6"},{token:"tag",foreground:"569cd6"},{token:"annotation",foreground:"9cdcfe"},{token:"keyword",foreground:"569cd6"},{token:"number",foreground:"d7ba7d"},{token:"annotation",foreground:"b5cea8"},{token:"invalid",background:"cd3131"}],colors:{}}),i.editor.defineTheme(w.dark2,{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#1B1A19","editorSuggestWidget.selectedBackground":"#004E8C"}}),i.editor.onDidCreateEditor((function(e){var t;null!==(t=window.MonacoEnvironment)&&void 0!==t&&t.globalAPI&&function(e){Object.getPrototypeOf(e).getCurrentCommandRange=function(e){a(this,e)}}(e),new d(e),function(e){return void 0!==e.addAction}(e)&&new b(e),function(e){e.onDidChangeCursorSelection((function(t){if(S&&S.languageSettings&&S.languageSettings.openSuggestionDialogAfterPreviousSuggestionAccepted){if(!("snippet"===t.source&&t.reason===i.editor.CursorChangeReason.NotSet)||null!==e.getModel().getWordAtPosition(t.selection.getPosition()))return;t.selection,setTimeout((function(){return e.trigger("monaco-kusto","editor.action.triggerSuggest",{})}),10)}}))}(e)}));var T={getCslTypeNameFromClrType:o.getCslTypeNameFromClrType,getCallName:o.getCallName,getExpression:o.getExpression,getInputParametersAsCslString:o.getInputParametersAsCslString,getEntityDataTypeFromCslType:o.getEntityDataTypeFromCslType,kustoDefaults:S,getKustoWorker:v,getCurrentCommandRange:a,themeNames:w};i.languages.kusto=T,t.getCallName=o.getCallName,t.getCslTypeNameFromClrType=o.getCslTypeNameFromClrType,t.getEntityDataTypeFromCslType=o.getEntityDataTypeFromCslType,t.getExpression=o.getExpression,t.getInputParametersAsCslString=o.getInputParametersAsCslString,Object.defineProperty(t,"showSchema",{enumerable:!0,get:function(){return o.showSchema}}),t.getCurrentCommandRange=a,t.getKustoWorker=v,t.kustoDefaults=S,t.themeNames=w})); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
16887663
47103