text: !function(e){this.webpackChunk=function(t,r){for(var i in r)e[i]=r[i];for(;t.length;)n[t.pop()]=1};var t={},n={0:1};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t,n){"use strict";(function(e,r){var i;n.d(t,"a",function(){return o}),n.d(t,"b",function(){return s}),function(){var t=Object.create(null);t["WinJS/Core/_WinJS"]={};var n=function(e,n,r){var i={},o=!1,s=n.map(function(e){return"exports"===e?(o=!0,i):t[e]}),a=r.apply({},s);t[e]=o?i:a};n("WinJS/Core/_Global",[],function(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==e?e:{}}),n("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],function(e){var t=null;return{hasWinRT:!!e.Windows,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:function(n){null===t&&(t=e.setImmediate?e.setImmediate.bind(e):void 0!==r&&"function"==typeof r.nextTick?r.nextTick.bind(r):e.setTimeout.bind(e)),t(n)}}}),n("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],function(e){return e.msWriteProfilerMark||function(){}}),n("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],function(e,t,n,r){function i(e,t,n){var r,i,o,s=Object.keys(t),a=Array.isArray(e);for(i=0,o=s.length;i<o;i++){var u=s[i],c=95!==u.charCodeAt(0),l=t[u];!l||"object"!=typeof l||void 0===l.value&&"function"!=typeof l.get&&"function"!=typeof l.set?c?a?e.forEach(function(e){e[u]=l}):e[u]=l:(r=r||{})[u]={value:l,enumerable:c,configurable:!0,writable:!0}:(void 0===l.enumerable&&(l.enumerable=c),n&&l.setName&&"function"==typeof l.setName&&l.setName(n+"."+u),(r=r||{})[u]=l)}r&&(a?e.forEach(function(e){Object.defineProperties(e,r)}):Object.defineProperties(e,r))}return function(){var n=e;function o(n,r){var i=n||{};if(r){var o=r.split(".");i===t&&"WinJS"===o[0]&&(i=e,o.splice(0,1));for(var s=0,a=o.length;s<a;s++){var u=o[s];i[u]||Object.defineProperty(i,u,{value:{},writable:!1,enumerable:!0,configurable:!0}),i=i[u]}}return i}function s(e,t,n){var r=o(e,t);return n&&i(r,n,t||"<ANONYMOUS>"),r}n.Namespace||(n.Namespace=Object.create(Object.prototype));var a={uninitialized:1,working:2,initialized:3};Object.defineProperties(n.Namespace,{defineWithParent:{value:s,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return s(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,i=a.uninitialized;return{setName:function(e){t=e},get:function(){switch(i){case a.initialized:return n;case a.uninitialized:i=a.working;try{r("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{r("WinJS.Namespace._lazy:"+t+",StopTM"),i=a.uninitialized}return e=null,i=a.initialized,n;case a.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(i){case a.working:throw"Illegal: reentrancy on initialization";default:i=a.initialized,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,n,r){var s=[e],a=null;return n&&(a=o(t,n),s.push(a)),i(s,r,n||"<ANONYMOUS>"),a},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,r){return e=e||function(){},n.markSupportedForProcessing(e),t&&i(e.prototype,t),r&&i(e,r),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,r,o,s){if(e){r=r||function(){};var a=e.prototype;return r.prototype=Object.create(a),n.markSupportedForProcessing(r),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,configurable:!0,enumerable:!0}),o&&i(r.prototype,o),s&&i(r,s),r}return t(r,o,s)},mix:function(e){var t,n;for(e=e||function(){},t=1,n=arguments.length;t<n;t++)i(e.prototype,arguments[t]);return e}})}(),{Namespace:e.Namespace,Class:e.Class}}),n("WinJS/Core/_ErrorFromName",["WinJS/Core/_Base"],function(e){var t=e.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1});return e.Namespace.define("WinJS",{ErrorFromName:t}),t}),n("WinJS/Core/_Events",["exports","WinJS/Core/_Base"],function(e,t){function n(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(n){var r=this[t];n?(r||(r={wrapper:function(e){return r.userHandler(e)},userHandler:n},Object.defineProperty(this,t,{value:r,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,r.wrapper,!1)),r.userHandler=n):r&&(this.removeEventListener(e,r.wrapper,!1),this[t]=null)},enumerable:!0}}var r=t.Class.define(function(e,t,n){this.detail=t,this.target=n,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},stopPropagation:function(){}},{supportedForProcessing:!1}),i={_listeners:null,addEventListener:function(e,t,n){n=n||!1,this._listeners=this._listeners||{};for(var r=this._listeners[e]=this._listeners[e]||[],i=0,o=r.length;i<o;i++){var s=r[i];if(s.useCapture===n&&s.listener===t)return}r.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){for(var i=new r(e,t,this),o=0,s=(n=n.slice(0,n.length)).length;o<s&&!i._stopImmediatePropagationCalled;o++)n[o].listener(i);return i.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var r=this._listeners&&this._listeners[e];if(r)for(var i=0,o=r.length;i<o;i++){var s=r[i];if(s.listener===t&&s.useCapture===n){r.splice(i,1),0===r.length&&delete this._listeners[e];break}}}};t.Namespace._moduleDefine(e,"WinJS.Utilities",{_createEventProperty:n,createEventProperties:function(){for(var e={},t=0,r=arguments.length;t<r;t++){var i=arguments[t];e["on"+i]=n(i)}return e},eventMixin:i})}),n("WinJS/Core/_Trace",["WinJS/Core/_Global"],function(e){function t(e){return e}return{_traceAsyncOperationStarting:e.Debug&&e.Debug.msTraceAsyncOperationStarting&&e.Debug.msTraceAsyncOperationStarting.bind(e.Debug)||t,_traceAsyncOperationCompleted:e.Debug&&e.Debug.msTraceAsyncOperationCompleted&&e.Debug.msTraceAsyncOperationCompleted.bind(e.Debug)||t,_traceAsyncCallbackStarting:e.Debug&&e.Debug.msTraceAsyncCallbackStarting&&e.Debug.msTraceAsyncCallbackStarting.bind(e.Debug)||t,_traceAsyncCallbackCompleted:e.Debug&&e.Debug.msTraceAsyncCallbackCompleted&&e.Debug.msTraceAsyncCallbackCompleted.bind(e.Debug)||t}}),n("WinJS/Promise/_StateMachine",["WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_Base","WinJS/Core/_ErrorFromName","WinJS/Core/_Events","WinJS/Core/_Trace"],function(e,t,n,r,i,o){e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var s=new(n.Class.mix(n.Class.define(null,{},{supportedForProcessing:!1}),i.eventMixin));s._listeners={};var a="error",u="Canceled",c=!1,l={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};l.all=l.promise|l.thenPromise|l.errorPromise|l.exceptionPromise|l.completePromise;var f,h,p,m,d,g,v,y,_,b,S=1;function C(){}f={name:"created",enter:function(e){e._setState(h)},cancel:C,done:C,then:C,_completed:C,_error:C,_notify:C,_progress:C,_setCompleteValue:C,_setErrorValue:C},h={name:"working",enter:C,cancel:function(e){e._setState(d)},done:O,then:R,_completed:x,_error:L,_notify:C,_progress:j,_setCompleteValue:U,_setErrorValue:F},p={name:"waiting",enter:function(e){var t=e._value;if(t instanceof q&&t._state!==b&&t._state!==y)V(t,{promise:e});else{var n=function(r){t._errorId?e._chainedError(r,t):(I(e,r,w,t,n),e._error(r))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))}},cancel:function(e){e._setState(m)},done:O,then:R,_completed:x,_error:L,_notify:C,_progress:j,_setCompleteValue:U,_setErrorValue:F},m={name:"waiting_canceled",enter:function(e){e._setState(g);var t=e._value;t.cancel&&t.cancel()},cancel:C,done:O,then:R,_completed:x,_error:L,_notify:C,_progress:j,_setCompleteValue:U,_setErrorValue:F},d={name:"canceled",enter:function(e){e._setState(g),e._cancelAction()},cancel:C,done:O,then:R,_completed:x,_error:L,_notify:C,_progress:j,_setCompleteValue:U,_setErrorValue:F},g={name:"canceling",enter:function(e){var t=new Error(u);t.name=t.message,e._value=t,e._setState(_)},cancel:C,done:C,then:C,_completed:C,_error:C,_notify:C,_progress:C,_setCompleteValue:C,_setErrorValue:C},v={name:"complete_notify",enter:function(e){if(e.done=Y.prototype.done,e.then=Y.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(y)},cancel:C,done:null,then:null,_completed:C,_error:C,_notify:T,_progress:C,_setCompleteValue:C,_setErrorValue:C},y={name:"success",enter:function(e){e.done=Y.prototype.done,e.then=Y.prototype.then,e._cleanupAction()},cancel:C,done:null,then:null,_completed:C,_error:C,_notify:T,_progress:C,_setCompleteValue:C,_setErrorValue:C},_={name:"error_notify",enter:function(e){if(e.done=K.prototype.done,e.then=K.prototype.then,e._listeners)for(var t,n=[e];n.length;)(t=n.shift())._state._notify(t,n);e._setState(b)},cancel:C,done:null,then:null,_completed:C,_error:C,_notify:M,_progress:C,_setCompleteValue:C,_setErrorValue:C},b={name:"error",enter:function(e){e.done=K.prototype.done,e.then=K.prototype.then,e._cleanupAction()},cancel:C,done:null,then:null,_completed:C,_error:C,_notify:M,_progress:C,_setCompleteValue:C,_setErrorValue:C};var E=n.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this),this._run()},done:function(e,t,n){this._state.done(this,e,t,n)},then:function(e,t,n){return this._state.then(this,e,t,n)},_chainedError:function(e,t){var n=this._state._error(this,e,A,t);return this._run(),n},_completed:function(e){var t=this._state._completed(this,e);return this._run(),t},_error:function(e){var t=this._state._error(this,e,k);return this._run(),t},_progress:function(e){this._state._progress(this,e)},_setState:function(e){this._nextState=e},_setCompleteValue:function(e){this._state._setCompleteValue(this,e),this._run()},_setChainedErrorValue:function(e,t){var n=this._state._setErrorValue(this,e,A,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,P);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1});function x(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?p:v,e._value=t,e._setState(n)}function N(e,t,n,r,i,o){return{exception:e,error:t,promise:n,handler:o,id:r,parent:i}}function w(e,t,n,r){var i=n._isException,o=n._errorId;return N(i?t:null,i?null:t,e,o,n,r)}function A(e,t,n){var r=n._isException,i=n._errorId;return D(e,i,r),N(r?t:null,r?null:t,e,i,n)}function k(e,t){var n=++S;return D(e,n),N(null,t,e,n)}function P(e,t){var n=++S;return D(e,n,!0),N(t,null,e,n)}function O(e,t,n,r){V(e,{c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.done")})}function L(e,t,n,r){e._value=t,I(e,t,n,r),e._setState(_)}function T(t,n){var r,i,s=t._value,a=t._listeners;if(a)for(t._listeners=null,r=0,i=Array.isArray(a)?a.length:1;r<i;r++){var u=1===i?a:a[r],c=u.c,l=u.promise;if(o._traceAsyncOperationCompleted(u.asyncOpID,e.Debug&&e.Debug.MS_ASYNC_OP_STATUS_SUCCESS),l){o._traceAsyncCallbackStarting(u.asyncOpID);try{l._setCompleteValue(c?c(s):s)}catch(e){l._setExceptionValue(e)}finally{o._traceAsyncCallbackCompleted()}l._state!==p&&l._listeners&&n.push(l)}else Y.prototype.done.call(t,c)}}function M(t,n){var r,i,s=t._value,a=t._listeners;if(a)for(t._listeners=null,r=0,i=Array.isArray(a)?a.length:1;r<i;r++){var c=1===i?a:a[r],l=c.e,f=c.promise,h=e.Debug&&(s&&s.name===u?e.Debug.MS_ASYNC_OP_STATUS_CANCELED:e.Debug.MS_ASYNC_OP_STATUS_ERROR);if(o._traceAsyncOperationCompleted(c.asyncOpID,h),f){var m=!1;try{l?(o._traceAsyncCallbackStarting(c.asyncOpID),m=!0,l.handlesOnError||I(f,s,w,t,l),f._setCompleteValue(l(s))):f._setChainedErrorValue(s,t)}catch(e){f._setExceptionValue(e)}finally{m&&o._traceAsyncCallbackCompleted()}f._state!==p&&f._listeners&&n.push(f)}else K.prototype.done.call(t,null,l)}}function I(e,t,n,r,i){if(s._listeners[a]){if(t instanceof Error&&t.message===u)return;s.dispatchEvent(a,n(e,t,r,i))}}function j(e,t){var n,r,i=e._listeners;if(i)for(n=0,r=Array.isArray(i)?i.length:1;n<r;n++){var o=1===r?i:i[n],s=o.p;if(s)try{s(t)}catch(e){}o.c||o.e||!o.promise||o.promise._progress(t)}}function V(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n]).push(t):n=t,e._listeners=n}function D(e,t,n){e._isException=n||!1,e._errorId=t}function F(e,t,n,r){e._value=t,I(e,t,n,r),e._setState(b)}function U(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?p:y,e._value=t,e._setState(n)}function R(e,t,n,r){var i=new q(e);return V(e,{promise:i,c:t,e:n,p:r,asyncOpID:o._traceAsyncOperationStarting("WinJS.Promise.then")}),i}var W,q=n.Class.derive(E,function(e){c&&(!0===c||c&l.thenPromise)&&(this._stack=$._getStack()),this._creator=e,this._setState(f),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),K=n.Class.define(function(e){c&&(!0===c||c&l.errorPromise)&&(this._stack=$._getStack()),this._value=e,I(this,e,k)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||I(null,n,w,this,t);var r=t(n);return void(r&&"object"==typeof r&&"function"==typeof r.done&&r.done())}catch(e){n=e}n instanceof Error&&n.message===u||$._doneHandler(n)},then:function(e,t){if(!t)return this;var n,r=this._value;try{t.handlesOnError||I(null,r,w,this,t),n=new Y(t(r))}catch(e){n=e===r?this:new B(e)}return n}},{supportedForProcessing:!1}),B=n.Class.derive(K,function(e){c&&(!0===c||c&l.exceptionPromise)&&(this._stack=$._getStack()),this._value=e,I(this,e,P)},{},{supportedForProcessing:!1}),Y=n.Class.define(function(e){if(c&&(!0===c||c&l.completePromise)&&(this._stack=$._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new q(null);return t._setCompleteValue(e),t}this._value=e},{cancel:function(){},done:function(e){if(e)try{var t=e(this._value);t&&"object"==typeof t&&"function"==typeof t.done&&t.done()}catch(e){$._doneHandler(e)}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new Y(t)}catch(e){return new B(e)}}},{supportedForProcessing:!1});var $=n.Class.derive(E,function(e,t){c&&(!0===c||c&l.promise)&&(this._stack=$._getStack()),this._oncancel=t,this._setState(f),this._run();try{e(this._completed.bind(this),this._error.bind(this),this._progress.bind(this))}catch(e){this._setExceptionValue(e)}},{_oncancel:null,_cancelAction:function(){try{if(!this._oncancel)throw new Error("Promise did not implement oncancel");this._oncancel()}catch(e){e.message,e.stack;s.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){s.addEventListener(e,t,n)},any:function(e){return new $(function(t,n){var r=Object.keys(e);0===r.length&&t();var i=0;r.forEach(function(o){$.as(e[o]).then(function(){t({key:o,value:e[o]})},function(s){s instanceof Error&&s.name===u?++i===r.length&&t($.cancel):n({key:o,value:e[o]})})})},function(){Object.keys(e).forEach(function(t){var n=$.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new Y(e)},cancel:{get:function(){return W=W||new K(new r(u))}},dispatchEvent:function(e,t){return s.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new $(function(t,n,r){var i=Object.keys(e),o=Array.isArray(e)?[]:{},s=Array.isArray(e)?[]:{},a=0,c=i.length,l=function(e){if(0==--c){var a=Object.keys(o).length;if(0===a)t(s);else{var l=0;i.forEach(function(e){var t=o[e];t instanceof Error&&t.name===u&&l++}),l===a?t($.cancel):n(o)}}else r({Key:e,Done:!0})};i.forEach(function(t){var n=e[t];void 0===n?a++:$.then(n,function(e){s[t]=e,l(t)},function(e){o[t]=e,l(t)})}),0!==(c-=a)||t(s)},function(){Object.keys(e).forEach(function(t){var n=$.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},removeEventListener:function(e,t,n){s.removeEventListener(e,t,n)},supportedForProcessing:!1,then:function(e,t,n,r){return $.as(e).then(t,n,r)},thenEach:function(e,t,n,r){var i=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(o){i[o]=$.as(e[o]).then(t,n,r)}),$.join(i)},timeout:function(n,r){var i=function(n){var r;return new $(function(i){n?r=e.setTimeout(i,n):t._setImmediate(i)},function(){r&&e.clearTimeout(r)})}(n);return r?function(e,t){var n=function(){e.cancel()};return e.then(function(){t.cancel()}),t.then(n,n),t}(i,r):i},wrap:function(e){return new Y(e)},wrapError:function(e){return new K(e)},_veryExpensiveTagWithStack:{get:function(){return c},set:function(e){c=e}},_veryExpensiveTagWithStack_tag:l,_getStack:function(){if(e.Debug&&e.Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}},_cancelBlocker:function(e,t){if(!$.is(e))return $.wrap(e);var n,r,i=new $(function(e,t){n=e,r=t},function(){n=null,r=null,t&&t()});return e.then(function(e){n&&n(e)},function(e){r&&r(e)}),i}});return Object.defineProperties($,i.createEventProperties(a)),$._doneHandler=function(e){t._setImmediate(function(){throw e})},{PromiseStateMachine:E,Promise:$,state_created:f}}),n("WinJS/Promise",["WinJS/Core/_Base","WinJS/Promise/_StateMachine"],function(e,t){return e.Namespace.define("WinJS",{Promise:t.Promise}),t.Promise}),(i=t["WinJS/Core/_WinJS"]).TPromise=i.Promise,i.PPromise=i.Promise}();var o=i.Promise,s=i.TPromise;i.PPromise}).call(this,n(4),n(3))},function(e,t,n){"use strict";(function(e,r){n.d(t,"c",function(){return m}),n.d(t,"b",function(){return d}),n.d(t,"a",function(){return g});var i,o=!1,s=!1,a=!1,u=!1,c=!1;if("object"==typeof e&&"function"==typeof e.nextTick&&"string"==typeof e.platform){o="win32"===e.platform,s="darwin"===e.platform,a="linux"===e.platform;var l=e.env.VSCODE_NLS_CONFIG;if(l)try{var f=JSON.parse(l),h=f.availableLanguages["*"];f.locale,h||"en",f._translationsConfigFile}catch(e){}u=!0}else if("object"==typeof navigator){var p=navigator.userAgent;o=p.indexOf("Windows")>=0,s=p.indexOf("Macintosh")>=0,a=p.indexOf("Linux")>=0,c=!0,navigator.language}!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(i||(i={}));i.Web;u&&(s?i.Mac:o?i.Windows:a&&i.Linux);var m=o,d=c;var g="object"==typeof self?self:"object"==typeof r?r:{}}).call(this,n(3),n(4))},function(e,t,n){"use strict";(function(e){function n(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}function r(e){return encodeURIComponent(e).replace(/[!'()*]/g,n)}function i(e){return e.replace(/[#?]/,n)}var o,s=function(){function e(){this._scheme=e._empty,this._authority=e._empty,this._path=e._empty,this._query=e._empty,this._fragment=e._empty,this._formatted=null,this._fsPath=null}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,"scheme",{get:function(){return this._scheme},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authority",{get:function(){return this._authority},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"query",{get:function(){return this._query},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fragment",{get:function(){return this._fragment},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fsPath",{get:function(){var t;this._fsPath||(t=this._authority&&this._path&&"file"===this.scheme?"//"+this._authority+this._path:e._driveLetterPath.test(this._path)?this._path[1].toLowerCase()+this._path.substr(2):this._path,o&&(t=t.replace(/\//g,"\\")),this._fsPath=t);return this._fsPath},enumerable:!0,configurable:!0}),e.prototype.with=function(t){if(!t)return this;var n=t.scheme,r=t.authority,i=t.path,o=t.query,s=t.fragment;if(void 0===n?n=this.scheme:null===n&&(n=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===i?i=this.path:null===i&&(i=""),void 0===o?o=this.query:null===o&&(o=""),void 0===s?s=this.fragment:null===s&&(s=""),n===this.scheme&&r===this.authority&&i===this.path&&o===this.query&&s===this.fragment)return this;var a=new e;return a._scheme=n,a._authority=r,a._path=i,a._query=o,a._fragment=s,e._validate(a),a},e.parse=function(t){var n=new e,r=e._parseComponents(t);return n._scheme=r.scheme,n._authority=decodeURIComponent(r.authority),n._path=decodeURIComponent(r.path),n._query=decodeURIComponent(r.query),n._fragment=decodeURIComponent(r.fragment),e._validate(n),n},e.file=function(t){var n=new e;if(n._scheme="file",o&&(t=t.replace(/\\/g,e._slash)),t[0]===e._slash&&t[0]===t[1]){var r=t.indexOf(e._slash,2);-1===r?n._authority=t.substring(2):(n._authority=t.substring(2,r),n._path=t.substring(r))}else n._path=t;return n._path[0]!==e._slash&&(n._path=e._slash+n._path),e._validate(n),n},e._parseComponents=function(t){var n={scheme:e._empty,authority:e._empty,path:e._empty,query:e._empty,fragment:e._empty},r=e._regexp.exec(t);return r&&(n.scheme=r[2]||n.scheme,n.authority=r[4]||n.authority,n.path=r[5]||n.path,n.query=r[7]||n.query,n.fragment=r[9]||n.fragment),n},e.from=function(t){return(new e).with(t)},e._validate=function(t){if(t.scheme&&!e._schemePattern.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!e._singleSlashStart.test(t.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(e._doubleSlashStart.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')},e.prototype.toString=function(t){return void 0===t&&(t=!1),t?e._asFormatted(this,!0):(this._formatted||(this._formatted=e._asFormatted(this,!1)),this._formatted)},e._asFormatted=function(t,n){var o=n?i:r,s=[],a=t.scheme,u=t.authority,c=t.path,l=t.query,f=t.fragment;(a&&s.push(a,":"),(u||"file"===a)&&s.push("//"),u)&&(-1===(m=(u=u.toLowerCase()).indexOf(":"))?s.push(o(u)):s.push(o(u.substr(0,m)),u.substr(m)));if(c){var h=e._upperCaseDrive.exec(c);h&&(c=h[1]?"/"+h[2].toLowerCase()+c.substr(3):h[2].toLowerCase()+c.substr(2));for(var p=0;;){var m;if(-1===(m=c.indexOf(e._slash,p))){s.push(o(c.substring(p)));break}s.push(o(c.substring(p,m)),e._slash),p=m+1}}return l&&s.push("?",o(l)),f&&s.push("#",o(f)),s.join(e._empty)},e.prototype.toJSON=function(){var e={fsPath:this.fsPath,external:this.toString(),$mid:1};return 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},e.revive=function(t){var n=new e;return n._scheme=t.scheme||e._empty,n._authority=t.authority||e._empty,n._path=t.path||e._empty,n._query=t.query||e._empty,n._fragment=t.fragment||e._empty,n._fsPath=t.fsPath,n._formatted=t.external,e._validate(n),n},e}();if(t.a=s,s._empty="",s._slash="/",s._regexp=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,s._driveLetterPath=/^\/[a-zA-z]:/,s._upperCaseDrive=/^(\/)?([A-Z]:)/,s._schemePattern=/^\w[\w\d+.-]*$/,s._singleSlashStart=/^\//,s._doubleSlashStart=/^\/\//,"object"==typeof e)o="win32"===e.platform;else if("object"==typeof navigator){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}}).call(this,n(3))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=a(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function d(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||l||a(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(1),i=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)}}();function o(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}function s(e){return encodeURIComponent(e).replace(/[!'()*]/g,o)}function a(e){return e.replace(/[#?]/,o)}var u=/^\w[\w\d+.-]*$/,c=/^\//,l=/^\/\//;var f="",h="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,m=/^\/[a-zA-Z]:/,d=/^(\/)?([A-Z]:)/,g=/^[a-zA-Z]:/,v=function(){function e(e,t,n,r,i){"object"==typeof e?(this.scheme=e.scheme||f,this.authority=e.authority||f,this.path=e.path||f,this.query=e.query||f,this.fragment=e.fragment||f):(this.scheme=e||f,this.authority=t||f,this.path=n||f,this.query=r||f,this.fragment=i||f,function(e){if(e.scheme&&!u.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!c.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(l.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 ("//")')}(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=f),void 0===n?n=this.authority:null===n&&(n=f),void 0===r?r=this.path:null===r&&(r=f),void 0===i?i=this.query:null===i&&(i=f),void 0===o?o=this.fragment:null===o&&(o=f),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&o===this.fragment?this:new _(t,n,r,i,o)},e.parse=function(e){var t=p.exec(e);return t?new _(t[2]||f,decodeURIComponent(t[4]||f),decodeURIComponent(t[5]||f),decodeURIComponent(t[7]||f),decodeURIComponent(t[9]||f)):new _(f,f,f,f,f)},e.file=function(e){var t=f;if(r.c&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var n=e.indexOf(h,2);-1===n?(t=e.substring(2),e=h):(t=e.substring(2,n),e=e.substring(n)||h)}return g.test(e)?e=h+e:e[0]!==h&&(e=h+e),new _("file",t,e,f,f)},e.from=function(e){return new _(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),S(this,e)},e.prototype.toJSON=function(){var e={$mid:1,fsPath:this.fsPath,external:this.toString()};return 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},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new _(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}(),y=v,_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return i(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?S(this,!0):(this._formatted||(this._formatted=S(this,!1)),this._formatted)},t}(v);function b(e){var t;return t=e.authority&&e.path&&"file"===e.scheme?"//"+e.authority+e.path:m.test(e.path)?e.path[1].toLowerCase()+e.path.substr(2):e.path,r.c&&(t=t.replace(/\//g,"\\")),t}function S(e,t){var n=t?a:s,r=[],i=e.scheme,o=e.authority,u=e.path,c=e.query,l=e.fragment;if(i&&r.push(i,":"),(o||"file"===i)&&r.push("//"),o){if(-1!==(v=o.indexOf("@"))){var p=o.substr(0,v);o=o.substr(v+1),-1===(v=p.indexOf(":"))?r.push(n(p)):r.push(n(p.substr(0,v)),":",n(p.substr(v+1))),r.push("@")}-1===(v=(o=o.toLowerCase()).indexOf(":"))?r.push(n(o)):r.push(n(o.substr(0,v)),o.substr(v))}if(u){var m=d.exec(u);m&&(u=m[1]?"/"+m[2].toLowerCase()+u.substr(3):m[2].toLowerCase()+u.substr(2));for(var g=0;;){var v;if(-1===(v=u.indexOf(h,g))){r.push(n(u.substring(g)));break}r.push(n(u.substring(g,v)),h),g=v+1}}return c&&r.push("?",n(c)),l&&r.push("#",n(l)),r.join(f)}var C=n(0),E=function(){function e(e,t){this.lineNumber=e,this.column=t}return 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;return n===r?(0|e.column)-(0|t.column):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}(),x=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 E(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new E(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.compareRangesUsingStarts=function(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;return s===a?(0|e.endColumn)-(0|t.endColumn):s-a}return i-o}return n-r},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}(),N=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 w(e){return{getLength:function(){return e.length},getElementHash:function(t){return e[t]}}}function A(e,t,n){return new T(w(e),w(t)).ComputeDiff(n)}var k=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}(),P=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}(),O=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 N(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}(),L=Object.prototype.hasOwnProperty,T=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_originalIds=[],this.m_modifiedIds=[],this.m_forwardHistory=[],this.m_reverseHistory=[],this.ComputeUniqueIdentifiers()}return e.prototype.ComputeUniqueIdentifiers=function(){var e=this.OriginalSequence.getLength(),t=this.ModifiedSequence.getLength();this.m_originalIds=new Array(e),this.m_modifiedIds=new Array(t);var n,r={},i=1;for(n=0;n<e;n++){var o=this.OriginalSequence.getElementHash(n);L.call(r,o)?this.m_originalIds[n]=r[o]:(this.m_originalIds[n]=i++,r[o]=this.m_originalIds[n])}for(n=0;n<t;n++){var s=this.ModifiedSequence.getElementHash(n);L.call(r,s)?this.m_modifiedIds[n]=r[s]:(this.m_modifiedIds[n]=i++,r[s]=this.m_modifiedIds[n])}},e.prototype.ElementsAreEqual=function(e,t){return this.m_originalIds[e]===this.m_modifiedIds[t]},e.prototype.OriginalElementsAreEqual=function(e,t){return this.m_originalIds[e]===this.m_originalIds[t]},e.prototype.ModifiedElementsAreEqual=function(e,t){return this.m_modifiedIds[e]===this.m_modifiedIds[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=this.ComputeDiffRecursive(e,t,n,r,[!1]);return i?this.ShiftChanges(o):o},e.prototype.ComputeDiffRecursive=function(e,t,n,r,i){for(i[0]=!1;e<=t&&n<=r&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&r>=n&&this.ElementsAreEqual(t,r);)t--,r--;if(e>t||n>r){var o=void 0;return n<=r?(k.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new N(e,0,n,r-n+1)]):e<=t?(k.Assert(n===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[new N(e,t-e+1,n,0)]):(k.Assert(e===t+1,"originalStart should only be one more than originalEnd"),k.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 N(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 N(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,p,m,d,g,v){var y,_,b=null,S=new O,C=t,E=n,x=h[0]-d[0]-r,w=Number.MIN_VALUE,A=this.m_forwardHistory.length-1;do{(_=x+e)===C||_<E&&u[_-1]<u[_+1]?(p=(l=u[_+1])-x-r,l<w&&S.MarkNextChange(),w=l,S.AddModifiedElement(l+1,p),x=_+1-e):(p=(l=u[_-1]+1)-x-r,l<w&&S.MarkNextChange(),w=l-1,S.AddOriginalElement(l,p+1),x=_-1-e),A>=0&&(e=(u=this.m_forwardHistory[A])[0],C=1,E=u.length-1)}while(--A>=-1);if(y=S.getReverseChanges(),v[0]){var k=h[0]+1,P=d[0]+1;if(null!==y&&y.length>0){var L=y[y.length-1];k=Math.max(k,L.getOriginalEnd()),P=Math.max(P,L.getModifiedEnd())}b=[new N(k,f-k+1,P,m-P+1)]}else{S=new O,C=o,E=s,x=h[0]-d[0]-a,w=Number.MAX_VALUE,A=g?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(_=x+i)===C||_<E&&c[_-1]>=c[_+1]?(p=(l=c[_+1]-1)-x-a,l>w&&S.MarkNextChange(),w=l+1,S.AddOriginalElement(l+1,p+1),x=_+1-i):(p=(l=c[_-1])-x-a,l>w&&S.MarkNextChange(),w=l,S.AddModifiedElement(l+1,p+1),x=_-1-i),A>=0&&(i=(c=this.m_reverseHistory[A])[0],C=1,E=c.length-1)}while(--A>=-1);b=S.getChanges()}return this.ConcatenateChanges(y,b)},e.prototype.ComputeRecursionPoint=function(e,t,n,r,i,o,s){var a,u,c,l=0,f=0,h=0,p=0;e--,n--,i[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var m,d,g=t-e+(r-n),v=g+1,y=new Array(v),_=new Array(v),b=r-n,S=t-e,C=e-n,E=t-r,x=(S-b)%2==0;for(y[b]=e,_[S]=t,s[0]=!1,c=1;c<=g/2+1;c++){var w=0,A=0;for(l=this.ClipDiagonalBound(b-c,c,b,v),f=this.ClipDiagonalBound(b+c,c,b,v),m=l;m<=f;m+=2){for(u=(a=m===l||m<f&&y[m-1]<y[m+1]?y[m+1]:y[m-1]+1)-(m-b)-C,d=a;a<t&&u<r&&this.ElementsAreEqual(a+1,u+1);)a++,u++;if(y[m]=a,a+u>w+A&&(w=a,A=u),!x&&Math.abs(m-S)<=c-1&&a>=_[m])return i[0]=a,o[0]=u,d<=_[m]&&c<=1448?this.WALKTRACE(b,l,f,C,S,h,p,E,y,_,a,t,i,u,r,o,x,s):null}var k=(w-e+(A-n)-c)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(w,this.OriginalSequence,k))return s[0]=!0,i[0]=w,o[0]=A,k>0&&c<=1448?this.WALKTRACE(b,l,f,C,S,h,p,E,y,_,a,t,i,u,r,o,x,s):[new N(++e,t-e+1,++n,r-n+1)];for(h=this.ClipDiagonalBound(S-c,c,S,v),p=this.ClipDiagonalBound(S+c,c,S,v),m=h;m<=p;m+=2){for(u=(a=m===h||m<p&&_[m-1]>=_[m+1]?_[m+1]-1:_[m-1])-(m-S)-E,d=a;a>e&&u>n&&this.ElementsAreEqual(a,u);)a--,u--;if(_[m]=a,x&&Math.abs(m-b)<=c&&a<=y[m])return i[0]=a,o[0]=u,d>=y[m]&&c<=1448?this.WALKTRACE(b,l,f,C,S,h,p,E,y,_,a,t,i,u,r,o,x,s):null}if(c<=1447){var O=new Array(f-l+2);O[0]=b-l+1,P.Copy(y,l,O,1,f-l+1),this.m_forwardHistory.push(O),(O=new Array(p-h+2))[0]=S-h+1,P.Copy(_,h,O,1,p-h+1),this.m_reverseHistory.push(O)}}return this.WALKTRACE(b,l,f,C,S,h,p,E,y,_,a,t,i,u,r,o,x,s)},e.prototype.ShiftChanges=function(e){var t;do{t=!1;for(var n=0;n<e.length;n++)for(var r=e[n],i=n<e.length-1?e[n+1].originalStart:this.OriginalSequence.getLength(),o=n<e.length-1?e[n+1].modifiedStart:this.ModifiedSequence.getLength(),s=r.originalLength>0,a=r.modifiedLength>0;r.originalStart+r.originalLength<i&&r.modifiedStart+r.modifiedLength<o&&(!s||this.OriginalElementsAreEqual(r.originalStart,r.originalStart+r.originalLength))&&(!a||this.ModifiedElementsAreEqual(r.modifiedStart,r.modifiedStart+r.modifiedLength));)r.originalStart++,r.modifiedStart++;var u=new Array,c=[null];for(n=0;n<e.length;n++)n<e.length-1&&this.ChangesOverlap(e[n],e[n+1],c)?(t=!0,u.push(c[0]),n++):u.push(e[n]);e=u}while(t);for(n=e.length-1;n>=0;n--){r=e[n],i=0,o=0;if(n>0){var l=e[n-1];l.originalLength>0&&(i=l.originalStart+l.originalLength),l.modifiedLength>0&&(o=l.modifiedStart+l.modifiedLength)}s=r.originalLength>0,a=r.modifiedLength>0;for(var f=0,h=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength),p=1;;p++){var m=r.originalStart-p,d=r.modifiedStart-p;if(m<i||d<o)break;if(s&&!this.OriginalElementsAreEqual(m,m+r.originalLength))break;if(a&&!this.ModifiedElementsAreEqual(d,d+r.modifiedLength))break;var g=this._boundaryScore(m,r.originalLength,d,r.modifiedLength);g>h&&(h=g,f=p)}r.originalStart-=f,r.modifiedStart-=f}return e},e.prototype._OriginalIsBoundary=function(e){return e<=0||e>=this.OriginalSequence.getLength()-1||/^\s*$/.test(this.OriginalSequence.getElementHash(e))},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){return e<=0||e>=this.ModifiedSequence.getLength()-1||/^\s*$/.test(this.ModifiedSequence.getElementHash(e))},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){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,r)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var n=[],r=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],n)?(r=new Array(e.length+t.length-1),P.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],P.Copy(t,1,r,e.length,t.length-1),r):(r=new Array(e.length+t.length),P.Copy(e,0,r,0,e.length),P.Copy(t,0,r,e.length,t.length),r)},e.prototype.ChangesOverlap=function(e,t,n){if(k.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),k.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 N(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=t%2==0;return e<0?i===(n%2==0)?0:1:i===((r-n-1)%2==0)?r-1:r-2},e}(),M=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)}}();var I,j=function(){function e(){this._value="",this._pos=0}return e.prototype.reset=function(e){return this._value=e,this._pos=0,this},e.prototype.next=function(){return this._pos+=1,this},e.prototype.join=function(e){return e.join("")},e.prototype.hasNext=function(){return this._pos<this._value.length-1},e.prototype.cmp=function(e){return e.charCodeAt(0)-this._value.charCodeAt(this._pos)},e.prototype.value=function(){return this._value[this._pos]},e}(),V=function(){function e(){}return e.prototype.reset=function(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()},e.prototype.hasNext=function(){return this._to<this._value.length},e.prototype.join=function(e){return e.join("/")},e.prototype.next=function(){this._from=this._to;for(var t=!0;this._to<this._value.length;this._to++){var n=this._value.charCodeAt(this._to);if(n===e._fwd||n===e._bwd){if(!t)break;this._from++}else t=!1}return this},e.prototype.cmp=function(e){for(var t=0,n=e.length,r=this._from;t<n&&r<this._to;){var i=e.charCodeAt(t)-this._value.charCodeAt(r);if(0!==i)return i;t+=1,r+=1}return n===this._to-this._from?0:t<n?-1:1},e.prototype.value=function(){return this._value.substring(this._from,this._to)},e._fwd="/".charCodeAt(0),e._bwd="\\".charCodeAt(0),e}(),D=function(){function e(){}return e.prototype.isEmpty=function(){return!(this.left||this.mid||this.right||this.element)},e}();(function(){function e(e){this._iter=e}e.forPaths=function(){return new e(new V)},e.forStrings=function(){return new e(new j)},e.prototype.clear=function(){this._root=void 0},e.prototype.set=function(e,t){var n,r=this._iter.reset(e);for(this._root||(this._root=new D,this._root.str=r.value()),n=this._root;;){var i=r.cmp(n.str);if(i>0)n.left||(n.left=new D,n.left.str=r.value()),n=n.left;else if(i<0)n.right||(n.right=new D,n.right.str=r.value()),n=n.right;else{if(!r.hasNext())break;r.next(),n.mid||(n.mid=new D,n.mid.str=r.value()),n=n.mid}}var o=n.element;return n.element=t,o},e.prototype.get=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var r=t.cmp(n.str);if(r>0)n=n.left;else if(r<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.element:void 0},e.prototype.delete=function(e){for(var t=this._iter.reset(e),n=[],r=this._root;r;){var i=t.cmp(r.str);if(i>0)n.push([1,r]),r=r.left;else if(i<0)n.push([-1,r]),r=r.right;else{if(!t.hasNext()){for(r.element=void 0;n.length>0&&r.isEmpty();){var o=n.pop(),s=o[0],a=o[1];switch(s){case 1:a.left=void 0;break;case 0:a.mid=void 0;break;case-1:a.right=void 0}r=a}break}t.next(),n.push([0,r]),r=r.mid}}},e.prototype.findSubstr=function(e){for(var t,n=this._iter.reset(e),r=this._root;r;){var i=n.cmp(r.str);if(i>0)r=r.left;else if(i<0)r=r.right;else{if(!n.hasNext())break;n.next(),t=r.element||t,r=r.mid}}return r&&r.element||t},e.prototype.findSuperstr=function(t){for(var n=this._iter.reset(t),r=this._root;r;){var i=n.cmp(r.str);if(i>0)r=r.left;else if(i<0)r=r.right;else{if(!n.hasNext()){if(!r.mid)return;var o=new e(this._iter);return o._root=r.mid,o}n.next(),r=r.mid}}},e.prototype.forEach=function(e){this._forEach(this._root,[],e)},e.prototype._forEach=function(e,t,n){e&&(this._forEach(e.left,t,n),t.push(e.str),e.element&&n(e.element,this._iter.join(t)),this._forEach(e.mid,t,n),t.pop(),this._forEach(e.right,t,n))}})(),function(){function e(){this.map=new Map,this.ignoreCase=!1}e.prototype.set=function(e,t){this.map.set(this.toKey(e),t)},e.prototype.get=function(e){return this.map.get(this.toKey(e))},e.prototype.has=function(e){return this.map.has(this.toKey(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e.prototype.delete=function(e){return this.map.delete(this.toKey(e))},e.prototype.forEach=function(e){this.map.forEach(e)},e.prototype.values=function(){return function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}(this.map)},e.prototype.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e.prototype.keys=function(){return function(e){var t=[];return e.forEach(function(e,n){return t.push(n)}),t}(this.map).map(y.parse)}}();!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(I||(I={}));var F=function(e){function t(t,n){void 0===n&&(n=1);var r=e.call(this)||this;return r._limit=t,r._ratio=Math.min(Math.max(0,n),1),r}return M(t,e),Object.defineProperty(t.prototype,"limit",{get:function(){return this._limit},set:function(e){this._limit=e,this.checkTrim()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ratio",{get:function(){return this._ratio},set:function(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()},enumerable:!0,configurable:!0}),t.prototype.get=function(t){return e.prototype.get.call(this,t,I.AsNew)},t.prototype.peek=function(t){return e.prototype.get.call(this,t,I.None)},t.prototype.set=function(t,n){e.prototype.set.call(this,t,n,I.AsNew),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},e.prototype.isEmpty=function(){return!this._head&&!this._tail},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.get=function(e,t){void 0===t&&(t=I.None);var n=this._map.get(e);if(n)return t!==I.None&&this.touch(n,t),n.value},e.prototype.set=function(e,t,n){void 0===n&&(n=I.None);var r=this._map.get(e);if(r)r.value=t,n!==I.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case I.None:this.addItemLast(r);break;case I.AsOld:this.addItemFirst(r);break;case I.AsNew:default:this.addItemLast(r)}this._map.set(e,r),this._size++}},e.prototype.delete=function(e){return!!this.remove(e)},e.prototype.remove=function(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value},e.prototype.shift=function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}},e.prototype.forEach=function(e,t){for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.values=function(){for(var e=[],t=this._head;t;)e.push(t.value),t=t.next;return e},e.prototype.keys=function(){for(var e=[],t=this._head;t;)e.push(t.key),t=t.next;return e},e.prototype.trimOld=function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,n=this.size;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t.previous=void 0}else this.clear()},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.removeItem=function(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===I.AsOld||t===I.AsNew)if(t===I.AsOld){if(e===this._head)return;var n=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===I.AsNew){if(e===this._tail)return;n=e.next,r=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=r,r.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e.prototype.toJSON=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),e},e.prototype.fromJSON=function(e){this.clear();for(var t=0,n=e;t<n.length;t++){var r=n[t],i=r[0],o=r[1];this.set(i,o)}},e}());new F(1e4);new F(1e4);String.fromCharCode(65279);var U=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)}}(),R=5e3,W=3;function q(e,t,n,r){return new T(e,t,n).ComputeDiff(r)}var K=function(){function e(e,t,n){this.buffer=e,this.startMarkers=t,this.endMarkers=n}return e.prototype.getLength=function(){return this.startMarkers.length},e.prototype.getElementHash=function(e){return this.buffer.substring(this.startMarkers[e].offset,this.endMarkers[e].offset)},e.prototype.getStartLineNumber=function(e){return e===this.startMarkers.length?this.startMarkers[e-1].lineNumber+1:this.startMarkers[e].lineNumber},e.prototype.getStartColumn=function(e){return this.startMarkers[e].column},e.prototype.getEndLineNumber=function(e){return this.endMarkers[e].lineNumber},e.prototype.getEndColumn=function(e){return this.endMarkers[e].column},e}(),B=function(e){function t(n){for(var r="",i=[],o=[],s=0,a=0,u=n.length;a<u;a++){r+=n[a];var c=t._getFirstNonBlankColumn(n[a],1),l=t._getLastNonBlankColumn(n[a],1);i.push({offset:s+c-1,lineNumber:a+1,column:c}),o.push({offset:s+l-1,lineNumber:a+1,column:l}),s+=n[a].length}return e.call(this,r,i,o)||this}return U(t,e),t._getFirstNonBlankColumn=function(e,t){var n=function(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}(e);return-1===n?t:n+1},t._getLastNonBlankColumn=function(e,t){var n=function(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}(e);return-1===n?t:n+2},t.prototype.getCharSequence=function(e,t){for(var n=[],r=[],i=e;i<=t;i++)for(var o=this.startMarkers[i],s=this.endMarkers[i],a=o.offset;a<s.offset;a++)n.push({offset:a,lineNumber:o.lineNumber,column:o.column+(a-o.offset)}),r.push({offset:a+1,lineNumber:o.lineNumber,column:o.column+(a-o.offset)+1});return new K(this.buffer,n,r)},t}(K),Y=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}();var $=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){var s,a,u,c,l;if(0===t.originalLength?(s=n.getStartLineNumber(t.originalStart)-1,a=0):(s=n.getStartLineNumber(t.originalStart),a=n.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(u=r.getStartLineNumber(t.modifiedStart)-1,c=0):(u=r.getStartLineNumber(t.modifiedStart),c=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),0!==t.originalLength&&0!==t.modifiedLength&&i()){var f=n.getCharSequence(t.originalStart,t.originalStart+t.originalLength-1),h=r.getCharSequence(t.modifiedStart,t.modifiedStart+t.modifiedLength-1),p=q(f,h,i,!0);o&&(p=function(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);Math.min(s,a)<W?(n.originalLength=o.originalStart+o.originalLength-n.originalStart,n.modifiedLength=o.modifiedStart+o.modifiedLength-n.modifiedStart):(t.push(o),n=o)}return t}(p)),l=[];for(var m=0,d=p.length;m<d;m++)l.push(Y.createFromDiffChange(p[m],f,h))}return new e(s,a,u,c,l)},e}(),H=function(){function e(e,t,n){this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.maximumRunTimeMs=R,this.originalLines=e,this.modifiedLines=t,this.original=new B(e),this.modified=new B(t)}return e.prototype.computeDiff=function(){if(1===this.original.getLength()&&0===this.original.getElementHash(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.getElementHash(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=q(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($.createFromDiffResult(e[n],this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldPostProcessCharChanges));return t}for(var i=[],o=0,s=0,a=(n=-1,e.length);n<a;n++){for(var u=n+1<a?e[n+1]:null,c=u?u.originalStart:this.originalLines.length,l=u?u.modifiedStart:this.modifiedLines.length;o<c&&s<l;){var f=this.originalLines[o],h=this.modifiedLines[s];if(f!==h){for(var p=B._getFirstNonBlankColumn(f,1),m=B._getFirstNonBlankColumn(h,1);p>1&&m>1;){if(f.charCodeAt(p-2)!==h.charCodeAt(m-2))break;p--,m--}(p>1||m>1)&&this._pushTrimWhitespaceCharChange(i,o+1,1,p,s+1,1,m);for(var d=B._getLastNonBlankColumn(f,1),g=B._getLastNonBlankColumn(h,1),v=f.length+1,y=h.length+1;d<v&&g<y;){if(f.charCodeAt(d-1)!==f.charCodeAt(g-1))break;d++,g++}(d<v||g<y)&&this._pushTrimWhitespaceCharChange(i,o+1,d,v,s+1,g,y)}o++,s++}u&&(i.push($.createFromDiffResult(u,this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldPostProcessCharChanges)),o+=u.originalLength,s+=u.modifiedLength)}return i},e.prototype._pushTrimWhitespaceCharChange=function(e,t,n,r,i,o,s){this._mergeTrimWhitespaceCharChange(e,t,n,r,i,o,s)||e.push(new $(t,t,i,i,[new Y(t,n,t,r,i,o,i,s)]))},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,u.charChanges.push(new Y(t,n,t,r,i,o,i,s)),!0))},e.prototype._continueProcessingPredicate=function(){return 0===this.maximumRunTimeMs||(new Date).getTime()-this.computationStartTime<this.maximumRunTimeMs},e}(),J=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 z(e){return e<0?0:e>255?255:0|e}function G(e){return e<0?0:e>4294967295?4294967295:0|e}var Q=function(){return function(e,t){this.index=e,this.remainder=t}}(),X=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=G(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=G(e),t=G(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=G(e),t=G(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=G(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();for(var t,n,r,i=0,o=this.values.length-1;i<=o;)if(t=i+(o-i)/2|0,e<(r=(n=this.prefixSum[t])-this.values[t]))o=t-1;else{if(!(e>=n))break;i=t+1}return new Q(t,e-r)},e}(),Z=(function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new X(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}return e.prototype.dispose=function(){this._lines.length=0},Object.defineProperty(e.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!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.length;n<r;n++){var i=t[n];this._acceptDeleteRange(i.range),this._acceptInsertText(new E(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 X(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}()),ee=function(){function e(t){var n=z(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=z(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}(),te=(function(){function e(){this._actual=new ee(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)}var c=new J(++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}()),ne=null;var re=null;var ie=function(){function e(){}return e._createLink=function(e,t,n,r,i){var o=i-1;do{var s=t.charCodeAt(o);if(2!==e.get(s))break;o--}while(o>r);if(r>0){var a=t.charCodeAt(r-1),u=t.charCodeAt(o);(40===a&&41===u||91===a&&93===u||123===a&&125===u)&&o--}return{range:{startLineNumber:n,startColumn:r+1,endLineNumber:n,endColumn:o+2},url:t.substring(r,o+1)}},e.computeLinks=function(t){for(var n=(null===ne&&(ne=new te([[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]])),ne),r=function(){if(null===re){re=new ee(0);for(var e=0;e<" \t<>'\"、。｡､，．：；？！＠＃＄％＆＊‘“〈《「『【〔（［｛｢｣｝］）〕】』」》〉”’｀～…".length;e++)re.set(" \t<>'\"、。｡､，．：；？！＠＃＄％＆＊‘“〈《「『【〔（［｛｢｣｝］）〕】』」》〉”’｀～…".charCodeAt(e),1);for(e=0;e<".,;".length;e++)re.set(".,;".charCodeAt(e),2)}return re}(),i=[],o=1,s=t.getLineCount();o<=s;o++){for(var a=t.getLineContent(o),u=a.length,c=0,l=0,f=0,h=1,p=!1,m=!1,d=!1;c<u;){var g=!1,v=a.charCodeAt(c);if(13===h){var y=void 0;switch(v){case 40:p=!0,y=0;break;case 41:y=p?0:1;break;case 91:m=!0,y=0;break;case 93:y=m?0:1;break;case 123:d=!0,y=0;break;case 125:y=d?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){1===(y=r.get(v))?g=!0:h=13}else 0===(h=n.nextState(h,v))&&(g=!0);g&&(h=1,p=!1,m=!1,d=!1,l=c+1,f=v),c++}13===h&&i.push(e._createLink(r,a,o,l,u))}return i},e}();var oe=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){var o;if(e&&t&&(o=this.doNavigateValueSet(t,i)))return{range:e,value:o};if(n&&r&&(o=this.doNavigateValueSet(r,i)))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)<0?r=e.length-1:r%=e.length,e[r]):null},e.INSTANCE=new e,e}(),se="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";var ae=function(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",n=0;n<se.length;n++)e.indexOf(se[n])>=0||(t+="\\"+se[n]);return t+="\\s]+)",new RegExp(t,"g")}();function ue(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}var ce=Object.freeze({dispose:function(){}});function le(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:(le(e),le(t),[])}var fe=function(){function e(){this._toDispose=[]}return e.prototype.dispose=function(){this._toDispose=le(this._toDispose)},e.prototype._register=function(e){return this._toDispose.push(e),e},e}(),he=(function(){function e(){this.references=Object.create(null)}e.prototype.acquire=function(e){var t=this,n=this.references[e];n||(n=this.references[e]={counter:0,object:this.createReferencedObject(e)});var r=n.object,i=ue(function(){0==--n.counter&&(t.destroyReferencedObject(n.object),delete t.references[e])});return n.counter++,{object:r,dispose:i}}}(),function(){function e(e){this.object=e}e.prototype.dispose=function(){}}(),{});C.b.addEventListener("error",function(e){var t=e.detail,n=t.id;t.parent?t.handler&&he&&delete he[n]:(he[n]=t,1===Object.keys(he).length&&setTimeout(function(){var e=he;he={},Object.keys(e).forEach(function(t){var n=e[t];n.exception?me(n.exception):n.error&&me(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)})},0))});var pe=new(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.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},e.prototype.emit=function(e){this.listeners.forEach(function(t){t(e)})},e.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},e.prototype.setUnexpectedErrorHandler=function(e){this.unexpectedErrorHandler=e},e.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}());function me(e){ve(e)||pe.onUnexpectedError(e)}function de(e){return e instanceof Error?{$isError:!0,name:e.name,message:e.message,stack:e.stacktrace||e.stack}:e}var ge="Canceled";function ve(e){return e instanceof Error&&e.name===ge&&e.message===ge}var ye,_e=function(){return function(e){this.element=e}}(),be=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first},e.prototype.clear=function(){this._first=void 0,this._last=void 0},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=this,r=new _e(e);if(this._first)if(t){var i=this._last;this._last=r,r.prev=i,i.next=r}else{var o=this._first;this._first=r,r.next=o,o.prev=r}else this._first=r,this._last=r;return function(){for(var e=n._first;e instanceof _e;e=e.next)if(e===r){if(e.prev&&e.next){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev||e.next?e.next?e.prev||(n._first=n._first.next,n._first.prev=void 0):(n._last=n._last.prev,n._last.next=void 0):(n._first=void 0,n._last=void 0);break}}},e.prototype.iterator=function(){var e={done:void 0,value:void 0},t=this._first;return{next:function(){return t?(e.done=!1,e.value=t.element,t=t.next):(e.done=!0,e.value=void 0),e}}},e.prototype.toArray=function(){for(var e=[],t=this._first;t instanceof _e;t=t.next)e.push(t.element);return e},e}();!function(e){var t={dispose:function(){}};e.None=function(){return t}}(ye||(ye={}));var Se=function(){function e(e){this._options=e}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 be);var o=t._listeners.isEmpty();o&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s,a=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),s={dispose:function(){s.dispose=e._noop,t._disposed||(a(),t._options&&t._options.onLastListenerRemove&&t._listeners.isEmpty()&&t._options.onLastListenerRemove(t))}},Array.isArray(i)&&i.push(s),s}),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]);for(;this._deliveryQueue.length>0;){var r=this._deliveryQueue.shift(),i=r[0],o=r[1];try{"function"==typeof i?i.call(void 0,o):i[0].call(i[1],o)}catch(n){me(n)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}();!function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new Se({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);return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return{dispose:function(){for(var t=0,n=e;t<n.length;t++)(0,n[t])()}}}(ue(function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)}))},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.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),e(),this.buffers.pop(),t.forEach(function(e){return e()})}}();function Ce(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){return n.call(r,t(e))},null,i)}}function Ee(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){return t(e)&&n.call(r,e)},null,i)}}!function(){function e(e){this._event=e}Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(Ce(this._event,t))},e.prototype.forEach=function(t){return new e(function(e,t){return function(n,r,i){return void 0===r&&(r=null),e(function(e){t(e),n.call(r,e)},null,i)}}(this._event,t))},e.prototype.filter=function(t){return new e(Ee(this._event,t))},e.prototype.latch=function(){return new e(function(e){var t,n=!0;return Ee(e,function(e){var r=n||e!==t;return n=!1,t=e,r})}(this._event))},e.prototype.on=function(e,t,n){return this._event(e,t,n)}}();!function(){function e(){this.emitter=new Se,this.event=this.emitter.event,this.disposable=ce}Object.defineProperty(e.prototype,"input",{set:function(e){this.disposable.dispose(),this.disposable=e(this.emitter.fire,this.emitter)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposable.dispose(),this.emitter.dispose()}}();var xe,Ne=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}(),we=new Ne,Ae=new Ne,ke=new Ne;!function(){function e(e,t,n,r){void 0===n&&(n=t),void 0===r&&(r=n),we.define(e,t),Ae.define(e,n),ke.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){e.toString=function(e){return we.keyCodeToStr(e)},e.fromString=function(e){return we.strToKeyCode(e)},e.toUserSettingsUS=function(e){return Ae.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return ke.keyCodeToStr(e)},e.fromUserSettings=function(e){return Ae.strToKeyCode(e)||ke.strToKeyCode(e)}}(xe||(xe={}));(function(){function e(e,t,n,r,i){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyCode=i}e.prototype.equals=function(e){return 1===e.type&&(this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode)},e.prototype.getHashCode=function(){return""+(this.ctrlKey?"1":"0")+(this.shiftKey?"1":"0")+(this.altKey?"1":"0")+(this.metaKey?"1":"0")+this.keyCode},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},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}})(),function(){function e(e,t){this.type=2,this.firstPart=e,this.chordPart=t}e.prototype.getHashCode=function(){return this.firstPart.getHashCode()+";"+this.chordPart.getHashCode()}}();var Pe,Oe=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)}}();!function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(Pe||(Pe={}));var Le,Te=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 Oe(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?Pe.LTR:Pe.RTL},t.prototype.setEndPosition=function(e,n){return this.getDirection()===Pe.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new E(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===Pe.LTR?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 o===Pe.LTR?new t(e,n,r,i):new t(r,i,e,n)},t}(x),Me=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}});!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ye.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Me})}(Le||(Le={}));var Ie,je,Ve=function(){function e(){this._isCancelled=!1}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?Me:(this._emitter||(this._emitter=new Se),this._emitter.event)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)},e}(),De=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new Ve),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof Ve&&this._token.cancel():this._token=Le.Cancelled},e.prototype.dispose=function(){this._token?this._token instanceof Ve&&this._token.dispose():this._token=Le.None},e}(),Fe=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(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(Ie||(Ie={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(je||(je={}));var Ue,Re=function(){function e(){}return e.chord=function(e,t){return function(e,t){return(e|(65535&t)<<16>>>0)>>>0}(e,t)},e.CtrlCmd=2048,e.Shift=1024,e.Alt=512,e.WinCtrl=256,e}();!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"}(Ue||(Ue={}));var We=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)}}(),qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return We(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=function(e,t,n,r){t.lastIndex=0;var i=t.exec(n);if(!i)return null;var o=i[0].indexOf(" ")>=0?function(e,t,n,r){var i,o=e-1-r;for(t.lastIndex=0;i=t.exec(n);){if(i.index>o)return null;if(t.lastIndex>=o)return{word:i[0],startColumn:r+1+i.index,endColumn:r+1+t.lastIndex}}return null}(e,t,n,r):function(e,t,n,r){var i,o=e-1-r,s=n.lastIndexOf(" ",o-1)+1,a=n.indexOf(" ",o);for(-1===a&&(a=n.length),t.lastIndex=s;i=t.exec(n);)if(i.index<=o&&t.lastIndex>=o)return{word:i[0],startColumn:r+1+i.index,endColumn:r+1+t.lastIndex};return null}(e,t,n,r);return t.lastIndex=0,o}(e.column,function(e){var t=ae;if(e&&e instanceof RegExp)if(e.global)t=e;else{var n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}(t),this._lines[e.lineNumber-1],0);return n?new x(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=this,r={done:!1,value:""},i=0,o=0,s=[],a=function(){if(o<s.length)r.done=!1,r.value=t.substring(s[o].start,s[o].end),o+=1;else{if(!(i>=n._lines.length))return t=n._lines[i],s=n._wordenize(t,e),o=0,i+=1,a();r.done=!0,r.value=void 0}return r};return{next:a}},t.prototype._wordenize=function(e,t){var n,r=[];for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)r.push({start:n.index,end:n.index+n[0].length});return r},t.prototype.getValueInRange=function(e){if((e=this._validateRange(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(!E.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}(Z),Ke=function(e){function t(t){var n=e.call(this,t)||this;return n._models=Object.create(null),n}return We(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 qe(y.parse(e.url),e.lines,e.EOL,e.versionId)},t.prototype.acceptModelChanged=function(e,t){this._models[e]&&this._models[e].onEvents(t)},t.prototype.acceptRemovedModel=function(e){this._models[e]&&delete this._models[e]},t}(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 null;var o=r.getLinesContent(),s=i.getLinesContent(),a=new H(o,s,{shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0});return C.b.as(a.computeDiff())},e.prototype.computeDirtyDiff=function(e,t,n){var r=this._getModel(e),i=this._getModel(t);if(!r||!i)return null;var o=r.getLinesContent(),s=i.getLinesContent(),a=new H(o,s,{shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0});return C.b.as(a.computeDiff())},e.prototype.computeMoreMinimalEdits=function(t,n){var r=this._getModel(t);if(!r)return C.b.as(n);for(var i,o=[],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&&(i=f),c){var h=r.getValueInRange(c);if(h!==(l=l.replace(/\r\n|\n|\r/g,r.eol)))if(Math.max(l.length,h.length)>e._diffLimit)o.push({range:c,text:l});else for(var p=A(h,l,!1),m=r.offsetAt(x.lift(c).getStartPosition()),d=0,g=p;d<g.length;d++){var v=g[d],y=r.positionAt(m+v.originalStart),_=r.positionAt(m+v.originalStart+v.originalLength),b={text:l.substr(v.modifiedStart,v.modifiedLength),range:{startLineNumber:y.lineNumber,startColumn:y.column,endLineNumber:_.lineNumber,endColumn:_.column}};r.getValueInRange(b.range)!==b.text&&o.push(b)}}}return"number"==typeof i&&o.push({eol:i,text:void 0,range:void 0}),C.b.as(o)},e.prototype.computeLinks=function(e){var t=this._getModel(e);return t?C.b.as(function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?ie.computeLinks(e):[]}(t)):null},e.prototype.textualSuggest=function(t,n,r,i){var o=this._getModel(t);if(o){var s=[],a=new RegExp(r,i),u=o.getWordUntilPosition(n,a).word,c=Object.create(null);c[u]=!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({type:"text",label:h,insertText:h,noAutoAccept:!0,overwriteBefore:u.length}))}return C.b.as({suggestions:s})}},e.prototype.navigateValueSet=function(e,t,n,r,i){var o=this._getModel(e);if(!o)return 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),c=null;null!==u&&(c=o.getValueInRange(u));var l=oe.INSTANCE.navigateValueSet(t,a,u,c,n);return C.b.as(l)},e.prototype.loadForeignModule=function(e,t){var r=this,i={getMirrorModels:function(){return r._getModels()}};if(this._foreignModuleFactory){this._foreignModule=this._foreignModuleFactory(i,t);var o=[];for(var s in this._foreignModule)"function"==typeof this._foreignModule[s]&&o.push(s);return C.b.as(o)}return new C.b(function(o,s){Promise.resolve().then(function(){var s=[n(6)(e)];(function(e){r._foreignModule=e.create(i,t);var n=[];for(var s in r._foreignModule)"function"==typeof r._foreignModule[s]&&n.push(s);o(n)}).apply(null,s)}).catch(s.bind(this))})},e.prototype.fmr=function(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return C.b.wrapError(new Error("Missing requestHandler or method: "+e));try{return C.b.as(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return C.b.wrapError(e)}},e._diffLimit=1e4,e._suggestionsLimit=1e4,e}());"function"==typeof importScripts&&(r.a.monaco={editor:void 0,languages:void 0,CancellationTokenSource:De,Emitter:Se,KeyCode:Ue,KeyMod:Re,Position:E,Range:x,Selection:Te,SelectionDirection:Pe,Severity:Ie,MarkerSeverity:je,Promise:C.b,Uri:y,Token:Fe});var Be=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)}}();var Ye=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new C.b(function(e,r,i){t.activePromise.then(n,n,i).done(e)},function(){t.activePromise.cancel()})}return new C.b(function(e,n,r){t.queuedPromise.then(e,n,r)},function(){})}return this.activePromise=e(),new C.b(function(e,n,r){t.activePromise.done(function(n){t.activePromise=null,e(n)},function(e){t.activePromise=null,n(e)},r)},function(){t.activePromise.cancel()})},e}(),$e=(function(){function e(){this.current=C.b.wrap(null)}e.prototype.queue=function(e){return this.current=this.current.then(function(){return e()})}}(),function(e){function t(t){var n=e.call(this,t)||this;return n.throttler=new Ye,n}Be(t,e),t.prototype.trigger=function(t,n){var r=this;return e.prototype.trigger.call(this,function(){return r.throttler.queue(t)},n)}}(function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new C.b(function(e){n.onSuccess=e},function(){}).then(function(){n.completionPromise=null,n.onSuccess=null;var e=n.task;return n.task=null,e()})),this.timeout=setTimeout(function(){n.timeout=null,n.onSuccess(null)},t),this.completionPromise},e.prototype.isTriggered=function(){return null!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}()),function(){function e(){var e=this;this._isOpen=!1,this._promise=new C.b(function(t,n,r){e._completePromise=t},function(){console.warn("You should really not try to cancel this ready promise!")})}e.prototype.isOpen=function(){return this._isOpen},e.prototype.open=function(){this._isOpen=!0,this._completePromise(!0)},e.prototype.wait=function(){return this._promise}}(),function(e){function t(t){var n,r,i,o;return n=e.call(this,function(e,t,n){r=e,i=t,o=n},function(){i(function(){var e=new Error(ge);return e.name=e.message,e}())})||this,t.then(r,i,o),n}return Be(t,e),t}(C.b));function He(e,t){return function(e){return C.b.is(e)&&"function"==typeof e.done}(e)?new C.b(function(n,r,i){e.done(function(e){try{t(e)}catch(e){me(e)}n(e)},function(e){try{t(e)}catch(e){me(e)}r(e)},function(e){i(e)})},function(){e.cancel()}):(e.then(function(e){return t()},function(e){return t()}),e)}var Je=function(e){function t(){return e.call(this,1)||this}return Be(t,e),t}(function(){function e(e){this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new Se}return Object.defineProperty(e.prototype,"onFinished",{get:function(){return this._onFinished.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.runningPromises+this.outstandingPromises.length},enumerable:!0,configurable:!0}),e.prototype.queue=function(e){var t=this;return new C.b(function(n,r,i){t.outstandingPromises.push({factory:e,c:n,e:r,p:i}),t.consume()})},e.prototype.consume=function(){for(var e=this;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){var t=this.outstandingPromises.shift();this.runningPromises++;var n=t.factory();n.done(t.c,t.e,t.p),n.done(function(){return e.consumed()},function(){return e.consumed()})}},e.prototype.consumed=function(){this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onFinished.fire()},e.prototype.dispose=function(){this._onFinished.dispose()},e}());!function(){function e(){this.queues=Object.create(null)}e.prototype.queueFor=function(e){var t=this,n=e.toString();if(!this.queues[n]){var r=new Je;r.onFinished(function(){r.dispose(),delete t.queues[n]}),this.queues[n]=r}return this.queues[n]}}();(function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}Be(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=setTimeout(function(){n._token=-1,e()},t)},t.prototype.setIfNotSet=function(e,t){var n=this;-1===this._token&&(this._token=setTimeout(function(){n._token=-1,e()},t))}})(fe),function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}Be(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){-1!==this._token&&(clearInterval(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=setInterval(function(){e()},t)}}(fe),function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return-1!==this.timeoutToken},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.runner()}}();!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Be(t,e),t.prototype.throttle=function(e){var t=this;return this.suspended=!0,He(e,function(){return t.resume()})},t.prototype.fire=function(t){return this.suspended?(this.lastEvent=t,void(this.hasLastEvent=!0)):e.prototype.fire.call(this,t)},t.prototype.resume=function(){this.suspended=!1,this.hasLastEvent&&this.fire(this.lastEvent),this.hasLastEvent=!1,this.lastEvent=void 0}}(Se);var ze=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)}}(),Ge="$initialize";var Qe=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=String(++this._lastSentReq),r={c:null,e:null},i=new C.b(function(e,t,n){r.c=e,r.e=t},function(){});return this._pendingReplies[n]=r,this._send({vsWorker:this._workerId,req:n,method:e,args:t}),i},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(e){}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).name=n.err.name,i.message=n.err.message,i.stack=n.err.stack),void r.e(i)}r.c(n.res)}else{var o=e,s=o.req;this._handler.handleMessage(o.method,o.args).then(function(e){t._send({vsWorker:t._workerId,seq:s,res:e,err:void 0})},function(e){e.detail instanceof Error&&(e.detail=de(e.detail)),t._send({vsWorker:t._workerId,seq:s,res:void 0,err:de(e)})})}},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t)},e}(),Xe=(function(e){function t(t,n){var r=e.call(this)||this,i=null,o=null;r._worker=r._register(t.create("vs/base/common/worker/simpleWorker",function(e){r._protocol.handleMessage(e)},function(e){o(e)})),r._protocol=new Qe({sendMessage:function(e){r._worker.postMessage(e)},handleMessage:function(e,t){return C.b.as(null)}}),r._protocol.setWorkerId(r._worker.getId());var s=null;void 0!==self.require&&"function"==typeof self.require.getConfig?s=self.require.getConfig():void 0!==self.requirejs&&(s=self.requirejs.s.contexts._.config),r._lazyProxy=new C.b(function(e,t,n){i=e,o=t},function(){}),r._onModuleLoaded=r._protocol.sendMessage(Ge,[r._worker.getId(),n,s]),r._onModuleLoaded.then(function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=u(e[n],a);i(t)},function(e){o(e),r._onError("Worker failed to load "+n,e)});var a=function(e,t){return r._request(e,t)},u=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}};return r}ze(t,e),t.prototype.getProxyObject=function(){return new $e(this._lazyProxy)},t.prototype._request=function(e,t){var n=this;return new C.b(function(r,i,o){n._onModuleLoaded.then(function(){n._protocol.sendMessage(e,t).then(r,i)},i)},function(){})},t.prototype._onError=function(e,t){console.error(e),console.info(t)}}(fe),function(){function e(e,t){var n=this;this._requestHandler=t,this._protocol=new Qe({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===Ge)return this.initialize(t[0],t[1],t[2]);if(!this._requestHandler||"function"!=typeof this._requestHandler[e])return C.b.wrapError(new Error("Missing requestHandler or method: "+e));try{return C.b.as(this._requestHandler[e].apply(this._requestHandler,t))}catch(e){return C.b.wrapError(e)}},e.prototype.initialize=function(e,t,n){var r,i,o=this;if(this._protocol.setWorkerId(e),this._requestHandler){var s=[];for(var a in this._requestHandler)"function"==typeof this._requestHandler[a]&&s.push(a);return C.b.as(s)}n&&(void 0!==n.baseUrl&&delete n.baseUrl,void 0!==n.paths&&void 0!==n.paths.vs&&delete n.paths.vs,n.catchError=!0,self.require.config(n));var u=new C.b(function(e,t,n){r=e,i=t});return self.require([t],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0];o._requestHandler=n.create();var i=[];for(var s in o._requestHandler)"function"==typeof o._requestHandler[s]&&i.push(s);r(i)},i),u},e}());var Ze,et,tt,nt,rt,it,ot,st,at=!1;function ut(e){if(!at){at=!0;var t=new Ke(e),n=new Xe(function(e){self.postMessage(e)},t);self.onmessage=function(e){n.onmessage(e.data)}}}self.onmessage=function(e){at||ut(null)},function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return Lt.defined(t)&&Lt.number(t.line)&&Lt.number(t.character)}}(Ze||(Ze={})),function(e){e.create=function(e,t,n,r){if(Lt.number(e)&&Lt.number(t)&&Lt.number(n)&&Lt.number(r))return{start:Ze.create(e,t),end:Ze.create(n,r)};if(Ze.is(e)&&Ze.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},e.is=function(e){var t=e;return Lt.defined(t)&&Ze.is(t.start)&&Ze.is(t.end)}}(et||(et={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Lt.defined(t)&&et.is(t.range)&&(Lt.string(t.uri)||Lt.undefined(t.uri))}}(tt||(tt={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(nt||(nt={})),function(e){e.create=function(e,t,n,r,i){var o={range:e,message:t};return Lt.defined(n)&&(o.severity=n),Lt.defined(r)&&(o.code=r),Lt.defined(i)&&(o.source=i),o},e.is=function(e){var t=e;return Lt.defined(t)&&et.is(t.range)&&Lt.string(t.message)&&(Lt.number(t.severity)||Lt.undefined(t.severity))&&(Lt.number(t.code)||Lt.string(t.code)||Lt.undefined(t.code))&&(Lt.string(t.source)||Lt.undefined(t.source))}}(rt||(rt={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return Lt.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){var t=e;return Lt.defined(t)&&Lt.string(t.title)&&Lt.string(t.title)}}(it||(it={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}}}(ot||(ot={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Lt.defined(t)&&lt.is(t.textDocument)&&Array.isArray(t.edits)}}(st||(st={}));var ct,lt,ft,ht,pt,mt,dt,gt,vt,yt,_t,bt,St,Ct,Et,xt,Nt,wt,At=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(ot.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(ot.replace(e,t))},e.prototype.delete=function(e){this.edits.push(ot.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){var n=new At(e.edits);t._textEditChanges[e.textDocument.uri]=n}):e.changes&&Object.keys(e.changes).forEach(function(n){var r=new At(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(lt.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for versioned document changes.");var t=e;if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new At(i),this._textEditChanges[t.uri]=r}return r}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.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new At(i),this._textEditChanges[e]=r}return r}}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Lt.defined(t)&&Lt.string(t.uri)}}(ct||(ct={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Lt.defined(t)&&Lt.string(t.uri)&&Lt.number(t.version)}}(lt||(lt={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return Lt.defined(t)&&Lt.string(t.uri)&&Lt.string(t.languageId)&&Lt.number(t.version)&&Lt.string(t.text)}}(ft||(ft={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(ht||(ht={})),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}(pt||(pt={})),function(e){e.PlainText=1,e.Snippet=2}(mt||(mt={})),function(e){e.create=function(e){return{label:e}}}(dt||(dt={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(gt||(gt={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}(vt||(vt={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(yt||(yt={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return Lt.defined(t)&&(i.documentation=t),Lt.defined(n)?i.parameters=n:i.parameters=[],i}}(_t||(_t={})),function(e){e.Text=1,e.Read=2,e.Write=3}(bt||(bt={})),function(e){e.create=function(e,t){var n={range:e};return Lt.number(t)&&(n.kind=t),n}}(St||(St={})),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}(Ct||(Ct={})),function(e){e.create=function(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o}}(Et||(Et={})),function(e){e.create=function(e){return{diagnostics:e}},e.is=function(e){var t=e;return Lt.defined(t)&&Lt.typedArray(t.diagnostics,rt.is)}}(xt||(xt={})),function(e){e.create=function(e,t){var n={range:e};return Lt.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return Lt.defined(t)&&et.is(t.range)&&(Lt.undefined(t.command)||it.is(t.command))}}(Nt||(Nt={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return Lt.defined(t)&&Lt.number(t.tabSize)&&Lt.boolean(t.insertSpaces)}}(wt||(wt={}));var kt=function(){return function(){}}();!function(e){e.create=function(e,t){return{range:e,target:t}},e.is=function(e){var t=e;return Lt.defined(t)&&et.is(t.range)&&(Lt.undefined(t.target)||Lt.string(t.target))}}(kt||(kt={}));var Pt,Ot;!function(e){e.create=function(e,t,n,r){return new Tt(e,t,n,r)},e.is=function(e){var t=e;return!!(Lt.defined(t)&&Lt.string(t.uri)&&(Lt.undefined(t.languageId)||Lt.string(t.languageId))&&Lt.number(t.lineCount)&&Lt.func(t.getText)&&Lt.func(t.positionAt)&&Lt.func(t.offsetAt))},e.applyEdits=function(e,t){for(var n=e.getText(),r=function e(t,n){if(t.length<=1)return t;var r=t.length/2|0,i=t.slice(0,r),o=t.slice(r);e(i,n),e(o,n);for(var s=0,a=0,u=0;s<i.length&&a<o.length;){var c=n(i[s],o[a]);t[u++]=c<=0?i[s++]:o[a++]}for(;s<i.length;)t[u++]=i[s++];for(;a<o.length;)t[u++]=o[a++];return t}(t,function(e,t){return 0==e.range.start.line-t.range.start.line?e.range.start.character-t.range.start.character:0}),i=n.length,o=r.length-1;o>=0;o--){var s=r[o],a=e.offsetAt(s.range.start),u=e.offsetAt(s.range.end);if(!(u<=i))throw new Error("Ovelapping edit");n=n.substring(0,a)+s.newText+n.substring(u,n.length),i=a}return n}}(Pt||(Pt={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(Ot||(Ot={}));var Lt,Tt=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 Ze.create(0,e);for(;n<r;){var i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}var o=n-1;return Ze.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 Mt(e,t){void 0===t&&(t=!1);var n=0,r=e.length,i="",o=0,s=16,a=0;function u(t,r){for(var i=0,o=0;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(){if(i="",a=0,o=n,n>=r)return o=r,s=17;var t=e.charCodeAt(n);if(It(t)){do{n++,i+=String.fromCharCode(t),t=e.charCodeAt(n)}while(It(t));return s=15}if(jt(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=function(){for(var t="",i=n;;){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(jt(o)){t+=e.substring(i,n),a=2;break}a=6}n++}else{if(t+=e.substring(i,n),++n>=r){a=2;break}switch(o=e.charCodeAt(n++)){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}(),s=10;case 47:var c=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n<r&&!jt(e.charCodeAt(n));)n++;return i=e.substring(c,n),s=12}if(42===e.charCodeAt(n+1)){n+=2;for(var f=!1;n<r;){if(42===e.charCodeAt(n)&&n+1<r&&47===e.charCodeAt(n+1)){n+=2,f=!0;break}n++}return f||(n++,a=1),i=e.substring(c,n),s=13}return i+=String.fromCharCode(t),n++,s=16;case 45:if(i+=String.fromCharCode(t),++n===r||!Vt(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+=function(){var t=n;if(48===e.charCodeAt(n))n++;else for(n++;n<e.length&&Vt(e.charCodeAt(n));)n++;if(n<e.length&&46===e.charCodeAt(n)){if(!(++n<e.length&&Vt(e.charCodeAt(n))))return a=3,e.substring(t,n);for(n++;n<e.length&&Vt(e.charCodeAt(n));)n++}var r=n;if(n<e.length&&(69===e.charCodeAt(n)||101===e.charCodeAt(n)))if((++n<e.length&&43===e.charCodeAt(n)||45===e.charCodeAt(n))&&n++,n<e.length&&Vt(e.charCodeAt(n))){for(n++;n<e.length&&Vt(e.charCodeAt(n));)n++;r=n}else a=3;return e.substring(t,r)}(),s=11;default:for(;n<r&&l(t);)n++,t=e.charCodeAt(n);if(o!==n){switch(i=e.substring(o,n)){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 l(e){if(It(e)||jt(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:return!1}return!0}return{setPosition:function(e){n=e,i="",o=0,s=16,a=0},getPosition:function(){return n},scan:t?function(){var e;do{e=c()}while(e>=12&&e<=15);return e}:c,getToken:function(){return s},getTokenValue:function(){return i},getTokenOffset:function(){return o},getTokenLength:function(){return n-o},getTokenError:function(){return a}}}function It(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 jt(e){return 10===e||13===e||8232===e||8233===e}function Vt(e){return e>=48&&e<=57}function Dt(e,t,n){var r,i,o,s,a;if(t){for(s=t.offset,a=s+t.length,o=s;o>0&&!Ut(e,o-1);)o--;for(var u=a;u<e.length&&!Ut(e,u);)u++;i=e.substring(o,u),r=function(e,t,n){var r=0,i=0,o=n.tabSize||4;for(;r<e.length;){var s=e.charAt(r);if(" "===s)i++;else{if("\t"!==s)break;i+=o}r++}return Math.floor(i/o)}(i,0,n)}else i=e,r=0,o=0,s=0,a=e.length;var c,l=function(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"}(n,e),f=!1,h=0;c=n.insertSpaces?Ft(" ",n.tabSize||4):"\t";var p=Mt(i,!1),m=!1;function d(){return l+Ft(c,r+h)}function g(){var e=p.scan();for(f=!1;15===e||14===e;)f=f||14===e,e=p.scan();return m=16===e||0!==p.getTokenError(),e}var v=[];function y(t,n,r){!m&&n<a&&r>s&&e.substring(n,r)!==t&&v.push({offset:n,length:r-n,content:t})}var _=g();if(17!==_){var b=p.getTokenOffset()+o;y(Ft(c,r),o,b)}for(;17!==_;){for(var S=p.getTokenOffset()+p.getTokenLength()+o,C=g(),E="";!f&&(12===C||13===C);){y(" ",S,p.getTokenOffset()+o),S=p.getTokenOffset()+p.getTokenLength()+o,E=12===C?d():"",C=g()}if(2===C)1!==_&&(h--,E=d());else if(4===C)3!==_&&(h--,E=d());else{switch(_){case 3:case 1:h++,E=d();break;case 5:case 12:E=d();break;case 13:E=f?d():" ";break;case 6:E=" ";break;case 10:if(6===C){E="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===C||13===C?E=" ":5!==C&&17!==C&&(m=!0);break;case 16:m=!0}!f||12!==C&&13!==C||(E=d())}y(E,S,p.getTokenOffset()+o),_=C}return v}function Ft(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function Ut(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function Rt(e,t,n){var r=Mt(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),p=i(t.onComment),m=o(t.onError),d=n&&n.disallowComments,g=n&&n.allowTrailingComma;function v(){for(;;){var e=r.scan();switch(r.getTokenError()){case 4:y(14);break;case 5:y(15);break;case 3:y(13);break;case 1:d||y(11);break;case 2:y(12);break;case 6:y(16)}switch(e){case 12:case 13:d?y(10):p();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=[]),m(e),t.length+n.length>0)for(var i=r.getToken();17!==i;){if(-1!==t.indexOf(i)){v();break}if(-1!==n.indexOf(i))break;i=v()}}function _(e){var t=r.getTokenValue();return e?f(t):a(t),v(),!0}function b(){switch(r.getToken()){case 3:return function(){c(),v();for(var e=!1;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,[],[]);b()||y(4,[],[4,5]),e=!0}return l(),4!==r.getToken()?y(8,[4],[]):v(),!0}();case 1:return function(){s(),v();for(var e=!1;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,[],[]);(10!==r.getToken()?(y(3,[],[2,5]),0):(_(!1),6===r.getToken()?(h(":"),v(),b()||y(4,[],[2,5])):y(5,[],[2,5]),1))||y(4,[],[2,5]),e=!0}return u(),2!==r.getToken()?y(7,[2],[]):v(),!0}();case 10:return _(!0);default:return function(){switch(r.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(r.getTokenValue()))&&(y(2),e=0)}catch(e){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}()}}return v(),17===r.getToken()||(b()?(17!==r.getToken()&&y(9,[],[]),!0):(y(4,[],[]),!1))}!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.func=function(e){return"[object Function]"===t.call(e)},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Lt||(Lt={}));var Wt=Mt,qt=function(e,t,n){void 0===t&&(t=[]);var r=null,i=[],o=[];function s(e){Array.isArray(i)?i.push(e):r&&(i[r]=e)}return Rt(e,{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})}},n),i[0]};function Kt(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(!Kt(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(),!Kt(i,o))return!1;for(n=0;n<i.length;n++)if(!Kt(e[i[n]],t[i[n]]))return!1}return!0}function Bt(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(e,t){return 0===t.length?e:e.replace(/\{(\d+)\}/g,function(e,n){var r=n[0];return void 0!==t[r]?t[r]:e})}(t,n)}function Yt(e){return Bt}var $t,Ht=n(2),Jt=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)}}(),zt=Yt();!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"}($t||($t={}));var Gt,Qt=/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/,Xt=/^(([^<>()\[\]\\.,;:\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,}))$/;!function(e){e.Ignore="ignore",e.Error="error",e.Warning="warning"}(Gt||(Gt={}));var Zt,en=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}(),tn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="null",r}return Jt(t,e),t}(en),nn=function(e){function t(t,n,r){var i=e.call(this,t,r)||this;return i.type="boolean",i.value=n,i}return Jt(t,e),t}(en),rn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="array",r.items=[],r}return Jt(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(en),on=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 Jt(t,e),t}(en),sn=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.type="string",i.value="",i}return Jt(t,e),t}(en),an=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="property",r.colonOffset=-1,r}return Jt(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(en),un=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="object",r.properties=[],r}return Jt(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(en);function cn(e){return"boolean"==typeof e?e?{}:{not:{}}:e}!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(Zt||(Zt={}));var ln=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||dn(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),fn=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}(),hn=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){var t=this;e.forEach(function(e){t.merge(e)})},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===$t.EnumValueMismatch&&(r.message=zt("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 pn(e){switch(e.type){case"array":return e.items.map(pn);case"object":for(var t=Object.create(null),n=0,r=e.properties;n<r.length;n++){var i=r[n];t[i.keyNode.value]=pn(i.valueNode)}return t;case"string":case"number":case"boolean":return e.value}return null}function mn(e){if(!e.parent)return[];var t=mn(e.parent);if("property"===e.parent.type){var n=e.parent.keyNode.value;t.push(n)}else if("array"===e.parent.type){var r=e.parent.items.indexOf(e);-1!==r&&t.push(r)}return t}function dn(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}var gn=function(){function e(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=[]),this.root=e,this.syntaxErrors=t,this.comments=n,this.externalDiagnostic=r}return e.prototype.getNodeFromOffset=function(e){var t=function(n){if(e>=n.offset&&e<n.offset+n.length){for(var r=n.children,i=0;i<r.length&&r[i].offset<=e;i++){var o=t(r[i]);if(o)return o}return n}return null};return this.root&&t(this.root)},e.prototype.getNodeFromOffsetEndInclusive=function(e){var t=function(n){if(e>=n.offset&&e<=n.offset+n.length){for(var r=n.children,i=0;i<r.length&&r[i].offset<=e;i++){var o=t(r[i]);if(o)return o}return n}return null};return this.root&&t(this.root)},e.prototype.visit=function(e){if(this.root){var t=function(n){for(var r=e(n),i=n.children,o=0;o<i.length&&r;o++)r=t(i[o]);return r};t(this.root)}},e.prototype.validate=function(e){if(this.root&&e){var t=new hn;return vn(this.root,e,t,fn.instance),t.problems}return null},e.prototype.getMatchingSchemas=function(e,t,n){void 0===t&&(t=-1),void 0===n&&(n=null);var r=new ln(t,n);return this.root&&e&&vn(this.root,e,new hn,r),r.schemas},e}();function vn(e,t,n,r){if(e&&r.include(e)){switch(e.type){case"object":!function(e,t,n,r){var i=Object.create(null),o=[];e.properties.forEach(function(e){var t=e.keyNode.value;i[t]=e.valueNode,o.push(t)}),Array.isArray(t.required)&&t.required.forEach(function(t){if(!i[t]){var r=e.parent&&"property"===e.parent.type&&e.parent.keyNode,o=r?{offset:r.offset,length:r.length}:{offset:e.offset,length:1};n.problems.push({location:o,severity:Gt.Warning,message:zt("MissingRequiredPropWarning",'Missing property "{0}".',t)})}});var s=function(e){for(var t=o.indexOf(e);t>=0;)o.splice(t,1),t=o.indexOf(e)};t.properties&&Object.keys(t.properties).forEach(function(e){s(e);var o=t.properties[e],a=i[e];if(a)if("boolean"==typeof o)if(o)n.propertiesMatches++,n.propertiesValueMatches++;else{var u=a.parent;n.problems.push({location:{offset:u.keyNode.offset,length:u.keyNode.length},severity:Gt.Warning,message:t.errorMessage||zt("DisallowedExtraPropWarning","Property {0} is not allowed.",e)})}else{var c=new hn;vn(a,o,c,r),n.mergePropertyMatch(c)}});t.patternProperties&&Object.keys(t.patternProperties).forEach(function(e){var a=new RegExp(e);o.slice(0).forEach(function(o){if(a.test(o)){s(o);var u=i[o];if(u){var c=t.patternProperties[e];if("boolean"==typeof c)if(c)n.propertiesMatches++,n.propertiesValueMatches++;else{var l=u.parent;n.problems.push({location:{offset:l.keyNode.offset,length:l.keyNode.length},severity:Gt.Warning,message:t.errorMessage||zt("DisallowedExtraPropWarning","Property {0} is not allowed.",o)})}else{var f=new hn;vn(u,c,f,r),n.mergePropertyMatch(f)}}}})});"object"==typeof t.additionalProperties?o.forEach(function(e){var o=i[e];if(o){var s=new hn;vn(o,t.additionalProperties,s,r),n.mergePropertyMatch(s)}}):!1===t.additionalProperties&&o.length>0&&o.forEach(function(e){var r=i[e];if(r){var o=r.parent;n.problems.push({location:{offset:o.keyNode.offset,length:o.keyNode.length},severity:Gt.Warning,message:t.errorMessage||zt("DisallowedExtraPropWarning","Property {0} is not allowed.",e)})}});t.maxProperties&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("MaxPropWarning","Object has more properties than limit of {0}.",t.maxProperties)});t.minProperties&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("MinPropWarning","Object has fewer properties than the required number of {0}",t.minProperties)});t.dependencies&&Object.keys(t.dependencies).forEach(function(o){var s=i[o];if(s){var a=t.dependencies[o];if(Array.isArray(a))a.forEach(function(t){i[t]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",t,o)})});else{var u=cn(a);if(u){var c=new hn;vn(e,u,c,r),n.mergePropertyMatch(c)}}}});var a=cn(t.propertyNames);a&&e.properties.forEach(function(e){var t=e.keyNode;t&&vn(t,a,n,fn.instance)})}(e,t,n,r);break;case"array":!function(e,t,n,r){if(Array.isArray(t.items)){var i=t.items;if(i.forEach(function(t,o){var s=cn(t),a=new hn,u=e.items[o];u?(vn(u,s,a,r),n.mergePropertyMatch(a)):e.items.length>=i.length&&n.propertiesValueMatches++}),e.items.length>i.length)if("object"==typeof t.additionalItems)for(var o=i.length;o<e.items.length;o++){var s=new hn;vn(e.items[o],t.additionalItems,s,r),n.mergePropertyMatch(s)}else!1===t.additionalItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",i.length)})}else{var a=cn(t.items);a&&e.items.forEach(function(e){var t=new hn;vn(e,a,t,r),n.mergePropertyMatch(t)})}var u=cn(t.contains);if(u){var c=e.items.some(function(e){var t=new hn;return vn(e,u,t,fn.instance),!t.hasProblems()});c||n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:t.errorMessage||zt("requiredItemMissingWarning","Array does not contain required item.",t.minItems)})}t.minItems&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("minItemsWarning","Array has too few items. Expected {0} or more.",t.minItems)});t.maxItems&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("maxItemsWarning","Array has too many items. Expected {0} or fewer.",t.minItems)});if(!0===t.uniqueItems){var l=pn(e),f=l.some(function(e,t){return t!==l.lastIndexOf(e)});f&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("uniqueItemsWarning","Array has duplicate items.")})}}(e,t,n,r);break;case"string":!function(e,t,n,r){t.minLength&&e.value.length<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("minLengthWarning","String is shorter than the minimum length of {0}.",t.minLength)});t.maxLength&&e.value.length>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("maxLengthWarning","String is longer than the maximum length of {0}.",t.maxLength)});if(t.pattern){var i=new RegExp(t.pattern);i.test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:t.patternErrorMessage||t.errorMessage||zt("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=Ht.a.parse(e.value);s.scheme||"uri"!==t.format||(o=zt("uriSchemeMissing","URI with a scheme is expected."))}catch(e){o=e.message}else o=zt("uriEmpty","URI expected.");o&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:t.patternErrorMessage||t.errorMessage||zt("uriFormatWarning","String is not a URI: {0}",o)});break;case"email":e.value.match(Xt)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:t.patternErrorMessage||t.errorMessage||zt("emailFormatWarning","String is not an e-mail address.")});break;case"color-hex":e.value.match(Qt)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:t.patternErrorMessage||t.errorMessage||zt("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.")})}}(e,t,n);break;case"number":!function(e,t,n,r){var i=e.value;"number"==typeof t.multipleOf&&i%t.multipleOf!=0&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("multipleOfWarning","Value is not divisible by {0}.",t.multipleOf)});function o(e,t){return"number"==typeof t?t:"boolean"==typeof t&&t?e:void 0}function s(e,t){if("boolean"!=typeof t||!t)return e}var a=o(t.minimum,t.exclusiveMinimum);"number"==typeof a&&i<=a&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",a)});var u=o(t.maximum,t.exclusiveMaximum);"number"==typeof u&&i>=u&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",u)});var c=s(t.minimum,t.exclusiveMinimum);"number"==typeof c&&i<c&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("minimumWarning","Value is below the minimum of {0}.",c)});var l=s(t.maximum,t.exclusiveMaximum);"number"==typeof l&&i>l&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("maximumWarning","Value is above the maximum of {0}.",l)})}(e,t,n);break;case"property":return vn(e.valueNode,t,n,r)}!function(){function i(t){return e.type===t||"integer"===t&&"number"===e.type&&e.isInteger}Array.isArray(t.type)?t.type.some(i)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:t.errorMessage||zt("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:Gt.Warning,message:t.errorMessage||zt("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)}));Array.isArray(t.allOf)&&t.allOf.forEach(function(t){vn(e,cn(t),n,r)});var o=cn(t.not);if(o){var s=new hn,a=r.newSub();vn(e,o,s,a),s.hasProblems()||n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,message:zt("notSchemaWarning","Matches a schema that is not allowed.")}),a.schemas.forEach(function(e){e.inverted=!e.inverted,r.add(e)})}var u=function(t,i){var o=[],s=null;return t.forEach(function(t){var n=cn(t),a=new hn,u=r.newSub();if(vn(e,n,a,u),a.hasProblems()||o.push(n),s)if(i||a.hasProblems()||s.validationResult.hasProblems()){var c=a.compare(s.validationResult);c>0?s={schema:n,validationResult:a,matchingSchemas:u}:0===c&&(s.matchingSchemas.merge(u),s.validationResult.mergeEnumValues(a))}else s.matchingSchemas.merge(u),s.validationResult.propertiesMatches+=a.propertiesMatches,s.validationResult.propertiesValueMatches+=a.propertiesValueMatches;else s={schema:n,validationResult:a,matchingSchemas:u}}),o.length>1&&i&&n.problems.push({location:{offset:e.offset,length:1},severity:Gt.Warning,message:zt("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)&&u(t.anyOf,!1);Array.isArray(t.oneOf)&&u(t.oneOf,!0);if(Array.isArray(t.enum)){for(var c=pn(e),l=!1,f=0,h=t.enum;f<h.length;f++){var p=h[f];if(Kt(c,p)){l=!0;break}}n.enumValues=t.enum,n.enumValueMatch=l,l||n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,code:$t.EnumValueMismatch,message:t.errorMessage||zt("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(function(e){return JSON.stringify(e)}).join(", "))})}if(t.const){var c=pn(e);Kt(c,t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:e.offset,length:e.length},severity:Gt.Warning,code:$t.EnumValueMismatch,message:t.errorMessage||zt("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:Gt.Warning,message:t.deprecationMessage})}(),r.add({node:e,schema:t})}}function yn(e,t){var n=[],r=e.getText(),i=Wt(r,!1),o=t&&t.collectComments?[]:void 0;function s(){for(;;){var e=i.scan();switch(c(),e){case 12:case 13:Array.isArray(o)&&o.push({offset:i.getTokenOffset(),length:i.getTokenLength()});break;case 15:case 14:break;default:return e}}}function a(e,t,r){0!==n.length&&n[n.length-1].location.offset===r.offset||n.push({message:e,location:r,code:t,severity:Gt.Error})}function u(e,t,n,o,u){void 0===n&&(n=null),void 0===o&&(o=[]),void 0===u&&(u=[]);var c=i.getTokenOffset(),f=i.getTokenOffset()+i.getTokenLength();if(c===f&&c>0){for(c--;c>0&&/\s/.test(r.charAt(c));)c--;f=c+1}if(a(e,t,{offset:c,length:f-c}),n&&l(n,!1),o.length+u.length>0)for(var h=i.getToken();17!==h;){if(-1!==o.indexOf(h)){s();break}if(-1!==u.indexOf(h))break;h=s()}return n}function c(){switch(i.getTokenError()){case 4:return u(zt("InvalidUnicode","Invalid unicode sequence in string."),$t.InvalidUnicode),!0;case 5:return u(zt("InvalidEscapeCharacter","Invalid escape character in string."),$t.InvalidEscapeCharacter),!0;case 3:return u(zt("UnexpectedEndOfNumber","Unexpected end of number."),$t.UnexpectedEndOfNumber),!0;case 1:return u(zt("UnexpectedEndOfComment","Unexpected end of comment."),$t.UnexpectedEndOfComment),!0;case 2:return u(zt("UnexpectedEndOfString","Unexpected end of string."),$t.UnexpectedEndOfString),!0;case 6:return u(zt("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),$t.InvalidCharacter),!0}return!1}function l(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&s(),e}function f(t,r){var o=new an(t,i.getTokenOffset()),a=h(o);if(!a){if(16!==i.getToken())return null;u(zt("DoubleQuotesExpected","Property keys must be doublequoted"),$t.Undefined);var c=new sn(o,i.getTokenOffset(),i.getTokenLength());c.value=i.getTokenValue(),a=c,s()}o.keyNode=a;var l=r[a.value];if(l?(n.push({location:{offset:o.keyNode.offset,length:o.keyNode.length},message:zt("DuplicateKeyWarning","Duplicate object key"),code:$t.Undefined,severity:Gt.Warning}),"object"==typeof l&&n.push({location:{offset:l.keyNode.offset,length:l.keyNode.length},message:zt("DuplicateKeyWarning","Duplicate object key"),code:$t.Undefined,severity:Gt.Warning}),r[a.value]=!0):r[a.value]=o,6===i.getToken())o.colonOffset=i.getTokenOffset(),s();else if(u(zt("ColonExpected","Colon expected"),$t.ColonExpected),10===i.getToken()&&e.positionAt(a.offset+a.length).line<e.positionAt(i.getTokenOffset()).line)return o.length=a.length,o;var f=p(o,a.value);return f?(o.valueNode=f,o.length=f.offset+f.length-o.offset,o):u(zt("ValueExpected","Value expected"),$t.ValueExpected,o,[],[2,5])}function h(e){if(10!==i.getToken())return null;var t=new sn(e,i.getTokenOffset());return t.value=i.getTokenValue(),l(t,!0)}function p(e,t){return function(e){if(3!==i.getToken())return null;var t=new rn(e,i.getTokenOffset());s();for(var n=0,r=!1;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||u(zt("ValueExpected","Value expected"),$t.ValueExpected);var o=i.getTokenOffset();if(s(),4===i.getToken()){r&&a(zt("TrailingComma","Trailing comma"),$t.TrailingComma,{offset:o,length:1});continue}}else r&&u(zt("ExpectedComma","Expected comma"),$t.CommaExpected);var c=p(t,n++);c?t.items.push(c):u(zt("PropertyExpected","Value expected"),$t.ValueExpected,null,[],[4,5]),r=!0}return 4!==i.getToken()?u(zt("ExpectedCloseBracket","Expected comma or closing bracket"),$t.CommaOrCloseBacketExpected,t):l(t,!0)}(e)||function(e){if(1!==i.getToken())return null;var t=new un(e,i.getTokenOffset()),n=Object.create(null);s();for(var r=!1;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||u(zt("PropertyExpected","Property expected"),$t.PropertyExpected);var o=i.getTokenOffset();if(s(),2===i.getToken()){r&&a(zt("TrailingComma","Trailing comma"),$t.TrailingComma,{offset:o,length:1});continue}}else r&&u(zt("ExpectedComma","Expected comma"),$t.CommaExpected);var c=f(t,n);c?t.properties.push(c):u(zt("PropertyExpected","Property expected"),$t.PropertyExpected,null,[],[2,5]),r=!0}return 2!==i.getToken()?u(zt("ExpectedCloseBrace","Expected comma or closing brace"),$t.CommaOrCloseBraceExpected,t):l(t,!0)}(e)||h(e)||function(e){if(11!==i.getToken())return null;var t=new on(e,i.getTokenOffset());if(0===i.getTokenError()){var n=i.getTokenValue();try{var r=JSON.parse(n);if("number"!=typeof r)return u(zt("InvalidNumberFormat","Invalid number format."),$t.Undefined,t);t.value=r}catch(e){return u(zt("InvalidNumberFormat","Invalid number format."),$t.Undefined,t)}t.isInteger=-1===n.indexOf(".")}return l(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return l(new tn(e,i.getTokenOffset()),!0);case 8:return l(new nn(e,!0,i.getTokenOffset()),!0);case 9:return l(new nn(e,!1,i.getTokenOffset()),!0);default:return null}}(e)}var m=null;return 17!==s()&&((m=p(null))?17!==i.getToken()&&u(zt("End of file expected","End of file expected."),$t.Undefined):u(zt("Invalid symbol","Expected a JSON object, array or literal."),$t.Undefined)),new gn(m,n,o)}function _n(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}var bn=Yt(),Sn=function(){function e(e,t,n){void 0===t&&(t=[]),this.templateVarIdCounter=0,this.schemaService=e,this.contributions=t,this.promise=n||Promise}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.promise.resolve(e)},e.prototype.doComplete=function(e,t,n){var r=this,i={items:[],isIncomplete:!1},o=e.offsetAt(t),s=n.getNodeFromOffsetEndInclusive(o);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=et.create(e.positionAt(c),t)}else u=et.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=ot.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,p="",m=null;if(s&&"string"===s.type){var d=s.parent;d&&"property"===d.type&&d.keyNode===s&&(h=!d.valueNode,m=d,p=e.getText().substr(s.offset+1,s.length-2),d&&(s=d.parent))}if(s&&"object"===s.type){if(s.offset===o)return i;s.properties.forEach(function(e){m&&m===e||(l[e.keyNode.value]=dt.create("__"))});var g="";h&&(g=r.evaluateSeparatorAfter(e,e.offsetAt(u.end))),t?r.getPropertyCompletions(t,n,s,h,g,f):r.getSchemaLessPropertyCompletions(n,s,p,f);var v=mn(s);r.contributions.forEach(function(t){var n=t.collectPropertyCompletions(e.uri,v,a,h,""===g,f);n&&c.push(n)}),!t&&a.length>0&&'"'!==e.getText().charAt(o-a.length-1)&&f.add({kind:pt.Property,label:r.getLabelForValue(a),insertText:r.getInsertTextForProperty(a,null,!1,g),insertTextFormat:mt.Snippet,documentation:""})}var y={};return t?r.getValueCompletions(t,n,s,o,e,f,y):r.getSchemaLessValueCompletions(n,s,o,e,f),r.contributions.length>0&&r.getContributedValueCompletions(n,s,o,e,f,c),r.promise.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(y,n,f)}return i})})},e.prototype.getPropertyCompletions=function(e,t,n,r,i,o){var s=this;t.getMatchingSchemas(e.schema,n.offset).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:pt.Property,label:e,insertText:s.getInsertTextForProperty(e,n,r,i),insertTextFormat:mt.Snippet,filterText:s.getFilterTextForValue(e),documentation:n.description||""};_n(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:pt.Property,label:t,insertText:i.getInsertTextForValue(t,""),insertTextFormat:mt.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:pt.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:mt.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:mt.Snippet,documentation:""}),void i.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:mt.Snippet,documentation:""});var a=this.evaluateSeparatorAfter(r,s),u=function(e){dn(e.parent,n,!0)||i.add({kind:o.getSuggestionKind(e.type),label:o.getLabelTextForMatchingNode(e,r),insertText:o.getInsertTextForMatchingNode(e,r,a),insertTextFormat:mt.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){var t=e;return"property"===e.type&&t.keyNode.value===f&&t.valueNode&&"array"===t.valueNode.type&&t.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);t.getMatchingSchemas(e.schema,n.offset,l).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=mn(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(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:mt.Snippet,detail:bn("json.suggest.default","Default value")}),o=!0}Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(function(s){var a,u,c=e.type,l=s.body,f=s.label;if(void 0!==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 p="",m="",d="";for(h=r;h>0;h--)p=p+d+"[\n",m=m+"\n"+d+"]",d+="\t",c="array";a=p+d+s.bodyText.split("\n").join("\n"+d)+m+t,f=f||a,u=a.replace(/[\n]/g,"")}n.add({kind:i.getSuggestionKind(c),label:f,documentation:s.description,insertText:a,insertTextFormat:mt.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(Array.isArray(e.enum))for(var r=0,i=e.enum.length;r<i;r++){var o=e.enum[r],s=e.description;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:mt.Snippet,documentation:s})}},e.prototype.collectTypes=function(e,t){if(!Array.isArray(e.enum)){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:mt.Snippet,detail:bn("defaults.object","New object"),documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:mt.Snippet,detail:bn("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:mt.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:mt.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(e,t){var n=this;this.schemaService.getRegisteredSchemaIds(function(e){return"http"===e||"https"===e}).forEach(function(r){return t.add({kind:pt.Module,label:n.getLabelForValue(r),filterText:n.getFilterTextForValue(r),insertText:n.getInsertTextForValue(r,e),insertTextFormat:mt.Snippet,documentation:""})})},e.prototype.getLabelForValue=function(e){var t=JSON.stringify(e);return t.length>57?t.substr(0,57).trim()+"...":t},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")).length>57?t.substr(0,57).trim()+"...":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?"{\n\t$1\n}"+t:"[]"===n?"[\n\t$1\n]"+t:this.getInsertTextForPlainText(n+t)},e.prototype.getInsertTextForSnippetValue=function(e,t){return function e(t,n,r){if(null!==t&&"object"==typeof t){var i=n+"\t";if(Array.isArray(t)){if(0===t.length)return"[]";for(var o="[\n",s=0;s<t.length;s++)o+=i+e(t[s],i,r),s<t.length-1&&(o+=","),o+="\n";return o+=n+"]"}var a=Object.keys(t);if(0===a.length)return"{}";for(o="{\n",s=0;s<a.length;s++){var u=a[s];o+=i+JSON.stringify(u)+": "+e(t[u],i,r),s<a.length-1&&(o+=","),o+="\n"}return o+=n+"}"}return r(t)}(e,"",function(e){return"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e)})+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),'"${1:'+(n=this.getInsertTextForPlainText(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 pt.Value;switch(e){case"string":return pt.Value;case"object":return pt.Module;case"property":return pt.Property;default:return pt.Value}},e.prototype.getLabelTextForMatchingNode=function(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}},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;void 0!==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),void 0!==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="{\n\t$1\n}";break;case"array":o="[\n\t$1\n]";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){for(var n=t-1,r=e.getText();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=Wt(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(e,t,n){for(var r=Wt(t.getText(),!0),i=e.items,o=i.length-1;o>=0;o--){var s=i[o];if(n>s.offset+s.length)return r.setPosition(s.offset+s.length),5===r.scan()&&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=Wt(e.getText(),!1);r.setPosition(t);for(var i=r.scan();17!==i&&r.getTokenOffset()+r.getTokenLength()<n;)i=r.scan();return(12===i||13===i)&&r.getTokenOffset()<=n},e}(),Cn=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("property"===s.type&&s.keyNode===i&&!(i=s.valueNode))return this.promise.resolve(null)}for(var a=et.create(e.positionAt(o.offset),e.positionAt(o.offset+o.length)),u=function(e){return{contents:e,range:a}},c=mn(i),l=this.contributions.length-1;l>=0;l--){var f=this.contributions[l].getInfoContribution(e.uri,c);if(f)return f.then(function(e){return u(e)})}return this.schemaService.getSchemaForResource(e.uri,n).then(function(e){if(e){var t=null,r=null,o=null,s=null;n.getMatchingSchemas(e.schema,i.offset).every(function(e){if(e.node===i&&!e.inverted&&e.schema&&(t=t||e.schema.title,r=r||e.schema.markdownDescription||En(e.schema.description),e.schema.enum)){var n=e.schema.enum.indexOf(pn(i));e.schema.markdownEnumDescriptions?o=e.schema.markdownEnumDescriptions[n]:e.schema.enumDescriptions&&(o=En(e.schema.enumDescriptions[n])),o&&"string"!=typeof(s=e.schema.enum[n])&&(s=JSON.stringify(s))}return!0});var a="";return t&&(a=En(t)),r&&(a.length>0&&(a+="\n\n"),a+=r),o&&(a.length>0&&(a+="\n\n"),a+="`"+En(s)+"`: "+o),u([a])}return null})},e}();function En(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}var xn=Yt(),Nn=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?Gt.Ignore:Gt.Error)},e.prototype.doValidation=function(e,t,n){var r=this;if(!this.validationEnabled)return this.promise.resolve([]);var i=[],o={},s=function(t){if(t.severity!==Gt.Ignore){var n=t.location.offset+" "+t.location.length+" "+t.message;if(!o[n]){o[n]=!0;var r={start:e.positionAt(t.location.offset),end:e.positionAt(t.location.offset+t.location.length)},s=t.severity===Gt.Error?nt.Error:nt.Warning;i.push({severity:s,range:r,message:t.message})}}};return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(function(e){var o=n?n.trailingCommas:Gt.Error,a=n?n.comments:r.commentSeverity;if(e){if(e.errors.length&&t.root){var u=t.root,c="object"===u.type?u.properties[0]:null;if(c&&"$schema"===c.keyNode.value){var l=c.valueNode||c;s({location:{offset:l.offset,length:l.length},message:e.errors[0],severity:Gt.Warning})}else s({location:{offset:u.offset,length:1},message:e.errors[0],severity:Gt.Warning})}else{var f=t.validate(e.schema);f&&f.forEach(s)}wn(e.schema)&&(o=a=Gt.Ignore)}if(t.syntaxErrors.forEach(function(e){e.code===$t.TrailingComma&&(e.severity=o),s(e)}),i.push.apply(i,t.externalDiagnostic),a!==Gt.Ignore){var h=xn("InvalidCommentToken","Comments are not permitted in JSON.");t.comments.forEach(function(e){s({location:e,severity:a,message:h})})}return i})},e}();function wn(e){if(e&&"object"==typeof e){if(e.allowComments)return!0;if(e.allOf)return e.allOf.some(wn)}return!1}var An=48,kn=57,Pn=65,On=97,Ln=102;function Tn(e){return e<An?0:e<=kn?e-An:(e<On&&(e+=On-Pn),e>=On&&e<=Ln?e-On+10:0)}function Mn(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*Tn(e.charCodeAt(1))/255,green:17*Tn(e.charCodeAt(2))/255,blue:17*Tn(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Tn(e.charCodeAt(1))/255,green:17*Tn(e.charCodeAt(2))/255,blue:17*Tn(e.charCodeAt(3))/255,alpha:17*Tn(e.charCodeAt(4))/255};case 7:return{red:(16*Tn(e.charCodeAt(1))+Tn(e.charCodeAt(2)))/255,green:(16*Tn(e.charCodeAt(3))+Tn(e.charCodeAt(4)))/255,blue:(16*Tn(e.charCodeAt(5))+Tn(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Tn(e.charCodeAt(1))+Tn(e.charCodeAt(2)))/255,green:(16*Tn(e.charCodeAt(3))+Tn(e.charCodeAt(4)))/255,blue:(16*Tn(e.charCodeAt(5))+Tn(e.charCodeAt(6)))/255,alpha:(16*Tn(e.charCodeAt(7))+Tn(e.charCodeAt(8)))/255}}return null}var In=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||_n(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=tt.create(e.uri,et.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)));o.push({name:pn(i.valueNode),kind:Ct.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=tt.create(e.uri,et.create(e.positionAt(r.offset),e.positionAt(r.offset+r.length))),a=r.valueNode;if(a){var u=i?i+"."+r.keyNode.value:r.keyNode.value;t.push({name:r.keyNode.value,kind:n.getSymbolKind(a.type),location:o,containerName:i}),s(t,a,u)}}),t};return s([],r,void 0)},e.prototype.getSymbolKind=function(e){switch(e){case"object":return Ct.Module;case"string":return Ct.String;case"number":return Ct.Number;case"array":return Ct.Array;case"boolean":return Ct.Boolean;default:return Ct.Variable}},e.prototype.findDocumentColors=function(e,t){return this.schemaService.getSchemaForResource(e.uri,t).then(function(n){var r=[];if(n)for(var i={},o=0,s=t.getMatchingSchemas(n.schema);o<s.length;o++){var a=s[o];if(!a.inverted&&a.schema&&("color"===a.schema.format||"color-hex"===a.schema.format)&&a.node&&"string"===a.node.type){var u=String(a.node.offset);if(!i[u]){var c=Mn(pn(a.node));if(c){var l=et.create(e.positionAt(a.node.offset),e.positionAt(a.node.offset+a.node.length));r.push({color:c,range:l})}i[u]=!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:ot.replace(r,JSON.stringify(i))}),o},e}(),jn=Yt(),Vn={schemaAssociations:{},schemas:{"http://json-schema.org/draft-04/schema#":{title:jn("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",description:jn("schema.json.id","A unique identifier for the schema.")},$schema:{type:"string",format:"uri",description:jn("schema.json.$schema","The schema to verify this document against ")},title:{type:"string",description:jn("schema.json.title","A descriptive title of the element")},description:{type:"string",description:jn("schema.json.description","A long description of the element. Used in hover menus and suggestions.")},default:{description:jn("schema.json.default","A default value. Used by suggestions.")},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0,description:jn("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)")},maximum:{type:"number",description:jn("schema.json.maximum","The maximum numerical value, inclusive by default.")},exclusiveMaximum:{type:"boolean",default:!1,description:jn("schema.json.exclusiveMaximum","Makes the maximum property exclusive.")},minimum:{type:"number",description:jn("schema.json.minimum","The minimum numerical value, inclusive by default.")},exclusiveMinimum:{type:"boolean",default:!1,description:jn("schema.json.exclusiveMininum","Makes the minimum property exclusive.")},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}],description:jn("schema.json.maxLength","The maximum length of a string.")},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}],description:jn("schema.json.minLength","The minimum length of a string.")},pattern:{type:"string",format:"regex",description:jn("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored.")},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{},description:jn("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:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{},description:jn("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:{allOf:[{$ref:"#/definitions/positiveInteger"}],description:jn("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive.")},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}],description:jn("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive.")},uniqueItems:{type:"boolean",default:!1,description:jn("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false.")},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}],description:jn("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive.")},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}],description:jn("schema.json.minProperties","The minimum number of properties an object can have. Inclusive.")},required:{allOf:[{$ref:"#/definitions/stringArray"}],description:jn("schema.json.required","An array of strings that lists the names of all properties required on this object.")},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{},description:jn("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:{type:"object",additionalProperties:{$ref:"#"},default:{},description:jn("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref")},properties:{type:"object",additionalProperties:{$ref:"#"},default:{},description:jn("schema.json.properties","A map of property names to schemas for each property.")},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{},description:jn("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties.")},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]},description:jn("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:{type:"array",minItems:1,uniqueItems:!0,description:jn("schema.json.enum","The set of literal values that are valid")},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}],description:jn("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:{anyOf:[{type:"string",description:jn("schema.json.format","Describes the format expected for the value."),enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}],description:jn("schema.json.allOf","An array of schemas, all of which must match.")},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}],description:jn("schema.json.anyOf","An array of schemas, where at least one must match.")},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}],description:jn("schema.json.oneOf","An array of schemas, exactly one of which must match.")},not:{allOf:[{$ref:"#"}],description:jn("schema.json.not","A schema which must not match.")}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}}}},Dn=Yt(),Fn=function(){function e(e){try{this.patternRegExp=new RegExp(function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}(e)+"$")}catch(e){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}(),Un=function(){function e(e,t,n){this.service=e,this.url=t,n&&(this.unresolvedSchema=this.service.promise.resolve(new Rn(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)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null},e}(),Rn=function(){return function(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t}}(),Wn=function(){function e(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t}return e.prototype.getSection=function(e){return cn(this.getSectionRecursive(e,this.schema))},e.prototype.getSectionRecursive=function(e,t){var n=this;if(!t||"boolean"==typeof t||0===e.length)return t;var r=e.shift();if(t.properties&&(t.properties[r],1))return this.getSectionRecursive(e,t.properties[r]);if(t.patternProperties)Object.keys(t.patternProperties).forEach(function(i){if(new RegExp(i).test(r))return n.getSectionRecursive(e,t.patternProperties[i])});else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(r.match("[0-9]+"))if(Array.isArray(t.items)){var i=parseInt(r,10);if(!isNaN(i)&&t.items[i])return this.getSectionRecursive(e,t.items[i])}else if(t.items)return this.getSectionRecursive(e,t.items)}return null},e}(),qn=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=Ht.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(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(e){e=this.normalizeId(e);var t=this.schemasById[e];return!!t&&(t.clearSchema(),!0)},e.prototype.normalizeId=function(e){return Ht.a.parse(e).toString()},e.prototype.setSchemaContributions=function(e){var t=this;if(e.schemas){var n=e.schemas;for(var r in n){var i=this.normalizeId(r);this.contributionSchemas[i]=this.addSchemaHandle(i,n[r])}}if(e.schemaAssociations){var o=e.schemaAssociations;for(var s in o){var a=o[s];this.contributionAssociations[s]=a;var u=this.getOrAddFilePatternAssociation(s);a.forEach(function(e){var n=t.normalizeId(e);u.addSchema(n)})}}},e.prototype.addSchemaHandle=function(e,t){var n=new Un(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 Fn(e),this.filePatternAssociationById[e]=t,this.filePatternAssociations.push(t)),t},e.prototype.registerExternalSchema=function(e,t,n){var r=this;void 0===t&&(t=null);var i=this.normalizeId(e);return this.registeredSchemasIds[i]=!0,t&&t.forEach(function(e){r.getOrAddFilePatternAssociation(e).addSchema(i)}),n?this.addSchemaHandle(i,n):this.getOrAddSchemaHandle(i)},e.prototype.clearExternalSchemas=function(){var e=this;for(var t in this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={},this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var n in this.contributionAssociations){var r=this.getOrAddFilePatternAssociation(n);this.contributionAssociations[n].forEach(function(t){var n=e.normalizeId(t);r.addSchema(n)})}},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=Dn("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Kn(e));return this.promise.resolve(new Rn({},[t]))}return this.requestService(e).then(function(t){if(!t){var n=Dn("json.schema.nocontent","Unable to load schema from '{0}': No content.",Kn(e));return new Rn({},[n])}var r,i=[];r=qt(t,i);var o=i.length?[Dn("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Kn(e),i[0].offset)]:[];return new Rn(r,o)},function(t){var n=Dn("json.schema.unabletoload","Unable to load schema from '{0}': {1}",Kn(e),t.toString());return new Rn({},[n])})},e.prototype.resolveSchemaContent=function(e,t){var n=this,r=e.errors.slice(0),i=e.schema,o=this.contextService,s=function(e,t,n,i){var o=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}(t,i);if(o)for(var s in o)o.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(e[s]=o[s]);else r.push(Dn("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",i,n))},a=function(e,t,i,a){return o&&!/^\w+:\/\/.*/.test(t)&&(t=o.resolveRelativePath(t,a)),t=n.normalizeId(t),n.getOrAddSchemaHandle(t).getUnresolvedSchema().then(function(n){if(n.errors.length){var o=i?t+"#"+i:t;r.push(Dn("json.schema.problemloadingref","Problems loading reference '{0}': {1}",o,n.errors[0]))}return s(e,n.schema,t,i),u(e,n.schema,t)})},u=function(e,t,r){if(!e||"object"!=typeof e)return Promise.resolve(null);for(var i=[e],o=[],u=[],c=function(e){for(;e.$ref;){var n=e.$ref.split("#",2);if(delete e.$ref,n[0].length>0)return void u.push(a(e,n[0],n[1],r));s(e,t,r,n[1])}!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 o=r[n];"object"==typeof o&&i.push(o)}}(e.items,e.additionalProperties,e.not,e.contains,e.propertyNames),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 o=r[n];if("object"==typeof o)for(var s in o){var a=o[s];"object"==typeof a&&i.push(a)}}}(e.definitions,e.properties,e.patternProperties,e.dependencies),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 o=r[n];if(Array.isArray(o))for(var s=0,a=o;s<a.length;s++){var u=a[s];"object"==typeof u&&i.push(u)}}}(e.anyOf,e.allOf,e.oneOf,e.items)};i.length;){var l=i.pop();o.indexOf(l)>=0||(o.push(l),c(l))}return n.promise.all(u)};return u(i,i,t).then(function(e){return new Wn(i,r)})},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=pn(n[0].valueNode);if(r&&function(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}(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 Kn(e){try{var t=Ht.a.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function Bn(e){var t=e.promiseConstructor||Promise,n=new qn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(Vn);var r=new Sn(n,e.contributions,t),i=new Cn(n,e.contributions,t),o=new In(n),s=new Nn(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 yn(e,{collectComments:!0})},newJSONDocument:function(e,t){return function(e,t){return void 0===t&&(t=[]),new gn(e,[],[],t)}(e,t)},doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:o.findDocumentSymbols.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),format:function(e,t,n){var r=void 0;if(t){var i=e.offsetAt(t.start);r={offset:i,length:e.offsetAt(t.end)-i}}var o={tabSize:n?n.tabSize:4,insertSpaces:!n||n.insertSpaces,eol:"\n"};return function(e,t,n){return Dt(e,t,n)}(e.getText(),r,o).map(function(t){return ot.replace(et.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)})}}}var Yn=monaco.Promise,$n=function(){function e(e){this.wrapped=new monaco.Promise(e)}return e.prototype.then=function(e,t){return this.wrapped.then(e,t)},e.prototype.getWrapped=function(){return this.wrapped},e.prototype.cancel=function(){this.wrapped.cancel()},e.resolve=function(e){return monaco.Promise.as(e)},e.reject=function(e){return monaco.Promise.wrapError(e)},e.all=function(e){return monaco.Promise.join(e)},e}(),Hn=function(){function e(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=Bn({promiseConstructor:$n}),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 Yn.as([])},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 Yn.as(i)},e.prototype.resetSchema=function(e){return Yn.as(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 Yn.as(r)},e.prototype.findDocumentColors=function(e){var t=this._getTextDocument(e),n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentColors(t,n);return Yn.as(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 Yn.as(o)},e.prototype._getTextDocument=function(e){for(var t=0,n=this._ctx.getMirrorModels();t<n.length;t++){var r=n[t];if(r.uri.toString()===e)return Pt.create(e,this._languageId,r.version,r.getValue())}return null},e}();self.onmessage=function(){ut(function(e,t){return new Hn(e,t)})}},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=6}]);