webpackJsonp([0],{ /***/ "lbPO": /***/ (function(module, exports, __webpack_require__) { !function(e,t){ true?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.monaco=t():e.monaco=t();}(window,function(){return function(e){function t(t){for(var n,o,r=t[0],s=t[1],a=0,l=[];a=n?w:{done:!1,value:e[t++]};}};},e.from=function(t){return t?Array.isArray(t)?e.fromArray(t):t:e.empty();},e.map=function(e,t){return{next:function(){var n=e.next();return n.done?w:{done:!1,value:t(n.value)};}};},e.filter=function(e,t){return{next:function(){for(;;){var n=e.next();if(n.done)return w;if(t(n.value))return{done:!1,value:n.value};}}};},e.forEach=n,e.collect=function(e){var t=[];return n(e,function(e){return t.push(e);}),t;};}(v||(v={}));var S,x=function(){function e(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===i&&(i=t-1),this.items=e,this.start=t,this.end=n,this.index=i;}return e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current();},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index];},e;}(),E=function(e){function t(t,n,i,o){return void 0===n&&(n=0),void 0===i&&(i=t.length),void 0===o&&(o=n-1),e.call(this,t,n,i,o)||this;}return C(t,e),t.prototype.current=function(){return e.prototype.current.call(this);},t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current();},t.prototype.first=function(){return this.index=this.start,this.current();},t.prototype.last=function(){return this.index=this.end-1,this.current();},t.prototype.parent=function(){return null;},t;}(x),L=function(){function e(e,t){this.iterator=e,this.fn=t;}return e.prototype.next=function(){return this.fn(this.iterator.next());},e;}(),T=function(){return function(e){this.element=e;};}(),I=function(){function e(){}return e.prototype.isEmpty=function(){return!this._first;},e.prototype.unshift=function(e){return this.insert(e,!1);},e.prototype.push=function(e){return this.insert(e,!0);},e.prototype.insert=function(e,t){var n=this,i=new T(e);if(this._first){if(t){var o=this._last;this._last=i,i.prev=o,o.next=i;}else{var r=this._first;this._first=i,i.next=r,r.prev=i;}}else this._first=i,this._last=i;return function(){for(var e=n._first;e instanceof T;){if(e===i){if(e.prev&&e.next){var t=e.prev;t.next=e.next,e.next.prev=t;}else e.prev||e.next?e.next?e.prev||(n._first=n._first.next,n._first.prev=void 0):(n._last=n._last.prev,n._last.next=void 0):(n._first=void 0,n._last=void 0);break;}e=e.next;}};},e.prototype.iterator=function(){var e,t=this._first;return{next:function(){return t?(e?e.value=t.element:e={done:!1,value:t.element},t=t.next,e):w;}};},e;}();!function(e){var t={dispose:function(){}};e.None=function(){return t;};}(S||(S={}));var N=function(){function e(e){void 0===e&&(e=null),this._options=e,this._event=null,this._disposed=!1,this._deliveryQueue=null,this._listeners=null;}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,i,o){t._listeners||(t._listeners=new I());var r=t._listeners.isEmpty();r&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t);var s,a=t._listeners.push(i?[n,i]:n);return r&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t),t._options&&t._options.onListenerDidAdd&&t._options.onListenerDidAdd(t,n,i),s={dispose:function(){(s.dispose=e._noop,t._disposed)||(a(),t._options&&t._options.onLastListenerRemove&&(t._listeners&&!t._listeners.isEmpty()||t._options.onLastListenerRemove(t)));}},Array.isArray(o)&&o.push(s),s;}),this._event;},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=[]);for(var t=this._listeners.iterator(),n=t.next();!n.done;n=t.next())this._deliveryQueue.push([n.value,e]);for(;this._deliveryQueue.length>0;){var i=this._deliveryQueue.shift(),o=i[0],r=i[1];try{"function"==typeof o?o.call(void 0,r):o[0].call(o[1],r);}catch(n){a(n);}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=null),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0;},e._noop=function(){},e;}(),k=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new N({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 m(function(e){var t,n=this,i=!1;return function(){return i?t:(i=!0,t=e.apply(n,arguments));};}(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&&e.listener.dispose(),e.listener=null;},e.prototype.dispose=function(){this.emitter.dispose();},e;}();function O(e){return function(t,n,i){void 0===n&&(n=null);var o=!1,r=e(function(e){if(!o)return r?r.dispose():o=!0,t.call(n,e);},null,i);return o&&r.dispose(),r;};}function D(){for(var e=[],t=0;t1)&&u.fire(e),a=0;},n);});},onLastListenerRemove:function(){o.dispose();}});return u.event;}var A=function(){function e(){this.buffers=[];}return e.prototype.wrapEvent=function(e){var t=this;return function(n,i,o){return e(function(e){var o=t.buffers[t.buffers.length-1];o?o.push(function(){return n.call(i,e);}):n.call(i,e);},void 0,o);};},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t);var n=e();return this.buffers.pop(),t.forEach(function(e){return e();}),n;},e;}();function M(e,t){return function(n,i,o){return void 0===i&&(i=null),e(function(e){return n.call(i,t(e));},null,o);};}function P(e,t){return function(n,i,o){return void 0===i&&(i=null),e(function(e){return t(e)&&n.call(i,e);},null,o);};}var F=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(M(this._event,t));},e.prototype.filter=function(t){return new e(P(this._event,t));},e.prototype.on=function(e,t,n){return this._event(e,t,n);},e;}();function W(e){return new F(e);}var B,V=function(){function e(){var e=this;this.listening=!1,this.inputEvent=S.None,this.inputEventListener=y.None,this.emitter=new N({onFirstListenerDidAdd:function(){e.listening=!0,e.inputEventListener=e.inputEvent(e.emitter.fire,e.emitter);},onLastListenerRemove:function(){e.listening=!1,e.inputEventListener.dispose();}}),this.event=this.emitter.event;}return Object.defineProperty(e.prototype,"input",{set:function(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter));},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.inputEventListener.dispose(),this.emitter.dispose();},e;}(),H=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n);}};});!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof U||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested;},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:S.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:H});}(B||(B={}));var U=function(){function e(){this._isCancelled=!1,this._emitter=null;}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()));},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?H:(this._emitter||(this._emitter=new N()),this._emitter.event);},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._emitter&&(this._emitter.dispose(),this._emitter=null);},e;}(),j=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new U()),this._token;},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token instanceof U&&this._token.cancel():this._token=B.Cancelled;},e.prototype.dispose=function(){this._token?this._token instanceof U&&this._token.dispose():this._token=B.None;},e;}(),z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}();function K(e){return e&&"function"==typeof e.then;}function q(e){var t=new j(),n=e(t.token),i=new Promise(function(e,i){t.token.onCancellationRequested(function(){i(h());}),Promise.resolve(n).then(function(n){t.dispose(),e(n);},function(e){t.dispose(),i(e);});});return new(function(){function e(){}return e.prototype.cancel=function(){t.cancel();},e.prototype.then=function(e,t){return i.then(e,t);},e.prototype.catch=function(e){return this.then(void 0,e);},e;}())();}var G=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=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 i.b(function(e,t){n.doResolve=e,n.doReject=t;}).then(function(){n.completionPromise=null,n.doResolve=null;var e=n.task;return n.task=null,e();})),this.timeout=setTimeout(function(){n.timeout=null,n.doResolve(null);},t),this.completionPromise;},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.doReject(h()),this.completionPromise=null);},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null);},e.prototype.dispose=function(){this.cancelTimeout();},e;}();function $(e,t){return t?new Promise(function(n,i){var o=setTimeout(n,e);t.onCancellationRequested(function(){clearTimeout(o),i(h());});}):q(function(t){return $(e,t);});}function Y(e,t){function n(){try{t();}catch(e){a(e);}}return e.then(function(e){return n();},function(e){return n();}),Promise.resolve(e);}function X(e,t,n){void 0===t&&(t=function(e){return!!e;}),void 0===n&&(n=null);var i=0,o=e.length,r=function(){if(i>=o)return Promise.resolve(n);var s=e[i++];return Promise.resolve(s()).then(function(e){return t(e)?Promise.resolve(e):r();});};return r();}var Z,Q=function(e){function t(t,n){var i=e.call(this)||this;return i._token=-1,"function"==typeof t&&"number"==typeof n&&i.setIfNotSet(t,n),i;}return z(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this);},t.prototype.cancel=function(){-1!==this._token&&(clearTimeout(this._token),this._token=-1);},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=setTimeout(function(){n._token=-1,e();},t);},t.prototype.setIfNotSet=function(e,t){var n=this;-1===this._token&&(this._token=setTimeout(function(){n._token=-1,e();},t));},t;}(y),J=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t;}return z(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this);},t.prototype.cancel=function(){-1!==this._token&&(clearInterval(this._token),this._token=-1);},t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=setInterval(function(){e();},t);},t;}(y),ee=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this);}return e.prototype.dispose=function(){this.cancel(),this.runner=null;},e.prototype.cancel=function(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1);},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e);},e.prototype.isScheduled=function(){return-1!==this.timeoutToken;},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.doRun();},e.prototype.doRun=function(){this.runner&&this.runner();},e;}();!function(){if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){var e=Object.freeze({didTimeout:!0,timeRemaining:function(){return 15;}});Z=function(t,n){void 0===n&&(n=0);var i=setTimeout(function(){return t(e);},n),o=!1;return{dispose:function(){o||(o=!0,clearTimeout(i));}};};}else Z=function(e,t){var n=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0),i=!1;return{dispose:function(){i||(i=!0,cancelIdleCallback(n));}};};}();var te=function(){function e(e){var t=this;this._executor=function(){try{t._value=e();}catch(e){t._error=e;}finally{t._didRun=!0;}},this._handle=Z(function(){return t._executor();});}return e.prototype.dispose=function(){this._handle.dispose();},e.prototype.getValue=function(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value;},e;}();var ne=function(){function e(e){var t;K(t=e)&&"function"==typeof t.done?this._winjsPromise=e:this._winjsPromise=new i.a(function(t,n){var i=!0;e(function(e){i?o.h(function(){return t(e);}):t(e);},function(e){i?o.h(function(){return n(e);}):n(e);}),i=!1;});}return e.all=function(t){return new e(i.a.join(t).then(null,function(e){for(var t in e)if(e.hasOwnProperty(t))return e[t];}));},e.race=function(t){return new e(i.a.any(t).then(function(e){return e.value;},function(e){return e.value;}));},e.resolve=function(t){return new e(i.a.wrap(t));},e.reject=function(t){return new e(i.a.wrapError(t));},e.prototype.then=function(t,n){var r=!0,s=new e(this._winjsPromise.then(t&&function(e){return r?new i.a(function(n,i){o.h(function(){var o;try{o=t(e);}catch(e){return void i(e);}n(o);});}):t(e);},n&&function(e){return r?new i.a(function(t,i){o.h(function(){var o;try{o=n(e);}catch(e){return void i(e);}t(o);});}):n(e);}));return r=!1,s;},e.prototype.catch=function(e){return this.then(null,e);},e;}();function ie(e,t){for(var n=[],i=2;i0))return r;o=r-1;}}return-(i+1);}function ae(e,t){return function e(t,n,i,o,r){if(o<=i)return;var s=i+(o-i)/2|0;e(t,n,i,s,r);e(t,n,s+1,o,r);if(n(t[s],t[s+1])<=0)return;!function(e,t,n,i,o,r){for(var s=n,a=i+1,u=n;u<=o;u++)r[u]=e[u];for(var u=n;u<=o;u++)s>i?e[u]=r[a++]:a>o?e[u]=r[s++]:t(r[a],r[s])<0?e[u]=r[a++]:e[u]=r[s++];}(t,n,i,s,o,r);}(e,t,0,e.length-1,[]),e;}function ue(e,t){for(var n=[],i=void 0,o=0,r=ae(e.slice(0),t);ot;o--)i.push(o);return i;}var ge={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function me(e){return typeof e===ge.string||e instanceof String;}function _e(e){return!(typeof e!==ge.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date);}function ve(e){return(typeof e===ge.number||e instanceof Number)&&!isNaN(e);}function ye(e){return!0===e||!1===e;}function be(e){return typeof e===ge.undefined;}function Ce(e){return be(e)||null===e;}var we=Object.prototype.hasOwnProperty;function Se(e){if(!_e(e))return!1;for(var t in e)if(we.call(e,t))return!1;return!0;}function xe(e){return typeof e===ge.function;}function Ee(e,t){if(me(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t);}else if(xe(t)){if(e instanceof t)return;if(!Ce(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true");}}function Le(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(n){e[n]&&"object"==typeof e[n]?t[n]=Le(e[n]):t[n]=e[n];}),t;}var Te=Object.prototype.hasOwnProperty;function Ie(e,t,n){return void 0===n&&(n=!0),_e(e)?(_e(t)&&Object.keys(t).forEach(function(i){i in e?n&&(_e(e[i])&&_e(t[i])?Ie(e[i],t[i],n):e[i]=t[i]):e[i]=t[i];}),e):t;}function Ne(e,t){if(e===t)return!0;if(null==e||null==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,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n/?";var Re=function(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",n=0;n=0||(t+="\\"+De[n]);return t+="\\s]+)",new RegExp(t,"g");}();function Ae(e){var t=Re;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 Me(e,t,n,i){t.lastIndex=0;var o=t.exec(n);if(!o)return null;var r=o[0].indexOf(" ")>=0?function(e,t,n,i){var o,r=e-1-i;for(t.lastIndex=0;o=t.exec(n);){var s=o.index||0;if(s>r)return null;if(t.lastIndex>=r)return{word:o[0],startColumn:i+1+s,endColumn:i+1+t.lastIndex};}return null;}(e,t,n,i):function(e,t,n,i){var o,r=e-1-i,s=n.lastIndexOf(" ",r-1)+1,a=n.indexOf(" ",r);for(-1===a&&(a=n.length),t.lastIndex=s;o=t.exec(n);){var u=o.index||0;if(u<=r&&t.lastIndex>=r)return{word:o[0],startColumn:i+1+u,endColumn:i+1+t.lastIndex};}return null;}(e,t,n,i);return t.lastIndex=0,r;}var Pe,Fe=function(){return(Fe=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=2?(S=_?2:4,D=2/y):(S=_?1:3,D=1/y),(E=Math.max(0,Math.floor((O-d-2)*D/(l+D))))/D>v&&(E=Math.floor(v*D)),L=O-E,"left"===m?(x=0,T+=E,I+=E,N+=E,k+=E):x=t-E-d;}else x=0,E=0,S=0,L=O;var R=h?p:0;return{width:t,height:n,glyphMarginLeft:T,glyphMarginWidth:w,glyphMarginHeight:n,lineNumbersLeft:I,lineNumbersWidth:b,lineNumbersHeight:n,decorationsLeft:N,decorationsWidth:u,decorationsHeight:n,contentLeft:k,contentWidth:L,contentHeight:n,renderMinimap:S,minimapLeft:x,minimapWidth:E,viewportColumn:Math.max(1,Math.floor((L-d-2)/l)),verticalScrollbarWidth:d,horizontalScrollbarHeight:f,overviewRuler:{top:R,width:d,height:n-2*R,right:0}};},e;}(),$e={fontFamily:o.d?"Menlo, Monaco, 'Courier New', monospace":o.c?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:o.d?12:14,lineHeight:0,letterSpacing:0},Ye={tabSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},Xe={inDiffEditor:!1,wordSeparators:De,lineNumbersMinChars:5,lineDecorationsWidth:10,readOnly:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!1,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:1,wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:"languageDefined",autoClosingQuotes:"languageDefined",autoSurround:"languageDefined",autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,copyWithSyntaxHighlighting:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"auto",showUnused:!0,viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:ie("editorViewAccessibleLabel","Editor content"),renderLineNumbers:1,renderCustomLineNumbers:null,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:1,mouseWheelZoom:!1,cursorStyle:Pe.Line,cursorWidth:0,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,scrollBeyondLastColumn:5,smoothScrolling:!1,stopRenderingLineAfter:1e4,renderWhitespace:"none",renderControlCharacters:!1,fontLigatures:!1,renderIndentGuides:!0,highlightActiveIndentGuide:!0,renderLineHighlight:"line",scrollbar:{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1},minimap:{enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120},fixedOverflowWidgets:!1},contribInfo:{selectionClipboard:!0,hover:{enabled:!0,delay:300,sticky:!0},links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:{enabled:!0,cycle:!1},iconsInSuggestions:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!0,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,tabCompletion:"off",suggest:{filterGraceful:!0,snippets:"inline",snippetsPreventQuickSuggestions:!0,localityBonus:!1},selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,foldingStrategy:"auto",showFoldingControls:"mouseover",matchBrackets:!0,find:{seedSearchStringFromSelection:!0,autoFindInSelection:!1,globalFindClipboard:!1},colorDecorators:!0,lightbulbEnabled:!0,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}},Ze=function(){function e(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null);}return e.prototype.define=function(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e;},e.prototype.keyCodeToStr=function(e){return this._keyCodeToStr[e];},e.prototype.strToKeyCode=function(e){return this._strToKeyCode[e.toLowerCase()]||0;},e;}(),Qe=new Ze(),Je=new Ze(),et=new Ze();function tt(e,t){return(e|(65535&t)<<16>>>0)>>>0;}function nt(e,t){if(0===e)return null;var n=(65535&e)>>>0,i=(4294901760&e)>>>16;return 0!==i?new st(it(n,t),it(i,t)):it(n,t);}function it(e,t){var n=!!(2048&e),i=!!(256&e);return new rt(2===t?i:n,!!(1024&e),!!(512&e),2===t?n:i,255&e);}!function(){function e(e,t,n,i){void 0===n&&(n=t),void 0===i&&(i=n),Qe.define(e,t),Je.define(e,n),et.define(e,i);}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 Qe.keyCodeToStr(e);},e.fromString=function(e){return Qe.strToKeyCode(e);},e.toUserSettingsUS=function(e){return Je.keyCodeToStr(e);},e.toUserSettingsGeneral=function(e){return et.keyCodeToStr(e);},e.fromUserSettings=function(e){return Je.strToKeyCode(e)||et.strToKeyCode(e);};}(ze||(ze={}));var ot,rt=function(){function e(e,t,n,i,o){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyCode=o;}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.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;}(),st=function(){return function(e,t){this.type=2,this.firstPart=e,this.chordPart=t;};}(),at=function(){return function(e,t,n,i,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyLabel=o,this.keyAriaLabel=r;};}(),ut=function(){return function(){};}(),lt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),ct=/^\w[\w\d+.-]*$/,dt=/^\//,ht=/^\/\//,pt=!0;var ft="",gt="/",mt=/^(([^:\/?#]+?):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,_t=function(){function e(e,t,n,i,o){"object"==typeof e?(this.scheme=e.scheme||ft,this.authority=e.authority||ft,this.path=e.path||ft,this.query=e.query||ft,this.fragment=e.fragment||ft):(this.scheme=e||ft,this.authority=t||ft,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==gt&&(t=gt+t):t=gt;}return t;}(this.scheme,n||ft),this.query=i||ft,this.fragment=o||ft,function(e){if(!e.scheme){if(pt)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');console.warn('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');}if(e.scheme&&!ct.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!dt.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');}else if(ht.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');}(this));}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme;},Object.defineProperty(e.prototype,"fsPath",{get:function(){return wt(this);},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,o=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=ft),void 0===n?n=this.authority:null===n&&(n=ft),void 0===i?i=this.path:null===i&&(i=ft),void 0===o?o=this.query:null===o&&(o=ft),void 0===r?r=this.fragment:null===r&&(r=ft),t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new vt(t,n,i,o,r);},e.parse=function(e){var t=mt.exec(e);return t?new vt(t[2]||ft,decodeURIComponent(t[4]||ft),decodeURIComponent(t[5]||ft),decodeURIComponent(t[7]||ft),decodeURIComponent(t[9]||ft)):new vt(ft,ft,ft,ft,ft);},e.file=function(e){var t=ft;if(o.g&&(e=e.replace(/\\/g,gt)),e[0]===gt&&e[1]===gt){var n=e.indexOf(gt,2);-1===n?(t=e.substring(2),e=gt):(t=e.substring(2,n),e=e.substring(n)||gt);}return new vt("file",t,e,ft,ft);},e.from=function(e){return new vt(e.scheme,e.authority,e.path,e.query,e.fragment);},e.prototype.toString=function(e){return void 0===e&&(e=!1),St(this,e);},e.prototype.toJSON=function(){return this;},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new vt(t);return n._fsPath=t.fsPath,n._formatted=t.external,n;}return t;},e;}(),vt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t;}return lt(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=wt(this)),this._fsPath;},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?St(this,!0):(this._formatted||(this._formatted=St(this,!1)),this._formatted);},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e;},t;}(_t),yt=((ot={})[58]="%3A",ot[47]="%2F",ot[63]="%3F",ot[35]="%23",ot[91]="%5B",ot[93]="%5D",ot[64]="%40",ot[33]="%21",ot[36]="%24",ot[38]="%26",ot[39]="%27",ot[40]="%28",ot[41]="%29",ot[42]="%2A",ot[43]="%2B",ot[44]="%2C",ot[59]="%3B",ot[61]="%3D",ot[32]="%20",ot);function bt(e,t){for(var n=void 0,i=-1,o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=yt[r];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=s):-1===i&&(i=o);}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e;}function Ct(e){for(var t=void 0,n=0;n1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,o.g&&(t=t.replace(/\//g,"\\")),t;}function St(e,t){var n=t?Ct:bt,i="",o=e.scheme,r=e.authority,s=e.path,a=e.query,u=e.fragment;if(o&&(i+=o,i+=":"),(r||"file"===o)&&(i+=gt,i+=gt),r){var l=r.indexOf("@");if(-1!==l){var c=r.substr(0,l);r=r.substr(l+1),-1===(l=c.indexOf(":"))?i+=n(c,!1):(i+=n(c.substr(0,l),!1),i+=":",i+=n(c.substr(l+1),!1)),i+="@";}-1===(l=(r=r.toLowerCase()).indexOf(":"))?i+=n(r,!1):(i+=n(r.substr(0,l),!1),i+=r.substr(l));}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(d=s.charCodeAt(1))>=65&&d<=90&&(s="/"+String.fromCharCode(d+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var d;(d=s.charCodeAt(0))>=65&&d<=90&&(s=String.fromCharCode(d+32)+":"+s.substr(2));}i+=n(s,!0);}return a&&(i+="?",i+=n(a,!1)),u&&(i+="#",i+=t?u:bt(u,!1)),i;}var xt,Et,Lt,Tt,It,Nt,kt,Ot,Dt,Rt,At,Mt,Pt,Ft,Wt,Bt,Vt,Ht,Ut,jt,zt,Kt,qt,Gt,$t,Yt,Xt,Zt,Qt=function(){function e(e,t){this.lineNumber=e,this.column=t;}return e.prototype.with=function(t,n){return void 0===t&&(t=this.lineNumber),void 0===n&&(n=this.column),t===this.lineNumber&&n===this.column?this:new e(t,n);},e.prototype.delta=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=0),this.with(this.lineNumber+e,this.column+t);},e.prototype.equals=function(t){return e.equals(this,t);},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column;},e.prototype.isBefore=function(t){return e.isBefore(this,t);},e.isBefore=function(e,t){return e.lineNumbern||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i);}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 i,o,r,s;return n.startLineNumbert.endLineNumber?(r=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(r=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(i,o,r,s);},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t);},e.intersectRanges=function(t,n){var i=t.startLineNumber,o=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return il?(r=l,s=c):r===l&&(s=Math.min(s,c)),i>r?null:i===r&&o>s?null:new e(i,o,r,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 Qt(this.endLineNumber,this.endColumn);},e.prototype.getStartPosition=function(){return new Qt(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;}(),en=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),tn=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i,o)||this;return r.selectionStartLineNumber=t,r.selectionStartColumn=n,r.positionLineNumber=i,r.positionColumn=o,r;}return en(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn);},t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]";},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e);},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn;},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1;},t.prototype.setEndPosition=function(e,n){return 0===this.getDirection()?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn);},t.prototype.getPosition=function(){return new Qt(this.positionLineNumber,this.positionColumn);},t.prototype.setStartPosition=function(e,n){return 0===this.getDirection()?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n);},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column);},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;n=0,yn=_n.indexOf("Edge/")>=0,bn=vn||yn,Cn=_n.indexOf("Firefox")>=0,wn=_n.indexOf("AppleWebKit")>=0,Sn=_n.indexOf("Chrome")>=0,xn=-1===_n.indexOf("Chrome")&&_n.indexOf("Safari")>=0,En=_n.indexOf("iPad")>=0,Ln=yn&&_n.indexOf("WebView/")>=0;var Tn=function(e,t,n){var i=function(e){return o.fire(e);},o=new N({onFirstListenerAdd:function(){e.addEventListener(t,i,n);},onLastListenerRemove:function(){e.removeEventListener(t,i,n);}});return o.event;};function In(e){return M(e,function(e){return e.preventDefault(),e.stopPropagation(),e;});}var Nn=new Array(230),kn=new Array(112);!function(){for(var e=0;e=0;){if(r=s+o,(0===s||32===n.charCodeAt(s-1))&&32===n.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===n.charCodeAt(s-1)&&r===i)return this._lastStart=s-1,void(this._lastEnd=r);if(0===s&&r===i)return this._lastStart=0,void(this._lastEnd=r);}this._lastStart=-1;}}else this._lastStart=-1;}else this._lastStart=-1;},e.prototype.hasClass=function(e,t){return this._findClassName(e,t),-1!==this._lastStart;},e.prototype.addClasses=function(e){for(var t=this,n=[],i=1;i0;){li.sort(pi.sort),li.shift().execute();}di=!1;},si=function(e,t){void 0===t&&(t=0);var n,i=new pi(e,t);return ui.push(i),ci||(ci=!0,n=hi,ai||(ai=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||function(e){return setTimeout(function(){return e(new Date().getTime());},0);}),ai.call(self,n)),i;},ri=function(e,t){if(di){var n=new pi(e,t);return li.push(n),n;}return si(e,t);};var fi=16,gi=function(e,t){return t;},mi=function(e){function t(t,n,i,o,r){void 0===o&&(o=gi),void 0===r&&(r=fi);var s=e.call(this)||this,a=null,u=0,l=s._register(new Q()),c=function(){u=new Date().getTime(),i(a),a=null;};return s._register(ni(t,n,function(e){a=o(a,e);var t=new Date().getTime()-u;t>=r?(l.cancel(),c()):l.setIfNotSet(c,r-t);})),s;}return jn(t,e),t;}(y);function _i(e,t,n,i,o){return new mi(e,t,n,i,o);}function vi(e){return document.defaultView.getComputedStyle(e,null);}var yi=function(e,t){return parseFloat(t)||0;};function bi(e,t,n){var i=vi(e),o="0";return i&&(o=i.getPropertyValue?i.getPropertyValue(t):i.getAttribute(n)),yi(e,o);}var Ci={getBorderLeftWidth:function(e){return bi(e,"border-left-width","borderLeftWidth");},getBorderRightWidth:function(e){return bi(e,"border-right-width","borderRightWidth");},getBorderTopWidth:function(e){return bi(e,"border-top-width","borderTopWidth");},getBorderBottomWidth:function(e){return bi(e,"border-bottom-width","borderBottomWidth");},getPaddingLeft:function(e){return bi(e,"padding-left","paddingLeft");},getPaddingRight:function(e){return bi(e,"padding-right","paddingRight");},getPaddingTop:function(e){return bi(e,"padding-top","paddingTop");},getPaddingBottom:function(e){return bi(e,"padding-bottom","paddingBottom");},getMarginLeft:function(e){return bi(e,"margin-left","marginLeft");},getMarginTop:function(e){return bi(e,"margin-top","marginTop");},getMarginRight:function(e){return bi(e,"margin-right","marginRight");},getMarginBottom:function(e){return bi(e,"margin-bottom","marginBottom");},__commaSentinel:!1},wi=function(){return function(e,t){this.width=e,this.height=t;};}();function Si(e){for(var t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;var o=vi(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=Ci.getBorderLeftWidth(e),n+=Ci.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent);}return{left:i,top:n};}function xi(e){var t=e.getBoundingClientRect();return{left:t.left+Ei.scrollX,top:t.top+Ei.scrollY,width:t.width,height:t.height};}var Ei=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop;},enumerable:!0,configurable:!0}),e;}())();function Li(e){var t=Ci.getMarginLeft(e)+Ci.getMarginRight(e);return e.offsetWidth+t;}function Ti(e){var t=Ci.getBorderLeftWidth(e)+Ci.getBorderRightWidth(e),n=Ci.getPaddingLeft(e)+Ci.getPaddingRight(e);return e.offsetWidth-t-n;}function Ii(e){var t=Ci.getBorderTopWidth(e)+Ci.getBorderBottomWidth(e),n=Ci.getPaddingTop(e)+Ci.getPaddingBottom(e);return e.offsetHeight-t-n;}function Ni(e){var t=Ci.getMarginTop(e)+Ci.getMarginBottom(e);return e.offsetHeight+t;}function ki(e,t){for(;e;){if(e===t)return!0;e=e.parentNode;}return!1;}function Oi(e,t,n){for(;e;){if(Yn(e,t))return e;if(n)if("string"==typeof n){if(Yn(e,n))return null;}else if(e===n)return null;e=e.parentNode;}return null;}function Di(e){void 0===e&&(e=document.getElementsByTagName("head")[0]);var t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t;}var Ri=null;function Ai(){return Ri||(Ri=Di()),Ri;}function Mi(e,t){if(void 0===t&&(t=Ai()),t){for(var n=function(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[];}(t),i=[],o=0;o=0;o--)t.sheet.deleteRule(i[o]);}}var Pi={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:wn?"webkitAnimationStart":"animationstart",ANIMATION_END:wn?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:wn?"webkitAnimationIteration":"animationiteration"},Fi={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0);}};var Wi=function(){function e(e){var t=this;this._onDidFocus=new N(),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=new N(),this.onDidBlur=this._onDidBlur.event,this.disposables=[];var n=ki(document.activeElement,e),i=!1;Tn(e,Pi.FOCUS,!0)(function(){i=!1,n||(n=!0,t._onDidFocus.fire());},null,this.disposables),Tn(e,Pi.BLUR,!0)(function(){n&&(i=!0,window.setTimeout(function(){i&&(i=!1,n=!1,t._onDidBlur.fire());},0));},null,this.disposables);}return e.prototype.dispose=function(){this.disposables=f(this.disposables),this._onDidFocus.dispose(),this._onDidBlur.dispose();},e;}();function Bi(e){return new Wi(e);}function Vi(e){for(var t=[],n=1;n200)return t;if("object"==typeof t){switch(t.$mid){case 1:return _t.revive(t);case 2:return new RegExp(t.source,t.flags);}for(var i in t)Object.hasOwnProperty.call(t,i)&&(t[i]=e(t[i],n+1));}return t;}(t,0);}!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data";}(Hi||(Hi={}));var Zi="";function Qi(e){return!e||"string"!=typeof e||0===e.trim().length;}function Ji(e,t,n){void 0===n&&(n="0");for(var i=""+e,o=[i],r=i.length;r=t.length?e:t[i];});}function no(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e;}});}function io(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&");}function oo(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var i=0;e.indexOf(t,i)===i;)i+=n;return e.substring(i);}function ro(e,t){if(!e||!t)return e;var n=t.length,i=e.length;if(0===n||0===i)return e;for(var o=i,r=-1;-1!==(r=e.lastIndexOf(t,o-1))&&r+n===o;){if(0===r)return"";o=r;}return e.substring(0,o);}function so(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t;}function uo(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("Cannot create regex from empty string");t||(e=io(e)),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),new RegExp(e,i);}function lo(e){for(var t=0,n=e.length;t=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n;}return-1;}function po(e){return e>=97&&e<=122;}function fo(e){return e>=65&&e<=90;}function go(e){return po(e)||fo(e);}function mo(e,t){return(e?e.length:0)===(t?t.length:0)&&_o(e,t);}function _o(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var i=0;ie.length)&&_o(e,t,n);}function yo(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374;}var Io=String.fromCharCode(65279);function No(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0));}function ko(e){return btoa(encodeURIComponent(e));}var Oo="/",Do=o.g?"\\":"/";function Ro(e,t){void 0===t&&(t=Do);var n=~e.lastIndexOf("/")||~e.lastIndexOf("\\");if(0===n)return".";if(0==~n)return e[0];if(~n==e.length-1)return Ro(e.substring(0,e.length-1));var i=e.substring(0,~n);return o.g&&":"===i[i.length-1]&&(i+=t),i;}function Ao(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?Ao(e.substring(0,e.length-1)):e.substr(1+~t);}function Mo(e){var t=~(e=Ao(e)).lastIndexOf(".");return t?e.substring(~t):"";}var Po=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,Fo=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;function Wo(e,t){if(null==e)return e;var n=e.length;if(0===n)return".";var i=!(!o.g||!t);if(function(e,t){return t?!Fo.test(e):!Po.test(e);}(e,i))return e;for(var r=i?"\\":"/",s=function(e,t){void 0===t&&(t="/");if(!e)return"";var n=e.length,i=e.charCodeAt(0);if(47===i||92===i){if((47===(i=e.charCodeAt(1))||92===i)&&47!==(i=e.charCodeAt(2))&&92!==i){for(var o=3,r=o;o=65&&i<=90||i>=97&&i<=122)&&58===e.charCodeAt(1))return 47===(i=e.charCodeAt(2))||92===i?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://");if(-1!==s)for(s+=3;s0)&&".."!==h&&(l=-1===d?"":l.slice(0,d),u=!0);}else Bo(e,a,c,".")&&(s||l||c0){var i=e.charCodeAt(e.length-1);if(47!==i&&92!==i){var o=n.charCodeAt(0);47!==o&&92!==o&&(e+=Oo);}}e+=n;}return Wo(e);};function Uo(e){return function(e){return Ao(e.path);}(e)||e.authority;}function jo(e,t,n){var i;return void 0===n&&(n=!(i=e)||i.scheme!==Hi.file||!o.c),!(e!==t)||!(!e||!t)&&(n?mo(e.toString(),t.toString()):e.toString()===t.toString());}function zo(e){if(e.scheme===Hi.file)return _t.file(Ro(Ko(e)));var t=Ro(e.path,"/");return e.authority&&t.length&&47!==t.charCodeAt(0)?null:e.with({path:t});}function Ko(e){var t;return t=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:o.g&&47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path.substr(1):e.path,o.g&&(t=t.replace(/\//g,"\\")),t;}!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){var n=new Map();t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(function(e){var t=e.split(":"),i=t[0],o=t[1];i&&o&&n.set(i,o);});var i=t.path.substring(0,t.path.indexOf(";"));return i&&n.set(e.META_DATA_MIME,i),n;};}(Vo||(Vo={}));var qo=dn("commandService"),Go=new(function(){function e(){this._commands=new Map();}return e.prototype.registerCommand=function(e,t){var n=this;if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t});}if(e.description){for(var i=[],o=0,r=e.description.args;o=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},Zo=function(e,t){return function(n,i){t(n,i,e);};},Qo=function(){function e(e,t,n){void 0===n&&(n=Yo),this._editorService=e,this._commandService=t,this._telemetryService=n;}return e.prototype.open=function(e,t){var n;this._telemetryService&&this._telemetryService.publicLog("openerService",{scheme:e.scheme});var i=e.scheme,o=e.path,r=e.query,s=e.fragment,a=void 0;if(i===Hi.http||i===Hi.https||i===Hi.mailto)Yi(e.toString(!0));else if("command"===i&&Go.getCommand(o)){var u=[];try{u=Xi(r),Array.isArray(u)||(u=[u]);}catch(e){}a=(n=this._commandService).executeCommand.apply(n,[o].concat(u));}else{var l=void 0,c=/^L?(\d+)(?:,(\d+))?/.exec(s);if(c&&(l={startLineNumber:parseInt(c[1]),startColumn:c[2]?parseInt(c[2]):1},e=e.with({fragment:""})),!e.scheme)return Promise.resolve(void 0);e.scheme===Hi.file&&(e=function(e){var t;return t=e.scheme===Hi.file?_t.file(Wo(Ko(e))).path:Wo(e.path),e.with({path:t});}(e)),a=this._editorService.openCodeEditor({resource:e,options:{selection:l}},this._editorService.getFocusedCodeEditor(),t&&t.openToSide);}return Promise.resolve(a);},e=Xo([Zo(0,pn),Zo(1,qo),Zo(2,hn($o))],e);}();function Jo(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed");}var er={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},tr=function(){function e(e,t){void 0===t&&(t={});var n=this;this._onDidUpdate=new N(),this._editor=e,this._options=Ie(t,er,!1),this.disposed=!1,this._disposables=[],this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._disposables.push(this._editor.onDidDispose(function(){return n.dispose();})),this._disposables.push(this._editor.onDidUpdateDiff(function(){return n._onDiffUpdated();})),this._options.followsCaret&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeCursorPosition(function(e){n.ignoreSelectionChange||(n.nextIdx=-1);})),this._options.alwaysRevealFirst&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeModel(function(e){n.revealFirst=!0;})),this._init();}return e.prototype._init=function(){this._editor.getLineChanges();},e.prototype._onDiffUpdated=function(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1));},e.prototype._compute=function(e){var t=this;this.ranges=[],e&&e.forEach(function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(function(e){t.ranges.push({rhs:!0,range:new Jt(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)});}):t.ranges.push({rhs:!0,range:new Jt(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)});}),this.ranges.sort(function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0;}),this._onDidUpdate.fire(this);},e.prototype._initIdx=function(e){var t=!1,n=this._editor.getPosition();if(n){for(var i=0,o=this.ranges.length;i=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var n=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var i=n.range.getStartPosition();this._editor.setPosition(i),this._editor.revealPositionInCenter(i,t);}finally{this.ignoreSelectionChange=!1;}}},e.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0;},e.prototype.next=function(e){void 0===e&&(e=0),this._move(!0,e);},e.prototype.previous=function(e){void 0===e&&(e=0),this._move(!1,e);},e.prototype.dispose=function(){f(this._disposables),this._disposables.length=0,this._onDidUpdate.dispose(),this.ranges=[],this.disposed=!0;},e;}(),nr=new(function(){function e(){this._zoomLevel=0,this._onDidChangeZoomLevel=new N(),this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event;}return e.prototype.getZoomLevel=function(){return this._zoomLevel;},e.prototype.setZoomLevel=function(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel));},e;}())(),ir=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),or=o.d?1.5:1.35;function rr(e,t){if("number"==typeof e)return e;if(void 0===e)return t;var n=parseFloat(e);return isNaN(n)?t:n;}function sr(e,t,n){return en?n:e;}function ar(e,t){return"string"!=typeof e?t:e;}var ur=function(){function e(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing;}return e.createFromRawSettings=function(t,n){var i=ar(t.fontFamily,$e.fontFamily),o=ar(t.fontWeight,$e.fontWeight),r=rr(t.fontSize,$e.fontSize);0===(r=sr(r,0,100))?r=$e.fontSize:r<8&&(r=8);var s=function(e,t){if("number"==typeof e)return Math.round(e);if(void 0===e)return t;var n=parseInt(e);return isNaN(n)?t:n;}(t.lineHeight,0);0===(s=sr(s,0,150))?s=Math.round(or*r):s<8&&(s=8);var a=rr(t.letterSpacing,0);a=sr(a,-5,20);var u=1+.1*nr.getZoomLevel();return new e({zoomLevel:n,fontFamily:i,fontWeight:o,fontSize:r*=u,lineHeight:s*=u,letterSpacing:a});},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"+this.letterSpacing;},e.prototype.getMassagedFontFamily=function(){return /[,"']/.test(this.fontFamily)?this.fontFamily:/[+ ]/.test(this.fontFamily)?'"'+this.fontFamily+'"':this.fontFamily;},e;}(),lr=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isTrusted=n,i.isMonospace=t.isMonospace,i.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,i.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,i.canUseHalfwidthRightwardsArrow=t.canUseHalfwidthRightwardsArrow,i.spaceWidth=t.spaceWidth,i.maxDigitWidth=t.maxDigitWidth,i;}return ir(t,e),t.prototype.equals=function(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth;},t;}(ur);var cr,dr={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},hr={ExecuteCommand:"executeCommand",ExecuteCommands:"executeCommands",Type:"type",ReplacePreviousChar:"replacePreviousChar",CompositionStart:"compositionStart",CompositionEnd:"compositionEnd",Paste:"paste",Cut:"cut",Undo:"undo",Redo:"redo"};!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full";}(cr||(cr={}));var pr=function(){function e(e){this.tabSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace);}return e.prototype.equals=function(e){return this.tabSize===e.tabSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace;},e.prototype.createChangeEvent=function(e){return{tabSize:this.tabSize!==e.tabSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace};},e;}(),fr=function(){return function(e,t){this.range=e,this.matches=t;};}(),gr=function(){return function(e,t,n){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=n;};}(),mr=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}();function _r(e){var t=[];return e.forEach(function(e){return t.push(e);}),t;}var vr=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.hasNext=function(){return this._pos0)n.left||(n.left=new br(),n.left.segment=i.value()),n=n.left;else if(o<0)n.right||(n.right=new br(),n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new br(),n.mid.segment=i.value()),n=n.mid;}}var r=n.value;return n.value=t,n.key=e,r;},e.prototype.get=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid;}}return n?n.value:void 0;},e.prototype.findSubstr=function(e){for(var t=this._iter.reset(e),n=this._root,i=void 0;n;){var o=t.cmp(n.segment);if(o>0)n=n.left;else if(o<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid;}}return n&&n.value||i;},e.prototype.forEach=function(e){this._forEach(this._root,e);},e.prototype._forEach=function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t));},e;}(),wr=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.toKey=function(e){var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t;},e;}(),Sr=function(e){function t(t,n){void 0===n&&(n=1);var i=e.call(this)||this;return i._limit=t,i._ratio=Math.min(Math.max(0,n),1),i;}return mr(t,e),t.prototype.get=function(t){return e.prototype.get.call(this,t,2);},t.prototype.set=function(t,n){e.prototype.set.call(this,t,n,2),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;},Object.defineProperty(e.prototype,"size",{get:function(){return this._size;},enumerable:!0,configurable:!0}),e.prototype.get=function(e,t){void 0===t&&(t=0);var n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value;},e.prototype.set=function(e,t,n){void 0===n&&(n=0);var i=this._map.get(e);if(i)i.value=t,0!==n&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:default:this.addItemLast(i);}this._map.set(e,i),this._size++;}},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.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&&(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.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;var n=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e;}else if(2===t){if(e===this._tail)return;n=e.next,i=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.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;}()),xr="**",Er="/",Lr="[/\\\\]",Tr="[^/\\\\]",Ir=/\//g;function Nr(e){switch(e){case 0:return"";case 1:return Tr+"*?";default:return"(?:"+Lr+"|"+Tr+"+"+Lr+"|"+Lr+Tr+"+)*?";}}function kr(e,t){if(!e)return[];for(var n,i=[],o=!1,r=!1,s="",a=0;ae.length)return!1;if(n){if(!vo(e,t))return!1;if(t.length===e.length)return!0;var o=t.length;return t.charAt(t.length-1)===i&&o--,e.charAt(o)===i;}return t.charAt(t.length-1)!==i&&(t+=i),0===e.indexOf(t);}(n,t.base)?e(t.pathToRelative(t.base,n),i):null;};}function Ur(e,t){return t.trimForExclusions&&ao(e,"/**")?e.substr(0,e.length-2):e;}function jr(e,t,n){var i=Do!==Oo?e.replace(Ir,Do):e,o=Do+i,r=n?function(e,n){return e&&(e===i||ao(e,o))?t:null;}:function(e,n){return e&&e===i?t:null;};return r.allPaths=[(n?"*/":"./")+e],r;}function zr(e,t,n){return!(!e||!t)&&function(e,t){void 0===t&&(t={});if(!e)return Wr;if("string"==typeof e||(o=e,r=o,r&&"string"==typeof r.base&&"string"==typeof r.pattern&&"function"==typeof r.pathToRelative)){var n=Vr(e,t);if(n===Br)return Wr;var i=function(e,t){return!!n(e,t);};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i;}var o,r;return function(e,t){var n=Kr(Object.getOwnPropertyNames(e).map(function(n){return function(e,t,n){if(!1===t)return Br;var i=Vr(e,n);if(i===Br)return Br;if("boolean"==typeof t)return i;if(t){var o=t.when;if("string"==typeof o){var r=function(t,n,r,s){if(!s||!i(t,n))return null;var a=o.replace("$(basename)",r),u=s(a);return K(u)?u.then(function(t){return t?e:null;}):u?e:null;};return r.requiresSiblings=!0,r;}}return i;}(n,e[n],t);}).filter(function(e){return e!==Br;})),i=n.length;if(!i)return Br;if(!n.some(function(e){return!!e.requiresSiblings;})){if(1===i)return n[0];var o=function(e,t){for(var i=0,o=n.length;i0;n--){var r=e.charCodeAt(n-1);if(47===r||92===r)break;}t=e.substr(n);}var s=o.indexOf(t);return-1!==s?i[s]:null;};a.basenames=o,a.patterns=i,a.allBasenames=o;var u=e.filter(function(e){return!e.basenames;});return u.push(a),u;}function qr(e,t,n,i){if(Array.isArray(e)){for(var o=0,r=0,s=e;ro&&(o=a);}return o;}if("string"==typeof e)return i?"*"===e?5:e===n?10:0:0;if(e){var u=e.language,l=e.pattern,c=e.scheme,d=e.hasAccessToAllModels;if(!i&&!d)return 0;o=0;if(c)if(c===t.scheme)o=10;else{if("*"!==c)return 0;o=5;}if(u)if(u===n)o=10;else{if("*"!==u)return 0;o=Math.max(o,5);}if(l){if(l!==t.fsPath&&!zr(l,t.fsPath))return 0;o=10;}return o;}return 0;}var Gr=dn("modelService");function $r(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget;}function Yr(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(Yr):!!e.exclusive);}var Xr,Zr,Qr,Jr=function(){function e(){this._clock=0,this._entries=[],this._onDidChange=new N();}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event;},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this,i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),m(function(){if(i){var e=n._entries.indexOf(i);e>=0&&(n._entries.splice(e,1),n._lastCandidate=void 0,n._onDidChange.fire(n._entries.length),i=void 0);}});},e.prototype.has=function(e){return this.all(e).length>0;},e.prototype.all=function(e){if(!e)return[];this._updateScores(e);for(var t=[],n=0,i=this._entries;n0&&t.push(o.provider);}return t;},e.prototype.ordered=function(e){var t=[];return this._orderedForEach(e,function(e){return t.push(e.provider);}),t;},e.prototype.orderedGroups=function(e){var t,n,i=[];return this._orderedForEach(e,function(e){t&&n===e._score?t.push(e.provider):(n=e._score,t=[e.provider],i.push(t));}),i;},e.prototype._orderedForEach=function(e,t){if(e){this._updateScores(e);for(var n=0;n0&&t(i);}}},e.prototype._updateScores=function(t){var n={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==n.language||this._lastCandidate.uri!==n.uri){this._lastCandidate=n;for(var i=0,o=this._entries;i0){for(var s=0,a=this._entries;st._score?-1:e._timet._time?-1:0;},e;}(),es=function(){function e(){this._onDidChange=new N(),this.onDidChange=this._onDidChange.event,this._map=Object.create(null),this._promises=Object.create(null),this._colorMap=null;}return e.prototype.fire=function(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1});},e.prototype.register=function(e,t){var n=this;return this._map[e]=t,this.fire([e]),m(function(){n._map[e]===t&&(delete n._map[e],n.fire([e]));});},e.prototype.getPromise=function(e){var t=this,n=this.get(e);if(n)return Promise.resolve(n);var i=this._promises[e];return i?i.then(function(n){return t.get(e);}):null;},e.prototype.get=function(e){return this._map[e]||null;},e.prototype.setColorMap=function(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Object.keys(this._map),changedColorMap:!0});},e.prototype.getColorMap=function(){return this._colorMap;},e.prototype.getDefaultBackground=function(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null;},e;}(),ts=function(){return function(e,t){this.language=e,this.id=t;};}(),ns=function(){function e(){}return e.getLanguageId=function(e){return(255&e)>>>0;},e.getTokenType=function(e){return(1792&e)>>>8;},e.getFontStyle=function(e){return(14336&e)>>>11;},e.getForeground=function(e){return(8372224&e)>>>14;},e.getBackground=function(e){return(4286578688&e)>>>23;},e.getClassNameFromMetadata=function(e){var t="mtk"+this.getForeground(e),n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),t;},e.getInlineStyleFromMetadata=function(e,t){var n=this.getForeground(e),i=this.getFontStyle(e),o="color: "+t[n]+";";return 1&i&&(o+="font-style: italic;"),2&i&&(o+="font-weight: bold;"),4&i&&(o+="text-decoration: underline;"),o;},e;}(),is=((Xr=Object.create(null))[0]="method",Xr[1]="function",Xr[2]="constructor",Xr[3]="field",Xr[4]="variable",Xr[5]="class",Xr[6]="struct",Xr[7]="interface",Xr[8]="module",Xr[9]="property",Xr[10]="event",Xr[11]="operator",Xr[12]="unit",Xr[13]="value",Xr[14]="constant",Xr[15]="enum",Xr[16]="enum-member",Xr[17]="keyword",Xr[25]="snippet",Xr[18]="text",Xr[19]="color",Xr[20]="file",Xr[21]="reference",Xr[22]="customcolor",Xr[23]="folder",Xr[24]="type-parameter",function(e){return Xr[e]||"property";}),os=function(){var e=Object.create(null);return e.method=0,e.function=1,e.constructor=2,e.field=3,e.variable=4,e.class=5,e.struct=6,e.interface=7,e.module=8,e.property=9,e.event=10,e.operator=11,e.unit=12,e.value=13,e.constant=14,e.enum=15,e["enum-member"]=16,e.keyword=17,e.snippet=25,e.text=18,e.color=19,e.file=20,e.reference=21,e.customcolor=22,e.folder=23,e["type-parameter"]=24,function(t){return e[t]||"property";};}();!function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange";}(Zr||(Zr={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write";}(Qr||(Qr={}));var rs,ss=((rs=Object.create(null))[0]="file",rs[1]="module",rs[2]="namespace",rs[3]="package",rs[4]="class",rs[5]="method",rs[6]="property",rs[7]="field",rs[8]="constructor",rs[9]="enum",rs[10]="interface",rs[11]="function",rs[12]="variable",rs[13]="constant",rs[14]="string",rs[15]="number",rs[16]="boolean",rs[17]="array",rs[18]="object",rs[19]="key",rs[20]="null",rs[21]="enum-member",rs[22]="struct",rs[23]="event",rs[24]="operator",rs[25]="type-parameter",function(e){return"symbol-icon "+(rs[e]||"property");}),as=function(){function e(e){this.value=e;}return e.Comment=new e("comment"),e.Imports=new e("imports"),e.Region=new e("region"),e;}();var us=new Jr(),ls=new Jr(),cs=new Jr(),ds=new Jr(),hs=new Jr(),ps=new Jr(),fs=new Jr(),gs=new Jr(),ms=new Jr(),_s=new Jr(),vs=new Jr(),ys=new Jr(),bs=new Jr(),Cs=new Jr(),ws=new Jr(),Ss=new Jr(),xs=new Jr(),Es=new Jr(),Ls=new es(),Ts=new(function(){function e(){}return e.prototype.clone=function(){return this;},e.prototype.equals=function(e){return this===e;},e;}())(),Is=new ts("vs.editor.nullMode",0);function Ns(e,t,n,i){return new on([new nn(i,"",e)],n);}function ks(e,t,n,i){var o=new Uint32Array(2);return o[0]=i,o[1]=(16384|e<<0|2<<23)>>>0,new rn(o,null===n?Ts:n);}var Os=dn("editorWorkerService"),Ds=dn("textModelService"),Rs=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),As=self;void 0===As.Promise&&(As.Promise=ne);var Ms="$initialize",Ps=!1;function Fs(e){o.f&&(Ps||(Ps=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message));}var Ws=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null);}return e.prototype.setWorkerId=function(e){this._workerId=e;},e.prototype.sendMessage=function(e,t){var n=this,i=String(++this._lastSentReq);return new Promise(function(o,r){n._pendingReplies[i]={resolve:o,reject:r},n._send({vsWorker:n._workerId,req:i,method:e,args:t});});},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e);}catch(e){return;}t&&t.vsWorker&&(-1!==this._workerId&&t.vsWorker!==this._workerId||this._handleMessage(t));},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var n=e;if(!this._pendingReplies[n.seq])return void console.warn("Got reply to unknown seq");var i=this._pendingReplies[n.seq];if(delete this._pendingReplies[n.seq],n.err){var o=n.err;return n.err.$isError&&((o=new Error()).name=n.err.name,o.message=n.err.message,o.stack=n.err.stack),void i.reject(o);}i.resolve(n.res);}else{var r=e,s=r.req;this._handler.handleMessage(r.method,r.args).then(function(e){t._send({vsWorker:t._workerId,seq:s,res:e,err:void 0});},function(e){e.detail instanceof Error&&(e.detail=l(e.detail)),t._send({vsWorker:t._workerId,seq:s,res:void 0,err:l(e)});});}},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t);},e;}(),Bs=function(e){function t(t,n){var i=e.call(this)||this,o=null;i._worker=i._register(t.create("vs/base/common/worker/simpleWorker",function(e){i._protocol.handleMessage(e);},function(e){o&&o(e);})),i._protocol=new Ws({sendMessage:function(e){i._worker.postMessage(e);},handleMessage:function(e,t){return Promise.resolve(null);}}),i._protocol.setWorkerId(i._worker.getId());var r=null;void 0!==self.require&&"function"==typeof self.require.getConfig?r=self.require.getConfig():void 0!==self.requirejs&&(r=self.requirejs.s.contexts._.config),i._onModuleLoaded=i._protocol.sendMessage(Ms,[i._worker.getId(),n,r]),i._lazyProxy=new Promise(function(e,t){o=t,i._onModuleLoaded.then(function(t){for(var n={},i=0;i0&&e.getLanguageId(s-1)===o;)s--;return new Ks(e,o,s,r+1,e.getStartOffset(s),e.getEndOffset(r));}var Ks=function(){function e(e,t,n,i,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=o,this._lastCharOffset=r;}return e.prototype.getLineContent=function(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset);},e.prototype.getTokenCount=function(){return this._lastTokenIndex-this._firstTokenIndex;},e.prototype.findTokenIndexAtOffset=function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex;},e.prototype.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex);},e;}();function qs(e){return 0!=(7&e);}var Gs=function(){function e(t){t.autoClosingPairs?this._autoClosingPairs=t.autoClosingPairs.map(function(e){return new js(e);}):t.brackets?this._autoClosingPairs=t.brackets.map(function(e){return new js({open:e[0],close:e[1]});}):this._autoClosingPairs=[],this._autoCloseBefore="string"==typeof t.autoCloseBefore?t.autoCloseBefore:e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=t.surroundingPairs||this._autoClosingPairs;}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs;},e.prototype.getAutoCloseBeforeSet=function(){return this._autoCloseBefore;},e.prototype.shouldAutoClosePair=function(e,t,n){if(0===t.getTokenCount())return!0;for(var i=t.findTokenIndexAtOffset(n-2),o=t.getStandardTokenType(i),r=0;r=0;n--)t+=e.charAt(n);return t;}(e=n)),t;};}(),oa=function(){function e(){}return e._findPrevBracketInText=function(e,t,n,i){var o=n.match(e);if(!o)return null;var r=n.length-(o.index||0),s=o[0].length,a=i+r;return new Jt(t,a-s+1,t,a+1);},e.findPrevBracketInToken=function(e,t,n,i,o){var r=ia(n).substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,r,i);},e.findNextBracketInText=function(e,t,n,i){var o=n.match(e);if(!o)return null;var r=o.index||0,s=o[0].length;if(0===s)return null;var a=i+r;return new Jt(t,a+1,t,a+1+s);},e.findNextBracketInToken=function(e,t,n,i,o){var r=n.substring(i,o);return this.findNextBracketInText(e,t,r,i);},e;}(),ra=function(){function e(e,t,n){n=n||{},this._richEditBrackets=e,this._complexAutoClosePairs=t.filter(function(e){return e.open.length>1&&!!e.close;}).map(function(e){return new js(e);}),n.docComment&&this._complexAutoClosePairs.push(new js({open:n.docComment.open,close:n.docComment.close}));}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets.length;t=0))return{appendText:s.close};}}}return null;},e;}(),sa=function(){function e(e){this._indentationRules=e;}return e.prototype.shouldIncrease=function(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e));},e.prototype.shouldDecrease=function(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e));},e.prototype.shouldIndentNextLine=function(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e));},e.prototype.shouldIgnore=function(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e));},e.prototype.getIndentMetadata=function(e){var t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t;},e;}(),aa=function(){function e(t){var n=this;(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],t.brackets.forEach(function(t){var i=e._createOpenBracketRegExp(t[0]),o=e._createCloseBracketRegExp(t[1]);i&&o&&n._brackets.push({open:t[0],openRegExp:i,close:t[1],closeRegExp:o});}),this._regExpRules=t.regExpRules||[];}return e.prototype.onEnter=function(e,t,n){for(var i=0,o=this._regExpRules.length;i0&&n.length>0)for(i=0,o=this._brackets.length;i0)for(i=0,o=this._brackets.length;i1){var o=t-1,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o;}}return-1;},e.prototype.getInheritIndentForLine=function(e,t,n){void 0===n&&(n=!0);var i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);if(!i)return null;if(t<=1)return{indentation:"",action:null};var o=this.getPrecedingValidLine(e,t,i);if(o<0)return null;if(o<1)return{indentation:"",action:null};var r=e.getLineContent(o);if(i.shouldIncrease(r)||i.shouldIndentNextLine(r))return{indentation:co(r),action:Vs.Indent,line:o};if(i.shouldDecrease(r))return{indentation:co(r),action:null,line:o};if(1===o)return{indentation:co(e.getLineContent(o)),action:null,line:o};var s=o-1,a=i.getIndentMetadata(e.getLineContent(s));if(!(3&a)&&4&a){for(var u=0,l=s-1;l>0;l--)if(!i.shouldIndentNextLine(e.getLineContent(l))){u=l;break;}return{indentation:co(e.getLineContent(u+1)),action:null,line:u+1};}if(n)return{indentation:co(e.getLineContent(o)),action:null,line:o};for(l=o;l>0;l--){var c=e.getLineContent(l);if(i.shouldIncrease(c))return{indentation:co(c),action:Vs.Indent,line:l};if(i.shouldIndentNextLine(c)){u=0;for(var d=l-1;d>0;d--)if(!i.shouldIndentNextLine(e.getLineContent(l))){u=d;break;}return{indentation:co(e.getLineContent(u+1)),action:null,line:u+1};}if(i.shouldDecrease(c))return{indentation:co(c),action:null,line:l};}return{indentation:co(e.getLineContent(1)),action:null,line:1};},e.prototype.getGoodIndentForLine=function(e,t,n,i){var o=this.getIndentRulesSupport(t);if(!o)return null;var r=this.getInheritIndentForLine(e,n),s=e.getLineContent(n);if(r){var u=r.line;if(void 0!==u){var l=this._getOnEnterSupport(t),c=null;try{l&&(c=l.onEnter("",e.getLineContent(u),""));}catch(e){a(e);}if(c){var d=co(e.getLineContent(u));return c.removeText&&(d=d.substring(0,d.length-c.removeText)),c.indentAction===Vs.Indent||c.indentAction===Vs.IndentOutdent?d=i.shiftIndent(d):c.indentAction===Vs.Outdent&&(d=i.unshiftIndent(d)),o.shouldDecrease(s)&&(d=i.unshiftIndent(d)),c.appendText&&(d+=c.appendText),co(d);}}return o.shouldDecrease(s)?r.action===Vs.Indent?r.indentation:i.unshiftIndent(r.indentation):r.action===Vs.Indent?i.shiftIndent(r.indentation):r.indentation;}return null;},e.prototype.getIndentForEnter=function(e,t,n,i){e.forceTokenization(t.startLineNumber);var o,r,s=e.getLineTokens(t.startLineNumber),a=zs(s,t.startColumn-1),u=a.getLineContent(),l=!1;(a.firstCharOffset>0&&s.getLanguageId(0)!==a.languageId?(l=!0,o=u.substr(0,t.startColumn-1-a.firstCharOffset)):o=s.getLineContent().substring(0,t.startColumn-1),t.isEmpty())?r=u.substr(t.startColumn-1-a.firstCharOffset):r=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-a.firstCharOffset);var c=this.getIndentRulesSupport(a.languageId);if(!c)return null;var d=o,h=co(o);if(!i&&!l){var p=this.getInheritIndentForLine(e,t.startLineNumber);c.shouldDecrease(o)&&p&&(h=p.indentation,p.action!==Vs.Indent&&(h=n.unshiftIndent(h))),d=h+oo(oo(o," "),"\t");}var f={getLineTokens:function(t){return e.getLineTokens(t);},getLanguageIdentifier:function(){return e.getLanguageIdentifier();},getLanguageIdAtPosition:function(t,n){return e.getLanguageIdAtPosition(t,n);},getLineContent:function(n){return n===t.startLineNumber?d:e.getLineContent(n);}},g=co(s.getLineContent()),m=this.getInheritIndentForLine(f,t.startLineNumber+1);if(!m){var _=l?g:h;return{beforeEnter:_,afterEnter:_};}var v=l?g:m.indentation;return m.action===Vs.Indent&&(v=n.shiftIndent(v)),c.shouldDecrease(r)&&(v=n.unshiftIndent(v)),{beforeEnter:l?g:h,afterEnter:v};},e.prototype.getIndentActionForType=function(e,t,n,i){var o=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this.getIndentRulesSupport(o.languageId);if(!r)return null;var s,a=o.getLineContent(),u=a.substr(0,t.startColumn-1-o.firstCharOffset);t.isEmpty()?s=a.substr(t.startColumn-1-o.firstCharOffset):s=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-o.firstCharOffset);if(!r.shouldDecrease(u+s)&&r.shouldDecrease(u+n+s)){var l=this.getInheritIndentForLine(e,t.startLineNumber,!1);if(!l)return null;var c=l.indentation;return l.action!==Vs.Indent&&(c=i.unshiftIndent(c)),c;}return null;},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null;},e.prototype._getOnEnterSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.onEnter||null;},e.prototype.getRawEnterActionAtPosition=function(e,t,n){var i=this.getEnterAction(e,new Jt(t,n,t,n));return i?i.enterAction:null;},e.prototype.getEnterAction=function(e,t){var n=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),i=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),o=this._getOnEnterSupport(i.languageId);if(!o)return null;var r,s=i.getLineContent(),u=s.substr(0,t.startColumn-1-i.firstCharOffset);t.isEmpty()?r=s.substr(t.startColumn-1-i.firstCharOffset):r=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-i.firstCharOffset);var l=t.startLineNumber,c="";if(l>1&&0===i.firstCharOffset){var d=this.getScopedLineTokens(e,l-1);d.languageId===i.languageId&&(c=d.getLineContent());}var h=null;try{h=o.onEnter(c,u,r);}catch(e){a(e);}return h?(h.appendText||(h.indentAction===Vs.Indent||h.indentAction===Vs.IndentOutdent?h.appendText="\t":h.appendText=""),h.removeText&&(n=n.substring(0,n.length-h.removeText)),{enterAction:h,indentation:n}):null;},e.prototype.getIndentationAtPosition=function(e,t,n){var i=co(e.getLineContent(t));return i.length>n-1&&(i=i.substring(0,n-1)),i;},e.prototype.getScopedLineTokens=function(e,t,n){return e.forceTokenization(t),zs(e.getLineTokens(t),void 0===n?e.getLineMaxColumn(t)-1:n-1);},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null;},e;}())()),ca=function(){function e(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i;}return e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength;},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength;},e;}();function da(e){return{getLength:function(){return e.length;},getElementAtIndex:function(t){return e.charCodeAt(t);}};}function ha(e,t,n){return new ma(da(e),da(t)).ComputeDiff(n);}var pa=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t);},e;}(),fa=function(){function e(){}return e.Copy=function(e,t,n,i,o){for(var r=0;r0||this.m_modifiedCount>0)&&this.m_changes.push(new ca(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;}(),ma=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_forwardHistory=[],this.m_reverseHistory=[];}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t);},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t);},e.prototype.ModifiedElementsAreEqual=function(e,t){return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t);},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e);},e.prototype._ComputeDiff=function(e,t,n,i,o){var r=this.ComputeDiffRecursive(e,t,n,i,[!1]);return o?this.PrettifyChanges(r):r;},e.prototype.ComputeDiffRecursive=function(e,t,n,i,o){for(o[0]=!1;e<=t&&n<=i&&this.ElementsAreEqual(e,n);)e++,n++;for(;t>=e&&i>=n&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||n>i){var r=void 0;return n<=i?(pa.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r=[new ca(e,0,n,i-n+1)]):e<=t?(pa.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[new ca(e,t-e+1,n,0)]):(pa.Assert(e===t+1,"originalStart should only be one more than originalEnd"),pa.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),r=[]),r;}var s=[0],a=[0],u=this.ComputeRecursionPoint(e,t,n,i,s,a,o),l=s[0],c=a[0];if(null!==u)return u;if(!o[0]){var d=this.ComputeDiffRecursive(e,l,n,c,o),h=[];return h=o[0]?[new ca(l+1,t-(l+1)+1,c+1,i-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,i,o),this.ConcatenateChanges(d,h);}return[new ca(e,t-e+1,n,i-n+1)];},e.prototype.WALKTRACE=function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,m,_){var v,y,b=null,C=new ga(),w=t,S=n,x=h[0]-g[0]-i,E=Number.MIN_VALUE,L=this.m_forwardHistory.length-1;do{(y=x+e)===w||y=0&&(e=(u=this.m_forwardHistory[L])[0],w=1,S=u.length-1);}while(--L>=-1);if(v=C.getReverseChanges(),_[0]){var T=h[0]+1,I=g[0]+1;if(null!==v&&v.length>0){var N=v[v.length-1];T=Math.max(T,N.getOriginalEnd()),I=Math.max(I,N.getModifiedEnd());}b=[new ca(T,d-T+1,I,f-I+1)];}else{C=new ga(),w=r,S=s,x=h[0]-g[0]-a,E=Number.MAX_VALUE,L=m?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(y=x+o)===w||y=l[y+1]?(p=(c=l[y+1]-1)-x-a,c>E&&C.MarkNextChange(),E=c+1,C.AddOriginalElement(c+1,p+1),x=y+1-o):(p=(c=l[y-1])-x-a,c>E&&C.MarkNextChange(),E=c,C.AddModifiedElement(c+1,p+1),x=y-1-o),L>=0&&(o=(l=this.m_reverseHistory[L])[0],w=1,S=l.length-1);}while(--L>=-1);b=C.getChanges();}return this.ConcatenateChanges(v,b);},e.prototype.ComputeRecursionPoint=function(e,t,n,i,o,r,s){var a,u=0,l=0,c=0,d=0,h=0,p=0;e--,n--,o[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var f,g,m=t-e+(i-n),_=m+1,v=new Array(_),y=new Array(_),b=i-n,C=t-e,w=e-n,S=t-i,x=(C-b)%2==0;for(v[b]=e,y[C]=t,s[0]=!1,a=1;a<=m/2+1;a++){var E=0,L=0;for(c=this.ClipDiagonalBound(b-a,a,b,_),d=this.ClipDiagonalBound(b+a,a,b,_),f=c;f<=d;f+=2){for(l=(u=f===c||fE+L&&(E=u,L=l),!x&&Math.abs(f-C)<=a-1&&u>=y[f])return o[0]=u,r[0]=l,g<=y[f]&&a<=1448?this.WALKTRACE(b,c,d,w,C,h,p,S,v,y,u,t,o,l,i,r,x,s):null;}var T=(E-e+(L-n)-a)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(E,this.OriginalSequence,T))return s[0]=!0,o[0]=E,r[0]=L,T>0&&a<=1448?this.WALKTRACE(b,c,d,w,C,h,p,S,v,y,u,t,o,l,i,r,x,s):[new ca(++e,t-e+1,++n,i-n+1)];for(h=this.ClipDiagonalBound(C-a,a,C,_),p=this.ClipDiagonalBound(C+a,a,C,_),f=h;f<=p;f+=2){for(l=(u=f===h||f=y[f+1]?y[f+1]-1:y[f-1])-(f-C)-S,g=u;u>e&&l>n&&this.ElementsAreEqual(u,l);)u--,l--;if(y[f]=u,x&&Math.abs(f-b)<=a&&u<=v[f])return o[0]=u,r[0]=l,g>=v[f]&&a<=1448?this.WALKTRACE(b,c,d,w,C,h,p,S,v,y,u,t,o,l,i,r,x,s):null;}if(a<=1447){var I=new Array(d-c+2);I[0]=b-c+1,fa.Copy(v,c,I,1,d-c+1),this.m_forwardHistory.push(I),(I=new Array(p-h+2))[0]=C-h+1,fa.Copy(y,h,I,1,p-h+1),this.m_reverseHistory.push(I);}}return this.WALKTRACE(b,c,d,w,C,h,p,S,v,y,u,t,o,l,i,r,x,s);},e.prototype.PrettifyChanges=function(e){for(var t=0;t0,s=n.modifiedLength>0;n.originalStart+n.originalLength=0;t--){n=e[t],i=0,o=0;if(t>0){var u=e[t-1];u.originalLength>0&&(i=u.originalStart+u.originalLength),u.modifiedLength>0&&(o=u.modifiedStart+u.modifiedLength);}r=n.originalLength>0,s=n.modifiedLength>0;for(var l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),d=1;;d++){var h=n.originalStart-d,p=n.modifiedStart-d;if(hc&&(c=f,l=d);}n.originalStart-=l,n.modifiedStart-=l;}return e;},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t);},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0;}return!1;},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t);},e.prototype._ModifiedRegionIsBoundary=function(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0;}return!1;},e.prototype._boundaryScore=function(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0);},e.prototype.ConcatenateChanges=function(e,t){var n=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],n)){var i=new Array(e.length+t.length-1);return fa.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],fa.Copy(t,1,i,e.length,t.length-1),i;}i=new Array(e.length+t.length);return fa.Copy(e,0,i,0,e.length),fa.Copy(t,0,i,e.length,t.length),i;},e.prototype.ChangesOverlap=function(e,t,n){if(pa.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),pa.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,r=e.modifiedStart,s=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(s=t.modifiedStart+t.modifiedLength-e.modifiedStart),n[0]=new ca(i,o,r,s),!0;}return n[0]=null,!1;},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e1&&f>1;){if(d.charCodeAt(p-2)!==h.charCodeAt(f-2))break;p--,f--;}(p>1||f>1)&&this._pushTrimWhitespaceCharChange(o,r+1,1,p,s+1,1,f);for(var g=ba._getLastNonBlankColumn(d,1),m=ba._getLastNonBlankColumn(h,1),_=d.length+1,v=h.length+1;g<_&&m255?255:0|e;}function Ta(e){return e<0?0:e>4294967295?4294967295:0|e;}var Ia=function(){return function(e,t){this.index=e,this.remainder=t;};}(),Na=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=Ta(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=Ta(e),t=Ta(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=Ta(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=0,n=this.values.length-1,i=0,o=0,r=0;t<=n;)if(i=t+(n-t)/2|0,e<(r=(o=this.prefixSum[i])-this.values[i]))n=i-1;else{if(!(e>=o))break;t=i+1;}return new Ia(i,e-r);},e;}(),ka=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new Na(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&&t=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;}(),Ra=function(){function e(){this._actual=new Da(0);}return e.prototype.add=function(e){this._actual.set(e,1);},e.prototype.has=function(e){return 1===this._actual.get(e);},e;}(),Aa=function(){function e(e){for(var t=0,n=0,i=0,o=e.length;it&&(t=l),s>n&&(n=s),(c=r[2])>n&&(n=c);}var a=new Ea(++n,++t,0);for(i=0,o=e.length;i=this._maxCharCode?0:this._states.get(e,t);},e;}(),Ma=null;var Pa=null;var Fa=function(){function e(){}return e._createLink=function(e,t,n,i,o){var r=o-1;do{var s=t.charCodeAt(r);if(2!==e.get(s))break;r--;}while(r>i);if(i>0){var a=t.charCodeAt(i-1),u=t.charCodeAt(r);(40===a&&41===u||91===a&&93===u||123===a&&125===u)&&r--;}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)};},e.computeLinks=function(t){for(var n=(null===Ma&&(Ma=new Aa([[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]])),Ma),i=function(){if(null===Pa){Pa=new Da(0);for(var e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)Pa.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(e=0;e<".,;".length;e++)Pa.set(".,;".charCodeAt(e),2);}return Pa;}(),o=[],r=1,s=t.getLineCount();r<=s;r++){for(var a=t.getLineContent(r),u=a.length,l=0,c=0,d=0,h=1,p=!1,f=!1,g=!1;l=0?((i+=n?1:-1)<0?i=e.length-1:i%=e.length,e[i]):null;},e.INSTANCE=new e(),e;}(),Ba=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Va=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Ba(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=Me(e.column,Ae(t),this._lines[e.lineNumber-1],0);return n?new Jt(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,i=this,o=0,r=0,s=[],a=function(){if(r=i._lines.length?w:(n=i._lines[o],s=i._wordenize(n,e),r=0,o+=1,a());};return{next:a};},t.prototype.getLineWords=function(e,t){for(var n=this._lines[e-1],i=[],o=0,r=this._wordenize(n,t);othis._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{var o=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>o&&(n=o,i=!0);}return i?{lineNumber:t,column:n}:e;},t;}(Oa),Ha=function(e){function t(t){var n=e.call(this,t)||this;return n._models=Object.create(null),n;}return Ba(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 Va(_t.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 i=this._getModel(e),o=this._getModel(t);if(!i||!o)return Promise.resolve(null);var r=i.getLinesContent(),s=o.getLinesContent(),a=new xa(r,s,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0}).computeDiff(),u=!(a.length>0)&&this._modelsAreIdentical(i,o);return Promise.resolve({identical:u,changes:a});},e.prototype._modelsAreIdentical=function(e,t){var n=e.getLineCount();if(n!==t.getLineCount())return!1;for(var i=1;i<=n;i++){if(e.getLineContent(i)!==t.getLineContent(i))return!1;}return!0;},e.prototype.computeMoreMinimalEdits=function(t,n){var i=this._getModel(t);if(!i)return Promise.resolve(n);for(var o=[],r=void 0,s=0,a=n=ae(n,function(e,t){return e.range&&t.range?Jt.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1);});se._diffLimit)o.push({range:l,text:c});else for(var p=ha(h,c,!1),f=i.offsetAt(Jt.lift(l).getStartPosition()),g=0,m=p;g=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},qa=function(e,t){return function(n,i){t(n,i,e);};},Ga=6e4,$a=3e5;function Ya(e,t){var n=e.getModel(t);return!!n&&!n.isTooLargeForSyncing();}var Xa=function(e){function t(t,n){var i=e.call(this)||this;return i._modelService=t,i._workerManager=i._register(new Qa(i._modelService)),i._register(Ss.register("*",{provideLinks:function(e,t){return Ya(i._modelService,e.uri)?i._workerManager.withWorker().then(function(t){return t.computeLinks(e.uri);}):Promise.resolve([]);}})),i._register(cs.register("*",new Za(i._workerManager,n,i._modelService))),i;}return za(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype.canComputeDiff=function(e,t){return Ya(this._modelService,e)&&Ya(this._modelService,t);},t.prototype.computeDiff=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.computeDiff(e,t,n);});},t.prototype.computeMoreMinimalEdits=function(e,t){return Array.isArray(t)&&0!==t.length&&Ya(this._modelService,e)?this._workerManager.withWorker().then(function(n){return n.computeMoreMinimalEdits(e,t);}):Promise.resolve(t);},t.prototype.canNavigateValueSet=function(e){return Ya(this._modelService,e);},t.prototype.navigateValueSet=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.navigateValueSet(e,t,n);});},t.prototype.canComputeWordRanges=function(e){return Ya(this._modelService,e);},t.prototype.computeWordRanges=function(e,t){return this._workerManager.withWorker().then(function(n){return n.computeWordRanges(e,t);});},t=Ka([qa(0,Gr),qa(1,Ua)],t);}(y),Za=function(){function e(e,t,n){this._workerManager=e,this._configurationService=t,this._modelService=n;}return e.prototype.provideCompletionItems=function(e,t){if(this._configurationService.getValue(e.uri,t,"editor").wordBasedSuggestions&&Ya(this._modelService,e.uri))return this._workerManager.withWorker().then(function(n){return n.textualSuggest(e.uri,t);});},e;}(),Qa=function(e){function t(t){var n=e.call(this)||this;return n._modelService=t,n._editorWorkerClient=null,n._register(new J()).cancelAndSet(function(){return n._checkStopIdleWorker();},Math.round($a/2)),n._register(n._modelService.onModelRemoved(function(e){return n._checkStopEmptyWorker();})),n;}return za(t,e),t.prototype.dispose=function(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),e.prototype.dispose.call(this);},t.prototype._checkStopEmptyWorker=function(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null);},t.prototype._checkStopIdleWorker=function(){this._editorWorkerClient&&new Date().getTime()-this._lastWorkerUsedTime>$a&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null);},t.prototype.withWorker=function(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new tu(this._modelService,"editorWorkerService")),Promise.resolve(this._editorWorkerClient);},t;}(y),Ja=function(e){function t(t,n,i){var o=e.call(this)||this;if(o._syncedModels=Object.create(null),o._syncedModelsLastUsedTime=Object.create(null),o._proxy=t,o._modelService=n,!i){var r=new J();r.cancelAndSet(function(){return o._checkStopModelSync();},Math.round(Ga/2)),o._register(r);}return o;}return za(t,e),t.prototype.dispose=function(){for(var t in this._syncedModels)f(this._syncedModels[t]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),e.prototype.dispose.call(this);},t.prototype.esureSyncedResources=function(e){for(var t=0;tGa&&t.push(n);}for(var i=0;i>>1,this._text=t;}return e.prototype.equals=function(t){return t instanceof e&&this.slicedEquals(t,0,this._tokensCount);},e.prototype.slicedEquals=function(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var i=t<<1,o=i+(n<<1),r=i;r0?this._tokens[e-1<<1]:0;},e.prototype.getLanguageId=function(e){var t=this._tokens[1+(e<<1)];return ns.getLanguageId(t);},e.prototype.getStandardTokenType=function(e){var t=this._tokens[1+(e<<1)];return ns.getTokenType(t);},e.prototype.getForeground=function(e){var t=this._tokens[1+(e<<1)];return ns.getForeground(t);},e.prototype.getClassName=function(e){var t=this._tokens[1+(e<<1)];return ns.getClassNameFromMetadata(t);},e.prototype.getInlineStyle=function(e,t){var n=this._tokens[1+(e<<1)];return ns.getInlineStyleFromMetadata(n,t);},e.prototype.getEndOffset=function(e){return this._tokens[e<<1];},e.prototype.findTokenIndexAtOffset=function(t){return e.findIndexInTokensArray(this._tokens,t);},e.prototype.inflate=function(){return this;},e.prototype.sliceAndInflate=function(e,t,n){return new su(this,e,t,n);},e.convertToEndOffset=function(e,t){for(var n=(e.length>>>1)-1,i=0;i>>1)-1;nt&&(i=o);}return n;},e;}(),su=function(){function e(e,t,n,i){this._source=e,this._startOffset=t,this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(var o=this._firstTokenIndex,r=e.getCount();o=n)break;this._tokensCount++;}}return e.prototype.equals=function(t){return t instanceof e&&this._startOffset===t._startOffset&&this._endOffset===t._endOffset&&this._deltaOffset===t._deltaOffset&&this._source.slicedEquals(t._source,this._firstTokenIndex,this._tokensCount);},e.prototype.getCount=function(){return this._tokensCount;},e.prototype.getForeground=function(e){return this._source.getForeground(this._firstTokenIndex+e);},e.prototype.getEndOffset=function(e){var t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset;},e.prototype.getClassName=function(e){return this._source.getClassName(this._firstTokenIndex+e);},e.prototype.getInlineStyle=function(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t);},e.prototype.findTokenIndexAtOffset=function(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex;},e;}();iu="undefined"!=typeof TextDecoder?function(e){return new au(e);}:function(e){return new uu();};var au=function(){function e(e){this._decoder=new TextDecoder("UTF-16LE"),this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0;}return e.prototype.reset=function(){this._completedStrings=null,this._bufferLength=0;},e.prototype.build=function(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer();},e.prototype._buildBuffer=function(){if(0===this._bufferLength)return"";var e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return this._decoder.decode(e);},e.prototype._flushBuffer=function(){var e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e;},e.prototype.write1=function(e){var t=this._capacity-this._bufferLength;t<=1&&(0===t||bo(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e;},e.prototype.appendASCII=function(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e;},e.prototype.appendASCIIString=function(e){var t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var n=0;nn)&&(!c.isEmpty()||0!==l.type&&3!==l.type)){var d=c.startLineNumber===n?c.startColumn:i,h=c.endLineNumber===n?c.endColumn:o;r[s++]=new e(d,h,l.inlineClassName,l.type);}}return r;},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.classNamet.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn;},e;}(),cu=function(){return function(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n;};}(),du=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0;}return e.prototype.consumeLowerThan=function(e,t,n){for(;this.count>0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break;}this.count++;},e;}(),hu=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var n=[],i=new du(),o=0,r=0,s=t.length;r1)bo(e.charCodeAt(u-2))&&u--;if(l>1)bo(e.charCodeAt(l-2))&&l--;var d=u-1,h=l-2;o=i.consumeLowerThan(d,o,n),0===i.count&&(o=d),i.insert(h,c);}return i.consumeLowerThan(1073741824,o,n),n;},e;}(),pu=function(){return function(e,t){this.endIndex=e,this.type=t;};}(),fu=function(){function e(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=n,this.continuesWithWrappedLine=i,this.isBasicASCII=o,this.containsRTL=r,this.fauxIndentLength=s,this.lineTokens=a,this.lineDecorations=u,this.tabSize=l,this.spaceWidth=c,this.stopRenderingLineAfter=d,this.renderWhitespace="all"===h?2:"boundary"===h?1:0,this.renderControlCharacters=p,this.fontLigatures=f;}return e.prototype.equals=function(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.spaceWidth===e.spaceWidth&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&lu.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens);},e;}(),gu=function(){function e(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length);}return e.getPartIndex=function(e){return(4294901760&e)>>>16;},e.getCharIndex=function(e){return(65535&e)>>>0;},e.prototype.setPartData=function(e,t,n,i){var o=(t<<16|n<<0)>>>0;this._data[e]=o,this._absoluteOffsets[e]=i+n;},e.prototype.getAbsoluteOffsets=function(){return this._absoluteOffsets;},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e];},e.prototype.partDataToCharOffset=function(t,n,i){if(0===this.length)return 0;for(var o=(t<<16|i<<0)>>>0,r=0,s=this.length-1;r+1>>1,u=this._data[a];if(u===o)return a;u>o?s=a:r=a;}if(r===s)return r;var l=this._data[r],c=this._data[s];if(l===o)return r;if(c===o)return s;var d=e.getPartIndex(l);return i-e.getCharIndex(l)<=(d!==e.getPartIndex(c)?n:e.getCharIndex(c))-i?r:s;},e;}(),mu=function(){return function(e,t,n){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n;};}();function _u(e,t){if(0===e.lineContent.length){var n=0,i=" ";if(e.lineDecorations.length>0){for(var o=[],r=0,s=e.lineDecorations.length;r');}return t.appendASCIIString(i),new mu(new gu(0,0),!1,n);}return function(e,t){var n=e.fontIsMonospace,i=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,r=e.lineContent,s=e.len,a=e.isOverflowing,u=e.parts,l=e.tabSize,c=e.containsRTL,d=e.spaceWidth,h=e.renderWhitespace,p=e.renderControlCharacters,f=new gu(s+1,u.length),g=0,m=0,_=0,v=0,y=0;t.appendASCIIString("");for(var b=0,C=u.length;b=0;if(_=0,t.appendASCIIString('0&&(!i||k>1?t.write1(8594):t.write1(65515),k--);k>0;)t.write1(160),k--;}else t.write1(183);_++;}v=L;}else{var L=0;for(c&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);g0;)t.write1(160),L++,k--;break;case 32:t.write1(160),L++;break;case 60:t.appendASCIIString("<"),L++;break;case 62:t.appendASCIIString(">"),L++;break;case 38:t.appendASCIIString("&"),L++;break;case 0:t.appendASCIIString("�"),L++;break;case 65279:case 8232:t.write1(65533),L++;break;default:To(N)&&m++,p&&N<32?(t.write1(9216+N),L++):(t.write1(N),L++);}_++;}v=L;}t.appendASCIIString("");}f.setPartData(s,u.length-1,_,y),a&&t.appendASCIIString("");return t.appendASCIIString(""),new mu(f,c,o);}(function(e){var t,n,i=e.useMonospaceOptimizations,o=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(i[o++]=new pu(t,""));for(var r=0,s=e.getCount();r=n){i[o++]=new pu(n,u);break;}i[o++]=new pu(a,u);}}return i;}(e.lineTokens,e.fauxIndentLength,n);2!==e.renderWhitespace&&1!==e.renderWhitespace||(r=function(e,t,n,i,o,r,s,a){var u,l=[],c=0,d=0,h=i[d].type,p=i[d].endIndex,f=i.length,g=lo(e);-1===g?(g=t,u=t):u=ho(e);for(var m=0,_=0;_u)b=!0;else if(9===v)b=!0;else if(32===v){if(a){if(y)b=!0;else{var C=_+1=r)&&(l[c++]=new pu(_,"vs-whitespace"),m%=r):(_===p||b&&_>o)&&(l[c++]=new pu(_,h),m%=r),9===v?m=r:To(v)?m+=2:m++,y=b,_===p&&++d0?e.charCodeAt(t-1):0,x=t>1?e.charCodeAt(t-2):0,E=32===S&&32!==x&&9!==x;E||(w=!0);}else w=!0;return l[c++]=new pu(t,w?"vs-whitespace":h),l;}(o,n,e.continuesWithWrappedLine,r,e.fauxIndentLength,e.tabSize,i,1===e.renderWhitespace));var s=0;if(e.lineDecorations.length>0){for(var a=0,u=e.lineDecorations.length;al&&(l=g.startOffset,a[u++]=new pu(l,f)),!(g.endOffset+1<=p)){l=p,a[u++]=new pu(l,f+" "+g.className);break;}l=g.endOffset+1,a[u++]=new pu(l,f+" "+g.className),s++;}p>l&&(l=p,a[u++]=new pu(l,f));}var m=n[n.length-1].endIndex;if(s=50&&(o[r++]=new pu(d+1,c),h=d+1,d=-1);h!==l&&(o[r++]=new pu(l,c));}else o[r++]=u;i=l;}else for(var s=0,a=t.length;s50){for(var c=u.type,g=Math.ceil(f/50),p=1;p=0&&a();});});},e.colorizeLine=function(e,t,n,i,o){void 0===o&&(o=4);var r=Lu.isBasicASCII(e,t),s=Lu.containsRTL(e,r,n);return yu(new fu(!1,!0,e,!1,r,s,0,i,[],o,0,-1,"none",!1,!1)).html;},e.colorizeModelLine=function(e,t,n){void 0===n&&(n=4);var i=e.getLineContent(t);e.forceTokenization(t);var o=e.getLineTokens(t).inflate();return this.colorizeLine(i,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,n);},e;}();function ku(e,t,n){return function(e,t,n){for(var i=[],o=n.getInitialState(),r=0,s=e.length;r"),o=u.endState;}return i.join("");}(e,t,n);}function Ou(e,t){var n=[],i=new Uint32Array(2);i[0]=0,i[1]=16793600;for(var o=0,r=e.length;o");}return n.join("");}(wu=Cu||(Cu={}))[wu.Ignore=0]="Ignore",wu[wu.Info=1]="Info",wu[wu.Warning=2]="Warning",wu[wu.Error=3]="Error",function(e){var t="error",n="warning",i="warn",o="info",r=Object.create(null);r[e.Error]=ie("sev.error","Error"),r[e.Warning]=ie("sev.warning","Warning"),r[e.Info]=ie("sev.info","Info"),e.fromValue=function(r){return r?mo(t,r)?e.Error:mo(n,r)||mo(i,r)?e.Warning:mo(o,r)?e.Info:e.Ignore:e.Ignore;};}(Cu||(Cu={}));var Du=Cu;function Ru(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===dr.ICodeEditor;}var Au=new(function(){function e(){this.data={};}return e.prototype.add=function(e,t){Jo(me(e)),Jo(_e(t)),Jo(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t;},e.prototype.as=function(e){return this.data[e]||null;},e;}())(),Mu="base.contributions.json";var Pu=new(function(){function e(){this._onDidChangeSchema=new N(),this.schemasById={};}return e.prototype.registerSchema=function(e,t){var n;this.schemasById[(n=e,n.length>0&&"#"===n.charAt(n.length-1)?n.substring(0,n.length-1):n)]=t,this._onDidChangeSchema.fire(e);},e;}())();Au.add(Mu,Pu);var Fu={Configuration:"base.contributions.configuration"},Wu={properties:{},patternProperties:{}},Bu={properties:{},patternProperties:{}},Vu={properties:{},patternProperties:{}},Hu={properties:{},patternProperties:{}},Uu="vscode://schemas/settings/editor",ju=Au.as(Mu),zu=function(){function e(){this.overrideIdentifiers=[],this._onDidSchemaChange=new N(),this._onDidRegisterConfiguration=new N(),this.configurationContributors=[],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.configurationProperties={},this.excludedConfigurationProperties={},this.computeOverridePropertyPattern(),ju.registerSchema(Uu,this.editorConfigurationSchema);}return e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),this.registerConfigurations([e],[],t);},e.prototype.registerConfigurations=function(e,t,n){var i=this;void 0===n&&(n=!0);var o=this.toConfiguration(t);o&&e.push(o);var r=[];e.forEach(function(e){r.push.apply(r,i.validateAndRegisterProperties(e,n)),i.configurationContributors.push(e),i.registerJSONConfiguration(e),i.updateSchemaForOverrideSettingsConfiguration(e);}),this._onDidRegisterConfiguration.fire(r);},e.prototype.registerOverrideIdentifiers=function(e){var t;(t=this.overrideIdentifiers).push.apply(t,e),this.updateOverridePropertyPatternKey();},e.prototype.toConfiguration=function(e){for(var t={id:"defaultOverrides",title:ie("defaultConfigurations.title","Default Configuration Overrides"),properties:{}},n=0,i=e;n console.log` because `log` has been completed recently."),ie("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:ie("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,markdownDescription:ie("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,markdownDescription:ie("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used.")},"editor.tabCompletion":{type:"string",default:"off",enum:["on","off","onlySnippets"],enumDescriptions:[ie("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),ie("tabCompletion.off","Disable tab completions."),ie("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:ie("tabCompletion","Enables tab completions.")},"editor.suggest.filterGraceful":{type:"boolean",default:!0,description:ie("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:!1,description:ie("suggest.localityBonus","Controls whether sorting favours words that appear close to the cursor.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:!0,description:ie("suggest.snippetsPreventQuickSuggestions","Control whether an active snippet prevents quick suggestions.")},"editor.selectionHighlight":{type:"boolean",default:Ju.contribInfo.selectionHighlight,description:ie("selectionHighlight","Controls whether the editor should highlight matches similar to the selection")},"editor.occurrencesHighlight":{type:"boolean",default:Ju.contribInfo.occurrencesHighlight,description:ie("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")},"editor.overviewRulerLanes":{type:"integer",default:3,description:ie("overviewRulerLanes","Controls the number of decorations that can show up at the same position in the overview ruler.")},"editor.overviewRulerBorder":{type:"boolean",default:Ju.viewInfo.overviewRulerBorder,description:ie("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:function(e){if(1===e)return"blink";if(4===e)return"expand";if(3===e)return"phase";if(2===e)return"smooth";if(5===e)return"solid";throw new Error("blinkingStyleToString: Unknown blinkingStyle");}(Ju.viewInfo.cursorBlinking),description:ie("cursorBlinking","Control the cursor animation style.")},"editor.mouseWheelZoom":{type:"boolean",default:Ju.viewInfo.mouseWheelZoom,markdownDescription:ie("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")},"editor.cursorStyle":{type:"string",enum:["block","block-outline","line","line-thin","underline","underline-thin"],default:function(e){if(e===Pe.Line)return"line";if(e===Pe.Block)return"block";if(e===Pe.Underline)return"underline";if(e===Pe.LineThin)return"line-thin";if(e===Pe.BlockOutline)return"block-outline";if(e===Pe.UnderlineThin)return"underline-thin";throw new Error("cursorStyleToString: Unknown cursorStyle");}(Ju.viewInfo.cursorStyle),description:ie("cursorStyle","Controls the cursor style.")},"editor.cursorWidth":{type:"integer",default:Ju.viewInfo.cursorWidth,markdownDescription:ie("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")},"editor.fontLigatures":{type:"boolean",default:Ju.viewInfo.fontLigatures,description:ie("fontLigatures","Enables/Disables font ligatures.")},"editor.hideCursorInOverviewRuler":{type:"boolean",default:Ju.viewInfo.hideCursorInOverviewRuler,description:ie("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")},"editor.renderWhitespace":{type:"string",enum:["none","boundary","all"],enumDescriptions:["",ie("renderWhiteSpace.boundary","Render whitespace characters except for single spaces between words."),""],default:Ju.viewInfo.renderWhitespace,description:ie("renderWhitespace","Controls how the editor should render whitespace characters.")},"editor.renderControlCharacters":{type:"boolean",default:Ju.viewInfo.renderControlCharacters,description:ie("renderControlCharacters","Controls whether the editor should render control characters.")},"editor.renderIndentGuides":{type:"boolean",default:Ju.viewInfo.renderIndentGuides,description:ie("renderIndentGuides","Controls whether the editor should render indent guides.")},"editor.highlightActiveIndentGuide":{type:"boolean",default:Ju.viewInfo.highlightActiveIndentGuide,description:ie("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",ie("renderLineHighlight.all","Highlights both the gutter and the current line.")],default:Ju.viewInfo.renderLineHighlight,description:ie("renderLineHighlight","Controls how the editor should render the current line highlight.")},"editor.codeLens":{type:"boolean",default:Ju.contribInfo.codeLens,description:ie("codeLens","Controls whether the editor shows CodeLens")},"editor.folding":{type:"boolean",default:Ju.contribInfo.folding,description:ie("folding","Controls whether the editor has code folding enabled")},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:Ju.contribInfo.foldingStrategy,markdownDescription:ie("foldingStrategy","Controls the strategy for computing folding ranges. `auto` uses a language specific folding strategy, if available. `indentation` uses the indentation based folding strategy.")},"editor.showFoldingControls":{type:"string",enum:["always","mouseover"],default:Ju.contribInfo.showFoldingControls,description:ie("showFoldingControls","Controls whether the fold controls on the gutter are automatically hidden.")},"editor.matchBrackets":{type:"boolean",default:Ju.contribInfo.matchBrackets,description:ie("matchBrackets","Highlight matching brackets when one of them is selected.")},"editor.glyphMargin":{type:"boolean",default:Ju.viewInfo.glyphMargin,description:ie("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")},"editor.useTabStops":{type:"boolean",default:Ju.useTabStops,description:ie("useTabStops","Inserting and deleting whitespace follows tab stops.")},"editor.trimAutoWhitespace":{type:"boolean",default:tl.trimAutoWhitespace,description:ie("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:ie("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.dragAndDrop":{type:"boolean",default:Ju.dragAndDrop,description:ie("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[ie("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),ie("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),ie("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:Ju.accessibilitySupport,description:ie("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:Ju.showUnused,description:ie("showUnused","Controls fading out of unused code.")},"editor.links":{type:"boolean",default:Ju.contribInfo.links,description:ie("links","Controls whether the editor should detect links and make them clickable.")},"editor.colorDecorators":{type:"boolean",default:Ju.contribInfo.colorDecorators,description:ie("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")},"editor.lightbulb.enabled":{type:"boolean",default:Ju.contribInfo.lightbulbEnabled,description:ie("codeActions","Enables the code action lightbulb in the editor.")},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:ie("codeActionsOnSave.organizeImports","Controls whether organize imports action should be run on file save.")}},additionalProperties:{type:"boolean"},default:Ju.contribInfo.codeActionsOnSave,description:ie("codeActionsOnSave","Code action kinds to be run on save.")},"editor.codeActionsOnSaveTimeout":{type:"number",default:Ju.contribInfo.codeActionsOnSaveTimeout,description:ie("codeActionsOnSaveTimeout","Timeout in milliseconds after which the code actions that are run on save are cancelled.")},"editor.selectionClipboard":{type:"boolean",default:Ju.contribInfo.selectionClipboard,description:ie("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:o.c},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:ie("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:ie("ignoreTrimWhitespace","Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.")},"editor.largeFileOptimizations":{type:"boolean",default:tl.largeFileOptimizations,description:ie("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:ie("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")}}},al=null;function ul(){return null===al&&(al=Object.create(null),Object.keys(sl.properties).forEach(function(e){al[e]=!0;})),al;}rl.registerConfiguration(sl);var ll=function(){function e(){}return e.insert=function(e,t){return{range:new Jt(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0};},e.delete=function(e){return{range:e,text:null};},e.replace=function(e,t){return{range:e,text:t};},e.replaceMove=function(e,t){return{range:e,text:t,forceMoveMarkers:!0};},e;}(),cl=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),dl=function(){function e(){}return e.has=function(e){return new pl(e);},e.equals=function(e,t){return new fl(e,t);},e.regex=function(e,t){return new _l(e,t);},e.not=function(e){return new ml(e);},e.and=function(){for(var e=[],t=0;t=0){var t=e.split("!=");return new gl(t[0].trim(),this._deserializeValue(t[1]));}if(e.indexOf("==")>=0){t=e.split("==");return new fl(t[0].trim(),this._deserializeValue(t[1]));}if(e.indexOf("=~")>=0){t=e.split("=~");return new _l(t[0].trim(),this._deserializeRegexValue(t[1]));}return /^\!\s*/.test(e)?new ml(e.substr(1).trim()):new pl(e);},e._deserializeValue=function(e){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;var t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e;},e._deserializeRegexValue=function(e){if(Qi(e))return console.warn("missing regexp-value for =~-expression"),null;var t=e.indexOf("/"),n=e.lastIndexOf("/");if(t===n||t<0)return console.warn("bad regexp-value '"+e+"', missing /-enclosure"),null;var i=e.slice(t+1,n),o="i"===e[n+1]?"i":"";try{return new RegExp(i,o);}catch(t){return console.warn("bad regexp-value '"+e+"', parse error: "+t),null;}},e;}();function hl(e,t){var n=e.getType(),i=t.getType();if(n!==i)return n-i;switch(n){case 1:case 2:case 3:case 4:case 6:return e.cmp(t);default:throw new Error("Unknown ContextKeyExpr!");}}var pl=function(){function e(e){this.key=e;}return e.prototype.getType=function(){return 1;},e.prototype.cmp=function(e){return this.keye.key?1:0;},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key;},e.prototype.evaluate=function(e){return!!e.getValue(this.key);},e.prototype.normalize=function(){return this;},e.prototype.keys=function(){return[this.key];},e;}(),fl=function(){function e(e,t){this.key=e,this.value=t;}return e.prototype.getType=function(){return 3;},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.value?1:0;},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key&&this.value===t.value;},e.prototype.evaluate=function(e){return e.getValue(this.key)==this.value;},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new pl(this.key):new ml(this.key):this;},e.prototype.keys=function(){return[this.key];},e;}(),gl=function(){function e(e,t){this.key=e,this.value=t;}return e.prototype.getType=function(){return 4;},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.value?1:0;},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key&&this.value===t.value;},e.prototype.evaluate=function(e){return e.getValue(this.key)!=this.value;},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new ml(this.key):new pl(this.key):this;},e.prototype.keys=function(){return[this.key];},e;}(),ml=function(){function e(e){this.key=e;}return e.prototype.getType=function(){return 2;},e.prototype.cmp=function(e){return this.keye.key?1:0;},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key;},e.prototype.evaluate=function(e){return!e.getValue(this.key);},e.prototype.normalize=function(){return this;},e.prototype.keys=function(){return[this.key];},e;}(),_l=function(){function e(e,t){this.key=e,this.regexp=t;}return e.prototype.getType=function(){return 6;},e.prototype.cmp=function(e){if(this.keye.key)return 1;var t=this.regexp?this.regexp.source:"",n=e.regexp?e.regexp.source:"";return tn?1:0;},e.prototype.equals=function(t){if(t instanceof e){var n=this.regexp?this.regexp.source:"",i=t.regexp?t.regexp.source:"";return this.key===t.key&&n===i;}return!1;},e.prototype.evaluate=function(e){var t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t);},e.prototype.normalize=function(){return this;},e.prototype.keys=function(){return[this.key];},e;}(),vl=function(){function e(t){this.expr=e._normalizeArr(t);}return e.prototype.getType=function(){return 5;},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,i=this.expr.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},Ll=function(e,t){return function(n,i){t(n,i,e);};};function Tl(e){return void 0!==e.command;}var Il=function(){function e(){this.id=String(e.ID++);}return e.ID=1,e.EditorContext=new e(),e.CommandPalette=new e(),e.MenubarEditMenu=new e(),e.MenubarSelectionMenu=new e(),e.MenubarGoMenu=new e(),e;}(),Nl=dn("menuService"),kl=new(function(){function e(){this._commands=Object.create(null),this._menuItems=Object.create(null);}return e.prototype.addCommand=function(e){var t=this._commands[e.id];return this._commands[e.id]=e,void 0!==t;},e.prototype.getCommand=function(e){return this._commands[e];},e.prototype.getCommands=function(){var e=Object.create(null);for(var t in this._commands)e[t]=this.getCommand(t);return e;},e.prototype.appendMenuItem=function(e,t){var n=e.id,i=this._menuItems[n];return i?i.push(t):this._menuItems[n]=i=[t],{dispose:function(){var e=i.indexOf(t);e>=0&&i.splice(e,1);}};},e.prototype.getMenuItems=function(e){var t=e.id,n=this._menuItems[t]||[];return t===Il.CommandPalette.id&&this._appendImplicitItems(n),n;},e.prototype._appendImplicitItems=function(e){for(var t=new Set(),n=0,i=e.filter(function(e){return Tl(e);});n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},Ml=function(e,t){return function(n,i){t(n,i,e);};},Pl=function(){function e(t,n,i,o){var r=this;this._commandService=i,this._contextKeyService=o,this._menuGroups=[],this._disposables=[],this._onDidChange=new N(),n.then(function(n){var i,o=kl.getMenuItems(t),s=new Set();o.sort(e._compareMenuItems);for(var a=0,u=o;a0&&t.push([r,s]);}return t;},e._fillInKbExprKeys=function(e,t){if(e)for(var n=0,i=e.keys();ns)return 1;var a="string"==typeof e.command.title?e.command.title:e.command.title.value,u="string"==typeof t.command.title?t.command.title:t.command.title.value;return a.localeCompare(u);},e=Al([Ml(2,qo),Ml(3,bl)],e);}(),Fl=dn("configurationService");function Wl(e,t){var n=Object.create(null);for(var i in e)Bl(n,i,e[i],t);return n;}function Bl(e,t,n,i){for(var o=t.split("."),r=o.pop(),s=e,a=0;a0;){var n=t.shift();for(var i in Object.freeze(n),n)if(Te.call(n,i)){var o=n[i];"object"!=typeof o||Object.isFrozen(o)||t.push(o);}}return e;}(e):e;},e.prototype.getContentsForOverrideIdentifer=function(e){for(var t=0,n=this.overrides;t5e3&&n._leaveChordMode():n._leaveChordMode();},500);},t.prototype._leaveChordMode=function(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null;},t.prototype._dispatch=function(e,t){var n=this,i=!1,o=this.resolveKeyboardEvent(e);if(o.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;var r=o.getDispatchParts()[0];if(null===r)return i;var s=this._contextKeyService.getContext(t),a=this._currentChord?this._currentChord.keypress:null,u=o.getLabel(),l=this._getResolver().resolve(s,a,r);return l&&l.enterChord?(i=!0,this._enterChordMode(r,u),i):(this._statusService&&this._currentChord&&(l&&l.commandId||(this._statusService.setStatusMessage(ie("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,u),1e4),i=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(i=!0),void 0===l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,function(e){return n._notificationService.warn(e);}):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,function(e){return n._notificationService.warn(e);}),this._telemetryService.publicLog("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),i);},t;}(y),$l=function(){function e(t,n){this._defaultKeybindings=t,this._defaultBoundCommands=new Map();for(var i=0,o=t.length;i=0;c--)this._isTargetedForRemoval(e[c],a,u,s,l)&&e.splice(c,1);else n.push(r);}return e.concat(n);},e.prototype._addKeyPress=function(t,n){var i=this._map.get(t);if(void 0===i)return this._map.set(t,[n]),void this._addToLookupMap(n);for(var o=i.length-1;o>=0;o--){var r=i[o];if(r.command!==n.command){var s=null!==r.keypressChordPart,a=null!==n.keypressChordPart;s&&a&&r.keypressChordPart!==n.keypressChordPart||e.whenIsEntirelyIncluded(r.when,n.when)&&this._removeFromLookupMap(r);}}i.push(n),this._addToLookupMap(n);},e.prototype._addToLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e);}},e.prototype._removeFromLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);if(void 0!==t)for(var n=0,i=t.length;n=0;i--){var o=n[i];if(e.contextMatchesRules(t,o.when))return o;}return null;},e.contextMatchesRules=function(e,t){return!t||t.evaluate(e);},e;}(),Yl=new(function(){function e(){this._keybindings=[],this._keybindingsSorted=!0;}return e.bindToCurrentPlatform=function(e){if(1===o.a){if(e&&e.win)return e.win;}else if(2===o.a){if(e&&e.mac)return e.mac;}else if(e&&e.linux)return e.linux;return e;},e.prototype.registerKeybindingRule=function(t,n){void 0===n&&(n=0);var i=e.bindToCurrentPlatform(t);i&&i.primary&&(a=nt(i.primary,o.a))&&this._registerDefaultKeybinding(a,t.id,t.weight,0,t.when,n);if(i&&Array.isArray(i.secondary))for(var r=0,s=i.secondary.length;r=21&&e<=30||e>=31&&e<=56||80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e;},e.prototype._assertNoCtrlAlt=function(t,n){t.ctrlKey&&t.altKey&&!t.metaKey&&e._mightProduceChar(t.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",t," for ",n);},e.prototype._registerDefaultKeybinding=function(e,t,n,i,r,s){0===s&&1===o.a&&(2===e.type?this._assertNoCtrlAlt(e.firstPart,t):this._assertNoCtrlAlt(e,t)),this._keybindings.push({keybinding:e,command:t,commandArgs:void 0,when:r,weight1:n,weight2:i}),this._keybindingsSorted=!1;},e.prototype.getDefaultKeybindings=function(){return this._keybindingsSorted||(this._keybindings.sort(Xl),this._keybindingsSorted=!0),this._keybindings.slice(0);},e;}())();function Xl(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2;}Au.add("platform.keybindingsRegistry",Yl);var Zl=function(){return function(e,t,n,i,o){if(this.resolvedKeybinding=e,e){var r=e.getDispatchParts(),s=r[0],a=r[1];this.keypressFirstPart=s,this.keypressChordPart=a;}else this.keypressFirstPart=null,this.keypressChordPart=null;this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=o;};}(),Ql=function(){function e(e,t,n){void 0===n&&(n=t),this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n;}return e.prototype.toLabel=function(e,t,n,i,o){return null===e||null===t?null:function(e,t,n,i,o){var r=tc(e,t,o);null!==n&&null!==i&&(r+=" ",r+=tc(n,i,o));return r;}(e,t,n,i,this.modifierLabels[o]);},e;}(),Jl=new Ql({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:ie({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:ie({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:ie({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:ie({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:ie({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:ie({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:ie({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:ie({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),ec=new Ql({ctrlKey:ie({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:ie({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:ie({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:ie({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:ie({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:ie({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:ie({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:ie({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:ie({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:ie({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:ie({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:ie({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"});function tc(e,t,n){if(null===t)return"";var i=[];return e.ctrlKey&&i.push(n.ctrlKey),e.shiftKey&&i.push(n.shiftKey),e.altKey&&i.push(n.altKey),e.metaKey&&i.push(n.metaKey),i.push(t),i.join(n.separator);}var nc,ic,oc=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),rc=function(e){function t(t,n){var i=e.call(this)||this;if(i._os=n,!t)throw new Error("Invalid USLayoutResolvedKeybinding");return 2===t.type?(i._firstPart=t.firstPart,i._chordPart=t.chordPart):(i._firstPart=t,i._chordPart=null),i;}return oc(t,e),t.prototype._keyCodeToUILabel=function(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓";}return ze.toString(e);},t.prototype._getUILabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode):null;},t.prototype.getLabel=function(){var e=this._getUILabelForKeybinding(this._firstPart),t=this._getUILabelForKeybinding(this._chordPart);return Jl.toLabel(this._firstPart,e,this._chordPart,t,this._os);},t.prototype._getAriaLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":ze.toString(e.keyCode):null;},t.prototype.getAriaLabel=function(){var e=this._getAriaLabelForKeybinding(this._firstPart),t=this._getAriaLabelForKeybinding(this._chordPart);return ec.toLabel(this._firstPart,e,this._chordPart,t,this._os);},t.prototype.isChord=function(){return!!this._chordPart;},t.prototype.getParts=function(){return[this._toResolvedKeybindingPart(this._firstPart),this._chordPart?this._toResolvedKeybindingPart(this._chordPart):null];},t.prototype._toResolvedKeybindingPart=function(e){return new at(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getUILabelForKeybinding(e),this._getAriaLabelForKeybinding(e));},t.prototype.getDispatchParts=function(){return[this._firstPart?t.getDispatchStr(this._firstPart):null,this._chordPart?t.getDispatchStr(this._chordPart):null];},t.getDispatchStr=function(e){if(e.isModifierKey())return null;var t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=ze.toString(e.keyCode);},t;}(ut),sc=dn("notificationService"),ac=function(){return function(){};}(),uc=dn("contextService");!function(e){e.isIWorkspace=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&Array.isArray(e.folders);};}(nc||(nc={})),function(e){(ic||(ic={})).isIWorkspaceFolder=function(e){return e&&"object"==typeof e&&_t.isUri(e.uri)&&"string"==typeof e.name&&"function"==typeof e.toResource;};}();!function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=null),this._id=e,this._configuration=n,this._foldersMap=Cr.forPaths(),this.folders=t;}Object.defineProperty(e.prototype,"folders",{get:function(){return this._folders;},set:function(e){this._folders=e,this.updateFoldersMap();},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"configuration",{get:function(){return this._configuration;},set:function(e){this._configuration=e;},enumerable:!0,configurable:!0}),e.prototype.getFolder=function(e){return e?this._foldersMap.findSubstr(e.toString()):null;},e.prototype.updateFoldersMap=function(){this._foldersMap=Cr.forPaths();for(var e=0,t=this.folders;e=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},hc=function(e,t){return function(n,i){t(n,i,e);};},pc=function(){function e(e){this.model=e,this._onDispose=new N();}return Object.defineProperty(e.prototype,"textEditorModel",{get:function(){return this.model;},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose.fire();},e;}();var fc=function(){function e(){}return e.prototype.setEditor=function(e){this.editor=e;},e.prototype.createModelReference=function(e){var t,n,o,r,s=this;return n=this.editor,o=function(t){return s.findModel(t,e);},r=function(t){return s.findModel(t.getOriginalEditor(),e)||s.findModel(t.getModifiedEditor(),e);},(t=Ru(n)?o(n):r(n))?i.b.as(new b(new pc(t))):i.b.as(new b(null));},e.prototype.findModel=function(e,t){var n=e.getModel();return n&&n.uri.toString()!==t.toString()?null:n;},e;}(),gc=function(){function e(){}return e.prototype.showWhile=function(e,t){return null;},e;}(),mc=function(){return function(){};}(),_c=function(){function e(){}return e.prototype.info=function(e){return this.notify({severity:Du.Info,message:e});},e.prototype.warn=function(e){return this.notify({severity:Du.Warning,message:e});},e.prototype.error=function(e){return this.notify({severity:Du.Error,message:e});},e.prototype.notify=function(t){switch(t.severity){case Du.Error:console.error(t.message);break;case Du.Warning:console.warn(t.message);break;default:console.log(t.message);}return e.NO_OP;},e.NO_OP=new ac(),e;}(),vc=function(){function e(e){this._onWillExecuteCommand=new N(),this._instantiationService=e,this._dynamicCommands=Object.create(null);}return e.prototype.addCommand=function(e){var t=this,n=e.id;return this._dynamicCommands[n]=e,m(function(){delete t._dynamicCommands[n];});},e.prototype.executeCommand=function(e){for(var t=[],n=1;n.001){y=!1;break;}}var x=!0;y&&_.width!==b&&(x=!1),_.width>m.width&&(x=!1);var E=fn.INSTANCE.getTimeSinceLastZoomLevelChanged()>2e3;return new lr({zoomLevel:gn(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:y,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:x,spaceWidth:r.width,maxDigitWidth:v},E);},t.INSTANCE=new t(),t;}(y),qc=function(e){function t(t,n){void 0===n&&(n=null);var i,o=e.call(this,t)||this;return o._elementSizeObserver=o._register(new Uc(n,function(){return o._onReferenceDomElementSizeChanged();})),o._register(Kc.INSTANCE.onDidChange(function(){return o._onCSSBasedConfigurationChanged();})),o._validatedOptions.automaticLayout&&o._elementSizeObserver.startObserving(),o._register(mn(function(e){return o._recomputeOptions();})),o._register((i=function(){return o._recomputeOptions();},fn.INSTANCE.onDidChangeAccessibilitySupport(i))),o._recomputeOptions(),o;}return jc(t,e),t.applyFontInfoSlow=function(e,t){e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px";},t.applyFontInfo=function(e,t){e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing);},t.prototype._onReferenceDomElementSizeChanged=function(){this._recomputeOptions();},t.prototype._onCSSBasedConfigurationChanged=function(){this._recomputeOptions();},t.prototype.observeReferenceElement=function(e){this._elementSizeObserver.observe(e);},t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype._getExtraEditorClassName=function(){var e="";return vn?e+="ie ":Cn?e+="ff ":yn?e+="edge ":xn&&(e+="safari "),o.d&&(e+="mac "),e;},t.prototype._getEnvConfiguration=function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:wn||Cn,pixelRatio:fn.INSTANCE.getPixelRatio(),zoomLevel:gn(),accessibilitySupport:fn.INSTANCE.getAccessibilitySupport()};},t.prototype.readConfiguration=function(e){return Kc.INSTANCE.readConfiguration(e);},t;}(ol),Gc=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),$c=function(){return($c=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;};!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu";}(ad||(ad={}));var cd=function(e){function t(){var t=e.call(this)||this;return t.activeTouches={},t.handle=null,t.targets=[],t._register(ni(document,"touchstart",function(e){return t.onTouchStart(e);})),t._register(ni(document,"touchend",function(e){return t.onTouchEnd(e);})),t._register(ni(document,"touchmove",function(e){return t.onTouchMove(e);})),t;}return ud(t,e),t.addTarget=function(e){t.isTouchDevice()&&(t.INSTANCE||(t.INSTANCE=new t()),t.INSTANCE.targets.push(e));},t.isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0;},t.prototype.dispose=function(){this.handle&&(this.handle.dispose(),this.handle=null),e.prototype.dispose.call(this);},t.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,i=e.targetTouches.length;n=t.HOLD_DELAY&&Math.abs(u.initialPageX-oe(u.rollingPageX))<30&&Math.abs(u.initialPageY-oe(u.rollingPageY))<30){var c;(c=r.newGestureEvent(ad.Contextmenu,u.initialTarget)).pageX=oe(u.rollingPageX),c.pageY=oe(u.rollingPageY),r.dispatchEvent(c);}else if(1===i){var d=oe(u.rollingPageX),h=oe(u.rollingPageY),p=oe(u.rollingTimestamps)-u.rollingTimestamps[0],f=d-u.rollingPageX[0],g=h-u.rollingPageY[0],m=r.targets.filter(function(e){return u.initialTarget instanceof Node&&e.contains(u.initialTarget);});r.inertia(m,n,Math.abs(f)/p,f>0?1:-1,d,Math.abs(g)/p,g>0?1:-1,h);}r.dispatchEvent(r.newGestureEvent(ad.End,u.initialTarget)),delete r.activeTouches[a.identifier];},r=this,s=0,a=e.changedTouches.length;s0&&(f=!1,h=o*i*d),s>0&&(f=!1,p=a*s*d);var g=l.newGestureEvent(ad.Change);g.translationX=h,g.translationY=p,e.forEach(function(e){return e.dispatchEvent(g);}),f||l.inertia(e,c,i,o,r+h,s,a,u+p);});},t.prototype.onTouchMove=function(e){for(var t=Date.now(),n=0,i=e.changedTouches.length;n3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(o.pageX),r.rollingPageY.push(o.pageY),r.rollingTimestamps.push(t);}else console.warn("end of an UNKNOWN touch",o);}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1);},t.SCROLL_FRICTION=-.005,t.HOLD_DELAY=700,ld([sd],t,"isTouchDevice",null),t;}(y),dd=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}();function hd(e,t){var n=new Vn(t);return n.preventDefault(),{leftButton:n.leftButton,posx:n.posx,posy:n.posy};}var pd=function(e){function t(){var t=e.call(this)||this;return t.hooks=[],t.mouseMoveEventMerger=null,t.mouseMoveCallback=null,t.onStopCallback=null,t;}return dd(t,e),t.prototype.dispose=function(){this.stopMonitoring(!1),e.prototype.dispose.call(this);},t.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this.hooks=f(this.hooks),this.mouseMoveEventMerger=null,this.mouseMoveCallback=null;var t=this.onStopCallback;this.onStopCallback=null,e&&t&&t();}},t.prototype.isMonitoring=function(){return this.hooks.length>0;},t.prototype.startMonitoring=function(e,t,n){var i=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=n;for(var o=Wn.getSameOriginWindowChain(),r=0;r=u?o=Math.max(o,u+l-i):(t[n++]=new kd(i,o),i=u,o=l);}return t[n++]=new kd(i,o),t;},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],i=0,o=e.length;ia)return null;(t=Math.min(a,Math.max(0,t)))!==(i=Math.min(a,Math.max(0,i)))&&i>0&&0===o&&(i--,o=Number.MAX_VALUE);var u=e.children[t].firstChild,l=e.children[i].firstChild;if(u&&l||(!u&&0===n&&t>0&&(u=e.children[t-1].firstChild,n=1073741824),!l&&0===o&&i>0&&(l=e.children[i-1].firstChild,o=1073741824)),!u||!l)return null;n=Math.min(u.textContent.length,Math.max(0,n)),o=Math.min(l.textContent.length,Math.max(0,o));var c=this._readClientRects(u,n,l,o,s);return this._createHorizontalRangesFromClientRects(c,r);},e;}(),Rd=dn("themeService");function Ad(e){return{id:e};}var Md="dark",Pd="hc";function Fd(e){switch(e){case Md:return"vs-dark";case Pd:return"hc-black";default:return"vs";}}var Wd="base.contributions.theming",Bd=new(function(){function e(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new N();}return e.prototype.onThemeChange=function(e){var t=this;return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),m(function(){var n=t.themingParticipants.indexOf(e);t.themingParticipants.splice(n,1);});},e.prototype.getThemingParticipants=function(){return this.themingParticipants;},e;}())();function Vd(e){return Bd.onThemeChange(e);}Au.add(Wd,Bd);var Hd=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Ud=!!o.e||!(o.c||Cn||xn),jd=bn,zd=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t;}return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft;},enumerable:!0,configurable:!0}),e;}(),Kd=function(){function e(e,t){this.themeType=t,this.renderWhitespace=e.editor.viewInfo.renderWhitespace,this.renderControlCharacters=e.editor.viewInfo.renderControlCharacters,this.spaceWidth=e.editor.fontInfo.spaceWidth,this.useMonospaceOptimizations=e.editor.fontInfo.isMonospace&&!e.editor.viewInfo.disableMonospaceOptimizations,this.canUseHalfwidthRightwardsArrow=e.editor.fontInfo.canUseHalfwidthRightwardsArrow,this.lineHeight=e.editor.lineHeight,this.stopRenderingLineAfter=e.editor.viewInfo.stopRenderingLineAfter,this.fontLigatures=e.editor.viewInfo.fontLigatures;}return e.prototype.equals=function(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures;},e;}(),qd=function(){function e(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null;}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null;},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=rd(e);},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0;},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0;},e.prototype.onDecorationsChanged=function(){this._isMaybeInvalid=!0;},e.prototype.onOptionsChanged=function(e){this._isMaybeInvalid=!0,this._options=e;},e.prototype.onSelectionChanged=function(){return!(!jd&&this._options.themeType!==Pd)&&(this._isMaybeInvalid=!0,!0);},e.prototype.renderLine=function(t,n,i,o){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var r=i.getViewLineRenderingData(t),s=this._options,a=lu.filter(r.inlineDecorations,t,r.minColumn,r.maxColumn);if(jd||s.themeType===Pd)for(var u=i.selections,l=0,c=u.length;lt)){var h=d.startLineNumber===t?d.startColumn:r.minColumn,p=d.endLineNumber===t?d.endColumn:r.maxColumn;h');var g=_u(f,o);o.appendASCIIString("");var m=null;return Ud&&r.isBasicASCII&&s.useMonospaceOptimizations&&0===g.containsForeignElements&&r.content.length<300&&f.lineTokens.getCount()<100&&(m=new Gd(this._renderedViewLine?this._renderedViewLine.domNode:null,f,g.characterMapping)),m||(m=Xd(this._renderedViewLine?this._renderedViewLine.domNode:null,f,g.characterMapping,g.containsRTL,g.containsForeignElements)),this._renderedViewLine=m,!0;},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight));},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0;},e.prototype.getWidthIsFast=function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast();},e.prototype.getVisibleRangesForRange=function(e,t,n){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var i=0|this._renderedViewLine.input.stopRenderingLineAfter;return-1!==i&&e>i&&t>i?null:(-1!==i&&e>i&&(e=i),-1!==i&&t>i&&(t=i),this._renderedViewLine.getVisibleRangesForRange(e,t,n));},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,n):1;},e.CLASS_NAME="view-line",e;}(),Gd=function(){function e(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth;}return e.prototype.getWidth=function(){return this._getCharPosition(this._characterMapping.length);},e.prototype.getWidthIsFast=function(){return!0;},e.prototype.getVisibleRangesForRange=function(e,t,n){var i=this._getCharPosition(e),o=this._getCharPosition(t);return[new kd(i,o-i)];},e.prototype._getCharPosition=function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1]);},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1;},e;}(),$d=function(){function e(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var r=0,s=this._characterMapping.length;r<=s;r++)this._pixelOffsetCache[r]=-1;}}return e.prototype._getReadingTarget=function(){return this.domNode.domNode.firstChild;},e.prototype.getWidth=function(){return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth;},e.prototype.getWidthIsFast=function(){return-1!==this._cachedWidth;},e.prototype.getVisibleRangesForRange=function(e,t,n){if(null!==this._pixelOffsetCache){var i=this._readPixelOffset(e,n);if(-1===i)return null;var o=this._readPixelOffset(t,n);return-1===o?null:[new kd(i,o-i)];}return this._readVisibleRangesForRange(e,t,n);},e.prototype._readVisibleRangesForRange=function(e,t,n){if(e===t){var i=this._readPixelOffset(e,n);return-1===i?null:[new kd(i,0)];}return this._readRawVisibleRangesForRange(e,t,n);},e.prototype._readPixelOffset=function(e,t){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();}if(null!==this._pixelOffsetCache){var n=this._pixelOffsetCache[e];if(-1!==n)return n;var i=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=i,i;}return this._actualReadPixelOffset(e,t);},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length){var n=Dd.readHorizontalRanges(this._getReadingTarget(),0,0,0,0,t.clientRectDeltaLeft,t.endNode);return n&&0!==n.length?n[0].left:-1;}if(e===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var i=this._characterMapping.charOffsetToPartData(e-1),o=gu.getPartIndex(i),r=gu.getCharIndex(i),s=Dd.readHorizontalRanges(this._getReadingTarget(),o,r,o,r,t.clientRectDeltaLeft,t.endNode);return s&&0!==s.length?s[0].left:-1;},e.prototype._readRawVisibleRangesForRange=function(e,t,n){if(1===e&&t===this._characterMapping.length)return[new kd(0,this.getWidth())];var i=this._characterMapping.charOffsetToPartData(e-1),o=gu.getPartIndex(i),r=gu.getCharIndex(i),s=this._characterMapping.charOffsetToPartData(t-1),a=gu.getPartIndex(s),u=gu.getCharIndex(s);return Dd.readHorizontalRanges(this._getReadingTarget(),o,r,a,u,n.clientRectDeltaLeft,n.endNode);},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1;},e;}(),Yd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Hd(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i){var o=e.prototype._readVisibleRangesForRange.call(this,t,n,i);if(!o||0===o.length||t===n||1===t&&n===this._characterMapping.length)return o;if(!this.input.containsRTL){var r=this._readPixelOffset(n,i);if(-1!==r){var s=o[o.length-1];s.left=4&&3===e[0]&&7===e[3];},e.isStrictChildOfViewLines=function(e){return e.length>4&&3===e[0]&&7===e[3];},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1];},e.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===e[1];},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3];},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0];},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1];},e;}(),nh=function(){function e(e,t,n){this.model=e.model,this.layoutInfo=e.configuration.editor.layoutInfo,this.viewDomNode=t.viewDomNode,this.lineHeight=e.configuration.editor.lineHeight,this.typicalHalfwidthCharacterWidth=e.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this.lastViewCursorsRenderData=n,this._context=e,this._viewHelper=t;}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t);},e.getZoneAtCoord=function(e,t){var n=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(n){var i=n.verticalOffset+n.height/2,o=e.model.getLineCount(),r=null,s=void 0,a=null;return n.afterLineNumber!==o&&(a=new Qt(n.afterLineNumber+1,1)),n.afterLineNumber>0&&(r=new Qt(n.afterLineNumber,e.model.getLineMaxColumn(n.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,sh._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth));};}()),oh={isAfterLines:!0};function rh(e){return{isAfterLines:!1,horizontalDistanceToText:e};}var sh=function(){function e(e,t){this._context=e,this._viewHelper=t;}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=Ld.collect(t,this._viewHelper.viewDomNode);return!(!th.isChildOfContentWidgets(n)&&!th.isChildOfOverflowingContentWidgets(n))||!!th.isChildOfOverlayWidgets(n);},e.prototype.createMouseTarget=function(t,n,i,o){var r=new nh(this._context,this._viewHelper,t),s=new ih(r,n,i,o);try{return e._createMouseTarget(r,s,!1);}catch(e){return s.fulfill(0);}},e._createMouseTarget=function(t,n,i){if(null===n.target){if(i)return n.fulfill(0);var o=e._doHitTest(t,n);return o.position?e.createMouseTargetFromHitTestPosition(t,n,o.position.lineNumber,o.position.column):this._createMouseTarget(t,n.withTarget(o.hitTarget),!0);}var r=n,s=null;return(s=(s=(s=(s=(s=(s=(s=(s=(s=(s=s||e._hitTestContentWidget(t,r))||e._hitTestOverlayWidget(t,r))||e._hitTestMinimap(t,r))||e._hitTestScrollbarSlider(t,r))||e._hitTestViewZone(t,r))||e._hitTestMargin(t,r))||e._hitTestViewCursor(t,r))||e._hitTestTextArea(t,r))||e._hitTestViewLines(t,r,i))||e._hitTestScrollbar(t,r))||n.fulfill(0);},e._hitTestContentWidget=function(e,t){if(th.isChildOfContentWidgets(t.targetPath)||th.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(9,null,null,n):t.fulfill(0);}return null;},e._hitTestOverlayWidget=function(e,t){if(th.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(12,null,null,n):t.fulfill(0);}return null;},e._hitTestViewCursor=function(e,t){if(t.target)for(var n=0,i=(r=e.lastViewCursorsRenderData).length;no.contentLeft+o.width)){var u=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(u<=a&&a<=u+o.height)return t.fulfill(6,o.position);}}}return null;},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?8:5;return t.fulfill(i,n.position,null,n);}return null;},e._hitTestTextArea=function(e,t){return th.isTextArea(t.targetPath)?t.fulfill(1):null;},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),o=Math.abs(t.pos.x-t.editorPos.x),r={isAfterLines:n.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return(o-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,i,n.range,r):(o-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,i,n.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,i,n.range,r));}return null;},e._hitTestViewLines=function(t,n,i){if(!th.isChildOfViewLines(n.targetPath))return null;if(t.isAfterLines(n.mouseVerticalOffset)){var o=t.model.getLineCount(),r=t.model.getLineMaxColumn(o);return n.fulfill(7,new Qt(o,r),void 0,oh);}if(i){if(th.isStrictChildOfViewLines(n.targetPath)){var s=t.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(0===t.model.getLineLength(s)){var a=t.getLineWidth(s),u=rh(n.mouseContentHorizontalOffset-a);return n.fulfill(7,new Qt(s,1),void 0,u);}}return n.fulfill(0);}var l=e._doHitTest(t,n);return l.position?e.createMouseTargetFromHitTestPosition(t,n,l.position.lineNumber,l.position.column):this._createMouseTarget(t,n.withTarget(l.hitTarget),!0);},e._hitTestMinimap=function(e,t){if(th.isChildOfMinimap(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new Qt(n,i));}return null;},e._hitTestScrollbarSlider=function(e,t){if(th.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var n=t.target.className;if(n&&/\b(slider|scrollbar)\b/.test(n)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.model.getLineMaxColumn(i);return t.fulfill(11,new Qt(i,o));}}return null;},e._hitTestScrollbar=function(e,t){if(th.isChildOfScrollableElement(t.targetPath)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(11,new Qt(n,i));}return null;},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.editor.layoutInfo,o=this._context.viewLayout.getCurrentScrollLeft()+n.x-t.x-i.contentLeft;return e._getMouseColumn(o,this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth);},e._getMouseColumn=function(e,t){return e<0?1:Math.round(e/t)+1;},e.createMouseTargetFromHitTestPosition=function(e,t,n,i){var o=new Qt(n,i),r=e.getLineWidth(n);if(t.mouseContentHorizontalOffset>r){if(yn&&1===o.column){var s=rh(t.mouseContentHorizontalOffset-r);return t.fulfill(7,new Qt(n,e.model.getLineMaxColumn(n)),void 0,s);}var a=rh(t.mouseContentHorizontalOffset-r);return t.fulfill(7,o,void 0,a);}var u=e.visibleRangeForPosition2(n,i);if(!u)return t.fulfill(0,o);var l=u.left;if(t.mouseContentHorizontalOffset===l)return t.fulfill(6,o);var c=[];if(c.push({offset:u.left,column:i}),i>1){var d=e.visibleRangeForPosition2(n,i-1);d&&c.push({offset:d.left,column:i-1});}if(i=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);var r=new gd(t.pos.x,o),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return s.position?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates());},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var n=document.caretRangeFromPoint(t.clientX,t.clientY);if(!n||!n.startContainer)return{position:null,hitTarget:null};var i=n.startContainer,o=null;if(i.nodeType===i.TEXT_NODE){var r=(a=(s=i.parentNode)?s.parentNode:null)?a.parentNode:null;if((r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===qd.CLASS_NAME)return{position:e.getPositionFromDOMInfo(s,n.startOffset),hitTarget:null};o=i.parentNode;}else if(i.nodeType===i.ELEMENT_NODE){var s,a;if(((a=(s=i.parentNode)?s.parentNode:null)&&a.nodeType===a.ELEMENT_NODE?a.className:null)===qd.CLASS_NAME)return{position:e.getPositionFromDOMInfo(i,i.textContent.length),hitTarget:null};o=i;}return{position:null,hitTarget:o};},e._doHitTestWithCaretPositionFromPoint=function(e,t){var n=document.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){var i=n.offsetNode.parentNode,o=i?i.parentNode:null,r=o?o.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===qd.CLASS_NAME?{position:e.getPositionFromDOMInfo(n.offsetNode.parentNode,n.offset),hitTarget:null}:{position:null,hitTarget:n.offsetNode.parentNode};}return{position:null,hitTarget:n.offsetNode};},e._doHitTestWithMoveToPoint=function(e,t){var n=null,i=null,o=document.body.createTextRange();try{o.moveToPoint(t.clientX,t.clientY);}catch(e){return{position:null,hitTarget:null};}o.collapse(!0);var r=o?o.parentElement():null,s=r?r.parentNode:null,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:"")===qd.CLASS_NAME){var u=o.duplicate();u.moveToElementText(r),u.setEndPoint("EndToStart",o),n=e.getPositionFromDOMInfo(r,u.text.length),u.moveToElementText(e.viewDomNode);}else i=r;return o.moveToElementText(e.viewDomNode),{position:n,hitTarget:i};},e._doHitTest=function(e,t){return document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null};},e;}(),ah=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}();function uh(e){return function(t,n){var i=!1;return e&&(i=e.mouseTargetIsWidget(n)),i||n.preventDefault(),n;};}var lh=function(e){function t(n,i,o){var r=e.call(this)||this;r._isFocused=!1,r._context=n,r.viewController=i,r.viewHelper=o,r.mouseTargetFactory=new sh(r._context,o),r._mouseDownOperation=r._register(new ch(r._context,r.viewController,r.viewHelper,function(e,t){return r._createMouseTarget(e,t);},function(e){return r._getMouseColumn(e);})),r._asyncFocus=r._register(new ee(function(){return r.viewHelper.focusTextArea();},0)),r.lastMouseLeaveTime=-1;var s=new bd(r.viewHelper.viewDomNode);r._register(s.onContextMenu(r.viewHelper.viewDomNode,function(e){return r._onContextMenu(e,!0);})),r._register(s.onMouseMoveThrottled(r.viewHelper.viewDomNode,function(e){return r._onMouseMove(e);},uh(r.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),r._register(s.onMouseUp(r.viewHelper.viewDomNode,function(e){return r._onMouseUp(e);})),r._register(s.onMouseLeave(r.viewHelper.viewDomNode,function(e){return r._onMouseLeave(e);})),r._register(s.onMouseDown(r.viewHelper.viewDomNode,function(e){return r._onMouseDown(e);}));var a=function(e){if(r._context.configuration.editor.viewInfo.mouseWheelZoom){var t=new Un(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var n=nr.getZoomLevel(),i=t.deltaY>0?1:-1;nr.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation();}}};return r._register(ni(r.viewHelper.viewDomNode,"mousewheel",a,!0)),r._register(ni(r.viewHelper.viewDomNode,"DOMMouseScroll",a,!0)),r._context.addEventHandler(r),r;}return ah(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this);},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1;},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1;},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1;},t.prototype.getTargetAtClientPoint=function(e,t){var n=new md(e,t).toPageCoordinates(),i=vd(this.viewHelper.viewDomNode);if(n.yi.y+i.height||n.xi.x+i.width)return null;var o=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(o,i,n,null);},t.prototype._createMouseTarget=function(e,t){var n=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(n,e.editorPos,e.pos,t?e.target:null);},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos);},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)});},t.prototype._onMouseMove=function(e){this._mouseDownOperation.isActive()||e.timestampt.y+t.height){var a,u;r=i.getCurrentScrollTop()+(e.posy-t.y);if(a=nh.getZoneAtCoord(this._context,r))if(u=this._helpPositionJumpOverViewZone(a))return new eh(null,13,o,u);var l=i.getLineNumberAtVerticalOffset(r);return new eh(null,13,o,new Qt(l,n.getLineMaxColumn(l)));}var c=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new eh(null,13,o,new Qt(c,n.getLineMaxColumn(c))):null;},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t);if(!i.position)return null;if(8===i.type||5===i.type){var o=this._helpPositionJumpOverViewZone(i.detail);if(o)return new eh(i.element,i.type,i.mouseColumn,o,null,i.detail);}return i;},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new Qt(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null;},t.prototype._dispatchMouse=function(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton});},t;}(y),dh=function(){function e(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1;}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"leftButton",{get:function(){return this._leftButton;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount;},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey;},e.prototype.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton;},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e;},e.prototype.trySetCount=function(t,n){var i=new Date().getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount);},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e;}(),hh=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}();function ph(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n;}var fh=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.msTouchAction="none",o.viewHelper.linesContentDomNode.style.msContentZooming="none",o._installGestureHandlerTimeout=window.setTimeout(function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture(),t=new MSGesture();e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",function(n){var i=n.pointerType;i!==(n.MSPOINTER_TYPE_MOUSE||"mouse")?i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse";}),o._register(_i(o.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return o._onGestureChange(e);},ph)),o._register(ni(o.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return o._onCaptureGestureTap(e);},!0));}},100),o._lastPointerType="mouse",o;}return hh(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t);},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new yd(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea();});},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY);},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this);},t;}(lh),gh=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return o.viewHelper.linesContentDomNode.style.touchAction="none",o._installGestureHandlerTimeout=window.setTimeout(function(){if(o._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture(),t=new MSGesture();e.target=o.viewHelper.linesContentDomNode,t.target=o.viewHelper.linesContentDomNode,o.viewHelper.linesContentDomNode.addEventListener("pointerdown",function(n){var i=n.pointerType;"mouse"!==i?"touch"===i?(o._lastPointerType="touch",e.addPointer(n.pointerId)):(o._lastPointerType="pen",t.addPointer(n.pointerId)):o._lastPointerType="mouse";}),o._register(_i(o.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return o._onGestureChange(e);},ph)),o._register(ni(o.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return o._onCaptureGestureTap(e);},!0));}},100),o._lastPointerType="mouse",o;}return hh(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t);},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new yd(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea();});},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY);},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this);},t;}(lh),mh=function(e){function t(t,n,i){var o=e.call(this,t,n,i)||this;return cd.addTarget(o.viewHelper.linesContentDomNode),o._register(ni(o.viewHelper.linesContentDomNode,ad.Tap,function(e){return o.onTap(e);})),o._register(ni(o.viewHelper.linesContentDomNode,ad.Change,function(e){return o.onChange(e);})),o._register(ni(o.viewHelper.linesContentDomNode,ad.Contextmenu,function(e){return o._onContextMenu(new yd(e,o.viewHelper.viewDomNode),!1);})),o;}return hh(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new yd(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position);},t.prototype.onChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY);},t;}(lh),_h=function(){function e(e,t,n){window.navigator.msPointerEnabled?this.handler=new fh(e,t,n):window.TouchEvent?this.handler=new mh(e,t,n):window.navigator.pointerEnabled||window.PointerEvent?this.handler=new gh(e,t,n):this.handler=new lh(e,t,n);}return e.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t);},e.prototype.dispose=function(){this.handler.dispose();},e;}(),vh=(n("./node_modules/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css"),function(){function e(e,t,n,i,o){this.value=e,this.selectionStart=t,this.selectionEnd=n,this.selectionStartPosition=i,this.selectionEndPosition=o;}return e.prototype.toString=function(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]";},e.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null);},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length,null,null);},e.prototype.writeToTextArea=function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd);},e.prototype.deduceEditorPosition=function(e){if(e<=this.selectionStart){var t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1);}if(e>=this.selectionEnd){t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1);}var n=this.value.substring(this.selectionStart,e);if(-1===n.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,n,1);var i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1);},e.prototype._finishDeduceEditorPosition=function(e,t,n){for(var i=0,o=-1;-1!==(o=t.indexOf("\n",o+1));)i++;return[e,n*t.length,i];},e.selectedText=function(t){return new e(t,0,t.length,null,null);},e.deduceInput=function(e,t,n,i){if(!e)return{text:"",replaceCharCnt:0};var o=e.value,r=e.selectionStart,s=e.selectionEnd,a=t.value,u=t.selectionStart,l=t.selectionEnd;i&&o.length>0&&r===s&&u===l&&!so(a,o)&&ao(a,o)&&(r=0,s=0);var c=function(e,t){var n,i=Math.min(e.length,t.length),o=e.length-1,r=t.length-1;for(n=0;n0){var f=null;if(u===a.length?so(a,o)&&(f=a.substring(o.length)):ao(a,o)&&(f=a.substring(0,a.length-o.length)),null!==f&&f.length>0&&(/\uFE0F/.test(f)||(d=f,xo.test(d))))return{text:f,replaceCharCnt:0};}return u===l?o===a&&0===r&&s===o.length&&u===a.length&&-1===a.indexOf("\n")&&function(e){for(var t=0,n=e.length;t500&&(d=d.substring(d.length-500,d.length)),g.length>500&&(g=g.substring(0,500)),r.length>1e3&&(r=r.substring(0,500)+String.fromCharCode(8230)+r.substring(r.length-500,r.length));}return new vh(d+r+g,d.length,d.length+r.length,new Qt(i.startLineNumber,i.startColumn),new Qt(i.endLineNumber,i.endColumn));},e._LINES_PER_PAGE=10,e;}(),bh=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Ch={forceCopyWithSyntaxHighlighting:!1},wh=function(e){function t(t,n){var i=e.call(this)||this;i._onFocus=i._register(new N()),i.onFocus=i._onFocus.event,i._onBlur=i._register(new N()),i.onBlur=i._onBlur.event,i._onKeyDown=i._register(new N()),i.onKeyDown=i._onKeyDown.event,i._onKeyUp=i._register(new N()),i.onKeyUp=i._onKeyUp.event,i._onCut=i._register(new N()),i.onCut=i._onCut.event,i._onPaste=i._register(new N()),i.onPaste=i._onPaste.event,i._onType=i._register(new N()),i.onType=i._onType.event,i._onCompositionStart=i._register(new N()),i.onCompositionStart=i._onCompositionStart.event,i._onCompositionUpdate=i._register(new N()),i.onCompositionUpdate=i._onCompositionUpdate.event,i._onCompositionEnd=i._register(new N()),i.onCompositionEnd=i._onCompositionEnd.event,i._onSelectionChangeRequest=i._register(new N()),i.onSelectionChangeRequest=i._onSelectionChangeRequest.event,i._host=t,i._textArea=i._register(new xh(n)),i._lastTextAreaEvent=0,i._asyncTriggerCut=i._register(new ee(function(){return i._onCut.fire();},0)),i._textAreaState=vh.EMPTY,i.writeScreenReaderContent("ctor"),i._hasFocus=!1,i._isDoingComposition=!1,i._nextCommand=0,i._register(ii(n.domNode,"keydown",function(e){!i._isDoingComposition||109!==e.keyCode&&1!==e.keyCode||e.stopPropagation(),e.equals(9)&&e.preventDefault(),i._onKeyDown.fire(e);})),i._register(ii(n.domNode,"keyup",function(e){i._onKeyUp.fire(e);})),i._register(ni(n.domNode,"compositionstart",function(e){i._lastTextAreaEvent=1,i._isDoingComposition||(i._isDoingComposition=!0,bn||i._setAndWriteTextAreaState("compositionstart",vh.EMPTY),i._onCompositionStart.fire());}));var r=function(e,t){var n=i._textAreaState,o=vh.readFromTextArea(i._textArea);return[o,vh.deduceInput(n,o,e,t)];},s=function(e){var t=i._textAreaState,n=vh.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}];},a=function(e){return!(!bn||"ja"!==e)||!(!vn||0!==e.indexOf("zh-Han"));};i._register(ni(n.domNode,"compositionupdate",function(e){if(i._lastTextAreaEvent=2,a(e.locale)){var t=r(!1,!1),n=t[0],o=t[1];return i._textAreaState=n,i._onType.fire(o),void i._onCompositionUpdate.fire(e);}var u=s(e.data),l=u[0],c=u[1];i._textAreaState=l,i._onType.fire(c),i._onCompositionUpdate.fire(e);})),i._register(ni(n.domNode,"compositionend",function(e){if(i._lastTextAreaEvent=3,a(e.locale)){var t=r(!1,!1),n=t[0],o=t[1];i._textAreaState=n,i._onType.fire(o);}else{var u=s(e.data);n=u[0],o=u[1];i._textAreaState=n,i._onType.fire(o);}(bn||Sn)&&(i._textAreaState=vh.readFromTextArea(i._textArea)),i._isDoingComposition&&(i._isDoingComposition=!1,i._onCompositionEnd.fire());})),i._register(ni(n.domNode,"input",function(){var e=8===i._lastTextAreaEvent;if(i._lastTextAreaEvent=4,i._textArea.setIgnoreSelectionChangeTime("received input event"),!i._isDoingComposition){var t=r(o.d,e&&o.d),n=t[0],s=t[1];0===s.replaceCharCnt&&1===s.text.length&&bo(s.text.charCodeAt(0))||(i._textAreaState=n,0===i._nextCommand?""!==s.text&&i._onType.fire(s):(""!==s.text&&i._onPaste.fire({text:s.text}),i._nextCommand=0));}})),i._register(ni(n.domNode,"cut",function(e){i._lastTextAreaEvent=5,i._textArea.setIgnoreSelectionChangeTime("received cut event"),i._ensureClipboardGetsEditorSelection(e),i._asyncTriggerCut.schedule();})),i._register(ni(n.domNode,"copy",function(e){i._lastTextAreaEvent=6,i._ensureClipboardGetsEditorSelection(e);})),i._register(ni(n.domNode,"paste",function(e){if(i._lastTextAreaEvent=7,i._textArea.setIgnoreSelectionChangeTime("received paste event"),Sh.canUseTextData(e)){var t=Sh.getTextData(e);""!==t&&i._onPaste.fire({text:t});}else i._textArea.getSelectionStart()!==i._textArea.getSelectionEnd()&&i._setAndWriteTextAreaState("paste",vh.EMPTY),i._nextCommand=1;})),i._register(ni(n.domNode,"focus",function(){i._lastTextAreaEvent=8,i._setHasFocus(!0);})),i._register(ni(n.domNode,"blur",function(){i._lastTextAreaEvent=9,i._setHasFocus(!1);}));var u=0;return i._register(ni(document,"selectionchange",function(e){if(i._hasFocus&&!i._isDoingComposition&&Sn&&o.g){var t=Date.now(),n=t-u;if(u=t,!(n<5)){var r=t-i._textArea.getIgnoreSelectionChangeTime();if(i._textArea.resetSelectionChangeTime(),!(r<100)&&i._textAreaState.selectionStartPosition&&i._textAreaState.selectionEndPosition){var s=i._textArea.getValue();if(i._textAreaState.value===s){var a=i._textArea.getSelectionStart(),l=i._textArea.getSelectionEnd();if(i._textAreaState.selectionStart!==a||i._textAreaState.selectionEnd!==l){var c=i._textAreaState.deduceEditorPosition(a),d=i._host.deduceModelPosition(c[0],c[1],c[2]),h=i._textAreaState.deduceEditorPosition(l),p=i._host.deduceModelPosition(h[0],h[1],h[2]),f=new tn(d.lineNumber,d.column,p.lineNumber,p.column);i._onSelectionChangeRequest.fire(f);}}}}}})),i;}return bh(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype.focusTextArea=function(){this._setHasFocus(!0);},t.prototype.isFocused=function(){return this._hasFocus;},t.prototype._setHasFocus=function(e){this._hasFocus!==e&&(this._hasFocus=e,this._hasFocus&&(yn?this._setAndWriteTextAreaState("focusgain",vh.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire());},t.prototype._setAndWriteTextAreaState=function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t;},t.prototype.writeScreenReaderContent=function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState));},t.prototype._ensureClipboardGetsEditorSelection=function(e){var t=this._host.getPlainTextToCopy();if(Sh.canUseTextData(e)){var n=null;(function(){if(vn)return!1;if(yn){var e=_n.indexOf("Edge/"),t=parseInt(_n.substring(e+5,_n.indexOf(".",e)),10);if(!t||t>=12&&t<=16)return!1;}return!0;})()&&(t.length<65536||Ch.forceCopyWithSyntaxHighlighting)&&(n=this._host.getHTMLToCopy()),Sh.setTextData(e,t,n);}else this._setAndWriteTextAreaState("copy or cut",vh.selectedText(t));},t;}(y),Sh=function(){function e(){}return e.canUseTextData=function(e){return!!e.clipboardData||!!window.clipboardData;},e.getTextData=function(e){if(e.clipboardData)return e.preventDefault(),e.clipboardData.getData("text/plain");if(window.clipboardData)return e.preventDefault(),window.clipboardData.getData("Text");throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!");},e.setTextData=function(e,t,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),null!==n&&e.clipboardData.setData("text/html",n),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!");},e;}(),xh=function(e){function t(t){var n=e.call(this)||this;return n._actual=t,n._ignoreSelectionChangeTime=0,n;}return bh(t,e),t.prototype.setIgnoreSelectionChangeTime=function(e){this._ignoreSelectionChangeTime=Date.now();},t.prototype.getIgnoreSelectionChangeTime=function(){return this._ignoreSelectionChangeTime;},t.prototype.resetSelectionChangeTime=function(){this._ignoreSelectionChangeTime=0;},t.prototype.getValue=function(){return this._actual.domNode.value;},t.prototype.setValue=function(e,t){var n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t);},t.prototype.getSelectionStart=function(){return this._actual.domNode.selectionStart;},t.prototype.getSelectionEnd=function(){return this._actual.domNode.selectionEnd;},t.prototype.setSelectionRange=function(e,t,n){var i=this._actual.domNode,o=document.activeElement===i,r=i.selectionStart,s=i.selectionEnd;if(o&&r===t&&s===n)Cn&&window.parent!==window&&i.focus();else{if(o)return this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),void(Cn&&window.parent!==window&&i.focus());try{var a=function(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t;}(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),function(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode;}(i,a);}catch(e){}}},t;}(y),Eh=(n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}()),Lh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return Eh(t,e),t;}(Sd);function Th(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n;}var Ih=function(){function e(e,t,n,i){void 0===i&&(i=1),this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,n)),this.a=Th(Math.max(Math.min(1,i),0),3);}return e.equals=function(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a;},e;}(),Nh=function(){function e(e,t,n,i){this.h=0|Math.max(Math.min(360,e),0),this.s=Th(Math.max(Math.min(1,t),0),3),this.l=Th(Math.max(Math.min(1,n),0),3),this.a=Th(Math.max(Math.min(1,i),0),3);}return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a;},e.fromRGBA=function(t){var n=t.r/255,i=t.g/255,o=t.b/255,r=t.a,s=Math.max(n,i,o),a=Math.min(n,i,o),u=0,l=0,c=(a+s)/2,d=s-a;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),s){case n:u=(i-o)/d+(i1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e;},e.toRGBA=function(t){var n,i,o,r=t.h/360,s=t.s,a=t.l,u=t.a;if(0===s)n=i=o=a;else{var l=a<.5?a*(1+s):a+s-a*s,c=2*a-l;n=e._hue2rgb(c,l,r+1/3),i=e._hue2rgb(c,l,r),o=e._hue2rgb(c,l,r-1/3);}return new Ih(Math.round(255*n),Math.round(255*i),Math.round(255*o),u);},e;}(),kh=function(){function e(e,t,n,i){this.h=0|Math.max(Math.min(360,e),0),this.s=Th(Math.max(Math.min(1,t),0),3),this.v=Th(Math.max(Math.min(1,n),0),3),this.a=Th(Math.max(Math.min(1,i),0),3);}return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a;},e.fromRGBA=function(t){var n,i=t.r/255,o=t.g/255,r=t.b/255,s=Math.max(i,o,r),a=s-Math.min(i,o,r),u=0===s?0:a/s;return n=0===a?0:s===i?((o-r)/a%6+6)%6:s===o?(r-i)/a+2:(i-o)/a+4,new e(Math.round(60*n),u,s,t.a);},e.toRGBA=function(e){var t=e.h,n=e.s,i=e.v,o=e.a,r=i*n,s=r*(1-Math.abs(t/60%2-1)),a=i-r,u=[0,0,0],l=u[0],c=u[1],d=u[2];return t<60?(l=r,c=s):t<120?(l=s,c=r):t<180?(c=r,d=s):t<240?(c=s,d=r):t<300?(l=s,d=r):t<360&&(l=r,d=s),l=Math.round(255*(l+a)),c=Math.round(255*(c+a)),d=Math.round(255*(d+a)),new Ih(l,c,d,o);},e;}(),Oh=function(){function e(e){if(!e)throw new Error("Color needs a value");if(e instanceof Ih)this.rgba=e;else if(e instanceof Nh)this._hsla=e,this.rgba=Nh.toRGBA(e);else{if(!(e instanceof kh))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=kh.toRGBA(e);}}return e.fromHex=function(t){return e.Format.CSS.parseHex(t)||e.red;},Object.defineProperty(e.prototype,"hsla",{get:function(){return this._hsla?this._hsla:Nh.fromRGBA(this.rgba);},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hsva",{get:function(){return this._hsva?this._hsva:kh.fromRGBA(this.rgba);},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return!!e&&Ih.equals(this.rgba,e.rgba)&&Nh.equals(this.hsla,e.hsla)&&kh.equals(this.hsva,e.hsva);},e.prototype.getRelativeLuminance=function(){return Th(.2126*e._relativeLuminanceForComponent(this.rgba.r)+.7152*e._relativeLuminanceForComponent(this.rgba.g)+.0722*e._relativeLuminanceForComponent(this.rgba.b),4);},e._relativeLuminanceForComponent=function(e){var t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4);},e.prototype.isLighter=function(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128;},e.prototype.isLighterThan=function(e){return this.getRelativeLuminance()>e.getRelativeLuminance();},e.prototype.isDarkerThan=function(e){return this.getRelativeLuminance()'+n+"":String(i);}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n?String(n):n%10==0?String(n):"":String(n);},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var n=o.c?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s='
',a=[],u=i;u<=r;u++){var l=u-i,c=this._getLineRenderLineNumber(u);a[l]=c?s+c+"
":"";}this._renderResult=a;}else this._renderResult=null;},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n];},t.CLASS_NAME="line-numbers",t;}(Lh);Vd(function(e,t){var n=e.getColor(Ef);n&&t.addRule(".monaco-editor .line-numbers { color: "+n+"; }");var i=e.getColor(Tf);i&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+i+"; }");});var Yf=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Xf=function(e){function t(t){var n=e.call(this,t)||this;return n._canUseLayerHinting=n._context.configuration.editor.canUseLayerHinting,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n._glyphMarginLeft=n._context.configuration.editor.layoutInfo.glyphMarginLeft,n._glyphMarginWidth=n._context.configuration.editor.layoutInfo.glyphMarginWidth,n._domNode=n._createDomNode(),n;}return Yf(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype.getDomNode=function(){return this._domNode;},t.prototype._createDomNode=function(){var e=rd(document.createElement("div"));return e.setClassName(t.OUTER_CLASS_NAME),e.setPosition("absolute"),e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=rd(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(t.CLASS_NAME),e.appendChild(this._glyphMarginBackgroundDomNode),e;},t.prototype.onConfigurationChanged=function(e){return e.canUseLayerHinting&&(this._canUseLayerHinting=this._context.configuration.editor.canUseLayerHinting),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,this._glyphMarginLeft=this._context.configuration.editor.layoutInfo.glyphMarginLeft,this._glyphMarginWidth=this._context.configuration.editor.layoutInfo.glyphMarginWidth),!0;},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollTopChanged;},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setLayerHinting(this._canUseLayerHinting);var t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);var n=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(n),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(n);},t.CLASS_NAME="glyph-margin",t.OUTER_CLASS_NAME="margin",t;}(Ed),Zf=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Qf=function(e){function t(t){for(var n=e.call(this,0)||this,i=0,o=t.length;i0&&this._emit(e);}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),n=0,i=t.length;n0)return new vh(i,i.length,i.length,n,n);}}return vh.EMPTY;}return yh.fromEditorSelection(e,a,r._selections[0],0===r._accessibilitySupport);},deduceModelPosition:function(e,t,n){return r._context.model.deduceModelPositionRelativeToViewPosition(e,t,n);}};return r._textAreaInput=r._register(new wh(u,r.textArea)),r._register(r._textAreaInput.onKeyDown(function(e){r._viewController.emitKeyDown(e);})),r._register(r._textAreaInput.onKeyUp(function(e){r._viewController.emitKeyUp(e);})),r._register(r._textAreaInput.onPaste(function(e){var t=Eg.INSTANCE.get(e.text),n=!1,i=null;t&&(n=r._emptySelectionClipboard&&t.isFromEmptySelection,i=t.multicursorText),r._viewController.paste("keyboard",e.text,n,i);})),r._register(r._textAreaInput.onCut(function(){r._viewController.cut("keyboard");})),r._register(r._textAreaInput.onType(function(e){e.replaceCharCnt?r._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):r._viewController.type("keyboard",e.text);})),r._register(r._textAreaInput.onSelectionChangeRequest(function(e){r._viewController.setSelection("keyboard",e);})),r._register(r._textAreaInput.onCompositionStart(function(){var e=r._selections[0].startLineNumber,t=r._selections[0].startColumn;r._context.privateViewEventBus.emit(new hg(new Jt(e,t,e,t),0,!0,1));var n=r._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);n&&(r._visibleTextArea=new Sg(r._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,xg?0:1),r._render()),r.textArea.setClassName("inputarea ime-input"),r._viewController.compositionStart("keyboard");})),r._register(r._textAreaInput.onCompositionUpdate(function(e){r._visibleTextArea=bn?r._visibleTextArea.setWidth(0):r._visibleTextArea.setWidth(function(e,t){var n=document.createElement("canvas").getContext("2d");n.font=(i=t,o="normal",r=i.fontWeight,s=i.fontSize,a=i.lineHeight,u=i.fontFamily,o+" normal "+r+" "+s+"px / "+a+"px "+u);var i,o,r,s,a,u;var l=n.measureText(e);return Cn?l.width+2:l.width;}(e.data,r._fontInfo)),r._render();})),r._register(r._textAreaInput.onCompositionEnd(function(){r._visibleTextArea=null,r._render(),r.textArea.setClassName("inputarea"),r._viewController.compositionEnd("keyboard");})),r._register(r._textAreaInput.onFocus(function(){r._context.privateViewEventBus.emit(new ag(!0));})),r._register(r._textAreaInput.onBlur(function(){r._context.privateViewEventBus.emit(new ag(!1));})),r;}return wg(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype._getWordBeforePosition=function(e){for(var t=this._context.model.getLineContent(e.lineNumber),n=tg(this._context.configuration.editor.wordSeparators),i=e.column,o=0;i>1;){var r=t.charCodeAt(i-2);if(0!==n.get(r)||o>50)return t.substring(i-1,e.column-1);o++,i--;}return t.substring(0,e.column-1);},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!bo(t.charCodeAt(0)))return t;}return"";},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.editor;return e.fontInfo&&(this._fontInfo=t.fontInfo),e.viewInfo&&this.textArea.setAttribute("aria-label",t.viewInfo.ariaLabel),e.layoutInfo&&(this._contentLeft=t.layoutInfo.contentLeft,this._contentWidth=t.layoutInfo.contentWidth,this._contentHeight=t.layoutInfo.contentHeight),e.lineHeight&&(this._lineHeight=t.lineHeight),e.accessibilitySupport&&(this._accessibilitySupport=t.accessibilitySupport,this._textAreaInput.writeScreenReaderContent("strategy changed")),e.emptySelectionClipboard&&(this._emptySelectionClipboard=t.emptySelectionClipboard),e.copyWithSyntaxHighlighting&&(this._copyWithSyntaxHighlighting=t.copyWithSyntaxHighlighting),!0;},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0;},t.prototype.onDecorationsChanged=function(e){return!0;},t.prototype.onFlushed=function(e){return!0;},t.prototype.onLinesChanged=function(e){return!0;},t.prototype.onLinesDeleted=function(e){return!0;},t.prototype.onLinesInserted=function(e){return!0;},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0;},t.prototype.onZonesChanged=function(e){return!0;},t.prototype.isFocused=function(){return this._textAreaInput.isFocused();},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea();},t.prototype.prepareRender=function(e){if(2===this._accessibilitySupport)this._primaryCursorVisibleRange=null;else{var t=new Qt(this._selections[0].positionLineNumber,this._selections[0].positionColumn);this._primaryCursorVisibleRange=e.visibleRangeForPosition(t);}},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render();},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight,!0);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():this._renderInsideEditor(t,e,xg?0:1,xg?0:1,!1);}}else this._renderAtTopLeft();},t.prototype._renderInsideEditor=function(e,t,n,i,o){var r=this.textArea,s=this.textAreaCover;o?qc.applyFontInfo(r,this._fontInfo):(r.setFontSize(1),r.setLineHeight(this._fontInfo.lineHeight)),r.setTop(e),r.setLeft(t),r.setWidth(n),r.setHeight(i),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0);},t.prototype._renderAtTopLeft=function(){var e=this.textArea,t=this.textAreaCover;if(qc.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),xg)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1),this._context.configuration.editor.viewInfo.glyphMargin?t.setClassName("monaco-editor-background textAreaCover "+Xf.OUTER_CLASS_NAME):0!==this._context.configuration.editor.viewInfo.renderLineNumbers?t.setClassName("monaco-editor-background textAreaCover "+$f.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover");},t;}(Ed);var Tg=o.b.performance&&"function"==typeof o.b.performance.now,Ig=function(){function e(e){this._highResolution=Tg&&e,this._startTime=this._now(),this._stopTime=-1;}return e.create=function(t){return void 0===t&&(t=!0),new e(t);},e.prototype.elapsed=function(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime;},e.prototype._now=function(){return this._highResolution?o.b.performance.now():new Date().getTime();},e;}(),Ng=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=t,this.afterCursorState=null,this.afterVersionId=-1,this.editOperations=[];}return e.prototype.undo=function(e){for(var t=this.editOperations.length-1;t>=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)};},e.prototype.redo=function(e){for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model);}catch(e){return a(e),this.clear(),null;}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId};}return null;},e.prototype.canUndo=function(){return this.past.length>0;},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model);}catch(e){return a(e),this.clear(),null;}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId};}return null;},e.prototype.canRedo=function(){return this.future.length>0;},e;}(),Rg=function(){return function(){};}();function Ag(e,t,n,i,o){var r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r0&&a>0||l>0&&c>0)){var d=Math.abs(a-c),h=Math.abs(s-l);if(0===d)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&r++,Ag(s,a,h,g,l),!l.looksLikeAlignment)){var C=l.spacesDiff;C<=8&&u[C]++,s=h,a=g;}}var w=n;o!==r&&(w=ox&&(x=t,S=e);}),{insertSpaces:w,tabSize:S};}function Pg(e){return(1&e.metadata)>>>0;}function Fg(e,t){e.metadata=254&e.metadata|t<<0;}function Wg(e){return(2&e.metadata)>>>1==1;}function Bg(e,t){e.metadata=253&e.metadata|(t?1:0)<<1;}function Vg(e){return(4&e.metadata)>>>2==1;}function Hg(e,t){e.metadata=251&e.metadata|(t?1:0)<<2;}function Ug(e){return(8&e.metadata)>>>3==1;}function jg(e,t){e.metadata=247&e.metadata|(t?1:0)<<3;}function zg(e,t){e.metadata=207&e.metadata|t<<4;}function Kg(e,t){e.metadata=191&e.metadata|(t?1:0)<<6;}var qg=function(){function e(e,t,n){this.metadata=0,this.parent=this,this.left=this,this.right=this,Fg(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,Hg(this,!1),zg(this,1),jg(this,!1),Kg(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,Bg(this,!1);}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i;},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;Hg(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),zg(this,this.options.stickiness),jg(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),Kg(this,this.options.collapseOnReplaceEdit);},e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t;},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null;},e;}(),Gg=new qg(null,0,0);Gg.parent=Gg,Gg.left=Gg,Gg.right=Gg,Fg(Gg,0);var $g=function(){function e(){this.root=Gg,this.requestNormalizeDelta=!1;}return e.prototype.intervalSearch=function(e,t,n,i,o){return this.root===Gg?[]:function(e,t,n,i,o,r){var s=e.root,a=0,u=0,l=0,c=[],d=0;for(;s!==Gg;)if(Wg(s))Bg(s.left,!1),Bg(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!Wg(s.left)){if(a+s.maxEndn)Bg(s,!0);else{if((l=a+s.end)>=t){s.setCachedOffsets(u,l,r);var h=!0;i&&s.ownerId&&s.ownerId!==i&&(h=!1),o&&Vg(s)&&(h=!1),h&&(c[d++]=s);}Bg(s,!0),s.right===Gg||Wg(s.right)||(a+=s.delta,s=s.right);}}return Bg(e.root,!1),c;}(this,e,t,n,i,o);},e.prototype.search=function(e,t,n){return this.root===Gg?[]:function(e,t,n,i){var o=e.root,r=0,s=0,a=0,u=[],l=0;for(;o!==Gg;)if(Wg(o))Bg(o.left,!1),Bg(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;else if(o.left===Gg||Wg(o.left)){s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,i);var c=!0;t&&o.ownerId&&o.ownerId!==t&&(c=!1),n&&Vg(o)&&(c=!1),c&&(u[l++]=o),Bg(o,!0),o.right===Gg||Wg(o.right)||(r+=o.delta,o=o.right);}else o=o.left;return Bg(e.root,!1),u;}(this,e,t,n);},e.prototype.collectNodesFromOwner=function(e){return function(e,t){var n=e.root,i=[],o=0;for(;n!==Gg;)Wg(n)?(Bg(n.left,!1),Bg(n.right,!1),n=n.parent):n.left===Gg||Wg(n.left)?(n.ownerId===t&&(i[o++]=n),Bg(n,!0),n.right===Gg||Wg(n.right)||(n=n.right)):n=n.left;return Bg(e.root,!1),i;}(this,e);},e.prototype.collectNodesPostOrder=function(){return function(e){var t=e.root,n=[],i=0;for(;t!==Gg;)Wg(t)?(Bg(t.left,!1),Bg(t.right,!1),t=t.parent):t.left===Gg||Wg(t.left)?t.right===Gg||Wg(t.right)?(n[i++]=t,Bg(t,!0)):t=t.right:t=t.left;return Bg(e.root,!1),n;}(this);},e.prototype.insert=function(e){Zg(this,e),this._normalizeDeltaIfNecessary();},e.prototype.delete=function(e){Qg(this,e),this._normalizeDeltaIfNecessary();},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t);},e.prototype.acceptReplace=function(e,t,n,i){for(var o=function(e,t,n){var i=e.root,o=0,r=0,s=0,a=[],u=0;for(;i!==Gg;)if(Wg(i))Bg(i.left,!1),Bg(i.right,!1),i===i.parent.right&&(o-=i.parent.delta),i=i.parent;else{if(!Wg(i.left)){if(o+i.maxEndn?Bg(i,!0):((s=o+i.end)>=t&&(i.setCachedOffsets(r,s,0),a[u++]=i),Bg(i,!0),i.right===Gg||Wg(i.right)||(o+=i.delta,i=i.right));}return Bg(e.root,!1),a;}(this,e,e+t),r=0,s=o.length;rn?(o.start+=s,o.end+=s,o.delta+=s,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),Bg(o,!0)):(Bg(o,!0),o.right===Gg||Wg(o.right)||(r+=o.delta,o=o.right));}Bg(e.root,!1);}(this,e,e+t,n),this._normalizeDeltaIfNecessary();for(r=0,s=o.length;rn)&&1!==i&&(2===i||t);}function Xg(e,t,n,i,o){var r=function(e){return(48&e.metadata)>>>4;}(e),s=0===r||2===r,a=1===r||2===r,u=n-t,l=i,c=Math.min(u,l),d=e.start,h=!1,p=e.end,f=!1;t<=d&&p<=n&&function(e){return(64&e.metadata)>>>6==1;}(e)&&(e.start=t,h=!0,e.end=t,f=!0);var g=o?1:u>0?2:0;if(!h&&Yg(d,s,t,g)&&(h=!0),!f&&Yg(p,a,t,g)&&(f=!0),c>0&&!o){g=u>l?2:0;!h&&Yg(d,s,t+c,g)&&(h=!0),!f&&Yg(p,a,t+c,g)&&(f=!0);}g=o?1:0;!h&&Yg(d,s,n,g)&&(e.start=t+l,h=!0),!f&&Yg(p,a,n,g)&&(e.end=t+l,f=!0);var m=l-u;h||(e.start=Math.max(0,d+m),h=!0),f||(e.end=Math.max(0,p+m),f=!0),e.start>e.end&&(e.end=e.start);}function Zg(e,t){if(e.root===Gg)return t.parent=Gg,t.left=Gg,t.right=Gg,Fg(t,0),e.root=t,e.root;!function(e,t){var n=0,i=e.root,o=t.start,r=t.end;for(;;){var s=rm(o,r,i.start+n,i.end+n);if(s<0){if(i.left===Gg){t.start-=n,t.end-=n,t.maxEnd-=n,i.left=t;break;}i=i.left;}else{if(i.right===Gg){t.start-=n+i.delta,t.end-=n+i.delta,t.maxEnd-=n+i.delta,i.right=t;break;}n+=i.delta,i=i.right;}}t.parent=i,t.left=Gg,t.right=Gg,Fg(t,1);}(e,t),om(t.parent);for(var n=t;n!==e.root&&1===Pg(n.parent);){var i;if(n.parent===n.parent.parent.left)1===Pg(i=n.parent.parent.right)?(Fg(n.parent,0),Fg(i,0),Fg(n.parent.parent,1),n=n.parent.parent):(n===n.parent.right&&em(e,n=n.parent),Fg(n.parent,0),Fg(n.parent.parent,1),tm(e,n.parent.parent));else 1===Pg(i=n.parent.parent.left)?(Fg(n.parent,0),Fg(i,0),Fg(n.parent.parent,1),n=n.parent.parent):(n===n.parent.left&&tm(e,n=n.parent),Fg(n.parent,0),Fg(n.parent.parent,1),em(e,n.parent.parent));}return Fg(e.root,0),t;}function Qg(e,t){var n,i;if(t.left===Gg?(i=t,(n=t.right).delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta):t.right===Gg?(n=t.left,i=t):((n=(i=function(e){for(;e.left!==Gg;)e=e.left;return e;}(t.right)).right).start+=i.delta,n.end+=i.delta,n.delta+=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,i.delta=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0)),i===e.root)return e.root=n,Fg(n,0),t.detach(),Jg(),im(n),void(e.root.parent=Gg);var o,r=1===Pg(i);if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?n.parent=i.parent:(i.parent===t?n.parent=i:n.parent=i.parent,i.left=t.left,i.right=t.right,i.parent=t.parent,Fg(i,Pg(t)),t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==Gg&&(i.left.parent=i),i.right!==Gg&&(i.right.parent=i)),t.detach(),r)return om(n.parent),i!==t&&(om(i),om(i.parent)),void Jg();for(om(n),om(n.parent),i!==t&&(om(i),om(i.parent));n!==e.root&&0===Pg(n);)n===n.parent.left?(1===Pg(o=n.parent.right)&&(Fg(o,0),Fg(n.parent,1),em(e,n.parent),o=n.parent.right),0===Pg(o.left)&&0===Pg(o.right)?(Fg(o,1),n=n.parent):(0===Pg(o.right)&&(Fg(o.left,0),Fg(o,1),tm(e,o),o=n.parent.right),Fg(o,Pg(n.parent)),Fg(n.parent,0),Fg(o.right,0),em(e,n.parent),n=e.root)):(1===Pg(o=n.parent.left)&&(Fg(o,0),Fg(n.parent,1),tm(e,n.parent),o=n.parent.left),0===Pg(o.left)&&0===Pg(o.right)?(Fg(o,1),n=n.parent):(0===Pg(o.left)&&(Fg(o.right,0),Fg(o,1),em(e,o),o=n.parent.left),Fg(o,Pg(n.parent)),Fg(n.parent,0),Fg(o.left,0),tm(e,n.parent),n=e.root));Fg(n,0),Jg();}function Jg(){Gg.parent=Gg,Gg.delta=0,Gg.start=0,Gg.end=0;}function em(e,t){var n=t.right;n.delta+=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,t.right=n.left,n.left!==Gg&&(n.left.parent=t),n.parent=t.parent,t.parent===Gg?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n,im(t),im(n);}function tm(e,t){var n=t.left;t.delta-=n.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=n.delta,t.end-=n.delta,t.left=n.right,n.right!==Gg&&(n.right.parent=t),n.parent=t.parent,t.parent===Gg?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n,im(t),im(n);}function nm(e){var t=e.end;if(e.left!==Gg){var n=e.left.maxEnd;n>t&&(t=n);}if(e.right!==Gg){var i=e.right.maxEnd+e.delta;i>t&&(t=i);}return t;}function im(e){e.maxEnd=nm(e);}function om(e){for(;e!==Gg;){var t=nm(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent;}}function rm(e,t,n,i){return e===n?t-i:e-n;}var sm=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this;}return e.prototype.next=function(){if(this.right!==am)return um(this.right);for(var e=this;e.parent!==am&&e.parent.left!==e;)e=e.parent;return e.parent===am?am:e.parent;},e.prototype.prev=function(){if(this.left!==am)return lm(this.left);for(var e=this;e.parent!==am&&e.parent.right!==e;)e=e.parent;return e.parent===am?am:e.parent;},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null;},e;}(),am=new sm(null,0);function um(e){for(;e.left!==am;)e=e.left;return e;}function lm(e){for(;e.right!==am;)e=e.right;return e;}function cm(e){return e===am?0:e.size_left+e.piece.length+cm(e.right);}function dm(e){return e===am?0:e.lf_left+e.piece.lineFeedCnt+dm(e.right);}function hm(){am.parent=am;}function pm(e,t){var n=t.right;n.size_left+=t.size_left+(t.piece?t.piece.length:0),n.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=n.left,n.left!==am&&(n.left.parent=t),n.parent=t.parent,t.parent===am?e.root=n:t.parent.left===t?t.parent.left=n:t.parent.right=n,n.left=t,t.parent=n;}function fm(e,t){var n=t.left;t.left=n.right,n.right!==am&&(n.right.parent=t),n.parent=t.parent,t.size_left-=n.size_left+(n.piece?n.piece.length:0),t.lf_left-=n.lf_left+(n.piece?n.piece.lineFeedCnt:0),t.parent===am?e.root=n:t===t.parent.right?t.parent.right=n:t.parent.left=n,n.right=t,t.parent=n;}function gm(e,t){var n,i;if(n=t.left===am?(i=t).right:t.right===am?(i=t).left:(i=um(t.right)).right,i===e.root)return e.root=n,n.color=0,t.detach(),hm(),void(e.root.parent=am);var o=1===i.color;if(i===i.parent.left?i.parent.left=n:i.parent.right=n,i===t?(n.parent=i.parent,vm(e,n)):(i.parent===t?n.parent=i:n.parent=i.parent,vm(e,n),i.left=t.left,i.right=t.right,i.parent=t.parent,i.color=t.color,t===e.root?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left!==am&&(i.left.parent=i),i.right!==am&&(i.right.parent=i),i.size_left=t.size_left,i.lf_left=t.lf_left,vm(e,i)),t.detach(),n.parent.left===n){var r=cm(n),s=dm(n);if(r!==n.parent.size_left||s!==n.parent.lf_left){var a=r-n.parent.size_left,u=s-n.parent.lf_left;n.parent.size_left=r,n.parent.lf_left=s,_m(e,n.parent,a,u);}}if(vm(e,n.parent),o)hm();else{for(var l;n!==e.root&&0===n.color;)n===n.parent.left?(1===(l=n.parent.right).color&&(l.color=0,n.parent.color=1,pm(e,n.parent),l=n.parent.right),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.right.color&&(l.left.color=0,l.color=1,fm(e,l),l=n.parent.right),l.color=n.parent.color,n.parent.color=0,l.right.color=0,pm(e,n.parent),n=e.root)):(1===(l=n.parent.left).color&&(l.color=0,n.parent.color=1,fm(e,n.parent),l=n.parent.left),0===l.left.color&&0===l.right.color?(l.color=1,n=n.parent):(0===l.left.color&&(l.right.color=0,l.color=1,pm(e,l),l=n.parent.left),l.color=n.parent.color,n.parent.color=0,l.left.color=0,fm(e,n.parent),n=e.root));n.color=0,hm();}}function mm(e,t){for(vm(e,t);t!==e.root&&1===t.parent.color;){var n;if(t.parent===t.parent.parent.left)1===(n=t.parent.parent.right).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&pm(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,fm(e,t.parent.parent));else 1===(n=t.parent.parent.left).color?(t.parent.color=0,n.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&fm(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,pm(e,t.parent.parent));}e.root.color=0;}function _m(e,t,n,i){for(;t!==e.root&&t!==am;)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent;}function vm(e,t){var n=0,i=0;if(t!==e.root){if(0===n){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;n=cm((t=t.parent).left)-t.size_left,i=dm(t.left)-t.lf_left,t.size_left+=n,t.lf_left+=i;}for(;t!==e.root&&(0!==n||0!==i);)t.parent.left===t&&(t.parent.size_left+=n,t.parent.lf_left+=i),t=t.parent;}}am.parent=am,am.left=am,am.right=am,am.color=0;var ym=function(){function e(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wordSeparators=i;}return e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(var t=0,n=e.length;t=n)break;var o=e.charCodeAt(t);if(110===o||114===o||87===o)return!0;}}return!1;}(this.searchString):this.searchString.indexOf("\n")>=0;var t=null;try{t=uo(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0});}catch(e){return null;}if(!t)return null;var n=!this.isRegex&&!e;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new bm(t,this.wordSeparators?tg(this.wordSeparators):null,n?this.searchString:null);},e;}();var bm=function(){return function(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n;};}();function Cm(e,t,n){if(!n)return new fr(e,null);for(var i=[],o=0,r=t.length;o>0);t[o]>=e?i=o-1:t[o+1]>=e?(n=o,i=o):n=o+1;}return n+1;},e;}(),Sm=function(){function e(){}return e.findMatches=function(e,t,n,i,o){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,n,new Em(r.wordSeparators,r.regex),i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[];},e._getMultilineMatchRange=function(e,t,n,i,o,r){var s,a,u=0;if(s=i?t+o+(u=i.findLineFeedCountBeforeOffset(o)):t+o,i){var l=i.findLineFeedCountBeforeOffset(o+r.length)-u;a=s+r.length+l;}else a=s+r.length;var c=e.getPositionAt(s),d=e.getPositionAt(a);return new Jt(c.lineNumber,c.column,d.lineNumber,d.column);},e._doFindMatchesMultiline=function(e,t,n,i,o){var r,s=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),u="\r\n"===e.getEOL()?new wm(a):null,l=[],c=0;for(n.reset(0);r=n.next(a);)if(l[c++]=Cm(this._getMultilineMatchRange(e,s,a,u,r.index,r[0]),r,i),c>=o)return l;return l;},e._doFindMatchesLineByLine=function(e,t,n,i,o){var r=[],s=0;if(t.startLineNumber===t.endLineNumber){var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r;}var u=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,u,t.startLineNumber,t.startColumn-1,s,r,i,o);for(var l=t.startLineNumber+1;l=a))return o;return o;}var p,f=new Em(e.wordSeparators,e.regex);f.reset(0);do{if((p=f.next(t))&&(r[o++]=Cm(new Jt(n,p.index+1+i,n,p.index+1+p[0].length+i),p,s),o>=a))return o;}while(p);return o;},e.findNextMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new Em(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,r,i):this._doFindNextMatchLineByLine(e,n,r,i);},e._doFindNextMatchMultiline=function(e,t,n,i){var o=new Qt(t.lineNumber,1),r=e.getOffsetAt(o),s=e.getLineCount(),a=e.getValueInRange(new Jt(o.lineNumber,o.column,s,e.getLineMaxColumn(s)),1),u="\r\n"===e.getEOL()?new wm(a):null;n.reset(t.column-1);var l=n.next(a);return l?Cm(this._getMultilineMatchRange(e,r,a,u,l.index,l[0]),l,i):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new Qt(1,1),n,i):null;},e._doFindNextMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(var u=1;u<=o;u++){var l=(r+u-1)%o,c=e.getLineContent(l+1),d=this._findFirstMatchInLine(n,c,l+1,1,i);if(d)return d;}return null;},e._findFirstMatchInLine=function(e,t,n,i,o){e.reset(i-1);var r=e.next(t);return r?Cm(new Jt(n,r.index+1,n,r.index+1+r[0].length),r,o):null;},e.findPreviousMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new Em(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,r,i):this._doFindPreviousMatchLineByLine(e,n,r,i);},e._doFindPreviousMatchMultiline=function(e,t,n,i){var o=this._doFindMatchesMultiline(e,new Jt(1,1,t.lineNumber,t.column),n,i,9990);if(o.length>0)return o[o.length-1];var r=e.getLineCount();return t.lineNumber!==r||t.column!==e.getLineMaxColumn(r)?this._doFindPreviousMatchMultiline(e,new Qt(r,e.getLineMaxColumn(r)),n,i):null;},e._doFindPreviousMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(var u=1;u<=o;u++){var l=(o+r-u-1)%o,c=e.getLineContent(l+1),d=this._findLastMatchInLine(n,c,l+1,i);if(d)return d;}return null;},e._findLastMatchInLine=function(e,t,n,i){var o,r=null;for(e.reset(0);o=e.next(t);)r=Cm(new Jt(n,o.index+1,n,o.index+1+o[0].length),o,i);return r;},e;}();function xm(e,t,n,i,o){return function(e,t,n,i,o){if(0===i)return!0;var r=t.charCodeAt(i-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i);if(0!==e.get(s))return!0;}return!1;}(e,t,0,i,o)&&function(e,t,n,i,o){if(i+o===n)return!0;var r=t.charCodeAt(i+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i+o-1);if(0!==e.get(s))return!0;}return!1;}(e,t,n,i,o);}var Em=function(){function e(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0;}return e.prototype.reset=function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0;},e.prototype.next=function(e){var t,n=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===n)return null;if(!(t=this._searchRegex.exec(e)))return null;var i=t.index,o=t[0].length;if(i===this._prevMatchStartIndex&&o===this._prevMatchLength)return null;if(this._prevMatchStartIndex=i,this._prevMatchLength=o,!this._wordSeparators||xm(this._wordSeparators,e,n,i,o))return t;}while(t);return null;},e;}();function Lm(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t;}var Tm=function(){return function(e,t,n,i,o){this.lineStarts=e,this.cr=t,this.lf=n,this.crlf=i,this.isBasicASCII=o;};}();function Im(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,o=0,r=e.length;o=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n;}return null;},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n;}return null;},e.prototype.set=function(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e);},e.prototype.valdiate=function(e){for(var t=!1,n=this._cache,i=0;i=e)&&(n[i]=null,t=!0);}if(t){var r=[];for(i=0;i0){e[o].lineStarts||(e[o].lineStarts=Im(e[o].buffer));var s=new Nm(o+1,{line:0,column:0},{line:e[o].lineStarts.length-1,column:e[o].buffer.length-e[o].lineStarts[e[o].lineStarts.length-1]},e[o].lineStarts.length-1,e[o].buffer.length);this._buffers.push(e[o]),i=this.rbInsertRight(i,s);}this._searchCache=new Om(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata();},e.prototype.normalizeEOL=function(e){var t=this,n=65535-Math.floor(21845),i=2*n,o="",r=0,s=[];if(this.iterate(this.root,function(a){var u=t.getNodeContent(a),l=u.length;if(r<=n||r+l0){var a=o.replace(/\r\n|\r|\n/g,e);s.push(new km(a,Im(a)));}this.create(s,e,!0);},e.prototype.getEOL=function(){return this._EOL;},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e);},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==am;)if(i.left!==am&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e)return(n+=i.size_left)+(this.getAccumulatedValue(i,e-i.lf_left-2)+t-1);e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;}return n;},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,n=0,i=e;t!==am;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var o=this.getIndexOf(t,e-t.size_left);if(n+=t.lf_left+o.index,0===o.index){var r=this.getOffsetAt(n+1,1);return new Qt(n+1,i-r+1);}return new Qt(n+1,o.remainder+1);}if(e-=t.size_left+t.piece.length,n+=t.lf_left+t.piece.lineFeedCnt,t.right===am){r=this.getOffsetAt(n+1,1);return new Qt(n+1,i-e-r+1);}t=t.right;}return new Qt(1,1);},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o;},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,o=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(o+e.remainder,o+t.remainder);}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),u=s.substring(a+e.remainder,a+r.piece.length);for(r=r.next();r!==am;){var l=this._buffers[r.piece.bufferIndex].buffer,c=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){u+=l.substring(c,c+t.remainder);break;}u+=l.substr(c,r.piece.length),r=r.next();}return u;},e.prototype.getLinesContent=function(){return this.getContentOfSubTree(this.root).split(/\r\n|\r|\n/);},e.prototype.getLength=function(){return this._length;},e.prototype.getLineCount=function(){return this._lineCnt;},e.prototype.getLineContent=function(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value);},e.prototype.getLineCharCode=function(e,t){var n=this.nodeAt2(e,t+1);if(n.remainder===n.node.piece.length){var i=n.node.next();if(!i)return 0;var o=this._buffers[i.piece.bufferIndex],r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o.buffer.charCodeAt(r);}o=this._buffers[n.node.piece.bufferIndex];var s=(r=this.offsetInBuffer(n.node.piece.bufferIndex,n.node.piece.start))+n.remainder;return o.buffer.charCodeAt(s);},e.prototype.getLineLength=function(e){if(e===this.getLineCount()){var t=this.getOffsetAt(e,1);return this.getLength()-t;}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength;},e.prototype.findMatchesInNode=function(e,t,n,i,o,r,s,a,u,l,c){var d,h=this._buffers[e.piece.bufferIndex],p=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),f=this.offsetInBuffer(e.piece.bufferIndex,o),g=this.offsetInBuffer(e.piece.bufferIndex,r);t.reset(f);var m={line:0,column:0};do{if(d=t.next(h.buffer)){if(d.index>=g)return l;this.positionInBuffer(e,d.index-p,m);var _=this.getLineFeedCnt(e.piece.bufferIndex,o,m),v=m.line===o.line?m.column-o.column+i:m.column+1,y=v+d[0].length;if(c[l++]=Cm(new Jt(n+_,v,n+_,y),d,a),d.index+d[0].length>=g)return l;if(l>=u)return l;}}while(d);return l;},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],r=0,s=new Em(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var l=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(u.node,u.remainder);if(a.node===u.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,l,c,t,n,i,r,o),o;for(var d=e.startLineNumber,h=a.node;h!==u.node;){var p=this.getLineFeedCnt(h.piece.bufferIndex,l,h.piece.end);if(p>=1){var f=this._buffers[h.piece.bufferIndex].lineStarts,g=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start),m=f[l.line+p],_=d===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(h,s,d,_,l,this.positionInBuffer(h,m-g),t,n,i,r,o))>=i)return o;d+=p;}var v=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){var y=this.getLineContent(d).substring(v,e.endColumn-1);return r=this._findMatchesInLine(t,s,y,e.endLineNumber,v,r,o,n,i),o;}if((r=this._findMatchesInLine(t,s,this.getLineContent(d).substr(v),d,v,r,o,n,i))>=i)return o;d++,h=(a=this.nodeAt2(d,1)).node,l=this.positionInBuffer(a.node,a.remainder);}if(d===e.endLineNumber){var b=d===e.startLineNumber?e.startColumn-1:0;y=this.getLineContent(d).substring(b,e.endColumn-1);return r=this._findMatchesInLine(t,s,y,e.endLineNumber,b,r,o,n,i),o;}var C=d===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(u.node,s,d,C,l,c,t,n,i,r,o),o;},e.prototype._findMatchesInLine=function(e,t,n,i,o,r,s,a,u){var l,c=e.wordSeparators;if(!a&&e.simpleSearch){for(var d=e.simpleSearch,h=d.length,p=n.length,f=-h;-1!==(f=n.indexOf(d,f+h));)if((!c||xm(c,n,p,f,h))&&(s[r++]=new fr(new Jt(i,f+1+o,i,f+1+h+o),null),r>=u))return r;return r;}t.reset(0);do{if((l=t.next(n))&&(s[r++]=Cm(new Jt(i,l.index+1+o,i,l.index+1+l[0].length+o),l,a),r>=u))return r;}while(l);return r;},e.prototype.insert=function(e,t,n){if(void 0===n&&(n=!1),this._EOLNormalized=this._EOLNormalized&&n,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==am){var i=this.nodeAt(e),o=i.node,r=i.remainder,s=i.nodeStartOffset,a=o.piece,u=a.bufferIndex,l=this.positionInBuffer(o,r);if(0===o.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.length<65535)return this.appendToNode(o,t),void this.computeBufferMetadata();if(s===e)this.insertContentToNodeLeft(t,o),this._searchCache.valdiate(e);else if(s+o.piece.length>e){var c=[],d=new Nm(a.bufferIndex,l,a.end,this.getLineFeedCnt(a.bufferIndex,l,a.end),this.offsetInBuffer(u,a.end)-this.offsetInBuffer(u,l));if(this.shouldCheckCRLF()&&this.endWithCR(t))if(10===this.nodeCharCodeAt(o,r)){var h={line:d.start.line+1,column:0};d=new Nm(d.bufferIndex,h,d.end,this.getLineFeedCnt(d.bufferIndex,h,d.end),d.length-1),t+="\n";}if(this.shouldCheckCRLF()&&this.startWithLF(t)){if(13===this.nodeCharCodeAt(o,r-1)){var p=this.positionInBuffer(o,r-1);this.deleteNodeTail(o,p),t="\r"+t,0===o.piece.length&&c.push(o);}else this.deleteNodeTail(o,l);}else this.deleteNodeTail(o,l);var f=this.createNewPieces(t);d.length>0&&this.rbInsertRight(o,d);for(var g=o,m=0;m=0;u--)a=this.rbInsertLeft(a,s[u]);this.validateCRLFWithPrevNode(a),this.deleteNodes(n);},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r=c))break;a=l+1;}return n?(n.line=l,n.column=s-d,null):{line:l,column:s-d};},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line;},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column;},e.prototype.deleteNodes=function(e){for(var t=0;t65535){for(var t=[];e.length>65535;){var n=e.charCodeAt(65534),i=void 0;13===n||n>=55296&&n<=56319?(i=e.substring(0,65534),e=e.substring(65534)):(i=e.substring(0,65535),e=e.substring(65535));var o=Im(i);t.push(new Nm(this._buffers.length,{line:0,column:0},{line:o.length-1,column:i.length-o[o.length-1]},o.length-1,i.length)),this._buffers.push(new km(i,o));}var r=Im(e);return t.push(new Nm(this._buffers.length,{line:0,column:0},{line:r.length-1,column:e.length-r[r.length-1]},r.length-1,e.length)),this._buffers.push(new km(e,r)),t;}var s=this._buffers[0].buffer.length,a=Im(e,!1),u=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===s&&0!==s&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},u=this._lastChangeBufferPos;for(var l=0;l=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),u=this.getAccumulatedValue(n,e-n.lf_left-1),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return l+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:l,nodeStartLineNumber:c-(e-1-n.lf_left)}),s.substring(a+r,a+u-t);}if(n.lf_left+n.piece.lineFeedCnt===e-1){r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this._buffers[n.piece.bufferIndex].buffer,a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=s.substring(a+r,a+n.piece.length);break;}e-=n.lf_left+n.piece.lineFeedCnt,l+=n.size_left+n.piece.length,n=n.right;}for(n=n.next();n!==am;){s=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){u=this.getAccumulatedValue(n,0),a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=s.substring(a,a+u-t);}a=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=s.substr(a,n.piece.length),n=n.next();}return i;},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==am;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length);},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0};}return{index:o,remainder:i.column};},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column;},e.prototype.deleteNodeTail=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.end),r=t,s=this.offsetInBuffer(n.bufferIndex,r),a=this.getLineFeedCnt(n.bufferIndex,n.start,r),u=a-i,l=s-o,c=n.length+l;e.piece=new Nm(n.bufferIndex,n.start,r,a,c),_m(this,e,l,u);},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,o=this.offsetInBuffer(n.bufferIndex,n.start),r=t,s=this.getLineFeedCnt(n.bufferIndex,r,n.end),a=s-i,u=o-this.offsetInBuffer(n.bufferIndex,r),l=n.length+u;e.piece=new Nm(n.bufferIndex,r,n.end,s,l),_m(this,e,u,a);},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,o=i.start,r=i.end,s=i.length,a=i.lineFeedCnt,u=t,l=this.getLineFeedCnt(i.bufferIndex,i.start,u),c=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,o);e.piece=new Nm(i.bufferIndex,i.start,u,l,c),_m(this,e,c-s,l-a);var d=new Nm(i.bufferIndex,n,r,this.getLineFeedCnt(i.bufferIndex,n,r),this.offsetInBuffer(i.bufferIndex,r)-this.offsetInBuffer(i.bufferIndex,n)),h=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(h);},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var o=Im(t,!1),r=0;re)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var o={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(o),o;}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right;}return null;},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==am;)if(n.left!==am&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var o=this.getAccumulatedValue(n,e-n.lf_left-2),r=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(o+t-1,r),nodeStartOffset:i};}if(n.lf_left+n.piece.lineFeedCnt===e-1){if((o=this.getAccumulatedValue(n,e-n.lf_left-2))+t-1<=n.piece.length)return{node:n,remainder:o+t-1,nodeStartOffset:i};t-=n.piece.length-o;break;}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right;}for(n=n.next();n!==am;){if(n.piece.lineFeedCnt>0){r=this.getAccumulatedValue(n,0);var s=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,r),nodeStartOffset:s};}if(n.piece.length>=t-1)return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)};t-=n.piece.length,n=n.next();}return null;},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i);},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t;},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL);},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===am||0===e.piece.lineFeedCnt)return!1;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,o=n[i]+t.start.column;return i!==n.length-1&&!(n[i+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o);},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==am&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1);},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e);}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t);}},e.prototype.fixCRLF=function(e,t){var n,i=[],o=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new Nm(e.piece.bufferIndex,e.piece.start,n,s,r),_m(this,e,-1,-1),0===e.piece.length&&i.push(e);var a={line:t.piece.start.line+1,column:0},u=t.piece.length-1,l=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Nm(t.piece.bufferIndex,a,t.piece.end,l,u),_m(this,t,-1,-1),0===t.piece.length&&i.push(t);var c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(var d=0;d0){g.sort(function(e,t){return t.lineNumber-e.lineNumber;}),C=[];a=0;for(var w=g.length;a0&&g[a-1].lineNumber===_)){var S=g[a].oldContent,x=this.getLineContent(_);0!==x.length&&x!==S&&-1===lo(x)&&C.push(_);}}}return new gr(y,b,C);},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)];},e.prototype._toSingleEditOperation=function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,o=new Jt(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),r=n.startLineNumber,s=n.startColumn,a=[],u=0,l=e.length;u0){var d=a.lines.length,h=a.lines[0],p=a.lines[d-1];c=1===d?new Jt(u,l,u,l+h.length):new Jt(u,l,u+d-1,p.length+1);}else c=new Jt(u,l,u,l);n=c.endLineNumber,i=c.endColumn,t.push(c),o=a;}return t;},e._sortOpsAscending=function(e,t){var n=Jt.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n;},e._sortOpsDescending=function(e,t){var n=Jt.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n;},e;}(),Am=function(){function e(e,t,n,i,o,r,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a;}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n";},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,o=n.length;i=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t);}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e));},e.prototype._acceptChunk2=function(e){var t=function(e,t){e.length=0,e[0]=0;for(var n=1,i=0,o=0,r=0,s=!0,a=0,u=t.length;a126)&&(s=!1);}var c=new Tm(Lm(e),i,o,r,s);return e.length=0,c;}(this._tmpLineStarts,e);this.chunks.push(new km(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=So(e));},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new Am(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e);},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=Im(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++;}},e;}(),Pm=function(){return function(){this.changeType=1;};}(),Fm=function(){return function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t;};}(),Wm=function(){return function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t;};}(),Bm=function(){return function(e,t,n){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=n;};}(),Vm=function(){return function(){this.changeType=5;};}(),Hm=function(){function e(e,t,n,i){this.changes=e,this.versionId=t,this.isUndoing=n,this.isRedoing=i;}return e.prototype.containsEvent=function(e){for(var t=0,n=this.changes.length;t>>0;}var zm=new Uint32Array(0).buffer,Km=function(){function e(e){this._state=e,this._lineTokens=null,this._invalid=!0;}return e.prototype.deleteBeginning=function(e){null!==this._lineTokens&&this._lineTokens!==zm&&this.delete(0,e);},e.prototype.deleteEnding=function(e){if(null!==this._lineTokens&&this._lineTokens!==zm){var t=new Uint32Array(this._lineTokens),n=t[t.length-2];this.delete(e,n);}},e.prototype.delete=function(e,t){if(null!==this._lineTokens&&this._lineTokens!==zm&&e!==t){var n=new Uint32Array(this._lineTokens),i=n.length>>>1;if(0!==e||n[n.length-2]!==t){var o=ru.findIndexInTokensArray(n,e),r=o>0?n[o-1<<1]:0;if(tl&&(n[u++]=h,n[u++]=n[1+(d<<1)],l=h);}if(u!==n.length){var p=new Uint32Array(u);p.set(n.subarray(0,u),0),this._lineTokens=p.buffer;}}}else this._lineTokens=zm;}},e.prototype.append=function(e){if(e!==zm)if(this._lineTokens!==zm){if(null!==this._lineTokens)if(null!==e){var t=new Uint32Array(this._lineTokens),n=new Uint32Array(e),i=n.length>>>1,o=new Uint32Array(t.length+n.length);o.set(t,0);for(var r=t.length,s=t[t.length-2],a=0;a>>1,o=ru.findIndexInTokensArray(n,e);if(o>0)(o>0?n[o-1<<1]:0)===e&&o--;for(var r=o;r=e;},e.prototype.hasLinesToTokenize=function(e){return this._invalidLineStartIndex=0;r--)this.invalidateLine(e.startLineNumber+r-1);this._acceptDeleteRange(e),this._acceptInsertText(new Qt(e.startLineNumber,e.startColumn),t,n);},e.prototype._acceptDeleteRange=function(e){var t=e.startLineNumber-1;if(!(t>=this._tokens.length))if(e.startLineNumber!==e.endLineNumber){var n=this._tokens[t];n.deleteEnding(e.startColumn-1);var i=e.endLineNumber-1,o=null;if(i=this._tokens.length))if(0!==t){var o=this._tokens[i];o.deleteEnding(e.column-1),o.insert(e.column-1,n);for(var r,s,a,u,l,c=new Array(t),d=t-1;d>=0;d--)c[d]=new Km(null);this._tokens=(r=this._tokens,s=e.lineNumber,a=c,u=r.slice(0,s),l=r.slice(s),u.concat(a,l));}else this._tokens[i].insert(e.column-1,n);}},e.prototype._tokenizeOneLine=function(e,t){if(!this.hasLinesToTokenize(e))return e.getLineCount()+1;var n=this._invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t,n),n;},e.prototype._tokenizeText=function(e,t,n){var i=null;if(this.tokenizationSupport)try{i=this.tokenizationSupport.tokenize2(t,n,0);}catch(e){a(e);}return i||(i=ks(this.languageIdentifier.id,0,n,0)),i;},e.prototype._updateTokensUntilLine=function(e,t,n){if(this.tokenizationSupport){for(var i=e.getLineCount(),o=n-1,r=this._invalidLineStartIndex;r<=o;r++){var s=r+1,u=e.getLineContent(r+1),l=this._getState(r),c=null;try{var d=l.clone();c=this.tokenizationSupport.tokenize2(u,d,0);}catch(e){a(e);}if(c||(c=ks(this.languageIdentifier.id,0,l,0)),this._setTokens(this.languageIdentifier.id,r,u.length,c.tokens),t.registerChangedTokens(r+1),this._setIsInvalid(r,!1),s0?t[n-1]:null;i&&i.toLineNumber===e-1?i.toLineNumber++:t[n]={fromLineNumber:e,toLineNumber:e};},e.prototype.build=function(){return 0===this._ranges.length?null:{ranges:this._ranges};},e;}(),$m=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}();function Ym(e){var t=new Mm();return t.acceptChunk(e),t.finish();}function Xm(e,t){return("string"==typeof e?Ym(e):e).create(t);}var Zm=0;var Qm=function(){throw new Error("Invalid change accessor");},Jm=function(e){function t(n,i,o,r){void 0===r&&(r=null);var s=e.call(this)||this;s._onWillDispose=s._register(new N()),s.onWillDispose=s._onWillDispose.event,s._onDidChangeDecorations=s._register(new s_()),s.onDidChangeDecorations=s._onDidChangeDecorations.event,s._onDidChangeLanguage=s._register(new N()),s.onDidChangeLanguage=s._onDidChangeLanguage.event,s._onDidChangeLanguageConfiguration=s._register(new N()),s.onDidChangeLanguageConfiguration=s._onDidChangeLanguageConfiguration.event,s._onDidChangeTokens=s._register(new N()),s.onDidChangeTokens=s._onDidChangeTokens.event,s._onDidChangeOptions=s._register(new N()),s.onDidChangeOptions=s._onDidChangeOptions.event,s._eventEmitter=s._register(new a_()),Zm++,s.id="$model"+Zm,s.isForSimpleWidget=i.isForSimpleWidget,s._associatedResource=null==r?_t.parse("inmemory://model/"+Zm):r,s._attachedEditorCount=0,s._buffer=Xm(n,i.defaultEOL),s._options=t.resolveOptions(s._buffer,i);var a,u=s._buffer.getLineCount(),l=s._buffer.getValueLengthInRange(new Jt(1,1,u,s._buffer.getLineLength(u)+1),0);return i.largeFileOptimizations?s._isTooLargeForTokenization=l>t.LARGE_FILE_SIZE_THRESHOLD||u>t.LARGE_FILE_LINE_COUNT_THRESHOLD:s._isTooLargeForTokenization=!1,s._isTooLargeForSyncing=l>t.MODEL_SYNC_LIMIT,s._setVersionId(1),s._isDisposed=!1,s._isDisposing=!1,s._languageIdentifier=o||Is,s._tokenizationListener=Ls.onDidChange(function(e){-1!==e.changedLanguages.indexOf(s._languageIdentifier.language)&&(s._resetTokenizationState(),s.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:s.getLineCount()}]}),s._shouldAutoTokenize()&&s._warmUpTokens());}),s._revalidateTokensTimeout=-1,s._languageRegistryListener=la.onDidChange(function(e){e.languageIdentifier.id===s._languageIdentifier.id&&s._onDidChangeLanguageConfiguration.fire({});}),s._resetTokenizationState(),s._instanceId=(a=Zm,(a%=52)<26?String.fromCharCode(97+a):String.fromCharCode(65+a-26)),s._lastDecorationId=0,s._decorations=Object.create(null),s._decorationsTree=new e_(),s._commandManager=new Dg(s),s._isUndoing=!1,s._isRedoing=!1,s._trimAutoWhitespaceLines=null,s;}return $m(t,e),t.createFromString=function(e,n,i,o){return void 0===n&&(n=t.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),void 0===o&&(o=null),new t(e,n,i,o);},t.resolveOptions=function(e,t){if(t.detectIndentation){var n=Mg(e,t.tabSize,t.insertSpaces);return new pr({tabSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL});}return new pr({tabSize:t.tabSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL});},t.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent(function(t){return e(t.rawContentChangedEvent);});},t.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent(function(t){return e(t.rawContentChangedEvent);});},t.prototype.onDidChangeContent=function(e){return this._eventEmitter.slowEvent(function(t){return e(t.contentChangedEvent);});},t.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._tokenizationListener.dispose(),this._languageRegistryListener.dispose(),this._clearTimers(),this._isDisposed=!0,e.prototype.dispose.call(this),this._isDisposing=!1;},t.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!");},t.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new Um(e,t));},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=Xm(e,this._options.defaultEOL);this.setValueFromTextBuffer(t);}},t.prototype._createContentChanged2=function(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s};},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._resetTokenizationState(),this._decorations=Object.create(null),this._decorationsTree=new e_(),this._commandManager=new Dg(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Hm([new Pm()],this._versionId,!1,!1),this._createContentChanged2(new Jt(1,1,i,o),0,n,this.getValue(),!1,!1,!0));}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=1===e?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Hm([new Vm()],this._versionId,!1,!1),this._createContentChanged2(new Jt(1,1,o,r),0,i,this.getValue(),!1,!1,!1));}},t.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t);},t.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n0;},t.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount;},t.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing;},t.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization;},t.prototype.isDisposed=function(){return this._isDisposed;},t.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),i=1;i<=n;i++){var o=this._buffer.getLineLength(i);o>=1e4?t+=o:e+=o;}return t>e;},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource;},enumerable:!0,configurable:!0}),t.prototype.getOptions=function(){return this._assertNotDisposed(),this._options;},t.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new pr({tabSize:t,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(o)){var r=this._options.createChangeEvent(o);this._options=o,this._onDidChangeOptions.fire(r);}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=Mg(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize});},t._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,o=0;othis.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e);},t.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e);},t.prototype.getLinesContent=function(){return this._assertNotDisposed(),this._buffer.getLinesContent();},t.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL();},t.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1;},t.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1;},t.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e);},t.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e);},t.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),o=e.startLineNumber,r=e.startColumn;if(o<1)t=1,n=1;else if(o>i)t=i,n=this.getLineMaxColumn(t);else{if(t=0|o,r<=1)n=1;else n=r>=(c=this.getLineMaxColumn(t))?c:0|r;}var s,a,u=e.endLineNumber,l=e.endColumn;if(u<1)s=1,a=1;else if(u>i)s=i,a=this.getLineMaxColumn(s);else{var c;if(s=0|u,l<=1)a=1;else a=l>=(c=this.getLineMaxColumn(s))?c:0|l;}return o===t&&r===n&&u===s&&l===a&&e instanceof Jt&&!(e instanceof tn)?e:new Jt(t,n,s,a);},t.prototype._isValidPosition=function(e,t,n){if(isNaN(e))return!1;if(e<1)return!1;if(e>this._buffer.getLineCount())return!1;if(isNaN(t))return!1;if(t<1)return!1;if(t>this.getLineMaxColumn(e))return!1;if(n&&t>1&&bo(this._buffer.getLineCharCode(e,t-2)))return!1;return!0;},t.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new Qt(1,1);if(i>r)return new Qt(r,this.getLineMaxColumn(r));if(o<=1)return new Qt(i,1);var s=this.getLineMaxColumn(i);if(o>=s)return new Qt(i,s);if(n&&bo(this._buffer.getLineCharCode(i,o-2)))return new Qt(i,o-1);return new Qt(i,o);},t.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof Qt&&this._isValidPosition(e.lineNumber,e.column,!0)?e:this._validatePosition(e.lineNumber,e.column,!0);},t.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,!1))return!1;if(!this._isValidPosition(o,r,!1))return!1;if(t){var s=i>1?this._buffer.getLineCharCode(n,i-2):0,a=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,u=bo(s),l=bo(a);return!u&&!l;}return!0;},t.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof Jt&&!(e instanceof tn)&&this._isValidRange(e,!0))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),n=this._validatePosition(e.endLineNumber,e.endColumn,!1),i=t.lineNumber,o=t.column,r=n.lineNumber,s=n.column,a=o>1?this._buffer.getLineCharCode(i,o-2):0,u=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,l=bo(a),c=bo(u);return l||c?i===r&&o===s?new Jt(i,o-1,r,s-1):l&&c?new Jt(i,o-1,r,s+1):l?new Jt(i,o-1,r,s):new Jt(i,o,r,s+1):new Jt(i,o,r,s);},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)));},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new Jt(1,1,e,this.getLineMaxColumn(e));},t.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i);},t.prototype.findMatches=function(e,t,n,i,o,r,s){var a;if(void 0===s&&(s=999),this._assertNotDisposed(),a=Jt.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var u=new ym(e,n,i,o).parseSearchRequest();return u?this.findMatchesLineByLine(a,u,r,s):[];}return Sm.findMatches(this,new ym(e,n,i,o),a,r,s);},t.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new ym(e,n,i,o).parseSearchRequest();if(!a)return null;var u=this.getLineCount(),l=new Jt(s.lineNumber,s.column,u,this.getLineMaxColumn(u)),c=this.findMatchesLineByLine(l,a,r,1);return Sm.findNextMatch(this,new ym(e,n,i,o),s,r),c.length>0?c[0]:(l=new Jt(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(c=this.findMatchesLineByLine(l,a,r,1)).length>0?c[0]:null);}return Sm.findNextMatch(this,new ym(e,n,i,o),s,r);},t.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return Sm.findPreviousMatch(this,new ym(e,n,i,o),s,r);},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement();},t.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e);}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit();}},t.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n);}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit();}},t.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var o=t.map(function(e){return{range:i.validateRange(e.range),text:e.text};}),r=!0,s=0,a=e.length;su.endLineNumber,p=u.startLineNumber>_.endLineNumber;if(!h&&!p){l=!0;break;}}if(!l){r=!1;break;}}if(r)for(s=0,a=this._trimAutoWhitespaceLines.length;s_.endLineNumber)&&!(f===_.startLineNumber&&_.startColumn===g&&_.isEmpty()&&v&&v.length>0&&"\n"===v.charAt(0)||f===_.startLineNumber&&1===_.startColumn&&_.isEmpty()&&v&&v.length>0&&"\n"===v.charAt(v.length-1))){m=!1;break;}}m&&t.push({range:new Jt(f,1,f,g),text:null});}this._trimAutoWhitespaceLines=null;}return this._commandManager.pushEditOperation(e,t,n);},t.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e);}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit();}},t._eolCount=function(e){for(var t=0,n=0,i=0,o=e.length;i=0;b--){var C=f+b,w=s-l-y+C;u.push(new Fm(C,this.getLineContent(w)));}if(vthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n);},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new Jt(r,1,s,a),n,i);},t.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n);},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i);},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(i);},t.prototype._getDecorationsInRange=function(e,t,n){var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,o,t,n,r);return this._ensureNodesHaveRanges(s);},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;t0)for(;o>0&&s>=1;){var u=this.getLineFirstNonWhitespaceColumn(s);if(0!==u){if(u=0;c--){l=(p=this._tokens._tokenizeText(this._buffer,r[c],l))?p.endState.clone():a.clone();}var d=Math.floor(.4*this._tokens.inValidLineStartIndex);t=Math.min(this.getLineCount(),t+d);for(var h=e;h<=t;h++){var p,f=this.getLineContent(h);(p=this._tokens._tokenizeText(this._buffer,f,l))?(this._tokens._setTokens(this._tokens.languageIdentifier.id,h-1,f.length,p.tokens),this._tokens._setIsInvalid(h-1,!1),this._tokens._setState(h-1,l),l=p.endState.clone(),i.registerChangedTokens(h)):l=a.clone();}var g=i.build();g&&this._onDidChangeTokens.fire(g);}}},t.prototype.forceTokenization=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");var t=new Gm();this._tokens._updateTokensUntilLine(this._buffer,t,e);var n=t.build();n&&this._onDidChangeTokens.fire(n);},t.prototype.isCheapToTokenize=function(e){return!!this._tokens.isCheapToTokenize(e)&&(ethis.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e);},t.prototype._getLineTokens=function(e){var t=this._buffer.getLineContent(e);return this._tokens.getTokens(this._languageIdentifier.id,e-1,t);},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier;},t.prototype.getModeId=function(){return this._languageIdentifier.language;},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._resetTokenizationState(),this.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]}),this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({});}},t.prototype.getLanguageIdAtPosition=function(e,t){if(!this._tokens.tokenizationSupport)return this._languageIdentifier.id;var n=this.validatePosition({lineNumber:e,column:t}),i=n.lineNumber,o=n.column,r=this._getLineTokens(i);return r.getLanguageId(r.findTokenIndexAtOffset(o-1));},t.prototype._beginBackgroundTokenization=function(){var e=this;this._shouldAutoTokenize()&&-1===this._revalidateTokensTimeout&&(this._revalidateTokensTimeout=setTimeout(function(){e._revalidateTokensTimeout=-1,e._revalidateTokensNow();},0));},t.prototype._warmUpTokens=function(){var e=Math.min(100,this.getLineCount());this._revalidateTokensNow(e),this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization();},t.prototype._revalidateTokensNow=function(e){void 0===e&&(e=this._buffer.getLineCount());for(var t=new Gm(),n=Ig.create(!1);this._tokens.hasLinesToTokenize(this._buffer)&&!(n.elapsed()>20);){if(this._tokens._tokenizeOneLine(this._buffer,t)>=e)break;}this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization();var i=t.build();i&&this._onDidChangeTokens.fire(i);},t.prototype.emitModelTokensChangedEvent=function(e){this._isDisposing||this._onDidChangeTokens.fire(e);},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var n=this.validatePosition(e),i=this.getLineContent(n.lineNumber),o=this._getLineTokens(n.lineNumber),r=o.findTokenIndexAtOffset(n.column-1),s=t._findLanguageBoundaries(o,r),a=s[0],u=s[1],l=Me(n.column,la.getWordDefinition(o.getLanguageId(r)),i.substring(a,u),a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(r>0&&a===n.column-1){var c=t._findLanguageBoundaries(o,r-1),d=c[0],h=c[1],p=Me(n.column,la.getWordDefinition(o.getLanguageId(r-1)),i.substring(d,h),d);if(p&&p.startColumn<=e.column&&e.column<=p.endColumn)return p;}return null;},t._findLanguageBoundaries=function(e,t){for(var n=e.getLanguageId(t),i=0,o=t;o>=0&&e.getLanguageId(o)===n;o--)i=e.getStartOffset(o);for(var r=e.getLineContent().length,s=(o=t,e.getCount());o0&&n.getStartOffset(o)===e.column-1){a=n.getStartOffset(o);o--;var l=la.getBracketsSupport(n.getLanguageId(o));if(l&&!qs(n.getStandardTokenType(o))){var c,d,h;s=Math.max(n.getStartOffset(o),e.column-1-l.maxBracketLength);if((c=oa.findPrevBracketInToken(l.reversedRegex,t,i,s,a))&&c.startColumn<=e.column&&e.column<=c.endColumn)if(d=(d=i.substring(c.startColumn-1,c.endColumn-1)).toLowerCase(),h=this._matchFoundBracket(c,l.textIsBracket[d],l.textIsOpenBracket[d]))return h;}}return null;},t.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;var i;if(n){if(i=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,i];}else if(i=this._findMatchingBracketUp(t,e.getStartPosition()))return[e,i];return null;},t.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,o=-1,r=t.lineNumber;r>=1;r--){var s=this._getLineTokens(r),a=s.getCount(),u=this._buffer.getLineContent(r),l=a-1,c=-1;for(r===t.lineNumber&&(l=s.findTokenIndexAtOffset(t.column-1),c=t.column-1);l>=0;l--){var d=s.getLanguageId(l),h=s.getStandardTokenType(l),p=s.getStartOffset(l),f=s.getEndOffset(l);if(-1===c&&(c=f),d===n&&!qs(h))for(;;){var g=oa.findPrevBracketInToken(i,r,u,p,c);if(!g)break;var m=u.substring(g.startColumn-1,g.endColumn-1);if((m=m.toLowerCase())===e.open?o++:m===e.close&&o--,0===o)return g;c=g.startColumn-1;}c=-1;}}return null;},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=t.lineNumber,s=this.getLineCount();r<=s;r++){var a=this._getLineTokens(r),u=a.getCount(),l=this._buffer.getLineContent(r),c=0,d=0;for(r===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),d=t.column-1);co)throw new Error("Illegal value for lineNumber");for(var r=la.getFoldingRules(this._languageIdentifier.id),s=Boolean(r&&r.offSide),a=-2,u=-1,l=-2,c=-1,d=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,u=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){a=t,u=n;break;}}}if(-2===l){l=-1,c=-1;for(t=e;t=0){l=t,c=r;break;}}}},h=-2,p=-1,f=-2,g=-1,m=function(e){if(-2===h){h=-1,p=-1;for(var t=e-2;t>=0;t--){var n=i._computeIndentLevel(t);if(n>=0){h=t,p=n;break;}}}if(-1!==f&&(-2===f||f=0){f=t,g=r;break;}}}},_=0,v=!0,y=0,b=!0,C=0,w=0;v||b;w++){var S=e-w,x=e+w;if(0!==w&&(S<1||So||x>n)&&(b=!1),w>5e4&&(v=!1,b=!1),v){var E=void 0;if((L=this._computeIndentLevel(S-1))>=0?(l=S-1,c=L,E=Math.ceil(L/this._options.tabSize)):(d(S),E=this._getIndentLevelForWhitespaceLine(s,u,c)),0===w){if(_=S,y=x,0===(C=E))return{startLineNumber:_,endLineNumber:y,indent:C};continue;}E>=C?_=S:v=!1;}if(b){var L,T=void 0;(L=this._computeIndentLevel(x-1))>=0?(h=x-1,p=L,T=Math.ceil(L/this._options.tabSize)):(m(x),T=this._getIndentLevelForWhitespaceLine(s,p,g)),T>=C?y=x:b=!1;}}return{startLineNumber:_,endLineNumber:y,indent:C};},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=la.getFoldingRules(this._languageIdentifier.id),o=Boolean(i&&i.offSide),r=new Array(t-e+1),s=-2,a=-1,u=-2,l=-1,c=e;c<=t;c++){var d=c-e,h=this._computeIndentLevel(c-1);if(h>=0)s=c-1,a=h,r[d]=Math.ceil(h/this._options.tabSize);else{if(-2===s){s=-1,a=-1;for(var p=c-2;p>=0;p--){if((f=this._computeIndentLevel(p))>=0){s=p,a=f;break;}}}if(-1!==u&&(-2===u||u=0){u=p,l=f;break;}}}r[d]=this._getIndentLevelForWhitespaceLine(o,a,l);}}return r;},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){return-1===t||-1===n?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e));},t;}(y),u_=function(e){return!0;},l_=function(e){return!1;},c_=function(e){return" "===e||"\t"===e;},d_=function(){function e(t,n,i,o){this._languageIdentifier=t;var r=o.editor;this.readOnly=r.readOnly,this.tabSize=i.tabSize,this.insertSpaces=i.insertSpaces,this.oneIndent=n,this.pageSize=Math.max(1,Math.floor(r.layoutInfo.height/r.fontInfo.lineHeight)-2),this.lineHeight=r.lineHeight,this.useTabStops=r.useTabStops,this.wordSeparators=r.wordSeparators,this.emptySelectionClipboard=r.emptySelectionClipboard,this.copyWithSyntaxHighlighting=r.copyWithSyntaxHighlighting,this.multiCursorMergeOverlapping=r.multiCursorMergeOverlapping,this.autoClosingBrackets=r.autoClosingBrackets,this.autoClosingQuotes=r.autoClosingQuotes,this.autoSurround=r.autoSurround,this.autoIndent=r.autoIndent,this.autoClosingPairsOpen={},this.autoClosingPairsClose={},this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:e._getShouldAutoClose(t,this.autoClosingQuotes),bracket:e._getShouldAutoClose(t,this.autoClosingBrackets)};var s=e._getAutoClosingPairs(t);if(s)for(var a=0;a=i.length)&&Co(i.charCodeAt(n));},e.isHighSurrogate=function(e,t,n){var i=e.getLineContent(t);return!(n<0||n>=i.length)&&bo(i.charCodeAt(n));},e.isInsideSurrogatePair=function(e,t,n){return this.isHighSurrogate(e,t,n-2);},e.visibleColumnFromColumn=function(e,t,n){var i=e.length;i>t-1&&(i=t-1);for(var o=0,r=0;r=t)return a-ts?s:o;},e.nextTabStop=function(e,t){return e+t-e%t;},e.prevTabStop=function(e,t){return e-1-(e-1)%t;},e;}();function y_(e){return"'"===e||'"'===e||"`"===e;}var b_=function(){function e(){}return e._columnSelect=function(e,t,n,i,o,r){for(var s=Math.abs(o-n)+1,a=n>o,u=i>r,l=ir)continue;if(mi)continue;if(g1&&o--,this.columnSelect(e,t,n.selection,i,o);},e.columnSelectRight=function(e,t,n,i,o){for(var r=0,s=Math.min(n.position.lineNumber,i),a=Math.max(n.position.lineNumber,i),u=s;u<=a;u++){var l=t.getLineMaxColumn(u),c=v_.visibleColumnFromColumn2(e,t,new Qt(u,l));r=Math.max(r,c);}return ot.getLineCount()&&(o=t.getLineCount()),this.columnSelect(e,t,n.selection,o,r);},e;}(),C_=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n;}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text);},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new tn(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn);},e;}(),w_=function(){function e(e,t,n){void 0===n&&(n=!1),this._range=e,this._text=t,this.insertsAutoWhitespace=n;}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text);},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new tn(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn);},e;}(),S_=function(){function e(e,t,n,i,o){void 0===o&&(o=!1),this._range=e,this._text=t,this._columnDeltaOffset=i,this._lineNumberDeltaOffset=n,this.insertsAutoWhitespace=o;}return e.prototype.getEditOperations=function(e,t){t.addTrackedEditOperation(this._range,this._text);},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new tn(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset);},e;}(),x_=function(){function e(e,t,n){this._range=e,this._text=t,this._initialSelection=n;}return e.prototype.getEditOperations=function(e,t){t.addEditOperation(this._range,this._text),this._selectionId=t.trackSelection(this._initialSelection);},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId);},e;}(),E_=function(){return function(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n;};}(),L_=function(){function e(){}return e.left=function(e,t,n,i){return i>t.getLineMinColumn(n)?v_.isLowSurrogate(t,n,i-2)?i-=2:i-=1:n>1&&(n-=1,i=t.getLineMaxColumn(n)),new E_(n,i,0);},e.moveLeft=function(t,n,i,o,r){var s,a;if(i.hasSelection()&&!o)s=i.selection.startLineNumber,a=i.selection.startColumn;else{var u=e.left(t,n,i.position.lineNumber,i.position.column-(r-1));s=u.lineNumber,a=u.column;}return i.move(o,s,a,0);},e.right=function(e,t,n,i){return iu?(n=u,s?i=t.getLineMaxColumn(n):(i=Math.min(t.getLineMaxColumn(n),i),v_.isInsideSurrogatePair(t,n,i)&&(i-=1))):(i=v_.columnFromVisibleColumn2(e,t,n,a),v_.isInsideSurrogatePair(t,n,i)&&(i-=1)),o=a-v_.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),new E_(n,i,o);},e.moveDown=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.endLineNumber,a=i.selection.endColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.down(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns);},e.translateDown=function(t,n,i){var o=i.selection,r=e.down(t,n,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=e.down(t,n,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new h_(new Jt(r.lineNumber,r.column,r.lineNumber,r.column),r.leftoverVisibleColumns,new Qt(s.lineNumber,s.column),s.leftoverVisibleColumns);},e.up=function(e,t,n,i,o,r,s){var a=v_.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize)+o;return(n-=r)<1?(n=1,s?i=t.getLineMinColumn(n):(i=Math.min(t.getLineMaxColumn(n),i),v_.isInsideSurrogatePair(t,n,i)&&(i-=1))):(i=v_.columnFromVisibleColumn2(e,t,n,a),v_.isInsideSurrogatePair(t,n,i)&&(i-=1)),o=a-v_.visibleColumnFromColumn(t.getLineContent(n),i,e.tabSize),new E_(n,i,o);},e.moveUp=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.startLineNumber,a=i.selection.startColumn):(s=i.position.lineNumber,a=i.position.column);var u=e.up(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,u.lineNumber,u.column,u.leftoverVisibleColumns);},e.translateUp=function(t,n,i){var o=i.selection,r=e.up(t,n,o.selectionStartLineNumber,o.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=e.up(t,n,o.positionLineNumber,o.positionColumn,i.leftoverVisibleColumns,1,!1);return new h_(new Jt(r.lineNumber,r.column,r.lineNumber,r.column),r.leftoverVisibleColumns,new Qt(s.lineNumber,s.column),s.leftoverVisibleColumns);},e.moveToBeginningOfLine=function(e,t,n,i){var o,r=n.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s;return o=n.position.column===a?s:a,n.move(i,r,o,0);},e.moveToEndOfLine=function(e,t,n,i){var o=n.position.lineNumber,r=t.getLineMaxColumn(o);return n.move(i,o,r,0);},e.moveToBeginningOfBuffer=function(e,t,n,i){return n.move(i,1,1,0);},e.moveToEndOfBuffer=function(e,t,n,i){var o=t.getLineCount(),r=t.getLineMaxColumn(o);return n.move(i,o,r,0);},e;}(),T_=function(){function e(){}return e.deleteRight=function(e,t,n,i){for(var o=[],r=3!==e,s=0,a=i.length;s1){var d=n.getLineContent(c.lineNumber),h=lo(d),p=-1===h?d.length+1:h+1;if(c.column<=p){var f=v_.visibleColumnFromColumn2(t,n,c),g=v_.prevTabStop(f,t.tabSize),m=v_.columnFromVisibleColumn2(t,n,c.lineNumber,g);l=new Jt(c.lineNumber,m,c.lineNumber,c.column);}else l=new Jt(c.lineNumber,c.column-1,c.lineNumber,c.column);}else{var _=L_.left(t,n,c.lineNumber,c.column);l=new Jt(_.lineNumber,_.column,c.lineNumber,c.column);}}l.isEmpty()?o[s]=null:(l.startLineNumber!==l.endLineNumber&&(r=!0),o[s]=new C_(l,""));}return[r,o];},e.cut=function(e,t,n){for(var i=[],o=0,r=n.length;o1?(u=a.lineNumber-1,l=t.getLineMaxColumn(a.lineNumber-1),c=a.lineNumber,d=t.getLineMaxColumn(a.lineNumber)):(u=a.lineNumber,l=1,c=a.lineNumber,d=t.getLineMaxColumn(a.lineNumber));var h=new Jt(u,l,c,d);h.isEmpty()?i[o]=null:i[o]=new C_(h,"");}else i[o]=null;}else i[o]=new C_(s,"");}return new __(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0});},e;}(),I_=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),N_=function(){function e(){}return e._createWord=function(e,t,n,i,o){return{start:i,end:o,wordType:t,nextCharClass:n};},e._findPreviousWordOnLine=function(e,t,n){var i=t.getLineContent(n.lineNumber);return this._doFindPreviousWordOnLine(i,e,n);},e._doFindPreviousWordOnLine=function(e,t,n){for(var i=0,o=n.column-2;o>=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(0===s){if(2===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=1;}else if(2===s){if(1===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=2;}else if(1===s&&0!==i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));}return 0!==i?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null;},e._findEndOfWord=function(e,t,n,i){for(var o=e.length,r=i;r=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(1===s)return o+1;if(1===n&&2===s)return o+1;if(2===n&&0===s)return o+1;}return 0;},e.moveWordLeft=function(t,n,i,o){var r=i.lineNumber,s=i.column,a=!1;1===s&&r>1&&(a=!0,r-=1,s=n.getLineMaxColumn(r));var u=e._findPreviousWordOnLine(t,n,new Qt(r,s));if(0===o){if(u&&!a)if(n.getLineLastNonWhitespaceColumn(r)1?new Qt(n-1,e.getLineMaxColumn(n-1)):t;for(var o=e.getLineContent(n),r=t.column-1;r>1;r--){var s=o.charCodeAt(r-2),a=o.charCodeAt(r-1);if(95!==s&&95===a)return new Qt(n,r);if(po(s)&&fo(a))return new Qt(n,r);if(fo(s)&&fo(a))if(r+1=a.start+1&&(a=e._findNextWordOnLine(t,n,new Qt(r,a.end+1))),s=a?a.start+1:n.getLineMaxColumn(r)),new Qt(r,s);},e._moveWordPartRight=function(e,t){var n=t.lineNumber,i=e.getLineMaxColumn(n);if(t.column===i)return n1?u=1:(a--,u=n.getLineMaxColumn(a)):(c&&u<=c.end+1&&(c=e._findPreviousWordOnLine(t,n,new Qt(a,c.start+1))),c?u=c.end+1:u>1?u=1:(a--,u=n.getLineMaxColumn(a))),new Jt(a,u,s.lineNumber,s.column);},e._deleteWordPartLeft=function(t,n){if(!n.isEmpty())return n;var i=n.getPosition(),o=e._moveWordPartLeft(t,i);return new Jt(i.lineNumber,i.column,o.lineNumber,o.column);},e._findFirstNonWhitespaceChar=function(e,t){for(var n=e.length,i=t;i=h.start+1&&(h=e._findNextWordOnLine(t,n,new Qt(a,h.end+1))),h?u=h.start+1:ua&&(u=a,l=e.model.getLineMaxColumn(u)),m_.fromModelState(new h_(new Jt(r.lineNumber,1,u,l),0,new Qt(u,l),0));}var c=t.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumberc){a=e.viewModel.getLineCount();var d=s.lineNumber+1,h=1;return d>a&&(d=a,h=e.viewModel.getLineMaxColumn(d)),m_.fromViewState(t.viewState.move(t.modelState.hasSelection(),d,h,0));}var p=t.modelState.selectionStart.getEndPosition();return m_.fromModelState(t.modelState.move(t.modelState.hasSelection(),p.lineNumber,p.column,0));},e.word=function(e,t,n,i){var o=e.model.validatePosition(i);return m_.fromModelState(N_.word(e.config,e.model,t.modelState,n,o));},e.cancelSelection=function(e,t){if(!t.modelState.hasSelection())return new m_(t.modelState,t.viewState);var n=t.viewState.position.lineNumber,i=t.viewState.position.column;return m_.fromViewState(new h_(new Jt(n,i,n,i),0,new Qt(n,i),0));},e.moveTo=function(e,t,n,i,o){var r=e.model.validatePosition(i),s=o?e.validateViewPosition(new Qt(o.lineNumber,o.column),r):e.convertModelPositionToViewPosition(r);return m_.fromViewState(t.viewState.move(n,s.lineNumber,s.column,0));},e.move=function(e,t,n){var i=n.select,o=n.value;switch(n.direction){case 0:return 4===n.unit?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,o);case 1:return 4===n.unit?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,o);case 2:return 2===n.unit?this._moveUpByViewLines(e,t,i,o):this._moveUpByModelLines(e,t,i,o);case 3:return 2===n.unit?this._moveDownByViewLines(e,t,i,o):this._moveDownByModelLines(e,t,i,o);case 4:return this._moveToViewMinColumn(e,t,i);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 6:return this._moveToViewCenterColumn(e,t,i);case 7:return this._moveToViewMaxColumn(e,t,i);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,i);case 9:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._firstLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 11:r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._lastLineNumberInRange(e.model,s,o),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 10:r=t[0],s=e.getCompletelyVisibleModelRange(),a=Math.round((s.startLineNumber+s.endLineNumber)/2),u=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,u)];case 12:for(var l=e.getCompletelyVisibleViewRange(),c=[],d=0,h=t.length;dn.endLineNumber-1&&(o=n.endLineNumber-1),o1)if(v_.visibleColumnFromColumn(_,h+1,r)%r!=0&&t.isCheapToTokenize(d-1)){var p=la.getRawEnterActionAtPosition(t,d-1,t.getLineMaxColumn(d-1));if(p){if(c=l,p.appendText)for(var f=0,g=p.appendText.length;f1){var a=i-1;for(a=i-1;a>=1;a--){if(ho(n.getLineContent(a))>=0)break;}if(a<1)return null;var u=n.getLineMaxColumn(a),l=la.getEnterAction(n,new Jt(a,u,a,u));l&&(r=l.indentation,(o=l.enterAction)&&(r+=o.appendText));}return o&&(o===Vs.Indent&&(r=e.shiftIndent(t,r)),o===Vs.Outdent&&(r=e.unshiftIndent(t,r)),r=t.normalizeIndentation(r)),r||null;},e._replaceJumpToNextIndent=function(e,t,n,i){var o="",r=n.getStartPosition();if(e.insertSpaces)for(var s=v_.visibleColumnFromColumn2(e,t,r),a=e.tabSize,u=a-s%a,l=0;l=0?o.setEndPosition(o.endLineNumber,Math.max(o.endColumn,b+1)):o.setEndPosition(o.endLineNumber,n.getLineMaxColumn(o.endLineNumber)),i)return new w_(o,y+t.normalizeIndentation(f.afterEnter),!0);var C=0;return v<=b+1&&(t.insertSpaces||(_=Math.ceil(_/t.tabSize)),C=Math.min(_+1-t.normalizeIndentation(f.afterEnter).length-1,0)),new S_(o,y+t.normalizeIndentation(f.afterEnter),0,C,!0);}return e._typeCommand(o,"\n"+t.normalizeIndentation(m),i);},e._isAutoIndentType=function(e,t,n){if(!e.autoIndent)return!1;for(var i=0,o=n.length;i1){var p=tg(t.wordSeparators),f=h.charCodeAt(d.column-2);if(0===p.get(f))return!1;}var g=h.charAt(d.column-1);if(g)if(!e._isBeforeClosingBrace(t,o,g)&&!s(g))return!1;if(!n.isCheapToTokenize(d.lineNumber))return!1;n.forceTokenization(d.lineNumber);var m=n.getLineTokens(d.lineNumber),_=!1;try{_=la.shouldAutoClosePair(o,m,d.column);}catch(e){a(e);}if(!_)return!1;}return!0;},e._runAutoClosingOpenCharType=function(e,t,n,i,o){for(var r=[],s=0,a=i.length;s2){var h=tg(n.wordSeparators),p=l.charCodeAt(u.column-3);if(0===h.get(p))continue;}var f=l.charAt(u.column-1);if(f){var g=e._isBeforeClosingBrace(n,c,f),m=y_(c)?n.shouldAutoCloseBefore.quote:n.shouldAutoCloseBefore.bracket;if(g)continue;if(!m(f))continue;}if(!i.isCheapToTokenize(u.lineNumber))continue;i.forceTokenization(u.lineNumber);var _=i.getLineTokens(u.lineNumber),v=!1;try{v=la.shouldAutoClosePair(c,_,u.column-1);}catch(e){a(e);}if(v){var y=n.autoClosingPairsOpen[c];r[s]=new S_(o[s],y,0,-y.length);}}}return new __(1,r,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1});},e.typeWithInterceptors=function(t,n,i,o,r){if("\n"===r){for(var s=[],a=0,u=o.length;a1)for(var r=n.modelState?n.modelState.position:null,s=n.viewState?n.viewState.position:null,a=0,u=o.length;ao&&(i=o);var r=new Jt(i,1,i,e.context.model.getLineMaxColumn(i)),s=0;if(n.at)switch(n.at){case V_.RawAtArgument.Top:s=3;break;case V_.RawAtArgument.Center:s=1;break;case V_.RawAtArgument.Bottom:s=4;}var a=e.context.convertModelRangeToViewRange(r);e.revealRange(!1,a,s,0);},t;}($_))()),e.SelectAll=ed(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:null})||this;}return q_(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[R_.selectAll(e.context,e.getPrimaryCursor())]);},t;}($_))()),e.SetSelection=ed(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:null})||this;}return q_(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,3,[m_.fromModelSelection(t.selection)]);},t;}($_))());}(U_||(U_={})),z_=j_||(j_={}),K_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return q_(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors();i&&this.runCoreEditingCommand(t,i,n||{});},t;}(Xc),z_.CoreEditingCommand=K_,z_.LineBreakInsert=ed(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:A_.writable,kbOpts:{weight:G_,kbExpr:A_.textInputFocus,primary:0,mac:{primary:301}}})||this;}return q_(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,W_.lineBreakInsert(t.context.config,t.context.model,t.getAll().map(function(e){return e.modelState.selection;})));},t;}(K_))()),z_.Outdent=ed(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:A_.writable,kbOpts:{weight:G_,kbExpr:dl.and(A_.editorTextFocus,A_.tabDoesNotMoveFocus),primary:1026}})||this;}return q_(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,W_.outdent(t.context.config,t.context.model,t.getAll().map(function(e){return e.modelState.selection;}))),e.pushUndoStop();},t;}(K_))()),z_.Tab=ed(new(function(e){function t(){return e.call(this,{id:"tab",precondition:A_.writable,kbOpts:{weight:G_,kbExpr:dl.and(A_.editorTextFocus,A_.tabDoesNotMoveFocus),primary:2}})||this;}return q_(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){e.pushUndoStop(),e.executeCommands(this.id,W_.tab(t.context.config,t.context.model,t.getAll().map(function(e){return e.modelState.selection;}))),e.pushUndoStop();},t;}(K_))()),z_.DeleteLeft=ed(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:A_.writable,kbOpts:{weight:G_,kbExpr:A_.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this;}return q_(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){var i=T_.deleteLeft(t.getPrevEditOperationType(),t.context.config,t.context.model,t.getAll().map(function(e){return e.modelState.selection;})),o=i[0],r=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(2);},t;}(K_))()),z_.DeleteRight=ed(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:A_.writable,kbOpts:{weight:G_,kbExpr:A_.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this;}return q_(t,e),t.prototype.runCoreEditingCommand=function(e,t,n){var i=T_.deleteRight(t.getPrevEditOperationType(),t.context.config,t.context.model,t.getAll().map(function(e){return e.modelState.selection;})),o=i[0],r=i[1];o&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(3);},t;}(K_))());var X_=function(e){function t(t){var n=e.call(this,t)||this;return n._editorHandler=t.editorHandler,n._inputHandler=t.inputHandler,n;}return q_(t,e),t.prototype.runCommand=function(e,t){var n=e.get(pn).getFocusedCodeEditor();if(n&&n.hasTextFocus())return this._runEditorHandler(e,n,t);var i=document.activeElement;if(!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)){var o=e.get(pn).getActiveCodeEditor();return o?(o.focus(),this._runEditorHandler(e,o,t)):void 0;}document.execCommand(this._inputHandler);},t.prototype._runEditorHandler=function(e,t,n){var i=this._editorHandler;"string"==typeof i?t.trigger("keyboard",i,n):((n=n||{}).source="keyboard",i.runEditorCommand(e,t,n));},t;}(Yc),Z_=function(e){function t(t,n){var i=e.call(this,{id:t,precondition:null})||this;return i._handlerId=n,i;}return q_(t,e),t.prototype.runCommand=function(e,t){var n=e.get(pn).getFocusedCodeEditor();n&&n.trigger("keyboard",this._handlerId,t);},t;}(Yc);function Q_(e){Y_(new Z_("default:"+e,e)),Y_(new Z_(e,e));}Y_(new X_({editorHandler:U_.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:A_.textInputFocus,kbOpts:{weight:G_,kbExpr:null,primary:2079},menubarOpts:{menuId:Il.MenubarSelectionMenu,group:"1_basic",title:ie({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1}})),Y_(new X_({editorHandler:hr.Undo,inputHandler:"undo",id:hr.Undo,precondition:A_.writable,kbOpts:{weight:G_,kbExpr:A_.textInputFocus,primary:2104},menubarOpts:{menuId:Il.MenubarEditMenu,group:"1_do",title:ie({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1}})),Y_(new Z_("default:"+hr.Undo,hr.Undo)),Y_(new X_({editorHandler:hr.Redo,inputHandler:"redo",id:hr.Redo,precondition:A_.writable,kbOpts:{weight:G_,kbExpr:A_.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}},menubarOpts:{menuId:Il.MenubarEditMenu,group:"1_do",title:ie({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2}})),Y_(new Z_("default:"+hr.Redo,hr.Redo)),Q_(hr.Type),Q_(hr.ReplacePreviousChar),Q_(hr.CompositionStart),Q_(hr.CompositionEnd),Q_(hr.Paste),Q_(hr.Cut);var J_=function(){function e(e,t,n,i){this.configuration=e,this.viewModel=t,this.outgoingEvents=n,this.commandDelegate=i;}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this.commandDelegate.executeEditorCommand(e,t);},e.prototype.paste=function(e,t,n,i){this.commandDelegate.paste(e,t,n,i);},e.prototype.type=function(e,t){this.commandDelegate.type(e,t);},e.prototype.replacePreviousChar=function(e,t,n){this.commandDelegate.replacePreviousChar(e,t,n);},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e);},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e);},e.prototype.cut=function(e){this.commandDelegate.cut(e);},e.prototype.setSelection=function(e,t){this.commandDelegate.executeEditorCommand(U_.SetSelection,{source:e,selection:t});},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this.selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this.lastCursorLineSelectDrag(e.position):this.lastCursorLineSelect(e.position):e.inSelectionMode?this.lineSelectDrag(e.position):this.lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this.lastCursorWordSelect(e.position):e.inSelectionMode?this.wordSelectDrag(e.position):this.wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this.columnSelect(e.position,e.mouseColumn):e.inSelectionMode?this.lastCursorMoveToSelect(e.position):this.createCursor(e.position,!1)):e.inSelectionMode?this.moveToSelect(e.position):this.moveTo(e.position);},e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this.convertViewToModelPosition(e),viewPosition:e};},e.prototype.moveTo=function(e){this._execMouseCommand(U_.MoveTo,this._usualArgs(e));},e.prototype.moveToSelect=function(e){this._execMouseCommand(U_.MoveToSelect,this._usualArgs(e));},e.prototype.columnSelect=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(U_.ColumnSelect,{position:this.convertViewToModelPosition(e),viewPosition:e,mouseColumn:t});},e.prototype.createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(U_.CreateCursor,{position:this.convertViewToModelPosition(e),viewPosition:e,wholeLine:t});},e.prototype.lastCursorMoveToSelect=function(e){this._execMouseCommand(U_.LastCursorMoveToSelect,this._usualArgs(e));},e.prototype.wordSelect=function(e){this._execMouseCommand(U_.WordSelect,this._usualArgs(e));},e.prototype.wordSelectDrag=function(e){this._execMouseCommand(U_.WordSelectDrag,this._usualArgs(e));},e.prototype.lastCursorWordSelect=function(e){this._execMouseCommand(U_.LastCursorWordSelect,this._usualArgs(e));},e.prototype.lineSelect=function(e){this._execMouseCommand(U_.LineSelect,this._usualArgs(e));},e.prototype.lineSelectDrag=function(e){this._execMouseCommand(U_.LineSelectDrag,this._usualArgs(e));},e.prototype.lastCursorLineSelect=function(e){this._execMouseCommand(U_.LastCursorLineSelect,this._usualArgs(e));},e.prototype.lastCursorLineSelectDrag=function(e){this._execMouseCommand(U_.LastCursorLineSelectDrag,this._usualArgs(e));},e.prototype.selectAll=function(){this._execMouseCommand(U_.SelectAll,{});},e.prototype.convertViewToModelPosition=function(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e);},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e);},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e);},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e);},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e);},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e);},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e);},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e);},e.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e);},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e);},e;}(),ev=function(){function e(e){this._createLine=e,this._set(1,[]);}return e.prototype.flush=function(){this._set(1,[]);},e.prototype._set=function(e,t){this._lines=t,this._rendLineNumberStart=e;},e.prototype._get=function(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines};},e.prototype.getStartLineNumber=function(){return this._rendLineNumberStart;},e.prototype.getEndLineNumber=function(){return this._rendLineNumberStart+this._lines.length-1;},e.prototype.getCount=function(){return this._lines.length;},e.prototype.getLine=function(e){var t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t];},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;for(var r=0,s=0,a=n;a<=i;a++){var u=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=u,s=1):s++);}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o;},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);for(var r=[],s=0;sn))for(var a=Math.max(t,s.fromLineNumber),u=Math.min(n,s.toLineNumber),l=a;l<=u;l++){var c=l-this._rendLineNumberStart;this._lines[c].onTokensChanged(),i=!0;}}return i;},e;}(),tv=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new ev(function(){return t._host.createVisibleLine();});}return e.prototype._createDomNode=function(){var e=rd(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e;},e.prototype.onConfigurationChanged=function(e){return e.layoutInfo;},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0;},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber);},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;nt)(u=t)<=(s=Math.min(n,o.rendLineNumberStart-1))&&(this._insertLinesBefore(o,u,s,i,t),o.linesLength+=s-u+1);else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,a),o.linesLength-=a);}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){var s,a,u=Math.max(0,n-o.rendLineNumberStart+1);(a=(s=o.linesLength-1)-u+1)>0&&(this._removeLinesAfter(o,a),o.linesLength-=a);}return this._finishRendering(o,!1,i),o;},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var u=r+a;s[a].layoutLine(u,i[u-o]);}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines);},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling);}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t;for(var o=0;o'),i.appendASCIIString(o),i.appendASCIIString(""),!0);},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight));},e;}(),sv=function(e){function t(t){var n=e.call(this,t)||this;return n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n.domNode.setHeight(0),n;}return iv(t,e),t.prototype.onConfigurationChanged=function(t){return t.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),e.prototype.onConfigurationChanged.call(this,t);},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged;},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth));},t;}(ov),av=function(e){function t(t){var n=e.call(this,t)||this;return n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),qc.applyFontInfo(n.domNode,n._context.configuration.editor.fontInfo),n;}return iv(t,e),t.prototype.onConfigurationChanged=function(t){var n=!1;return t.fontInfo&&(qc.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),n=!0),t.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,n=!0),e.prototype.onConfigurationChanged.call(this,t)||n;},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged;},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft);},t;}(ov),uv=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),lv=function(){return function(e,t){this.top=e,this.left=t;};}(),cv=function(e){function t(t,n){var i=e.call(this,t)||this;return i._viewDomNode=n,i._widgets={},i.domNode=rd(document.createElement("div")),Ld.write(i.domNode,1),i.domNode.setClassName("contentWidgets"),i.domNode.setPosition("absolute"),i.domNode.setTop(0),i.overflowingContentWidgetsDomNode=rd(document.createElement("div")),Ld.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),i;}return uv(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={};},t.prototype.onConfigurationChanged=function(e){for(var t=Object.keys(this._widgets),n=0,i=t.length;n=i,c=a,d=o.viewportHeight-a>=i,h=e.left,p=t.left;return h+n>o.scrollLeft+o.viewportWidth&&(h=o.scrollLeft+o.viewportWidth-n),p+n>o.scrollLeft+o.viewportWidth&&(p=o.scrollLeft+o.viewportWidth-n),hthis._contentWidth)return null;var a,u=e.top-i,l=t.top+this._lineHeight,c=r+this._contentLeft,d=s+this._contentLeft,h=xi(this._viewDomNode.domNode),p=h.top+u-Ei.scrollY,f=h.top+l-Ei.scrollY,g=h.left+c-Ei.scrollX,m=h.left+d-Ei.scrollX,_=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,v=p>=22,y=f+i<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;g+n+20>_&&(g-=a=g-(_-n-20),c-=a);m+n+20>_&&(m-=a=m-(_-n-20),d-=a);g<0&&(g-=a=g,c-=a);m<0&&(m-=a=m,d-=a);return this._fixedOverflowWidgets&&(u=p,l=f,c=g,d=m),{fitsAbove:v,aboveTop:u,aboveLeft:c,fitsBelow:y,belowTop:l,belowLeft:d};},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new lv(e.top,e.left+this._contentLeft);},e.prototype._getTopAndBottomLeft=function(e){if(!this._viewPosition)return[null,null];var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return[null,null];var n=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop,i=new lv(n,t.left),o=this._viewPosition.lineNumber,r=t.left;if(this._viewRange){var s=e.linesVisibleRangesForRange(this._viewRange,!1);if(s&&s.length>0)for(var a=s.length-1;a>=0;a--){var u=s[a];if(u.lineNumber>=o){u.lineNumber>o&&(o=u.lineNumber,r=1073741824);for(var l=0,c=u.ranges.length;le.endLineNumber||this.domNode.setMaxWidth(this._maxWidth));},e.prototype.prepareRender=function(e){this._renderData=this._prepareRenderWidget(e);},e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"));},e;}(),hv=(n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}()),pv=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._scrollWidth=0,n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._context.addEventHandler(n),n;}return hv(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this);},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),!0;},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t;},t.prototype.onFlushed=function(e){return!0;},t.prototype.onLinesDeleted=function(e){return!0;},t.prototype.onLinesInserted=function(e){return!0;},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged;},t.prototype.onZonesChanged=function(e){return!0;},t.prototype.prepareRender=function(e){this._scrollWidth=e.scrollWidth;},t.prototype.render=function(e,t){return t===this._primaryCursorLineNumber&&this._shouldShowCurrentLine()?'
':"";},t.prototype._shouldShowCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty;},t.prototype._willRenderMarginCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight;},t;}(Lh);Vd(function(e,t){var n=e.getColor(mf);if(n&&t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+n+"; }"),!n||n.isTransparent()||e.defines(_f)){var i=e.getColor(_f);i&&(t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"));}});n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.css");var fv=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),gv=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n._context.addEventHandler(n),n;}return fv(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this);},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!0;},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t;},t.prototype.onFlushed=function(e){return!0;},t.prototype.onLinesDeleted=function(e){return!0;},t.prototype.onLinesInserted=function(e){return!0;},t.prototype.onZonesChanged=function(e){return!0;},t.prototype.prepareRender=function(e){},t.prototype.render=function(e,t){if(t===this._primaryCursorLineNumber){var n="current-line";if(this._shouldShowCurrentLine())n="current-line current-line-margin"+(this._willRenderContentCurrentLine()?" current-line-margin-both":"");return'
';}return"";},t.prototype._shouldShowCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight;},t.prototype._willRenderContentCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty;},t;}(Lh);Vd(function(e,t){var n=e.getColor(mf);if(n)t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+n+"; border: none; }");else{var i=e.getColor(_f);i&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }");}});n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css");var mv=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),_v=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n;}return mv(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this);},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0;},t.prototype.onDecorationsChanged=function(e){return!0;},t.prototype.onFlushed=function(e){return!0;},t.prototype.onLinesChanged=function(e){return!0;},t.prototype.onLinesDeleted=function(e){return!0;},t.prototype.onLinesInserted=function(e){return!0;},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged;},t.prototype.onZonesChanged=function(e){return!0;},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;ot.options.zIndex)return 1;var n=e.options.className,i=t.options.className;return ni?1:Jt.compareRangesUsingStarts(e.range,t.range);});for(var a=e.visibleRange.startLineNumber,u=e.visibleRange.endLineNumber,l=[],c=a;c<=u;c++){l[c-a]="";}this._renderWholeLineDecorations(e,n,l),this._renderNormalDecorations(e,n,l),this._renderResult=l;},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s',c=Math.max(u.range.startLineNumber,o),d=Math.min(u.range.endLineNumber,r),h=c;h<=d;h++){n[h-o]+=l;}}},t.prototype._renderNormalDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=null,s=!1,a=null,u=0,l=t.length;u';s[d]+=m;}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n];},t;}(Lh),vv=(n("./node_modules/monaco-editor/esm/vs/base/browser/ui/scrollbar/media/scrollbars.css"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}()),yv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return vv(t,e),t.prototype.onclick=function(e,t){this._register(ni(e,Pi.CLICK,function(e){return t(new Vn(e));}));},t.prototype.onmousedown=function(e,t){this._register(ni(e,Pi.MOUSE_DOWN,function(e){return t(new Vn(e));}));},t.prototype.onmouseover=function(e,t){this._register(ni(e,Pi.MOUSE_OVER,function(e){return t(new Vn(e));}));},t.prototype.onnonbubblingmouseout=function(e,t){this._register(oi(e,function(e){return t(new Vn(e));}));},t.prototype.onkeydown=function(e,t){this._register(ni(e,Pi.KEY_DOWN,function(e){return t(new Rn(e));}));},t.prototype.onkeyup=function(e,t){this._register(ni(e,Pi.KEY_UP,function(e){return t(new Rn(e));}));},t.prototype.oninput=function(e,t){this._register(ni(e,Pi.INPUT,t));},t.prototype.onblur=function(e,t){this._register(ni(e,Pi.BLUR,t));},t.prototype.onfocus=function(e,t){this._register(ni(e,Pi.FOCUS,t));},t.prototype.onchange=function(e,t){this._register(ni(e,Pi.CHANGE,t));},t;}(y),bv=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Cv=11,wv=function(e){function t(t){var n=e.call(this)||this;return n._onActivate=t.onActivate,n.bgDomNode=document.createElement("div"),n.bgDomNode.className="arrow-background",n.bgDomNode.style.position="absolute",n.bgDomNode.style.width=t.bgWidth+"px",n.bgDomNode.style.height=t.bgHeight+"px",void 0!==t.top&&(n.bgDomNode.style.top="0px"),void 0!==t.left&&(n.bgDomNode.style.left="0px"),void 0!==t.bottom&&(n.bgDomNode.style.bottom="0px"),void 0!==t.right&&(n.bgDomNode.style.right="0px"),n.domNode=document.createElement("div"),n.domNode.className=t.className,n.domNode.style.position="absolute",n.domNode.style.width=Cv+"px",n.domNode.style.height=Cv+"px",void 0!==t.top&&(n.domNode.style.top=t.top+"px"),void 0!==t.left&&(n.domNode.style.left=t.left+"px"),void 0!==t.bottom&&(n.domNode.style.bottom=t.bottom+"px"),void 0!==t.right&&(n.domNode.style.right=t.right+"px"),n._mouseMoveMonitor=n._register(new pd()),n.onmousedown(n.bgDomNode,function(e){return n._arrowMouseDown(e);}),n.onmousedown(n.domNode,function(e){return n._arrowMouseDown(e);}),n._mousedownRepeatTimer=n._register(new J()),n._mousedownScheduleRepeatTimer=n._register(new Q()),n;}return bv(t,e),t.prototype._arrowMouseDown=function(e){var t=this;this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(function(){t._mousedownRepeatTimer.cancelAndSet(function(){return t._onActivate();},1e3/24);},200),this._mouseMoveMonitor.startMonitoring(hd,function(e){},function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel();}),e.preventDefault();},t;}(yv),Sv=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),xv=function(e){function t(t,n,i){var o=e.call(this)||this;return o._visibility=t,o._visibleClassName=n,o._invisibleClassName=i,o._domNode=null,o._isVisible=!1,o._isNeeded=!1,o._shouldBeVisible=!1,o._revealTimer=o._register(new Q()),o;}return Sv(t,e),t.prototype.applyVisibilitySetting=function(e){return 2!==this._visibility&&(3===this._visibility||e);},t.prototype.setShouldBeVisible=function(e){var t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility());},t.prototype.setIsNeeded=function(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility());},t.prototype.setDomNode=function(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1);},t.prototype.ensureVisibility=function(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1);},t.prototype._reveal=function(){var e=this;this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(function(){e._domNode&&e._domNode.setClassName(e._visibleClassName);},0));},t.prototype._hide=function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")));},t;}(y),Ev=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Lv=function(e){function t(t){var n=e.call(this)||this;return n._lazyRender=t.lazyRender,n._host=t.host,n._scrollable=t.scrollable,n._scrollbarState=t.scrollbarState,n._visibilityController=n._register(new xv(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),n._mouseMoveMonitor=n._register(new pd()),n._shouldRender=!0,n.domNode=rd(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n._visibilityController.setDomNode(n.domNode),n.domNode.setPosition("absolute"),n.onmousedown(n.domNode.domNode,function(e){return n._domNodeMouseDown(e);}),n;}return Ev(t,e),t.prototype._createArrow=function(e){var t=this._register(new wv(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode);},t.prototype._createSlider=function(e,t,n,i){var o=this;this.slider=rd(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof n&&this.slider.setWidth(n),"number"==typeof i&&this.slider.setHeight(i),this.slider.setLayerHinting(!0),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,function(e){e.leftButton&&(e.preventDefault(),o._sliderMouseDown(e,function(){}));});},t.prototype._onElementSize=function(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender;},t.prototype._onElementScrollSize=function(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender;},t.prototype._onElementScrollPosition=function(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender;},t.prototype.beginReveal=function(){this._visibilityController.setShouldBeVisible(!0);},t.prototype.beginHide=function(){this._visibilityController.setShouldBeVisible(!1);},t.prototype.render=function(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()));},t.prototype._domNodeMouseDown=function(e){e.target===this.domNode.domNode&&this._onMouseDown(e);},t.prototype.delegateMouseDown=function(e){var t=this.domNode.domNode.getClientRects()[0].top,n=t+this._scrollbarState.getSliderPosition(),i=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);n<=o&&o<=i?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,function(){})):this._onMouseDown(e);},t.prototype._onMouseDown=function(e){var t,n;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,n=e.browserEvent.offsetY;else{var i=xi(this.domNode.domNode);t=e.posx-i.left,n=e.posy-i.top;}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,n))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,function(){}));},t.prototype._sliderMouseDown=function(e,t){var n=this,i=this._sliderMousePosition(e),r=this._sliderOrthogonalMousePosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(hd,function(e){var t=n._sliderOrthogonalMousePosition(e),a=Math.abs(t-r);if(o.g&&a>140)n._setDesiredScrollPositionNow(s.getScrollPosition());else{var u=n._sliderMousePosition(e)-i;n._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(u));}},function(){n.slider.toggleClassName("active",!1),n._host.onDragEnd(),t();}),this._host.onDragStart();},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t);},t;}(yv),Tv=function(){function e(e,t,n){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=0,this._scrollSize=0,this._scrollPosition=0,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues();}return e.prototype.clone=function(){var t=new e(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize);return t.setVisibleSize(this._visibleSize),t.setScrollSize(this._scrollSize),t.setScrollPosition(this._scrollPosition),t;},e.prototype.setVisibleSize=function(e){var t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0);},e.prototype.setScrollSize=function(e){var t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0);},e.prototype.setScrollPosition=function(e){var t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0);},e._computeValues=function(e,t,n,i,o){var r=Math.max(0,n-e),s=Math.max(0,r-2*t),a=i>0&&i>n;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var u=Math.round(Math.max(20,Math.floor(n*s/i))),l=(s-u)/(i-n),c=o*l;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(u),computedSliderRatio:l,computedSliderPosition:Math.round(c)};},e.prototype._refreshComputedValues=function(){var t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition;},e.prototype.getArrowSize=function(){return this._arrowSize;},e.prototype.getScrollPosition=function(){return this._scrollPosition;},e.prototype.getRectangleLargeSize=function(){return this._computedAvailableSize;},e.prototype.getRectangleSmallSize=function(){return this._scrollbarSize;},e.prototype.isNeeded=function(){return this._computedIsNeeded;},e.prototype.getSliderSize=function(){return this._computedSliderSize;},e.prototype.getSliderPosition=function(){return this._computedSliderPosition;},e.prototype.getDesiredScrollPositionFromOffset=function(e){if(!this._computedIsNeeded)return 0;var t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio);},e.prototype.getDesiredScrollPositionFromDelta=function(e){if(!this._computedIsNeeded)return 0;var t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio);},e;}(),Iv=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Nv=function(e){function t(t,n,i){var o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new Tv(n.horizontalHasArrows?n.arrowSize:0,2===n.horizontal?0:n.horizontalScrollbarSize,2===n.vertical?0:n.verticalScrollbarSize),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(n.horizontalHasArrows){var r=(n.arrowSize-Cv)/2,s=(n.horizontalScrollbarSize-Cv)/2;o._createArrow({className:"left-arrow",top:s,left:r,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new Un(null,1,0));}}),o._createArrow({className:"right-arrow",top:s,left:void 0,bottom:void 0,right:r,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return o._host.onMouseWheel(new Un(null,-1,0));}});}return o._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,void 0,n.horizontalSliderSize),o;}return Iv(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this.slider.setLeft(t);},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0);},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender;},t.prototype._mouseDownRelativePosition=function(e,t){return e;},t.prototype._sliderMousePosition=function(e){return e.posx;},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy;},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t;},t;}(Lv),kv=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Ov=function(e){function t(t,n,i){var o=e.call(this,{lazyRender:n.lazyRender,host:i,scrollbarState:new Tv(n.verticalHasArrows?n.arrowSize:0,2===n.vertical?0:n.verticalScrollbarSize,0),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(n.verticalHasArrows){var r=(n.arrowSize-Cv)/2,s=(n.verticalScrollbarSize-Cv)/2;o._createArrow({className:"up-arrow",top:r,left:s,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new Un(null,0,1));}}),o._createArrow({className:"down-arrow",top:void 0,left:s,bottom:r,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return o._host.onMouseWheel(new Un(null,0,-1));}});}return o._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,void 0),o;}return kv(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this.slider.setTop(t);},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0);},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender;},t.prototype._mouseDownRelativePosition=function(e,t){return t;},t.prototype._sliderMousePosition=function(e){return e.posy;},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx;},t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t;},t;}(Lv),Dv=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Rv=function(){function e(e,t,n,i,o,r){(e|=0)<0&&(e=0),(n|=0)+e>(t|=0)&&(n=t-e),n<0&&(n=0),(i|=0)<0&&(i=0),(r|=0)+i>(o|=0)&&(r=o-i),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=o,this.scrollTop=r;}return e.prototype.equals=function(e){return this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop;},e.prototype.withScrollDimensions=function(t){return new e(void 0!==t.width?t.width:this.width,void 0!==t.scrollWidth?t.scrollWidth:this.scrollWidth,this.scrollLeft,void 0!==t.height?t.height:this.height,void 0!==t.scrollHeight?t.scrollHeight:this.scrollHeight,this.scrollTop);},e.prototype.withScrollPosition=function(t){return new e(this.width,this.scrollWidth,void 0!==t.scrollLeft?t.scrollLeft:this.scrollLeft,this.height,this.scrollHeight,void 0!==t.scrollTop?t.scrollTop:this.scrollTop);},e.prototype.createScrollEvent=function(e){var t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:n,scrollLeftChanged:i,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:s};},e;}(),Av=function(e){function t(t,n){var i=e.call(this)||this;return i._onScroll=i._register(new N()),i.onScroll=i._onScroll.event,i._smoothScrollDuration=t,i._scheduleAtNextAnimationFrame=n,i._state=new Rv(0,0,0,0,0,0),i._smoothScrolling=null,i;}return Dv(t,e),t.prototype.dispose=function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),e.prototype.dispose.call(this);},t.prototype.setSmoothScrollDuration=function(e){this._smoothScrollDuration=e;},t.prototype.validateScrollPosition=function(e){return this._state.withScrollPosition(e);},t.prototype.getScrollDimensions=function(){return this._state;},t.prototype.setScrollDimensions=function(e){var t=this._state.withScrollDimensions(e);this._setState(t),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state);},t.prototype.getFutureScrollPosition=function(){return this._smoothScrolling?this._smoothScrolling.to:this._state;},t.prototype.getCurrentScrollPosition=function(){return this._state;},t.prototype.setScrollPositionNow=function(e){var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t);},t.prototype.setScrollPositionSmooth=function(e){var t=this;if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};var n=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===n.scrollLeft&&this._smoothScrolling.to.scrollTop===n.scrollTop)return;var i=this._smoothScrolling.combine(this._state,n,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=i;}else{n=this._state.withScrollPosition(e);this._smoothScrolling=Fv.start(this._state,n,this._smoothScrollDuration);}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling());});},t.prototype._performSmoothScrolling=function(){var e=this;if(this._smoothScrolling){var t=this._smoothScrolling.tick(),n=this._state.withScrollPosition(t);if(this._setState(n),t.isDone)return this._smoothScrolling.dispose(),void(this._smoothScrolling=null);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(function(){e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling());});}},t.prototype._setState=function(e){var t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)));},t;}(y),Mv=function(){return function(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n;};}();function Pv(e,t){var n=t-e;return function(t){return e+n*(1-function(e){return Math.pow(e,3);}(1-t));};}var Fv=function(){function e(e,t,n,i){this.from=e,this.to=t,this.duration=i,this._startTime=n,this.animationFrameDisposable=null,this._initAnimations();}return e.prototype._initAnimations=function(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height);},e.prototype._initAnimation=function(e,t,n){var i,o,r;if(Math.abs(e-t)>2.5*n){var s=void 0,a=void 0;return e0&&Math.abs(e.deltaY)>0)return 1;var t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1);},e.INSTANCE=new e(),e;}(),Hv=function(e){function t(t,n,i){var o=e.call(this)||this;o._onScroll=o._register(new N()),o.onScroll=o._onScroll.event,t.style.overflow="hidden",o._options=Kv(n),o._scrollable=i,o._register(o._scrollable.onScroll(function(e){o._onDidScroll(e),o._onScroll.fire(e);}));var r={onMouseWheel:function(e){return o._onMouseWheel(e);},onDragStart:function(){return o._onDragStart();},onDragEnd:function(){return o._onDragEnd();}};return o._verticalScrollbar=o._register(new Ov(o._scrollable,o._options,r)),o._horizontalScrollbar=o._register(new Nv(o._scrollable,o._options,r)),o._domNode=document.createElement("div"),o._domNode.className="monaco-scrollable-element "+o._options.className,o._domNode.setAttribute("role","presentation"),o._domNode.style.position="relative",o._domNode.style.overflow="hidden",o._domNode.appendChild(t),o._domNode.appendChild(o._horizontalScrollbar.domNode.domNode),o._domNode.appendChild(o._verticalScrollbar.domNode.domNode),o._options.useShadows&&(o._leftShadowDomNode=rd(document.createElement("div")),o._leftShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._leftShadowDomNode.domNode),o._topShadowDomNode=rd(document.createElement("div")),o._topShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._topShadowDomNode.domNode),o._topLeftShadowDomNode=rd(document.createElement("div")),o._topLeftShadowDomNode.setClassName("shadow top-left-corner"),o._domNode.appendChild(o._topLeftShadowDomNode.domNode)),o._listenOnDomNode=o._options.listenOnDomNode||o._domNode,o._mouseWheelToDispose=[],o._setListeningToMouseWheel(o._options.handleMouseWheel),o.onmouseover(o._listenOnDomNode,function(e){return o._onMouseOver(e);}),o.onnonbubblingmouseout(o._listenOnDomNode,function(e){return o._onMouseOut(e);}),o._hideTimeout=o._register(new Q()),o._isDragging=!1,o._mouseIsOver=!1,o._shouldRender=!0,o._revealOnScroll=!0,o;}return Wv(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=f(this._mouseWheelToDispose),e.prototype.dispose.call(this);},t.prototype.getDomNode=function(){return this._domNode;},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode};},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e);},t.prototype.getScrollDimensions=function(){return this._scrollable.getScrollDimensions();},t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e);},t.prototype.updateClassName=function(e){this._options.className=e,o.d&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className;},t.prototype.updateOptions=function(e){var t=Kv(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._options.lazyRender||this._render();},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=f(this._mouseWheelToDispose),e)){var n=function(e){var n=new Un(e);t._onMouseWheel(n);};this._mouseWheelToDispose.push(ni(this._listenOnDomNode,"mousewheel",n)),this._mouseWheelToDispose.push(ni(this._listenOnDomNode,"DOMMouseScroll",n));}},t.prototype._onMouseWheel=function(e){var t,n=Vv.INSTANCE;if(n.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var i=e.deltaY*this._options.mouseWheelScrollSensitivity,r=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(i=(t=[r,i])[0],r=t[1]);var s=!o.d&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||r||(r=i,i=0);var a=this._scrollable.getFutureScrollPosition(),u={};if(i){var l=a.scrollTop-50*i;this._verticalScrollbar.writeScrollPosition(u,l);}if(r){var c=a.scrollLeft-50*r;this._horizontalScrollbar.writeScrollPosition(u,c);}if(u=this._scrollable.validateScrollPosition(u),a.scrollLeft!==u.scrollLeft||a.scrollTop!==u.scrollTop)this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(u):this._scrollable.setScrollPositionNow(u),this._shouldRender=!0;}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation());},t.prototype._onDidScroll=function(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render();},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render();},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" left":""));}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal();},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide();},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide();},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal();},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide();},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide());},t.prototype._scheduleHide=function(){var e=this;this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(function(){return e._hide();},500);},t;}(yv),Uv=function(e){function t(t,n){var i=this;(n=n||{}).mouseWheelSmoothScroll=!1;var o=new Av(0,function(e){return si(e);});return(i=e.call(this,t,n,o)||this)._register(o),i;}return Wv(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e);},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition();},t;}(Hv),jv=function(e){function t(t,n,i){return e.call(this,t,n,i)||this;}return Wv(t,e),t;}(Hv),zv=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll(function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft);}),i.scanDomNode(),i;}return Wv(t,e),t.prototype.scanDomNode=function(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop});},t;}(Uv);function Kv(e){var t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,o.d&&(t.className+=" mac"),t;}var qv=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Gv=function(e){function t(t,n,i,o){var r=e.call(this,t)||this,s=r._context.configuration.editor.viewInfo.scrollbar,a={listenOnDomNode:i.domNode,className:"editor-scrollable "+Fd(t.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:s.mouseWheelScrollSensitivity};r.scrollbar=r._register(new jv(n.domNode,a,r._context.viewLayout.scrollable)),Ld.write(r.scrollbar.getDomNode(),5),r.scrollbarDomNode=rd(r.scrollbar.getDomNode()),r.scrollbarDomNode.setPosition("absolute"),r._setLayout();var u=function(e,t,n){var i={};if(t){var o=e.scrollTop;o&&(i.scrollTop=r._context.viewLayout.getCurrentScrollTop()+o,e.scrollTop=0);}if(n){var s=e.scrollLeft;s&&(i.scrollLeft=r._context.viewLayout.getCurrentScrollLeft()+s,e.scrollLeft=0);}r._context.viewLayout.setScrollPositionNow(i);};return r._register(ni(i.domNode,"scroll",function(e){return u(i.domNode,!0,!0);})),r._register(ni(n.domNode,"scroll",function(e){return u(n.domNode,!0,!1);})),r._register(ni(o.domNode,"scroll",function(e){return u(o.domNode,!0,!1);})),r._register(ni(r.scrollbarDomNode.domNode,"scroll",function(e){return u(r.scrollbarDomNode.domNode,!0,!1);})),r;}return qv(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.scrollbarDomNode.setLeft(e.contentLeft),"right"===this._context.configuration.editor.viewInfo.minimap.side?this.scrollbarDomNode.setWidth(e.contentWidth+e.minimapWidth):this.scrollbarDomNode.setWidth(e.contentWidth),this.scrollbarDomNode.setHeight(e.contentHeight);},t.prototype.getOverviewRulerLayoutInfo=function(){return this.scrollbar.getOverviewRulerLayoutInfo();},t.prototype.getDomNode=function(){return this.scrollbarDomNode;},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e);},t.prototype.onConfigurationChanged=function(e){if(e.viewInfo){var t=this._context.configuration.editor,n={handleMouseWheel:t.viewInfo.scrollbar.handleMouseWheel,mouseWheelScrollSensitivity:t.viewInfo.scrollbar.mouseWheelScrollSensitivity};this.scrollbar.updateOptions(n);}return e.layoutInfo&&this._setLayout(),!0;},t.prototype.onScrollChanged=function(e){return!0;},t.prototype.onThemeChanged=function(e){return this.scrollbar.updateClassName("editor-scrollable "+Fd(this._context.theme.type)),!0;},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this.scrollbar.renderNow();},t;}(Ed),$v=(n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}()),Yv=function(){return function(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n);};}(),Xv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this;}return $v(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++){i[o-e]=[];}if(0===n.length)return i;n.sort(function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[],a=t;a<=n;a++){var u=a-t,l=i[u];0===l.length?s[u]="":s[u]='
=this._renderResult.length?"":this._renderResult[n];},t;}(Xv),Qv=(n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}()),Jv=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._primaryLineNumber=0,n._lineHeight=n._context.configuration.editor.lineHeight,n._spaceWidth=n._context.configuration.editor.fontInfo.spaceWidth,n._enabled=n._context.configuration.editor.viewInfo.renderIndentGuides,n._activeIndentEnabled=n._context.configuration.editor.viewInfo.highlightActiveIndentGuide,n._renderResult=null,n._context.addEventHandler(n),n;}return Qv(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this);},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth),e.viewInfo&&(this._enabled=this._context.configuration.editor.viewInfo.renderIndentGuides,this._activeIndentEnabled=this._context.configuration.editor.viewInfo.highlightActiveIndentGuide),!0;},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0);},t.prototype.onDecorationsChanged=function(e){return!0;},t.prototype.onFlushed=function(e){return!0;},t.prototype.onLinesChanged=function(e){return!0;},t.prototype.onLinesDeleted=function(e){return!0;},t.prototype.onLinesInserted=function(e){return!0;},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged;},t.prototype.onZonesChanged=function(e){return!0;},t.prototype.onLanguageConfigurationChanged=function(e){return!0;},t.prototype.prepareRender=function(e){if(this._enabled){var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getTabSize()*this._spaceWidth,o=e.scrollWidth,r=this._lineHeight,s=i,a=this._context.model.getLinesIndentGuides(t,n),u=0,l=0,c=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var d=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);u=d.startLineNumber,l=d.endLineNumber,c=d.indent;}for(var h=[],p=t;p<=n;p++){for(var f=u<=p&&p<=l,g=p-t,m=a[g],_="",v=e.visibleRangeForPosition(new Qt(p,1)),y=v?v.left:0,b=1;b<=m;b++){if(_+='
',(y+=i)>o)break;}h[g]=_;}this._renderResult=h;}else this._renderResult=null;},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n];},t;}(Lh);Vd(function(e,t){var n=e.getColor(Sf);n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+n+" inset; }");var i=e.getColor(xf)||n;i&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+i+" inset; }");});n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/lines/viewLines.css");var ey=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),ty=function(){function e(){this._currentVisibleRange=new Jt(1,1,1,1);}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange;},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e;},e;}(),ny=function(){return function(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r;};}(),iy=function(e){function t(t,n){var i=e.call(this,t)||this;i._linesContent=n,i._textRangeRestingSpot=document.createElement("div"),i._visibleLines=new tv(i),i.domNode=i._visibleLines.domNode;var o=i._context.configuration;return i._lineHeight=o.editor.lineHeight,i._typicalHalfwidthCharacterWidth=o.editor.fontInfo.typicalHalfwidthCharacterWidth,i._isViewportWrapping=o.editor.wrappingInfo.isViewportWrapping,i._revealHorizontalRightPadding=o.editor.viewInfo.revealHorizontalRightPadding,i._canUseLayerHinting=o.editor.canUseLayerHinting,i._viewLineOptions=new Kd(o,i._context.theme.type),Ld.write(i.domNode,7),i.domNode.setClassName("view-lines"),qc.applyFontInfo(i.domNode,o.editor.fontInfo),i._maxLineWidth=0,i._asyncUpdateLineWidths=new ee(function(){i._updateLineWidthsSlow();},200),i._lastRenderedData=new ty(),i._horizontalRevealRequest=null,i;}return ey(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this);},t.prototype.getDomNode=function(){return this.domNode;},t.prototype.createVisibleLine=function(){return new qd(this._viewLineOptions);},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.wrappingInfo&&(this._maxLineWidth=0);var t=this._context.configuration;return e.lineHeight&&(this._lineHeight=t.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=t.editor.fontInfo.typicalHalfwidthCharacterWidth),e.wrappingInfo&&(this._isViewportWrapping=t.editor.wrappingInfo.isViewportWrapping),e.viewInfo&&(this._revealHorizontalRightPadding=t.editor.viewInfo.revealHorizontalRightPadding),e.canUseLayerHinting&&(this._canUseLayerHinting=t.editor.canUseLayerHinting),e.fontInfo&&qc.applyFontInfo(this.domNode,t.editor.fontInfo),this._onOptionsMaybeChanged(),e.layoutInfo&&(this._maxLineWidth=0),!0;},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new Kd(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),o=n;o<=i;o++){this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions);}return!0;}return!1;},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=!1,o=t;o<=n;o++)i=this._visibleLines.getVisibleLine(o).onSelectionChanged()||i;return i;},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged();return!0;},t.prototype.onFlushed=function(e){var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t;},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e);},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e);},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e);},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.range,e.verticalType),n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new ny(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop);return 0===e.scrollType&&i>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(n):this._context.viewLayout.setScrollPositionNow(n),!0;},t.prototype.onScrollChanged=function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null);}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0;},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e);},t.prototype.onZonesChanged=function(e){return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth),this._visibleLines.onZonesChanged(e);},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged();},t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new Qt(i,1);var o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(ir)return null;var s=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t),a=this._context.model.getLineMinColumn(i);return sn?-1:this._visibleLines.getVisibleLine(e).getWidth();},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber,i=Jt.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!i)return null;var o=[],r=0,s=new zd(this.domNode.domNode,this._textRangeRestingSpot),a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Qt(i.startLineNumber,1)).lineNumber);for(var u=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber(),c=i.startLineNumber;c<=i.endLineNumber;c++)if(!(cl)){var d=c===i.startLineNumber?i.startColumn:1,h=c===i.endLineNumber?i.endColumn:this._context.model.getLineMaxColumn(c),p=this._visibleLines.getVisibleLine(c).getVisibleRangesForRange(d,h,s);if(p&&0!==p.length){if(t&&cr)){var a=s===t.startLineNumber?t.startColumn:1,u=s===t.endLineNumber?t.endColumn:this._context.model.getLineMaxColumn(s),l=this._visibleLines.getVisibleLine(s).getVisibleRangesForRange(a,u,i);l&&0!==l.length&&(n=n.concat(l));}return 0===n.length?null:n;},t.prototype.visibleRangeForPosition=function(e){var t=this.visibleRangesForRange2(new Jt(e.lineNumber,e.column,e.lineNumber,e.column));return t?t[0]:null;},t.prototype.updateLineWidths=function(){this._updateLineWidths(!1);},t.prototype._updateLineWidthsFast=function(){return this._updateLineWidths(!0);},t.prototype._updateLineWidthsSlow=function(){this._updateLineWidths(!1);},t.prototype._updateLineWidths=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=1,o=!0,r=t;r<=n;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?i=Math.max(i,s.getWidth()):o=!1;}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o;},t.prototype.prepareRender=function(){throw new Error("Not supported");},t.prototype.render=function(){throw new Error("Not supported");},t.prototype.renderText=function(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){var t=this._horizontalRevealRequest.lineNumber,n=this._horizontalRevealRequest.startColumn,i=this._horizontalRevealRequest.endColumn,o=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,n,i);this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===o?this._context.viewLayout.setScrollPositionSmooth({scrollLeft:r.scrollLeft}):this._context.viewLayout.setScrollPositionNow({scrollLeft:r.scrollLeft});}}this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),this._linesContent.setLayerHinting(this._canUseLayerHinting);var s=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-s),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft());},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidthc&&(c=h.left+h.width);}return o=c,l=Math.max(0,l-t.HORIZONTAL_EXTRA_PX),c+=this._revealHorizontalRightPadding,{scrollLeft:this._computeMinimumScrolling(s,a,l,c),maxHorizontalOffset:o};},t.prototype._computeMinimumScrolling=function(e,t,n,i,o,r){o=!!o,r=!!r;var s=(t|=0)-(e|=0);return(i|=0)-(n|=0)t?Math.max(0,i-s):e:n;},t.HORIZONTAL_EXTRA_PX=30,t;}(Ed),oy=(n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}()),ry=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._decorationsLeft=n._context.configuration.editor.layoutInfo.decorationsLeft,n._decorationsWidth=n._context.configuration.editor.layoutInfo.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n;}return oy(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this);},t.prototype.onConfigurationChanged=function(e){return e.layoutInfo&&(this._decorationsLeft=this._context.configuration.editor.layoutInfo.decorationsLeft,this._decorationsWidth=this._context.configuration.editor.layoutInfo.decorationsWidth),!0;},t.prototype.onDecorationsChanged=function(e){return!0;},t.prototype.onFlushed=function(e){return!0;},t.prototype.onLinesChanged=function(e){return!0;},t.prototype.onLinesDeleted=function(e){return!0;},t.prototype.onLinesInserted=function(e){return!0;},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged;},t.prototype.onZonesChanged=function(e){return!0;},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],i=0,o=0,r=t.length;o
',r=[],s=t;s<=n;s++){for(var a=s-t,u=i[a],l="",c=0,d=u.length;c';o[s]=u;}this._renderResult=o;},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:"";},t;}(Xv),uy=(n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css"),function(){function e(t,n,i,o){this.r=e._clamp(t),this.g=e._clamp(n),this.b=e._clamp(i),this.a=e._clamp(o);}return e._clamp=function(e){return e<0?0:e>255?255:0|e;},e.Empty=new e(0,0,0,0),e;}()),ly=function(){function e(){var e=this;this._onDidChange=new N(),this.onDidChange=this._onDidChange.event,this._updateColorMap(),Ls.onDidChange(function(t){t.changedColorMap&&e._updateColorMap();});}return e.getInstance=function(){return this._INSTANCE||(this._INSTANCE=new e()),this._INSTANCE;},e.prototype._updateColorMap=function(){var e=Ls.getColorMap();if(!e)return this._colors=[uy.Empty],void(this._backgroundIsLight=!0);this._colors=[uy.Empty];for(var t=1;t=.5,this._onDidChange.fire(void 0);},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e];},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight;},e._INSTANCE=null,e;}(),cy=function(){function e(t,n){if(760!==t.length)throw new Error("Invalid x2CharData");if(190!==n.length)throw new Error("Invalid x1CharData");this.x2charData=t,this.x1charData=n,this.x2charDataLight=e.soften(t,.8),this.x1charDataLight=e.soften(n,50/60);}return e.soften=function(e,t){for(var n=new Uint8ClampedArray(e.length),i=0,o=e.length;it.width||i+4>t.height)console.warn("bad render request outside image data");else{var u=a?this.x2charDataLight:this.x2charData,l=e._getChIndex(o),c=4*t.width,d=s.r,h=s.g,p=s.b,f=r.r-d,g=r.g-h,m=r.b-p,_=t.data,v=4*l*2,y=i*c+4*n,b=u[v]/255;_[y+0]=d+f*b,_[y+1]=h+g*b,_[y+2]=p+m*b;b=u[v+1]/255;_[y+4]=d+f*b,_[y+5]=h+g*b,_[y+6]=p+m*b,y+=c;b=u[v+2]/255;_[y+0]=d+f*b,_[y+1]=h+g*b,_[y+2]=p+m*b;b=u[v+3]/255;_[y+4]=d+f*b,_[y+5]=h+g*b,_[y+6]=p+m*b,y+=c;b=u[v+4]/255;_[y+0]=d+f*b,_[y+1]=h+g*b,_[y+2]=p+m*b;b=u[v+5]/255;_[y+4]=d+f*b,_[y+5]=h+g*b,_[y+6]=p+m*b,y+=c;b=u[v+6]/255;_[y+0]=d+f*b,_[y+1]=h+g*b,_[y+2]=p+m*b;b=u[v+7]/255;_[y+4]=d+f*b,_[y+5]=h+g*b,_[y+6]=p+m*b;}},e.prototype.x1RenderChar=function(t,n,i,o,r,s,a){if(n+1>t.width||i+2>t.height)console.warn("bad render request outside image data");else{var u=a?this.x1charDataLight:this.x1charData,l=e._getChIndex(o),c=4*t.width,d=s.r,h=s.g,p=s.b,f=r.r-d,g=r.g-h,m=r.b-p,_=t.data,v=2*l*1,y=i*c+4*n,b=u[v]/255;_[y+0]=d+f*b,_[y+1]=h+g*b,_[y+2]=p+m*b,y+=c;b=u[v+1]/255;_[y+0]=d+f*b,_[y+1]=h+g*b,_[y+2]=p+m*b;}},e.prototype.x2BlockRenderChar=function(e,t,n,i,o,r){if(t+2>e.width||n+4>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=o.r,u=o.g,l=o.b,c=a+.5*(i.r-a),d=u+.5*(i.g-u),h=l+.5*(i.b-l),p=e.data,f=n*s+4*t;p[f+0]=c,p[f+1]=d,p[f+2]=h,p[f+4]=c,p[f+5]=d,p[f+6]=h,p[(f+=s)+0]=c,p[f+1]=d,p[f+2]=h,p[f+4]=c,p[f+5]=d,p[f+6]=h,p[(f+=s)+0]=c,p[f+1]=d,p[f+2]=h,p[f+4]=c,p[f+5]=d,p[f+6]=h,p[(f+=s)+0]=c,p[f+1]=d,p[f+2]=h,p[f+4]=c,p[f+5]=d,p[f+6]=h;}},e.prototype.x1BlockRenderChar=function(e,t,n,i,o,r){if(t+1>e.width||n+2>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=o.r,u=o.g,l=o.b,c=a+.5*(i.r-a),d=u+.5*(i.g-u),h=l+.5*(i.b-l),p=e.data,f=n*s+4*t;p[f+0]=c,p[f+1]=d,p[f+2]=h,p[(f+=s)+0]=c,p[f+1]=d,p[f+2]=h;}},e;}();function dy(e){for(var t=new Uint8ClampedArray(e.length),n=0,i=e.length;n=s)return new e(a,u,v,y,c,b=1,s);var b=Math.max(1,Math.floor(n-y*h/p));return l&&l.scrollHeight===u&&(l.scrollTop>a&&(b=Math.min(b,l.startLineNumber)),l.scrollTopyy)n._context.viewLayout.setScrollPositionNow({scrollTop:r.scrollTop});else{var a=e.posy-t;n._context.viewLayout.setScrollPositionNow({scrollTop:r.getDesiredScrollTopFromDelta(a)});}},function(){n._slider.toggleClassName("active",!1);});}}),n;}return my(t,e),t.prototype.dispose=function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),e.prototype.dispose.call(this);},t.prototype._getMinimapDomNodeClassName=function(){return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover";},t.prototype.getDomNode=function(){return this._domNode;},t.prototype._applyLayout=function(){this._domNode.setLeft(this._options.minimapLeft),this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth);},t.prototype._getBuffer=function(){return this._buffers||(this._buffers=new xy(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers.getBuffer();},t.prototype._onOptionsMaybeChanged=function(){var e=new by(this._context.configuration);return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0);},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged();},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0;},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e);},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0;},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0;},t.prototype.onScrollChanged=function(e){return!0;},t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e);},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0;},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0;},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(0===this._options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");var t=Cy.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,i=Math.min(this._options.minimapWidth,Math.round(n*vy(this._options.renderMinimap)/this._options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._options.minimapWidth-i),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this._lastRenderData=this.renderLines(t);},t.prototype.renderLines=function(e){var n=this._options.renderMinimap,i=e.startLineNumber,o=e.endLineNumber,r=_y(n);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var s=this._lastRenderData._get();return new Sy(e,s.imageData,s.lines);}for(var a=this._getBuffer(),u=t._renderUntouchedLines(a,i,o,r,this._lastRenderData),l=u[0],c=u[1],d=u[2],h=this._context.model.getMinimapLinesRenderingData(i,o,d),p=h.tabSize,f=this._tokensColorTracker.getColor(2),g=this._tokensColorTracker.backgroundIsLight(),m=0,_=[],v=0,y=o-i+1;v=0&&Eh)return;var C=l.charCodeAt(f);if(9===C){var w=a-(f+g)%a;g+=w-1,p+=w*d;}else if(32===C)p+=d;else for(var S=To(C)?2:1,x=0;xh)return;}},t;}(Ed);Vd(function(e,t){var n=e.getColor(bp);if(n){var i=n.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+i+"; }");}var o=e.getColor(Cp);if(o){var r=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }");}var s=e.getColor(wp);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }");}var u=e.getColor(yp);u&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+u+" -6px 0 6px -6px inset; }");});n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css");var Ly=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Ty=function(e){function t(t){var n=e.call(this,t)||this;return n._widgets={},n._verticalScrollbarWidth=n._context.configuration.editor.layoutInfo.verticalScrollbarWidth,n._minimapWidth=n._context.configuration.editor.layoutInfo.minimapWidth,n._horizontalScrollbarHeight=n._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,n._editorHeight=n._context.configuration.editor.layoutInfo.height,n._editorWidth=n._context.configuration.editor.layoutInfo.width,n._domNode=rd(document.createElement("div")),Ld.write(n._domNode,4),n._domNode.setClassName("overlayWidgets"),n;}return Ly(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets={};},t.prototype.getDomNode=function(){return this._domNode;},t.prototype.onConfigurationChanged=function(e){return!!e.layoutInfo&&(this._verticalScrollbarWidth=this._context.configuration.editor.layoutInfo.verticalScrollbarWidth,this._minimapWidth=this._context.configuration.editor.layoutInfo.minimapWidth,this._horizontalScrollbarHeight=this._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,this._editorHeight=this._context.configuration.editor.layoutInfo.height,this._editorWidth=this._context.configuration.editor.layoutInfo.width,!0);},t.prototype.addWidget=function(e){var t=rd(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender();},t.prototype.setWidgetPosition=function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0);},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender();}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference){if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");}else t.unsetTop();},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,i=t.length;n=3){var o,r,s,a=i-(o=Math.floor(i/3))-(r=Math.floor(i/3)),u=(s=e)+o;return[[0,s,u,s,s+o+a,s,u,s],[0,o,a,o+a,r,o+a+r,a+r,o+a+r]];}if(2===n)return[[0,s=e,s,s,s+(o=Math.floor(i/2)),s,s,s],[0,o,o,o,r=i-o,o+r,o+r,o+r]];return[[0,e,e,e,e,e,e,e],[0,i,i,i,i,i,i,i]];},e.prototype.equals=function(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight;},e;}(),ky=function(e){function t(t){var n=e.call(this,t)||this;return n._domNode=rd(document.createElement("canvas")),n._domNode.setClassName("decorationsOverviewRuler"),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._domNode.setAttribute("aria-hidden","true"),n._updateSettings(!1),n._tokensColorTrackerListener=Ls.onDidChange(function(e){e.changedColorMap&&n._updateSettings(!0);}),n._cursorPositions=[],n;}return Iy(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose();},t.prototype._updateSettings=function(e){var t=new Ny(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0);},t.prototype.onConfigurationChanged=function(e){return this._updateSettings(!1);},t.prototype.onCursorStateChanged=function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;tt&&(N=t-a),x=N-a,O=N+a;x>v+1||C!==m?(0!==y&&u.fillRect(l[m],_,c[m],v-_),m=C,_=x,v=O):O>v&&(v=O);}u.fillRect(l[m],_,c[m],v-_);}if(!this._settings.hideCursor&&this._settings.cursorColor){var E=2*this._settings.pixelRatio|0,L=E/2|0,T=this._settings.x[7],I=this._settings.w[7];u.fillStyle=this._settings.cursorColor;for(_=-100,v=-100,y=0,b=this._cursorPositions.length;yt&&(N=t-L);var O=(x=N-L)+E;x>v+1?(0!==y&&u.fillRect(T,_,I,v-_),_=x,v=O):O>v&&(v=O);}u.fillRect(T,_,I,v-_);}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(u.beginPath(),u.lineWidth=1,u.strokeStyle=this._settings.borderColor,u.moveTo(0,0),u.lineTo(0,t),u.stroke(),u.moveTo(0,0),u.lineTo(e,0),u.stroke());},t;}(Ed),Oy=function(){function e(e,t,n){this.from=0|e,this.to=0|t,this.colorId=0|n;}return e.compare=function(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId;},e;}(),Dy=function(){function e(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.color=n,this._colorZone=null;}return e.compare=function(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colorn&&(h=n-p);var f=u.color,g=this._color2Id[f];g||(g=++this._lastAssignedId,this._color2Id[f]=g,this._id2Color[g]=f);var m=new Oy(h-p,h+p,g);u.setColorZone(m),r.push(m);}return this._colorZonesInvalid=!1,r.sort(Oy.compare),r;},e;}(),Ay=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),My=function(e){function t(t,n){var i=e.call(this)||this;return i._context=t,i._domNode=rd(document.createElement("canvas")),i._domNode.setClassName(n),i._domNode.setPosition("absolute"),i._domNode.setLayerHinting(!0),i._zoneManager=new Ry(function(e){return i._context.viewLayout.getVerticalOffsetForLineNumber(e);}),i._zoneManager.setDOMWidth(0),i._zoneManager.setDOMHeight(0),i._zoneManager.setOuterHeight(i._context.viewLayout.getScrollHeight()),i._zoneManager.setLineHeight(i._context.configuration.editor.lineHeight),i._zoneManager.setPixelRatio(i._context.configuration.editor.pixelRatio),i._context.addEventHandler(i),i;}return Ay(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this);},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._zoneManager.setLineHeight(this._context.configuration.editor.lineHeight),this._render()),e.pixelRatio&&(this._zoneManager.setPixelRatio(this._context.configuration.editor.pixelRatio),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0;},t.prototype.onFlushed=function(e){return this._render(),!0;},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0;},t.prototype.onZonesChanged=function(e){return this._render(),!0;},t.prototype.getDomNode=function(){return this._domNode.domNode;},t.prototype.setLayout=function(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);var t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,(t=this._zoneManager.setDOMHeight(e.height)||t)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render());},t.prototype.setZones=function(e){this._zoneManager.setZones(e),this._render();},t.prototype._render=function(){if(0===this._zoneManager.getOuterHeight())return!1;var e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),n=this._zoneManager.resolveColorZones(),i=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),n.length>0&&this._renderOneLane(o,n,i,e),!0;},t.prototype._renderOneLane=function(e,t,n,i){for(var o=0,r=0,s=0,a=0,u=t.length;a=d?s=Math.max(s,h):(e.fillRect(0,r,i,s-r),r=d,s=h);}e.fillRect(0,r,i,s-r);},t;}(Sd),Py=(n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}()),Fy=function(e){function t(t){var n=e.call(this,t)||this;return n.domNode=rd(document.createElement("div")),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.domNode.setClassName("view-rulers"),n._renderedRulers=[],n._rulers=n._context.configuration.editor.viewInfo.rulers,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n;}return Py(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype.onConfigurationChanged=function(e){return!!(e.viewInfo||e.layoutInfo||e.fontInfo)&&(this._rulers=this._context.configuration.editor.viewInfo.rulers,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,!0);},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged;},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;){(r=rd(document.createElement("div"))).setClassName("view-ruler"),r.setWidth(n),this.domNode.appendChild(r),this._renderedRulers.push(r),i--;}else for(var o=e-t;o>0;){var r=this._renderedRulers.pop();this.domNode.removeChild(r),o--;}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;t0;return this._shouldShow!==e&&(this._shouldShow=e,!0);},t.prototype.getDomNode=function(){return this._domNode;},t.prototype._updateWidth=function(){var e=this._context.configuration.editor.layoutInfo,t=0;return t=0===e.renderMinimap||e.minimapWidth>0&&0===e.minimapLeft?e.width:e.width-e.minimapWidth-e.verticalScrollbarWidth,this._width!==t&&(this._width=t,!0);},t.prototype.onConfigurationChanged=function(e){var t=!1;return e.viewInfo&&(this._useShadows=this._context.configuration.editor.viewInfo.scrollbar.useShadows),e.layoutInfo&&(t=this._updateWidth()),this._updateShouldShow()||t;},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow();},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"");},t;}(Ed);Vd(function(e,t){var n=e.getColor(yp);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+n+" 0 6px 6px -6px inset; }");});n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css");var Vy=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Hy=function(){return function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null;};}(),Uy=function(){return function(e,t){this.lineNumber=e,this.ranges=t;};}();function jy(e){return new Hy(e);}function zy(e){return new Uy(e.lineNumber,e.ranges.map(jy));}var Ky=bn,qy=function(e){function t(t){var n=e.call(this)||this;return n._previousFrameVisibleRangesWithStyle=[],n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._roundedSelection=n._context.configuration.editor.viewInfo.roundedSelection,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n;}return Vy(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._renderResult=null,e.prototype.dispose.call(this);},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._roundedSelection=this._context.configuration.editor.viewInfo.roundedSelection),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0;},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0;},t.prototype.onDecorationsChanged=function(e){return!0;},t.prototype.onFlushed=function(e){return!0;},t.prototype.onLinesChanged=function(e){return!0;},t.prototype.onLinesDeleted=function(e){return!0;},t.prototype.onLinesInserted=function(e){return!0;},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged;},t.prototype.onZonesChanged=function(e){return!0;},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t1)return!0;}return!1;},t.prototype._enrichVisibleRangesWithStyle=function(e,t,n){var i=this._typicalHalfwidthCharacterWidth/4,o=null,r=null;if(n&&n.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(var a=0;!o&&a=0;a--)n[a].lineNumber===u&&(r=n[a].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null);}a=0;for(var l=t.length;a0){var g=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;Gy(d-g)g&&(p.top=1),Gy(h-m)';},t.prototype._actualRenderOneSelection=function(e,n,i,o){for(var r=o.length>0&&o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),u=o.length>0?o[0].lineNumber:0,l=o.length>0?o[o.length-1].lineNumber:0,c=0,d=o.length;c1,l);}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t;},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n];},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t;}(Lh);function Gy(e){return e<0?-e:e;}Vd(function(e,t){var n=e.getColor(Pp);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+n+"; }");var i=e.getColor(Wp);i&&t.addRule(".monaco-editor .selected-text { background-color: "+i+"; }");var o=e.getColor(Fp);o&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+o+"; }");});n("./node_modules/monaco-editor/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.css");var $y=function(){return function(e,t,n,i,o,r){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=o,this.textContentClassName=r;};}(),Yy=function(){function e(e){this._context=e,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineHeight=this._context.configuration.editor.lineHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=rd(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),qc.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new Qt(1,1)),this._lastRenderedContent="",this._renderData=null;}return e.prototype.getDomNode=function(){return this._domNode;},e.prototype.getPosition=function(){return this._position;},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0);},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1);},e.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(qc.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),e.viewInfo&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth)),!0;},e.prototype.onCursorPositionChanged=function(e){return this.updatePosition(e),!0;},e.prototype._prepareRender=function(e){var t="",n="";if(this._cursorStyle===Pe.Line||this._cursorStyle===Pe.LineThin){var i,o=e.visibleRangeForPosition(this._position);if(!o)return null;if(this._cursorStyle===Pe.Line){if((i=$i(this._lineCursorWidth>0?this._lineCursorWidth:2))>2)t=this._context.model.getLineContent(this._position.lineNumber).charAt(this._position.column-1);}else i=$i(1);var r=o.left;i>=2&&r>=1&&(r-=1);var s=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new $y(s,r,i,this._lineHeight,t,n);}var a=e.linesVisibleRangesForRange(new Jt(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+1),!1);if(!a||0===a.length||0===a[0].ranges.length)return null;var u=a[0].ranges[0],l=u.width<1?this._typicalHalfwidthCharacterWidth:u.width;if(this._cursorStyle===Pe.Block){var c=this._context.model.getViewLineData(this._position.lineNumber);t=c.content.charAt(this._position.column-1),bo(c.content.charCodeAt(this._position.column-1))&&(t+=c.content.charAt(this._position.column));var d=c.tokens.findTokenIndexAtOffset(this._position.column-1);n=c.tokens.getClassName(d);}var h=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,p=this._lineHeight;return this._cursorStyle!==Pe.Underline&&this._cursorStyle!==Pe.UnderlineThin||(h+=this._lineHeight-2,p=2),new $y(h,u.left,l,p,t,n);},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e);},e.prototype.render=function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor "+this._renderData.textContentClassName),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null);},e.prototype.updatePosition=function(e){this._position=e;},e;}(),Xy=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Zy=function(e){function t(t){var n=e.call(this,t)||this;return n._readOnly=n._context.configuration.editor.readOnly,n._cursorBlinking=n._context.configuration.editor.viewInfo.cursorBlinking,n._cursorStyle=n._context.configuration.editor.viewInfo.cursorStyle,n._selectionIsEmpty=!0,n._primaryCursor=new Yy(n._context),n._secondaryCursors=[],n._renderData=[],n._domNode=rd(document.createElement("div")),n._domNode.setAttribute("role","presentation"),n._domNode.setAttribute("aria-hidden","true"),n._updateDomClassName(),n._domNode.appendChild(n._primaryCursor.getDomNode()),n._startCursorBlinkAnimation=new Q(),n._cursorFlatBlinkInterval=new J(),n._blinkingEnabled=!1,n._editorHasFocus=!1,n._updateBlinking(),n;}return Xy(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose();},t.prototype.getDomNode=function(){return this._domNode;},t.prototype.onConfigurationChanged=function(e){e.readOnly&&(this._readOnly=this._context.configuration.editor.readOnly),e.viewInfo&&(this._cursorBlinking=this._context.configuration.editor.viewInfo.cursorBlinking,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle),this._primaryCursor.onConfigurationChanged(e),this._updateBlinking(),e.viewInfo&&this._updateDomClassName();for(var t=0,n=this._secondaryCursors.length;tt.length){var r=this._secondaryCursors.length-t.length;for(i=0;in){var r=t-n;for(o=0;o=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1);},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;td&&t[C].index--;e.splice(d,1),t.splice(c,1),this._removeSecondaryCursor(d-1),o--;}}}}},e;}(),hb=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}();var pb=function(){return function(e,t,n){this.selections=e,this.source=t,this.reason=n;};}(),fb=function(){function e(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getAll();}return e.prototype.equals=function(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(var t=0,n=this.cursorState.length;tt.MAX_CURSOR_COUNT&&(i=i.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var o=new fb(this._model,this);this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._emitStateChangedIfNecessary(e,n,o);},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e;},t.prototype.reveal=function(e,t,n){this._revealRange(t,0,e,n);},t.prototype.revealRange=function(e,t,n,i){this.emitCursorRevealRange(t,n,e,i);},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e});},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),n=0,i=t.length;n1)return;var a=new Jt(r.lineNumber,r.column,r.lineNumber,r.column);this.emitCursorRevealRange(a,t,n,i);},t.prototype.emitCursorRevealRange=function(e,t,n,i){try{this._beginEmit().emit(new hg(e,t,n,i));}finally{this._endEmit();}},t.prototype.trigger=function(e,t,n){var i=hr;if(t!==i.CompositionStart){if(t===i.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.editor.readOnly)this._onDidAttemptReadOnlyEdit.fire(void 0);else{var o=new fb(this._model,this),r=0;t!==i.Undo&&t!==i.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case i.Type:this._type(e,n.text);break;case i.ReplacePreviousChar:this._replacePreviousChar(n.text,n.replaceCharCnt);break;case i.Paste:r=4,this._paste(n.text,n.pasteOnNewLine,n.multicursorText);break;case i.Cut:this._cut();break;case i.Undo:r=5,this._interpretCommandResult(this._model.undo());break;case i.Redo:r=6,this._interpretCommandResult(this._model.redo());break;case i.ExecuteCommand:this._externalExecuteCommand(n);break;case i.ExecuteCommands:this._externalExecuteCommands(n);break;case i.CompositionEnd:this._interpretCompositionEnd(e);}}catch(e){a(e);}this._isHandling=!1,t!==i.Undo&&t!==i.Redo&&this._cursors.startTrackingSelections(),this._emitStateChangedIfNecessary(e,r,o)&&this._revealRange(0,0,!0,0);}}else this._isDoingComposition=!0;},t.prototype._interpretCompositionEnd=function(e){this._isDoingComposition||"keyboard"!==e||this._executeEditOperation(W_.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections()));},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(W_.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var n=0,i=t.length;n0&&(r[0]._isTracked=!0);var u=e.model.pushEditOperations(e.selectionsBefore,r,function(n){for(var i=[],o=0;o0?(i[n].sort(s),a[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return i[n];},getTrackedSelection:function(t){var n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return 0===e.trackedRangesDirection[n]?new tn(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new tn(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn);}})):a[n]=e.selectionsBefore[n];};for(o=0;oo.identifier.major?i.identifier.major:o.identifier.major).toString()]=!0;for(var s=0;s0&&n--;}}return t;},e;}(),_b=function(){function e(e,t,n,i,o,r){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=o,this._contextKeyService=r;}return e.prototype.isSupported=function(){return this._contextKeyService.contextMatchesRules(this._precondition);},e.prototype.run=function(){if(!this.isSupported())return Promise.resolve(void 0);var e=this._run();return e||Promise.resolve(void 0);},e;}(),vb={getInitialState:function(){return Ts;},tokenize2:function(e,t,n){return ks(0,0,t,n);}};function yb(e,t){return void 0===t&&(t=vb),function(e,t){for(var n='
',i=e.split(/\r\n|\r|\n/),o=t.getInitialState(),r=0,s=i.length;r0&&(n+="
");var u=t.tokenize2(a,o,0);ru.convertToEndOffset(u.tokens,a.length);for(var l=new ru(u.tokens,a),c=l.inflate(),d=0,h=0,p=c.getCount();h'+no(a.substring(d,g))+"",d=g;}o=u.endState;}return n+="
";}(e,t||vb);}function bb(e,t,n,i,o,r){for(var s="
",a=i,u=0,l=0,c=t.getCount();l0;)h+=" ",f--;break;case 60:h+="<";break;case 62:h+=">";break;case 38:h+="&";break;case 0:h+="�";break;case 65279:case 8232:h+="�";break;case 13:h+="​";break;default:h+=String.fromCharCode(p);}}if(s+=''+h+"",d>o||a>=o)break;}}return s+="
";}var Cb=function(){function e(){this._heights=[],this._minWidths=[],this._ids=[],this._afterLineNumbers=[],this._ordinals=[],this._prefixSum=[],this._prefixSumValidIndex=-1,this._whitespaceId2Index={},this._lastWhitespaceId=0,this._minWidth=-1;}return e.findInsertionIndex=function(e,t,n,i){for(var o=0,r=e.length;o>>1;t===e[s]?i=t&&(this._whitespaceId2Index[l]=c+1);}this._whitespaceId2Index[e.toString()]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1);},e.prototype.changeWhitespace=function(e,t,n){e|=0,t|=0,n|=0;var i=!1;return i=this.changeWhitespaceHeight(e,n)||i,i=this.changeWhitespaceAfterLineNumber(e,t)||i;},e.prototype.changeWhitespaceHeight=function(e,t){t|=0;var n=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(n)){var i=this._whitespaceId2Index[n];if(this._heights[i]!==t)return this._heights[i]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,i-1),!0;}return!1;},e.prototype.changeWhitespaceAfterLineNumber=function(t,n){n|=0;var i=(t|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(i)){var o=this._whitespaceId2Index[i];if(this._afterLineNumbers[o]!==n){var r=this._ordinals[o],s=this._heights[o],a=this._minWidths[o];this.removeWhitespace(t);var u=e.findInsertionIndex(this._afterLineNumbers,n,this._ordinals,r);return this._insertWhitespaceAtIndex(t,u,n,r,s,a),!0;}}return!1;},e.prototype.removeWhitespace=function(e){var t=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var n=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],this._removeWhitespaceAtIndex(n),this._minWidth=-1,!0;}return!1;},e.prototype._removeWhitespaceAtIndex=function(e){e|=0,this._heights.splice(e,1),this._minWidths.splice(e,1),this._ids.splice(e,1),this._afterLineNumbers.splice(e,1),this._ordinals.splice(e,1),this._prefixSum.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1);for(var t=Object.keys(this._whitespaceId2Index),n=0,i=t.length;n=e&&(this._whitespaceId2Index[o]=r-1);}},e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;nt&&(this._afterLineNumbers[n]-=t-e+1);}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;n=t.length||t[o+1]>=e)return o;n=o+1|0;}else i=o-1|0;}return-1;},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this._whitespaces.getAccumulatedHeightBeforeLineNumber(e);},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this._whitespaces.getAccumulatedHeightBeforeLineNumber(e);},e.prototype.getWhitespaceMinWidth=function(){return this._whitespaces.getMinWidth();},e.prototype.isAfterLines=function(e){return e>this.getLinesTotalHeight();},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if((e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,i=1,o=t;i=s+n)i=r+1;else{if(e>=s)return r;o=r;}}return i>t?t:i;},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0;var n,i,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,u=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),l=0|this._whitespaces.getCount();-1===u?(u=l,i=a+1,n=0):(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(u),n=0|this._whitespaces.getHeightForWhitespaceIndex(u));var c=s,d=c,h=0;s>=5e5&&(h=5e5*Math.floor(s/5e5),d-=h=Math.floor(h/o)*o);for(var p=[],f=e+(t-e)/2,g=-1,m=r;m<=a;m++){if(-1===g){(c<=f&&ff)&&(g=m);}for(c+=o,p[m-r]=d,d+=o;i===m;)d+=n,c+=n,++u>=l?i=a+1:(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(u),n=0|this._whitespaces.getHeightForWhitespaceIndex(u));if(c>=t){a=m;break;}}-1===g&&(g=a);var _=0|this.getVerticalOffsetForLineNumber(a),v=r,y=a;return vt&&y--,{bigNumbersDelta:h,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:g,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:y};},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){e|=0;var t=this._whitespaces.getAfterLineNumberForWhitespaceIndex(e);return(t>=1?this._lineHeight*t:0)+(e>0?this._whitespaces.getAccumulatedHeight(e-1):0);},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){e|=0;var t,n,i=0,o=this._whitespaces.getCount()-1;if(o<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(o)+this._whitespaces.getHeightForWhitespaceIndex(o))return-1;for(;i=(n=this.getVerticalOffsetForWhitespaceIndex(t))+this._whitespaces.getHeightForWhitespaceIndex(t))i=t+1;else{if(e>=n)return t;o=t;}return i;},e.prototype.getWhitespaceAtVerticalOffset=function(e){e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this._whitespaces.getCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i};},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this._whitespaces.getCount()-1;if(n<0)return[];for(var o=[],r=n;r<=i;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this._whitespaces.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this._whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a});}return o;},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight);},e;}(),Sb=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),xb=function(e){function t(t,n,i){var o=e.call(this)||this;return o._configuration=t,o._linesLayout=new wb(n,o._configuration.editor.lineHeight),o.scrollable=o._register(new Av(0,i)),o._configureSmoothScrollDuration(),o.scrollable.setScrollDimensions({width:t.editor.layoutInfo.contentWidth,height:t.editor.layoutInfo.contentHeight}),o.onDidScroll=o.scrollable.onScroll,o._updateHeight(),o;}return Sb(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype.onHeightMaybeChanged=function(){this._updateHeight();},t.prototype._configureSmoothScrollDuration=function(){this.scrollable.setSmoothScrollDuration(this._configuration.editor.viewInfo.smoothScrolling?125:0);},t.prototype.onConfigurationChanged=function(e){e.lineHeight&&this._linesLayout.setLineHeight(this._configuration.editor.lineHeight),e.layoutInfo&&this.scrollable.setScrollDimensions({width:this._configuration.editor.layoutInfo.contentWidth,height:this._configuration.editor.layoutInfo.contentHeight}),e.viewInfo&&this._configureSmoothScrollDuration(),this._updateHeight();},t.prototype.onFlushed=function(e){this._linesLayout.onFlushed(e);},t.prototype.onLinesDeleted=function(e,t){this._linesLayout.onLinesDeleted(e,t);},t.prototype.onLinesInserted=function(e,t){this._linesLayout.onLinesInserted(e,t);},t.prototype._getHorizontalScrollbarHeight=function(e){return 2===this._configuration.editor.viewInfo.scrollbar.horizontal?0:e.width>=e.scrollWidth?0:this._configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize;},t.prototype._getTotalHeight=function(){var e=this.scrollable.getScrollDimensions(),t=this._linesLayout.getLinesTotalHeight();return this._configuration.editor.viewInfo.scrollBeyondLastLine?t+=e.height-this._configuration.editor.lineHeight:t+=this._getHorizontalScrollbarHeight(e),Math.max(e.height,t);},t.prototype._updateHeight=function(){this.scrollable.setScrollDimensions({scrollHeight:this._getTotalHeight()});},t.prototype.getCurrentViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getCurrentScrollPosition();return new Su(t.scrollTop,t.scrollLeft,e.width,e.height);},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new Su(t.scrollTop,t.scrollLeft,e.width,e.height);},t.prototype._computeScrollWidth=function(e,t){if(!this._configuration.editor.wrappingInfo.isViewportWrapping){var n=this._configuration.editor.viewInfo.scrollBeyondLastColumn*this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,i=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+n,t,i);}return Math.max(e,t);},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollable.setScrollDimensions({scrollWidth:t}),this._updateHeight();},t.prototype.saveState=function(){var e=this.scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft};},t.prototype.addWhitespace=function(e,t,n,i){return this._linesLayout.insertWhitespace(e,t,n,i);},t.prototype.changeWhitespace=function(e,t,n){return this._linesLayout.changeWhitespace(e,t,n);},t.prototype.removeWhitespace=function(e){return this._linesLayout.removeWhitespace(e);},t.prototype.getVerticalOffsetForLineNumber=function(e){return this._linesLayout.getVerticalOffsetForLineNumber(e);},t.prototype.isAfterLines=function(e){return this._linesLayout.isAfterLines(e);},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e);},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e);},t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height);},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this.scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height);},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height);},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces();},t.prototype.getScrollWidth=function(){return this.scrollable.getScrollDimensions().scrollWidth;},t.prototype.getScrollHeight=function(){return this.scrollable.getScrollDimensions().scrollHeight;},t.prototype.getCurrentScrollLeft=function(){return this.scrollable.getCurrentScrollPosition().scrollLeft;},t.prototype.getCurrentScrollTop=function(){return this.scrollable.getCurrentScrollPosition().scrollTop;},t.prototype.validateScrollPosition=function(e){return this.scrollable.validateScrollPosition(e);},t.prototype.setScrollPositionNow=function(e){this.scrollable.setScrollPositionNow(e);},t.prototype.setScrollPositionSmooth=function(e){this.scrollable.setScrollPositionSmooth(e);},t.prototype.deltaScrollNow=function(e,t){var n=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t});},t;}(y),Eb=function(){return function(e,t){this.outputLineIndex=e,this.outputOffset=t;};}(),Lb=function(){function e(e){this._lines=e;}return e.prototype.convertViewPositionToModelPosition=function(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column);},e.prototype.convertViewRangeToModelRange=function(e){var t=this._lines.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this._lines.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new Jt(t.lineNumber,t.column,n.lineNumber,n.column);},e.prototype.validateViewPosition=function(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t);},e.prototype.validateViewRange=function(e,t){var n=this._lines.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),i=this._lines.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new Jt(n.lineNumber,n.column,i.lineNumber,i.column);},e.prototype.convertModelPositionToViewPosition=function(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column);},e.prototype.convertModelRangeToViewRange=function(e){var t=this._lines.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this._lines.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return new Jt(t.lineNumber,t.column,n.lineNumber,n.column);},e.prototype.modelPositionIsVisible=function(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column);},e;}(),Tb=function(){function e(e,t,n,i,o,r){this.model=e,this._validModelVersionId=-1,this.tabSize=n,this.wrappingColumn=i,this.columnsForFullWidthChar=o,this.wrappingIndent=r,this.linePositionMapperFactory=t,this._constructLines(!0);}return e.prototype.dispose=function(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[]);},e.prototype.createCoordinatesConverter=function(){return new Lb(this);},e.prototype._ensureValidState=function(){if(this.model.getVersionId()!==this._validModelVersionId)throw new Error("ViewModel is out of sync with Model!");this.lines.length!==this.model.getLineCount()&&this._constructLines(!1);},e.prototype._constructLines=function(e){var t=this;this.lines=[],e&&(this.hiddenAreasIds=[]);for(var n=this.model.getLinesContent(),i=n.length,o=new Uint32Array(i),r=this.hiddenAreasIds.map(function(e){return t.model.getDecorationRange(e);}).sort(Jt.compareRangesUsingStarts),s=1,a=0,u=-1,l=u+1=s&&d<=a,p=Ob(this.linePositionMapperFactory,n[c],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!h);o[c]=p.getViewLineCount(),this.lines[c]=p;}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new ka(o);},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map(function(t){return e.model.getDecorationRange(t);});},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var n=e.map(function(e){return t.model.validateRange(e);}).sort(Jt.compareRangesUsingStarts),i=[],o=n[0].startLineNumber,r=n[0].endLineNumber,s=1,a=n.length;sr+1?(i.push(new Jt(o,1,r,1)),o=u.startLineNumber,r=u.endLineNumber):u.endLineNumber>r&&(r=u.endLineNumber);}return i.push(new Jt(o,1,r,1)),i;},e.prototype.setHiddenAreas=function(e){var t=this,n=this._reduceRanges(e),i=this.hiddenAreasIds.map(function(e){return t.model.getDecorationRange(e);}).sort(Jt.compareRangesUsingStarts);if(n.length===i.length){for(var o=!1,r=0;r=u&&p<=l?this.lines[r].isVisible()&&(this.lines[r]=this.lines[r].setVisible(!1),f=!0):(h=!0,this.lines[r].isVisible()||(this.lines[r]=this.lines[r].setVisible(!0),f=!0)),f){var g=this.lines[r].getViewLineCount();this.prefixSumComputer.changeValue(r,g);}}return h||this.setHiddenAreas([]),!0;},e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible();},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1),!0);},e.prototype.setWrappingSettings=function(e,t,n){return(this.wrappingIndent!==e||this.wrappingColumn!==t||this.columnsForFullWidthChar!==n)&&(this.wrappingIndent=e,this.wrappingColumn=t,this.columnsForFullWidthChar=n,this._constructLines(!1),!0);},e.prototype.onModelFlushed=function(){this._constructLines(!0);},e.prototype.onModelLinesDeleted=function(e,t,n){if(e<=this._validModelVersionId)return null;var i=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=this.prefixSumComputer.getAccumulatedValue(n-1);return this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1),new cg(i,o);},e.prototype.onModelLinesInserted=function(e,t,n,i){if(e<=this._validModelVersionId)return null;for(var o=this.getHiddenAreas(),r=!1,s=new Qt(t,1),a=0;aa?(f=(p=(c=(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+a-1)+1)+(o-a)-1,u=!0):ot?t:e;},e.prototype.warmUpLookupCache=function(e,t){this.prefixSumComputer.warmUpCache(e-1,t-1);},e.prototype.getActiveIndentGuide=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),u=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:u.lineNumber,indent:s.indent};},e.prototype.getViewLinesIndentGuides=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),o=[],r=[],s=[],a=n.lineNumber-1,u=i.lineNumber-1,l=null,c=a;c<=u;c++){var d=this.lines[c];if(d.isVisible()){var h=d.getViewLineNumberOfModelPosition(0,c===a?n.column:1),p=d.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(c+1)),f=0;(C=p-h+1)>1&&1===d.getViewLineMinColumn(this.model,c+1,p)&&(f=0===h?1:2),r.push(C),s.push(f),null===l&&(l=new Qt(c+1,0));}else null!==l&&(o=o.concat(this.model.getLinesIndentGuides(l.lineNumber,c)),l=null);}null!==l&&(o=o.concat(this.model.getLinesIndentGuides(l.lineNumber,i.lineNumber)),l=null);for(var g=t-e+1,m=new Array(g),_=0,v=0,y=o.length;vt&&(p=!0,h=t-o+1);var f=d+h;if(c.getViewLinesData(this.model,u+1,d,f,o-e,n,a),o+=h,p)break;}}return a;},e.prototype.validateViewPosition=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,r=i.remainder,s=this.lines[o],a=s.getViewLineMinColumn(this.model,o+1,r),u=s.getViewLineMaxColumn(this.model,o+1,r);tu&&(t=u);var l=s.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new Qt(o+1,l)).equals(n)?new Qt(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column);},e.prototype.convertViewPositionToModelPosition=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,o=n.remainder,r=this.lines[i].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new Qt(i+1,r));},e.prototype.convertModelPositionToViewPosition=function(e,t){this._ensureValidState();for(var n=this.model.validatePosition(new Qt(e,t)),i=n.lineNumber,o=n.column,r=i-1,s=!1;r>0&&!this.lines[r].isVisible();)r--,s=!0;if(0===r&&!this.lines[r].isVisible())return new Qt(1,1);var a=1+(0===r?0:this.prefixSumComputer.getAccumulatedValue(r-1));return s?this.lines[r].getViewPositionOfModelPosition(a,this.model.getLineMaxColumn(r+1)):this.lines[i-1].getViewPositionOfModelPosition(a,o);},e.prototype._getViewLineNumberForModelPosition=function(e,t){var n=e-1;if(this.lines[n].isVisible()){var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,t);}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;var o=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1));},e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),o=new Ab(),r=0,s=i.length;rt.id?1:0:n;});for(var d=[],h=0,p=null,f=0,g=r.length;f0&&(r=this.wrappedIndent+r),r;},e.prototype.getViewLineLength=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n)-i;return n>0&&(o=this.wrappedIndent.length+o),o;},e.prototype.getViewLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this.wrappedIndentLength+1:1;},e.prototype.getViewLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1;},e.prototype.getViewLineData=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});n>0&&(r=this.wrappedIndent+r);var s=n>0?this.wrappedIndentLength+1:1,a=r.length+1,u=n+10&&(l=this.wrappedIndentLength);var c=e.getLineTokens(t);return new Eu(r,u,s,a,c.sliceAndInflate(i,o,l));},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=n;a0&&(n0&&(o+=this.wrappedIndentLength),new Qt(e+i,o);},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this.positionMapper.getOutputPositionOfInputOffset(t-1).outputLineIndex;},e;}();function Ob(e,t,n,i,o,r,s){var a=e.createLineMapping(t,n,i,o,r);return null===a?s?Ib.INSTANCE:Nb.INSTANCE:new kb(a,s);}var Db=function(){function e(e){this._lines=e;}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e);},e.prototype._validRange=function(e){return this._lines.model.validateRange(e);},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e);},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e);},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t);},e.prototype.validateViewRange=function(e,t){return this._validRange(t);},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e);},e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e);},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t);},e;}(),Rb=function(){function e(e){this.model=e;}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new Db(this);},e.prototype.getHiddenAreas=function(){return[];},e.prototype.setHiddenAreas=function(e){return!1;},e.prototype.setTabSize=function(e){return!1;},e.prototype.setWrappingSettings=function(e,t,n){return!1;},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,n){return new cg(t,n);},e.prototype.onModelLinesInserted=function(e,t,n,i){return new dg(t,n);},e.prototype.onModelLineChanged=function(e,t,n){return[!1,new lg(t,t),null,null];},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){return this.model.getLineCount();},e.prototype.warmUpLookupCache=function(e,t){},e.prototype.getActiveIndentGuide=function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0};},e.prototype.getViewLinesIndentGuides=function(e,t){for(var n=t-e+1,i=new Array(n),o=0;o=t)return void(n>s&&(o[o.length-1]=n));o.push(i,t,n);}else this.result[e]=[i,t,n];},e;}(),Mb=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Pb=function(e){function t(t,n,i){for(var o=e.call(this,0)||this,r=0;r=12352&&t<=12543||t>=13312&&t<=19903||t>=19968&&t<=40959?4:e.prototype.get.call(this,t);},t;}(Da),Fb=function(){function e(e,t,n){this.classifier=new Pb(e,t,n);}return e.nextVisibleColumn=function(e,t,n,i){return e=+e,t=+t,i=+i,n?e+(t-e%t):e+i;},e.prototype.createLineMapping=function(t,n,i,o,r){if(-1===i)return null;n=+n,i=+i,o=+o;var s=0,a="",u=-1;if(0!==(r=+r)&&-1!==(u=lo(t))){a=t.substring(0,u);for(var l=0;li&&(a="",s=0);}var d=this.classifier,h=0,p=[],f=0,g=0,m=-1,_=0,v=-1,y=0,b=t.length;for(l=0;l0){var x=t.charCodeAt(l-1);1!==d.get(x)&&(m=l,_=s);}var E=1;if(To(C)&&(E=o),(g=e.nextVisibleColumn(g,n,w,E))>i&&0!==l){var L=void 0,T=void 0;-1!==m&&_<=i?(L=m,T=_):-1!==v&&y<=i?(L=v,T=y):(L=l,T=s),p[f++]=L-h,h=L,g=e.nextVisibleColumn(T,n,w,E),m=-1,_=0,v=-1,y=0;}if(-1!==m&&(_=e.nextVisibleColumn(_,n,w,E)),-1!==v&&(y=e.nextVisibleColumn(y,n,w,E)),2===S&&(0===r||l>=u)&&(m=l+1,_=s),4===S&&l=2&&e.viewportStartLineTrackedRange){var g=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(g){var m=e.coordinatesConverter.convertModelPositionToViewPosition(g.getStartPosition()),_=e.viewLayout.getVerticalOffsetForLineNumber(m.lineNumber);e.viewLayout.setScrollPositionNow({scrollTop:_+e.viewportStartLineDelta});}}})),this._register(this.model.onDidChangeTokens(function(t){for(var n=[],i=0,o=t.ranges.length;ia||(r0&&s[u-1]===s[u]||(a+=this.model.getLineContent(s[u])+o);return a;}var l=[];for(u=0;u'+this._getHTMLToCopy(n,r)+"";},t.prototype._getHTMLToCopy=function(e,t){for(var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),a="",u=n;u<=o;u++){var l=this.model.getLineTokens(u),c=l.getLineContent(),d=u===n?i-1:0,h=u===o?r-1:c.length;a+=""===c?"
":bb(c,l.inflate(),t,d,h,s);}return a;},t.prototype._getColorMap=function(){var e=Ls.getColorMap(),t=["#000000"];if(e)for(var n=1,i=e.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},qb=function(e,t){return function(n,i){t(n,i,e);};},Gb=0,$b="showUnused",Yb=function(){function e(e,t,n,i,o,r){this.model=e,this.viewModel=t,this.cursor=n,this.view=i,this.hasRealView=o,this.listenersToRemove=r;}return e.prototype.dispose=function(){f(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.cursor.dispose(),this.viewModel.dispose();},e;}(),Xb=function(e){function t(t,n,i,o,r,s,u,l,c){var d,h=e.call(this)||this;h._onDidDispose=h._register(new N()),h.onDidDispose=h._onDidDispose.event,h._onDidChangeModelContent=h._register(new N()),h.onDidChangeModelContent=h._onDidChangeModelContent.event,h._onDidChangeModelLanguage=h._register(new N()),h.onDidChangeModelLanguage=h._onDidChangeModelLanguage.event,h._onDidChangeModelLanguageConfiguration=h._register(new N()),h.onDidChangeModelLanguageConfiguration=h._onDidChangeModelLanguageConfiguration.event,h._onDidChangeModelOptions=h._register(new N()),h.onDidChangeModelOptions=h._onDidChangeModelOptions.event,h._onDidChangeModelDecorations=h._register(new N()),h.onDidChangeModelDecorations=h._onDidChangeModelDecorations.event,h._onDidChangeConfiguration=h._register(new N()),h.onDidChangeConfiguration=h._onDidChangeConfiguration.event,h._onDidChangeModel=h._register(new N()),h.onDidChangeModel=h._onDidChangeModel.event,h._onDidChangeCursorPosition=h._register(new N()),h.onDidChangeCursorPosition=h._onDidChangeCursorPosition.event,h._onDidChangeCursorSelection=h._register(new N()),h.onDidChangeCursorSelection=h._onDidChangeCursorSelection.event,h._onDidAttemptReadOnlyEdit=h._register(new N()),h.onDidAttemptReadOnlyEdit=h._onDidAttemptReadOnlyEdit.event,h._onDidLayoutChange=h._register(new N()),h.onDidLayoutChange=h._onDidLayoutChange.event,h._editorTextFocus=h._register(new Zb()),h.onDidFocusEditorText=h._editorTextFocus.onDidChangeToTrue,h.onDidBlurEditorText=h._editorTextFocus.onDidChangeToFalse,h._editorWidgetFocus=h._register(new Zb()),h.onDidFocusEditorWidget=h._editorWidgetFocus.onDidChangeToTrue,h.onDidBlurEditorWidget=h._editorWidgetFocus.onDidChangeToFalse,h._onWillType=h._register(new N()),h.onWillType=h._onWillType.event,h._onDidType=h._register(new N()),h.onDidType=h._onDidType.event,h._onCompositionStart=h._register(new N()),h.onCompositionStart=h._onCompositionStart.event,h._onCompositionEnd=h._register(new N()),h.onCompositionEnd=h._onCompositionEnd.event,h._onDidPaste=h._register(new N()),h.onDidPaste=h._onDidPaste.event,h._onMouseUp=h._register(new N()),h.onMouseUp=h._onMouseUp.event,h._onMouseDown=h._register(new N()),h.onMouseDown=h._onMouseDown.event,h._onMouseDrag=h._register(new N()),h.onMouseDrag=h._onMouseDrag.event,h._onMouseDrop=h._register(new N()),h.onMouseDrop=h._onMouseDrop.event,h._onContextMenu=h._register(new N()),h.onContextMenu=h._onContextMenu.event,h._onMouseMove=h._register(new N()),h.onMouseMove=h._onMouseMove.event,h._onMouseLeave=h._register(new N()),h.onMouseLeave=h._onMouseLeave.event,h._onKeyUp=h._register(new N()),h.onKeyUp=h._onKeyUp.event,h._onKeyDown=h._register(new N()),h.onKeyDown=h._onKeyDown.event,h._onDidScrollChange=h._register(new N()),h.onDidScrollChange=h._onDidScrollChange.event,h._onDidChangeViewZones=h._register(new N()),h.onDidChangeViewZones=h._onDidChangeViewZones.event,h._domElement=t,h._id=++Gb,h._decorationTypeKeysToIds={},h._decorationTypeSubtypes={},h.isSimpleWidget=i.isSimpleWidget||!1,h._telemetryData=i.telemetryData||null,n=n||{},h._configuration=h._register(h._createConfiguration(n)),h._register(h._configuration.onDidChange(function(e){h._onDidChangeConfiguration.fire(e),e.layoutInfo&&h._onDidLayoutChange.fire(h._configuration.editor.layoutInfo),h._configuration.editor.showUnused?h._domElement.classList.add($b):h._domElement.classList.remove($b);})),h._contextKeyService=h._register(u.createScoped(h._domElement)),h._notificationService=c,h._codeEditorService=r,h._commandService=s,h._themeService=l,h._register(new Qb(h,h._contextKeyService)),h._register(new Jb(h,h._contextKeyService)),h._instantiationService=o.createChild(new jb([bl,h._contextKeyService])),h._attachModel(null),h._contributions={},h._actions={},h._focusTracker=new eC(t),h._focusTracker.onChange(function(){h._editorWidgetFocus.setValue(h._focusTracker.hasFocus());}),h._contentWidgets={},h._overlayWidgets={};for(var p=0,f=(d=Array.isArray(i.contributions)?i.contributions:Vc.getEditorContributions()).length;p1),this._hasNonEmptySelection.set(e.some(function(e){return!e.isEmpty();}))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset());},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus());},t.prototype._updateFromModel=function(){var e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()));},t;}(y),Jb=function(e){function t(t,n){var i=e.call(this)||this;i._editor=t,i._langId=A_.languageId.bindTo(n),i._hasCompletionItemProvider=A_.hasCompletionItemProvider.bindTo(n),i._hasCodeActionsProvider=A_.hasCodeActionsProvider.bindTo(n),i._hasCodeLensProvider=A_.hasCodeLensProvider.bindTo(n),i._hasDefinitionProvider=A_.hasDefinitionProvider.bindTo(n),i._hasImplementationProvider=A_.hasImplementationProvider.bindTo(n),i._hasTypeDefinitionProvider=A_.hasTypeDefinitionProvider.bindTo(n),i._hasHoverProvider=A_.hasHoverProvider.bindTo(n),i._hasDocumentHighlightProvider=A_.hasDocumentHighlightProvider.bindTo(n),i._hasDocumentSymbolProvider=A_.hasDocumentSymbolProvider.bindTo(n),i._hasReferenceProvider=A_.hasReferenceProvider.bindTo(n),i._hasRenameProvider=A_.hasRenameProvider.bindTo(n),i._hasDocumentFormattingProvider=A_.hasDocumentFormattingProvider.bindTo(n),i._hasDocumentSelectionFormattingProvider=A_.hasDocumentSelectionFormattingProvider.bindTo(n),i._hasSignatureHelpProvider=A_.hasSignatureHelpProvider.bindTo(n),i._isInWalkThrough=A_.isInEmbeddedEditor.bindTo(n);var o=function(){return i._update();};return i._register(t.onDidChangeModel(o)),i._register(t.onDidChangeModelLanguage(o)),i._register(cs.onDidChange(o)),i._register(ys.onDidChange(o)),i._register(vs.onDidChange(o)),i._register(gs.onDidChange(o)),i._register(ms.onDidChange(o)),i._register(_s.onDidChange(o)),i._register(hs.onDidChange(o)),i._register(fs.onDidChange(o)),i._register(ps.onDidChange(o)),i._register(us.onDidChange(o)),i._register(ls.onDidChange(o)),i._register(bs.onDidChange(o)),i._register(Cs.onDidChange(o)),i._register(ds.onDidChange(o)),o(),i;}return zb(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype.reset=function(){this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset();},t.prototype._update=function(){var e=this._editor.getModel();e?(this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(cs.has(e)),this._hasCodeActionsProvider.set(ys.has(e)),this._hasCodeLensProvider.set(vs.has(e)),this._hasDefinitionProvider.set(gs.has(e)),this._hasImplementationProvider.set(ms.has(e)),this._hasTypeDefinitionProvider.set(_s.has(e)),this._hasHoverProvider.set(hs.has(e)),this._hasDocumentHighlightProvider.set(fs.has(e)),this._hasDocumentSymbolProvider.set(ps.has(e)),this._hasReferenceProvider.set(us.has(e)),this._hasRenameProvider.set(ls.has(e)),this._hasSignatureHelpProvider.set(ds.has(e)),this._hasDocumentFormattingProvider.set(bs.has(e)||Cs.has(e)),this._hasDocumentSelectionFormattingProvider.set(Cs.has(e)),this._isInWalkThrough.set(e.uri.scheme===Hi.walkThroughSnippet)):this.reset();},t;}(y),eC=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new N()),n.onChange=n._onChange.event,n._hasFocus=!1,n._domFocusTracker=n._register(Bi(t)),n._register(n._domFocusTracker.onDidFocus(function(){n._hasFocus=!0,n._onChange.fire(void 0);})),n._register(n._domFocusTracker.onDidBlur(function(){n._hasFocus=!1,n._onChange.fire(void 0);})),n;}return zb(t,e),t.prototype.hasFocus=function(){return this._hasFocus;},t;}(y),tC=encodeURIComponent("");function iC(e){return tC+encodeURIComponent(e.toString())+nC;}var oC=encodeURIComponent('');Vd(function(e,t){var n=e.getColor(Mf);n&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+n+"; }");var i=e.getColor(Af);i&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+iC(i)+'") repeat-x bottom left; }');var o=e.getColor(Ff);o&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+o+"; }");var r=e.getColor(Pf);r&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+iC(r)+'") repeat-x bottom left; }');var s=e.getColor(Bf);s&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+s+"; }");var a=e.getColor(Wf);a&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+iC(a)+'") repeat-x bottom left; }');var u=e.getColor(Hf);u&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+u+"; }");var l=e.getColor(Vf);l&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+(oC+encodeURIComponent(l.toString())+rC)+'") no-repeat bottom left; }');var c=e.getColor(jf);c&&t.addRule("."+$b+" .monaco-editor .squiggly-inline-unnecessary { opacity: "+c.rgba.a+"; will-change: opacity; }");var d=e.getColor(Uf);d&&t.addRule("."+$b+" .monaco-editor .squiggly-unnecessary { border-bottom: 2px dashed "+d+"; }");});n("./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffEditor.css"),n("./node_modules/monaco-editor/esm/vs/base/browser/ui/sash/sash.css");var sC=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),aC=!1,uC=function(e){function t(t,n,i){void 0===i&&(i={});var r=e.call(this)||this;return r._state=3,r._onDidEnablementChange=r._register(new N()),r.onDidEnablementChange=r._onDidEnablementChange.event,r._onDidStart=r._register(new N()),r.onDidStart=r._onDidStart.event,r._onDidChange=r._register(new N()),r.onDidChange=r._onDidChange.event,r._onDidReset=r._register(new N()),r.onDidReset=r._onDidReset.event,r._onDidEnd=r._register(new N()),r.onDidEnd=r._onDidEnd.event,r.linkedSash=void 0,r.orthogonalStartSashDisposables=[],r.orthogonalEndSashDisposables=[],r.el=Vi(t,ji(".monaco-sash")),o.d&&Xn(r.el,"mac"),r._register(Tn(r.el,"mousedown")(r.onMouseDown,r)),r._register(Tn(r.el,"dblclick")(r.onMouseDoubleClick,r)),cd.addTarget(r.el),r._register(Tn(r.el,ad.Start)(r.onTouchStart,r)),En&&Xn(r.el,"touch"),r.setOrientation(i.orientation||0),r.hidden=!1,r.layoutProvider=n,r.orthogonalStartSash=i.orthogonalStartSash,r.orthogonalEndSash=i.orthogonalEndSash,ei(r.el,"debug",aC),r;}return sC(t,e),Object.defineProperty(t.prototype,"state",{get:function(){return this._state;},set:function(e){this._state!==e&&(ei(this.el,"disabled",0===e),ei(this.el,"minimum",1===e),ei(this.el,"maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e));},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orthogonalStartSash",{get:function(){return this._orthogonalStartSash;},set:function(e){this.orthogonalStartSashDisposables=f(this.orthogonalStartSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange,this,this.orthogonalStartSashDisposables),this.onOrthogonalStartSashEnablementChange(e.state)):this.onOrthogonalStartSashEnablementChange(0),this._orthogonalStartSash=e;},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orthogonalEndSash",{get:function(){return this._orthogonalEndSash;},set:function(e){this.orthogonalEndSashDisposables=f(this.orthogonalEndSashDisposables),e?(e.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange,this,this.orthogonalEndSashDisposables),this.onOrthogonalEndSashEnablementChange(e.state)):this.onOrthogonalEndSashEnablementChange(0),this._orthogonalEndSash=e;},enumerable:!0,configurable:!0}),t.prototype.setOrientation=function(e){this.orientation=e,1===this.orientation?(Xn(this.el,"horizontal"),Qn(this.el,"vertical")):(Qn(this.el,"horizontal"),Xn(this.el,"vertical")),this.layoutProvider&&this.layout();},t.prototype.onMouseDown=function(e){var t=this;Fi.stop(e,!1);var n=!1;if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),!e.__orthogonalSashEvent){var i=void 0;0===this.orientation?e.offsetY<=4?i=this.orthogonalStartSash:e.offsetY>=this.el.clientHeight-4&&(i=this.orthogonalEndSash):e.offsetX<=4?i=this.orthogonalStartSash:e.offsetX>=this.el.clientWidth-4&&(i=this.orthogonalEndSash),i&&(n=!0,e.__orthogonalSashEvent=!0,i.onMouseDown(e));}if(this.state){for(var r=0,s=Gi("iframe");r0){n=o[0].getStartPosition();var r=t.getTopForPosition(n.lineNumber,n.column);i=t.getScrollTop()-r;}}return new e(n,i);},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta);}},e;}(),dC=(n("./node_modules/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css"),n("./node_modules/monaco-editor/esm/vs/base/browser/ui/actionbar/actionbar.css"),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}()),hC=function(e){function t(t,n,i){var o=e.call(this)||this;return o.options=i,o._context=t||o,o._action=n,n instanceof wl&&o._register(n.onDidChange(function(e){o.element&&o.handleActionChangeEvent(e);})),o;}return dC(t,e),t.prototype.handleActionChangeEvent=function(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip();},Object.defineProperty(t.prototype,"actionRunner",{get:function(){return this._actionRunner;},set:function(e){this._actionRunner=e;},enumerable:!0,configurable:!0}),t.prototype.getAction=function(){return this._action;},t.prototype.isEnabled=function(){return this._action.enabled;},t.prototype.setActionContext=function(e){this._context=e;},t.prototype.render=function(e){var t=this;this.element=e,cd.addTarget(e);var n=this.options&&this.options.draggable;n&&(e.draggable=!0),this._register(ni(this.element,ad.Tap,function(e){return t.onClick(e);})),this._register(ni(this.element,Pi.MOUSE_DOWN,function(e){n||Fi.stop(e,!0);var i=e;t._action.enabled&&0===i.button&&Xn(t.element,"active");})),this._register(ni(this.element,Pi.CLICK,function(e){Fi.stop(e,!0),t.options&&t.options.isMenu?t.onClick(e):o.h(function(){return t.onClick(e);});})),this._register(ni(this.element,Pi.DBLCLICK,function(e){Fi.stop(e,!0);})),[Pi.MOUSE_UP,Pi.MOUSE_OUT].forEach(function(e){t._register(ni(t.element,e,function(e){Fi.stop(e),Qn(t.element,"active");}));});},t.prototype.onClick=function(e){var t;Fi.stop(e,!0),Ce(this._context)?t=e:_e(t=this._context)&&(t.event=e),this._actionRunner.run(this._action,t);},t.prototype.focus=function(){this.element&&(this.element.focus(),Xn(this.element,"focused"));},t.prototype.blur=function(){this.element&&(this.element.blur(),Qn(this.element,"focused"));},t.prototype.updateEnabled=function(){},t.prototype.updateLabel=function(){},t.prototype.updateTooltip=function(){},t.prototype.updateClass=function(){},t.prototype.updateChecked=function(){},t.prototype.dispose=function(){this.element&&(Kn(this.element),this.element=null),e.prototype.dispose.call(this);},t;}(y),pC=function(e){function t(n){var i=e.call(this,t.ID,n,n?"separator text":"separator")||this;return i.checked=!1,i.radio=!1,i.enabled=!1,i;}return dC(t,e),t.ID="vs.actions.separator",t;}(wl),fC=function(e){function t(t,n,i){void 0===i&&(i={});var o=e.call(this,t,n,i)||this;return o.options=i,o.options.icon=void 0!==i.icon&&i.icon,o.options.label=void 0===i.label||i.label,o.cssClass="",o;}return dC(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.label=Vi(this.element,ji("a.action-label")),this._action.id===pC.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button"),this.options.label&&this.options.keybinding&&(Vi(this.element,ji("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked();},t.prototype.focus=function(){e.prototype.focus.call(this),this.label.focus();},t.prototype.updateLabel=function(){this.options.label&&(this.label.textContent=this.getAction().label);},t.prototype.updateTooltip=function(){var e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=ie({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&(this.label.title=e);},t.prototype.updateClass=function(){this.cssClass&&Jn(this.label,this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,Xn(this.label,"icon"),this.cssClass&&Zn(this.label,this.cssClass),this.updateEnabled()):Qn(this.label,"icon");},t.prototype.updateEnabled=function(){this.getAction().enabled?(this.label.removeAttribute("aria-disabled"),Qn(this.element,"disabled"),Qn(this.label,"disabled"),this.label.tabIndex=0):(this.label.setAttribute("aria-disabled","true"),Xn(this.element,"disabled"),Xn(this.label,"disabled"),qi(this.label));},t.prototype.updateChecked=function(){this.getAction().checked?Xn(this.label,"checked"):Qn(this.label,"checked");},t;}(hC),gC={orientation:0,context:null,triggerKeys:{keys:[3,10],keyDown:!1}},mC=function(e){function t(t,n){void 0===n&&(n=gC);var i,o,r=e.call(this)||this;switch(r._onDidBlur=r._register(new N()),r._onDidCancel=r._register(new N()),r._onDidRun=r._register(new N()),r._onDidBeforeRun=r._register(new N()),r.options=n,r._context=n.context,r._actionRunner=r.options.actionRunner,r.options.triggerKeys||(r.options.triggerKeys=gC.triggerKeys),r._actionRunner||(r._actionRunner=new Sl(),r._register(r._actionRunner)),r._register(r._actionRunner.onDidRun(function(e){return r._onDidRun.fire(e);})),r._register(r._actionRunner.onDidBeforeRun(function(e){return r._onDidBeforeRun.fire(e);})),r.items=[],r.focusedItem=void 0,r.domNode=document.createElement("div"),r.domNode.className="monaco-action-bar",!1!==n.animated&&Xn(r.domNode,"animated"),r.options.orientation){case 0:i=15,o=17;break;case 1:i=17,o=15,r.domNode.className+=" reverse";break;case 2:i=16,o=18,r.domNode.className+=" vertical";break;case 3:i=18,o=16,r.domNode.className+=" vertical reverse";}return r._register(ni(r.domNode,Pi.KEY_DOWN,function(e){var t=new Rn(e),n=!0;t.equals(i)?r.focusPrevious():t.equals(o)?r.focusNext():t.equals(9)?r.cancel():r.isTriggerKeyEvent(t)?r.options.triggerKeys&&r.options.triggerKeys.keyDown&&r.doTrigger(t):n=!1,n&&(t.preventDefault(),t.stopPropagation());})),r._register(ni(r.domNode,Pi.KEY_UP,function(e){var t=new Rn(e);r.isTriggerKeyEvent(t)?(r.options.triggerKeys.keyDown||r.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&r.updateFocusedItem();})),r.focusTracker=r._register(Bi(r.domNode)),r._register(r.focusTracker.onDidBlur(function(){document.activeElement!==r.domNode&&ki(document.activeElement,r.domNode)||(r._onDidBlur.fire(),r.focusedItem=void 0);})),r._register(r.focusTracker.onDidFocus(function(){return r.updateFocusedItem();})),r.actionsList=document.createElement("ul"),r.actionsList.className="actions-container",r.actionsList.setAttribute("role","toolbar"),r.options.ariaLabel&&r.actionsList.setAttribute("aria-label",r.options.ariaLabel),r.domNode.appendChild(r.actionsList),t.appendChild(r.domNode),r;}return dC(t,e),Object.defineProperty(t.prototype,"onDidBlur",{get:function(){return this._onDidBlur.event;},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidCancel",{get:function(){return this._onDidCancel.event;},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidRun",{get:function(){return this._onDidRun.event;},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onDidBeforeRun",{get:function(){return this._onDidBeforeRun.event;},enumerable:!0,configurable:!0}),t.prototype.isTriggerKeyEvent=function(e){var t=!1;return this.options.triggerKeys&&this.options.triggerKeys.keys.forEach(function(n){t=t||e.equals(n);}),t;},t.prototype.updateFocusedItem=function(){for(var e=0;e=n.actionsList.children.length?(n.actionsList.appendChild(i),n.items.push(r)):(n.actionsList.insertBefore(i,n.actionsList.children[o]),n.items.splice(o,0,r),o++);});},t.prototype.clear=function(){this.items=f(this.items),zn(this.actionsList);},t.prototype.isEmpty=function(){return 0===this.items.length;},t.prototype.focus=function(e){e&&void 0===this.focusedItem?(this.focusedItem=this.items.length-1,this.focusNext()):this.updateFocus();},t.prototype.focusNext=function(){void 0===this.focusedItem&&(this.focusedItem=this.items.length-1);var e,t=this.focusedItem;do{this.focusedItem=(this.focusedItem+1)%this.items.length,e=this.items[this.focusedItem];}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus();},t.prototype.focusPrevious=function(){void 0===this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do{this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.items.length-1),e=this.items[this.focusedItem];}while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus(!0);},t.prototype.updateFocus=function(e){void 0===this.focusedItem&&this.actionsList.focus();for(var t=0;t0){var v=e[r-1];m=0===v.originalEndLineNumber?v.originalStartLineNumber+1:v.originalEndLineNumber+1,_=0===v.modifiedEndLineNumber?v.modifiedStartLineNumber+1:v.modifiedEndLineNumber+1;}var y=f-3+1,b=g-3+1;if(yS)T+=L=S-T,I+=L;if(I>x)T+=L=x-I,I+=L;h[p++]=new vC(C,T,w,I),i[o++]=new yC(h);}var N=i[0].entries,k=[],O=0;for(r=1,s=i.length;rh)&&(h=v),0!==y&&(0===p||yf)&&(f=b);}var C=document.createElement("div");C.className="diff-review-row";var w=document.createElement("div");w.className="diff-review-cell diff-review-summary";var S=h-d+1,x=f-p+1;w.appendChild(document.createTextNode(u+1+"/"+this._diffs.length+": @@ -"+d+","+S+" +"+p+","+x+" @@")),C.setAttribute("data-line",String(p));var E=function(e){return 0===e?ie("no_lines","no lines"):1===e?ie("one_line","1 line"):ie("more_lines","{0} lines",e);},L=E(S),T=E(x);C.setAttribute("aria-label",ie({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines", "1 line" or "X lines", localized separately.']},"Difference {0} of {1}: original {2}, {3}, modified {4}, {5}",u+1,this._diffs.length,d,L,p,T)),C.appendChild(w),C.setAttribute("role","listitem"),c.appendChild(C);var I=p;for(g=0,m=l.length;g=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},LC=function(e,t){return function(n,i){t(n,i,e);};},TC=function(){function e(){this._zones=[],this._zonesMap={},this._decorations=[];}return e.prototype.getForeignViewZones=function(e){var t=this;return e.filter(function(e){return!t._zonesMap[String(e.id)];});},e.prototype.clean=function(e){var t=this;this._zones.length>0&&e.changeViewZones(function(e){for(var n=0,i=t._zones.length;n0?o/n:0;return{height:Math.max(0,Math.floor(e.contentHeight*r)),top:Math.floor(t*r)};},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._width;},getHeight:function(){return e._height-e._reviewHeight;},getContainerDomNode:function(){return e._containerDomElement;},relayoutEditors:function(){e._doLayout();},getOriginalEditor:function(){return e.originalEditor;},getModifiedEditor:function(){return e.modifiedEditor;}};},t.prototype._setStrategy=function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getTheme()),this._diffComputationResult&&this._updateDecorations(),this._measureDomElement(!0);},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){var n=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===n.length||e=a?i=r+1:(i=r,o=r);}return n[i];},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.originalStartLineNumber;});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=o?i+Math.min(s,r):i+r-o+s;},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.modifiedStartLineNumber;});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=r?n+Math.min(s,o):n+o-r+s;},t.prototype.getDiffLineInformationForOriginal=function(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null;},t.prototype.getDiffLineInformationForModified=function(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null;},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=EC([LC(2,Os),LC(3,bl),LC(4,ln),LC(5,pn),LC(6,Rd),LC(7,sc)],t);}(y),kC=function(e){function t(t){var n=e.call(this)||this;return n._dataSource=t,n;}return xC(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(Jp)||Zp).transparent(2),n=(e.getColor(ef)||Qp).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i;},t.prototype.getEditorsDiffDecorations=function(e,t,n,i,o,r,s){o=o.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber;}),i=i.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber;});var a=this._getViewZones(e,i,o,r,s,n),u=this._getOriginalEditorDecorations(e,t,n,r,s),l=this._getModifiedEditorDecorations(e,t,n,r,s);return{original:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.modified}};},t;}(y),OC=function(){function e(e){this._source=e,this._index=-1,this.advance();}return e.prototype.advance=function(){this._index++,this._index0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines);}e.push(t);},l=new OC(this.modifiedForeignVZ),c=new OC(this.originalForeignVZ),d=0,h=this.lineChanges.length;d<=h;d++){var p=d0?-1:0),o=p.modifiedStartLineNumber+(p.modifiedEndLineNumber>0?-1:0),n=p.originalEndLineNumber>0?p.originalEndLineNumber-p.originalStartLineNumber+1:0,t=p.modifiedEndLineNumber>0?p.modifiedEndLineNumber-p.modifiedStartLineNumber+1:0,r=Math.max(p.originalStartLineNumber,p.originalEndLineNumber),s=Math.max(p.modifiedStartLineNumber,p.modifiedEndLineNumber)):(r=i+=1e7+n,s=o+=1e7+t);for(var f,g=[],m=[];l.current&&l.current.afterLineNumber<=s;){var _=void 0;_=l.current.afterLineNumber<=o?i-o+l.current.afterLineNumber:r;var v=null;p&&p.modifiedStartLineNumber<=l.current.afterLineNumber&&l.current.afterLineNumber<=p.modifiedEndLineNumber&&(v=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),g.push({afterLineNumber:_,heightInLines:l.current.heightInLines,domNode:null,marginDomNode:v}),l.advance();}for(;c.current&&c.current.afterLineNumber<=r;){_=void 0;_=c.current.afterLineNumber<=i?o-i+c.current.afterLineNumber:s,m.push({afterLineNumber:_,heightInLines:c.current.heightInLines,domNode:null}),c.advance();}if(null!==p&&BC(p))(f=this._produceOriginalFromDiff(p,n,t))&&g.push(f);if(null!==p&&VC(p))(f=this._produceModifiedFromDiff(p,n,t))&&m.push(f);var y=0,b=0;for(g=g.sort(a),m=m.sort(a);y=w.heightInLines?(C.heightInLines-=w.heightInLines,b++):(w.heightInLines-=C.heightInLines,y++);}for(;y2*t.MINIMUM_EDITOR_WIDTH?(in-t.MINIMUM_EDITOR_WIDTH&&(i=n-t.MINIMUM_EDITOR_WIDTH)):i=o,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition;},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition;},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth()-NC.ENTIRE_DIFF_OVERVIEW_WIDTH,n=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=n/t,this._dataSource.relayoutEditors();},t.prototype.onSashDragEnd=function(){this._sash.layout();},t.prototype.onSashReset=function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout();},t.prototype.getVerticalSashTop=function(e){return 0;},t.prototype.getVerticalSashLeft=function(e){return this._sashPosition;},t.prototype.getVerticalSashHeight=function(e){return this._dataSource.getHeight();},t.prototype._getViewZones=function(e,t,n,i,o){return new PC(e,t,n).getViewZones();},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=i.getModel(),u=0,l=e.length;ut?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null;},t.prototype._produceModifiedFromDiff=function(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null;},t;}(DC),FC=function(e){function t(t,n){var i=e.call(this,t)||this;return i.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,i._register(t.getOriginalEditor().onDidLayoutChange(function(e){i.decorationsLeft!==e.decorationsLeft&&(i.decorationsLeft=e.decorationsLeft,t.relayoutEditors());})),i;}return xC(t,e),t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,n,i,o,r){return new WC(e,t,n,i,o,r).getViewZones();},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=0,u=e.length;a']);}h+=this.modifiedEditorConfiguration.viewInfo.scrollBeyondLastColumn;var g=document.createElement("div");g.className="view-lines line-delete",g.innerHTML=a.build(),qc.applyFontInfoSlow(g,this.modifiedEditorConfiguration.fontInfo);var m=document.createElement("div");return m.className="inline-deleted-margin-view-zone",m.innerHTML=u.join(""),qc.applyFontInfoSlow(m,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:h*d,domNode:g,marginDomNode:m};},t.prototype._renderOriginalLine=function(e,t,n,i,o,r,s){var a=t.getLineTokens(o),u=a.getLineContent(),l=lu.filter(r,o,1,u.length+1);s.appendASCIIString('
');var c=Lu.isBasicASCII(u,t.mightContainNonBasicASCII()),d=Lu.containsRTL(u,c,t.mightContainRTL()),h=_u(new fu(n.fontInfo.isMonospace&&!n.viewInfo.disableMonospaceOptimizations,n.fontInfo.canUseHalfwidthRightwardsArrow,u,!1,c,d,0,a,l,i,n.fontInfo.spaceWidth,n.viewInfo.stopRenderingLineAfter,n.viewInfo.renderWhitespace,n.viewInfo.renderControlCharacters,n.viewInfo.fontLigatures),s);s.appendASCIIString("
");var p=h.characterMapping.getAbsoluteOffsets();return p.length>0?p[p.length-1]:0;},t;}(DC);function BC(e){return e.modifiedEndLineNumber>0;}function VC(e){return e.originalEndLineNumber>0;}Vd(function(e,t){var n=e.getColor(Jp);n&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(ef);i&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+i+"; }"));var o=e.getColor(tf);o&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+o+"; }");var r=e.getColor(nf);r&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+r+"; }");var s=e.getColor(yp);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }");var a=e.getColor(of);a&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid "+a+"; }");});var HC=dn("themeService"),UC=dn("contextViewService"),jC=dn("contextMenuService"),zC=dn("keybindingService"),KC=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),qC=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},GC=function(e,t){return function(n,i){t(n,i,e);};},$C=0,YC=!1;function XC(){var e;YC||(YC=!0,e=document.body,(Ic=document.createElement("div")).className="monaco-aria-container",(Nc=document.createElement("div")).className="monaco-alert",Nc.setAttribute("role","alert"),Nc.setAttribute("aria-atomic","true"),Ic.appendChild(Nc),(kc=document.createElement("div")).className="monaco-status",kc.setAttribute("role","status"),kc.setAttribute("aria-atomic","true"),Ic.appendChild(kc),e.appendChild(Ic));}var ZC=function(e){function t(t,n,i,o,r,s,a,u,l){var c=this;return(n=n||{}).ariaLabel=n.ariaLabel||ie("editorViewAccessibleLabel","Editor content"),n.ariaLabel=n.ariaLabel+";"+(vn?ie("accessibilityHelpMessageIE","Press Ctrl+F1 for Accessibility Options."):ie("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")),c=e.call(this,t,n,{},i,o,r,s,u,l)||this,a instanceof yc&&(c._standaloneKeybindingService=a),XC(),c;}return KC(t,e),t.prototype.addCommand=function(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;var i="DYNAMIC_"+ ++$C,o=dl.deserialize(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,o),i;},t.prototype.createContextKey=function(e,t){return this._contextKeyService.createKey(e,t);},t.prototype.addAction=function(e){var t=this;if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),y.None;var n=e.id,i=e.label,o=dl.and(dl.equals("editorId",this.getId()),dl.deserialize(e.precondition)),r=e.keybindings,s=dl.and(o,dl.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,u=e.contextMenuOrder||0,l=function(){return Promise.resolve(e.run(t));},c=[],d=this.getId()+":"+n;if(c.push(Go.registerCommand(d,l)),a){var h={command:{id:d,title:i},when:o,group:a,order:u};c.push(kl.appendMenuItem(Il.EditorContext,h));}Array.isArray(r)&&(c=c.concat(r.map(function(e){return t._standaloneKeybindingService.addDynamicKeybinding(d,e,l,s);})));var p=new _b(d,i,i,o,l,this._contextKeyService);return this._actions[n]=p,c.push(m(function(){delete t._actions[n];})),g(c);},t=qC([GC(2,ln),GC(3,pn),GC(4,qo),GC(5,bl),GC(6,zC),GC(7,Rd),GC(8,sc)],t);}(Xb),QC=function(e){function t(t,n,i,o,r,s,a,u,l,c,d,h){var p=this;Tc(h,n,!1),"string"==typeof(n=n||{}).theme&&c.setTheme(n.theme);var f,g=n.model;if(delete n.model,(p=e.call(this,t,n,o,r,s,a,u,c,d)||this)._contextViewService=l,p._configurationService=h,p._register(i),void 0===g?(f=self.monaco.editor.createModel(n.value||"",n.language||"text/plain"),p._ownsModel=!0):(f=g,p._ownsModel=!1),p._attachModel(f),f){var m={oldModelUrl:null,newModelUrl:f.uri};p._onDidChangeModel.fire(m);}return p;}return KC(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype.updateOptions=function(t){Tc(this._configurationService,t,!1),e.prototype.updateOptions.call(this,t);},t.prototype._attachModel=function(t){e.prototype._attachModel.call(this,t),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode);},t.prototype._postDetachModelCleanup=function(t){e.prototype._postDetachModelCleanup.call(this,t),t&&this._ownsModel&&(t.dispose(),this._ownsModel=!1);},t=qC([GC(3,ln),GC(4,pn),GC(5,qo),GC(6,bl),GC(7,zC),GC(8,UC),GC(9,HC),GC(10,sc),GC(11,Fl)],t);}(ZC),JC=function(e){function t(t,n,i,o,r,s,a,u,l,c,d,h){var p=this;return Tc(h,n,!0),"string"==typeof(n=n||{}).theme&&(n.theme=c.setTheme(n.theme)),(p=e.call(this,t,n,u,r,o,l,c,d)||this)._contextViewService=a,p._configurationService=h,p._register(i),p._contextViewService.setContainer(p._containerDomElement),p;}return KC(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this);},t.prototype.updateOptions=function(t){Tc(this._configurationService,t,!0),e.prototype.updateOptions.call(this,t);},t.prototype._createInnerEditor=function(e,t,n){return e.createInstance(ZC,t,n);},t.prototype.getOriginalEditor=function(){return e.prototype.getOriginalEditor.call(this);},t.prototype.getModifiedEditor=function(){return e.prototype.getModifiedEditor.call(this);},t.prototype.addCommand=function(e,t,n){return this.getModifiedEditor().addCommand(e,t,n);},t.prototype.createContextKey=function(e,t){return this.getModifiedEditor().createContextKey(e,t);},t.prototype.addAction=function(e){return this.getModifiedEditor().addAction(e);},t=qC([GC(3,ln),GC(4,bl),GC(5,zC),GC(6,UC),GC(7,Os),GC(8,pn),GC(9,HC),GC(10,sc),GC(11,Fl)],t);}(NC),ew=dn("IWorkspaceEditService"),tw=dn("modeService"),nw=function(){function e(e){this._languageIdentifier=e;}return e.prototype.getId=function(){return this._languageIdentifier.language;},e;}(),iw="text/plain",ow="application/unknown",rw=[],sw=[],aw=[];function uw(e,t){void 0===t&&(t=!1);var n=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(Oo)>=0};}(e);rw.push(n),n.userConfigured?aw.push(n):sw.push(n),t&&!n.userConfigured&&rw.forEach(function(e){e.mime===n.mime||e.userConfigured||(n.extension&&e.extension===n.extension&&console.warn("Overwriting extension <<"+n.extension+">> to now point to mime <<"+n.mime+">>"),n.filename&&e.filename===n.filename&&console.warn("Overwriting filename <<"+n.filename+">> to now point to mime <<"+n.mime+">>"),n.filepattern&&e.filepattern===n.filepattern&&console.warn("Overwriting filepattern <<"+n.filepattern+">> to now point to mime <<"+n.mime+">>"),n.firstline&&e.firstline===n.firstline&&console.warn("Overwriting firstline <<"+n.firstline+">> to now point to mime <<"+n.mime+">>"));});}function lw(e,t){if(!e)return[ow];var n=Ao(e=e.toLowerCase()),i=cw(e,n,aw);if(i)return[i,iw];var o=cw(e,n,sw);if(o)return[o,iw];if(t){var r=function(e){No(e)&&(e=e.substr(1));if(e.length>0)for(var t=0;t0)return n.mime;}}return null;}(t);if(r)return[r,iw];}return[ow];}function cw(e,t,n){for(var i=null,o=null,r=null,s=n.length-1;s>=0;s--){var a=n[s];if(t===a.filenameLowercase){i=a;break;}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){var u=a.filepatternOnPath?e:t;zr(a.filepatternLowercase,u)&&(o=a);}a.extension&&(!r||a.extension.length>r.extension.length)&&ao(t,a.extensionLowercase)&&(r=a);}return i?i.mime:o?o.mime:r?r.mime:null;}var dw=new(function(){function e(){this._onDidAddLanguages=new N(),this.onDidAddLanguages=this._onDidAddLanguages.event,this._languages=[];}return e.prototype.registerLanguage=function(e){this._languages.push(e),this._onDidAddLanguages.fire([e]);},e.prototype.getLanguages=function(){return this._languages.slice(0);},e;}())();Au.add("editor.modesRegistry",dw);var hw="plaintext",pw=new ts(hw,1);dw.registerLanguage({id:hw,extensions:[".txt",".gitignore"],aliases:[ie("plainText.alias","Plain Text"),"text"],mimetypes:["text/plain"]}),la.register(pw,{brackets:[["(",")"],["[","]"],["{","}"]]});var fw,gw,mw=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),_w=Object.prototype.hasOwnProperty,vw=function(e){function t(t,n){void 0===t&&(t=!0),void 0===n&&(n=!1);var i=e.call(this)||this;return i._onDidChange=i._register(new N()),i.onDidChange=i._onDidChange.event,i._nextLanguageId=1,i._languages={},i._mimeTypesMap={},i._nameMap={},i._lowercaseNameMap={},i._languageIds=[],i._warnOnOverwrite=n,t&&(i._registerLanguages(dw.getLanguages()),i._register(dw.onDidAddLanguages(function(e){return i._registerLanguages(e);}))),i;}return mw(t,e),t.prototype._registerLanguages=function(e){var t=this;if(0!==e.length){for(var n=0;n0&&((n=e.mimetypes).push.apply(n,t.mimetypes),r=t.mimetypes[0]),r||(r="text/x-"+o,e.mimetypes.push(r)),Array.isArray(t.extensions))for(var s=0,u=t.extensions;s0){var g=t.firstLine;"^"!==g.charAt(0)&&(g="^"+g);try{var m=new RegExp(g);"^"!==(i=m).source&&"^$"!==i.source&&"$"!==i.source&&"^\\s*$"!==i.source&&i.exec("")&&0===i.lastIndex||uw({id:o,mime:r,firstline:m},this._warnOnOverwrite);}catch(e){a(e);}}e.aliases.push(o);var _=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(_=0===t.aliases.length?[null]:t.aliases),null!==_)for(var v=0;v<_.length;v++){var y=_[v];y&&0!==y.length&&e.aliases.push(y);}var b=null!==_&&_.length>0;if(b&&null===_[0]);else{var C=(b?_[0]:null)||o;!b&&e.name||(e.name=C);}t.configuration&&e.configurationFiles.push(t.configuration);},t.prototype.isRegisteredMode=function(e){return!!_w.call(this._mimeTypesMap,e)||_w.call(this._languages,e);},t.prototype.getModeIdForLanguageNameLowercase=function(e){return _w.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null;},t.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map(function(e){return e.trim();}).map(function(e){return _w.call(t._mimeTypesMap,e)?t._mimeTypesMap[e].language:e;}).filter(function(e){return _w.call(t._languages,e);}):[];},t.prototype.getLanguageIdentifier=function(e){if("vs.editor.nullMode"===e||0===e)return Is;var t;if("string"==typeof e)t=e;else if(!(t=this._languageIds[e]))return null;return _w.call(this._languages,t)?this._languages[t].identifier:null;},t.prototype.getModeIdsFromFilepathOrFirstLine=function(e,t){if(!e&&!t)return[];var n=lw(e,t);return this.extractModeIds(n.join(","));},t;}(y),yw=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),bw=function(e){function t(t,n){var i=e.call(this)||this;return i._onDidChange=i._register(new N()),i.onDidChange=i._onDidChange.event,i._selector=n,i.languageIdentifier=i._selector(),i._register(t(function(){return i._evaluate();})),i;}return yw(t,e),t.prototype._evaluate=function(){var e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier));},t;}(y),Cw=function(){function e(e){void 0===e&&(e=!1);var t=this;this._onDidCreateMode=new N(),this.onDidCreateMode=this._onDidCreateMode.event,this._onLanguagesMaybeChanged=new N(),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._instantiatedModes={},this._registry=new vw(!0,e),this._registry.onDidChange(function(){return t._onLanguagesMaybeChanged.fire();});}return e.prototype.isRegisteredMode=function(e){return this._registry.isRegisteredMode(e);},e.prototype.getModeIdForLanguageName=function(e){return this._registry.getModeIdForLanguageNameLowercase(e);},e.prototype.getModeIdByFilepathOrFirstLine=function(e,t){var n=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return n.length>0?n[0]:null;},e.prototype.getModeId=function(e){var t=this._registry.extractModeIds(e);return t.length>0?t[0]:null;},e.prototype.getLanguageIdentifier=function(e){return this._registry.getLanguageIdentifier(e);},e.prototype.create=function(e){var t=this;return new bw(this.onLanguagesMaybeChanged,function(){var n=t.getModeId(e);return t._createModeAndGetLanguageIdentifier(n);});},e.prototype.createByFilepathOrFirstLine=function(e,t){var n=this;return new bw(this.onLanguagesMaybeChanged,function(){var i=n.getModeIdByFilepathOrFirstLine(e,t);return n._createModeAndGetLanguageIdentifier(i);});},e.prototype._createModeAndGetLanguageIdentifier=function(e){var t=this.getLanguageIdentifier(e||"plaintext")||Is;return this._getOrCreateMode(t.language),t;},e.prototype.triggerMode=function(e){var t=this.getModeId(e);this._getOrCreateMode(t||"plaintext");},e.prototype._getOrCreateMode=function(e){if(!this._instantiatedModes.hasOwnProperty(e)){var t=this.getLanguageIdentifier(e)||Is;this._instantiatedModes[e]=new nw(t),this._onDidCreateMode.fire(this._instantiatedModes[e]);}return this._instantiatedModes[e];},e;}(),ww=function(){function e(e){void 0===e&&(e=""),this.value=e;}return e.prototype.appendText=function(e){return this.value+=e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),this;},e.prototype.appendMarkdown=function(e){return this.value+=e,this;},e.prototype.appendCodeblock=function(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this;},e;}();function Sw(e){return xw(e)?!e.value:!Array.isArray(e)||e.every(Sw);}function xw(e){return e instanceof ww||!(!e||"object"!=typeof e)&&"string"==typeof e.value&&("boolean"==typeof e.isTrusted||void 0===e.isTrusted);}function Ew(e,t){return e===t||!(!e||!t)&&e.value===t.value&&e.isTrusted===t.isTrusted;}function Lw(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e;}!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error";}(fw||(fw={})),function(e){e.compare=function(e,t){return t-e;};var t=Object.create(null);t[e.Error]=ie("sev.error","Error"),t[e.Warning]=ie("sev.warning","Warning"),t[e.Info]=ie("sev.info","Info"),e.toString=function(e){return t[e]||"";},e.fromSeverity=function(t){switch(t){case Du.Error:return e.Error;case Du.Warning:return e.Warning;case Du.Info:return e.Info;case Du.Ignore:return e.Hint;}};}(fw||(fw={})),function(e){var t="";e.makeKey=function(e){var n=[t];return e.source?n.push(e.source.replace("¦","¦")):n.push(t),e.code?n.push(e.code.replace("¦","¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(fw.toString(e.severity)):n.push(t),e.message?n.push(e.message.replace("¦","¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦");};}(gw||(gw={}));var Tw=dn("markerService"),Iw=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t;}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);})(t,n);};return function(t,n){function i(){this.constructor=t;}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i());};}(),Nw=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},kw=function(e,t){return function(n,i){t(n,i,e);};};function Ow(e){return e.toString();}var Dw=function(){function e(e,t,n){this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._markerDecorations=[],this._modelEventListeners=[],this._modelEventListeners.push(e.onWillDispose(function(){return t(e);})),this._modelEventListeners.push(e.onDidChangeLanguage(function(t){return n(e,t);}));}return e.prototype._disposeLanguageSelection=function(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null),this._languageSelection&&(this._languageSelection.dispose(),this._languageSelection=null);},e.prototype.dispose=function(){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,[]),this._modelEventListeners=f(this._modelEventListeners),this._disposeLanguageSelection();},e.prototype.acceptMarkerDecorations=function(e){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,e);},e.prototype.setLanguage=function(e){var t=this;this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(function(){return t.model.setMode(e.languageIdentifier);}),this.model.setMode(e.languageIdentifier);},e;}(),Rw=function(){function e(){}return e.setMarkers=function(t,n){var i=n.read({resource:t.model.uri,take:500}).map(function(n){return{range:e._createDecorationRange(t.model,n),options:e._createDecorationOption(n)};});t.acceptMarkerDecorations(i);},e._createDecorationRange=function(e,t){var n=Jt.lift(t);if(t.severity===fw.Hint&&(t.tags&&-1!==t.tags.indexOf(1)||(n=n.setEndPosition(n.startLineNumber,n.startColumn+2))),(n=e.validateRange(n)).isEmpty()){var i=e.getWordAtPosition(n.getStartPosition());if(i)n=new Jt(n.startLineNumber,i.startColumn,n.endLineNumber,i.endColumn);else{var o=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===o||(n=n.endColumn>=o?new Jt(n.startLineNumber,o-1,n.endLineNumber,o):new Jt(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1));}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){var r=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);r=0?"squiggly-unnecessary":"squiggly-hint",n=0;break;case fw.Warning:t="squiggly-warning",i=Ad(Kf),n=20;break;case fw.Info:t="squiggly-info",i=Ad(qf),n=10;break;case fw.Error:default:t="squiggly-error",i=Ad(zf),n=30;}e.tags&&-1!==e.tags.indexOf(1)&&(o="squiggly-inline-unnecessary");var r=null,s=e.message,a=e.source,u=e.relatedInformation,l=e.code;if("string"==typeof s&&(s=s.trim(),a&&(s=/\n/g.test(s)?l?ie("diagAndSourceAndCodeMultiline","[{0}]\n{1} [{2}]",a,s,l):ie("diagAndSourceMultiline","[{0}]\n{1}",a,s):l?ie("diagAndSourceAndCode","[{0}] {1} [{2}]",a,s,l):ie("diagAndSource","[{0}] {1}",a,s)),r=new ww().appendCodeblock("_",s),!ce(u))){r.appendMarkdown("\n");for(var c=0,d=u;c=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},Vw=function(e,t){return function(n,i){t(n,i,e);};},Hw=function(e){function t(t,n){void 0===n&&(n=Di());var i=e.call(this)||this;return i._styleSheet=n,i._decorationOptionProviders=Object.create(null),i._themeService=t,i;}return Ww(t,e),t.prototype.registerDecorationType=function(e,t,n){var i=this._decorationOptionProviders[e];if(!i){var o={styleSheet:this._styleSheet,key:e,parentTypeKey:n,options:t||Object.create(null)};i=n?new Uw(this._themeService,o):new jw(this._themeService,o),this._decorationOptionProviders[e]=i;}i.refCount++;},t.prototype.removeDecorationType=function(e){var t=this._decorationOptionProviders[e];t&&(t.refCount--,t.refCount<=0&&(delete this._decorationOptionProviders[e],t.dispose(),this.listCodeEditors().forEach(function(t){return t.removeDecorations(e);})));},t.prototype.resolveDecorationOptions=function(e,t){var n=this._decorationOptionProviders[e];if(!n)throw new Error("Unknown decoration type key: "+e);return n.getOptions(this,t);},t=Bw([Vw(0,Rd)],t);}(Fw),Uw=function(){function e(e,t){this._parentTypeKey=t.parentTypeKey,this.refCount=0,this._beforeContentRules=new Kw(3,t,e),this._afterContentRules=new Kw(4,t,e);}return e.prototype.getOptions=function(e,t){var n=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(n.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(n.afterContentClassName=this._afterContentRules.className),n;},e.prototype.dispose=function(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null);},e;}(),jw=function(){function e(e,t){var n=this;this.refCount=0,this._disposables=[];var i=function(i){var o=new Kw(i,t,e);if(o.hasContent)return n._disposables.push(o),o.className;};this.className=i(0);var o,r=(o=new Kw(1,t,e)).hasContent?(n._disposables.push(o),{className:o.className,hasLetterSpacing:o.hasLetterSpacing}):null;r&&(this.inlineClassName=r.className,this.inlineClassNameAffectsLetterSpacing=r.hasLetterSpacing),this.beforeContentClassName=i(3),this.afterContentClassName=i(4),this.glyphMarginClassName=i(2);var s=t.options;this.isWholeLine=Boolean(s.isWholeLine),this.stickiness=s.rangeBehavior;var a=s.light&&s.light.overviewRulerColor||s.overviewRulerColor,u=s.dark&&s.dark.overviewRulerColor||s.overviewRulerColor;void 0===a&&void 0===u||(this.overviewRuler={color:a||u,darkColor:u||a,position:s.overviewRulerLane||cr.Center});}return e.prototype.getOptions=function(e,t){return t?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this;},e.prototype.dispose=function(){this._disposables=f(this._disposables);},e;}(),zw={color:"color:{0} !important;",opacity:"opacity:{0}; will-change: opacity;",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:url('{0}') center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:url('{0}');",margin:"margin:{0};",width:"width:{0};",height:"height:{0};"},Kw=function(){function e(e,t,n){var i=this;this._theme=n.getTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;var o=qw.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(o=o+" "+qw.getClassName(this._providerArgs.parentTypeKey,e)),this._className=o,this._unThemedSelector=qw.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=n.onThemeChange(function(e){i._theme=n.getTheme(),i._removeCSS(),i._buildCSS();}):this._themeListener=null;}return e.prototype.dispose=function(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null);},Object.defineProperty(e.prototype,"hasContent",{get:function(){return this._hasContent;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasLetterSpacing",{get:function(){return this._hasLetterSpacing;},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{get:function(){return this._className;},enumerable:!0,configurable:!0}),e.prototype._buildCSS=function(){var e,t,n,i=this._providerArgs.options;switch(this._ruleType){case 0:e=this.getCSSTextForModelDecorationClassName(i),t=this.getCSSTextForModelDecorationClassName(i.light),n=this.getCSSTextForModelDecorationClassName(i.dark);break;case 1:e=this.getCSSTextForModelDecorationInlineClassName(i),t=this.getCSSTextForModelDecorationInlineClassName(i.light),n=this.getCSSTextForModelDecorationInlineClassName(i.dark);break;case 2:e=this.getCSSTextForModelDecorationGlyphMarginClassName(i),t=this.getCSSTextForModelDecorationGlyphMarginClassName(i.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(i.dark);break;case 3:e=this.getCSSTextForModelDecorationContentClassName(i.before),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.before),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.before);break;case 4:e=this.getCSSTextForModelDecorationContentClassName(i.after),t=this.getCSSTextForModelDecorationContentClassName(i.light&&i.light.after),n=this.getCSSTextForModelDecorationContentClassName(i.dark&&i.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType);}var o=this._providerArgs.styleSheet.sheet,r=!1;e.length>0&&(o.insertRule(this._unThemedSelector+" {"+e+"}",0),r=!0),t.length>0&&(o.insertRule(".vs"+this._unThemedSelector+" {"+t+"}",0),r=!0),n.length>0&&(o.insertRule(".vs-dark"+this._unThemedSelector+", .hc-black"+this._unThemedSelector+" {"+n+"}",0),r=!0),this._hasContent=r;},e.prototype._removeCSS=function(){Mi(this._unThemedSelector,this._providerArgs.styleSheet);},e.prototype.getCSSTextForModelDecorationClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("");},e.prototype.getCSSTextForModelDecorationInlineClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("");},e.prototype.getCSSTextForModelDecorationContentClassName=function(e){if(!e)return"";var t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&("string"==typeof e.contentIconPath?t.push(to(zw.contentIconPath,_t.file(e.contentIconPath).toString().replace(/'/g,"%27"))):t.push(to(zw.contentIconPath,_t.revive(e.contentIconPath).toString(!0).replace(/'/g,"%27")))),"string"==typeof e.contentText){var n=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(to(zw.contentText,n));}this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","color","opacity","backgroundColor","margin"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;");}return t.join("");},e.prototype.getCSSTextForModelDecorationGlyphMarginClassName=function(e){if(!e)return"";var t=[];return void 0!==e.gutterIconPath&&("string"==typeof e.gutterIconPath?t.push(to(zw.gutterIconPath,_t.file(e.gutterIconPath).toString())):t.push(to(zw.gutterIconPath,_t.revive(e.gutterIconPath).toString(!0).replace(/'/g,"%27"))),void 0!==e.gutterIconSize&&t.push(to(zw.gutterIconSize,e.gutterIconSize))),t.join("");},e.prototype.collectBorderSettingsCSSText=function(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(to("box-sizing: border-box;")),!0);},e.prototype.collectCSSText=function(e,t,n){for(var i=n.length,o=0,r=t;ot)return 1;return 0;}(e.token,t.token);return 0!==n?n:e.index-t.index;});for(var n=0,i="000000",o="ffffff";e.length>=1&&""===e[0].token;){var r=e.shift();-1!==r.fontStyle&&(n=r.fontStyle),null!==r.foreground&&(i=r.foreground),null!==r.background&&(o=r.background);}for(var s=new Qw(),a=0,u=t;a>>0,this._cache.set(t,n);}return(n|e<<0)>>>0;},e;}(),eS=/\b(comment|string|regex)\b/;var tS,nS,iS,oS=function(){function e(e,t,n){this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0;}return e.prototype.clone=function(){return new e(this._fontStyle,this._foreground,this._background);},e.prototype.acceptOverwrite=function(e,t,n){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0;},e;}(),rS=function(){function e(e){this._mainRule=e,this._children=new Map();}return e.prototype.match=function(e){if(""===e)return this._mainRule;var t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));var o=this._children.get(t);return void 0!==o?o.match(n):this._mainRule;},e.prototype.insert=function(t,n,i,o){if(""!==t){var r,s,a=t.indexOf(".");-1===a?(r=t,s=""):(r=t.substring(0,a),s=t.substring(a+1));var u=this._children.get(r);void 0===u&&(u=new e(this._mainRule.clone()),this._children.set(r,u)),u.insert(s,n,i,o);}else this._mainRule.acceptOverwrite(n,i,o);},e;}();var sS={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"09885A"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"09885A"},{token:"attribute.value.unit",foreground:"09885A"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(tS={},tS[Op]="#FFFFFE",tS[Dp]="#000000",tS[Wp]="#E5EBF1",tS[Sf]="#D3D3D3",tS[xf]="#939393",tS[Bp]="#ADD6FF4D",tS)},aS={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(nS={},nS[Op]="#1E1E1E",nS[Dp]="#D4D4D4",nS[Wp]="#3A3D41",nS[Sf]="#404040",nS[xf]="#707070",nS[Bp]="#ADD6FF26",nS)},uS={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:(iS={},iS[Op]="#000000",iS[Dp]="#FFFFFF",iS[Sf]="#FFFFFF",iS[xf]="#FFFFFF",iS)},lS="vs",cS="vs-dark",dS="hc-black",hS=Au.as(Dh),pS=Au.as(Wd),fS=function(){function e(e,t){this.themeData=t;var n=t.base;e.length>0?(this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null;}return Object.defineProperty(e.prototype,"base",{get:function(){return this.themeData.base;},enumerable:!0,configurable:!0}),e.prototype.notifyBaseUpdated=function(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null);},e.prototype.getColors=function(){if(!this.colors){var e=Object.create(null);for(var t in this.themeData.colors)e[t]=Oh.fromHex(this.themeData.colors[t]);if(this.themeData.inherit){var n=mS(this.themeData.base);for(var t in n.colors)e[t]||(e[t]=Oh.fromHex(n.colors[t]));}this.colors=e;}return this.colors;},e.prototype.getColor=function(e,t){var n=this.getColors()[e];return n||(!1!==t?this.getDefault(e):null);},e.prototype.getDefault=function(e){var t=this.defaultColors[e];return t||(t=hS.resolveDefaultColor(e,this),this.defaultColors[e]=t,t);},e.prototype.defines=function(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e);},Object.defineProperty(e.prototype,"type",{get:function(){switch(this.base){case lS:return"light";case dS:return"hc";default:return"dark";}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tokenTheme",{get:function(){if(!this._tokenTheme){var e=[],t=[];if(this.themeData.inherit){var n=mS(this.themeData.base);e=n.rules,n.encodedTokensColors&&(t=n.encodedTokensColors);}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=Jw.createFromRawTokenTheme(e,t);}return this._tokenTheme;},enumerable:!0,configurable:!0}),e;}();function gS(e){return e===lS||e===cS||e===dS;}function mS(e){switch(e){case lS:return sS;case cS:return aS;case dS:return uS;}}function _S(e){var t=mS(e);return new fS(e,t);}var vS=function(){function e(){this.environment=Object.create(null),this._onThemeChange=new N(),this._onIconThemeChange=new N(),this._knownThemes=new Map(),this._knownThemes.set(lS,_S(lS)),this._knownThemes.set(cS,_S(cS)),this._knownThemes.set(dS,_S(dS)),this._styleElement=Di(),this._styleElement.className="monaco-colors",this.setTheme(lS);}return Object.defineProperty(e.prototype,"onThemeChange",{get:function(){return this._onThemeChange.event;},enumerable:!0,configurable:!0}),e.prototype.defineTheme=function(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!gS(t.base)&&!gS(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new fS(e,t)),gS(e)&&this._knownThemes.forEach(function(t){t.base===e&&t.notifyBaseUpdated();}),this._theme&&this._theme.themeName===e&&this.setTheme(e);},e.prototype.getTheme=function(){return this._theme;},e.prototype.setTheme=function(e){var t,n=this;if(t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(lS),this._theme===t)return t.id;this._theme=t;var i=[],o={},r={addRule:function(e){o[e]||(i.push(e),o[e]=!0);}};pS.getThemingParticipants().forEach(function(e){return e(t,r,n.environment);});var s=t.tokenTheme.getColorMap();return r.addRule(function(e){for(var t=[],n=1,i=e.length;n=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s;},CS=function(e,t){return function(n,i){t(n,i,e);};},wS="data-keybinding-context",SS=function(){function e(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e;}return e.prototype.setValue=function(e,t){return this._value[e]!==t&&(this._value[e]=t,!0);},e.prototype.removeValue=function(e){return e in this._value&&(delete this._value[e],!0);},e.prototype.getValue=function(e){var t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t;},e;}(),xS=function(e){function t(){return e.call(this,-1,null)||this;}return yS(t,e),t.prototype.setValue=function(e,t){return!1;},t.prototype.removeValue=function(e){return!1;},t.prototype.getValue=function(e){},t.INSTANCE=new t(),t;}(SS),ES=function(e){function t(t,n,i){var o=e.call(this,t,null)||this;return o._configurationService=n,o._values=new Map(),o._listener=o._configurationService.onDidChangeConfiguration(function(e){if(4===e.source){var t=(u=o._values,l=[],u.forEach(function(e,t){return l.push(t);}),l);o._values.clear(),i.fire(t);}else{for(var n=[],r=0,s=e.affectedKeys;r1){var i=n.shift();o.focusItemByElement(i.container),n.push(i),o.mnemonics.set(t,n);}}})),o._register(ni(o.domNode,Pi.MOUSE_OUT,function(e){ki(e.relatedTarget,o.domNode)||(o.focusedItem=void 0,o.updateFocus(),e.stopPropagation());})),o._register(ni(o.actionsList,Pi.MOUSE_OVER,function(e){var t=e.target;if(t&&ki(t,o.actionsList)&&t!==o.actionsList){for(;t.parentElement!==o.actionsList;)t=t.parentElement;if(Yn(t,"action-item")){var n=o.focusedItem;o.setFocusedItem(t),n!==o.focusedItem&&o.updateFocus();}}}));var s={parent:o};return o.mnemonics=new Map(),o.push(n,{icon:!0,label:!0,isMenu:!0}),o;}return OS(t,e),t.prototype.style=function(e){var t=this.getContainer(),n=e.foregroundColor?""+e.foregroundColor:null,i=e.backgroundColor?""+e.backgroundColor:null,o=e.borderColor?"2px solid "+e.borderColor:null,r=e.shadowColor?"0 2px 4px "+e.shadowColor:null;t.style.border=o,this.domNode.style.color=n,this.domNode.style.backgroundColor=i,t.style.boxShadow=r,this.items&&this.items.forEach(function(t){(t instanceof PS||t instanceof WS)&&t.style(e);});},t.prototype.focusItemByElement=function(e){var t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus();},t.prototype.setFocusedItem=function(e){for(var t=0;t