-
Notifications
You must be signed in to change notification settings - Fork 0
/
json.worker.js
7 lines (7 loc) Β· 188 KB
/
json.worker.js
1
2
3
4
5
6
7
(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s="f19f")})({"30db":function(e,t,n){"use strict";(function(e,r){n.d(t,"c",function(){return g}),n.d(t,"b",function(){return v}),n.d(t,"a",function(){return b});var i="en",o=!1,s=!1,a=!1,u=!1,c=!1,l=void 0,f="undefined"!==typeof e&&"undefined"!==typeof e.versions&&"undefined"!==typeof e.versions.electron&&"renderer"===e.type;if("object"!==typeof navigator||f){if("object"===typeof e){o="win32"===e.platform,s="darwin"===e.platform,a="linux"===e.platform,l=i,i;var h=Object({NODE_ENV:"production",BASE_URL:"/"})["VSCODE_NLS_CONFIG"];if(h)try{var d=JSON.parse(h),p=d.availableLanguages["*"];l=d.locale,p||i,d._translationsConfigFile}catch(_){}u=!0}}else{var m=navigator.userAgent;o=m.indexOf("Windows")>=0,s=m.indexOf("Macintosh")>=0,a=m.indexOf("Linux")>=0,c=!0,l=navigator.language,l}var g=o,v=c,y="object"===typeof self?self:"object"===typeof r?r:{},b=y}).call(this,n("4362"),n("c8ba"))},4362:function(e,t,n){t.nextTick=function(e){setTimeout(e,0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,r="/";t.cwd=function(){return r},t.chdir=function(t){e||(e=n("df7c")),r=e.resolve(t,r)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},5110:function(e,t,n){(function(e){
/*!
Copyright (c) 2014 Taylor Hakes
Copyright (c) 2014 Forbes Lindesay
*/
(function(e,t){t()})(0,function(){"use strict";function t(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})}var n=setTimeout;function r(){}function i(e,t){return function(){e.apply(t,arguments)}}function o(e){if(!(this instanceof o))throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],f(e,this)}function s(e,t){while(3===e._state)e=e._value;0!==e._state?(e._handled=!0,o._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(i){return void u(t.promise,i)}a(t.promise,r)}else(1===e._state?a:u)(t.promise,e._value)})):e._deferreds.push(t)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===typeof t||"function"===typeof t)){var n=t.then;if(t instanceof o)return e._state=3,e._value=t,void c(e);if("function"===typeof n)return void f(i(n,t),e)}e._state=1,e._value=t,c(e)}catch(r){u(e,r)}}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&o._immediateFn(function(){e._handled||o._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)s(e,e._deferreds[t]);e._deferreds=null}function l(e,t,n){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.promise=n}function f(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,u(t,e))})}catch(r){if(n)return;n=!0,u(t,r)}}o.prototype["catch"]=function(e){return this.then(null,e)},o.prototype.then=function(e,t){var n=new this.constructor(r);return s(this,new l(e,t,n)),n},o.prototype["finally"]=t,o.all=function(e){return new o(function(t,n){if(!e||"undefined"===typeof e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var i=r.length;function o(e,s){try{if(s&&("object"===typeof s||"function"===typeof s)){var a=s.then;if("function"===typeof a)return void a.call(s,function(t){o(e,t)},n)}r[e]=s,0===--i&&t(r)}catch(u){n(u)}}for(var s=0;s<r.length;s++)o(s,r[s])})},o.resolve=function(e){return e&&"object"===typeof e&&e.constructor===o?e:new o(function(t){t(e)})},o.reject=function(e){return new o(function(t,n){n(e)})},o.race=function(e){return new o(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},o._immediateFn="function"===typeof setImmediate&&function(e){setImmediate(e)}||function(e){n(e,0)},o._unhandledRejectionFn=function(e){"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var h=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw new Error("unable to locate global object")}();"Promise"in h?h.Promise.prototype["finally"]||(h.Promise.prototype["finally"]=t):h["Promise"]=o})}).call(this,n("c8ba"))},c623:function(e,t,n){"use strict";(function(e){var n,r=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();if("object"===typeof e)n="win32"===e.platform;else if("object"===typeof navigator){var i=navigator.userAgent;n=i.indexOf("Windows")>=0}var o=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function u(e){if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function c(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==f&&(t=f+t):t=f;break}return t}var l="",f="/",h=/^(([^:\/?#]+?):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,d=function(){function e(e,t,n,r,i){"object"===typeof e?(this.scheme=e.scheme||l,this.authority=e.authority||l,this.path=e.path||l,this.query=e.query||l,this.fragment=e.fragment||l):(this.scheme=e||l,this.authority=t||l,this.path=c(this.scheme,n||l),this.query=r||l,this.fragment=i||l,u(this))}return e.isUri=function(t){return t instanceof e||!!t&&("string"===typeof t.authority&&"string"===typeof t.fragment&&"string"===typeof t.path&&"string"===typeof t.query&&"string"===typeof t.scheme)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return b(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=l),void 0===n?n=this.authority:null===n&&(n=l),void 0===r?r=this.path:null===r&&(r=l),void 0===i?i=this.query:null===i&&(i=l),void 0===o?o=this.fragment:null===o&&(o=l),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new m(t,n,r,i,o)},e.parse=function(e){var t=h.exec(e);return t?new m(t[2]||l,decodeURIComponent(t[4]||l),decodeURIComponent(t[5]||l),decodeURIComponent(t[7]||l),decodeURIComponent(t[9]||l)):new m(l,l,l,l,l)},e.file=function(e){var t=l;if(n&&(e=e.replace(/\\/g,f)),e[0]===f&&e[1]===f){var r=e.indexOf(f,2);-1===r?(t=e.substring(2),e=f):(t=e.substring(2,r),e=e.substring(r)||f)}return new m("file",t,e,l,l)},e.from=function(e){return new m(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),_(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new m(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();t["a"]=d;var p,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return r(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=b(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(d),g=(p={},p[58]="%3A",p[47]="%2F",p[63]="%3F",p[35]="%23",p[91]="%5B",p[93]="%5D",p[64]="%40",p[33]="%21",p[36]="%24",p[38]="%26",p[39]="%27",p[40]="%28",p[41]="%29",p[42]="%2A",p[43]="%2B",p[44]="%2C",p[59]="%3B",p[61]="%3D",p[32]="%20",p);function v(e,t){for(var n=void 0,r=-1,i=0;i<e.length;i++){var o=e.charCodeAt(i);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var s=g[o];void 0!==s?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=s):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function y(e){for(var t=void 0,n=0;n<e.length;n++){var r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=g[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function b(e){var t;return t=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,n&&(t=t.replace(/\//g,"\\")),t}function _(e,t){var n=t?y:v,r="",i=e.scheme,o=e.authority,s=e.path,a=e.query,u=e.fragment;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=f,r+=f),o){var c=o.indexOf("@");if(-1!==c){var l=o.substr(0,c);o=o.substr(c+1),c=l.indexOf(":"),-1===c?r+=n(l,!1):(r+=n(l.substr(0,c),!1),r+=":",r+=n(l.substr(c+1),!1)),r+="@"}o=o.toLowerCase(),c=o.indexOf(":"),-1===c?r+=n(o,!1):(r+=n(o.substr(0,c),!1),r+=o.substr(c))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){var h=s.charCodeAt(1);h>=65&&h<=90&&(s="/"+String.fromCharCode(h+32)+":"+s.substr(3))}else if(s.length>=2&&58===s.charCodeAt(1)){h=s.charCodeAt(0);h>=65&&h<=90&&(s=String.fromCharCode(h+32)+":"+s.substr(2))}r+=n(s,!0)}return a&&(r+="?",r+=n(a,!1)),u&&(r+="#",r+=t?u:v(u,!1)),r}}).call(this,n("4362"))},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},df7c:function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return r.exec(e).slice(1)};function o(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",r=!1,i=arguments.length-1;i>=-1&&!r;i--){var s=i>=0?arguments[i]:e.cwd();if("string"!==typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,r="/"===s.charAt(0))}return t=n(o(t.split("/"),function(e){return!!e}),!r).join("/"),(r?"/":"")+t||"."},t.normalize=function(e){var r=t.isAbsolute(e),i="/"===s(e,-1);return e=n(o(e.split("/"),function(e){return!!e}),!r).join("/"),e||r||(e="."),e&&i&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length;t++)if(""!==e[t])break;for(var n=e.length-1;n>=0;n--)if(""!==e[n])break;return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),s=Math.min(i.length,o.length),a=s,u=0;u<s;u++)if(i[u]!==o[u]){a=u;break}var c=[];for(u=a;u<i.length;u++)c.push("..");return c=c.concat(o.slice(a)),c.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var t=i(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},t.basename=function(e,t){var n=i(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){return i(e)[3]};var s="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n("4362"))},f19f:function(e,t,n){"use strict";n.r(t);var r=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.emit=function(e){this.listeners.forEach(function(t){t(e)})},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}(),i=new r;function o(e){u(e)||i.onUnexpectedError(e)}function s(e){if(e instanceof Error){var t=e.name,n=e.message,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r}}return e}var a="Canceled";function u(e){return e instanceof Error&&e.name===a&&e.message===a}function c(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")}function l(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Array.isArray(e)?(e.forEach(function(e){return e&&e.dispose()}),[]):0===t.length?e?(e.dispose(),e):void 0:(l(e),l(t),[])}function f(e){return{dispose:function(){return l(e)}}}function h(e){return{dispose:function(){e()}}}var d=function(){function e(){this._toDispose=[],this._lifecycle_disposable_isDisposed=!1}return e.prototype.dispose=function(){this._lifecycle_disposable_isDisposed=!0,this._toDispose=l(this._toDispose)},e.prototype._register=function(e){return this._lifecycle_disposable_isDisposed?(console.warn("Registering disposable on object that has already been disposed."),e.dispose()):this._toDispose.push(e),e},e.None=Object.freeze({dispose:function(){}}),e}(),p=(function(){function e(e){this.object=e}e.prototype.dispose=function(){}}(),n("30db"));Object.prototype.hasOwnProperty;function m(e){var t=[],n=Object.getPrototypeOf(e);while(Object.prototype!==n)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}var g=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v="$initialize";var y=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var n=this,r=String(++this._lastSentReq);return new Promise(function(i,o){n._pendingReplies[r]={resolve:i,reject:o},n._send({vsWorker:n._workerId,req:r,method:e,args:t})})},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(n){return}t&&t.vsWorker&&(-1!==this._workerId&&t.vsWorker!==this._workerId||this._handleMessage(t))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var n=e;if(!this._pendingReplies[n.seq])return void console.warn("Got reply to unknown seq");var r=this._pendingReplies[n.seq];if(delete this._pendingReplies[n.seq],n.err){var i=n.err;return n.err.$isError&&(i=new Error,i.name=n.err.name,i.message=n.err.message,i.stack=n.err.stack),void r.reject(i)}r.resolve(n.res)}else{var o=e,a=o.req,u=this._handler.handleMessage(o.method,o.args);u.then(function(e){t._send({vsWorker:t._workerId,seq:a,res:e,err:void 0})},function(e){e.detail instanceof Error&&(e.detail=s(e.detail)),t._send({vsWorker:t._workerId,seq:a,res:void 0,err:s(e)})})}},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t)},e}(),b=(function(e){function t(t,n){var r=e.call(this)||this,i=null;r._worker=r._register(t.create("vs/base/common/worker/simpleWorker",function(e){r._protocol.handleMessage(e)},function(e){i&&i(e)})),r._protocol=new y({sendMessage:function(e){r._worker.postMessage(e)},handleMessage:function(e,t){return Promise.resolve(null)}}),r._protocol.setWorkerId(r._worker.getId());var o=null;"undefined"!==typeof self.require&&"function"===typeof self.require.getConfig?o=self.require.getConfig():"undefined"!==typeof self.requirejs&&(o=self.requirejs.s.contexts._.config),r._onModuleLoaded=r._protocol.sendMessage(v,[r._worker.getId(),n,o]),r._lazyProxy=new Promise(function(e,t){i=t,r._onModuleLoaded.then(function(t){for(var n={},r=0,i=t;r<i.length;r++){var o=i[r];n[o]=a(o,s)}e(n)},function(e){t(e),r._onError("Worker failed to load "+n,e)})});var s=function(e,t){return r._request(e,t)},a=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}};return r}g(t,e),t.prototype.getProxyObject=function(){return this._lazyProxy},t.prototype._request=function(e,t){var n=this;return new Promise(function(r,i){n._onModuleLoaded.then(function(){n._protocol.sendMessage(e,t).then(r,i)},i)})},t.prototype._onError=function(e,t){console.error(e),console.info(t)}}(d),function(){function e(e,t){var n=this;this._requestHandler=t,this._protocol=new y({sendMessage:function(t){e(t)},handleMessage:function(e,t){return n._handleMessage(e,t)}})}return e.prototype.onmessage=function(e){this._protocol.handleMessage(e)},e.prototype._handleMessage=function(e,t){if(e===v)return this.initialize(t[0],t[1],t[2]);if(!this._requestHandler||"function"!==typeof this._requestHandler[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,t))}catch(n){return Promise.reject(n)}},e.prototype.initialize=function(e,t,n){var r=this;if(this._protocol.setWorkerId(e),this._requestHandler){for(var i=[],o=0,s=m(this._requestHandler);o<s.length;o++){var a=s[o];"function"===typeof this._requestHandler[a]&&i.push(a)}return Promise.resolve(i)}return n&&("undefined"!==typeof n.baseUrl&&delete n["baseUrl"],"undefined"!==typeof n.paths&&"undefined"!==typeof n.paths.vs&&delete n.paths["vs"],n.catchError=!0,self.require.config(n)),new Promise(function(e,n){self.require([t],function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var o=t[0];if(r._requestHandler=o.create(),r._requestHandler){for(var s=[],a=0,u=m(r._requestHandler);a<u.length;a++){var c=u[a];"function"===typeof r._requestHandler[c]&&s.push(c)}e(s)}else n(new Error("No RequestHandler!"))},n)})},e}());function _(e,t){return S(e,t,0,e.length-1,[]),e}function C(e,t,n,r,i,o){for(var s=n,a=r+1,u=n;u<=i;u++)o[u]=e[u];for(u=n;u<=i;u++)s>r?e[u]=o[a++]:a>i?e[u]=o[s++]:t(o[a],o[s])<0?e[u]=o[a++]:e[u]=o[s++]}function S(e,t,n,r,i){if(!(r<=n)){var o=n+(r-n)/2|0;S(e,t,n,o,i),S(e,t,o+1,r,i),t(e[o],e[o+1])<=0||C(e,t,n,o,r,i)}}var E=function(){function e(e,t,n,r){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=r}return e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}();function x(e){return{getLength:function(){return e.length},getElementAtIndex:function(t){return e.charCodeAt(t)}}}function N(e,t,n){return new O(x(e),x(t)).ComputeDiff(n)}var w,A=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}(),L=function(){function e(){}return e.Copy=function(e,t,n,r,i){for(var o=0;o<i;o++)n[r+o]=e[t+o]},e}(),k=1447,T=function(){function e(){this.m_changes=[],this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE,this.m_originalCount=0,this.m_modifiedCount=0}return e.prototype.MarkNextChange=function(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new E(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),O=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t)},e.prototype.ModifiedElementsAreEqual=function(e,t){return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e)},e.prototype._ComputeDiff=function(e,t,n,r,i){var o=[!1],s=this.ComputeDiffRecursive(e,t,n,r,o);return i?this.PrettifyChanges(s):s},e.prototype.ComputeDiffRecursive=function(e,t,n,r,i){i[0]=!1;while(e<=t&&n<=r&&this.ElementsAreEqual(e,n))e++,n++;while(t>=e&&r>=n&&this.ElementsAreEqual(t,r))t--,r--;if(e>t||n>r){var o=void 0;return n<=r?(A.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new E(e,0,n,r-n+1)]):e<=t?(A.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[new E(e,t-e+1,n,0)]):(A.Assert(e===t+1,"originalStart should only be one more than originalEnd"),A.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}var s=[0],a=[0],u=this.ComputeRecursionPoint(e,t,n,r,s,a,i),c=s[0],l=a[0];if(null!==u)return u;if(!i[0]){var f=this.ComputeDiffRecursive(e,c,n,l,i),h=[];return h=i[0]?[new E(c+1,t-(c+1)+1,l+1,r-(l+1)+1)]:this.ComputeDiffRecursive(c+1,t,l+1,r,i),this.ConcatenateChanges(f,h)}return[new E(e,t-e+1,n,r-n+1)]},e.prototype.WALKTRACE=function(e,t,n,r,i,o,s,a,u,c,l,f,h,d,p,m,g,v){var y,b=null,_=null,C=new T,S=t,x=n,N=h[0]-m[0]-r,w=Number.MIN_VALUE,A=this.m_forwardHistory.length-1;do{y=N+e,y===S||y<x&&u[y-1]<u[y+1]?(l=u[y+1],d=l-N-r,l<w&&C.MarkNextChange(),w=l,C.AddModifiedElement(l+1,d),N=y+1-e):(l=u[y-1]+1,d=l-N-r,l<w&&C.MarkNextChange(),w=l-1,C.AddOriginalElement(l,d+1),N=y-1-e),A>=0&&(u=this.m_forwardHistory[A],e=u[0],S=1,x=u.length-1)}while(--A>=-1);if(b=C.getReverseChanges(),v[0]){var L=h[0]+1,k=m[0]+1;if(null!==b&&b.length>0){var O=b[b.length-1];L=Math.max(L,O.getOriginalEnd()),k=Math.max(k,O.getModifiedEnd())}_=[new E(L,f-L+1,k,p-k+1)]}else{C=new T,S=o,x=s,N=h[0]-m[0]-a,w=Number.MAX_VALUE,A=g?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{y=N+i,y===S||y<x&&c[y-1]>=c[y+1]?(l=c[y+1]-1,d=l-N-a,l>w&&C.MarkNextChange(),w=l+1,C.AddOriginalElement(l+1,d+1),N=y+1-i):(l=c[y-1],d=l-N-a,l>w&&C.MarkNextChange(),w=l,C.AddModifiedElement(l+1,d+1),N=y-1-i),A>=0&&(c=this.m_reverseHistory[A],i=c[0],S=1,x=c.length-1)}while(--A>=-1);_=C.getChanges()}return this.ConcatenateChanges(b,_)},e.prototype.ComputeRecursionPoint=function(e,t,n,r,i,o,s){var a,u=0,c=0,l=0,f=0,h=0,d=0;e--,n--,i[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var p,m,g=t-e+(r-n),v=g+1,y=new Array(v),b=new Array(v),_=r-n,C=t-e,S=e-n,x=t-r,N=C-_,w=N%2===0;for(y[_]=e,b[C]=t,s[0]=!1,a=1;a<=g/2+1;a++){var A=0,T=0;for(l=this.ClipDiagonalBound(_-a,a,_,v),f=this.ClipDiagonalBound(_+a,a,_,v),p=l;p<=f;p+=2){u=p===l||p<f&&y[p-1]<y[p+1]?y[p+1]:y[p-1]+1,c=u-(p-_)-S,m=u;while(u<t&&c<r&&this.ElementsAreEqual(u+1,c+1))u++,c++;if(y[p]=u,u+c>A+T&&(A=u,T=c),!w&&Math.abs(p-C)<=a-1&&u>=b[p])return i[0]=u,o[0]=c,m<=b[p]&&k>0&&a<=k+1?this.WALKTRACE(_,l,f,S,C,h,d,x,y,b,u,t,i,c,r,o,w,s):null}var O=(A-e+(T-n)-a)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(A,this.OriginalSequence,O))return s[0]=!0,i[0]=A,o[0]=T,O>0&&k>0&&a<=k+1?this.WALKTRACE(_,l,f,S,C,h,d,x,y,b,u,t,i,c,r,o,w,s):(e++,n++,[new E(e,t-e+1,n,r-n+1)]);for(h=this.ClipDiagonalBound(C-a,a,C,v),d=this.ClipDiagonalBound(C+a,a,C,v),p=h;p<=d;p+=2){u=p===h||p<d&&b[p-1]>=b[p+1]?b[p+1]-1:b[p-1],c=u-(p-C)-x,m=u;while(u>e&&c>n&&this.ElementsAreEqual(u,c))u--,c--;if(b[p]=u,w&&Math.abs(p-_)<=a&&u<=y[p])return i[0]=u,o[0]=c,m>=y[p]&&k>0&&a<=k+1?this.WALKTRACE(_,l,f,S,C,h,d,x,y,b,u,t,i,c,r,o,w,s):null}if(a<=k){var P=new Array(f-l+2);P[0]=_-l+1,L.Copy(y,l,P,1,f-l+1),this.m_forwardHistory.push(P),P=new Array(d-h+2),P[0]=C-h+1,L.Copy(b,h,P,1,d-h+1),this.m_reverseHistory.push(P)}}return this.WALKTRACE(_,l,f,S,C,h,d,x,y,b,u,t,i,c,r,o,w,s)},e.prototype.PrettifyChanges=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=t<e.length-1?e[t+1].originalStart:this.OriginalSequence.getLength(),i=t<e.length-1?e[t+1].modifiedStart:this.ModifiedSequence.getLength(),o=n.originalLength>0,s=n.modifiedLength>0;while(n.originalStart+n.originalLength<r&&n.modifiedStart+n.modifiedLength<i&&(!o||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!s||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength)))n.originalStart++,n.modifiedStart++;var a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(t=e.length-1;t>=0;t--){n=e[t],r=0,i=0;if(t>0){var u=e[t-1];u.originalLength>0&&(r=u.originalStart+u.originalLength),u.modifiedLength>0&&(i=u.modifiedStart+u.modifiedLength)}o=n.originalLength>0,s=n.modifiedLength>0;for(var c=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),f=1;;f++){var h=n.originalStart-f,d=n.modifiedStart-f;if(h<r||d<i)break;if(o&&!this.OriginalElementsAreEqual(h,h+n.originalLength))break;if(s&&!this.ModifiedElementsAreEqual(d,d+n.modifiedLength))break;var p=this._boundaryScore(h,n.originalLength,d,n.modifiedLength);p>l&&(l=p,c=f)}n.originalStart-=c,n.modifiedStart-=c}return e},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"===typeof t&&/^\s*$/.test(t)},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"===typeof t&&/^\s*$/.test(t)},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,r){var i=this._OriginalRegionIsBoundary(e,t)?1:0,o=this._ModifiedRegionIsBoundary(n,r)?1:0;return i+o},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var r=new Array(e.length+t.length-1);return L.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],L.Copy(t,1,r,e.length,t.length-1),r}r=new Array(e.length+t.length);return L.Copy(e,0,r,0,e.length),L.Copy(t,0,r,e.length,t.length),r},e.prototype.ChangesOverlap=function(e,t,n){if(A.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),A.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var r=e.originalStart,i=e.originalLength,o=e.modifiedStart,s=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(i=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(s=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new E(r,i,o,s),!0}return n[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,r){if(e>=0&&e<r)return e;var i=n,o=r-n-1,s=t%2===0;if(e<0){var a=i%2===0;return s===a?0:1}var u=o%2===0;return s===u?r-1:r-2},e}(),P=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I={done:!0,value:void 0};(function(e){var t={next:function(){return I}};function n(){return t}function r(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.length),{next:function(){return t>=n?I:{done:!1,value:e[t++]}}}}function i(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty()}function o(e,t){return{next:function(){var n=e.next();return n.done?I:{done:!1,value:t(n.value)}}}}function s(e,t){return{next:function(){while(1){var n=e.next();if(n.done)return I;if(t(n.value))return{done:!1,value:n.value}}}}}function a(e,t){for(var n=e.next();!n.done;n=e.next())t(n.value)}function u(e){var t=[];return a(e,function(e){return t.push(e)}),t}e.empty=n,e.fromArray=r,e.from=i,e.map=o,e.filter=s,e.forEach=a,e.collect=u})(w||(w={}));var M,R=function(){function e(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===r&&(r=t-1),this.items=e,this.start=t,this.end=n,this.index=r}return e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},e}(),j=(function(e){function t(t,n,r,i){return void 0===n&&(n=0),void 0===r&&(r=t.length),void 0===i&&(i=n-1),e.call(this,t,n,r,i)||this}P(t,e),t.prototype.current=function(){return e.prototype.current.call(this)},t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.last=function(){return this.index=this.end-1,this.current()},t.prototype.parent=function(){return null}}(R),function(){function e(e,t){this.iterator=e,this.fn=t}e.prototype.next=function(){return this.fn(this.iterator.next())}}(),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),F=/^\w[\w\d+.-]*$/,V=/^\//,D=/^\/\//,U=!0;function q(e,t){if(!e.scheme){if(t||U)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');console.warn('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}')}if(e.scheme&&!F.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!V.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(D.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function K(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==B&&(t=B+t):t=B;break}return t}var W="",B="/",$=/^(([^:\/?#]+?):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,Y=function(){function e(e,t,n,r,i,o){"object"===typeof e?(this.scheme=e.scheme||W,this.authority=e.authority||W,this.path=e.path||W,this.query=e.query||W,this.fragment=e.fragment||W):(this.scheme=e||W,this.authority=t||W,this.path=K(this.scheme,n||W),this.query=r||W,this.fragment=i||W,q(this,o))}return e.isUri=function(t){return t instanceof e||!!t&&("string"===typeof t.authority&&"string"===typeof t.fragment&&"string"===typeof t.path&&"string"===typeof t.query&&"string"===typeof t.scheme&&"function"===typeof t.fsPath&&"function"===typeof t.with&&"function"===typeof t.toString)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return Q(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,i=e.query,o=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=W),void 0===n?n=this.authority:null===n&&(n=W),void 0===r?r=this.path:null===r&&(r=W),void 0===i?i=this.query:null===i&&(i=W),void 0===o?o=this.fragment:null===o&&(o=W),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new H(t,n,r,i,o)},e.parse=function(e,t){void 0===t&&(t=!1);var n=$.exec(e);return n?new H(n[2]||W,decodeURIComponent(n[4]||W),decodeURIComponent(n[5]||W),decodeURIComponent(n[7]||W),decodeURIComponent(n[9]||W),t):new H(W,W,W,W,W)},e.file=function(e){var t=W;if(p["c"]&&(e=e.replace(/\\/g,B)),e[0]===B&&e[1]===B){var n=e.indexOf(B,2);-1===n?(t=e.substring(2),e=B):(t=e.substring(2,n),e=e.substring(n)||B)}return new H("file",t,e,W,W)},e.from=function(e){return new H(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),X(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new H(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}(),H=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return j(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Q(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?X(this,!0):(this._formatted||(this._formatted=X(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(Y),z=(M={},M[58]="%3A",M[47]="%2F",M[63]="%3F",M[35]="%23",M[91]="%5B",M[93]="%5D",M[64]="%40",M[33]="%21",M[36]="%24",M[38]="%26",M[39]="%27",M[40]="%28",M[41]="%29",M[42]="%2A",M[43]="%2B",M[44]="%2C",M[59]="%3B",M[61]="%3D",M[32]="%20",M);function G(e,t){for(var n=void 0,r=-1,i=0;i<e.length;i++){var o=e.charCodeAt(i);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),void 0!==n&&(n+=e.charAt(i));else{void 0===n&&(n=e.substr(0,i));var s=z[o];void 0!==s?(-1!==r&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=s):-1===r&&(r=i)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function J(e){for(var t=void 0,n=0;n<e.length;n++){var r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=z[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function Q(e){var t;return t=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,p["c"]&&(t=t.replace(/\//g,"\\")),t}function X(e,t){var n=t?J:G,r="",i=e.scheme,o=e.authority,s=e.path,a=e.query,u=e.fragment;if(i&&(r+=i,r+=":"),(o||"file"===i)&&(r+=B,r+=B),o){var c=o.indexOf("@");if(-1!==c){var l=o.substr(0,c);o=o.substr(c+1),c=l.indexOf(":"),-1===c?r+=n(l,!1):(r+=n(l.substr(0,c),!1),r+=":",r+=n(l.substr(c+1),!1)),r+="@"}o=o.toLowerCase(),c=o.indexOf(":"),-1===c?r+=n(o,!1):(r+=n(o.substr(0,c),!1),r+=o.substr(c))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){var f=s.charCodeAt(1);f>=65&&f<=90&&(s="/"+String.fromCharCode(f+32)+":"+s.substr(3))}else if(s.length>=2&&58===s.charCodeAt(1)){f=s.charCodeAt(0);f>=65&&f<=90&&(s=String.fromCharCode(f+32)+":"+s.substr(2))}r+=n(s,!0)}return a&&(r+="?",r+=n(a,!1)),u&&(r+="#",r+=t?u:G(u,!1)),r}var Z=function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.with=function(t,n){return void 0===t&&(t=this.lineNumber),void 0===n&&(n=this.column),t===this.lineNumber&&n===this.column?this:new e(t,n)},e.prototype.delta=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=0),this.with(this.lineNumber+e,this.column+t)},e.prototype.equals=function(t){return e.equals(this,t)},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column},e.prototype.isBefore=function(t){return e.isBefore(this,t)},e.isBefore=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column},e.prototype.isBeforeOrEqual=function(t){return e.isBeforeOrEqual(this,t)},e.isBeforeOrEqual=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column},e.compare=function(e,t){var n=0|e.lineNumber,r=0|t.lineNumber;if(n===r){var i=0|e.column,o=0|t.column;return i-o}return n-r},e.prototype.clone=function(){return new e(this.lineNumber,this.column)},e.prototype.toString=function(){return"("+this.lineNumber+","+this.column+")"},e.lift=function(t){return new e(t.lineNumber,t.column)},e.isIPosition=function(e){return e&&"number"===typeof e.lineNumber&&"number"===typeof e.column},e}(),ee=function(){function e(e,t,n,r){e>n||e===n&&t>r?(this.startLineNumber=n,this.startColumn=r,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=r)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>e.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var r,i,o,s;return n.startLineNumber<t.startLineNumber?(r=n.startLineNumber,i=n.startColumn):n.startLineNumber===t.startLineNumber?(r=n.startLineNumber,i=Math.min(n.startColumn,t.startColumn)):(r=t.startLineNumber,i=t.startColumn),n.endLineNumber>t.endLineNumber?(o=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(o=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(o=t.endLineNumber,s=t.endColumn),new e(r,i,o,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var r=t.startLineNumber,i=t.startColumn,o=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,u=n.startColumn,c=n.endLineNumber,l=n.endColumn;return r<a?(r=a,i=u):r===a&&(i=Math.max(i,u)),o>c?(o=c,s=l):o===c&&(s=Math.min(s,l)),r>o?null:r===o&&i>s?null:new e(r,i,o,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new Z(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new Z(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)},e.areIntersecting=function(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)},e.compareRangesUsingStarts=function(e,t){if(e&&t){var n=0|e.startLineNumber,r=0|t.startLineNumber;if(n===r){var i=0|e.startColumn,o=0|t.startColumn;if(i===o){var s=0|e.endLineNumber,a=0|t.endLineNumber;if(s===a){var u=0|e.endColumn,c=0|t.endColumn;return u-c}return s-a}return i-o}return n-r}var l=e?1:0,f=t?1:0;return l-f},e.compareRangesUsingEnds=function(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber},e.spansMultipleLines=function(e){return e.endLineNumber>e.startLineNumber},e}();function te(e){for(var t=0,n=e.length;t<n;t++){var r=e.charCodeAt(t);if(32!==r&&9!==r)return t}return-1}function ne(e,t){void 0===t&&(t=e.length-1);for(var n=t;n>=0;n--){var r=e.charCodeAt(n);if(32!==r&&9!==r)return n}return-1}String.fromCharCode(65279);var re=5e3,ie=3;function oe(e,t,n,r){var i=new O(e,t,n);return i.ComputeDiff(r)}var se=function(){function e(t){for(var n=[],r=[],i=0,o=t.length;i<o;i++)n[i]=e._getFirstNonBlankColumn(t[i],1),r[i]=e._getLastNonBlankColumn(t[i],1);this._lines=t,this._startColumns=n,this._endColumns=r}return e.prototype.getLength=function(){return this._lines.length},e.prototype.getElementAtIndex=function(e){return this._lines[e].substring(this._startColumns[e]-1,this._endColumns[e]-1)},e.prototype.getStartLineNumber=function(e){return e+1},e.prototype.getEndLineNumber=function(e){return e+1},e._getFirstNonBlankColumn=function(e,t){var n=te(e);return-1===n?t:n+1},e._getLastNonBlankColumn=function(e,t){var n=ne(e);return-1===n?t:n+2},e.prototype.getCharSequence=function(e,t,n){for(var r=[],i=[],o=[],s=0,a=t;a<=n;a++)for(var u=this._lines[a],c=e?this._startColumns[a]:1,l=e?this._endColumns[a]:u.length+1,f=c;f<l;f++)r[s]=u.charCodeAt(f-1),i[s]=a+1,o[s]=f,s++;return new ae(r,i,o)},e}(),ae=function(){function e(e,t,n){this._charCodes=e,this._lineNumbers=t,this._columns=n}return e.prototype.getLength=function(){return this._charCodes.length},e.prototype.getElementAtIndex=function(e){return this._charCodes[e]},e.prototype.getStartLineNumber=function(e){return this._lineNumbers[e]},e.prototype.getStartColumn=function(e){return this._columns[e]},e.prototype.getEndLineNumber=function(e){return this._lineNumbers[e]},e.prototype.getEndColumn=function(e){return this._columns[e]+1},e}(),ue=function(){function e(e,t,n,r,i,o,s,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=n,this.originalEndColumn=r,this.modifiedStartLineNumber=i,this.modifiedStartColumn=o,this.modifiedEndLineNumber=s,this.modifiedEndColumn=a}return e.createFromDiffChange=function(t,n,r){var i,o,s,a,u,c,l,f;return 0===t.originalLength?(i=0,o=0,s=0,a=0):(i=n.getStartLineNumber(t.originalStart),o=n.getStartColumn(t.originalStart),s=n.getEndLineNumber(t.originalStart+t.originalLength-1),a=n.getEndColumn(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(u=0,c=0,l=0,f=0):(u=r.getStartLineNumber(t.modifiedStart),c=r.getStartColumn(t.modifiedStart),l=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=r.getEndColumn(t.modifiedStart+t.modifiedLength-1)),new e(i,o,s,a,u,c,l,f)},e}();function ce(e){if(e.length<=1)return e;for(var t=[e[0]],n=t[0],r=1,i=e.length;r<i;r++){var o=e[r],s=o.originalStart-(n.originalStart+n.originalLength),a=o.modifiedStart-(n.modifiedStart+n.modifiedLength),u=Math.min(s,a);u<ie?(n.originalLength=o.originalStart+o.originalLength-n.originalStart,n.modifiedLength=o.modifiedStart+o.modifiedLength-n.modifiedStart):(t.push(o),n=o)}return t}var le=function(){function e(e,t,n,r,i){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=r,this.charChanges=i}return e.createFromDiffResult=function(t,n,r,i,o,s,a){var u,c,l,f,h=void 0;if(0===n.originalLength?(u=r.getStartLineNumber(n.originalStart)-1,c=0):(u=r.getStartLineNumber(n.originalStart),c=r.getEndLineNumber(n.originalStart+n.originalLength-1)),0===n.modifiedLength?(l=i.getStartLineNumber(n.modifiedStart)-1,f=0):(l=i.getStartLineNumber(n.modifiedStart),f=i.getEndLineNumber(n.modifiedStart+n.modifiedLength-1)),s&&0!==n.originalLength&&0!==n.modifiedLength&&o()){var d=r.getCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),p=i.getCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1),m=oe(d,p,o,!0);a&&(m=ce(m)),h=[];for(var g=0,v=m.length;g<v;g++)h.push(ue.createFromDiffChange(m[g],d,p))}return new e(u,c,l,f,h)},e}(),fe=function(){function e(e,t,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.maximumRunTimeMs=re,this.originalLines=e,this.modifiedLines=t,this.original=new se(e),this.modified=new se(t)}return e.prototype.computeDiff=function(){if(1===this.original.getLength()&&0===this.original.getElementAtIndex(0).length)return[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.getLength(),charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}];if(1===this.modified.getLength()&&0===this.modified.getElementAtIndex(0).length)return[{originalStartLineNumber:1,originalEndLineNumber:this.original.getLength(),modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}];this.computationStartTime=(new Date).getTime();var e=oe(this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldMakePrettyDiff);if(this.shouldIgnoreTrimWhitespace){for(var t=[],n=0,r=e.length;n<r;n++)t.push(le.createFromDiffResult(this.shouldIgnoreTrimWhitespace,e[n],this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return t}for(var i=[],o=0,s=0,a=(n=-1,e.length);n<a;n++){var u=n+1<a?e[n+1]:null,c=u?u.originalStart:this.originalLines.length,l=u?u.modifiedStart:this.modifiedLines.length;while(o<c&&s<l){var f=this.originalLines[o],h=this.modifiedLines[s];if(f!==h){var d=se._getFirstNonBlankColumn(f,1),p=se._getFirstNonBlankColumn(h,1);while(d>1&&p>1){var m=f.charCodeAt(d-2),g=h.charCodeAt(p-2);if(m!==g)break;d--,p--}(d>1||p>1)&&this._pushTrimWhitespaceCharChange(i,o+1,1,d,s+1,1,p);var v=se._getLastNonBlankColumn(f,1),y=se._getLastNonBlankColumn(h,1),b=f.length+1,_=h.length+1;while(v<b&&y<_){m=f.charCodeAt(v-1),g=f.charCodeAt(y-1);if(m!==g)break;v++,y++}(v<b||y<_)&&this._pushTrimWhitespaceCharChange(i,o+1,v,b,s+1,y,_)}o++,s++}u&&(i.push(le.createFromDiffResult(this.shouldIgnoreTrimWhitespace,u,this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),o+=u.originalLength,s+=u.modifiedLength)}return i},e.prototype._pushTrimWhitespaceCharChange=function(e,t,n,r,i,o,s){if(!this._mergeTrimWhitespaceCharChange(e,t,n,r,i,o,s)){var a=void 0;this.shouldComputeCharChanges&&(a=[new ue(t,n,t,r,i,o,i,s)]),e.push(new le(t,t,i,i,a))}},e.prototype._mergeTrimWhitespaceCharChange=function(e,t,n,r,i,o,s){var a=e.length;if(0===a)return!1;var u=e[a-1];return 0!==u.originalEndLineNumber&&0!==u.modifiedEndLineNumber&&(u.originalEndLineNumber+1===t&&u.modifiedEndLineNumber+1===i&&(u.originalEndLineNumber=t,u.modifiedEndLineNumber=i,this.shouldComputeCharChanges&&u.charChanges.push(new ue(t,n,t,r,i,o,i,s)),!0))},e.prototype._continueProcessingPredicate=function(){if(0===this.maximumRunTimeMs)return!0;var e=(new Date).getTime();return e-this.computationStartTime<this.maximumRunTimeMs},e}(),he=function(){function e(e,t,n){for(var r=new Uint8Array(e*t),i=0,o=e*t;i<o;i++)r[i]=n;this._data=r,this.rows=e,this.cols=t}return e.prototype.get=function(e,t){return this._data[e*this.cols+t]},e.prototype.set=function(e,t,n){this._data[e*this.cols+t]=n},e}();function de(e){return e<0?0:e>255?255:0|e}function pe(e){return e<0?0:e>4294967295?4294967295:0|e}var me=function(){function e(e,t){this.index=e,this.remainder=t}return e}(),ge=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=pe(e);var n=this.values,r=this.prefixSum,i=t.length;return 0!==i&&(this.values=new Uint32Array(n.length+i),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+i),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=pe(e),t=pe(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)},e.prototype.removeValues=function(e,t){e=pe(e),t=pe(t);var n=this.values,r=this.prefixSum;if(e>=n.length)return!1;var i=n.length-e;return t>=i&&(t=i),0!==t&&(this.values=new Uint32Array(n.length-t),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=pe(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue();var t=0,n=this.values.length-1,r=0,i=0,o=0;while(t<=n)if(r=t+(n-t)/2|0,i=this.prefixSum[r],o=i-this.values[r],e<o)n=r-1;else{if(!(e>=i))break;t=r+1}return new me(r,e-o)},e}(),ve=(function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new ge(e),this._bustCache()}e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t<this._cache.length)return this._cache[t]}return this._actual.getIndexOf(e)},e.prototype.warmUpCache=function(e,t){for(var n=[],r=e;r<=t;r++)n[r-e]=this.getIndexOf(r);this._cache=n,this._cacheAccumulatedValueStart=e}}(),function(){function e(e,t,n,r){this._uri=e,this._lines=t,this._eol=n,this._versionId=r,this._lineStarts=null}return e.prototype.dispose=function(){this._lines.length=0},e.prototype.getText=function(){return this._lines.join(this._eol)},e.prototype.onEvents=function(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);for(var t=e.changes,n=0,r=t;n<r.length;n++){var i=r[n];this._acceptDeleteRange(i.range),this._acceptInsertText(new Z(i.range.startLineNumber,i.range.startColumn),i.text)}this._versionId=e.versionId},e.prototype._ensureLineStarts=function(){if(!this._lineStarts){for(var e=this._eol.length,t=this._lines.length,n=new Uint32Array(t),r=0;r<t;r++)n[r]=this._lines[r].length+e;this._lineStarts=new ge(n)}},e.prototype._setLineText=function(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)},e.prototype._acceptDeleteRange=function(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}},e.prototype._acceptInsertText=function(e,t){if(0!==t.length){var n=t.split(/\r\n|\r|\n/);if(1!==n.length){n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);for(var r=new Uint32Array(n.length-1),i=1;i<n.length;i++)this._lines.splice(e.lineNumber+i-1,0,n[i]),r[i-1]=n[i].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,r)}else this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1))}},e}()),ye="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function be(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",n=0,r=ye;n<r.length;n++){var i=r[n];e.indexOf(i)>=0||(t+="\\"+i)}return t+="\\s]+)",new RegExp(t,"g")}var _e=be();function Ce(e){var t=_e;if(e&&e instanceof RegExp)if(e.global)t=e;else{var n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}function Se(e,t,n,r){var i,o=e-1-r,s=n.lastIndexOf(" ",o-1)+1;t.lastIndex=s;while(i=t.exec(n)){var a=i.index||0;if(a<=o&&t.lastIndex>=o)return{word:i[0],startColumn:r+1+a,endColumn:r+1+t.lastIndex}}return null}function Ee(e,t,n,r){var i,o=e-1-r;t.lastIndex=0;while(i=t.exec(n)){var s=i.index||0;if(s>o)return null;if(t.lastIndex>=o)return{word:i[0],startColumn:r+1+s,endColumn:r+1+t.lastIndex}}return null}function xe(e,t,n,r){t.lastIndex=0;var i=t.exec(n);if(!i)return null;var o=i[0].indexOf(" ")>=0?Ee(e,t,n,r):Se(e,t,n,r);return t.lastIndex=0,o}var Ne=function(){function e(t){var n=de(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}return e._createAsciiMap=function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t},e.prototype.set=function(e,t){var n=de(t);e>=0&&e<256?this._asciiMap[e]=n:this._map.set(e,n)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}(),we=(function(){function e(){this._actual=new Ne(0)}e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)}}(),function(){function e(e){for(var t=0,n=0,r=0,i=e.length;r<i;r++){var o=e[r],s=o[0],a=o[1],u=o[2];a>t&&(t=a),s>n&&(n=s),u>n&&(n=u)}t++,n++;var c=new he(n,t,0);for(r=0,i=e.length;r<i;r++){var l=e[r];s=l[0],a=l[1],u=l[2];c.set(s,a,u)}this._states=c,this._maxCharCode=t}return e.prototype.nextState=function(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)},e}()),Ae=null;function Le(){return null===Ae&&(Ae=new we([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Ae}var ke=null;function Te(){if(null===ke){ke=new Ne(0);for(var e=" \t<>'\"γγq`οΌοΌοΌοΌοΌοΌοΌ οΌοΌοΌ
οΌοΌββγγγγγγοΌοΌ»ο½ο½’ο½£ο½οΌ½οΌγγγγγγββο½ο½β¦",t=0;t<e.length;t++)ke.set(e.charCodeAt(t),1);var n=".,;";for(t=0;t<n.length;t++)ke.set(n.charCodeAt(t),2)}return ke}var Oe=function(){function e(){}return e._createLink=function(e,t,n,r,i){var o=i-1;do{var s=t.charCodeAt(o),a=e.get(s);if(2!==a)break;o--}while(o>r);if(r>0){var u=t.charCodeAt(r-1),c=t.charCodeAt(o);(40===u&&41===c||91===u&&93===c||123===u&&125===c)&&o--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}},e.computeLinks=function(t,n){void 0===n&&(n=Le());for(var r=Te(),i=[],o=1,s=t.getLineCount();o<=s;o++){var a=t.getLineContent(o),u=a.length,c=0,l=0,f=0,h=1,d=!1,p=!1,m=!1;while(c<u){var g=!1,v=a.charCodeAt(c);if(13===h){var y=void 0;switch(v){case 40:d=!0,y=0;break;case 41:y=d?0:1;break;case 91:p=!0,y=0;break;case 93:y=p?0:1;break;case 123:m=!0,y=0;break;case 125:y=m?0:1;break;case 39:y=34===f||96===f?0:1;break;case 34:y=39===f||96===f?0:1;break;case 96:y=39===f||34===f?0:1;break;default:y=r.get(v)}1===y&&(i.push(e._createLink(r,a,o,l,c)),g=!0)}else if(12===h){y=void 0;91===v?(p=!0,y=0):y=r.get(v),1===y?g=!0:h=13}else h=n.nextState(h,v),0===h&&(g=!0);g&&(h=1,d=!1,p=!1,m=!1,l=c+1,f=v),c++}13===h&&i.push(e._createLink(r,a,o,l,u))}return i},e}();function Pe(e){return e&&"function"===typeof e.getLineCount&&"function"===typeof e.getLineContent?Oe.computeLinks(e):[]}var Ie=function(){function e(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}return e.prototype.navigateValueSet=function(e,t,n,r,i){if(e&&t){var o=this.doNavigateValueSet(t,i);if(o)return{range:e,value:o}}if(n&&r){o=this.doNavigateValueSet(r,i);if(o)return{range:n,value:o}}return null},e.prototype.doNavigateValueSet=function(e,t){var n=this.numberReplace(e,t);return null!==n?n:this.textReplace(e,t)},e.prototype.numberReplace=function(e,t){var n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),r=Number(e),i=parseFloat(e);return isNaN(r)||isNaN(i)||r!==i?null:0!==r||t?(r=Math.floor(r*n),r+=t?n:-n,String(r/n)):null},e.prototype.textReplace=function(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)},e.prototype.valueSetsReplace=function(e,t,n){for(var r=null,i=0,o=e.length;null===r&&i<o;i++)r=this.valueSetReplace(e[i],t,n);return r},e.prototype.valueSetReplace=function(e,t,n){var r=e.indexOf(t);return r>=0?(r+=n?1:-1,r<0?r=e.length-1:r%=e.length,e[r]):null},e.INSTANCE=new e,e}();n("5110");function Me(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments),t)}}var Re,je=function(){function e(e){this.element=e}return e}(),Fe=function(){function e(){this._size=0}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.isEmpty=function(){return!this._first},e.prototype.unshift=function(e){return this._insert(e,!1)},e.prototype.push=function(e){return this._insert(e,!0)},e.prototype._insert=function(e,t){var n=new je(e);if(this._first)if(t){var r=this._last;this._last=n,n.prev=r,r.next=n}else{var i=this._first;this._first=n,n.next=i,i.prev=n}else this._first=n,this._last=n;return this._size+=1,this._remove.bind(this,n)},e.prototype.shift=function(){if(this._first){var e=this._first.element;return this._remove(this._first),e}},e.prototype._remove=function(e){var t=this._first;while(t instanceof je){if(t===e){if(t.prev&&t.next){var n=t.prev;n.next=t.next,t.next.prev=n}else t.prev||t.next?t.next?t.prev||(this._first=this._first.next,this._first.prev=void 0):(this._last=this._last.prev,this._last.next=void 0):(this._first=void 0,this._last=void 0);this._size-=1;break}t=t.next}},e.prototype.iterator=function(){var e,t=this._first;return{next:function(){return t?(e?e.value=t.element:e={done:!1,value:t.element},t=t.next,e):I}}},e}();(function(e){var t={dispose:function(){}};function n(e){return function(t,n,r){void 0===n&&(n=null);var i,o=!1;return i=e(function(e){if(!o)return i?i.dispose():o=!0,t.call(n,e)},null,r),o&&i.dispose(),i}}function r(e,t){return c(function(n,r,i){return void 0===r&&(r=null),e(function(e){return n.call(r,t(e))},null,i)})}function i(e,t){return c(function(n,r,i){return void 0===r&&(r=null),e(function(e){t(e),n.call(r,e)},null,i)})}function o(e,t){return c(function(n,r,i){return void 0===r&&(r=null),e(function(e){return t(e)&&n.call(r,e)},null,i)})}function s(e){return e}function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n,r){return void 0===n&&(n=null),f(e.map(function(e){return e(function(e){return t.call(n,e)},null,r)}))}}function u(e,t,n){var i=n;return r(e,function(e){return i=t(i,e),i})}function c(e){var t,n=new qe({onFirstListenerAdd:function(){t=e(n.fire,n)},onLastListenerRemove:function(){t.dispose()}});return n.event}function l(e,t,n,r,i){var o;void 0===n&&(n=100),void 0===r&&(r=!1);var s=void 0,a=void 0,u=0,c=new qe({leakWarningThreshold:i,onFirstListenerAdd:function(){o=e(function(e){u++,s=t(s,e),r&&!a&&c.fire(s),clearTimeout(a),a=setTimeout(function(){var e=s;s=void 0,a=void 0,(!r||u>1)&&c.fire(e),u=0},n)})},onLastListenerRemove:function(){o.dispose()}});return c.event}function h(e){var t=(new Date).getTime();return r(n(e),function(e){return(new Date).getTime()-t})}function d(e){var t,n=!0;return o(e,function(e){var r=n||e!==t;return n=!1,t=e,r})}function p(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]);var r=n.slice(),i=e(function(e){r?r.push(e):s.fire(e)}),o=function(){r&&r.forEach(function(e){return s.fire(e)}),r=null},s=new qe({onFirstListenerAdd:function(){i||(i=e(function(e){return s.fire(e)}))},onFirstListenerDidAdd:function(){r&&(t?setTimeout(o):o())},onLastListenerRemove:function(){i&&i.dispose(),i=null}});return s.event}function m(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice(),e(function(e){n.push(e),i.fire(e)});var r=function(e,t){return n.forEach(function(n){return e.call(t,n)})},i=new qe({onListenerDidAdd:function(e,n,i){t?setTimeout(function(){return r(n,i)}):r(n,i)}});return i.event}e.None=function(){return t},e.once=n,e.map=r,e.forEach=i,e.filter=o,e.signal=s,e.any=a,e.reduce=u,e.snapshot=c,e.debounce=l,e.stopwatch=h,e.latch=d,e.buffer=p,e.echo=m;var g=function(){function e(e){this.event=e}return e.prototype.map=function(t){return new e(r(this.event,t))},e.prototype.forEach=function(t){return new e(i(this.event,t))},e.prototype.filter=function(t){return new e(o(this.event,t))},e.prototype.reduce=function(t,n){return new e(u(this.event,t,n))},e.prototype.latch=function(){return new e(d(this.event))},e.prototype.on=function(e,t,n){return this.event(e,t,n)},e.prototype.once=function(e,t,r){return n(this.event)(e,t,r)},e}();function v(e){return new g(e)}function y(e,t,n){void 0===n&&(n=function(e){return e});var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.fire(n.apply(void 0,e))},i=function(){return e.on(t,r)},o=function(){return e.removeListener(t,r)},s=new qe({onFirstListenerAdd:i,onLastListenerRemove:o});return s.event}function b(e){var t=new qe,n=!1;return e.then(void 0,function(){return null}).then(function(){n?t.fire(void 0):setTimeout(function(){return t.fire(void 0)},0)}),n=!0,t.event}function _(e){return new Promise(function(t){return n(e)(t)})}e.chain=v,e.fromNodeEventEmitter=y,e.fromPromise=b,e.toPromise=_})(Re||(Re={}));var Ve,De=-1,Ue=function(){function e(e,t){void 0===t&&(t=Math.random().toString(18).slice(2,5)),this.customThreshold=e,this.name=t,this._warnCountdown=0}return e.prototype.dispose=function(){this._stacks&&this._stacks.clear()},e.prototype.check=function(e){var t=this,n=De;if("number"===typeof this.customThreshold&&(n=this.customThreshold),!(n<=0||e<n)){this._stacks||(this._stacks=new Map);var r=(new Error).stack.split("\n").slice(3).join("\n"),i=this._stacks.get(r)||0;if(this._stacks.set(r,i+1),this._warnCountdown-=1,this._warnCountdown<=0){var o;this._warnCountdown=.5*n;var s=0;this._stacks.forEach(function(e,t){(!o||s<e)&&(o=t,s=e)}),console.warn("["+this.name+"] potential listener LEAK detected, having "+e+" listeners already. MOST frequent listener ("+s+"):"),console.warn(o)}return function(){var e=t._stacks.get(r)||0;t._stacks.set(r,e-1)}}},e}(),qe=function(){function e(e){this._disposed=!1,this._options=e,this._leakageMon=De>0?new Ue(this._options&&this._options.leakWarningThreshold):void 0}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,r,i){t._listeners||(t._listeners=new Fe);var o=t._listeners.isEmpty();o&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s,a,u=t._listeners.push(r?[n,r]:n);return o&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,r),t._leakageMon&&(s=t._leakageMon.check(t._listeners.size)),a={dispose:function(){if(s&&s(),a.dispose=e._noop,!t._disposed&&(u(),t._options&&t._options.onLastListenerRemove)){var n=t._listeners&&!t._listeners.isEmpty();n||t._options.onLastListenerRemove(t)}}},Array.isArray(i)&&i.push(a),a}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(var t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);while(this._deliveryQueue.length>0){var r=this._deliveryQueue.shift(),i=r[0],s=r[1];try{"function"===typeof i?i.call(void 0,s):i[0].call(i[1],s)}catch(n){o(n)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._leakageMon&&this._leakageMon.dispose(),this._disposed=!0},e._noop=function(){},e}(),Ke=(function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new qe({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);var r=function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)};return h(Me(r))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach(function(t){return e.hook(t)})},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach(function(t){return e.unhook(t)})},e.prototype.hook=function(e){var t=this;e.listener=e.event(function(e){return t.emitter.fire(e)})},e.prototype.unhook=function(e){e.listener&&e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()}}(),function(){function e(){this.buffers=[]}e.prototype.wrapEvent=function(e){var t=this;return function(n,r,i){return e(function(e){var i=t.buffers[t.buffers.length-1];i?i.push(function(){return n.call(r,e)}):n.call(r,e)},void 0,i)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t);var n=e();return this.buffers.pop(),t.forEach(function(e){return e()}),n}}(),function(){function e(){var e=this;this.listening=!1,this.inputEvent=Re.None,this.inputEventListener=d.None,this.emitter=new qe({onFirstListenerDidAdd:function(){e.listening=!0,e.inputEventListener=e.inputEvent(e.emitter.fire,e.emitter)},onLastListenerRemove:function(){e.listening=!1,e.inputEventListener.dispose()}}),this.event=this.emitter.event}Object.defineProperty(e.prototype,"input",{set:function(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose()}}(),Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}}));(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof Be||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Re.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ke})})(Ve||(Ve={}));var We,Be=function(){function e(){this._isCancelled=!1,this._emitter=null}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?Ke:(this._emitter||(this._emitter=new qe),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=null)},e}(),$e=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new Be),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof Be&&this._token.cancel():this._token=Ve.Cancelled},e.prototype.dispose=function(){this._token?this._token instanceof Be&&this._token.dispose():this._token=Ve.None},e}(),Ye=function(){function e(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}return e.prototype.define=function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e},e.prototype.keyCodeToStr=function(e){return this._keyCodeToStr[e]},e.prototype.strToKeyCode=function(e){return this._strToKeyCode[e.toLowerCase()]||0},e}(),He=new Ye,ze=new Ye,Ge=new Ye;function Je(e,t){var n=(65535&t)<<16>>>0;return(e|n)>>>0}(function(){function e(e,t,n,r){void 0===n&&(n=t),void 0===r&&(r=n),He.define(e,t),ze.define(e,n),Ge.define(e,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})(),function(e){function t(e){return He.keyCodeToStr(e)}function n(e){return He.strToKeyCode(e)}function r(e){return ze.keyCodeToStr(e)}function i(e){return Ge.keyCodeToStr(e)}function o(e){return ze.strToKeyCode(e)||Ge.strToKeyCode(e)}e.toString=t,e.fromString=n,e.toUserSettingsUS=r,e.toUserSettingsGeneral=i,e.fromUserSettings=o}(We||(We={}));(function(){function e(e,t,n,r,i){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}e.prototype.equals=function(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.toChord=function(){return new xt([this])},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}})();var Qe,Xe,Ze,et,tt,nt,rt,it,ot,st,at,ut,ct,lt,ft,ht,dt,pt,mt,gt,vt,yt,bt,_t,Ct,St,Et,xt=function(){function e(e){if(0===e.length)throw c("parts");this.parts=e}return e.prototype.equals=function(e){if(null===e)return!1;if(this.parts.length!==e.parts.length)return!1;for(var t=0;t<this.parts.length;t++)if(!this.parts[t].equals(e.parts[t]))return!1;return!0},e}(),Nt=(function(){function e(e,t,n,r,i,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyLabel=i,this.keyAriaLabel=o}}(),function(){function e(){}}(),function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),wt=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r,i)||this;return o.selectionStartLineNumber=t,o.selectionStartColumn=n,o.positionLineNumber=r,o.positionColumn=i,o}return Nt(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn)},t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1},t.prototype.setEndPosition=function(e,n){return 0===this.getDirection()?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new Z(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return 0===this.getDirection()?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(!this.selectionsEqual(e[n],t[n]))return!1;return!0},t.isISelection=function(e){return e&&"number"===typeof e.selectionStartLineNumber&&"number"===typeof e.selectionStartColumn&&"number"===typeof e.positionLineNumber&&"number"===typeof e.positionColumn},t.createWithDirection=function(e,n,r,i,o){return 0===o?new t(e,n,r,i):new t(r,i,e,n)},t}(ee),At=function(){function e(e,t,n){this.offset=0|e,this.type=t,this.language=n}return e.prototype.toString=function(){return"("+this.offset+", "+this.type+")"},e}();(function(){function e(e,t){this.tokens=e,this.endState=t}})(),function(){function e(e,t){this.tokens=e,this.endState=t}}();(function(e){e[e["Unnecessary"]=1]="Unnecessary"})(Qe||(Qe={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(Xe||(Xe={})),function(e){e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["KEY_0"]=21]="KEY_0",e[e["KEY_1"]=22]="KEY_1",e[e["KEY_2"]=23]="KEY_2",e[e["KEY_3"]=24]="KEY_3",e[e["KEY_4"]=25]="KEY_4",e[e["KEY_5"]=26]="KEY_5",e[e["KEY_6"]=27]="KEY_6",e[e["KEY_7"]=28]="KEY_7",e[e["KEY_8"]=29]="KEY_8",e[e["KEY_9"]=30]="KEY_9",e[e["KEY_A"]=31]="KEY_A",e[e["KEY_B"]=32]="KEY_B",e[e["KEY_C"]=33]="KEY_C",e[e["KEY_D"]=34]="KEY_D",e[e["KEY_E"]=35]="KEY_E",e[e["KEY_F"]=36]="KEY_F",e[e["KEY_G"]=37]="KEY_G",e[e["KEY_H"]=38]="KEY_H",e[e["KEY_I"]=39]="KEY_I",e[e["KEY_J"]=40]="KEY_J",e[e["KEY_K"]=41]="KEY_K",e[e["KEY_L"]=42]="KEY_L",e[e["KEY_M"]=43]="KEY_M",e[e["KEY_N"]=44]="KEY_N",e[e["KEY_O"]=45]="KEY_O",e[e["KEY_P"]=46]="KEY_P",e[e["KEY_Q"]=47]="KEY_Q",e[e["KEY_R"]=48]="KEY_R",e[e["KEY_S"]=49]="KEY_S",e[e["KEY_T"]=50]="KEY_T",e[e["KEY_U"]=51]="KEY_U",e[e["KEY_V"]=52]="KEY_V",e[e["KEY_W"]=53]="KEY_W",e[e["KEY_X"]=54]="KEY_X",e[e["KEY_Y"]=55]="KEY_Y",e[e["KEY_Z"]=56]="KEY_Z",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["NumLock"]=78]="NumLock",e[e["ScrollLock"]=79]="ScrollLock",e[e["US_SEMICOLON"]=80]="US_SEMICOLON",e[e["US_EQUAL"]=81]="US_EQUAL",e[e["US_COMMA"]=82]="US_COMMA",e[e["US_MINUS"]=83]="US_MINUS",e[e["US_DOT"]=84]="US_DOT",e[e["US_SLASH"]=85]="US_SLASH",e[e["US_BACKTICK"]=86]="US_BACKTICK",e[e["US_OPEN_SQUARE_BRACKET"]=87]="US_OPEN_SQUARE_BRACKET",e[e["US_BACKSLASH"]=88]="US_BACKSLASH",e[e["US_CLOSE_SQUARE_BRACKET"]=89]="US_CLOSE_SQUARE_BRACKET",e[e["US_QUOTE"]=90]="US_QUOTE",e[e["OEM_8"]=91]="OEM_8",e[e["OEM_102"]=92]="OEM_102",e[e["NUMPAD_0"]=93]="NUMPAD_0",e[e["NUMPAD_1"]=94]="NUMPAD_1",e[e["NUMPAD_2"]=95]="NUMPAD_2",e[e["NUMPAD_3"]=96]="NUMPAD_3",e[e["NUMPAD_4"]=97]="NUMPAD_4",e[e["NUMPAD_5"]=98]="NUMPAD_5",e[e["NUMPAD_6"]=99]="NUMPAD_6",e[e["NUMPAD_7"]=100]="NUMPAD_7",e[e["NUMPAD_8"]=101]="NUMPAD_8",e[e["NUMPAD_9"]=102]="NUMPAD_9",e[e["NUMPAD_MULTIPLY"]=103]="NUMPAD_MULTIPLY",e[e["NUMPAD_ADD"]=104]="NUMPAD_ADD",e[e["NUMPAD_SEPARATOR"]=105]="NUMPAD_SEPARATOR",e[e["NUMPAD_SUBTRACT"]=106]="NUMPAD_SUBTRACT",e[e["NUMPAD_DECIMAL"]=107]="NUMPAD_DECIMAL",e[e["NUMPAD_DIVIDE"]=108]="NUMPAD_DIVIDE",e[e["KEY_IN_COMPOSITION"]=109]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=110]="ABNT_C1",e[e["ABNT_C2"]=111]="ABNT_C2",e[e["MAX_VALUE"]=112]="MAX_VALUE"}(Ze||(Ze={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(et||(et={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(tt||(tt={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(nt||(nt={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(rt||(rt={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(it||(it={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(ot||(ot={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(st||(st={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(at||(at={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(ut||(ut={})),function(e){e[e["None"]=0]="None",e[e["Small"]=1]="Small",e[e["Large"]=2]="Large",e[e["SmallBlocks"]=3]="SmallBlocks",e[e["LargeBlocks"]=4]="LargeBlocks"}(ct||(ct={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(lt||(lt={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}(ft||(ft={})),function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"}(ht||(ht={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(dt||(dt={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(pt||(pt={})),function(e){e[e["TOP_RIGHT_CORNER"]=0]="TOP_RIGHT_CORNER",e[e["BOTTOM_RIGHT_CORNER"]=1]="BOTTOM_RIGHT_CORNER",e[e["TOP_CENTER"]=2]="TOP_CENTER"}(mt||(mt={})),function(e){e[e["UNKNOWN"]=0]="UNKNOWN",e[e["TEXTAREA"]=1]="TEXTAREA",e[e["GUTTER_GLYPH_MARGIN"]=2]="GUTTER_GLYPH_MARGIN",e[e["GUTTER_LINE_NUMBERS"]=3]="GUTTER_LINE_NUMBERS",e[e["GUTTER_LINE_DECORATIONS"]=4]="GUTTER_LINE_DECORATIONS",e[e["GUTTER_VIEW_ZONE"]=5]="GUTTER_VIEW_ZONE",e[e["CONTENT_TEXT"]=6]="CONTENT_TEXT",e[e["CONTENT_EMPTY"]=7]="CONTENT_EMPTY",e[e["CONTENT_VIEW_ZONE"]=8]="CONTENT_VIEW_ZONE",e[e["CONTENT_WIDGET"]=9]="CONTENT_WIDGET",e[e["OVERVIEW_RULER"]=10]="OVERVIEW_RULER",e[e["SCROLLBAR"]=11]="SCROLLBAR",e[e["OVERLAY_WIDGET"]=12]="OVERLAY_WIDGET",e[e["OUTSIDE_EDITOR"]=13]="OUTSIDE_EDITOR"}(gt||(gt={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(vt||(vt={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["Snippet"]=25]="Snippet"}(yt||(yt={})),function(e){e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(bt||(bt={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(_t||(_t={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(Ct||(Ct={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(St||(St={})),function(e){e[e["File"]=0]="File",e[e["Module"]=1]="Module",e[e["Namespace"]=2]="Namespace",e[e["Package"]=3]="Package",e[e["Class"]=4]="Class",e[e["Method"]=5]="Method",e[e["Property"]=6]="Property",e[e["Field"]=7]="Field",e[e["Constructor"]=8]="Constructor",e[e["Enum"]=9]="Enum",e[e["Interface"]=10]="Interface",e[e["Function"]=11]="Function",e[e["Variable"]=12]="Variable",e[e["Constant"]=13]="Constant",e[e["String"]=14]="String",e[e["Number"]=15]="Number",e[e["Boolean"]=16]="Boolean",e[e["Array"]=17]="Array",e[e["Object"]=18]="Object",e[e["Key"]=19]="Key",e[e["Null"]=20]="Null",e[e["EnumMember"]=21]="EnumMember",e[e["Struct"]=22]="Struct",e[e["Event"]=23]="Event",e[e["Operator"]=24]="Operator",e[e["TypeParameter"]=25]="TypeParameter"}(Et||(Et={}));var Lt=function(){function e(){}return e.chord=function(e,t){return Je(e,t)},e.CtrlCmd=2048,e.Shift=1024,e.Alt=512,e.WinCtrl=256,e}();function kt(){return{editor:void 0,languages:void 0,CancellationTokenSource:$e,Emitter:qe,KeyCode:Ze,KeyMod:Lt,Position:Z,Range:ee,Selection:wt,SelectionDirection:et,MarkerSeverity:Xe,MarkerTag:Qe,Uri:Y,Token:At}}var Tt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Tt(t,e),Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eol",{get:function(){return this._eol},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){return this.getText()},t.prototype.getLinesContent=function(){return this._lines.slice(0)},t.prototype.getLineCount=function(){return this._lines.length},t.prototype.getLineContent=function(e){return this._lines[e-1]},t.prototype.getWordAtPosition=function(e,t){var n=xe(e.column,Ce(t),this._lines[e.lineNumber-1],0);return n?new ee(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null},t.prototype.getWordUntilPosition=function(e,t){var n=this.getWordAtPosition(e,t);return n?{word:this._lines[e.lineNumber-1].substring(n.startColumn-1,e.column-1),startColumn:n.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype.createWordIterator=function(e){var t,n,r=this,i=0,o=0,s=[],a=function(){if(o<s.length){var u=n.substring(s[o].start,s[o].end);return o+=1,t?t.value=u:t={done:!1,value:u},t}return i>=r._lines.length?I:(n=r._lines[i],s=r._wordenize(n,e),o=0,i+=1,a())};return{next:a}},t.prototype.getLineWords=function(e,t){for(var n=this._lines[e-1],r=this._wordenize(n,t),i=[],o=0,s=r;o<s.length;o++){var a=s[o];i.push({word:n.substring(a.start,a.end),startColumn:a.start+1,endColumn:a.end+1})}return i},t.prototype._wordenize=function(e,t){var n,r=[];t.lastIndex=0;while(n=t.exec(e)){if(0===n[0].length)break;r.push({start:n.index,end:n.index+n[0].length})}return r},t.prototype.getValueInRange=function(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);var t=this._eol,n=e.startLineNumber-1,r=e.endLineNumber-1,i=[];i.push(this._lines[n].substring(e.startColumn-1));for(var o=n+1;o<r;o++)i.push(this._lines[o]);return i.push(this._lines[r].substring(0,e.endColumn-1)),i.join(t)},t.prototype.offsetAt=function(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(e.lineNumber-2)+(e.column-1)},t.prototype.positionAt=function(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();var t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}},t.prototype._validateRange=function(e){var t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e},t.prototype._validatePosition=function(e){if(!Z.isIPosition(e))throw new Error("bad position");var t=e.lineNumber,n=e.column,r=!1;if(t<1)t=1,n=1,r=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,r=!0;else{var i=this._lines[t-1].length+1;n<1?(n=1,r=!0):n>i&&(n=i,r=!0)}return r?{lineNumber:t,column:n}:e},t}(ve),Pt=function(){function e(e){this._foreignModuleFactory=e,this._foreignModule=null}return e.prototype.computeDiff=function(e,t,n){var r=this._getModel(e),i=this._getModel(t);if(!r||!i)return Promise.resolve(null);var o=r.getLinesContent(),s=i.getLinesContent(),a=new fe(o,s,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0}),u=a.computeDiff(),c=!(u.length>0)&&this._modelsAreIdentical(r,i);return Promise.resolve({identical:c,changes:u})},e.prototype._modelsAreIdentical=function(e,t){var n=e.getLineCount(),r=t.getLineCount();if(n!==r)return!1;for(var i=1;i<=n;i++){var o=e.getLineContent(i),s=t.getLineContent(i);if(o!==s)return!1}return!0},e.prototype.computeMoreMinimalEdits=function(t,n){var r=this._getModel(t);if(!r)return Promise.resolve(n);var i=[],o=void 0;n=_(n,function(e,t){if(e.range&&t.range)return ee.compareRangesUsingStarts(e.range,t.range);var n=e.range?0:1,r=t.range?0:1;return n-r});for(var s=0,a=n;s<a.length;s++){var u=a[s],c=u.range,l=u.text,f=u.eol;if("number"===typeof f&&(o=f),!ee.isEmpty(c)||l){var h=r.getValueInRange(c);if(l=l.replace(/\r\n|\n|\r/g,r.eol),h!==l)if(Math.max(l.length,h.length)>e._diffLimit)i.push({range:c,text:l});else for(var d=N(h,l,!1),p=r.offsetAt(ee.lift(c).getStartPosition()),m=0,g=d;m<g.length;m++){var v=g[m],y=r.positionAt(p+v.originalStart),b=r.positionAt(p+v.originalStart+v.originalLength),C={text:l.substr(v.modifiedStart,v.modifiedLength),range:{startLineNumber:y.lineNumber,startColumn:y.column,endLineNumber:b.lineNumber,endColumn:b.column}};r.getValueInRange(C.range)!==C.text&&i.push(C)}}}return"number"===typeof o&&i.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),Promise.resolve(i)},e.prototype.computeLinks=function(e){var t=this._getModel(e);return t?Promise.resolve(Pe(t)):Promise.resolve(null)},e.prototype.textualSuggest=function(t,n,r,i){var o=this._getModel(t);if(!o)return Promise.resolve(null);var s=[],a=new RegExp(r,i),u=o.getWordUntilPosition(n,a),c=Object.create(null);c[u.word]=!0;for(var l=o.createWordIterator(a),f=l.next();!f.done&&s.length<=e._suggestionsLimit;f=l.next()){var h=f.value;c[h]||(c[h]=!0,isNaN(Number(h))&&s.push({kind:18,label:h,insertText:h,range:{startLineNumber:n.lineNumber,startColumn:u.startColumn,endLineNumber:n.lineNumber,endColumn:u.endColumn}}))}return Promise.resolve({suggestions:s})},e.prototype.computeWordRanges=function(e,t,n,r){var i=this._getModel(e);if(!i)return Promise.resolve(Object.create(null));for(var o=new RegExp(n,r),s=Object.create(null),a=t.startLineNumber;a<t.endLineNumber;a++)for(var u=i.getLineWords(a,o),c=0,l=u;c<l.length;c++){var f=l[c];if(isNaN(Number(f.word))){var h=s[f.word];h||(h=[],s[f.word]=h),h.push({startLineNumber:a,startColumn:f.startColumn,endLineNumber:a,endColumn:f.endColumn})}}return Promise.resolve(s)},e.prototype.navigateValueSet=function(e,t,n,r,i){var o=this._getModel(e);if(!o)return Promise.resolve(null);var s=new RegExp(r,i);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});var a=o.getValueInRange(t),u=o.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},s);if(!u)return Promise.resolve(null);var c=o.getValueInRange(u),l=Ie.INSTANCE.navigateValueSet(t,a,u,c,n);return Promise.resolve(l)},e.prototype.loadForeignModule=function(e,t){var n=this,r={getMirrorModels:function(){return n._getModels()}};if(this._foreignModuleFactory){this._foreignModule=this._foreignModuleFactory(r,t);for(var i=[],o=0,s=m(this._foreignModule);o<s.length;o++){var a=s[o];"function"===typeof this._foreignModule[a]&&i.push(a)}return Promise.resolve(i)}return Promise.reject(new Error("Unexpected usage"))},e.prototype.fmr=function(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(n){return Promise.reject(n)}},e._diffLimit=1e4,e._suggestionsLimit=1e4,e}(),It=function(e){function t(t){var n=e.call(this,t)||this;return n._models=Object.create(null),n}return Tt(t,e),t.prototype.dispose=function(){this._models=Object.create(null)},t.prototype._getModel=function(e){return this._models[e]},t.prototype._getModels=function(){var e=this,t=[];return Object.keys(this._models).forEach(function(n){return t.push(e._models[n])}),t},t.prototype.acceptNewModel=function(e){this._models[e.url]=new Ot(Y.parse(e.url),e.lines,e.EOL,e.versionId)},t.prototype.acceptModelChanged=function(e,t){if(this._models[e]){var n=this._models[e];n.onEvents(t)}},t.prototype.acceptRemovedModel=function(e){this._models[e]&&delete this._models[e]},t}(Pt);"function"===typeof importScripts&&(p["a"].monaco=kt());var Mt,Rt,jt,Ft,Vt,Dt,Ut,qt,Kt,Wt,Bt,$t,Yt,Ht,zt,Gt,Jt,Qt,Xt,Zt=!1;function en(e){if(!Zt){Zt=!0;var t=new It(e),n=new b(function(e){self.postMessage(e)},t);self.onmessage=function(e){n.onmessage(e.data)}}}self.onmessage=function(e){Zt||en(null)},function(e){function t(e,t){return{line:e,character:t}}function n(e){var t=e;return kn.objectLiteral(t)&&kn.number(t.line)&&kn.number(t.character)}e.create=t,e.is=n}(Mt||(Mt={})),function(e){function t(e,t,n,r){if(kn.number(e)&&kn.number(t)&&kn.number(n)&&kn.number(r))return{start:Mt.create(e,t),end:Mt.create(n,r)};if(Mt.is(e)&&Mt.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")}function n(e){var t=e;return kn.objectLiteral(t)&&Mt.is(t.start)&&Mt.is(t.end)}e.create=t,e.is=n}(Rt||(Rt={})),function(e){function t(e,t){return{uri:e,range:t}}function n(e){var t=e;return kn.defined(t)&&Rt.is(t.range)&&(kn.string(t.uri)||kn.undefined(t.uri))}e.create=t,e.is=n}(jt||(jt={})),function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}function n(e){var t=e;return kn.defined(t)&&Rt.is(t.targetRange)&&kn.string(t.targetUri)&&(Rt.is(t.targetSelectionRange)||kn.undefined(t.targetSelectionRange))&&(Rt.is(t.originSelectionRange)||kn.undefined(t.originSelectionRange))}e.create=t,e.is=n}(Ft||(Ft={})),function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}function n(e){var t=e;return kn.number(t.red)&&kn.number(t.green)&&kn.number(t.blue)&&kn.number(t.alpha)}e.create=t,e.is=n}(Vt||(Vt={})),function(e){function t(e,t){return{range:e,color:t}}function n(e){var t=e;return Rt.is(t.range)&&Vt.is(t.color)}e.create=t,e.is=n}(Dt||(Dt={})),function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}function n(e){var t=e;return kn.string(t.label)&&(kn.undefined(t.textEdit)||Ht.is(t))&&(kn.undefined(t.additionalTextEdits)||kn.typedArray(t.additionalTextEdits,Ht.is))}e.create=t,e.is=n}(Ut||(Ut={})),function(e){e["Comment"]="comment",e["Imports"]="imports",e["Region"]="region"}(qt||(qt={})),function(e){function t(e,t,n,r,i){var o={startLine:e,endLine:t};return kn.defined(n)&&(o.startCharacter=n),kn.defined(r)&&(o.endCharacter=r),kn.defined(i)&&(o.kind=i),o}function n(e){var t=e;return kn.number(t.startLine)&&kn.number(t.startLine)&&(kn.undefined(t.startCharacter)||kn.number(t.startCharacter))&&(kn.undefined(t.endCharacter)||kn.number(t.endCharacter))&&(kn.undefined(t.kind)||kn.string(t.kind))}e.create=t,e.is=n}(Kt||(Kt={})),function(e){function t(e,t){return{location:e,message:t}}function n(e){var t=e;return kn.defined(t)&&jt.is(t.location)&&kn.string(t.message)}e.create=t,e.is=n}(Wt||(Wt={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(Bt||(Bt={})),function(e){function t(e,t,n,r,i,o){var s={range:e,message:t};return kn.defined(n)&&(s.severity=n),kn.defined(r)&&(s.code=r),kn.defined(i)&&(s.source=i),kn.defined(o)&&(s.relatedInformation=o),s}function n(e){var t=e;return kn.defined(t)&&Rt.is(t.range)&&kn.string(t.message)&&(kn.number(t.severity)||kn.undefined(t.severity))&&(kn.number(t.code)||kn.string(t.code)||kn.undefined(t.code))&&(kn.string(t.source)||kn.undefined(t.source))&&(kn.undefined(t.relatedInformation)||kn.typedArray(t.relatedInformation,Wt.is))}e.create=t,e.is=n}($t||($t={})),function(e){function t(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return kn.defined(n)&&n.length>0&&(i.arguments=n),i}function n(e){var t=e;return kn.defined(t)&&kn.string(t.title)&&kn.string(t.command)}e.create=t,e.is=n}(Yt||(Yt={})),function(e){function t(e,t){return{range:e,newText:t}}function n(e,t){return{range:{start:e,end:e},newText:t}}function r(e){return{range:e,newText:""}}function i(e){var t=e;return kn.objectLiteral(t)&&kn.string(t.newText)&&Rt.is(t.range)}e.replace=t,e.insert=n,e.del=r,e.is=i}(Ht||(Ht={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function n(e){var t=e;return kn.defined(t)&&nn.is(t.textDocument)&&Array.isArray(t.edits)}e.create=t,e.is=n}(zt||(zt={})),function(e){function t(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n}function n(e){var t=e;return t&&"create"===t.kind&&kn.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||kn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||kn.boolean(t.options.ignoreIfExists)))}e.create=t,e.is=n}(Gt||(Gt={})),function(e){function t(e,t,n){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),r}function n(e){var t=e;return t&&"rename"===t.kind&&kn.string(t.oldUri)&&kn.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||kn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||kn.boolean(t.options.ignoreIfExists)))}e.create=t,e.is=n}(Jt||(Jt={})),function(e){function t(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n}function n(e){var t=e;return t&&"delete"===t.kind&&kn.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||kn.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||kn.boolean(t.options.ignoreIfNotExists)))}e.create=t,e.is=n}(Qt||(Qt={})),function(e){function t(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(function(e){return kn.string(e.kind)?Gt.is(e)||Jt.is(e)||Qt.is(e):zt.is(e)}))}e.is=t}(Xt||(Xt={}));var tn,nn,rn,on,sn,an,un,cn,ln,fn,hn,dn,pn,mn,gn,vn,yn,bn=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(Ht.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(Ht.replace(e,t))},e.prototype.delete=function(e){this.edits.push(Ht.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}();(function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach(function(e){if(zt.is(e)){var n=new bn(e.edits);t._textEditChanges[e.textDocument.uri]=n}}):e.changes&&Object.keys(e.changes).forEach(function(n){var r=new bn(e.changes[n]);t._textEditChanges[n]=r}))}Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(nn.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e,n=this._textEditChanges[t.uri];if(!n){var r=[],i={textDocument:t,edits:r};this._workspaceEdit.documentChanges.push(i),n=new bn(r),this._textEditChanges[t.uri]=n}return n}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");n=this._textEditChanges[e];if(!n){r=[];this._workspaceEdit.changes[e]=r,n=new bn(r),this._textEditChanges[e]=n}return n},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(Gt.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(Jt.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(Qt.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")}})();(function(e){function t(e){return{uri:e}}function n(e){var t=e;return kn.defined(t)&&kn.string(t.uri)}e.create=t,e.is=n})(tn||(tn={})),function(e){function t(e,t){return{uri:e,version:t}}function n(e){var t=e;return kn.defined(t)&&kn.string(t.uri)&&(null===t.version||kn.number(t.version))}e.create=t,e.is=n}(nn||(nn={})),function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}function n(e){var t=e;return kn.defined(t)&&kn.string(t.uri)&&kn.string(t.languageId)&&kn.number(t.version)&&kn.string(t.text)}e.create=t,e.is=n}(rn||(rn={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(on||(on={})),function(e){function t(t){var n=t;return n===e.PlainText||n===e.Markdown}e.is=t}(on||(on={})),function(e){function t(e){var t=e;return kn.objectLiteral(e)&&on.is(t.kind)&&kn.string(t.value)}e.is=t}(sn||(sn={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(an||(an={})),function(e){e.PlainText=1,e.Snippet=2}(un||(un={})),function(e){function t(e){return{label:e}}e.create=t}(cn||(cn={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t}(ln||(ln={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function n(e){var t=e;return kn.string(t)||kn.objectLiteral(t)&&kn.string(t.language)&&kn.string(t.value)}e.fromPlainText=t,e.is=n}(fn||(fn={})),function(e){function t(e){var t=e;return!!t&&kn.objectLiteral(t)&&(sn.is(t.contents)||fn.is(t.contents)||kn.typedArray(t.contents,fn.is))&&(void 0===e.range||Rt.is(e.range))}e.is=t}(hn||(hn={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t}(dn||(dn={})),function(e){function t(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return kn.defined(t)&&(i.documentation=t),kn.defined(n)?i.parameters=n:i.parameters=[],i}e.create=t}(pn||(pn={})),function(e){e.Text=1,e.Read=2,e.Write=3}(mn||(mn={})),function(e){function t(e,t){var n={range:e};return kn.number(t)&&(n.kind=t),n}e.create=t}(gn||(gn={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(vn||(vn={})),function(e){function t(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o}e.create=t}(yn||(yn={}));var _n,Cn,Sn,En,xn,Nn=function(){function e(){}return e}();(function(e){function t(e,t,n,r,i,o){var s={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==o&&(s.children=o),s}function n(e){var t=e;return t&&kn.string(t.name)&&kn.number(t.kind)&&Rt.is(t.range)&&Rt.is(t.selectionRange)&&(void 0===t.detail||kn.string(t.detail))&&(void 0===t.deprecated||kn.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))}e.create=t,e.is=n})(Nn||(Nn={})),function(e){e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports"}(_n||(_n={})),function(e){function t(e,t){var n={diagnostics:e};return void 0!==t&&null!==t&&(n.only=t),n}function n(e){var t=e;return kn.defined(t)&&kn.typedArray(t.diagnostics,$t.is)&&(void 0===t.only||kn.typedArray(t.only,kn.string))}e.create=t,e.is=n}(Cn||(Cn={})),function(e){function t(e,t,n){var r={title:e};return Yt.is(t)?r.command=t:r.edit=t,void 0!==n&&(r.kind=n),r}function n(e){var t=e;return t&&kn.string(t.title)&&(void 0===t.diagnostics||kn.typedArray(t.diagnostics,$t.is))&&(void 0===t.kind||kn.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Yt.is(t.command))&&(void 0===t.edit||Xt.is(t.edit))}e.create=t,e.is=n}(Sn||(Sn={})),function(e){function t(e,t){var n={range:e};return kn.defined(t)&&(n.data=t),n}function n(e){var t=e;return kn.defined(t)&&Rt.is(t.range)&&(kn.undefined(t.command)||Yt.is(t.command))}e.create=t,e.is=n}(En||(En={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function n(e){var t=e;return kn.defined(t)&&kn.number(t.tabSize)&&kn.boolean(t.insertSpaces)}e.create=t,e.is=n}(xn||(xn={}));var wn=function(){function e(){}return e}();(function(e){function t(e,t,n){return{range:e,target:t,data:n}}function n(e){var t=e;return kn.defined(t)&&Rt.is(t.range)&&(kn.undefined(t.target)||kn.string(t.target))}e.create=t,e.is=n})(wn||(wn={}));var An,Ln;(function(e){function t(e,t,n,r){return new On(e,t,n,r)}function n(e){var t=e;return!!(kn.defined(t)&&kn.string(t.uri)&&(kn.undefined(t.languageId)||kn.string(t.languageId))&&kn.number(t.lineCount)&&kn.func(t.getText)&&kn.func(t.positionAt)&&kn.func(t.offsetAt))}function r(e,t){for(var n=e.getText(),r=i(t,function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),o=n.length,s=r.length-1;s>=0;s--){var a=r[s],u=e.offsetAt(a.range.start),c=e.offsetAt(a.range.end);if(!(c<=o))throw new Error("Overlapping edit");n=n.substring(0,u)+a.newText+n.substring(c,n.length),o=u}return n}function i(e,t){if(e.length<=1)return e;var n=e.length/2|0,r=e.slice(0,n),o=e.slice(n);i(r,t),i(o,t);var s=0,a=0,u=0;while(s<r.length&&a<o.length){var c=t(r[s],o[a]);e[u++]=c<=0?r[s++]:o[a++]}while(s<r.length)e[u++]=r[s++];while(a<o.length)e[u++]=o[a++];return e}e.create=t,e.is=n,e.applyEdits=r})(An||(An={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(Ln||(Ln={}));var kn,Tn,On=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return Mt.create(0,e);while(n<r){var i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}var o=n-1;return Mt.create(o,e-t[o])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e}();function Pn(e,t){void 0===t&&(t=!1);var n=0,r=e.length,i="",o=0,s=16,a=0;function u(t,r){var i=0,o=0;while(i<t||!r){var s=e.charCodeAt(n);if(s>=48&&s<=57)o=16*o+s-48;else if(s>=65&&s<=70)o=16*o+s-65+10;else{if(!(s>=97&&s<=102))break;o=16*o+s-97+10}n++,i++}return i<t&&(o=-1),o}function c(e){n=e,i="",o=0,s=16,a=0}function l(){var t=n;if(48===e.charCodeAt(n))n++;else{n++;while(n<e.length&&Rn(e.charCodeAt(n)))n++}if(n<e.length&&46===e.charCodeAt(n)){if(n++,!(n<e.length&&Rn(e.charCodeAt(n))))return a=3,e.substring(t,n);n++;while(n<e.length&&Rn(e.charCodeAt(n)))n++}var r=n;if(n<e.length&&(69===e.charCodeAt(n)||101===e.charCodeAt(n)))if(n++,(n<e.length&&43===e.charCodeAt(n)||45===e.charCodeAt(n))&&n++,n<e.length&&Rn(e.charCodeAt(n))){n++;while(n<e.length&&Rn(e.charCodeAt(n)))n++;r=n}else a=3;return e.substring(t,r)}function f(){var t="",i=n;while(1){if(n>=r){t+=e.substring(i,n),a=2;break}var o=e.charCodeAt(n);if(34===o){t+=e.substring(i,n),n++;break}if(92!==o){if(o>=0&&o<=31){if(Mn(o)){t+=e.substring(i,n),a=2;break}a=6}n++}else{if(t+=e.substring(i,n),n++,n>=r){a=2;break}switch(o=e.charCodeAt(n++),o){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var s=u(4,!0);s>=0?t+=String.fromCharCode(s):a=4;break;default:a=5}i=n}}return t}function h(){if(i="",a=0,o=n,n>=r)return o=r,s=17;var t=e.charCodeAt(n);if(In(t)){do{n++,i+=String.fromCharCode(t),t=e.charCodeAt(n)}while(In(t));return s=15}if(Mn(t))return n++,i+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,i+="\n"),s=14;switch(t){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,i=f(),s=10;case 47:var u=n-1;if(47===e.charCodeAt(n+1)){n+=2;while(n<r){if(Mn(e.charCodeAt(n)))break;n++}return i=e.substring(u,n),s=12}if(42===e.charCodeAt(n+1)){n+=2;var c=r-1,h=!1;while(n<c){var p=e.charCodeAt(n);if(42===p&&47===e.charCodeAt(n+1)){n+=2,h=!0;break}n++}return h||(n++,a=1),i=e.substring(u,n),s=13}return i+=String.fromCharCode(t),n++,s=16;case 45:if(i+=String.fromCharCode(t),n++,n===r||!Rn(e.charCodeAt(n)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=l(),s=11;default:while(n<r&&d(t))n++,t=e.charCodeAt(n);if(o!==n){switch(i=e.substring(o,n),i){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return i+=String.fromCharCode(t),n++,s=16}}function d(e){if(In(e)||Mn(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function p(){var e;do{e=h()}while(e>=12&&e<=15);return e}return{setPosition:c,getPosition:function(){return n},scan:t?p:h,getToken:function(){return s},getTokenValue:function(){return i},getTokenOffset:function(){return o},getTokenLength:function(){return n-o},getTokenError:function(){return a}}}function In(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function Mn(e){return 10===e||13===e||8232===e||8233===e}function Rn(e){return e>=48&&e<=57}function jn(e,t,n){var r,i,o,s,a;if(t){s=t.offset,a=s+t.length,o=s;while(o>0&&!Un(e,o-1))o--;var u=a;while(u<e.length&&!Un(e,u))u++;i=e.substring(o,u),r=Vn(i,n)}else i=e,r=0,o=0,s=0,a=e.length;var c,l=Dn(n,e),f=!1,h=0;c=n.insertSpaces?Fn(" ",n.tabSize||4):"\t";var d=Pn(i,!1),p=!1;function m(){return l+Fn(c,r+h)}function g(){var e=d.scan();f=!1;while(15===e||14===e)f=f||14===e,e=d.scan();return p=16===e||0!==d.getTokenError(),e}var v=[];function y(t,n,r){!p&&n<a&&r>s&&e.substring(n,r)!==t&&v.push({offset:n,length:r-n,content:t})}var b=g();if(17!==b){var _=d.getTokenOffset()+o,C=Fn(c,r);y(C,o,_)}while(17!==b){var S=d.getTokenOffset()+d.getTokenLength()+o,E=g(),x="";while(!f&&(12===E||13===E)){var N=d.getTokenOffset()+o;y(" ",S,N),S=d.getTokenOffset()+d.getTokenLength()+o,x=12===E?m():"",E=g()}if(2===E)1!==b&&(h--,x=m());else if(4===E)3!==b&&(h--,x=m());else{switch(b){case 3:case 1:h++,x=m();break;case 5:case 12:x=m();break;case 13:x=f?m():" ";break;case 6:x=" ";break;case 10:if(6===E){x="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===E||13===E?x=" ":5!==E&&17!==E&&(p=!0);break;case 16:p=!0;break}!f||12!==E&&13!==E||(x=m())}var w=d.getTokenOffset()+o;y(x,S,w),b=E}return v}function Fn(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function Vn(e,t){var n=0,r=0,i=t.tabSize||4;while(n<e.length){var o=e.charAt(n);if(" "===o)r++;else{if("\t"!==o)break;r+=i}n++}return Math.floor(r/i)}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t.charAt(n);if("\r"===r)return n+1<t.length&&"\n"===t.charAt(n+1)?"\r\n":"\r";if("\n"===r)return"\n"}return e&&e.eol||"\n"}function Un(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function qn(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=Tn.DEFAULT);var r=null,i=[],o=[];function s(e){Array.isArray(i)?i.push(e):r&&(i[r]=e)}var a={onObjectBegin:function(){var e={};s(e),o.push(i),i=e,r=null},onObjectProperty:function(e){r=e},onObjectEnd:function(){i=o.pop()},onArrayBegin:function(){var e=[];s(e),o.push(i),i=e,r=null},onArrayEnd:function(){i=o.pop()},onLiteralValue:s,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}};return Yn(e,a,n),i[0]}function Kn(e){if(!e.parent||!e.parent.children)return[];var t=Kn(e.parent);if("property"===e.parent.type){var n=e.parent.children[0].value;t.push(n)}else if("array"===e.parent.type){var r=e.parent.children.indexOf(e);-1!==r&&t.push(r)}return t}function Wn(e){switch(e.type){case"array":return e.children.map(Wn);case"object":for(var t=Object.create(null),n=0,r=e.children;n<r.length;n++){var i=r[n],o=i.children[1];o&&(t[i.children[0].value]=Wn(o))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Bn(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}function $n(e,t,n){if(void 0===n&&(n=!1),Bn(e,t,n)){var r=e.children;if(Array.isArray(r))for(var i=0;i<r.length&&r[i].offset<=t;i++){var o=$n(r[i],t,n);if(o)return o}return e}}function Yn(e,t,n){void 0===n&&(n=Tn.DEFAULT);var r=Pn(e,!1);function i(e){return e?function(){return e(r.getTokenOffset(),r.getTokenLength())}:function(){return!0}}function o(e){return e?function(t){return e(t,r.getTokenOffset(),r.getTokenLength())}:function(){return!0}}var s=i(t.onObjectBegin),a=o(t.onObjectProperty),u=i(t.onObjectEnd),c=i(t.onArrayBegin),l=i(t.onArrayEnd),f=o(t.onLiteralValue),h=o(t.onSeparator),d=i(t.onComment),p=o(t.onError),m=n&&n.disallowComments,g=n&&n.allowTrailingComma;function v(){while(1){var e=r.scan();switch(r.getTokenError()){case 4:y(14);break;case 5:y(15);break;case 3:y(13);break;case 1:m||y(11);break;case 2:y(12);break;case 6:y(16);break}switch(e){case 12:case 13:m?y(10):d();break;case 16:y(1);break;case 15:case 14:break;default:return e}}}function y(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),p(e),t.length+n.length>0){var i=r.getToken();while(17!==i){if(-1!==t.indexOf(i)){v();break}if(-1!==n.indexOf(i))break;i=v()}}}function b(e){var t=r.getTokenValue();return e?f(t):a(t),v(),!0}function _(){switch(r.getToken()){case 11:var e=0;try{e=JSON.parse(r.getTokenValue()),"number"!==typeof e&&(y(2),e=0)}catch(t){y(2)}f(e);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return v(),!0}function C(){return 10!==r.getToken()?(y(3,[],[2,5]),!1):(b(!1),6===r.getToken()?(h(":"),v(),x()||y(4,[],[2,5])):y(5,[],[2,5]),!0)}function S(){s(),v();var e=!1;while(2!==r.getToken()&&17!==r.getToken()){if(5===r.getToken()){if(e||y(4,[],[]),h(","),v(),2===r.getToken()&&g)break}else e&&y(6,[],[]);C()||y(4,[],[2,5]),e=!0}return u(),2!==r.getToken()?y(7,[2],[]):v(),!0}function E(){c(),v();var e=!1;while(4!==r.getToken()&&17!==r.getToken()){if(5===r.getToken()){if(e||y(4,[],[]),h(","),v(),4===r.getToken()&&g)break}else e&&y(6,[],[]);x()||y(4,[],[4,5]),e=!0}return l(),4!==r.getToken()?y(8,[4],[]):v(),!0}function x(){switch(r.getToken()){case 3:return E();case 1:return S();case 10:return b(!0);default:return _()}}return v(),17===r.getToken()||(x()?(17!==r.getToken()&&y(9,[],[]),!0):(y(4,[],[]),!1))}(function(e){var t=Object.prototype.toString;function n(e){return"undefined"!==typeof e}function r(e){return"undefined"===typeof e}function i(e){return!0===e||!1===e}function o(e){return"[object String]"===t.call(e)}function s(e){return"[object Number]"===t.call(e)}function a(e){return"[object Function]"===t.call(e)}function u(e){return null!==e&&"object"===typeof e}function c(e,t){return Array.isArray(e)&&e.every(t)}e.defined=n,e.undefined=r,e.boolean=i,e.string=o,e.number=s,e.func=a,e.objectLiteral=u,e.typedArray=c})(kn||(kn={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(Tn||(Tn={}));var Hn,zn,Gn,Jn=Pn,Qn=qn,Xn=$n,Zn=Kn,er=Wn;function tr(e,t,n){return jn(e,t,n)}function nr(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!nr(e[n],t[n]))return!1}else{var i=[];for(r in e)i.push(r);i.sort();var o=[];for(r in t)o.push(r);if(o.sort(),!nr(i,o))return!1;for(n=0;n<i.length;n++)if(!nr(e[i[n]],t[i[n]]))return!1}return!0}function rr(e){return"number"===typeof e}function ir(e){return"undefined"!==typeof e}function or(e){return"boolean"===typeof e}function sr(e){return"string"===typeof e}function ar(e,t){var n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,function(e,n){var r=n[0];return"undefined"!==typeof t[r]?t[r]:e}),n}function ur(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return ar(t,n)}function cr(e){return ur}(function(e){e["Empty"]="",e["Statement"]="statement",e["Declaration"]="declaration"})(Hn||(Hn={})),function(e){e[e["Undefined"]=0]="Undefined",e[e["EnumValueMismatch"]=1]="EnumValueMismatch",e[e["UnexpectedEndOfComment"]=257]="UnexpectedEndOfComment",e[e["UnexpectedEndOfString"]=258]="UnexpectedEndOfString",e[e["UnexpectedEndOfNumber"]=259]="UnexpectedEndOfNumber",e[e["InvalidUnicode"]=260]="InvalidUnicode",e[e["InvalidEscapeCharacter"]=261]="InvalidEscapeCharacter",e[e["InvalidCharacter"]=262]="InvalidCharacter",e[e["PropertyExpected"]=513]="PropertyExpected",e[e["CommaExpected"]=514]="CommaExpected",e[e["ColonExpected"]=515]="ColonExpected",e[e["ValueExpected"]=516]="ValueExpected",e[e["CommaOrCloseBacketExpected"]=517]="CommaOrCloseBacketExpected",e[e["CommaOrCloseBraceExpected"]=518]="CommaOrCloseBraceExpected",e[e["TrailingComma"]=519]="TrailingComma",e[e["DuplicateKey"]=520]="DuplicateKey",e[e["CommentNotPermitted"]=521]="CommentNotPermitted",e[e["SchemaResolveError"]=768]="SchemaResolveError"}(zn||(zn={})),function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[on.Markdown,on.PlainText]}}}}}(Gn||(Gn={}));var lr,fr=n("c623"),hr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),dr=cr(),pr=/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/,mr=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,gr=function(){function e(e,t,n){this.offset=t,this.length=n,this.parent=e}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),vr=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="null",r.value=null,r}return hr(t,e),t}(gr),yr=function(e){function t(t,n,r){var i=e.call(this,t,r)||this;return i.type="boolean",i.value=n,i}return hr(t,e),t}(gr),br=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="array",r.items=[],r}return hr(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(gr),_r=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="number",r.isInteger=!0,r.value=Number.NaN,r}return hr(t,e),t}(gr),Cr=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.type="string",i.value="",i}return hr(t,e),t}(gr),Sr=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="property",r.colonOffset=-1,r}return hr(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(gr),Er=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="object",r.properties=[],r}return hr(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(gr);function xr(e){return or(e)?e?{}:{not:{}}:e}(function(e){e[e["Key"]=0]="Key",e[e["Enum"]=1]="Enum"})(lr||(lr={}));var Nr=function(){function e(e,t){void 0===e&&(e=-1),void 0===t&&(t=null),this.focusOffset=e,this.exclude=t,this.schemas=[]}return e.prototype.add=function(e){this.schemas.push(e)},e.prototype.merge=function(e){var t;(t=this.schemas).push.apply(t,e.schemas)},e.prototype.include=function(e){return(-1===this.focusOffset||Or(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),wr=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.add=function(e){},e.prototype.merge=function(e){},e.prototype.include=function(e){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),Ar=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this.merge(r)}},e.prototype.merge=function(e){this.problems=this.problems.concat(e.problems)},e.prototype.mergeEnumValues=function(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(var t=0,n=this.problems;t<n.length;t++){var r=n[t];r.code===zn.EnumValueMismatch&&(r.message=dr("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map(function(e){return JSON.stringify(e)}).join(", ")))}}},e.prototype.mergePropertyMatch=function(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++},e.prototype.compare=function(e){var t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches},e}();function Lr(e,t){return void 0===t&&(t=[]),new Pr(e,t,[])}function kr(e){return er(e)}function Tr(e){return Zn(e)}function Or(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}var Pr=function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=[]),this.root=e,this.syntaxErrors=t,this.comments=n}return e.prototype.getNodeFromOffset=function(e,t){if(void 0===t&&(t=!1),this.root)return Xn(this.root,e,t)},e.prototype.visit=function(e){if(this.root){var t=function(n){var r=e(n),i=n.children;if(Array.isArray(i))for(var o=0;o<i.length&&r;o++)r=t(i[o]);return r};t(this.root)}},e.prototype.validate=function(e,t){if(this.root&&t){var n=new Ar;return Ir(this.root,t,n,wr.instance),n.problems.map(function(t){var n=Rt.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return $t.create(n,t.message,t.severity,t.code)})}return null},e.prototype.getMatchingSchemas=function(e,t,n){void 0===t&&(t=-1),void 0===n&&(n=null);var r=new Nr(t,n);return this.root&&e&&Ir(this.root,e,new Ar,r),r.schemas},e}();function Ir(e,t,n,r){if(e&&r.include(e)){switch(e.type){case"object":u(e,t,n,r);break;case"array":a(e,t,n,r);break;case"string":s(e,t,n,r);break;case"number":o(e,t,n,r);break;case"property":return Ir(e.valueNode,t,n,r)}i(),r.add({node:e,schema:t})}function i(){function i(t){return e.type===t||"integer"===t&&"number"===e.type&&e.isInteger}if(Array.isArray(t.type)?t.type.some(i)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:t.errorMessage||dr("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(i(t.type)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:t.errorMessage||dr("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(var o=0,s=t.allOf;o<s.length;o++){var a=s[o];Ir(e,xr(a),n,r)}var u=xr(t.not);if(u){var c=new Ar,l=r.newSub();Ir(e,u,c,l),c.hasProblems()||n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("notSchemaWarning","Matches a schema that is not allowed.")});for(var f=0,h=l.schemas;f<h.length;f++){var d=h[f];d.inverted=!d.inverted,r.add(d)}}var p=function(t,i){for(var o=[],s=null,a=0,u=t;a<u.length;a++){var c=u[a],l=xr(c),f=new Ar,h=r.newSub();if(Ir(e,l,f,h),f.hasProblems()||o.push(l),s)if(i||f.hasProblems()||s.validationResult.hasProblems()){var d=f.compare(s.validationResult);d>0?s={schema:l,validationResult:f,matchingSchemas:h}:0===d&&(s.matchingSchemas.merge(h),s.validationResult.mergeEnumValues(f))}else s.matchingSchemas.merge(h),s.validationResult.propertiesMatches+=f.propertiesMatches,s.validationResult.propertiesValueMatches+=f.propertiesValueMatches;else s={schema:l,validationResult:f,matchingSchemas:h}}return o.length>1&&i&&n.problems.push({location:{offset:e.offset,length:1},severity:Bt.Warning,message:dr("oneOfWarning","Matches multiple schemas when only one must validate.")}),null!==s&&(n.merge(s.validationResult),n.propertiesMatches+=s.validationResult.propertiesMatches,n.propertiesValueMatches+=s.validationResult.propertiesValueMatches,r.merge(s.matchingSchemas)),o.length};Array.isArray(t.anyOf)&&p(t.anyOf,!1),Array.isArray(t.oneOf)&&p(t.oneOf,!0);var m=function(t){var i=new Ar,o=r.newSub();Ir(e,xr(t),i,o),n.merge(i),n.propertiesMatches+=i.propertiesMatches,n.propertiesValueMatches+=i.propertiesValueMatches,r.merge(o)},g=function(t,n,i){var o=xr(t),s=new Ar,a=r.newSub();Ir(e,o,s,a),r.merge(a),s.hasProblems()?i&&m(i):n&&m(n)},v=xr(t.if);if(v&&g(v,xr(t.then),xr(t.else)),Array.isArray(t.enum)){for(var y=kr(e),b=!1,_=0,C=t.enum;_<C.length;_++){var S=C[_];if(nr(y,S)){b=!0;break}}n.enumValues=t.enum,n.enumValueMatch=b,b||n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,code:zn.EnumValueMismatch,message:t.errorMessage||dr("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(function(e){return JSON.stringify(e)}).join(", "))})}if(ir(t.const)){y=kr(e);nr(y,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,code:zn.EnumValueMismatch,message:t.errorMessage||dr("constWarning","Value must be {0}.",JSON.stringify(t.const))}),n.enumValueMatch=!1),n.enumValues=[t.const]}t.deprecationMessage&&e.parent&&n.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:Bt.Warning,message:t.deprecationMessage})}function o(e,t,n,r){var i=e.value;function o(e,t){return rr(t)?t:or(t)&&t?e:void 0}function s(e,t){if(!or(t)||!t)return e}rr(t.multipleOf)&&i%t.multipleOf!==0&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("multipleOfWarning","Value is not divisible by {0}.",t.multipleOf)});var a=o(t.minimum,t.exclusiveMinimum);rr(a)&&i<=a&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",a)});var u=o(t.maximum,t.exclusiveMaximum);rr(u)&&i>=u&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",u)});var c=s(t.minimum,t.exclusiveMinimum);rr(c)&&i<c&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("minimumWarning","Value is below the minimum of {0}.",c)});var l=s(t.maximum,t.exclusiveMaximum);rr(l)&&i>l&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("maximumWarning","Value is above the maximum of {0}.",l)})}function s(e,t,n,r){if(rr(t.minLength)&&e.value.length<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("minLengthWarning","String is shorter than the minimum length of {0}.",t.minLength)}),rr(t.maxLength)&&e.value.length>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("maxLengthWarning","String is longer than the maximum length of {0}.",t.maxLength)}),sr(t.pattern)){var i=new RegExp(t.pattern);i.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:t.patternErrorMessage||t.errorMessage||dr("patternWarning",'String does not match the pattern of "{0}".',t.pattern)})}if(t.format)switch(t.format){case"uri":case"uri-reference":var o=void 0;if(e.value)try{var s=fr["a"].parse(e.value);s.scheme||"uri"!==t.format||(o=dr("uriSchemeMissing","URI with a scheme is expected."))}catch(a){o=a.message}else o=dr("uriEmpty","URI expected.");o&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:t.patternErrorMessage||t.errorMessage||dr("uriFormatWarning","String is not a URI: {0}",o)});break;case"email":e.value.match(mr)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:t.patternErrorMessage||t.errorMessage||dr("emailFormatWarning","String is not an e-mail address.")});break;case"color-hex":e.value.match(pr)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:t.patternErrorMessage||t.errorMessage||dr("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.")});break;default:}}function a(e,t,n,r){if(Array.isArray(t.items)){for(var i=t.items,o=0;o<i.length;o++){var s=i[o],a=xr(s),u=new Ar,c=e.items[o];c?(Ir(c,a,u,r),n.mergePropertyMatch(u)):e.items.length>=i.length&&n.propertiesValueMatches++}if(e.items.length>i.length)if("object"===typeof t.additionalItems)for(var l=i.length;l<e.items.length;l++){u=new Ar;Ir(e.items[l],t.additionalItems,u,r),n.mergePropertyMatch(u)}else!1===t.additionalItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",i.length)})}else{var f=xr(t.items);if(f)for(var h=0,d=e.items;h<d.length;h++){c=d[h],u=new Ar;Ir(c,f,u,r),n.mergePropertyMatch(u)}}var p=xr(t.contains);if(p){var m=e.items.some(function(e){var t=new Ar;return Ir(e,p,t,wr.instance),!t.hasProblems()});m||n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:t.errorMessage||dr("requiredItemMissingWarning","Array does not contain required item.")})}if(rr(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("minItemsWarning","Array has too few items. Expected {0} or more.",t.minItems)}),rr(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("maxItemsWarning","Array has too many items. Expected {0} or fewer.",t.maxItems)}),!0===t.uniqueItems){var g=kr(e),v=g.some(function(e,t){return t!==g.lastIndexOf(e)});v&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("uniqueItemsWarning","Array has duplicate items.")})}}function u(e,t,n,r){for(var i=Object.create(null),o=[],s=0,a=e.properties;s<a.length;s++){var u=a[s],c=u.keyNode.value;i[c]=u.valueNode,o.push(c)}if(Array.isArray(t.required))for(var l=0,f=t.required;l<f.length;l++){var h=f[l];if(!i[h]){var d=e.parent&&"property"===e.parent.type&&e.parent.keyNode,p=d?{offset:d.offset,length:d.length}:{offset:e.offset,length:1};n.problems.push({location:p,severity:Bt.Warning,message:dr("MissingRequiredPropWarning",'Missing property "{0}".',h)})}}var m=function(e){var t=o.indexOf(e);while(t>=0)o.splice(t,1),t=o.indexOf(e)};if(t.properties)for(var g=0,v=Object.keys(t.properties);g<v.length;g++){h=v[g];m(h);var y=t.properties[h],b=i[h];if(b)if(or(y))if(y)n.propertiesMatches++,n.propertiesValueMatches++;else{u=b.parent;n.problems.push({location:{offset:u.keyNode.offset,length:u.keyNode.length},severity:Bt.Warning,message:t.errorMessage||dr("DisallowedExtraPropWarning","Property {0} is not allowed.",h)})}else{var _=new Ar;Ir(b,y,_,r),n.mergePropertyMatch(_)}}if(t.patternProperties)for(var C=0,S=Object.keys(t.patternProperties);C<S.length;C++)for(var E=S[C],x=new RegExp(E),N=0,w=o.slice(0);N<w.length;N++){h=w[N];if(x.test(h)){m(h);b=i[h];if(b){y=t.patternProperties[E];if(or(y))if(y)n.propertiesMatches++,n.propertiesValueMatches++;else{u=b.parent;n.problems.push({location:{offset:u.keyNode.offset,length:u.keyNode.length},severity:Bt.Warning,message:t.errorMessage||dr("DisallowedExtraPropWarning","Property {0} is not allowed.",h)})}else{_=new Ar;Ir(b,y,_,r),n.mergePropertyMatch(_)}}}}if("object"===typeof t.additionalProperties)for(var A=0,L=o;A<L.length;A++){h=L[A],b=i[h];if(b){_=new Ar;Ir(b,t.additionalProperties,_,r),n.mergePropertyMatch(_)}}else if(!1===t.additionalProperties&&o.length>0)for(var k=0,T=o;k<T.length;k++){h=T[k],b=i[h];if(b){u=b.parent;n.problems.push({location:{offset:u.keyNode.offset,length:u.keyNode.length},severity:Bt.Warning,message:t.errorMessage||dr("DisallowedExtraPropWarning","Property {0} is not allowed.",h)})}}if(rr(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("MaxPropWarning","Object has more properties than limit of {0}.",t.maxProperties)}),rr(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("MinPropWarning","Object has fewer properties than the required number of {0}",t.minProperties)}),t.dependencies)for(var O=0,P=Object.keys(t.dependencies);O<P.length;O++){c=P[O];var I=i[c];if(I){var M=t.dependencies[c];if(Array.isArray(M))for(var R=0,j=M;R<j.length;R++){var F=j[R];i[F]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},severity:Bt.Warning,message:dr("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",F,c)})}else{y=xr(M);if(y){_=new Ar;Ir(e,y,_,r),n.mergePropertyMatch(_)}}}}var V=xr(t.propertyNames);if(V)for(var D=0,U=e.properties;D<U.length;D++){var q=U[D];c=q.keyNode;c&&Ir(c,V,n,wr.instance)}}}function Mr(e,t){var n=[],r=-1,i=e.getText(),o=Jn(i,!1),s=t&&t.collectComments?[]:void 0;function a(){while(1){var t=o.scan();switch(l(),t){case 12:case 13:Array.isArray(s)&&s.push(Rt.create(e.positionAt(o.getTokenOffset()),e.positionAt(o.getTokenOffset()+o.getTokenLength())));break;case 15:case 14:break;default:return t}}}function u(t,i,o,s,a){if(void 0===a&&(a=Bt.Error),0===n.length||o!==r){var u=Rt.create(e.positionAt(o),e.positionAt(s));n.push($t.create(u,t,a,i,e.languageId)),r=o}}function c(e,t,n,r,s){void 0===n&&(n=null),void 0===r&&(r=[]),void 0===s&&(s=[]);var c=o.getTokenOffset(),l=o.getTokenOffset()+o.getTokenLength();if(c===l&&c>0){c--;while(c>0&&/\s/.test(i.charAt(c)))c--;l=c+1}if(u(e,t,c,l),n&&f(n,!1),r.length+s.length>0){var h=o.getToken();while(17!==h){if(-1!==r.indexOf(h)){a();break}if(-1!==s.indexOf(h))break;h=a()}}return n}function l(){switch(o.getTokenError()){case 4:return c(dr("InvalidUnicode","Invalid unicode sequence in string."),zn.InvalidUnicode),!0;case 5:return c(dr("InvalidEscapeCharacter","Invalid escape character in string."),zn.InvalidEscapeCharacter),!0;case 3:return c(dr("UnexpectedEndOfNumber","Unexpected end of number."),zn.UnexpectedEndOfNumber),!0;case 1:return c(dr("UnexpectedEndOfComment","Unexpected end of comment."),zn.UnexpectedEndOfComment),!0;case 2:return c(dr("UnexpectedEndOfString","Unexpected end of string."),zn.UnexpectedEndOfString),!0;case 6:return c(dr("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),zn.InvalidCharacter),!0}return!1}function f(e,t){return e.length=o.getTokenOffset()+o.getTokenLength()-e.offset,t&&a(),e}function h(e){if(3!==o.getToken())return null;var t=new br(e,o.getTokenOffset());a();var n=0,r=!1;while(4!==o.getToken()&&17!==o.getToken()){if(5===o.getToken()){r||c(dr("ValueExpected","Value expected"),zn.ValueExpected);var i=o.getTokenOffset();if(a(),4===o.getToken()){r&&u(dr("TrailingComma","Trailing comma"),zn.TrailingComma,i,i+1);continue}}else r&&c(dr("ExpectedComma","Expected comma"),zn.CommaExpected);var s=y(t,n++);s?t.items.push(s):c(dr("PropertyExpected","Value expected"),zn.ValueExpected,null,[],[4,5]),r=!0}return 4!==o.getToken()?c(dr("ExpectedCloseBracket","Expected comma or closing bracket"),zn.CommaOrCloseBacketExpected,t):f(t,!0)}function d(t,n){var r=new Sr(t,o.getTokenOffset()),i=m(r);if(!i){if(16!==o.getToken())return null;c(dr("DoubleQuotesExpected","Property keys must be doublequoted"),zn.Undefined);var s=new Cr(r,o.getTokenOffset(),o.getTokenLength());s.value=o.getTokenValue(),i=s,a()}r.keyNode=i;var l=n[i.value];if(l?(u(dr("DuplicateKeyWarning","Duplicate object key"),zn.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,Bt.Warning),"object"===typeof l&&u(dr("DuplicateKeyWarning","Duplicate object key"),zn.DuplicateKey,l.keyNode.offset,l.keyNode.offset+l.keyNode.length,Bt.Warning),n[i.value]=!0):n[i.value]=r,6===o.getToken())r.colonOffset=o.getTokenOffset(),a();else if(c(dr("ColonExpected","Colon expected"),zn.ColonExpected),10===o.getToken()&&e.positionAt(i.offset+i.length).line<e.positionAt(o.getTokenOffset()).line)return r.length=i.length,r;var f=y(r,i.value);return f?(r.valueNode=f,r.length=f.offset+f.length-r.offset,r):c(dr("ValueExpected","Value expected"),zn.ValueExpected,r,[],[2,5])}function p(e){if(1!==o.getToken())return null;var t=new Er(e,o.getTokenOffset()),n=Object.create(null);a();var r=!1;while(2!==o.getToken()&&17!==o.getToken()){if(5===o.getToken()){r||c(dr("PropertyExpected","Property expected"),zn.PropertyExpected);var i=o.getTokenOffset();if(a(),2===o.getToken()){r&&u(dr("TrailingComma","Trailing comma"),zn.TrailingComma,i,i+1);continue}}else r&&c(dr("ExpectedComma","Expected comma"),zn.CommaExpected);var s=d(t,n);s?t.properties.push(s):c(dr("PropertyExpected","Property expected"),zn.PropertyExpected,null,[],[2,5]),r=!0}return 2!==o.getToken()?c(dr("ExpectedCloseBrace","Expected comma or closing brace"),zn.CommaOrCloseBraceExpected,t):f(t,!0)}function m(e){if(10!==o.getToken())return null;var t=new Cr(e,o.getTokenOffset());return t.value=o.getTokenValue(),f(t,!0)}function g(e){if(11!==o.getToken())return null;var t=new _r(e,o.getTokenOffset());if(0===o.getTokenError()){var n=o.getTokenValue();try{var r=JSON.parse(n);if(!rr(r))return c(dr("InvalidNumberFormat","Invalid number format."),zn.Undefined,t);t.value=r}catch(i){return c(dr("InvalidNumberFormat","Invalid number format."),zn.Undefined,t)}t.isInteger=-1===n.indexOf(".")}return f(t,!0)}function v(e){switch(o.getToken()){case 7:return f(new vr(e,o.getTokenOffset()),!0);case 8:return f(new yr(e,!0,o.getTokenOffset()),!0);case 9:return f(new yr(e,!1,o.getTokenOffset()),!0);default:return null}}function y(e,t){return h(e)||p(e)||m(e)||g(e)||v(e)}var b=null,_=a();return 17!==_&&(b=y(null,null),b?17!==o.getToken()&&c(dr("End of file expected","End of file expected."),zn.Undefined):c(dr("Invalid symbol","Expected a JSON object, array or literal."),zn.Undefined)),new Pr(b,n,s)}function Rr(e,t,n){if(null!==e&&"object"===typeof e){var r=t+"\t";if(Array.isArray(e)){if(0===e.length)return"[]";for(var i="[\n",o=0;o<e.length;o++)i+=r+Rr(e[o],r,n),o<e.length-1&&(i+=","),i+="\n";return i+=t+"]",i}var s=Object.keys(e);if(0===s.length)return"{}";for(i="{\n",o=0;o<s.length;o++){var a=s[o];i+=r+JSON.stringify(a)+": "+Rr(e[a],r,n),o<s.length-1&&(i+=","),i+="\n"}return i+=t+"}",i}return n(e)}function jr(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function Fr(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}function Vr(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}var Dr=cr(),Ur=function(){function e(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=Promise),void 0===r&&(r={}),this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=r,this.templateVarIdCounter=0}return e.prototype.doResolve=function(e){for(var t=this.contributions.length-1;t>=0;t--)if(this.contributions[t].resolveCompletion){var n=this.contributions[t].resolveCompletion(e);if(n)return n}return this.promiseConstructor.resolve(e)},e.prototype.doComplete=function(e,t,n){var r=this,i={items:[],isIncomplete:!1},o=e.offsetAt(t),s=n.getNodeFromOffset(o,!0);if(this.isInComment(e,s?s.offset:0,o))return Promise.resolve(i);var a=this.getCurrentWord(e,o),u=null;if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){var c=o-a.length;c>0&&'"'===e.getText()[c-1]&&c--,u=Rt.create(e.positionAt(c),t)}else u=Rt.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));var l={},f={add:function(e){var t=l[e.label];t?t.documentation||(t.documentation=e.documentation):(l[e.label]=e,u&&(e.textEdit=Ht.replace(u,e.insertText)),i.items.push(e))},setAsIncomplete:function(){i.isIncomplete=!0},error:function(e){console.error(e)},log:function(e){console.log(e)},getNumberOfProposals:function(){return i.items.length}};return this.schemaService.getSchemaForResource(e.uri,n).then(function(t){var c=[],h=!0,d="",p=null;if(s&&"string"===s.type){var m=s.parent;m&&"property"===m.type&&m.keyNode===s&&(h=!m.valueNode,p=m,d=e.getText().substr(s.offset+1,s.length-2),m&&(s=m.parent))}if(s&&"object"===s.type){if(s.offset===o)return i;var g=s.properties;g.forEach(function(e){p&&p===e||(l[e.keyNode.value]=cn.create("__"))});var v="";h&&(v=r.evaluateSeparatorAfter(e,e.offsetAt(u.end))),t?r.getPropertyCompletions(t,n,s,h,v,f):r.getSchemaLessPropertyCompletions(n,s,d,f);var y=Tr(s);r.contributions.forEach(function(t){var n=t.collectPropertyCompletions(e.uri,y,a,h,""===v,f);n&&c.push(n)}),!t&&a.length>0&&'"'!==e.getText().charAt(o-a.length-1)&&(f.add({kind:an.Property,label:r.getLabelForValue(a),insertText:r.getInsertTextForProperty(a,null,!1,v),insertTextFormat:un.Snippet,documentation:""}),f.setAsIncomplete())}var b={};return t?r.getValueCompletions(t,n,s,o,e,f,b):r.getSchemaLessValueCompletions(n,s,o,e,f),r.contributions.length>0&&r.getContributedValueCompletions(n,s,o,e,f,c),r.promiseConstructor.all(c).then(function(){if(0===f.getNumberOfProposals()){var t=o;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);var n=r.evaluateSeparatorAfter(e,t);r.addFillerValueCompletions(b,n,f)}return i})})},e.prototype.getPropertyCompletions=function(e,t,n,r,i,o){var s=this,a=t.getMatchingSchemas(e.schema,n.offset);a.forEach(function(e){if(e.node===n&&!e.inverted){var t=e.schema.properties;t&&Object.keys(t).forEach(function(e){var n=t[e];if("object"===typeof n&&!n.deprecationMessage&&!n.doNotSuggest){var a={kind:an.Property,label:s.sanitizeLabel(e),insertText:s.getInsertTextForProperty(e,n,r,i),insertTextFormat:un.Snippet,filterText:s.getFilterTextForValue(e),documentation:s.fromMarkup(n.markdownDescription)||n.description||""};Fr(a.insertText,"$1"+i)&&(a.command={title:"Suggest",command:"editor.action.triggerSuggest"}),o.add(a)}})}})},e.prototype.getSchemaLessPropertyCompletions=function(e,t,n,r){var i=this,o=function(e){e.properties.forEach(function(e){var t=e.keyNode.value;r.add({kind:an.Property,label:i.sanitizeLabel(t),insertText:i.getInsertTextForValue(t,""),insertTextFormat:un.Snippet,filterText:i.getFilterTextForValue(t),documentation:""})})};if(t.parent)if("property"===t.parent.type){var s=t.parent.keyNode.value;e.visit(function(e){return"property"===e.type&&e!==t.parent&&e.keyNode.value===s&&e.valueNode&&"object"===e.valueNode.type&&o(e.valueNode),!0})}else"array"===t.parent.type&&t.parent.items.forEach(function(e){"object"===e.type&&e!==t&&o(e)});else"object"===t.type&&r.add({kind:an.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:un.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(e,t,n,r,i){var o=this,s=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(s=t.offset+t.length,t=t.parent),!t)return i.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:un.Snippet,documentation:""}),void i.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:un.Snippet,documentation:""});var a=this.evaluateSeparatorAfter(r,s),u=function(e){Or(e.parent,n,!0)||i.add({kind:o.getSuggestionKind(e.type),label:o.getLabelTextForMatchingNode(e,r),insertText:o.getInsertTextForMatchingNode(e,r,a),insertTextFormat:un.Snippet,documentation:""}),"boolean"===e.type&&o.addBooleanValueCompletion(!e.value,a,i)};if("property"===t.type&&n>t.colonOffset){var c=t.valueNode;if(c&&(n>c.offset+c.length||"object"===c.type||"array"===c.type))return;var l=t.keyNode.value;e.visit(function(e){return"property"===e.type&&e.keyNode.value===l&&e.valueNode&&u(e.valueNode),!0}),"$schema"===l&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(a,i)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){var f=t.parent.keyNode.value;e.visit(function(e){return"property"===e.type&&e.keyNode.value===f&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(u),!0})}else t.items.forEach(u)},e.prototype.getValueCompletions=function(e,t,n,r,i,o,s){var a=this,u=r,c=null,l=null;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(u=n.offset+n.length,l=n,n=n.parent),n){if("property"===n.type&&r>n.colonOffset){var f=n.valueNode;if(f&&r>f.offset+f.length)return;c=n.keyNode.value,n=n.parent}if(n&&(null!==c||"array"===n.type)){var h=this.evaluateSeparatorAfter(i,u),d=t.getMatchingSchemas(e.schema,n.offset,l);d.forEach(function(e){if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items)if(Array.isArray(e.schema.items)){var t=a.findItemAtOffset(n,i,r);t<e.schema.items.length&&a.addSchemaValueCompletions(e.schema.items[t],h,o,s)}else a.addSchemaValueCompletions(e.schema.items,h,o,s);if(e.schema.properties){var u=e.schema.properties[c];u&&a.addSchemaValueCompletions(u,h,o,s)}}}),"$schema"!==c||n.parent||this.addDollarSchemaCompletions(h,o),s["boolean"]&&(this.addBooleanValueCompletion(!0,h,o),this.addBooleanValueCompletion(!1,h,o)),s["null"]&&this.addNullValueCompletion(h,o)}}else this.addSchemaValueCompletions(e.schema,"",o,s)},e.prototype.getContributedValueCompletions=function(e,t,n,r,i,o){if(t){if("string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(t=t.parent),"property"===t.type&&n>t.colonOffset){var s=t.keyNode.value,a=t.valueNode;if(!a||n<=a.offset+a.length){var u=Tr(t.parent);this.contributions.forEach(function(e){var t=e.collectValueCompletions(r.uri,u,s,i);t&&o.push(t)})}}}else this.contributions.forEach(function(e){var t=e.collectDefaultCompletions(r.uri,i);t&&o.push(t)})},e.prototype.addSchemaValueCompletions=function(e,t,n,r){var i=this;"object"===typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach(function(e){return i.addSchemaValueCompletions(e,t,n,r)}),Array.isArray(e.anyOf)&&e.anyOf.forEach(function(e){return i.addSchemaValueCompletions(e,t,n,r)}),Array.isArray(e.oneOf)&&e.oneOf.forEach(function(e){return i.addSchemaValueCompletions(e,t,n,r)}))},e.prototype.addDefaultValueCompletions=function(e,t,n,r){var i=this;void 0===r&&(r=0);var o=!1;if(ir(e.default)){for(var s=e.type,a=e.default,u=r;u>0;u--)a=[a],s="array";n.add({kind:this.getSuggestionKind(s),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,t),insertTextFormat:un.Snippet,detail:Dr("json.suggest.default","Default value")}),o=!0}Array.isArray(e.examples)&&e.examples.forEach(function(s){for(var a=e.type,u=s,c=r;c>0;c--)u=[u],a="array";n.add({kind:i.getSuggestionKind(a),label:i.getLabelForValue(u),insertText:i.getInsertTextForValue(u,t),insertTextFormat:un.Snippet}),o=!0}),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(function(s){var a,u,c=e.type,l=s.body,f=s.label;if(ir(l)){e.type;for(var h=r;h>0;h--)l=[l],"array";a=i.getInsertTextForSnippetValue(l,t),u=i.getFilterTextForSnippetValue(l),f=f||i.getLabelForSnippetValue(l)}else if("string"===typeof s.bodyText){var d="",p="",m="";for(h=r;h>0;h--)d=d+m+"[\n",p=p+"\n"+m+"]",m+="\t",c="array";a=d+m+s.bodyText.split("\n").join("\n"+m)+p+t,f=f||i.sanitizeLabel(a),u=a.replace(/[\n]/g,"")}n.add({kind:i.getSuggestionKind(c),label:f,documentation:i.fromMarkup(s.markdownDescription)||s.description,insertText:a,insertTextFormat:un.Snippet,filterText:u}),o=!0}),o||"object"!==typeof e.items||Array.isArray(e.items)||this.addDefaultValueCompletions(e.items,t,n,r+1)},e.prototype.addEnumValueCompletions=function(e,t,n){if(ir(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:un.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(var r=0,i=e.enum.length;r<i;r++){var o=e.enum[r],s=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&r<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?s=this.fromMarkup(e.markdownEnumDescriptions[r]):e.enumDescriptions&&r<e.enumDescriptions.length&&(s=e.enumDescriptions[r]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(o),insertText:this.getInsertTextForValue(o,t),insertTextFormat:un.Snippet,documentation:s})}},e.prototype.collectTypes=function(e,t){if(!Array.isArray(e.enum)&&!ir(e.const)){var n=e.type;Array.isArray(n)?n.forEach(function(e){return t[e]=!0}):t[n]=!0}},e.prototype.addFillerValueCompletions=function(e,t,n){e["object"]&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:un.Snippet,detail:Dr("defaults.object","New object"),documentation:""}),e["array"]&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:un.Snippet,detail:Dr("defaults.array","New array"),documentation:""})},e.prototype.addBooleanValueCompletion=function(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:un.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:un.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(e,t){var n=this,r=this.schemaService.getRegisteredSchemaIds(function(e){return"http"===e||"https"===e});r.forEach(function(r){return t.add({kind:an.Module,label:n.getLabelForValue(r),filterText:n.getFilterTextForValue(r),insertText:n.getInsertTextForValue(r,e),insertTextFormat:un.Snippet,documentation:""})})},e.prototype.sanitizeLabel=function(e){return e=e.replace(/[\n]/g,"β΅"),e.length>57&&(e=e.substr(0,57).trim()+"..."),e},e.prototype.getLabelForValue=function(e){return this.sanitizeLabel(JSON.stringify(e))},e.prototype.getFilterTextForValue=function(e){return JSON.stringify(e)},e.prototype.getFilterTextForSnippetValue=function(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(e){var t=JSON.stringify(e);return t=t.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1"),this.sanitizeLabel(t)},e.prototype.getInsertTextForPlainText=function(e){return e.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(e,t){var n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)},e.prototype.getInsertTextForSnippetValue=function(e,t){var n=function(e){return"string"===typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e)};return Rr(e,"",n)+t},e.prototype.getInsertTextForGuessedValue=function(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":var n=JSON.stringify(e);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)},e.prototype.getSuggestionKind=function(e){if(Array.isArray(e)){var t=e;e=t.length>0?t[0]:null}if(!e)return an.Value;switch(e){case"string":return an.Value;case"object":return an.Module;case"property":return an.Property;default:return an.Value}},e.prototype.getLabelTextForMatchingNode=function(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:var n=t.getText().substr(e.offset,e.length);return n}},e.prototype.getInsertTextForMatchingNode=function(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}},e.prototype.getInsertTextForProperty=function(e,t,n,r){var i=this.getInsertTextForValue(e,"");if(!n)return i;var o,s=i+": ",a=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){var u=t.defaultSnippets[0].body;ir(u)&&(o=this.getInsertTextForSnippetValue(u,""))}a+=t.defaultSnippets.length}if(t.enum&&(o||1!==t.enum.length||(o=this.getInsertTextForGuessedValue(t.enum[0],"")),a+=t.enum.length),ir(t.default)&&(o||(o=this.getInsertTextForGuessedValue(t.default,"")),a++),0===a){var c=Array.isArray(t.type)?t.type[0]:t.type;switch(c||(t.properties?c="object":t.items&&(c="array")),c){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return i}}}return(!o||a>1)&&(o="$1"),s+o+r},e.prototype.getCurrentWord=function(e,t){var n=t-1,r=e.getText();while(n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n)))n--;return r.substring(n+1,t)},e.prototype.evaluateSeparatorAfter=function(e,t){var n=Jn(e.getText(),!0);n.setPosition(t);var r=n.scan();switch(r){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(e,t,n){for(var r=Jn(t.getText(),!0),i=e.items,o=i.length-1;o>=0;o--){var s=i[o];if(n>s.offset+s.length){r.setPosition(s.offset+s.length);var a=r.scan();return 5===a&&n>=r.getTokenOffset()+r.getTokenLength()?o+1:o}if(n>=s.offset)return o}return 0},e.prototype.isInComment=function(e,t,n){var r=Jn(e.getText(),!1);r.setPosition(t);var i=r.scan();while(17!==i&&r.getTokenOffset()+r.getTokenLength()<n)i=r.scan();return(12===i||13===i)&&r.getTokenOffset()<=n},e.prototype.fromMarkup=function(e){if(e&&this.doesSupportMarkdown())return{kind:on.Markdown,value:e}},e.prototype.doesSupportMarkdown=function(){if(!ir(this.supportsMarkdown)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&-1!==e.completionItem.documentationFormat.indexOf(on.Markdown)}return this.supportsMarkdown},e}(),qr=function(){function e(e,t,n){void 0===t&&(t=[]),this.schemaService=e,this.contributions=t,this.promise=n||Promise}return e.prototype.doHover=function(e,t,n){var r=e.offsetAt(t),i=n.getNodeFromOffset(r);if(!i||("object"===i.type||"array"===i.type)&&r>i.offset+1&&r<i.offset+i.length-1)return this.promise.resolve(null);var o=i;if("string"===i.type){var s=i.parent;if(s&&"property"===s.type&&s.keyNode===i&&(i=s.valueNode,!i))return this.promise.resolve(null)}for(var a=Rt.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length)),u=function(e){var t={contents:e,range:a};return t},c=Tr(i),l=this.contributions.length-1;l>=0;l--){var f=this.contributions[l],h=f.getInfoContribution(e.uri,c);if(h)return h.then(function(e){return u(e)})}return this.schemaService.getSchemaForResource(e.uri,n).then(function(e){if(e){var t=n.getMatchingSchemas(e.schema,i.offset),r=null,o=null,s=null,a=null;t.every(function(e){if(e.node===i&&!e.inverted&&e.schema&&(r=r||e.schema.title,o=o||e.schema.markdownDescription||Kr(e.schema.description),e.schema.enum)){var t=e.schema.enum.indexOf(kr(i));e.schema.markdownEnumDescriptions?s=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(s=Kr(e.schema.enumDescriptions[t])),s&&(a=e.schema.enum[t],"string"!==typeof a&&(a=JSON.stringify(a)))}return!0});var c="";return r&&(c=Kr(r)),o&&(c.length>0&&(c+="\n\n"),c+=o),s&&(c.length>0&&(c+="\n\n"),c+="`"+Kr(a)+"`: "+s),u([c])}return null})},e}();function Kr(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3");return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}var Wr=cr(),Br=function(){function e(e){try{this.patternRegExp=new RegExp(Vr(e)+"$")}catch(t){this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(e){this.schemas.push(e)},e.prototype.matchesPattern=function(e){return this.patternRegExp&&this.patternRegExp.test(e)},e.prototype.getSchemas=function(){return this.schemas},e}(),$r=function(){function e(e,t,n){this.service=e,this.url=t,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new Yr(n)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var e=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(t){return e.service.resolveSchemaContent(t,e.url,e.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e}(),Yr=function(){function e(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t}return e}(),Hr=function(){function e(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t}return e.prototype.getSection=function(e){return xr(this.getSectionRecursive(e,this.schema))},e.prototype.getSectionRecursive=function(e,t){if(!t||"boolean"===typeof t||0===e.length)return t;var n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(var r=0,i=Object.keys(t.patternProperties);r<i.length;r++){var o=i[r],s=new RegExp(o);if(s.test(n))return this.getSectionRecursive(e,t.patternProperties[o])}else{if("object"===typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){var a=parseInt(n,10);if(!isNaN(a)&&t.items[a])return this.getSectionRecursive(e,t.items[a])}else if(t.items)return this.getSectionRecursive(e,t.items)}return null},e}(),zr=function(){function e(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(e){return Object.keys(this.registeredSchemasIds).filter(function(t){var n=fr["a"].parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){while(this.callOnDispose.length>0)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(e){var t=this,n=!1;e=this.normalizeId(e);var r=[e],i=Object.keys(this.schemasById).map(function(e){return t.schemasById[e]});while(r.length)for(var o=r.pop(),s=0;s<i.length;s++){var a=i[s];a&&(a.url===o||a.dependencies[o])&&(a.url!==o&&r.push(a.url),a.clearSchema(),i[s]=void 0,n=!0)}return n},e.prototype.normalizeId=function(e){return fr["a"].parse(e).toString()},e.prototype.setSchemaContributions=function(e){if(e.schemas){var t=e.schemas;for(var n in t){var r=this.normalizeId(n);this.contributionSchemas[r]=this.addSchemaHandle(r,t[n])}}if(e.schemaAssociations){var i=e.schemaAssociations;for(var o in i){var s=i[o];this.contributionAssociations[o]=s;for(var a=this.getOrAddFilePatternAssociation(o),u=0,c=s;u<c.length;u++){var l=c[u];n=this.normalizeId(l);a.addSchema(n)}}}},e.prototype.addSchemaHandle=function(e,t){var n=new $r(this,e,t);return this.schemasById[e]=n,n},e.prototype.getOrAddSchemaHandle=function(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)},e.prototype.getOrAddFilePatternAssociation=function(e){var t=this.filePatternAssociationById[e];return t||(t=new Br(e),this.filePatternAssociationById[e]=t,this.filePatternAssociations.push(t)),t},e.prototype.registerExternalSchema=function(e,t,n){void 0===t&&(t=null);var r=this.normalizeId(e);if(this.registeredSchemasIds[r]=!0,t)for(var i=0,o=t;i<o.length;i++){var s=o[i];this.getOrAddFilePatternAssociation(s).addSchema(r)}return n?this.addSchemaHandle(r,n):this.getOrAddSchemaHandle(r)},e.prototype.clearExternalSchemas=function(){for(var e in this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={},this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(var t in this.contributionAssociations)for(var n=this.getOrAddFilePatternAssociation(t),r=0,i=this.contributionAssociations[t];r<i.length;r++){var o=i[r];e=this.normalizeId(o);n.addSchema(e)}},e.prototype.getResolvedSchema=function(e){var t=this.normalizeId(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(e){if(!this.requestService){var t=Wr("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Gr(e));return this.promise.resolve(new Yr({},[t]))}return this.requestService(e).then(function(t){if(!t){var n=Wr("json.schema.nocontent","Unable to load schema from '{0}': No content.",Gr(e));return new Yr({},[n])}var r={},i=[];r=Qn(t,i);var o=i.length?[Wr("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Gr(e),i[0].offset)]:[];return new Yr(r,o)},function(e){var t=e.toString(),n=e.toString().split("Error: ");return n.length>1&&(t=n[1]),new Yr({},[t])})},e.prototype.resolveSchemaContent=function(e,t,n){var r=this,i=e.errors.slice(0),o=e.schema,s=this.contextService,a=function(e,t){if(!t)return e;var n=e;return"/"===t[0]&&(t=t.substr(1)),t.split("/").some(function(e){return n=n[e],!n}),n},u=function(e,t,n,r){var o=a(t,r);if(o)for(var s in o)o.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(e[s]=o[s]);else i.push(Wr("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",r,n))},c=function(e,t,n,o,a){s&&!/^\w+:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,o)),t=r.normalizeId(t);var c=r.getOrAddSchemaHandle(t);return c.getUnresolvedSchema().then(function(r){if(a[t]=!0,r.errors.length){var o=n?t+"#"+n:t;i.push(Wr("json.schema.problemloadingref","Problems loading reference '{0}': {1}",o,r.errors[0]))}return u(e,r.schema,t,n),l(e,r.schema,t,c.dependencies)})},l=function(e,t,n,i){if(!e||"object"!==typeof e)return Promise.resolve(null);var o=[e],s=[],a=[],l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var i=r[n];"object"===typeof i&&o.push(i)}},f=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var i=r[n];if("object"===typeof i)for(var s in i){var a=i[s];"object"===typeof a&&o.push(a)}}},h=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var i=r[n];if(Array.isArray(i))for(var s=0,a=i;s<a.length;s++){var u=a[s];"object"===typeof u&&o.push(u)}}},d=function(e){var r=[];while(e.$ref){var o=e.$ref,s=o.split("#",2);if(delete e.$ref,s[0].length>0)return void a.push(c(e,s[0],s[1],n,i));-1===r.indexOf(o)&&(u(e,t,n,s[1]),r.push(o))}l(e.items,e.additionalProperties,e.not,e.contains,e.propertyNames,e.if,e.then,e.else),f(e.definitions,e.properties,e.patternProperties,e.dependencies),h(e.anyOf,e.allOf,e.oneOf,e.items)};while(o.length){var p=o.pop();s.indexOf(p)>=0||(s.push(p),d(p))}return r.promise.all(a)};return l(o,o,t,n).then(function(e){return new Hr(o,i)})},e.prototype.getSchemaForResource=function(e,t){if(t&&t.root&&"object"===t.root.type){var n=t.root.properties.filter(function(e){return"$schema"===e.keyNode.value&&e.valueNode&&"string"===e.valueNode.type});if(n.length>0){var r=kr(n[0].valueNode);if(r&&jr(r,".")&&this.contextService&&(r=this.contextService.resolveRelativePath(r,e)),r){var i=this.normalizeId(r);return this.getOrAddSchemaHandle(i).getResolvedSchema()}}}for(var o=Object.create(null),s=[],a=0,u=this.filePatternAssociations;a<u.length;a++){var c=u[a];if(c.matchesPattern(e))for(var l=0,f=c.getSchemas();l<f.length;l++){var h=f[l];o[h]||(s.push(h),o[h]=!0)}}return s.length>0?this.createCombinedSchema(e,s).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map(function(e){return{$ref:e}})};return this.addSchemaHandle(n,r)},e}();function Gr(e){try{var t=fr["a"].parse(e);if("file"===t.scheme)return t.fsPath}catch(n){}return e}var Jr=cr(),Qr=function(){function e(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}return e.prototype.configure=function(e){e&&(this.validationEnabled=e.validate,this.commentSeverity=e.allowComments?void 0:Bt.Error)},e.prototype.doValidation=function(e,t,n,r){var i=this;if(!this.validationEnabled)return this.promise.resolve([]);var o=[],s={},a=function(e){var t=e.range.start.line+" "+e.range.start.character+" "+e.message;s[t]||(s[t]=!0,o.push(e))},u=function(r){var s=n?ei(n.trailingCommas):Bt.Error,u=n?ei(n.comments):i.commentSeverity;if(r){if(r.errors.length&&t.root){var c=t.root,l="object"===c.type?c.properties[0]:null;if(l&&"$schema"===l.keyNode.value){var f=l.valueNode||l,h=Rt.create(e.positionAt(f.offset),e.positionAt(f.offset+f.length));a($t.create(h,r.errors[0],Bt.Warning,zn.SchemaResolveError))}else{h=Rt.create(e.positionAt(c.offset),e.positionAt(c.offset+1));a($t.create(h,r.errors[0],Bt.Warning,zn.SchemaResolveError))}}else{var d=t.validate(e,r.schema);d&&d.forEach(a)}Zr(r.schema)&&(s=u=void 0)}for(var p=0,m=t.syntaxErrors;p<m.length;p++){var g=m[p];if(g.code===zn.TrailingComma){if("number"!==typeof s)continue;g.severity=s}a(g)}if("number"===typeof u){var v=Jr("InvalidCommentToken","Comments are not permitted in JSON.");t.comments.forEach(function(e){a($t.create(e,v,u,zn.CommentNotPermitted))})}return o};if(r){var c=r.id||"schemaservice://untitled/"+Xr++;return this.jsonSchemaService.resolveSchemaContent(new Yr(r),c,{}).then(function(e){return u(e)})}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(function(e){return u(e)})},e}(),Xr=0;function Zr(e){if(e&&"object"===typeof e){if(e.allowComments)return!0;if(e.allOf)return e.allOf.some(Zr)}return!1}function ei(e){switch(e){case"error":return Bt.Error;case"warning":return Bt.Warning;case"ignore":return}}var ti=48,ni=57,ri=65,ii=97,oi=102;function si(e){return e<ti?0:e<=ni?e-ti:(e<ii&&(e+=ii-ri),e>=ii&&e<=oi?e-ii+10:0)}function ai(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*si(e.charCodeAt(1))/255,green:17*si(e.charCodeAt(2))/255,blue:17*si(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*si(e.charCodeAt(1))/255,green:17*si(e.charCodeAt(2))/255,blue:17*si(e.charCodeAt(3))/255,alpha:17*si(e.charCodeAt(4))/255};case 7:return{red:(16*si(e.charCodeAt(1))+si(e.charCodeAt(2)))/255,green:(16*si(e.charCodeAt(3))+si(e.charCodeAt(4)))/255,blue:(16*si(e.charCodeAt(5))+si(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*si(e.charCodeAt(1))+si(e.charCodeAt(2)))/255,green:(16*si(e.charCodeAt(3))+si(e.charCodeAt(4)))/255,blue:(16*si(e.charCodeAt(5))+si(e.charCodeAt(6)))/255,alpha:(16*si(e.charCodeAt(7))+si(e.charCodeAt(8)))/255}}return null}var ui=function(){function e(e){this.schemaService=e}return e.prototype.findDocumentSymbols=function(e,t){var n=this,r=t.root;if(!r)return null;var i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||Fr(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){var o=[];return r.items.forEach(function(t){if("object"===t.type)for(var n=0,r=t.properties;n<r.length;n++){var i=r[n];if("key"===i.keyNode.value&&i.valueNode){if(i.valueNode){var s=jt.create(e.uri,ci(e,t));o.push({name:kr(i.valueNode),kind:vn.Function,location:s})}return}}}),o}var s=function(t,r,i){return"array"===r.type?r.items.forEach(function(e){return s(t,e,i)}):"object"===r.type&&r.properties.forEach(function(r){var o=jt.create(e.uri,ci(e,r)),a=r.valueNode;if(a){var u=i?i+"."+r.keyNode.value:r.keyNode.value;t.push({name:n.getKeyLabel(r),kind:n.getSymbolKind(a.type),location:o,containerName:i}),s(t,a,u)}}),t},a=s([],r,void 0);return a},e.prototype.findDocumentSymbols2=function(e,t){var n=this,r=t.root;if(!r)return null;var i=e.uri;if(("vscode://defaultsettings/keybindings.json"===i||Fr(i.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){var o=[];return r.items.forEach(function(t){if("object"===t.type)for(var n=0,r=t.properties;n<r.length;n++){var i=r[n];if("key"===i.keyNode.value){if(i.valueNode){var s=ci(e,t),a=ci(e,i.keyNode);o.push({name:kr(i.valueNode),kind:vn.Function,range:s,selectionRange:a})}return}}}),o}var s=function(t,r){return"array"===r.type?r.items.forEach(function(r,i){if(r){var o=ci(e,r),a=o,u=String(i),c=s([],r);t.push({name:u,kind:n.getSymbolKind(r.type),range:o,selectionRange:a,children:c})}}):"object"===r.type&&r.properties.forEach(function(r){var i=r.valueNode;if(i){var o=ci(e,r),a=ci(e,r.keyNode),u=s([],i);t.push({name:n.getKeyLabel(r),kind:n.getSymbolKind(i.type),range:o,selectionRange:a,children:u})}}),t},a=s([],r);return a},e.prototype.getSymbolKind=function(e){switch(e){case"object":return vn.Module;case"string":return vn.String;case"number":return vn.Number;case"array":return vn.Array;case"boolean":return vn.Boolean;default:return vn.Variable}},e.prototype.getKeyLabel=function(e){var t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"β΅")),t&&t.trim()?t:'"'+t+'"'},e.prototype.findDocumentColors=function(e,t){return this.schemaService.getSchemaForResource(e.uri,t).then(function(n){var r=[];if(n)for(var i=t.getMatchingSchemas(n.schema),o={},s=0,a=i;s<a.length;s++){var u=a[s];if(!u.inverted&&u.schema&&("color"===u.schema.format||"color-hex"===u.schema.format)&&u.node&&"string"===u.node.type){var c=String(u.node.offset);if(!o[c]){var l=ai(kr(u.node));if(l){var f=ci(e,u.node);r.push({color:l,range:f})}o[c]=!0}}}return r})},e.prototype.getColorPresentations=function(e,t,n,r){var i,o=[],s=Math.round(255*n.red),a=Math.round(255*n.green),u=Math.round(255*n.blue);function c(e){var t=e.toString(16);return 2!==t.length?"0"+t:t}return i=1===n.alpha?"#"+c(s)+c(a)+c(u):"#"+c(s)+c(a)+c(u)+c(Math.round(255*n.alpha)),o.push({label:i,textEdit:Ht.replace(r,JSON.stringify(i))}),o},e}();function ci(e,t){return Rt.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var li,fi=cr(),hi={schemaAssociations:{},schemas:{"http://json-schema.org/draft-04/schema#":{title:fi("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{title:fi("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},di={id:fi("schema.json.id","A unique identifier for the schema."),$schema:fi("schema.json.$schema","The schema to verify this document against."),title:fi("schema.json.title","A descriptive title of the element."),description:fi("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:fi("schema.json.default","A default value. Used by suggestions."),multipleOf:fi("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:fi("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:fi("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:fi("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:fi("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:fi("schema.json.maxLength","The maximum length of a string."),minLength:fi("schema.json.minLength","The minimum length of a string."),pattern:fi("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:fi("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:fi("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:fi("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:fi("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:fi("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:fi("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:fi("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:fi("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:fi("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:fi("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:fi("schema.json.properties","A map of property names to schemas for each property."),patternProperties:fi("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:fi("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:fi("schema.json.enum","The set of literal values that are valid."),type:fi("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:fi("schema.json.format","Describes the format expected for the value."),allOf:fi("schema.json.allOf","An array of schemas, all of which must match."),anyOf:fi("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:fi("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:fi("schema.json.not","A schema which must not match."),$id:fi("schema.json.$id","A unique identifier for the schema."),$ref:fi("schema.json.$ref","Reference a definition hosted on any location."),$comment:fi("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:fi("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:fi("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:fi("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:fi("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:fi("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:fi("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:fi("schema.json.contentEncoding","Describes the content encoding of a string property."),if:fi("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:fi("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:fi("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(var pi in hi.schemas){var mi=hi.schemas[pi];for(var gi in mi.properties){var vi=mi.properties[gi];!0===vi&&(vi=mi.properties[gi]={});var yi=di[gi];yi?vi["description"]=yi:console.log(gi+": localize('schema.json."+gi+'\', "")')}}function bi(e,t){var n=[],r=[],i=[],o=-1,s=Jn(e.getText(),!1),a=s.scan();function u(e){n.push(e),r.push(i.length)}while(17!==a){switch(a){case 1:case 3:var c=e.positionAt(s.getTokenOffset()).line,l={startLine:c,endLine:c,kind:1===a?"object":"array"};i.push(l);break;case 2:case 4:var f=2===a?"object":"array";if(i.length>0&&i[i.length-1].kind===f){l=i.pop();var h=e.positionAt(s.getTokenOffset()).line;l&&h>l.startLine+1&&o!==l.startLine&&(l.endLine=h-1,u(l),o=l.startLine)}break;case 13:c=e.positionAt(s.getTokenOffset()).line;var d=e.positionAt(s.getTokenOffset()+s.getTokenLength()).line;1===s.getTokenError()&&c+1<e.lineCount?s.setPosition(e.offsetAt(Mt.create(c+1,0))):c<d&&(u({startLine:c,endLine:d,kind:qt.Comment}),o=c);break;case 12:var p=e.getText().substr(s.getTokenOffset(),s.getTokenLength()),m=p.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(m){h=e.positionAt(s.getTokenOffset()).line;if(m[1]){l={startLine:h,endLine:h,kind:qt.Region};i.push(l)}else{var g=i.length-1;while(g>=0&&i[g].kind!==qt.Region)g--;if(g>=0){l=i[g];i.length=g,h>l.startLine&&o!==l.startLine&&(l.endLine=h,u(l),o=l.startLine)}}}break}a=s.scan()}var v=t&&t.rangeLimit;if("number"!==typeof v||n.length<=v)return n;for(var y=[],b=0,_=r;b<_.length;b++){var C=_[b];C<30&&(y[C]=(y[C]||0)+1)}var S=0,E=0;for(g=0;g<y.length;g++){var x=y[g];if(x){if(x+S>v){E=g;break}S+=x}}var N=[];for(g=0;g<n.length;g++){C=r[g];"number"===typeof C&&(C<E||C===E&&S++<v)&&N.push(n[g])}return N}function _i(e,t,n){function r(t){var r=e.offsetAt(t),o=n.getNodeFromOffset(r,!0);if(!o)return[];var a=[];while(o){switch(o.type){case"string":case"object":case"array":var u=o.offset+1,c=o.offset+o.length-1;u<c&&r>=u&&r<=c&&a.push(i(u,c)),a.push(i(o.offset,o.offset+o.length));break;case"number":case"boolean":case"null":case"property":a.push(i(o.offset,o.offset+o.length));break}if("property"===o.type||o.parent&&"array"===o.parent.type){var l=s(o.offset+o.length,5);-1!==l&&a.push(i(o.offset,l))}o=o.parent}return a}function i(t,n){return{range:Rt.create(e.positionAt(t),e.positionAt(n)),kind:Hn.Declaration}}var o=Jn(e.getText(),!0);function s(e,t){o.setPosition(e);var n=o.scan();return n===t?o.getTokenOffset()+o.getTokenLength():-1}return t.map(r)}function Ci(e){var t=e.promiseConstructor||Promise,n=new zr(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(hi);var r=new Ur(n,e.contributions,t,e.clientCapabilities),i=new qr(n,e.contributions,t),o=new ui(n),s=new Qr(n,t);return{configure:function(e){n.clearExternalSchemas(),e.schemas&&e.schemas.forEach(function(e){n.registerExternalSchema(e.uri,e.fileMatch,e.schema)}),s.configure(e)},resetSchema:function(e){return n.onResourceChange(e)},doValidation:s.doValidation.bind(s),parseJSONDocument:function(e){return Mr(e,{collectComments:!0})},newJSONDocument:function(e,t){return Lr(e,t)},doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:o.findDocumentSymbols.bind(o),findDocumentSymbols2:o.findDocumentSymbols2.bind(o),findColorSymbols:function(e,t){return o.findDocumentColors(e,t).then(function(e){return e.map(function(e){return e.range})})},findDocumentColors:o.findDocumentColors.bind(o),getColorPresentations:o.getColorPresentations.bind(o),doHover:i.doHover.bind(i),getFoldingRanges:bi,getSelectionRanges:_i,format:function(e,t,n){var r=void 0;if(t){var i=e.offsetAt(t.start),o=e.offsetAt(t.end)-i;r={offset:i,length:o}}var s={tabSize:n?n.tabSize:4,insertSpaces:!n||n.insertSpaces,eol:"\n"};return tr(e.getText(),r,s).map(function(t){return Ht.replace(Rt.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)})}}}"undefined"!==typeof fetch&&(li=function(e){return fetch(e).then(function(e){return e.text()})});var Si=function(){function e(e){this.wrapped=new Promise(e)}return e.prototype.then=function(e,t){var n=this.wrapped;return n.then(e,t)},e.prototype.getWrapped=function(){return this.wrapped},e.resolve=function(e){return Promise.resolve(e)},e.reject=function(e){return Promise.reject(e)},e.all=function(e){return Promise.all(e)},e}(),Ei=function(){function e(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=Ci({schemaRequestService:t.enableSchemaRequest&&li,promiseConstructor:Si}),this._languageService.configure(this._languageSettings)}return e.prototype.doValidation=function(e){var t=this._getTextDocument(e);if(t){var n=this._languageService.parseJSONDocument(t);return this._languageService.doValidation(t,n)}return Promise.resolve([])},e.prototype.doComplete=function(e,t){var n=this._getTextDocument(e),r=this._languageService.parseJSONDocument(n);return this._languageService.doComplete(n,t,r)},e.prototype.doResolve=function(e){return this._languageService.doResolve(e)},e.prototype.doHover=function(e,t){var n=this._getTextDocument(e),r=this._languageService.parseJSONDocument(n);return this._languageService.doHover(n,t,r)},e.prototype.format=function(e,t,n){var r=this._getTextDocument(e),i=this._languageService.format(r,t,n);return Promise.resolve(i)},e.prototype.resetSchema=function(e){return Promise.resolve(this._languageService.resetSchema(e))},e.prototype.findDocumentSymbols=function(e){var t=this._getTextDocument(e),n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentSymbols(t,n);return Promise.resolve(r)},e.prototype.findDocumentColors=function(e){var t=this._getTextDocument(e),n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentColors(t,n);return Promise.resolve(r)},e.prototype.getColorPresentations=function(e,t,n){var r=this._getTextDocument(e),i=this._languageService.parseJSONDocument(r),o=this._languageService.getColorPresentations(r,i,t,n);return Promise.resolve(o)},e.prototype.provideFoldingRanges=function(e,t){var n=this._getTextDocument(e),r=this._languageService.getFoldingRanges(n,t);return Promise.resolve(r)},e.prototype._getTextDocument=function(e){for(var t=this._ctx.getMirrorModels(),n=0,r=t;n<r.length;n++){var i=r[n];if(i.uri.toString()===e)return An.create(e,this._languageId,i.version,i.getValue())}return null},e}();self.onmessage=function(){en(function(e,t){return new Ei(e,t)})}}});
//# sourceMappingURL=json.worker.js.map