!function(e){function t(t){for(var n,i,o=t[0],s=t[1],a=0,c=[];a"),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||""),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;t0;){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){Object(s.e)(n)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}(),c=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new u({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return 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 Object(i.g)(Object(o.a)(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()},e}();function l(e){return function(t,n,r){void 0===n&&(n=null);var i=e(function(e){return i.dispose(),t.call(n,e)},null,r);return i}}function f(){for(var e=[],t=0;t1)&&c.fire(e),a=0},n)})},onLastListenerRemove:function(){i.dispose()}});return c.event}var p=function(){function e(){this.buffers=[]}return 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()})},e}();function d(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 m(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)}}var g=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(d(this._event,t))},e.prototype.forEach=function(t){return new e((n=this._event,r=t,function(e,t,i){return void 0===t&&(t=null),n(function(n){r(n),e.call(t,n)},null,i)}));var n,r},e.prototype.filter=function(t){return new e(m(this._event,t))},e.prototype.latch=function(){return new e((t=this._event,r=!0,m(t,function(e){var t=r||e!==n;return r=!1,n=e,t})));var t,n,r},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();function v(e){return new g(e)}var y=function(){function e(){this.emitter=new u,this.event=this.emitter.event,this.disposable=i.e}return 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()},e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(5),i=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.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var r,i,o,s;return n.startLineNumbert.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 rc?(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 r.a(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new r.a(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.endLineNumbere.startLineNumber},e}()},function(e,t,n){"use strict";n.d(t,"e",function(){return i}),n.d(t,"f",function(){return o}),n.d(t,"d",function(){return s}),n.d(t,"c",function(){return a}),n.d(t,"g",function(){return u}),n.d(t,"a",function(){return c}),n.d(t,"b",function(){return l});var r=n(22),i=Object.freeze({dispose:function(){}});function o(e){return"function"==typeof e.dispose&&0===e.dispose.length}function s(e){for(var t=[],n=1;n=t.length?e:t[r]})}function c(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function l(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function f(e,t){return void 0===t&&(t=" "),p(h(e,t),t)}function h(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var r=0;e.indexOf(t,r)===r;)r+=n;return e.substring(r)}function p(e,t){if(!e||!t)return e;var n=t.length,r=e.length;if(0===n||0===r)return e;for(var i=r,o=-1;-1!==(o=e.lastIndexOf(t,i-1))&&o+n===i;){if(0===o)return"";i=o}return e.substring(0,i)}function d(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function m(e){return e.replace(/\*/g,"")}function g(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t}function y(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=l(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var r="";return n.global&&(r+="g"),n.matchCase||(r+="i"),n.multiline&&(r+="m"),new RegExp(e,r)}function _(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&(e.exec("")&&0===e.lastIndex)}function b(e){return!!e.match(/([^\\]|^)(\\\\)*\\\d+/)}var C="function"==typeof"".normalize,S=new r.a(1e4);function E(e){return N(e,"NFC",S)}var x=new r.a(1e4);function w(e){return N(e,"NFD",x)}var A=/[^\u0000-\u0080]/;function N(e,t,n){if(!C||!e)return e;var r,i=n.get(e);return i||(r=A.test(e)?e.normalize(t):e,n.set(e,r),r)}function k(e){for(var t=0,n=e.length;t=0;n--){var r=e.charCodeAt(n);if(32!==r&&9!==r)return n}return-1}function L(e,t){return et?1:0}function T(e,t){for(var n=Math.min(e.length,t.length),r=0;rt.length?1:0}function I(e){return e>=97&&e<=122}function M(e){return e>=65&&e<=90}function j(e){return I(e)||M(e)}function D(e,t){return(e?e.length:0)===(t?t.length:0)&&F(e,t)}function F(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var r=0;re.length)&&F(e,t,n)}function R(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(W(e,i,n,t,0,r))return r;r-=1,i+=1}return 0}function K(e){return 55296<=e&&e<=56319}function B(e){return 56320<=e&&e<=57343}var $=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function Y(e){return $.test(e)}var H=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/;function J(e){return H.test(e)}var z=/^[\t\n\r\x20-\x7E]*$/;function G(e){return z.test(e)}function Q(e){for(var t=0,n=e.length;t=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Z(e,t){if(e.length0&&65279===e.charCodeAt(0)}function se(e){return oe(e)?e.substr(1):e}function ae(e){return btoa(encodeURIComponent(e))}function ue(e,t){for(var n="",r=0;r=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 d=o,m=s,g=a,v=u,y=c;var _="object"==typeof self?self:"object"==typeof r?r:{},b=null;function C(t){return null===b&&(b=_.setImmediate?_.setImmediate.bind(_):void 0!==e&&"function"==typeof e.nextTick?e.nextTick.bind(e):_.setTimeout.bind(_)),b(t)}var S=s?2:o?1:3}).call(this,n(25),n(28))},function(e,t,n){"use strict";n.d(t,"e",function(){return o}),n.d(t,"f",function(){return s}),n.d(t,"g",function(){return a}),n.d(t,"d",function(){return c}),n.d(t,"a",function(){return l}),n.d(t,"b",function(){return f}),n.d(t,"c",function(){return h});var r={};n(0).b.addEventListener("error",function(e){var t=e.detail,n=t.id;t.parent?t.handler&&r&&delete r[n]:(r[n]=t,1===Object.keys(r).length&&setTimeout(function(){var e=r;r={},Object.keys(e).forEach(function(t){var n=e[t];n.exception?o(n.exception):n.error&&o(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)})},0))});var i=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 o(e){c(e)||i.onUnexpectedError(e)}function s(e){c(e)||i.onUnexpectedExternalError(e)}function a(e){return e instanceof Error?{$isError:!0,name:e.name,message:e.message,stack:e.stacktrace||e.stack}:e}var u="Canceled";function c(e){return e instanceof Error&&e.name===u&&e.message===u}function l(){var e=new Error(u);return e.name=e.message,e}function f(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")}function h(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")}},function(e,t,n){"use strict";n.d(t,"j",function(){return f}),n.d(t,"g",function(){return h}),n.d(t,"k",function(){return p}),n.d(t,"e",function(){return d}),n.d(t,"a",function(){return m}),n.d(t,"d",function(){return g}),n.d(t,"h",function(){return y}),n.d(t,"i",function(){return b}),n.d(t,"f",function(){return C}),n.d(t,"b",function(){return S}),n.d(t,"c",function(){return E});var r,i=n(7),o=n(0),s=n(20),a=n(3),u=n(1),c=(r=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])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function l(e){return e&&"function"==typeof e.then}function f(e){return l(e)?e:o.b.as(e)}function h(e){var t=new s.b;return new o.b(function(n,r,i){var s=e(t.token);s instanceof o.b?s.then(function(e){t.dispose(),n(e)},function(e){t.dispose(),r(e)},i):l(s)?s.then(function(e){t.dispose(),n(e)},function(e){t.dispose(),r(e)}):(t.dispose(),n(s))},function(){t.cancel()})}function p(e,t,n){var r=e.onCancellationRequested(function(){return t.cancel()});return n&&(t=t.then(void 0,function(e){if(!i.d(e))return o.b.wrapError(e)})),v(t,function(){return r.dispose()})}var d=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 o.b(function(e,r,i){t.activePromise.then(n,n,i).done(e)},function(){t.activePromise.cancel()})}return new o.b(function(e,n,r){t.queuedPromise.then(e,n,r)},function(){})}return this.activePromise=e(),new o.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}(),m=(function(){function e(){this.current=o.b.wrap(null)}e.prototype.queue=function(e){return this.current=this.current.then(function(){return e()})}}(),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 o.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}()),g=(function(e){function t(t){var n=e.call(this,t)||this;return n.throttler=new d,n}c(t,e),t.prototype.trigger=function(t,n){var r=this;return e.prototype.trigger.call(this,function(){return r.throttler.queue(t)},n)}}(m),function(){function e(){var e=this;this._isOpen=!1,this._promise=new o.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,o,s;return n=e.call(this,function(e,t,n){r=e,o=t,s=n},function(){o(i.a())})||this,t.then(r,o,s),n}return c(t,e),t}(o.b));function v(e,t){return n=e,o.b.is(n)&&"function"==typeof n.done?new o.b(function(n,r,o){e.done(function(e){try{t(e)}catch(e){i.e(e)}n(e)},function(e){try{t(e)}catch(e){i.e(e)}r(e)},function(e){o(e)})},function(){e.cancel()}):(e.then(function(e){return t()},function(e){return t()}),e);var n}function y(e){var t=[];return e=e.reverse(),o.b.as(null).then(function n(r){void 0!==r&&null!==r&&t.push(r);var i=e.length?e.pop()():null;return i?i.then(n):o.b.as(t)})}var _=function(e){function t(){return e.call(this,1)||this}return c(t,e),t}(function(){function e(e){this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new u.a}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 o.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.runningPromises0?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 _;r.onFinished(function(){r.dispose(),delete t.queues[n]}),this.queues[n]=r}return this.queues[n]}}();function b(e,t){for(var n=[],r=2;r "+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?i.LTR:i.RTL},t.prototype.setEndPosition=function(e,n){return this.getDirection()===i.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new s.a(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===i.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;n0&&(i.arguments=n),i},e.is=function(e){var t=e;return I.defined(t)&&I.string(t.title)&&I.string(t.title)}}(u||(u={})),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:""}}}(c||(c={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return I.defined(t)&&h.is(t.textDocument)&&Array.isArray(t.edits)}}(l||(l={}));var f,h,p,d,m,g,v,y,_,b,C,S,E,x,w,A,N,k,O=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(c.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(c.replace(e,t))},e.prototype.delete=function(e){this.edits.push(c.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 O(e.edits);t._textEditChanges[e.textDocument.uri]=n}):e.changes&&Object.keys(e.changes).forEach(function(n){var r=new O(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(h.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 O(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 O(i),this._textEditChanges[e]=r}return r}}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return I.defined(t)&&I.string(t.uri)}}(f||(f={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return I.defined(t)&&I.string(t.uri)&&I.number(t.version)}}(h||(h={})),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 I.defined(t)&&I.string(t.uri)&&I.string(t.languageId)&&I.number(t.version)&&I.string(t.text)}}(p||(p={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(d||(d={})),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}(m||(m={})),function(e){e.PlainText=1,e.Snippet=2}(g||(g={})),function(e){e.create=function(e){return{label:e}}}(v||(v={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(y||(y={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}(_||(_={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(b||(b={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=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}}(L||(L={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(T||(T={}));var I,M=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;r0&&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,i=t.length;if(0===i)return r.create(0,e);for(;ne?i=o:n=o+1}var s=n-1;return r.create(s,e-t[s])},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+1255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}function s(e){for(var t=e.length,n=new Uint32Array(t),r=0;r>>0)>>>0}function c(e,t){if(0===e)return null;var n=(65535&e)>>>0,r=(4294901760&e)>>>16;return 0!==r?new h(l(n,t),l(r,t)):l(n,t)}function l(e,t){var n=!!(2048&e),r=!!(256&e);return new f(2===t?r:n,!!(1024&e),!!(512&e),2===t?n:r,255&e)}!function(){function e(e,t,n,r){void 0===n&&(n=t),void 0===r&&(r=n),o.define(e,t),s.define(e,n),a.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 o.keyCodeToStr(e)},e.fromString=function(e){return o.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return a.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||a.strToKeyCode(e)}}(r||(r={}));var f=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}return 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},e}(),h=function(){function e(e,t){this.type=2,this.firstPart=e,this.chordPart=t}return e.prototype.getHashCode=function(){return this.firstPart.getHashCode()+";"+this.chordPart.getHashCode()},e}(),p=function(){return function(e,t,n,r,i,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=r,this.keyLabel=i,this.keyAriaLabel=o}}(),d=function(){return function(){}}()},function(e,t,n){"use strict";n.d(t,"c",function(){return l}),n.d(t,"b",function(){return f}),n.d(t,"a",function(){return h});var r,i=n(11),o=(r=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])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});var s,a=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._pos0)n.left||(n.left=new c,n.left.str=r.value()),n=n.left;else if(i<0)n.right||(n.right=new c,n.right.str=r.value()),n=n.right;else{if(!r.hasNext())break;r.next(),n.mid||(n.mid=new c,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))},e}(),f=function(){function e(){this.map=new Map,this.ignoreCase=!1}return 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 e=this.map,t=[],e.forEach(function(e){return t.push(e)}),t;var e,t},e.prototype.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e.prototype.keys=function(){return(e=this.map,t=[],e.forEach(function(e,n){return t.push(n)}),t).map(i.a.parse);var e,t},e}();!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(s||(s={}));var h=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 o(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,s.AsNew)},t.prototype.peek=function(t){return e.prototype.get.call(this,t,s.None)},t.prototype.set=function(t,n){e.prototype.set.call(this,t,n,s.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=s.None);var n=this._map.get(e);if(n)return t!==s.None&&this.touch(n,t),n.value},e.prototype.set=function(e,t,n){void 0===n&&(n=s.None);var r=this._map.get(e);if(r)r.value=t,n!==s.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case s.None:this.addItemLast(r);break;case s.AsOld:this.addItemFirst(r);break;case s.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===s.AsOld||t===s.AsNew)if(t===s.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===s.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/?";var i=function(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",n=0;n=0||(t+="\\"+r[n]);return t+="\\s]+)",new RegExp(t,"g")}();function o(e){var t=i;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}function s(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}},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return o});var r=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}(),i=function(){return function(e,t){this.tokens=e,this.endState=t}}(),o=function(){return function(e,t){this.tokens=e,this.endState=t}}()},function(e,t,n){"use strict";var r=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 i(e){return{getLength:function(){return e.length},getElementHash:function(t){return e[t]}}}function o(e,t,n){return new l(i(e),i(t)).ComputeDiff(n)}n.d(t,"b",function(){return o}),n.d(t,"a",function(){return l});var s=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}(),a=function(){function e(){}return e.Copy=function(e,t,n,r,i){for(var o=0;o0||this.m_modifiedCount>0)&&this.m_changes.push(new r(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}(),c=Object.prototype.hasOwnProperty,l=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&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){var a=void 0;return n<=i?(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new r(e,0,n,i-n+1)]):e<=t?(s.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),a=[new r(e,t-e+1,n,0)]):(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}var u=[0],c=[0],l=this.ComputeRecursionPoint(e,t,n,i,u,c,o),f=u[0],h=c[0];if(null!==l)return l;if(!o[0]){var p=this.ComputeDiffRecursive(e,f,n,h,o),d=[];return d=o[0]?[new r(f+1,t-(f+1)+1,h+1,i-(h+1)+1)]:this.ComputeDiffRecursive(f+1,t,h+1,i,o),this.ConcatenateChanges(p,d)}return[new r(e,t-e+1,n,i-n+1)]},e.prototype.WALKTRACE=function(e,t,n,i,o,s,a,c,l,f,h,p,d,m,g,v,y,_){var b,C,S=null,E=new u,x=t,w=n,A=d[0]-v[0]-i,N=Number.MIN_VALUE,k=this.m_forwardHistory.length-1;do{(C=A+e)===x||C=0&&(e=(l=this.m_forwardHistory[k])[0],x=1,w=l.length-1)}while(--k>=-1);if(b=E.getReverseChanges(),_[0]){var O=d[0]+1,P=v[0]+1;if(null!==b&&b.length>0){var L=b[b.length-1];O=Math.max(O,L.getOriginalEnd()),P=Math.max(P,L.getModifiedEnd())}S=[new r(O,p-O+1,P,g-P+1)]}else{E=new u,x=s,w=a,A=d[0]-v[0]-c,N=Number.MAX_VALUE,k=y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(C=A+o)===x||C=f[C+1]?(m=(h=f[C+1]-1)-A-c,h>N&&E.MarkNextChange(),N=h+1,E.AddOriginalElement(h+1,m+1),A=C+1-o):(m=(h=f[C-1])-A-c,h>N&&E.MarkNextChange(),N=h,E.AddModifiedElement(h+1,m+1),A=C-1-o),k>=0&&(o=(f=this.m_reverseHistory[k])[0],x=1,w=f.length-1)}while(--k>=-1);S=E.getChanges()}return this.ConcatenateChanges(b,S)},e.prototype.ComputeRecursionPoint=function(e,t,n,i,o,s,u){var c,l,f,h=0,p=0,d=0,m=0;e--,n--,o[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var g,v,y=t-e+(i-n),_=y+1,b=new Array(_),C=new Array(_),S=i-n,E=t-e,x=e-n,w=t-i,A=(E-S)%2==0;for(b[S]=e,C[E]=t,u[0]=!1,f=1;f<=y/2+1;f++){var N=0,k=0;for(h=this.ClipDiagonalBound(S-f,f,S,_),p=this.ClipDiagonalBound(S+f,f,S,_),g=h;g<=p;g+=2){for(l=(c=g===h||gN+k&&(N=c,k=l),!A&&Math.abs(g-E)<=f-1&&c>=C[g])return o[0]=c,s[0]=l,v<=C[g]&&f<=1448?this.WALKTRACE(S,h,p,x,E,d,m,w,b,C,c,t,o,l,i,s,A,u):null}var O=(N-e+(k-n)-f)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(N,this.OriginalSequence,O))return u[0]=!0,o[0]=N,s[0]=k,O>0&&f<=1448?this.WALKTRACE(S,h,p,x,E,d,m,w,b,C,c,t,o,l,i,s,A,u):[new r(++e,t-e+1,++n,i-n+1)];for(d=this.ClipDiagonalBound(E-f,f,E,_),m=this.ClipDiagonalBound(E+f,f,E,_),g=d;g<=m;g+=2){for(l=(c=g===d||g=C[g+1]?C[g+1]-1:C[g-1])-(g-E)-w,v=c;c>e&&l>n&&this.ElementsAreEqual(c,l);)c--,l--;if(C[g]=c,A&&Math.abs(g-S)<=f&&c<=b[g])return o[0]=c,s[0]=l,v>=b[g]&&f<=1448?this.WALKTRACE(S,h,p,x,E,d,m,w,b,C,c,t,o,l,i,s,A,u):null}if(f<=1447){var P=new Array(p-h+2);P[0]=S-h+1,a.Copy(b,h,P,1,p-h+1),this.m_forwardHistory.push(P),(P=new Array(m-d+2))[0]=E-d+1,a.Copy(C,d,P,1,m-d+1),this.m_reverseHistory.push(P)}}return this.WALKTRACE(S,h,p,x,E,d,m,w,b,C,c,t,o,l,i,s,A,u)},e.prototype.ShiftChanges=function(e){var t;do{t=!1;for(var n=0;n0,a=r.modifiedLength>0;r.originalStart+r.originalLength=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 d=r.originalStart-p,m=r.modifiedStart-p;if(dh&&(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),a.Copy(e,0,r,0,e.length-1),r[e.length-1]=n[0],a.Copy(t,1,r,e.length,t.length-1),r):(r=new Array(e.length+t.length),a.Copy(e,0,r,0,e.length),a.Copy(t,0,r,e.length,t.length),r)},e.prototype.ChangesOverlap=function(e,t,n){if(s.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),s.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 i=e.originalStart,o=e.originalLength,a=e.modifiedStart,u=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(u=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new r(i,o,a,u),!0}return n[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,r){if(e>=0&&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}(),o=function(){function e(){this._actual=new i(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}()},function(e,t,n){"use strict";function r(e){var t,n=this,r=!1;return function(){return r?t:(r=!0,t=e.apply(n,arguments))}}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";n.d(t,"a",function(){return o}),n.d(t,"b",function(){return s});var r=n(14),i=function(){return function(e,t){this.index=e,this.remainder=t}}(),o=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=Object(r.b)(e);var n=this.values,i=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(n.length+o),this.values.set(n.subarray(0,e),0),this.values.set(n.subarray(e),e+o),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=Object(r.b)(e),t=Object(r.b)(t),this.values[e]!==t&&(this.values[e]=t,e-1=n.length)return!1;var o=n.length-e;return t>=o&&(t=o),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=0&&this.prefixSum.set(i.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=Object(r.b)(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,o=0,s=this.values.length-1;o<=s;)if(t=o+(s-o)/2|0,e<(r=(n=this.prefixSum[t])-this.values[t]))s=t-1;else{if(!(e>=n))break;o=t+1}return new i(t,e-r)},e}(),s=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new o(e),this._bustCache()}return 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&&t1)for(var n=1;n1&&v>1;){if(f.charCodeAt(m-2)!==p.charCodeAt(v-2))break;m--,v--}(m>1||v>1)&&this._pushTrimWhitespaceCharChange(i,o+1,1,m,s+1,1,v);for(var y=d._getLastNonBlankColumn(f,1),_=d._getLastNonBlankColumn(p,1),b=f.length+1,C=p.length+1;yt&&(t=a),s>n&&(n=s),u>n&&(n=u)}t++,n++;var c=new S.a(n,t,0);for(r=0,i=e.length;r=this._maxCharCode?0:this._states.get(e,t)},e}(),x=null;var w=null;var A=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===x&&(x=new E([[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]])),x),r=function(){if(null===w){w=new C.a(0);for(var e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)w.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(e=0;e<".,;".length;e++)w.set(".,;".charCodeAt(e),2)}return w}(),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,d=!1,m=!1;c=0?((r+=n?1:-1)<0?r=e.length-1:r%=e.length,e[r]):null},e.INSTANCE=new e,e}(),k=n(17),O=n(26),P=n(6);n.d(t,"a",function(){return I});var L=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)}}(),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(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=Object(k.d)(e.column,Object(k.c)(t),this._lines[e.lineNumber-1],0);return n?new s.a(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=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;othis._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}(b),I=function(e){function t(t){var n=e.call(this,t)||this;return n._models=Object.create(null),n}return L(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 T(i.a.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 s=r.getLinesContent(),a=i.getLinesContent(),u=new v(s,a,{shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0});return o.b.as(u.computeDiff())},e.prototype.computeDirtyDiff=function(e,t,n){var r=this._getModel(e),i=this._getModel(t);if(!r||!i)return null;var s=r.getLinesContent(),a=i.getLinesContent(),u=new v(s,a,{shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0});return o.b.as(u.computeDiff())},e.prototype.computeMoreMinimalEdits=function(t,n){var r=this._getModel(t);if(!r)return o.b.as(n);for(var i,u=[],c=0,l=n;ce._diffLimit)u.push({range:h,text:p});else for(var g=Object(a.b)(m,p,!1),v=r.offsetAt(s.a.lift(h).getStartPosition()),y=0,_=g;y<_.length;y++){var b=_[y],C=r.positionAt(v+b.originalStart),S=r.positionAt(v+b.originalStart+b.originalLength),E={text:p.substr(b.modifiedStart,b.modifiedLength),range:{startLineNumber:C.lineNumber,startColumn:C.column,endLineNumber:S.lineNumber,endColumn:S.column}};r.getValueInRange(E.range)!==E.text&&u.push(E)}}}return"number"==typeof i&&u.push({eol:i,text:void 0,range:void 0}),o.b.as(u)},e.prototype.computeLinks=function(e){var t=this._getModel(e);return t?o.b.as(function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?A.computeLinks(e):[]}(t)):null},e.prototype.textualSuggest=function(t,n,r,i){var s=this._getModel(t);if(s){var a=[],u=new RegExp(r,i),c=s.getWordUntilPosition(n,u).word,l=Object.create(null);l[c]=!0;for(var f=s.createWordIterator(u),h=f.next();!h.done&&a.length<=e._suggestionsLimit;h=f.next()){var p=h.value;l[p]||(l[p]=!0,isNaN(Number(p))&&a.push({type:"text",label:p,insertText:p,noAutoAccept:!0,overwriteBefore:c.length}))}return o.b.as({suggestions:a})}},e.prototype.navigateValueSet=function(e,t,n,r,i){var s=this._getModel(e);if(!s)return null;var a=new RegExp(r,i);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});var u=s.getValueInRange(t),c=s.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},a),l=null;null!==c&&(l=s.getValueInRange(c));var f=N.INSTANCE.navigateValueSet(t,u,c,l,n);return o.b.as(f)},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 s=[];for(var a in this._foreignModule)"function"==typeof this._foreignModule[a]&&s.push(a);return o.b.as(s)}return new o.b(function(o,s){n.e(0).then(function(){var s=[n(152)(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 o.b.wrapError(new Error("Missing requestHandler or method: "+e));try{return o.b.as(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return o.b.wrapError(e)}},e._diffLimit=1e4,e._suggestionsLimit=1e4,e}());"function"==typeof importScripts&&(P.b.monaco=Object(O.a)())},function(e,t,n){"use strict";function r(e,t){void 0===t&&(t=!1);var n=0,r=e.length,a="",u=0,c=16,l=0;function f(t,r){for(var i=0,o=0;i=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=r)return u=r,c=17;var t=e.charCodeAt(n);if(i(t)){do{n++,a+=String.fromCharCode(t),t=e.charCodeAt(n)}while(i(t));return c=15}if(o(t))return n++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,a+="\n"),c=14;switch(t){case 123:return n++,c=1;case 125:return n++,c=2;case 91:return n++,c=3;case 93:return n++,c=4;case 58:return n++,c=6;case 44:return n++,c=5;case 34:return n++,a=function(){for(var t="",i=n;;){if(n>=r){t+=e.substring(i,n),l=2;break}var s=e.charCodeAt(n);if(34===s){t+=e.substring(i,n),n++;break}if(92!==s){if(s>=0&&s<=31){if(o(s)){t+=e.substring(i,n),l=2;break}l=6}n++}else{if(t+=e.substring(i,n),++n>=r){l=2;break}switch(s=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 a=f(4,!0);a>=0?t+=String.fromCharCode(a):l=4;break;default:l=5}i=n}}return t}(),c=10;case 47:var h=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n=12&&e<=15);return e}:h,getToken:function(){return c},getTokenValue:function(){return a},getTokenOffset:function(){return u},getTokenLength:function(){return n-u},getTokenError:function(){return l}}}function i(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 o(e){return 10===e||13===e||8232===e||8233===e}function s(e){return e>=48&&e<=57}function a(e,t,n){var i,o,s,a,l;if(t){for(a=t.offset,l=a+t.length,s=a;s>0&&!c(e,s-1);)s--;for(var f=l;fa&&e.substring(n,r)!==t&&b.push({offset:n,length:r-n,content:t})}var S=_();if(17!==S){var E=g.getTokenOffset()+s;C(u(h,i),s,E)}for(;17!==S;){for(var x=g.getTokenOffset()+g.getTokenLength()+s,w=_(),A="";!d&&(12===w||13===w);){C(" ",x,g.getTokenOffset()+s),x=g.getTokenOffset()+g.getTokenLength()+s,A=12===w?y():"",w=_()}if(2===w)1!==S&&(m--,A=y());else if(4===w)3!==S&&(m--,A=y());else{switch(S){case 3:case 1:m++,A=y();break;case 5:case 12:A=y();break;case 13:A=d?y():" ";break;case 6:A=" ";break;case 10:if(6===w){A="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===w||13===w?A=" ":5!==w&&17!==w&&(v=!0);break;case 16:v=!0}!d||12!==w&&13!==w||(A=y())}C(A,x,g.getTokenOffset()+s),S=w}return b}function u(e,t){for(var n="",r=0;r0)for(var r=i.getToken();17!==r;){if(-1!==t.indexOf(r)){y();break}if(-1!==n.indexOf(r))break;r=y()}}function b(e){var t=i.getTokenValue();return e?h(t):u(t),y(),!0}function C(){switch(i.getToken()){case 3:return function(){l(),y();for(var e=!1;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){if(e||_(4,[],[]),p(","),y(),4===i.getToken()&&v)break}else e&&_(6,[],[]);C()||_(4,[],[4,5]),e=!0}return f(),4!==i.getToken()?_(8,[4],[]):y(),!0}();case 1:return function(){a(),y();for(var e=!1;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){if(e||_(4,[],[]),p(","),y(),2===i.getToken()&&v)break}else e&&_(6,[],[]);(10!==i.getToken()?(_(3,[],[2,5]),0):(b(!1),6===i.getToken()?(p(":"),y(),C()||_(4,[],[2,5])):_(5,[],[2,5]),1))||_(4,[],[2,5]),e=!0}return c(),2!==i.getToken()?_(7,[2],[]):y(),!0}();case 10:return b(!0);default:return function(){switch(i.getToken()){case 11:var e=0;try{"number"!=typeof(e=JSON.parse(i.getTokenValue()))&&(_(2),e=0)}catch(e){_(2)}h(e);break;case 7:h(null);break;case 8:h(!0);break;case 9:h(!1);break;default:return!1}return y(),!0}()}}return y(),17===i.getToken()||(C()?(17!==i.getToken()&&_(9,[],[]),!0):(_(4,[],[]),!1))}n.d(t,"a",function(){return f}),n.d(t,"c",function(){return h}),n.d(t,"b",function(){return p});var f=r,h=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 l(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 p(e,t,n){return a(e,t,n)}},,function(e,t,n){"use strict";n.r(t),n.d(t,"initialize",function(){return s});var r=n(29),i=n(24),o=!1;function s(e){if(!o){o=!0;var t=new r.a(e),n=new i.b(function(e){self.postMessage(e)},t);self.onmessage=function(e){n.onmessage(e.data)}}}self.onmessage=function(e){o||s(null)}},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===(d=(u=u.toLowerCase()).indexOf(":"))?s.push(o(u)):s.push(o(u.substr(0,d)),u.substr(d)));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 d;if(-1===(d=c.indexOf(e._slash,p))){s.push(o(c.substring(p)));break}s.push(o(c.substring(p,d)),e._slash),p=d+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(25))},,,,,function(e,t,n){"use strict";n.r(t);var r=n(32),i=n(10),o=n(30);function s(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()\[\]\\.,;:\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"}(d||(d={}));var v,y=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}(),_=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="null",r}return h(t,e),t}(y),b=function(e){function t(t,n,r){var i=e.call(this,t,r)||this;return i.type="boolean",i.value=n,i}return h(t,e),t}(y),C=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="array",r.items=[],r}return h(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(y),S=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 h(t,e),t}(y),E=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.type="string",i.value="",i}return h(t,e),t}(y),x=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="property",r.colonOffset=-1,r}return h(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(y),w=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="object",r.properties=[],r}return h(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(y);function A(e){return"boolean"==typeof e?e?{}:{not:{}}:e}!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(v||(v={}));var N=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||T(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),k=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}(),O=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=e.offset&&t=n.offset&&e=n.offset&&e<=n.offset+n.length){for(var r=n.children,i=0;i=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:d.Warning,message:t.errorMessage||p("DisallowedExtraPropWarning","Property {0} is not allowed.",e)})}else{var c=new O;M(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:d.Warning,message:t.errorMessage||p("DisallowedExtraPropWarning","Property {0} is not allowed.",o)})}else{var f=new O;M(u,c,f,r),n.mergePropertyMatch(f)}}}})});"object"==typeof t.additionalProperties?o.forEach(function(e){var o=i[e];if(o){var s=new O;M(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:d.Warning,message:t.errorMessage||p("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:d.Warning,message:p("MaxPropWarning","Object has more properties than limit of {0}.",t.maxProperties)});t.minProperties&&e.properties.length=i.length&&n.propertiesValueMatches++}),e.items.length>i.length)if("object"==typeof t.additionalItems)for(var o=i.length;ot.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:d.Warning,message:p("maxItemsWarning","Array has too many items. Expected {0} or fewer.",t.minItems)});if(!0===t.uniqueItems){var l=P(e),f=l.some(function(e,t){return t!==l.lastIndexOf(e)});f&&n.problems.push({location:{offset:e.offset,length:e.length},severity:d.Warning,message:p("uniqueItemsWarning","Array has duplicate items.")})}}(e,t,n,r);break;case"string":!function(e,t,n,r){t.minLength&&e.value.lengtht.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:d.Warning,message:p("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:d.Warning,message:t.patternErrorMessage||t.errorMessage||p("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=f.a.parse(e.value);s.scheme||"uri"!==t.format||(o=p("uriSchemeMissing","URI with a scheme is expected."))}catch(e){o=e.message}else o=p("uriEmpty","URI expected.");o&&n.problems.push({location:{offset:e.offset,length:e.length},severity:d.Warning,message:t.patternErrorMessage||t.errorMessage||p("uriFormatWarning","String is not a URI: {0}",o)});break;case"email":e.value.match(g)||n.problems.push({location:{offset:e.offset,length:e.length},severity:d.Warning,message:t.patternErrorMessage||t.errorMessage||p("emailFormatWarning","String is not an e-mail address.")});break;case"color-hex":e.value.match(m)||n.problems.push({location:{offset:e.offset,length:e.length},severity:d.Warning,message:t.patternErrorMessage||t.errorMessage||p("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:d.Warning,message:p("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:d.Warning,message:p("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:d.Warning,message:p("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",u)});var c=s(t.minimum,t.exclusiveMinimum);"number"==typeof c&&il&&n.problems.push({location:{offset:e.offset,length:e.length},severity:d.Warning,message:p("maximumWarning","Value is above the maximum of {0}.",l)})}(e,t,n);break;case"property":return M(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:d.Warning,message:t.errorMessage||p("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:d.Warning,message:t.errorMessage||p("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)}));Array.isArray(t.allOf)&&t.allOf.forEach(function(t){M(e,A(t),n,r)});var o=A(t.not);if(o){var a=new O,u=r.newSub();M(e,o,a,u),a.hasProblems()||n.problems.push({location:{offset:e.offset,length:e.length},severity:d.Warning,message:p("notSchemaWarning","Matches a schema that is not allowed.")}),u.schemas.forEach(function(e){e.inverted=!e.inverted,r.add(e)})}var c=function(t,i){var o=[],s=null;return t.forEach(function(t){var n=A(t),a=new O,u=r.newSub();if(M(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:d.Warning,message:p("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)&&c(t.anyOf,!1);Array.isArray(t.oneOf)&&c(t.oneOf,!0);if(Array.isArray(t.enum)){for(var f=P(e),h=!1,m=0,g=t.enum;m0){for(c--;c>0&&/\s/.test(r.charAt(c));)c--;l=c+1}if(u(e,t,{offset:c,length:l-c}),n&&h(n,!1),o.length+s.length>0)for(var f=i.getToken();17!==f;){if(-1!==o.indexOf(f)){a();break}if(-1!==s.indexOf(f))break;f=a()}return n}function f(){switch(i.getTokenError()){case 4:return c(p("InvalidUnicode","Invalid unicode sequence in string."),l.InvalidUnicode),!0;case 5:return c(p("InvalidEscapeCharacter","Invalid escape character in string."),l.InvalidEscapeCharacter),!0;case 3:return c(p("UnexpectedEndOfNumber","Unexpected end of number."),l.UnexpectedEndOfNumber),!0;case 1:return c(p("UnexpectedEndOfComment","Unexpected end of comment."),l.UnexpectedEndOfComment),!0;case 2:return c(p("UnexpectedEndOfString","Unexpected end of string."),l.UnexpectedEndOfString),!0;case 6:return c(p("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),l.InvalidCharacter),!0}return!1}function h(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&a(),e}function m(t,r){var o=new x(t,i.getTokenOffset()),s=g(o);if(!s){if(16!==i.getToken())return null;c(p("DoubleQuotesExpected","Property keys must be doublequoted"),l.Undefined);var u=new E(o,i.getTokenOffset(),i.getTokenLength());u.value=i.getTokenValue(),s=u,a()}o.keyNode=s;var f=r[s.value];if(f?(n.push({location:{offset:o.keyNode.offset,length:o.keyNode.length},message:p("DuplicateKeyWarning","Duplicate object key"),code:l.Undefined,severity:d.Warning}),"object"==typeof f&&n.push({location:{offset:f.keyNode.offset,length:f.keyNode.length},message:p("DuplicateKeyWarning","Duplicate object key"),code:l.Undefined,severity:d.Warning}),r[s.value]=!0):r[s.value]=o,6===i.getToken())o.colonOffset=i.getTokenOffset(),a();else if(c(p("ColonExpected","Colon expected"),l.ColonExpected),10===i.getToken()&&e.positionAt(s.offset+s.length).line0?e.lastIndexOf(t)===n:0===n&&e===t}var F=u(),V=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,o={items:[],isIncomplete:!1},s=e.offsetAt(t),a=n.getNodeFromOffsetEndInclusive(s);if(this.isInComment(e,a?a.offset:0,s))return Promise.resolve(o);var u=this.getCurrentWord(e,s),c=null;if(!a||"string"!==a.type&&"number"!==a.type&&"boolean"!==a.type&&"null"!==a.type){var l=s-u.length;l>0&&'"'===e.getText()[l-1]&&l--,c=i.g.create(e.positionAt(l),t)}else c=i.g.create(e.positionAt(a.offset),e.positionAt(a.offset+a.length));var f={},h={add:function(e){var t=f[e.label];t?t.documentation||(t.documentation=e.documentation):(f[e.label]=e,c&&(e.textEdit=i.j.replace(c,e.insertText)),o.items.push(e))},setAsIncomplete:function(){o.isIncomplete=!0},error:function(e){console.error(e)},log:function(e){console.log(e)},getNumberOfProposals:function(){return o.items.length}};return this.schemaService.getSchemaForResource(e.uri,n).then(function(t){var l=[],p=!0,d="",m=null;if(a&&"string"===a.type){var g=a.parent;g&&"property"===g.type&&g.keyNode===a&&(p=!g.valueNode,m=g,d=e.getText().substr(a.offset+1,a.length-2),g&&(a=g.parent))}if(a&&"object"===a.type){if(a.offset===s)return o;a.properties.forEach(function(e){m&&m===e||(f[e.keyNode.value]=i.a.create("__"))});var v="";p&&(v=r.evaluateSeparatorAfter(e,e.offsetAt(c.end))),t?r.getPropertyCompletions(t,n,a,p,v,h):r.getSchemaLessPropertyCompletions(n,a,d,h);var y=L(a);r.contributions.forEach(function(t){var n=t.collectPropertyCompletions(e.uri,y,u,p,""===v,h);n&&l.push(n)}),!t&&u.length>0&&'"'!==e.getText().charAt(s-u.length-1)&&h.add({kind:i.b.Property,label:r.getLabelForValue(u),insertText:r.getInsertTextForProperty(u,null,!1,v),insertTextFormat:i.d.Snippet,documentation:""})}var _={};return t?r.getValueCompletions(t,n,a,s,e,h,_):r.getSchemaLessValueCompletions(n,a,s,e,h),r.contributions.length>0&&r.getContributedValueCompletions(n,a,s,e,h,l),r.promise.all(l).then(function(){if(0===h.getNumberOfProposals()){var t=s;!a||"string"!==a.type&&"number"!==a.type&&"boolean"!==a.type&&"null"!==a.type||(t=a.offset+a.length);var n=r.evaluateSeparatorAfter(e,t);r.addFillerValueCompletions(_,n,h)}return o})})},e.prototype.getPropertyCompletions=function(e,t,n,r,o,s){var a=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 u={kind:i.b.Property,label:e,insertText:a.getInsertTextForProperty(e,n,r,o),insertTextFormat:i.d.Snippet,filterText:a.getFilterTextForValue(e),documentation:n.description||""};D(u.insertText,"$1"+o)&&(u.command={title:"Suggest",command:"editor.action.triggerSuggest"}),s.add(u)}})}})},e.prototype.getSchemaLessPropertyCompletions=function(e,t,n,r){var o=this,s=function(e){e.properties.forEach(function(e){var t=e.keyNode.value;r.add({kind:i.b.Property,label:t,insertText:o.getInsertTextForValue(t,""),insertTextFormat:i.d.Snippet,filterText:o.getFilterTextForValue(t),documentation:""})})};if(t.parent)if("property"===t.parent.type){var a=t.parent.keyNode.value;e.visit(function(e){return"property"===e.type&&e!==t.parent&&e.keyNode.value===a&&e.valueNode&&"object"===e.valueNode.type&&s(e.valueNode),!0})}else"array"===t.parent.type&&t.parent.items.forEach(function(e){"object"===e.type&&e!==t&&s(e)});else"object"===t.type&&r.add({kind:i.b.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:i.d.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(e,t,n,r,o){var s=this,a=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(a=t.offset+t.length,t=t.parent),!t)return o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:i.d.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:i.d.Snippet,documentation:""});var u=this.evaluateSeparatorAfter(r,a),c=function(e){T(e.parent,n,!0)||o.add({kind:s.getSuggestionKind(e.type),label:s.getLabelTextForMatchingNode(e,r),insertText:s.getInsertTextForMatchingNode(e,r,u),insertTextFormat:i.d.Snippet,documentation:""}),"boolean"===e.type&&s.addBooleanValueCompletion(!e.value,u,o)};if("property"===t.type&&n>t.colonOffset){var l=t.valueNode;if(l&&(n>l.offset+l.length||"object"===l.type||"array"===l.type))return;var f=t.keyNode.value;e.visit(function(e){return"property"===e.type&&e.keyNode.value===f&&e.valueNode&&c(e.valueNode),!0}),"$schema"===f&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(u,o)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){var h=t.parent.keyNode.value;e.visit(function(e){var t=e;return"property"===e.type&&t.keyNode.value===h&&t.valueNode&&"array"===t.valueNode.type&&t.valueNode.items.forEach(c),!0})}else t.items.forEach(c)},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);tt.colonOffset){var s=t.keyNode.value,a=t.valueNode;if(!a||n<=a.offset+a.length){var u=L(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 o=this;void 0===r&&(r=0);var s=!1;if(e.default){for(var a=e.type,u=e.default,c=r;c>0;c--)u=[u],a="array";n.add({kind:this.getSuggestionKind(a),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,t),insertTextFormat:i.d.Snippet,detail:F("json.suggest.default","Default value")}),s=!0}Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach(function(a){var u,c,l=e.type,f=a.body,h=a.label;if(void 0!==f){e.type;for(var p=r;p>0;p--)f=[f],"array";u=o.getInsertTextForSnippetValue(f,t),c=o.getFilterTextForSnippetValue(f),h=h||o.getLabelForSnippetValue(f)}else if("string"==typeof a.bodyText){var d="",m="",g="";for(p=r;p>0;p--)d=d+g+"[\n",m=m+"\n"+g+"]",g+="\t",l="array";u=d+g+a.bodyText.split("\n").join("\n"+g)+m+t,h=h||u,c=u.replace(/[\n]/g,"")}n.add({kind:o.getSuggestionKind(l),label:h,documentation:a.description,insertText:u,insertTextFormat:i.d.Snippet,filterText:c}),s=!0}),s||"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,o=e.enum.length;r57?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;s0?t[0]:null}if(!e)return i.b.Value;switch(e){case"string":return i.b.Value;case"object":return i.b.Module;case"property":return i.b.Property;default:return i.b.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=o.a(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=o.a(t.getText(),!0),i=e.items,s=i.length-1;s>=0;s--){var a=i[s];if(n>a.offset+a.length)return r.setPosition(a.offset+a.length),5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?s+1:s;if(n>=a.offset)return s}return 0},e.prototype.isInComment=function(e,t,n){var r=o.a(e.getText(),!1);r.setPosition(t);for(var i=r.scan();17!==i&&r.getTokenOffset()+r.getTokenLength()o.offset+1&&r=0;f--){var h=this.contributions[f].getInfoContribution(e.uri,l);if(h)return h.then(function(e){return c(e)})}return this.schemaService.getSchemaForResource(e.uri,n).then(function(e){if(e){var t=null,r=null,i=null,s=null;n.getMatchingSchemas(e.schema,o.offset).every(function(e){if(e.node===o&&!e.inverted&&e.schema&&(t=t||e.schema.title,r=r||e.schema.markdownDescription||U(e.schema.description),e.schema.enum)){var n=e.schema.enum.indexOf(P(o));e.schema.markdownEnumDescriptions?i=e.schema.markdownEnumDescriptions[n]:e.schema.enumDescriptions&&(i=U(e.schema.enumDescriptions[n])),i&&"string"!=typeof(s=e.schema.enum[n])&&(s=JSON.stringify(s))}return!0});var a="";return t&&(a=U(t)),r&&(a.length>0&&(a+="\n\n"),a+=r),i&&(a.length>0&&(a+="\n\n"),a+="`"+U(s)+"`: "+i),c([a])}return null})},e}();function U(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}var W=u(),q=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?d.Ignore:d.Error)},e.prototype.doValidation=function(e,t,n){var r=this;if(!this.validationEnabled)return this.promise.resolve([]);var o=[],s={},a=function(t){if(t.severity!==d.Ignore){var n=t.location.offset+" "+t.location.length+" "+t.message;if(!s[n]){s[n]=!0;var r={start:e.positionAt(t.location.offset),end:e.positionAt(t.location.offset+t.location.length)},a=t.severity===d.Error?i.c.Error:i.c.Warning;o.push({severity:a,range:r,message:t.message})}}};return this.jsonSchemaService.getSchemaForResource(e.uri,t).then(function(e){var i=n?n.trailingCommas:d.Error,s=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 f=c.valueNode||c;a({location:{offset:f.offset,length:f.length},message:e.errors[0],severity:d.Warning})}else a({location:{offset:u.offset,length:1},message:e.errors[0],severity:d.Warning})}else{var h=t.validate(e.schema);h&&h.forEach(a)}K(e.schema)&&(i=s=d.Ignore)}if(t.syntaxErrors.forEach(function(e){e.code===l.TrailingComma&&(e.severity=i),a(e)}),o.push.apply(o,t.externalDiagnostic),s!==d.Ignore){var p=W("InvalidCommentToken","Comments are not permitted in JSON.");t.comments.forEach(function(e){a({location:e,severity:s,message:p})})}return o})},e}();function K(e){if(e&&"object"==typeof e){if(e.allowComments)return!0;if(e.allOf)return e.allOf.some(K)}return!1}var B=48,$=57,Y=65,H=97,J=102;function z(e){return e=H&&e<=J?e-H+10:0)}function G(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*z(e.charCodeAt(1))/255,green:17*z(e.charCodeAt(2))/255,blue:17*z(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*z(e.charCodeAt(1))/255,green:17*z(e.charCodeAt(2))/255,blue:17*z(e.charCodeAt(3))/255,alpha:17*z(e.charCodeAt(4))/255};case 7:return{red:(16*z(e.charCodeAt(1))+z(e.charCodeAt(2)))/255,green:(16*z(e.charCodeAt(3))+z(e.charCodeAt(4)))/255,blue:(16*z(e.charCodeAt(5))+z(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*z(e.charCodeAt(1))+z(e.charCodeAt(2)))/255,green:(16*z(e.charCodeAt(3))+z(e.charCodeAt(4)))/255,blue:(16*z(e.charCodeAt(5))+z(e.charCodeAt(6)))/255,alpha:(16*z(e.charCodeAt(7))+z(e.charCodeAt(8)))/255}}return null}var Q=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 o=e.uri;if(("vscode://defaultsettings/keybindings.json"===o||D(o.toLowerCase(),"/user/keybindings.json"))&&"array"===r.type){var s=[];return r.items.forEach(function(t){if("object"===t.type)for(var n=0,r=t.properties;n0;)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 f.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 ne(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 te(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=ee("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",se(e));return this.promise.resolve(new re({},[t]))}return this.requestService(e).then(function(t){if(!t){var n=ee("json.schema.nocontent","Unable to load schema from '{0}': No content.",se(e));return new re({},[n])}var r,i=[];r=o.c(t,i);var s=i.length?[ee("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",se(e),i[0].offset)]:[];return new re(r,s)},function(t){var n=ee("json.schema.unabletoload","Unable to load schema from '{0}': {1}",se(e),t.toString());return new re({},[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(ee("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(ee("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=0||(o.push(l),c(l))}return n.promise.all(u)};return u(i,i,t).then(function(e){return new ie(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=P(n[0].valueNode);if(r&&function(e,t){if(e.length0?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 se(e){try{var t=f.a.parse(e);if("file"===t.scheme)return t.fsPath}catch(e){}return e}function ae(e){var t=e.promiseConstructor||Promise,n=new oe(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(Z);var r=new V(n,e.contributions,t),s=new R(n,e.contributions,t),a=new Q(n),u=new q(n,t);return{configure:function(e){n.clearExternalSchemas(),e.schemas&&e.schemas.forEach(function(e){n.registerExternalSchema(e.uri,e.fileMatch,e.schema)}),u.configure(e)},resetSchema:function(e){return n.onResourceChange(e)},doValidation:u.doValidation.bind(u),parseJSONDocument:function(e){return j(e,{collectComments:!0})},newJSONDocument:function(e,t){return function(e,t){return void 0===t&&(t=[]),new I(e,[],[],t)}(e,t)},doResolve:r.doResolve.bind(r),doComplete:r.doComplete.bind(r),findDocumentSymbols:a.findDocumentSymbols.bind(a),findColorSymbols:function(e,t){return a.findDocumentColors(e,t).then(function(e){return e.map(function(e){return e.range})})},findDocumentColors:a.findDocumentColors.bind(a),getColorPresentations:a.getColorPresentations.bind(a),doHover:s.doHover.bind(s),format:function(e,t,n){var r=void 0;if(t){var s=e.offsetAt(t.start);r={offset:s,length:e.offsetAt(t.end)-s}}var a={tabSize:n?n.tabSize:4,insertSpaces:!n||n.insertSpaces,eol:"\n"};return Object(o.b)(e.getText(),r,a).map(function(t){return i.j.replace(i.g.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)})}}}var ue=monaco.Promise,ce=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}(),le=function(){function e(e,t){this._ctx=e,this._languageSettings=t.languageSettings,this._languageId=t.languageId,this._languageService=ae({promiseConstructor:ce}),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 ue.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 ue.as(i)},e.prototype.resetSchema=function(e){return ue.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 ue.as(r)},e.prototype.findDocumentColors=function(e){var t=this._getTextDocument(e),n=this._languageService.parseJSONDocument(t),r=this._languageService.findDocumentColors(t,n);return ue.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 ue.as(o)},e.prototype._getTextDocument=function(e){for(var t=0,n=this._ctx.getMirrorModels();t