From dd87e49322ea4127f700df30fc0546656075ec6c Mon Sep 17 00:00:00 2001 From: Aaron <51793722+casheww@users.noreply.github.com> Date: Sun, 14 Nov 2021 10:43:02 +0000 Subject: [PATCH] Blockly vision updates for the 2021 vision system (#35) Thank you @casheww very clean :) * update marker blocks * update for vision syntax changes * update resolution blocks * remove redundant import * build blockly changes * use consts for block colours * change cam res block type * build vision block changes --- .../app/components/editor/blockly/Blockly.vue | 3 +- .../app/components/editor/blockly/blocks.js | 185 ++++++++++++------ .../app/components/editor/blockly/toolbox.xml | 9 +- .../blueprints/staticroutes/editor/bundle.js | 15 +- 4 files changed, 140 insertions(+), 72 deletions(-) diff --git a/sheepsrc/app/components/editor/blockly/Blockly.vue b/sheepsrc/app/components/editor/blockly/Blockly.vue index 9b20305..39ab016 100644 --- a/sheepsrc/app/components/editor/blockly/Blockly.vue +++ b/sheepsrc/app/components/editor/blockly/Blockly.vue @@ -73,8 +73,7 @@ export default Vue.extend({ // noinspection TypeScriptUnresolvedFunction this.workspace.addChangeListener(() => { // noinspection TypeScriptUnresolvedFunction - this.code = `from __future__ import print_function -from robot import * + this.code = `from robot import * import time R = Robot() diff --git a/sheepsrc/app/components/editor/blockly/blocks.js b/sheepsrc/app/components/editor/blockly/blocks.js index 8a2df4e..2761640 100644 --- a/sheepsrc/app/components/editor/blockly/blocks.js +++ b/sheepsrc/app/components/editor/blockly/blocks.js @@ -1,3 +1,10 @@ + +// Block colours use HSL. setColor takes the hue value (0 to 255). +const movementHue = 0; +const gpioHue = 210; +const visionHue = 90; +const markerTypeHue = 70; + function loadMovementBlocks(Blockly) { Blockly.Blocks["motors_set_power"] = { init: function() { @@ -11,7 +18,7 @@ function loadMovementBlocks(Blockly) { this.setInputsInline(true); this.setPreviousStatement(true, null); this.setNextStatement(true, null); - this.setColour(0); + this.setColour(movementHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -38,7 +45,7 @@ function loadMovementBlocks(Blockly) { this.setInputsInline(true); this.setPreviousStatement(true, null); this.setNextStatement(true, null); - this.setColour(0); + this.setColour(movementHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -65,7 +72,7 @@ function loadMovementBlocks(Blockly) { this.setInputsInline(true); this.setPreviousStatement(true, null); this.setNextStatement(true, null); - this.setColour(0); + this.setColour(movementHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -76,7 +83,7 @@ function loadMovementBlocks(Blockly) { this.appendDummyInput().appendField("Stop both motors"); this.setPreviousStatement(true, null); this.setNextStatement(true, null); - this.setColour(0); + this.setColour(movementHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -105,7 +112,7 @@ function loadMovementBlocks(Blockly) { this.setInputsInline(true); this.setPreviousStatement(true, null); this.setNextStatement(true, null); - this.setColour(0); + this.setColour(movementHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -115,7 +122,7 @@ function loadMovementBlocks(Blockly) { init: function() { this.appendDummyInput().appendField("Zone"); this.setOutput(true, null); - this.setColour(0); + this.setColour(movementHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -221,7 +228,7 @@ function loadGPIOBlocks(Blockly) { this.setInputsInline(true); this.setPreviousStatement(true, null); this.setNextStatement(true, null); - this.setColour(210); + this.setColour(gpioHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -237,7 +244,7 @@ function loadGPIOBlocks(Blockly) { this.setInputsInline(true); this.setPreviousStatement(true, null); this.setNextStatement(true, null); - this.setColour(210); + this.setColour(gpioHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -249,7 +256,7 @@ function loadGPIOBlocks(Blockly) { .appendField("Digital value of GPIO") .appendField(new Blockly.FieldNumber(1, 1, 4, 1), "GPIO_INDEX"); this.setOutput(true, "Boolean"); - this.setColour(210); + this.setColour(gpioHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -261,7 +268,7 @@ function loadGPIOBlocks(Blockly) { .appendField("Analog value of GPIO") .appendField(new Blockly.FieldNumber(1, 1, 4, 1), "GPIO_INDEX"); this.setOutput(true, "Number"); - this.setColour(210); + this.setColour(gpioHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -296,24 +303,109 @@ function loadGPIOBlocks(Blockly) { }; } +function loadVisionMarkerBlocks(Blockly) { + /* Year dependent marker blocks (2022) */ + + Blockly.Blocks["vision_marker_type_arena"] = { + init: function() { + this.appendDummyInput().appendField("Arena"); + this.setOutput(true, "MarkerType"); + this.setColour(markerTypeHue); + this.setTooltip(""); + this.setHelpUrl(""); + } + }; + Blockly.Blocks["vision_marker_type_winkie"] = { + init: function() { + this.appendDummyInput().appendField("Winkie"); + this.setOutput(true, "MarkerType"); + this.setColour(markerTypeHue); + this.setTooltip(""); + this.setHelpUrl(""); + } + }; + Blockly.Blocks["vision_marker_type_gillikin"] = { + init: function() { + this.appendDummyInput().appendField("Gillikin"); + this.setOutput(true, "MarkerType"); + this.setColour(markerTypeHue); + this.setTooltip(""); + this.setHelpUrl(""); + } + }; + Blockly.Blocks["vision_marker_type_quadling"] = { + init: function() { + this.appendDummyInput().appendField("Quadling"); + this.setOutput(true, "MarkerType"); + this.setColour(markerTypeHue); + this.setTooltip(""); + this.setHelpUrl(""); + } + }; + Blockly.Blocks["vision_marker_type_munchkin"] = { + init: function() { + this.appendDummyInput().appendField("Munchkin"); + this.setOutput(true, "MarkerType"); + this.setColour(markerTypeHue); + this.setTooltip(""); + this.setHelpUrl(""); + } + }; + + Blockly.Python["vision_marker_type_arena"] = function() { + const code = "MARKER_ARENA"; + return [code, Blockly.Python.ORDER_NONE]; + }; + Blockly.Python["vision_marker_type_winkie"] = function() { + const code = "MARKER_CUBE_WINKIE"; + return [code, Blockly.Python.ORDER_NONE]; + }; + Blockly.Python["vision_marker_type_gillikin"] = function() { + const code = "MARKER_CUBE_GILLIKIN"; + return [code, Blockly.Python.ORDER_NONE]; + }; + Blockly.Python["vision_marker_type_quadling"] = function() { + const code = "MARKER_CUBE_QUADLING"; + return [code, Blockly.Python.ORDER_NONE]; + }; + Blockly.Python["vision_marker_type_munchkin"] = function() { + const code = "MARKER_CUBE_MUNCHKIN"; + return [code, Blockly.Python.ORDER_NONE]; + }; +} + function loadVisionBlocks(Blockly) { + /* Loads blocks for vision code that are not dependent on the current year's game. + * Marker blocks (year depentent) are loaded in loadVisionMarkerBlocks. */ + Blockly.Blocks["vision_see"] = { init: function() { this.appendDummyInput() - .appendField("Visible markers at") - .appendField( - new Blockly.FieldDropdown([ - ["640x480", "(640, 480)"], - ["1296x736", "(1296, 736)"], - ["1296x976", "(1296, 976)"], - ["1920x1088", "(1920, 1088)"], - ["1920x1440", "(1920, 1440)"] - ]), - "VISION_RESOLUTION" - ) - .appendField("px"); + .appendField("Visible markers") this.setOutput(true, "Array"); - this.setColour(90); + this.setColour(visionHue); + this.setTooltip(""); + this.setHelpUrl(""); + } + }; + + Blockly.Blocks["vision_camera_res"] = { + init: function() { + this.appendDummyInput() + .appendField("Set camera resolution to") + .appendField( + new Blockly.FieldDropdown([ + ["640x480", "(640, 480)"], + ["1296x736", "(1296, 736)"], + ["1296x976", "(1296, 976)"], + ["1920x1088", "(1920, 1088)"], + ["1920x1440", "(1920, 1440)"] + ]), + "VISION_RESOLUTION" + ); + this.setPreviousStatement(true, null); + this.setNextStatement(true, null); + this.setColour(visionHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -326,7 +418,7 @@ function loadVisionBlocks(Blockly) { .appendField("Distance to"); this.setInputsInline(false); this.setOutput(true, "Number"); - this.setColour(90); + this.setColour(visionHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -339,7 +431,7 @@ function loadVisionBlocks(Blockly) { .appendField("Angle to"); this.setInputsInline(false); this.setOutput(true, "Number"); - this.setColour(90); + this.setColour(visionHue); this.setTooltip(""); this.setHelpUrl(""); } @@ -352,36 +444,20 @@ function loadVisionBlocks(Blockly) { .appendField("Marker type of"); this.setInputsInline(false); this.setOutput(true, "MarkerType"); - this.setColour(90); + this.setColour(markerTypeHue); this.setTooltip(""); this.setHelpUrl(""); } }; - Blockly.Blocks["vision_marker_type_arena"] = { - init: function() { - this.appendDummyInput().appendField("Arena"); - this.setOutput(true, "MarkerType"); - this.setColour(90); - this.setTooltip(""); - this.setHelpUrl(""); - } - }; - - Blockly.Blocks["vision_marker_type_basket"] = { - init: function() { - this.appendDummyInput().appendField("Basket"); - this.setOutput(true, "MarkerType"); - this.setColour(90); - this.setTooltip(""); - this.setHelpUrl(""); - } + Blockly.Python["vision_see"] = function(block) { + const code = `R.see()`; + return [code, Blockly.Python.ORDER_NONE]; }; - Blockly.Python["vision_see"] = function(block) { + Blockly.Python["vision_camera_res"] = function(block) { const dropdown_vision_resolution = block.getFieldValue("VISION_RESOLUTION"); - const code = `R.see(res=${dropdown_vision_resolution})`; - return [code, Blockly.Python.ORDER_NONE]; + return `R.camera.res = ${dropdown_vision_resolution}\n`; }; Blockly.Python["vision_distance_to"] = function(block) { @@ -400,7 +476,7 @@ function loadVisionBlocks(Blockly) { "MARKER", Blockly.Python.ORDER_ATOMIC ); - const code = `${value_marker}.rot_y`; + const code = `${value_marker}.bearing.y`; return [code, Blockly.Python.ORDER_NONE]; }; @@ -410,19 +486,12 @@ function loadVisionBlocks(Blockly) { "MARKER", Blockly.Python.ORDER_ATOMIC ); - const code = `${value_marker}.info.marker_type`; + const code = `${value_marker}.info.type`; return [code, Blockly.Python.ORDER_NONE]; }; - Blockly.Python["vision_marker_type_arena"] = function() { - const code = "MARKER_TYPE_ARENA"; - return [code, Blockly.Python.ORDER_NONE]; - }; - - Blockly.Python["vision_marker_type_basket"] = function() { - const code = "MARKER_TYPE_BASKET"; - return [code, Blockly.Python.ORDER_NONE]; - }; + // Load marker blocks. These may change for different competitions. + loadVisionMarkerBlocks(Blockly); } export default function loadBlocks(Blockly) { diff --git a/sheepsrc/app/components/editor/blockly/toolbox.xml b/sheepsrc/app/components/editor/blockly/toolbox.xml index e292c7d..087f275 100644 --- a/sheepsrc/app/components/editor/blockly/toolbox.xml +++ b/sheepsrc/app/components/editor/blockly/toolbox.xml @@ -378,6 +378,7 @@ + @@ -392,7 +393,7 @@ - + marker @@ -400,7 +401,11 @@ - + + + + + i diff --git a/shepherd/blueprints/staticroutes/editor/bundle.js b/shepherd/blueprints/staticroutes/editor/bundle.js index a80270a..bcc68c4 100644 --- a/shepherd/blueprints/staticroutes/editor/bundle.js +++ b/shepherd/blueprints/staticroutes/editor/bundle.js @@ -1,27 +1,22 @@ -!function(e){function t(t){for(var o,i,r=t[0],s=t[1],a=0,u=[];a=0;){if(r=s+i,(0===s||32===o.charCodeAt(s-1))&&32===o.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===o.charCodeAt(s-1)&&r===n)return this._lastStart=s-1,void(this._lastEnd=r);if(0===s&&r===n)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,o=[],n=1;n0;)I.sort(x.sort),I.shift().execute();A=!1},R=function(e,t){void 0===t&&(t=0);var o,n=new x(e,t);return N.push(n),D||(D=!0,o=P,L||(L=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||function(e){return setTimeout((function(){return e((new Date).getTime())}),0)}),L.call(self,o)),n},O=function(e,t){if(A){var o=new x(e,t);return I.push(o),o}return R(e,t)};var M=16,B=function(e,t){return t},F=function(e){function t(t,o,n,i,s){void 0===i&&(i=B),void 0===s&&(s=M);var a=e.call(this)||this,l=null,u=0,c=a._register(new r.f),h=function(){u=(new Date).getTime(),n(l),l=null};return a._register(T(t,o,(function(e){l=i(l,e);var t=(new Date).getTime()-u;t>=s?(c.cancel(),h()):c.setIfNotSet(h,s-t)}))),a}return g(t,e),t}(a.a);function H(e,t,o,n,i){return new F(e,t,o,n,i)}function U(e){return document.defaultView.getComputedStyle(e,null)}var V=function(e,t){return parseFloat(t)||0};function W(e,t,o){var n=U(e),i="0";return n&&(i=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(o)),V(e,i)}function j(e){if(e!==document.body)return new z(e.clientWidth,e.clientHeight);if(window.innerWidth&&window.innerHeight)return new z(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientWidth)return new z(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new z(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}var G={getBorderLeftWidth:function(e){return W(e,"border-left-width","borderLeftWidth")},getBorderRightWidth:function(e){return W(e,"border-right-width","borderRightWidth")},getBorderTopWidth:function(e){return W(e,"border-top-width","borderTopWidth")},getBorderBottomWidth:function(e){return W(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return W(e,"padding-left","paddingLeft")},getPaddingRight:function(e){return W(e,"padding-right","paddingRight")},getPaddingTop:function(e){return W(e,"padding-top","paddingTop")},getPaddingBottom:function(e){return W(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return W(e,"margin-left","marginLeft")},getMarginTop:function(e){return W(e,"margin-top","marginTop")},getMarginRight:function(e){return W(e,"margin-right","marginRight")},getMarginBottom:function(e){return W(e,"margin-bottom","marginBottom")},__commaSentinel:!1},z=function(e,t){this.width=e,this.height=t};function K(e){for(var t=e.offsetParent,o=e.offsetTop,n=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){o-=e.scrollTop;var i=U(e);i&&(n-="rtl"!==i.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=G.getBorderLeftWidth(e),o+=G.getBorderTopWidth(e),o+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:o}}function Y(e){var t=e.getBoundingClientRect();return{left:t.left+X.scrollX,top:t.top+X.scrollY,width:t.width,height:t.height}}var X=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 q(e){var t=G.getMarginLeft(e)+G.getMarginRight(e);return e.offsetWidth+t}function $(e){var t=G.getBorderLeftWidth(e)+G.getBorderRightWidth(e),o=G.getPaddingLeft(e)+G.getPaddingRight(e);return e.offsetWidth-t-o}function J(e){var t=G.getBorderTopWidth(e)+G.getBorderBottomWidth(e),o=G.getPaddingTop(e)+G.getPaddingBottom(e);return e.offsetHeight-t-o}function Z(e){var t=G.getMarginTop(e)+G.getMarginBottom(e);return e.offsetHeight+t}function Q(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function ee(e,t,o){for(;e;){if(v(e,t))return e;if(o)if("string"==typeof o){if(v(e,o))return null}else if(e===o)return null;e=e.parentNode}return null}function te(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 oe=null;function ne(){return oe||(oe=te()),oe}function ie(e,t,o){void 0===o&&(o=ne()),o&&t&&o.sheet.insertRule(e+"{"+t+"}",0)}function re(e,t){if(void 0===t&&(t=ne()),t){for(var o=function(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}(t),n=[],i=0;i=0;i--)t.sheet.deleteRule(n[i])}}function se(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}var ae={CLICK:"click",AUXCLICK:"auxclick",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:l.n?"webkitAnimationStart":"animationstart",ANIMATION_END:l.n?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:l.n?"webkitAnimationIteration":"animationiteration"},le={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function ue(e){for(var t=[],o=0;e&&e.nodeType===e.ELEMENT_NODE;o++)t[o]=e.scrollTop,e=e.parentNode;return t}function ce(e,t){for(var o=0;e&&e.nodeType===e.ELEMENT_NODE;o++)e.scrollTop!==t[o]&&(e.scrollTop=t[o]),e=e.parentNode}var he=function(){function e(e){var t=this;this._onDidFocus=new h.a,this.onDidFocus=this._onDidFocus.event,this._onDidBlur=new h.a,this.onDidBlur=this._onDidBlur.event,this.disposables=[];var o=!1,n=!1;Object(d.a)(e,ae.FOCUS,!0)((function(){n=!1,o||(o=!0,t._onDidFocus.fire())}),null,this.disposables),Object(d.a)(e,ae.BLUR,!0)((function(){o&&(n=!0,window.setTimeout((function(){n&&(n=!1,o=!1,t._onDidBlur.fire())}),0))}),null,this.disposables)}return e.prototype.dispose=function(){this.disposables=Object(a.d)(this.disposables),this._onDidFocus.dispose(),this._onDidBlur.dispose()},e}();function de(e){return new he(e)}function ge(e){for(var t=[],o=1;oo||e===o&&t>n?(this.startLineNumber=o,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=o,this.endColumn=n)}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,o){var n,i,r,s;return o.startLineNumbert.endLineNumber?(r=o.endLineNumber,s=o.endColumn):o.endLineNumber===t.endLineNumber?(r=o.endLineNumber,s=Math.max(o.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(n,i,r,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,o){var n=t.startLineNumber,i=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=o.startLineNumber,l=o.startColumn,u=o.endLineNumber,c=o.endColumn;return nu?(r=u,s=c):r===u&&(s=Math.min(s,c)),n>r?null:n===r&&i>s?null:new e(n,i,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 n.a(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.a(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,o){return new e(this.startLineNumber,this.startColumn,t,o)},e.prototype.setStartPosition=function(t,o){return new e(t,o,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,o){return void 0===o&&(o=t),new e(t.lineNumber,t.column,o.lineNumber,o.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumbere.startLineNumber},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return y})),o.d(t,"c",(function(){return v})),o.d(t,"b",(function(){return b})),o.d(t,"j",(function(){return E})),o.d(t,"e",(function(){return C})),o.d(t,"g",(function(){return S})),o.d(t,"f",(function(){return T})),o.d(t,"i",(function(){return w})),o.d(t,"h",(function(){return k})),o.d(t,"d",(function(){return i}));var n,i,r=o(13),s=o(33),a=o(37),l=o(84),u=o(57),c=o(110),h=o(9),d=o(60),g=o(38),p=o(12),f=o(36),m=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),_=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0;){var i=this._deliveryQueue.shift(),r=i[0],s=i[1];try{"function"==typeof r?r.call(void 0,s):r[0].call(r[1],s)}catch(o){Object(n.e)(o)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}(),l=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new a({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,o={event:e,listener:null};this.events.push(o),this.hasListeners&&this.hook(o);return Object(r.f)(function(e){var t,o=this,n=!1;return function(){return n?t:(n=!0,t=e.apply(o,arguments))}}((function(){t.hasListeners&&t.unhook(o);var e=t.events.indexOf(o);t.events.splice(e,1)})))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach((function(t){return e.hook(t)}))},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach((function(t){return e.unhook(t)}))},e.prototype.hook=function(e){var t=this;e.listener=e.event((function(e){return t.emitter.fire(e)}))},e.prototype.unhook=function(e){e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}();function u(e){return function(t,o,n){void 0===o&&(o=null);var i=e((function(e){return i.dispose(),t.call(o,e)}),null,n);return i}}function c(){for(var e=[],t=0;t1)&&u.fire(e),l=0}),o)}))},onLastListenerRemove:function(){i.dispose()}});return u.event}var d=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(o,n,i){return e((function(e){var i=t.buffers[t.buffers.length-1];i?i.push((function(){return o.call(n,e)})):o.call(n,e)}),void 0,i)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach((function(e){return e()}))},e}();function g(e,t){return function(o,n,i){return void 0===n&&(n=null),e((function(e){return o.call(n,t(e))}),null,i)}}function p(e,t){return function(o,n,i){return void 0===n&&(n=null),e((function(e){return t(e)&&o.call(n,e)}),null,i)}}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(g(this._event,t))},e.prototype.filter=function(t){return new e(p(this._event,t))},e.prototype.on=function(e,t,o){return this._event(e,t,o)},e}();function m(e){return new f(e)}var _=function(){function e(){this.emitter=new a,this.event=this.emitter.event,this.disposable=r.a.None}return Object.defineProperty(e.prototype,"input",{set:function(e){this.disposable.dispose(),this.disposable=e(this.emitter.fire,this.emitter)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposable.dispose(),this.emitter.dispose()},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,i=o(12);!function(e){e.editorTextFocus=new i.f("editorTextFocus",!1),e.focus=new i.f("editorFocus",!1),e.textInputFocus=new i.f("textInputFocus",!1),e.readOnly=new i.f("editorReadonly",!1),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new i.f("editorHasSelection",!1),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new i.f("editorHasMultipleSelections",!1),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new i.f("editorTabMovesFocus",!1),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new i.f("isInEmbeddedEditor",void 0),e.canUndo=new i.f("canUndo",!1),e.canRedo=new i.f("canRedo",!1),e.languageId=new i.f("editorLangId",void 0),e.hasCompletionItemProvider=new i.f("editorHasCompletionItemProvider",void 0),e.hasCodeActionsProvider=new i.f("editorHasCodeActionsProvider",void 0),e.hasCodeLensProvider=new i.f("editorHasCodeLensProvider",void 0),e.hasDefinitionProvider=new i.f("editorHasDefinitionProvider",void 0),e.hasImplementationProvider=new i.f("editorHasImplementationProvider",void 0),e.hasTypeDefinitionProvider=new i.f("editorHasTypeDefinitionProvider",void 0),e.hasHoverProvider=new i.f("editorHasHoverProvider",void 0),e.hasDocumentHighlightProvider=new i.f("editorHasDocumentHighlightProvider",void 0),e.hasDocumentSymbolProvider=new i.f("editorHasDocumentSymbolProvider",void 0),e.hasReferenceProvider=new i.f("editorHasReferenceProvider",void 0),e.hasRenameProvider=new i.f("editorHasRenameProvider",void 0),e.hasDocumentFormattingProvider=new i.f("editorHasDocumentFormattingProvider",void 0),e.hasDocumentSelectionFormattingProvider=new i.f("editorHasDocumentSelectionFormattingProvider",void 0),e.hasSignatureHelpProvider=new i.f("editorHasSignatureHelpProvider",void 0)}(n||(n={}))},function(e,t,o){"use strict";function n(e){return"function"==typeof e.dispose&&0===e.dispose.length}function i(e){for(var t=[],o=1;o=t.length?e:t[n]}))}function l(e){return e.replace(/[<|>|&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function u(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function c(e,t){return void 0===t&&(t=" "),d(h(e,t),t)}function h(e,t){if(!e||!t)return e;var o=t.length;if(0===o||0===e.length)return e;for(var n=0;e.indexOf(t,n)===n;)n+=o;return e.substring(n)}function d(e,t){if(!e||!t)return e;var o=t.length,n=e.length;if(0===o||0===n)return e;for(var i=n,r=-1;-1!==(r=e.lastIndexOf(t,i-1))&&r+o===i;){if(0===r)return"";i=r}return e.substring(0,i)}function g(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function p(e,t){if(e.length0?e.indexOf(t,o)===o:0===o&&e===t}function m(e,t,o){if(void 0===o&&(o={}),!e)throw new Error("Cannot create regex from empty string");t||(e=u(e)),o.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var n="";return o.global&&(n+="g"),o.matchCase||(n+="i"),o.multiline&&(n+="m"),new RegExp(e,n)}function _(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&(e.exec("")&&0===e.lastIndex)}function y(e){for(var t=0,o=e.length;t=0;o--){var n=e.charCodeAt(o);if(32!==n&&9!==n)return o}return-1}function E(e,t){return et?1:0}function C(e,t){for(var o=Math.min(e.length,t.length),n=0;nt.length?1:0}function S(e){return e>=97&&e<=122}function T(e){return e>=65&&e<=90}function w(e){return S(e)||T(e)}function k(e,t){return(e?e.length:0)===(t?t.length:0)&&O(e,t)}function O(e,t,o){if(void 0===o&&(o=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var n=0;ne.length)&&O(e,t,o)}function L(e,t){var o,n=Math.min(e.length,t.length);for(o=0;o=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}var V=String.fromCharCode(65279);function W(e){return e&&e.length>0&&65279===e.charCodeAt(0)}function j(e){return btoa(encodeURIComponent(e))}function G(e,t){for(var o="",n=0;n"),n}o.Namespace||(o.Namespace=Object.create(Object.prototype));var a={uninitialized:1,working:2,initialized:3};Object.defineProperties(o.Namespace,{defineWithParent:{value:s,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,o){return s(t,e,o)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,o,i=a.uninitialized;return{setName:function(e){t=e},get:function(){switch(i){case a.initialized:return o;case a.uninitialized:i=a.working;try{n("WinJS.Namespace._lazy:"+t+",StartTM"),o=e()}finally{n("WinJS.Namespace._lazy:"+t+",StopTM"),i=a.uninitialized}return e=null,i=a.initialized,o;case a.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(i){case a.working:throw"Illegal: reentrancy on initialization";default:i=a.initialized,o=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,o,n){var s=[e],a=null;return o&&(a=r(t,o),s.push(a)),i(s,n,o||""),a},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,n){return e=e||function(){},o.markSupportedForProcessing(e),t&&i(e.prototype,t),n&&i(e,n),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,n,r,s){if(e){n=n||function(){};var a=e.prototype;return n.prototype=Object.create(a),o.markSupportedForProcessing(n),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,configurable:!0,enumerable:!0}),r&&i(n.prototype,r),s&&i(n,s),n}return t(n,r,s)},mix:function(e){var t,o;for(e=e||function(){},t=1,o=arguments.length;ti&&(i=u)}return i}if("string"==typeof e)return n?"*"===e?5:e===o?10:0:0;if(e){var c=e.language,h=e.pattern,d=e.scheme,g=e.hasAccessToAllModels;if(!n&&!g)return 0;i=0;if(d)if(d===t.scheme)i=10;else{if("*"!==d)return 0;i=5}if(c)if(c===o)i=10;else{if("*"!==c)return 0;i=Math.max(i,5)}if(h){if(h!==t.fsPath&&!Object(r.a)(h,t.fsPath))return 0;i=10}return i}return 0}var a=o(60);function l(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(l):e.exclusive)}var u=function(){function e(){this._clock=0,this._entries=[],this._onDidChange=new n.a}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var o=this,n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Object(i.f)((function(){if(n){var e=o._entries.indexOf(n);e>=0&&(o._entries.splice(e,1),o._lastCandidate=void 0,o._onDidChange.fire(o._entries.length),n=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=[],o=0,n=this._entries;o0&&t.push(i.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,o,n=[];return this._orderedForEach(e,(function(e){t&&o===e._score?t.push(e.provider):(o=e._score,t=[e.provider],n.push(t))})),n},e.prototype._orderedForEach=function(e,t){if(e){this._updateScores(e);for(var o=0;o0&&t(n)}}},e.prototype._updateScores=function(t){var o={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==o.language||this._lastCandidate.uri!==o.uri){this._lastCandidate=o;for(var n=0,i=this._entries;n0){for(var u=0,c=this._entries;ut._score?-1:e._timet._time?-1:0},e}(),c=function(){function e(){this._onDidChange=new n.a,this.onDidChange=this._onDidChange.event,this._map=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 o=this;return this._map[e]=t,this.fire([e]),Object(i.f)((function(){o._map[e]===t&&(delete o._map[e],o.fire([e]))}))},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[2]},e}(),h=o(21);o.d(t,"o",(function(){return m})),o.d(t,"x",(function(){return _})),o.d(t,"v",(function(){return d})),o.d(t,"b",(function(){return g})),o.d(t,"g",(function(){return p})),o.d(t,"w",(function(){return f})),o.d(t,"B",(function(){return v})),o.d(t,"k",(function(){return b})),o.d(t,"A",(function(){return E})),o.d(t,"r",(function(){return C})),o.d(t,"s",(function(){return S})),o.d(t,"u",(function(){return T})),o.d(t,"t",(function(){return w})),o.d(t,"m",(function(){return k})),o.d(t,"j",(function(){return O})),o.d(t,"h",(function(){return R})),o.d(t,"e",(function(){return L})),o.d(t,"n",(function(){return N})),o.d(t,"z",(function(){return I})),o.d(t,"c",(function(){return D})),o.d(t,"a",(function(){return A})),o.d(t,"f",(function(){return P})),o.d(t,"i",(function(){return x})),o.d(t,"q",(function(){return M})),o.d(t,"p",(function(){return B})),o.d(t,"d",(function(){return F})),o.d(t,"l",(function(){return H})),o.d(t,"y",(function(){return U}));var d,g,p,f,m=function(e,t){this.language=e,this.id=t},_=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),o=this.getFontStyle(e);return 1&o&&(t+=" mtki"),2&o&&(t+=" mtkb"),4&o&&(t+=" mtku"),t},e.getInlineStyleFromMetadata=function(e,t){var o=this.getForeground(e),n=this.getFontStyle(e),i="color: "+t[o]+";";return 1&n&&(i+="font-style: italic;"),2&n&&(i+="font-weight: bold;"),4&n&&(i+="text-decoration: underline;"),i},e}();!function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(d||(d={})),function(e){e[e.Automatic=1]="Automatic",e[e.Manual=2]="Manual"}(g||(g={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(p||(p={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(f||(f={}));var y,v=((y=Object.create(null))[f.File]="file",y[f.Module]="module",y[f.Namespace]="namespace",y[f.Package]="package",y[f.Class]="class",y[f.Method]="method",y[f.Property]="property",y[f.Field]="field",y[f.Constructor]="constructor",y[f.Enum]="enum",y[f.Interface]="interface",y[f.Function]="function",y[f.Variable]="variable",y[f.Constant]="constant",y[f.String]="string",y[f.Number]="number",y[f.Boolean]="boolean",y[f.Array]="array",y[f.Object]="object",y[f.Key]="key",y[f.Null]="null",y[f.EnumMember]="enum-member",y[f.Struct]="struct",y[f.Event]="event",y[f.Operator]="operator",y[f.TypeParameter]="type-parameter",function(e){return"symbol-icon "+(y[e]||"property")}),b=function(){function e(e){this.value=e}return e.Comment=new e("comment"),e.Imports=new e("imports"),e.Region=new e("region"),e}();function E(e){return Object(h.g)(e)&&e.resource&&Array.isArray(e.edits)}var C=new u,S=new u,T=new u,w=new u,k=new u,O=new u,R=new u,L=new u,N=new u,I=new u,D=new u,A=new u,P=new u,x=new u,M=new u,B=new u,F=new u,H=new u,U=new c},function(e,t,o){"use strict";o.d(t,"d",(function(){return l})),o.d(t,"b",(function(){return c})),o.d(t,"c",(function(){return h})),o.d(t,"a",(function(){return f})),o.d(t,"f",(function(){return m})),o.d(t,"e",(function(){return _})),o.d(t,"g",(function(){return y}));var n,i,r=o(22),s=o(8),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});!function(e){e[e.Defined=1]="Defined",e[e.Not=2]="Not",e[e.Equals=3]="Equals",e[e.NotEquals=4]="NotEquals",e[e.And=5]="And",e[e.Regex=6]="Regex"}(i||(i={}));var l=function(){function e(){}return e.has=function(e){return new c(e)},e.equals=function(e,t){return new h(e,t)},e.regex=function(e,t){return new p(e,t)},e.not=function(e){return new g(e)},e.and=function(){for(var e=[],t=0;t=0){var t=e.split("!=");return new d(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("==")>=0){t=e.split("==");return new h(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("=~")>=0){t=e.split("=~");return new p(t[0].trim(),this._deserializeRegexValue(t[1]))}return/^\!\s*/.test(e)?new g(e.substr(1).trim()):new c(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(Object(s.isFalsyOrWhitespace)(e))return console.warn("missing regexp-value for =~-expression"),null;var t=e.indexOf("/"),o=e.lastIndexOf("/");if(t===o||t<0)return console.warn("bad regexp-value '"+e+"', missing /-enclosure"),null;var n=e.slice(t+1,o),i="i"===e[o+1]?"i":"";try{return new RegExp(n,i)}catch(t){return console.warn("bad regexp-value '"+e+"', parse error: "+t),null}},e}();function u(e,t){var o=e.getType(),n=t.getType();if(o!==n)return o-n;switch(o){case i.Defined:case i.Not:case i.Equals:case i.NotEquals:case i.Regex:return e.cmp(t);default:throw new Error("Unknown ContextKeyExpr!")}}var c=function(){function e(e){this.key=e}return e.prototype.getType=function(){return i.Defined},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}(),h=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return i.Equals},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 c(this.key):new g(this.key):this},e.prototype.keys=function(){return[this.key]},e}(),d=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return i.NotEquals},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 g(this.key):new c(this.key):this},e.prototype.keys=function(){return[this.key]},e}(),g=function(){function e(e){this.key=e}return e.prototype.getType=function(){return i.Not},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}(),p=function(){function e(e,t){this.key=e,this.regexp=t}return e.prototype.getType=function(){return i.Regex},e.prototype.cmp=function(e){if(this.keye.key)return 1;var t=this.regexp?this.regexp.source:void 0;return te.regexp.source?1:0},e.prototype.equals=function(t){if(t instanceof e){var o=this.regexp?this.regexp.source:void 0;return this.key===t.key&&o===t.regexp.source}return!1},e.prototype.evaluate=function(e){return!!this.regexp&&this.regexp.test(e.getValue(this.key))},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),f=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return i.And},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var o=0,n=this.expr.length;o0){switch(u=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case o:l=(n-i)/h+(n1&&(o-=1),o<1/6?e+6*(t-e)*o:o<.5?t:o<2/3?e+(t-e)*(2/3-o)*6:e},e.toRGBA=function(t){var o,n,r,s=t.h/360,a=t.s,l=t.l,u=t.a;if(0===a)o=n=r=l;else{var c=l<.5?l*(1+a):l+a-l*a,h=2*l-c;o=e._hue2rgb(h,c,s+1/3),n=e._hue2rgb(h,c,s),r=e._hue2rgb(h,c,s-1/3)}return new i(Math.round(255*o),Math.round(255*n),Math.round(255*r),u)},e}(),s=function(){function e(e,t,o,i){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,o),0),3),this.a=n(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 o,n=t.r/255,i=t.g/255,r=t.b/255,s=Math.max(n,i,r),a=s-Math.min(n,i,r),l=0===s?0:a/s;return o=0===a?0:s===n?((i-r)/a%6+6)%6:s===i?(r-n)/a+2:(n-i)/a+4,new e(Math.round(60*o),l,s,t.a)},e.toRGBA=function(e){var t=e.h,o=e.s,n=e.v,r=e.a,s=n*o,a=s*(1-Math.abs(t/60%2-1)),l=n-s,u=[0,0,0],c=u[0],h=u[1],d=u[2];return t<60?(c=s,h=a):t<120?(c=a,h=s):t<180?(h=s,d=a):t<240?(h=a,d=s):t<300?(c=a,d=s):t<360&&(c=s,d=a),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),d=Math.round(255*(d+l)),new i(c,h,d,r)},e}(),a=function(){function e(e){if(!e)throw new Error("Color needs a value");if(e instanceof i)this.rgba=e;else if(e instanceof r)this._hsla=e,this.rgba=r.toRGBA(e);else{if(!(e instanceof s))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=s.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:r.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hsva",{get:function(){return this._hsva?this._hsva:s.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return!!e&&i.equals(this.rgba,e.rgba)&&r.equals(this.hsla,e.hsla)&&s.equals(this.hsva,e.hsva)},e.prototype.getRelativeLuminance=function(){return n(.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()=0,s=g.indexOf("Macintosh")>=0,a=g.indexOf("Linux")>=0,u=!0,navigator.language}!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(i||(i={}));i.Web;l&&(s?i.Mac:r?i.Windows:a&&i.Linux);var p=r,f=s,m=a,_=l,y=u,v="object"==typeof self?self:"object"==typeof n?n:{},b=null;function E(t){return null===b&&(b=v.setImmediate?v.setImmediate.bind(v):void 0!==e&&"function"==typeof e.nextTick?e.nextTick.bind(e):v.setTimeout.bind(v)),b(t)}var C=s?2:r?1:3}).call(this,o(108),o(80))},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"c",(function(){return i})),o.d(t,"b",(function(){return r})),o.d(t,"d",(function(){return a}));var n,i,r,s=o(52);function a(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===s.a.ICodeEditor}!function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(n||(n={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(i||(i={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(r||(r={}))},function(e,t,o){"use strict";o.d(t,"n",(function(){return c})),o.d(t,"i",(function(){return h})),o.d(t,"h",(function(){return d})),o.d(t,"o",(function(){return g})),o.d(t,"e",(function(){return p})),o.d(t,"a",(function(){return f})),o.d(t,"d",(function(){return m})),o.d(t,"m",(function(){return _})),o.d(t,"g",(function(){return y})),o.d(t,"k",(function(){return v})),o.d(t,"j",(function(){return b})),o.d(t,"l",(function(){return E})),o.d(t,"f",(function(){return C})),o.d(t,"b",(function(){return S})),o.d(t,"c",(function(){return T}));var n,i=o(13),r=o(10),s=o(48),a=o(6),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function u(e){return e&&"function"==typeof e.then}function c(e){return u(e)?e:r.b.as(e)}function h(e){var t=new s.b,o=e(t.token),n=new Promise((function(e,n){t.token.onCancellationRequested((function(){n(i.a())})),Promise.resolve(o).then((function(o){t.dispose(),e(o)}),(function(e){t.dispose(),n(e)}))}));return new(function(){function e(){}return e.prototype.cancel=function(){t.cancel()},e.prototype.then=function(e,t){return n.then(e,t)},e.prototype.catch=function(e){return this.then(void 0,e)},e}())}function d(e){var t=new s.b;return new r.b((function(o,n,i){var s=e(t.token);s instanceof r.b?s.then((function(e){t.dispose(),o(e)}),(function(e){t.dispose(),n(e)}),i):u(s)?s.then((function(e){t.dispose(),o(e)}),(function(e){t.dispose(),n(e)})):(t.dispose(),o(s))}),(function(){t.cancel()}))}function g(e,t,o){var n=e.onCancellationRequested((function(){return t.cancel()}));return o&&(t=t.then(void 0,(function(e){if(!i.d(e))return r.b.wrapError(e)}))),y(t,(function(){return n.dispose()}))}var p=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var o=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new r.b((function(e,n,i){t.activePromise.then(o,o,i).done(e)}),(function(){t.activePromise.cancel()}))}return new r.b((function(e,o,n){t.queuedPromise.then(e,o,n)}),(function(){}))}return this.activePromise=e(),new r.b((function(e,o,n){t.activePromise.done((function(o){t.activePromise=null,e(o)}),(function(e){t.activePromise=null,o(e)}),n)}),(function(){t.activePromise.cancel()}))},e}(),f=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var o=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new r.b((function(e){o.onSuccess=e}),(function(){})).then((function(){o.completionPromise=null,o.onSuccess=null;var e=o.task;return o.task=null,e()}))),this.timeout=setTimeout((function(){o.timeout=null,o.onSuccess(null)}),t),this.completionPromise},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}(),m=function(e){function t(t){var o,n,r,s;return o=e.call(this,(function(e,t,o){n=e,r=t,s=o}),(function(){r(i.a())}))||this,t.then(n,r,s),o}return l(t,e),t}(r.b);function _(e){return h((function(t){return new Promise((function(o,n){var r=setTimeout(o,e);t.onCancellationRequested((function(e){clearTimeout(r),n(i.a())}))}))}))}function y(e,t){return o=e,r.b.is(o)&&"function"==typeof o.done?new r.b((function(o,n,r){e.done((function(e){try{t(e)}catch(e){i.e(e)}o(e)}),(function(e){try{t(e)}catch(e){i.e(e)}n(e)}),(function(e){r(e)}))}),(function(){e.cancel()})):(e.then((function(e){return t()}),(function(e){return t()})),e);var o}function v(e,t,o){void 0===t&&(t=function(e){return!!e}),void 0===o&&(o=null);var n=0,i=e.length,r=function(){return n>=i?Promise.resolve(o):(0,e[n++])().then((function(e){return t(e)?Promise.resolve(e):r()}))};return r()}function b(e,t,o){void 0===t&&(t=function(e){return!!e}),void 0===o&&(o=null);var n=0,i=e.length,s=function(){return n>=i?r.b.as(o):(0,e[n++])().then((function(e){return t(e)?r.b.as(e):s()}))};return s()}function E(e,t){for(var o=[],n=2;n=n.length)&&i.isLowSurrogate(n.charCodeAt(o))},e.isHighSurrogate=function(e,t,o){var n=e.getLineContent(t);return!(o<0||o>=n.length)&&i.isHighSurrogate(n.charCodeAt(o))},e.isInsideSurrogatePair=function(e,t,o){return this.isHighSurrogate(e,t,o-2)},e.visibleColumnFromColumn=function(e,t,o){var n=e.length;n>t-1&&(n=t-1);for(var r=0,s=0;s=t)return l-ts?s:i},e.nextTabStop=function(e,t){return e+t-e%t},e.prevTabStop=function(e,t){return e-1-(e-1)%t},e}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"h",(function(){return r})),o.d(t,"g",(function(){return s})),o.d(t,"f",(function(){return a})),o.d(t,"c",(function(){return l})),o.d(t,"i",(function(){return u})),o.d(t,"j",(function(){return c})),o.d(t,"d",(function(){return d})),o.d(t,"e",(function(){return g})),o.d(t,"k",(function(){return p})),o.d(t,"a",(function(){return m}));var n={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function i(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==n.number||e.constructor!==Array)}function r(e){return typeof e===n.string||e instanceof String}function s(e){return!(typeof e!==n.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function a(e){return(typeof e===n.number||e instanceof Number)&&!isNaN(e)}function l(e){return!0===e||!1===e}function u(e){return typeof e===n.undefined}function c(e){return u(e)||null===e}var h=Object.prototype.hasOwnProperty;function d(e){if(!s(e))return!1;for(var t in e)if(h.call(e,t))return!1;return!0}function g(e){return typeof e===n.function}function p(e,t){for(var o=Math.min(e.length,t.length),n=0;n "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?i.LTR:i.RTL},t.prototype.setEndPosition=function(e,o){return this.getDirection()===i.LTR?new t(this.startLineNumber,this.startColumn,e,o):new t(e,o,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new s.a(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,o){return this.getDirection()===i.LTR?new t(e,o,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,o)},t.fromPositions=function(e,o){return void 0===o&&(o=e),new t(e.lineNumber,e.column,o.lineNumber,o.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 o=0,n=e.length;o=0,g=h.indexOf("Edge/")>=0,p=d||g,f=h.indexOf("Firefox")>=0,m=h.indexOf("AppleWebKit")>=0,_=h.indexOf("Chrome")>=0,y=-1===h.indexOf("Chrome")&&h.indexOf("Safari")>=0,v=h.indexOf("iPad")>=0,b=g&&h.indexOf("WebView/")>=0;function E(){if(d)return!1;if(g){var e=h.indexOf("Edge/"),t=parseInt(h.substring(e+5,h.indexOf(".",e)),10);if(!t||t>=12&&t<=16)return!1}return!0}},function(e,t,o){"use strict";function n(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]}function i(e,t,o){if(void 0===o&&(o=function(e,t){return e===t}),e.length!==t.length)return!1;for(var n=0,i=e.length;n0))return r;i=r-1}}return-(n+1)}function s(e,t){var o=0,n=e.length;if(0===n)return 0;for(;on?e[l]=r[a++]:a>i?e[l]=r[s++]:t(r[a],r[s])<0?e[l]=r[a++]:e[l]=r[s++]}(t,o,n,s,i,r)}(e,t,0,e.length-1,[]),e}function l(e,t){for(var o,n=[],i=0,r=a(e.slice(0),t);it;i--)n.push(i);return n}function m(e,t,o){var n=e.slice(0,t),i=e.slice(t);return n.concat(o,i)}o.d(t,"n",(function(){return n})),o.d(t,"e",(function(){return i})),o.d(t,"b",(function(){return r})),o.d(t,"f",(function(){return s})),o.d(t,"l",(function(){return a})),o.d(t,"j",(function(){return l})),o.d(t,"c",(function(){return u})),o.d(t,"k",(function(){return c})),o.d(t,"d",(function(){return h})),o.d(t,"h",(function(){return d})),o.d(t,"g",(function(){return g})),o.d(t,"i",(function(){return p})),o.d(t,"m",(function(){return f})),o.d(t,"a",(function(){return m}))},function(e,t,o){"use strict";var n=o(33),i=o(4),r=o(18),s=o(11),a=o(13),l=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 Object(a.e)(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 Object(a.e)(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}(),d=o(2),g=o(23),p=function(){this.changeType=1},f=function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t},m=function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t},_=function(e,t,o){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=o},y=function(){this.changeType=5},v=function(){function e(e,t,o,n){this.changes=e,this.versionId=t,this.isUndoing=o,this.isRedoing=n}return e.prototype.containsEvent=function(e){for(var t=0,o=this.changes.length;t>>0}function S(e,t){e.metadata=254&e.metadata|t<<0}function T(e){return(2&e.metadata)>>>1==1}function w(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function k(e){return(4&e.metadata)>>>2==1}function O(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function R(e){return(8&e.metadata)>>>3==1}function L(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function N(e,t){e.metadata=207&e.metadata|t<<4}var I=function(){function e(e,t,o){this.metadata=0,this.parent=null,this.left=null,this.right=null,S(this,1),this.start=t,this.end=o,this.delta=0,this.maxEnd=o,this.id=e,this.ownerId=0,this.options=null,O(this,!1),N(this,1),L(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=o,this.range=null,w(this,!1)}return e.prototype.reset=function(e,t,o,n){this.start=t,this.end=o,this.maxEnd=o,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=o,this.range=n},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;O(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),N(this,this.options.stickiness),L(this,!!this.options.overviewRuler.color)},e.prototype.setCachedOffsets=function(e,t,o){this.cachedVersionId!==o&&(this.range=null),this.cachedVersionId=o,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),D=new I(null,0,0);D.parent=D,D.left=D,D.right=D,S(D,0);var A=function(){function e(){this.root=D,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,t,o,n,i){return this.root===D?[]:function(e,t,o,n,i,r){var s=e.root,a=0,l=0,u=0,c=[],h=0;for(;s!==D;)if(T(s))w(s.left,!1),w(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!T(s.left)){if(a+s.maxEndo)w(s,!0);else{if((u=a+s.end)>=t){s.setCachedOffsets(l,u,r);var d=!0;n&&s.ownerId&&s.ownerId!==n&&(d=!1),i&&k(s)&&(d=!1),d&&(c[h++]=s)}w(s,!0),s.right===D||T(s.right)||(a+=s.delta,s=s.right)}}return w(e.root,!1),c}(this,e,t,o,n,i)},e.prototype.search=function(e,t,o){return this.root===D?[]:function(e,t,o,n){var i=e.root,r=0,s=0,a=0,l=[],u=0;for(;i!==D;)if(T(i))w(i.left,!1),w(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),i=i.parent;else if(i.left===D||T(i.left)){s=r+i.start,a=r+i.end,i.setCachedOffsets(s,a,n);var c=!0;t&&i.ownerId&&i.ownerId!==t&&(c=!1),o&&k(i)&&(c=!1),c&&(l[u++]=i),w(i,!0),i.right===D||T(i.right)||(r+=i.delta,i=i.right)}else i=i.left;return w(e.root,!1),l}(this,e,t,o)},e.prototype.collectNodesFromOwner=function(e){return function(e,t){var o=e.root,n=[],i=0;for(;o!==D;)T(o)?(w(o.left,!1),w(o.right,!1),o=o.parent):o.left===D||T(o.left)?(o.ownerId===t&&(n[i++]=o),w(o,!0),o.right===D||T(o.right)||(o=o.right)):o=o.left;return w(e.root,!1),n}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){var t=e.root,o=[],n=0;for(;t!==D;)T(t)?(w(t.left,!1),w(t.right,!1),t=t.parent):t.left===D||T(t.left)?t.right===D||T(t.right)?(o[n++]=t,w(t,!0)):t=t.right:t=t.left;return w(e.root,!1),o}(this)},e.prototype.insert=function(e){M(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){B(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var o=e,n=0;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;var i=o.start+n,r=o.end+n;o.setCachedOffsets(i,r,t)},e.prototype.acceptReplace=function(e,t,o,n){for(var i=function(e,t,o){var n=e.root,i=0,r=0,s=0,a=[],l=0;for(;n!==D;)if(T(n))w(n.left,!1),w(n.right,!1),n===n.parent.right&&(i-=n.parent.delta),n=n.parent;else{if(!T(n.left)){if(i+n.maxEndo?w(n,!0):((s=i+n.end)>=t&&(n.setCachedOffsets(r,s,0),a[l++]=n),w(n,!0),n.right===D||T(n.right)||(i+=n.delta,n=n.right))}return w(e.root,!1),a}(this,e,e+t),r=0,s=i.length;ro?(i.start+=s,i.end+=s,i.delta+=s,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),w(i,!0)):(w(i,!0),i.right===D||T(i.right)||(r+=i.delta,i=i.right))}w(e.root,!1)}(this,e,e+t,o),this._normalizeDeltaIfNecessary();for(r=0,s=i.length;ro)&&(1!==n&&(2===n||t))}function x(e,t,o,n,i){var r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,l=o-t,u=n,c=Math.min(l,u),h=e.start,d=!1,g=e.end,p=!1,f=i?1:l>0?2:0;if(!d&&P(h,s,t,f)&&(d=!0),!p&&P(g,a,t,f)&&(p=!0),c>0&&!i){f=l>u?2:0;!d&&P(h,s,t+c,f)&&(d=!0),!p&&P(g,a,t+c,f)&&(p=!0)}f=i?1:0;!d&&P(h,s,o,f)&&(e.start=t+u,d=!0),!p&&P(g,a,o,f)&&(e.end=t+u,p=!0);var m=u-l;d||(e.start=Math.max(0,h+m),d=!0),p||(e.end=Math.max(0,g+m),p=!0),e.start>e.end&&(e.end=e.start)}function M(e,t){if(e.root===D)return t.parent=D,t.left=D,t.right=D,S(t,0),e.root=t,e.root;!function(e,t){var o=0,n=e.root,i=t.start,r=t.end;for(;;){if(G(i,r,n.start+o,n.end+o)<0){if(n.left===D){t.start-=o,t.end-=o,t.maxEnd-=o,n.left=t;break}n=n.left}else{if(n.right===D){t.start-=o+n.delta,t.end-=o+n.delta,t.maxEnd-=o+n.delta,n.right=t;break}o+=n.delta,n=n.right}}t.parent=n,t.left=D,t.right=D,S(t,1)}(e,t),j(t.parent);for(var o=t;o!==e.root&&1===C(o.parent);){var n;if(o.parent===o.parent.parent.left)1===C(n=o.parent.parent.right)?(S(o.parent,0),S(n,0),S(o.parent.parent,1),o=o.parent.parent):(o===o.parent.right&&H(e,o=o.parent),S(o.parent,0),S(o.parent.parent,1),U(e,o.parent.parent));else 1===C(n=o.parent.parent.left)?(S(o.parent,0),S(n,0),S(o.parent.parent,1),o=o.parent.parent):(o===o.parent.left&&U(e,o=o.parent),S(o.parent,0),S(o.parent.parent,1),H(e,o.parent.parent))}return S(e.root,0),t}function B(e,t){var o,n;if(t.left===D?(n=t,(o=t.right).delta+=t.delta,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),o.start+=t.delta,o.end+=t.delta):t.right===D?(o=t.left,n=t):((o=(n=function(e){for(;e.left!==D;)e=e.left;return e}(t.right)).right).start+=n.delta,o.end+=n.delta,o.delta+=n.delta,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=o,S(o,0),t.detach(),F(),W(o),void(e.root.parent=D);var i,r=1===C(n);if(n===n.parent.left?n.parent.left=o:n.parent.right=o,n===t?o.parent=n.parent:(n.parent===t?o.parent=n:o.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,S(n,C(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==D&&(n.left.parent=n),n.right!==D&&(n.right.parent=n)),t.detach(),r)return j(o.parent),n!==t&&(j(n),j(n.parent)),void F();for(j(o),j(o.parent),n!==t&&(j(n),j(n.parent));o!==e.root&&0===C(o);)o===o.parent.left?(1===C(i=o.parent.right)&&(S(i,0),S(o.parent,1),H(e,o.parent),i=o.parent.right),0===C(i.left)&&0===C(i.right)?(S(i,1),o=o.parent):(0===C(i.right)&&(S(i.left,0),S(i,1),U(e,i),i=o.parent.right),S(i,C(o.parent)),S(o.parent,0),S(i.right,0),H(e,o.parent),o=e.root)):(1===C(i=o.parent.left)&&(S(i,0),S(o.parent,1),U(e,o.parent),i=o.parent.left),0===C(i.left)&&0===C(i.right)?(S(i,1),o=o.parent):(0===C(i.left)&&(S(i.right,0),S(i,1),H(e,i),i=o.parent.left),S(i,C(o.parent)),S(o.parent,0),S(i.left,0),U(e,o.parent),o=e.root));S(o,0),F()}function F(){D.parent=D,D.delta=0,D.start=0,D.end=0}function H(e,t){var o=t.right;o.delta+=t.delta,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),o.start+=t.delta,o.end+=t.delta,t.right=o.left,o.left!==D&&(o.left.parent=t),o.parent=t.parent,t.parent===D?e.root=o:t===t.parent.left?t.parent.left=o:t.parent.right=o,o.left=t,t.parent=o,W(t),W(o)}function U(e,t){var o=t.left;t.delta-=o.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=o.delta,t.end-=o.delta,t.left=o.right,o.right!==D&&(o.right.parent=t),o.parent=t.parent,t.parent===D?e.root=o:t===t.parent.right?t.parent.right=o:t.parent.left=o,o.right=t,t.parent=o,W(t),W(o)}function V(e){var t=e.end;if(e.left!==D){var o=e.left.maxEnd;o>t&&(t=o)}if(e.right!==D){var n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function W(e){e.maxEnd=V(e)}function j(e){for(;e!==D;){var t=V(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function G(e,t,o,n){return e===o?t-n:e-o}var z=o(6),K=o(15),Y=K.b.performance&&"function"==typeof K.b.performance.now,X=function(){function e(e){this._highResolution=Y&&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?K.b.performance.now():(new Date).getTime()},e}(),q=o(69),$=o(86),J=o(106),Z=o(9),Q=o(32),ee=o(105),te=o(87),oe=o(25);function ne(e){return(16384|e<<0|2<<23)>>>0}var ie=new Uint32Array(0).buffer,re=function(){function e(e){this._state=e,this._lineTokens=null,this._invalid=!0}return e.prototype.deleteBeginning=function(e){null!==this._lineTokens&&this._lineTokens!==ie&&this.delete(0,e)},e.prototype.deleteEnding=function(e){if(null!==this._lineTokens&&this._lineTokens!==ie){var t=new Uint32Array(this._lineTokens),o=t[t.length-2];this.delete(e,o)}},e.prototype.delete=function(e,t){if(null!==this._lineTokens&&this._lineTokens!==ie&&e!==t){var o=new Uint32Array(this._lineTokens),n=o.length>>>1;if(0!==e||o[o.length-2]!==t){var i=te.a.findIndexInTokensArray(o,e),r=i>0?o[i-1<<1]:0;if(tu&&(o[l++]=d,o[l++]=o[1+(h<<1)],u=d)}if(l!==o.length){var g=new Uint32Array(l);g.set(o.subarray(0,l),0),this._lineTokens=g.buffer}}}else this._lineTokens=ie}},e.prototype.append=function(e){if(e!==ie)if(this._lineTokens!==ie){if(null!==this._lineTokens)if(null!==e){var t=new Uint32Array(this._lineTokens),o=new Uint32Array(e),n=o.length>>>1,i=new Uint32Array(t.length+o.length);i.set(t,0);for(var r=t.length,s=t[t.length-2],a=0;a>>1,i=te.a.findIndexInTokensArray(o,e);if(i>0)(i>0?o[i-1<<1]:0)===e&&i--;for(var r=i;r=e},e.prototype.hasLinesToTokenize=function(e){return this._invalidLineStartIndex=0;r--)this.invalidateLine(e.startLineNumber+r-1);this._acceptDeleteRange(e),this._acceptInsertText(new Z.a(e.startLineNumber,e.startColumn),t,o)},e.prototype._acceptDeleteRange=function(e){var t=e.startLineNumber-1;if(!(t>=this._tokens.length))if(e.startLineNumber!==e.endLineNumber){var o=this._tokens[t];o.deleteEnding(e.startColumn-1);var n=e.endLineNumber-1,i=null;if(n=this._tokens.length))if(0!==t){var i=this._tokens[n];i.deleteEnding(e.column-1),i.insert(e.column-1,o);for(var r=new Array(t),s=t-1;s>=0;s--)r[s]=new re(null);this._tokens=oe.a(this._tokens,e.lineNumber,r)}else this._tokens[n].insert(e.column-1,o)}},e.prototype._tokenizeOneLine=function(e,t){if(!this.hasLinesToTokenize(e))return e.getLineCount()+1;var o=this._invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t,o),o},e.prototype._tokenizeText=function(e,t,o){var n=null;try{n=this.tokenizationSupport.tokenize2(t,o,0)}catch(e){Object(a.e)(e)}return n||(n=Object(q.e)(this.languageIdentifier.id,t,o,0)),n},e.prototype._updateTokensUntilLine=function(e,t,o){if(this.tokenizationSupport){for(var n=e.getLineCount(),i=o-1,r=this._invalidLineStartIndex;r<=i;r++){var s=r+1,l=null,u=e.getLineContent(r+1);try{var c=this._getState(r).clone();l=this.tokenizationSupport.tokenize2(u,c,0)}catch(e){Object(a.e)(e)}if(l||(l=Object(q.e)(this.languageIdentifier.id,u,this._getState(r),0)),this._setTokens(this.languageIdentifier.id,r,u.length,l.tokens),t.registerChangedTokens(r+1),this._setIsInvalid(r,!1),s0?t[o-1]:null;n&&n.toLineNumber===e-1?n.toLineNumber++:t[o]={fromLineNumber:e,toLineNumber:e}},e.prototype.build=function(){return 0===this._ranges.length?null:{ranges:this._ranges}},e}();function le(e,t,o,n){var i;for(i=0;i0&&s>0)return 0;if(l>0&&u>0)return 0;var c=Math.abs(s-u),h=Math.abs(r-l);return 0===c?h:h%c==0?h/c:0}function ue(e,t,o){for(var n=Math.min(e.getLineCount(),1e4),i=0,r=0,s="",a=0,l=[0,0,0,0,0,0,0,0,0],u=1;u<=n;u++){for(var c=e.getLineLength(u),h=e.getLineContent(u),d=c<=65536,g=!1,p=0,f=0,m=0,_=0,y=c;_0?i++:f>1&&r++;var b=le(s,a,h,p);b<=8&&l[b]++,s=h,a=p}}var E=o;i!==r&&(E=iS&&(S=t,C=e)})),{insertSpaces:E,tabSize:C}}var ce=o(27),he=o(77),de=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=null,this.left=null,this.right=null}return e.prototype.next=function(){if(this.right!==ge)return pe(this.right);for(var e=this;e.parent!==ge&&e.parent.left!==e;)e=e.parent;return e.parent===ge?ge:e.parent},e.prototype.prev=function(){if(this.left!==ge)return fe(this.left);for(var e=this;e.parent!==ge&&e.parent.right!==e;)e=e.parent;return e.parent===ge?ge:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),ge=new de(null,0);function pe(e){for(;e.left!==ge;)e=e.left;return e}function fe(e){for(;e.right!==ge;)e=e.right;return e}function me(e){return e===ge?0:e.size_left+e.piece.length+me(e.right)}function _e(e){return e===ge?0:e.lf_left+e.piece.lineFeedCnt+_e(e.right)}function ye(){ge.parent=ge}function ve(e,t){var o=t.right;o.size_left+=t.size_left+(t.piece?t.piece.length:0),o.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=o.left,o.left!==ge&&(o.left.parent=t),o.parent=t.parent,t.parent===ge?e.root=o:t.parent.left===t?t.parent.left=o:t.parent.right=o,o.left=t,t.parent=o}function be(e,t){var o=t.left;t.left=o.right,o.right!==ge&&(o.right.parent=t),o.parent=t.parent,t.size_left-=o.size_left+(o.piece?o.piece.length:0),t.lf_left-=o.lf_left+(o.piece?o.piece.lineFeedCnt:0),t.parent===ge?e.root=o:t===t.parent.right?t.parent.right=o:t.parent.left=o,o.right=t,t.parent=o}function Ee(e,t){var o,n;if(o=t.left===ge?(n=t).right:t.right===ge?(n=t).left:(n=pe(t.right)).right,n===e.root)return e.root=o,o.color=0,t.detach(),ye(),void(e.root.parent=ge);var i=1===n.color;if(n===n.parent.left?n.parent.left=o:n.parent.right=o,n===t?(o.parent=n.parent,Te(e,o)):(n.parent===t?o.parent=n:o.parent=n.parent,Te(e,o),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==ge&&(n.left.parent=n),n.right!==ge&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Te(e,n)),t.detach(),o.parent.left===o){var r=me(o),s=_e(o);if(r!==o.parent.size_left||s!==o.parent.lf_left){var a=r-o.parent.size_left,l=s-o.parent.lf_left;o.parent.size_left=r,o.parent.lf_left=s,Se(e,o.parent,a,l)}}if(Te(e,o.parent),i)ye();else{for(var u;o!==e.root&&0===o.color;)o===o.parent.left?(1===(u=o.parent.right).color&&(u.color=0,o.parent.color=1,ve(e,o.parent),u=o.parent.right),0===u.left.color&&0===u.right.color?(u.color=1,o=o.parent):(0===u.right.color&&(u.left.color=0,u.color=1,be(e,u),u=o.parent.right),u.color=o.parent.color,o.parent.color=0,u.right.color=0,ve(e,o.parent),o=e.root)):(1===(u=o.parent.left).color&&(u.color=0,o.parent.color=1,be(e,o.parent),u=o.parent.left),0===u.left.color&&0===u.right.color?(u.color=1,o=o.parent):(0===u.left.color&&(u.right.color=0,u.color=1,ve(e,u),u=o.parent.left),u.color=o.parent.color,o.parent.color=0,u.left.color=0,be(e,o.parent),o=e.root));o.color=0,ye()}}function Ce(e,t){for(Te(e,t);t!==e.root&&1===t.parent.color;){var o;if(t.parent===t.parent.parent.left)1===(o=t.parent.parent.right).color?(t.parent.color=0,o.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&ve(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,be(e,t.parent.parent));else 1===(o=t.parent.parent.left).color?(t.parent.color=0,o.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&be(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,ve(e,t.parent.parent))}e.root.color=0}function Se(e,t,o,n){for(;t!==e.root&&t!==ge;)t.parent.left===t&&(t.parent.size_left+=o,t.parent.lf_left+=n),t=t.parent}function Te(e,t){var o=0,n=0;if(t!==e.root){if(0===o){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;o=me((t=t.parent).left)-t.size_left,n=_e(t.left)-t.lf_left,t.size_left+=o,t.lf_left+=n}for(;t!==e.root&&(0!==o||0!==n);)t.parent.left===t&&(t.parent.size_left+=o,t.parent.lf_left+=n),t=t.parent}}ge.parent=ge,ge.left=ge,ge.right=ge,ge.color=0;function we(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}var ke=function(e,t,o,n,i){this.lineStarts=e,this.cr=t,this.lf=o,this.crlf=n,this.isBasicASCII=i};function Oe(e,t){void 0===t&&(t=!0);for(var o=[0],n=1,i=0,r=e.length;i=0;t--){var o=this._cache[t];if(o.nodeStartOffset<=e&&o.nodeStartOffset+o.node.piece.length>=e)return o}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var o=this._cache[t];if(o.nodeStartLineNumber&&o.nodeStartLineNumber=e)return o}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,o=0;o=e)&&(this._cache[o]=null,t=!0)}if(t){var i=[];for(o=0;o0){e[i].lineStarts||(e[i].lineStarts=Oe(e[i].buffer));var s=new Re(i+1,{line:0,column:0},{line:e[i].lineStarts.length-1,column:e[i].buffer.length-e[i].lineStarts[e[i].lineStarts.length-1]},e[i].lineStarts.length-1,e[i].buffer.length);this._buffers.push(e[i]),n=this.rbInsertRight(n,s)}this._searchCache=new Ne(1),this._lastVisitedLine={lineNumber:0,value:null},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var t=this,o=65535-Math.floor(21845),n=2*o,i="",r=0,s=[];if(this.iterate(this.root,(function(a){var l=t.getNodeContent(a),u=l.length;if(r<=o||r+u0){var a=i.replace(/\r\n|\r|\n/g,e);s.push(new Le(a,Oe(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 o=0,n=this.root;n!==ge;)if(n.left!==ge&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return(o+=n.size_left)+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,o+=n.size_left+n.piece.length,n=n.right}return o},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,o=0,n=e;t!==ge;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var i=this.getIndexOf(t,e-t.size_left);if(o+=t.lf_left+i.index,0===i.index){var r=n-this.getOffsetAt(o+1,1);return new Z.a(o+1,r+1)}return new Z.a(o+1,i.remainder+1)}if(e-=t.size_left+t.piece.length,o+=t.lf_left+t.piece.lineFeedCnt,t.right===ge){r=n-e-this.getOffsetAt(o+1,1);return new Z.a(o+1,r+1)}t=t.right}return new Z.a(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var o=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),i=this.getValueInRange2(o,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?i:i.replace(/\r\n|\r|\n/g,t):i},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var o=e.node,n=this._buffers[o.piece.bufferIndex].buffer,i=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return n.substring(i+e.remainder,i+t.remainder)}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),l=s.substring(a+e.remainder,a+r.piece.length);for(r=r.next();r!==ge;){var u=this._buffers[r.piece.bufferIndex].buffer,c=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){l+=u.substring(c,c+t.remainder);break}l+=u.substr(c,r.piece.length),r=r.next()}return l},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 o=this.nodeAt2(e,t+1);if(o.remainder===o.node.piece.length){var n=o.node.next();if(!n)return 0;var i=this._buffers[n.piece.bufferIndex],r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.buffer.charCodeAt(r)}i=this._buffers[o.node.piece.bufferIndex];var s=(r=this.offsetInBuffer(o.node.piece.bufferIndex,o.node.piece.start))+o.remainder;return i.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,o,n,i,r,s,a,l,u,c){var h,g=this._buffers[e.piece.bufferIndex],p=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),f=this.offsetInBuffer(e.piece.bufferIndex,i),m=this.offsetInBuffer(e.piece.bufferIndex,r);t.reset(f);var _={line:0,column:0};do{if(h=t.next(g.buffer)){if(h.index>=m)return u;this.positionInBuffer(e,h.index-p,_);var y=this.getLineFeedCnt(e.piece.bufferIndex,i,_),v=_.line===i.line?_.column-i.column+n:_.column+1,b=v+h[0].length;if(c[u++]=Object(he.d)(new d.a(o+y,v,o+y,b),h,a),h.index+h[0].length>=m)return u;if(u>=l)return u}}while(h);return u},e.prototype.findMatchesLineByLine=function(e,t,o,n){var i=[],r=0,s=new he.b(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];var u=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,u,c,t,o,n,r,i),i;for(var h=e.startLineNumber,d=a.node;d!==l.node;){var g=this.getLineFeedCnt(d.piece.bufferIndex,u,d.piece.end);if(g>=1){var p=this._buffers[d.piece.bufferIndex].lineStarts,f=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),m=p[u.line+g],_=h===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(d,s,h,_,u,this.positionInBuffer(d,m-f),t,o,n,r,i))>=n)return i;h+=g}var y=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){var v=this.getLineContent(h).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,s,v,e.endLineNumber,y,r,i,o,n),i}if((r=this._findMatchesInLine(t,s,this.getLineContent(h).substr(y),h,y,r,i,o,n))>=n)return i;h++,d=(a=this.nodeAt2(h,1)).node,u=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){var b=h===e.startLineNumber?e.startColumn-1:0;v=this.getLineContent(h).substring(b,e.endColumn-1);return r=this._findMatchesInLine(t,s,v,e.endLineNumber,b,r,i,o,n),i}var E=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(l.node,s,h,E,u,c,t,o,n,r,i),i},e.prototype._findMatchesInLine=function(e,t,o,n,i,s,a,l,u){var c,h=e.wordSeparators;if(!l&&e.simpleSearch){for(var g=e.simpleSearch,p=g.length,f=o.length,m=-p;-1!==(m=o.indexOf(g,m+p));)if((!h||Object(he.e)(h,o,f,m,p))&&(a[s++]=new r.e(new d.a(n,m+1+i,n,m+1+p+i),null),s>=u))return s;return s}t.reset(0);do{if((c=t.next(o))&&(a[s++]=Object(he.d)(new d.a(n,c.index+1+i,n,c.index+1+c[0].length+i),c,l),s>=u))return s}while(c);return s},e.prototype.insert=function(e,t,o){if(void 0===o&&(o=!1),this._EOLNormalized=this._EOLNormalized&&o,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value=null,this.root!==ge){var n=this.nodeAt(e),i=n.node,r=n.remainder,s=n.nodeStartOffset,a=i.piece,l=a.bufferIndex,u=this.positionInBuffer(i,r);if(0===i.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.length<65535)return this.appendToNode(i,t),void this.computeBufferMetadata();if(s===e)this.insertContentToNodeLeft(t,i),this._searchCache.valdiate(e);else if(s+i.piece.length>e){var c=[],h=new Re(a.bufferIndex,u,a.end,this.getLineFeedCnt(a.bufferIndex,u,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,u));if(this.shouldCheckCRLF()&&this.endWithCR(t))if(10===this.nodeCharCodeAt(i,r)){var d={line:h.start.line+1,column:0};h=new Re(h.bufferIndex,d,h.end,this.getLineFeedCnt(h.bufferIndex,d,h.end),h.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,r-1)){var g=this.positionInBuffer(i,r-1);this.deleteNodeTail(i,g),t="\r"+t,0===i.piece.length&&c.push(i)}else this.deleteNodeTail(i,u);else this.deleteNodeTail(i,u);var p=this.createNewPieces(t);h.length>0&&this.rbInsertRight(i,h);for(var f=i,m=0;m=0;l--)a=this.rbInsertLeft(a,s[l]);this.validateCRLFWithPrevNode(a),this.deleteNodes(o)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var o=this.createNewPieces(e),n=this.rbInsertRight(t,o[0]),i=n,r=1;r=i))break;c=n+1}return o?(o.line=n,o.column=u-r,null):{line:n,column:u-r}},e.prototype.getLineFeedCnt=function(e,t,o){if(0===o.column)return o.line-t.line;var n=this._buffers[e].lineStarts;if(o.line===n.length-1)return o.line-t.line;var i=n[o.line+1],r=n[o.line]+o.column;if(i>r+1)return o.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?o.line-t.line+1:o.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 o=e.charCodeAt(65534),n=void 0;13===o||o>=55296&&o<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,65535),e=e.substring(65535));var i=Oe(n);t.push(new Re(this._buffers.length,{line:0,column:0},{line:i.length-1,column:n.length-i[i.length-1]},i.length-1,n.length)),this._buffers.push(new Le(n,i))}var r=Oe(e);return t.push(new Re(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 Le(e,r)),t}var s=this._buffers[0].buffer.length,a=Oe(e,!1),l=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},l=this._lastChangeBufferPos;for(var u=0;u=e-1)o=o.left;else{if(o.lf_left+o.piece.lineFeedCnt>e-1){r=this.getAccumulatedValue(o,e-o.lf_left-2),l=this.getAccumulatedValue(o,e-o.lf_left-1),s=this._buffers[o.piece.bufferIndex].buffer,a=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return u+=o.size_left,this._searchCache.set({node:o,nodeStartOffset:u,nodeStartLineNumber:c-(e-1-o.lf_left)}),s.substring(a+r,a+l-t)}if(o.lf_left+o.piece.lineFeedCnt===e-1){r=this.getAccumulatedValue(o,e-o.lf_left-2),s=this._buffers[o.piece.bufferIndex].buffer,a=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);n=s.substring(a+r,a+o.piece.length);break}e-=o.lf_left+o.piece.lineFeedCnt,u+=o.size_left+o.piece.length,o=o.right}for(o=o.next();o!==ge;){s=this._buffers[o.piece.bufferIndex].buffer;if(o.piece.lineFeedCnt>0){l=this.getAccumulatedValue(o,0),a=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return n+=s.substring(a,a+l-t)}a=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);n+=s.substr(a,o.piece.length),o=o.next()}return n},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,o=0;e!==ge;)t+=e.lf_left+e.piece.lineFeedCnt,o+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=o,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var o=e.piece,n=this.positionInBuffer(e,t),i=n.line-o.start.line;if(this.offsetInBuffer(o.bufferIndex,o.end)-this.offsetInBuffer(o.bufferIndex,o.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,o.start,n);if(r!==i)return{index:r,remainder:0}}return{index:i,remainder:n.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var o=e.piece,n=this._buffers[o.bufferIndex].lineStarts,i=o.start.line+t+1;return i>o.end.line?n[o.end.line]+o.end.column-n[o.start.line]-o.start.column:n[i]-n[o.start.line]-o.start.column},e.prototype.deleteNodeTail=function(e,t){var o=e.piece,n=o.lineFeedCnt,i=this.offsetInBuffer(o.bufferIndex,o.end),r=t,s=this.offsetInBuffer(o.bufferIndex,r),a=this.getLineFeedCnt(o.bufferIndex,o.start,r),l=a-n,u=s-i,c=o.length+u;e.piece=new Re(o.bufferIndex,o.start,r,a,c),Se(this,e,u,l)},e.prototype.deleteNodeHead=function(e,t){var o=e.piece,n=o.lineFeedCnt,i=this.offsetInBuffer(o.bufferIndex,o.start),r=t,s=this.getLineFeedCnt(o.bufferIndex,r,o.end),a=s-n,l=i-this.offsetInBuffer(o.bufferIndex,r),u=o.length+l;e.piece=new Re(o.bufferIndex,r,o.end,s,u),Se(this,e,l,a)},e.prototype.shrinkNode=function(e,t,o){var n=e.piece,i=n.start,r=n.end,s=n.length,a=n.lineFeedCnt,l=t,u=this.getLineFeedCnt(n.bufferIndex,n.start,l),c=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,i);e.piece=new Re(n.bufferIndex,n.start,l,u,c),Se(this,e,c-s,u-a);var h=new Re(n.bufferIndex,o,r,this.getLineFeedCnt(n.bufferIndex,o,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,o)),d=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(d)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var o=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var i=Oe(t,!1),r=0;re)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;var i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var o=this.root,n=0;o!==ge;)if(o.left!==ge&&o.lf_left>=e-1)o=o.left;else{if(o.lf_left+o.piece.lineFeedCnt>e-1){var i=this.getAccumulatedValue(o,e-o.lf_left-2),r=this.getAccumulatedValue(o,e-o.lf_left-1);return n+=o.size_left,{node:o,remainder:Math.min(i+t-1,r),nodeStartOffset:n}}if(o.lf_left+o.piece.lineFeedCnt===e-1){if((i=this.getAccumulatedValue(o,e-o.lf_left-2))+t-1<=o.piece.length)return{node:o,remainder:i+t-1,nodeStartOffset:n};t-=o.piece.length-i;break}e-=o.lf_left+o.piece.lineFeedCnt,n+=o.size_left+o.piece.length,o=o.right}for(o=o.next();o!==ge;){if(o.piece.lineFeedCnt>0){r=this.getAccumulatedValue(o,0);var s=this.offsetOfNode(o);return{node:o,remainder:Math.min(t-1,r),nodeStartOffset:s}}if(o.piece.length>=t-1)return{node:o,remainder:t-1,nodeStartOffset:this.offsetOfNode(o)};t-=o.piece.length,o=o.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var o=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return o.buffer.charCodeAt(n)},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===ge||0===e.piece.lineFeedCnt)return!1;var t=e.piece,o=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,i=o[n]+t.start.column;return n!==o.length-1&&(!(o[n+1]>i+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(i))},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==ge&&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 o,n=[],i=this._buffers[e.piece.bufferIndex].lineStarts;o=0===e.piece.end.column?{line:e.piece.end.line-1,column:i[e.piece.end.line]-i[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 Re(e.piece.bufferIndex,e.piece.start,o,s,r),Se(this,e,-1,-1),0===e.piece.length&&n.push(e);var a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,u=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Re(t.piece.bufferIndex,a,t.piece.end,u,l),Se(this,t,-1,-1),0===t.piece.length&&n.push(t);var c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(var h=0;h0){m.sort((function(e,t){return t.lineNumber-e.lineNumber})),S=[];l=0;for(var T=m.length;l0&&m[l-1].lineNumber===y)){var w=m[l].oldContent,k=this.getLineContent(y);0!==k.length&&k!==w&&-1===E.firstNonWhitespaceIndex(k)&&S.push(y)}}}return new r.a(b,C,S)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,o=e[0].range,n=e[e.length-1].range,i=new d.a(o.startLineNumber,o.startColumn,n.endLineNumber,n.endColumn),s=o.startLineNumber,a=o.startColumn,l=[],u=0,c=e.length;u0){var h=a.lines.length,g=a.lines[0],p=a.lines[h-1];c=1===h?new d.a(l,u,l,u+g.length):new d.a(l,u,l+h-1,p.length+1)}else c=new d.a(l,u,l,u);t=c.endLineNumber,o=c.endColumn,n.push(c),i=a}return n},e._sortOpsAscending=function(e,t){var o=d.a.compareRangesUsingEnds(e.range,t.range);return 0===o?e.sortIndex-t.sortIndex:o},e._sortOpsDescending=function(e,t){var o=d.a.compareRangesUsingEnds(e.range,t.range);return 0===o?t.sortIndex-e.sortIndex:-o},e}(),Ae=function(){function e(e,t,o,n,i,r,s,a){this._chunks=e,this._bom=t,this._cr=o,this._lf=n,this._crlf=i,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,o=this._cr+this._crlf;return 0===t?e===r.b.LF?"\n":"\r\n":o>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),o=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var n=0,i=o.length;n=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 o=1,n=0,i=0,r=0,s=!0,a=0,l=t.length;a126)&&(s=!1)}var c=new ke(we(e),n,i,r,s);return e.length=0,c}(this._tmpLineStarts,e);this.chunks.push(new Le(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=E.containsRTL(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new Ae(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=Oe(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}();o.d(t,"b",(function(){return Ue})),o.d(t,"a",(function(){return Ge}));var xe,Me=(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function Be(e){var t=new Pe;return t.acceptChunk(e),t.finish()}function Fe(e,t){return("string"==typeof e?Be(e):e).create(t)}var He=0;var Ue=function(e){function t(o,a,l,u){void 0===u&&(u=null);var c=e.call(this)||this;c._onWillDispose=c._register(new i.a),c.onWillDispose=c._onWillDispose.event,c._onDidChangeDecorations=c._register(new Ye),c.onDidChangeDecorations=c._onDidChangeDecorations.event,c._onDidChangeLanguage=c._register(new i.a),c.onDidChangeLanguage=c._onDidChangeLanguage.event,c._onDidChangeLanguageConfiguration=c._register(new i.a),c.onDidChangeLanguageConfiguration=c._onDidChangeLanguageConfiguration.event,c._onDidChangeTokens=c._register(new i.a),c.onDidChangeTokens=c._onDidChangeTokens.event,c._onDidChangeOptions=c._register(new i.a),c.onDidChangeOptions=c._onDidChangeOptions.event,c._eventEmitter=c._register(new Xe),He++,c.id="$model"+He,c.isForSimpleWidget=a.isForSimpleWidget,c._associatedResource=null==u?n.a.parse("inmemory://model/"+He):u,c._attachedEditorCount=0,c._buffer=Fe(o,a.defaultEOL),c._options=t.resolveOptions(c._buffer,a);var g,p=c._buffer.getLineCount(),f=c._buffer.getValueLengthInRange(new d.a(1,1,p,c._buffer.getLineLength(p)+1),r.c.TextDefined);return a.largeFileOptimizations?c._isTooLargeForTokenization=f>t.LARGE_FILE_SIZE_THRESHOLD||p>t.LARGE_FILE_LINE_COUNT_THRESHOLD:c._isTooLargeForTokenization=!1,c._isTooLargeForSyncing=f>t.MODEL_SYNC_LIMIT,c._setVersionId(1),c._isDisposed=!1,c._isDisposing=!1,c._languageIdentifier=l||q.a,c._tokenizationListener=s.y.onDidChange((function(e){-1!==e.changedLanguages.indexOf(c._languageIdentifier.language)&&(c._resetTokenizationState(),c.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:c.getLineCount()}]}),c._shouldAutoTokenize()&&c._warmUpTokens())})),c._revalidateTokensTimeout=-1,c._languageRegistryListener=Q.a.onDidChange((function(e){e.languageIdentifier.id===c._languageIdentifier.id&&c._onDidChangeLanguageConfiguration.fire({})})),c._resetTokenizationState(),c._instanceId=(g=He,(g%=52)<26?String.fromCharCode(97+g):String.fromCharCode(65+g-26)),c._lastDecorationId=0,c._decorations=Object.create(null),c._decorationsTree=new Ve,c._commandManager=new h(c),c._isUndoing=!1,c._isRedoing=!1,c._trimAutoWhitespaceLines=null,c}return Me(t,e),t.createFromString=function(e,o,n,i){return void 0===o&&(o=t.DEFAULT_CREATION_OPTIONS),void 0===n&&(n=null),void 0===i&&(i=null),new t(e,o,n,i)},t.resolveOptions=function(e,t){if(t.detectIndentation){var o=ue(e,t.tabSize,t.insertSpaces);return new r.g({tabSize:o.tabSize,insertSpaces:o.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new r.g({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._commandManager=null,this._decorations=null,this._decorationsTree=null,this._tokenizationListener.dispose(),this._languageRegistryListener.dispose(),this._clearTimers(),this._tokens=null,this._isDisposed=!0,this._buffer=null,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 b(e,t))},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=Fe(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},t.prototype._createContentChanged2=function(e,t,o,n,i,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:o,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:i,isRedoing:r,isFlush:s}},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),o=this.getValueLengthInRange(t),n=this.getLineCount(),i=this.getLineMaxColumn(n);this._buffer=e,this._increaseVersionId(),this._resetTokenizationState(),this._decorations=Object.create(null),this._decorationsTree=new Ve,this._commandManager=new h(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new v([new p],this._versionId,!1,!1),this._createContentChanged2(new d.a(1,1,n,i),0,o,this.getValue(),!1,!1,!0))}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=e===r.d.CRLF?"\r\n":"\n";if(this._buffer.getEOL()!==t){var o=this.getFullModelRange(),n=this.getValueLengthInRange(o),i=this.getLineCount(),s=this.getLineMaxColumn(i);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new v([new y],this._versionId,!1,!1),this._createContentChanged2(new d.a(1,1,i,s),0,n,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(),o=0,n=t.length;o0},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,o=this._buffer.getLineCount(),n=1;n<=o;n++){var i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}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,o=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,n=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,i=new r.g({tabSize:t,insertSpaces:o,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:n});if(!this._options.equals(i)){var s=this._options.createChangeEvent(i);this._options=i,this._onDidChangeOptions.fire(s)}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var o=ue(this._buffer,t,e);this.updateOptions({insertSpaces:o.insertSpaces,tabSize:o.tabSize})},t._normalizeIndentationFromWhitespace=function(e,t,o){for(var n=0,i=0;ithis.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,o,n=this._buffer.getLineCount(),i=e.startLineNumber,r=e.startColumn;if(i<1)t=1,o=1;else if(i>n)t=n,o=this.getLineMaxColumn(t);else{if(t=0|i,r<=1)o=1;else o=r>=(c=this.getLineMaxColumn(t))?c:0|r}var s,a,l=e.endLineNumber,u=e.endColumn;if(l<1)s=1,a=1;else if(l>n)s=n,a=this.getLineMaxColumn(s);else{var c;if(s=0|l,u<=1)a=1;else a=u>=(c=this.getLineMaxColumn(s))?c:0|u}return i===t&&r===o&&l===s&&u===a&&e instanceof d.a&&!(e instanceof g.a)?e:new d.a(t,o,s,a)},t.prototype._isValidPosition=function(e,t,o){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(o&&t>1){var n=this._buffer.getLineCharCode(e,t-2);if(E.isHighSurrogate(n))return!1}return!0},t.prototype._validatePosition=function(e,t,o){var n=Math.floor("number"!=typeof e||isNaN(e)?1:e),i=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(n<1)return new Z.a(1,1);if(n>r)return new Z.a(r,this.getLineMaxColumn(r));if(i<=1)return new Z.a(n,1);var s=this.getLineMaxColumn(n);if(i>=s)return new Z.a(n,s);if(o){var a=this._buffer.getLineCharCode(n,i-2);if(E.isHighSurrogate(a))return new Z.a(n,i-1)}return new Z.a(n,i)},t.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof Z.a&&this._isValidPosition(e.lineNumber,e.column,!0)?e:this._validatePosition(e.lineNumber,e.column,!0)},t.prototype._isValidRange=function(e,t){var o=e.startLineNumber,n=e.startColumn,i=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(o,n,!1))return!1;if(!this._isValidPosition(i,r,!1))return!1;if(t){var s=n>1?this._buffer.getLineCharCode(o,n-2):0,a=r>1&&r<=this._buffer.getLineLength(i)?this._buffer.getLineCharCode(i,r-2):0,l=E.isHighSurrogate(s),u=E.isHighSurrogate(a);return!l&&!u}return!0},t.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof d.a&&!(e instanceof g.a)&&this._isValidRange(e,!0))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),o=this._validatePosition(e.endLineNumber,e.endColumn,!1),n=t.lineNumber,i=t.column,r=o.lineNumber,s=o.column,a=i>1?this._buffer.getLineCharCode(n,i-2):0,l=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,u=E.isHighSurrogate(a),c=E.isHighSurrogate(l);return u||c?n===r&&i===s?new d.a(n,i-1,r,s-1):u&&c?new d.a(n,i-1,r,s+1):u?new d.a(n,i-1,r,s):new d.a(n,i,r,s+1):new d.a(n,i,r,s)},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var o=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,o)))},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new d.a(1,1,e,this.getLineMaxColumn(e))},t.prototype.findMatchesLineByLine=function(e,t,o,n){return this._buffer.findMatchesLineByLine(e,t,o,n)},t.prototype.findMatches=function(e,t,o,n,i,r,s){var a;if(void 0===s&&(s=999),this._assertNotDisposed(),a=d.a.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!o&&e.indexOf("\n")<0){var l=new he.a(e,o,n,i).parseSearchRequest();return l?this.findMatchesLineByLine(a,l,r,s):[]}return he.c.findMatches(this,new he.a(e,o,n,i),a,r,s)},t.prototype.findNextMatch=function(e,t,o,n,i,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!o&&e.indexOf("\n")<0){var a=new he.a(e,o,n,i).parseSearchRequest(),l=this.getLineCount(),u=new d.a(s.lineNumber,s.column,l,this.getLineMaxColumn(l)),c=this.findMatchesLineByLine(u,a,r,1);return he.c.findNextMatch(this,new he.a(e,o,n,i),s,r),c.length>0?c[0]:(u=new d.a(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(c=this.findMatchesLineByLine(u,a,r,1)).length>0?c[0]:null)}return he.c.findNextMatch(this,new he.a(e,o,n,i),s,r)},t.prototype.findPreviousMatch=function(e,t,o,n,i,r){this._assertNotDisposed();var s=this.validatePosition(t);return he.c.findPreviousMatch(this,new he.a(e,o,n,i),s,r)},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?r.d.LF:r.d.CRLF)!==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,o){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,o)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,o){var n=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var i=t.map((function(e){return{range:n.validateRange(e.range),text:e.text}})),r=!0,s=0,a=e.length;sl.endLineNumber,p=l.startLineNumber>y.endLineNumber;if(!g&&!p){u=!0;break}}if(!u){r=!1;break}}if(r)for(s=0,a=this._trimAutoWhitespaceLines.length;sy.endLineNumber)&&!(f===y.startLineNumber&&y.startColumn===m&&y.isEmpty()&&v&&v.length>0&&"\n"===v.charAt(0)||f===y.startLineNumber&&1===y.startColumn&&y.isEmpty()&&v&&v.length>0&&"\n"===v.charAt(v.length-1))){_=!1;break}}_&&t.push({range:new d.a(f,1,f,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,o)},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,o=0,n=0,i=e.length;n=0;T--){var w=p+T,k=s-u-S+w;l.push(new f(w,this.getLineContent(k)))}if(Cthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,o)},t.prototype.getLinesDecorations=function(e,t,o,n){void 0===o&&(o=0),void 0===n&&(n=!1);var i=this.getLineCount(),r=Math.min(i,Math.max(1,e)),s=Math.min(i,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new d.a(r,1,s,a),o,n)},t.prototype.getDecorationsInRange=function(e,t,o){void 0===t&&(t=0),void 0===o&&(o=!1);var n=this.validateRange(e);return this._getDecorationsInRange(n,t,o)},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var o=this.getVersionId(),n=this._decorationsTree.search(e,t,!0,o);return this._ensureNodesHaveRanges(n)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var o=this.getVersionId(),n=this._decorationsTree.search(e,t,!1,o);return this._ensureNodesHaveRanges(n)},t.prototype._getDecorationsInRange=function(e,t,o){var n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),i=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(n,i,t,o,r);return this._ensureNodesHaveRanges(s)},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,o=e.length;t0)for(;i>0&&s>=1;){var l=this.getLineFirstNonWhitespaceColumn(s);if(0!==l){if(l=0;c--){u=(g=this._tokens._tokenizeText(this._buffer,r[c],u))?g.endState.clone():a.clone()}var h=Math.floor(.4*this._tokens.inValidLineStartIndex);t=Math.min(this.getLineCount(),t+h);for(var d=e;d<=t;d++){var g,p=this.getLineContent(d);(g=this._tokens._tokenizeText(this._buffer,p,u))?(this._tokens._setTokens(this._tokens.languageIdentifier.id,d-1,p.length,g.tokens),this._tokens._setIsInvalid(d-1,!1),this._tokens._setState(d-1,u),u=g.endState.clone(),n.registerChangedTokens(d)):u=a.clone()}var f=n.build();f&&this._onDidChangeTokens.fire(f)}}},t.prototype.forceTokenization=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");var t=new ae;this._tokens._updateTokensUntilLine(this._buffer,t,e);var o=t.build();o&&this._onDidChangeTokens.fire(o)},t.prototype.isCheapToTokenize=function(e){return this._tokens.isCheapToTokenize(e)},t.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},t.prototype.getLineTokens=function(e){if(e<1||e>this.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 o=this.validatePosition({lineNumber:e,column:t}),n=o.lineNumber,i=o.column,r=this._getLineTokens(n);return r.getLanguageId(r.findTokenIndexAtOffset(i-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 ae,o=X.create(!1);this._tokens.hasLinesToTokenize(this._buffer)&&!(o.elapsed()>20);){if(this._tokens._tokenizeOneLine(this._buffer,t)>=e)break}this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization();var n=t.build();n&&this._onDidChangeTokens.fire(n)},t.prototype.emitModelTokensChangedEvent=function(e){this._isDisposing||this._onDidChangeTokens.fire(e)},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var o=this.validatePosition(e),n=this.getLineContent(o.lineNumber),i=this._getLineTokens(o.lineNumber),r=i.findTokenIndexAtOffset(o.column-1),s=t._findLanguageBoundaries(i,r),a=s[0],l=s[1],u=Object(ee.d)(o.column,Q.a.getWordDefinition(i.getLanguageId(r)),n.substring(a,l),a);if(u)return u;if(r>0&&a===o.column-1){var c=t._findLanguageBoundaries(i,r-1),h=c[0],d=c[1],g=Object(ee.d)(o.column,Q.a.getWordDefinition(i.getLanguageId(r-1)),n.substring(h,d),h);if(g)return g}return null},t._findLanguageBoundaries=function(e,t){for(var o,n,i=e.getLanguageId(t),r=t;r>=0&&e.getLanguageId(r)===i;r--)o=e.getStartOffset(r);r=t;for(var s=e.getCount();r0&&o.getStartOffset(i)===e.column-1){a=o.getStartOffset(i);i--;var u=Q.a.getBracketsSupport(o.getLanguageId(i));if(u&&!Object($.b)(o.getStandardTokenType(i))){var c,h,d;s=Math.max(o.getStartOffset(i),e.column-1-u.maxBracketLength);if((c=J.a.findPrevBracketInToken(u.reversedRegex,t,n,s,a))&&c.startColumn<=e.column&&e.column<=c.endColumn)if(h=(h=n.substring(c.startColumn-1,c.endColumn-1)).toLowerCase(),d=this._matchFoundBracket(c,u.textIsBracket[h],u.textIsOpenBracket[h]))return d}}return null},t.prototype._matchFoundBracket=function(e,t,o){if(!t)return null;var n;if(o){if(n=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,n]}else if(n=this._findMatchingBracketUp(t,e.getStartPosition()))return[e,n];return null},t.prototype._findMatchingBracketUp=function(e,t){for(var o=e.languageIdentifier.id,n=e.reversedRegex,i=-1,r=t.lineNumber;r>=1;r--){var s=this._getLineTokens(r),a=s.getCount(),l=this._buffer.getLineContent(r),u=a-1,c=-1;for(r===t.lineNumber&&(u=s.findTokenIndexAtOffset(t.column-1),c=t.column-1);u>=0;u--){var h=s.getLanguageId(u),d=s.getStandardTokenType(u),g=s.getStartOffset(u),p=s.getEndOffset(u);if(-1===c&&(c=p),h===o&&!Object($.b)(d))for(;;){var f=J.a.findPrevBracketInToken(n,r,l,g,c);if(!f)break;var m=l.substring(f.startColumn-1,f.endColumn-1);if((m=m.toLowerCase())===e.open?i++:m===e.close&&i--,0===i)return f;c=f.startColumn-1}c=-1}}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var o=e.languageIdentifier.id,n=e.forwardRegex,i=1,r=t.lineNumber,s=this.getLineCount();r<=s;r++){var a=this._getLineTokens(r),l=a.getCount(),u=this._buffer.getLineContent(r),c=0,h=0;for(r===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),h=t.column-1);ci)throw new Error("Illegal value for lineNumber");for(var r=Q.a.getFoldingRules(this._languageIdentifier.id),s=r&&r.offSide,a=-2,l=-1,u=-2,c=-1,h=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,l=-1;for(var t=e-2;t>=0;t--){var o=n._computeIndentLevel(t);if(o>=0){a=t,l=o;break}}}if(-2===u){u=-1,c=-1;for(t=e;t=0){u=t,c=r;break}}}},d=-2,g=-1,p=-2,f=-1,m=function(e){if(-2===d){d=-1,g=-1;for(var t=e-2;t>=0;t--){var o=n._computeIndentLevel(t);if(o>=0){d=t,g=o;break}}}if(-1!==p&&(-2===p||p=0){p=t,f=r;break}}}},_=0,y=!0,v=0,b=!0,E=0,C=0;y||b;C++){var S=e-C,T=e+C;if(0!==C&&(S<1||Si||T>o)&&(b=!1),C>5e4&&(y=!1,b=!1),y){var w=void 0;if((k=this._computeIndentLevel(S-1))>=0?(u=S-1,c=k,w=Math.ceil(k/this._options.tabSize)):(h(S),w=this._getIndentLevelForWhitespaceLine(s,l,c)),0===C){if(_=S,v=T,0===(E=w))return{startLineNumber:_,endLineNumber:v,indent:E};continue}w>=E?_=S:y=!1}if(b){var k,O=void 0;(k=this._computeIndentLevel(T-1))>=0?(d=T-1,g=k,O=Math.ceil(k/this._options.tabSize)):(m(T),O=this._getIndentLevelForWhitespaceLine(s,g,f)),O>=E?v=T:b=!1}}return{startLineNumber:_,endLineNumber:v,indent:E}},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var o=this.getLineCount();if(e<1||e>o)throw new Error("Illegal value for startLineNumber");if(t<1||t>o)throw new Error("Illegal value for endLineNumber");for(var n=Q.a.getFoldingRules(this._languageIdentifier.id),i=n&&n.offSide,r=new Array(t-e+1),s=-2,a=-1,l=-2,u=-1,c=e;c<=t;c++){var h=c-e,d=this._computeIndentLevel(c-1);if(d>=0)s=c-1,a=d,r[h]=Math.ceil(d/this._options.tabSize);else{if(-2===s){s=-1,a=-1;for(var g=c-2;g>=0;g--){if((p=this._computeIndentLevel(g))>=0){s=g,a=p;break}}}if(-1!==l&&(-2===l||l=0){l=g,u=p;break}}}r[h]=this._getIndentLevelForWhitespaceLine(i,a,u)}}return r},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,o){return-1===t||-1===o?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(z.a)},function(e,t,o){"use strict";o.d(t,"g",(function(){return n})),o.d(t,"j",(function(){return i})),o.d(t,"h",(function(){return r})),o.d(t,"k",(function(){return p})),o.d(t,"i",(function(){return s})),o.d(t,"l",(function(){return f})),o.d(t,"e",(function(){return _})),o.d(t,"d",(function(){return w})),o.d(t,"f",(function(){return k})),o.d(t,"b",(function(){return R})),o.d(t,"c",(function(){return L})),o.d(t,"a",(function(){return N}));var n,i,r,s,a=o(0),l=o(15),u=o(42),c=o(105),h=o(25),d=o(30),g=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=2?(T=y?n.Large:n.LargeBlocks,A=2/b):(T=y?n.Small:n.SmallBlocks,A=1/b),(k=Math.max(0,Math.floor((D-d-2)*A/(c+A))))/A>v&&(k=Math.floor(v*A)),O=D-k,"left"===_?(w=0,R+=k,L+=k,N+=k,I+=k):w=t-k-d}else w=0,k=0,T=n.None,O=D;var P=g?p:0;return{width:t,height:o,glyphMarginLeft:R,glyphMarginWidth:S,glyphMarginHeight:o,lineNumbersLeft:L,lineNumbersWidth:E,lineNumbersHeight:o,decorationsLeft:N,decorationsWidth:u,decorationsHeight:o,contentLeft:I,contentWidth:O,contentHeight:o,renderMinimap:T,minimapLeft:w,minimapWidth:k,viewportColumn:Math.max(1,Math.floor((O-d-2)/c)),verticalScrollbarWidth:d,horizontalScrollbarHeight:f,overviewRuler:{top:P,width:d,height:o-2*P,right:0}}},e}(),R={fontFamily:l.d?"Menlo, Monaco, 'Courier New', monospace":l.c?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:l.d?12:14,lineHeight:0,letterSpacing:0},L={tabSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},N={inDiffEditor:!1,wordSeparators:c.b,lineNumbersMinChars:5,lineDecorationsWidth:10,readOnly:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!1,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:i.Same,wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:!0,autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"auto",showUnused:!0,viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:a.a("editorViewAccessibleLabel","Editor content"),renderLineNumbers:1,renderCustomLineNumbers:null,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:r.Blink,mouseWheelZoom:!1,cursorStyle:s.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:u.b.Auto,horizontal:u.b.Auto,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:!0,iconsInSuggestions:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!0,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,suggest:{filterGraceful:!0,snippets:"inline",snippetsPreventQuickSuggestions:!0},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}}},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(1),i=function(){function e(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._layerHint=!1}return e.prototype.setMaxWidth=function(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")},e.prototype.setWidth=function(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")},e.prototype.setHeight=function(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")},e.prototype.setTop=function(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")},e.prototype.unsetTop=function(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")},e.prototype.setLeft=function(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")},e.prototype.setBottom=function(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")},e.prototype.setRight=function(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")},e.prototype.setFontFamily=function(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)},e.prototype.setFontWeight=function(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)},e.prototype.setFontSize=function(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")},e.prototype.setLineHeight=function(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")},e.prototype.setLetterSpacing=function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")},e.prototype.setClassName=function(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)},e.prototype.toggleClassName=function(e,t){n.N(this.domNode,e,t),this._className=this.domNode.className},e.prototype.setDisplay=function(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)},e.prototype.setPosition=function(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)},e.prototype.setVisibility=function(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)},e.prototype.setLayerHinting=function(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.willChange=this._layerHint?"transform":"auto")},e.prototype.setAttribute=function(e,t){this.domNode.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this.domNode.removeAttribute(e)},e.prototype.appendChild=function(e){this.domNode.appendChild(e.domNode)},e.prototype.removeChild=function(e){this.domNode.removeChild(e.domNode)},e}();function r(e){return new i(e)}},function(e,t,o){"use strict";o.d(t,"o",(function(){return a})),o.d(t,"p",(function(){return l})),o.d(t,"g",(function(){return h})),o.d(t,"f",(function(){return d})),o.d(t,"l",(function(){return p})),o.d(t,"a",(function(){return f})),o.d(t,"q",(function(){return m})),o.d(t,"b",(function(){return y})),o.d(t,"s",(function(){return v})),o.d(t,"e",(function(){return b})),o.d(t,"c",(function(){return E})),o.d(t,"d",(function(){return C})),o.d(t,"r",(function(){return S})),o.d(t,"i",(function(){return w})),o.d(t,"h",(function(){return k})),o.d(t,"w",(function(){return O})),o.d(t,"v",(function(){return R})),o.d(t,"n",(function(){return L})),o.d(t,"m",(function(){return N})),o.d(t,"k",(function(){return I})),o.d(t,"j",(function(){return D})),o.d(t,"t",(function(){return A})),o.d(t,"u",(function(){return P})),o.d(t,"x",(function(){return x})),o.d(t,"z",(function(){return M})),o.d(t,"y",(function(){return B}));var n=o(0),i=o(7),r=o(19),s=o(14),a=Object(i.kb)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},n.a("lineHighlight","Background color for the highlight of line at the cursor position.")),l=Object(i.kb)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},n.a("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),u=Object(i.kb)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},n.a("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque to not hide underlying decorations."),!0),c=Object(i.kb)("editor.rangeHighlightBorder",{dark:null,light:null,hc:i.b},n.a("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),h=Object(i.kb)("editorCursor.foreground",{dark:"#AEAFAD",light:s.a.black,hc:s.a.white},n.a("caret","Color of the editor cursor.")),d=Object(i.kb)("editorCursor.background",null,n.a("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),g=Object(i.kb)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},n.a("editorWhitespaces","Color of whitespace characters in the editor.")),p=Object(i.kb)("editorIndentGuide.background",{dark:g,light:g,hc:g},n.a("editorIndentGuides","Color of the editor indentation guides.")),f=Object(i.kb)("editorIndentGuide.activeBackground",{dark:g,light:g,hc:g},n.a("editorActiveIndentGuide","Color of the active editor indentation guides.")),m=Object(i.kb)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:s.a.white},n.a("editorLineNumbers","Color of editor line numbers.")),_=Object(i.kb)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:i.b},n.a("editorActiveLineNumber","Color of editor active line number"),!1,n.a("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),y=Object(i.kb)("editorLineNumber.activeForeground",{dark:_,light:_,hc:_},n.a("editorActiveLineNumber","Color of editor active line number")),v=Object(i.kb)("editorRuler.foreground",{dark:"#5A5A5A",light:s.a.lightgrey,hc:s.a.white},n.a("editorRuler","Color of the editor rulers.")),b=Object(i.kb)("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},n.a("editorCodeLensForeground","Foreground color of editor code lenses")),E=Object(i.kb)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},n.a("editorBracketMatchBackground","Background color behind matching brackets")),C=Object(i.kb)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:"#fff"},n.a("editorBracketMatchBorder","Color for matching brackets boxes")),S=Object(i.kb)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},n.a("editorOverviewRulerBorder","Color of the overview ruler border.")),T=Object(i.kb)("editorGutter.background",{dark:i.n,light:i.n,hc:i.n},n.a("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),w=Object(i.kb)("editorError.foreground",{dark:"#ea4646",light:"#d60a0a",hc:null},n.a("errorForeground","Foreground color of error squigglies in the editor.")),k=Object(i.kb)("editorError.border",{dark:null,light:null,hc:s.a.fromHex("#E47777").transparent(.8)},n.a("errorBorder","Border color of error squigglies in the editor.")),O=Object(i.kb)("editorWarning.foreground",{dark:"#4d9e4d",light:"#117711",hc:null},n.a("warningForeground","Foreground color of warning squigglies in the editor.")),R=Object(i.kb)("editorWarning.border",{dark:null,light:null,hc:s.a.fromHex("#71B771").transparent(.8)},n.a("warningBorder","Border color of warning squigglies in the editor.")),L=Object(i.kb)("editorInfo.foreground",{dark:"#008000",light:"#008000",hc:null},n.a("infoForeground","Foreground color of info squigglies in the editor.")),N=Object(i.kb)("editorInfo.border",{dark:null,light:null,hc:s.a.fromHex("#71B771").transparent(.8)},n.a("infoBorder","Border color of info squigglies in the editor.")),I=Object(i.kb)("editorHint.foreground",{dark:s.a.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},n.a("hintForeground","Foreground color of hint squigglies in the editor.")),D=Object(i.kb)("editorHint.border",{dark:null,light:null,hc:s.a.fromHex("#eeeeee").transparent(.8)},n.a("hintBorder","Border color of hint squigglies in the editor.")),A=Object(i.kb)("editorUnnecessaryCode.border",{dark:null,light:null,hc:s.a.fromHex("#fff").transparent(.8)},n.a("unnecessaryCodeBorder","Border of unnecessary code in the editor.")),P=Object(i.kb)("editorUnnecessaryCode.opacity",{dark:s.a.fromHex("#000a"),light:s.a.fromHex("#0007"),hc:null},n.a("unnecessaryCodeOpacity","Opacity of unnecessary code in the editor.")),x=Object(i.kb)("editorOverviewRuler.errorForeground",{dark:new s.a(new s.c(255,18,18,.7)),light:new s.a(new s.c(255,18,18,.7)),hc:new s.a(new s.c(255,50,50,1))},n.a("overviewRuleError","Overview ruler marker color for errors.")),M=Object(i.kb)("editorOverviewRuler.warningForeground",{dark:new s.a(new s.c(18,136,18,.7)),light:new s.a(new s.c(18,136,18,.7)),hc:new s.a(new s.c(50,255,50,1))},n.a("overviewRuleWarning","Overview ruler marker color for warnings.")),B=Object(i.kb)("editorOverviewRuler.infoForeground",{dark:new s.a(new s.c(18,18,136,.7)),light:new s.a(new s.c(18,18,136,.7)),hc:new s.a(new s.c(50,50,255,1))},n.a("overviewRuleInfo","Overview ruler marker color for infos."));Object(r.e)((function(e,t){var o=e.getColor(i.n);o&&t.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: "+o+"; }");var n=e.getColor(i.u);n&&t.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: "+n+"; }");var r=e.getColor(T);r&&t.addRule(".monaco-editor .margin { background-color: "+r+"; }");var s=e.getColor(u);s&&t.addRule(".monaco-editor .rangeHighlight { background-color: "+s+"; }");var a=e.getColor(c);a&&t.addRule(".monaco-editor .rangeHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+a+"; }");var l=e.getColor(g);l&&t.addRule(".vs-whitespace { color: "+l+" !important; }")}))},function(e,t,o){"use strict";o.d(t,"c",(function(){return i})),o.d(t,"d",(function(){return r})),o.d(t,"g",(function(){return a})),o.d(t,"a",(function(){return l})),o.d(t,"e",(function(){return u})),o.d(t,"b",(function(){return c})),o.d(t,"f",(function(){return h}));var n=o(21);function i(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(o){e[o]&&"object"==typeof e[o]?t[o]=i(e[o]):t[o]=e[o]})),t}function r(e){if(!e||"object"!=typeof e)return e;for(var t=[e];t.length>0;){var o=t.shift();for(var n in Object.freeze(o),o)if(s.call(o,n)){var i=o[n];"object"!=typeof i||Object.isFrozen(i)||t.push(i)}}return e}var s=Object.prototype.hasOwnProperty;function a(e,t,o){return void 0===o&&(o=!0),Object(n.g)(e)?(Object(n.g)(t)&&Object.keys(t).forEach((function(i){i in e?o&&(Object(n.g)(e[i])&&Object(n.g)(t[i])?a(e[i],t[i],o):e[i]=t[i]):e[i]=t[i]})),e):t}function l(e){for(var t=[],o=1;o=0;){if(r=s+i,(0===s||32===o.charCodeAt(s-1))&&32===o.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===o.charCodeAt(s-1)&&r===n)return this._lastStart=s-1,void(this._lastEnd=r);if(0===s&&r===n)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,o=[],n=1;n0;)I.sort(M.sort),I.shift().execute();A=!1},R=function(e,t){void 0===t&&(t=0);var o,n=new M(e,t);return L.push(n),D||(D=!0,o=P,N||(N=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||function(e){return setTimeout((function(){return e((new Date).getTime())}),0)}),N.call(self,o)),n},O=function(e,t){if(A){var o=new M(e,t);return I.push(o),o}return R(e,t)};var x=16,B=function(e,t){return t},F=function(e){function t(t,o,n,i,s){void 0===i&&(i=B),void 0===s&&(s=x);var a=e.call(this)||this,l=null,u=0,c=a._register(new r.f),h=function(){u=(new Date).getTime(),n(l),l=null};return a._register(T(t,o,(function(e){l=i(l,e);var t=(new Date).getTime()-u;t>=s?(c.cancel(),h()):c.setIfNotSet(h,s-t)}))),a}return g(t,e),t}(a.a);function H(e,t,o,n,i){return new F(e,t,o,n,i)}function U(e){return document.defaultView.getComputedStyle(e,null)}var V=function(e,t){return parseFloat(t)||0};function W(e,t,o){var n=U(e),i="0";return n&&(i=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(o)),V(e,i)}function j(e){if(e!==document.body)return new z(e.clientWidth,e.clientHeight);if(window.innerWidth&&window.innerHeight)return new z(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientWidth)return new z(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new z(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}var G={getBorderLeftWidth:function(e){return W(e,"border-left-width","borderLeftWidth")},getBorderRightWidth:function(e){return W(e,"border-right-width","borderRightWidth")},getBorderTopWidth:function(e){return W(e,"border-top-width","borderTopWidth")},getBorderBottomWidth:function(e){return W(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return W(e,"padding-left","paddingLeft")},getPaddingRight:function(e){return W(e,"padding-right","paddingRight")},getPaddingTop:function(e){return W(e,"padding-top","paddingTop")},getPaddingBottom:function(e){return W(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return W(e,"margin-left","marginLeft")},getMarginTop:function(e){return W(e,"margin-top","marginTop")},getMarginRight:function(e){return W(e,"margin-right","marginRight")},getMarginBottom:function(e){return W(e,"margin-bottom","marginBottom")},__commaSentinel:!1},z=function(e,t){this.width=e,this.height=t};function K(e){for(var t=e.offsetParent,o=e.offsetTop,n=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){o-=e.scrollTop;var i=U(e);i&&(n-="rtl"!==i.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=G.getBorderLeftWidth(e),o+=G.getBorderTopWidth(e),o+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:o}}function Y(e){var t=e.getBoundingClientRect();return{left:t.left+X.scrollX,top:t.top+X.scrollY,width:t.width,height:t.height}}var X=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 q(e){var t=G.getMarginLeft(e)+G.getMarginRight(e);return e.offsetWidth+t}function $(e){var t=G.getBorderLeftWidth(e)+G.getBorderRightWidth(e),o=G.getPaddingLeft(e)+G.getPaddingRight(e);return e.offsetWidth-t-o}function J(e){var t=G.getBorderTopWidth(e)+G.getBorderBottomWidth(e),o=G.getPaddingTop(e)+G.getPaddingBottom(e);return e.offsetHeight-t-o}function Z(e){var t=G.getMarginTop(e)+G.getMarginBottom(e);return e.offsetHeight+t}function Q(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function ee(e,t,o){for(;e;){if(v(e,t))return e;if(o)if("string"==typeof o){if(v(e,o))return null}else if(e===o)return null;e=e.parentNode}return null}function te(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 oe=null;function ne(){return oe||(oe=te()),oe}function ie(e,t,o){void 0===o&&(o=ne()),o&&t&&o.sheet.insertRule(e+"{"+t+"}",0)}function re(e,t){if(void 0===t&&(t=ne()),t){for(var o=function(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}(t),n=[],i=0;i=0;i--)t.sheet.deleteRule(n[i])}}function se(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}var ae={CLICK:"click",AUXCLICK:"auxclick",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:l.n?"webkitAnimationStart":"animationstart",ANIMATION_END:l.n?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:l.n?"webkitAnimationIteration":"animationiteration"},le={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function ue(e){for(var t=[],o=0;e&&e.nodeType===e.ELEMENT_NODE;o++)t[o]=e.scrollTop,e=e.parentNode;return t}function ce(e,t){for(var o=0;e&&e.nodeType===e.ELEMENT_NODE;o++)e.scrollTop!==t[o]&&(e.scrollTop=t[o]),e=e.parentNode}var he=function(){function e(e){var t=this;this._onDidFocus=new h.a,this.onDidFocus=this._onDidFocus.event,this._onDidBlur=new h.a,this.onDidBlur=this._onDidBlur.event,this.disposables=[];var o=!1,n=!1;Object(d.a)(e,ae.FOCUS,!0)((function(){n=!1,o||(o=!0,t._onDidFocus.fire())}),null,this.disposables),Object(d.a)(e,ae.BLUR,!0)((function(){o&&(n=!0,window.setTimeout((function(){n&&(n=!1,o=!1,t._onDidBlur.fire())}),0))}),null,this.disposables)}return e.prototype.dispose=function(){this.disposables=Object(a.d)(this.disposables),this._onDidFocus.dispose(),this._onDidBlur.dispose()},e}();function de(e){return new he(e)}function ge(e){for(var t=[],o=1;oo||e===o&&t>n?(this.startLineNumber=o,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=o,this.endColumn=n)}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,o){var n,i,r,s;return o.startLineNumbert.endLineNumber?(r=o.endLineNumber,s=o.endColumn):o.endLineNumber===t.endLineNumber?(r=o.endLineNumber,s=Math.max(o.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(n,i,r,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,o){var n=t.startLineNumber,i=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=o.startLineNumber,l=o.startColumn,u=o.endLineNumber,c=o.endColumn;return nu?(r=u,s=c):r===u&&(s=Math.min(s,c)),n>r?null:n===r&&i>s?null:new e(n,i,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 n.a(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.a(this.startLineNumber,this.startColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,o){return new e(this.startLineNumber,this.startColumn,t,o)},e.prototype.setStartPosition=function(t,o){return new e(t,o,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,o){return void 0===o&&(o=t),new e(t.lineNumber,t.column,o.lineNumber,o.column)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumbere.startLineNumber},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return y})),o.d(t,"c",(function(){return v})),o.d(t,"b",(function(){return b})),o.d(t,"j",(function(){return E})),o.d(t,"e",(function(){return C})),o.d(t,"g",(function(){return S})),o.d(t,"f",(function(){return T})),o.d(t,"i",(function(){return w})),o.d(t,"h",(function(){return k})),o.d(t,"d",(function(){return i}));var n,i,r=o(13),s=o(33),a=o(37),l=o(84),u=o(57),c=o(110),h=o(9),d=o(60),g=o(38),p=o(12),f=o(36),m=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),_=Object.assign||function(e){for(var t,o=1,n=arguments.length;o0;){var i=this._deliveryQueue.shift(),r=i[0],s=i[1];try{"function"==typeof r?r.call(void 0,s):r[0].call(r[1],s)}catch(o){Object(n.e)(o)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}(),l=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new a({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,o={event:e,listener:null};this.events.push(o),this.hasListeners&&this.hook(o);return Object(r.f)(function(e){var t,o=this,n=!1;return function(){return n?t:(n=!0,t=e.apply(o,arguments))}}((function(){t.hasListeners&&t.unhook(o);var e=t.events.indexOf(o);t.events.splice(e,1)})))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach((function(t){return e.hook(t)}))},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach((function(t){return e.unhook(t)}))},e.prototype.hook=function(e){var t=this;e.listener=e.event((function(e){return t.emitter.fire(e)}))},e.prototype.unhook=function(e){e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose()},e}();function u(e){return function(t,o,n){void 0===o&&(o=null);var i=e((function(e){return i.dispose(),t.call(o,e)}),null,n);return i}}function c(){for(var e=[],t=0;t1)&&u.fire(e),l=0}),o)}))},onLastListenerRemove:function(){i.dispose()}});return u.event}var d=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(o,n,i){return e((function(e){var i=t.buffers[t.buffers.length-1];i?i.push((function(){return o.call(n,e)})):o.call(n,e)}),void 0,i)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach((function(e){return e()}))},e}();function g(e,t){return function(o,n,i){return void 0===n&&(n=null),e((function(e){return o.call(n,t(e))}),null,i)}}function p(e,t){return function(o,n,i){return void 0===n&&(n=null),e((function(e){return t(e)&&o.call(n,e)}),null,i)}}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(g(this._event,t))},e.prototype.filter=function(t){return new e(p(this._event,t))},e.prototype.on=function(e,t,o){return this._event(e,t,o)},e}();function m(e){return new f(e)}var _=function(){function e(){this.emitter=new a,this.event=this.emitter.event,this.disposable=r.a.None}return Object.defineProperty(e.prototype,"input",{set:function(e){this.disposable.dispose(),this.disposable=e(this.emitter.fire,this.emitter)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposable.dispose(),this.emitter.dispose()},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,i=o(12);!function(e){e.editorTextFocus=new i.f("editorTextFocus",!1),e.focus=new i.f("editorFocus",!1),e.textInputFocus=new i.f("textInputFocus",!1),e.readOnly=new i.f("editorReadonly",!1),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new i.f("editorHasSelection",!1),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new i.f("editorHasMultipleSelections",!1),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new i.f("editorTabMovesFocus",!1),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInEmbeddedEditor=new i.f("isInEmbeddedEditor",void 0),e.canUndo=new i.f("canUndo",!1),e.canRedo=new i.f("canRedo",!1),e.languageId=new i.f("editorLangId",void 0),e.hasCompletionItemProvider=new i.f("editorHasCompletionItemProvider",void 0),e.hasCodeActionsProvider=new i.f("editorHasCodeActionsProvider",void 0),e.hasCodeLensProvider=new i.f("editorHasCodeLensProvider",void 0),e.hasDefinitionProvider=new i.f("editorHasDefinitionProvider",void 0),e.hasImplementationProvider=new i.f("editorHasImplementationProvider",void 0),e.hasTypeDefinitionProvider=new i.f("editorHasTypeDefinitionProvider",void 0),e.hasHoverProvider=new i.f("editorHasHoverProvider",void 0),e.hasDocumentHighlightProvider=new i.f("editorHasDocumentHighlightProvider",void 0),e.hasDocumentSymbolProvider=new i.f("editorHasDocumentSymbolProvider",void 0),e.hasReferenceProvider=new i.f("editorHasReferenceProvider",void 0),e.hasRenameProvider=new i.f("editorHasRenameProvider",void 0),e.hasDocumentFormattingProvider=new i.f("editorHasDocumentFormattingProvider",void 0),e.hasDocumentSelectionFormattingProvider=new i.f("editorHasDocumentSelectionFormattingProvider",void 0),e.hasSignatureHelpProvider=new i.f("editorHasSignatureHelpProvider",void 0)}(n||(n={}))},function(e,t,o){"use strict";function n(e){return"function"==typeof e.dispose&&0===e.dispose.length}function i(e){for(var t=[],o=1;o=t.length?e:t[n]}))}function l(e){return e.replace(/[<|>|&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function u(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function c(e,t){return void 0===t&&(t=" "),d(h(e,t),t)}function h(e,t){if(!e||!t)return e;var o=t.length;if(0===o||0===e.length)return e;for(var n=0;e.indexOf(t,n)===n;)n+=o;return e.substring(n)}function d(e,t){if(!e||!t)return e;var o=t.length,n=e.length;if(0===o||0===n)return e;for(var i=n,r=-1;-1!==(r=e.lastIndexOf(t,i-1))&&r+o===i;){if(0===r)return"";i=r}return e.substring(0,i)}function g(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function p(e,t){if(e.length0?e.indexOf(t,o)===o:0===o&&e===t}function m(e,t,o){if(void 0===o&&(o={}),!e)throw new Error("Cannot create regex from empty string");t||(e=u(e)),o.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var n="";return o.global&&(n+="g"),o.matchCase||(n+="i"),o.multiline&&(n+="m"),new RegExp(e,n)}function _(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&(e.exec("")&&0===e.lastIndex)}function y(e){for(var t=0,o=e.length;t=0;o--){var n=e.charCodeAt(o);if(32!==n&&9!==n)return o}return-1}function E(e,t){return et?1:0}function C(e,t){for(var o=Math.min(e.length,t.length),n=0;nt.length?1:0}function S(e){return e>=97&&e<=122}function T(e){return e>=65&&e<=90}function w(e){return S(e)||T(e)}function k(e,t){return(e?e.length:0)===(t?t.length:0)&&O(e,t)}function O(e,t,o){if(void 0===o&&(o=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var n=0;ne.length)&&O(e,t,o)}function N(e,t){var o,n=Math.min(e.length,t.length);for(o=0;o=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}var V=String.fromCharCode(65279);function W(e){return e&&e.length>0&&65279===e.charCodeAt(0)}function j(e){return btoa(encodeURIComponent(e))}function G(e,t){for(var o="",n=0;n"),n}o.Namespace||(o.Namespace=Object.create(Object.prototype));var a={uninitialized:1,working:2,initialized:3};Object.defineProperties(o.Namespace,{defineWithParent:{value:s,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,o){return s(t,e,o)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,o,i=a.uninitialized;return{setName:function(e){t=e},get:function(){switch(i){case a.initialized:return o;case a.uninitialized:i=a.working;try{n("WinJS.Namespace._lazy:"+t+",StartTM"),o=e()}finally{n("WinJS.Namespace._lazy:"+t+",StopTM"),i=a.uninitialized}return e=null,i=a.initialized,o;case a.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(i){case a.working:throw"Illegal: reentrancy on initialization";default:i=a.initialized,o=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,o,n){var s=[e],a=null;return o&&(a=r(t,o),s.push(a)),i(s,n,o||""),a},writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,n){return e=e||function(){},o.markSupportedForProcessing(e),t&&i(e.prototype,t),n&&i(e,n),e}e.Namespace.define("WinJS.Class",{define:t,derive:function(e,n,r,s){if(e){n=n||function(){};var a=e.prototype;return n.prototype=Object.create(a),o.markSupportedForProcessing(n),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,configurable:!0,enumerable:!0}),r&&i(n.prototype,r),s&&i(n,s),n}return t(n,r,s)},mix:function(e){var t,o;for(e=e||function(){},t=1,o=arguments.length;ti&&(i=u)}return i}if("string"==typeof e)return n?"*"===e?5:e===o?10:0:0;if(e){var c=e.language,h=e.pattern,d=e.scheme,g=e.hasAccessToAllModels;if(!n&&!g)return 0;i=0;if(d)if(d===t.scheme)i=10;else{if("*"!==d)return 0;i=5}if(c)if(c===o)i=10;else{if("*"!==c)return 0;i=Math.max(i,5)}if(h){if(h!==t.fsPath&&!Object(r.a)(h,t.fsPath))return 0;i=10}return i}return 0}var a=o(60);function l(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(l):e.exclusive)}var u=function(){function e(){this._clock=0,this._entries=[],this._onDidChange=new n.a}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var o=this,n={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Object(i.f)((function(){if(n){var e=o._entries.indexOf(n);e>=0&&(o._entries.splice(e,1),o._lastCandidate=void 0,o._onDidChange.fire(o._entries.length),n=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=[],o=0,n=this._entries;o0&&t.push(i.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,o,n=[];return this._orderedForEach(e,(function(e){t&&o===e._score?t.push(e.provider):(o=e._score,t=[e.provider],n.push(t))})),n},e.prototype._orderedForEach=function(e,t){if(e){this._updateScores(e);for(var o=0;o0&&t(n)}}},e.prototype._updateScores=function(t){var o={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==o.language||this._lastCandidate.uri!==o.uri){this._lastCandidate=o;for(var n=0,i=this._entries;n0){for(var u=0,c=this._entries;ut._score?-1:e._timet._time?-1:0},e}(),c=function(){function e(){this._onDidChange=new n.a,this.onDidChange=this._onDidChange.event,this._map=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 o=this;return this._map[e]=t,this.fire([e]),Object(i.f)((function(){o._map[e]===t&&(delete o._map[e],o.fire([e]))}))},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[2]},e}(),h=o(21);o.d(t,"o",(function(){return m})),o.d(t,"x",(function(){return _})),o.d(t,"v",(function(){return d})),o.d(t,"b",(function(){return g})),o.d(t,"g",(function(){return p})),o.d(t,"w",(function(){return f})),o.d(t,"B",(function(){return v})),o.d(t,"k",(function(){return b})),o.d(t,"A",(function(){return E})),o.d(t,"r",(function(){return C})),o.d(t,"s",(function(){return S})),o.d(t,"u",(function(){return T})),o.d(t,"t",(function(){return w})),o.d(t,"m",(function(){return k})),o.d(t,"j",(function(){return O})),o.d(t,"h",(function(){return R})),o.d(t,"e",(function(){return N})),o.d(t,"n",(function(){return L})),o.d(t,"z",(function(){return I})),o.d(t,"c",(function(){return D})),o.d(t,"a",(function(){return A})),o.d(t,"f",(function(){return P})),o.d(t,"i",(function(){return M})),o.d(t,"q",(function(){return x})),o.d(t,"p",(function(){return B})),o.d(t,"d",(function(){return F})),o.d(t,"l",(function(){return H})),o.d(t,"y",(function(){return U}));var d,g,p,f,m=function(e,t){this.language=e,this.id=t},_=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),o=this.getFontStyle(e);return 1&o&&(t+=" mtki"),2&o&&(t+=" mtkb"),4&o&&(t+=" mtku"),t},e.getInlineStyleFromMetadata=function(e,t){var o=this.getForeground(e),n=this.getFontStyle(e),i="color: "+t[o]+";";return 1&n&&(i+="font-style: italic;"),2&n&&(i+="font-weight: bold;"),4&n&&(i+="text-decoration: underline;"),i},e}();!function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(d||(d={})),function(e){e[e.Automatic=1]="Automatic",e[e.Manual=2]="Manual"}(g||(g={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(p||(p={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(f||(f={}));var y,v=((y=Object.create(null))[f.File]="file",y[f.Module]="module",y[f.Namespace]="namespace",y[f.Package]="package",y[f.Class]="class",y[f.Method]="method",y[f.Property]="property",y[f.Field]="field",y[f.Constructor]="constructor",y[f.Enum]="enum",y[f.Interface]="interface",y[f.Function]="function",y[f.Variable]="variable",y[f.Constant]="constant",y[f.String]="string",y[f.Number]="number",y[f.Boolean]="boolean",y[f.Array]="array",y[f.Object]="object",y[f.Key]="key",y[f.Null]="null",y[f.EnumMember]="enum-member",y[f.Struct]="struct",y[f.Event]="event",y[f.Operator]="operator",y[f.TypeParameter]="type-parameter",function(e){return"symbol-icon "+(y[e]||"property")}),b=function(){function e(e){this.value=e}return e.Comment=new e("comment"),e.Imports=new e("imports"),e.Region=new e("region"),e}();function E(e){return Object(h.g)(e)&&e.resource&&Array.isArray(e.edits)}var C=new u,S=new u,T=new u,w=new u,k=new u,O=new u,R=new u,N=new u,L=new u,I=new u,D=new u,A=new u,P=new u,M=new u,x=new u,B=new u,F=new u,H=new u,U=new c},function(e,t,o){"use strict";o.d(t,"d",(function(){return l})),o.d(t,"b",(function(){return c})),o.d(t,"c",(function(){return h})),o.d(t,"a",(function(){return f})),o.d(t,"f",(function(){return m})),o.d(t,"e",(function(){return _})),o.d(t,"g",(function(){return y}));var n,i,r=o(22),s=o(8),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});!function(e){e[e.Defined=1]="Defined",e[e.Not=2]="Not",e[e.Equals=3]="Equals",e[e.NotEquals=4]="NotEquals",e[e.And=5]="And",e[e.Regex=6]="Regex"}(i||(i={}));var l=function(){function e(){}return e.has=function(e){return new c(e)},e.equals=function(e,t){return new h(e,t)},e.regex=function(e,t){return new p(e,t)},e.not=function(e){return new g(e)},e.and=function(){for(var e=[],t=0;t=0){var t=e.split("!=");return new d(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("==")>=0){t=e.split("==");return new h(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("=~")>=0){t=e.split("=~");return new p(t[0].trim(),this._deserializeRegexValue(t[1]))}return/^\!\s*/.test(e)?new g(e.substr(1).trim()):new c(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(Object(s.isFalsyOrWhitespace)(e))return console.warn("missing regexp-value for =~-expression"),null;var t=e.indexOf("/"),o=e.lastIndexOf("/");if(t===o||t<0)return console.warn("bad regexp-value '"+e+"', missing /-enclosure"),null;var n=e.slice(t+1,o),i="i"===e[o+1]?"i":"";try{return new RegExp(n,i)}catch(t){return console.warn("bad regexp-value '"+e+"', parse error: "+t),null}},e}();function u(e,t){var o=e.getType(),n=t.getType();if(o!==n)return o-n;switch(o){case i.Defined:case i.Not:case i.Equals:case i.NotEquals:case i.Regex:return e.cmp(t);default:throw new Error("Unknown ContextKeyExpr!")}}var c=function(){function e(e){this.key=e}return e.prototype.getType=function(){return i.Defined},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}(),h=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return i.Equals},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 c(this.key):new g(this.key):this},e.prototype.keys=function(){return[this.key]},e}(),d=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return i.NotEquals},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 g(this.key):new c(this.key):this},e.prototype.keys=function(){return[this.key]},e}(),g=function(){function e(e){this.key=e}return e.prototype.getType=function(){return i.Not},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}(),p=function(){function e(e,t){this.key=e,this.regexp=t}return e.prototype.getType=function(){return i.Regex},e.prototype.cmp=function(e){if(this.keye.key)return 1;var t=this.regexp?this.regexp.source:void 0;return te.regexp.source?1:0},e.prototype.equals=function(t){if(t instanceof e){var o=this.regexp?this.regexp.source:void 0;return this.key===t.key&&o===t.regexp.source}return!1},e.prototype.evaluate=function(e){return!!this.regexp&&this.regexp.test(e.getValue(this.key))},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}(),f=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return i.And},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var o=0,n=this.expr.length;o0){switch(u=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case o:l=(n-i)/h+(n1&&(o-=1),o<1/6?e+6*(t-e)*o:o<.5?t:o<2/3?e+(t-e)*(2/3-o)*6:e},e.toRGBA=function(t){var o,n,r,s=t.h/360,a=t.s,l=t.l,u=t.a;if(0===a)o=n=r=l;else{var c=l<.5?l*(1+a):l+a-l*a,h=2*l-c;o=e._hue2rgb(h,c,s+1/3),n=e._hue2rgb(h,c,s),r=e._hue2rgb(h,c,s-1/3)}return new i(Math.round(255*o),Math.round(255*n),Math.round(255*r),u)},e}(),s=function(){function e(e,t,o,i){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,o),0),3),this.a=n(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 o,n=t.r/255,i=t.g/255,r=t.b/255,s=Math.max(n,i,r),a=s-Math.min(n,i,r),l=0===s?0:a/s;return o=0===a?0:s===n?((i-r)/a%6+6)%6:s===i?(r-n)/a+2:(n-i)/a+4,new e(Math.round(60*o),l,s,t.a)},e.toRGBA=function(e){var t=e.h,o=e.s,n=e.v,r=e.a,s=n*o,a=s*(1-Math.abs(t/60%2-1)),l=n-s,u=[0,0,0],c=u[0],h=u[1],d=u[2];return t<60?(c=s,h=a):t<120?(c=a,h=s):t<180?(h=s,d=a):t<240?(h=a,d=s):t<300?(c=a,d=s):t<360&&(c=s,d=a),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),d=Math.round(255*(d+l)),new i(c,h,d,r)},e}(),a=function(){function e(e){if(!e)throw new Error("Color needs a value");if(e instanceof i)this.rgba=e;else if(e instanceof r)this._hsla=e,this.rgba=r.toRGBA(e);else{if(!(e instanceof s))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=s.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:r.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hsva",{get:function(){return this._hsva?this._hsva:s.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return!!e&&i.equals(this.rgba,e.rgba)&&r.equals(this.hsla,e.hsla)&&s.equals(this.hsva,e.hsva)},e.prototype.getRelativeLuminance=function(){return n(.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()=0,s=g.indexOf("Macintosh")>=0,a=g.indexOf("Linux")>=0,u=!0,navigator.language}!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(i||(i={}));i.Web;l&&(s?i.Mac:r?i.Windows:a&&i.Linux);var p=r,f=s,m=a,_=l,y=u,v="object"==typeof self?self:"object"==typeof n?n:{},b=null;function E(t){return null===b&&(b=v.setImmediate?v.setImmediate.bind(v):void 0!==e&&"function"==typeof e.nextTick?e.nextTick.bind(e):v.setTimeout.bind(v)),b(t)}var C=s?2:r?1:3}).call(this,o(108),o(80))},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"c",(function(){return i})),o.d(t,"b",(function(){return r})),o.d(t,"d",(function(){return a}));var n,i,r,s=o(52);function a(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===s.a.ICodeEditor}!function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(n||(n={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(i||(i={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(r||(r={}))},function(e,t,o){"use strict";o.d(t,"n",(function(){return c})),o.d(t,"i",(function(){return h})),o.d(t,"h",(function(){return d})),o.d(t,"o",(function(){return g})),o.d(t,"e",(function(){return p})),o.d(t,"a",(function(){return f})),o.d(t,"d",(function(){return m})),o.d(t,"m",(function(){return _})),o.d(t,"g",(function(){return y})),o.d(t,"k",(function(){return v})),o.d(t,"j",(function(){return b})),o.d(t,"l",(function(){return E})),o.d(t,"f",(function(){return C})),o.d(t,"b",(function(){return S})),o.d(t,"c",(function(){return T}));var n,i=o(13),r=o(10),s=o(48),a=o(6),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function u(e){return e&&"function"==typeof e.then}function c(e){return u(e)?e:r.b.as(e)}function h(e){var t=new s.b,o=e(t.token),n=new Promise((function(e,n){t.token.onCancellationRequested((function(){n(i.a())})),Promise.resolve(o).then((function(o){t.dispose(),e(o)}),(function(e){t.dispose(),n(e)}))}));return new(function(){function e(){}return e.prototype.cancel=function(){t.cancel()},e.prototype.then=function(e,t){return n.then(e,t)},e.prototype.catch=function(e){return this.then(void 0,e)},e}())}function d(e){var t=new s.b;return new r.b((function(o,n,i){var s=e(t.token);s instanceof r.b?s.then((function(e){t.dispose(),o(e)}),(function(e){t.dispose(),n(e)}),i):u(s)?s.then((function(e){t.dispose(),o(e)}),(function(e){t.dispose(),n(e)})):(t.dispose(),o(s))}),(function(){t.cancel()}))}function g(e,t,o){var n=e.onCancellationRequested((function(){return t.cancel()}));return o&&(t=t.then(void 0,(function(e){if(!i.d(e))return r.b.wrapError(e)}))),y(t,(function(){return n.dispose()}))}var p=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var o=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new r.b((function(e,n,i){t.activePromise.then(o,o,i).done(e)}),(function(){t.activePromise.cancel()}))}return new r.b((function(e,o,n){t.queuedPromise.then(e,o,n)}),(function(){}))}return this.activePromise=e(),new r.b((function(e,o,n){t.activePromise.done((function(o){t.activePromise=null,e(o)}),(function(e){t.activePromise=null,o(e)}),n)}),(function(){t.activePromise.cancel()}))},e}(),f=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var o=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new r.b((function(e){o.onSuccess=e}),(function(){})).then((function(){o.completionPromise=null,o.onSuccess=null;var e=o.task;return o.task=null,e()}))),this.timeout=setTimeout((function(){o.timeout=null,o.onSuccess(null)}),t),this.completionPromise},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}(),m=function(e){function t(t){var o,n,r,s;return o=e.call(this,(function(e,t,o){n=e,r=t,s=o}),(function(){r(i.a())}))||this,t.then(n,r,s),o}return l(t,e),t}(r.b);function _(e){return h((function(t){return new Promise((function(o,n){var r=setTimeout(o,e);t.onCancellationRequested((function(e){clearTimeout(r),n(i.a())}))}))}))}function y(e,t){return o=e,r.b.is(o)&&"function"==typeof o.done?new r.b((function(o,n,r){e.done((function(e){try{t(e)}catch(e){i.e(e)}o(e)}),(function(e){try{t(e)}catch(e){i.e(e)}n(e)}),(function(e){r(e)}))}),(function(){e.cancel()})):(e.then((function(e){return t()}),(function(e){return t()})),e);var o}function v(e,t,o){void 0===t&&(t=function(e){return!!e}),void 0===o&&(o=null);var n=0,i=e.length,r=function(){return n>=i?Promise.resolve(o):(0,e[n++])().then((function(e){return t(e)?Promise.resolve(e):r()}))};return r()}function b(e,t,o){void 0===t&&(t=function(e){return!!e}),void 0===o&&(o=null);var n=0,i=e.length,s=function(){return n>=i?r.b.as(o):(0,e[n++])().then((function(e){return t(e)?r.b.as(e):s()}))};return s()}function E(e,t){for(var o=[],n=2;n=n.length)&&i.isLowSurrogate(n.charCodeAt(o))},e.isHighSurrogate=function(e,t,o){var n=e.getLineContent(t);return!(o<0||o>=n.length)&&i.isHighSurrogate(n.charCodeAt(o))},e.isInsideSurrogatePair=function(e,t,o){return this.isHighSurrogate(e,t,o-2)},e.visibleColumnFromColumn=function(e,t,o){var n=e.length;n>t-1&&(n=t-1);for(var r=0,s=0;s=t)return l-ts?s:i},e.nextTabStop=function(e,t){return e+t-e%t},e.prevTabStop=function(e,t){return e-1-(e-1)%t},e}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"h",(function(){return r})),o.d(t,"g",(function(){return s})),o.d(t,"f",(function(){return a})),o.d(t,"c",(function(){return l})),o.d(t,"i",(function(){return u})),o.d(t,"j",(function(){return c})),o.d(t,"d",(function(){return d})),o.d(t,"e",(function(){return g})),o.d(t,"k",(function(){return p})),o.d(t,"a",(function(){return m}));var n={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};function i(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==n.number||e.constructor!==Array)}function r(e){return typeof e===n.string||e instanceof String}function s(e){return!(typeof e!==n.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function a(e){return(typeof e===n.number||e instanceof Number)&&!isNaN(e)}function l(e){return!0===e||!1===e}function u(e){return typeof e===n.undefined}function c(e){return u(e)||null===e}var h=Object.prototype.hasOwnProperty;function d(e){if(!s(e))return!1;for(var t in e)if(h.call(e,t))return!1;return!0}function g(e){return typeof e===n.function}function p(e,t){for(var o=Math.min(e.length,t.length),n=0;n "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?i.LTR:i.RTL},t.prototype.setEndPosition=function(e,o){return this.getDirection()===i.LTR?new t(this.startLineNumber,this.startColumn,e,o):new t(e,o,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new s.a(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,o){return this.getDirection()===i.LTR?new t(e,o,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,o)},t.fromPositions=function(e,o){return void 0===o&&(o=e),new t(e.lineNumber,e.column,o.lineNumber,o.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 o=0,n=e.length;o=0,g=h.indexOf("Edge/")>=0,p=d||g,f=h.indexOf("Firefox")>=0,m=h.indexOf("AppleWebKit")>=0,_=h.indexOf("Chrome")>=0,y=-1===h.indexOf("Chrome")&&h.indexOf("Safari")>=0,v=h.indexOf("iPad")>=0,b=g&&h.indexOf("WebView/")>=0;function E(){if(d)return!1;if(g){var e=h.indexOf("Edge/"),t=parseInt(h.substring(e+5,h.indexOf(".",e)),10);if(!t||t>=12&&t<=16)return!1}return!0}},function(e,t,o){"use strict";function n(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]}function i(e,t,o){if(void 0===o&&(o=function(e,t){return e===t}),e.length!==t.length)return!1;for(var n=0,i=e.length;n0))return r;i=r-1}}return-(n+1)}function s(e,t){var o=0,n=e.length;if(0===n)return 0;for(;on?e[l]=r[a++]:a>i?e[l]=r[s++]:t(r[a],r[s])<0?e[l]=r[a++]:e[l]=r[s++]}(t,o,n,s,i,r)}(e,t,0,e.length-1,[]),e}function l(e,t){for(var o,n=[],i=0,r=a(e.slice(0),t);it;i--)n.push(i);return n}function m(e,t,o){var n=e.slice(0,t),i=e.slice(t);return n.concat(o,i)}o.d(t,"n",(function(){return n})),o.d(t,"e",(function(){return i})),o.d(t,"b",(function(){return r})),o.d(t,"f",(function(){return s})),o.d(t,"l",(function(){return a})),o.d(t,"j",(function(){return l})),o.d(t,"c",(function(){return u})),o.d(t,"k",(function(){return c})),o.d(t,"d",(function(){return h})),o.d(t,"h",(function(){return d})),o.d(t,"g",(function(){return g})),o.d(t,"i",(function(){return p})),o.d(t,"m",(function(){return f})),o.d(t,"a",(function(){return m}))},function(e,t,o){"use strict";var n=o(33),i=o(4),r=o(18),s=o(11),a=o(13),l=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 Object(a.e)(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 Object(a.e)(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}(),d=o(2),g=o(23),p=function(){this.changeType=1},f=function(e,t){this.changeType=2,this.lineNumber=e,this.detail=t},m=function(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t},_=function(e,t,o){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=o},y=function(){this.changeType=5},v=function(){function e(e,t,o,n){this.changes=e,this.versionId=t,this.isUndoing=o,this.isRedoing=n}return e.prototype.containsEvent=function(e){for(var t=0,o=this.changes.length;t>>0}function S(e,t){e.metadata=254&e.metadata|t<<0}function T(e){return(2&e.metadata)>>>1==1}function w(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function k(e){return(4&e.metadata)>>>2==1}function O(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function R(e){return(8&e.metadata)>>>3==1}function N(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function L(e,t){e.metadata=207&e.metadata|t<<4}var I=function(){function e(e,t,o){this.metadata=0,this.parent=null,this.left=null,this.right=null,S(this,1),this.start=t,this.end=o,this.delta=0,this.maxEnd=o,this.id=e,this.ownerId=0,this.options=null,O(this,!1),L(this,1),N(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=o,this.range=null,w(this,!1)}return e.prototype.reset=function(e,t,o,n){this.start=t,this.end=o,this.maxEnd=o,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=o,this.range=n},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;O(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),L(this,this.options.stickiness),N(this,!!this.options.overviewRuler.color)},e.prototype.setCachedOffsets=function(e,t,o){this.cachedVersionId!==o&&(this.range=null),this.cachedVersionId=o,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),D=new I(null,0,0);D.parent=D,D.left=D,D.right=D,S(D,0);var A=function(){function e(){this.root=D,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,t,o,n,i){return this.root===D?[]:function(e,t,o,n,i,r){var s=e.root,a=0,l=0,u=0,c=[],h=0;for(;s!==D;)if(T(s))w(s.left,!1),w(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!T(s.left)){if(a+s.maxEndo)w(s,!0);else{if((u=a+s.end)>=t){s.setCachedOffsets(l,u,r);var d=!0;n&&s.ownerId&&s.ownerId!==n&&(d=!1),i&&k(s)&&(d=!1),d&&(c[h++]=s)}w(s,!0),s.right===D||T(s.right)||(a+=s.delta,s=s.right)}}return w(e.root,!1),c}(this,e,t,o,n,i)},e.prototype.search=function(e,t,o){return this.root===D?[]:function(e,t,o,n){var i=e.root,r=0,s=0,a=0,l=[],u=0;for(;i!==D;)if(T(i))w(i.left,!1),w(i.right,!1),i===i.parent.right&&(r-=i.parent.delta),i=i.parent;else if(i.left===D||T(i.left)){s=r+i.start,a=r+i.end,i.setCachedOffsets(s,a,n);var c=!0;t&&i.ownerId&&i.ownerId!==t&&(c=!1),o&&k(i)&&(c=!1),c&&(l[u++]=i),w(i,!0),i.right===D||T(i.right)||(r+=i.delta,i=i.right)}else i=i.left;return w(e.root,!1),l}(this,e,t,o)},e.prototype.collectNodesFromOwner=function(e){return function(e,t){var o=e.root,n=[],i=0;for(;o!==D;)T(o)?(w(o.left,!1),w(o.right,!1),o=o.parent):o.left===D||T(o.left)?(o.ownerId===t&&(n[i++]=o),w(o,!0),o.right===D||T(o.right)||(o=o.right)):o=o.left;return w(e.root,!1),n}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){var t=e.root,o=[],n=0;for(;t!==D;)T(t)?(w(t.left,!1),w(t.right,!1),t=t.parent):t.left===D||T(t.left)?t.right===D||T(t.right)?(o[n++]=t,w(t,!0)):t=t.right:t=t.left;return w(e.root,!1),o}(this)},e.prototype.insert=function(e){x(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){B(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var o=e,n=0;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;var i=o.start+n,r=o.end+n;o.setCachedOffsets(i,r,t)},e.prototype.acceptReplace=function(e,t,o,n){for(var i=function(e,t,o){var n=e.root,i=0,r=0,s=0,a=[],l=0;for(;n!==D;)if(T(n))w(n.left,!1),w(n.right,!1),n===n.parent.right&&(i-=n.parent.delta),n=n.parent;else{if(!T(n.left)){if(i+n.maxEndo?w(n,!0):((s=i+n.end)>=t&&(n.setCachedOffsets(r,s,0),a[l++]=n),w(n,!0),n.right===D||T(n.right)||(i+=n.delta,n=n.right))}return w(e.root,!1),a}(this,e,e+t),r=0,s=i.length;ro?(i.start+=s,i.end+=s,i.delta+=s,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),w(i,!0)):(w(i,!0),i.right===D||T(i.right)||(r+=i.delta,i=i.right))}w(e.root,!1)}(this,e,e+t,o),this._normalizeDeltaIfNecessary();for(r=0,s=i.length;ro)&&(1!==n&&(2===n||t))}function M(e,t,o,n,i){var r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,l=o-t,u=n,c=Math.min(l,u),h=e.start,d=!1,g=e.end,p=!1,f=i?1:l>0?2:0;if(!d&&P(h,s,t,f)&&(d=!0),!p&&P(g,a,t,f)&&(p=!0),c>0&&!i){f=l>u?2:0;!d&&P(h,s,t+c,f)&&(d=!0),!p&&P(g,a,t+c,f)&&(p=!0)}f=i?1:0;!d&&P(h,s,o,f)&&(e.start=t+u,d=!0),!p&&P(g,a,o,f)&&(e.end=t+u,p=!0);var m=u-l;d||(e.start=Math.max(0,h+m),d=!0),p||(e.end=Math.max(0,g+m),p=!0),e.start>e.end&&(e.end=e.start)}function x(e,t){if(e.root===D)return t.parent=D,t.left=D,t.right=D,S(t,0),e.root=t,e.root;!function(e,t){var o=0,n=e.root,i=t.start,r=t.end;for(;;){if(G(i,r,n.start+o,n.end+o)<0){if(n.left===D){t.start-=o,t.end-=o,t.maxEnd-=o,n.left=t;break}n=n.left}else{if(n.right===D){t.start-=o+n.delta,t.end-=o+n.delta,t.maxEnd-=o+n.delta,n.right=t;break}o+=n.delta,n=n.right}}t.parent=n,t.left=D,t.right=D,S(t,1)}(e,t),j(t.parent);for(var o=t;o!==e.root&&1===C(o.parent);){var n;if(o.parent===o.parent.parent.left)1===C(n=o.parent.parent.right)?(S(o.parent,0),S(n,0),S(o.parent.parent,1),o=o.parent.parent):(o===o.parent.right&&H(e,o=o.parent),S(o.parent,0),S(o.parent.parent,1),U(e,o.parent.parent));else 1===C(n=o.parent.parent.left)?(S(o.parent,0),S(n,0),S(o.parent.parent,1),o=o.parent.parent):(o===o.parent.left&&U(e,o=o.parent),S(o.parent,0),S(o.parent.parent,1),H(e,o.parent.parent))}return S(e.root,0),t}function B(e,t){var o,n;if(t.left===D?(n=t,(o=t.right).delta+=t.delta,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),o.start+=t.delta,o.end+=t.delta):t.right===D?(o=t.left,n=t):((o=(n=function(e){for(;e.left!==D;)e=e.left;return e}(t.right)).right).start+=n.delta,o.end+=n.delta,o.delta+=n.delta,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=o,S(o,0),t.detach(),F(),W(o),void(e.root.parent=D);var i,r=1===C(n);if(n===n.parent.left?n.parent.left=o:n.parent.right=o,n===t?o.parent=n.parent:(n.parent===t?o.parent=n:o.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,S(n,C(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==D&&(n.left.parent=n),n.right!==D&&(n.right.parent=n)),t.detach(),r)return j(o.parent),n!==t&&(j(n),j(n.parent)),void F();for(j(o),j(o.parent),n!==t&&(j(n),j(n.parent));o!==e.root&&0===C(o);)o===o.parent.left?(1===C(i=o.parent.right)&&(S(i,0),S(o.parent,1),H(e,o.parent),i=o.parent.right),0===C(i.left)&&0===C(i.right)?(S(i,1),o=o.parent):(0===C(i.right)&&(S(i.left,0),S(i,1),U(e,i),i=o.parent.right),S(i,C(o.parent)),S(o.parent,0),S(i.right,0),H(e,o.parent),o=e.root)):(1===C(i=o.parent.left)&&(S(i,0),S(o.parent,1),U(e,o.parent),i=o.parent.left),0===C(i.left)&&0===C(i.right)?(S(i,1),o=o.parent):(0===C(i.left)&&(S(i.right,0),S(i,1),H(e,i),i=o.parent.left),S(i,C(o.parent)),S(o.parent,0),S(i.left,0),U(e,o.parent),o=e.root));S(o,0),F()}function F(){D.parent=D,D.delta=0,D.start=0,D.end=0}function H(e,t){var o=t.right;o.delta+=t.delta,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),o.start+=t.delta,o.end+=t.delta,t.right=o.left,o.left!==D&&(o.left.parent=t),o.parent=t.parent,t.parent===D?e.root=o:t===t.parent.left?t.parent.left=o:t.parent.right=o,o.left=t,t.parent=o,W(t),W(o)}function U(e,t){var o=t.left;t.delta-=o.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=o.delta,t.end-=o.delta,t.left=o.right,o.right!==D&&(o.right.parent=t),o.parent=t.parent,t.parent===D?e.root=o:t===t.parent.right?t.parent.right=o:t.parent.left=o,o.right=t,t.parent=o,W(t),W(o)}function V(e){var t=e.end;if(e.left!==D){var o=e.left.maxEnd;o>t&&(t=o)}if(e.right!==D){var n=e.right.maxEnd+e.delta;n>t&&(t=n)}return t}function W(e){e.maxEnd=V(e)}function j(e){for(;e!==D;){var t=V(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function G(e,t,o,n){return e===o?t-n:e-o}var z=o(6),K=o(15),Y=K.b.performance&&"function"==typeof K.b.performance.now,X=function(){function e(e){this._highResolution=Y&&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?K.b.performance.now():(new Date).getTime()},e}(),q=o(69),$=o(86),J=o(106),Z=o(9),Q=o(32),ee=o(105),te=o(87),oe=o(25);function ne(e){return(16384|e<<0|2<<23)>>>0}var ie=new Uint32Array(0).buffer,re=function(){function e(e){this._state=e,this._lineTokens=null,this._invalid=!0}return e.prototype.deleteBeginning=function(e){null!==this._lineTokens&&this._lineTokens!==ie&&this.delete(0,e)},e.prototype.deleteEnding=function(e){if(null!==this._lineTokens&&this._lineTokens!==ie){var t=new Uint32Array(this._lineTokens),o=t[t.length-2];this.delete(e,o)}},e.prototype.delete=function(e,t){if(null!==this._lineTokens&&this._lineTokens!==ie&&e!==t){var o=new Uint32Array(this._lineTokens),n=o.length>>>1;if(0!==e||o[o.length-2]!==t){var i=te.a.findIndexInTokensArray(o,e),r=i>0?o[i-1<<1]:0;if(tu&&(o[l++]=d,o[l++]=o[1+(h<<1)],u=d)}if(l!==o.length){var g=new Uint32Array(l);g.set(o.subarray(0,l),0),this._lineTokens=g.buffer}}}else this._lineTokens=ie}},e.prototype.append=function(e){if(e!==ie)if(this._lineTokens!==ie){if(null!==this._lineTokens)if(null!==e){var t=new Uint32Array(this._lineTokens),o=new Uint32Array(e),n=o.length>>>1,i=new Uint32Array(t.length+o.length);i.set(t,0);for(var r=t.length,s=t[t.length-2],a=0;a>>1,i=te.a.findIndexInTokensArray(o,e);if(i>0)(i>0?o[i-1<<1]:0)===e&&i--;for(var r=i;r=e},e.prototype.hasLinesToTokenize=function(e){return this._invalidLineStartIndex=0;r--)this.invalidateLine(e.startLineNumber+r-1);this._acceptDeleteRange(e),this._acceptInsertText(new Z.a(e.startLineNumber,e.startColumn),t,o)},e.prototype._acceptDeleteRange=function(e){var t=e.startLineNumber-1;if(!(t>=this._tokens.length))if(e.startLineNumber!==e.endLineNumber){var o=this._tokens[t];o.deleteEnding(e.startColumn-1);var n=e.endLineNumber-1,i=null;if(n=this._tokens.length))if(0!==t){var i=this._tokens[n];i.deleteEnding(e.column-1),i.insert(e.column-1,o);for(var r=new Array(t),s=t-1;s>=0;s--)r[s]=new re(null);this._tokens=oe.a(this._tokens,e.lineNumber,r)}else this._tokens[n].insert(e.column-1,o)}},e.prototype._tokenizeOneLine=function(e,t){if(!this.hasLinesToTokenize(e))return e.getLineCount()+1;var o=this._invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t,o),o},e.prototype._tokenizeText=function(e,t,o){var n=null;try{n=this.tokenizationSupport.tokenize2(t,o,0)}catch(e){Object(a.e)(e)}return n||(n=Object(q.e)(this.languageIdentifier.id,t,o,0)),n},e.prototype._updateTokensUntilLine=function(e,t,o){if(this.tokenizationSupport){for(var n=e.getLineCount(),i=o-1,r=this._invalidLineStartIndex;r<=i;r++){var s=r+1,l=null,u=e.getLineContent(r+1);try{var c=this._getState(r).clone();l=this.tokenizationSupport.tokenize2(u,c,0)}catch(e){Object(a.e)(e)}if(l||(l=Object(q.e)(this.languageIdentifier.id,u,this._getState(r),0)),this._setTokens(this.languageIdentifier.id,r,u.length,l.tokens),t.registerChangedTokens(r+1),this._setIsInvalid(r,!1),s0?t[o-1]:null;n&&n.toLineNumber===e-1?n.toLineNumber++:t[o]={fromLineNumber:e,toLineNumber:e}},e.prototype.build=function(){return 0===this._ranges.length?null:{ranges:this._ranges}},e}();function le(e,t,o,n){var i;for(i=0;i0&&s>0)return 0;if(l>0&&u>0)return 0;var c=Math.abs(s-u),h=Math.abs(r-l);return 0===c?h:h%c==0?h/c:0}function ue(e,t,o){for(var n=Math.min(e.getLineCount(),1e4),i=0,r=0,s="",a=0,l=[0,0,0,0,0,0,0,0,0],u=1;u<=n;u++){for(var c=e.getLineLength(u),h=e.getLineContent(u),d=c<=65536,g=!1,p=0,f=0,m=0,_=0,y=c;_0?i++:f>1&&r++;var b=le(s,a,h,p);b<=8&&l[b]++,s=h,a=p}}var E=o;i!==r&&(E=iS&&(S=t,C=e)})),{insertSpaces:E,tabSize:C}}var ce=o(27),he=o(77),de=function(){function e(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=null,this.left=null,this.right=null}return e.prototype.next=function(){if(this.right!==ge)return pe(this.right);for(var e=this;e.parent!==ge&&e.parent.left!==e;)e=e.parent;return e.parent===ge?ge:e.parent},e.prototype.prev=function(){if(this.left!==ge)return fe(this.left);for(var e=this;e.parent!==ge&&e.parent.right!==e;)e=e.parent;return e.parent===ge?ge:e.parent},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}(),ge=new de(null,0);function pe(e){for(;e.left!==ge;)e=e.left;return e}function fe(e){for(;e.right!==ge;)e=e.right;return e}function me(e){return e===ge?0:e.size_left+e.piece.length+me(e.right)}function _e(e){return e===ge?0:e.lf_left+e.piece.lineFeedCnt+_e(e.right)}function ye(){ge.parent=ge}function ve(e,t){var o=t.right;o.size_left+=t.size_left+(t.piece?t.piece.length:0),o.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=o.left,o.left!==ge&&(o.left.parent=t),o.parent=t.parent,t.parent===ge?e.root=o:t.parent.left===t?t.parent.left=o:t.parent.right=o,o.left=t,t.parent=o}function be(e,t){var o=t.left;t.left=o.right,o.right!==ge&&(o.right.parent=t),o.parent=t.parent,t.size_left-=o.size_left+(o.piece?o.piece.length:0),t.lf_left-=o.lf_left+(o.piece?o.piece.lineFeedCnt:0),t.parent===ge?e.root=o:t===t.parent.right?t.parent.right=o:t.parent.left=o,o.right=t,t.parent=o}function Ee(e,t){var o,n;if(o=t.left===ge?(n=t).right:t.right===ge?(n=t).left:(n=pe(t.right)).right,n===e.root)return e.root=o,o.color=0,t.detach(),ye(),void(e.root.parent=ge);var i=1===n.color;if(n===n.parent.left?n.parent.left=o:n.parent.right=o,n===t?(o.parent=n.parent,Te(e,o)):(n.parent===t?o.parent=n:o.parent=n.parent,Te(e,o),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==ge&&(n.left.parent=n),n.right!==ge&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Te(e,n)),t.detach(),o.parent.left===o){var r=me(o),s=_e(o);if(r!==o.parent.size_left||s!==o.parent.lf_left){var a=r-o.parent.size_left,l=s-o.parent.lf_left;o.parent.size_left=r,o.parent.lf_left=s,Se(e,o.parent,a,l)}}if(Te(e,o.parent),i)ye();else{for(var u;o!==e.root&&0===o.color;)o===o.parent.left?(1===(u=o.parent.right).color&&(u.color=0,o.parent.color=1,ve(e,o.parent),u=o.parent.right),0===u.left.color&&0===u.right.color?(u.color=1,o=o.parent):(0===u.right.color&&(u.left.color=0,u.color=1,be(e,u),u=o.parent.right),u.color=o.parent.color,o.parent.color=0,u.right.color=0,ve(e,o.parent),o=e.root)):(1===(u=o.parent.left).color&&(u.color=0,o.parent.color=1,be(e,o.parent),u=o.parent.left),0===u.left.color&&0===u.right.color?(u.color=1,o=o.parent):(0===u.left.color&&(u.right.color=0,u.color=1,ve(e,u),u=o.parent.left),u.color=o.parent.color,o.parent.color=0,u.left.color=0,be(e,o.parent),o=e.root));o.color=0,ye()}}function Ce(e,t){for(Te(e,t);t!==e.root&&1===t.parent.color;){var o;if(t.parent===t.parent.parent.left)1===(o=t.parent.parent.right).color?(t.parent.color=0,o.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&ve(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,be(e,t.parent.parent));else 1===(o=t.parent.parent.left).color?(t.parent.color=0,o.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&be(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,ve(e,t.parent.parent))}e.root.color=0}function Se(e,t,o,n){for(;t!==e.root&&t!==ge;)t.parent.left===t&&(t.parent.size_left+=o,t.parent.lf_left+=n),t=t.parent}function Te(e,t){var o=0,n=0;if(t!==e.root){if(0===o){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;o=me((t=t.parent).left)-t.size_left,n=_e(t.left)-t.lf_left,t.size_left+=o,t.lf_left+=n}for(;t!==e.root&&(0!==o||0!==n);)t.parent.left===t&&(t.parent.size_left+=o,t.parent.lf_left+=n),t=t.parent}}ge.parent=ge,ge.left=ge,ge.right=ge,ge.color=0;function we(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}var ke=function(e,t,o,n,i){this.lineStarts=e,this.cr=t,this.lf=o,this.crlf=n,this.isBasicASCII=i};function Oe(e,t){void 0===t&&(t=!0);for(var o=[0],n=1,i=0,r=e.length;i=0;t--){var o=this._cache[t];if(o.nodeStartOffset<=e&&o.nodeStartOffset+o.node.piece.length>=e)return o}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var o=this._cache[t];if(o.nodeStartLineNumber&&o.nodeStartLineNumber=e)return o}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,o=0;o=e)&&(this._cache[o]=null,t=!0)}if(t){var i=[];for(o=0;o0){e[i].lineStarts||(e[i].lineStarts=Oe(e[i].buffer));var s=new Re(i+1,{line:0,column:0},{line:e[i].lineStarts.length-1,column:e[i].buffer.length-e[i].lineStarts[e[i].lineStarts.length-1]},e[i].lineStarts.length-1,e[i].buffer.length);this._buffers.push(e[i]),n=this.rbInsertRight(n,s)}this._searchCache=new Le(1),this._lastVisitedLine={lineNumber:0,value:null},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var t=this,o=65535-Math.floor(21845),n=2*o,i="",r=0,s=[];if(this.iterate(this.root,(function(a){var l=t.getNodeContent(a),u=l.length;if(r<=o||r+u0){var a=i.replace(/\r\n|\r|\n/g,e);s.push(new Ne(a,Oe(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 o=0,n=this.root;n!==ge;)if(n.left!==ge&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return(o+=n.size_left)+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,o+=n.size_left+n.piece.length,n=n.right}return o},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e);for(var t=this.root,o=0,n=e;t!==ge;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var i=this.getIndexOf(t,e-t.size_left);if(o+=t.lf_left+i.index,0===i.index){var r=n-this.getOffsetAt(o+1,1);return new Z.a(o+1,r+1)}return new Z.a(o+1,i.remainder+1)}if(e-=t.size_left+t.piece.length,o+=t.lf_left+t.piece.lineFeedCnt,t.right===ge){r=n-e-this.getOffsetAt(o+1,1);return new Z.a(o+1,r+1)}t=t.right}return new Z.a(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var o=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),i=this.getValueInRange2(o,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?i:i.replace(/\r\n|\r|\n/g,t):i},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){var o=e.node,n=this._buffers[o.piece.bufferIndex].buffer,i=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return n.substring(i+e.remainder,i+t.remainder)}var r=e.node,s=this._buffers[r.piece.bufferIndex].buffer,a=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start),l=s.substring(a+e.remainder,a+r.piece.length);for(r=r.next();r!==ge;){var u=this._buffers[r.piece.bufferIndex].buffer,c=this.offsetInBuffer(r.piece.bufferIndex,r.piece.start);if(r===t.node){l+=u.substring(c,c+t.remainder);break}l+=u.substr(c,r.piece.length),r=r.next()}return l},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 o=this.nodeAt2(e,t+1);if(o.remainder===o.node.piece.length){var n=o.node.next();if(!n)return 0;var i=this._buffers[n.piece.bufferIndex],r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.buffer.charCodeAt(r)}i=this._buffers[o.node.piece.bufferIndex];var s=(r=this.offsetInBuffer(o.node.piece.bufferIndex,o.node.piece.start))+o.remainder;return i.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,o,n,i,r,s,a,l,u,c){var h,g=this._buffers[e.piece.bufferIndex],p=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),f=this.offsetInBuffer(e.piece.bufferIndex,i),m=this.offsetInBuffer(e.piece.bufferIndex,r);t.reset(f);var _={line:0,column:0};do{if(h=t.next(g.buffer)){if(h.index>=m)return u;this.positionInBuffer(e,h.index-p,_);var y=this.getLineFeedCnt(e.piece.bufferIndex,i,_),v=_.line===i.line?_.column-i.column+n:_.column+1,b=v+h[0].length;if(c[u++]=Object(he.d)(new d.a(o+y,v,o+y,b),h,a),h.index+h[0].length>=m)return u;if(u>=l)return u}}while(h);return u},e.prototype.findMatchesLineByLine=function(e,t,o,n){var i=[],r=0,s=new he.b(t.wordSeparators,t.regex),a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];var l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];var u=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,u,c,t,o,n,r,i),i;for(var h=e.startLineNumber,d=a.node;d!==l.node;){var g=this.getLineFeedCnt(d.piece.bufferIndex,u,d.piece.end);if(g>=1){var p=this._buffers[d.piece.bufferIndex].lineStarts,f=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),m=p[u.line+g],_=h===e.startLineNumber?e.startColumn:1;if((r=this.findMatchesInNode(d,s,h,_,u,this.positionInBuffer(d,m-f),t,o,n,r,i))>=n)return i;h+=g}var y=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){var v=this.getLineContent(h).substring(y,e.endColumn-1);return r=this._findMatchesInLine(t,s,v,e.endLineNumber,y,r,i,o,n),i}if((r=this._findMatchesInLine(t,s,this.getLineContent(h).substr(y),h,y,r,i,o,n))>=n)return i;h++,d=(a=this.nodeAt2(h,1)).node,u=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){var b=h===e.startLineNumber?e.startColumn-1:0;v=this.getLineContent(h).substring(b,e.endColumn-1);return r=this._findMatchesInLine(t,s,v,e.endLineNumber,b,r,i,o,n),i}var E=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(l.node,s,h,E,u,c,t,o,n,r,i),i},e.prototype._findMatchesInLine=function(e,t,o,n,i,s,a,l,u){var c,h=e.wordSeparators;if(!l&&e.simpleSearch){for(var g=e.simpleSearch,p=g.length,f=o.length,m=-p;-1!==(m=o.indexOf(g,m+p));)if((!h||Object(he.e)(h,o,f,m,p))&&(a[s++]=new r.e(new d.a(n,m+1+i,n,m+1+p+i),null),s>=u))return s;return s}t.reset(0);do{if((c=t.next(o))&&(a[s++]=Object(he.d)(new d.a(n,c.index+1+i,n,c.index+1+c[0].length+i),c,l),s>=u))return s}while(c);return s},e.prototype.insert=function(e,t,o){if(void 0===o&&(o=!1),this._EOLNormalized=this._EOLNormalized&&o,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value=null,this.root!==ge){var n=this.nodeAt(e),i=n.node,r=n.remainder,s=n.nodeStartOffset,a=i.piece,l=a.bufferIndex,u=this.positionInBuffer(i,r);if(0===i.piece.bufferIndex&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&s+a.length===e&&t.length<65535)return this.appendToNode(i,t),void this.computeBufferMetadata();if(s===e)this.insertContentToNodeLeft(t,i),this._searchCache.valdiate(e);else if(s+i.piece.length>e){var c=[],h=new Re(a.bufferIndex,u,a.end,this.getLineFeedCnt(a.bufferIndex,u,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,u));if(this.shouldCheckCRLF()&&this.endWithCR(t))if(10===this.nodeCharCodeAt(i,r)){var d={line:h.start.line+1,column:0};h=new Re(h.bufferIndex,d,h.end,this.getLineFeedCnt(h.bufferIndex,d,h.end),h.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,r-1)){var g=this.positionInBuffer(i,r-1);this.deleteNodeTail(i,g),t="\r"+t,0===i.piece.length&&c.push(i)}else this.deleteNodeTail(i,u);else this.deleteNodeTail(i,u);var p=this.createNewPieces(t);h.length>0&&this.rbInsertRight(i,h);for(var f=i,m=0;m=0;l--)a=this.rbInsertLeft(a,s[l]);this.validateCRLFWithPrevNode(a),this.deleteNodes(o)},e.prototype.insertContentToNodeRight=function(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var o=this.createNewPieces(e),n=this.rbInsertRight(t,o[0]),i=n,r=1;r=i))break;c=n+1}return o?(o.line=n,o.column=u-r,null):{line:n,column:u-r}},e.prototype.getLineFeedCnt=function(e,t,o){if(0===o.column)return o.line-t.line;var n=this._buffers[e].lineStarts;if(o.line===n.length-1)return o.line-t.line;var i=n[o.line+1],r=n[o.line]+o.column;if(i>r+1)return o.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?o.line-t.line+1:o.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 o=e.charCodeAt(65534),n=void 0;13===o||o>=55296&&o<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,65535),e=e.substring(65535));var i=Oe(n);t.push(new Re(this._buffers.length,{line:0,column:0},{line:i.length-1,column:n.length-i[i.length-1]},i.length-1,n.length)),this._buffers.push(new Ne(n,i))}var r=Oe(e);return t.push(new Re(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 Ne(e,r)),t}var s=this._buffers[0].buffer.length,a=Oe(e,!1),l=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},l=this._lastChangeBufferPos;for(var u=0;u=e-1)o=o.left;else{if(o.lf_left+o.piece.lineFeedCnt>e-1){r=this.getAccumulatedValue(o,e-o.lf_left-2),l=this.getAccumulatedValue(o,e-o.lf_left-1),s=this._buffers[o.piece.bufferIndex].buffer,a=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return u+=o.size_left,this._searchCache.set({node:o,nodeStartOffset:u,nodeStartLineNumber:c-(e-1-o.lf_left)}),s.substring(a+r,a+l-t)}if(o.lf_left+o.piece.lineFeedCnt===e-1){r=this.getAccumulatedValue(o,e-o.lf_left-2),s=this._buffers[o.piece.bufferIndex].buffer,a=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);n=s.substring(a+r,a+o.piece.length);break}e-=o.lf_left+o.piece.lineFeedCnt,u+=o.size_left+o.piece.length,o=o.right}for(o=o.next();o!==ge;){s=this._buffers[o.piece.bufferIndex].buffer;if(o.piece.lineFeedCnt>0){l=this.getAccumulatedValue(o,0),a=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return n+=s.substring(a,a+l-t)}a=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);n+=s.substr(a,o.piece.length),o=o.next()}return n},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,o=0;e!==ge;)t+=e.lf_left+e.piece.lineFeedCnt,o+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=o,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var o=e.piece,n=this.positionInBuffer(e,t),i=n.line-o.start.line;if(this.offsetInBuffer(o.bufferIndex,o.end)-this.offsetInBuffer(o.bufferIndex,o.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,o.start,n);if(r!==i)return{index:r,remainder:0}}return{index:i,remainder:n.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var o=e.piece,n=this._buffers[o.bufferIndex].lineStarts,i=o.start.line+t+1;return i>o.end.line?n[o.end.line]+o.end.column-n[o.start.line]-o.start.column:n[i]-n[o.start.line]-o.start.column},e.prototype.deleteNodeTail=function(e,t){var o=e.piece,n=o.lineFeedCnt,i=this.offsetInBuffer(o.bufferIndex,o.end),r=t,s=this.offsetInBuffer(o.bufferIndex,r),a=this.getLineFeedCnt(o.bufferIndex,o.start,r),l=a-n,u=s-i,c=o.length+u;e.piece=new Re(o.bufferIndex,o.start,r,a,c),Se(this,e,u,l)},e.prototype.deleteNodeHead=function(e,t){var o=e.piece,n=o.lineFeedCnt,i=this.offsetInBuffer(o.bufferIndex,o.start),r=t,s=this.getLineFeedCnt(o.bufferIndex,r,o.end),a=s-n,l=i-this.offsetInBuffer(o.bufferIndex,r),u=o.length+l;e.piece=new Re(o.bufferIndex,r,o.end,s,u),Se(this,e,l,a)},e.prototype.shrinkNode=function(e,t,o){var n=e.piece,i=n.start,r=n.end,s=n.length,a=n.lineFeedCnt,l=t,u=this.getLineFeedCnt(n.bufferIndex,n.start,l),c=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,i);e.piece=new Re(n.bufferIndex,n.start,l,u,c),Se(this,e,c-s,u-a);var h=new Re(n.bufferIndex,o,r,this.getLineFeedCnt(n.bufferIndex,o,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,o)),d=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(d)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var o=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var i=Oe(t,!1),r=0;re)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;var i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var o=this.root,n=0;o!==ge;)if(o.left!==ge&&o.lf_left>=e-1)o=o.left;else{if(o.lf_left+o.piece.lineFeedCnt>e-1){var i=this.getAccumulatedValue(o,e-o.lf_left-2),r=this.getAccumulatedValue(o,e-o.lf_left-1);return n+=o.size_left,{node:o,remainder:Math.min(i+t-1,r),nodeStartOffset:n}}if(o.lf_left+o.piece.lineFeedCnt===e-1){if((i=this.getAccumulatedValue(o,e-o.lf_left-2))+t-1<=o.piece.length)return{node:o,remainder:i+t-1,nodeStartOffset:n};t-=o.piece.length-i;break}e-=o.lf_left+o.piece.lineFeedCnt,n+=o.size_left+o.piece.length,o=o.right}for(o=o.next();o!==ge;){if(o.piece.lineFeedCnt>0){r=this.getAccumulatedValue(o,0);var s=this.offsetOfNode(o);return{node:o,remainder:Math.min(t-1,r),nodeStartOffset:s}}if(o.piece.length>=t-1)return{node:o,remainder:t-1,nodeStartOffset:this.offsetOfNode(o)};t-=o.piece.length,o=o.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var o=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return o.buffer.charCodeAt(n)},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===ge||0===e.piece.lineFeedCnt)return!1;var t=e.piece,o=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,i=o[n]+t.start.column;return n!==o.length-1&&(!(o[n+1]>i+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(i))},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==ge&&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 o,n=[],i=this._buffers[e.piece.bufferIndex].lineStarts;o=0===e.piece.end.column?{line:e.piece.end.line-1,column:i[e.piece.end.line]-i[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 Re(e.piece.bufferIndex,e.piece.start,o,s,r),Se(this,e,-1,-1),0===e.piece.length&&n.push(e);var a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,u=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Re(t.piece.bufferIndex,a,t.piece.end,u,l),Se(this,t,-1,-1),0===t.piece.length&&n.push(t);var c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(var h=0;h0){m.sort((function(e,t){return t.lineNumber-e.lineNumber})),S=[];l=0;for(var T=m.length;l0&&m[l-1].lineNumber===y)){var w=m[l].oldContent,k=this.getLineContent(y);0!==k.length&&k!==w&&-1===E.firstNonWhitespaceIndex(k)&&S.push(y)}}}return new r.a(b,C,S)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,o=e[0].range,n=e[e.length-1].range,i=new d.a(o.startLineNumber,o.startColumn,n.endLineNumber,n.endColumn),s=o.startLineNumber,a=o.startColumn,l=[],u=0,c=e.length;u0){var h=a.lines.length,g=a.lines[0],p=a.lines[h-1];c=1===h?new d.a(l,u,l,u+g.length):new d.a(l,u,l+h-1,p.length+1)}else c=new d.a(l,u,l,u);t=c.endLineNumber,o=c.endColumn,n.push(c),i=a}return n},e._sortOpsAscending=function(e,t){var o=d.a.compareRangesUsingEnds(e.range,t.range);return 0===o?e.sortIndex-t.sortIndex:o},e._sortOpsDescending=function(e,t){var o=d.a.compareRangesUsingEnds(e.range,t.range);return 0===o?t.sortIndex-e.sortIndex:-o},e}(),Ae=function(){function e(e,t,o,n,i,r,s,a){this._chunks=e,this._bom=t,this._cr=o,this._lf=n,this._crlf=i,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,o=this._cr+this._crlf;return 0===t?e===r.b.LF?"\n":"\r\n":o>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),o=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var n=0,i=o.length;n=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 o=1,n=0,i=0,r=0,s=!0,a=0,l=t.length;a126)&&(s=!1)}var c=new ke(we(e),n,i,r,s);return e.length=0,c}(this._tmpLineStarts,e);this.chunks.push(new Ne(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=E.containsRTL(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(),new Ae(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=Oe(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}();o.d(t,"b",(function(){return Ue})),o.d(t,"a",(function(){return Ge}));var Me,xe=(Me=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}Me(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function Be(e){var t=new Pe;return t.acceptChunk(e),t.finish()}function Fe(e,t){return("string"==typeof e?Be(e):e).create(t)}var He=0;var Ue=function(e){function t(o,a,l,u){void 0===u&&(u=null);var c=e.call(this)||this;c._onWillDispose=c._register(new i.a),c.onWillDispose=c._onWillDispose.event,c._onDidChangeDecorations=c._register(new Ye),c.onDidChangeDecorations=c._onDidChangeDecorations.event,c._onDidChangeLanguage=c._register(new i.a),c.onDidChangeLanguage=c._onDidChangeLanguage.event,c._onDidChangeLanguageConfiguration=c._register(new i.a),c.onDidChangeLanguageConfiguration=c._onDidChangeLanguageConfiguration.event,c._onDidChangeTokens=c._register(new i.a),c.onDidChangeTokens=c._onDidChangeTokens.event,c._onDidChangeOptions=c._register(new i.a),c.onDidChangeOptions=c._onDidChangeOptions.event,c._eventEmitter=c._register(new Xe),He++,c.id="$model"+He,c.isForSimpleWidget=a.isForSimpleWidget,c._associatedResource=null==u?n.a.parse("inmemory://model/"+He):u,c._attachedEditorCount=0,c._buffer=Fe(o,a.defaultEOL),c._options=t.resolveOptions(c._buffer,a);var g,p=c._buffer.getLineCount(),f=c._buffer.getValueLengthInRange(new d.a(1,1,p,c._buffer.getLineLength(p)+1),r.c.TextDefined);return a.largeFileOptimizations?c._isTooLargeForTokenization=f>t.LARGE_FILE_SIZE_THRESHOLD||p>t.LARGE_FILE_LINE_COUNT_THRESHOLD:c._isTooLargeForTokenization=!1,c._isTooLargeForSyncing=f>t.MODEL_SYNC_LIMIT,c._setVersionId(1),c._isDisposed=!1,c._isDisposing=!1,c._languageIdentifier=l||q.a,c._tokenizationListener=s.y.onDidChange((function(e){-1!==e.changedLanguages.indexOf(c._languageIdentifier.language)&&(c._resetTokenizationState(),c.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:c.getLineCount()}]}),c._shouldAutoTokenize()&&c._warmUpTokens())})),c._revalidateTokensTimeout=-1,c._languageRegistryListener=Q.a.onDidChange((function(e){e.languageIdentifier.id===c._languageIdentifier.id&&c._onDidChangeLanguageConfiguration.fire({})})),c._resetTokenizationState(),c._instanceId=(g=He,(g%=52)<26?String.fromCharCode(97+g):String.fromCharCode(65+g-26)),c._lastDecorationId=0,c._decorations=Object.create(null),c._decorationsTree=new Ve,c._commandManager=new h(c),c._isUndoing=!1,c._isRedoing=!1,c._trimAutoWhitespaceLines=null,c}return xe(t,e),t.createFromString=function(e,o,n,i){return void 0===o&&(o=t.DEFAULT_CREATION_OPTIONS),void 0===n&&(n=null),void 0===i&&(i=null),new t(e,o,n,i)},t.resolveOptions=function(e,t){if(t.detectIndentation){var o=ue(e,t.tabSize,t.insertSpaces);return new r.g({tabSize:o.tabSize,insertSpaces:o.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new r.g({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._commandManager=null,this._decorations=null,this._decorationsTree=null,this._tokenizationListener.dispose(),this._languageRegistryListener.dispose(),this._clearTimers(),this._tokens=null,this._isDisposed=!0,this._buffer=null,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 b(e,t))},t.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=Fe(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},t.prototype._createContentChanged2=function(e,t,o,n,i,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:o,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:i,isRedoing:r,isFlush:s}},t.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),o=this.getValueLengthInRange(t),n=this.getLineCount(),i=this.getLineMaxColumn(n);this._buffer=e,this._increaseVersionId(),this._resetTokenizationState(),this._decorations=Object.create(null),this._decorationsTree=new Ve,this._commandManager=new h(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new v([new p],this._versionId,!1,!1),this._createContentChanged2(new d.a(1,1,n,i),0,o,this.getValue(),!1,!1,!0))}},t.prototype.setEOL=function(e){this._assertNotDisposed();var t=e===r.d.CRLF?"\r\n":"\n";if(this._buffer.getEOL()!==t){var o=this.getFullModelRange(),n=this.getValueLengthInRange(o),i=this.getLineCount(),s=this.getLineMaxColumn(i);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new v([new y],this._versionId,!1,!1),this._createContentChanged2(new d.a(1,1,i,s),0,n,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(),o=0,n=t.length;o0},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,o=this._buffer.getLineCount(),n=1;n<=o;n++){var i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}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,o=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,n=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,i=new r.g({tabSize:t,insertSpaces:o,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:n});if(!this._options.equals(i)){var s=this._options.createChangeEvent(i);this._options=i,this._onDidChangeOptions.fire(s)}},t.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var o=ue(this._buffer,t,e);this.updateOptions({insertSpaces:o.insertSpaces,tabSize:o.tabSize})},t._normalizeIndentationFromWhitespace=function(e,t,o){for(var n=0,i=0;ithis.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,o,n=this._buffer.getLineCount(),i=e.startLineNumber,r=e.startColumn;if(i<1)t=1,o=1;else if(i>n)t=n,o=this.getLineMaxColumn(t);else{if(t=0|i,r<=1)o=1;else o=r>=(c=this.getLineMaxColumn(t))?c:0|r}var s,a,l=e.endLineNumber,u=e.endColumn;if(l<1)s=1,a=1;else if(l>n)s=n,a=this.getLineMaxColumn(s);else{var c;if(s=0|l,u<=1)a=1;else a=u>=(c=this.getLineMaxColumn(s))?c:0|u}return i===t&&r===o&&l===s&&u===a&&e instanceof d.a&&!(e instanceof g.a)?e:new d.a(t,o,s,a)},t.prototype._isValidPosition=function(e,t,o){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(o&&t>1){var n=this._buffer.getLineCharCode(e,t-2);if(E.isHighSurrogate(n))return!1}return!0},t.prototype._validatePosition=function(e,t,o){var n=Math.floor("number"!=typeof e||isNaN(e)?1:e),i=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(n<1)return new Z.a(1,1);if(n>r)return new Z.a(r,this.getLineMaxColumn(r));if(i<=1)return new Z.a(n,1);var s=this.getLineMaxColumn(n);if(i>=s)return new Z.a(n,s);if(o){var a=this._buffer.getLineCharCode(n,i-2);if(E.isHighSurrogate(a))return new Z.a(n,i-1)}return new Z.a(n,i)},t.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof Z.a&&this._isValidPosition(e.lineNumber,e.column,!0)?e:this._validatePosition(e.lineNumber,e.column,!0)},t.prototype._isValidRange=function(e,t){var o=e.startLineNumber,n=e.startColumn,i=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(o,n,!1))return!1;if(!this._isValidPosition(i,r,!1))return!1;if(t){var s=n>1?this._buffer.getLineCharCode(o,n-2):0,a=r>1&&r<=this._buffer.getLineLength(i)?this._buffer.getLineCharCode(i,r-2):0,l=E.isHighSurrogate(s),u=E.isHighSurrogate(a);return!l&&!u}return!0},t.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof d.a&&!(e instanceof g.a)&&this._isValidRange(e,!0))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),o=this._validatePosition(e.endLineNumber,e.endColumn,!1),n=t.lineNumber,i=t.column,r=o.lineNumber,s=o.column,a=i>1?this._buffer.getLineCharCode(n,i-2):0,l=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,u=E.isHighSurrogate(a),c=E.isHighSurrogate(l);return u||c?n===r&&i===s?new d.a(n,i-1,r,s-1):u&&c?new d.a(n,i-1,r,s+1):u?new d.a(n,i-1,r,s):new d.a(n,i,r,s+1):new d.a(n,i,r,s)},t.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var o=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,o)))},t.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new d.a(1,1,e,this.getLineMaxColumn(e))},t.prototype.findMatchesLineByLine=function(e,t,o,n){return this._buffer.findMatchesLineByLine(e,t,o,n)},t.prototype.findMatches=function(e,t,o,n,i,r,s){var a;if(void 0===s&&(s=999),this._assertNotDisposed(),a=d.a.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!o&&e.indexOf("\n")<0){var l=new he.a(e,o,n,i).parseSearchRequest();return l?this.findMatchesLineByLine(a,l,r,s):[]}return he.c.findMatches(this,new he.a(e,o,n,i),a,r,s)},t.prototype.findNextMatch=function(e,t,o,n,i,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!o&&e.indexOf("\n")<0){var a=new he.a(e,o,n,i).parseSearchRequest(),l=this.getLineCount(),u=new d.a(s.lineNumber,s.column,l,this.getLineMaxColumn(l)),c=this.findMatchesLineByLine(u,a,r,1);return he.c.findNextMatch(this,new he.a(e,o,n,i),s,r),c.length>0?c[0]:(u=new d.a(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(c=this.findMatchesLineByLine(u,a,r,1)).length>0?c[0]:null)}return he.c.findNextMatch(this,new he.a(e,o,n,i),s,r)},t.prototype.findPreviousMatch=function(e,t,o,n,i,r){this._assertNotDisposed();var s=this.validatePosition(t);return he.c.findPreviousMatch(this,new he.a(e,o,n,i),s,r)},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?r.d.LF:r.d.CRLF)!==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,o){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,o)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,o){var n=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var i=t.map((function(e){return{range:n.validateRange(e.range),text:e.text}})),r=!0,s=0,a=e.length;sl.endLineNumber,p=l.startLineNumber>y.endLineNumber;if(!g&&!p){u=!0;break}}if(!u){r=!1;break}}if(r)for(s=0,a=this._trimAutoWhitespaceLines.length;sy.endLineNumber)&&!(f===y.startLineNumber&&y.startColumn===m&&y.isEmpty()&&v&&v.length>0&&"\n"===v.charAt(0)||f===y.startLineNumber&&1===y.startColumn&&y.isEmpty()&&v&&v.length>0&&"\n"===v.charAt(v.length-1))){_=!1;break}}_&&t.push({range:new d.a(f,1,f,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,o)},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,o=0,n=0,i=e.length;n=0;T--){var w=p+T,k=s-u-S+w;l.push(new f(w,this.getLineContent(k)))}if(Cthis.getLineCount()?[]:this.getLinesDecorations(e,e,t,o)},t.prototype.getLinesDecorations=function(e,t,o,n){void 0===o&&(o=0),void 0===n&&(n=!1);var i=this.getLineCount(),r=Math.min(i,Math.max(1,e)),s=Math.min(i,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new d.a(r,1,s,a),o,n)},t.prototype.getDecorationsInRange=function(e,t,o){void 0===t&&(t=0),void 0===o&&(o=!1);var n=this.validateRange(e);return this._getDecorationsInRange(n,t,o)},t.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var o=this.getVersionId(),n=this._decorationsTree.search(e,t,!0,o);return this._ensureNodesHaveRanges(n)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var o=this.getVersionId(),n=this._decorationsTree.search(e,t,!1,o);return this._ensureNodesHaveRanges(n)},t.prototype._getDecorationsInRange=function(e,t,o){var n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),i=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(n,i,t,o,r);return this._ensureNodesHaveRanges(s)},t.prototype._ensureNodesHaveRanges=function(e){for(var t=0,o=e.length;t0)for(;i>0&&s>=1;){var l=this.getLineFirstNonWhitespaceColumn(s);if(0!==l){if(l=0;c--){u=(g=this._tokens._tokenizeText(this._buffer,r[c],u))?g.endState.clone():a.clone()}var h=Math.floor(.4*this._tokens.inValidLineStartIndex);t=Math.min(this.getLineCount(),t+h);for(var d=e;d<=t;d++){var g,p=this.getLineContent(d);(g=this._tokens._tokenizeText(this._buffer,p,u))?(this._tokens._setTokens(this._tokens.languageIdentifier.id,d-1,p.length,g.tokens),this._tokens._setIsInvalid(d-1,!1),this._tokens._setState(d-1,u),u=g.endState.clone(),n.registerChangedTokens(d)):u=a.clone()}var f=n.build();f&&this._onDidChangeTokens.fire(f)}}},t.prototype.forceTokenization=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");var t=new ae;this._tokens._updateTokensUntilLine(this._buffer,t,e);var o=t.build();o&&this._onDidChangeTokens.fire(o)},t.prototype.isCheapToTokenize=function(e){return this._tokens.isCheapToTokenize(e)},t.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},t.prototype.getLineTokens=function(e){if(e<1||e>this.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 o=this.validatePosition({lineNumber:e,column:t}),n=o.lineNumber,i=o.column,r=this._getLineTokens(n);return r.getLanguageId(r.findTokenIndexAtOffset(i-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 ae,o=X.create(!1);this._tokens.hasLinesToTokenize(this._buffer)&&!(o.elapsed()>20);){if(this._tokens._tokenizeOneLine(this._buffer,t)>=e)break}this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization();var n=t.build();n&&this._onDidChangeTokens.fire(n)},t.prototype.emitModelTokensChangedEvent=function(e){this._isDisposing||this._onDidChangeTokens.fire(e)},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var o=this.validatePosition(e),n=this.getLineContent(o.lineNumber),i=this._getLineTokens(o.lineNumber),r=i.findTokenIndexAtOffset(o.column-1),s=t._findLanguageBoundaries(i,r),a=s[0],l=s[1],u=Object(ee.d)(o.column,Q.a.getWordDefinition(i.getLanguageId(r)),n.substring(a,l),a);if(u)return u;if(r>0&&a===o.column-1){var c=t._findLanguageBoundaries(i,r-1),h=c[0],d=c[1],g=Object(ee.d)(o.column,Q.a.getWordDefinition(i.getLanguageId(r-1)),n.substring(h,d),h);if(g)return g}return null},t._findLanguageBoundaries=function(e,t){for(var o,n,i=e.getLanguageId(t),r=t;r>=0&&e.getLanguageId(r)===i;r--)o=e.getStartOffset(r);r=t;for(var s=e.getCount();r0&&o.getStartOffset(i)===e.column-1){a=o.getStartOffset(i);i--;var u=Q.a.getBracketsSupport(o.getLanguageId(i));if(u&&!Object($.b)(o.getStandardTokenType(i))){var c,h,d;s=Math.max(o.getStartOffset(i),e.column-1-u.maxBracketLength);if((c=J.a.findPrevBracketInToken(u.reversedRegex,t,n,s,a))&&c.startColumn<=e.column&&e.column<=c.endColumn)if(h=(h=n.substring(c.startColumn-1,c.endColumn-1)).toLowerCase(),d=this._matchFoundBracket(c,u.textIsBracket[h],u.textIsOpenBracket[h]))return d}}return null},t.prototype._matchFoundBracket=function(e,t,o){if(!t)return null;var n;if(o){if(n=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,n]}else if(n=this._findMatchingBracketUp(t,e.getStartPosition()))return[e,n];return null},t.prototype._findMatchingBracketUp=function(e,t){for(var o=e.languageIdentifier.id,n=e.reversedRegex,i=-1,r=t.lineNumber;r>=1;r--){var s=this._getLineTokens(r),a=s.getCount(),l=this._buffer.getLineContent(r),u=a-1,c=-1;for(r===t.lineNumber&&(u=s.findTokenIndexAtOffset(t.column-1),c=t.column-1);u>=0;u--){var h=s.getLanguageId(u),d=s.getStandardTokenType(u),g=s.getStartOffset(u),p=s.getEndOffset(u);if(-1===c&&(c=p),h===o&&!Object($.b)(d))for(;;){var f=J.a.findPrevBracketInToken(n,r,l,g,c);if(!f)break;var m=l.substring(f.startColumn-1,f.endColumn-1);if((m=m.toLowerCase())===e.open?i++:m===e.close&&i--,0===i)return f;c=f.startColumn-1}c=-1}}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var o=e.languageIdentifier.id,n=e.forwardRegex,i=1,r=t.lineNumber,s=this.getLineCount();r<=s;r++){var a=this._getLineTokens(r),l=a.getCount(),u=this._buffer.getLineContent(r),c=0,h=0;for(r===t.lineNumber&&(c=a.findTokenIndexAtOffset(t.column-1),h=t.column-1);ci)throw new Error("Illegal value for lineNumber");for(var r=Q.a.getFoldingRules(this._languageIdentifier.id),s=r&&r.offSide,a=-2,l=-1,u=-2,c=-1,h=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,l=-1;for(var t=e-2;t>=0;t--){var o=n._computeIndentLevel(t);if(o>=0){a=t,l=o;break}}}if(-2===u){u=-1,c=-1;for(t=e;t=0){u=t,c=r;break}}}},d=-2,g=-1,p=-2,f=-1,m=function(e){if(-2===d){d=-1,g=-1;for(var t=e-2;t>=0;t--){var o=n._computeIndentLevel(t);if(o>=0){d=t,g=o;break}}}if(-1!==p&&(-2===p||p=0){p=t,f=r;break}}}},_=0,y=!0,v=0,b=!0,E=0,C=0;y||b;C++){var S=e-C,T=e+C;if(0!==C&&(S<1||Si||T>o)&&(b=!1),C>5e4&&(y=!1,b=!1),y){var w=void 0;if((k=this._computeIndentLevel(S-1))>=0?(u=S-1,c=k,w=Math.ceil(k/this._options.tabSize)):(h(S),w=this._getIndentLevelForWhitespaceLine(s,l,c)),0===C){if(_=S,v=T,0===(E=w))return{startLineNumber:_,endLineNumber:v,indent:E};continue}w>=E?_=S:y=!1}if(b){var k,O=void 0;(k=this._computeIndentLevel(T-1))>=0?(d=T-1,g=k,O=Math.ceil(k/this._options.tabSize)):(m(T),O=this._getIndentLevelForWhitespaceLine(s,g,f)),O>=E?v=T:b=!1}}return{startLineNumber:_,endLineNumber:v,indent:E}},t.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var o=this.getLineCount();if(e<1||e>o)throw new Error("Illegal value for startLineNumber");if(t<1||t>o)throw new Error("Illegal value for endLineNumber");for(var n=Q.a.getFoldingRules(this._languageIdentifier.id),i=n&&n.offSide,r=new Array(t-e+1),s=-2,a=-1,l=-2,u=-1,c=e;c<=t;c++){var h=c-e,d=this._computeIndentLevel(c-1);if(d>=0)s=c-1,a=d,r[h]=Math.ceil(d/this._options.tabSize);else{if(-2===s){s=-1,a=-1;for(var g=c-2;g>=0;g--){if((p=this._computeIndentLevel(g))>=0){s=g,a=p;break}}}if(-1!==l&&(-2===l||l=0){l=g,u=p;break}}}r[h]=this._getIndentLevelForWhitespaceLine(i,a,u)}}return r},t.prototype._getIndentLevelForWhitespaceLine=function(e,t,o){return-1===t||-1===o?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(z.a)},function(e,t,o){"use strict";o.d(t,"g",(function(){return n})),o.d(t,"j",(function(){return i})),o.d(t,"h",(function(){return r})),o.d(t,"k",(function(){return p})),o.d(t,"i",(function(){return s})),o.d(t,"l",(function(){return f})),o.d(t,"e",(function(){return _})),o.d(t,"d",(function(){return w})),o.d(t,"f",(function(){return k})),o.d(t,"b",(function(){return R})),o.d(t,"c",(function(){return N})),o.d(t,"a",(function(){return L}));var n,i,r,s,a=o(0),l=o(15),u=o(42),c=o(105),h=o(25),d=o(30),g=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=2?(T=y?n.Large:n.LargeBlocks,A=2/b):(T=y?n.Small:n.SmallBlocks,A=1/b),(k=Math.max(0,Math.floor((D-d-2)*A/(c+A))))/A>v&&(k=Math.floor(v*A)),O=D-k,"left"===_?(w=0,R+=k,N+=k,L+=k,I+=k):w=t-k-d}else w=0,k=0,T=n.None,O=D;var P=g?p:0;return{width:t,height:o,glyphMarginLeft:R,glyphMarginWidth:S,glyphMarginHeight:o,lineNumbersLeft:N,lineNumbersWidth:E,lineNumbersHeight:o,decorationsLeft:L,decorationsWidth:u,decorationsHeight:o,contentLeft:I,contentWidth:O,contentHeight:o,renderMinimap:T,minimapLeft:w,minimapWidth:k,viewportColumn:Math.max(1,Math.floor((O-d-2)/c)),verticalScrollbarWidth:d,horizontalScrollbarHeight:f,overviewRuler:{top:P,width:d,height:o-2*P,right:0}}},e}(),R={fontFamily:l.d?"Menlo, Monaco, 'Courier New', monospace":l.c?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:l.d?12:14,lineHeight:0,letterSpacing:0},N={tabSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},L={inDiffEditor:!1,wordSeparators:c.b,lineNumbersMinChars:5,lineDecorationsWidth:10,readOnly:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!1,wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:i.Same,wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:!0,autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"auto",showUnused:!0,viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:a.a("editorViewAccessibleLabel","Editor content"),renderLineNumbers:1,renderCustomLineNumbers:null,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:r.Blink,mouseWheelZoom:!1,cursorStyle:s.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:u.b.Auto,horizontal:u.b.Auto,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:!0,iconsInSuggestions:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!0,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,suggest:{filterGraceful:!0,snippets:"inline",snippetsPreventQuickSuggestions:!0},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}}},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(1),i=function(){function e(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._layerHint=!1}return e.prototype.setMaxWidth=function(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")},e.prototype.setWidth=function(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")},e.prototype.setHeight=function(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")},e.prototype.setTop=function(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")},e.prototype.unsetTop=function(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")},e.prototype.setLeft=function(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")},e.prototype.setBottom=function(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")},e.prototype.setRight=function(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")},e.prototype.setFontFamily=function(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)},e.prototype.setFontWeight=function(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)},e.prototype.setFontSize=function(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")},e.prototype.setLineHeight=function(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")},e.prototype.setLetterSpacing=function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")},e.prototype.setClassName=function(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)},e.prototype.toggleClassName=function(e,t){n.N(this.domNode,e,t),this._className=this.domNode.className},e.prototype.setDisplay=function(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)},e.prototype.setPosition=function(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)},e.prototype.setVisibility=function(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)},e.prototype.setLayerHinting=function(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.willChange=this._layerHint?"transform":"auto")},e.prototype.setAttribute=function(e,t){this.domNode.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this.domNode.removeAttribute(e)},e.prototype.appendChild=function(e){this.domNode.appendChild(e.domNode)},e.prototype.removeChild=function(e){this.domNode.removeChild(e.domNode)},e}();function r(e){return new i(e)}},function(e,t,o){"use strict";o.d(t,"o",(function(){return a})),o.d(t,"p",(function(){return l})),o.d(t,"g",(function(){return h})),o.d(t,"f",(function(){return d})),o.d(t,"l",(function(){return p})),o.d(t,"a",(function(){return f})),o.d(t,"q",(function(){return m})),o.d(t,"b",(function(){return y})),o.d(t,"s",(function(){return v})),o.d(t,"e",(function(){return b})),o.d(t,"c",(function(){return E})),o.d(t,"d",(function(){return C})),o.d(t,"r",(function(){return S})),o.d(t,"i",(function(){return w})),o.d(t,"h",(function(){return k})),o.d(t,"w",(function(){return O})),o.d(t,"v",(function(){return R})),o.d(t,"n",(function(){return N})),o.d(t,"m",(function(){return L})),o.d(t,"k",(function(){return I})),o.d(t,"j",(function(){return D})),o.d(t,"t",(function(){return A})),o.d(t,"u",(function(){return P})),o.d(t,"x",(function(){return M})),o.d(t,"z",(function(){return x})),o.d(t,"y",(function(){return B}));var n=o(0),i=o(7),r=o(19),s=o(14),a=Object(i.kb)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},n.a("lineHighlight","Background color for the highlight of line at the cursor position.")),l=Object(i.kb)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},n.a("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),u=Object(i.kb)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},n.a("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque to not hide underlying decorations."),!0),c=Object(i.kb)("editor.rangeHighlightBorder",{dark:null,light:null,hc:i.b},n.a("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),h=Object(i.kb)("editorCursor.foreground",{dark:"#AEAFAD",light:s.a.black,hc:s.a.white},n.a("caret","Color of the editor cursor.")),d=Object(i.kb)("editorCursor.background",null,n.a("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),g=Object(i.kb)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},n.a("editorWhitespaces","Color of whitespace characters in the editor.")),p=Object(i.kb)("editorIndentGuide.background",{dark:g,light:g,hc:g},n.a("editorIndentGuides","Color of the editor indentation guides.")),f=Object(i.kb)("editorIndentGuide.activeBackground",{dark:g,light:g,hc:g},n.a("editorActiveIndentGuide","Color of the active editor indentation guides.")),m=Object(i.kb)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:s.a.white},n.a("editorLineNumbers","Color of editor line numbers.")),_=Object(i.kb)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:i.b},n.a("editorActiveLineNumber","Color of editor active line number"),!1,n.a("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),y=Object(i.kb)("editorLineNumber.activeForeground",{dark:_,light:_,hc:_},n.a("editorActiveLineNumber","Color of editor active line number")),v=Object(i.kb)("editorRuler.foreground",{dark:"#5A5A5A",light:s.a.lightgrey,hc:s.a.white},n.a("editorRuler","Color of the editor rulers.")),b=Object(i.kb)("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},n.a("editorCodeLensForeground","Foreground color of editor code lenses")),E=Object(i.kb)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},n.a("editorBracketMatchBackground","Background color behind matching brackets")),C=Object(i.kb)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:"#fff"},n.a("editorBracketMatchBorder","Color for matching brackets boxes")),S=Object(i.kb)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},n.a("editorOverviewRulerBorder","Color of the overview ruler border.")),T=Object(i.kb)("editorGutter.background",{dark:i.n,light:i.n,hc:i.n},n.a("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),w=Object(i.kb)("editorError.foreground",{dark:"#ea4646",light:"#d60a0a",hc:null},n.a("errorForeground","Foreground color of error squigglies in the editor.")),k=Object(i.kb)("editorError.border",{dark:null,light:null,hc:s.a.fromHex("#E47777").transparent(.8)},n.a("errorBorder","Border color of error squigglies in the editor.")),O=Object(i.kb)("editorWarning.foreground",{dark:"#4d9e4d",light:"#117711",hc:null},n.a("warningForeground","Foreground color of warning squigglies in the editor.")),R=Object(i.kb)("editorWarning.border",{dark:null,light:null,hc:s.a.fromHex("#71B771").transparent(.8)},n.a("warningBorder","Border color of warning squigglies in the editor.")),N=Object(i.kb)("editorInfo.foreground",{dark:"#008000",light:"#008000",hc:null},n.a("infoForeground","Foreground color of info squigglies in the editor.")),L=Object(i.kb)("editorInfo.border",{dark:null,light:null,hc:s.a.fromHex("#71B771").transparent(.8)},n.a("infoBorder","Border color of info squigglies in the editor.")),I=Object(i.kb)("editorHint.foreground",{dark:s.a.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},n.a("hintForeground","Foreground color of hint squigglies in the editor.")),D=Object(i.kb)("editorHint.border",{dark:null,light:null,hc:s.a.fromHex("#eeeeee").transparent(.8)},n.a("hintBorder","Border color of hint squigglies in the editor.")),A=Object(i.kb)("editorUnnecessaryCode.border",{dark:null,light:null,hc:s.a.fromHex("#fff").transparent(.8)},n.a("unnecessaryCodeBorder","Border of unnecessary code in the editor.")),P=Object(i.kb)("editorUnnecessaryCode.opacity",{dark:s.a.fromHex("#000a"),light:s.a.fromHex("#0007"),hc:null},n.a("unnecessaryCodeOpacity","Opacity of unnecessary code in the editor.")),M=Object(i.kb)("editorOverviewRuler.errorForeground",{dark:new s.a(new s.c(255,18,18,.7)),light:new s.a(new s.c(255,18,18,.7)),hc:new s.a(new s.c(255,50,50,1))},n.a("overviewRuleError","Overview ruler marker color for errors.")),x=Object(i.kb)("editorOverviewRuler.warningForeground",{dark:new s.a(new s.c(18,136,18,.7)),light:new s.a(new s.c(18,136,18,.7)),hc:new s.a(new s.c(50,255,50,1))},n.a("overviewRuleWarning","Overview ruler marker color for warnings.")),B=Object(i.kb)("editorOverviewRuler.infoForeground",{dark:new s.a(new s.c(18,18,136,.7)),light:new s.a(new s.c(18,18,136,.7)),hc:new s.a(new s.c(50,50,255,1))},n.a("overviewRuleInfo","Overview ruler marker color for infos."));Object(r.e)((function(e,t){var o=e.getColor(i.n);o&&t.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: "+o+"; }");var n=e.getColor(i.u);n&&t.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: "+n+"; }");var r=e.getColor(T);r&&t.addRule(".monaco-editor .margin { background-color: "+r+"; }");var s=e.getColor(u);s&&t.addRule(".monaco-editor .rangeHighlight { background-color: "+s+"; }");var a=e.getColor(c);a&&t.addRule(".monaco-editor .rangeHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+a+"; }");var l=e.getColor(g);l&&t.addRule(".vs-whitespace { color: "+l+" !important; }")}))},function(e,t,o){"use strict";o.d(t,"c",(function(){return i})),o.d(t,"d",(function(){return r})),o.d(t,"g",(function(){return a})),o.d(t,"a",(function(){return l})),o.d(t,"e",(function(){return u})),o.d(t,"b",(function(){return c})),o.d(t,"f",(function(){return h}));var n=o(21);function i(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(o){e[o]&&"object"==typeof e[o]?t[o]=i(e[o]):t[o]=e[o]})),t}function r(e){if(!e||"object"!=typeof e)return e;for(var t=[e];t.length>0;){var o=t.shift();for(var n in Object.freeze(o),o)if(s.call(o,n)){var i=o[n];"object"!=typeof i||Object.isFrozen(i)||t.push(i)}}return e}var s=Object.prototype.hasOwnProperty;function a(e,t,o){return void 0===o&&(o=!0),Object(n.g)(e)?(Object(n.g)(t)&&Object.keys(t).forEach((function(i){i in e?o&&(Object(n.g)(e[i])&&Object(n.g)(t[i])?a(e[i],t[i],o):e[i]=t[i]):e[i]=t[i]})),e):t}function l(e){for(var t=[],o=1;o=0&&Math.floor(t)===t&&isFinite(e)}function g(e){return r(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function p(e){return null==e?"":Array.isArray(e)||c(e)&&e.toString===u?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function m(e,t){for(var o=Object.create(null),n=e.split(","),i=0;i-1)return e.splice(o,1)}}var v=Object.prototype.hasOwnProperty;function b(e,t){return v.call(e,t)}function E(e){var t=Object.create(null);return function(o){return t[o]||(t[o]=e(o))}}var C=/-(\w)/g,S=E((function(e){return e.replace(C,(function(e,t){return t?t.toUpperCase():""}))})),T=E((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),w=/\B([A-Z])/g,k=E((function(e){return e.replace(w,"-$1").toLowerCase()}));var O=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function o(o){var n=arguments.length;return n?n>1?e.apply(t,arguments):e.call(t,o):e.call(t)}return o._length=e.length,o};function R(e,t){t=t||0;for(var o=e.length-t,n=new Array(o);o--;)n[o]=e[o+t];return n}function L(e,t){for(var o in t)e[o]=t[o];return e}function N(e){for(var t={},o=0;o0,Z=q&&q.indexOf("edge/")>0,Q=(q&&q.indexOf("android"),q&&/iphone|ipad|ipod|ios/.test(q)||"ios"===X),ee=(q&&/chrome\/\d+/.test(q),q&&/phantomjs/.test(q),q&&q.match(/firefox\/(\d+)/)),te={}.watch,oe=!1;if(K)try{var ne={};Object.defineProperty(ne,"passive",{get:function(){oe=!0}}),window.addEventListener("test-passive",null,ne)}catch(e){}var ie=function(){return void 0===G&&(G=!K&&!Y&&void 0!==e&&(e.process&&"server"===e.process.env.VUE_ENV)),G},re=K&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function se(e){return"function"==typeof e&&/native code/.test(e.toString())}var ae,le="undefined"!=typeof Symbol&&se(Symbol)&&"undefined"!=typeof Reflect&&se(Reflect.ownKeys);ae="undefined"!=typeof Set&&se(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ue=I,ce=0,he=function(){this.id=ce++,this.subs=[]};he.prototype.addSub=function(e){this.subs.push(e)},he.prototype.removeSub=function(e){y(this.subs,e)},he.prototype.depend=function(){he.target&&he.target.addDep(this)},he.prototype.notify=function(){var e=this.subs.slice();for(var t=0,o=e.length;t-1)if(r&&!b(i,"default"))s=!1;else if(""===s||s===k(e)){var l=Ve(String,i.type);(l<0||a0&&(ct((u=e(u,(o||"")+"_"+l))[0])&&ct(h)&&(n[c]=ye(h.text+u[0].text),u.shift()),n.push.apply(n,u)):a(u)?ct(h)?n[c]=ye(h.text+u):""!==u&&n.push(ye(u)):ct(u)&&ct(h)?n[c]=ye(h.text+u.text):(s(t._isVList)&&r(u.tag)&&i(u.key)&&r(o)&&(u.key="__vlist"+o+"_"+l+"__"),n.push(u)));return n}(e):void 0}function ct(e){return r(e)&&r(e.text)&&!1===e.isComment}function ht(e,t){if(e){for(var o=Object.create(null),n=le?Reflect.ownKeys(e):Object.keys(e),i=0;i0,s=e?!!e.$stable:!r,a=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&o&&o!==n&&a===o.$key&&!r&&!o.$hasNormal)return o;for(var l in i={},e)e[l]&&"$"!==l[0]&&(i[l]=ft(t,l,e[l]))}else i={};for(var u in t)u in i||(i[u]=mt(t,u));return e&&Object.isExtensible(e)&&(e._normalized=i),W(i,"$stable",s),W(i,"$key",a),W(i,"$hasNormal",r),i}function ft(e,t,o){var n=function(){var e=arguments.length?o.apply(null,arguments):o({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ut(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return o.proxy&&Object.defineProperty(e,t,{get:n,enumerable:!0,configurable:!0}),n}function mt(e,t){return function(){return e[t]}}function _t(e,t){var o,n,i,s,a;if(Array.isArray(e)||"string"==typeof e)for(o=new Array(e.length),n=0,i=e.length;ndocument.createEvent("Event").timeStamp&&(uo=function(){return co.now()})}function ho(){var e,t;for(lo=uo(),so=!0,oo.sort((function(e,t){return e.id-t.id})),ao=0;aoao&&oo[o].id>e.id;)o--;oo.splice(o+1,0,e)}else oo.push(e);ro||(ro=!0,tt(ho))}}(this)},po.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||l(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){We(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},po.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},po.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},po.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var fo={enumerable:!0,configurable:!0,get:I,set:I};function mo(e,t,o){fo.get=function(){return this[t][o]},fo.set=function(e){this[t][o]=e},Object.defineProperty(e,o,fo)}function _o(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var o=e.$options.propsData||{},n=e._props={},i=e.$options._propKeys=[];e.$parent&&Te(!1);var r=function(r){i.push(r);var s=Fe(r,t,o,e);Oe(n,r,s),r in e||mo(e,"_props",r)};for(var s in t)r(s);Te(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var o in t)e[o]="function"!=typeof t[o]?I:O(t[o],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;c(t=e._data="function"==typeof t?function(e,t){ge();try{return e.call(t,t)}catch(e){return We(e,t,"data()"),{}}finally{pe()}}(t,e):t||{})||(t={});var o=Object.keys(t),n=e.$options.props,i=(e.$options.methods,o.length);for(;i--;){var r=o[i];0,n&&b(n,r)||(s=void 0,36!==(s=(r+"").charCodeAt(0))&&95!==s&&mo(e,"_data",r))}var s;ke(t,!0)}(e):ke(e._data={},!0),t.computed&&function(e,t){var o=e._computedWatchers=Object.create(null),n=ie();for(var i in t){var r=t[i],s="function"==typeof r?r:r.get;0,n||(o[i]=new po(e,s||I,I,yo)),i in e||vo(e,i,r)}}(e,t.computed),t.watch&&t.watch!==te&&function(e,t){for(var o in t){var n=t[o];if(Array.isArray(n))for(var i=0;i-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!h(e)&&e.test(t)}function Lo(e,t){var o=e.cache,n=e.keys,i=e._vnode;for(var r in o){var s=o[r];if(s){var a=Oo(s.componentOptions);a&&!t(a)&&No(o,r,n,i)}}}function No(e,t,o,n){var i=e[t];!i||n&&i.tag===n.tag||i.componentInstance.$destroy(),e[t]=null,y(o,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=So++,t._isVue=!0,e&&e._isComponent?function(e,t){var o=e.$options=Object.create(e.constructor.options),n=t._parentVnode;o.parent=t.parent,o._parentVnode=n;var i=n.componentOptions;o.propsData=i.propsData,o._parentListeners=i.listeners,o._renderChildren=i.children,o._componentTag=i.tag,t.render&&(o.render=t.render,o.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Me(To(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,o=t.parent;if(o&&!t.abstract){for(;o.$options.abstract&&o.$parent;)o=o.$parent;o.$children.push(e)}e.$parent=o,e.$root=o?o.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&$t(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,o=e.$vnode=t._parentVnode,i=o&&o.context;e.$slots=dt(t._renderChildren,i),e.$scopedSlots=n,e._c=function(t,o,n,i){return Vt(e,t,o,n,i,!1)},e.$createElement=function(t,o,n,i){return Vt(e,t,o,n,i,!0)};var r=o&&o.data;Oe(e,"$attrs",r&&r.attrs||n,null,!0),Oe(e,"$listeners",t._parentListeners||n,null,!0)}(t),to(t,"beforeCreate"),function(e){var t=ht(e.$options.inject,e);t&&(Te(!1),Object.keys(t).forEach((function(o){Oe(e,o,t[o])})),Te(!0))}(t),_o(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),to(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(wo),function(e){var t={get:function(){return this._data}},o={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",o),e.prototype.$set=Re,e.prototype.$delete=Le,e.prototype.$watch=function(e,t,o){if(c(t))return Co(this,e,t,o);(o=o||{}).user=!0;var n=new po(this,e,t,o);if(o.immediate)try{t.call(this,n.value)}catch(e){We(e,this,'callback for immediate watcher "'+n.expression+'"')}return function(){n.teardown()}}}(wo),function(e){var t=/^hook:/;e.prototype.$on=function(e,o){var n=this;if(Array.isArray(e))for(var i=0,r=e.length;i1?R(o):o;for(var n=R(arguments,1),i='event handler for "'+e+'"',r=0,s=o.length;rparseInt(this.max)&&No(s,a[0],a,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return U}};Object.defineProperty(e,"config",t),e.util={warn:ue,extend:L,mergeOptions:Me,defineReactive:Oe},e.set=Re,e.delete=Le,e.nextTick=tt,e.observable=function(e){return ke(e),e},e.options=Object.create(null),F.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,L(e.options.components,Do),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var o=R(arguments,1);return o.unshift(this),"function"==typeof e.install?e.install.apply(e,o):"function"==typeof e&&e.apply(null,o),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Me(this.options,e),this}}(e),ko(e),function(e){F.forEach((function(t){e[t]=function(e,o){return o?("component"===t&&c(o)&&(o.name=o.name||e,o=this.options._base.extend(o)),"directive"===t&&"function"==typeof o&&(o={bind:o,update:o}),this.options[t+"s"][e]=o,o):this.options[t+"s"][e]}}))}(e)}(wo),Object.defineProperty(wo.prototype,"$isServer",{get:ie}),Object.defineProperty(wo.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(wo,"FunctionalRenderContext",{value:Dt}),wo.version="2.6.10";var Ao=m("style,class"),Po=m("input,textarea,option,select,progress"),xo=m("contenteditable,draggable,spellcheck"),Mo=m("events,caret,typing,plaintext-only"),Bo=function(e,t){return Wo(t)||"false"===t?"false":"contenteditable"===e&&Mo(t)?t:"true"},Fo=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ho="http://www.w3.org/1999/xlink",Uo=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Vo=function(e){return Uo(e)?e.slice(6,e.length):""},Wo=function(e){return null==e||!1===e};function jo(e){for(var t=e.data,o=e,n=e;r(n.componentInstance);)(n=n.componentInstance._vnode)&&n.data&&(t=Go(n.data,t));for(;r(o=o.parent);)o&&o.data&&(t=Go(t,o.data));return function(e,t){if(r(e)||r(t))return zo(e,Ko(t));return""}(t.staticClass,t.class)}function Go(e,t){return{staticClass:zo(e.staticClass,t.staticClass),class:r(e.class)?[e.class,t.class]:t.class}}function zo(e,t){return e?t?e+" "+t:e:t||""}function Ko(e){return Array.isArray(e)?function(e){for(var t,o="",n=0,i=e.length;n-1?mn(e,t,o):Fo(t)?Wo(o)?e.removeAttribute(t):(o="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,o)):xo(t)?e.setAttribute(t,Bo(t,o)):Uo(t)?Wo(o)?e.removeAttributeNS(Ho,Vo(t)):e.setAttributeNS(Ho,t,o):mn(e,t,o)}function mn(e,t,o){if(Wo(o))e.removeAttribute(t);else{if($&&!J&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==o&&!e.__ieph){var n=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",n)};e.addEventListener("input",n),e.__ieph=!0}e.setAttribute(t,o)}}var _n={create:pn,update:pn};function yn(e,t){var o=t.elm,n=t.data,s=e.data;if(!(i(n.staticClass)&&i(n.class)&&(i(s)||i(s.staticClass)&&i(s.class)))){var a=jo(t),l=o._transitionClasses;r(l)&&(a=zo(a,Ko(l))),a!==o._prevClass&&(o.setAttribute("class",a),o._prevClass=a)}}var vn,bn={create:yn,update:yn},En="__r",Cn="__c";function Sn(e,t,o){var n=vn;return function i(){var r=t.apply(null,arguments);null!==r&&kn(e,i,o,n)}}var Tn=Ye&&!(ee&&Number(ee[1])<=53);function wn(e,t,o,n){if(Tn){var i=lo,r=t;t=r._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return r.apply(this,arguments)}}vn.addEventListener(e,t,oe?{capture:o,passive:n}:o)}function kn(e,t,o,n){(n||vn).removeEventListener(e,t._wrapper||t,o)}function On(e,t){if(!i(e.data.on)||!i(t.data.on)){var o=t.data.on||{},n=e.data.on||{};vn=t.elm,function(e){if(r(e[En])){var t=$?"change":"input";e[t]=[].concat(e[En],e[t]||[]),delete e[En]}r(e[Cn])&&(e.change=[].concat(e[Cn],e.change||[]),delete e[Cn])}(o),st(o,n,wn,kn,Sn,t.context),vn=void 0}}var Rn,Ln={create:On,update:On};function Nn(e,t){if(!i(e.data.domProps)||!i(t.data.domProps)){var o,n,s=t.elm,a=e.data.domProps||{},l=t.data.domProps||{};for(o in r(l.__ob__)&&(l=t.data.domProps=L({},l)),a)o in l||(s[o]="");for(o in l){if(n=l[o],"textContent"===o||"innerHTML"===o){if(t.children&&(t.children.length=0),n===a[o])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===o&&"PROGRESS"!==s.tagName){s._value=n;var u=i(n)?"":String(n);In(s,u)&&(s.value=u)}else if("innerHTML"===o&&qo(s.tagName)&&i(s.innerHTML)){(Rn=Rn||document.createElement("div")).innerHTML=""+n+"";for(var c=Rn.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;c.firstChild;)s.appendChild(c.firstChild)}else if(n!==a[o])try{s[o]=n}catch(e){}}}}function In(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var o=!0;try{o=document.activeElement!==e}catch(e){}return o&&e.value!==t}(e,t)||function(e,t){var o=e.value,n=e._vModifiers;if(r(n)){if(n.number)return f(o)!==f(t);if(n.trim)return o.trim()!==t.trim()}return o!==t}(e,t))}var Dn={create:Nn,update:Nn},An=E((function(e){var t={},o=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var n=e.split(o);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}));function Pn(e){var t=xn(e.style);return e.staticStyle?L(e.staticStyle,t):t}function xn(e){return Array.isArray(e)?N(e):"string"==typeof e?An(e):e}var Mn,Bn=/^--/,Fn=/\s*!important$/,Hn=function(e,t,o){if(Bn.test(t))e.style.setProperty(t,o);else if(Fn.test(o))e.style.setProperty(k(t),o.replace(Fn,""),"important");else{var n=Vn(t);if(Array.isArray(o))for(var i=0,r=o.length;i-1?t.split(Gn).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var o=" "+(e.getAttribute("class")||"")+" ";o.indexOf(" "+t+" ")<0&&e.setAttribute("class",(o+t).trim())}}function Kn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Gn).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var o=" "+(e.getAttribute("class")||"")+" ",n=" "+t+" ";o.indexOf(n)>=0;)o=o.replace(n," ");(o=o.trim())?e.setAttribute("class",o):e.removeAttribute("class")}}function Yn(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&L(t,Xn(e.name||"v")),L(t,e),t}return"string"==typeof e?Xn(e):void 0}}var Xn=E((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),qn=K&&!J,$n="transition",Jn="animation",Zn="transition",Qn="transitionend",ei="animation",ti="animationend";qn&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Zn="WebkitTransition",Qn="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ei="WebkitAnimation",ti="webkitAnimationEnd"));var oi=K?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function ni(e){oi((function(){oi(e)}))}function ii(e,t){var o=e._transitionClasses||(e._transitionClasses=[]);o.indexOf(t)<0&&(o.push(t),zn(e,t))}function ri(e,t){e._transitionClasses&&y(e._transitionClasses,t),Kn(e,t)}function si(e,t,o){var n=li(e,t),i=n.type,r=n.timeout,s=n.propCount;if(!i)return o();var a=i===$n?Qn:ti,l=0,u=function(){e.removeEventListener(a,c),o()},c=function(t){t.target===e&&++l>=s&&u()};setTimeout((function(){l0&&(o=$n,c=s,h=r.length):t===Jn?u>0&&(o=Jn,c=u,h=l.length):h=(o=(c=Math.max(s,u))>0?s>u?$n:Jn:null)?o===$n?r.length:l.length:0,{type:o,timeout:c,propCount:h,hasTransform:o===$n&&ai.test(n[Zn+"Property"])}}function ui(e,t){for(;e.length1}function fi(e,t){!0!==t.data.show&&hi(t)}var mi=function(e){var t,o,n={},l=e.modules,u=e.nodeOps;for(t=0;tp?v(e,i(o[_+1])?null:o[_+1].elm,o,g,_,n):g>_&&E(0,t,d,p)}(d,m,_,o,c):r(_)?(r(e.text)&&u.setTextContent(d,""),v(d,null,_,0,_.length-1,o)):r(m)?E(0,m,0,m.length-1):r(e.text)&&u.setTextContent(d,""):e.text!==t.text&&u.setTextContent(d,t.text),r(p)&&r(g=p.hook)&&r(g=g.postpatch)&&g(e,t)}}}function w(e,t,o){if(s(o)&&r(e.parent))e.parent.data.pendingInsert=t;else for(var n=0;n-1,s.selected!==r&&(s.selected=r);else if(P(Ei(s),n))return void(e.selectedIndex!==a&&(e.selectedIndex=a));i||(e.selectedIndex=-1)}}function bi(e,t){return t.every((function(t){return!P(t,e)}))}function Ei(e){return"_value"in e?e._value:e.value}function Ci(e){e.target.composing=!0}function Si(e){e.target.composing&&(e.target.composing=!1,Ti(e.target,"input"))}function Ti(e,t){var o=document.createEvent("HTMLEvents");o.initEvent(t,!0,!0),e.dispatchEvent(o)}function wi(e){return!e.componentInstance||e.data&&e.data.transition?e:wi(e.componentInstance._vnode)}var ki={model:_i,show:{bind:function(e,t,o){var n=t.value,i=(o=wi(o)).data&&o.data.transition,r=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;n&&i?(o.data.show=!0,hi(o,(function(){e.style.display=r}))):e.style.display=n?r:"none"},update:function(e,t,o){var n=t.value;!n!=!t.oldValue&&((o=wi(o)).data&&o.data.transition?(o.data.show=!0,n?hi(o,(function(){e.style.display=e.__vOriginalDisplay})):di(o,(function(){e.style.display="none"}))):e.style.display=n?e.__vOriginalDisplay:"none")},unbind:function(e,t,o,n,i){i||(e.style.display=e.__vOriginalDisplay)}}},Oi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Ri(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Ri(Kt(t.children)):e}function Li(e){var t={},o=e.$options;for(var n in o.propsData)t[n]=e[n];var i=o._parentListeners;for(var r in i)t[S(r)]=i[r];return t}function Ni(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var Ii=function(e){return e.tag||zt(e)},Di=function(e){return"show"===e.name},Ai={name:"transition",props:Oi,abstract:!0,render:function(e){var t=this,o=this.$slots.default;if(o&&(o=o.filter(Ii)).length){0;var n=this.mode;0;var i=o[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var r=Ri(i);if(!r)return i;if(this._leaving)return Ni(e,i);var s="__transition-"+this._uid+"-";r.key=null==r.key?r.isComment?s+"comment":s+r.tag:a(r.key)?0===String(r.key).indexOf(s)?r.key:s+r.key:r.key;var l=(r.data||(r.data={})).transition=Li(this),u=this._vnode,c=Ri(u);if(r.data.directives&&r.data.directives.some(Di)&&(r.data.show=!0),c&&c.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(r,c)&&!zt(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var h=c.data.transition=L({},l);if("out-in"===n)return this._leaving=!0,at(h,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),Ni(e,i);if("in-out"===n){if(zt(r))return u;var d,g=function(){d()};at(l,"afterEnter",g),at(l,"enterCancelled",g),at(h,"delayLeave",(function(e){d=e}))}}return i}}},Pi=L({tag:String,moveClass:String},Oi);function xi(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Mi(e){e.data.newPos=e.elm.getBoundingClientRect()}function Bi(e){var t=e.data.pos,o=e.data.newPos,n=t.left-o.left,i=t.top-o.top;if(n||i){e.data.moved=!0;var r=e.elm.style;r.transform=r.WebkitTransform="translate("+n+"px,"+i+"px)",r.transitionDuration="0s"}}delete Pi.mode;var Fi={Transition:Ai,TransitionGroup:{props:Pi,beforeMount:function(){var e=this,t=this._update;this._update=function(o,n){var i=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,o,n)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",o=Object.create(null),n=this.prevChildren=this.children,i=this.$slots.default||[],r=this.children=[],s=Li(this),a=0;a-1?Jo[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Jo[e]=/HTMLUnknownElement/.test(t.toString())},L(wo.options.directives,ki),L(wo.options.components,Fi),wo.prototype.__patch__=K?mi:I,wo.prototype.$mount=function(e,t){return function(e,t,o){var n;return e.$el=t,e.$options.render||(e.$options.render=_e),to(e,"beforeMount"),n=function(){e._update(e._render(),o)},new po(e,n,I,{before:function(){e._isMounted&&!e._isDestroyed&&to(e,"beforeUpdate")}},!0),o=!1,null==e.$vnode&&(e._isMounted=!0,to(e,"mounted")),e}(this,e=e&&K?function(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}(e):void 0,t)},K&&setTimeout((function(){U.devtools&&re&&re.emit("init",wo)}),0),t.a=wo}).call(this,o(80),o(148).setImmediate)},function(e,t,o){"use strict";var n=o(44),i=function(){function e(e){e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((function(e){return new n.b(e)})):e.brackets?this._autoClosingPairs=e.brackets.map((function(e){return new n.b({open:e[0],close:e[1]})})):this._autoClosingPairs=[],this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.shouldAutoClosePair=function(e,t,o){if(0===t.getTokenCount())return!0;for(var n=t.findTokenIndexAtOffset(o-2),i=t.getStandardTokenType(n),r=0;r1&&!!e.close})).map((function(e){return new n.b(e)})),o.docComment&&this._complexAutoClosePairs.push(new n.b({open:o.docComment.open,close:o.docComment.close}))}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,o=this._richEditBrackets.brackets.length;t=0))return{appendText:s.close}}}return null},e}(),l=o(13),u=o(8),c=function(){function e(t){(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=t.brackets.map((function(t){return{open:t[0],openRegExp:e._createOpenBracketRegExp(t[0]),close:t[1],closeRegExp:e._createCloseBracketRegExp(t[1])}})),this._regExpRules=t.regExpRules||[]}return e.prototype.onEnter=function(e,t,o){for(var i=0,r=this._regExpRules.length;i0&&o.length>0)for(i=0,r=this._brackets.length;i0)for(i=0,r=this._brackets.length;i1){var i=t-1,r=-1;for(i=t-1;i>=1;i--){if(e.getLanguageIdAtPosition(i,0)!==n)return r;var s=e.getLineContent(i);if(!o.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return i;r=i}}return-1},e.prototype.getInheritIndentForLine=function(e,t,o){void 0===o&&(o=!0);var i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);if(!i)return null;if(t<=1)return{indentation:"",action:null};var r=this.getPrecedingValidLine(e,t,i);if(r<0)return null;if(r<1)return{indentation:"",action:null};var s=e.getLineContent(r);if(i.shouldIncrease(s)||i.shouldIndentNextLine(s))return{indentation:u.getLeadingWhitespace(s),action:n.a.Indent,line:r};if(i.shouldDecrease(s))return{indentation:u.getLeadingWhitespace(s),action:null,line:r};if(1===r)return{indentation:u.getLeadingWhitespace(e.getLineContent(r)),action:null,line:r};var a=r-1,l=i.getIndentMetadata(e.getLineContent(a));if(!(3&l)&&4&l){for(var c=0,h=a-1;h>0;h--)if(!i.shouldIndentNextLine(e.getLineContent(h))){c=h;break}return{indentation:u.getLeadingWhitespace(e.getLineContent(c+1)),action:null,line:c+1}}if(o)return{indentation:u.getLeadingWhitespace(e.getLineContent(r)),action:null,line:r};for(h=r;h>0;h--){var d=e.getLineContent(h);if(i.shouldIncrease(d))return{indentation:u.getLeadingWhitespace(d),action:n.a.Indent,line:h};if(i.shouldIndentNextLine(d)){c=0;for(var g=h-1;g>0;g--)if(!i.shouldIndentNextLine(e.getLineContent(h))){c=g;break}return{indentation:u.getLeadingWhitespace(e.getLineContent(c+1)),action:null,line:c+1}}if(i.shouldDecrease(d))return{indentation:u.getLeadingWhitespace(d),action:null,line:h}}return{indentation:u.getLeadingWhitespace(e.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,o,i){var r=this.getIndentRulesSupport(t);if(!r)return null;var s=this.getInheritIndentForLine(e,o),a=e.getLineContent(o);if(s){var c=s.line;if(void 0!==c){var h=this._getOnEnterSupport(t),d=null;try{d=h.onEnter("",e.getLineContent(c),"")}catch(e){Object(l.e)(e)}if(d){var g=u.getLeadingWhitespace(e.getLineContent(c));return d.removeText&&(g=g.substring(0,g.length-d.removeText)),d.indentAction===n.a.Indent||d.indentAction===n.a.IndentOutdent?g=i.shiftIndent(g):d.indentAction===n.a.Outdent&&(g=i.unshiftIndent(g)),r.shouldDecrease(a)&&(g=i.unshiftIndent(g)),d.appendText&&(g+=d.appendText),u.getLeadingWhitespace(g)}}return r.shouldDecrease(a)?s.action===n.a.Indent?s.indentation:i.unshiftIndent(s.indentation):s.action===n.a.Indent?i.shiftIndent(s.indentation):s.indentation}return null},e.prototype.getIndentForEnter=function(e,t,o,i){e.forceTokenization(t.startLineNumber);var s,a,l=e.getLineTokens(t.startLineNumber),c=Object(r.a)(l,t.startColumn-1),h=c.getLineContent(),d=!1;(c.firstCharOffset>0&&l.getLanguageId(0)!==c.languageId?(d=!0,s=h.substr(0,t.startColumn-1-c.firstCharOffset)):s=l.getLineContent().substring(0,t.startColumn-1),t.isEmpty())?a=h.substr(t.startColumn-1-c.firstCharOffset):a=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-c.firstCharOffset);var g=this.getIndentRulesSupport(c.languageId);if(!g)return null;var p=s,f=u.getLeadingWhitespace(s);if(!i&&!d){var m=this.getInheritIndentForLine(e,t.startLineNumber);g.shouldDecrease(s)&&m&&(f=m.indentation,m.action!==n.a.Indent&&(f=o.unshiftIndent(f))),p=f+u.ltrim(u.ltrim(s," "),"\t")}var _={getLineTokens:function(t){return e.getLineTokens(t)},getLanguageIdentifier:function(){return e.getLanguageIdentifier()},getLanguageIdAtPosition:function(t,o){return e.getLanguageIdAtPosition(t,o)},getLineContent:function(o){return o===t.startLineNumber?p:e.getLineContent(o)}},y=u.getLeadingWhitespace(l.getLineContent()),v=this.getInheritIndentForLine(_,t.startLineNumber+1);if(!v){var b=d?y:f;return{beforeEnter:b,afterEnter:b}}var E=d?y:v.indentation;return v.action===n.a.Indent&&(E=o.shiftIndent(E)),g.shouldDecrease(a)&&(E=o.unshiftIndent(E)),{beforeEnter:d?y:f,afterEnter:E}},e.prototype.getIndentActionForType=function(e,t,o,i){var r=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),s=this.getIndentRulesSupport(r.languageId);if(!s)return null;var a,l=r.getLineContent(),u=l.substr(0,t.startColumn-1-r.firstCharOffset);t.isEmpty()?a=l.substr(t.startColumn-1-r.firstCharOffset):a=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-r.firstCharOffset);if(!s.shouldDecrease(u+a)&&s.shouldDecrease(u+o+a)){var c=this.getInheritIndentForLine(e,t.startLineNumber,!1);if(!c)return null;var h=c.indentation;return c.action!==n.a.Indent&&(h=i.unshiftIndent(h)),h}return null},e.prototype.getIndentMetadata=function(e,t){var o=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return o?t<1||t>e.getLineCount()?null:o.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,o){var n=this.getEnterAction(e,new f.a(t,o,t,o));return n?n.enterAction:null},e.prototype.getEnterAction=function(e,t){var o=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),i=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this._getOnEnterSupport(i.languageId);if(!r)return null;var s,a=i.getLineContent(),u=a.substr(0,t.startColumn-1-i.firstCharOffset);t.isEmpty()?s=a.substr(t.startColumn-1-i.firstCharOffset):s=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-i.firstCharOffset);var c=t.startLineNumber,h="";if(c>1&&0===i.firstCharOffset){var d=this.getScopedLineTokens(e,c-1);d.languageId===i.languageId&&(h=d.getLineContent())}var g=null;try{g=r.onEnter(h,u,s)}catch(e){Object(l.e)(e)}return g?(g.appendText||(g.indentAction===n.a.Indent||g.indentAction===n.a.IndentOutdent?g.appendText="\t":g.appendText=""),g.removeText&&(o=o.substring(0,o.length-g.removeText)),{enterAction:g,indentation:o}):null},e.prototype.getIndentationAtPosition=function(e,t,o){var n=e.getLineContent(t),i=u.getLeadingWhitespace(n);return i.length>o-1&&(i=i.substring(0,o-1)),i},e.prototype.getScopedLineTokens=function(e,t,o){e.forceTokenization(t);var n=e.getLineTokens(t),i=isNaN(o)?e.getLineMaxColumn(t)-1:o-1;return Object(r.a)(n,i)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null},e}())},function(e,t,o){"use strict";var n,i,r=o(15),s=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),a=/^\w[\w\d+.-]*$/,l=/^\//,u=/^\/\//;var c="",h="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function e(e,t,o,n,i){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=e||c,this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,o||c),this.query=n||c,this.fragment=i||c,function(e){if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.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(u.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 y(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,o=e.authority,n=e.path,i=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===o?o=this.authority:null===o&&(o=c),void 0===n?n=this.path:null===n&&(n=c),void 0===i?i=this.query:null===i&&(i=c),void 0===r?r=this.fragment:null===r&&(r=c),t===this.scheme&&o===this.authority&&n===this.path&&i===this.query&&r===this.fragment?this:new p(t,o,n,i,r)},e.parse=function(e){var t=d.exec(e);return t?new p(t[2]||c,decodeURIComponent(t[4]||c),decodeURIComponent(t[5]||c),decodeURIComponent(t[7]||c),decodeURIComponent(t[9]||c)):new p(c,c,c,c,c)},e.file=function(e){var t=c;if(r.g&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var o=e.indexOf(h,2);-1===o?(t=e.substring(2),e=h):(t=e.substring(2,o),e=e.substring(o)||h)}return new p("file",t,e,c,c)},e.from=function(e){return new p(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),v(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var o=new p(t);return o._fsPath=t.fsPath,o._formatted=t.external,o}return t},e}();t.a=g;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=y(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?v(this,!0):(this._formatted||(this._formatted=v(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}(g),f=((i={})[58]="%3A",i[47]="%2F",i[63]="%3F",i[35]="%23",i[91]="%5B",i[93]="%5D",i[64]="%40",i[33]="%21",i[36]="%24",i[38]="%26",i[39]="%27",i[40]="%28",i[41]="%29",i[42]="%2A",i[43]="%2B",i[44]="%2C",i[59]="%3B",i[61]="%3D",i[32]="%20",i);function m(e,t){for(var o=void 0,n=-1,i=0;i=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==n&&(o+=encodeURIComponent(e.substring(n,i)),n=-1),void 0!==o&&(o+=e.charAt(i));else{void 0===o&&(o=e.substr(0,i));var s=f[r];void 0!==s?(-1!==n&&(o+=encodeURIComponent(e.substring(n,i)),n=-1),o+=s):-1===n&&(n=i)}}return-1!==n&&(o+=encodeURIComponent(e.substring(n))),void 0!==o?o:e}function _(e){for(var t=void 0,o=0;o1&&"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,r.g&&(t=t.replace(/\//g,"\\")),t}function v(e,t){var o=t?_:m,n="",i=e.scheme,r=e.authority,s=e.path,a=e.query,l=e.fragment;if(i&&(n+=i,n+=":"),(r||"file"===i)&&(n+=h,n+=h),r){var u=r.indexOf("@");if(-1!==u){var c=r.substr(0,u);r=r.substr(u+1),-1===(u=c.indexOf(":"))?n+=o(c,!1):(n+=o(c.substr(0,u),!1),n+=":",n+=o(c.substr(u+1),!1)),n+="@"}-1===(u=(r=r.toLowerCase()).indexOf(":"))?n+=o(r,!1):(n+=o(r.substr(0,u),!1),n+=r.substr(u))}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))}n+=o(s,!0)}return a&&(n+="?",n+=o(a,!1)),l&&(n+="#",n+=t?l:m(l,!1)),n}},function(e,t,o){"use strict";o.d(t,"a",(function(){return v}));o(436);var n,i=o(21),r=o(6),s=o(8),a=o(76),l=o(1),u=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),c="_msDataKey";function h(e){return e[c]||(e[c]={}),e[c]}function d(e){return!!e[c]}var g=function(){function e(e,t){this.offdom=t,this.container=e,this.currentElement=e,this.createdElements=[],this.toDispose={},this.captureToDispose={}}return e.prototype.clone=function(){var t=new e(this.container,this.offdom);return t.currentElement=this.currentElement,t.createdElements=this.createdElements,t.captureToDispose=this.captureToDispose,t.toDispose=this.toDispose,t},e.prototype.build=function(t,o){a.a(this.offdom,"This builder was not created off-dom, so build() can not be called."),t?t instanceof e&&(t=t.getHTMLElement()):t=this.container,a.a(t,"Builder can only be build() with a container provided."),a.a(l.C(t),"The container must either be a HTMLElement or a Builder.");var n,r,s=t,u=s.childNodes;if(i.f(o)&&o=0){var o=e.split("-");e=o[0];for(var n=1;n=0){var t=e.split("-");e=t[0];for(var o=1;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},c=function(e,t){return function(o,n){t(o,n,e)}};function h(e){return void 0!==e.command}var d=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}(),g=Object(r.c)("menuService"),p=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.appendMenuItem=function(e,t){var o=e.id,n=this._menuItems[o];return n?n.push(t):this._menuItems[o]=n=[t],{dispose:function(){var e=n.indexOf(t);e>=0&&n.splice(e,1)}}},e.prototype.getMenuItems=function(e){var t=e.id,o=this._menuItems[t]||[];return t===d.CommandPalette.id&&this._appendImplicitItems(o),o},e.prototype._appendImplicitItems=function(e){for(var t=new Set,o=0,n=e.filter((function(e){return h(e)}));o>>0)>>>0}function u(e,t){if(0===e)return null;var o=(65535&e)>>>0,n=(4294901760&e)>>>16;return 0!==n?new d(c(o,t),c(n,t)):c(o,t)}function c(e,t){var o=!!(2048&e),n=!!(256&e);return new h(2===t?n:o,!!(1024&e),!!(512&e),2===t?o:n,255&e)}!function(){function e(e,t,o,n){void 0===o&&(o=t),void 0===n&&(n=o),r.define(e,t),s.define(e,o),a.define(e,n)}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 r.keyCodeToStr(e)},e.fromString=function(e){return r.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return a.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||a.strToKeyCode(e)}}(n||(n={}));var h=function(){function e(e,t,o,n,i){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=o,this.metaKey=n,this.keyCode=i}return e.prototype.equals=function(e){return 1===e.type&&(this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode)},e.prototype.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}(),d=function(e,t){this.type=2,this.firstPart=e,this.chordPart=t},g=function(e,t,o,n,i,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=o,this.metaKey=n,this.keyLabel=i,this.keyAriaLabel=r},p=function(){}},function(e,t,o){"use strict";o.d(t,"i",(function(){return r})),o.d(t,"g",(function(){return s})),o.d(t,"b",(function(){return a})),o.d(t,"a",(function(){return l})),o.d(t,"c",(function(){return u})),o.d(t,"h",(function(){return d})),o.d(t,"f",(function(){return p})),o.d(t,"e",(function(){return f})),o.d(t,"d",(function(){return m}));var n=o(15),i=o(8),r="/",s=n.g?"\\":"/";function a(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");if(0===t)return".";if(0==~t)return e[0];if(~t==e.length-1)return a(e.substring(0,e.length-1));var o=e.substring(0,~t);return n.g&&":"===o[o.length-1]&&(o+=s),o}function l(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?l(e.substring(0,e.length-1)):e.substr(1+~t)}function u(e){var t=~(e=l(e)).lastIndexOf(".");return t?e.substring(~t):""}var c=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,h=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;function d(e,t){if(null==e)return e;var o=e.length;if(0===o)return".";var i=n.g&&t;if(function(e,t){return t?!h.test(e):!c.test(e)}(e,i))return e;for(var r=i?"\\":"/",s=function(e,t){void 0===t&&(t="/");if(!e)return"";var o=e.length,n=e.charCodeAt(0);if(47===n||92===n){if((47===(n=e.charCodeAt(1))||92===n)&&47!==(n=e.charCodeAt(2))&&92!==n){for(var i=3,r=i;i=65&&n<=90||n>=97&&n<=122)&&58===e.charCodeAt(1))return 47===(n=e.charCodeAt(2))||92===n?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://");if(-1!==s)for(s+=3;s0)&&".."!==f&&(u=-1===p?"":u.slice(0,p),l=!0)}else g(e,a,d,".")&&(s||u||d0){var n=e.charCodeAt(e.length-1);if(47!==n&&92!==n){var i=o.charCodeAt(0);47!==i&&92!==i&&(e+=r)}}e+=o}return d(e)};function f(e,t,o,n){if(void 0===n&&(n=s),e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(o){if(!Object(i.startsWithIgnoreCase)(e,t))return!1;if(t.length===e.length)return!0;var r=t.length;return t.charAt(t.length-1)===n&&r--,e.charAt(r)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function m(e){return n.g?function(e){if(!e)return!1;var t=e.charCodeAt(0);if(47===t||92===t)return!0;if((t>=65&&t<=90||t>=97&&t<=122)&&e.length>2&&58===e.charCodeAt(1)){var o=e.charCodeAt(2);if(47===o||92===o)return!0}return!1}(e):function(e){return e&&47===e.charCodeAt(0)}(e)}},function(e,t,o){"use strict";o.d(t,"b",(function(){return l})),o.d(t,"a",(function(){return u})),o.d(t,"c",(function(){return c}));var n,i=o(15),r=o(24),s=o(173),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(){function e(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);var t=s.a.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}return e.prototype.preventDefault=function(){this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}(),u=function(e){function t(t){var o=e.call(this,t)||this;return o.dataTransfer=t.dataTransfer,o}return a(t,e),t}(l),c=function(){function e(e,t,o){if(void 0===t&&(t=0),void 0===o&&(o=0),this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=o,this.deltaX=t,e){var n=e,s=e;void 0!==n.wheelDeltaY?this.deltaY=n.wheelDeltaY/120:void 0!==s.VERTICAL_AXIS&&s.axis===s.VERTICAL_AXIS&&(this.deltaY=-s.detail/3),void 0!==n.wheelDeltaX?r.m&&i.g?this.deltaX=-n.wheelDeltaX/120:this.deltaX=n.wheelDeltaX/120:void 0!==s.HORIZONTAL_AXIS&&s.axis===s.HORIZONTAL_AXIS&&(this.deltaX=-e.detail/3),0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"a",(function(){return u}));var n,i,r=o(6),s=o(4),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});!function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(i||(i={}));var l=function(){function e(e,t,o,n,i,r){(e|=0)<0&&(e=0),(o|=0)+e>(t|=0)&&(o=t-e),o<0&&(o=0),(n|=0)<0&&(n=0),(r|=0)+n>(i|=0)&&(r=i-n),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=o,this.height=n,this.scrollHeight=i,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,o=this.scrollWidth!==e.scrollWidth,n=this.scrollLeft!==e.scrollLeft,i=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:o,scrollLeftChanged:n,heightChanged:i,scrollHeightChanged:r,scrollTopChanged:s}},e}(),u=function(e){function t(t,o){var n=e.call(this)||this;return n._onScroll=n._register(new s.a),n.onScroll=n._onScroll.event,n._smoothScrollDuration=t,n._scheduleAtNextAnimationFrame=o,n._state=new l(0,0,0,0,0,0),n._smoothScrolling=null,n}return a(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 o=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===o.scrollLeft&&this._smoothScrolling.to.scrollTop===o.scrollTop)return;var n=this._smoothScrolling.combine(this._state,o,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=n}else{o=this._state.withScrollPosition(e);this._smoothScrolling=d.start(this._state,o,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling())}))},t.prototype._performSmoothScrolling=function(){var e=this,t=this._smoothScrolling.tick(),o=this._state.withScrollPosition(t);if(this._setState(o),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}(r.a),c=function(e,t,o){this.scrollLeft=e,this.scrollTop=t,this.isDone=o};function h(e,t){var o=t-e;return function(t){return e+o*(1-function(e){return Math.pow(e,3)}(1-t))}}var d=function(){function e(e,t,o,n){this.from=e,this.to=t,this.duration=n,this._startTime=o,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,o){var n,i,r;if(Math.abs(e-t)>2.5*o){var s=void 0,a=void 0;return e0?(n=t?(n+1)%i:(n+i-1)%i,o.children[n]):(n=o.parent.groups.indexOf(o),t?(n=(n+1)%r,o.parent.groups[n].children[0]):(n=(n+r-1)%r,o.parent.groups[n].children[o.parent.groups[n].children.length-1]))},e.prototype.nearestReference=function(e,t){var o=this._references.map((function(o,n){return{idx:n,prefixLen:a.commonPrefixLength(o.uri.toString(),e.toString()),offsetDist:100*Math.abs(o.range.startLineNumber-t.lineNumber)+Math.abs(o.range.startColumn-t.column)}})).sort((function(e,t){return e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0}))[0];if(o)return this._references[o.idx]},e.prototype.dispose=function(){this._groups=Object(s.d)(this._groups),Object(s.d)(this._disposables),this._disposables.length=0},e._compareReferences=function(e,t){var o=e.uri.toString(),n=t.uri.toString();return on?1:c.a.compareRangesUsingStarts(e.range,t.range)},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var n=o(21),i=o(76),r=new(function(){function e(){this.data={}}return e.prototype.add=function(e,t){i.a(n.h(e)),i.a(n.g(t)),i.a(!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}())},function(e,t,o){"use strict";o.d(t,"b",(function(){return u})),o.d(t,"a",(function(){return c})),o.d(t,"c",(function(){return h}));o(429);var n,i,r,s=o(0),a=o(15),l=o(1);function u(e){(n=document.createElement("div")).className="monaco-aria-container",(i=document.createElement("div")).className="monaco-alert",i.setAttribute("role","alert"),i.setAttribute("aria-atomic","true"),n.appendChild(i),(r=document.createElement("div")).className="monaco-status",r.setAttribute("role","status"),r.setAttribute("aria-atomic","true"),n.appendChild(r),e.appendChild(n)}function c(e){p(i,e)}function h(e){a.d?c(e):p(r,e)}var d=0,g=void 0;function p(e,t){if(n){switch(g===t?d++:(g=t,d=0),d){case 0:break;case 1:t=s.a("repeated","{0} (occurred again)",t);break;default:t=s.a("repeatedNtimes","{0} (occurred {1} times)",t,d)}l.l(e),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}}},function(e,t,o){"use strict";o.d(t,"a",(function(){return u}));var n,i=o(6),r=o(41),s=o(51),a=o(1),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.onclick=function(e,t){this._register(a.g(e,a.d.CLICK,(function(e){return t(new r.b(e))})))},t.prototype.onmousedown=function(e,t){this._register(a.g(e,a.d.MOUSE_DOWN,(function(e){return t(new r.b(e))})))},t.prototype.onmouseover=function(e,t){this._register(a.g(e,a.d.MOUSE_OVER,(function(e){return t(new r.b(e))})))},t.prototype.onnonbubblingmouseout=function(e,t){this._register(a.h(e,(function(e){return t(new r.b(e))})))},t.prototype.onkeydown=function(e,t){this._register(a.g(e,a.d.KEY_DOWN,(function(e){return t(new s.a(e))})))},t.prototype.onkeyup=function(e,t){this._register(a.g(e,a.d.KEY_UP,(function(e){return t(new s.a(e))})))},t.prototype.oninput=function(e,t){this._register(a.g(e,a.d.INPUT,t))},t.prototype.onblur=function(e,t){this._register(a.g(e,a.d.BLUR,t))},t.prototype.onfocus=function(e,t){this._register(a.g(e,a.d.FOCUS,t))},t.prototype.onchange=function(e,t){this._register(a.g(e,a.d.CHANGE,t))},t}(i.a)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(22),i=Object(n.c)("modelService");function r(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},function(e,t,o){"use strict";o.d(t,"b",(function(){return n})),o.d(t,"a",(function(){return r}));var n,i=o(22);!function(e){e[e.Default=1]="Default",e[e.User=2]="User"}(n||(n={}));var r=Object(i.c)("keybindingService")},function(e,t,o){"use strict";var n;o.d(t,"a",(function(){return n})),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"}(n||(n={}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var n=o(20),i=o(9),r=o(2),s=function(e,t,o){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=o},a=function(){function e(){}return e.left=function(e,t,o,i){return i>t.getLineMinColumn(o)?n.a.isLowSurrogate(t,o,i-2)?i-=2:i-=1:o>1&&(o-=1,i=t.getLineMaxColumn(o)),new s(o,i,0)},e.moveLeft=function(t,o,n,i,r){var s,a;if(n.hasSelection()&&!i)s=n.selection.startLineNumber,a=n.selection.startColumn;else{var l=e.left(t,o,n.position.lineNumber,n.position.column-(r-1));s=l.lineNumber,a=l.column}return n.move(i,s,a,0)},e.right=function(e,t,o,i){return ic?(o=c,l?i=t.getLineMaxColumn(o):(i=Math.min(t.getLineMaxColumn(o),i),n.a.isInsideSurrogatePair(t,o,i)&&(i-=1))):(i=n.a.columnFromVisibleColumn2(e,t,o,u),n.a.isInsideSurrogatePair(t,o,i)&&(i-=1)),r=u-n.a.visibleColumnFromColumn(t.getLineContent(o),i,e.tabSize),new s(o,i,r)},e.moveDown=function(t,o,n,i,r){var s,a;n.hasSelection()&&!i?(s=n.selection.endLineNumber,a=n.selection.endColumn):(s=n.position.lineNumber,a=n.position.column);var l=e.down(t,o,s,a,n.leftoverVisibleColumns,r,!0);return n.move(i,l.lineNumber,l.column,l.leftoverVisibleColumns)},e.translateDown=function(t,o,s){var a=s.selection,l=e.down(t,o,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),u=e.down(t,o,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new n.f(new r.a(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new i.a(u.lineNumber,u.column),u.leftoverVisibleColumns)},e.up=function(e,t,o,i,r,a,l){var u=n.a.visibleColumnFromColumn(t.getLineContent(o),i,e.tabSize)+r;return(o-=a)<1?(o=1,l?i=t.getLineMinColumn(o):(i=Math.min(t.getLineMaxColumn(o),i),n.a.isInsideSurrogatePair(t,o,i)&&(i-=1))):(i=n.a.columnFromVisibleColumn2(e,t,o,u),n.a.isInsideSurrogatePair(t,o,i)&&(i-=1)),r=u-n.a.visibleColumnFromColumn(t.getLineContent(o),i,e.tabSize),new s(o,i,r)},e.moveUp=function(t,o,n,i,r){var s,a;n.hasSelection()&&!i?(s=n.selection.startLineNumber,a=n.selection.startColumn):(s=n.position.lineNumber,a=n.position.column);var l=e.up(t,o,s,a,n.leftoverVisibleColumns,r,!0);return n.move(i,l.lineNumber,l.column,l.leftoverVisibleColumns)},e.translateUp=function(t,o,s){var a=s.selection,l=e.up(t,o,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),u=e.up(t,o,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new n.f(new r.a(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new i.a(u.lineNumber,u.column),u.leftoverVisibleColumns)},e.moveToBeginningOfLine=function(e,t,o,n){var i,r=o.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s;return i=o.position.column===a?s:a,o.move(n,r,i,0)},e.moveToEndOfLine=function(e,t,o,n){var i=o.position.lineNumber,r=t.getLineMaxColumn(i);return o.move(n,i,r,0)},e.moveToBeginningOfBuffer=function(e,t,o,n){return o.move(n,1,1,0)},e.moveToEndOfBuffer=function(e,t,o,n){var i=t.getLineCount(),r=t.getLineMaxColumn(i);return o.move(n,i,r,0)},e}()},function(e,t,o){"use strict";var n=o(127),i=o(272),r=o(182),s=o(339),a=o(168);function l(e){return e}function u(e,t){for(var o=0;o1;)try{return c.stringifyByChunk(e,n,o)}catch(e){o=Math.floor(o/2)}return c.stringifyByChar(e)}function d(e,t){for(var o=0;o-1&&t.splice(o,1)}}function d(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var o=e.state;p(e,o,[],e._modules.root,!0),g(e,o,t)}function g(e,t,o){var n=e._vm;e.getters={};var r=e._wrappedGetters,s={};i(r,(function(t,o){s[o]=function(e,t){return function(){return e(t)}}(t,e),Object.defineProperty(e.getters,o,{get:function(){return e._vm[o]},enumerable:!0})}));var a=l.config.silent;l.config.silent=!0,e._vm=new l({data:{$$state:t},computed:s}),l.config.silent=a,e.strict&&function(e){e._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}(e),n&&(o&&e._withCommit((function(){n._data.$$state=null})),l.nextTick((function(){return n.$destroy()})))}function p(e,t,o,n,i){var r=!o.length,s=e._modules.getNamespace(o);if(n.namespaced&&(e._modulesNamespaceMap[s]=n),!r&&!i){var a=f(t,o.slice(0,-1)),u=o[o.length-1];e._withCommit((function(){l.set(a,u,n.state)}))}var c=n.context=function(e,t,o){var n=""===t,i={dispatch:n?e.dispatch:function(o,n,i){var r=m(o,n,i),s=r.payload,a=r.options,l=r.type;return a&&a.root||(l=t+l),e.dispatch(l,s)},commit:n?e.commit:function(o,n,i){var r=m(o,n,i),s=r.payload,a=r.options,l=r.type;a&&a.root||(l=t+l),e.commit(l,s,a)}};return Object.defineProperties(i,{getters:{get:n?function(){return e.getters}:function(){return function(e,t){var o={},n=t.length;return Object.keys(e.getters).forEach((function(i){if(i.slice(0,n)===t){var r=i.slice(n);Object.defineProperty(o,r,{get:function(){return e.getters[i]},enumerable:!0})}})),o}(e,t)}},state:{get:function(){return f(e.state,o)}}}),i}(e,s,o);n.forEachMutation((function(t,o){!function(e,t,o,n){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){o.call(e,n.state,t)}))}(e,s+o,t,c)})),n.forEachAction((function(t,o){var n=t.root?o:s+o,i=t.handler||t;!function(e,t,o,n){(e._actions[t]||(e._actions[t]=[])).push((function(t,i){var r,s=o.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},t,i);return(r=s)&&"function"==typeof r.then||(s=Promise.resolve(s)),e._devtoolHook?s.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):s}))}(e,n,i,c)})),n.forEachGetter((function(t,o){!function(e,t,o,n){if(e._wrappedGetters[t])return void 0;e._wrappedGetters[t]=function(e){return o(n.state,n.getters,e.state,e.getters)}}(e,s+o,t,c)})),n.forEachChild((function(n,r){p(e,t,o.concat(r),n,i)}))}function f(e,t){return t.length?t.reduce((function(e,t){return e[t]}),e):e}function m(e,t,o){var n;return null!==(n=e)&&"object"==typeof n&&e.type&&(o=t,t=e,e=e.type),{type:e,payload:t,options:o}}function _(e){l&&e===l|| +var n=Object.freeze({});function i(e){return null==e}function r(e){return null!=e}function s(e){return!0===e}function a(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function l(e){return null!==e&&"object"==typeof e}var u=Object.prototype.toString;function c(e){return"[object Object]"===u.call(e)}function h(e){return"[object RegExp]"===u.call(e)}function d(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function g(e){return r(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function p(e){return null==e?"":Array.isArray(e)||c(e)&&e.toString===u?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function m(e,t){for(var o=Object.create(null),n=e.split(","),i=0;i-1)return e.splice(o,1)}}var v=Object.prototype.hasOwnProperty;function b(e,t){return v.call(e,t)}function E(e){var t=Object.create(null);return function(o){return t[o]||(t[o]=e(o))}}var C=/-(\w)/g,S=E((function(e){return e.replace(C,(function(e,t){return t?t.toUpperCase():""}))})),T=E((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),w=/\B([A-Z])/g,k=E((function(e){return e.replace(w,"-$1").toLowerCase()}));var O=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function o(o){var n=arguments.length;return n?n>1?e.apply(t,arguments):e.call(t,o):e.call(t)}return o._length=e.length,o};function R(e,t){t=t||0;for(var o=e.length-t,n=new Array(o);o--;)n[o]=e[o+t];return n}function N(e,t){for(var o in t)e[o]=t[o];return e}function L(e){for(var t={},o=0;o0,Z=q&&q.indexOf("edge/")>0,Q=(q&&q.indexOf("android"),q&&/iphone|ipad|ipod|ios/.test(q)||"ios"===X),ee=(q&&/chrome\/\d+/.test(q),q&&/phantomjs/.test(q),q&&q.match(/firefox\/(\d+)/)),te={}.watch,oe=!1;if(K)try{var ne={};Object.defineProperty(ne,"passive",{get:function(){oe=!0}}),window.addEventListener("test-passive",null,ne)}catch(e){}var ie=function(){return void 0===G&&(G=!K&&!Y&&void 0!==e&&(e.process&&"server"===e.process.env.VUE_ENV)),G},re=K&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function se(e){return"function"==typeof e&&/native code/.test(e.toString())}var ae,le="undefined"!=typeof Symbol&&se(Symbol)&&"undefined"!=typeof Reflect&&se(Reflect.ownKeys);ae="undefined"!=typeof Set&&se(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ue=I,ce=0,he=function(){this.id=ce++,this.subs=[]};he.prototype.addSub=function(e){this.subs.push(e)},he.prototype.removeSub=function(e){y(this.subs,e)},he.prototype.depend=function(){he.target&&he.target.addDep(this)},he.prototype.notify=function(){var e=this.subs.slice();for(var t=0,o=e.length;t-1)if(r&&!b(i,"default"))s=!1;else if(""===s||s===k(e)){var l=Ve(String,i.type);(l<0||a0&&(ct((u=e(u,(o||"")+"_"+l))[0])&&ct(h)&&(n[c]=ye(h.text+u[0].text),u.shift()),n.push.apply(n,u)):a(u)?ct(h)?n[c]=ye(h.text+u):""!==u&&n.push(ye(u)):ct(u)&&ct(h)?n[c]=ye(h.text+u.text):(s(t._isVList)&&r(u.tag)&&i(u.key)&&r(o)&&(u.key="__vlist"+o+"_"+l+"__"),n.push(u)));return n}(e):void 0}function ct(e){return r(e)&&r(e.text)&&!1===e.isComment}function ht(e,t){if(e){for(var o=Object.create(null),n=le?Reflect.ownKeys(e):Object.keys(e),i=0;i0,s=e?!!e.$stable:!r,a=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(s&&o&&o!==n&&a===o.$key&&!r&&!o.$hasNormal)return o;for(var l in i={},e)e[l]&&"$"!==l[0]&&(i[l]=ft(t,l,e[l]))}else i={};for(var u in t)u in i||(i[u]=mt(t,u));return e&&Object.isExtensible(e)&&(e._normalized=i),W(i,"$stable",s),W(i,"$key",a),W(i,"$hasNormal",r),i}function ft(e,t,o){var n=function(){var e=arguments.length?o.apply(null,arguments):o({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ut(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return o.proxy&&Object.defineProperty(e,t,{get:n,enumerable:!0,configurable:!0}),n}function mt(e,t){return function(){return e[t]}}function _t(e,t){var o,n,i,s,a;if(Array.isArray(e)||"string"==typeof e)for(o=new Array(e.length),n=0,i=e.length;ndocument.createEvent("Event").timeStamp&&(uo=function(){return co.now()})}function ho(){var e,t;for(lo=uo(),so=!0,oo.sort((function(e,t){return e.id-t.id})),ao=0;aoao&&oo[o].id>e.id;)o--;oo.splice(o+1,0,e)}else oo.push(e);ro||(ro=!0,tt(ho))}}(this)},po.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||l(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){We(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},po.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},po.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},po.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var fo={enumerable:!0,configurable:!0,get:I,set:I};function mo(e,t,o){fo.get=function(){return this[t][o]},fo.set=function(e){this[t][o]=e},Object.defineProperty(e,o,fo)}function _o(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var o=e.$options.propsData||{},n=e._props={},i=e.$options._propKeys=[];e.$parent&&Te(!1);var r=function(r){i.push(r);var s=Fe(r,t,o,e);Oe(n,r,s),r in e||mo(e,"_props",r)};for(var s in t)r(s);Te(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var o in t)e[o]="function"!=typeof t[o]?I:O(t[o],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;c(t=e._data="function"==typeof t?function(e,t){ge();try{return e.call(t,t)}catch(e){return We(e,t,"data()"),{}}finally{pe()}}(t,e):t||{})||(t={});var o=Object.keys(t),n=e.$options.props,i=(e.$options.methods,o.length);for(;i--;){var r=o[i];0,n&&b(n,r)||(s=void 0,36!==(s=(r+"").charCodeAt(0))&&95!==s&&mo(e,"_data",r))}var s;ke(t,!0)}(e):ke(e._data={},!0),t.computed&&function(e,t){var o=e._computedWatchers=Object.create(null),n=ie();for(var i in t){var r=t[i],s="function"==typeof r?r:r.get;0,n||(o[i]=new po(e,s||I,I,yo)),i in e||vo(e,i,r)}}(e,t.computed),t.watch&&t.watch!==te&&function(e,t){for(var o in t){var n=t[o];if(Array.isArray(n))for(var i=0;i-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!h(e)&&e.test(t)}function No(e,t){var o=e.cache,n=e.keys,i=e._vnode;for(var r in o){var s=o[r];if(s){var a=Oo(s.componentOptions);a&&!t(a)&&Lo(o,r,n,i)}}}function Lo(e,t,o,n){var i=e[t];!i||n&&i.tag===n.tag||i.componentInstance.$destroy(),e[t]=null,y(o,t)}!function(e){e.prototype._init=function(e){var t=this;t._uid=So++,t._isVue=!0,e&&e._isComponent?function(e,t){var o=e.$options=Object.create(e.constructor.options),n=t._parentVnode;o.parent=t.parent,o._parentVnode=n;var i=n.componentOptions;o.propsData=i.propsData,o._parentListeners=i.listeners,o._renderChildren=i.children,o._componentTag=i.tag,t.render&&(o.render=t.render,o.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=xe(To(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,o=t.parent;if(o&&!t.abstract){for(;o.$options.abstract&&o.$parent;)o=o.$parent;o.$children.push(e)}e.$parent=o,e.$root=o?o.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&$t(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,o=e.$vnode=t._parentVnode,i=o&&o.context;e.$slots=dt(t._renderChildren,i),e.$scopedSlots=n,e._c=function(t,o,n,i){return Vt(e,t,o,n,i,!1)},e.$createElement=function(t,o,n,i){return Vt(e,t,o,n,i,!0)};var r=o&&o.data;Oe(e,"$attrs",r&&r.attrs||n,null,!0),Oe(e,"$listeners",t._parentListeners||n,null,!0)}(t),to(t,"beforeCreate"),function(e){var t=ht(e.$options.inject,e);t&&(Te(!1),Object.keys(t).forEach((function(o){Oe(e,o,t[o])})),Te(!0))}(t),_o(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),to(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(wo),function(e){var t={get:function(){return this._data}},o={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",o),e.prototype.$set=Re,e.prototype.$delete=Ne,e.prototype.$watch=function(e,t,o){if(c(t))return Co(this,e,t,o);(o=o||{}).user=!0;var n=new po(this,e,t,o);if(o.immediate)try{t.call(this,n.value)}catch(e){We(e,this,'callback for immediate watcher "'+n.expression+'"')}return function(){n.teardown()}}}(wo),function(e){var t=/^hook:/;e.prototype.$on=function(e,o){var n=this;if(Array.isArray(e))for(var i=0,r=e.length;i1?R(o):o;for(var n=R(arguments,1),i='event handler for "'+e+'"',r=0,s=o.length;rparseInt(this.max)&&Lo(s,a[0],a,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return U}};Object.defineProperty(e,"config",t),e.util={warn:ue,extend:N,mergeOptions:xe,defineReactive:Oe},e.set=Re,e.delete=Ne,e.nextTick=tt,e.observable=function(e){return ke(e),e},e.options=Object.create(null),F.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,N(e.options.components,Do),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var o=R(arguments,1);return o.unshift(this),"function"==typeof e.install?e.install.apply(e,o):"function"==typeof e&&e.apply(null,o),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=xe(this.options,e),this}}(e),ko(e),function(e){F.forEach((function(t){e[t]=function(e,o){return o?("component"===t&&c(o)&&(o.name=o.name||e,o=this.options._base.extend(o)),"directive"===t&&"function"==typeof o&&(o={bind:o,update:o}),this.options[t+"s"][e]=o,o):this.options[t+"s"][e]}}))}(e)}(wo),Object.defineProperty(wo.prototype,"$isServer",{get:ie}),Object.defineProperty(wo.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(wo,"FunctionalRenderContext",{value:Dt}),wo.version="2.6.10";var Ao=m("style,class"),Po=m("input,textarea,option,select,progress"),Mo=m("contenteditable,draggable,spellcheck"),xo=m("events,caret,typing,plaintext-only"),Bo=function(e,t){return Wo(t)||"false"===t?"false":"contenteditable"===e&&xo(t)?t:"true"},Fo=m("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ho="http://www.w3.org/1999/xlink",Uo=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Vo=function(e){return Uo(e)?e.slice(6,e.length):""},Wo=function(e){return null==e||!1===e};function jo(e){for(var t=e.data,o=e,n=e;r(n.componentInstance);)(n=n.componentInstance._vnode)&&n.data&&(t=Go(n.data,t));for(;r(o=o.parent);)o&&o.data&&(t=Go(t,o.data));return function(e,t){if(r(e)||r(t))return zo(e,Ko(t));return""}(t.staticClass,t.class)}function Go(e,t){return{staticClass:zo(e.staticClass,t.staticClass),class:r(e.class)?[e.class,t.class]:t.class}}function zo(e,t){return e?t?e+" "+t:e:t||""}function Ko(e){return Array.isArray(e)?function(e){for(var t,o="",n=0,i=e.length;n-1?mn(e,t,o):Fo(t)?Wo(o)?e.removeAttribute(t):(o="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,o)):Mo(t)?e.setAttribute(t,Bo(t,o)):Uo(t)?Wo(o)?e.removeAttributeNS(Ho,Vo(t)):e.setAttributeNS(Ho,t,o):mn(e,t,o)}function mn(e,t,o){if(Wo(o))e.removeAttribute(t);else{if($&&!J&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==o&&!e.__ieph){var n=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",n)};e.addEventListener("input",n),e.__ieph=!0}e.setAttribute(t,o)}}var _n={create:pn,update:pn};function yn(e,t){var o=t.elm,n=t.data,s=e.data;if(!(i(n.staticClass)&&i(n.class)&&(i(s)||i(s.staticClass)&&i(s.class)))){var a=jo(t),l=o._transitionClasses;r(l)&&(a=zo(a,Ko(l))),a!==o._prevClass&&(o.setAttribute("class",a),o._prevClass=a)}}var vn,bn={create:yn,update:yn},En="__r",Cn="__c";function Sn(e,t,o){var n=vn;return function i(){var r=t.apply(null,arguments);null!==r&&kn(e,i,o,n)}}var Tn=Ye&&!(ee&&Number(ee[1])<=53);function wn(e,t,o,n){if(Tn){var i=lo,r=t;t=r._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return r.apply(this,arguments)}}vn.addEventListener(e,t,oe?{capture:o,passive:n}:o)}function kn(e,t,o,n){(n||vn).removeEventListener(e,t._wrapper||t,o)}function On(e,t){if(!i(e.data.on)||!i(t.data.on)){var o=t.data.on||{},n=e.data.on||{};vn=t.elm,function(e){if(r(e[En])){var t=$?"change":"input";e[t]=[].concat(e[En],e[t]||[]),delete e[En]}r(e[Cn])&&(e.change=[].concat(e[Cn],e.change||[]),delete e[Cn])}(o),st(o,n,wn,kn,Sn,t.context),vn=void 0}}var Rn,Nn={create:On,update:On};function Ln(e,t){if(!i(e.data.domProps)||!i(t.data.domProps)){var o,n,s=t.elm,a=e.data.domProps||{},l=t.data.domProps||{};for(o in r(l.__ob__)&&(l=t.data.domProps=N({},l)),a)o in l||(s[o]="");for(o in l){if(n=l[o],"textContent"===o||"innerHTML"===o){if(t.children&&(t.children.length=0),n===a[o])continue;1===s.childNodes.length&&s.removeChild(s.childNodes[0])}if("value"===o&&"PROGRESS"!==s.tagName){s._value=n;var u=i(n)?"":String(n);In(s,u)&&(s.value=u)}else if("innerHTML"===o&&qo(s.tagName)&&i(s.innerHTML)){(Rn=Rn||document.createElement("div")).innerHTML=""+n+"";for(var c=Rn.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;c.firstChild;)s.appendChild(c.firstChild)}else if(n!==a[o])try{s[o]=n}catch(e){}}}}function In(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var o=!0;try{o=document.activeElement!==e}catch(e){}return o&&e.value!==t}(e,t)||function(e,t){var o=e.value,n=e._vModifiers;if(r(n)){if(n.number)return f(o)!==f(t);if(n.trim)return o.trim()!==t.trim()}return o!==t}(e,t))}var Dn={create:Ln,update:Ln},An=E((function(e){var t={},o=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var n=e.split(o);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}));function Pn(e){var t=Mn(e.style);return e.staticStyle?N(e.staticStyle,t):t}function Mn(e){return Array.isArray(e)?L(e):"string"==typeof e?An(e):e}var xn,Bn=/^--/,Fn=/\s*!important$/,Hn=function(e,t,o){if(Bn.test(t))e.style.setProperty(t,o);else if(Fn.test(o))e.style.setProperty(k(t),o.replace(Fn,""),"important");else{var n=Vn(t);if(Array.isArray(o))for(var i=0,r=o.length;i-1?t.split(Gn).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var o=" "+(e.getAttribute("class")||"")+" ";o.indexOf(" "+t+" ")<0&&e.setAttribute("class",(o+t).trim())}}function Kn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Gn).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var o=" "+(e.getAttribute("class")||"")+" ",n=" "+t+" ";o.indexOf(n)>=0;)o=o.replace(n," ");(o=o.trim())?e.setAttribute("class",o):e.removeAttribute("class")}}function Yn(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&N(t,Xn(e.name||"v")),N(t,e),t}return"string"==typeof e?Xn(e):void 0}}var Xn=E((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),qn=K&&!J,$n="transition",Jn="animation",Zn="transition",Qn="transitionend",ei="animation",ti="animationend";qn&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Zn="WebkitTransition",Qn="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ei="WebkitAnimation",ti="webkitAnimationEnd"));var oi=K?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function ni(e){oi((function(){oi(e)}))}function ii(e,t){var o=e._transitionClasses||(e._transitionClasses=[]);o.indexOf(t)<0&&(o.push(t),zn(e,t))}function ri(e,t){e._transitionClasses&&y(e._transitionClasses,t),Kn(e,t)}function si(e,t,o){var n=li(e,t),i=n.type,r=n.timeout,s=n.propCount;if(!i)return o();var a=i===$n?Qn:ti,l=0,u=function(){e.removeEventListener(a,c),o()},c=function(t){t.target===e&&++l>=s&&u()};setTimeout((function(){l0&&(o=$n,c=s,h=r.length):t===Jn?u>0&&(o=Jn,c=u,h=l.length):h=(o=(c=Math.max(s,u))>0?s>u?$n:Jn:null)?o===$n?r.length:l.length:0,{type:o,timeout:c,propCount:h,hasTransform:o===$n&&ai.test(n[Zn+"Property"])}}function ui(e,t){for(;e.length1}function fi(e,t){!0!==t.data.show&&hi(t)}var mi=function(e){var t,o,n={},l=e.modules,u=e.nodeOps;for(t=0;tp?v(e,i(o[_+1])?null:o[_+1].elm,o,g,_,n):g>_&&E(0,t,d,p)}(d,m,_,o,c):r(_)?(r(e.text)&&u.setTextContent(d,""),v(d,null,_,0,_.length-1,o)):r(m)?E(0,m,0,m.length-1):r(e.text)&&u.setTextContent(d,""):e.text!==t.text&&u.setTextContent(d,t.text),r(p)&&r(g=p.hook)&&r(g=g.postpatch)&&g(e,t)}}}function w(e,t,o){if(s(o)&&r(e.parent))e.parent.data.pendingInsert=t;else for(var n=0;n-1,s.selected!==r&&(s.selected=r);else if(P(Ei(s),n))return void(e.selectedIndex!==a&&(e.selectedIndex=a));i||(e.selectedIndex=-1)}}function bi(e,t){return t.every((function(t){return!P(t,e)}))}function Ei(e){return"_value"in e?e._value:e.value}function Ci(e){e.target.composing=!0}function Si(e){e.target.composing&&(e.target.composing=!1,Ti(e.target,"input"))}function Ti(e,t){var o=document.createEvent("HTMLEvents");o.initEvent(t,!0,!0),e.dispatchEvent(o)}function wi(e){return!e.componentInstance||e.data&&e.data.transition?e:wi(e.componentInstance._vnode)}var ki={model:_i,show:{bind:function(e,t,o){var n=t.value,i=(o=wi(o)).data&&o.data.transition,r=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;n&&i?(o.data.show=!0,hi(o,(function(){e.style.display=r}))):e.style.display=n?r:"none"},update:function(e,t,o){var n=t.value;!n!=!t.oldValue&&((o=wi(o)).data&&o.data.transition?(o.data.show=!0,n?hi(o,(function(){e.style.display=e.__vOriginalDisplay})):di(o,(function(){e.style.display="none"}))):e.style.display=n?e.__vOriginalDisplay:"none")},unbind:function(e,t,o,n,i){i||(e.style.display=e.__vOriginalDisplay)}}},Oi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Ri(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Ri(Kt(t.children)):e}function Ni(e){var t={},o=e.$options;for(var n in o.propsData)t[n]=e[n];var i=o._parentListeners;for(var r in i)t[S(r)]=i[r];return t}function Li(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var Ii=function(e){return e.tag||zt(e)},Di=function(e){return"show"===e.name},Ai={name:"transition",props:Oi,abstract:!0,render:function(e){var t=this,o=this.$slots.default;if(o&&(o=o.filter(Ii)).length){0;var n=this.mode;0;var i=o[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var r=Ri(i);if(!r)return i;if(this._leaving)return Li(e,i);var s="__transition-"+this._uid+"-";r.key=null==r.key?r.isComment?s+"comment":s+r.tag:a(r.key)?0===String(r.key).indexOf(s)?r.key:s+r.key:r.key;var l=(r.data||(r.data={})).transition=Ni(this),u=this._vnode,c=Ri(u);if(r.data.directives&&r.data.directives.some(Di)&&(r.data.show=!0),c&&c.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(r,c)&&!zt(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var h=c.data.transition=N({},l);if("out-in"===n)return this._leaving=!0,at(h,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),Li(e,i);if("in-out"===n){if(zt(r))return u;var d,g=function(){d()};at(l,"afterEnter",g),at(l,"enterCancelled",g),at(h,"delayLeave",(function(e){d=e}))}}return i}}},Pi=N({tag:String,moveClass:String},Oi);function Mi(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function xi(e){e.data.newPos=e.elm.getBoundingClientRect()}function Bi(e){var t=e.data.pos,o=e.data.newPos,n=t.left-o.left,i=t.top-o.top;if(n||i){e.data.moved=!0;var r=e.elm.style;r.transform=r.WebkitTransform="translate("+n+"px,"+i+"px)",r.transitionDuration="0s"}}delete Pi.mode;var Fi={Transition:Ai,TransitionGroup:{props:Pi,beforeMount:function(){var e=this,t=this._update;this._update=function(o,n){var i=Zt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,o,n)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",o=Object.create(null),n=this.prevChildren=this.children,i=this.$slots.default||[],r=this.children=[],s=Ni(this),a=0;a-1?Jo[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Jo[e]=/HTMLUnknownElement/.test(t.toString())},N(wo.options.directives,ki),N(wo.options.components,Fi),wo.prototype.__patch__=K?mi:I,wo.prototype.$mount=function(e,t){return function(e,t,o){var n;return e.$el=t,e.$options.render||(e.$options.render=_e),to(e,"beforeMount"),n=function(){e._update(e._render(),o)},new po(e,n,I,{before:function(){e._isMounted&&!e._isDestroyed&&to(e,"beforeUpdate")}},!0),o=!1,null==e.$vnode&&(e._isMounted=!0,to(e,"mounted")),e}(this,e=e&&K?function(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}(e):void 0,t)},K&&setTimeout((function(){U.devtools&&re&&re.emit("init",wo)}),0),t.a=wo}).call(this,o(80),o(148).setImmediate)},function(e,t,o){"use strict";var n=o(44),i=function(){function e(e){e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((function(e){return new n.b(e)})):e.brackets?this._autoClosingPairs=e.brackets.map((function(e){return new n.b({open:e[0],close:e[1]})})):this._autoClosingPairs=[],this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.shouldAutoClosePair=function(e,t,o){if(0===t.getTokenCount())return!0;for(var n=t.findTokenIndexAtOffset(o-2),i=t.getStandardTokenType(n),r=0;r1&&!!e.close})).map((function(e){return new n.b(e)})),o.docComment&&this._complexAutoClosePairs.push(new n.b({open:o.docComment.open,close:o.docComment.close}))}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,o=this._richEditBrackets.brackets.length;t=0))return{appendText:s.close}}}return null},e}(),l=o(13),u=o(8),c=function(){function e(t){(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=t.brackets.map((function(t){return{open:t[0],openRegExp:e._createOpenBracketRegExp(t[0]),close:t[1],closeRegExp:e._createCloseBracketRegExp(t[1])}})),this._regExpRules=t.regExpRules||[]}return e.prototype.onEnter=function(e,t,o){for(var i=0,r=this._regExpRules.length;i0&&o.length>0)for(i=0,r=this._brackets.length;i0)for(i=0,r=this._brackets.length;i1){var i=t-1,r=-1;for(i=t-1;i>=1;i--){if(e.getLanguageIdAtPosition(i,0)!==n)return r;var s=e.getLineContent(i);if(!o.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return i;r=i}}return-1},e.prototype.getInheritIndentForLine=function(e,t,o){void 0===o&&(o=!0);var i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);if(!i)return null;if(t<=1)return{indentation:"",action:null};var r=this.getPrecedingValidLine(e,t,i);if(r<0)return null;if(r<1)return{indentation:"",action:null};var s=e.getLineContent(r);if(i.shouldIncrease(s)||i.shouldIndentNextLine(s))return{indentation:u.getLeadingWhitespace(s),action:n.a.Indent,line:r};if(i.shouldDecrease(s))return{indentation:u.getLeadingWhitespace(s),action:null,line:r};if(1===r)return{indentation:u.getLeadingWhitespace(e.getLineContent(r)),action:null,line:r};var a=r-1,l=i.getIndentMetadata(e.getLineContent(a));if(!(3&l)&&4&l){for(var c=0,h=a-1;h>0;h--)if(!i.shouldIndentNextLine(e.getLineContent(h))){c=h;break}return{indentation:u.getLeadingWhitespace(e.getLineContent(c+1)),action:null,line:c+1}}if(o)return{indentation:u.getLeadingWhitespace(e.getLineContent(r)),action:null,line:r};for(h=r;h>0;h--){var d=e.getLineContent(h);if(i.shouldIncrease(d))return{indentation:u.getLeadingWhitespace(d),action:n.a.Indent,line:h};if(i.shouldIndentNextLine(d)){c=0;for(var g=h-1;g>0;g--)if(!i.shouldIndentNextLine(e.getLineContent(h))){c=g;break}return{indentation:u.getLeadingWhitespace(e.getLineContent(c+1)),action:null,line:c+1}}if(i.shouldDecrease(d))return{indentation:u.getLeadingWhitespace(d),action:null,line:h}}return{indentation:u.getLeadingWhitespace(e.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,o,i){var r=this.getIndentRulesSupport(t);if(!r)return null;var s=this.getInheritIndentForLine(e,o),a=e.getLineContent(o);if(s){var c=s.line;if(void 0!==c){var h=this._getOnEnterSupport(t),d=null;try{d=h.onEnter("",e.getLineContent(c),"")}catch(e){Object(l.e)(e)}if(d){var g=u.getLeadingWhitespace(e.getLineContent(c));return d.removeText&&(g=g.substring(0,g.length-d.removeText)),d.indentAction===n.a.Indent||d.indentAction===n.a.IndentOutdent?g=i.shiftIndent(g):d.indentAction===n.a.Outdent&&(g=i.unshiftIndent(g)),r.shouldDecrease(a)&&(g=i.unshiftIndent(g)),d.appendText&&(g+=d.appendText),u.getLeadingWhitespace(g)}}return r.shouldDecrease(a)?s.action===n.a.Indent?s.indentation:i.unshiftIndent(s.indentation):s.action===n.a.Indent?i.shiftIndent(s.indentation):s.indentation}return null},e.prototype.getIndentForEnter=function(e,t,o,i){e.forceTokenization(t.startLineNumber);var s,a,l=e.getLineTokens(t.startLineNumber),c=Object(r.a)(l,t.startColumn-1),h=c.getLineContent(),d=!1;(c.firstCharOffset>0&&l.getLanguageId(0)!==c.languageId?(d=!0,s=h.substr(0,t.startColumn-1-c.firstCharOffset)):s=l.getLineContent().substring(0,t.startColumn-1),t.isEmpty())?a=h.substr(t.startColumn-1-c.firstCharOffset):a=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-c.firstCharOffset);var g=this.getIndentRulesSupport(c.languageId);if(!g)return null;var p=s,f=u.getLeadingWhitespace(s);if(!i&&!d){var m=this.getInheritIndentForLine(e,t.startLineNumber);g.shouldDecrease(s)&&m&&(f=m.indentation,m.action!==n.a.Indent&&(f=o.unshiftIndent(f))),p=f+u.ltrim(u.ltrim(s," "),"\t")}var _={getLineTokens:function(t){return e.getLineTokens(t)},getLanguageIdentifier:function(){return e.getLanguageIdentifier()},getLanguageIdAtPosition:function(t,o){return e.getLanguageIdAtPosition(t,o)},getLineContent:function(o){return o===t.startLineNumber?p:e.getLineContent(o)}},y=u.getLeadingWhitespace(l.getLineContent()),v=this.getInheritIndentForLine(_,t.startLineNumber+1);if(!v){var b=d?y:f;return{beforeEnter:b,afterEnter:b}}var E=d?y:v.indentation;return v.action===n.a.Indent&&(E=o.shiftIndent(E)),g.shouldDecrease(a)&&(E=o.unshiftIndent(E)),{beforeEnter:d?y:f,afterEnter:E}},e.prototype.getIndentActionForType=function(e,t,o,i){var r=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),s=this.getIndentRulesSupport(r.languageId);if(!s)return null;var a,l=r.getLineContent(),u=l.substr(0,t.startColumn-1-r.firstCharOffset);t.isEmpty()?a=l.substr(t.startColumn-1-r.firstCharOffset):a=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-r.firstCharOffset);if(!s.shouldDecrease(u+a)&&s.shouldDecrease(u+o+a)){var c=this.getInheritIndentForLine(e,t.startLineNumber,!1);if(!c)return null;var h=c.indentation;return c.action!==n.a.Indent&&(h=i.unshiftIndent(h)),h}return null},e.prototype.getIndentMetadata=function(e,t){var o=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return o?t<1||t>e.getLineCount()?null:o.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,o){var n=this.getEnterAction(e,new f.a(t,o,t,o));return n?n.enterAction:null},e.prototype.getEnterAction=function(e,t){var o=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),i=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this._getOnEnterSupport(i.languageId);if(!r)return null;var s,a=i.getLineContent(),u=a.substr(0,t.startColumn-1-i.firstCharOffset);t.isEmpty()?s=a.substr(t.startColumn-1-i.firstCharOffset):s=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-i.firstCharOffset);var c=t.startLineNumber,h="";if(c>1&&0===i.firstCharOffset){var d=this.getScopedLineTokens(e,c-1);d.languageId===i.languageId&&(h=d.getLineContent())}var g=null;try{g=r.onEnter(h,u,s)}catch(e){Object(l.e)(e)}return g?(g.appendText||(g.indentAction===n.a.Indent||g.indentAction===n.a.IndentOutdent?g.appendText="\t":g.appendText=""),g.removeText&&(o=o.substring(0,o.length-g.removeText)),{enterAction:g,indentation:o}):null},e.prototype.getIndentationAtPosition=function(e,t,o){var n=e.getLineContent(t),i=u.getLeadingWhitespace(n);return i.length>o-1&&(i=i.substring(0,o-1)),i},e.prototype.getScopedLineTokens=function(e,t,o){e.forceTokenization(t);var n=e.getLineTokens(t),i=isNaN(o)?e.getLineMaxColumn(t)-1:o-1;return Object(r.a)(n,i)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null},e}())},function(e,t,o){"use strict";var n,i,r=o(15),s=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),a=/^\w[\w\d+.-]*$/,l=/^\//,u=/^\/\//;var c="",h="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function e(e,t,o,n,i){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=e||c,this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,o||c),this.query=n||c,this.fragment=i||c,function(e){if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.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(u.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 y(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,o=e.authority,n=e.path,i=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===o?o=this.authority:null===o&&(o=c),void 0===n?n=this.path:null===n&&(n=c),void 0===i?i=this.query:null===i&&(i=c),void 0===r?r=this.fragment:null===r&&(r=c),t===this.scheme&&o===this.authority&&n===this.path&&i===this.query&&r===this.fragment?this:new p(t,o,n,i,r)},e.parse=function(e){var t=d.exec(e);return t?new p(t[2]||c,decodeURIComponent(t[4]||c),decodeURIComponent(t[5]||c),decodeURIComponent(t[7]||c),decodeURIComponent(t[9]||c)):new p(c,c,c,c,c)},e.file=function(e){var t=c;if(r.g&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var o=e.indexOf(h,2);-1===o?(t=e.substring(2),e=h):(t=e.substring(2,o),e=e.substring(o)||h)}return new p("file",t,e,c,c)},e.from=function(e){return new p(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),v(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var o=new p(t);return o._fsPath=t.fsPath,o._formatted=t.external,o}return t},e}();t.a=g;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return s(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=y(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?v(this,!0):(this._formatted||(this._formatted=v(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}(g),f=((i={})[58]="%3A",i[47]="%2F",i[63]="%3F",i[35]="%23",i[91]="%5B",i[93]="%5D",i[64]="%40",i[33]="%21",i[36]="%24",i[38]="%26",i[39]="%27",i[40]="%28",i[41]="%29",i[42]="%2A",i[43]="%2B",i[44]="%2C",i[59]="%3B",i[61]="%3D",i[32]="%20",i);function m(e,t){for(var o=void 0,n=-1,i=0;i=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==n&&(o+=encodeURIComponent(e.substring(n,i)),n=-1),void 0!==o&&(o+=e.charAt(i));else{void 0===o&&(o=e.substr(0,i));var s=f[r];void 0!==s?(-1!==n&&(o+=encodeURIComponent(e.substring(n,i)),n=-1),o+=s):-1===n&&(n=i)}}return-1!==n&&(o+=encodeURIComponent(e.substring(n))),void 0!==o?o:e}function _(e){for(var t=void 0,o=0;o1&&"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,r.g&&(t=t.replace(/\//g,"\\")),t}function v(e,t){var o=t?_:m,n="",i=e.scheme,r=e.authority,s=e.path,a=e.query,l=e.fragment;if(i&&(n+=i,n+=":"),(r||"file"===i)&&(n+=h,n+=h),r){var u=r.indexOf("@");if(-1!==u){var c=r.substr(0,u);r=r.substr(u+1),-1===(u=c.indexOf(":"))?n+=o(c,!1):(n+=o(c.substr(0,u),!1),n+=":",n+=o(c.substr(u+1),!1)),n+="@"}-1===(u=(r=r.toLowerCase()).indexOf(":"))?n+=o(r,!1):(n+=o(r.substr(0,u),!1),n+=r.substr(u))}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))}n+=o(s,!0)}return a&&(n+="?",n+=o(a,!1)),l&&(n+="#",n+=t?l:m(l,!1)),n}},function(e,t,o){"use strict";o.d(t,"a",(function(){return v}));o(436);var n,i=o(21),r=o(6),s=o(8),a=o(76),l=o(1),u=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),c="_msDataKey";function h(e){return e[c]||(e[c]={}),e[c]}function d(e){return!!e[c]}var g=function(){function e(e,t){this.offdom=t,this.container=e,this.currentElement=e,this.createdElements=[],this.toDispose={},this.captureToDispose={}}return e.prototype.clone=function(){var t=new e(this.container,this.offdom);return t.currentElement=this.currentElement,t.createdElements=this.createdElements,t.captureToDispose=this.captureToDispose,t.toDispose=this.toDispose,t},e.prototype.build=function(t,o){a.a(this.offdom,"This builder was not created off-dom, so build() can not be called."),t?t instanceof e&&(t=t.getHTMLElement()):t=this.container,a.a(t,"Builder can only be build() with a container provided."),a.a(l.C(t),"The container must either be a HTMLElement or a Builder.");var n,r,s=t,u=s.childNodes;if(i.f(o)&&o=0){var o=e.split("-");e=o[0];for(var n=1;n=0){var t=e.split("-");e=t[0];for(var o=1;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},c=function(e,t){return function(o,n){t(o,n,e)}};function h(e){return void 0!==e.command}var d=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}(),g=Object(r.c)("menuService"),p=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.appendMenuItem=function(e,t){var o=e.id,n=this._menuItems[o];return n?n.push(t):this._menuItems[o]=n=[t],{dispose:function(){var e=n.indexOf(t);e>=0&&n.splice(e,1)}}},e.prototype.getMenuItems=function(e){var t=e.id,o=this._menuItems[t]||[];return t===d.CommandPalette.id&&this._appendImplicitItems(o),o},e.prototype._appendImplicitItems=function(e){for(var t=new Set,o=0,n=e.filter((function(e){return h(e)}));o>>0)>>>0}function u(e,t){if(0===e)return null;var o=(65535&e)>>>0,n=(4294901760&e)>>>16;return 0!==n?new d(c(o,t),c(n,t)):c(o,t)}function c(e,t){var o=!!(2048&e),n=!!(256&e);return new h(2===t?n:o,!!(1024&e),!!(512&e),2===t?o:n,255&e)}!function(){function e(e,t,o,n){void 0===o&&(o=t),void 0===n&&(n=o),r.define(e,t),s.define(e,o),a.define(e,n)}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 r.keyCodeToStr(e)},e.fromString=function(e){return r.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return a.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||a.strToKeyCode(e)}}(n||(n={}));var h=function(){function e(e,t,o,n,i){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=o,this.metaKey=n,this.keyCode=i}return e.prototype.equals=function(e){return 1===e.type&&(this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode)},e.prototype.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}(),d=function(e,t){this.type=2,this.firstPart=e,this.chordPart=t},g=function(e,t,o,n,i,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=o,this.metaKey=n,this.keyLabel=i,this.keyAriaLabel=r},p=function(){}},function(e,t,o){"use strict";o.d(t,"i",(function(){return r})),o.d(t,"g",(function(){return s})),o.d(t,"b",(function(){return a})),o.d(t,"a",(function(){return l})),o.d(t,"c",(function(){return u})),o.d(t,"h",(function(){return d})),o.d(t,"f",(function(){return p})),o.d(t,"e",(function(){return f})),o.d(t,"d",(function(){return m}));var n=o(15),i=o(8),r="/",s=n.g?"\\":"/";function a(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");if(0===t)return".";if(0==~t)return e[0];if(~t==e.length-1)return a(e.substring(0,e.length-1));var o=e.substring(0,~t);return n.g&&":"===o[o.length-1]&&(o+=s),o}function l(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?l(e.substring(0,e.length-1)):e.substr(1+~t)}function u(e){var t=~(e=l(e)).lastIndexOf(".");return t?e.substring(~t):""}var c=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,h=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;function d(e,t){if(null==e)return e;var o=e.length;if(0===o)return".";var i=n.g&&t;if(function(e,t){return t?!h.test(e):!c.test(e)}(e,i))return e;for(var r=i?"\\":"/",s=function(e,t){void 0===t&&(t="/");if(!e)return"";var o=e.length,n=e.charCodeAt(0);if(47===n||92===n){if((47===(n=e.charCodeAt(1))||92===n)&&47!==(n=e.charCodeAt(2))&&92!==n){for(var i=3,r=i;i=65&&n<=90||n>=97&&n<=122)&&58===e.charCodeAt(1))return 47===(n=e.charCodeAt(2))||92===n?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://");if(-1!==s)for(s+=3;s0)&&".."!==f&&(u=-1===p?"":u.slice(0,p),l=!0)}else g(e,a,d,".")&&(s||u||d0){var n=e.charCodeAt(e.length-1);if(47!==n&&92!==n){var i=o.charCodeAt(0);47!==i&&92!==i&&(e+=r)}}e+=o}return d(e)};function f(e,t,o,n){if(void 0===n&&(n=s),e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(o){if(!Object(i.startsWithIgnoreCase)(e,t))return!1;if(t.length===e.length)return!0;var r=t.length;return t.charAt(t.length-1)===n&&r--,e.charAt(r)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function m(e){return n.g?function(e){if(!e)return!1;var t=e.charCodeAt(0);if(47===t||92===t)return!0;if((t>=65&&t<=90||t>=97&&t<=122)&&e.length>2&&58===e.charCodeAt(1)){var o=e.charCodeAt(2);if(47===o||92===o)return!0}return!1}(e):function(e){return e&&47===e.charCodeAt(0)}(e)}},function(e,t,o){"use strict";o.d(t,"b",(function(){return l})),o.d(t,"a",(function(){return u})),o.d(t,"c",(function(){return c}));var n,i=o(15),r=o(24),s=o(173),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(){function e(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);var t=s.a.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}return e.prototype.preventDefault=function(){this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}(),u=function(e){function t(t){var o=e.call(this,t)||this;return o.dataTransfer=t.dataTransfer,o}return a(t,e),t}(l),c=function(){function e(e,t,o){if(void 0===t&&(t=0),void 0===o&&(o=0),this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=o,this.deltaX=t,e){var n=e,s=e;void 0!==n.wheelDeltaY?this.deltaY=n.wheelDeltaY/120:void 0!==s.VERTICAL_AXIS&&s.axis===s.VERTICAL_AXIS&&(this.deltaY=-s.detail/3),void 0!==n.wheelDeltaX?r.m&&i.g?this.deltaX=-n.wheelDeltaX/120:this.deltaX=n.wheelDeltaX/120:void 0!==s.HORIZONTAL_AXIS&&s.axis===s.HORIZONTAL_AXIS&&(this.deltaX=-e.detail/3),0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"a",(function(){return u}));var n,i,r=o(6),s=o(4),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});!function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(i||(i={}));var l=function(){function e(e,t,o,n,i,r){(e|=0)<0&&(e=0),(o|=0)+e>(t|=0)&&(o=t-e),o<0&&(o=0),(n|=0)<0&&(n=0),(r|=0)+n>(i|=0)&&(r=i-n),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=o,this.height=n,this.scrollHeight=i,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,o=this.scrollWidth!==e.scrollWidth,n=this.scrollLeft!==e.scrollLeft,i=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:o,scrollLeftChanged:n,heightChanged:i,scrollHeightChanged:r,scrollTopChanged:s}},e}(),u=function(e){function t(t,o){var n=e.call(this)||this;return n._onScroll=n._register(new s.a),n.onScroll=n._onScroll.event,n._smoothScrollDuration=t,n._scheduleAtNextAnimationFrame=o,n._state=new l(0,0,0,0,0,0),n._smoothScrolling=null,n}return a(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 o=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===o.scrollLeft&&this._smoothScrolling.to.scrollTop===o.scrollTop)return;var n=this._smoothScrolling.combine(this._state,o,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=n}else{o=this._state.withScrollPosition(e);this._smoothScrolling=d.start(this._state,o,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling())}))},t.prototype._performSmoothScrolling=function(){var e=this,t=this._smoothScrolling.tick(),o=this._state.withScrollPosition(t);if(this._setState(o),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}(r.a),c=function(e,t,o){this.scrollLeft=e,this.scrollTop=t,this.isDone=o};function h(e,t){var o=t-e;return function(t){return e+o*(1-function(e){return Math.pow(e,3)}(1-t))}}var d=function(){function e(e,t,o,n){this.from=e,this.to=t,this.duration=n,this._startTime=o,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,o){var n,i,r;if(Math.abs(e-t)>2.5*o){var s=void 0,a=void 0;return e0?(n=t?(n+1)%i:(n+i-1)%i,o.children[n]):(n=o.parent.groups.indexOf(o),t?(n=(n+1)%r,o.parent.groups[n].children[0]):(n=(n+r-1)%r,o.parent.groups[n].children[o.parent.groups[n].children.length-1]))},e.prototype.nearestReference=function(e,t){var o=this._references.map((function(o,n){return{idx:n,prefixLen:a.commonPrefixLength(o.uri.toString(),e.toString()),offsetDist:100*Math.abs(o.range.startLineNumber-t.lineNumber)+Math.abs(o.range.startColumn-t.column)}})).sort((function(e,t){return e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0}))[0];if(o)return this._references[o.idx]},e.prototype.dispose=function(){this._groups=Object(s.d)(this._groups),Object(s.d)(this._disposables),this._disposables.length=0},e._compareReferences=function(e,t){var o=e.uri.toString(),n=t.uri.toString();return on?1:c.a.compareRangesUsingStarts(e.range,t.range)},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var n=o(21),i=o(76),r=new(function(){function e(){this.data={}}return e.prototype.add=function(e,t){i.a(n.h(e)),i.a(n.g(t)),i.a(!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}())},function(e,t,o){"use strict";o.d(t,"b",(function(){return u})),o.d(t,"a",(function(){return c})),o.d(t,"c",(function(){return h}));o(429);var n,i,r,s=o(0),a=o(15),l=o(1);function u(e){(n=document.createElement("div")).className="monaco-aria-container",(i=document.createElement("div")).className="monaco-alert",i.setAttribute("role","alert"),i.setAttribute("aria-atomic","true"),n.appendChild(i),(r=document.createElement("div")).className="monaco-status",r.setAttribute("role","status"),r.setAttribute("aria-atomic","true"),n.appendChild(r),e.appendChild(n)}function c(e){p(i,e)}function h(e){a.d?c(e):p(r,e)}var d=0,g=void 0;function p(e,t){if(n){switch(g===t?d++:(g=t,d=0),d){case 0:break;case 1:t=s.a("repeated","{0} (occurred again)",t);break;default:t=s.a("repeatedNtimes","{0} (occurred {1} times)",t,d)}l.l(e),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}}},function(e,t,o){"use strict";o.d(t,"a",(function(){return u}));var n,i=o(6),r=o(41),s=o(51),a=o(1),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.onclick=function(e,t){this._register(a.g(e,a.d.CLICK,(function(e){return t(new r.b(e))})))},t.prototype.onmousedown=function(e,t){this._register(a.g(e,a.d.MOUSE_DOWN,(function(e){return t(new r.b(e))})))},t.prototype.onmouseover=function(e,t){this._register(a.g(e,a.d.MOUSE_OVER,(function(e){return t(new r.b(e))})))},t.prototype.onnonbubblingmouseout=function(e,t){this._register(a.h(e,(function(e){return t(new r.b(e))})))},t.prototype.onkeydown=function(e,t){this._register(a.g(e,a.d.KEY_DOWN,(function(e){return t(new s.a(e))})))},t.prototype.onkeyup=function(e,t){this._register(a.g(e,a.d.KEY_UP,(function(e){return t(new s.a(e))})))},t.prototype.oninput=function(e,t){this._register(a.g(e,a.d.INPUT,t))},t.prototype.onblur=function(e,t){this._register(a.g(e,a.d.BLUR,t))},t.prototype.onfocus=function(e,t){this._register(a.g(e,a.d.FOCUS,t))},t.prototype.onchange=function(e,t){this._register(a.g(e,a.d.CHANGE,t))},t}(i.a)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(22),i=Object(n.c)("modelService");function r(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},function(e,t,o){"use strict";o.d(t,"b",(function(){return n})),o.d(t,"a",(function(){return r}));var n,i=o(22);!function(e){e[e.Default=1]="Default",e[e.User=2]="User"}(n||(n={}));var r=Object(i.c)("keybindingService")},function(e,t,o){"use strict";var n;o.d(t,"a",(function(){return n})),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"}(n||(n={}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var n=o(20),i=o(9),r=o(2),s=function(e,t,o){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=o},a=function(){function e(){}return e.left=function(e,t,o,i){return i>t.getLineMinColumn(o)?n.a.isLowSurrogate(t,o,i-2)?i-=2:i-=1:o>1&&(o-=1,i=t.getLineMaxColumn(o)),new s(o,i,0)},e.moveLeft=function(t,o,n,i,r){var s,a;if(n.hasSelection()&&!i)s=n.selection.startLineNumber,a=n.selection.startColumn;else{var l=e.left(t,o,n.position.lineNumber,n.position.column-(r-1));s=l.lineNumber,a=l.column}return n.move(i,s,a,0)},e.right=function(e,t,o,i){return ic?(o=c,l?i=t.getLineMaxColumn(o):(i=Math.min(t.getLineMaxColumn(o),i),n.a.isInsideSurrogatePair(t,o,i)&&(i-=1))):(i=n.a.columnFromVisibleColumn2(e,t,o,u),n.a.isInsideSurrogatePair(t,o,i)&&(i-=1)),r=u-n.a.visibleColumnFromColumn(t.getLineContent(o),i,e.tabSize),new s(o,i,r)},e.moveDown=function(t,o,n,i,r){var s,a;n.hasSelection()&&!i?(s=n.selection.endLineNumber,a=n.selection.endColumn):(s=n.position.lineNumber,a=n.position.column);var l=e.down(t,o,s,a,n.leftoverVisibleColumns,r,!0);return n.move(i,l.lineNumber,l.column,l.leftoverVisibleColumns)},e.translateDown=function(t,o,s){var a=s.selection,l=e.down(t,o,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),u=e.down(t,o,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new n.f(new r.a(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new i.a(u.lineNumber,u.column),u.leftoverVisibleColumns)},e.up=function(e,t,o,i,r,a,l){var u=n.a.visibleColumnFromColumn(t.getLineContent(o),i,e.tabSize)+r;return(o-=a)<1?(o=1,l?i=t.getLineMinColumn(o):(i=Math.min(t.getLineMaxColumn(o),i),n.a.isInsideSurrogatePair(t,o,i)&&(i-=1))):(i=n.a.columnFromVisibleColumn2(e,t,o,u),n.a.isInsideSurrogatePair(t,o,i)&&(i-=1)),r=u-n.a.visibleColumnFromColumn(t.getLineContent(o),i,e.tabSize),new s(o,i,r)},e.moveUp=function(t,o,n,i,r){var s,a;n.hasSelection()&&!i?(s=n.selection.startLineNumber,a=n.selection.startColumn):(s=n.position.lineNumber,a=n.position.column);var l=e.up(t,o,s,a,n.leftoverVisibleColumns,r,!0);return n.move(i,l.lineNumber,l.column,l.leftoverVisibleColumns)},e.translateUp=function(t,o,s){var a=s.selection,l=e.up(t,o,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),u=e.up(t,o,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new n.f(new r.a(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new i.a(u.lineNumber,u.column),u.leftoverVisibleColumns)},e.moveToBeginningOfLine=function(e,t,o,n){var i,r=o.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s;return i=o.position.column===a?s:a,o.move(n,r,i,0)},e.moveToEndOfLine=function(e,t,o,n){var i=o.position.lineNumber,r=t.getLineMaxColumn(i);return o.move(n,i,r,0)},e.moveToBeginningOfBuffer=function(e,t,o,n){return o.move(n,1,1,0)},e.moveToEndOfBuffer=function(e,t,o,n){var i=t.getLineCount(),r=t.getLineMaxColumn(i);return o.move(n,i,r,0)},e}()},function(e,t,o){"use strict";var n=o(126),i=o(272),r=o(182),s=o(339),a=o(168);function l(e){return e}function u(e,t){for(var o=0;o1;)try{return c.stringifyByChunk(e,n,o)}catch(e){o=Math.floor(o/2)}return c.stringifyByChar(e)}function d(e,t){for(var o=0;o-1&&t.splice(o,1)}}function d(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var o=e.state;p(e,o,[],e._modules.root,!0),g(e,o,t)}function g(e,t,o){var n=e._vm;e.getters={};var r=e._wrappedGetters,s={};i(r,(function(t,o){s[o]=function(e,t){return function(){return e(t)}}(t,e),Object.defineProperty(e.getters,o,{get:function(){return e._vm[o]},enumerable:!0})}));var a=l.config.silent;l.config.silent=!0,e._vm=new l({data:{$$state:t},computed:s}),l.config.silent=a,e.strict&&function(e){e._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}(e),n&&(o&&e._withCommit((function(){n._data.$$state=null})),l.nextTick((function(){return n.$destroy()})))}function p(e,t,o,n,i){var r=!o.length,s=e._modules.getNamespace(o);if(n.namespaced&&(e._modulesNamespaceMap[s]=n),!r&&!i){var a=f(t,o.slice(0,-1)),u=o[o.length-1];e._withCommit((function(){l.set(a,u,n.state)}))}var c=n.context=function(e,t,o){var n=""===t,i={dispatch:n?e.dispatch:function(o,n,i){var r=m(o,n,i),s=r.payload,a=r.options,l=r.type;return a&&a.root||(l=t+l),e.dispatch(l,s)},commit:n?e.commit:function(o,n,i){var r=m(o,n,i),s=r.payload,a=r.options,l=r.type;a&&a.root||(l=t+l),e.commit(l,s,a)}};return Object.defineProperties(i,{getters:{get:n?function(){return e.getters}:function(){return function(e,t){var o={},n=t.length;return Object.keys(e.getters).forEach((function(i){if(i.slice(0,n)===t){var r=i.slice(n);Object.defineProperty(o,r,{get:function(){return e.getters[i]},enumerable:!0})}})),o}(e,t)}},state:{get:function(){return f(e.state,o)}}}),i}(e,s,o);n.forEachMutation((function(t,o){!function(e,t,o,n){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){o.call(e,n.state,t)}))}(e,s+o,t,c)})),n.forEachAction((function(t,o){var n=t.root?o:s+o,i=t.handler||t;!function(e,t,o,n){(e._actions[t]||(e._actions[t]=[])).push((function(t,i){var r,s=o.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},t,i);return(r=s)&&"function"==typeof r.then||(s=Promise.resolve(s)),e._devtoolHook?s.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):s}))}(e,n,i,c)})),n.forEachGetter((function(t,o){!function(e,t,o,n){if(e._wrappedGetters[t])return void 0;e._wrappedGetters[t]=function(e){return o(n.state,n.getters,e.state,e.getters)}}(e,s+o,t,c)})),n.forEachChild((function(n,r){p(e,t,o.concat(r),n,i)}))}function f(e,t){return t.length?t.reduce((function(e,t){return e[t]}),e):e}function m(e,t,o){var n;return null!==(n=e)&&"object"==typeof n&&e.type&&(o=t,t=e,e=e.type),{type:e,payload:t,options:o}}function _(e){l&&e===l|| /** * vuex v3.1.1 * (c) 2019 Evan You * @license MIT */ -function(e){if(Number(e.version.split(".")[0])>=2)e.mixin({beforeCreate:o});else{var t=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[o].concat(e.init):o,t.call(this,e)}}function o(){var e=this.$options;e.store?this.$store="function"==typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}(l=e)}c.state.get=function(){return this._vm._data.$$state},c.state.set=function(e){0},u.prototype.commit=function(e,t,o){var n=this,i=m(e,t,o),r=i.type,s=i.payload,a=(i.options,{type:r,payload:s}),l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))})),this._subscribers.forEach((function(e){return e(a,n.state)})))},u.prototype.dispatch=function(e,t){var o=this,n=m(e,t),i=n.type,r=n.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.filter((function(e){return e.before})).forEach((function(e){return e.before(s,o.state)}))}catch(e){0}return(a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r)).then((function(e){try{o._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,o.state)}))}catch(e){0}return e}))}},u.prototype.subscribe=function(e){return h(e,this._subscribers)},u.prototype.subscribeAction=function(e){return h("function"==typeof e?{before:e}:e,this._actionSubscribers)},u.prototype.watch=function(e,t,o){var n=this;return this._watcherVM.$watch((function(){return e(n.state,n.getters)}),t,o)},u.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},u.prototype.registerModule=function(e,t,o){void 0===o&&(o={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),p(this,this.state,e,this._modules.get(e),o.preserveState),g(this,this.state)},u.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var o=f(t.state,e.slice(0,-1));l.delete(o,e[e.length-1])})),d(this)},u.prototype.hotUpdate=function(e){this._modules.update(e),d(this,!0)},u.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(u.prototype,c);var y=S((function(e,t){var o={};return C(t).forEach((function(t){var n=t.key,i=t.val;o[n]=function(){var t=this.$store.state,o=this.$store.getters;if(e){var n=T(this.$store,"mapState",e);if(!n)return;t=n.context.state,o=n.context.getters}return"function"==typeof i?i.call(this,t,o):t[i]},o[n].vuex=!0})),o})),v=S((function(e,t){var o={};return C(t).forEach((function(t){var n=t.key,i=t.val;o[n]=function(){for(var t=[],o=arguments.length;o--;)t[o]=arguments[o];var n=this.$store.commit;if(e){var r=T(this.$store,"mapMutations",e);if(!r)return;n=r.context.commit}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}})),o})),b=S((function(e,t){var o={};return C(t).forEach((function(t){var n=t.key,i=t.val;i=e+i,o[n]=function(){if(!e||T(this.$store,"mapGetters",e))return this.$store.getters[i]},o[n].vuex=!0})),o})),E=S((function(e,t){var o={};return C(t).forEach((function(t){var n=t.key,i=t.val;o[n]=function(){for(var t=[],o=arguments.length;o--;)t[o]=arguments[o];var n=this.$store.dispatch;if(e){var r=T(this.$store,"mapActions",e);if(!r)return;n=r.context.dispatch}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}})),o}));function C(e){return Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}}))}function S(e){return function(t,o){return"string"!=typeof t?(o=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,o)}}function T(e,t,o){return e._modulesNamespaceMap[o]}var w={Store:u,install:_,version:"3.1.1",mapState:y,mapMutations:v,mapGetters:b,mapActions:E,createNamespacedHelpers:function(e){return{mapState:y.bind(null,e),mapGetters:b.bind(null,e),mapMutations:v.bind(null,e),mapActions:E.bind(null,e)}}};t.a=w}).call(this,o(80))},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return u}));var n,i=o(25),r=o(6),s=o(1),a=o(94),l=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));var u=function(){function e(){var e=this;this.toDispose=[],this.activeTouches={},this.handle=null,this.targets=[],this.toDispose.push(s.g(document,"touchstart",(function(t){return e.onTouchStart(t)}))),this.toDispose.push(s.g(document,"touchend",(function(t){return e.onTouchEnd(t)}))),this.toDispose.push(s.g(document,"touchmove",(function(t){return e.onTouchMove(t)})))}return e.addTarget=function(t){e.isTouchDevice()&&(e.INSTANCE||(e.INSTANCE=new e),e.INSTANCE.targets.push(t))},e.isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0},e.prototype.dispose=function(){this.handle&&(this.handle.dispose(),Object(r.d)(this.toDispose),this.handle=null)},e.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var o=0,i=e.targetTouches.length;o=e.HOLD_DELAY&&Math.abs(c.initialPageX-i.n(c.rollingPageX))<30&&Math.abs(c.initialPageY-i.n(c.rollingPageY))<30){var d;(d=a.newGestureEvent(n.Contextmenu,c.initialTarget)).pageX=i.n(c.rollingPageX),d.pageY=i.n(c.rollingPageY),a.dispatchEvent(d)}else if(1===r){var g=i.n(c.rollingPageX),p=i.n(c.rollingPageY),f=i.n(c.rollingTimestamps)-c.rollingTimestamps[0],m=g-c.rollingPageX[0],_=p-c.rollingPageY[0],y=a.targets.filter((function(e){return c.initialTarget instanceof Node&&e.contains(c.initialTarget)}));a.inertia(y,o,Math.abs(m)/f,m>0?1:-1,g,Math.abs(_)/f,_>0?1:-1,p)}a.dispatchEvent(a.newGestureEvent(n.End,c.initialTarget)),delete a.activeTouches[u.identifier]},a=this,l=0,u=t.changedTouches.length;l0&&(f=!1,g=r*i*d),l>0&&(f=!1,p=u*l*d);var m=h.newGestureEvent(n.Change);m.translationX=g,m.translationY=p,t.forEach((function(e){return e.dispatchEvent(m)})),f||h.inertia(t,s,i,r,a+g,l,u,c+p)}))},e.prototype.onTouchMove=function(e){for(var t=Date.now(),o=0,r=e.changedTouches.length;o3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(s.pageX),a.rollingPageY.push(s.pageY),a.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",s)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},e.SCROLL_FRICTION=-.005,e.HOLD_DELAY=700,l([a.a],e,"isTouchDevice",null),e}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return c})),o.d(t,"a",(function(){return n}));var n,i=o(20),r=o(9),s=o(2),a=o(63),l=o(107),u=o(21),c=function(){function e(){}return e.addCursorDown=function(e,t,o){for(var n=[],r=0,s=0,l=t.length;sc&&(h=c,d=e.model.getLineMaxColumn(h)),i.d.fromModelState(new i.f(new s.a(l.lineNumber,1,h,d),0,new r.a(h,d),0))}var g=t.modelState.selectionStart.getStartPosition().lineNumber;if(l.lineNumberg){c=e.viewModel.getLineCount();var p=u.lineNumber+1,f=1;return p>c&&(p=c,f=e.viewModel.getLineMaxColumn(p)),i.d.fromViewState(t.viewState.move(t.modelState.hasSelection(),p,f,0))}var m=t.modelState.selectionStart.getEndPosition();return i.d.fromModelState(t.modelState.move(t.modelState.hasSelection(),m.lineNumber,m.column,0))},e.word=function(e,t,o,n){var r=e.model.validatePosition(n);return i.d.fromModelState(l.a.word(e.config,e.model,t.modelState,o,r))},e.cancelSelection=function(e,t){if(!t.modelState.hasSelection())return new i.d(t.modelState,t.viewState);var o=t.viewState.position.lineNumber,n=t.viewState.position.column;return i.d.fromViewState(new i.f(new s.a(o,n,o,n),0,new r.a(o,n),0))},e.moveTo=function(e,t,o,n,s){var a=e.model.validatePosition(n),l=s?e.validateViewPosition(new r.a(s.lineNumber,s.column),a):e.convertModelPositionToViewPosition(a);return i.d.fromViewState(t.viewState.move(o,l.lineNumber,l.column,0))},e.move=function(e,t,o){var n=o.select,i=o.value;switch(o.direction){case 0:return 4===o.unit?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,i);case 1:return 4===o.unit?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,i);case 2:return 2===o.unit?this._moveUpByViewLines(e,t,n,i):this._moveUpByModelLines(e,t,n,i);case 3:return 2===o.unit?this._moveDownByViewLines(e,t,n,i):this._moveDownByModelLines(e,t,n,i);case 4:return this._moveToViewMinColumn(e,t,n);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 6:return this._moveToViewCenterColumn(e,t,n);case 7:return this._moveToViewMaxColumn(e,t,n);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,n);case 9:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._firstLineNumberInRange(e.model,s,i),l=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,n,a,l)];case 11:r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._lastLineNumberInRange(e.model,s,i),l=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,n,a,l)];case 10:r=t[0],s=e.getCompletelyVisibleModelRange(),a=Math.round((s.startLineNumber+s.endLineNumber)/2),l=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,n,a,l)];case 12:for(var u=e.getCompletelyVisibleViewRange(),c=[],h=0,d=t.length;ho.endLineNumber-1&&(r=o.endLineNumber-1),r>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,o,n){var i=(t<<16|o<<0)>>>0;this._data[e]=i,this._absoluteOffsets[e]=n+o},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,o,n){if(0===this.length)return 0;for(var i=(t<<16|n<<0)>>>0,r=0,s=this.length-1;r+1>>1,l=this._data[a];if(l===i)return a;l>i?s=a:r=a}if(r===s)return r;var u=this._data[r],c=this._data[s];if(u===i)return r;if(c===i)return s;var h=e.getPartIndex(u);return n-e.getCharIndex(u)<=(h!==e.getPartIndex(c)?o:e.getCharIndex(c))-n?r:s},e}(),u=function(e,t,o){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=o};function c(e,t){if(0===e.lineContent.length){var o=0,r=" ";if(e.lineDecorations.length>0){for(var a=[],c=0,h=e.lineDecorations.length;c')}return t.appendASCIIString(r),new u(new l(0,0),!1,o)}return function(e,t){var o=e.fontIsMonospace,n=e.containsForeignElements,r=e.lineContent,s=e.len,a=e.isOverflowing,c=e.parts,h=e.tabSize,d=e.containsRTL,g=e.spaceWidth,p=e.renderWhitespace,f=e.renderControlCharacters,m=new l(s+1,c.length),_=0,y=0,v=0,b=0,E=0;t.appendASCIIString("");for(var C=0,S=c.length;C=0;if(v=0,t.appendASCIIString('0&&(D>1?t.write1(8594):t.write1(65515),D--);D>0;)t.write1(160),D--;else t.write1(183);v++}b=R}else{R=0;for(d&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);_0;)t.write1(160),R++,D--;break;case 32:t.write1(160),R++;break;case 60:t.appendASCIIString("<"),R++;break;case 62:t.appendASCIIString(">"),R++;break;case 38:t.appendASCIIString("&"),R++;break;case 0:t.appendASCIIString("�"),R++;break;case 65279:case 8232:t.write1(65533),R++;break;default:i.isFullWidthCharacter(I)&&y++,f&&I<32?(t.write1(9216+I),R++):(t.write1(I),R++)}v++}b=R}t.appendASCIIString("")}m.setPartData(s,c.length-1,v,E),a&&t.appendASCIIString("");return t.appendASCIIString(""),new u(m,d,n)}(function(e){var t,o,r=e.useMonospaceOptimizations,a=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(n[i++]=new s(t,""));for(var r=0,a=e.getCount();r=o){n[i++]=new s(o,u);break}n[i++]=new s(l,u)}}return n}(e.lineTokens,e.fauxIndentLength,o);2!==e.renderWhitespace&&1!==e.renderWhitespace||(l=function(e,t,o,n,r,a,l,u){var c,h=[],d=0,g=0,p=n[g].type,f=n[g].endIndex,m=i.firstNonWhitespaceIndex(e);-1===m?(m=t,c=t):c=i.lastNonWhitespaceIndex(e);for(var _=0,y=0;yc)E=!0;else if(9===b)E=!0;else if(32===b)if(u)if(v)E=!0;else{var C=y+1=a)&&(h[d++]=new s(y,"vs-whitespace"),_%=a):(y===f||E&&y>r)&&(h[d++]=new s(y,p),_%=a),9===b?_=a:i.isFullWidthCharacter(b)?_+=2:_++,v=E,y===f&&(p=n[++g].type,f=n[g].endIndex)}var S=!1;if(v)if(o&&u){var T=t>0?e.charCodeAt(t-1):0,w=t>1?e.charCodeAt(t-2):0;32===T&&32!==w&&9!==w||(S=!0)}else S=!0;return h[d++]=new s(t,S?"vs-whitespace":p),h}(a,o,e.continuesWithWrappedLine,l,e.fauxIndentLength,e.tabSize,r,1===e.renderWhitespace));var u=0;if(e.lineDecorations.length>0){for(var c=0,h=e.lineDecorations.length;ch&&(h=_.startOffset,u[c++]=new s(h,m)),!(_.endOffset+1<=f)){h=f,u[c++]=new s(h,m+" "+_.className);break}h=_.endOffset+1,u[c++]=new s(h,m+" "+_.className),l++}f>h&&(h=f,u[c++]=new s(h,m))}var y=o[o.length-1].endIndex;if(l50){for(var h=l.type,d=Math.ceil(c/50),g=1;g>>0,new i.c(r,o)}},function(e,t,o){"use strict";var n,i=o(4),r=o(6),s=o(15),a=o(24),l=o(131),u=o(132),c=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),h=function(e){function t(t,o){var n=e.call(this)||this;return n.referenceDomElement=t,n.changeCallback=o,n.measureReferenceDomElementToken=-1,n.width=-1,n.height=-1,n.measureReferenceDomElement(!1),n}return c(t,e),t.prototype.dispose=function(){this.stopObserving(),e.prototype.dispose.call(this)},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.startObserving=function(){var e=this;-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval((function(){return e.measureReferenceDomElement(!0)}),100))},t.prototype.stopObserving=function(){-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)},t.prototype.observe=function(e){this.measureReferenceDomElement(!0,e)},t.prototype.measureReferenceDomElement=function(e,t){var o=0,n=0;t?(o=t.width,n=t.height):this.referenceDomElement&&(o=this.referenceDomElement.clientWidth,n=this.referenceDomElement.clientHeight),o=Math.max(5,o),n=Math.max(5,n),this.width===o&&this.height===n||(this.width=o,this.height=n,e&&this.changeCallback())},t}(r.a),d=function(){function e(e,t){this.chr=e,this.type=t,this.width=0}return e.prototype.fulfill=function(e){this.width=e},e}(),g=function(){function e(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}return e.prototype.read=function(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null},e.prototype._createDomElements=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";var o=document.createElement("div");o.style.fontFamily=this._bareFontInfo.fontFamily,o.style.fontWeight=this._bareFontInfo.fontWeight,o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(o);var n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.fontFamily,n.style.fontWeight="bold",n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);var i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.fontFamily,i.style.fontWeight=this._bareFontInfo.fontWeight,i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",i.style.fontStyle="italic",t.appendChild(i);for(var r=[],s=0,a=this._requests.length;s.001){b=!1;break}}var w=a.c()>2e3;return new u.b({zoomLevel:a.d(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:b,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:i.width,spaceWidth:r.width,maxDigitWidth:v},w)},t.INSTANCE=new t,t}(r.a),_=function(e){function t(t,o){void 0===o&&(o=null);var n=e.call(this,t)||this;return n._elementSizeObserver=n._register(new h(o,(function(){return n._onReferenceDomElementSizeChanged()}))),n._register(m.INSTANCE.onDidChange((function(){return n._onCSSBasedConfigurationChanged()}))),n._validatedOptions.automaticLayout&&n._elementSizeObserver.startObserving(),n._register(a.p((function(e){return n._recomputeOptions()}))),n._register(a.o((function(){return n._recomputeOptions()}))),n._recomputeOptions(),n}return p(t,e),t._massageFontFamily=function(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?'"'+e+'"':e},t.applyFontInfoSlow=function(e,o){e.style.fontFamily=t._massageFontFamily(o.fontFamily),e.style.fontWeight=o.fontWeight,e.style.fontSize=o.fontSize+"px",e.style.lineHeight=o.lineHeight+"px",e.style.letterSpacing=o.letterSpacing+"px"},t.applyFontInfo=function(e,o){e.setFontFamily(t._massageFontFamily(o.fontFamily)),e.setFontWeight(o.fontWeight),e.setFontSize(o.fontSize),e.setLineHeight(o.lineHeight),e.setLetterSpacing(o.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 a.k?e+="ie ":a.j?e+="ff ":a.g?e+="edge ":a.m&&(e+="safari "),s.d&&(e+="mac "),e},t.prototype._getEnvConfiguration=function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:a.n||a.j,pixelRatio:a.b(),zoomLevel:a.d(),accessibilitySupport:a.a()}},t.prototype.readConfiguration=function(e){return m.INSTANCE.readConfiguration(e)},t}(l.a)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r})),o.d(t,"c",(function(){return a})),o.d(t,"d",(function(){return u}));var n=o(25),i=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 r(e){return s(e)?!e.value:!Array.isArray(e)||e.every(r)}function s(e){return e instanceof i||!(!e||"object"!=typeof e)&&("string"==typeof e.value&&("boolean"==typeof e.isTrusted||void 0===e.isTrusted))}function a(e,t){return!e&&!t||!(!e||!t)&&(Array.isArray(e)&&Array.isArray(t)?Object(n.e)(e,t,l):!(!s(e)||!s(t))&&l(e,t))}function l(e,t){return e===t||!(!e||!t)&&(e.value===t.value&&e.isTrusted===t.isTrusted)}function u(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}},function(e,t,o){"use strict";o.r(t);var n=o(0),i=o(9),r=o(2),s=o(52),a=o(20),l=o(35),u=o(67),c=o(3),h=function(){function e(){}return e._columnSelect=function(e,t,o,n,s,l){for(var u=Math.abs(s-o)+1,c=o>s,h=n>l,d=nl)continue;if(vn)continue;if(y1&&i--,this.columnSelect(e,t,o.selection,n,i)},e.columnSelectRight=function(e,t,o,n,r){for(var s=0,l=Math.min(o.position.lineNumber,n),u=Math.max(o.position.lineNumber,n),c=l;c<=u;c++){var h=t.getLineMaxColumn(c),d=a.a.visibleColumnFromColumn2(e,t,new i.a(c,h));s=Math.max(s,d)}return rt.getLineCount()&&(i=t.getLineCount()),this.columnSelect(e,t,o.selection,i,r)},e}(),d=o(5),g=o(36),p=o(12),f=o(21),m=o(95),_=o(176),y=o(38);o.d(t,"CoreEditorCommand",(function(){return N})),o.d(t,"EditorScroll_",(function(){return b})),o.d(t,"RevealLine_",(function(){return C})),o.d(t,"CoreNavigationCommands",(function(){return T})),o.d(t,"CoreEditingCommands",(function(){return w}));var v,b,E,C,S,T,w,k,O=(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),R=s.b,L=0,N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){var n=t._getCursors();n&&this.runCoreEditorCommand(n,o||{})},t}(c.c);function I(e){return e.get(g.a).getFocusedCodeEditor()}function D(e){e.register()}(E=b||(b={})).description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!f.g(e))return!1;var t=e;return!(!f.h(t.to)||!f.i(t.by)&&!f.h(t.by)||!f.i(t.value)&&!f.f(t.value)||!f.i(t.revealCursor)&&!f.c(t.revealCursor))}}]},E.RawDirection={Up:"up",Down:"down"},E.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},E.parse=function(e){var t,o;switch(e.to){case E.RawDirection.Up:t=1;break;case E.RawDirection.Down:t=2;break;default:return null}switch(e.by){case E.RawUnit.Line:o=1;break;case E.RawUnit.WrappedLine:o=2;break;case E.RawUnit.Page:o=3;break;case E.RawUnit.HalfPage:o=4;break;default:o=2}return{direction:t,unit:o,value:Math.floor(e.value||1),revealCursor:!!e.revealCursor,select:!!e.select}},(S=C||(C={})).description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!f.g(e))return!1;var t=e;return!(!f.f(t.lineNumber)||!f.i(t.at)&&!f.h(t.at))}}]},S.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"},function(e){var t=function(e){function t(t){var o=e.call(this,t)||this;return o._inSelectionMode=t.inSelectionMode,o}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,l.a.Explicit,[u.b.moveTo(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position,t.viewPosition)]),e.reveal(!0,0,0)},t}(N);e.MoveTo=Object(c.g)(new t({id:"_moveTo",inSelectionMode:!1,precondition:null})),e.MoveToSelect=Object(c.g)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:null}));var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement();var o=this._getColumnSelectResult(e.context,e.getPrimaryCursor(),e.getColumnSelectData(),t);e.setStates(t.source,l.a.Explicit,o.viewStates.map((function(e){return a.d.fromViewState(e)}))),e.setColumnSelectData({toViewLineNumber:o.toLineNumber,toViewVisualColumn:o.toVisualColumn}),e.reveal(!0,o.reversed?1:2,0)},t}(N);e.ColumnSelect=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"columnSelect",precondition:null})||this}return O(t,e),t.prototype._getColumnSelectResult=function(e,t,o,n){var r,s=e.model.validatePosition(n.position);return r=n.viewPosition?e.validateViewPosition(new i.a(n.viewPosition.lineNumber,n.viewPosition.column),s):e.convertModelPositionToViewPosition(s),h.columnSelect(e.config,e.viewModel,t.viewState.selection,r.lineNumber,n.mouseColumn-1)},t}(o))),e.CursorColumnSelectLeft=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectLeft",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:3599,linux:{primary:0}}})||this}return O(t,e),t.prototype._getColumnSelectResult=function(e,t,o,n){return h.columnSelectLeft(e.config,e.viewModel,t.viewState,o.toViewLineNumber,o.toViewVisualColumn)},t}(o))),e.CursorColumnSelectRight=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectRight",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:3601,linux:{primary:0}}})||this}return O(t,e),t.prototype._getColumnSelectResult=function(e,t,o,n){return h.columnSelectRight(e.config,e.viewModel,t.viewState,o.toViewLineNumber,o.toViewVisualColumn)},t}(o)));var n=function(e){function t(t){var o=e.call(this,t)||this;return o._isPaged=t.isPaged,o}return O(t,e),t.prototype._getColumnSelectResult=function(e,t,o,n){return h.columnSelectUp(e.config,e.viewModel,t.viewState,this._isPaged,o.toViewLineNumber,o.toViewVisualColumn)},t}(o);e.CursorColumnSelectUp=Object(c.g)(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Object(c.g)(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:3595,linux:{primary:0}}}));var s=function(e){function t(t){var o=e.call(this,t)||this;return o._isPaged=t.isPaged,o}return O(t,e),t.prototype._getColumnSelectResult=function(e,t,o,n){return h.columnSelectDown(e.config,e.viewModel,t.viewState,this._isPaged,o.toViewLineNumber,o.toViewVisualColumn)},t}(o);e.CursorColumnSelectDown=Object(c.g)(new s({isPaged:!1,id:"cursorColumnSelectDown",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Object(c.g)(new s({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:3596,linux:{primary:0}}}));var g=function(e){function t(){return e.call(this,{id:"cursorMove",precondition:null,description:u.a.description})||this}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){var o=u.a.parse(t);o&&this._runCursorMove(e,t.source,o)},t.prototype._runCursorMove=function(e,t,o){e.context.model.pushStackElement(),e.setStates(t,l.a.Explicit,u.b.move(e.context,e.getAll(),o)),e.reveal(!0,0,0)},t}(N);e.CursorMoveImpl=g,e.CursorMove=Object(c.g)(new g);var p=function(t){function o(e){var o=t.call(this,e)||this;return o._staticArgs=e.args,o}return O(o,t),o.prototype.runCoreEditorCommand=function(t,o){var n=this._staticArgs;-1===this._staticArgs.value&&(n={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.context.config.pageSize}),e.CursorMove._runCursorMove(t,o.source,n)},o}(N);e.CursorLeft=Object(c.g)(new p({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Object(c.g)(new p({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:1039}})),e.CursorRight=Object(c.g)(new p({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Object(c.g)(new p({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:1041}})),e.CursorUp=Object(c.g)(new p({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Object(c.g)(new p({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Object(c.g)(new p({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:11}})),e.CursorPageUpSelect=Object(c.g)(new p({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:1035}})),e.CursorDown=Object(c.g)(new p({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Object(c.g)(new p({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Object(c.g)(new p({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:12}})),e.CursorPageDownSelect=Object(c.g)(new p({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:null,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:1036}})),e.CreateCursor=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"createCursor",precondition:null})||this}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){var o,n=e.context;o=t.wholeLine?u.b.line(n,e.getPrimaryCursor(),!1,t.position,t.viewPosition):u.b.moveTo(n,e.getPrimaryCursor(),!1,t.position,t.viewPosition);var i=e.getAll();if(i.length>1)for(var r=o.modelState?o.modelState.position:null,s=o.viewState?o.viewState.position:null,a=0,c=i.length;ai&&(n=i);var s=new r.a(n,1,n,e.context.model.getLineMaxColumn(n)),a=0;if(o.at)switch(o.at){case C.RawAtArgument.Top:a=3;break;case C.RawAtArgument.Center:a=1;break;case C.RawAtArgument.Bottom:a=4}var l=e.context.convertModelRangeToViewRange(s);e.revealRange(!1,l,a,0)},t}(N))),e.SelectAll=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:null})||this}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,l.a.Explicit,[u.b.selectAll(e.context,e.getPrimaryCursor())])},t}(N))),e.SetSelection=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:null})||this}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,l.a.Explicit,[a.d.fromModelSelection(t.selection)])},t}(N)))}(T||(T={})),(k=w||(w={})).LineBreakInsert=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:d.a.writable,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:null,mac:{primary:301}}})||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){t.pushUndoStop(),t.executeCommands(this.id,m.a.lineBreakInsert(t._getCursorConfiguration(),t.getModel(),t.getSelections()))},t}(c.c))),k.Outdent=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:d.a.writable,kbOpts:{weight:L,kbExpr:p.d.and(d.a.editorTextFocus,d.a.tabDoesNotMoveFocus),primary:1026}})||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){t.pushUndoStop(),t.executeCommands(this.id,m.a.outdent(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(c.c))),k.Tab=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"tab",precondition:d.a.writable,kbOpts:{weight:L,kbExpr:p.d.and(d.a.editorTextFocus,d.a.tabDoesNotMoveFocus),primary:2}})||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){t.pushUndoStop(),t.executeCommands(this.id,m.a.tab(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(c.c))),k.DeleteLeft=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:d.a.writable,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){var n=t._getCursors(),i=_.a.deleteLeft(n.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),r=i[0],s=i[1];r&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(2)},t}(c.c))),k.DeleteRight=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:d.a.writable,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){var n=t._getCursors(),i=_.a.deleteRight(n.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),r=i[0],s=i[1];r&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(3)},t}(c.c)));var A=function(e){function t(t){var o=e.call(this,t)||this;return o._editorHandler=t.editorHandler,o._inputHandler=t.inputHandler,o}return O(t,e),t.prototype.runCommand=function(e,t){var o=I(e);if(o&&o.hasTextFocus())return this._runEditorHandler(o,t);var n=document.activeElement;if(!(n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0)){var i=e.get(g.a).getActiveCodeEditor();return i?(i.focus(),this._runEditorHandler(i,t)):void 0}document.execCommand(this._inputHandler)},t.prototype._runEditorHandler=function(e,t){var o=this._editorHandler;"string"==typeof o?e.trigger("keyboard",o,t):((t=t||{}).source="keyboard",o.runEditorCommand(null,e,t))},t}(c.a),P=function(e){function t(t,o){var n=e.call(this,{id:t,precondition:null})||this;return n._handlerId=o,n}return O(t,e),t.prototype.runCommand=function(e,t){var o=I(e);o&&o.trigger("keyboard",this._handlerId,t)},t}(c.a);function x(e){D(new P("default:"+e,e)),D(new P(e,e))}D(new A({editorHandler:T.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:d.a.textInputFocus,kbOpts:{weight:L,kbExpr:null,primary:2079},menubarOpts:{menuId:y.b.MenubarSelectionMenu,group:"1_basic",title:n.a({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1}})),D(new A({editorHandler:R.Undo,inputHandler:"undo",id:R.Undo,precondition:d.a.writable,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:2104},menubarOpts:{menuId:y.b.MenubarEditMenu,group:"1_do",title:n.a({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1}})),D(new P("default:"+R.Undo,R.Undo)),D(new A({editorHandler:R.Redo,inputHandler:"redo",id:R.Redo,precondition:d.a.writable,kbOpts:{weight:L,kbExpr:d.a.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}},menubarOpts:{menuId:y.b.MenubarEditMenu,group:"1_do",title:n.a({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2}})),D(new P("default:"+R.Redo,R.Redo)),x(R.Type),x(R.ReplacePreviousChar),x(R.CompositionStart),x(R.CompositionEnd),x(R.Paste),x(R.Cut)},function(e,t,o){"use strict";o.d(t,"b",(function(){return u})),o.d(t,"a",(function(){return c}));var n,i=o(6),r=o(1),s=o(173),a=o(41),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function u(e,t){var o=new a.b(t);return o.preventDefault(),{leftButton:o.leftButton,posx:o.posx,posy:o.posy}}var c=function(e){function t(){var t=e.call(this)||this;return t.hooks=[],t.mouseMoveEventMerger=null,t.mouseMoveCallback=null,t.onStopCallback=null,t}return l(t,e),t.prototype.dispose=function(){this.stopMonitoring(!1),e.prototype.dispose.call(this)},t.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this.hooks=Object(i.d)(this.hooks),this.mouseMoveEventMerger=null,this.mouseMoveCallback=null;var t=this.onStopCallback;this.onStopCallback=null,e&&t()}},t.prototype.isMonitoring=function(){return this.hooks.length>0},t.prototype.startMonitoring=function(e,t,o){var n=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=o;for(var i=s.a.getSameOriginWindowChain(),l=0;l=o.actionsList.children.length?(o.actionsList.appendChild(n),o.items.push(r)):(o.actionsList.insertBefore(n,o.actionsList.children[i]),o.items.splice(i,0,r),i++)}))},e.prototype.clear=function(){this.items=a.d(this.items),Object(l.a)(this.actionsList).empty()},e.prototype.isEmpty=function(){return 0===this.items.length},e.prototype.focus=function(e){e&&void 0===this.focusedItem?(this.focusedItem=this.items.length-1,this.focusNext()):this.updateFocus()},e.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()},e.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)},e.prototype.updateFocus=function(e){void 0===this.focusedItem&&this.domNode.focus();for(var t=0;t=0;t--){var o=this._arr[t];if(e.equals(o.keybinding))return o.callback}return null},e}(),c=function(){function e(e){void 0===e&&(e={clickBehavior:n.ON_MOUSE_DOWN,keyboardSupport:!0,openMode:i.SINGLE_CLICK});var t=this;this.options=e,this.downKeyBindingDispatcher=new u,this.upKeyBindingDispatcher=new u,("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,(function(e,o){return t.onUp(e,o)})),this.downKeyBindingDispatcher.set(18,(function(e,o){return t.onDown(e,o)})),this.downKeyBindingDispatcher.set(15,(function(e,o){return t.onLeft(e,o)})),this.downKeyBindingDispatcher.set(17,(function(e,o){return t.onRight(e,o)})),r.d&&(this.downKeyBindingDispatcher.set(2064,(function(e,o){return t.onLeft(e,o)})),this.downKeyBindingDispatcher.set(300,(function(e,o){return t.onDown(e,o)})),this.downKeyBindingDispatcher.set(302,(function(e,o){return t.onUp(e,o)}))),this.downKeyBindingDispatcher.set(11,(function(e,o){return t.onPageUp(e,o)})),this.downKeyBindingDispatcher.set(12,(function(e,o){return t.onPageDown(e,o)})),this.downKeyBindingDispatcher.set(14,(function(e,o){return t.onHome(e,o)})),this.downKeyBindingDispatcher.set(13,(function(e,o){return t.onEnd(e,o)})),this.downKeyBindingDispatcher.set(10,(function(e,o){return t.onSpace(e,o)})),this.downKeyBindingDispatcher.set(9,(function(e,o){return t.onEscape(e,o)})),this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this)))}return e.prototype.onMouseDown=function(e,t,o,i){if(void 0===i&&(i="mouse"),this.options.clickBehavior===n.ON_MOUSE_DOWN&&(o.leftButton||o.middleButton)){if(o.target){if(o.target.tagName&&"input"===o.target.tagName.toLowerCase())return!1;if(a.p(o.target,"scrollbar","monaco-tree"))return!1;if(a.p(o.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,o,i)}return!1},e.prototype.onClick=function(e,t,o){return r.d&&o.ctrlKey?(o.preventDefault(),o.stopPropagation(),!1):(!o.target||!o.target.tagName||"input"!==o.target.tagName.toLowerCase())&&((this.options.clickBehavior!==n.ON_MOUSE_DOWN||!o.leftButton&&!o.middleButton)&&this.onLeftClick(e,t,o))},e.prototype.onLeftClick=function(e,t,o,n){void 0===n&&(n="mouse");var i=o,r={origin:n,originalEvent:o,didClickOnTwistie:this.isClickOnTwistie(i)};e.getInput()===t?(e.clearFocus(r),e.clearSelection(r)):(o&&i.browserEvent&&"mousedown"===i.browserEvent.type&&1===i.browserEvent.detail||o.preventDefault(),o.stopPropagation(),e.domFocus(),e.setSelection([t],r),e.setFocus(t,r),this.shouldToggleExpansion(t,i,n)&&(e.isExpanded(t)?e.collapse(t).done(null,s.e):e.expand(t).done(null,s.e)));return!0},e.prototype.shouldToggleExpansion=function(e,t,o){var n="mouse"===o&&2===t.detail;return this.openOnSingleClick||n||this.isClickOnTwistie(t)},e.prototype.setOpenMode=function(e){this.options.openMode=e},Object.defineProperty(e.prototype,"openOnSingleClick",{get:function(){return this.options.openMode===i.SINGLE_CLICK},enumerable:!0,configurable:!0}),e.prototype.isClickOnTwistie=function(e){var t=e.target;if(!a.z(t,"content"))return!1;var o=window.getComputedStyle(t,":before");if("none"===o.backgroundImage||"none"===o.display)return!1;var n=parseInt(o.width)+parseInt(o.paddingRight);return e.browserEvent.offsetX<=n},e.prototype.onContextMenu=function(e,t,o){return(!o.target||!o.target.tagName||"input"!==o.target.tagName.toLowerCase())&&(o&&(o.preventDefault(),o.stopPropagation()),!1)},e.prototype.onTap=function(e,t,o){var n=o.initialTarget;return(!n||!n.tagName||"input"!==n.tagName.toLowerCase())&&this.onLeftClick(e,t,o,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,o){var n=e.dispatch(o.toKeybinding());return!(!n||!n(t,o))&&(o.preventDefault(),o.stopPropagation(),!0)},e.prototype.onUp=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusPrevious(1,o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onPageUp=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusPreviousPage(o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onDown=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusNext(1,o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onPageDown=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusNextPage(o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onHome=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusFirst(o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onEnd=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusLast(o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onLeft=function(e,t){var o={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(o);else{var n=e.getFocus();e.collapse(n).then((function(t){if(n&&!t)return e.focusParent(o),e.reveal(e.getFocus())})).done(null,s.e)}return!0},e.prototype.onRight=function(e,t){var o={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(o);else{var n=e.getFocus();e.expand(n).then((function(t){if(n&&!t)return e.focusFirstChild(o),e.reveal(e.getFocus())})).done(null,s.e)}return!0},e.prototype.onEnter=function(e,t){var o={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.setSelection([n],o),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var o=e.getFocus();return o&&e.toggleExpansion(o),!0},e.prototype.onEscape=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(o),!0):e.getSelection().length?(e.clearSelection(o),!0):!!e.getFocus()&&(e.clearFocus(o),!0)},e}(),h=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null},e.prototype.onDragStart=function(e,t,o){},e.prototype.onDragOver=function(e,t,o,n){return null},e.prototype.drop=function(e,t,o,n){},e}(),d=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}(),g=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}(),p=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix?"."+this.selectorSuffix:"",o=[];e.listFocusBackground&&o.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: "+e.listFocusBackground+"; }"),e.listFocusForeground&&o.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&o.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listActiveSelectionBackground+"; }"),e.listActiveSelectionForeground&&o.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&o.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: "+e.listFocusAndSelectionBackground+"; }\n\t\t\t"),e.listFocusAndSelectionForeground&&o.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: "+e.listFocusAndSelectionForeground+"; }\n\t\t\t"),e.listInactiveSelectionBackground&&o.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listInactiveSelectionBackground+"; }"),e.listInactiveSelectionForeground&&o.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&o.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&o.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"),e.listDropBackground&&o.push("\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: "+e.listDropBackground+" !important; color: inherit !important; }\n\t\t\t"),e.listFocusOutline&&o.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; background: #000; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t");var n=o.join("\n");n!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=n)},e}()},function(e,t,o){"use strict";function n(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}o.d(t,"a",(function(){return n}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o.d(t,"d",(function(){return c})),o.d(t,"c",(function(){return d})),o.d(t,"e",(function(){return g})),o.d(t,"b",(function(){return p}));var n=o(8),i=o(9),r=o(2),s=o(18),a=o(102),l=function(){function e(e,t,o,n){this.searchString=e,this.isRegex=t,this.matchCase=o,this.wordSeparators=n}return e._isMultilineRegexSource=function(e){if(!e||0===e.length)return!1;for(var t=0,o=e.length;t=o)break;var n=e.charCodeAt(t);if(110===n||114===n)return!0}}return!1},e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var t;t=this.isRegex?e._isMultilineRegexSource(this.searchString):this.searchString.indexOf("\n")>=0;var o=null;try{o=n.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:t,global:!0})}catch(e){return null}if(!o)return null;var i=!this.isRegex&&!t;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new u(o,this.wordSeparators?Object(a.a)(this.wordSeparators):null,i?this.searchString:null)},e}(),u=function(e,t,o){this.regex=e,this.wordSeparators=t,this.simpleSearch=o};function c(e,t,o){if(!o)return new s.e(e,null);for(var n=[],i=0,r=t.length;i>0);t[i]>=e?n=i-1:t[i+1]>=e?(o=i,n=i):o=i+1}return o+1},e}(),d=function(){function e(){}return e.findMatches=function(e,t,o,n,i){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,o,new p(r.wordSeparators,r.regex),n,i):this._doFindMatchesLineByLine(e,o,r,n,i):[]},e._getMultilineMatchRange=function(e,t,o,n,i,s){var a,l,u=0;if(a="\r\n"===e.getEOL()?t+i+(u=n.findLineFeedCountBeforeOffset(i)):t+i,"\r\n"===e.getEOL()){var c=n.findLineFeedCountBeforeOffset(i+s.length)-u;l=a+s.length+c}else l=a+s.length;var h=e.getPositionAt(a),d=e.getPositionAt(l);return new r.a(h.lineNumber,h.column,d.lineNumber,d.column)},e._doFindMatchesMultiline=function(e,t,o,n,i){var r,a=e.getOffsetAt(t.getStartPosition()),l=e.getValueInRange(t,s.c.LF),u="\r\n"===e.getEOL()?new h(l):null,d=[],g=0;for(o.reset(0);r=o.next(l);)if(d[g++]=c(this._getMultilineMatchRange(e,a,l,u,r.index,r[0]),r,n),g>=i)return d;return d},e._doFindMatchesLineByLine=function(e,t,o,n,i){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(o,a,t.startLineNumber,t.startColumn-1,s,r,n,i),r}var l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(o,l,t.startLineNumber,t.startColumn-1,s,r,n,i);for(var u=t.startLineNumber+1;u=u))return i;return i}var y,v=new p(e.wordSeparators,e.regex);v.reset(0);do{if((y=v.next(t))&&(a[i++]=c(new r.a(o,y.index+1+n,o,y.index+1+y[0].length+n),y,l),i>=u))return i}while(y);return i},e.findNextMatch=function(e,t,o,n){var i=t.parseSearchRequest();if(!i)return null;var r=new p(i.wordSeparators,i.regex);return i.regex.multiline?this._doFindNextMatchMultiline(e,o,r,n):this._doFindNextMatchLineByLine(e,o,r,n)},e._doFindNextMatchMultiline=function(e,t,o,n){var a=new i.a(t.lineNumber,1),l=e.getOffsetAt(a),u=e.getLineCount(),d=e.getValueInRange(new r.a(a.lineNumber,a.column,u,e.getLineMaxColumn(u)),s.c.LF),g="\r\n"===e.getEOL()?new h(d):null;o.reset(t.column-1);var p=o.next(d);return p?c(this._getMultilineMatchRange(e,l,d,g,p.index,p[0]),p,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new i.a(1,1),o,n):null},e._doFindNextMatchLineByLine=function(e,t,o,n){var i=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(o,s,r,t.column,n);if(a)return a;for(var l=1;l<=i;l++){var u=(r+l-1)%i,c=e.getLineContent(u+1),h=this._findFirstMatchInLine(o,c,u+1,1,n);if(h)return h}return null},e._findFirstMatchInLine=function(e,t,o,n,i){e.reset(n-1);var s=e.next(t);return s?c(new r.a(o,s.index+1,o,s.index+1+s[0].length),s,i):null},e.findPreviousMatch=function(e,t,o,n){var i=t.parseSearchRequest();if(!i)return null;var r=new p(i.wordSeparators,i.regex);return i.regex.multiline?this._doFindPreviousMatchMultiline(e,o,r,n):this._doFindPreviousMatchLineByLine(e,o,r,n)},e._doFindPreviousMatchMultiline=function(e,t,o,n){var s=this._doFindMatchesMultiline(e,new r.a(1,1,t.lineNumber,t.column),o,n,9990);if(s.length>0)return s[s.length-1];var a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new i.a(a,e.getLineMaxColumn(a)),o,n):null},e._doFindPreviousMatchLineByLine=function(e,t,o,n){var i=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(o,s,r,n);if(a)return a;for(var l=1;l<=i;l++){var u=(i+r-l-1)%i,c=e.getLineContent(u+1),h=this._findLastMatchInLine(o,c,u+1,n);if(h)return h}return null},e._findLastMatchInLine=function(e,t,o,n){var i,s=null;for(e.reset(0);i=e.next(t);)s=c(new r.a(o,i.index+1,o,i.index+1+i[0].length),i,n);return s},e}();function g(e,t,o,n,i){return function(e,t,o,n,i){if(0===n)return!0;var r=t.charCodeAt(n-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(i>0){var s=t.charCodeAt(n);if(0!==e.get(s))return!0}return!1}(e,t,0,n,i)&&function(e,t,o,n,i){if(n+i===o)return!0;var r=t.charCodeAt(n+i);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(i>0){var s=t.charCodeAt(n+i-1);if(0!==e.get(s))return!0}return!1}(e,t,o,n,i)}var p=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,o=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===o)return null;if(!(t=this._searchRegex.exec(e)))return null;var n=t.index,i=t[0].length;if(n===this._prevMatchStartIndex&&i===this._prevMatchLength)return null;if(this._prevMatchStartIndex=n,this._prevMatchLength=i,!this._wordSeparators||g(this._wordSeparators,e,o,n,i))return t}while(t);return null},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"b",(function(){return s}));var n=o(10),i=o(4),r=function(){function e(e,t,o,n,r){void 0===t&&(t=""),void 0===o&&(o=""),void 0===n&&(n=!0),this._onDidChange=new i.a,this._id=e,this._label=t,this._cssClass=o,this._enabled=n,this._actionCallback=r}return e.prototype.dispose=function(){this._onDidChange.dispose()},Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(e){this._setLabel(e)},enumerable:!0,configurable:!0}),e.prototype._setLabel=function(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._tooltip},set:function(e){this._setTooltip(e)},enumerable:!0,configurable:!0}),e.prototype._setTooltip=function(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))},Object.defineProperty(e.prototype,"class",{get:function(){return this._cssClass},set:function(e){this._setClass(e)},enumerable:!0,configurable:!0}),e.prototype._setClass=function(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._setEnabled(e)},enumerable:!0,configurable:!0}),e.prototype._setEnabled=function(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){this._setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radio",{get:function(){return this._radio},set:function(e){this._setRadio(e)},enumerable:!0,configurable:!0}),e.prototype._setChecked=function(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))},e.prototype._setRadio=function(e){this._radio!==e&&(this._radio=e,this._onDidChange.fire({radio:e}))},Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){return void 0!==this._actionCallback?this._actionCallback(e):n.b.as(!0)},e}(),s=function(){function e(){this._onDidBeforeRun=new i.a,this._onDidRun=new i.a}return Object.defineProperty(e.prototype,"onDidRun",{get:function(){return this._onDidRun.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBeforeRun",{get:function(){return this._onDidBeforeRun.event},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){var o=this;return e.enabled?(this._onDidBeforeRun.fire({action:e}),this.runAction(e,t).then((function(t){o._onDidRun.fire({action:e,result:t})}),(function(t){o._onDidRun.fire({action:e,error:t})}))):n.b.as(null)},e.prototype.runAction=function(e,t){var o=t?e.run(t):e.run();return n.b.is(o)?o:n.b.wrap(o)},e.prototype.dispose=function(){this._onDidBeforeRun.dispose(),this._onDidRun.dispose()},e}()},function(e,t,o){"use strict";o.d(t,"d",(function(){return r})),o.d(t,"c",(function(){return c})),o.d(t,"b",(function(){return h})),o.d(t,"a",(function(){return d}));var n,i=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function r(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var s,a=function(){function e(){this._value="",this._pos=0}return e.prototype.reset=function(e){return this._value=e,this._pos=0,this},e.prototype.next=function(){return this._pos+=1,this},e.prototype.hasNext=function(){return this._pos0)o.left||(o.left=new u,o.left.segment=n.value()),o=o.left;else if(i<0)o.right||(o.right=new u,o.right.segment=n.value()),o=o.right;else{if(!n.hasNext())break;n.next(),o.mid||(o.mid=new u,o.mid.segment=n.value()),o=o.mid}}var r=o.value;return o.value=t,o.key=e,r},e.prototype.get=function(e){for(var t=this._iter.reset(e),o=this._root;o;){var n=t.cmp(o.segment);if(n>0)o=o.left;else if(n<0)o=o.right;else{if(!t.hasNext())break;t.next(),o=o.mid}}return o?o.value:void 0},e.prototype.findSubstr=function(e){for(var t,o=this._iter.reset(e),n=this._root;n;){var i=o.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!o.hasNext())break;o.next(),t=n.value||t,n=n.mid}}return n&&n.value||t},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}(),h=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}();!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(s||(s={}));var d=function(e){function t(t,o){void 0===o&&(o=1);var n=e.call(this)||this;return n._limit=t,n._ratio=Math.min(Math.max(0,o),1),n}return i(t,e),t.prototype.get=function(t){return e.prototype.get.call(this,t,s.AsNew)},t.prototype.set=function(t,o){e.prototype.set.call(this,t,o,s.AsNew),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.get=function(e,t){void 0===t&&(t=s.None);var o=this._map.get(e);if(o)return t!==s.None&&this.touch(o,t),o.value},e.prototype.set=function(e,t,o){void 0===o&&(o=s.None);var n=this._map.get(e);if(n)n.value=t,o!==s.None&&this.touch(n,o);else{switch(n={key:e,value:t,next:void 0,previous:void 0},o){case s.None:this.addItemLast(n);break;case s.AsOld:this.addItemFirst(n);break;case s.AsNew:default:this.addItemLast(n)}this._map.set(e,n),this._size++}},e.prototype.forEach=function(e,t){for(var o=this._head;o;)t?e.bind(t)(o.value,o.key,this):e(o.value,o.key,this),o=o.next},e.prototype.trimOld=function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,o=this.size;t&&o>e;)this._map.delete(t.key),t=t.next,o--;this._head=t,this._size=o,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(t===s.AsOld||t===s.AsNew)if(t===s.AsOld){if(e===this._head)return;var o=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(o.previous=n,n.next=o),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===s.AsNew){if(e===this._tail)return;o=e.next,n=e.previous;e===this._head?(o.previous=void 0,this._head=o):(o.previous=n,n.next=o),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,o){e.push([o,t])})),e},e}())},function(e,t){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){"use strict";o(466);var n,i=o(1),r=o(15),s=o(41),a=o(73),l=o(59),u=o(28),c=o(17),h=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),d=11,g=function(e){function t(t){var o=e.call(this)||this;return o._onActivate=t.onActivate,o.bgDomNode=document.createElement("div"),o.bgDomNode.className="arrow-background",o.bgDomNode.style.position="absolute",o.bgDomNode.style.width=t.bgWidth+"px",o.bgDomNode.style.height=t.bgHeight+"px",void 0!==t.top&&(o.bgDomNode.style.top="0px"),void 0!==t.left&&(o.bgDomNode.style.left="0px"),void 0!==t.bottom&&(o.bgDomNode.style.bottom="0px"),void 0!==t.right&&(o.bgDomNode.style.right="0px"),o.domNode=document.createElement("div"),o.domNode.className=t.className,o.domNode.style.position="absolute",o.domNode.style.width=d+"px",o.domNode.style.height=d+"px",void 0!==t.top&&(o.domNode.style.top=t.top+"px"),void 0!==t.left&&(o.domNode.style.left=t.left+"px"),void 0!==t.bottom&&(o.domNode.style.bottom=t.bottom+"px"),void 0!==t.right&&(o.domNode.style.right=t.right+"px"),o._mouseMoveMonitor=o._register(new a.a),o.onmousedown(o.bgDomNode,(function(e){return o._arrowMouseDown(e)})),o.onmousedown(o.domNode,(function(e){return o._arrowMouseDown(e)})),o._mousedownRepeatTimer=o._register(new c.b),o._mousedownScheduleRepeatTimer=o._register(new c.f),o}return h(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(a.b,(function(e){}),(function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()},t}(l.a),p=o(6),f=o(42),m=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),_=function(e){function t(t,o,n){var i=e.call(this)||this;return i._visibility=t,i._visibleClassName=o,i._invisibleClassName=n,i._domNode=null,i._isVisible=!1,i._isNeeded=!1,i._shouldBeVisible=!1,i._revealTimer=i._register(new c.f),i}return m(t,e),t.prototype.applyVisibilitySetting=function(e){return this._visibility!==f.b.Hidden&&(this._visibility===f.b.Visible||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.setClassName(e._visibleClassName)}),0))},t.prototype._hide=function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))},t}(p.a),y=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),v=function(e){function t(t){var o=e.call(this)||this;return o._lazyRender=t.lazyRender,o._host=t.host,o._scrollable=t.scrollable,o._scrollbarState=t.scrollbarState,o._visibilityController=o._register(new _(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),o._mouseMoveMonitor=o._register(new a.a),o._shouldRender=!0,o.domNode=Object(u.b)(document.createElement("div")),o.domNode.setAttribute("role","presentation"),o.domNode.setAttribute("aria-hidden","true"),o._visibilityController.setDomNode(o.domNode),o.domNode.setPosition("absolute"),o.onmousedown(o.domNode.domNode,(function(e){return o._domNodeMouseDown(e)})),o}return y(t,e),t.prototype._createArrow=function(e){var t=this._register(new g(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)},t.prototype._createSlider=function(e,t,o,n){var i=this;this.slider=Object(u.b)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),this.slider.setWidth(o),this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(function(e){e.leftButton&&(e.preventDefault(),i._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,o=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderMousePosition(e);o<=i&&i<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){}))):this._onMouseDown(e)},t.prototype._onMouseDown=function(e){var t,o;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,o=e.browserEvent.offsetY;else{var n=i.u(this.domNode.domNode);t=e.posx-n.left,o=e.posy-n.top}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,o))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){})))},t.prototype._sliderMouseDown=function(e,t){var o=this,n=this._sliderMousePosition(e),i=this._sliderOrthogonalMousePosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(a.b,(function(e){var t=o._sliderOrthogonalMousePosition(e),a=Math.abs(t-i);if(r.g&&a>140)o._setDesiredScrollPositionNow(s.getScrollPosition());else{var l=o._sliderMousePosition(e)-n;o._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(l))}}),(function(){o.slider.toggleClassName("active",!1),o._host.onDragEnd(),t()})),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(l.a),b=function(){function e(e,t,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(o),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,o,n,i){var r=Math.max(0,o-e),s=Math.max(0,r-2*t),a=n>0&&n>o;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var l=Math.round(Math.max(20,Math.floor(o*s/n))),u=(s-l)/(n-o),c=i*u;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:u,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}(),E=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),C=function(e){function t(t,o,n){var i=e.call(this,{lazyRender:o.lazyRender,host:n,scrollbarState:new b(o.horizontalHasArrows?o.arrowSize:0,o.horizontal===f.b.Hidden?0:o.horizontalScrollbarSize,o.vertical===f.b.Hidden?0:o.verticalScrollbarSize),visibility:o.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(o.horizontalHasArrows){var r=(o.arrowSize-d)/2,a=(o.horizontalScrollbarSize-d)/2;i._createArrow({className:"left-arrow",top:a,left:r,bottom:void 0,right:void 0,bgWidth:o.arrowSize,bgHeight:o.horizontalScrollbarSize,onActivate:function(){return i._host.onMouseWheel(new s.c(null,1,0))}}),i._createArrow({className:"right-arrow",top:a,left:void 0,bottom:void 0,right:r,bgWidth:o.arrowSize,bgHeight:o.horizontalScrollbarSize,onActivate:function(){return i._host.onMouseWheel(new s.c(null,-1,0))}})}return i._createSlider(Math.floor((o.horizontalScrollbarSize-o.horizontalSliderSize)/2),0,null,o.horizontalSliderSize),i}return E(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}(v),S=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),T=function(e){function t(t,o,n){var i=e.call(this,{lazyRender:o.lazyRender,host:n,scrollbarState:new b(o.verticalHasArrows?o.arrowSize:0,o.vertical===f.b.Hidden?0:o.verticalScrollbarSize,0),visibility:o.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(o.verticalHasArrows){var r=(o.arrowSize-d)/2,a=(o.verticalScrollbarSize-d)/2;i._createArrow({className:"up-arrow",top:r,left:a,bottom:void 0,right:void 0,bgWidth:o.verticalScrollbarSize,bgHeight:o.arrowSize,onActivate:function(){return i._host.onMouseWheel(new s.c(null,0,1))}}),i._createArrow({className:"down-arrow",top:void 0,left:a,bottom:r,right:void 0,bgWidth:o.verticalScrollbarSize,bgHeight:o.arrowSize,onActivate:function(){return i._host.onMouseWheel(new s.c(null,0,-1))}})}return i._createSlider(0,Math.floor((o.verticalScrollbarSize-o.verticalSliderSize)/2),o.verticalSliderSize,null),i}return S(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}(v),w=o(4);o.d(t,"b",(function(){return N})),o.d(t,"c",(function(){return I})),o.d(t,"a",(function(){return D}));var k=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),O=function(e,t,o){this.timestamp=e,this.deltaX=t,this.deltaY=o,this.score=0},R=function(){function e(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}return e.prototype.isPhysicalMouseWheel=function(){if(-1===this._front&&-1===this._rear)return!1;for(var e=1,t=0,o=1,n=this._rear;;){var i=n===this._front?e:Math.pow(2,-o);if(e-=i,t+=this._memory[n].score*i,n===this._front)break;n=(this._capacity+n-1)%this._capacity,o++}return t<=.5},e.prototype.accept=function(e,t,o){var n=new O(e,t,o);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)},e.prototype._computeScore=function(e){if(Math.abs(e.deltaX)>0&&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}(),L=function(e){function t(t,o,n){var i=e.call(this)||this;i._onScroll=i._register(new w.a),i.onScroll=i._onScroll.event,t.style.overflow="hidden",i._options=A(o),i._scrollable=n,i._register(i._scrollable.onScroll((function(e){i._onDidScroll(e),i._onScroll.fire(e)})));var r={onMouseWheel:function(e){return i._onMouseWheel(e)},onDragStart:function(){return i._onDragStart()},onDragEnd:function(){return i._onDragEnd()}};return i._verticalScrollbar=i._register(new T(i._scrollable,i._options,r)),i._horizontalScrollbar=i._register(new C(i._scrollable,i._options,r)),i._domNode=document.createElement("div"),i._domNode.className="monaco-scrollable-element "+i._options.className,i._domNode.setAttribute("role","presentation"),i._domNode.style.position="relative",i._domNode.style.overflow="hidden",i._domNode.appendChild(t),i._domNode.appendChild(i._horizontalScrollbar.domNode.domNode),i._domNode.appendChild(i._verticalScrollbar.domNode.domNode),i._options.useShadows&&(i._leftShadowDomNode=Object(u.b)(document.createElement("div")),i._leftShadowDomNode.setClassName("shadow"),i._domNode.appendChild(i._leftShadowDomNode.domNode),i._topShadowDomNode=Object(u.b)(document.createElement("div")),i._topShadowDomNode.setClassName("shadow"),i._domNode.appendChild(i._topShadowDomNode.domNode),i._topLeftShadowDomNode=Object(u.b)(document.createElement("div")),i._topLeftShadowDomNode.setClassName("shadow top-left-corner"),i._domNode.appendChild(i._topLeftShadowDomNode.domNode)),i._listenOnDomNode=i._options.listenOnDomNode||i._domNode,i._mouseWheelToDispose=[],i._setListeningToMouseWheel(i._options.handleMouseWheel),i.onmouseover(i._listenOnDomNode,(function(e){return i._onMouseOver(e)})),i.onnonbubblingmouseout(i._listenOnDomNode,(function(e){return i._onMouseOut(e)})),i._hideTimeout=i._register(new c.f),i._isDragging=!1,i._mouseIsOver=!1,i._shouldRender=!0,i._revealOnScroll=!0,i}return k(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=Object(p.d)(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,r.d&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=A(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=Object(p.d)(this._mouseWheelToDispose),e)){var o=function(e){var o=new s.c(e);t._onMouseWheel(o)};this._mouseWheelToDispose.push(i.g(this._listenOnDomNode,"mousewheel",o)),this._mouseWheelToDispose.push(i.g(this._listenOnDomNode,"DOMMouseScroll",o))}},t.prototype._onMouseWheel=function(e){var t,o=R.INSTANCE;if(o.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var n=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(n=(t=[i,n])[0],i=t[1]);var s=!r.d&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||i||(i=n,n=0);var a=this._scrollable.getFutureScrollPosition(),l={};if(n){var u=a.scrollTop-50*n;this._verticalScrollbar.writeScrollPosition(l,u)}if(i){var c=a.scrollLeft-50*i;this._horizontalScrollbar.writeScrollPosition(l,c)}if(l=this._scrollable.validateScrollPosition(l),a.scrollLeft!==l.scrollLeft||a.scrollTop!==l.scrollTop)this._options.mouseWheelSmoothScroll&&o.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),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,o=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(o?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(o?" 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}(l.a),N=function(e){function t(t,o){var n=this;(o=o||{}).mouseWheelSmoothScroll=!1;var r=new f.a(0,(function(e){return i.L(e)}));return(n=e.call(this,t,o,r)||this)._register(r),n}return k(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(L),I=function(e){function t(t,o,n){return e.call(this,t,o,n)||this}return k(t,e),t}(L),D=function(e){function t(t,o){var n=e.call(this,t,o)||this;return n._element=t,n.onScroll((function(e){e.scrollTopChanged&&(n._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(n._element.scrollLeft=e.scrollLeft)})),n.scanDomNode(),n}return k(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}(N);function A(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:f.b.Auto,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:f.b.Auto,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,r.d&&(t.className+=" mac"),t}},function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"b",(function(){return s}));var n=o(10),i=o(22),r=Object(i.c)("openerService"),s=Object.freeze({_serviceBrand:void 0,open:function(){return n.b.as(void 0)}})},function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"a",(function(){return r}));var n=o(22),i=Object(n.c)("contextViewService"),r=Object(n.c)("contextMenuService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var n=o(39),i=o(15),r=o(37),s=o(57),a=new(function(){function e(){this._keybindings=[],this._keybindingsSorted=!0}return e.bindToCurrentPlatform=function(e){if(1===i.a){if(e&&e.win)return e.win}else if(2===i.a){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.prototype.registerKeybindingRule=function(t,o){void 0===o&&(o=0);var r=e.bindToCurrentPlatform(t);if(r&&r.primary&&this._registerDefaultKeybinding(Object(n.f)(r.primary,i.a),t.id,t.weight,0,t.when,o),r&&Array.isArray(r.secondary))for(var s=0,a=r.secondary.length;s=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,o){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 ",o)},e.prototype._registerDefaultKeybinding=function(e,t,o,n,r,s){0===s&&1===i.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:o,weight2:n}),this._keybindingsSorted=!1},e.prototype.getDefaultKeybindings=function(){return this._keybindingsSorted||(this._keybindings.sort(l),this._keybindingsSorted=!0),this._keybindings.slice(0)},e}());function l(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}s.a.add("platform.keybindingsRegistry",a)},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i})),o.d(t,"c",(function(){return r}));var n=function(){function e(e,t,o){this.offset=0|e,this.type=t,this.language=o}return e.prototype.toString=function(){return"("+this.offset+", "+this.type+")"},e}(),i=function(e,t){this.tokens=e,this.endState=t},r=function(e,t){this.tokens=e,this.endState=t}},function(e,t,o){"use strict";function n(e,t){for(var o=e.getCount(),n=e.findTokenIndexAtOffset(t),r=e.getLanguageId(n),s=n;s+10&&e.getLanguageId(a-1)===r;)a--;return new i(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return r}));var i=function(){function e(e,t,o,n,i,r){this._actual=e,this.languageId=t,this._firstTokenIndex=o,this._lastTokenIndex=n,this.firstCharOffset=i,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 r(e){return 0!=(7&e)}},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(11),i=function(){function e(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>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,o){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var n=t<<1,i=n+(o<<1),r=n;r0?this._tokens[e-1<<1]:0},e.prototype.getLanguageId=function(e){var t=this._tokens[1+(e<<1)];return n.x.getLanguageId(t)},e.prototype.getStandardTokenType=function(e){var t=this._tokens[1+(e<<1)];return n.x.getTokenType(t)},e.prototype.getForeground=function(e){var t=this._tokens[1+(e<<1)];return n.x.getForeground(t)},e.prototype.getClassName=function(e){var t=this._tokens[1+(e<<1)];return n.x.getClassNameFromMetadata(t)},e.prototype.getInlineStyle=function(e,t){var o=this._tokens[1+(e<<1)];return n.x.getInlineStyleFromMetadata(o,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,o){return new r(this,e,t,o)},e.convertToEndOffset=function(e,t){for(var o=(e.length>>>1)-1,n=0;n>>1)-1;ot&&(n=i)}return o},e}(),r=function(){function e(e,t,o,n){this._source=e,this._startOffset=t,this._endOffset=o,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(var i=this._firstTokenIndex,r=e.getCount();i=o)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}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return a})),o.d(t,"a",(function(){return l}));var n=o(2),i=o(9),r=o(18),s=o(8),a=function(){function e(e,t,o,n,i){this.value=e,this.selectionStart=t,this.selectionEnd=o,this.selectionStartPosition=n,this.selectionEndPosition=i}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,o){t.setValue(e,this.value),o&&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 o=this.value.substring(this.selectionStart,e);if(-1===o.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,o,1);var n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,o){for(var n=0,i=-1;-1!==(i=t.indexOf("\n",i+1));)n++;return[e,o*t.length,n]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,o,n){if(!e)return{text:"",replaceCharCnt:0};var i=e.value,r=e.selectionStart,a=e.selectionEnd,l=t.value,u=t.selectionStart,c=t.selectionEnd;n&&i.length>0&&r===a&&u===c&&!s.startsWith(l,i)&&s.endsWith(l,i)&&(r=0,a=0);var h=i.substring(a),d=l.substring(c),g=s.commonSuffixLength(h,d);l=l.substring(0,l.length-g);var p=(i=i.substring(0,i.length-g)).substring(0,r),f=l.substring(0,u),m=s.commonPrefixLength(p,f);if(l=l.substring(m),i=i.substring(m),u-=m,r-=m,c-=m,a-=m,o&&u===c&&i.length>0){var _=null;if(u===l.length?s.startsWith(l,i)&&(_=l.substring(i.length)):s.endsWith(l,i)&&(_=l.substring(0,l.length-i.length)),null!==_&&_.length>0&&(/\uFE0F/.test(_)||s.containsEmoji(_)))return{text:_,replaceCharCnt:0}}return u===c?i===l&&0===r&&a===i.length&&u===l.length&&-1===l.indexOf("\n")&&s.containsFullWidthCharacter(l)?{text:"",replaceCharCnt:0}:{text:l,replaceCharCnt:p.length-m}:{text:l,replaceCharCnt:a-r}},e.EMPTY=new e("",0,0,null,null),e}(),l=function(){function e(){}return e._getPageOfLine=function(t){return Math.floor((t-1)/e._LINES_PER_PAGE)},e._getRangeForPage=function(t){var o=t*e._LINES_PER_PAGE,i=o+1,r=o+e._LINES_PER_PAGE;return new n.a(i,1,r+1,1)},e.fromEditorSelection=function(t,o,s,l){var u=e._getPageOfLine(s.startLineNumber),c=e._getRangeForPage(u),h=e._getPageOfLine(s.endLineNumber),d=e._getRangeForPage(h),g=c.intersectRanges(new n.a(1,1,s.startLineNumber,s.startColumn)),p=o.getValueInRange(g,r.c.LF),f=o.getLineCount(),m=o.getLineMaxColumn(f),_=d.intersectRanges(new n.a(s.endLineNumber,s.endColumn,f,m)),y=o.getValueInRange(_,r.c.LF),v=null;if(u===h||u+1===h)v=o.getValueInRange(s,r.c.LF);else{var b=c.intersectRanges(s),E=d.intersectRanges(s);v=o.getValueInRange(b,r.c.LF)+String.fromCharCode(8230)+o.getValueInRange(E,r.c.LF)}if(l){p.length>500&&(p=p.substring(p.length-500,p.length)),y.length>500&&(y=y.substring(0,500)),v.length>1e3&&(v=v.substring(0,500)+String.fromCharCode(8230)+v.substring(v.length-500,v.length))}return new a(p+v+y,p.length,p.length+v.length,new i.a(s.startLineNumber,s.startColumn),new i.a(s.endLineNumber,s.endColumn))},e._LINES_PER_PAGE=10,e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("modeService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(8),i=function(){function e(e,t){if(this.flags=t,0!=(1&this.flags)){var o=e.getModel();this.modelVersionId=o?n.format("{0}#{1}",o.uri.toString(),o.getVersionId()):null}0!=(4&this.flags)&&(this.position=e.getPosition()),0!=(2&this.flags)&&(this.selection=e.getSelection()),0!=(8&this.flags)&&(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop())}return e.prototype._equals=function(t){if(!(t instanceof e))return!1;var o=t;return this.modelVersionId===o.modelVersionId&&(this.scrollLeft===o.scrollLeft&&this.scrollTop===o.scrollTop&&(!(!this.position&&o.position||this.position&&!o.position||this.position&&o.position&&!this.position.equals(o.position))&&!(!this.selection&&o.selection||this.selection&&!o.selection||this.selection&&o.selection&&!this.selection.equalsRange(o.selection))))},e.prototype.validate=function(t){return this._equals(new e(t,this.flags))},e}(),r=function(){function e(e,t){this._visiblePosition=e,this._visiblePositionScrollDelta=t}return e.capture=function(t){var o=null,n=0;if(0!==t.getScrollTop()){var i=t.getVisibleRanges();if(i.length>0){o=i[0].getStartPosition();var r=t.getTopForPosition(o.lineNumber,o.column);n=t.getScrollTop()-r}}return new e(o,n)},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("editorWorkerService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"d",(function(){return i})),o.d(t,"b",(function(){return r})),o.d(t,"c",(function(){return s}));var n=function(){function e(e,t,o){for(var n=new Uint8Array(e*t),i=0,r=e*t;i255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}function s(e){for(var t=e.length,o=new Uint32Array(t),n=0;n=this.el.clientHeight-4&&(s=this.orthogonalEndSash):e.offsetX<=4?s=this.orthogonalStartSash:e.offsetX>=this.el.clientWidth-4&&(s=this.orthogonalEndSash),s&&(o=!0,e.__orthogonalSashEvent=!0,s.onMouseDown(e))}if(this.state){for(var l=0,u=Object(d.v)("iframe");l1){var h=n-1;for(h=n-1;h>=1;h--){var d=o.getLineContent(h);if(a.lastNonWhitespaceIndex(d)>=0)break}if(h<1)return null;var g=o.getLineMaxColumn(h),p=u.a.getEnterAction(o,new s.a(h,g,h,g));p&&(r=p.indentation,(i=p.enterAction)&&(r+=i.appendText))}return i&&(i===c.a.Indent&&(r=e.shiftIndent(t,r)),i===c.a.Outdent&&(r=e.unshiftIndent(t,r)),r=t.normalizeIndentation(r)),r||null},e._replaceJumpToNextIndent=function(e,t,o,n){var s="",a=o.getStartPosition();if(e.insertSpaces)for(var l=r.a.visibleColumnFromColumn2(e,t,a),u=e.tabSize,c=u-l%u,h=0;h=0?l.setEndPosition(l.endLineNumber,Math.max(l.endColumn,L+1)):l.setEndPosition(l.endLineNumber,o.getLineMaxColumn(l.endLineNumber)),n)return new i.d(l,O+t.normalizeIndentation(C.afterEnter),!0);var N=0;return k<=L+1&&(t.insertSpaces||(w=Math.ceil(w/t.tabSize)),N=Math.min(w+1-t.normalizeIndentation(C.afterEnter).length-1,0)),new i.c(l,O+t.normalizeIndentation(C.afterEnter),0,N,!0)}return e._typeCommand(l,"\n"+t.normalizeIndentation(T),n)},e._isAutoIndentType=function(e,t,o){if(!e.autoIndent)return!1;for(var n=0,i=o.length;n1){var d=Object(g.a)(t.wordSeparators),p=h.charCodeAt(c.column-2);if(0===d.get(p))return!1}var f=h.charAt(c.column-1);if(f)if(!e._isBeforeClosingBrace(t,r,f)&&!/\s/.test(f))return!1;if(!o.isCheapToTokenize(c.lineNumber))return!1;o.forceTokenization(c.lineNumber);var m=o.getLineTokens(c.lineNumber),_=!1;try{_=u.a.shouldAutoClosePair(r,m,c.column)}catch(e){Object(n.e)(e)}if(!_)return!1}return!0},e._runAutoClosingOpenCharType=function(e,t,o,n,s){for(var a=[],l=0,u=n.length;l2){var m=Object(g.a)(o.wordSeparators),_=d.charCodeAt(h.column-3);if(0===m.get(_))continue}var y=d.charAt(h.column-1);if(y)if(!e._isBeforeClosingBrace(o,p,y)&&!/\s/.test(y))continue;if(!s.isCheapToTokenize(h.lineNumber))continue;s.forceTokenization(h.lineNumber);var v=s.getLineTokens(h.lineNumber),b=!1;try{b=u.a.shouldAutoClosePair(p,v,h.column-1)}catch(e){Object(n.e)(e)}if(b){var E=o.autoClosingPairsOpen[p];l[c]=new i.c(a[c],E,0,-E.length)}}}return new r.e(1,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})},e.typeWithInterceptors=function(t,o,n,s,a){if("\n"===a){for(var l=[],u=0,c=s.length;u=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},m=function(e,t){return function(o,n){t(o,n,e)}},_=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},y=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1] "+e:e}},e.exports=n},function(e,t,o){"use strict";function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0});const i=o(122);t.ErrorCodes=i.ErrorCodes,t.ResponseError=i.ResponseError,t.CancellationToken=i.CancellationToken,t.CancellationTokenSource=i.CancellationTokenSource,t.Disposable=i.Disposable,t.Event=i.Event,t.Emitter=i.Emitter,t.Trace=i.Trace,t.TraceFormat=i.TraceFormat,t.SetTraceNotification=i.SetTraceNotification,t.LogTraceNotification=i.LogTraceNotification,t.RequestType=i.RequestType,t.RequestType0=i.RequestType0,t.NotificationType=i.NotificationType,t.NotificationType0=i.NotificationType0,t.MessageReader=i.MessageReader,t.MessageWriter=i.MessageWriter,t.ConnectionStrategy=i.ConnectionStrategy,t.StreamMessageReader=i.StreamMessageReader,t.StreamMessageWriter=i.StreamMessageWriter,t.IPCMessageReader=i.IPCMessageReader,t.IPCMessageWriter=i.IPCMessageWriter,t.createClientPipeTransport=i.createClientPipeTransport,t.createServerPipeTransport=i.createServerPipeTransport,t.generateRandomPipeName=i.generateRandomPipeName,t.createClientSocketTransport=i.createClientSocketTransport,t.createServerSocketTransport=i.createServerSocketTransport,n(o(509)),n(o(510)),t.createProtocolConnection=function(e,t,o,n){return i.createMessageConnection(e,t,o,n)}},function(e,t,o){"use strict";o.d(t,"a",(function(){return u}));var n,i=o(116),r=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),s=function(e){function t(t){for(var o=e.call(this,0)||this,n=0,i=t.length;n0&&"#"===o.charAt(o.length-1)?o.substring(0,o.length-1):o)]=t,this._onDidChangeSchema.fire(e)},e}());r.a.add(l,u),o.d(t,"b",(function(){return h})),o.d(t,"a",(function(){return c})),o.d(t,"c",(function(){return C}));var c,h={Configuration:"base.contributions.configuration"};!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(c||(c={}));var d={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},m="vscode://schemas/settings/editor",_=r.a.as(l),y=function(){function e(){this.overrideIdentifiers=[],this._onDidSchemaChange=new i.a,this._onDidRegisterConfiguration=new i.a,this.configurationContributors=[],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.configurationProperties={},this.excludedConfigurationProperties={},this.computeOverridePropertyPattern(),_.registerSchema(m,this.editorConfigurationSchema)}return e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),this.registerConfigurations([e],[],t)},e.prototype.registerConfigurations=function(e,t,o){var n=this;void 0===o&&(o=!0);var i=this.toConfiguration(t);i&&e.push(i);var r=[];e.forEach((function(e){r.push.apply(r,n.validateAndRegisterProperties(e,o)),n.configurationContributors.push(e),n.registerJSONConfiguration(e),n.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:n.a("defaultConfigurations.title","Default Configuration Overrides"),properties:{}},o=0,i=e;o/?";var i=function(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",o=0;o=0||(t+="\\"+n[o]);return t+="\\s]+)",new RegExp(t,"g")}();function r(e){var t=i;if(e&&e instanceof RegExp)if(e.global)t=e;else{var o="g";e.ignoreCase&&(o+="i"),e.multiline&&(o+="m"),t=new RegExp(e.source,o)}return t.lastIndex=0,t}function s(e,t,o,n){t.lastIndex=0;var i=t.exec(o);if(!i)return null;var r=i[0].indexOf(" ")>=0?function(e,t,o,n){var i,r=e-1-n;for(t.lastIndex=0;i=t.exec(o);){if(i.index>r)return null;if(t.lastIndex>=r)return{word:i[0],startColumn:n+1+i.index,endColumn:n+1+t.lastIndex}}return null}(e,t,o,n):function(e,t,o,n){var i,r=e-1-n,s=o.lastIndexOf(" ",r-1)+1,a=o.indexOf(" ",r);for(-1===a&&(a=o.length),t.lastIndex=s;i=t.exec(o);)if(i.index<=r&&t.lastIndex>=r)return{word:i[0],startColumn:n+1+i.index,endColumn:n+1+t.lastIndex};return null}(e,t,o,n);return t.lastIndex=0,r}},function(e,t,o){"use strict";o.d(t,"b",(function(){return s})),o.d(t,"a",(function(){return _}));var n=o(8),i=o(2),r=function(e,t,o,n,i){this.languageIdentifier=e,this.open=t,this.close=o,this.forwardRegex=n,this.reversedRegex=i},s=function(e,t){var o=this;this.brackets=t.map((function(t){return new r(e,t[0],t[1],l({open:t[0],close:t[1]}),u({open:t[0],close:t[1]}))})),this.forwardRegex=c(this.brackets),this.reversedRegex=h(this.brackets),this.textIsBracket={},this.textIsOpenBracket={};var n=0;this.brackets.forEach((function(e){o.textIsBracket[e.open.toLowerCase()]=e,o.textIsBracket[e.close.toLowerCase()]=e,o.textIsOpenBracket[e.open.toLowerCase()]=!0,o.textIsOpenBracket[e.close.toLowerCase()]=!1,n=Math.max(n,e.open.length),n=Math.max(n,e.close.length)})),this.maxBracketLength=n};function a(e,t){var o={};return function(n){var i=e(n);return o.hasOwnProperty(i)||(o[i]=t(n)),o[i]}}var l=a((function(e){return e.open+";"+e.close}),(function(e){return g([e.open,e.close])})),u=a((function(e){return e.open+";"+e.close}),(function(e){return g([m(e.open),m(e.close)])})),c=a((function(e){return e.map((function(e){return e.open+";"+e.close})).join(";")}),(function(e){var t=[];return e.forEach((function(e){t.push(e.open),t.push(e.close)})),g(t)})),h=a((function(e){return e.map((function(e){return e.open+";"+e.close})).join(";")}),(function(e){var t=[];return e.forEach((function(e){t.push(m(e.open)),t.push(m(e.close))})),g(t)}));function d(e){var t=/^[\w]+$/.test(e);return e=n.escapeRegExpCharacters(e),t?"\\b"+e+"\\b":e}function g(e){var t="("+e.map(d).join(")|(")+")";return n.createRegExp(t,!0)}var p,f,m=(p=null,f=null,function(e){return p!==e&&(f=function(e){for(var t="",o=e.length-1;o>=0;o--)t+=e.charAt(o);return t}(p=e)),f}),_=function(){function e(){}return e._findPrevBracketInText=function(e,t,o,n){var r=o.match(e);if(!r)return null;var s=o.length-r.index,a=r[0].length,l=n+s;return new i.a(t,l-a+1,t,l+1)},e.findPrevBracketInToken=function(e,t,o,n,i){var r=m(o).substring(o.length-i,o.length-n);return this._findPrevBracketInText(e,t,r,n)},e.findNextBracketInText=function(e,t,o,n){var r=o.match(e);if(!r)return null;var s=r.index,a=r[0].length;if(0===a)return null;var l=n+s;return new i.a(t,l+1,t,l+1+a)},e.findNextBracketInToken=function(e,t,o,n,i){var r=o.substring(n,i);return this.findNextBracketInText(e,t,r,n)},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return c})),o.d(t,"b",(function(){return g}));var n,i=o(20),r=o(9),s=o(102),a=o(8),l=o(2),u=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),c=function(){function e(){}return e._createWord=function(e,t,o,n,i){return{start:n,end:i,wordType:t,nextCharClass:o}},e._findPreviousWordOnLine=function(e,t,o){var n=t.getLineContent(o.lineNumber);return this._doFindPreviousWordOnLine(n,e,o)},e._doFindPreviousWordOnLine=function(e,t,o){for(var n=0,i=o.column-2;i>=0;i--){var r=e.charCodeAt(i),s=t.get(r);if(0===s){if(2===n)return this._createWord(e,n,s,i+1,this._findEndOfWord(e,t,n,i+1));n=1}else if(2===s){if(1===n)return this._createWord(e,n,s,i+1,this._findEndOfWord(e,t,n,i+1));n=2}else if(1===s&&0!==n)return this._createWord(e,n,s,i+1,this._findEndOfWord(e,t,n,i+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null},e._findEndOfWord=function(e,t,o,n){for(var i=e.length,r=n;r=0;i--){var r=e.charCodeAt(i),s=t.get(r);if(1===s)return i+1;if(1===o&&2===s)return i+1;if(2===o&&0===s)return i+1}return 0},e.moveWordLeft=function(t,o,n,i){var s=n.lineNumber,a=n.column;1===a&&s>1&&(s-=1,a=o.getLineMaxColumn(s));var l=e._findPreviousWordOnLine(t,o,new r.a(s,a));return 0===i?(l&&2===l.wordType&&l.end-l.start==1&&0===l.nextCharClass&&(l=e._findPreviousWordOnLine(t,o,new r.a(s,l.start+1))),a=l?l.start+1:1):(l&&a<=l.end+1&&(l=e._findPreviousWordOnLine(t,o,new r.a(s,l.start+1))),a=l?l.end+1:1),new r.a(s,a)},e.moveWordRight=function(t,o,n,i){var s=n.lineNumber,a=n.column;a===o.getLineMaxColumn(s)&&s=l.start+1&&(l=e._findNextWordOnLine(t,o,new r.a(s,l.end+1))),a=l?l.start+1:o.getLineMaxColumn(s)),new r.a(s,a)},e._deleteWordLeftWhitespace=function(e,t){var o=e.getLineContent(t.lineNumber),n=t.column-2,i=a.lastNonWhitespaceIndex(o,n);return i+11?c=1:(u--,c=o.getLineMaxColumn(u)):(d&&c<=d.end+1&&(d=e._findPreviousWordOnLine(t,o,new r.a(u,d.start+1))),d?c=d.end+1:c>1?c=1:(u--,c=o.getLineMaxColumn(u))),new l.a(u,c,a.lineNumber,a.column)},e._findFirstNonWhitespaceChar=function(e,t){for(var o=e.length,n=t;n=p.start+1&&(p=e._findNextWordOnLine(t,o,new r.a(u,p.end+1))),p?c=p.start+1:c=0;n--){var i=e.charCodeAt(n);if(32===i||9===i||!o&&a.isUpperAsciiLetter(i)||95===i)return n-1;if(o&&n1?new r.a(i-1,t.getLineMaxColumn(i-1)):o;var a=c.moveWordLeft(e,t,o,n),l=h(t.getLineContent(i),s-2),u=new r.a(i,l+2);return u.isBeforeOrEqual(a)?a:u},t.moveWordPartRight=function(e,t,o,n){var i=o.lineNumber,s=o.column;if(s===t.getLineMaxColumn(i))return i1)for(var o=1;o0?[{start:0,end:t.length}]:[]}.bind(void 0,!0);function a(e){return 97<=e&&e<=122}function l(e){return 65<=e&&e<=90}function u(e){return 48<=e&&e<=57}function c(e){return 32===e||9===e||10===e||13===e}function h(e){return a(e)||l(e)||u(e)}function d(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function g(e,t){for(var o=t;o0&&!h(e.charCodeAt(o-1)))return o}return e.length}function p(e,t,o,n){if(o===e.length)return[];if(n===t.length)return null;if(e[o]!==t[n].toLowerCase())return null;var i=null,r=n+1;for(i=p(e,t,o+1,n+1);!i&&(r=g(t,r))60)return null;var o=function(e){for(var t=0,o=0,n=0,i=0,r=0,s=0;s.2&&t<.8&&n>.6&&i<.2}(o)){if(!function(e){var t=e.upperPercent;return 0===e.lowerPercent&&t>.6}(o))return null;t=t.toLowerCase()}var n=null,i=0;for(e=e.toLowerCase();i=0&&(n.push(s),i=s+1)}return[n.length,n]}function E(e){var t,o=[];if(!e)return o;for(var n=0,i=e;n=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:return!0;default:return!1}}function L(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function N(e,t,o,n){var i=e.length>100?100:e.length,r=t.length>100?100:t.length,s=0;for(void 0===o&&(o=i);sr)){for(var a=e.toLowerCase(),l=t.toLowerCase(),u=s,c=0;u1?1:h),p=S[u-1][c]+-1,f=S[u][c-1]+-1;f>=p?f>g?(S[u][c]=f,w[u][c]=4):f===g?(S[u][c]=f,w[u][c]=6):(S[u][c]=g,w[u][c]=2):p>g?(S[u][c]=p,w[u][c]=1):p===g?(S[u][c]=p,w[u][c]=3):(S[u][c]=g,w[u][c]=2)}if(k&&(console.log(O(S,e,i,t,r)),console.log(O(w,e,i,t,r)),console.log(O(T,e,i,t,r))),D=0,A=-100,P=s,x=n,function e(t,o,n,i,r){if(D>=10||n<-25)return;var s=0;for(;t>P&&o>0;){var a=T[t][o],l=w[t][o];if(4===l)o-=1,r?n-=5:i.isEmpty()||(n-=1),r=!1,s=0;else{if(!(2&l))return;if(4&l&&e(t,o-1,i.isEmpty()?n:n-1,i.slice(),r),n+=a,t-=1,o-=1,i.unshift(o),r=!0,1===a){if(s+=1,t===P&&!x)return}else n+=1+s*(a-1),s=0}}n-=o>=3?9:3*o;D+=1;n>A&&(A=n,I=i)}(i,r,i===r?1:0,new M,!1),0!==D)return[A,I.toArray()]}}}var I,D=0,A=0,P=0,x=!1;var M=function(){function e(){}return e.prototype.isEmpty=function(){return!this._data&&(!this._parent||this._parent.isEmpty())},e.prototype.unshift=function(e){this._data?this._data.unshift(e):this._data=[e]},e.prototype.slice=function(){var t=new e;return t._parent=this,t._parentLen=this._data?this._data.length:0,t},e.prototype.toArray=function(){if(!this._data)return this._parent.toArray();for(var e=[],t=this;t;)t._parent&&t._parent._data&&e.push(t._parent._data.slice(t._parent._data.length-t._parentLen)),t=t._parent;return Array.prototype.concat.apply(this._data,e)},e}();function B(e,t,o){return function(e,t,o,n){var i=N(e,t,n);if(i&&!o)return i;if(e.length>=3)for(var r=Math.min(7,e.length-1),s=1;si[0])&&(i=l))}}return i}(e,t,!0,o)}function F(e,t){if(!(t+1>=e.length)){var o=e[t],n=e[t+1];if(o!==n)return e.slice(0,t)+n+o+e.slice(t+2)}}},function(e,t,o){"use strict";o.d(t,"a",(function(){return s})),o.d(t,"b",(function(){return a})),o.d(t,"c",(function(){return l}));var n,i,r=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});!function(e){var t={next:function(){return{done:!0,value:void 0}}};function o(e,t){for(var o=e.next();!o.done;o=e.next())t(o.value)}e.empty=function(){return t},e.iterate=function(e,t,o){return void 0===t&&(t=0),void 0===o&&(o=e.length),{next:function(){return t>=o?{done:!0,value:void 0}:{done:!1,value:e[t++]}}}},e.map=function(e,t){return{next:function(){var o=e.next(),n=o.done,i=o.value;return{done:n,value:n?void 0:t(i)}}}},e.filter=function(e,t){return{next:function(){for(;;){var o=e.next(),n=o.done,i=o.value;if(n)return{done:n,value:void 0};if(t(i))return{done:n,value:i}}}}},e.forEach=o,e.collect=function(e){var t=[];return o(e,(function(e){return t.push(e)})),t}}(i||(i={}));var s=function(){function e(e,t,o,n){void 0===t&&(t=0),void 0===o&&(o=e.length),void 0===n&&(n=t-1),this.items=e,this.start=t,this.end=o,this.index=n}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}(),a=function(e){function t(t,o,n,i){return void 0===o&&(o=0),void 0===n&&(n=t.length),void 0===i&&(i=o-1),e.call(this,t,o,n,i)||this}return r(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}(s),l=function(){function e(e,t){this.iterator=e,this.fn=t}return e.prototype.next=function(){return this.fn(this.iterator.next())},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"c",(function(){return v})),o.d(t,"b",(function(){return E}));o(468);var n,i,r=o(0),s=o(78),a=o(8),l=o(30),u=o(34),c=o(4),h=o(1),d=o(74),g=o(36),p=o(207),f=o(157),m=o(12),_=o(14),y=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function v(e){var t=e.get(g.a).getFocusedCodeEditor();return t instanceof f.a?t.getParentEditor():t}!function(e){e.inPeekEditor=new m.f("inReferenceSearchEditor",!0),e.notInPeekEditor=e.inPeekEditor.toNegated()}(i||(i={}));var b={headerBackgroundColor:_.a.white,primaryHeadingColor:_.a.fromHex("#333333"),secondaryHeadingColor:_.a.fromHex("#6c6c6cb3")},E=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return n._onDidClose=new c.a,l.g(n.options,b,!1),n}return y(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._onDidClose.fire(this)},Object.defineProperty(t.prototype,"onDidClose",{get:function(){return this._onDidClose.event},enumerable:!0,configurable:!0}),t.prototype.style=function(t){var o=this.options;t.headerBackgroundColor&&(o.headerBackgroundColor=t.headerBackgroundColor),t.primaryHeadingColor&&(o.primaryHeadingColor=t.primaryHeadingColor),t.secondaryHeadingColor&&(o.secondaryHeadingColor=t.secondaryHeadingColor),e.prototype.style.call(this,t)},t.prototype._applyStyles=function(){e.prototype._applyStyles.call(this);var t=this.options;this._headElement&&(this._headElement.style.backgroundColor=t.headerBackgroundColor.toString()),this._primaryHeading&&(this._primaryHeading.style.color=t.primaryHeadingColor.toString()),this._secondaryHeading&&(this._secondaryHeading.style.color=t.secondaryHeadingColor.toString()),this._bodyElement&&(this._bodyElement.style.borderColor=t.frameColor.toString())},t.prototype._fillContainer=function(e){this.setCssClass("peekview-widget"),this._headElement=Object(u.a)(".head").getHTMLElement(),this._bodyElement=Object(u.a)(".body").getHTMLElement(),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)},t.prototype._fillHead=function(e){var t=this,o=Object(u.a)(".peekview-title").on(h.d.CLICK,(function(e){return t._onTitleClick(e)})).appendTo(this._headElement).getHTMLElement();this._primaryHeading=Object(u.a)("span.filename").appendTo(o).getHTMLElement(),this._secondaryHeading=Object(u.a)("span.dirname").appendTo(o).getHTMLElement(),this._metaHeading=Object(u.a)("span.meta").appendTo(o).getHTMLElement();var n=Object(u.a)(".peekview-actions").appendTo(this._headElement),i=this._getActionBarOptions();this._actionbarWidget=new d.a(n.getHTMLElement(),i),this._disposables.push(this._actionbarWidget),this._actionbarWidget.push(new s.a("peekview.close",r.a("label.close","Close"),"close-peekview-action",!0,(function(){return t.dispose(),null})),{label:!1,icon:!0})},t.prototype._getActionBarOptions=function(){return{}},t.prototype._onTitleClick=function(e){},t.prototype.setTitle=function(e,t){Object(u.a)(this._primaryHeading).safeInnerHtml(e),this._primaryHeading.setAttribute("aria-label",e),t?Object(u.a)(this._secondaryHeading).safeInnerHtml(t):h.l(this._secondaryHeading)},t.prototype.setMetaTitle=function(e){e?Object(u.a)(this._metaHeading).safeInnerHtml(e):h.l(this._metaHeading)},t.prototype._doLayout=function(e,t){if(!this._isShowing&&e<0)this.dispose();else{var o=Math.ceil(1.2*this.editor.getConfiguration().lineHeight),n=e-(o+2);this._doLayoutHead(o,t),this._doLayoutBody(n,t)}},t.prototype._doLayoutHead=function(e,t){this._headElement.style.height=a.format("{0}px",e),this._headElement.style.lineHeight=this._headElement.style.height},t.prototype._doLayoutBody=function(e,t){this._bodyElement.style.height=a.format("{0}px",e)},t}(p.a)},function(e,t,o){"use strict";o.d(t,"d",(function(){return l})),o.d(t,"b",(function(){return c})),o.d(t,"a",(function(){return h})),o.d(t,"c",(function(){return _}));var n,i,r=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),s=function(){function e(){this.text("")}return e.isDigitCharacter=function(e){return e>=48&&e<=57},e.isVariableCharacter=function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90},e.prototype.text=function(e){this.value=e,this.pos=0},e.prototype.tokenText=function(e){return this.value.substr(e.pos,e.len)},e.prototype.next=function(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};var t,o=this.pos,n=0,i=this.value.charCodeAt(o);if("number"==typeof(t=e._table[i]))return this.pos+=1,{type:t,pos:o,len:1};if(e.isDigitCharacter(i)){t=8;do{n+=1,i=this.value.charCodeAt(o+n)}while(e.isDigitCharacter(i));return this.pos+=n,{type:t,pos:o,len:n}}if(e.isVariableCharacter(i)){t=9;do{i=this.value.charCodeAt(o+ ++n)}while(e.isVariableCharacter(i)||e.isDigitCharacter(i));return this.pos+=n,{type:t,pos:o,len:n}}t=10;do{n+=1,i=this.value.charCodeAt(o+n)}while(!isNaN(i)&&void 0===e._table[i]&&!e.isDigitCharacter(i)&&!e.isVariableCharacter(i));return this.pos+=n,{type:t,pos:o,len:n}},e._table=((i={})[36]=0,i[58]=1,i[44]=2,i[123]=3,i[125]=4,i[92]=5,i[47]=6,i[124]=7,i[43]=11,i[45]=12,i[63]=13,i),e}(),a=function(){function e(){this._children=[]}return e.prototype.appendChild=function(e){return e instanceof l&&this._children[this._children.length-1]instanceof l?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this},e.prototype.replace=function(e,t){var o=e.parent,n=o.children.indexOf(e),i=o.children.slice(0);i.splice.apply(i,[n,1].concat(t)),o._children=i,t.forEach((function(e){return e.parent=o}))},Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snippet",{get:function(){for(var e=this;;){if(!e)return;if(e instanceof m)return e;e=e.parent}},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.children.reduce((function(e,t){return e+t.toString()}),"")},e.prototype.len=function(){return 0},e}(),l=function(e){function t(t){var o=e.call(this)||this;return o.value=t,o}return r(t,e),t.prototype.toString=function(){return this.value},t.prototype.len=function(){return this.value.length},t.prototype.clone=function(){return new t(this.value)},t}(a),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(a),c=function(e){function t(t){var o=e.call(this)||this;return o.index=t,o}return r(t,e),t.compareByIndex=function(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop?-1:e.indext.index?1:0},Object.defineProperty(t.prototype,"isFinalTabstop",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return 1===this._children.length&&this._children[0]instanceof h?this._children[0]:void 0},enumerable:!0,configurable:!0}),t.prototype.clone=function(){var e=new t(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e},t}(u),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=[],t}return r(t,e),t.prototype.appendChild=function(e){return e instanceof l&&(e.parent=this,this.options.push(e)),this},t.prototype.toString=function(){return this.options[0].value},t.prototype.len=function(){return this.options[0].len()},t.prototype.clone=function(){var e=new t;return this.options.forEach(e.appendChild,e),e},t}(a),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.resolve=function(e){var t=this;return e.replace(this.regexp,(function(){for(var e="",o=0,n=t._children;oi.index?arguments[i.index]:"";e+=r=i.resolve(r)}else e+=i.toString()}return e}))},t.prototype.toString=function(){return""},t.prototype.clone=function(){var e=new t;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((function(e){return e.clone()})),e},t}(a),g=function(e){function t(t,o,n,i){var r=e.call(this)||this;return r.index=t,r.shorthandName=o,r.ifValue=n,r.elseValue=i,r}return r(t,e),t.prototype.resolve=function(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue},t.prototype.clone=function(){return new t(this.index,this.shorthandName,this.ifValue,this.elseValue)},t}(a),p=function(e){function t(t){var o=e.call(this)||this;return o.name=t,o}return r(t,e),t.prototype.resolve=function(e){var t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new l(t)],!0)},t.prototype.clone=function(){var e=new t(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e},t}(u);function f(e,t){for(var o=e.slice();o.length>0;){var n=o.shift();if(!t(n))break;o.unshift.apply(o,n.children)}}var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"placeholderInfo",{get:function(){if(!this._placeholders){var e,t=[];this.walk((function(o){return o instanceof c&&(t.push(o),e=!e||e.index0?i.set(e.index,e.children):r.push(e)),!0}));for(var a=0,l=r;a0&&t),!i.has(0)&&o&&n.appendChild(new c(0)),n},e.prototype._accept=function(e,t){if(void 0===e||this._token.type===e){var o=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),o}return!1},e.prototype._backTo=function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1},e.prototype._until=function(e){if(14===this._token.type)return!1;for(var t=this._token;this._token.type!==e;)if(this._token=this._scanner.next(),14===this._token.type)return!1;var o=this._scanner.value.substring(t.pos,this._token.pos);return this._token=this._scanner.next(),o},e.prototype._parse=function(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)},e.prototype._parseEscaped=function(e){var t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new l(t)),!0)},e.prototype._parseTabstopOrVariableName=function(e){var t,o=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new c(Number(t)):new p(t)),!0):this._backTo(o)},e.prototype._parseComplexPlaceholder=function(e){var t,o=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(o);var n=new c(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new l("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(o),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(o);for(var i=new h;;){if(this._parseChoiceElement(i)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(i),this._accept(4)))return e.appendChild(n),!0}return this._backTo(o),!1}}},e.prototype._parseChoiceElement=function(e){for(var t=this._token,o=[];2!==this._token.type&&7!==this._token.type;){var n=void 0;if(!(n=(n=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||n:this._accept(void 0,!0)))return this._backTo(t),!1;o.push(n)}return 0===o.length?(this._backTo(t),!1):(e.appendChild(new l(o.join(""))),!0)},e.prototype._parseComplexVariable=function(e){var t,o=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(o);var n=new p(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(o),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(o);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new l("${"+t+":")),n.children.forEach(e.appendChild,e),!0}},e.prototype._parseTransform=function(e){for(var t=new d,o="",n="";!this._accept(6);){var i=void 0;if(i=this._accept(5,!0))o+=i=this._accept(6,!0)||i;else{if(14===this._token.type)return!1;o+=this._accept(void 0,!0)}}for(;!this._accept(6);){i=void 0;if(i=this._accept(5,!0))i=this._accept(6,!0)||i,t.appendChild(new l(i));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(o,n)}catch(e){return!1}return e.transform=t,!0},e.prototype._parseFormatString=function(e){var t=this._token;if(!this._accept(0))return!1;var o=!1;this._accept(3)&&(o=!0);var n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!o)return e.appendChild(new g(Number(n))),!0;if(this._accept(4))return e.appendChild(new g(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){var i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new g(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){if(r=this._until(4))return e.appendChild(new g(Number(n),void 0,r,void 0)),!0}else if(this._accept(12)){if(s=this._until(4))return e.appendChild(new g(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){var r;if(r=this._until(1))if(s=this._until(4))return e.appendChild(new g(Number(n),void 0,r,s)),!0}else{var s;if(s=this._until(4))return e.appendChild(new g(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1},e.prototype._parseAnything=function(e){return 14!==this._token.type&&(e.appendChild(new l(this._scanner.tokenText(this._token))),this._accept(void 0),!0)},e}()},function(e,t,o){"use strict";(function(e,n){ -/*! - * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com - * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) - */ -function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var o=0;o-1;i--){var r=o[i],s=(r.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(n=r)}return _.head.insertBefore(t,n),e}}var ie="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function re(){for(var e=12,t="";e-- >0;)t+=ie[62*Math.random()|0];return t}function se(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function ae(e){return Object.keys(e||{}).reduce((function(t,o){return t+"".concat(o,": ").concat(e[o],";")}),"")}function le(e){return e.size!==oe.size||e.x!==oe.x||e.y!==oe.y||e.rotate!==oe.rotate||e.flipX||e.flipY}function ue(e){var t=e.transform,o=e.containerWidth,n=e.iconWidth,i={transform:"translate(".concat(o/2," 256)")},r="translate(".concat(32*t.x,", ").concat(32*t.y,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)");return{outer:i,inner:{transform:"".concat(r," ").concat(s," ").concat(a)},path:{transform:"translate(".concat(n/2*-1," -256)")}}}var ce={x:0,y:0,width:"100%",height:"100%"};function he(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function de(e){var t=e.icons,o=t.main,n=t.mask,i=e.prefix,r=e.iconName,s=e.transform,l=e.symbol,u=e.title,c=e.maskId,h=e.titleId,d=e.extra,g=e.watchable,p=void 0!==g&&g,f=n.found?n:o,m=f.width,_=f.height,y="fak"===i,v=y?"":"fa-w-".concat(Math.ceil(m/_*16)),b=[N.replacementClass,r?"".concat(N.familyPrefix,"-").concat(r):"",v].filter((function(e){return-1===d.classes.indexOf(e)})).filter((function(e){return""!==e||!!e})).concat(d.classes).join(" "),E={children:[],attributes:a({},d.attributes,{"data-prefix":i,"data-icon":r,class:b,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(m," ").concat(_)})},C=y&&!~d.classes.indexOf("fa-fw")?{width:"".concat(m/_*16*.0625,"em")}:{};p&&(E.attributes[T]=""),u&&E.children.push({tag:"title",attributes:{id:E.attributes["aria-labelledby"]||"title-".concat(h||re())},children:[u]});var S=a({},E,{prefix:i,iconName:r,main:o,mask:n,maskId:c,transform:s,symbol:l,styles:a({},C,d.styles)}),w=n.found&&o.found?function(e){var t,o=e.children,n=e.attributes,i=e.main,r=e.mask,s=e.maskId,l=e.transform,u=i.width,c=i.icon,h=r.width,d=r.icon,g=ue({transform:l,containerWidth:h,iconWidth:u}),p={tag:"rect",attributes:a({},ce,{fill:"white"})},f=c.children?{children:c.children.map(he)}:{},m={tag:"g",attributes:a({},g.inner),children:[he(a({tag:c.tag,attributes:a({},c.attributes,g.path)},f))]},_={tag:"g",attributes:a({},g.outer),children:[m]},y="mask-".concat(s||re()),v="clip-".concat(s||re()),b={tag:"mask",attributes:a({},ce,{id:y,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[p,_]},E={tag:"defs",children:[{tag:"clipPath",attributes:{id:v},children:(t=d,"g"===t.tag?t.children:[t])},b]};return o.push(E,{tag:"rect",attributes:a({fill:"currentColor","clip-path":"url(#".concat(v,")"),mask:"url(#".concat(y,")")},ce)}),{children:o,attributes:n}}(S):function(e){var t=e.children,o=e.attributes,n=e.main,i=e.transform,r=ae(e.styles);if(r.length>0&&(o.style=r),le(i)){var s=ue({transform:i,containerWidth:n.width,iconWidth:n.width});t.push({tag:"g",attributes:a({},s.outer),children:[{tag:"g",attributes:a({},s.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:a({},n.icon.attributes,s.path)}]}]})}else t.push(n.icon);return{children:t,attributes:o}}(S),k=w.children,O=w.attributes;return S.children=k,S.attributes=O,l?function(e){var t=e.prefix,o=e.iconName,n=e.children,i=e.attributes,r=e.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:a({},i,{id:!0===r?"".concat(t,"-").concat(N.familyPrefix,"-").concat(o):r}),children:n}]}]}(S):function(e){var t=e.children,o=e.main,n=e.mask,i=e.attributes,r=e.styles,s=e.transform;if(le(s)&&o.found&&!n.found){var l={x:o.width/o.height/2,y:.5};i.style=ae(a({},r,{"transform-origin":"".concat(l.x+s.x/16,"em ").concat(l.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}(S)}function ge(e){var t=e.content,o=e.width,n=e.height,i=e.transform,r=e.title,s=e.extra,l=e.watchable,u=void 0!==l&&l,c=a({},s.attributes,r?{title:r}:{},{class:s.classes.join(" ")});u&&(c[T]="");var h=a({},s.styles);le(i)&&(h.transform=function(e){var t=e.transform,o=e.width,n=void 0===o?E:o,i=e.height,r=void 0===i?E:i,s=e.startCentered,a=void 0!==s&&s,l="";return l+=a&&b?"translate(".concat(t.x/te-n/2,"em, ").concat(t.y/te-r/2,"em) "):a?"translate(calc(-50% + ".concat(t.x/te,"em), calc(-50% + ").concat(t.y/te,"em)) "):"translate(".concat(t.x/te,"em, ").concat(t.y/te,"em) "),l+="scale(".concat(t.size/te*(t.flipX?-1:1),", ").concat(t.size/te*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) ")}({transform:i,startCentered:!0,width:o,height:n}),h["-webkit-transform"]=h.transform);var d=ae(h);d.length>0&&(c.style=d);var g=[];return g.push({tag:"span",attributes:c,children:[t]}),r&&g.push({tag:"span",attributes:{class:"sr-only"},children:[r]}),g}var pe=function(){},fe=(N.measurePerformance&&y&&y.mark&&y.measure,function(e,t,o,n){var i,r,s,a=Object.keys(e),l=a.length,u=void 0!==n?function(e,t){return function(o,n,i,r){return e.call(t,o,n,i,r)}}(t,n):t;for(void 0===o?(i=1,s=e[a[0]]):(i=0,s=o);i2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,n=void 0!==o&&o,i=Object.keys(t).reduce((function(e,o){var n=t[o];return!!n.icon?e[n.iconName]=n.icon:e[o]=n,e}),{});"function"!=typeof D.hooks.addPack||n?D.styles[e]=a({},D.styles[e]||{},i):D.hooks.addPack(e,i),"fas"===e&&me("fa",t)}var _e=D.styles,ye=D.shims,ve=function(){var e=function(e){return fe(_e,(function(t,o,n){return t[n]=fe(o,e,{}),t}),{})};e((function(e,t,o){return t[3]&&(e[t[3]]=o),e})),e((function(e,t,o){var n=t[2];return e[o]=o,n.forEach((function(t){e[t]=o})),e}));var t="far"in _e;fe(ye,(function(e,o){var n=o[0],i=o[1],r=o[2];return"far"!==i||t||(i="fas"),e[n]={prefix:i,iconName:r},e}),{})};ve();D.styles;function be(e,t,o){if(e&&e[t]&&e[t][o])return{prefix:t,iconName:o,icon:e[t][o]}}function Ee(e){var t=e.tag,o=e.attributes,n=void 0===o?{}:o,i=e.children,r=void 0===i?[]:i;return"string"==typeof e?se(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce((function(t,o){return t+"".concat(o,'="').concat(se(e[o]),'" ')}),"").trim()}(n),">").concat(r.map(Ee).join(""),"")}var Ce=function(e){var t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e?e.toLowerCase().split(" ").reduce((function(e,t){var o=t.toLowerCase().split("-"),n=o[0],i=o.slice(1).join("-");if(n&&"h"===i)return e.flipX=!0,e;if(n&&"v"===i)return e.flipY=!0,e;if(i=parseFloat(i),isNaN(i))return e;switch(n){case"grow":e.size=e.size+i;break;case"shrink":e.size=e.size-i;break;case"left":e.x=e.x-i;break;case"right":e.x=e.x+i;break;case"up":e.y=e.y-i;break;case"down":e.y=e.y+i;break;case"rotate":e.rotate=e.rotate+i}return e}),t):t};function Se(e){this.name="MissingIcon",this.message=e||"Icon unavailable",this.stack=(new Error).stack}Se.prototype=Object.create(Error.prototype),Se.prototype.constructor=Se;var Te={fill:"currentColor"},we={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},ke={tag:"path",attributes:a({},Te,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},Oe=a({},we,{attributeName:"opacity"});a({},Te,{cx:"256",cy:"364",r:"28"}),a({},we,{attributeName:"r",values:"28;14;28;28;14;28;"}),a({},Oe,{values:"1;0;1;1;0;1;"}),a({},Te,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),a({},Oe,{values:"1;0;0;0;0;1;"}),a({},Te,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),a({},Oe,{values:"0;0;1;1;0;0;"}),D.styles;function Re(e){var t=e[0],o=e[1],n=l(e.slice(4),1)[0];return{found:!0,width:t,height:o,icon:Array.isArray(n)?{tag:"g",attributes:{class:"".concat(N.familyPrefix,"-").concat(O.GROUP)},children:[{tag:"path",attributes:{class:"".concat(N.familyPrefix,"-").concat(O.SECONDARY),fill:"currentColor",d:n[0]}},{tag:"path",attributes:{class:"".concat(N.familyPrefix,"-").concat(O.PRIMARY),fill:"currentColor",d:n[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:n}}}}D.styles;var Le='svg:not(:root).svg-inline--fa {\n overflow: visible;\n}\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-border {\n height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n width: 2em;\n}\n.svg-inline--fa.fa-fw {\n width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: 0.25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-lg {\n font-size: 1.3333333333em;\n line-height: 0.75em;\n vertical-align: -0.0667em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit;\n}\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: 0.1em;\n padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n float: left;\n}\n\n.fa-pull-right {\n float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: 0.3em;\n}\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n -webkit-filter: none;\n filter: none;\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: #fff;\n}\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse {\n color: #fff;\n}';function Ne(){var e=C,t=S,o=N.familyPrefix,n=N.replacementClass,i=Le;if(o!==e||n!==t){var r=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");i=i.replace(r,".".concat(o,"-")).replace(s,"--".concat(o,"-")).replace(a,".".concat(n))}return i}function Ie(){N.autoAddCss&&!Me&&(ne(Ne()),Me=!0)}function De(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map((function(e){return Ee(e)}))}}),Object.defineProperty(e,"node",{get:function(){if(v){var t=_.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function Ae(e){var t=e.prefix,o=void 0===t?"fa":t,n=e.iconName;if(n)return be(xe.definitions,o,n)||be(D.styles,o,n)}var Pe,xe=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}}var t,o,n;return t=e,(o=[{key:"add",value:function(){for(var e=this,t=arguments.length,o=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},o=t.transform,n=void 0===o?oe:o,i=t.symbol,r=void 0!==i&&i,s=t.mask,l=void 0===s?null:s,u=t.maskId,c=void 0===u?null:u,h=t.title,d=void 0===h?null:h,g=t.titleId,p=void 0===g?null:g,f=t.classes,m=void 0===f?[]:f,_=t.attributes,y=void 0===_?{}:_,v=t.styles,b=void 0===v?{}:v;if(e){var E=e.prefix,C=e.iconName,S=e.icon;return De(a({type:"icon"},e),(function(){return Ie(),N.autoA11y&&(d?y["aria-labelledby"]="".concat(N.replacementClass,"-title-").concat(p||re()):(y["aria-hidden"]="true",y.focusable="false")),de({icons:{main:Re(S),mask:l?Re(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:E,iconName:C,transform:a({},oe,n),symbol:r,title:d,maskId:c,titleId:p,extra:{attributes:y,styles:b,classes:m}})}))}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(e||{}).icon?e:Ae(e||{}),n=t.mask;return n&&(n=(n||{}).icon?n:Ae(n||{})),Pe(o,a({},t,{mask:n}))}),He=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.transform,n=void 0===o?oe:o,i=t.title,r=void 0===i?null:i,s=t.classes,l=void 0===s?[]:s,c=t.attributes,h=void 0===c?{}:c,d=t.styles,g=void 0===d?{}:d;return De({type:"text",content:e},(function(){return Ie(),ge({content:e,transform:a({},oe,n),title:r,extra:{attributes:h,styles:g,classes:["".concat(N.familyPrefix,"-layers-text")].concat(u(l))}})}))}}).call(this,o(80),o(148).setImmediate)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(92),i=function(){function e(t){var o=Object(n.d)(t);this._defaultValue=o,this._asciiMap=e._createAsciiMap(o),this._map=new Map}return e._createAsciiMap=function(e){for(var t=new Uint8Array(256),o=0;o<256;o++)t[o]=e;return t},e.prototype.set=function(e,t){var o=Object(n.d)(t);e>=0&&e<256?this._asciiMap[e]=o:this._map.set(e,o)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}(),r=function(){function e(){this._actual=new i(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n=function(){function e(){for(var e=[],t=0;t=2)e.mixin({beforeCreate:o});else{var t=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[o].concat(e.init):o,t.call(this,e)}}function o(){var e=this.$options;e.store?this.$store="function"==typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}(l=e)}c.state.get=function(){return this._vm._data.$$state},c.state.set=function(e){0},u.prototype.commit=function(e,t,o){var n=this,i=m(e,t,o),r=i.type,s=i.payload,a=(i.options,{type:r,payload:s}),l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))})),this._subscribers.forEach((function(e){return e(a,n.state)})))},u.prototype.dispatch=function(e,t){var o=this,n=m(e,t),i=n.type,r=n.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.filter((function(e){return e.before})).forEach((function(e){return e.before(s,o.state)}))}catch(e){0}return(a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r)).then((function(e){try{o._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,o.state)}))}catch(e){0}return e}))}},u.prototype.subscribe=function(e){return h(e,this._subscribers)},u.prototype.subscribeAction=function(e){return h("function"==typeof e?{before:e}:e,this._actionSubscribers)},u.prototype.watch=function(e,t,o){var n=this;return this._watcherVM.$watch((function(){return e(n.state,n.getters)}),t,o)},u.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},u.prototype.registerModule=function(e,t,o){void 0===o&&(o={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),p(this,this.state,e,this._modules.get(e),o.preserveState),g(this,this.state)},u.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var o=f(t.state,e.slice(0,-1));l.delete(o,e[e.length-1])})),d(this)},u.prototype.hotUpdate=function(e){this._modules.update(e),d(this,!0)},u.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(u.prototype,c);var y=S((function(e,t){var o={};return C(t).forEach((function(t){var n=t.key,i=t.val;o[n]=function(){var t=this.$store.state,o=this.$store.getters;if(e){var n=T(this.$store,"mapState",e);if(!n)return;t=n.context.state,o=n.context.getters}return"function"==typeof i?i.call(this,t,o):t[i]},o[n].vuex=!0})),o})),v=S((function(e,t){var o={};return C(t).forEach((function(t){var n=t.key,i=t.val;o[n]=function(){for(var t=[],o=arguments.length;o--;)t[o]=arguments[o];var n=this.$store.commit;if(e){var r=T(this.$store,"mapMutations",e);if(!r)return;n=r.context.commit}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}})),o})),b=S((function(e,t){var o={};return C(t).forEach((function(t){var n=t.key,i=t.val;i=e+i,o[n]=function(){if(!e||T(this.$store,"mapGetters",e))return this.$store.getters[i]},o[n].vuex=!0})),o})),E=S((function(e,t){var o={};return C(t).forEach((function(t){var n=t.key,i=t.val;o[n]=function(){for(var t=[],o=arguments.length;o--;)t[o]=arguments[o];var n=this.$store.dispatch;if(e){var r=T(this.$store,"mapActions",e);if(!r)return;n=r.context.dispatch}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}})),o}));function C(e){return Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}}))}function S(e){return function(t,o){return"string"!=typeof t?(o=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,o)}}function T(e,t,o){return e._modulesNamespaceMap[o]}var w={Store:u,install:_,version:"3.1.1",mapState:y,mapMutations:v,mapGetters:b,mapActions:E,createNamespacedHelpers:function(e){return{mapState:y.bind(null,e),mapGetters:b.bind(null,e),mapMutations:v.bind(null,e),mapActions:E.bind(null,e)}}};t.a=w}).call(this,o(80))},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return u}));var n,i=o(25),r=o(6),s=o(1),a=o(94),l=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));var u=function(){function e(){var e=this;this.toDispose=[],this.activeTouches={},this.handle=null,this.targets=[],this.toDispose.push(s.g(document,"touchstart",(function(t){return e.onTouchStart(t)}))),this.toDispose.push(s.g(document,"touchend",(function(t){return e.onTouchEnd(t)}))),this.toDispose.push(s.g(document,"touchmove",(function(t){return e.onTouchMove(t)})))}return e.addTarget=function(t){e.isTouchDevice()&&(e.INSTANCE||(e.INSTANCE=new e),e.INSTANCE.targets.push(t))},e.isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0},e.prototype.dispose=function(){this.handle&&(this.handle.dispose(),Object(r.d)(this.toDispose),this.handle=null)},e.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var o=0,i=e.targetTouches.length;o=e.HOLD_DELAY&&Math.abs(c.initialPageX-i.n(c.rollingPageX))<30&&Math.abs(c.initialPageY-i.n(c.rollingPageY))<30){var d;(d=a.newGestureEvent(n.Contextmenu,c.initialTarget)).pageX=i.n(c.rollingPageX),d.pageY=i.n(c.rollingPageY),a.dispatchEvent(d)}else if(1===r){var g=i.n(c.rollingPageX),p=i.n(c.rollingPageY),f=i.n(c.rollingTimestamps)-c.rollingTimestamps[0],m=g-c.rollingPageX[0],_=p-c.rollingPageY[0],y=a.targets.filter((function(e){return c.initialTarget instanceof Node&&e.contains(c.initialTarget)}));a.inertia(y,o,Math.abs(m)/f,m>0?1:-1,g,Math.abs(_)/f,_>0?1:-1,p)}a.dispatchEvent(a.newGestureEvent(n.End,c.initialTarget)),delete a.activeTouches[u.identifier]},a=this,l=0,u=t.changedTouches.length;l0&&(f=!1,g=r*i*d),l>0&&(f=!1,p=u*l*d);var m=h.newGestureEvent(n.Change);m.translationX=g,m.translationY=p,t.forEach((function(e){return e.dispatchEvent(m)})),f||h.inertia(t,s,i,r,a+g,l,u,c+p)}))},e.prototype.onTouchMove=function(e){for(var t=Date.now(),o=0,r=e.changedTouches.length;o3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(s.pageX),a.rollingPageY.push(s.pageY),a.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",s)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)},e.SCROLL_FRICTION=-.005,e.HOLD_DELAY=700,l([a.a],e,"isTouchDevice",null),e}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return c})),o.d(t,"a",(function(){return n}));var n,i=o(20),r=o(9),s=o(2),a=o(63),l=o(107),u=o(21),c=function(){function e(){}return e.addCursorDown=function(e,t,o){for(var n=[],r=0,s=0,l=t.length;sc&&(h=c,d=e.model.getLineMaxColumn(h)),i.d.fromModelState(new i.f(new s.a(l.lineNumber,1,h,d),0,new r.a(h,d),0))}var g=t.modelState.selectionStart.getStartPosition().lineNumber;if(l.lineNumberg){c=e.viewModel.getLineCount();var p=u.lineNumber+1,f=1;return p>c&&(p=c,f=e.viewModel.getLineMaxColumn(p)),i.d.fromViewState(t.viewState.move(t.modelState.hasSelection(),p,f,0))}var m=t.modelState.selectionStart.getEndPosition();return i.d.fromModelState(t.modelState.move(t.modelState.hasSelection(),m.lineNumber,m.column,0))},e.word=function(e,t,o,n){var r=e.model.validatePosition(n);return i.d.fromModelState(l.a.word(e.config,e.model,t.modelState,o,r))},e.cancelSelection=function(e,t){if(!t.modelState.hasSelection())return new i.d(t.modelState,t.viewState);var o=t.viewState.position.lineNumber,n=t.viewState.position.column;return i.d.fromViewState(new i.f(new s.a(o,n,o,n),0,new r.a(o,n),0))},e.moveTo=function(e,t,o,n,s){var a=e.model.validatePosition(n),l=s?e.validateViewPosition(new r.a(s.lineNumber,s.column),a):e.convertModelPositionToViewPosition(a);return i.d.fromViewState(t.viewState.move(o,l.lineNumber,l.column,0))},e.move=function(e,t,o){var n=o.select,i=o.value;switch(o.direction){case 0:return 4===o.unit?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,i);case 1:return 4===o.unit?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,i);case 2:return 2===o.unit?this._moveUpByViewLines(e,t,n,i):this._moveUpByModelLines(e,t,n,i);case 3:return 2===o.unit?this._moveDownByViewLines(e,t,n,i):this._moveDownByModelLines(e,t,n,i);case 4:return this._moveToViewMinColumn(e,t,n);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 6:return this._moveToViewCenterColumn(e,t,n);case 7:return this._moveToViewMaxColumn(e,t,n);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,n);case 9:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._firstLineNumberInRange(e.model,s,i),l=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,n,a,l)];case 11:r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._lastLineNumberInRange(e.model,s,i),l=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,n,a,l)];case 10:r=t[0],s=e.getCompletelyVisibleModelRange(),a=Math.round((s.startLineNumber+s.endLineNumber)/2),l=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,n,a,l)];case 12:for(var u=e.getCompletelyVisibleViewRange(),c=[],h=0,d=t.length;ho.endLineNumber-1&&(r=o.endLineNumber-1),r>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,o,n){var i=(t<<16|o<<0)>>>0;this._data[e]=i,this._absoluteOffsets[e]=n+o},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,o,n){if(0===this.length)return 0;for(var i=(t<<16|n<<0)>>>0,r=0,s=this.length-1;r+1>>1,l=this._data[a];if(l===i)return a;l>i?s=a:r=a}if(r===s)return r;var u=this._data[r],c=this._data[s];if(u===i)return r;if(c===i)return s;var h=e.getPartIndex(u);return n-e.getCharIndex(u)<=(h!==e.getPartIndex(c)?o:e.getCharIndex(c))-n?r:s},e}(),u=function(e,t,o){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=o};function c(e,t){if(0===e.lineContent.length){var o=0,r=" ";if(e.lineDecorations.length>0){for(var a=[],c=0,h=e.lineDecorations.length;c')}return t.appendASCIIString(r),new u(new l(0,0),!1,o)}return function(e,t){var o=e.fontIsMonospace,n=e.containsForeignElements,r=e.lineContent,s=e.len,a=e.isOverflowing,c=e.parts,h=e.tabSize,d=e.containsRTL,g=e.spaceWidth,p=e.renderWhitespace,f=e.renderControlCharacters,m=new l(s+1,c.length),_=0,y=0,v=0,b=0,E=0;t.appendASCIIString("");for(var C=0,S=c.length;C=0;if(v=0,t.appendASCIIString('0&&(D>1?t.write1(8594):t.write1(65515),D--);D>0;)t.write1(160),D--;else t.write1(183);v++}b=R}else{R=0;for(d&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);_0;)t.write1(160),R++,D--;break;case 32:t.write1(160),R++;break;case 60:t.appendASCIIString("<"),R++;break;case 62:t.appendASCIIString(">"),R++;break;case 38:t.appendASCIIString("&"),R++;break;case 0:t.appendASCIIString("�"),R++;break;case 65279:case 8232:t.write1(65533),R++;break;default:i.isFullWidthCharacter(I)&&y++,f&&I<32?(t.write1(9216+I),R++):(t.write1(I),R++)}v++}b=R}t.appendASCIIString("")}m.setPartData(s,c.length-1,v,E),a&&t.appendASCIIString("");return t.appendASCIIString(""),new u(m,d,n)}(function(e){var t,o,r=e.useMonospaceOptimizations,a=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(n[i++]=new s(t,""));for(var r=0,a=e.getCount();r=o){n[i++]=new s(o,u);break}n[i++]=new s(l,u)}}return n}(e.lineTokens,e.fauxIndentLength,o);2!==e.renderWhitespace&&1!==e.renderWhitespace||(l=function(e,t,o,n,r,a,l,u){var c,h=[],d=0,g=0,p=n[g].type,f=n[g].endIndex,m=i.firstNonWhitespaceIndex(e);-1===m?(m=t,c=t):c=i.lastNonWhitespaceIndex(e);for(var _=0,y=0;yc)E=!0;else if(9===b)E=!0;else if(32===b)if(u)if(v)E=!0;else{var C=y+1=a)&&(h[d++]=new s(y,"vs-whitespace"),_%=a):(y===f||E&&y>r)&&(h[d++]=new s(y,p),_%=a),9===b?_=a:i.isFullWidthCharacter(b)?_+=2:_++,v=E,y===f&&(p=n[++g].type,f=n[g].endIndex)}var S=!1;if(v)if(o&&u){var T=t>0?e.charCodeAt(t-1):0,w=t>1?e.charCodeAt(t-2):0;32===T&&32!==w&&9!==w||(S=!0)}else S=!0;return h[d++]=new s(t,S?"vs-whitespace":p),h}(a,o,e.continuesWithWrappedLine,l,e.fauxIndentLength,e.tabSize,r,1===e.renderWhitespace));var u=0;if(e.lineDecorations.length>0){for(var c=0,h=e.lineDecorations.length;ch&&(h=_.startOffset,u[c++]=new s(h,m)),!(_.endOffset+1<=f)){h=f,u[c++]=new s(h,m+" "+_.className);break}h=_.endOffset+1,u[c++]=new s(h,m+" "+_.className),l++}f>h&&(h=f,u[c++]=new s(h,m))}var y=o[o.length-1].endIndex;if(l50){for(var h=l.type,d=Math.ceil(c/50),g=1;g>>0,new i.c(r,o)}},function(e,t,o){"use strict";var n,i=o(4),r=o(6),s=o(15),a=o(24),l=o(130),u=o(131),c=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),h=function(e){function t(t,o){var n=e.call(this)||this;return n.referenceDomElement=t,n.changeCallback=o,n.measureReferenceDomElementToken=-1,n.width=-1,n.height=-1,n.measureReferenceDomElement(!1),n}return c(t,e),t.prototype.dispose=function(){this.stopObserving(),e.prototype.dispose.call(this)},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.startObserving=function(){var e=this;-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval((function(){return e.measureReferenceDomElement(!0)}),100))},t.prototype.stopObserving=function(){-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)},t.prototype.observe=function(e){this.measureReferenceDomElement(!0,e)},t.prototype.measureReferenceDomElement=function(e,t){var o=0,n=0;t?(o=t.width,n=t.height):this.referenceDomElement&&(o=this.referenceDomElement.clientWidth,n=this.referenceDomElement.clientHeight),o=Math.max(5,o),n=Math.max(5,n),this.width===o&&this.height===n||(this.width=o,this.height=n,e&&this.changeCallback())},t}(r.a),d=function(){function e(e,t){this.chr=e,this.type=t,this.width=0}return e.prototype.fulfill=function(e){this.width=e},e}(),g=function(){function e(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}return e.prototype.read=function(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null},e.prototype._createDomElements=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";var o=document.createElement("div");o.style.fontFamily=this._bareFontInfo.fontFamily,o.style.fontWeight=this._bareFontInfo.fontWeight,o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(o);var n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.fontFamily,n.style.fontWeight="bold",n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);var i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.fontFamily,i.style.fontWeight=this._bareFontInfo.fontWeight,i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",i.style.fontStyle="italic",t.appendChild(i);for(var r=[],s=0,a=this._requests.length;s.001){b=!1;break}}var w=a.c()>2e3;return new u.b({zoomLevel:a.d(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:b,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:i.width,spaceWidth:r.width,maxDigitWidth:v},w)},t.INSTANCE=new t,t}(r.a),_=function(e){function t(t,o){void 0===o&&(o=null);var n=e.call(this,t)||this;return n._elementSizeObserver=n._register(new h(o,(function(){return n._onReferenceDomElementSizeChanged()}))),n._register(m.INSTANCE.onDidChange((function(){return n._onCSSBasedConfigurationChanged()}))),n._validatedOptions.automaticLayout&&n._elementSizeObserver.startObserving(),n._register(a.p((function(e){return n._recomputeOptions()}))),n._register(a.o((function(){return n._recomputeOptions()}))),n._recomputeOptions(),n}return p(t,e),t._massageFontFamily=function(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?'"'+e+'"':e},t.applyFontInfoSlow=function(e,o){e.style.fontFamily=t._massageFontFamily(o.fontFamily),e.style.fontWeight=o.fontWeight,e.style.fontSize=o.fontSize+"px",e.style.lineHeight=o.lineHeight+"px",e.style.letterSpacing=o.letterSpacing+"px"},t.applyFontInfo=function(e,o){e.setFontFamily(t._massageFontFamily(o.fontFamily)),e.setFontWeight(o.fontWeight),e.setFontSize(o.fontSize),e.setLineHeight(o.lineHeight),e.setLetterSpacing(o.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 a.k?e+="ie ":a.j?e+="ff ":a.g?e+="edge ":a.m&&(e+="safari "),s.d&&(e+="mac "),e},t.prototype._getEnvConfiguration=function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:a.n||a.j,pixelRatio:a.b(),zoomLevel:a.d(),accessibilitySupport:a.a()}},t.prototype.readConfiguration=function(e){return m.INSTANCE.readConfiguration(e)},t}(l.a)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r})),o.d(t,"c",(function(){return a})),o.d(t,"d",(function(){return u}));var n=o(25),i=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 r(e){return s(e)?!e.value:!Array.isArray(e)||e.every(r)}function s(e){return e instanceof i||!(!e||"object"!=typeof e)&&("string"==typeof e.value&&("boolean"==typeof e.isTrusted||void 0===e.isTrusted))}function a(e,t){return!e&&!t||!(!e||!t)&&(Array.isArray(e)&&Array.isArray(t)?Object(n.e)(e,t,l):!(!s(e)||!s(t))&&l(e,t))}function l(e,t){return e===t||!(!e||!t)&&(e.value===t.value&&e.isTrusted===t.isTrusted)}function u(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}},function(e,t,o){"use strict";o.r(t);var n=o(0),i=o(9),r=o(2),s=o(52),a=o(20),l=o(35),u=o(67),c=o(3),h=function(){function e(){}return e._columnSelect=function(e,t,o,n,s,l){for(var u=Math.abs(s-o)+1,c=o>s,h=n>l,d=nl)continue;if(vn)continue;if(y1&&i--,this.columnSelect(e,t,o.selection,n,i)},e.columnSelectRight=function(e,t,o,n,r){for(var s=0,l=Math.min(o.position.lineNumber,n),u=Math.max(o.position.lineNumber,n),c=l;c<=u;c++){var h=t.getLineMaxColumn(c),d=a.a.visibleColumnFromColumn2(e,t,new i.a(c,h));s=Math.max(s,d)}return rt.getLineCount()&&(i=t.getLineCount()),this.columnSelect(e,t,o.selection,i,r)},e}(),d=o(5),g=o(36),p=o(12),f=o(21),m=o(95),_=o(176),y=o(38);o.d(t,"CoreEditorCommand",(function(){return L})),o.d(t,"EditorScroll_",(function(){return b})),o.d(t,"RevealLine_",(function(){return C})),o.d(t,"CoreNavigationCommands",(function(){return T})),o.d(t,"CoreEditingCommands",(function(){return w}));var v,b,E,C,S,T,w,k,O=(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),R=s.b,N=0,L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){var n=t._getCursors();n&&this.runCoreEditorCommand(n,o||{})},t}(c.c);function I(e){return e.get(g.a).getFocusedCodeEditor()}function D(e){e.register()}(E=b||(b={})).description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:function(e){if(!f.g(e))return!1;var t=e;return!(!f.h(t.to)||!f.i(t.by)&&!f.h(t.by)||!f.i(t.value)&&!f.f(t.value)||!f.i(t.revealCursor)&&!f.c(t.revealCursor))}}]},E.RawDirection={Up:"up",Down:"down"},E.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},E.parse=function(e){var t,o;switch(e.to){case E.RawDirection.Up:t=1;break;case E.RawDirection.Down:t=2;break;default:return null}switch(e.by){case E.RawUnit.Line:o=1;break;case E.RawUnit.WrappedLine:o=2;break;case E.RawUnit.Page:o=3;break;case E.RawUnit.HalfPage:o=4;break;default:o=2}return{direction:t,unit:o,value:Math.floor(e.value||1),revealCursor:!!e.revealCursor,select:!!e.select}},(S=C||(C={})).description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:function(e){if(!f.g(e))return!1;var t=e;return!(!f.f(t.lineNumber)||!f.i(t.at)&&!f.h(t.at))}}]},S.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"},function(e){var t=function(e){function t(t){var o=e.call(this,t)||this;return o._inSelectionMode=t.inSelectionMode,o}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,l.a.Explicit,[u.b.moveTo(e.context,e.getPrimaryCursor(),this._inSelectionMode,t.position,t.viewPosition)]),e.reveal(!0,0,0)},t}(L);e.MoveTo=Object(c.g)(new t({id:"_moveTo",inSelectionMode:!1,precondition:null})),e.MoveToSelect=Object(c.g)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:null}));var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement();var o=this._getColumnSelectResult(e.context,e.getPrimaryCursor(),e.getColumnSelectData(),t);e.setStates(t.source,l.a.Explicit,o.viewStates.map((function(e){return a.d.fromViewState(e)}))),e.setColumnSelectData({toViewLineNumber:o.toLineNumber,toViewVisualColumn:o.toVisualColumn}),e.reveal(!0,o.reversed?1:2,0)},t}(L);e.ColumnSelect=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"columnSelect",precondition:null})||this}return O(t,e),t.prototype._getColumnSelectResult=function(e,t,o,n){var r,s=e.model.validatePosition(n.position);return r=n.viewPosition?e.validateViewPosition(new i.a(n.viewPosition.lineNumber,n.viewPosition.column),s):e.convertModelPositionToViewPosition(s),h.columnSelect(e.config,e.viewModel,t.viewState.selection,r.lineNumber,n.mouseColumn-1)},t}(o))),e.CursorColumnSelectLeft=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectLeft",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:3599,linux:{primary:0}}})||this}return O(t,e),t.prototype._getColumnSelectResult=function(e,t,o,n){return h.columnSelectLeft(e.config,e.viewModel,t.viewState,o.toViewLineNumber,o.toViewVisualColumn)},t}(o))),e.CursorColumnSelectRight=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"cursorColumnSelectRight",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:3601,linux:{primary:0}}})||this}return O(t,e),t.prototype._getColumnSelectResult=function(e,t,o,n){return h.columnSelectRight(e.config,e.viewModel,t.viewState,o.toViewLineNumber,o.toViewVisualColumn)},t}(o)));var n=function(e){function t(t){var o=e.call(this,t)||this;return o._isPaged=t.isPaged,o}return O(t,e),t.prototype._getColumnSelectResult=function(e,t,o,n){return h.columnSelectUp(e.config,e.viewModel,t.viewState,this._isPaged,o.toViewLineNumber,o.toViewVisualColumn)},t}(o);e.CursorColumnSelectUp=Object(c.g)(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Object(c.g)(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:3595,linux:{primary:0}}}));var s=function(e){function t(t){var o=e.call(this,t)||this;return o._isPaged=t.isPaged,o}return O(t,e),t.prototype._getColumnSelectResult=function(e,t,o,n){return h.columnSelectDown(e.config,e.viewModel,t.viewState,this._isPaged,o.toViewLineNumber,o.toViewVisualColumn)},t}(o);e.CursorColumnSelectDown=Object(c.g)(new s({isPaged:!1,id:"cursorColumnSelectDown",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Object(c.g)(new s({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:3596,linux:{primary:0}}}));var g=function(e){function t(){return e.call(this,{id:"cursorMove",precondition:null,description:u.a.description})||this}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){var o=u.a.parse(t);o&&this._runCursorMove(e,t.source,o)},t.prototype._runCursorMove=function(e,t,o){e.context.model.pushStackElement(),e.setStates(t,l.a.Explicit,u.b.move(e.context,e.getAll(),o)),e.reveal(!0,0,0)},t}(L);e.CursorMoveImpl=g,e.CursorMove=Object(c.g)(new g);var p=function(t){function o(e){var o=t.call(this,e)||this;return o._staticArgs=e.args,o}return O(o,t),o.prototype.runCoreEditorCommand=function(t,o){var n=this._staticArgs;-1===this._staticArgs.value&&(n={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.context.config.pageSize}),e.CursorMove._runCursorMove(t,o.source,n)},o}(L);e.CursorLeft=Object(c.g)(new p({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Object(c.g)(new p({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:1039}})),e.CursorRight=Object(c.g)(new p({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Object(c.g)(new p({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:1041}})),e.CursorUp=Object(c.g)(new p({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Object(c.g)(new p({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Object(c.g)(new p({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:11}})),e.CursorPageUpSelect=Object(c.g)(new p({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:1035}})),e.CursorDown=Object(c.g)(new p({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Object(c.g)(new p({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Object(c.g)(new p({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:12}})),e.CursorPageDownSelect=Object(c.g)(new p({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:null,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:1036}})),e.CreateCursor=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"createCursor",precondition:null})||this}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){var o,n=e.context;o=t.wholeLine?u.b.line(n,e.getPrimaryCursor(),!1,t.position,t.viewPosition):u.b.moveTo(n,e.getPrimaryCursor(),!1,t.position,t.viewPosition);var i=e.getAll();if(i.length>1)for(var r=o.modelState?o.modelState.position:null,s=o.viewState?o.viewState.position:null,a=0,c=i.length;ai&&(n=i);var s=new r.a(n,1,n,e.context.model.getLineMaxColumn(n)),a=0;if(o.at)switch(o.at){case C.RawAtArgument.Top:a=3;break;case C.RawAtArgument.Center:a=1;break;case C.RawAtArgument.Bottom:a=4}var l=e.context.convertModelRangeToViewRange(s);e.revealRange(!1,l,a,0)},t}(L))),e.SelectAll=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:null})||this}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,l.a.Explicit,[u.b.selectAll(e.context,e.getPrimaryCursor())])},t}(L))),e.SetSelection=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:null})||this}return O(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,l.a.Explicit,[a.d.fromModelSelection(t.selection)])},t}(L)))}(T||(T={})),(k=w||(w={})).LineBreakInsert=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:d.a.writable,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:null,mac:{primary:301}}})||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){t.pushUndoStop(),t.executeCommands(this.id,m.a.lineBreakInsert(t._getCursorConfiguration(),t.getModel(),t.getSelections()))},t}(c.c))),k.Outdent=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:d.a.writable,kbOpts:{weight:N,kbExpr:p.d.and(d.a.editorTextFocus,d.a.tabDoesNotMoveFocus),primary:1026}})||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){t.pushUndoStop(),t.executeCommands(this.id,m.a.outdent(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(c.c))),k.Tab=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"tab",precondition:d.a.writable,kbOpts:{weight:N,kbExpr:p.d.and(d.a.editorTextFocus,d.a.tabDoesNotMoveFocus),primary:2}})||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){t.pushUndoStop(),t.executeCommands(this.id,m.a.tab(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(c.c))),k.DeleteLeft=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:d.a.writable,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){var n=t._getCursors(),i=_.a.deleteLeft(n.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),r=i[0],s=i[1];r&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(2)},t}(c.c))),k.DeleteRight=Object(c.g)(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:d.a.writable,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return O(t,e),t.prototype.runEditorCommand=function(e,t,o){var n=t._getCursors(),i=_.a.deleteRight(n.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),r=i[0],s=i[1];r&&t.pushUndoStop(),t.executeCommands(this.id,s),n.setPrevEditOperationType(3)},t}(c.c)));var A=function(e){function t(t){var o=e.call(this,t)||this;return o._editorHandler=t.editorHandler,o._inputHandler=t.inputHandler,o}return O(t,e),t.prototype.runCommand=function(e,t){var o=I(e);if(o&&o.hasTextFocus())return this._runEditorHandler(o,t);var n=document.activeElement;if(!(n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0)){var i=e.get(g.a).getActiveCodeEditor();return i?(i.focus(),this._runEditorHandler(i,t)):void 0}document.execCommand(this._inputHandler)},t.prototype._runEditorHandler=function(e,t){var o=this._editorHandler;"string"==typeof o?e.trigger("keyboard",o,t):((t=t||{}).source="keyboard",o.runEditorCommand(null,e,t))},t}(c.a),P=function(e){function t(t,o){var n=e.call(this,{id:t,precondition:null})||this;return n._handlerId=o,n}return O(t,e),t.prototype.runCommand=function(e,t){var o=I(e);o&&o.trigger("keyboard",this._handlerId,t)},t}(c.a);function M(e){D(new P("default:"+e,e)),D(new P(e,e))}D(new A({editorHandler:T.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:d.a.textInputFocus,kbOpts:{weight:N,kbExpr:null,primary:2079},menubarOpts:{menuId:y.b.MenubarSelectionMenu,group:"1_basic",title:n.a({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1}})),D(new A({editorHandler:R.Undo,inputHandler:"undo",id:R.Undo,precondition:d.a.writable,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:2104},menubarOpts:{menuId:y.b.MenubarEditMenu,group:"1_do",title:n.a({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1}})),D(new P("default:"+R.Undo,R.Undo)),D(new A({editorHandler:R.Redo,inputHandler:"redo",id:R.Redo,precondition:d.a.writable,kbOpts:{weight:N,kbExpr:d.a.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}},menubarOpts:{menuId:y.b.MenubarEditMenu,group:"1_do",title:n.a({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2}})),D(new P("default:"+R.Redo,R.Redo)),M(R.Type),M(R.ReplacePreviousChar),M(R.CompositionStart),M(R.CompositionEnd),M(R.Paste),M(R.Cut)},function(e,t,o){"use strict";o.d(t,"b",(function(){return u})),o.d(t,"a",(function(){return c}));var n,i=o(6),r=o(1),s=o(173),a=o(41),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function u(e,t){var o=new a.b(t);return o.preventDefault(),{leftButton:o.leftButton,posx:o.posx,posy:o.posy}}var c=function(e){function t(){var t=e.call(this)||this;return t.hooks=[],t.mouseMoveEventMerger=null,t.mouseMoveCallback=null,t.onStopCallback=null,t}return l(t,e),t.prototype.dispose=function(){this.stopMonitoring(!1),e.prototype.dispose.call(this)},t.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this.hooks=Object(i.d)(this.hooks),this.mouseMoveEventMerger=null,this.mouseMoveCallback=null;var t=this.onStopCallback;this.onStopCallback=null,e&&t()}},t.prototype.isMonitoring=function(){return this.hooks.length>0},t.prototype.startMonitoring=function(e,t,o){var n=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=o;for(var i=s.a.getSameOriginWindowChain(),l=0;l=o.actionsList.children.length?(o.actionsList.appendChild(n),o.items.push(r)):(o.actionsList.insertBefore(n,o.actionsList.children[i]),o.items.splice(i,0,r),i++)}))},e.prototype.clear=function(){this.items=a.d(this.items),Object(l.a)(this.actionsList).empty()},e.prototype.isEmpty=function(){return 0===this.items.length},e.prototype.focus=function(e){e&&void 0===this.focusedItem?(this.focusedItem=this.items.length-1,this.focusNext()):this.updateFocus()},e.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()},e.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)},e.prototype.updateFocus=function(e){void 0===this.focusedItem&&this.domNode.focus();for(var t=0;t=0;t--){var o=this._arr[t];if(e.equals(o.keybinding))return o.callback}return null},e}(),c=function(){function e(e){void 0===e&&(e={clickBehavior:n.ON_MOUSE_DOWN,keyboardSupport:!0,openMode:i.SINGLE_CLICK});var t=this;this.options=e,this.downKeyBindingDispatcher=new u,this.upKeyBindingDispatcher=new u,("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,(function(e,o){return t.onUp(e,o)})),this.downKeyBindingDispatcher.set(18,(function(e,o){return t.onDown(e,o)})),this.downKeyBindingDispatcher.set(15,(function(e,o){return t.onLeft(e,o)})),this.downKeyBindingDispatcher.set(17,(function(e,o){return t.onRight(e,o)})),r.d&&(this.downKeyBindingDispatcher.set(2064,(function(e,o){return t.onLeft(e,o)})),this.downKeyBindingDispatcher.set(300,(function(e,o){return t.onDown(e,o)})),this.downKeyBindingDispatcher.set(302,(function(e,o){return t.onUp(e,o)}))),this.downKeyBindingDispatcher.set(11,(function(e,o){return t.onPageUp(e,o)})),this.downKeyBindingDispatcher.set(12,(function(e,o){return t.onPageDown(e,o)})),this.downKeyBindingDispatcher.set(14,(function(e,o){return t.onHome(e,o)})),this.downKeyBindingDispatcher.set(13,(function(e,o){return t.onEnd(e,o)})),this.downKeyBindingDispatcher.set(10,(function(e,o){return t.onSpace(e,o)})),this.downKeyBindingDispatcher.set(9,(function(e,o){return t.onEscape(e,o)})),this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this)))}return e.prototype.onMouseDown=function(e,t,o,i){if(void 0===i&&(i="mouse"),this.options.clickBehavior===n.ON_MOUSE_DOWN&&(o.leftButton||o.middleButton)){if(o.target){if(o.target.tagName&&"input"===o.target.tagName.toLowerCase())return!1;if(a.p(o.target,"scrollbar","monaco-tree"))return!1;if(a.p(o.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,o,i)}return!1},e.prototype.onClick=function(e,t,o){return r.d&&o.ctrlKey?(o.preventDefault(),o.stopPropagation(),!1):(!o.target||!o.target.tagName||"input"!==o.target.tagName.toLowerCase())&&((this.options.clickBehavior!==n.ON_MOUSE_DOWN||!o.leftButton&&!o.middleButton)&&this.onLeftClick(e,t,o))},e.prototype.onLeftClick=function(e,t,o,n){void 0===n&&(n="mouse");var i=o,r={origin:n,originalEvent:o,didClickOnTwistie:this.isClickOnTwistie(i)};e.getInput()===t?(e.clearFocus(r),e.clearSelection(r)):(o&&i.browserEvent&&"mousedown"===i.browserEvent.type&&1===i.browserEvent.detail||o.preventDefault(),o.stopPropagation(),e.domFocus(),e.setSelection([t],r),e.setFocus(t,r),this.shouldToggleExpansion(t,i,n)&&(e.isExpanded(t)?e.collapse(t).done(null,s.e):e.expand(t).done(null,s.e)));return!0},e.prototype.shouldToggleExpansion=function(e,t,o){var n="mouse"===o&&2===t.detail;return this.openOnSingleClick||n||this.isClickOnTwistie(t)},e.prototype.setOpenMode=function(e){this.options.openMode=e},Object.defineProperty(e.prototype,"openOnSingleClick",{get:function(){return this.options.openMode===i.SINGLE_CLICK},enumerable:!0,configurable:!0}),e.prototype.isClickOnTwistie=function(e){var t=e.target;if(!a.z(t,"content"))return!1;var o=window.getComputedStyle(t,":before");if("none"===o.backgroundImage||"none"===o.display)return!1;var n=parseInt(o.width)+parseInt(o.paddingRight);return e.browserEvent.offsetX<=n},e.prototype.onContextMenu=function(e,t,o){return(!o.target||!o.target.tagName||"input"!==o.target.tagName.toLowerCase())&&(o&&(o.preventDefault(),o.stopPropagation()),!1)},e.prototype.onTap=function(e,t,o){var n=o.initialTarget;return(!n||!n.tagName||"input"!==n.tagName.toLowerCase())&&this.onLeftClick(e,t,o,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,o){var n=e.dispatch(o.toKeybinding());return!(!n||!n(t,o))&&(o.preventDefault(),o.stopPropagation(),!0)},e.prototype.onUp=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusPrevious(1,o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onPageUp=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusPreviousPage(o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onDown=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusNext(1,o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onPageDown=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusNextPage(o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onHome=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusFirst(o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onEnd=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(o):(e.focusLast(o),e.reveal(e.getFocus()).done(null,s.e)),!0},e.prototype.onLeft=function(e,t){var o={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(o);else{var n=e.getFocus();e.collapse(n).then((function(t){if(n&&!t)return e.focusParent(o),e.reveal(e.getFocus())})).done(null,s.e)}return!0},e.prototype.onRight=function(e,t){var o={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(o);else{var n=e.getFocus();e.expand(n).then((function(t){if(n&&!t)return e.focusFirstChild(o),e.reveal(e.getFocus())})).done(null,s.e)}return!0},e.prototype.onEnter=function(e,t){var o={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.setSelection([n],o),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var o=e.getFocus();return o&&e.toggleExpansion(o),!0},e.prototype.onEscape=function(e,t){var o={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(o),!0):e.getSelection().length?(e.clearSelection(o),!0):!!e.getFocus()&&(e.clearFocus(o),!0)},e}(),h=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null},e.prototype.onDragStart=function(e,t,o){},e.prototype.onDragOver=function(e,t,o,n){return null},e.prototype.drop=function(e,t,o,n){},e}(),d=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}(),g=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}(),p=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix?"."+this.selectorSuffix:"",o=[];e.listFocusBackground&&o.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: "+e.listFocusBackground+"; }"),e.listFocusForeground&&o.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&o.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listActiveSelectionBackground+"; }"),e.listActiveSelectionForeground&&o.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listActiveSelectionForeground+"; }"),e.listFocusAndSelectionBackground&&o.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: "+e.listFocusAndSelectionBackground+"; }\n\t\t\t"),e.listFocusAndSelectionForeground&&o.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: "+e.listFocusAndSelectionForeground+"; }\n\t\t\t"),e.listInactiveSelectionBackground&&o.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listInactiveSelectionBackground+"; }"),e.listInactiveSelectionForeground&&o.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listInactiveSelectionForeground+"; }"),e.listHoverBackground&&o.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&o.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"),e.listDropBackground&&o.push("\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: "+e.listDropBackground+" !important; color: inherit !important; }\n\t\t\t"),e.listFocusOutline&&o.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; background: #000; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t");var n=o.join("\n");n!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=n)},e}()},function(e,t,o){"use strict";function n(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}o.d(t,"a",(function(){return n}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o.d(t,"d",(function(){return c})),o.d(t,"c",(function(){return d})),o.d(t,"e",(function(){return g})),o.d(t,"b",(function(){return p}));var n=o(8),i=o(9),r=o(2),s=o(18),a=o(102),l=function(){function e(e,t,o,n){this.searchString=e,this.isRegex=t,this.matchCase=o,this.wordSeparators=n}return e._isMultilineRegexSource=function(e){if(!e||0===e.length)return!1;for(var t=0,o=e.length;t=o)break;var n=e.charCodeAt(t);if(110===n||114===n)return!0}}return!1},e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var t;t=this.isRegex?e._isMultilineRegexSource(this.searchString):this.searchString.indexOf("\n")>=0;var o=null;try{o=n.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:t,global:!0})}catch(e){return null}if(!o)return null;var i=!this.isRegex&&!t;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new u(o,this.wordSeparators?Object(a.a)(this.wordSeparators):null,i?this.searchString:null)},e}(),u=function(e,t,o){this.regex=e,this.wordSeparators=t,this.simpleSearch=o};function c(e,t,o){if(!o)return new s.e(e,null);for(var n=[],i=0,r=t.length;i>0);t[i]>=e?n=i-1:t[i+1]>=e?(o=i,n=i):o=i+1}return o+1},e}(),d=function(){function e(){}return e.findMatches=function(e,t,o,n,i){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,o,new p(r.wordSeparators,r.regex),n,i):this._doFindMatchesLineByLine(e,o,r,n,i):[]},e._getMultilineMatchRange=function(e,t,o,n,i,s){var a,l,u=0;if(a="\r\n"===e.getEOL()?t+i+(u=n.findLineFeedCountBeforeOffset(i)):t+i,"\r\n"===e.getEOL()){var c=n.findLineFeedCountBeforeOffset(i+s.length)-u;l=a+s.length+c}else l=a+s.length;var h=e.getPositionAt(a),d=e.getPositionAt(l);return new r.a(h.lineNumber,h.column,d.lineNumber,d.column)},e._doFindMatchesMultiline=function(e,t,o,n,i){var r,a=e.getOffsetAt(t.getStartPosition()),l=e.getValueInRange(t,s.c.LF),u="\r\n"===e.getEOL()?new h(l):null,d=[],g=0;for(o.reset(0);r=o.next(l);)if(d[g++]=c(this._getMultilineMatchRange(e,a,l,u,r.index,r[0]),r,n),g>=i)return d;return d},e._doFindMatchesLineByLine=function(e,t,o,n,i){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(o,a,t.startLineNumber,t.startColumn-1,s,r,n,i),r}var l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(o,l,t.startLineNumber,t.startColumn-1,s,r,n,i);for(var u=t.startLineNumber+1;u=u))return i;return i}var y,v=new p(e.wordSeparators,e.regex);v.reset(0);do{if((y=v.next(t))&&(a[i++]=c(new r.a(o,y.index+1+n,o,y.index+1+y[0].length+n),y,l),i>=u))return i}while(y);return i},e.findNextMatch=function(e,t,o,n){var i=t.parseSearchRequest();if(!i)return null;var r=new p(i.wordSeparators,i.regex);return i.regex.multiline?this._doFindNextMatchMultiline(e,o,r,n):this._doFindNextMatchLineByLine(e,o,r,n)},e._doFindNextMatchMultiline=function(e,t,o,n){var a=new i.a(t.lineNumber,1),l=e.getOffsetAt(a),u=e.getLineCount(),d=e.getValueInRange(new r.a(a.lineNumber,a.column,u,e.getLineMaxColumn(u)),s.c.LF),g="\r\n"===e.getEOL()?new h(d):null;o.reset(t.column-1);var p=o.next(d);return p?c(this._getMultilineMatchRange(e,l,d,g,p.index,p[0]),p,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new i.a(1,1),o,n):null},e._doFindNextMatchLineByLine=function(e,t,o,n){var i=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(o,s,r,t.column,n);if(a)return a;for(var l=1;l<=i;l++){var u=(r+l-1)%i,c=e.getLineContent(u+1),h=this._findFirstMatchInLine(o,c,u+1,1,n);if(h)return h}return null},e._findFirstMatchInLine=function(e,t,o,n,i){e.reset(n-1);var s=e.next(t);return s?c(new r.a(o,s.index+1,o,s.index+1+s[0].length),s,i):null},e.findPreviousMatch=function(e,t,o,n){var i=t.parseSearchRequest();if(!i)return null;var r=new p(i.wordSeparators,i.regex);return i.regex.multiline?this._doFindPreviousMatchMultiline(e,o,r,n):this._doFindPreviousMatchLineByLine(e,o,r,n)},e._doFindPreviousMatchMultiline=function(e,t,o,n){var s=this._doFindMatchesMultiline(e,new r.a(1,1,t.lineNumber,t.column),o,n,9990);if(s.length>0)return s[s.length-1];var a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new i.a(a,e.getLineMaxColumn(a)),o,n):null},e._doFindPreviousMatchLineByLine=function(e,t,o,n){var i=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(o,s,r,n);if(a)return a;for(var l=1;l<=i;l++){var u=(i+r-l-1)%i,c=e.getLineContent(u+1),h=this._findLastMatchInLine(o,c,u+1,n);if(h)return h}return null},e._findLastMatchInLine=function(e,t,o,n){var i,s=null;for(e.reset(0);i=e.next(t);)s=c(new r.a(o,i.index+1,o,i.index+1+i[0].length),i,n);return s},e}();function g(e,t,o,n,i){return function(e,t,o,n,i){if(0===n)return!0;var r=t.charCodeAt(n-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(i>0){var s=t.charCodeAt(n);if(0!==e.get(s))return!0}return!1}(e,t,0,n,i)&&function(e,t,o,n,i){if(n+i===o)return!0;var r=t.charCodeAt(n+i);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(i>0){var s=t.charCodeAt(n+i-1);if(0!==e.get(s))return!0}return!1}(e,t,o,n,i)}var p=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,o=e.length;do{if(this._prevMatchStartIndex+this._prevMatchLength===o)return null;if(!(t=this._searchRegex.exec(e)))return null;var n=t.index,i=t[0].length;if(n===this._prevMatchStartIndex&&i===this._prevMatchLength)return null;if(this._prevMatchStartIndex=n,this._prevMatchLength=i,!this._wordSeparators||g(this._wordSeparators,e,o,n,i))return t}while(t);return null},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"b",(function(){return s}));var n=o(10),i=o(4),r=function(){function e(e,t,o,n,r){void 0===t&&(t=""),void 0===o&&(o=""),void 0===n&&(n=!0),this._onDidChange=new i.a,this._id=e,this._label=t,this._cssClass=o,this._enabled=n,this._actionCallback=r}return e.prototype.dispose=function(){this._onDidChange.dispose()},Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(e){this._setLabel(e)},enumerable:!0,configurable:!0}),e.prototype._setLabel=function(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._tooltip},set:function(e){this._setTooltip(e)},enumerable:!0,configurable:!0}),e.prototype._setTooltip=function(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))},Object.defineProperty(e.prototype,"class",{get:function(){return this._cssClass},set:function(e){this._setClass(e)},enumerable:!0,configurable:!0}),e.prototype._setClass=function(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._setEnabled(e)},enumerable:!0,configurable:!0}),e.prototype._setEnabled=function(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){this._setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radio",{get:function(){return this._radio},set:function(e){this._setRadio(e)},enumerable:!0,configurable:!0}),e.prototype._setChecked=function(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))},e.prototype._setRadio=function(e){this._radio!==e&&(this._radio=e,this._onDidChange.fire({radio:e}))},Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){return void 0!==this._actionCallback?this._actionCallback(e):n.b.as(!0)},e}(),s=function(){function e(){this._onDidBeforeRun=new i.a,this._onDidRun=new i.a}return Object.defineProperty(e.prototype,"onDidRun",{get:function(){return this._onDidRun.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBeforeRun",{get:function(){return this._onDidBeforeRun.event},enumerable:!0,configurable:!0}),e.prototype.run=function(e,t){var o=this;return e.enabled?(this._onDidBeforeRun.fire({action:e}),this.runAction(e,t).then((function(t){o._onDidRun.fire({action:e,result:t})}),(function(t){o._onDidRun.fire({action:e,error:t})}))):n.b.as(null)},e.prototype.runAction=function(e,t){var o=t?e.run(t):e.run();return n.b.is(o)?o:n.b.wrap(o)},e.prototype.dispose=function(){this._onDidBeforeRun.dispose(),this._onDidRun.dispose()},e}()},function(e,t,o){"use strict";o.d(t,"d",(function(){return r})),o.d(t,"c",(function(){return c})),o.d(t,"b",(function(){return h})),o.d(t,"a",(function(){return d}));var n,i=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function r(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var s,a=function(){function e(){this._value="",this._pos=0}return e.prototype.reset=function(e){return this._value=e,this._pos=0,this},e.prototype.next=function(){return this._pos+=1,this},e.prototype.hasNext=function(){return this._pos0)o.left||(o.left=new u,o.left.segment=n.value()),o=o.left;else if(i<0)o.right||(o.right=new u,o.right.segment=n.value()),o=o.right;else{if(!n.hasNext())break;n.next(),o.mid||(o.mid=new u,o.mid.segment=n.value()),o=o.mid}}var r=o.value;return o.value=t,o.key=e,r},e.prototype.get=function(e){for(var t=this._iter.reset(e),o=this._root;o;){var n=t.cmp(o.segment);if(n>0)o=o.left;else if(n<0)o=o.right;else{if(!t.hasNext())break;t.next(),o=o.mid}}return o?o.value:void 0},e.prototype.findSubstr=function(e){for(var t,o=this._iter.reset(e),n=this._root;n;){var i=o.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!o.hasNext())break;o.next(),t=n.value||t,n=n.mid}}return n&&n.value||t},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}(),h=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}();!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(s||(s={}));var d=function(e){function t(t,o){void 0===o&&(o=1);var n=e.call(this)||this;return n._limit=t,n._ratio=Math.min(Math.max(0,o),1),n}return i(t,e),t.prototype.get=function(t){return e.prototype.get.call(this,t,s.AsNew)},t.prototype.set=function(t,o){e.prototype.set.call(this,t,o,s.AsNew),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.get=function(e,t){void 0===t&&(t=s.None);var o=this._map.get(e);if(o)return t!==s.None&&this.touch(o,t),o.value},e.prototype.set=function(e,t,o){void 0===o&&(o=s.None);var n=this._map.get(e);if(n)n.value=t,o!==s.None&&this.touch(n,o);else{switch(n={key:e,value:t,next:void 0,previous:void 0},o){case s.None:this.addItemLast(n);break;case s.AsOld:this.addItemFirst(n);break;case s.AsNew:default:this.addItemLast(n)}this._map.set(e,n),this._size++}},e.prototype.forEach=function(e,t){for(var o=this._head;o;)t?e.bind(t)(o.value,o.key,this):e(o.value,o.key,this),o=o.next},e.prototype.trimOld=function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,o=this.size;t&&o>e;)this._map.delete(t.key),t=t.next,o--;this._head=t,this._size=o,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(t===s.AsOld||t===s.AsNew)if(t===s.AsOld){if(e===this._head)return;var o=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(o.previous=n,n.next=o),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===s.AsNew){if(e===this._tail)return;o=e.next,n=e.previous;e===this._head?(o.previous=void 0,this._head=o):(o.previous=n,n.next=o),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,o){e.push([o,t])})),e},e}())},function(e,t){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){"use strict";o(466);var n,i=o(1),r=o(15),s=o(41),a=o(73),l=o(59),u=o(28),c=o(17),h=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),d=11,g=function(e){function t(t){var o=e.call(this)||this;return o._onActivate=t.onActivate,o.bgDomNode=document.createElement("div"),o.bgDomNode.className="arrow-background",o.bgDomNode.style.position="absolute",o.bgDomNode.style.width=t.bgWidth+"px",o.bgDomNode.style.height=t.bgHeight+"px",void 0!==t.top&&(o.bgDomNode.style.top="0px"),void 0!==t.left&&(o.bgDomNode.style.left="0px"),void 0!==t.bottom&&(o.bgDomNode.style.bottom="0px"),void 0!==t.right&&(o.bgDomNode.style.right="0px"),o.domNode=document.createElement("div"),o.domNode.className=t.className,o.domNode.style.position="absolute",o.domNode.style.width=d+"px",o.domNode.style.height=d+"px",void 0!==t.top&&(o.domNode.style.top=t.top+"px"),void 0!==t.left&&(o.domNode.style.left=t.left+"px"),void 0!==t.bottom&&(o.domNode.style.bottom=t.bottom+"px"),void 0!==t.right&&(o.domNode.style.right=t.right+"px"),o._mouseMoveMonitor=o._register(new a.a),o.onmousedown(o.bgDomNode,(function(e){return o._arrowMouseDown(e)})),o.onmousedown(o.domNode,(function(e){return o._arrowMouseDown(e)})),o._mousedownRepeatTimer=o._register(new c.b),o._mousedownScheduleRepeatTimer=o._register(new c.f),o}return h(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(a.b,(function(e){}),(function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()},t}(l.a),p=o(6),f=o(42),m=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),_=function(e){function t(t,o,n){var i=e.call(this)||this;return i._visibility=t,i._visibleClassName=o,i._invisibleClassName=n,i._domNode=null,i._isVisible=!1,i._isNeeded=!1,i._shouldBeVisible=!1,i._revealTimer=i._register(new c.f),i}return m(t,e),t.prototype.applyVisibilitySetting=function(e){return this._visibility!==f.b.Hidden&&(this._visibility===f.b.Visible||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.setClassName(e._visibleClassName)}),0))},t.prototype._hide=function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))},t}(p.a),y=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),v=function(e){function t(t){var o=e.call(this)||this;return o._lazyRender=t.lazyRender,o._host=t.host,o._scrollable=t.scrollable,o._scrollbarState=t.scrollbarState,o._visibilityController=o._register(new _(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),o._mouseMoveMonitor=o._register(new a.a),o._shouldRender=!0,o.domNode=Object(u.b)(document.createElement("div")),o.domNode.setAttribute("role","presentation"),o.domNode.setAttribute("aria-hidden","true"),o._visibilityController.setDomNode(o.domNode),o.domNode.setPosition("absolute"),o.onmousedown(o.domNode.domNode,(function(e){return o._domNodeMouseDown(e)})),o}return y(t,e),t.prototype._createArrow=function(e){var t=this._register(new g(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)},t.prototype._createSlider=function(e,t,o,n){var i=this;this.slider=Object(u.b)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),this.slider.setWidth(o),this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(function(e){e.leftButton&&(e.preventDefault(),i._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,o=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderMousePosition(e);o<=i&&i<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){}))):this._onMouseDown(e)},t.prototype._onMouseDown=function(e){var t,o;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,o=e.browserEvent.offsetY;else{var n=i.u(this.domNode.domNode);t=e.posx-n.left,o=e.posy-n.top}this._setDesiredScrollPositionNow(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(t,o))),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(function(){})))},t.prototype._sliderMouseDown=function(e,t){var o=this,n=this._sliderMousePosition(e),i=this._sliderOrthogonalMousePosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(a.b,(function(e){var t=o._sliderOrthogonalMousePosition(e),a=Math.abs(t-i);if(r.g&&a>140)o._setDesiredScrollPositionNow(s.getScrollPosition());else{var l=o._sliderMousePosition(e)-n;o._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(l))}}),(function(){o.slider.toggleClassName("active",!1),o._host.onDragEnd(),t()})),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(l.a),b=function(){function e(e,t,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(o),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,o,n,i){var r=Math.max(0,o-e),s=Math.max(0,r-2*t),a=n>0&&n>o;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var l=Math.round(Math.max(20,Math.floor(o*s/n))),u=(s-l)/(n-o),c=i*u;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:u,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}(),E=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),C=function(e){function t(t,o,n){var i=e.call(this,{lazyRender:o.lazyRender,host:n,scrollbarState:new b(o.horizontalHasArrows?o.arrowSize:0,o.horizontal===f.b.Hidden?0:o.horizontalScrollbarSize,o.vertical===f.b.Hidden?0:o.verticalScrollbarSize),visibility:o.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(o.horizontalHasArrows){var r=(o.arrowSize-d)/2,a=(o.horizontalScrollbarSize-d)/2;i._createArrow({className:"left-arrow",top:a,left:r,bottom:void 0,right:void 0,bgWidth:o.arrowSize,bgHeight:o.horizontalScrollbarSize,onActivate:function(){return i._host.onMouseWheel(new s.c(null,1,0))}}),i._createArrow({className:"right-arrow",top:a,left:void 0,bottom:void 0,right:r,bgWidth:o.arrowSize,bgHeight:o.horizontalScrollbarSize,onActivate:function(){return i._host.onMouseWheel(new s.c(null,-1,0))}})}return i._createSlider(Math.floor((o.horizontalScrollbarSize-o.horizontalSliderSize)/2),0,null,o.horizontalSliderSize),i}return E(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}(v),S=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),T=function(e){function t(t,o,n){var i=e.call(this,{lazyRender:o.lazyRender,host:n,scrollbarState:new b(o.verticalHasArrows?o.arrowSize:0,o.vertical===f.b.Hidden?0:o.verticalScrollbarSize,0),visibility:o.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(o.verticalHasArrows){var r=(o.arrowSize-d)/2,a=(o.verticalScrollbarSize-d)/2;i._createArrow({className:"up-arrow",top:r,left:a,bottom:void 0,right:void 0,bgWidth:o.verticalScrollbarSize,bgHeight:o.arrowSize,onActivate:function(){return i._host.onMouseWheel(new s.c(null,0,1))}}),i._createArrow({className:"down-arrow",top:void 0,left:a,bottom:r,right:void 0,bgWidth:o.verticalScrollbarSize,bgHeight:o.arrowSize,onActivate:function(){return i._host.onMouseWheel(new s.c(null,0,-1))}})}return i._createSlider(0,Math.floor((o.verticalScrollbarSize-o.verticalSliderSize)/2),o.verticalSliderSize,null),i}return S(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}(v),w=o(4);o.d(t,"b",(function(){return L})),o.d(t,"c",(function(){return I})),o.d(t,"a",(function(){return D}));var k=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),O=function(e,t,o){this.timestamp=e,this.deltaX=t,this.deltaY=o,this.score=0},R=function(){function e(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}return e.prototype.isPhysicalMouseWheel=function(){if(-1===this._front&&-1===this._rear)return!1;for(var e=1,t=0,o=1,n=this._rear;;){var i=n===this._front?e:Math.pow(2,-o);if(e-=i,t+=this._memory[n].score*i,n===this._front)break;n=(this._capacity+n-1)%this._capacity,o++}return t<=.5},e.prototype.accept=function(e,t,o){var n=new O(e,t,o);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)},e.prototype._computeScore=function(e){if(Math.abs(e.deltaX)>0&&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}(),N=function(e){function t(t,o,n){var i=e.call(this)||this;i._onScroll=i._register(new w.a),i.onScroll=i._onScroll.event,t.style.overflow="hidden",i._options=A(o),i._scrollable=n,i._register(i._scrollable.onScroll((function(e){i._onDidScroll(e),i._onScroll.fire(e)})));var r={onMouseWheel:function(e){return i._onMouseWheel(e)},onDragStart:function(){return i._onDragStart()},onDragEnd:function(){return i._onDragEnd()}};return i._verticalScrollbar=i._register(new T(i._scrollable,i._options,r)),i._horizontalScrollbar=i._register(new C(i._scrollable,i._options,r)),i._domNode=document.createElement("div"),i._domNode.className="monaco-scrollable-element "+i._options.className,i._domNode.setAttribute("role","presentation"),i._domNode.style.position="relative",i._domNode.style.overflow="hidden",i._domNode.appendChild(t),i._domNode.appendChild(i._horizontalScrollbar.domNode.domNode),i._domNode.appendChild(i._verticalScrollbar.domNode.domNode),i._options.useShadows&&(i._leftShadowDomNode=Object(u.b)(document.createElement("div")),i._leftShadowDomNode.setClassName("shadow"),i._domNode.appendChild(i._leftShadowDomNode.domNode),i._topShadowDomNode=Object(u.b)(document.createElement("div")),i._topShadowDomNode.setClassName("shadow"),i._domNode.appendChild(i._topShadowDomNode.domNode),i._topLeftShadowDomNode=Object(u.b)(document.createElement("div")),i._topLeftShadowDomNode.setClassName("shadow top-left-corner"),i._domNode.appendChild(i._topLeftShadowDomNode.domNode)),i._listenOnDomNode=i._options.listenOnDomNode||i._domNode,i._mouseWheelToDispose=[],i._setListeningToMouseWheel(i._options.handleMouseWheel),i.onmouseover(i._listenOnDomNode,(function(e){return i._onMouseOver(e)})),i.onnonbubblingmouseout(i._listenOnDomNode,(function(e){return i._onMouseOut(e)})),i._hideTimeout=i._register(new c.f),i._isDragging=!1,i._mouseIsOver=!1,i._shouldRender=!0,i._revealOnScroll=!0,i}return k(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=Object(p.d)(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,r.d&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=A(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=Object(p.d)(this._mouseWheelToDispose),e)){var o=function(e){var o=new s.c(e);t._onMouseWheel(o)};this._mouseWheelToDispose.push(i.g(this._listenOnDomNode,"mousewheel",o)),this._mouseWheelToDispose.push(i.g(this._listenOnDomNode,"DOMMouseScroll",o))}},t.prototype._onMouseWheel=function(e){var t,o=R.INSTANCE;if(o.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var n=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(n=(t=[i,n])[0],i=t[1]);var s=!r.d&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||i||(i=n,n=0);var a=this._scrollable.getFutureScrollPosition(),l={};if(n){var u=a.scrollTop-50*n;this._verticalScrollbar.writeScrollPosition(l,u)}if(i){var c=a.scrollLeft-50*i;this._horizontalScrollbar.writeScrollPosition(l,c)}if(l=this._scrollable.validateScrollPosition(l),a.scrollLeft!==l.scrollLeft||a.scrollTop!==l.scrollTop)this._options.mouseWheelSmoothScroll&&o.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),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,o=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(o?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(o?" 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}(l.a),L=function(e){function t(t,o){var n=this;(o=o||{}).mouseWheelSmoothScroll=!1;var r=new f.a(0,(function(e){return i.L(e)}));return(n=e.call(this,t,o,r)||this)._register(r),n}return k(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){return this._scrollable.getCurrentScrollPosition()},t}(N),I=function(e){function t(t,o,n){return e.call(this,t,o,n)||this}return k(t,e),t}(N),D=function(e){function t(t,o){var n=e.call(this,t,o)||this;return n._element=t,n.onScroll((function(e){e.scrollTopChanged&&(n._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(n._element.scrollLeft=e.scrollLeft)})),n.scanDomNode(),n}return k(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}(L);function A(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:f.b.Auto,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:f.b.Auto,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,r.d&&(t.className+=" mac"),t}},function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"b",(function(){return s}));var n=o(10),i=o(22),r=Object(i.c)("openerService"),s=Object.freeze({_serviceBrand:void 0,open:function(){return n.b.as(void 0)}})},function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"a",(function(){return r}));var n=o(22),i=Object(n.c)("contextViewService"),r=Object(n.c)("contextMenuService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var n=o(39),i=o(15),r=o(37),s=o(57),a=new(function(){function e(){this._keybindings=[],this._keybindingsSorted=!0}return e.bindToCurrentPlatform=function(e){if(1===i.a){if(e&&e.win)return e.win}else if(2===i.a){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.prototype.registerKeybindingRule=function(t,o){void 0===o&&(o=0);var r=e.bindToCurrentPlatform(t);if(r&&r.primary&&this._registerDefaultKeybinding(Object(n.f)(r.primary,i.a),t.id,t.weight,0,t.when,o),r&&Array.isArray(r.secondary))for(var s=0,a=r.secondary.length;s=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,o){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 ",o)},e.prototype._registerDefaultKeybinding=function(e,t,o,n,r,s){0===s&&1===i.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:o,weight2:n}),this._keybindingsSorted=!1},e.prototype.getDefaultKeybindings=function(){return this._keybindingsSorted||(this._keybindings.sort(l),this._keybindingsSorted=!0),this._keybindings.slice(0)},e}());function l(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}s.a.add("platform.keybindingsRegistry",a)},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i})),o.d(t,"c",(function(){return r}));var n=function(){function e(e,t,o){this.offset=0|e,this.type=t,this.language=o}return e.prototype.toString=function(){return"("+this.offset+", "+this.type+")"},e}(),i=function(e,t){this.tokens=e,this.endState=t},r=function(e,t){this.tokens=e,this.endState=t}},function(e,t,o){"use strict";function n(e,t){for(var o=e.getCount(),n=e.findTokenIndexAtOffset(t),r=e.getLanguageId(n),s=n;s+10&&e.getLanguageId(a-1)===r;)a--;return new i(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return r}));var i=function(){function e(e,t,o,n,i,r){this._actual=e,this.languageId=t,this._firstTokenIndex=o,this._lastTokenIndex=n,this.firstCharOffset=i,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 r(e){return 0!=(7&e)}},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(11),i=function(){function e(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>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,o){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var n=t<<1,i=n+(o<<1),r=n;r0?this._tokens[e-1<<1]:0},e.prototype.getLanguageId=function(e){var t=this._tokens[1+(e<<1)];return n.x.getLanguageId(t)},e.prototype.getStandardTokenType=function(e){var t=this._tokens[1+(e<<1)];return n.x.getTokenType(t)},e.prototype.getForeground=function(e){var t=this._tokens[1+(e<<1)];return n.x.getForeground(t)},e.prototype.getClassName=function(e){var t=this._tokens[1+(e<<1)];return n.x.getClassNameFromMetadata(t)},e.prototype.getInlineStyle=function(e,t){var o=this._tokens[1+(e<<1)];return n.x.getInlineStyleFromMetadata(o,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,o){return new r(this,e,t,o)},e.convertToEndOffset=function(e,t){for(var o=(e.length>>>1)-1,n=0;n>>1)-1;ot&&(n=i)}return o},e}(),r=function(){function e(e,t,o,n){this._source=e,this._startOffset=t,this._endOffset=o,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(var i=this._firstTokenIndex,r=e.getCount();i=o)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}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return a})),o.d(t,"a",(function(){return l}));var n=o(2),i=o(9),r=o(18),s=o(8),a=function(){function e(e,t,o,n,i){this.value=e,this.selectionStart=t,this.selectionEnd=o,this.selectionStartPosition=n,this.selectionEndPosition=i}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,o){t.setValue(e,this.value),o&&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 o=this.value.substring(this.selectionStart,e);if(-1===o.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,o,1);var n=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,o){for(var n=0,i=-1;-1!==(i=t.indexOf("\n",i+1));)n++;return[e,o*t.length,n]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,o,n){if(!e)return{text:"",replaceCharCnt:0};var i=e.value,r=e.selectionStart,a=e.selectionEnd,l=t.value,u=t.selectionStart,c=t.selectionEnd;n&&i.length>0&&r===a&&u===c&&!s.startsWith(l,i)&&s.endsWith(l,i)&&(r=0,a=0);var h=i.substring(a),d=l.substring(c),g=s.commonSuffixLength(h,d);l=l.substring(0,l.length-g);var p=(i=i.substring(0,i.length-g)).substring(0,r),f=l.substring(0,u),m=s.commonPrefixLength(p,f);if(l=l.substring(m),i=i.substring(m),u-=m,r-=m,c-=m,a-=m,o&&u===c&&i.length>0){var _=null;if(u===l.length?s.startsWith(l,i)&&(_=l.substring(i.length)):s.endsWith(l,i)&&(_=l.substring(0,l.length-i.length)),null!==_&&_.length>0&&(/\uFE0F/.test(_)||s.containsEmoji(_)))return{text:_,replaceCharCnt:0}}return u===c?i===l&&0===r&&a===i.length&&u===l.length&&-1===l.indexOf("\n")&&s.containsFullWidthCharacter(l)?{text:"",replaceCharCnt:0}:{text:l,replaceCharCnt:p.length-m}:{text:l,replaceCharCnt:a-r}},e.EMPTY=new e("",0,0,null,null),e}(),l=function(){function e(){}return e._getPageOfLine=function(t){return Math.floor((t-1)/e._LINES_PER_PAGE)},e._getRangeForPage=function(t){var o=t*e._LINES_PER_PAGE,i=o+1,r=o+e._LINES_PER_PAGE;return new n.a(i,1,r+1,1)},e.fromEditorSelection=function(t,o,s,l){var u=e._getPageOfLine(s.startLineNumber),c=e._getRangeForPage(u),h=e._getPageOfLine(s.endLineNumber),d=e._getRangeForPage(h),g=c.intersectRanges(new n.a(1,1,s.startLineNumber,s.startColumn)),p=o.getValueInRange(g,r.c.LF),f=o.getLineCount(),m=o.getLineMaxColumn(f),_=d.intersectRanges(new n.a(s.endLineNumber,s.endColumn,f,m)),y=o.getValueInRange(_,r.c.LF),v=null;if(u===h||u+1===h)v=o.getValueInRange(s,r.c.LF);else{var b=c.intersectRanges(s),E=d.intersectRanges(s);v=o.getValueInRange(b,r.c.LF)+String.fromCharCode(8230)+o.getValueInRange(E,r.c.LF)}if(l){p.length>500&&(p=p.substring(p.length-500,p.length)),y.length>500&&(y=y.substring(0,500)),v.length>1e3&&(v=v.substring(0,500)+String.fromCharCode(8230)+v.substring(v.length-500,v.length))}return new a(p+v+y,p.length,p.length+v.length,new i.a(s.startLineNumber,s.startColumn),new i.a(s.endLineNumber,s.endColumn))},e._LINES_PER_PAGE=10,e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("modeService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(8),i=function(){function e(e,t){if(this.flags=t,0!=(1&this.flags)){var o=e.getModel();this.modelVersionId=o?n.format("{0}#{1}",o.uri.toString(),o.getVersionId()):null}0!=(4&this.flags)&&(this.position=e.getPosition()),0!=(2&this.flags)&&(this.selection=e.getSelection()),0!=(8&this.flags)&&(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop())}return e.prototype._equals=function(t){if(!(t instanceof e))return!1;var o=t;return this.modelVersionId===o.modelVersionId&&(this.scrollLeft===o.scrollLeft&&this.scrollTop===o.scrollTop&&(!(!this.position&&o.position||this.position&&!o.position||this.position&&o.position&&!this.position.equals(o.position))&&!(!this.selection&&o.selection||this.selection&&!o.selection||this.selection&&o.selection&&!this.selection.equalsRange(o.selection))))},e.prototype.validate=function(t){return this._equals(new e(t,this.flags))},e}(),r=function(){function e(e,t){this._visiblePosition=e,this._visiblePositionScrollDelta=t}return e.capture=function(t){var o=null,n=0;if(0!==t.getScrollTop()){var i=t.getVisibleRanges();if(i.length>0){o=i[0].getStartPosition();var r=t.getTopForPosition(o.lineNumber,o.column);n=t.getScrollTop()-r}}return new e(o,n)},e.prototype.restore=function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("editorWorkerService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"d",(function(){return i})),o.d(t,"b",(function(){return r})),o.d(t,"c",(function(){return s}));var n=function(){function e(e,t,o){for(var n=new Uint8Array(e*t),i=0,r=e*t;i255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}function s(e){for(var t=e.length,o=new Uint32Array(t),n=0;n=this.el.clientHeight-4&&(s=this.orthogonalEndSash):e.offsetX<=4?s=this.orthogonalStartSash:e.offsetX>=this.el.clientWidth-4&&(s=this.orthogonalEndSash),s&&(o=!0,e.__orthogonalSashEvent=!0,s.onMouseDown(e))}if(this.state){for(var l=0,u=Object(d.v)("iframe");l1){var h=n-1;for(h=n-1;h>=1;h--){var d=o.getLineContent(h);if(a.lastNonWhitespaceIndex(d)>=0)break}if(h<1)return null;var g=o.getLineMaxColumn(h),p=u.a.getEnterAction(o,new s.a(h,g,h,g));p&&(r=p.indentation,(i=p.enterAction)&&(r+=i.appendText))}return i&&(i===c.a.Indent&&(r=e.shiftIndent(t,r)),i===c.a.Outdent&&(r=e.unshiftIndent(t,r)),r=t.normalizeIndentation(r)),r||null},e._replaceJumpToNextIndent=function(e,t,o,n){var s="",a=o.getStartPosition();if(e.insertSpaces)for(var l=r.a.visibleColumnFromColumn2(e,t,a),u=e.tabSize,c=u-l%u,h=0;h=0?l.setEndPosition(l.endLineNumber,Math.max(l.endColumn,N+1)):l.setEndPosition(l.endLineNumber,o.getLineMaxColumn(l.endLineNumber)),n)return new i.d(l,O+t.normalizeIndentation(C.afterEnter),!0);var L=0;return k<=N+1&&(t.insertSpaces||(w=Math.ceil(w/t.tabSize)),L=Math.min(w+1-t.normalizeIndentation(C.afterEnter).length-1,0)),new i.c(l,O+t.normalizeIndentation(C.afterEnter),0,L,!0)}return e._typeCommand(l,"\n"+t.normalizeIndentation(T),n)},e._isAutoIndentType=function(e,t,o){if(!e.autoIndent)return!1;for(var n=0,i=o.length;n1){var d=Object(g.a)(t.wordSeparators),p=h.charCodeAt(c.column-2);if(0===d.get(p))return!1}var f=h.charAt(c.column-1);if(f)if(!e._isBeforeClosingBrace(t,r,f)&&!/\s/.test(f))return!1;if(!o.isCheapToTokenize(c.lineNumber))return!1;o.forceTokenization(c.lineNumber);var m=o.getLineTokens(c.lineNumber),_=!1;try{_=u.a.shouldAutoClosePair(r,m,c.column)}catch(e){Object(n.e)(e)}if(!_)return!1}return!0},e._runAutoClosingOpenCharType=function(e,t,o,n,s){for(var a=[],l=0,u=n.length;l2){var m=Object(g.a)(o.wordSeparators),_=d.charCodeAt(h.column-3);if(0===m.get(_))continue}var y=d.charAt(h.column-1);if(y)if(!e._isBeforeClosingBrace(o,p,y)&&!/\s/.test(y))continue;if(!s.isCheapToTokenize(h.lineNumber))continue;s.forceTokenization(h.lineNumber);var v=s.getLineTokens(h.lineNumber),b=!1;try{b=u.a.shouldAutoClosePair(p,v,h.column-1)}catch(e){Object(n.e)(e)}if(b){var E=o.autoClosingPairsOpen[p];l[c]=new i.c(a[c],E,0,-E.length)}}}return new r.e(1,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})},e.typeWithInterceptors=function(t,o,n,s,a){if("\n"===a){for(var l=[],u=0,c=s.length;u=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},m=function(e,t){return function(o,n){t(o,n,e)}},_=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},y=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1] "+e:e}},e.exports=n},function(e,t,o){"use strict";function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0});const i=o(121);t.ErrorCodes=i.ErrorCodes,t.ResponseError=i.ResponseError,t.CancellationToken=i.CancellationToken,t.CancellationTokenSource=i.CancellationTokenSource,t.Disposable=i.Disposable,t.Event=i.Event,t.Emitter=i.Emitter,t.Trace=i.Trace,t.TraceFormat=i.TraceFormat,t.SetTraceNotification=i.SetTraceNotification,t.LogTraceNotification=i.LogTraceNotification,t.RequestType=i.RequestType,t.RequestType0=i.RequestType0,t.NotificationType=i.NotificationType,t.NotificationType0=i.NotificationType0,t.MessageReader=i.MessageReader,t.MessageWriter=i.MessageWriter,t.ConnectionStrategy=i.ConnectionStrategy,t.StreamMessageReader=i.StreamMessageReader,t.StreamMessageWriter=i.StreamMessageWriter,t.IPCMessageReader=i.IPCMessageReader,t.IPCMessageWriter=i.IPCMessageWriter,t.createClientPipeTransport=i.createClientPipeTransport,t.createServerPipeTransport=i.createServerPipeTransport,t.generateRandomPipeName=i.generateRandomPipeName,t.createClientSocketTransport=i.createClientSocketTransport,t.createServerSocketTransport=i.createServerSocketTransport,n(o(509)),n(o(510)),t.createProtocolConnection=function(e,t,o,n){return i.createMessageConnection(e,t,o,n)}},function(e,t,o){"use strict";o.d(t,"a",(function(){return u}));var n,i=o(115),r=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),s=function(e){function t(t){for(var o=e.call(this,0)||this,n=0,i=t.length;n0&&"#"===o.charAt(o.length-1)?o.substring(0,o.length-1):o)]=t,this._onDidChangeSchema.fire(e)},e}());r.a.add(l,u),o.d(t,"b",(function(){return h})),o.d(t,"a",(function(){return c})),o.d(t,"c",(function(){return C}));var c,h={Configuration:"base.contributions.configuration"};!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(c||(c={}));var d={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},m="vscode://schemas/settings/editor",_=r.a.as(l),y=function(){function e(){this.overrideIdentifiers=[],this._onDidSchemaChange=new i.a,this._onDidRegisterConfiguration=new i.a,this.configurationContributors=[],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.configurationProperties={},this.excludedConfigurationProperties={},this.computeOverridePropertyPattern(),_.registerSchema(m,this.editorConfigurationSchema)}return e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),this.registerConfigurations([e],[],t)},e.prototype.registerConfigurations=function(e,t,o){var n=this;void 0===o&&(o=!0);var i=this.toConfiguration(t);i&&e.push(i);var r=[];e.forEach((function(e){r.push.apply(r,n.validateAndRegisterProperties(e,o)),n.configurationContributors.push(e),n.registerJSONConfiguration(e),n.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:n.a("defaultConfigurations.title","Default Configuration Overrides"),properties:{}},o=0,i=e;o/?";var i=function(e){void 0===e&&(e="");for(var t="(-?\\d*\\.\\d\\w*)|([^",o=0;o=0||(t+="\\"+n[o]);return t+="\\s]+)",new RegExp(t,"g")}();function r(e){var t=i;if(e&&e instanceof RegExp)if(e.global)t=e;else{var o="g";e.ignoreCase&&(o+="i"),e.multiline&&(o+="m"),t=new RegExp(e.source,o)}return t.lastIndex=0,t}function s(e,t,o,n){t.lastIndex=0;var i=t.exec(o);if(!i)return null;var r=i[0].indexOf(" ")>=0?function(e,t,o,n){var i,r=e-1-n;for(t.lastIndex=0;i=t.exec(o);){if(i.index>r)return null;if(t.lastIndex>=r)return{word:i[0],startColumn:n+1+i.index,endColumn:n+1+t.lastIndex}}return null}(e,t,o,n):function(e,t,o,n){var i,r=e-1-n,s=o.lastIndexOf(" ",r-1)+1,a=o.indexOf(" ",r);for(-1===a&&(a=o.length),t.lastIndex=s;i=t.exec(o);)if(i.index<=r&&t.lastIndex>=r)return{word:i[0],startColumn:n+1+i.index,endColumn:n+1+t.lastIndex};return null}(e,t,o,n);return t.lastIndex=0,r}},function(e,t,o){"use strict";o.d(t,"b",(function(){return s})),o.d(t,"a",(function(){return _}));var n=o(8),i=o(2),r=function(e,t,o,n,i){this.languageIdentifier=e,this.open=t,this.close=o,this.forwardRegex=n,this.reversedRegex=i},s=function(e,t){var o=this;this.brackets=t.map((function(t){return new r(e,t[0],t[1],l({open:t[0],close:t[1]}),u({open:t[0],close:t[1]}))})),this.forwardRegex=c(this.brackets),this.reversedRegex=h(this.brackets),this.textIsBracket={},this.textIsOpenBracket={};var n=0;this.brackets.forEach((function(e){o.textIsBracket[e.open.toLowerCase()]=e,o.textIsBracket[e.close.toLowerCase()]=e,o.textIsOpenBracket[e.open.toLowerCase()]=!0,o.textIsOpenBracket[e.close.toLowerCase()]=!1,n=Math.max(n,e.open.length),n=Math.max(n,e.close.length)})),this.maxBracketLength=n};function a(e,t){var o={};return function(n){var i=e(n);return o.hasOwnProperty(i)||(o[i]=t(n)),o[i]}}var l=a((function(e){return e.open+";"+e.close}),(function(e){return g([e.open,e.close])})),u=a((function(e){return e.open+";"+e.close}),(function(e){return g([m(e.open),m(e.close)])})),c=a((function(e){return e.map((function(e){return e.open+";"+e.close})).join(";")}),(function(e){var t=[];return e.forEach((function(e){t.push(e.open),t.push(e.close)})),g(t)})),h=a((function(e){return e.map((function(e){return e.open+";"+e.close})).join(";")}),(function(e){var t=[];return e.forEach((function(e){t.push(m(e.open)),t.push(m(e.close))})),g(t)}));function d(e){var t=/^[\w]+$/.test(e);return e=n.escapeRegExpCharacters(e),t?"\\b"+e+"\\b":e}function g(e){var t="("+e.map(d).join(")|(")+")";return n.createRegExp(t,!0)}var p,f,m=(p=null,f=null,function(e){return p!==e&&(f=function(e){for(var t="",o=e.length-1;o>=0;o--)t+=e.charAt(o);return t}(p=e)),f}),_=function(){function e(){}return e._findPrevBracketInText=function(e,t,o,n){var r=o.match(e);if(!r)return null;var s=o.length-r.index,a=r[0].length,l=n+s;return new i.a(t,l-a+1,t,l+1)},e.findPrevBracketInToken=function(e,t,o,n,i){var r=m(o).substring(o.length-i,o.length-n);return this._findPrevBracketInText(e,t,r,n)},e.findNextBracketInText=function(e,t,o,n){var r=o.match(e);if(!r)return null;var s=r.index,a=r[0].length;if(0===a)return null;var l=n+s;return new i.a(t,l+1,t,l+1+a)},e.findNextBracketInToken=function(e,t,o,n,i){var r=o.substring(n,i);return this.findNextBracketInText(e,t,r,n)},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return c})),o.d(t,"b",(function(){return g}));var n,i=o(20),r=o(9),s=o(102),a=o(8),l=o(2),u=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),c=function(){function e(){}return e._createWord=function(e,t,o,n,i){return{start:n,end:i,wordType:t,nextCharClass:o}},e._findPreviousWordOnLine=function(e,t,o){var n=t.getLineContent(o.lineNumber);return this._doFindPreviousWordOnLine(n,e,o)},e._doFindPreviousWordOnLine=function(e,t,o){for(var n=0,i=o.column-2;i>=0;i--){var r=e.charCodeAt(i),s=t.get(r);if(0===s){if(2===n)return this._createWord(e,n,s,i+1,this._findEndOfWord(e,t,n,i+1));n=1}else if(2===s){if(1===n)return this._createWord(e,n,s,i+1,this._findEndOfWord(e,t,n,i+1));n=2}else if(1===s&&0!==n)return this._createWord(e,n,s,i+1,this._findEndOfWord(e,t,n,i+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null},e._findEndOfWord=function(e,t,o,n){for(var i=e.length,r=n;r=0;i--){var r=e.charCodeAt(i),s=t.get(r);if(1===s)return i+1;if(1===o&&2===s)return i+1;if(2===o&&0===s)return i+1}return 0},e.moveWordLeft=function(t,o,n,i){var s=n.lineNumber,a=n.column;1===a&&s>1&&(s-=1,a=o.getLineMaxColumn(s));var l=e._findPreviousWordOnLine(t,o,new r.a(s,a));return 0===i?(l&&2===l.wordType&&l.end-l.start==1&&0===l.nextCharClass&&(l=e._findPreviousWordOnLine(t,o,new r.a(s,l.start+1))),a=l?l.start+1:1):(l&&a<=l.end+1&&(l=e._findPreviousWordOnLine(t,o,new r.a(s,l.start+1))),a=l?l.end+1:1),new r.a(s,a)},e.moveWordRight=function(t,o,n,i){var s=n.lineNumber,a=n.column;a===o.getLineMaxColumn(s)&&s=l.start+1&&(l=e._findNextWordOnLine(t,o,new r.a(s,l.end+1))),a=l?l.start+1:o.getLineMaxColumn(s)),new r.a(s,a)},e._deleteWordLeftWhitespace=function(e,t){var o=e.getLineContent(t.lineNumber),n=t.column-2,i=a.lastNonWhitespaceIndex(o,n);return i+11?c=1:(u--,c=o.getLineMaxColumn(u)):(d&&c<=d.end+1&&(d=e._findPreviousWordOnLine(t,o,new r.a(u,d.start+1))),d?c=d.end+1:c>1?c=1:(u--,c=o.getLineMaxColumn(u))),new l.a(u,c,a.lineNumber,a.column)},e._findFirstNonWhitespaceChar=function(e,t){for(var o=e.length,n=t;n=p.start+1&&(p=e._findNextWordOnLine(t,o,new r.a(u,p.end+1))),p?c=p.start+1:c=0;n--){var i=e.charCodeAt(n);if(32===i||9===i||!o&&a.isUpperAsciiLetter(i)||95===i)return n-1;if(o&&n1?new r.a(i-1,t.getLineMaxColumn(i-1)):o;var a=c.moveWordLeft(e,t,o,n),l=h(t.getLineContent(i),s-2),u=new r.a(i,l+2);return u.isBeforeOrEqual(a)?a:u},t.moveWordPartRight=function(e,t,o,n){var i=o.lineNumber,s=o.column;if(s===t.getLineMaxColumn(i))return i1)for(var o=1;o0?[{start:0,end:t.length}]:[]}.bind(void 0,!0);function a(e){return 97<=e&&e<=122}function l(e){return 65<=e&&e<=90}function u(e){return 48<=e&&e<=57}function c(e){return 32===e||9===e||10===e||13===e}function h(e){return a(e)||l(e)||u(e)}function d(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function g(e,t){for(var o=t;o0&&!h(e.charCodeAt(o-1)))return o}return e.length}function p(e,t,o,n){if(o===e.length)return[];if(n===t.length)return null;if(e[o]!==t[n].toLowerCase())return null;var i=null,r=n+1;for(i=p(e,t,o+1,n+1);!i&&(r=g(t,r))60)return null;var o=function(e){for(var t=0,o=0,n=0,i=0,r=0,s=0;s.2&&t<.8&&n>.6&&i<.2}(o)){if(!function(e){var t=e.upperPercent;return 0===e.lowerPercent&&t>.6}(o))return null;t=t.toLowerCase()}var n=null,i=0;for(e=e.toLowerCase();i=0&&(n.push(s),i=s+1)}return[n.length,n]}function E(e){var t,o=[];if(!e)return o;for(var n=0,i=e;n=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:return!0;default:return!1}}function N(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function L(e,t,o,n){var i=e.length>100?100:e.length,r=t.length>100?100:t.length,s=0;for(void 0===o&&(o=i);sr)){for(var a=e.toLowerCase(),l=t.toLowerCase(),u=s,c=0;u1?1:h),p=S[u-1][c]+-1,f=S[u][c-1]+-1;f>=p?f>g?(S[u][c]=f,w[u][c]=4):f===g?(S[u][c]=f,w[u][c]=6):(S[u][c]=g,w[u][c]=2):p>g?(S[u][c]=p,w[u][c]=1):p===g?(S[u][c]=p,w[u][c]=3):(S[u][c]=g,w[u][c]=2)}if(k&&(console.log(O(S,e,i,t,r)),console.log(O(w,e,i,t,r)),console.log(O(T,e,i,t,r))),D=0,A=-100,P=s,M=n,function e(t,o,n,i,r){if(D>=10||n<-25)return;var s=0;for(;t>P&&o>0;){var a=T[t][o],l=w[t][o];if(4===l)o-=1,r?n-=5:i.isEmpty()||(n-=1),r=!1,s=0;else{if(!(2&l))return;if(4&l&&e(t,o-1,i.isEmpty()?n:n-1,i.slice(),r),n+=a,t-=1,o-=1,i.unshift(o),r=!0,1===a){if(s+=1,t===P&&!M)return}else n+=1+s*(a-1),s=0}}n-=o>=3?9:3*o;D+=1;n>A&&(A=n,I=i)}(i,r,i===r?1:0,new x,!1),0!==D)return[A,I.toArray()]}}}var I,D=0,A=0,P=0,M=!1;var x=function(){function e(){}return e.prototype.isEmpty=function(){return!this._data&&(!this._parent||this._parent.isEmpty())},e.prototype.unshift=function(e){this._data?this._data.unshift(e):this._data=[e]},e.prototype.slice=function(){var t=new e;return t._parent=this,t._parentLen=this._data?this._data.length:0,t},e.prototype.toArray=function(){if(!this._data)return this._parent.toArray();for(var e=[],t=this;t;)t._parent&&t._parent._data&&e.push(t._parent._data.slice(t._parent._data.length-t._parentLen)),t=t._parent;return Array.prototype.concat.apply(this._data,e)},e}();function B(e,t,o){return function(e,t,o,n){var i=L(e,t,n);if(i&&!o)return i;if(e.length>=3)for(var r=Math.min(7,e.length-1),s=1;si[0])&&(i=l))}}return i}(e,t,!0,o)}function F(e,t){if(!(t+1>=e.length)){var o=e[t],n=e[t+1];if(o!==n)return e.slice(0,t)+n+o+e.slice(t+2)}}},function(e,t,o){"use strict";o.d(t,"a",(function(){return s})),o.d(t,"b",(function(){return a})),o.d(t,"c",(function(){return l}));var n,i,r=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});!function(e){var t={next:function(){return{done:!0,value:void 0}}};function o(e,t){for(var o=e.next();!o.done;o=e.next())t(o.value)}e.empty=function(){return t},e.iterate=function(e,t,o){return void 0===t&&(t=0),void 0===o&&(o=e.length),{next:function(){return t>=o?{done:!0,value:void 0}:{done:!1,value:e[t++]}}}},e.map=function(e,t){return{next:function(){var o=e.next(),n=o.done,i=o.value;return{done:n,value:n?void 0:t(i)}}}},e.filter=function(e,t){return{next:function(){for(;;){var o=e.next(),n=o.done,i=o.value;if(n)return{done:n,value:void 0};if(t(i))return{done:n,value:i}}}}},e.forEach=o,e.collect=function(e){var t=[];return o(e,(function(e){return t.push(e)})),t}}(i||(i={}));var s=function(){function e(e,t,o,n){void 0===t&&(t=0),void 0===o&&(o=e.length),void 0===n&&(n=t-1),this.items=e,this.start=t,this.end=o,this.index=n}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}(),a=function(e){function t(t,o,n,i){return void 0===o&&(o=0),void 0===n&&(n=t.length),void 0===i&&(i=o-1),e.call(this,t,o,n,i)||this}return r(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}(s),l=function(){function e(e,t){this.iterator=e,this.fn=t}return e.prototype.next=function(){return this.fn(this.iterator.next())},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"c",(function(){return v})),o.d(t,"b",(function(){return E}));o(468);var n,i,r=o(0),s=o(78),a=o(8),l=o(30),u=o(34),c=o(4),h=o(1),d=o(74),g=o(36),p=o(207),f=o(157),m=o(12),_=o(14),y=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function v(e){var t=e.get(g.a).getFocusedCodeEditor();return t instanceof f.a?t.getParentEditor():t}!function(e){e.inPeekEditor=new m.f("inReferenceSearchEditor",!0),e.notInPeekEditor=e.inPeekEditor.toNegated()}(i||(i={}));var b={headerBackgroundColor:_.a.white,primaryHeadingColor:_.a.fromHex("#333333"),secondaryHeadingColor:_.a.fromHex("#6c6c6cb3")},E=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return n._onDidClose=new c.a,l.g(n.options,b,!1),n}return y(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._onDidClose.fire(this)},Object.defineProperty(t.prototype,"onDidClose",{get:function(){return this._onDidClose.event},enumerable:!0,configurable:!0}),t.prototype.style=function(t){var o=this.options;t.headerBackgroundColor&&(o.headerBackgroundColor=t.headerBackgroundColor),t.primaryHeadingColor&&(o.primaryHeadingColor=t.primaryHeadingColor),t.secondaryHeadingColor&&(o.secondaryHeadingColor=t.secondaryHeadingColor),e.prototype.style.call(this,t)},t.prototype._applyStyles=function(){e.prototype._applyStyles.call(this);var t=this.options;this._headElement&&(this._headElement.style.backgroundColor=t.headerBackgroundColor.toString()),this._primaryHeading&&(this._primaryHeading.style.color=t.primaryHeadingColor.toString()),this._secondaryHeading&&(this._secondaryHeading.style.color=t.secondaryHeadingColor.toString()),this._bodyElement&&(this._bodyElement.style.borderColor=t.frameColor.toString())},t.prototype._fillContainer=function(e){this.setCssClass("peekview-widget"),this._headElement=Object(u.a)(".head").getHTMLElement(),this._bodyElement=Object(u.a)(".body").getHTMLElement(),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)},t.prototype._fillHead=function(e){var t=this,o=Object(u.a)(".peekview-title").on(h.d.CLICK,(function(e){return t._onTitleClick(e)})).appendTo(this._headElement).getHTMLElement();this._primaryHeading=Object(u.a)("span.filename").appendTo(o).getHTMLElement(),this._secondaryHeading=Object(u.a)("span.dirname").appendTo(o).getHTMLElement(),this._metaHeading=Object(u.a)("span.meta").appendTo(o).getHTMLElement();var n=Object(u.a)(".peekview-actions").appendTo(this._headElement),i=this._getActionBarOptions();this._actionbarWidget=new d.a(n.getHTMLElement(),i),this._disposables.push(this._actionbarWidget),this._actionbarWidget.push(new s.a("peekview.close",r.a("label.close","Close"),"close-peekview-action",!0,(function(){return t.dispose(),null})),{label:!1,icon:!0})},t.prototype._getActionBarOptions=function(){return{}},t.prototype._onTitleClick=function(e){},t.prototype.setTitle=function(e,t){Object(u.a)(this._primaryHeading).safeInnerHtml(e),this._primaryHeading.setAttribute("aria-label",e),t?Object(u.a)(this._secondaryHeading).safeInnerHtml(t):h.l(this._secondaryHeading)},t.prototype.setMetaTitle=function(e){e?Object(u.a)(this._metaHeading).safeInnerHtml(e):h.l(this._metaHeading)},t.prototype._doLayout=function(e,t){if(!this._isShowing&&e<0)this.dispose();else{var o=Math.ceil(1.2*this.editor.getConfiguration().lineHeight),n=e-(o+2);this._doLayoutHead(o,t),this._doLayoutBody(n,t)}},t.prototype._doLayoutHead=function(e,t){this._headElement.style.height=a.format("{0}px",e),this._headElement.style.lineHeight=this._headElement.style.height},t.prototype._doLayoutBody=function(e,t){this._bodyElement.style.height=a.format("{0}px",e)},t}(p.a)},function(e,t,o){"use strict";o.d(t,"d",(function(){return l})),o.d(t,"b",(function(){return c})),o.d(t,"a",(function(){return h})),o.d(t,"c",(function(){return _}));var n,i,r=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),s=function(){function e(){this.text("")}return e.isDigitCharacter=function(e){return e>=48&&e<=57},e.isVariableCharacter=function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90},e.prototype.text=function(e){this.value=e,this.pos=0},e.prototype.tokenText=function(e){return this.value.substr(e.pos,e.len)},e.prototype.next=function(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};var t,o=this.pos,n=0,i=this.value.charCodeAt(o);if("number"==typeof(t=e._table[i]))return this.pos+=1,{type:t,pos:o,len:1};if(e.isDigitCharacter(i)){t=8;do{n+=1,i=this.value.charCodeAt(o+n)}while(e.isDigitCharacter(i));return this.pos+=n,{type:t,pos:o,len:n}}if(e.isVariableCharacter(i)){t=9;do{i=this.value.charCodeAt(o+ ++n)}while(e.isVariableCharacter(i)||e.isDigitCharacter(i));return this.pos+=n,{type:t,pos:o,len:n}}t=10;do{n+=1,i=this.value.charCodeAt(o+n)}while(!isNaN(i)&&void 0===e._table[i]&&!e.isDigitCharacter(i)&&!e.isVariableCharacter(i));return this.pos+=n,{type:t,pos:o,len:n}},e._table=((i={})[36]=0,i[58]=1,i[44]=2,i[123]=3,i[125]=4,i[92]=5,i[47]=6,i[124]=7,i[43]=11,i[45]=12,i[63]=13,i),e}(),a=function(){function e(){this._children=[]}return e.prototype.appendChild=function(e){return e instanceof l&&this._children[this._children.length-1]instanceof l?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this},e.prototype.replace=function(e,t){var o=e.parent,n=o.children.indexOf(e),i=o.children.slice(0);i.splice.apply(i,[n,1].concat(t)),o._children=i,t.forEach((function(e){return e.parent=o}))},Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snippet",{get:function(){for(var e=this;;){if(!e)return;if(e instanceof m)return e;e=e.parent}},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.children.reduce((function(e,t){return e+t.toString()}),"")},e.prototype.len=function(){return 0},e}(),l=function(e){function t(t){var o=e.call(this)||this;return o.value=t,o}return r(t,e),t.prototype.toString=function(){return this.value},t.prototype.len=function(){return this.value.length},t.prototype.clone=function(){return new t(this.value)},t}(a),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t}(a),c=function(e){function t(t){var o=e.call(this)||this;return o.index=t,o}return r(t,e),t.compareByIndex=function(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop?-1:e.indext.index?1:0},Object.defineProperty(t.prototype,"isFinalTabstop",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return 1===this._children.length&&this._children[0]instanceof h?this._children[0]:void 0},enumerable:!0,configurable:!0}),t.prototype.clone=function(){var e=new t(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e},t}(u),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=[],t}return r(t,e),t.prototype.appendChild=function(e){return e instanceof l&&(e.parent=this,this.options.push(e)),this},t.prototype.toString=function(){return this.options[0].value},t.prototype.len=function(){return this.options[0].len()},t.prototype.clone=function(){var e=new t;return this.options.forEach(e.appendChild,e),e},t}(a),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.resolve=function(e){var t=this;return e.replace(this.regexp,(function(){for(var e="",o=0,n=t._children;oi.index?arguments[i.index]:"";e+=r=i.resolve(r)}else e+=i.toString()}return e}))},t.prototype.toString=function(){return""},t.prototype.clone=function(){var e=new t;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((function(e){return e.clone()})),e},t}(a),g=function(e){function t(t,o,n,i){var r=e.call(this)||this;return r.index=t,r.shorthandName=o,r.ifValue=n,r.elseValue=i,r}return r(t,e),t.prototype.resolve=function(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue},t.prototype.clone=function(){return new t(this.index,this.shorthandName,this.ifValue,this.elseValue)},t}(a),p=function(e){function t(t){var o=e.call(this)||this;return o.name=t,o}return r(t,e),t.prototype.resolve=function(e){var t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new l(t)],!0)},t.prototype.clone=function(){var e=new t(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((function(e){return e.clone()})),e},t}(u);function f(e,t){for(var o=e.slice();o.length>0;){var n=o.shift();if(!t(n))break;o.unshift.apply(o,n.children)}}var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t.prototype,"placeholderInfo",{get:function(){if(!this._placeholders){var e,t=[];this.walk((function(o){return o instanceof c&&(t.push(o),e=!e||e.index0?i.set(e.index,e.children):r.push(e)),!0}));for(var a=0,l=r;a0&&t),!i.has(0)&&o&&n.appendChild(new c(0)),n},e.prototype._accept=function(e,t){if(void 0===e||this._token.type===e){var o=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),o}return!1},e.prototype._backTo=function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1},e.prototype._until=function(e){if(14===this._token.type)return!1;for(var t=this._token;this._token.type!==e;)if(this._token=this._scanner.next(),14===this._token.type)return!1;var o=this._scanner.value.substring(t.pos,this._token.pos);return this._token=this._scanner.next(),o},e.prototype._parse=function(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)},e.prototype._parseEscaped=function(e){var t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new l(t)),!0)},e.prototype._parseTabstopOrVariableName=function(e){var t,o=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new c(Number(t)):new p(t)),!0):this._backTo(o)},e.prototype._parseComplexPlaceholder=function(e){var t,o=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(o);var n=new c(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new l("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(o),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(o);for(var i=new h;;){if(this._parseChoiceElement(i)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(i),this._accept(4)))return e.appendChild(n),!0}return this._backTo(o),!1}}},e.prototype._parseChoiceElement=function(e){for(var t=this._token,o=[];2!==this._token.type&&7!==this._token.type;){var n=void 0;if(!(n=(n=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||n:this._accept(void 0,!0)))return this._backTo(t),!1;o.push(n)}return 0===o.length?(this._backTo(t),!1):(e.appendChild(new l(o.join(""))),!0)},e.prototype._parseComplexVariable=function(e){var t,o=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(o);var n=new p(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(o),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(o);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new l("${"+t+":")),n.children.forEach(e.appendChild,e),!0}},e.prototype._parseTransform=function(e){for(var t=new d,o="",n="";!this._accept(6);){var i=void 0;if(i=this._accept(5,!0))o+=i=this._accept(6,!0)||i;else{if(14===this._token.type)return!1;o+=this._accept(void 0,!0)}}for(;!this._accept(6);){i=void 0;if(i=this._accept(5,!0))i=this._accept(6,!0)||i,t.appendChild(new l(i));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(o,n)}catch(e){return!1}return e.transform=t,!0},e.prototype._parseFormatString=function(e){var t=this._token;if(!this._accept(0))return!1;var o=!1;this._accept(3)&&(o=!0);var n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!o)return e.appendChild(new g(Number(n))),!0;if(this._accept(4))return e.appendChild(new g(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){var i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new g(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){if(r=this._until(4))return e.appendChild(new g(Number(n),void 0,r,void 0)),!0}else if(this._accept(12)){if(s=this._until(4))return e.appendChild(new g(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){var r;if(r=this._until(1))if(s=this._until(4))return e.appendChild(new g(Number(n),void 0,r,s)),!0}else{var s;if(s=this._until(4))return e.appendChild(new g(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1},e.prototype._parseAnything=function(e){return 14!==this._token.type&&(e.appendChild(new l(this._scanner.tokenText(this._token))),this._accept(void 0),!0)},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(92),i=function(){function e(t){var o=Object(n.d)(t);this._defaultValue=o,this._asciiMap=e._createAsciiMap(o),this._map=new Map}return e._createAsciiMap=function(e){for(var t=new Uint8Array(256),o=0;o<256;o++)t[o]=e;return t},e.prototype.set=function(e,t){var o=Object(n.d)(t);e>=0&&e<256?this._asciiMap[e]=o:this._map.set(e,o)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}(),r=function(){function e(){this._actual=new i(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n=function(){function e(){for(var e=[],t=0;t * @license MIT */ -var n=o(326),i=o(327),r=o(265);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var o=e.length;if(0===o)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return W(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function f(e,t,o){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),o<=0)return"";if((o>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,o);case"utf8":case"utf-8":return k(this,t,o);case"ascii":return R(this,t,o);case"latin1":case"binary":return L(this,t,o);case"base64":return w(this,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,o);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,o){var n=e[t];e[t]=e[o],e[o]=n}function _(e,t,o,n,i){if(0===e.length)return-1;if("string"==typeof o?(n=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=i?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(i)return-1;o=e.length-1}else if(o<0){if(!i)return-1;o=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:y(e,t,o,n,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,o):Uint8Array.prototype.lastIndexOf.call(e,t,o):y(e,[t],o,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,o,n,i){var r,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,o/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(r=o;ra&&(o=a-l),r=o;r>=0;r--){for(var h=!0,d=0;di&&(n=i):n=i;var r=t.length;if(r%2!=0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var s=0;s>8,i=o%256,r.push(i),r.push(n);return r}(t,e.length-o),e,o,n)}function w(e,t,o){return 0===t&&o===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,o))}function k(e,t,o){o=Math.min(e.length,o);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+h<=o)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(r=e[i+1]))&&(l=(31&u)<<6|63&r)>127&&(c=l);break;case 3:r=e[i+1],s=e[i+2],128==(192&r)&&128==(192&s)&&(l=(15&u)<<12|(63&r)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:r=e[i+1],s=e[i+2],a=e[i+3],128==(192&r)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&r)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var o="",n=0;for(;n0&&(e=this.toString("hex",0,o).match(/.{2}/g).join(" "),this.length>o&&(e+=" ... ")),""},l.prototype.compare=function(e,t,o,n,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===o&&(o=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||o>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=o)return 0;if(n>=i)return-1;if(t>=o)return 1;if(this===e)return 0;for(var r=(i>>>=0)-(n>>>=0),s=(o>>>=0)-(t>>>=0),a=Math.min(r,s),u=this.slice(n,i),c=e.slice(t,o),h=0;hi)&&(o=i),e.length>0&&(o<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return v(this,e,t,o);case"utf8":case"utf-8":return b(this,e,t,o);case"ascii":return E(this,e,t,o);case"latin1":case"binary":return C(this,e,t,o);case"base64":return S(this,e,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,o);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function R(e,t,o){var n="";o=Math.min(e.length,o);for(var i=t;in)&&(o=n);for(var i="",r=t;ro)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,o,n,i,r){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function P(e,t,o,n){t<0&&(t=65535+t+1);for(var i=0,r=Math.min(e.length-o,2);i>>8*(n?i:1-i)}function x(e,t,o,n){t<0&&(t=4294967295+t+1);for(var i=0,r=Math.min(e.length-o,4);i>>8*(n?i:3-i)&255}function M(e,t,o,n,i,r){if(o+n>e.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function B(e,t,o,n,r){return r||M(e,0,o,4),i.write(e,t,o,n,23,4),o+4}function F(e,t,o,n,r){return r||M(e,0,o,8),i.write(e,t,o,n,52,8),o+8}l.prototype.slice=function(e,t){var o,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,o){e|=0,t|=0,o||D(e,t,this.length);for(var n=this[e],i=1,r=0;++r=(i*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,o){e|=0,t|=0,o||D(e,t,this.length);for(var n=t,i=1,r=this[e+--n];n>0&&(i*=256);)r+=this[e+--n]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},l.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},l.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,o,n){(e=+e,t|=0,o|=0,n)||A(this,e,t,o,Math.pow(2,8*o)-1,0);var i=1,r=0;for(this[t]=255&e;++r=0&&(r*=256);)this[t+i]=e/r&255;return t+o},l.prototype.writeUInt8=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,o,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*o-1);A(this,e,t,o,i-1,-i)}var r=0,s=1,a=0;for(this[t]=255&e;++r>0)-a&255;return t+o},l.prototype.writeIntBE=function(e,t,o,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*o-1);A(this,e,t,o,i-1,-i)}var r=o-1,s=1,a=0;for(this[t+r]=255&e;--r>=0&&(s*=256);)e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/s>>0)-a&255;return t+o},l.prototype.writeInt8=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,o){return B(this,e,t,!0,o)},l.prototype.writeFloatBE=function(e,t,o){return B(this,e,t,!1,o)},l.prototype.writeDoubleLE=function(e,t,o){return F(this,e,t,!0,o)},l.prototype.writeDoubleBE=function(e,t,o){return F(this,e,t,!1,o)},l.prototype.copy=function(e,t,o,n){if(o||(o=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+o];else if(r<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,o=void 0===o?this.length:o>>>0,e||(e=0),"number"==typeof e)for(r=t;r55295&&o<57344){if(!i){if(o>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&r.push(239,191,189);continue}i=o;continue}if(o<56320){(t-=3)>-1&&r.push(239,191,189),i=o;continue}o=65536+(i-55296<<10|o-56320)}else i&&(t-=3)>-1&&r.push(239,191,189);if(i=null,o<128){if((t-=1)<0)break;r.push(o)}else if(o<2048){if((t-=2)<0)break;r.push(o>>6|192,63&o|128)}else if(o<65536){if((t-=3)<0)break;r.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return r}function W(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,o,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+o]=e[i];return i}}).call(this,o(80))},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(101),i=o(242);t.Disposable=i.Disposable,t.CancellationToken=i.CancellationToken,t.Event=i.Event,t.Emitter=i.Emitter,function(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}(o(101)),function(e){var t=window,o=Symbol("Services");e.get=function(){var e=t[o];if(!e)throw new Error("Language Client services has not been installed");return e},e.install=function(e){t[o]&&console.error(new Error("Language Client services has been overriden")),t[o]=e}}(t.Services||(t.Services={})),t.isDocumentSelector=function(e){return!(!e||!Array.isArray(e))&&e.every((function(e){return"string"==typeof e||n.DocumentFilter.is(e)}))},function(e){e.is=function(e){return!!e&&"uri"in e&&"languageId"in e}}(t.DocumentIdentifier||(t.DocumentIdentifier={})),function(e){e[e.Global=1]="Global",e[e.Workspace=2]="Workspace",e[e.WorkspaceFolder=3]="WorkspaceFolder"}(t.ConfigurationTarget||(t.ConfigurationTarget={}))},function(e,t,o){"use strict";(function(e){function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0});const i=o(171),r=o(504);t.RequestType=r.RequestType,t.RequestType0=r.RequestType0,t.RequestType1=r.RequestType1,t.RequestType2=r.RequestType2,t.RequestType3=r.RequestType3,t.RequestType4=r.RequestType4,t.RequestType5=r.RequestType5,t.RequestType6=r.RequestType6,t.RequestType7=r.RequestType7,t.RequestType8=r.RequestType8,t.RequestType9=r.RequestType9,t.ResponseError=r.ResponseError,t.ErrorCodes=r.ErrorCodes,t.NotificationType=r.NotificationType,t.NotificationType0=r.NotificationType0,t.NotificationType1=r.NotificationType1,t.NotificationType2=r.NotificationType2,t.NotificationType3=r.NotificationType3,t.NotificationType4=r.NotificationType4,t.NotificationType5=r.NotificationType5,t.NotificationType6=r.NotificationType6,t.NotificationType7=r.NotificationType7,t.NotificationType8=r.NotificationType8,t.NotificationType9=r.NotificationType9;const s=o(243);t.MessageReader=s.MessageReader,t.StreamMessageReader=s.StreamMessageReader,t.IPCMessageReader=s.IPCMessageReader,t.SocketMessageReader=s.SocketMessageReader;const a=o(244);t.MessageWriter=a.MessageWriter,t.StreamMessageWriter=a.StreamMessageWriter,t.IPCMessageWriter=a.IPCMessageWriter,t.SocketMessageWriter=a.SocketMessageWriter;const l=o(186);t.Disposable=l.Disposable,t.Event=l.Event,t.Emitter=l.Emitter;const u=o(505);t.CancellationTokenSource=u.CancellationTokenSource,t.CancellationToken=u.CancellationToken;const c=o(506);var h,d,g,p,f,m,_;n(o(507)),n(o(508)),function(e){e.type=new r.NotificationType("$/cancelRequest")}(h||(h={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(d=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(d=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(g=t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(g=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new r.NotificationType("$/setTraceNotification")}(p=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new r.NotificationType("$/logTraceNotification")}(f=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(m=t.ConnectionErrors||(t.ConnectionErrors={}));class y extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,y.prototype)}}function v(t,o,n,s){let a=0,v=0,b=0;const E="2.0";let C,S,T=void 0,w=Object.create(null),k=void 0,O=Object.create(null),R=new c.LinkedMap,L=Object.create(null),N=Object.create(null),I=d.Off,D=g.Text,A=_.New,P=new l.Emitter,x=new l.Emitter,M=new l.Emitter,B=new l.Emitter;function F(e){return"req-"+e.toString()}function H(e,t){var o;r.isRequestMessage(t)?e.set(F(t.id),t):r.isResponseMessage(t)?e.set(null===(o=t.id)?"res-unknown-"+(++b).toString():"res-"+o.toString(),t):e.set("not-"+(++v).toString(),t)}function U(e){}function V(){return A===_.Listening}function W(){return A===_.Closed}function j(){return A===_.Disposed}function G(){A!==_.New&&A!==_.Listening||(A=_.Closed,x.fire(void 0))}function z(){C||0===R.size||(C=e(()=>{C=void 0,function(){if(0===R.size)return;let e=R.shift();try{r.isRequestMessage(e)?function(e){if(j())return;function t(t,n,i){let s={jsonrpc:E,id:e.id};t instanceof r.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,Y(s,n,i),o.write(s)}function n(t,n,i){let r={jsonrpc:E,id:e.id,error:t.toJson()};Y(r,n,i),o.write(r)}!function(e){if(I===d.Off||!S)return;if(D===g.Text){let t=void 0;I===d.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),S.log(`Received request '${e.method} - (${e.id})'.`,t)}else X("receive-request",e)}(e);let s,a,l=w[e.method];l&&(s=l.type,a=l.handler);let c=Date.now();if(a||T){let l=new u.CancellationTokenSource,h=String(e.id);N[h]=l;try{let u,d=u=void 0===e.params||void 0!==s&&0===s.numberOfParams?a?a(l.token):T(e.method,l.token):i.array(e.params)&&(void 0===s||s.numberOfParams>1)?a?a(...e.params,l.token):T(e.method,...e.params,l.token):a?a(e.params,l.token):T(e.method,e.params,l.token);u?d.then?d.then(o=>{delete N[h],t(o,e.method,c)},t=>{delete N[h],t instanceof r.ResponseError?n(t,e.method,c):t&&i.string(t.message)?n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,c):n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}):(delete N[h],t(u,e.method,c)):(delete N[h],function(t,n,i){void 0===t&&(t=null);let r={jsonrpc:E,id:e.id,result:t};Y(r,n,i),o.write(r)}(u,e.method,c))}catch(o){delete N[h],o instanceof r.ResponseError?t(o,e.method,c):o&&i.string(o.message)?n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${o.message}`),e.method,c):n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}}else n(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,c)}(e):r.isNotificationMessage(e)?function(e){if(j())return;let t,o=void 0;if(e.method===h.type.method)t=e=>{let t=e.id,o=N[String(t)];o&&o.cancel()};else{let n=O[e.method];n&&(t=n.handler,o=n.type)}if(t||k)try{!function(e){if(I===d.Off||!S||e.method===f.type.method)return;if(D===g.Text){let t=void 0;I===d.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),S.log(`Received notification '${e.method}'.`,t)}else X("receive-notification",e)}(e),void 0===e.params||void 0!==o&&0===o.numberOfParams?t?t():k(e.method):i.array(e.params)&&(void 0===o||o.numberOfParams>1)?t?t(...e.params):k(e.method,...e.params):t?t(e.params):k(e.method,e.params)}catch(t){t.message?n.error(`Notification handler '${e.method}' failed with message: ${t.message}`):n.error(`Notification handler '${e.method}' failed unexpectedly.`)}else M.fire(e)}(e):r.isResponseMessage(e)?function(e){if(j())return;if(null===e.id)e.error?n.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):n.error("Received response message without id. No further error information provided.");else{let t=String(e.id),o=L[t];if(function(e,t){if(I===d.Off||!S)return;if(D===g.Text){let o=void 0;if(I===d.Verbose&&(e.error&&e.error.data?o=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?o=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(o="No result returned.\n\n")),t){let n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";S.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,o)}else S.log(`Received response ${e.id} without active response promise.`,o)}else X("receive-response",e)}(e,o),o){delete L[t];try{if(e.error){let t=e.error;o.reject(new r.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");o.resolve(e.result)}}catch(e){e.message?n.error(`Response handler '${o.method}' failed with message: ${e.message}`):n.error(`Response handler '${o.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(i.string(t.id)||i.number(t.id)){let e=String(t.id),o=L[e];o&&o.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{z()}}()}))}t.onClose(G),t.onError((function(e){P.fire([e,void 0,void 0])})),o.onClose(G),o.onError((function(e){P.fire(e)}));let K=e=>{try{if(r.isNotificationMessage(e)&&e.method===h.type.method){let t=F(e.params.id),n=R.get(t);if(r.isRequestMessage(n)){let i=s&&s.cancelUndispatched?s.cancelUndispatched(n,U):void 0;if(i&&(void 0!==i.error||void 0!==i.result))return R.delete(t),i.id=n.id,Y(i,e.method,Date.now()),void o.write(i)}}H(R,e)}finally{z()}};function Y(e,t,o){if(I!==d.Off&&S)if(D===g.Text){let n=void 0;I===d.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),S.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-o}ms`,n)}else X("send-response",e)}function X(e,t){if(!S||I===d.Off)return;const o={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};S.log(o)}function q(){if(W())throw new y(m.Closed,"Connection is closed.");if(j())throw new y(m.Disposed,"Connection is disposed.")}function $(e){return void 0===e?null:e}function J(e,t){let o,n=e.numberOfParams;switch(n){case 0:o=null;break;case 1:o=$(t[0]);break;default:o=[];for(let e=0;e{let n,r;if(q(),i.string(e))switch(n=e,t.length){case 0:r=null;break;case 1:r=t[0];break;default:r=t}else n=e.method,r=J(e,t);let s={jsonrpc:E,method:n,params:r};!function(e){if(I!==d.Off&&S)if(D===g.Text){let t=void 0;I===d.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),S.log(`Sending notification '${e.method}'.`,t)}else X("send-notification",e)}(s),o.write(s)},onNotification:(e,t)=>{q(),i.func(e)?k=e:t&&(i.string(e)?O[e]={type:void 0,handler:t}:O[e.method]={type:e,handler:t})},sendRequest:(e,...t)=>{let n,s;q(),function(){if(!V())throw new Error("Call listen() first.")}();let l=void 0;if(i.string(e))switch(n=e,t.length){case 0:s=null;break;case 1:u.CancellationToken.is(t[0])?(s=null,l=t[0]):s=$(t[0]);break;default:const e=t.length-1;u.CancellationToken.is(t[e])?(l=t[e],s=2===t.length?$(t[0]):t.slice(0,e).map(e=>$(e))):s=t.map(e=>$(e))}else{n=e.method,s=J(e,t);let o=e.numberOfParams;l=u.CancellationToken.is(t[o])?t[o]:void 0}let c=a++,p=new Promise((e,t)=>{let i={jsonrpc:E,id:c,method:n,params:s},a={method:n,timerStart:Date.now(),resolve:e,reject:t};!function(e){if(I!==d.Off&&S)if(D===g.Text){let t=void 0;I===d.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),S.log(`Sending request '${e.method} - (${e.id})'.`,t)}else X("send-request",e)}(i);try{o.write(i)}catch(e){a.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(L[String(c)]=a)});return l&&l.onCancellationRequested(()=>{Z.sendNotification(h.type,{id:c})}),p},onRequest:(e,t)=>{q(),i.func(e)?T=e:t&&(i.string(e)?w[e]={type:void 0,handler:t}:w[e.method]={type:e,handler:t})},trace:(e,t,o)=>{let n=!1,r=g.Text;void 0!==o&&(i.boolean(o)?n=o:(n=o.sendNotification||!1,r=o.traceFormat||g.Text)),D=r,S=(I=e)===d.Off?void 0:t,!n||W()||j()||Z.sendNotification(p.type,{value:d.toString(e)})},onError:P.event,onClose:x.event,onUnhandledNotification:M.event,onDispose:B.event,dispose:()=>{if(j())return;A=_.Disposed,B.fire(void 0);let e=new Error("Connection got disposed.");Object.keys(L).forEach(t=>{L[t].reject(e)}),L=Object.create(null),N=Object.create(null),R=new c.LinkedMap,i.func(o.dispose)&&o.dispose(),i.func(t.dispose)&&t.dispose()},listen:()=>{q(),function(){if(V())throw new y(m.AlreadyListening,"Connection is already listening")}(),A=_.Listening,t.listen(K)},inspect:()=>{console.log("inspect")}};return Z.onNotification(f.type,e=>{I!==d.Off&&S&&S.log(e.message,I===d.Verbose?e.verbose:void 0)}),Z}t.ConnectionError=y,function(e){e.is=function(e){let t=e;return t&&i.func(t.cancelUndispatched)}}(t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(_||(_={})),t.createMessageConnection=function(e,o,n,i){var r;return n||(n=t.NullLogger),v(void 0!==(r=e).listen&&void 0===r.read?e:new s.StreamMessageReader(e),function(e){return void 0!==e.write&&void 0===e.end}(o)?o:new a.StreamMessageWriter(o),n,i)}}).call(this,o(148).setImmediate)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return a}));var n=o(8),i=function(){function e(e,t,o,n){this.startColumn=e,this.endColumn=t,this.className=o,this.type=n}return e._equals=function(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type},e.equalsArr=function(t,o){var n=t.length;if(n!==o.length)return!1;for(var i=0;io)&&(!c.isEmpty()||0!==u.type&&3!==u.type)){var h=c.startLineNumber===o?c.startColumn:n,d=c.endLineNumber===o?c.endColumn:i;r[s++]=new e(h,d,u.inlineClassName,u.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}(),r=function(e,t,o){this.startOffset=e,this.endOffset=t,this.className=o},s=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,o){for(;this.count>0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(o,0,e),this.classNames.splice(o,0,t);break}this.count++},e}(),a=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var o=[],i=new s,r=0,a=0,l=t.length;a1){var g=e.charCodeAt(c-2);n.isHighSurrogate(g)&&c--}if(h>1){g=e.charCodeAt(h-2);n.isHighSurrogate(g)&&h--}var p=c-1,f=h-2;r=i.consumeLowerThan(p,r,o),0===i.count&&(r=p),i.insert(f,d)}return i.consumeLowerThan(1073741824,r,o),o},e}()},function(e,t,o){"use strict";var n=o(0),i=o(10),r=o(204),s=o(74),a=o(125),l=o(1),u=(o(473),o(30)),c=o(179),h=l.a,d=function(){function e(e,t){this.os=t,this.domNode=l.k(e,h(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}return e.prototype.set=function(t,o){this.didEverRender&&this.keybinding===t&&e.areSame(this.matches,o)||(this.keybinding=t,this.matches=o,this.render())},e.prototype.render=function(){if(l.l(this.domNode),this.keybinding){var e=this.keybinding.getParts(),t=e[0],o=e[1];t&&this.renderPart(this.domNode,t,this.matches?this.matches.firstPart:null),o&&(l.k(this.domNode,h("span.monaco-keybinding-key-chord-separator",null," ")),this.renderPart(this.domNode,o,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()}this.didEverRender=!0},e.prototype.renderPart=function(e,t,o){var n=c.b.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,o&&o.ctrlKey,n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,o&&o.shiftKey,n.separator),t.altKey&&this.renderKey(e,n.altKey,o&&o.altKey,n.separator),t.metaKey&&this.renderKey(e,n.metaKey,o&&o.metaKey,n.separator);var i=t.keyLabel;i&&this.renderKey(e,i,o&&o.keyCode,"")},e.prototype.renderKey=function(e,t,o,n){l.k(e,h("span.monaco-keybinding-key"+(o?".highlight":""),null,t)),n&&l.k(e,h("span.monaco-keybinding-key-separator",null,n))},e.prototype.dispose=function(){this.keybinding=null},e.areSame=function(e,t){return e===t||!e&&!t||!!e&&!!t&&Object(u.e)(e.firstPart,t.firstPart)&&Object(u.e)(e.chordPart,t.chordPart)},e}(),g=o(15);o.d(t,"a",(function(){return _})),o.d(t,"b",(function(){return y})),o.d(t,"c",(function(){return E}));var p,f=(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),m=0,_=function(){function e(e){void 0===e&&(e=[]),this.id=(m++).toString(),this.labelHighlights=e,this.descriptionHighlights=[]}return e.prototype.getId=function(){return this.id},e.prototype.getLabel=function(){return null},e.prototype.getLabelOptions=function(){return null},e.prototype.getAriaLabel=function(){return[this.getLabel(),this.getDescription(),this.getDetail()].filter((function(e){return!!e})).join(", ")},e.prototype.getDetail=function(){return null},e.prototype.getIcon=function(){return null},e.prototype.getDescription=function(){return null},e.prototype.getTooltip=function(){return null},e.prototype.getDescriptionTooltip=function(){return null},e.prototype.getKeybinding=function(){return null},e.prototype.isHidden=function(){return this.hidden},e.prototype.setHighlights=function(e,t,o){this.labelHighlights=e,this.descriptionHighlights=t,this.detailHighlights=o},e.prototype.getHighlights=function(){return[this.labelHighlights,this.descriptionHighlights,this.detailHighlights]},e.prototype.run=function(e,t){return!1},e}(),y=function(e){function t(t,o,n){var i=e.call(this)||this;return i.entry=t,i.groupLabel=o,i.withBorder=n,i}return f(t,e),t.prototype.getGroupLabel=function(){return this.groupLabel},t.prototype.setGroupLabel=function(e){this.groupLabel=e},t.prototype.showBorder=function(){return this.withBorder},t.prototype.setShowBorder=function(e){this.withBorder=e},t.prototype.getLabel=function(){return this.entry?this.entry.getLabel():e.prototype.getLabel.call(this)},t.prototype.getLabelOptions=function(){return this.entry?this.entry.getLabelOptions():e.prototype.getLabelOptions.call(this)},t.prototype.getAriaLabel=function(){return this.entry?this.entry.getAriaLabel():e.prototype.getAriaLabel.call(this)},t.prototype.getDetail=function(){return this.entry?this.entry.getDetail():e.prototype.getDetail.call(this)},t.prototype.getIcon=function(){return this.entry?this.entry.getIcon():e.prototype.getIcon.call(this)},t.prototype.getDescription=function(){return this.entry?this.entry.getDescription():e.prototype.getDescription.call(this)},t.prototype.getHighlights=function(){return this.entry?this.entry.getHighlights():e.prototype.getHighlights.call(this)},t.prototype.isHidden=function(){return this.entry?this.entry.isHidden():e.prototype.isHidden.call(this)},t.prototype.setHighlights=function(t,o,n){this.entry?this.entry.setHighlights(t,o,n):e.prototype.setHighlights.call(this,t,o,n)},t.prototype.run=function(t,o){return this.entry?this.entry.run(t,o):e.prototype.run.call(this,t,o)},t}(_),v=function(){function e(){}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return i.b.as(null)},e}(),b=function(){function e(e,t){void 0===e&&(e=new v),void 0===t&&(t=null),this.actionProvider=e,this.actionRunner=t}return e.prototype.getHeight=function(e){return e.getDetail()?44:22},e.prototype.getTemplateId=function(e){return e instanceof y?"quickOpenEntryGroup":"quickOpenEntry"},e.prototype.renderTemplate=function(e,t,o){var n=document.createElement("div");l.f(n,"sub-content"),t.appendChild(n);var i=l.a(".quick-open-row"),u=l.a(".quick-open-row"),c=l.a(".quick-open-entry",null,i,u);n.appendChild(c);var h=document.createElement("span");i.appendChild(h);var p=new r.b(i,{supportHighlights:!0,supportDescriptionHighlights:!0}),f=document.createElement("span");i.appendChild(f),l.f(f,"quick-open-entry-keybinding");var m=new d(f,g.a),_=document.createElement("div");u.appendChild(_),l.f(_,"quick-open-entry-meta");var y,v=new a.a(_);"quickOpenEntryGroup"===e&&(y=document.createElement("div"),l.f(y,"results-group"),t.appendChild(y)),l.f(t,"actions");var b=document.createElement("div");return l.f(b,"primary-action-bar"),t.appendChild(b),{container:t,entry:c,icon:h,label:p,detail:v,keybinding:m,group:y,actionBar:new s.a(b,{actionRunner:this.actionRunner})}},e.prototype.renderElement=function(e,t,o,n){if(this.actionProvider.hasActions(null,e)?l.f(o.container,"has-actions"):l.G(o.container,"has-actions"),o.actionBar.context=e,this.actionProvider.getActions(null,e).then((function(e){o.actionBar.isEmpty()&&e&&e.length>0?o.actionBar.push(e,{icon:!0,label:!1}):o.actionBar.isEmpty()||e&&0!==e.length||o.actionBar.clear()})),e instanceof y&&e.getGroupLabel()?l.f(o.container,"has-group-label"):l.G(o.container,"has-group-label"),e instanceof y){var i=e,r=o;i.showBorder()?(l.f(r.container,"results-group-separator"),r.container.style.borderTopColor=n.pickerGroupBorder.toString()):(l.G(r.container,"results-group-separator"),r.container.style.borderTopColor=null);var s=i.getGroupLabel()||"";r.group.textContent=s,r.group.style.color=n.pickerGroupForeground.toString()}if(e instanceof _){var a=e.getHighlights(),u=a[0],c=a[1],h=a[2],d=e.getIcon()?"quick-open-entry-icon "+e.getIcon():"";o.icon.className=d;var g=e.getLabelOptions()||Object.create(null);g.matches=u||[],g.title=e.getTooltip(),g.descriptionTitle=e.getDescriptionTooltip()||e.getDescription(),g.descriptionMatches=c||[],o.label.setValue(e.getLabel(),e.getDescription(),g),o.detail.set(e.getDetail(),h),o.keybinding.set(e.getKeybinding(),null)}},e.prototype.disposeTemplate=function(e,t){var o=t;o.actionBar.dispose(),o.actionBar=null,o.container=null,o.entry=null,o.keybinding.dispose(),o.keybinding=null,o.detail.dispose(),o.detail=null,o.group=null,o.icon=null,o.label.dispose(),o.label=null},e}(),E=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=new v),this._entries=e,this._dataSource=this,this._renderer=new b(t),this._filter=this,this._runner=this,this._accessibilityProvider=this}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._entries},set:function(e){this._entries=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runner",{get:function(){return this._runner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityProvider",{get:function(){return this._accessibilityProvider},enumerable:!0,configurable:!0}),e.prototype.getId=function(e){return e.getId()},e.prototype.getLabel=function(e){return e.getLabel()},e.prototype.getAriaLabel=function(e){return e.getAriaLabel()?n.a("quickOpenAriaLabelEntry","{0}, picker",e.getAriaLabel()):n.a("quickOpenAriaLabel","picker")},e.prototype.isVisible=function(e){return!e.isHidden()},e.prototype.run=function(e,t,o){return e.run(t,o)},e}()},function(e,t,o){"use strict";var n=o(1),i=o(30),r=o(8);function s(e){return Object(r.escape)(e)}o.d(t,"a",(function(){return a}));var a=function(){function e(e){this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",this.didEverRender=!1,e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(t,o,n,r){void 0===o&&(o=[]),void 0===n&&(n=""),t||(t=""),r&&(t=e.escapeNewLines(t,o)),this.didEverRender&&this.text===t&&this.title===n&&i.e(this.highlights,o)||(Array.isArray(o)||(o=[]),this.text=t,this.title=n,this.highlights=o,this.render())},e.prototype.render=function(){n.l(this.domNode);for(var e,t=[],o=0,i=0;i"),t.push(s(this.text.substring(o,e.start))),t.push(""),o=e.end),t.push(''),t.push(s(this.text.substring(e.start,e.end))),t.push(""),o=e.end);o"),t.push(s(this.text.substring(o))),t.push("")),this.domNode.innerHTML=t.join(""),this.domNode.title=this.title,this.didEverRender=!0},e.prototype.dispose=function(){this.text=null,this.highlights=null},e.escapeNewLines=function(e,t){var o=0,n=0;return e.replace(/\r\n|\r|\n/,(function(e,i){n="\r\n"===e?-1:0,i+=o;for(var r=0,s=t;r=i&&(a.start+=n),a.end>=i&&(a.end+=n))}return o+=n,"⏎"}))},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var n=o(8),i=o(20),r=o(2),s=o(23),a=o(32),l=function(){function e(e,t){this._opts=t,this._selection=e,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}return e.unshiftIndentCount=function(e,t,o){var n=i.a.visibleColumnFromColumn(e,t,o);return i.a.prevTabStop(n,o)/o},e.shiftIndentCount=function(e,t,o){var n=i.a.visibleColumnFromColumn(e,t,o);return i.a.nextTabStop(n,o)/o},e.prototype._addEditOperation=function(e,t,o){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,o):e.addEditOperation(t,o)},e.prototype.getEditOperations=function(t,o){var s=this._selection.startLineNumber,l=this._selection.endLineNumber;1===this._selection.endColumn&&s!==l&&(l-=1);var u=this._opts.tabSize,c=this._opts.oneIndent,h=s===l;if(this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(s))&&(this._useLastEditRangeForCursorEndPosition=!0),this._opts.useTabStops)for(var d=["",c],g=0,p=0,f=s;f<=l;f++,g=p){p=0;var m=t.getLineContent(f),_=n.firstNonWhitespaceIndex(m);if((!this._opts.isUnshift||0!==m.length&&0!==_)&&(h||this._opts.isUnshift||0!==m.length)){if(-1===_&&(_=m.length),f>1)if(i.a.visibleColumnFromColumn(m,_+1,u)%u!=0&&t.isCheapToTokenize(f-1)){var y=a.a.getRawEnterActionAtPosition(t,f-1,t.getLineMaxColumn(f-1));if(y){if(p=g,y.appendText)for(var v=0,b=y.appendText.length;v console.log` because `log` has been completed recently."),i.a("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:i.a("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,description:i.a("suggestFontSize","Font size for the suggest widget.")},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,description:i.a("suggestLineHeight","Line height for the suggest widget.")},"editor.suggest.filterGraceful":{type:"boolean",default:!0,description:i.a("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:!0,description:i.a("suggest.snippetsPreventQuickSuggestions","Control whether an active snippet prevents quick suggestions.")},"editor.selectionHighlight":{type:"boolean",default:f.contribInfo.selectionHighlight,description:i.a("selectionHighlight","Controls whether the editor should highlight matches similar to the selection")},"editor.occurrencesHighlight":{type:"boolean",default:f.contribInfo.occurrencesHighlight,description:i.a("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")},"editor.overviewRulerLanes":{type:"integer",default:3,description:i.a("overviewRulerLanes","Controls the number of decorations that can show up at the same position in the overview ruler.")},"editor.overviewRulerBorder":{type:"boolean",default:f.viewInfo.overviewRulerBorder,description:i.a("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:g.k(f.viewInfo.cursorBlinking),description:i.a("cursorBlinking","Control the cursor animation style.")},"editor.mouseWheelZoom":{type:"boolean",default:f.viewInfo.mouseWheelZoom,description:i.a("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:g.l(f.viewInfo.cursorStyle),description:i.a("cursorStyle","Controls the cursor style.")},"editor.cursorWidth":{type:"integer",default:f.viewInfo.cursorWidth,description:i.a("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")},"editor.fontLigatures":{type:"boolean",default:f.viewInfo.fontLigatures,description:i.a("fontLigatures","Enables/Disables font ligatures.")},"editor.hideCursorInOverviewRuler":{type:"boolean",default:f.viewInfo.hideCursorInOverviewRuler,description:i.a("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")},"editor.renderWhitespace":{type:"string",enum:["none","boundary","all"],enumDescriptions:["",i.a("renderWhiteSpace.boundary","Render whitespace characters except for single spaces between words."),""],default:f.viewInfo.renderWhitespace,description:i.a("renderWhitespace","Controls how the editor should render whitespace characters.")},"editor.renderControlCharacters":{type:"boolean",default:f.viewInfo.renderControlCharacters,description:i.a("renderControlCharacters","Controls whether the editor should render control characters.")},"editor.renderIndentGuides":{type:"boolean",default:f.viewInfo.renderIndentGuides,description:i.a("renderIndentGuides","Controls whether the editor should render indent guides.")},"editor.highlightActiveIndentGuide":{type:"boolean",default:f.viewInfo.highlightActiveIndentGuide,description:i.a("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",i.a("renderLineHighlight.all","Highlights both the gutter and the current line.")],default:f.viewInfo.renderLineHighlight,description:i.a("renderLineHighlight","Controls how the editor should render the current line highlight.")},"editor.codeLens":{type:"boolean",default:f.contribInfo.codeLens,description:i.a("codeLens","Controls whether the editor shows CodeLens")},"editor.folding":{type:"boolean",default:f.contribInfo.folding,description:i.a("folding","Controls whether the editor has code folding enabled")},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:f.contribInfo.foldingStrategy,description:i.a("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:f.contribInfo.showFoldingControls,description:i.a("showFoldingControls","Controls whether the fold controls on the gutter are automatically hidden.")},"editor.matchBrackets":{type:"boolean",default:f.contribInfo.matchBrackets,description:i.a("matchBrackets","Highlight matching brackets when one of them is selected.")},"editor.glyphMargin":{type:"boolean",default:f.viewInfo.glyphMargin,description:i.a("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")},"editor.useTabStops":{type:"boolean",default:f.useTabStops,description:i.a("useTabStops","Inserting and deleting whitespace follows tab stops.")},"editor.trimAutoWhitespace":{type:"boolean",default:_.trimAutoWhitespace,description:i.a("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.stablePeek":{type:"boolean",default:!1,description:i.a("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.dragAndDrop":{type:"boolean",default:f.dragAndDrop,description:i.a("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[i.a("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),i.a("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),i.a("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:f.accessibilitySupport,description:i.a("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:f.showUnused,description:i.a("showUnused","Controls fading out of unused code.")},"editor.links":{type:"boolean",default:f.contribInfo.links,description:i.a("links","Controls whether the editor should detect links and make them clickable.")},"editor.colorDecorators":{type:"boolean",default:f.contribInfo.colorDecorators,description:i.a("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")},"editor.lightbulb.enabled":{type:"boolean",default:f.contribInfo.lightbulbEnabled,description:i.a("codeActions","Enables the code action lightbulb in the editor.")},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:i.a("codeActionsOnSave.organizeImports","Controls whether organize imports action should be run on file save.")}},additionalProperties:{type:"boolean"},default:f.contribInfo.codeActionsOnSave,description:i.a("codeActionsOnSave","Code action kinds to be run on save.")},"editor.codeActionsOnSaveTimeout":{type:"number",default:f.contribInfo.codeActionsOnSaveTimeout,description:i.a("codeActionsOnSaveTimeout","Timeout in milliseconds after which the code actions that are run on save are cancelled.")},"editor.selectionClipboard":{type:"boolean",default:f.contribInfo.selectionClipboard,description:i.a("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:l.c},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:i.a("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:i.a("ignoreTrimWhitespace","Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.")},"editor.largeFileOptimizations":{type:"boolean",default:_.largeFileOptimizations,description:i.a("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:i.a("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")}}},S=null;function T(){return null===S&&(S=Object.create(null),Object.keys(C.properties).forEach((function(e){S[e]=!0}))),S}function w(e){return T()["editor."+e]||!1}function k(e){return T()["diffEditor."+e]||!1}E.registerConfiguration(C)},function(e,t,o){"use strict";o.d(t,"a",(function(){return d})),o.d(t,"b",(function(){return g}));var n,i=o(15),r=o(96),s=o(27),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=i.d?1.5:1.35;function u(e,t){if("number"==typeof e)return e;var o=parseFloat(e);return isNaN(o)?t:o}function c(e,t,o){return eo?o:e}function h(e,t){return"string"!=typeof e?t:e}var d=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,o){var n=h(t.fontFamily,s.b.fontFamily),i=h(t.fontWeight,s.b.fontWeight),a=u(t.fontSize,s.b.fontSize);0===(a=c(a,0,100))?a=s.b.fontSize:a<8&&(a=8);var d=function(e,t){if("number"==typeof e)return Math.round(e);var o=parseInt(e);return isNaN(o)?t:o}(t.lineHeight,0);0===(d=c(d,0,150))?d=Math.round(l*a):d<8&&(d=8);var g=u(t.letterSpacing,0);g=c(g,-5,20);var p=1+.1*r.a.getZoomLevel();return new e({zoomLevel:o,fontFamily:n,fontWeight:i,fontSize:a*=p,lineHeight:d*=p,letterSpacing:g})},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"+this.letterSpacing},e}(),g=function(e){function t(t,o){var n=e.call(this,t)||this;return n.isTrusted=o,n.isMonospace=t.isMonospace,n.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,n.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,n.spaceWidth=t.spaceWidth,n.maxDigitWidth=t.maxDigitWidth,n}return a(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.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t}(d)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("textModelService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return S})),o.d(t,"b",(function(){return T})),o.d(t,"c",(function(){return B})),o.d(t,"d",(function(){return F}));var n,i,r=o(22),s=o(6),a=o(12),l=o(210),u=o(118),c=o(19),h=o(49),d=o(0),g=o(57),p=o(104),f=o(75),m=o(21),_=o(1),y=o(42),v=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),b=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},C=function(e,t){return function(o,n){t(o,n,e)}},S=Object(r.c)("listService"),T=function(){function e(e){this.lists=[],this._lastFocusedWidget=void 0}return Object.defineProperty(e.prototype,"lastFocusedList",{get:function(){return this._lastFocusedWidget},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var o=this;if(this.lists.some((function(t){return t.widget===e})))throw new Error("Cannot register the same widget multiple times");var n={widget:e,extraContextKeys:t};return this.lists.push(n),e.isDOMFocused()&&(this._lastFocusedWidget=e),Object(s.c)([e.onDidFocus((function(){return o._lastFocusedWidget=e})),Object(s.f)((function(){return o.lists.splice(o.lists.indexOf(n),1)})),e.onDidDispose((function(){o.lists=o.lists.filter((function(e){return e!==n})),o._lastFocusedWidget===e&&(o._lastFocusedWidget=void 0)}))])},e=E([C(0,a.e)],e)}(),w=new a.f("listFocus",!0),k=new a.f("listSupportsMultiselect",!0),O=new a.f("listHasSelectionOrFocus",!1),R=new a.f("listDoubleSelection",!1),L=new a.f("listMultiSelection",!1);var N,I="workbench.list.multiSelectModifier",D="workbench.list.openMode",A="workbench.tree.horizontalScrolling";function P(e){return"alt"===e.getValue(I)}function x(e){return"doubleClick"!==e.getValue(D)}function M(e,t){return e.controller||(e.controller=t.createInstance(F,{})),e.styler||(e.styler=new f.f((N||(N=Object(_.o)()),N))),e}var B=function(e){function t(t,o,n,i,r,s,a,l){var c=this,h=M(o,a),d=l.getValue(A)?y.b.Auto:y.b.Hidden,g=b({horizontalScrollMode:d,keyboardSupport:!1},Object(u.d)(s.getTheme(),u.e),n);return(c=e.call(this,t,h,g)||this).disposables=[],c.contextKeyService=function(e,t){var o=e.createScoped(t.getHTMLElement());return w.bindTo(o),o}(i,c),k.bindTo(c.contextKeyService),c.listHasSelectionOrFocus=O.bindTo(c.contextKeyService),c.listDoubleSelection=R.bindTo(c.contextKeyService),c.listMultiSelection=L.bindTo(c.contextKeyService),c._openOnSingleClick=x(l),c._useAltAsMultipleSelectionModifier=P(l),c.disposables.push(c.contextKeyService,r.register(c),Object(u.b)(c,s)),c.disposables.push(c.onDidChangeSelection((function(){var e=c.getSelection(),t=c.getFocus();c.listHasSelectionOrFocus.set(e&&e.length>0||!!t),c.listDoubleSelection.set(e&&2===e.length),c.listMultiSelection.set(e&&e.length>1)}))),c.disposables.push(c.onDidChangeFocus((function(){var e=c.getSelection(),t=c.getFocus();c.listHasSelectionOrFocus.set(e&&e.length>0||!!t)}))),c.disposables.push(l.onDidChangeConfiguration((function(e){e.affectsConfiguration(D)&&(c._openOnSingleClick=x(l)),e.affectsConfiguration(I)&&(c._useAltAsMultipleSelectionModifier=P(l))}))),c}return v(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=Object(s.d)(this.disposables)},t=E([C(3,a.e),C(4,S),C(5,c.c),C(6,r.a),C(7,h.b)],t)}(l.a);var F=function(e){function t(t,o){var n=e.call(this,function(e){return"boolean"!=typeof e.keyboardSupport&&(e.keyboardSupport=!1),"number"!=typeof e.clickBehavior&&(e.clickBehavior=f.a.ON_MOUSE_DOWN),e}(t))||this;return n.configurationService=o,n.disposables=[],Object(m.j)(t.openMode)&&(n.setOpenMode(n.getOpenModeSetting()),n.registerListeners()),n}return v(t,e),t.prototype.registerListeners=function(){var e=this;this.disposables.push(this.configurationService.onDidChangeConfiguration((function(t){t.affectsConfiguration(D)&&e.setOpenMode(e.getOpenModeSetting())})))},t.prototype.getOpenModeSetting=function(){return x(this.configurationService)?f.g.SINGLE_CLICK:f.g.DOUBLE_CLICK},t.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables)},t=E([C(1,h.b)],t)}(f.c);g.a.as(p.b.Configuration).registerConfiguration({id:"workbench",order:7,title:Object(d.a)("workbenchConfigurationTitle","Workbench"),type:"object",properties:(i={},i[I]={type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[Object(d.a)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),Object(d.a)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:Object(d.a)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},i[D]={type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(d.a)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ")},i[A]={type:"boolean",default:!1,description:Object(d.a)("horizontalScrolling setting","Controls whether trees support horizontal scrolling in the workbench.")},i)})},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(22),i=Object(n.c)("logService"),r=function(){function e(){}return e.prototype.trace=function(e){for(var t=[],o=1;o=0){for(var n=[],i=0,r=this._placeholderGroups[this._placeholderGroupsIdx];i0&&this._editor.executeEdits("snippet.placeholderTransform",n)}return!0===t&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1),this._editor.getModel().changeDecorations((function(t){for(var n=new Set,i=[],r=0,s=o._placeholderGroups[o._placeholderGroupsIdx];r0},enumerable:!0,configurable:!0}),e.prototype.computePossibleSelections=function(){for(var e=new Map,t=0,o=this._placeholderGroups;t ")+'"'},e.prototype.insert=function(){var t=this,o=this._editor.getModel(),n=e.createEditsAndSnippets(this._editor,this._template,this._overwriteBefore,this._overwriteAfter,!1),i=n.edits,r=n.snippets;this._snippets=r;var s=o.pushEditOperations(this._editor.getSelections(),i,(function(e){return t._snippets[0].hasPlaceholder?t._move(!0):e.map((function(e){return c.a.fromPositions(e.range.getEndPosition())}))}));this._editor.setSelections(s),this._editor.revealRange(s[0])},e.prototype.merge=function(t,o,n){var i=this;void 0===o&&(o=0),void 0===n&&(n=0),this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);var r=e.createEditsAndSnippets(this._editor,t,o,n,!0),s=r.edits,a=r.snippets;this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(),s,(function(e){for(var t=0,o=i._snippets;t0},e}(),w=o(5),k=o(47),O=o(135);o.d(t,"SnippetController2",(function(){return N}));var R=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},L=function(e,t){return function(o,n){t(o,n,e)}},N=function(){function e(t,o,n){this._editor=t,this._logService=o,this._snippetListener=[],this._inSnippet=e.InSnippetMode.bindTo(n),this._hasNextTabstop=e.HasNextTabstop.bindTo(n),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(n)}return e.get=function(e){return e.getContribution("snippetController2")},e.prototype.dispose=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),Object(r.d)(this._session)},e.prototype.getId=function(){return"snippetController2"},e.prototype.insert=function(e,t,o,n,i){void 0===t&&(t=0),void 0===o&&(o=0),void 0===n&&(n=!0),void 0===i&&(i=!0);try{this._doInsert(e,t,o,n,i)}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}},e.prototype._doInsert=function(e,t,o,n,i){var s=this;void 0===t&&(t=0),void 0===o&&(o=0),void 0===n&&(n=!0),void 0===i&&(i=!0),this._snippetListener=Object(r.d)(this._snippetListener),n&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t,o):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new T(this._editor,e,t,o),this._session.insert()),i&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener=[this._editor.onDidChangeModelContent((function(e){return e.isFlush&&s.cancel()})),this._editor.onDidChangeModel((function(){return s.cancel()})),this._editor.onDidChangeCursorSelection((function(){return s._updateState()}))]},e.prototype._updateState=function(){if(this._session){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}},e.prototype._handleChoice=function(){var e=this._session.choice;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map((function(e){return c.a.fromPositions(e.getStartPosition())})));var t=e.options[0];Object(k.e)(this._editor,e.options.map((function(e,o){return{type:"value",label:e.value,insertText:e.value,sortText:Object(s.repeat)("a",o),overwriteAfter:t.value.length}})))}}else this._currentChoice=void 0},e.prototype.finish=function(){for(;this._inSnippet.get();)this.next()},e.prototype.cancel=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),Object(r.d)(this._snippetListener),Object(r.d)(this._session),this._session=void 0,this._modelVersionId=-1},e.prototype.prev=function(){this._session.prev(),this._updateState()},e.prototype.next=function(){this._session.next(),this._updateState()},e.prototype.isInSnippet=function(){return this._inSnippet.get()},e.InSnippetMode=new n.f("inSnippetMode",!1),e.HasNextTabstop=new n.f("hasNextTabstop",!1),e.HasPrevTabstop=new n.f("hasPrevTabstop",!1),e=R([L(1,O.a),L(2,n.e)],e)}();Object(i.h)(N);var I=i.c.bindToContribution(N.get);Object(i.g)(new I({id:"jumpToNextSnippetPlaceholder",precondition:n.d.and(N.InSnippetMode,N.HasNextTabstop),handler:function(e){return e.next()},kbOpts:{weight:130,kbExpr:w.a.editorTextFocus,primary:2}})),Object(i.g)(new I({id:"jumpToPrevSnippetPlaceholder",precondition:n.d.and(N.InSnippetMode,N.HasPrevTabstop),handler:function(e){return e.prev()},kbOpts:{weight:130,kbExpr:w.a.editorTextFocus,primary:1026}})),Object(i.g)(new I({id:"leaveSnippet",precondition:N.InSnippetMode,handler:function(e){return e.cancel()},kbOpts:{weight:130,kbExpr:w.a.editorTextFocus,primary:9,secondary:[1033]}})),Object(i.g)(new I({id:"acceptSnippet",precondition:N.InSnippetMode,handler:function(e){return e.finish()}}))},function(e,t,o){"use strict";o(449),o(450);var n,i=o(0),r=o(1),s=o(13),a=o(4),l=o(6),u=o(10),c=o(22),h=o(117),d=o(12),g=o(70),p=o(8),f=o(20),m=o(9),_=o(2),y=o(23),v=o(18),b=function(){function e(e){this.modelState=null,this.viewState=null,this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new f.f(new _.a(1,1,1,1),0,new m.a(1,1),0),new f.f(new _.a(1,1,1,1),0,new m.a(1,1),0))}return e.prototype.dispose=function(e){this._removeTrackedRange(e)},e.prototype.startTrackingSelection=function(e){this._trackSelection=!0,this._updateTrackedRange(e)},e.prototype.stopTrackingSelection=function(e){this._trackSelection=!1,this._removeTrackedRange(e)},e.prototype._updateTrackedRange=function(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,v.h.AlwaysGrowsWhenTypingAtEdges))},e.prototype._removeTrackedRange=function(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,v.h.AlwaysGrowsWhenTypingAtEdges)},e.prototype.asCursorState=function(){return new f.d(this.modelState,this.viewState)},e.prototype.readSelectionFromMarkers=function(e){var t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===y.b.LTR?new y.a(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new y.a(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)},e.prototype.ensureValidState=function(e){this._setState(e,this.modelState,this.viewState)},e.prototype.setState=function(e,t,o){this._setState(e,t,o)},e.prototype._setState=function(e,t,o){if(t){r=e.model.validateRange(t.selectionStart);var n=t.selectionStart.equalsRange(r)?t.selectionStartLeftoverVisibleColumns:0,i=(s=e.model.validatePosition(t.position),t.position.equals(s)?t.leftoverVisibleColumns:0);t=new f.f(r,n,s,i)}else{var r=e.model.validateRange(e.convertViewRangeToModelRange(o.selectionStart)),s=e.model.validatePosition(e.convertViewPositionToModelPosition(o.position.lineNumber,o.position.column));t=new f.f(r,o.selectionStartLeftoverVisibleColumns,s,o.leftoverVisibleColumns)}if(o){u=e.validateViewRange(o.selectionStart,t.selectionStart),c=e.validateViewPosition(o.position,t.position);o=new f.f(u,t.selectionStartLeftoverVisibleColumns,c,t.leftoverVisibleColumns)}else{var a=e.convertModelPositionToViewPosition(new m.a(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),l=e.convertModelPositionToViewPosition(new m.a(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),u=new _.a(a.lineNumber,a.column,l.lineNumber,l.column),c=e.convertModelPositionToViewPosition(t.position);o=new f.f(u,t.selectionStartLeftoverVisibleColumns,c,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=o,this._updateTrackedRange(e)},e}(),E=function(){function e(e){this.context=e,this.primaryCursor=new b(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()},e.prototype.startTrackingSelections=function(){this.primaryCursor.startTrackingSelection(this.context);for(var e=0,t=this.secondaryCursors.length;eo){var r=t-o;for(i=0;i=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,o=this.secondaryCursors.length;th&&t[S].index--;e.splice(h,1),t.splice(c,1),this._removeSecondaryCursor(h-1),i--}}}}},e}(),C=o(52),S=o(176),T=o(95),w=o(35),k=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),O=function(e){this.type=1,this.canUseLayerHinting=e.canUseLayerHinting,this.pixelRatio=e.pixelRatio,this.editorClassName=e.editorClassName,this.lineHeight=e.lineHeight,this.readOnly=e.readOnly,this.accessibilitySupport=e.accessibilitySupport,this.emptySelectionClipboard=e.emptySelectionClipboard,this.layoutInfo=e.layoutInfo,this.fontInfo=e.fontInfo,this.viewInfo=e.viewInfo,this.wrappingInfo=e.wrappingInfo},R=function(e){this.type=2,this.selections=e},L=function(){this.type=3},N=function(){this.type=4},I=function(e){this.type=5,this.isFocused=e},D=function(){this.type=6},A=function(e,t){this.type=7,this.fromLineNumber=e,this.toLineNumber=t},P=function(e,t){this.type=8,this.fromLineNumber=e,this.toLineNumber=t},x=function(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t},M=function(e,t,o,n){this.type=10,this.range=e,this.verticalType=t,this.revealHorizontal=o,this.scrollType=n},B=function(e){this.type=11,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged},F=function(e){this.type=12,this.ranges=e},H=function(){this.type=15},U=function(){this.type=13},V=function(){this.type=14},W=function(){this.type=16},j=function(e){function t(){var t=e.call(this)||this;return t._listeners=[],t._collector=null,t._collectorCnt=0,t}return k(t,e),t.prototype.dispose=function(){this._listeners=[],e.prototype.dispose.call(this)},t.prototype._beginEmit=function(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new G),this._collector},t.prototype._endEmit=function(){if(this._collectorCnt--,0===this._collectorCnt){var e=this._collector.finalize();this._collector=null,e.length>0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),o=0,n=t.length;ot.MAX_CURSOR_COUNT&&(n=n.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var i=new X(this._model,this);this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._emitStateChangedIfNecessary(e,o,i)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,o){this._revealRange(t,0,e,o)},t.prototype.revealRange=function(e,t,o,n){this.emitCursorRevealRange(t,o,e,n)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),o=0,n=t.length;o1)return;var a=new _.a(r.lineNumber,r.column,r.lineNumber,r.column);this.emitCursorRevealRange(a,t,o,n)},t.prototype.emitCursorRevealRange=function(e,t,o,n){try{this._beginEmit().emit(new M(e,t,o,n))}finally{this._endEmit()}},t.prototype.trigger=function(e,t,o){var n=C.b;if(t!==n.CompositionStart)if(t===n.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.editor.readOnly)this._onDidAttemptReadOnlyEdit.fire(void 0);else{var i=new X(this._model,this),r=w.a.NotSet;t!==n.Undo&&t!==n.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case n.Type:this._type(e,o.text);break;case n.ReplacePreviousChar:this._replacePreviousChar(o.text,o.replaceCharCnt);break;case n.Paste:r=w.a.Paste,this._paste(o.text,o.pasteOnNewLine,o.multicursorText);break;case n.Cut:this._cut();break;case n.Undo:r=w.a.Undo,this._interpretCommandResult(this._model.undo());break;case n.Redo:r=w.a.Redo,this._interpretCommandResult(this._model.redo());break;case n.ExecuteCommand:this._externalExecuteCommand(o);break;case n.ExecuteCommands:this._externalExecuteCommands(o);break;case n.CompositionEnd:this._interpretCompositionEnd(e)}}catch(e){Object(s.e)(e)}this._isHandling=!1,t!==n.Undo&&t!==n.Redo&&this._cursors.startTrackingSelections(),this._emitStateChangedIfNecessary(e,r,i)&&this._revealRange(0,0,!0,0)}else this._isDoingComposition=!0},t.prototype._interpretCompositionEnd=function(e){this._isDoingComposition||"keyboard"!==e||this._executeEditOperation(T.a.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections()))},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(T.a.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var o=0,n=t.length;o0&&(r[0]._isTracked=!0);var l=e.model.pushEditOperations(e.selectionsBefore,r,(function(o){for(var n=[],i=0;i0?(n[o].sort(s),a[o]=t[o].computeCursorState(e.model,{getInverseEditOperations:function(){return n[o]},getTrackedSelection:function(t){var o=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[o]);return e.trackedRangesDirection[o]===y.b.LTR?new y.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new y.a(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):a[o]=e.selectionsBefore[o]};for(i=0;ii.identifier.major?n.identifier.major:i.identifier.major).toString()]=!0;for(var s=0;s0&&o--}}return t},e}(),J=o(11),Z=o(205),Q=o(54),ee=function(){function e(e,t,o,n,i){this.editorId=e,this.model=t,this.configuration=o,this._linesCollection=n,this._coordinatesConverter=i,this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=null,this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,o=this._decorationsCache[t];if(!o){var n=e.range,i=e.options,r=void 0;if(i.isWholeLine){var s=this._coordinatesConverter.convertModelPositionToViewPosition(new m.a(n.startLineNumber,1)),a=this._coordinatesConverter.convertModelPositionToViewPosition(new m.a(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)));r=new _.a(s.lineNumber,s.column,a.lineNumber,a.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n);o=new Q.e(r,i),this._decorationsCache[t]=o}return o},e.prototype.getDecorationsViewportData=function(e){var t=!0;return(t=(t=t&&null!==this._cachedModelDecorationsResolver)&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,this.configuration.editor.readOnly),o=e.startLineNumber,n=e.endLineNumber,i=[],r=0,s=[],a=o;a<=n;a++)s[a-o]=[];for(var l=0,u=t.length;l=s&&h<=a,g=ce(this.linePositionMapperFactory,o[c],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!d);i[c]=g.getViewLineCount(),this.lines[c]=g}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new te.b(i)},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 o=e.map((function(e){return t.model.validateRange(e)})).sort(_.a.compareRangesUsingStarts),n=[],i=o[0].startLineNumber,r=o[0].endLineNumber,s=1,a=o.length;sr+1?(n.push(new _.a(i,1,r,1)),i=l.startLineNumber,r=l.endLineNumber):l.endLineNumber>r&&(r=l.endLineNumber)}return n.push(new _.a(i,1,r,1)),n},e.prototype.setHiddenAreas=function(e){var t=this,o=this._reduceRanges(e),n=this.hiddenAreasIds.map((function(e){return t.model.getDecorationRange(e)})).sort(_.a.compareRangesUsingStarts);if(o.length===n.length){for(var i=!1,r=0;r=l&&g<=u?this.lines[r].isVisible()&&(this.lines[r]=this.lines[r].setVisible(!1),p=!0):(d=!0,this.lines[r].isVisible()||(this.lines[r]=this.lines[r].setVisible(!0),p=!0)),p){var f=this.lines[r].getViewLineCount();this.prefixSumComputer.changeValue(r,f)}}return d||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,o){return(this.wrappingIndent!==e||this.wrappingColumn!==t||this.columnsForFullWidthChar!==o)&&(this.wrappingIndent=e,this.wrappingColumn=t,this.columnsForFullWidthChar=o,this._constructLines(!1),!0)},e.prototype.onModelFlushed=function(){this._constructLines(!0)},e.prototype.onModelLinesDeleted=function(e,t,o){if(e<=this._validModelVersionId)return null;var n=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,i=this.prefixSumComputer.getAccumulatedValue(o-1);return this.lines.splice(t-1,o-t+1),this.prefixSumComputer.removeValues(t-1,o-t+1),new P(n,i)},e.prototype.onModelLinesInserted=function(e,t,o,n){if(e<=this._validModelVersionId)return null;for(var i=this.getHiddenAreas(),r=!1,s=new m.a(t,1),a=0;aa?(p=(g=(c=(u=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+a-1)+1)+(i-a)-1,l=!0):it?t:e},e.prototype.warmUpLookupCache=function(e,t){this.prefixSumComputer.warmUpCache(e-1,t-1)},e.prototype.getActiveIndentGuide=function(e,t,o){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),o=this._toValidViewLineNumber(o);var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),s=this.model.getActiveIndentGuide(n.lineNumber,i.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,1);return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var o=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),i=[],r=[],s=[],a=o.lineNumber-1,l=n.lineNumber-1,u=null,c=a;c<=l;c++){var h=this.lines[c];if(h.isVisible()){var d=h.getViewLineNumberOfModelPosition(0,c===a?o.column:1),g=h.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(c+1)),p=0;(C=g-d+1)>1&&1===h.getViewLineMinColumn(this.model,c+1,g)&&(p=0===d?1:2),r.push(C),s.push(p),null===u&&(u=new m.a(c+1,0))}else null!==u&&(i=i.concat(this.model.getLinesIndentGuides(u.lineNumber,c)),u=null)}null!==u&&(i=i.concat(this.model.getLinesIndentGuides(u.lineNumber,n.lineNumber)),u=null);for(var f=t-e+1,_=new Array(f),y=0,v=0,b=i.length;vt&&(g=!0,d=t-i+1);var p=h+d;if(c.getViewLinesData(this.model,l+1,h,p,i-e,o,a),i+=d,g)break}}return a},e.prototype.validateViewPosition=function(e,t,o){this._ensureValidState(),e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,r=n.remainder,s=this.lines[i],a=s.getViewLineMinColumn(this.model,i+1,r),l=s.getViewLineMaxColumn(this.model,i+1,r);tl&&(t=l);var u=s.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new m.a(i+1,u)).equals(o)?new m.a(e,t):this.convertModelPositionToViewPosition(o.lineNumber,o.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e);var o=this.prefixSumComputer.getIndexOf(e-1),n=o.index,i=o.remainder,r=this.lines[n].getModelColumnOfViewPosition(i,t);return this.model.validatePosition(new m.a(n+1,r))},e.prototype.convertModelPositionToViewPosition=function(e,t){this._ensureValidState();for(var o=this.model.validatePosition(new m.a(e,t)),n=o.lineNumber,i=o.column,r=n-1,s=!1;r>0&&!this.lines[r].isVisible();)r--,s=!0;if(0===r&&!this.lines[r].isVisible())return new m.a(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[n-1].getViewPositionOfModelPosition(a,i)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var o=e-1;if(this.lines[o].isVisible()){var n=1+(0===o?0:this.prefixSumComputer.getAccumulatedValue(o-1));return this.lines[o].getViewLineNumberOfModelPosition(n,t)}for(;o>0&&!this.lines[o].isVisible();)o--;if(0===o&&!this.lines[o].isVisible())return 1;var i=1+(0===o?0:this.prefixSumComputer.getAccumulatedValue(o-1));return this.lines[o].getViewLineNumberOfModelPosition(i,this.model.getLineMaxColumn(o+1))},e.prototype.getAllOverviewRulerDecorations=function(e,t,o){for(var n=this.model.getOverviewRulerDecorations(e,t),i=new ge,r=0,s=n.length;r0&&(r=this.wrappedIndent+r),r},e.prototype.getViewLineLength=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");var n=this.getInputStartOffsetOfOutputLineIndex(o),i=this.getInputEndOffsetOfOutputLineIndex(e,t,o)-n;return o>0&&(i=this.wrappedIndent.length+i),i},e.prototype.getViewLineMinColumn=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");return o>0?this.wrappedIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,o).length+1},e.prototype.getViewLineData=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");var n=this.getInputStartOffsetOfOutputLineIndex(o),i=this.getInputEndOffsetOfOutputLineIndex(e,t,o),r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:i+1});o>0&&(r=this.wrappedIndent+r);var s=o>0?this.wrappedIndentLength+1:1,a=r.length+1,l=o+10&&(u=this.wrappedIndentLength);var c=e.getLineTokens(t);return new Q.c(r,l,s,a,c.sliceAndInflate(n,i,u))},e.prototype.getViewLinesData=function(e,t,o,n,i,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=o;a0&&(o0&&(i+=this.wrappedIndentLength),new m.a(e+n,i)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this.positionMapper.getOutputPositionOfInputOffset(t-1).outputLineIndex},e}();function ce(e,t,o,n,i,r,s){var a=e.createLineMapping(t,o,n,i,r);return null===a?s?ae.INSTANCE:le.INSTANCE:new ue(a,s)}var he=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}(),de=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new he(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,o){return!1},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,o){return new P(t,o)},e.prototype.onModelLinesInserted=function(e,t,o,n){return new x(t,o)},e.prototype.onModelLineChanged=function(e,t,o){return[!1,new A(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,o){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var o=t-e+1,n=new Array(o),i=0;i=t)return void(o>s&&(i[i.length-1]=o));i.push(n,t,o)}else this.result[e]=[n,t,o]},e}();function pe(e,t){if(!e._resolvedColor){var o=t.type,n="dark"===o?e.darkColor:"light"===o?e.color:e.hcColor;e._resolvedColor=function(e,t){if("string"==typeof e)return e;var o=e?t.getColor(e.id):null;o||(o=ne.a.transparent);return o.toString()}(n,t)}return e._resolvedColor}var fe=function(){function e(t,o,n,i){this.r=e._clamp(t),this.g=e._clamp(o),this.b=e._clamp(n),this.a=e._clamp(i)}return e._clamp=function(e){return e<0?0:e>255?255:0|e},e}(),me=function(){function e(){var e=this;this._onDidChange=new a.a,this.onDidChange=this._onDidChange.event,this._updateColorMap(),J.y.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=J.y.getColorMap();if(!e)return this._colors=[null],void(this._backgroundIsLight=!0);this._colors=[null];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}(),_e=function(){function e(t,o){if(760!==t.length)throw new Error("Invalid x2CharData");if(190!==o.length)throw new Error("Invalid x1CharData");this.x2charData=t,this.x1charData=o,this.x2charDataLight=e.soften(t,.8),this.x1charDataLight=e.soften(o,50/60)}return e.soften=function(e,t){for(var o=new Uint8ClampedArray(e.length),n=0,i=e.length;nt.width||n+4>t.height)console.warn("bad render request outside image data");else{var l=a?this.x2charDataLight:this.x2charData,u=e._getChIndex(i),c=4*t.width,h=s.r,d=s.g,g=s.b,p=r.r-h,f=r.g-d,m=r.b-g,_=t.data,y=4*u*2,v=n*c+4*o,b=l[y]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+1]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b,v+=c;b=l[y+2]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+3]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b,v+=c;b=l[y+4]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+5]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b,v+=c;b=l[y+6]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+7]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b}},e.prototype.x1RenderChar=function(t,o,n,i,r,s,a){if(o+1>t.width||n+2>t.height)console.warn("bad render request outside image data");else{var l=a?this.x1charDataLight:this.x1charData,u=e._getChIndex(i),c=4*t.width,h=s.r,d=s.g,g=s.b,p=r.r-h,f=r.g-d,m=r.b-g,_=t.data,y=2*u*1,v=n*c+4*o,b=l[y]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b,v+=c;b=l[y+1]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b}},e.prototype.x2BlockRenderChar=function(e,t,o,n,i,r){if(t+2>e.width||o+4>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=i.r,l=i.g,u=i.b,c=a+.5*(n.r-a),h=l+.5*(n.g-l),d=u+.5*(n.b-u),g=e.data,p=o*s+4*t;g[p+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d}},e.prototype.x1BlockRenderChar=function(e,t,o,n,i,r){if(t+1>e.width||o+2>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=i.r,l=i.g,u=i.b,c=a+.5*(n.r-a),h=l+.5*(n.g-l),d=u+.5*(n.b-u),g=e.data,p=o*s+4*t;g[p+0]=c,g[p+1]=h,g[p+2]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d}},e}(),ye=o(116),ve=o(92),be=o(27),Ee=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ce=function(e){function t(t,o,n){for(var i=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}(ye.a),Se=function(){function e(e,t,o){this.classifier=new Ce(e,t,o)}return e.nextVisibleColumn=function(e,t,o,n){return e=+e,t=+t,n=+n,o?e+(t-e%t):e+n},e.prototype.createLineMapping=function(t,o,n,i,r){if(-1===n)return null;o=+o,n=+n,i=+i;var s=0,a="",l=-1;if((r=+r)!==be.j.None&&-1!==(l=p.firstNonWhitespaceIndex(t))){a=t.substring(0,l);for(var u=0;un&&(a="",s=0)}var h=this.classifier,d=0,g=[],f=0,m=0,_=-1,y=0,v=-1,b=0,E=t.length;for(u=0;u0){var w=t.charCodeAt(u-1);1!==h.get(w)&&(_=u,y=s)}var k=1;if(p.isFullWidthCharacter(C)&&(k=i),(m=e.nextVisibleColumn(m,o,S,k))>n&&0!==u){var O=void 0,R=void 0;-1!==_&&y<=n?(O=_,R=y):-1!==v&&b<=n?(O=v,R=b):(O=u,R=s),g[f++]=O-d,d=O,m=e.nextVisibleColumn(R,o,S,k),_=-1,y=0,v=-1,b=0}if(-1!==_&&(y=e.nextVisibleColumn(y,o,S,k)),-1!==v&&(b=e.nextVisibleColumn(b,o,S,k)),2===T&&(r===be.j.None||u>=l)&&(_=u+1,y=s),4===T&&u>>1;t===e[s]?n=t&&(this._whitespaceId2Index[u]=c+1)}this._whitespaceId2Index[e.toString()]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,o){e|=0,t|=0,o|=0;var n=!1;return n=this.changeWhitespaceHeight(e,o)||n,n=this.changeWhitespaceAfterLineNumber(e,t)||n},e.prototype.changeWhitespaceHeight=function(e,t){t|=0;var o=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(o)){var n=this._whitespaceId2Index[o];if(this._heights[n]!==t)return this._heights[n]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,o){o|=0;var n=(t|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(n)){var i=this._whitespaceId2Index[n];if(this._afterLineNumbers[i]!==o){var r=this._ordinals[i],s=this._heights[i],a=this._minWidths[i];this.removeWhitespace(t);var l=e.findInsertionIndex(this._afterLineNumbers,o,this._ordinals,r);return this._insertWhitespaceAtIndex(t,l,o,r,s,a),!0}}return!1},e.prototype.removeWhitespace=function(e){var t=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var o=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],this._removeWhitespaceAtIndex(o),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),o=0,n=t.length;o=e&&(this._whitespaceId2Index[i]=r-1)}},e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var o=0,n=this._afterLineNumbers.length;ot&&(this._afterLineNumbers[o]-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var o=0,n=this._afterLineNumbers.length;o=t.length||t[i+1]>=e)return i;o=i+1|0}else n=i-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,o=this._lineHeight,n=1,i=t;n=s+o)n=r+1;else{if(e>=s)return r;i=r}}return n>t?t:n},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0;var o,n,i=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,l=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),u=0|this._whitespaces.getCount();-1===l?(l=u,n=a+1,o=0):(n=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(l),o=0|this._whitespaces.getHeightForWhitespaceIndex(l));var c=s,h=c,d=0;s>=5e5&&(d=5e5*Math.floor(s/5e5),h-=d=Math.floor(d/i)*i);for(var g=[],p=e+(t-e)/2,f=-1,m=r;m<=a;m++){if(-1===f){(c<=p&&pp)&&(f=m)}for(c+=i,g[m-r]=h,h+=i;n===m;)h+=o,c+=o,++l>=u?n=a+1:(n=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(l),o=0|this._whitespaces.getHeightForWhitespaceIndex(l));if(c>=t){a=m;break}}-1===f&&(f=a);var _=0|this.getVerticalOffsetForLineNumber(a),y=r,v=a;return yt&&v--,{bigNumbersDelta:d,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:g,centeredLineNumber:f,completelyVisibleStartLineNumber:y,completelyVisibleEndLineNumber:v}},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,o,n=0,i=this._whitespaces.getCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this._whitespaces.getHeightForWhitespaceIndex(i))return-1;for(;n=(o=this.getVerticalOffsetForWhitespaceIndex(t))+this._whitespaces.getHeightForWhitespaceIndex(t))n=t+1;else{if(e>=o)return t;i=t}return n},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 o=this.getVerticalOffsetForWhitespaceIndex(t);if(o>e)return null;var n=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:o,height:n}},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var o=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this._whitespaces.getCount()-1;if(o<0)return[];for(var i=[],r=o;r<=n;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this._whitespaces.getHeightForWhitespaceIndex(r);if(s>=t)break;i.push({id:this._whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return i},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight)},e}(),Re=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Le=function(e){function t(t,o,n){var i=e.call(this)||this;return i._configuration=t,i._linesLayout=new Oe(o,i._configuration.editor.lineHeight),i.scrollable=i._register(new we.a(0,n)),i._configureSmoothScrollDuration(),i.scrollable.setScrollDimensions({width:t.editor.layoutInfo.contentWidth,height:t.editor.layoutInfo.contentHeight}),i.onDidScroll=i.scrollable.onScroll,i._updateHeight(),i}return Re(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 this._configuration.editor.viewInfo.scrollbar.horizontal===we.b.Hidden?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 Q.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new Q.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,t){if(!this._configuration.editor.wrappingInfo.isViewportWrapping){var o=this._configuration.editor.viewInfo.scrollBeyondLastColumn*this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+o,t,n)}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,o=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(o),scrollLeft:e.scrollLeft}},t.prototype.addWhitespace=function(e,t,o,n){return this._linesLayout.insertWhitespace(e,t,o,n)},t.prototype.changeWhitespace=function(e,t,o){return this._linesLayout.changeWhitespace(e,t,o)},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 o=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:o.scrollLeft+e,scrollTop:o.scrollTop+t})},t}(l.a),Ne=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ie=!0,De=function(e){function t(t,o,n,i){var r=e.call(this)||this;if(r.editorId=t,r.configuration=o,r.model=n,r.hasFocus=!1,r.viewportStartLine=-1,r.viewportStartLineTrackedRange=null,r.viewportStartLineTop=0,Ie&&r.model.isTooLargeForTokenization())r.lines=new de(r.model);else{var s=r.configuration.editor,a=new Se(s.wrappingInfo.wordWrapBreakBeforeCharacters,s.wrappingInfo.wordWrapBreakAfterCharacters,s.wrappingInfo.wordWrapBreakObtrusiveCharacters);r.lines=new se(r.model,a,r.model.getOptions().tabSize,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth,s.wrappingInfo.wrappingIndent)}return r.coordinatesConverter=r.lines.createCoordinatesConverter(),r.viewLayout=r._register(new Le(r.configuration,r.getLineCount(),i)),r._register(r.viewLayout.onDidScroll((function(e){try{r._beginEmit().emit(new B(e))}finally{r._endEmit()}}))),r.decorations=new ee(r.editorId,r.model,r.configuration,r.lines,r.coordinatesConverter),r._registerModelEvents(),r._register(r.configuration.onDidChange((function(e){try{var t=r._beginEmit();r._onConfigurationChanged(t,e)}finally{r._endEmit()}}))),r._register(me.getInstance().onDidChange((function(){try{r._beginEmit().emit(new U)}finally{r._endEmit()}}))),r}return Ne(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.decorations.dispose(),this.lines.dispose(),this.viewportStartLineTrackedRange=this.model._setTrackedRange(this.viewportStartLineTrackedRange,null,v.h.NeverGrowsWhenTypingAtEdges)},t.prototype.setHasFocus=function(e){this.hasFocus=e},t.prototype._onConfigurationChanged=function(e,t){var o=null;if(-1!==this.viewportStartLine){var n=new m.a(this.viewportStartLine,this.getLineMinColumn(this.viewportStartLine));o=this.coordinatesConverter.convertViewPositionToModelPosition(n)}var i=!1,r=this.configuration.editor;if(this.lines.setWrappingSettings(r.wrappingInfo.wrappingIndent,r.wrappingInfo.wrappingColumn,r.fontInfo.typicalFullwidthCharacterWidth/r.fontInfo.typicalHalfwidthCharacterWidth)&&(e.emit(new N),e.emit(new D),e.emit(new L),this.decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(i=!0)),t.readOnly&&(this.decorations.reset(),e.emit(new L)),e.emit(new O(t)),this.viewLayout.onConfigurationChanged(t),i&&o){var s=this.coordinatesConverter.convertModelPositionToViewPosition(o),a=this.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber);this.viewLayout.deltaScrollNow(0,a-this.viewportStartLineTop)}},t.prototype._registerModelEvents=function(){var e=this;this._register(this.model.onDidChangeRawContentFast((function(t){try{for(var o=e._beginEmit(),n=!1,i=!1,r=t.changes,s=t.versionId,a=0,l=r.length;a=2&&e.viewportStartLineTrackedRange){var f=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(f){var m=e.coordinatesConverter.convertModelPositionToViewPosition(f.getStartPosition()),_=e.viewLayout.getVerticalOffsetForLineNumber(m.lineNumber);e.viewLayout.deltaScrollNow(0,_-e.viewportStartLineTop)}}}))),this._register(this.model.onDidChangeTokens((function(t){for(var o=[],n=0,i=t.ranges.length;na||(r0&&s[l-1]===s[l]||(a+=this.model.getLineContent(s[l])+i);return a}var u=[];for(l=0;l'+this._getHTMLToCopy(o,r)+""},t.prototype._getHTMLToCopy=function(e,t){for(var o=e.startLineNumber,n=e.startColumn,i=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),a="",l=o;l<=i;l++){var u=this.model.getLineTokens(l),c=u.getLineContent(),h=l===o?n-1:0,d=l===i?r-1:c.length;a+=""===c?"
":Object(Z.a)(c,u.inflate(),t,h,d,s)}return a},t.prototype._getColorMap=function(){for(var e=J.y.getColorMap(),t=[null],o=1,n=e.length;o'+o+"":String(n)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===o?String(o):o%10==0?String(o):"":String(o)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var o=We.c?this._lineHeight%2==0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r='
',s=[],a=n;a<=i;a++){var l=a-n,u=this._getLineRenderLineNumber(a);s[l]=u?r+u+"
":""}this._renderResult=s}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},t.CLASS_NAME="line-numbers",t}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.q);o&&t.addRule(".monaco-editor .line-numbers { color: "+o+"; }");var n=e.getColor(Je.b);n&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+n+"; }")}));var ot=o(102),nt=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),it=function(){function e(e,t,o){this.top=e,this.left=t,this.width=o}return e.prototype.setWidth=function(t){return new e(this.top,this.left,t)},e}(),rt=je.h||je.j,st=function(){function e(){this._lastState=null}return e.prototype.set=function(e){this._lastState=e},e.prototype.get=function(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState:(this._lastState=null,null)},e.INSTANCE=new e,e}(),at=function(e){function t(t,o,n){var i=e.call(this,t)||this;i._primaryCursorVisibleRange=null,i._viewController=o,i._viewHelper=n;var r=i._context.configuration.editor;i._accessibilitySupport=r.accessibilitySupport,i._contentLeft=r.layoutInfo.contentLeft,i._contentWidth=r.layoutInfo.contentWidth,i._contentHeight=r.layoutInfo.contentHeight,i._scrollLeft=0,i._scrollTop=0,i._fontInfo=r.fontInfo,i._lineHeight=r.lineHeight,i._emptySelectionClipboard=r.emptySelectionClipboard,i._visibleTextArea=null,i._selections=[new y.a(1,1,1,1)],i.textArea=Object(He.b)(document.createElement("textarea")),Xe.write(i.textArea,6),i.textArea.setClassName("inputarea"),i.textArea.setAttribute("wrap","off"),i.textArea.setAttribute("autocorrect","off"),i.textArea.setAttribute("autocapitalize","off"),i.textArea.setAttribute("autocomplete","off"),i.textArea.setAttribute("spellcheck","false"),i.textArea.setAttribute("aria-label",r.viewInfo.ariaLabel),i.textArea.setAttribute("role","textbox"),i.textArea.setAttribute("aria-multiline","true"),i.textArea.setAttribute("aria-haspopup","false"),i.textArea.setAttribute("aria-autocomplete","both"),i.textAreaCover=Object(He.b)(document.createElement("div")),i.textAreaCover.setPosition("absolute");var s={getLineCount:function(){return i._context.model.getLineCount()},getLineMaxColumn:function(e){return i._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return i._context.model.getValueInRange(e,t)}},a={getPlainTextToCopy:function(){var e=i._context.model.getPlainTextToCopy(i._selections,i._emptySelectionClipboard,We.g),t=i._context.model.getEOL(),o=i._emptySelectionClipboard&&1===i._selections.length&&i._selections[0].isEmpty(),n=Array.isArray(e)?e:null,r=Array.isArray(e)?e.join(t):e,s=null;(o||n)&&(s={lastCopiedValue:je.j?r.replace(/\r\n/g,"\n"):r,isFromEmptySelection:i._emptySelectionClipboard&&1===i._selections.length&&i._selections[0].isEmpty(),multicursorText:n});return st.INSTANCE.set(s),r},getHTMLToCopy:function(){return i._context.model.getHTMLToCopy(i._selections,i._emptySelectionClipboard)},getScreenReaderContent:function(e){if(je.l)return ze.b.EMPTY;if(1===i._accessibilitySupport){if(We.d){var t=i._selections[0];if(t.isEmpty()){var o=t.getStartPosition(),n=i._getWordBeforePosition(o);if(0===n.length&&(n=i._getCharacterBeforePosition(o)),n.length>0)return new ze.b(n,n.length,n.length,o,o)}}return ze.b.EMPTY}return ze.a.fromEditorSelection(e,s,i._selections[0],0===i._accessibilitySupport)},deduceModelPosition:function(e,t,o){return i._context.model.deduceModelPositionRelativeToViewPosition(e,t,o)}};return i._textAreaInput=i._register(new Ge.b(a,i.textArea)),i._register(i._textAreaInput.onKeyDown((function(e){i._viewController.emitKeyDown(e)}))),i._register(i._textAreaInput.onKeyUp((function(e){i._viewController.emitKeyUp(e)}))),i._register(i._textAreaInput.onPaste((function(e){var t=st.INSTANCE.get(e.text),o=!1,n=null;t&&(o=i._emptySelectionClipboard&&t.isFromEmptySelection,n=t.multicursorText),i._viewController.paste("keyboard",e.text,o,n)}))),i._register(i._textAreaInput.onCut((function(){i._viewController.cut("keyboard")}))),i._register(i._textAreaInput.onType((function(e){e.replaceCharCnt?i._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):i._viewController.type("keyboard",e.text)}))),i._register(i._textAreaInput.onSelectionChangeRequest((function(e){i._viewController.setSelection("keyboard",e)}))),i._register(i._textAreaInput.onCompositionStart((function(){var e=i._selections[0].startLineNumber,t=i._selections[0].startColumn;i._context.privateViewEventBus.emit(new M(new _.a(e,t,e,t),0,!0,1));var o=i._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);o&&(i._visibleTextArea=new it(i._context.viewLayout.getVerticalOffsetForLineNumber(e),o.left,rt?0:1),i._render()),i.textArea.setClassName("inputarea ime-input"),i._viewController.compositionStart("keyboard")}))),i._register(i._textAreaInput.onCompositionUpdate((function(e){je.h?i._visibleTextArea=i._visibleTextArea.setWidth(0):i._visibleTextArea=i._visibleTextArea.setWidth(function(e,t){var o=document.createElement("canvas").getContext("2d");o.font=(n=t,i="normal",r=n.fontWeight,s=n.fontSize,a=n.lineHeight,l=n.fontFamily,i+" normal "+r+" "+s+"px / "+a+"px "+l);var n,i,r,s,a,l;var u=o.measureText(e);return je.j?u.width+2:u.width}(e.data,i._fontInfo)),i._render()}))),i._register(i._textAreaInput.onCompositionEnd((function(){i._visibleTextArea=null,i._render(),i.textArea.setClassName("inputarea"),i._viewController.compositionEnd("keyboard")}))),i._register(i._textAreaInput.onFocus((function(){i._context.privateViewEventBus.emit(new I(!0))}))),i._register(i._textAreaInput.onBlur((function(){i._context.privateViewEventBus.emit(new I(!1))}))),i}return nt(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),o=Object(ot.a)(this._context.configuration.editor.wordSeparators),n=e.column,i=0;n>1;){var r=t.charCodeAt(n-2);if(0!==o.get(r)||i>50)return t.substring(n-1,e.column-1);i++,n--}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(!p.isHighSurrogate(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),!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 m.a(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,rt?0:1,rt?0:1,!1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,o,n,i){var r=this.textArea,s=this.textAreaCover;i?g.a.applyFontInfo(r,this._fontInfo):(r.setFontSize(1),r.setLineHeight(this._fontInfo.lineHeight)),r.setTop(e),r.setLeft(t),r.setWidth(o),r.setHeight(n),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){var e=this.textArea,t=this.textAreaCover;if(g.a.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),rt)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 "+$e.OUTER_CLASS_NAME):0!==this._context.configuration.editor.viewInfo.renderLineNumbers?t.setClassName("monaco-editor-background textAreaCover "+tt.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(Ye);var lt=o(66),ut=o(16),ct=o(41),ht=o(73),dt=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),gt=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.toClientCoordinates=function(){return new pt(this.x-r.e.scrollX,this.y-r.e.scrollY)},e}(),pt=function(){function e(e,t){this.clientX=e,this.clientY=t}return e.prototype.toPageCoordinates=function(){return new gt(this.clientX+r.e.scrollX,this.clientY+r.e.scrollY)},e}(),ft=function(e,t,o,n){this.x=e,this.y=t,this.width=o,this.height=n};function mt(e){var t=r.u(e);return new ft(t.left,t.top,t.width,t.height)}var _t=function(e){function t(t,o){var n=e.call(this,t)||this;return n.pos=new gt(n.posx,n.posy),n.editorPos=mt(o),n}return dt(t,e),t}(ct.b),yt=function(){function e(e){this._editorViewDomNode=e}return e.prototype._create=function(e){return new _t(e,this._editorViewDomNode)},e.prototype.onContextMenu=function(e,t){var o=this;return r.g(e,"contextmenu",(function(e){t(o._create(e))}))},e.prototype.onMouseUp=function(e,t){var o=this;return r.g(e,"mouseup",(function(e){t(o._create(e))}))},e.prototype.onMouseDown=function(e,t){var o=this;return r.g(e,"mousedown",(function(e){t(o._create(e))}))},e.prototype.onMouseLeave=function(e,t){var o=this;return r.h(e,(function(e){t(o._create(e))}))},e.prototype.onMouseMoveThrottled=function(e,t,o,n){var i=this;return r.i(e,"mousemove",t,(function(e,t){return o(e,i._create(t))}),n)},e}(),vt=function(e){function t(t){var o=e.call(this)||this;return o._editorViewDomNode=t,o._globalMouseMoveMonitor=o._register(new ht.a),o._keydownListener=null,o}return dt(t,e),t.prototype.startMonitoring=function(e,t,o){var n=this;this._keydownListener=r.j(document,"keydown",(function(e){e.toKeybinding().isModifierKey()||n._globalMouseMoveMonitor.stopMonitoring(!0)}),!0);this._globalMouseMoveMonitor.startMonitoring((function(t,o){return e(t,new _t(o,n._editorViewDomNode))}),t,(function(){n._keydownListener.dispose(),o()}))},t}(l.a),bt=o(123),Et=o(68),Ct=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),St=function(e){function t(t,o,n){var i=e.call(this,t,o)||this;return i._viewLines=n,i}return Ct(t,e),t.prototype.linesVisibleRangesForRange=function(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)},t.prototype.visibleRangeForPosition=function(e){var t=this._viewLines.visibleRangesForRange2(new _.a(e.lineNumber,e.column,e.lineNumber,e.column));return t?t[0]:null},t}(function(){function e(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;var o=this._viewLayout.getCurrentViewport();this.scrollTop=o.top,this.scrollLeft=o.left,this.viewportWidth=o.width,this.viewportHeight=o.height}return e.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollTop},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.getDecorationsInViewport=function(){return this.viewportData.getDecorationsInViewport()},e}()),Tt=function(e,t){this.lineNumber=e,this.ranges=t},wt=function(){function e(e,t){this.left=Math.round(e),this.width=Math.round(t)}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e}(),kt=function(){function e(e,t){this.left=e,this.width=t}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e.compare=function(e,t){return e.left-t.left},e}(),Ot=function(){function e(){}return e._createRange=function(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange},e._detachRange=function(e,t){e.selectNodeContents(t)},e._readClientRects=function(e,t,o,n,i){var r=this._createRange();try{return r.setStart(e,t),r.setEnd(o,n),r.getClientRects()}catch(e){return null}finally{this._detachRange(r,i)}},e._mergeAdjacentRanges=function(e){if(1===e.length)return[new wt(e[0].left,e[0].width)];e.sort(kt.compare);for(var t=[],o=0,n=e[0].left,i=e[0].width,r=1,s=e.length;r=l?i=Math.max(i,l+u-n):(t[o++]=new wt(n,i),n=l,i=u)}return t[o++]=new wt(n,i),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var o=[],n=0,i=e.length;na)return null;(t=Math.min(a,Math.max(0,t)))!==(n=Math.min(a,Math.max(0,n)))&&n>0&&0===i&&(n--,i=Number.MAX_VALUE);var l=e.children[t].firstChild,u=e.children[n].firstChild;if(l&&u||(!l&&0===o&&t>0&&(l=e.children[t-1].firstChild,o=1073741824),!u&&0===i&&n>0&&(u=e.children[n-1].firstChild,i=1073741824)),!l||!u)return null;o=Math.min(l.textContent.length,Math.max(0,o)),i=Math.min(u.textContent.length,Math.max(0,i));var c=this._readClientRects(l,o,u,i,s);return this._createHorizontalRangesFromClientRects(c,r)},e}(),Rt=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Lt=!!We.e||!(We.c||je.j||je.m),Nt=je.h,It=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}(),Dt=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.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.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures},e}(),At=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=Object(He.b)(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!(!Nt&&this._options.themeType!==Fe.b)&&(this._isMaybeInvalid=!0,!0)},e.prototype.renderLine=function(t,o,n,i){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var r=n.getViewLineRenderingData(t),s=this._options,a=bt.a.filter(r.inlineDecorations,t,r.minColumn,r.maxColumn);if(Nt||s.themeType===Fe.b)for(var l=n.selections,u=0,c=l.length;ut)){var d=h.startLineNumber===t?h.startColumn:r.minColumn,g=h.endLineNumber===t?h.endColumn:r.maxColumn;d');var f=Object(Et.c)(p,i);i.appendASCIIString("");var m=null;return Lt&&r.isBasicASCII&&s.useMonospaceOptimizations&&0===f.containsForeignElements&&r.content.length<300&&p.lineTokens.getCount()<100&&(m=new Pt(this._renderedViewLine?this._renderedViewLine.domNode:null,p,f.characterMapping)),m||(m=Bt(this._renderedViewLine?this._renderedViewLine.domNode:null,p,f.characterMapping,f.containsRTL,f.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,o){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 n=0|this._renderedViewLine.input.stopRenderingLineAfter;return-1!==n&&e>n&&t>n?null:(-1!==n&&e>n&&(e=n),-1!==n&&t>n&&(t=n),this._renderedViewLine.getVisibleRangesForRange(e,t,o))},e.prototype.getColumnOfNodeOffset=function(e,t,o){return this._renderedViewLine.getColumnOfNodeOffset(e,t,o)},e.CLASS_NAME="view-line",e}(),Pt=function(){function e(e,t,o){this.domNode=e,this.input=t,this._characterMapping=o,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,o){var n=this._getCharPosition(e),i=this._getCharPosition(t);return[new wt(n,i-n)]},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,o){for(var n=t.textContent.length,i=-1;t;)t=t.previousSibling,i++;return this._characterMapping.partDataToCharOffset(i,n,o)+1},e}(),xt=function(){function e(e,t,o,n,i){if(this.domNode=e,this.input=t,this._characterMapping=o,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=i,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||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,o){if(null!==this._pixelOffsetCache){var n=this._readPixelOffset(e,o);if(-1===n)return null;var i=this._readPixelOffset(t,o);return-1===i?null:[new wt(n,i-n)]}return this._readVisibleRangesForRange(e,t,o)},e.prototype._readVisibleRangesForRange=function(e,t,o){if(e===t){var n=this._readPixelOffset(e,o);return-1===n?null:[new wt(n,0)]}return this._readRawVisibleRangesForRange(e,t,o)},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 o=this._pixelOffsetCache[e];if(-1!==o)return o;var n=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=n,n}return this._actualReadPixelOffset(e,t)},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length){var o=Ot.readHorizontalRanges(this._getReadingTarget(),0,0,0,0,t.clientRectDeltaLeft,t.endNode);return o&&0!==o.length?o[0].left:-1}if(e===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var n=this._characterMapping.charOffsetToPartData(e-1),i=Et.a.getPartIndex(n),r=Et.a.getCharIndex(n),s=Ot.readHorizontalRanges(this._getReadingTarget(),i,r,i,r,t.clientRectDeltaLeft,t.endNode);return s&&0!==s.length?s[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,o){if(1===e&&t===this._characterMapping.length)return[new wt(0,this.getWidth())];var n=this._characterMapping.charOffsetToPartData(e-1),i=Et.a.getPartIndex(n),r=Et.a.getCharIndex(n),s=this._characterMapping.charOffsetToPartData(t-1),a=Et.a.getPartIndex(s),l=Et.a.getCharIndex(s);return Ot.readHorizontalRanges(this._getReadingTarget(),i,r,a,l,o.clientRectDeltaLeft,o.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,o){for(var n=t.textContent.length,i=-1;t;)t=t.previousSibling,i++;return this._characterMapping.partDataToCharOffset(i,n,o)+1},e}(),Mt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rt(t,e),t.prototype._readVisibleRangesForRange=function(t,o,n){var i=e.prototype._readVisibleRangesForRange.call(this,t,o,n);if(!i||0===i.length||t===o||1===t&&o===this._characterMapping.length)return i;var r=this._readPixelOffset(o-1,n),s=this._readPixelOffset(o,n);if(-1!==r&&-1!==s){var a=r<=s,l=i[i.length-1];a&&l.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}(),jt=function(){function e(e,t,o){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=o,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){var o=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(o){var n=o.verticalOffset+o.height/2,i=e.model.getLineCount(),r=null,s=void 0,a=null;return o.afterLineNumber!==i&&(a=new m.a(o.afterLineNumber+1,1)),o.afterLineNumber>0&&(r=new m.a(o.afterLineNumber,e.model.getLineMaxColumn(o.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Yt._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))})),zt={isAfterLines:!0};function Kt(e){return{isAfterLines:!1,horizontalDistanceToText:e}}var Yt=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,o=Xe.collect(t,this._viewHelper.viewDomNode);return!(!Wt.isChildOfContentWidgets(o)&&!Wt.isChildOfOverflowingContentWidgets(o))||!!Wt.isChildOfOverlayWidgets(o)},e.prototype.createMouseTarget=function(t,o,n,i){var r=new jt(this._context,this._viewHelper,t),s=new Gt(r,o,n,i);try{return e._createMouseTarget(r,s,!1)}catch(e){return s.fulfill(ut.b.UNKNOWN)}},e._createMouseTarget=function(t,o,n){if(null===o.target){if(n)return o.fulfill(ut.b.UNKNOWN);var i=e._doHitTest(t,o);return i.position?e.createMouseTargetFromHitTestPosition(t,o,i.position.lineNumber,i.position.column):this._createMouseTarget(t,o.withTarget(i.hitTarget),!0)}var r=null;return(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r||e._hitTestContentWidget(t,o))||e._hitTestOverlayWidget(t,o))||e._hitTestMinimap(t,o))||e._hitTestScrollbarSlider(t,o))||e._hitTestViewZone(t,o))||e._hitTestMargin(t,o))||e._hitTestViewCursor(t,o))||e._hitTestTextArea(t,o))||e._hitTestViewLines(t,o,n))||e._hitTestScrollbar(t,o))||o.fulfill(ut.b.UNKNOWN)},e._hitTestContentWidget=function(e,t){if(Wt.isChildOfContentWidgets(t.targetPath)||Wt.isChildOfOverflowingContentWidgets(t.targetPath)){var o=e.findAttribute(t.target,"widgetId");return o?t.fulfill(ut.b.CONTENT_WIDGET,null,null,o):t.fulfill(ut.b.UNKNOWN)}return null},e._hitTestOverlayWidget=function(e,t){if(Wt.isChildOfOverlayWidgets(t.targetPath)){var o=e.findAttribute(t.target,"widgetId");return o?t.fulfill(ut.b.OVERLAY_WIDGET,null,null,o):t.fulfill(ut.b.UNKNOWN)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var o=0,n=(r=e.lastViewCursorsRenderData).length;oi.contentLeft+i.width)){var l=e.getVerticalOffsetForLineNumber(i.position.lineNumber);if(l<=a&&a<=l+i.height)return t.fulfill(ut.b.CONTENT_TEXT,i.position)}}}return null},e._hitTestViewZone=function(e,t){var o=e.getZoneAtCoord(t.mouseVerticalOffset);if(o){var n=t.isInContentArea?ut.b.CONTENT_VIEW_ZONE:ut.b.GUTTER_VIEW_ZONE;return t.fulfill(n,o.position,null,o)}return null},e._hitTestTextArea=function(e,t){return Wt.isTextArea(t.targetPath)?t.fulfill(ut.b.TEXTAREA):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var o=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=o.range.getStartPosition(),i=Math.abs(t.pos.x-t.editorPos.x),r={isAfterLines:o.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:i};return(i-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(ut.b.GUTTER_GLYPH_MARGIN,n,o.range,r):(i-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(ut.b.GUTTER_LINE_NUMBERS,n,o.range,r):(i-=e.layoutInfo.lineNumbersWidth,t.fulfill(ut.b.GUTTER_LINE_DECORATIONS,n,o.range,r))}return null},e._hitTestViewLines=function(t,o,n){if(!Wt.isChildOfViewLines(o.targetPath))return null;if(t.isAfterLines(o.mouseVerticalOffset)){var i=t.model.getLineCount(),r=t.model.getLineMaxColumn(i);return o.fulfill(ut.b.CONTENT_EMPTY,new m.a(i,r),void 0,zt)}if(n){if(Wt.isStrictChildOfViewLines(o.targetPath)){var s=t.getLineNumberAtVerticalOffset(o.mouseVerticalOffset);if(0===t.model.getLineLength(s)){var a=t.getLineWidth(s),l=Kt(o.mouseContentHorizontalOffset-a);return o.fulfill(ut.b.CONTENT_EMPTY,new m.a(s,1),void 0,l)}}return o.fulfill(ut.b.UNKNOWN)}var u=e._doHitTest(t,o);return u.position?e.createMouseTargetFromHitTestPosition(t,o,u.position.lineNumber,u.position.column):this._createMouseTarget(t,o.withTarget(u.hitTarget),!0)},e._hitTestMinimap=function(e,t){if(Wt.isChildOfMinimap(t.targetPath)){var o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(o);return t.fulfill(ut.b.SCROLLBAR,new m.a(o,n))}return null},e._hitTestScrollbarSlider=function(e,t){if(Wt.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var o=t.target.className;if(o&&/\b(slider|scrollbar)\b/.test(o)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(ut.b.SCROLLBAR,new m.a(n,i))}}return null},e._hitTestScrollbar=function(e,t){if(Wt.isChildOfScrollableElement(t.targetPath)){var o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(o);return t.fulfill(ut.b.SCROLLBAR,new m.a(o,n))}return null},e.prototype.getMouseColumn=function(t,o){var n=this._context.configuration.editor.layoutInfo,i=this._context.viewLayout.getCurrentScrollLeft()+o.x-t.x-n.contentLeft;return e._getMouseColumn(i,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,o,n){var i=new m.a(o,n),r=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>r){if(je.g&&1===i.column){var s=Kt(t.mouseContentHorizontalOffset-r);return t.fulfill(ut.b.CONTENT_EMPTY,new m.a(o,e.model.getLineMaxColumn(o)),void 0,s)}var a=Kt(t.mouseContentHorizontalOffset-r);return t.fulfill(ut.b.CONTENT_EMPTY,i,void 0,a)}var l=e.visibleRangeForPosition2(o,n);if(!l)return t.fulfill(ut.b.UNKNOWN,i);var u=l.left;if(t.mouseContentHorizontalOffset===u)return t.fulfill(ut.b.CONTENT_TEXT,i);var c=[];if(c.push({offset:l.left,column:n}),n>1){var h=e.visibleRangeForPosition2(o,n-1);h&&c.push({offset:h.left,column:n-1})}if(n=t.editorPos.y+e.layoutInfo.height&&(i=t.editorPos.y+e.layoutInfo.height-1);var r=new gt(t.pos.x,i),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return s.position?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var o=document.caretRangeFromPoint(t.clientX,t.clientY);if(!o||!o.startContainer)return{position:null,hitTarget:null};var n,i=o.startContainer;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)===At.CLASS_NAME)return{position:e.getPositionFromDOMInfo(s,o.startOffset),hitTarget:null};n=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)===At.CLASS_NAME)return{position:e.getPositionFromDOMInfo(i,i.textContent.length),hitTarget:null};n=i}return{position:null,hitTarget:n}},e._doHitTestWithCaretPositionFromPoint=function(e,t){var o=document.caretPositionFromPoint(t.clientX,t.clientY);if(o.offsetNode.nodeType===o.offsetNode.TEXT_NODE){var n=o.offsetNode.parentNode,i=n?n.parentNode:null,r=i?i.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===At.CLASS_NAME?{position:e.getPositionFromDOMInfo(o.offsetNode.parentNode,o.offset),hitTarget:null}:{position:null,hitTarget:o.offsetNode.parentNode}}return{position:null,hitTarget:o.offsetNode}},e._doHitTestWithMoveToPoint=function(e,t){var o=null,n=null,i=document.body.createTextRange();try{i.moveToPoint(t.clientX,t.clientY)}catch(e){return{position:null,hitTarget:null}}i.collapse(!0);var r=i?i.parentElement():null,s=r?r.parentNode:null,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:"")===At.CLASS_NAME){var l=i.duplicate();l.moveToElementText(r),l.setEndPoint("EndToStart",i),o=e.getPositionFromDOMInfo(r,l.text.length),l.moveToElementText(e.viewDomNode)}else n=r;return i.moveToElementText(e.viewDomNode),{position:o,hitTarget:n}},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}(),Xt=o(17),qt=o(96),$t=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();function Jt(e){return function(t,o){var n=!1;return e&&(n=e.mouseTargetIsWidget(o)),n||o.preventDefault(),o}}var Zt=function(e){function t(o,n,i){var s=e.call(this)||this;s._isFocused=!1,s._context=o,s.viewController=n,s.viewHelper=i,s.mouseTargetFactory=new Yt(s._context,i),s._mouseDownOperation=s._register(new Qt(s._context,s.viewController,s.viewHelper,(function(e,t){return s._createMouseTarget(e,t)}),(function(e){return s._getMouseColumn(e)}))),s._asyncFocus=s._register(new Xt.c((function(){return s.viewHelper.focusTextArea()}),0)),s.lastMouseLeaveTime=-1;var a=new yt(s.viewHelper.viewDomNode);s._register(a.onContextMenu(s.viewHelper.viewDomNode,(function(e){return s._onContextMenu(e,!0)}))),s._register(a.onMouseMoveThrottled(s.viewHelper.viewDomNode,(function(e){return s._onMouseMove(e)}),Jt(s.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),s._register(a.onMouseUp(s.viewHelper.viewDomNode,(function(e){return s._onMouseUp(e)}))),s._register(a.onMouseLeave(s.viewHelper.viewDomNode,(function(e){return s._onMouseLeave(e)}))),s._register(a.onMouseDown(s.viewHelper.viewDomNode,(function(e){return s._onMouseDown(e)})));var l=function(e){if(s._context.configuration.editor.viewInfo.mouseWheelZoom){var t=new ct.c(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var o=qt.a.getZoomLevel(),n=t.deltaY>0?1:-1;qt.a.setZoomLevel(o+n),t.preventDefault(),t.stopPropagation()}}};return s._register(r.g(s.viewHelper.viewDomNode,"mousewheel",l,!0)),s._register(r.g(s.viewHelper.viewDomNode,"DOMMouseScroll",l,!0)),s._context.addEventHandler(s),s}return $t(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 o=new pt(e,t).toPageCoordinates(),n=mt(this.viewHelper.viewDomNode);if(o.yn.y+n.height||o.xn.x+n.width)return null;var i=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(i,n,o,null)},t.prototype._createMouseTarget=function(e,t){var o=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(o,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,l;r=n.getCurrentScrollTop()+(e.posy-t.y);if(a=jt.getZoneAtCoord(this._context,r))if(l=this._helpPositionJumpOverViewZone(a))return new Vt(null,ut.b.OUTSIDE_EDITOR,i,l);var u=n.getLineNumberAtVerticalOffset(r);return new Vt(null,ut.b.OUTSIDE_EDITOR,i,new m.a(u,o.getLineMaxColumn(u)))}var c=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new Vt(null,ut.b.OUTSIDE_EDITOR,i,new m.a(c,o.getLineMaxColumn(c))):null},t.prototype._findMousePosition=function(e,t){var o=this._getPositionOutsideEditor(e);if(o)return o;var n=this._createMouseTarget(e,t);if(!n.position)return null;if(n.type===ut.b.CONTENT_VIEW_ZONE||n.type===ut.b.GUTTER_VIEW_ZONE){var i=this._helpPositionJumpOverViewZone(n.detail);if(i)return new Vt(n.element,n.type,n.mouseColumn,i,null,n.detail)}return n},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new m.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),o=e.positionBefore,n=e.positionAfter;return o&&n?o.isBefore(t)?o:n:null},t.prototype._dispatchMouse=function(e,t){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}(l.a),eo=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,o){var n=(new Date).getTime();n-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=n,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(o)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=o,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}(),to=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();function oo(e,t){var o={translationY:t.translationY,translationX:t.translationX};return e&&(o.translationY+=e.translationY,o.translationX+=e.translationX),o}var no=function(e){function t(t,o,n){var i=e.call(this,t,o,n)||this;return i.viewHelper.linesContentDomNode.style.msTouchAction="none",i.viewHelper.linesContentDomNode.style.msContentZooming="none",i._installGestureHandlerTimeout=window.setTimeout((function(){if(i._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=i.viewHelper.linesContentDomNode,t.target=i.viewHelper.linesContentDomNode,i.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",(function(o){var n=o.pointerType;n!==(o.MSPOINTER_TYPE_MOUSE||"mouse")?n===(o.MSPOINTER_TYPE_TOUCH||"touch")?(i._lastPointerType="touch",e.addPointer(o.pointerId)):(i._lastPointerType="pen",t.addPointer(o.pointerId)):i._lastPointerType="mouse"})),i._register(r.i(i.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return i._onGestureChange(e)}),oo)),i._register(r.g(i.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return i._onCaptureGestureTap(e)}),!0))}}),100),i._lastPointerType="mouse",i}return to(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,o=new _t(e,this.viewHelper.viewDomNode),n=this._createMouseTarget(o,!1);n.position&&this.viewController.moveTo(n.position),o.browserEvent.fromElement?(o.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}(Zt),io=function(e){function t(t,o,n){var i=e.call(this,t,o,n)||this;return i.viewHelper.linesContentDomNode.style.touchAction="none",i._installGestureHandlerTimeout=window.setTimeout((function(){if(i._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=i.viewHelper.linesContentDomNode,t.target=i.viewHelper.linesContentDomNode,i.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(o){var n=o.pointerType;"mouse"!==n?"touch"===n?(i._lastPointerType="touch",e.addPointer(o.pointerId)):(i._lastPointerType="pen",t.addPointer(o.pointerId)):i._lastPointerType="mouse"})),i._register(r.i(i.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return i._onGestureChange(e)}),oo)),i._register(r.g(i.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return i._onCaptureGestureTap(e)}),!0))}}),100),i._lastPointerType="mouse",i}return to(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,o=new _t(e,this.viewHelper.viewDomNode),n=this._createMouseTarget(o,!1);n.position&&this.viewController.moveTo(n.position),o.browserEvent.fromElement?(o.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}(Zt),ro=function(e){function t(t,o,n){var i=e.call(this,t,o,n)||this;return lt.b.addTarget(i.viewHelper.linesContentDomNode),i._register(r.g(i.viewHelper.linesContentDomNode,lt.a.Tap,(function(e){return i.onTap(e)}))),i._register(r.g(i.viewHelper.linesContentDomNode,lt.a.Change,(function(e){return i.onChange(e)}))),i._register(r.g(i.viewHelper.linesContentDomNode,lt.a.Contextmenu,(function(e){return i._onContextMenu(new _t(e,i.viewHelper.viewDomNode),!1)}))),i}return to(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 _t(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}(Zt),so=function(){function e(e,t,o){window.navigator.msPointerEnabled?this.handler=new no(e,t,o):window.TouchEvent?this.handler=new ro(e,t,o):window.navigator.pointerEnabled||window.PointerEvent?this.handler=new io(e,t,o):this.handler=new Zt(e,t,o)}return e.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},e.prototype.dispose=function(){this.handler.dispose()},e}(),ao=o(72),lo=function(){function e(e,t,o,n,i){this.configuration=e,this.viewModel=t,this._execCoreEditorCommandFunc=o,this.outgoingEvents=n,this.commandDelegate=i}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this._execCoreEditorCommandFunc(e,t)},e.prototype.paste=function(e,t,o,n){this.commandDelegate.paste(e,t,o,n)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,o){this.commandDelegate.replacePreviousChar(e,t,o)},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._execCoreEditorCommandFunc(ao.CoreNavigationCommands.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(ao.CoreNavigationCommands.MoveTo,this._usualArgs(e))},e.prototype.moveToSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.MoveToSelect,this._usualArgs(e))},e.prototype.columnSelect=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(ao.CoreNavigationCommands.ColumnSelect,{position:this.convertViewToModelPosition(e),viewPosition:e,mouseColumn:t})},e.prototype.createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(ao.CoreNavigationCommands.CreateCursor,{position:this.convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype.lastCursorMoveToSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype.wordSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.WordSelect,this._usualArgs(e))},e.prototype.wordSelectDrag=function(e){this._execMouseCommand(ao.CoreNavigationCommands.WordSelectDrag,this._usualArgs(e))},e.prototype.lastCursorWordSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorWordSelect,this._usualArgs(e))},e.prototype.lineSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LineSelect,this._usualArgs(e))},e.prototype.lineSelectDrag=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LineSelectDrag,this._usualArgs(e))},e.prototype.lastCursorLineSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorLineSelect,this._usualArgs(e))},e.prototype.lastCursorLineSelectDrag=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype.selectAll=function(){this._execMouseCommand(ao.CoreNavigationCommands.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}(),uo=function(){function e(e){this._eventHandlerGateKeeper=e,this._eventHandlers=[],this._eventQueue=null,this._isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){for(var t=0,o=this._eventHandlers.length;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 o=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;for(var r=0,s=0,a=o;a<=n;a++){var l=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=l,s=1):s++)}if(e=o&&r<=n&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),i=!0);return i},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var o=t-e+1,n=this.getStartLineNumber(),i=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=o,null;if(e>i)return null;if(o+e>i)return this._lines.splice(e-this._rendLineNumberStart,i-e+1);for(var r=[],s=0;so))for(var a=Math.max(t,s.fromLineNumber),l=Math.min(o,s.toLineNumber),u=a;u<=l;u++){var c=u-this._rendLineNumberStart;this._lines[c].onTokensChanged(),n=!0}}return n},e}(),go=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new ho((function(){return t._host.createVisibleLine()}))}return e.prototype._createDomNode=function(){var e=Object(He.b)(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 o=0,n=t.length;ot)(l=t)<=(s=Math.min(o,i.rendLineNumberStart-1))&&(this._insertLinesBefore(i,l,s,n,t),i.linesLength+=s-l+1);else if(i.rendLineNumberStart0&&(this._removeLinesBefore(i,a),i.linesLength-=a)}if(i.rendLineNumberStart=t,i.rendLineNumberStart+i.linesLength-1o){var s,a,l=Math.max(0,o-i.rendLineNumberStart+1);(a=(s=i.linesLength-1)-l+1)>0&&(this._removeLinesAfter(i,a),i.linesLength-=a)}return this._finishRendering(i,!1,n),i},e.prototype._renderUntouchedLines=function(e,t,o,n,i){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=o;a++){var l=r+a;s[a].layoutLine(l,n[l-i])}},e.prototype._insertLinesBefore=function(e,t,o,n,i){for(var r=[],s=0,a=t;a<=o;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var o=0;o=0;s--){var a=e.lines[s];n[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,o){var n=document.createElement("div");n.innerHTML=t;for(var i=0;i'),n.appendASCIIString(i),n.appendASCIIString(""),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}(),yo=function(e){function t(t){var o=e.call(this,t)||this;return o._contentWidth=o._context.configuration.editor.layoutInfo.contentWidth,o.domNode.setHeight(0),o}return fo(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}(mo),vo=function(e){function t(t){var o=e.call(this,t)||this;return o._contentLeft=o._context.configuration.editor.layoutInfo.contentLeft,o.domNode.setClassName("margin-view-overlays"),o.domNode.setWidth(1),g.a.applyFontInfo(o.domNode,o._context.configuration.editor.fontInfo),o}return fo(t,e),t.prototype.onConfigurationChanged=function(t){var o=!1;return t.fontInfo&&(g.a.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),o=!0),t.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,o=!0),e.prototype.onConfigurationChanged.call(this,t)||o},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 o=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(o),this.domNode.setWidth(this._contentLeft)},t}(mo),bo=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Eo=function(e,t){this.top=e,this.left=t},Co=function(e){function t(t,o){var n=e.call(this,t)||this;return n._viewDomNode=o,n._widgets={},n.domNode=Object(He.b)(document.createElement("div")),Xe.write(n.domNode,1),n.domNode.setClassName("contentWidgets"),n.domNode.setPosition("absolute"),n.domNode.setTop(0),n.overflowingContentWidgetsDomNode=Object(He.b)(document.createElement("div")),Xe.write(n.overflowingContentWidgetsDomNode,2),n.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),n}return bo(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null,this.domNode=null},t.prototype.onConfigurationChanged=function(e){for(var t=Object.keys(this._widgets),o=0,n=t.length;o=o,u=s,c=n.viewportHeight-s>=o,h=e.left;return h+t>n.scrollLeft+n.viewportWidth&&(h=n.scrollLeft+n.viewportWidth-t),hthis._contentWidth)return null;var s,a=e.top-o,l=e.top+this._lineHeight,u=i+this._contentLeft,c=r.u(this._viewDomNode.domNode),h=c.top+a-r.e.scrollY,d=c.top+l-r.e.scrollY,g=c.left+u-r.e.scrollX,p=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=h>=22,m=d+o<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;g+t+20>p&&(g-=s=g-(p-t-20),u-=s);g<0&&(g-=s=g,u-=s);return this._fixedOverflowWidgets&&(a=h,l=d,u=g),{aboveTop:a,fitsAbove:f,belowTop:l,fitsBelow:m,left:u}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new Eo(e.top,e.left+this._contentLeft)},e.prototype._getTopLeft=function(e){if(!this._viewPosition)return null;var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return null;var o=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop;return new Eo(o,t.left)},e.prototype._prepareRenderWidget=function(e,t){var o=this;if(!e)return null;for(var n=null,i=function(){if(!n){if(-1===o._cachedDomNodeClientWidth||-1===o._cachedDomNodeClientHeight){var i=o.domNode.domNode;o._cachedDomNodeClientWidth=i.clientWidth,o._cachedDomNodeClientHeight=i.clientHeight}n=o.allowEditorOverflow?o._layoutBoxInPage(e,o._cachedDomNodeClientWidth,o._cachedDomNodeClientHeight,t):o._layoutBoxInViewport(e,o._cachedDomNodeClientWidth,o._cachedDomNodeClientHeight,t)}},r=1;r<=2;r++)for(var s=0;se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){var t=this._getTopLeft(e);this._renderData=this._prepareRenderWidget(t,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}(),To=(o(453),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),wo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._renderLineHighlight=o._context.configuration.editor.viewInfo.renderLineHighlight,o._selectionIsEmpty=!0,o._primaryCursorLineNumber=1,o._scrollWidth=0,o._contentWidth=o._context.configuration.editor.layoutInfo.contentWidth,o._context.addEventHandler(o),o}return To(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,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,o=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==o&&(this._primaryCursorLineNumber=o,t=!0);var n=e.selections[0].isEmpty();return this._selectionIsEmpty!==n?(this._selectionIsEmpty=n,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}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.o);if(o&&t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+o+"; }"),!o||o.isTransparent()||e.defines(Je.p)){var n=e.getColor(Je.p);n&&(t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+n+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"))}}));o(454);var ko=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Oo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._renderLineHighlight=o._context.configuration.editor.viewInfo.renderLineHighlight,o._selectionIsEmpty=!0,o._primaryCursorLineNumber=1,o._contentLeft=o._context.configuration.editor.layoutInfo.contentLeft,o._context.addEventHandler(o),o}return ko(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,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,o=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==o&&(this._primaryCursorLineNumber=o,t=!0);var n=e.selections[0].isEmpty();return this._selectionIsEmpty!==n?(this._selectionIsEmpty=n,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 o="current-line";if(this._shouldShowCurrentLine())o="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}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.o);if(o)t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+o+"; border: none; }");else{var n=e.getColor(Je.p);n&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+n+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")}}));o(455);var Ro=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Lo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._typicalHalfwidthCharacterWidth=o._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,o._renderResult=null,o._context.addEventHandler(o),o}return Ro(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,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(),o=[],n=0,i=0,r=t.length;it.options.zIndex)return 1;var o=e.options.className,n=t.options.className;return on?1:_.a.compareRangesUsingStarts(e.range,t.range)}));for(var a=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber,u=[],c=a;c<=l;c++){u[c-a]=""}this._renderWholeLineDecorations(e,o,u),this._renderNormalDecorations(e,o,u),this._renderResult=u},t.prototype._renderWholeLineDecorations=function(e,t,o){for(var n=String(this._lineHeight),i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s',c=Math.max(l.range.startLineNumber,i),h=Math.min(l.range.endLineNumber,r),d=c;d<=h;d++){o[d-i]+=u}}},t.prototype._renderNormalDecorations=function(e,t,o){for(var n=String(this._lineHeight),i=e.visibleRange.startLineNumber,r=null,s=!1,a=null,l=0,u=t.length;l';s[h]+=m}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},t}(Qe),No=(o(456),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Io=function(e,t,o){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(o)},Do=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return No(t,e),t.prototype._render=function(e,t,o){for(var n=[],i=e;i<=t;i++){n[i-e]=[]}if(0===o.length)return n;o.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<=o;a++){var l=a-t,u=n[l];0===u.length?s[l]="":s[l]='
=this._renderResult.length?"":this._renderResult[o]},t}(Do),Po=(o(457),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),xo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._primaryLineNumber=0,o._lineHeight=o._context.configuration.editor.lineHeight,o._spaceWidth=o._context.configuration.editor.fontInfo.spaceWidth,o._enabled=o._context.configuration.editor.viewInfo.renderIndentGuides,o._activeIndentEnabled=o._context.configuration.editor.viewInfo.highlightActiveIndentGuide,o._renderResult=null,o._context.addEventHandler(o),o}return Po(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,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],o=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==o&&(this._primaryLineNumber=o,!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,o=e.visibleRange.endLineNumber,n=this._context.model.getTabSize()*this._spaceWidth,i=e.scrollWidth,r=this._lineHeight,s=n,a=this._context.model.getLinesIndentGuides(t,o),l=0,u=0,c=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var h=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,o);l=h.startLineNumber,u=h.endLineNumber,c=h.indent}for(var d=[],g=t;g<=o;g++){for(var p=l<=g&&g<=u,f=g-t,_=a[f],y="",v=e.visibleRangeForPosition(new m.a(g,1)),b=v?v.left:0,E=1;E<=_;E++){if(y+='
',(b+=n)>i)break}d[f]=y}this._renderResult=d}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},t}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.l);o&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+o+" inset; }");var n=e.getColor(Je.a)||o;n&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+n+" inset; }")}));o(458);var Mo=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Bo=function(){function e(){this._currentVisibleRange=new _.a(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),Fo=function(e,t,o,n,i,r){this.lineNumber=e,this.startColumn=t,this.endColumn=o,this.startScrollTop=n,this.stopScrollTop=i,this.scrollType=r},Ho=function(e){function t(t,o){var n=e.call(this,t)||this;n._linesContent=o,n._textRangeRestingSpot=document.createElement("div"),n._visibleLines=new go(n),n.domNode=n._visibleLines.domNode;var i=n._context.configuration;return n._lineHeight=i.editor.lineHeight,n._typicalHalfwidthCharacterWidth=i.editor.fontInfo.typicalHalfwidthCharacterWidth,n._isViewportWrapping=i.editor.wrappingInfo.isViewportWrapping,n._revealHorizontalRightPadding=i.editor.viewInfo.revealHorizontalRightPadding,n._canUseLayerHinting=i.editor.canUseLayerHinting,n._viewLineOptions=new Dt(i,n._context.theme.type),Xe.write(n.domNode,7),n.domNode.setClassName("view-lines"),g.a.applyFontInfo(n.domNode,i.editor.fontInfo),n._maxLineWidth=0,n._asyncUpdateLineWidths=new Xt.c((function(){n._updateLineWidthsSlow()}),200),n._lastRenderedData=new Bo,n._horizontalRevealRequest=null,n}return Mo(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 At(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&&g.a.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 Dt(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var o=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=o;i<=n;i++){this._visibleLines.getVisibleLine(i).onOptionsChanged(this._viewLineOptions)}return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber(),n=!1,i=t;i<=o;i++)n=this._visibleLines.getVisibleLine(i).onSelectionChanged()||n;return n},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber(),n=t;n<=o;n++)this._visibleLines.getVisibleLine(n).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),o=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?o={scrollTop:o.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new Fo(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),o.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-o.scrollTop);return 0===e.scrollType&&n>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(o):this._context.viewLayout.setScrollPositionNow(o),!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),o=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopo)&&(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 o=this._getViewLineDomNode(e);if(null===o)return null;var n=this._getLineNumberFor(o);if(-1===n)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new m.a(n,1);var i=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;var s=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t),a=this._context.model.getLineMinColumn(n);return so?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var o=e.endLineNumber;if(!(e=_.a.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange())))return null;var n,i=[],r=0,s=new It(this.domNode.domNode,this._textRangeRestingSpot);t&&(n=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new m.a(e.startLineNumber,1)).lineNumber);for(var a=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber(),u=e.startLineNumber;u<=e.endLineNumber;u++)if(!(ul)){var c=u===e.startLineNumber?e.startColumn:1,h=u===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(u),d=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(c,h,s);if(d&&0!==d.length){if(t&&ui)){var s=r===e.startLineNumber?e.startColumn:1,a=r===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(r),l=this._visibleLines.getVisibleLine(r).getVisibleRangesForRange(s,a,o);l&&0!==l.length&&(t=t.concat(l))}return 0===t.length?null:t},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(),o=this._visibleLines.getEndLineNumber(),n=1,i=!0,r=t;r<=o;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?n=Math.max(n,s.getWidth()):i=!1}return i&&1===t&&o===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),i},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,o=this._horizontalRevealRequest.startColumn,n=this._horizontalRevealRequest.endColumn,i=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,o,n);this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===i?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=d.left+d.width)}return i=c,u=Math.max(0,u-t.HORIZONTAL_EXTRA_PX),c+=this._revealHorizontalRightPadding,{scrollLeft:this._computeMinimumScrolling(s,a,u,c),maxHorizontalOffset:i}},t.prototype._computeMinimumScrolling=function(e,t,o,n,i,r){i=!!i,r=!!r;var s=(t|=0)-(e|=0);return(n|=0)-(o|=0)t?Math.max(0,n-s):e:o},t.HORIZONTAL_EXTRA_PX=30,t}(Ye),Uo=(o(459),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Vo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._decorationsLeft=o._context.configuration.editor.layoutInfo.decorationsLeft,o._decorationsWidth=o._context.configuration.editor.layoutInfo.decorationsWidth,o._renderResult=null,o._context.addEventHandler(o),o}return Uo(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,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(),o=[],n=0,i=0,r=t.length;i
',r=[],s=t;s<=o;s++){for(var a=s-t,l=n[a],u="",c=0,h=l.length;c';i[s]=l}this._renderResult=i},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(Do),Go=(o(461),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),zo=function(e){function t(t){var o=e.call(this,t)||this;return o._widgets={},o._verticalScrollbarWidth=o._context.configuration.editor.layoutInfo.verticalScrollbarWidth,o._minimapWidth=o._context.configuration.editor.layoutInfo.minimapWidth,o._horizontalScrollbarHeight=o._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,o._editorHeight=o._context.configuration.editor.layoutInfo.height,o._editorWidth=o._context.configuration.editor.layoutInfo.width,o._domNode=Object(He.b)(document.createElement("div")),Xe.write(o._domNode,4),o._domNode.setClassName("overlayWidgets"),o}return Go(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null},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=Object(He.b)(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 o=this._widgets[e.getId()];return o.preference!==t&&(o.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var o=this._widgets[t].domNode.domNode;delete this._widgets[t],o.parentNode.removeChild(o),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(e.preference===ut.c.TOP_RIGHT_CORNER)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===ut.c.BOTTOM_RIGHT_CORNER){var o=t.domNode.clientHeight;t.setTop(this._editorHeight-o-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===ut.c.TOP_CENTER&&(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),o=0,n=t.length;o=3){var i,r,s,a=n-(i=Math.floor(n/3))-(r=Math.floor(n/3)),l=(s=e)+i;return[[0,s,l,s,s+i+a,s,l,s],[0,i,a,i+a,r,i+a+r,a+r,i+a+r]]}if(2===o)return[[0,s=e,s,s,s+(i=Math.floor(n/2)),s,s,s],[0,i,i,i,r=n-i,i+r,i+r,i+r]];return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]},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}(),Xo=function(e){function t(t){var o=e.call(this,t)||this;return o._domNode=Object(He.b)(document.createElement("canvas")),o._domNode.setClassName("decorationsOverviewRuler"),o._domNode.setPosition("absolute"),o._domNode.setLayerHinting(!0),o._domNode.setAttribute("aria-hidden","true"),o._settings=null,o._updateSettings(!1),o._tokensColorTrackerListener=J.y.onDidChange((function(e){e.changedColorMap&&o._updateSettings(!0)})),o._cursorPositions=[],o}return Ko(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new Yo(this._context.configuration,this._context.theme);return(null===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,o=e.selections.length;tt&&(L=t-a),T=L-a,I=L+a;T>y+1||E!==m?(0!==v&&l.fillRect(u[m],_,c[m],y-_),m=E,_=T,y=I):I>y&&(y=I)}l.fillRect(u[m],_,c[m],y-_)}if(!this._settings.hideCursor){var w=2*this._settings.pixelRatio|0,k=w/2|0,O=this._settings.x[7],R=this._settings.w[7];l.fillStyle=this._settings.cursorColor;for(_=-100,y=-100,v=0,b=this._cursorPositions.length;vt&&(L=t-k);var I=(T=L-k)+w;T>y+1?(0!==v&&l.fillRect(O,_,R,y-_),_=T,y=I):I>y&&(y=I)}l.fillRect(O,_,R,y-_)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())},t}(Ye),qo=o(145),$o=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Jo=function(e){function t(t,o){var n=e.call(this)||this;return n._context=t,n._domNode=Object(He.b)(document.createElement("canvas")),n._domNode.setClassName(o),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._zoneManager=new qo.b((function(e){return n._context.viewLayout.getVerticalOffsetForLineNumber(e)})),n._zoneManager.setDOMWidth(0),n._zoneManager.setDOMHeight(0),n._zoneManager.setOuterHeight(n._context.viewLayout.getScrollHeight()),n._zoneManager.setLineHeight(n._context.configuration.editor.lineHeight),n._zoneManager.setPixelRatio(n._context.configuration.editor.pixelRatio),n._context.addEventHandler(n),n}return $o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._zoneManager=null,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(),o=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),i=this._domNode.domNode.getContext("2d");return i.clearRect(0,0,e,t),o.length>0&&this._renderOneLane(i,o,n,e),!0},t.prototype._renderOneLane=function(e,t,o,n){for(var i=0,r=0,s=0,a=0,l=t.length;a=h?s=Math.max(s,d):(e.fillRect(0,r,n,s-r),r=h,s=d)}e.fillRect(0,r,n,s-r)},t}(Ve),Zo=(o(462),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Qo=function(e){function t(t){var o=e.call(this,t)||this;return o.domNode=Object(He.b)(document.createElement("div")),o.domNode.setAttribute("role","presentation"),o.domNode.setAttribute("aria-hidden","true"),o.domNode.setClassName("view-rulers"),o._renderedRulers=[],o._rulers=o._context.configuration.editor.viewInfo.rulers,o._typicalHalfwidthCharacterWidth=o._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,o}return Zo(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=Object(He.b)(document.createElement("div"))).setClassName("view-ruler"),r.setWidth(o),this.domNode.appendChild(r),this._renderedRulers.push(r),n--}else for(var i=e-t;i>0;){var r=this._renderedRulers.pop();this.domNode.removeChild(r),i--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,o=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}(Ye);Object(Fe.e)((function(e,t){var o=e.getColor(en.lb);o&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+o+" 0 6px 6px -6px inset; }")}));o(464);var nn=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),rn=function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null},sn=function(e,t){this.lineNumber=e,this.ranges=t};function an(e){return new rn(e)}function ln(e){return new sn(e.lineNumber,e.ranges.map(an))}var un=je.h,cn=function(e){function t(t){var o=e.call(this)||this;return o._previousFrameVisibleRangesWithStyle=[],o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._roundedSelection=o._context.configuration.editor.viewInfo.roundedSelection,o._typicalHalfwidthCharacterWidth=o._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,o._selections=[],o._renderResult=null,o._context.addEventHandler(o),o}return nn(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._selections=null,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,o=e.length;t1)return!0}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,o){var n=this._typicalHalfwidthCharacterWidth/4,i=null,r=null;if(o&&o.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(var a=0;!i&&a=0;a--)o[a].lineNumber===l&&(r=o[a].ranges[0]);i&&!i.startStyle&&(i=null),r&&!r.startStyle&&(r=null)}a=0;for(var u=t.length;a0){var f=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;hn(h-f)f&&(g.top=1),hn(d-m)'},t.prototype._actualRenderOneSelection=function(e,o,n,i){for(var r=i.length>0&&i[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=i.length>0?i[0].lineNumber:0,u=i.length>0?i[i.length-1].lineNumber:0,c=0,h=i.length;c1,u)}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},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}(Qe);function hn(e){return e<0?-e:e}Object(Fe.e)((function(e,t){var o=e.getColor(en.z);o&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+o+"; }");var n=e.getColor(en.y);n&&t.addRule(".monaco-editor .selected-text { background-color: "+n+"; }");var i=e.getColor(en.A);i&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+i+"; }")}));o(465);var dn=function(e,t,o,n,i,r){this.top=e,this.left=t,this.width=o,this.height=n,this.textContent=i,this.textContentClassName=r},gn=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=Object(He.b)(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),g.a.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new m.a(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&&(g.a.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="",o="";if(this._cursorStyle===be.i.Line||this._cursorStyle===be.i.LineThin){var n,i=e.visibleRangeForPosition(this._position);if(!i)return null;if(this._cursorStyle===be.i.Line){if((n=r.m(this._lineCursorWidth>0?this._lineCursorWidth:2))>2)t=this._context.model.getLineContent(this._position.lineNumber).charAt(this._position.column-1)}else n=r.m(1);var s=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new dn(s,i.left,n,this._lineHeight,t,o)}var a=e.linesVisibleRangesForRange(new _.a(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 l=a[0].ranges[0],u=l.width<1?this._typicalHalfwidthCharacterWidth:l.width;if(this._cursorStyle===be.i.Block){var c=this._context.model.getViewLineData(this._position.lineNumber);t=c.content.charAt(this._position.column-1),p.isHighSurrogate(c.content.charCodeAt(this._position.column-1))&&(t+=c.content.charAt(this._position.column));var h=c.tokens.findTokenIndexAtOffset(this._position.column-1);o=c.tokens.getClassName(h)}var d=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,g=this._lineHeight;return this._cursorStyle!==be.i.Underline&&this._cursorStyle!==be.i.UnderlineThin||(d+=this._lineHeight-2,g=2),new dn(d,l.left,u,g,t,o)},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}(),pn=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),fn=function(e){function t(t){var o=e.call(this,t)||this;return o._readOnly=o._context.configuration.editor.readOnly,o._cursorBlinking=o._context.configuration.editor.viewInfo.cursorBlinking,o._cursorStyle=o._context.configuration.editor.viewInfo.cursorStyle,o._selectionIsEmpty=!0,o._primaryCursor=new gn(o._context),o._secondaryCursors=[],o._renderData=[],o._domNode=Object(He.b)(document.createElement("div")),o._domNode.setAttribute("role","presentation"),o._domNode.setAttribute("aria-hidden","true"),o._updateDomClassName(),o._domNode.appendChild(o._primaryCursor.getDomNode()),o._startCursorBlinkAnimation=new Xt.f,o._cursorFlatBlinkInterval=new Xt.b,o._blinkingEnabled=!1,o._editorHasFocus=!1,o._updateBlinking(),o}return pn(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,o=this._secondaryCursors.length;tt.length){var r=this._secondaryCursors.length-t.length;for(n=0;n=s)return new e(a,l,y,v,c,b=1,s);var b=Math.max(1,Math.floor(o-v*d/g));return u&&u.scrollHeight===l&&(u.scrollTop>a&&(b=Math.min(b,u.startLineNumber)),u.scrollTopPn)o._context.viewLayout.setScrollPositionNow({scrollTop:i.scrollTop});else{var s=e.posy-t;o._context.viewLayout.setScrollPositionNow({scrollTop:i.getDesiredScrollTopFromDelta(s)})}}),(function(){o._slider.toggleClassName("active",!1)}))}})),o}return In(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 Hn(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 xn(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=Mn.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 o=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,n=Math.min(this._options.minimapWidth,Math.round(o*An(this._options.renderMinimap)/this._options.pixelRatio));this._sliderHorizontal.setLeft(n),this._sliderHorizontal.setWidth(this._options.minimapWidth-n),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this._lastRenderData=this.renderLines(t)},t.prototype.renderLines=function(e){var o=this._options.renderMinimap,n=e.startLineNumber,i=e.endLineNumber,r=Dn(o);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var s=this._lastRenderData._get();return new Fn(e,s.imageData,s.lines)}for(var a=this._getBuffer(),l=t._renderUntouchedLines(a,n,i,r,this._lastRenderData),u=l[0],c=l[1],h=l[2],d=this._context.model.getMinimapLinesRenderingData(n,i,h),g=d.tabSize,p=this._tokensColorTracker.getColor(2),f=this._tokensColorTracker.backgroundIsLight(),m=0,_=[],y=0,v=i-n+1;y=0&&wd)return;var C=u.charCodeAt(f);if(9===C){var S=a-(f+m)%a;m+=S-1,g+=S*h}else if(32===C)g+=h;else for(var T=p.isFullWidthCharacter(C)?2:1,w=0;wd)return}},t}(Ye);Object(Fe.e)((function(e,t){var o=e.getColor(en.nb);if(o){var n=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+n+"; }")}var i=e.getColor(en.ob);if(i){var r=i.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(en.mb);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 l=e.getColor(en.lb);l&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+l+" -6px 0 6px -6px inset; }")}));var Vn=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Wn=function(e){function t(t,o,n,i,r,s){var a=e.call(this)||this;a._cursor=r,a._renderAnimationFrame=null,a.outgoingEvents=new bn(i);var l=new lo(o,i,s,a.outgoingEvents,t);return a.eventDispatcher=new uo((function(e){return a._renderOnce(e)})),a.eventDispatcher.addEventHandler(a),a._context=new yn(o,n.getTheme(),i,a.eventDispatcher),a._register(n.onThemeChange((function(e){a._context.theme=e,a.eventDispatcher.emit(new H),a.render(!0,!1)}))),a.viewParts=[],a._textAreaHandler=new at(a._context,l,a.createTextAreaHandlerHelper()),a.viewParts.push(a._textAreaHandler),a.createViewParts(),a._setLayout(),a.pointerHandler=new so(a._context,l,a.createPointerHandlerHelper()),a._register(i.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a._register(a._cursor.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a}return Vn(t,e),t.prototype.createViewParts=function(){this.linesContent=Object(He.b)(document.createElement("div")),this.linesContent.setClassName("lines-content monaco-editor-background"),this.linesContent.setPosition("absolute"),this.domNode=Object(He.b)(document.createElement("div")),this.domNode.setClassName(this.getEditorClassName()),this.overflowGuardContainer=Object(He.b)(document.createElement("div")),Xe.write(this.overflowGuardContainer,3),this.overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new wn(this._context,this.linesContent,this.domNode,this.overflowGuardContainer),this.viewParts.push(this._scrollbar),this.viewLines=new Ho(this._context,this.linesContent),this.viewZones=new _n(this._context),this.viewParts.push(this.viewZones);var e=new Xo(this._context);this.viewParts.push(e);var t=new on(this._context);this.viewParts.push(t);var o=new yo(this._context);this.viewParts.push(o),o.addDynamicOverlay(new wo(this._context)),o.addDynamicOverlay(new cn(this._context)),o.addDynamicOverlay(new xo(this._context)),o.addDynamicOverlay(new Lo(this._context));var n=new vo(this._context);this.viewParts.push(n),n.addDynamicOverlay(new Oo(this._context)),n.addDynamicOverlay(new Ao(this._context)),n.addDynamicOverlay(new jo(this._context)),n.addDynamicOverlay(new Vo(this._context)),n.addDynamicOverlay(new tt(this._context));var i=new $e(this._context);i.getDomNode().appendChild(this.viewZones.marginDomNode),i.getDomNode().appendChild(n.getDomNode()),this.viewParts.push(i),this.contentWidgets=new Co(this._context,this.domNode),this.viewParts.push(this.contentWidgets),this.viewCursors=new fn(this._context),this.viewParts.push(this.viewCursors),this.overlayWidgets=new zo(this._context),this.viewParts.push(this.overlayWidgets);var r=new Qo(this._context);this.viewParts.push(r);var s=new Un(this._context);if(this.viewParts.push(s),e){var a=this._scrollbar.getOverviewRulerLayoutInfo();a.parent.insertBefore(e.getDomNode(),a.insertBefore)}this.linesContent.appendChild(o.getDomNode()),this.linesContent.appendChild(r.domNode),this.linesContent.appendChild(this.viewZones.domNode),this.linesContent.appendChild(this.viewLines.getDomNode()),this.linesContent.appendChild(this.contentWidgets.domNode),this.linesContent.appendChild(this.viewCursors.getDomNode()),this.overflowGuardContainer.appendChild(i.getDomNode()),this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this.overflowGuardContainer.appendChild(t.getDomNode()),this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()),this.overflowGuardContainer.appendChild(s.getDomNode()),this.domNode.appendChild(this.overflowGuardContainer),this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode)},t.prototype._flushAccumulatedAndRenderNow=function(){this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode.domNode,linesContentDomNode:this.linesContent.domNode,focusTextArea:function(){e.focus()},getLastViewCursorsRenderData:function(){return e.viewCursors.getLastRenderData()||[]},shouldSuppressMouseDownOnViewZone:function(t){return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},shouldSuppressMouseDownOnWidget:function(t){return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)},getPositionFromDOMInfo:function(t,o){return e._flushAccumulatedAndRenderNow(),e.viewLines.getPositionFromDOMInfo(t,o)},visibleRangeForPosition2:function(t,o){e._flushAccumulatedAndRenderNow();var n=e.viewLines.visibleRangesForRange2(new _.a(t,o,t,o));return n?n[0]:null},getLineWidth:function(t){return e._flushAccumulatedAndRenderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createTextAreaHandlerHelper=function(){var e=this;return{visibleRangeForPositionRelativeToEditor:function(t,o){e._flushAccumulatedAndRenderNow();var n=e.viewLines.visibleRangesForRange2(new _.a(t,o,t,o));return n?n[0]:null}}},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this.overflowGuardContainer.setWidth(e.width),this.overflowGuardContainer.setHeight(e.height),this.linesContent.setWidth(1e6),this.linesContent.setHeight(1e6)},t.prototype.getEditorClassName=function(){var e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.editor.editorClassName+" "+Object(Fe.d)(this._context.theme.type)+e},t.prototype.onConfigurationChanged=function(e){return e.editorClassName&&this.domNode.setClassName(this.getEditorClassName()),e.layoutInfo&&this._setLayout(),!1},t.prototype.onFocusChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),this._context.model.setHasFocus(e.isFocused),e.isFocused?this.outgoingEvents.emitViewFocusGained():this.outgoingEvents.emitViewFocusLost(),!1},t.prototype.onScrollChanged=function(e){return this.outgoingEvents.emitScrollChanged(e),!1},t.prototype.onThemeChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),!1},t.prototype.dispose=function(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this.eventDispatcher.removeEventHandler(this),this.outgoingEvents.dispose(),this.pointerHandler.dispose(),this.viewLines.dispose();for(var t=0,o=this.viewParts.length;t=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},Xn=function(e,t){return function(o,n){t(o,n,e)}},qn=0,$n="showUnused",Jn=function(e){function t(t,o,n,i,r,l,u,c,g){var p=e.call(this)||this;p._onDidDispose=p._register(new a.a),p.onDidDispose=p._onDidDispose.event,p._onDidChangeModelContent=p._register(new a.a),p.onDidChangeModelContent=p._onDidChangeModelContent.event,p._onDidChangeModelLanguage=p._register(new a.a),p.onDidChangeModelLanguage=p._onDidChangeModelLanguage.event,p._onDidChangeModelLanguageConfiguration=p._register(new a.a),p.onDidChangeModelLanguageConfiguration=p._onDidChangeModelLanguageConfiguration.event,p._onDidChangeModelOptions=p._register(new a.a),p.onDidChangeModelOptions=p._onDidChangeModelOptions.event,p._onDidChangeModelDecorations=p._register(new a.a),p.onDidChangeModelDecorations=p._onDidChangeModelDecorations.event,p._onDidChangeConfiguration=p._register(new a.a),p.onDidChangeConfiguration=p._onDidChangeConfiguration.event,p._onDidChangeModel=p._register(new a.a),p.onDidChangeModel=p._onDidChangeModel.event,p._onDidChangeCursorPosition=p._register(new a.a),p.onDidChangeCursorPosition=p._onDidChangeCursorPosition.event,p._onDidChangeCursorSelection=p._register(new a.a),p.onDidChangeCursorSelection=p._onDidChangeCursorSelection.event,p._onDidAttemptReadOnlyEdit=p._register(new a.a),p.onDidAttemptReadOnlyEdit=p._onDidAttemptReadOnlyEdit.event,p._onDidLayoutChange=p._register(new a.a),p.onDidLayoutChange=p._onDidLayoutChange.event,p._editorTextFocus=p._register(new Zn),p.onDidFocusEditorText=p._editorTextFocus.onDidChangeToTrue,p.onDidBlurEditorText=p._editorTextFocus.onDidChangeToFalse,p._editorWidgetFocus=p._register(new Zn),p.onDidFocusEditorWidget=p._editorWidgetFocus.onDidChangeToTrue,p.onDidBlurEditorWidget=p._editorWidgetFocus.onDidChangeToFalse,p._onWillType=p._register(new a.a),p.onWillType=p._onWillType.event,p._onDidType=p._register(new a.a),p.onDidType=p._onDidType.event,p._onDidPaste=p._register(new a.a),p.onDidPaste=p._onDidPaste.event,p._onMouseUp=p._register(new a.a),p.onMouseUp=p._onMouseUp.event,p._onMouseDown=p._register(new a.a),p.onMouseDown=p._onMouseDown.event,p._onMouseDrag=p._register(new a.a),p.onMouseDrag=p._onMouseDrag.event,p._onMouseDrop=p._register(new a.a),p.onMouseDrop=p._onMouseDrop.event,p._onContextMenu=p._register(new a.a),p.onContextMenu=p._onContextMenu.event,p._onMouseMove=p._register(new a.a),p.onMouseMove=p._onMouseMove.event,p._onMouseLeave=p._register(new a.a),p.onMouseLeave=p._onMouseLeave.event,p._onKeyUp=p._register(new a.a),p.onKeyUp=p._onKeyUp.event,p._onKeyDown=p._register(new a.a),p.onKeyDown=p._onKeyDown.event,p._onDidScrollChange=p._register(new a.a),p.onDidScrollChange=p._onDidScrollChange.event,p._onDidChangeViewZones=p._register(new a.a),p.onDidChangeViewZones=p._onDidChangeViewZones.event,p.domElement=t,p.id=++qn,p._decorationTypeKeysToIds={},p._decorationTypeSubtypes={},p.isSimpleWidget=n.isSimpleWidget||!1,p._telemetryData=n.telemetryData||null,o=o||{},p._configuration=p._register(p._createConfiguration(o)),p._register(p._configuration.onDidChange((function(e){p._onDidChangeConfiguration.fire(e),e.layoutInfo&&p._onDidLayoutChange.fire(p._configuration.editor.layoutInfo),p._configuration.editor.showUnused?p.domElement.classList.add($n):p.domElement.classList.remove($n)}))),p._contextKeyService=p._register(u.createScoped(p.domElement)),p._notificationService=g,p._codeEditorService=r,p._commandService=l,p._themeService=c,p._register(new Qn(p,p._contextKeyService)),p._register(new ei(p,p._contextKeyService)),p._instantiationService=i.createChild(new h.a([d.e,p._contextKeyService])),p._attachModel(null),p._contributions={},p._actions={},p._focusTracker=new ti(t),p._focusTracker.onChange((function(){p._editorWidgetFocus.setValue(p._focusTracker.hasFocus())})),p.contentWidgets={},p.overlayWidgets={};var f=n.contributions;Array.isArray(f)||(f=Gn.d.getEditorContributions());for(var m=0,_=f.length;m<_;m++){var y=f[m];try{var v=p._instantiationService.createInstance(y,p);p._contributions[v.getId()]=v}catch(e){Object(s.e)(e)}}return Gn.d.getEditorActions().forEach((function(e){var t=new zn.a(e.id,e.label,e.alias,e.precondition,(function(){return p._instantiationService.invokeFunction((function(t){return e.runEditorCommand(t,p,null)}))}),p._contextKeyService);p._actions[t.id]=t})),p._codeEditorService.addCodeEditor(p),p}return Kn(t,e),t.prototype._createConfiguration=function(e){return new g.a(e,this.domElement)},t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return C.a.ICodeEditor},t.prototype.dispose=function(){this._codeEditorService.removeCodeEditor(this),this.contentWidgets={},this.overlayWidgets={},this._focusTracker.dispose();for(var t=Object.keys(this._contributions),o=0,n=t.length;o1),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(e&&e.canUndo()),this._canRedo.set(e&&e.canRedo())},t}(l.a),ei=function(e){function t(t,o){var n=e.call(this)||this;n._editor=t,n._langId=Ae.a.languageId.bindTo(o),n._hasCompletionItemProvider=Ae.a.hasCompletionItemProvider.bindTo(o),n._hasCodeActionsProvider=Ae.a.hasCodeActionsProvider.bindTo(o),n._hasCodeLensProvider=Ae.a.hasCodeLensProvider.bindTo(o),n._hasDefinitionProvider=Ae.a.hasDefinitionProvider.bindTo(o),n._hasImplementationProvider=Ae.a.hasImplementationProvider.bindTo(o),n._hasTypeDefinitionProvider=Ae.a.hasTypeDefinitionProvider.bindTo(o),n._hasHoverProvider=Ae.a.hasHoverProvider.bindTo(o),n._hasDocumentHighlightProvider=Ae.a.hasDocumentHighlightProvider.bindTo(o),n._hasDocumentSymbolProvider=Ae.a.hasDocumentSymbolProvider.bindTo(o),n._hasReferenceProvider=Ae.a.hasReferenceProvider.bindTo(o),n._hasRenameProvider=Ae.a.hasRenameProvider.bindTo(o),n._hasDocumentFormattingProvider=Ae.a.hasDocumentFormattingProvider.bindTo(o),n._hasDocumentSelectionFormattingProvider=Ae.a.hasDocumentSelectionFormattingProvider.bindTo(o),n._hasSignatureHelpProvider=Ae.a.hasSignatureHelpProvider.bindTo(o),n._isInWalkThrough=Ae.a.isInEmbeddedEditor.bindTo(o);var i=function(){return n._update()};return n._register(t.onDidChangeModel(i)),n._register(t.onDidChangeModelLanguage(i)),n._register(J.u.onDidChange(i)),n._register(J.a.onDidChange(i)),n._register(J.c.onDidChange(i)),n._register(J.e.onDidChange(i)),n._register(J.n.onDidChange(i)),n._register(J.z.onDidChange(i)),n._register(J.m.onDidChange(i)),n._register(J.h.onDidChange(i)),n._register(J.j.onDidChange(i)),n._register(J.r.onDidChange(i)),n._register(J.s.onDidChange(i)),n._register(J.f.onDidChange(i)),n._register(J.i.onDidChange(i)),n._register(J.t.onDidChange(i)),i(),n}return Kn(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(J.u.has(e)),this._hasCodeActionsProvider.set(J.a.has(e)),this._hasCodeLensProvider.set(J.c.has(e)),this._hasDefinitionProvider.set(J.e.has(e)),this._hasImplementationProvider.set(J.n.has(e)),this._hasTypeDefinitionProvider.set(J.z.has(e)),this._hasHoverProvider.set(J.m.has(e)),this._hasDocumentHighlightProvider.set(J.h.has(e)),this._hasDocumentSymbolProvider.set(J.j.has(e)),this._hasReferenceProvider.set(J.r.has(e)),this._hasRenameProvider.set(J.s.has(e)),this._hasSignatureHelpProvider.set(J.t.has(e)),this._hasDocumentFormattingProvider.set(J.f.has(e)||J.i.has(e)),this._hasDocumentSelectionFormattingProvider.set(J.i.has(e)),this._isInWalkThrough.set(e.uri.scheme===Pe.a.walkThroughSnippet)):this.reset()},t}(l.a),ti=function(e){function t(t){var o=e.call(this)||this;return o._onChange=o._register(new a.a),o.onChange=o._onChange.event,o._hasFocus=!1,o._domFocusTracker=o._register(r.O(t)),o._register(o._domFocusTracker.onDidFocus((function(){o._hasFocus=!0,o._onChange.fire(void 0)}))),o._register(o._domFocusTracker.onDidBlur((function(){o._hasFocus=!1,o._onChange.fire(void 0)}))),o}return Kn(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(l.a),oi=encodeURIComponent("");function ii(e){return oi+encodeURIComponent(e.toString())+ni}var ri=encodeURIComponent('');Object(Fe.e)((function(e,t){var o=e.getColor(Je.h);o&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+o+"; }");var n=e.getColor(Je.i);n&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+ii(n)+'") repeat-x bottom left; }');var i=e.getColor(Je.v);i&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+i+"; }");var r=e.getColor(Je.w);r&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+ii(r)+'") repeat-x bottom left; }');var s=e.getColor(Je.m);s&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+s+"; }");var a=e.getColor(Je.n);a&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+ii(a)+'") repeat-x bottom left; }');var l=e.getColor(Je.j);l&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+l+"; }");var u=e.getColor(Je.k);u&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+(ri+encodeURIComponent(u.toString())+si)+'") no-repeat bottom left; }');var c=e.getColor(Je.u);c&&t.addRule("."+$n+" .monaco-editor .squiggly-inline-unnecessary { opacity: "+c.rgba.a+"; will-change: opacity; }");var h=e.getColor(Je.t);h&&t.addRule("."+$n+" .monaco-editor .squiggly-unnecessary { border-bottom: 2px dashed "+h+"; }")}))},function(e,t,o){"use strict";o.r(t);var n=o(0),i=o(6),r=o(12),s=o(8),a=o(3),l=o(17),u=function(){function e(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?(this._staticValue=e[0].staticValue,this._pieces=null):(this._staticValue=null,this._pieces=e):(this._staticValue="",this._pieces=null)}return e.fromStaticValue=function(t){return new e([c.staticValue(t)])},Object.defineProperty(e.prototype,"hasReplacementPatterns",{get:function(){return null===this._staticValue},enumerable:!0,configurable:!0}),e.prototype.buildReplaceString=function(t){if(null!==this._staticValue)return this._staticValue;for(var o="",n=0,i=this._pieces.length;n0;){if(e=0?t+1:1},e.prototype.getCurrentMatchesPosition=function(t){for(var o=this._editor.getModel().getDecorationsInRange(t),n=0,i=o.length;n1e3){r=e._FIND_MATCH_NO_OVERVIEW_DECORATION;for(var a=n._editor.getModel().getLineCount(),l=n._editor.getLayoutInfo().height/a,u=Math.max(2,Math.ceil(3/l)),c=t[0].range.startLineNumber,h=t[0].range.endLineNumber,d=1,g=t.length;d=f.startLineNumber?f.endLineNumber>h&&(h=f.endLineNumber):(s.push({range:new p.a(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),c=f.startLineNumber,h=f.endLineNumber)}s.push({range:new p.a(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}var m=new Array(t.length);for(d=0,g=t.length;d=0;t--){var o=this._decorations[t],n=this._editor.getModel().getDecorationRange(o);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])},e.prototype.matchAfterPosition=function(e){if(0===this._decorations.length)return null;for(var t=0,o=this._decorations.length;te.lineNumber)return i;if(!(i.startColumn0){for(var o=[],n=0;n0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1},e.prototype._setCurrentFindMatch=function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)},e.prototype._prevSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),o=e.lineNumber,n=e.column,i=this._editor.getModel();return t||1===n?(1===o?o=i.getLineCount():o--,n=i.getLineMaxColumn(o)):n--,new g.a(o,n)},e.prototype._moveToPrevMatch=function(t,o){if(void 0===o&&(o=!1),this._decorations.getCount()<19999){var n=this._decorations.matchBeforePosition(t);return n&&n.isEmpty()&&n.getStartPosition().equals(t)&&(t=this._prevSearchPosition(t),n=this._decorations.matchBeforePosition(t)),void(n&&this._setCurrentFindMatch(n))}if(!this._cannotFind()){var i=this._decorations.getFindScope(),r=e._getSearchRange(this._editor.getModel(),i);r.getEndPosition().isBefore(t)&&(t=r.getEndPosition()),t.isBefore(r.getStartPosition())&&(t=r.getEndPosition());var s=t.lineNumber,a=t.column,l=this._editor.getModel(),u=new g.a(s,a),c=l.findPreviousMatch(this._state.searchString,u,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return c&&c.range.isEmpty()&&c.range.getStartPosition().equals(u)&&(u=this._prevSearchPosition(u),c=l.findPreviousMatch(this._state.searchString,u,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1)),c?o||r.containsRange(c.range)?void this._setCurrentFindMatch(c.range):this._moveToPrevMatch(c.range.getStartPosition(),!0):null}},e.prototype.moveToPrevMatch=function(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())},e.prototype._nextSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),o=e.lineNumber,n=e.column,i=this._editor.getModel();return t||n===i.getLineMaxColumn(o)?(o===i.getLineCount()?o=1:o++,n=1):n++,new g.a(o,n)},e.prototype._moveToNextMatch=function(e){if(this._decorations.getCount()<19999){var t=this._decorations.matchAfterPosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),t=this._decorations.matchAfterPosition(e)),void(t&&this._setCurrentFindMatch(t))}var o=this._getNextMatch(e,!1,!0);o&&this._setCurrentFindMatch(o.range)},e.prototype._getNextMatch=function(t,o,n,i){if(void 0===i&&(i=!1),this._cannotFind())return null;var r=this._decorations.getFindScope(),s=e._getSearchRange(this._editor.getModel(),r);s.getEndPosition().isBefore(t)&&(t=s.getStartPosition()),t.isBefore(s.getStartPosition())&&(t=s.getStartPosition());var a=t.lineNumber,l=t.column,u=this._editor.getModel(),c=new g.a(a,l),h=u.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,o);return n&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(c)&&(c=this._nextSearchPosition(c),h=u.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,o)),h?i||s.containsRange(h.range)?h:this._getNextMatch(h.range.getEndPosition(),o,n,!0):null},e.prototype.moveToNextMatch=function(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())},e.prototype._getReplacePattern=function(){return this._state.isRegex?function(e){if(!e||0===e.length)return new u(null);for(var t=new h(e),o=0,n=e.length;o=n)break;if(36===(a=e.charCodeAt(o))){t.emitUnchanged(o-1),t.emitStatic("$",o+1);continue}if(48===a||38===a){t.emitUnchanged(o-1),t.emitMatchIndex(0,o+1);continue}if(49<=a&&a<=57){var r=a-48;if(o+1=n)break;var a;switch(a=e.charCodeAt(o)){case 92:t.emitUnchanged(o-1),t.emitStatic("\\",o+1);break;case 110:t.emitUnchanged(o-1),t.emitStatic("\n",o+1);break;case 116:t.emitUnchanged(o-1),t.emitStatic("\t",o+1)}}}return t.finalize()}(this._state.replaceString):u.fromStaticValue(this._state.replaceString)},e.prototype.replace=function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),o=this._getNextMatch(t.getStartPosition(),e.hasReplacementPatterns,!1);if(o)if(t.equalsRange(o.range)){var n=e.buildReplaceString(o.matches),i=new d.a(t,n);this._executeEditorCommand("replace",i),this._decorations.setStartPosition(new g.a(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(o.range)}},e.prototype._findMatches=function(t,o,n){var i=e._getSearchRange(this._editor.getModel(),t);return this._editor.getModel().findMatches(this._state.searchString,i,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,o,n)},e.prototype.replaceAll=function(){if(this._hasMatches()){var e=this._decorations.getFindScope();null===e&&this._state.matchesCount>=19999?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}},e.prototype._largeReplaceAll=function(){var e=new C.a(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var o="m";t.ignoreCase&&(o+="i"),t.global&&(o+="g"),t=new RegExp(t.source,o)}var n,i=this._editor.getModel(),r=i.getValue(y.c.LF),s=i.getFullModelRange(),a=this._getReplacePattern();n=a.hasReplacementPatterns?r.replace(t,(function(){return a.buildReplaceString(arguments)})):r.replace(t,a.buildReplaceString(null));var l=new d.b(s,n,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}},e.prototype._regularReplaceAll=function(e){for(var t=this._getReplacePattern(),o=this._findMatches(e,t.hasReplacementPatterns,1073741824),n=[],i=0,r=o.length;it&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,i=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,i=!0),void 0!==o&&(p.a.equalsRange(this._currentMatch,o)||(this._currentMatch=o,n.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(n)},e.prototype.change=function(e,t,o){void 0===o&&(o=!0);var n={moveCursor:t,updateHistory:o,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},i=!1,r=this.isRegex,s=this.wholeWord,a=this.matchCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,n.searchString=!0,i=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,n.replaceString=!0,i=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,n.isRevealed=!0,i=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,n.isReplaceRevealed=!0,i=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.searchScope&&(p.a.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,n.searchScope=!0,i=!0)),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,r!==this.isRegex&&(i=!0,n.isRegex=!0),s!==this.wholeWord&&(i=!0,n.wholeWord=!0),a!==this.matchCase&&(i=!0,n.matchCase=!0),i&&this._onFindReplaceStateChange.fire(n)},e}(),B=o(5),F=o(55),H=o(177),U=o(83),V=o(61),W=(o(438),o(13)),j=o(15),G=o(1),z=o(59),K=o(93),Y=o(16),X=o(162),q=(o(442),o(443),o(14)),$=o(30),J=(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}x(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),Z={inputActiveOptionBorder:q.a.fromHex("#007ACC")},Q=function(e){function t(t){var o=e.call(this)||this;return o._onChange=o._register(new A.a),o._onKeyDown=o._register(new A.a),o._opts=$.c(t),$.g(o._opts,Z,!1),o._checked=o._opts.isChecked,o.domNode=document.createElement("div"),o.domNode.title=o._opts.title,o.domNode.className="monaco-custom-checkbox "+o._opts.actionClassName+" "+(o._checked?"checked":"unchecked"),o.domNode.tabIndex=0,o.domNode.setAttribute("role","checkbox"),o.domNode.setAttribute("aria-checked",String(o._checked)),o.domNode.setAttribute("aria-label",o._opts.title),o.applyStyles(),o.onclick(o.domNode,(function(e){o.checked=!o._checked,o._onChange.fire(!1),e.preventDefault()})),o.onkeydown(o.domNode,(function(e){if(10===e.keyCode||3===e.keyCode)return o.checked=!o._checked,o._onChange.fire(!0),void e.preventDefault();o._onKeyDown.fire(e)})),o}return J(t,e),Object.defineProperty(t.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onKeyDown",{get:function(){return this._onKeyDown.event},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.domNode.focus()},Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this._checked?this.domNode.classList.add("checked"):this.domNode.classList.remove("checked"),this.applyStyles()},enumerable:!0,configurable:!0}),t.prototype.width=function(){return 22},t.prototype.style=function(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),this.applyStyles()},t.prototype.applyStyles=function(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent")},t.prototype.enable=function(){this.domNode.tabIndex=0,this.domNode.setAttribute("aria-disabled",String(!1))},t.prototype.disable=function(){G.H(this.domNode),this.domNode.setAttribute("aria-disabled",String(!0))},t}(z.a),ee=(o(444),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),te=n.a("caseDescription","Match Case"),oe=n.a("wordsDescription","Match Whole Word"),ne=n.a("regexDescription","Use Regular Expression"),ie=function(e){function t(t){return e.call(this,{actionClassName:"monaco-case-sensitive",title:te+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return ee(t,e),t}(Q),re=function(e){function t(t){return e.call(this,{actionClassName:"monaco-whole-word",title:oe+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return ee(t,e),t}(Q),se=function(e){function t(t){return e.call(this,{actionClassName:"monaco-regex",title:ne+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return ee(t,e),t}(Q),ae=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),le=n.a("defaultLabel","input"),ue=function(e){function t(t,o,n){var i=e.call(this)||this;return i._onDidOptionChange=i._register(new A.a),i.onDidOptionChange=i._onDidOptionChange.event,i._onKeyDown=i._register(new A.a),i.onKeyDown=i._onKeyDown.event,i._onMouseDown=i._register(new A.a),i.onMouseDown=i._onMouseDown.event,i._onInput=i._register(new A.a),i._onKeyUp=i._register(new A.a),i._onCaseSensitiveKeyDown=i._register(new A.a),i.onCaseSensitiveKeyDown=i._onCaseSensitiveKeyDown.event,i._onRegexKeyDown=i._register(new A.a),i._lastHighlightFindOptions=0,i.contextViewProvider=o,i.width=n.width||100,i.placeholder=n.placeholder||"",i.validation=n.validation,i.label=n.label||le,i.inputActiveOptionBorder=n.inputActiveOptionBorder,i.inputBackground=n.inputBackground,i.inputForeground=n.inputForeground,i.inputBorder=n.inputBorder,i.inputValidationInfoBorder=n.inputValidationInfoBorder,i.inputValidationInfoBackground=n.inputValidationInfoBackground,i.inputValidationWarningBorder=n.inputValidationWarningBorder,i.inputValidationWarningBackground=n.inputValidationWarningBackground,i.inputValidationErrorBorder=n.inputValidationErrorBorder,i.inputValidationErrorBackground=n.inputValidationErrorBackground,i.regex=null,i.wholeWords=null,i.caseSensitive=null,i.domNode=null,i.inputBox=null,i.buildDomNode(n.appendCaseSensitiveLabel||"",n.appendWholeWordsLabel||"",n.appendRegexLabel||"",n.history),Boolean(t)&&t.appendChild(i.domNode),i.onkeydown(i.inputBox.inputElement,(function(e){return i._onKeyDown.fire(e)})),i.onkeyup(i.inputBox.inputElement,(function(e){return i._onKeyUp.fire(e)})),i.oninput(i.inputBox.inputElement,(function(e){return i._onInput.fire()})),i.onmousedown(i.inputBox.inputElement,(function(e){return i._onMouseDown.fire(e)})),i}return ae(t,e),t.prototype.enable=function(){G.G(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()},t.prototype.disable=function(){G.f(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){this.inputBox.value!==e&&(this.inputBox.value=e)},t.prototype.style=function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getCaseSensitive=function(){return this.caseSensitive.checked},t.prototype.setCaseSensitive=function(e){this.caseSensitive.checked=e,this.setInputWidth()},t.prototype.getWholeWords=function(){return this.wholeWords.checked},t.prototype.setWholeWords=function(e){this.wholeWords.checked=e,this.setInputWidth()},t.prototype.getRegex=function(){return this.regex.checked},t.prototype.setRegex=function(e){this.regex.checked=e,this.setInputWidth(),this.validate()},t.prototype.focusOnCaseSensitive=function(){this.caseSensitive.focus()},t.prototype.highlightFindOptions=function(){G.G(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,G.f(this.domNode,"highlight-"+this._lastHighlightFindOptions)},t.prototype.setInputWidth=function(){var e=this.width-this.caseSensitive.width()-this.wholeWords.width()-this.regex.width();this.inputBox.width=e},t.prototype.buildDomNode=function(e,t,o,n){var i=this;this.domNode=document.createElement("div"),this.domNode.style.width=this.width+"px",G.f(this.domNode,"monaco-findInput"),this.inputBox=this._register(new X.a(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation||null},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:n})),this.regex=this._register(new se({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.regex.onChange((function(e){i._onDidOptionChange.fire(e),e||i.inputBox.focus(),i.setInputWidth(),i.validate()}))),this._register(this.regex.onKeyDown((function(e){i._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new re({appendTitle:t,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.wholeWords.onChange((function(e){i._onDidOptionChange.fire(e),e||i.inputBox.focus(),i.setInputWidth(),i.validate()}))),this.caseSensitive=this._register(new ie({appendTitle:e,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.caseSensitive.onChange((function(e){i._onDidOptionChange.fire(e),e||i.inputBox.focus(),i.setInputWidth(),i.validate()}))),this._register(this.caseSensitive.onKeyDown((function(e){i._onCaseSensitiveKeyDown.fire(e)})));var r=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=r.indexOf(document.activeElement);if(t>=0){var o=void 0;e.equals(17)?o=(t+1)%r.length:e.equals(15)&&(o=0===t?r.length-1:t-1),e.equals(9)?r[t].blur():o>=0&&r[o].focus(),G.c.stop(e,!0)}}})),this.setInputWidth();var s=document.createElement("div");s.className="controls",s.appendChild(this.caseSensitive.domNode),s.appendChild(this.wholeWords.domNode),s.appendChild(this.regex.domNode),this.domNode.appendChild(s)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(z.a);function ce(e,t){return e.getContext(document.activeElement).getValue(t)}var he=o(84),de=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),ge=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},pe=function(e,t){return function(o,n){t(o,n,e)}},fe="historyNavigationWidget",me="historyNavigationEnabled";function _e(e,t){var o=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,o){new r.f(o,t).bindTo(e)}(o,t,fe),{scopedContextKeyService:o,historyNavigationEnablement:new r.f(me,!0).bindTo(o)}}var ye=function(e){function t(t,o,n,i){var r=e.call(this,t,o,n)||this;return r._register(_e(i,{target:r.element,historyNavigator:r}).scopedContextKeyService),r}return de(t,e),t=ge([pe(3,r.e)],t)}(X.a),ve=function(e){function t(t,o,n,i){var r=e.call(this,t,o,n)||this;return r._register(_e(i,{target:r.inputBox.element,historyNavigator:r.inputBox}).scopedContextKeyService),r}return de(t,e),t=ge([pe(3,r.e)],t)}(ue);he.a.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:r.d.and(new r.b(fe),new r.c(me,!0)),primary:16,secondary:[528],handler:function(e,t){ce(e.get(r.e),fe).historyNavigator.showPreviousValue()}}),he.a.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:new r.a([new r.b(fe),new r.c(me,!0)]),primary:18,secondary:[530],handler:function(e,t){ce(e.get(r.e),fe).historyNavigator.showNextValue()}});var be=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ee=n.a("label.find","Find"),Ce=n.a("placeholder.find","Find"),Se=n.a("label.previousMatchButton","Previous match"),Te=n.a("label.nextMatchButton","Next match"),we=n.a("label.toggleSelectionFind","Find in selection"),ke=n.a("label.closeButton","Close"),Oe=n.a("label.replace","Replace"),Re=n.a("placeholder.replace","Replace"),Le=n.a("label.replaceButton","Replace"),Ne=n.a("label.replaceAllButton","Replace All"),Ie=n.a("label.toggleReplaceButton","Toggle Replace mode"),De=n.a("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",19999),Ae=n.a("label.matchesLocation","{0} of {1}"),Pe=n.a("label.noResults","No Results"),xe=69,Me=17+(xe+3+1)+92+2,Be=34,Fe=function(e){this.afterLineNumber=e,this.heightInPx=Be,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"},He=function(e){function t(t,o,n,i,r,s,a){var u=e.call(this)||this;return u._codeEditor=t,u._controller=o,u._state=n,u._contextViewProvider=i,u._keybindingService=r,u._contextKeyService=s,u._isVisible=!1,u._isReplaceVisible=!1,u._updateHistoryDelayer=new l.a(500),u._register(u._state.onFindReplaceStateChange((function(e){return u._onStateChanged(e)}))),u._buildDomNode(),u._updateButtons(),u._tryUpdateWidgetWidth(),u._register(u._codeEditor.onDidChangeConfiguration((function(e){e.readOnly&&(u._codeEditor.getConfiguration().readOnly&&u._state.change({isReplaceRevealed:!1},!1),u._updateButtons()),e.layoutInfo&&u._tryUpdateWidgetWidth()}))),u._register(u._codeEditor.onDidChangeCursorSelection((function(){u._isVisible&&u._updateToggleSelectionFindButton()}))),u._register(u._codeEditor.onDidFocusEditorWidget((function(){if(u._isVisible){var e=u._controller.getGlobalBufferTerm();e&&e!==u._state.searchString&&(u._state.change({searchString:e},!0),u._findInput.select())}}))),u._findInputFocused=w.bindTo(s),u._findFocusTracker=u._register(G.O(u._findInput.inputBox.inputElement)),u._register(u._findFocusTracker.onDidFocus((function(){u._findInputFocused.set(!0),u._updateSearchScope()}))),u._register(u._findFocusTracker.onDidBlur((function(){u._findInputFocused.set(!1)}))),u._replaceInputFocused=k.bindTo(s),u._replaceFocusTracker=u._register(G.O(u._replaceInputBox.inputElement)),u._register(u._replaceFocusTracker.onDidFocus((function(){u._replaceInputFocused.set(!0),u._updateSearchScope()}))),u._register(u._replaceFocusTracker.onDidBlur((function(){u._replaceInputFocused.set(!1)}))),u._codeEditor.addOverlayWidget(u),u._viewZone=new Fe(0),u._applyTheme(a.getTheme()),u._register(a.onThemeChange(u._applyTheme.bind(u))),u._register(u._codeEditor.onDidChangeModel((function(e){u._isVisible&&void 0!==u._viewZoneId&&u._codeEditor.changeViewZones((function(e){e.removeZone(u._viewZoneId),u._viewZoneId=void 0}))}))),u._register(u._codeEditor.onDidScrollChange((function(e){e.scrollTopChanged?u._layoutViewZone():setTimeout((function(){u._layoutViewZone()}),0)}))),u}return be(t,e),t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return this._isVisible?{preference:Y.c.TOP_RIGHT_CORNER}:null},t.prototype._onStateChanged=function(e){if(e.searchString&&(this._findInput.setValue(this._state.searchString),this._updateButtons()),e.replaceString&&(this._replaceInputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal(!0):this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getConfiguration().readOnly||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInputBox.width=this._findInput.inputBox.width,this._updateButtons()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){var t=this._state.searchString.length>0&&0===this._state.matchesCount;G.N(this._domNode,"no-results",t),this._updateMatchesCount()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory()},t.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},t.prototype._updateHistory=function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInputBox.addToHistory()},t.prototype._updateMatchesCount=function(){var e;if(this._matchesCount.style.minWidth=xe+"px",this._state.matchesCount>=19999?this._matchesCount.title=De:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=19999&&(t+="+");var o=String(this._state.matchesPosition);"0"===o&&(o="?"),e=s.format(Ae,o,t)}else e=Pe;this._matchesCount.appendChild(document.createTextNode(e)),xe=Math.max(xe,this._matchesCount.clientWidth)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),o=this._toggleSelectionFind.checked;this._toggleSelectionFind.setEnabled(this._isVisible&&(o||t))},t.prototype._updateButtons=function(){this._findInput.setEnabled(this._isVisible),this._replaceInputBox.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0;this._prevBtn.setEnabled(this._isVisible&&e),this._nextBtn.setEnabled(this._isVisible&&e),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),G.N(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var t=!this._codeEditor.getConfiguration().readOnly;this._toggleReplaceBtn.setEnabled(this._isVisible&&t)},t.prototype._reveal=function(e){var t=this;if(!this._isVisible){this._isVisible=!0;var o=this._codeEditor.getSelection();!!o&&(o.startLineNumber!==o.endLineNumber||o.startColumn!==o.endColumn)&&this._codeEditor.getConfiguration().contribInfo.find.autoFindInSelection?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout((function(){G.f(t._domNode,"visible"),t._domNode.setAttribute("aria-hidden","false")}),0),this._codeEditor.layoutOverlayWidget(this);var n=!0;if(this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection&&o){var i=G.u(this._codeEditor.getDomNode()),r=this._codeEditor.getScrolledVisiblePosition(o.getStartPosition()),s=i.left+r.left;if(r.topo.startLineNumber&&(n=!1);var a=G.w(this._domNode).left;s>a&&(n=!1);var l=this._codeEditor.getScrolledVisiblePosition(o.getEndPosition());i.left+l.left>a&&(n=!1)}}this._showViewZone(n)}},t.prototype._hide=function(e){var t=this;this._isVisible&&(this._isVisible=!1,this._updateButtons(),G.G(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._codeEditor.changeViewZones((function(e){void 0!==t._viewZoneId&&(e.removeZone(t._viewZoneId),t._viewZoneId=void 0,t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()-t._viewZone.heightInPx))})))},t.prototype._layoutViewZone=function(){var e=this;this._isVisible&&void 0===this._viewZoneId&&this._codeEditor.changeViewZones((function(t){e._state.isReplaceRevealed?e._viewZone.heightInPx=64:e._viewZone.heightInPx=Be,e._viewZoneId=t.addZone(e._viewZone),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+e._viewZone.heightInPx)}))},t.prototype._showViewZone=function(e){var t=this;void 0===e&&(e=!0),this._isVisible&&this._codeEditor.changeViewZones((function(o){var n=Be;void 0!==t._viewZoneId?(t._state.isReplaceRevealed?(t._viewZone.heightInPx=64,n=64-Be):(t._viewZone.heightInPx=Be,n=Be-64),o.removeZone(t._viewZoneId)):t._viewZone.heightInPx=Be,t._viewZoneId=o.addZone(t._viewZone),e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+n)}))},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(m.J),inputBackground:e.getColor(m.K),inputForeground:e.getColor(m.M),inputBorder:e.getColor(m.L),inputValidationInfoBackground:e.getColor(m.P),inputValidationInfoBorder:e.getColor(m.Q),inputValidationWarningBackground:e.getColor(m.R),inputValidationWarningBorder:e.getColor(m.S),inputValidationErrorBackground:e.getColor(m.N),inputValidationErrorBorder:e.getColor(m.O)};this._findInput.style(t),this._replaceInputBox.style(t)},t.prototype._tryUpdateWidgetWidth=function(){if(this._isVisible){var e=this._codeEditor.getConfiguration().layoutInfo.width,t=this._codeEditor.getConfiguration().layoutInfo.minimapWidth,o=!1,n=!1,i=!1;if(this._resized)if(G.y(this._domNode)>411)return this._domNode.style.maxWidth=e-28-t-15+"px",void(this._replaceInputBox.inputElement.style.width=G.y(this._findInput.inputBox.inputElement)+"px");if(439+t>=e&&(n=!0),439+t-xe>=e&&(i=!0),439+t-xe>=e+50&&(o=!0),G.N(this._domNode,"collapsed-find-widget",o),G.N(this._domNode,"narrow-find-widget",i),G.N(this._domNode,"reduced-find-widget",n),i||o||(this._domNode.style.maxWidth=e-28-t-15+"px"),this._resized){var r=G.y(this._findInput.inputBox.inputElement);r>0&&(this._replaceInputBox.inputElement.style.width=r+"px")}}},t.prototype.focusFindInput=function(){this._findInput.select(),this._findInput.focus()},t.prototype.focusReplaceInput=function(){this._replaceInputBox.select(),this._replaceInputBox.focus()},t.prototype.highlightFindOptions=function(){this._findInput.highlightFindOptions()},t.prototype._updateSearchScope=function(){if(this._toggleSelectionFind.checked){var e=this._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1));var t=this._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(p.a.equalsRange(e,t)||this._state.change({searchScope:e},!0))}},t.prototype._onFindInputMouseDown=function(e){e.middleButton&&e.stopPropagation()},t.prototype._onFindInputKeyDown=function(e){return e.equals(3)?(this._codeEditor.getAction(I.NextMatchFindAction).run().done(null,W.e),void e.preventDefault()):e.equals(1027)?(this._codeEditor.getAction(I.PreviousMatchFindAction).run().done(null,W.e),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInputBox.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype._onReplaceInputKeyDown=function(e){return e.equals(3)?(this._controller.replace(),void e.preventDefault()):e.equals(2051)?(this._controller.replaceAll(),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype.getHorizontalSashTop=function(e){return 0},t.prototype.getHorizontalSashLeft=function(e){return 0},t.prototype.getHorizontalSashWidth=function(e){return 500},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype._buildFindPart=function(){var e=this;this._findInput=this._register(new ve(null,this._contextViewProvider,{width:221,label:Ee,placeholder:Ce,appendCaseSensitiveLabel:this._keybindingLabelFor(I.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(I.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(I.ToggleRegexCommand),validation:function(t){if(0===t.length)return null;if(!e._findInput.getRegex())return null;try{return new RegExp(t),null}catch(e){return{content:e.message}}}},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((function(t){return e._onFindInputKeyDown(t)}))),this._register(this._findInput.inputBox.onDidChange((function(){e._state.change({searchString:e._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInputBox.focus(),t.preventDefault())}))),j.c&&this._register(this._findInput.onMouseDown((function(t){return e._onFindInputMouseDown(t)}))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Ve({label:Se+this._keybindingLabelFor(I.PreviousMatchFindAction),className:"previous",onTrigger:function(){e._codeEditor.getAction(I.PreviousMatchFindAction).run().done(null,W.e)}})),this._nextBtn=this._register(new Ve({label:Te+this._keybindingLabelFor(I.NextMatchFindAction),className:"next",onTrigger:function(){e._codeEditor.getAction(I.NextMatchFindAction).run().done(null,W.e)}}));var t=document.createElement("div");return t.className="find-part",t.appendChild(this._findInput.domNode),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Ue({parent:t,title:we+this._keybindingLabelFor(I.ToggleSearchScopeCommand),onChange:function(){if(e._toggleSelectionFind.checked){var t=e._codeEditor.getSelection();1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,1)),t.isEmpty()||e._state.change({searchScope:t},!0)}else e._state.change({searchScope:null},!0)}})),this._closeBtn=this._register(new Ve({label:ke+this._keybindingLabelFor(I.CloseFindWidgetCommand),className:"close-fw",onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),t.appendChild(this._closeBtn.domNode),t},t.prototype._buildReplacePart=function(){var e=this,t=document.createElement("div");t.className="replace-input",t.style.width="221px",this._replaceInputBox=this._register(new ye(t,null,{ariaLabel:Oe,placeholder:Re,history:[]},this._contextKeyService)),this._register(G.j(this._replaceInputBox.inputElement,"keydown",(function(t){return e._onReplaceInputKeyDown(t)}))),this._register(G.j(this._replaceInputBox.inputElement,"input",(function(t){e._state.change({replaceString:e._replaceInputBox.value},!1)}))),this._replaceBtn=this._register(new Ve({label:Le+this._keybindingLabelFor(I.ReplaceOneAction),className:"replace",onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new Ve({label:Ne+this._keybindingLabelFor(I.ReplaceAllAction),className:"replace-all",onTrigger:function(){e._controller.replaceAll()}}));var o=document.createElement("div");return o.className="replace-part",o.appendChild(t),o.appendChild(this._replaceBtn.domNode),o.appendChild(this._replaceAllBtn.domNode),o},t.prototype._buildDomNode=function(){var e=this,t=this._buildFindPart(),o=this._buildReplacePart();this._toggleReplaceBtn=this._register(new Ve({label:Ie,className:"toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInputBox.width=e._findInput.inputBox.width),e._showViewZone()}})),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="411px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(o),this._buildSash()},t.prototype._buildSash=function(){var e=this;this._resizeSash=new K.b(this._domNode,this,{orientation:K.a.VERTICAL}),this._resized=!1;var t=411;this._register(this._resizeSash.onDidStart((function(o){t=G.y(e._domNode)}))),this._register(this._resizeSash.onDidChange((function(o){e._resized=!0;var n=t+o.startX-o.currentX;if(!(n<411)){var i=n-Me;n>(parseFloat(G.r(e._domNode).maxWidth)||0)||(e._domNode.style.width=n+"px",e._isReplaceVisible&&(e._replaceInputBox.width=i))}})))},t.ID="editor.contrib.findWidget",t}(z.a),Ue=function(e){function t(o){var n=e.call(this)||this;return n._opts=o,n._domNode=document.createElement("div"),n._domNode.className="monaco-checkbox",n._domNode.title=n._opts.title,n._domNode.tabIndex=0,n._checkbox=document.createElement("input"),n._checkbox.type="checkbox",n._checkbox.className="checkbox",n._checkbox.id="checkbox-"+t._COUNTER++,n._checkbox.tabIndex=-1,n._label=document.createElement("label"),n._label.className="label",n._label.htmlFor=n._checkbox.id,n._label.tabIndex=-1,n._domNode.appendChild(n._checkbox),n._domNode.appendChild(n._label),n._opts.parent.appendChild(n._domNode),n.onchange(n._checkbox,(function(e){n._opts.onChange()})),n}return be(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checkbox.checked},set:function(e){this._checkbox.checked=e},enumerable:!0,configurable:!0}),t.prototype.enable=function(){this._checkbox.removeAttribute("disabled")},t.prototype.disable=function(){this._checkbox.disabled=!0},t.prototype.setEnabled=function(e){e?(this.enable(),this.domNode.tabIndex=0):(this.disable(),this.domNode.tabIndex=-1)},t._COUNTER=0,t}(z.a),Ve=function(e){function t(t){var o=e.call(this)||this;return o._opts=t,o._domNode=document.createElement("div"),o._domNode.title=o._opts.label,o._domNode.tabIndex=0,o._domNode.className="button "+o._opts.className,o._domNode.setAttribute("role","button"),o._domNode.setAttribute("aria-label",o._opts.label),o.onclick(o._domNode,(function(e){o._opts.onTrigger(),e.preventDefault()})),o.onkeydown(o._domNode,(function(e){if(e.equals(10)||e.equals(3))return o._opts.onTrigger(),void e.preventDefault();o._opts.onKeyDown&&o._opts.onKeyDown(e)})),o}return be(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),t.prototype.isEnabled=function(){return this._domNode.tabIndex>=0},t.prototype.focus=function(){this._domNode.focus()},t.prototype.setEnabled=function(e){G.N(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1},t.prototype.setExpanded=function(e){this._domNode.setAttribute("aria-expanded",String(!!e))},t.prototype.toggleClass=function(e,t){G.N(this._domNode,e,t)},t}(z.a);Object(_.e)((function(e,t){var o=function(e,o){o&&t.addRule(".monaco-editor "+e+" { background-color: "+o+"; }")};o(".findMatch",e.getColor(m.q)),o(".currentFindMatch",e.getColor(m.o)),o(".findScope",e.getColor(m.s)),o(".find-widget",e.getColor(m.D));var n=e.getColor(m.rb);n&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px "+n+"; }");var i=e.getColor(m.r);i&&t.addRule(".monaco-editor .findMatch { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+i+"; box-sizing: border-box; }");var r=e.getColor(m.p);r&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid "+r+"; padding: 1px; box-sizing: border-box; }");var s=e.getColor(m.t);s&&t.addRule(".monaco-editor .findScope { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; }");var a=e.getColor(m.e);a&&t.addRule(".monaco-editor .find-widget { border: 2px solid "+a+"; }");var l=e.getColor(m.G);l&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: "+l+"; }");var u=e.getColor(m.F);if(u)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+u+"; width: 3px !important; margin-left: -4px;}");else{var c=e.getColor(m.E);c&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+c+"; width: 3px !important; margin-left: -4px;}")}}));var We=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),je=function(e){function t(t,o,n,i){var r=e.call(this)||this;r._hideSoon=r._register(new l.c((function(){return r._hide()}),2e3)),r._isVisible=!1,r._editor=t,r._state=o,r._keybindingService=n,r._domNode=document.createElement("div"),r._domNode.className="findOptionsWidget",r._domNode.style.display="none",r._domNode.style.top="10px",r._domNode.setAttribute("role","presentation"),r._domNode.setAttribute("aria-hidden","true");var s=i.getTheme().getColor(m.J);return r.caseSensitive=r._register(new ie({appendTitle:r._keybindingLabelFor(I.ToggleCaseSensitiveCommand),isChecked:r._state.matchCase,inputActiveOptionBorder:s})),r._domNode.appendChild(r.caseSensitive.domNode),r._register(r.caseSensitive.onChange((function(){r._state.change({matchCase:r.caseSensitive.checked},!1)}))),r.wholeWords=r._register(new re({appendTitle:r._keybindingLabelFor(I.ToggleWholeWordCommand),isChecked:r._state.wholeWord,inputActiveOptionBorder:s})),r._domNode.appendChild(r.wholeWords.domNode),r._register(r.wholeWords.onChange((function(){r._state.change({wholeWord:r.wholeWords.checked},!1)}))),r.regex=r._register(new se({appendTitle:r._keybindingLabelFor(I.ToggleRegexCommand),isChecked:r._state.isRegex,inputActiveOptionBorder:s})),r._domNode.appendChild(r.regex.domNode),r._register(r.regex.onChange((function(){r._state.change({isRegex:r.regex.checked},!1)}))),r._editor.addOverlayWidget(r),r._register(r._state.onFindReplaceStateChange((function(e){var t=!1;e.isRegex&&(r.regex.checked=r._state.isRegex,t=!0),e.wholeWord&&(r.wholeWords.checked=r._state.wholeWord,t=!0),e.matchCase&&(r.caseSensitive.checked=r._state.matchCase,t=!0),!r._state.isRevealed&&t&&r._revealTemporarily()}))),r._register(G.h(r._domNode,(function(e){return r._onMouseOut()}))),r._register(G.g(r._domNode,"mouseover",(function(e){return r._onMouseOver()}))),r._applyTheme(i.getTheme()),r._register(i.onThemeChange(r._applyTheme.bind(r))),r}return We(t,e),t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{preference:Y.c.TOP_RIGHT_CORNER}},t.prototype.highlightFindOptions=function(){this._revealTemporarily()},t.prototype._revealTemporarily=function(){this._show(),this._hideSoon.schedule()},t.prototype._onMouseOut=function(){this._hideSoon.schedule()},t.prototype._onMouseOver=function(){this._hideSoon.cancel()},t.prototype._show=function(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")},t.prototype._hide=function(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(m.J)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)},t.ID="editor.contrib.findOptionsWidget",t}(z.a);Object(_.e)((function(e,t){var o=e.getColor(m.D);o&&t.addRule(".monaco-editor .findOptionsWidget { background-color: "+o+"; }");var n=e.getColor(m.rb);n&&t.addRule(".monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px "+n+"; }");var i=e.getColor(m.e);i&&t.addRule(".monaco-editor .findOptionsWidget { border: 2px solid "+i+"; }")}));var Ge=o(22),ze=o(38);o.d(t,"getSelectionSearchString",(function(){return qe})),o.d(t,"CommonFindController",(function(){return $e})),o.d(t,"FindController",(function(){return Je})),o.d(t,"StartFindAction",(function(){return Ze})),o.d(t,"StartFindWithSelectionAction",(function(){return Qe})),o.d(t,"MatchFindAction",(function(){return et})),o.d(t,"NextMatchFindAction",(function(){return tt})),o.d(t,"PreviousMatchFindAction",(function(){return ot})),o.d(t,"SelectionMatchFindAction",(function(){return nt})),o.d(t,"NextSelectionMatchFindAction",(function(){return it})),o.d(t,"PreviousSelectionMatchFindAction",(function(){return rt})),o.d(t,"StartFindReplaceAction",(function(){return st}));var Ke=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ye=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},Xe=function(e,t){return function(o,n){t(o,n,e)}};function qe(e){var t=e.getSelection();if(t.startLineNumber===t.endLineNumber){if(!t.isEmpty())return e.getModel().getValueInRange(t);var o=e.getModel().getWordAtPosition(t.getStartPosition());if(o)return o.word}return null}var $e=function(e){function t(t,o,n,i){var r=e.call(this)||this;return r._editor=t,r._findWidgetVisible=T.bindTo(o),r._storageService=n,r._clipboardService=i,r._updateHistoryDelayer=new l.a(500),r._state=r._register(new M),r.loadQueryState(),r._register(r._state.onFindReplaceStateChange((function(e){return r._onStateChanged(e)}))),r._model=null,r._register(r._editor.onDidChangeModel((function(){var e=r._editor.getModel()&&r._state.isRevealed;r.disposeModel(),r._state.change({searchScope:null,matchCase:r._storageService.getBoolean("editor.matchCase",F.c.WORKSPACE,!1),wholeWord:r._storageService.getBoolean("editor.wholeWord",F.c.WORKSPACE,!1),isRegex:r._storageService.getBoolean("editor.isRegex",F.c.WORKSPACE,!1)},!1),e&&r._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1})}))),r}return Ke(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},t.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},t.prototype.getId=function(){return t.ID},t.prototype._onStateChanged=function(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)},t.prototype.saveQueryState=function(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,F.c.WORKSPACE),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,F.c.WORKSPACE),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,F.c.WORKSPACE)},t.prototype.loadQueryState=function(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",F.c.WORKSPACE,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",F.c.WORKSPACE,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",F.c.WORKSPACE,this._state.isRegex)},!1)},t.prototype.getState=function(){return this._state},t.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},t.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1)},t.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1)},t.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1)},t.prototype.toggleSearchScope=function(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else{var e=this._editor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1)),e.isEmpty()||this._state.change({searchScope:e},!0)}},t.prototype.setSearchString=function(e){this._state.isRegex&&(e=s.escapeRegExpCharacters(e)),this._state.change({searchString:e},!1)},t.prototype.highlightFindOptions=function(){},t.prototype._start=function(e){if(this.disposeModel(),this._editor.getModel()){var t,o={isRevealed:!0};if(e.seedSearchStringFromSelection)(t=qe(this._editor))&&(this._state.isRegex?o.searchString=s.escapeRegExpCharacters(t):o.searchString=t);if(!o.searchString&&e.seedSearchStringFromGlobalClipboard)(t=this.getGlobalBufferTerm())&&(o.searchString=t);e.forceRevealReplace?o.isReplaceRevealed=!0:this._findWidgetVisible.get()||(o.isReplaceRevealed=!1),this._state.change(o,!1),this._model||(this._model=new D(this._editor,this._state))}},t.prototype.start=function(e){this._start(e)},t.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},t.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},t.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},t.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},t.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},t.prototype.getGlobalBufferTerm=function(){return this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""},t.prototype.setGlobalBufferTerm=function(e){this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)},t.ID="editor.contrib.findController",t=Ye([Xe(1,r.e),Xe(2,F.a),Xe(3,H.a)],t)}(i.a),Je=function(e){function t(t,o,n,i,r,s,a){var l=e.call(this,t,n,s,a)||this;return l._contextViewService=o,l._contextKeyService=n,l._keybindingService=i,l._themeService=r,l}return Ke(t,e),t.prototype._start=function(t){this._widget||this._createFindWidget(),e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t.prototype._createFindWidget=function(){this._widget=this._register(new He(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService)),this._findOptionsWidget=this._register(new je(this._editor,this._state,this._keybindingService,this._themeService))},t=Ye([Xe(1,U.b),Xe(2,r.e),Xe(3,V.a),Xe(4,_.c),Xe(5,F.a),Xe(6,Object(Ge.d)(H.a))],t)}($e),Ze=function(e){function t(){return e.call(this,{id:I.StartFindAction,label:n.a("startFindAction","Find"),alias:"Find",precondition:null,kbOpts:{kbExpr:null,primary:2084,weight:100},menubarOpts:{menuId:ze.b.MenubarEditMenu,group:"3_find",title:n.a({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);o&&o.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.globalFindClipboard,shouldFocus:1,shouldAnimate:!0})},t}(a.b),Qe=function(e){function t(){return e.call(this,{id:I.StartFindWithSelection,label:n.a("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:null,kbOpts:{kbExpr:null,primary:null,mac:{primary:2083},weight:100}})||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);o&&(o.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:1,shouldAnimate:!0}),o.setGlobalBufferTerm(o.getState().searchString))},t}(a.b),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);o&&!this._run(o)&&(o.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===o.getState().searchString.length&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0}),this._run(o))},t}(a.b),tt=function(e){function t(){return e.call(this,{id:I.NextMatchFindAction,label:n.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(et),ot=function(e){function t(){return e.call(this,{id:I.PreviousMatchFindAction,label:n.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(et),nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);if(o){var n=qe(t);n&&o.setSearchString(n),this._run(o)||(o.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0}),this._run(o))}},t}(a.b),it=function(e){function t(){return e.call(this,{id:I.NextSelectionMatchFindAction,label:n.a("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:2109,weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(nt),rt=function(e){function t(){return e.call(this,{id:I.PreviousSelectionMatchFindAction,label:n.a("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:3133,weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(nt),st=function(e){function t(){return e.call(this,{id:I.StartFindReplaceAction,label:n.a("startReplace","Replace"),alias:"Replace",precondition:null,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menubarOpts:{menuId:ze.b.MenubarEditMenu,group:"3_find",title:n.a({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})||this}return Ke(t,e),t.prototype.run=function(e,t){if(!t.getConfiguration().readOnly){var o=$e.get(t),n=t.getSelection(),i=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,r=o.getState().searchString||i?2:1;o&&o.start({forceRevealReplace:!0,seedSearchStringFromSelection:i,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,shouldFocus:r,shouldAnimate:!0})}},t}(a.b);Object(a.h)(Je),Object(a.f)(Ze),Object(a.f)(Qe),Object(a.f)(tt),Object(a.f)(ot),Object(a.f)(it),Object(a.f)(rt),Object(a.f)(st);var at=a.c.bindToContribution($e.get);Object(a.g)(new at({id:I.CloseFindWidgetCommand,precondition:T,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:9,secondary:[1033]}})),Object(a.g)(new at({id:I.ToggleCaseSensitiveCommand,precondition:null,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),Object(a.g)(new at({id:I.ToggleWholeWordCommand,precondition:null,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),Object(a.g)(new at({id:I.ToggleRegexCommand,precondition:null,handler:function(e){return e.toggleRegex()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:L.primary,mac:L.mac,win:L.win,linux:L.linux}})),Object(a.g)(new at({id:I.ToggleSearchScopeCommand,precondition:null,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:N.primary,mac:N.mac,win:N.win,linux:N.linux}})),Object(a.g)(new at({id:I.ReplaceOneAction,precondition:T,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:3094}})),Object(a.g)(new at({id:I.ReplaceAllAction,precondition:T,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:2563}})),Object(a.g)(new at({id:I.SelectAllMatchesAction,precondition:T,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:515}}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return _}));o(432);var n,i=o(0),r=o(17),s=o(6),a=o(58),l=o(2),u=o(3),c=o(16),h=o(12),d=o(19),g=o(7),p=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),f=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},m=function(e,t){return function(o,n){t(o,n,e)}},_=function(e){function t(o,n){var i=e.call(this)||this;return i._messageListeners=[],i._editor=o,i._visible=t.MESSAGE_VISIBLE.bindTo(n),i._register(i._editor.onDidAttemptReadOnlyEdit((function(){return i._onDidAttemptReadOnlyEdit()}))),i}return p(t,e),t.get=function(e){return e.getContribution(t._id)},t.prototype.getId=function(){return t._id},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._visible.reset()},t.prototype.showMessage=function(e,t){var o,n=this;Object(a.a)(e),this._visible.set(!0),Object(s.d)(this._messageWidget),this._messageListeners=Object(s.d)(this._messageListeners),this._messageWidget=new v(this._editor,t,e),this._messageListeners.push(this._editor.onDidBlurEditorText((function(){return n.closeMessage()}))),this._messageListeners.push(this._editor.onDidChangeCursorPosition((function(){return n.closeMessage()}))),this._messageListeners.push(this._editor.onDidDispose((function(){return n.closeMessage()}))),this._messageListeners.push(this._editor.onDidChangeModel((function(){return n.closeMessage()}))),this._messageListeners.push(Object(r.l)((function(){return n.closeMessage()}),3e3)),this._messageListeners.push(this._editor.onMouseMove((function(e){e.target.position&&(o?o.containsPosition(e.target.position)||n.closeMessage():o=new l.a(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))},t.prototype.closeMessage=function(){this._visible.reset(),this._messageListeners=Object(s.d)(this._messageListeners),this._messageListeners.push(v.fadeOut(this._messageWidget))},t.prototype._onDidAttemptReadOnlyEdit=function(){this.showMessage(i.a("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())},t._id="editor.contrib.messageController",t.MESSAGE_VISIBLE=new h.f("messageVisible",!1),t=f([m(1,h.e)],t)}(s.a),y=u.c.bindToContribution(_.get);Object(u.g)(new y({id:"leaveEditorMessage",precondition:_.MESSAGE_VISIBLE,handler:function(e){return e.closeMessage()},kbOpts:{weight:130,primary:9}}));var v=function(){function e(e,t,o){var n=t.lineNumber,i=t.column;this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(n,n,0),this._position={lineNumber:n,column:i-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");var r=document.createElement("div");r.classList.add("message"),r.textContent=o,this._domNode.appendChild(r);var s=document.createElement("div");s.classList.add("anchor"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}return e.fadeOut=function(e){var t,o=function(){e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",o)};return t=setTimeout(o,110),e.getDomNode().addEventListener("animationend",o),e.getDomNode().classList.add("fadeOut"),{dispose:o}},e.prototype.dispose=function(){this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"messageoverlay"},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return{position:this._position,preference:[c.a.ABOVE]}},e}();Object(u.h)(_),Object(d.e)((function(e,t){var o=e.getColor(g.Q);if(o){var n=e.type===d.b?2:1;t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: "+o+"; }"),t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: "+n+"px solid "+o+"; }")}var i=e.getColor(g.P);i&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: "+i+"; }")}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return u})),o.d(t,"b",(function(){return c}));var n,i,r=o(33),s=o(40),a=o(22),l=o(79),u=Object(a.c)("contextService");!function(e){e.isIWorkspace=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.name&&Array.isArray(e.folders)}}(n||(n={})),function(e){e.isIWorkspaceFolder=function(e){return e&&"object"==typeof e&&r.a.isUri(e.uri)&&"string"==typeof e.name&&"function"==typeof e.toResource}}(i||(i={}));!function(){function e(e,t,o,n,i){void 0===t&&(t=""),void 0===o&&(o=[]),void 0===n&&(n=null),this._id=e,this._name=t,this._configuration=n,this._ctime=i,this._foldersMap=l.c.forPaths(),this.folders=o}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,"name",{get:function(){return this._name},set:function(e){this._name=e},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=l.c.forPaths();for(var e=0,t=this.folders;e ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:f,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function o(e){this.tokens=[],this.tokens.links={},this.options=e||v.defaults,this.rules=t.normal,this.options.pedantic?this.rules=t.pedantic:this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,t.def=h(t.def).replace("label",t._label).replace("title",t._title).getRegex(),t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=h(t.item,"gm").replace(/bull/g,t.bullet).getRegex(),t.list=h(t.list).replace(/bull/g,t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+t.def.source+")").getRegex(),t._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",t._comment=//,t.html=h(t.html,"i").replace("comment",t._comment).replace("tag",t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t.paragraph=h(t.paragraph).replace("hr",t.hr).replace("heading",t.heading).replace("lheading",t.lheading).replace("tag",t._tag).getRegex(),t.blockquote=h(t.blockquote).replace("paragraph",t.paragraph).getRegex(),t.normal=m({},t),t.gfm=m({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=h(t.paragraph).replace("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|").getRegex(),t.tables=m({},t.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),t.pedantic=m({},t.normal,{html:h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),o.rules=t,o.lex=function(e,t){return new o(t).lex(e)},o.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},o.prototype.token=function(e,o){var n,i,r,s,a,l,u,c,h,d,g,p,f;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:y(r,"\n")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(o&&(r=this.rules.nptable.exec(e))&&(l={type:"table",header:_(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(r[0].length),c=0;c ?/gm,""),this.token(r,o),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),g=(s=r[2]).length>1,this.tokens.push({type:"list_start",ordered:g,start:g?+s:""}),n=!1,d=(r=r[0].match(this.rules.item)).length,c=0;c1&&a.length>1||(e=r.slice(c+1).join("\n")+e,c=d-1)),i=n||/\n\n(?!\s*$)/.test(l),c!==d-1&&(n="\n"===l.charAt(l.length-1),i||(i=n)),f=void 0,(p=/^\[[ xX]\] /.test(l))&&(f=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),this.tokens.push({type:i?"loose_item_start":"list_item_start",task:p,checked:f}),this.token(l,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===r[1]||"script"===r[1]||"style"===r[1]),text:r[0]});else if(o&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),r[3]&&(r[3]=r[3].substring(1,r[3].length-1)),h=r[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[h]||(this.tokens.links[h]={href:r[2],title:r[3]});else if(o&&(r=this.rules.table.exec(e))&&(l={type:"table",header:_(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(r[0].length),c=0;c?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:f,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,em:/^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:f,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function c(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}function h(e,t){return e=e.source||e,t=t||"",{replace:function(t,o){return o=(o=o.source||o).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,o),this},getRegex:function(){return new RegExp(e,t)}}}function d(e,t){return g[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?g[" "+e]=e+"/":g[" "+e]=y(e,"/",!0)),e=g[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}i._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=h(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=h(i.tag).replace("comment",t._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,i._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=h(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=h(i.reflink).replace("label",i._label).getRegex(),i.normal=m({},i),i.pedantic=m({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:h(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=m({},i.normal,{escape:h(i.escape).replace("])","~|])").getRegex(),url:h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",i._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:h(i.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),i.breaks=m({},i.gfm,{br:h(i.br).replace("{2,}","*").getRegex(),text:h(i.gfm.text).replace("{2,}","*").getRegex()}),r.rules=i,r.output=function(e,t,o){return new r(t,o).output(e)},r.prototype.output=function(e){for(var t,o,n,i,s,a="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),a+=s[1];else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),n="@"===s[2]?"mailto:"+(o=u(this.mangle(s[1]))):o=u(s[1]),a+=this.renderer.link(n,null,o);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.tag.exec(e))!this.inLink&&/^/i.test(s[0])&&(this.inLink=!1),e=e.substring(s[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):u(s[0]):s[0];else if(s=this.rules.link.exec(e))e=e.substring(s[0].length),this.inLink=!0,n=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n))?(n=t[1],i=t[3]):i="":i=s[3]?s[3].slice(1,-1):"",n=n.trim().replace(/^<([\s\S]*)>$/,"$1"),a+=this.outputLink(s,{href:r.escapes(n),title:r.escapes(i)}),this.inLink=!1;else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),a+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),a+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),a+=this.renderer.codespan(u(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),a+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),a+=this.renderer.del(this.output(s[1]));else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),a+=this.renderer.text(u(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else s[0]=this.rules._backpedal.exec(s[0])[0],e=e.substring(s[0].length),"@"===s[2]?n="mailto:"+(o=u(s[0])):(o=u(s[0]),n="www."===s[1]?"http://"+o:o),a+=this.renderer.link(n,null,o);return a},r.escapes=function(e){return e?e.replace(r.rules._escapes,"$1"):e},r.prototype.outputLink=function(e,t){var o=t.href,n=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(o,n,this.output(e[1])):this.renderer.image(o,n,u(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,o="",n=e.length,i=0;i.5&&(t="x"+t.toString(16)),o+="&#"+t+";";return o},s.prototype.code=function(e,t,o){if(this.options.highlight){var n=this.options.highlight(e,t);null!=n&&n!==e&&(o=!0,e=n)}return t?'
'+(o?e:u(e,!0))+"
\n":"
"+(o?e:u(e,!0))+"
"},s.prototype.blockquote=function(e){return"
\n"+e+"
\n"},s.prototype.html=function(e){return e},s.prototype.heading=function(e,t,o){return this.options.headerIds?"'+e+"\n":""+e+"\n"},s.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},s.prototype.list=function(e,t,o){var n=t?"ol":"ul";return"<"+n+(t&&1!==o?' start="'+o+'"':"")+">\n"+e+"\n"},s.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},s.prototype.checkbox=function(e){return" "},s.prototype.paragraph=function(e){return"

    "+e+"

    \n"},s.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},s.prototype.tablerow=function(e){return"\n"+e+"\n"},s.prototype.tablecell=function(e,t){var o=t.header?"th":"td";return(t.align?"<"+o+' align="'+t.align+'">':"<"+o+">")+e+"\n"},s.prototype.strong=function(e){return""+e+""},s.prototype.em=function(e){return""+e+""},s.prototype.codespan=function(e){return""+e+""},s.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},s.prototype.del=function(e){return""+e+""},s.prototype.link=function(e,t,o){if(this.options.sanitize){try{var n=decodeURIComponent(c(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return o}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return o}this.options.baseUrl&&!p.test(e)&&(e=d(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return o}var i='
    "},s.prototype.image=function(e,t,o){this.options.baseUrl&&!p.test(e)&&(e=d(this.options.baseUrl,e));var n=''+o+'":">"},s.prototype.text=function(e){return e},a.prototype.strong=a.prototype.em=a.prototype.codespan=a.prototype.del=a.prototype.text=function(e){return e},a.prototype.link=a.prototype.image=function(e,t,o){return""+o},a.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new r(e.links,this.options),this.inlineText=new r(e.links,m({},this.options,{renderer:new a})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop()},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,o,n,i="",r="";for(o="",e=0;e=0&&"\\"===o[i];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(o.length>t)o.splice(t);else for(;o.lengthAn error occurred:

    "+u(e.message+"",!0)+"
    ";throw e}}f.exec=f,v.options=v.setOptions=function(e){return m(v.defaults,e),v},v.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new s,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},v.defaults=v.getDefaults(),v.Parser=l,v.parser=l.parse,v.Renderer=s,v.TextRenderer=a,v.Lexer=o,v.lexer=o.lex,v.InlineLexer=r,v.inlineLexer=r.output,v.parse=v,n=v}).call(void 0);var l=n;n.Parser,n.parser,n.Renderer,n.TextRenderer,n.Lexer,n.lexer,n.InlineLexer,n.inlineLexer,n.parse;function u(e){var t=e.inline?"span":"div",o=document.createElement(t);return e.className&&(o.className=e.className),o}function c(e,t){void 0===t&&(t={});var o=u(t);return o.textContent=e,o}function h(e,t){void 0===t&&(t={});var o=u(t);return function e(t,o,n){var r;if(2===o.type)r=document.createTextNode(o.content);else if(3===o.type)r=document.createElement("b");else if(4===o.type)r=document.createElement("i");else if(5===o.type&&n){var s=document.createElement("a");s.href="#",n.disposeables.push(i.j(s,"click",(function(e){n.callback(String(o.index),e)}))),r=s}else 7===o.type?r=document.createElement("br"):1===o.type&&(r=t);t!==r&&t.appendChild(r);Array.isArray(o.children)&&o.children.forEach((function(t){e(r,t,n)}))}(o,function(e){var t={type:1,children:[]},o=0,n=t,i=[],r=new g(e);for(;!r.eos();){var s=r.next(),a="\\"===s&&0!==p(r.peek());if(a&&(s=r.next()),a||0===p(s)||s!==r.peek())if("\n"===s)2===n.type&&(n=i.pop()),n.children.push({type:7});else if(2!==n.type){var l={type:2,content:s};n.children.push(l),i.push(n),n=l}else n.content+=s;else{r.advance(),2===n.type&&(n=i.pop());var u=p(s);if(n.type===u||5===n.type&&6===u)n=i.pop();else{var c={type:u,children:[]};5===u&&(c.index=o,o++),n.children.push(c),i.push(n),n=c}}}2===n.type&&(n=i.pop());i.length;return t}(e),t.actionHandler),o}function d(e,t){void 0===t&&(t={});var o,n=u(t),c=new Promise((function(e){return o=e})),h=new l.Renderer;h.image=function(e,t,o){var n=[];if(e){var i=e.split("|").map((function(e){return e.trim()}));e=i[0];var r=i[1];if(r){var s=/height=(\d+)/.exec(r),a=/width=(\d+)/.exec(r),l=s&&s[1],u=a&&a[1],c=isFinite(parseInt(u)),h=isFinite(parseInt(l));c&&n.push('width="'+u+'"'),h&&n.push('height="'+l+'"')}}var d=[];return e&&d.push('src="'+e+'"'),o&&d.push('alt="'+o+'"'),t&&d.push('title="'+t+'"'),n.length&&(d=d.concat(n)),""},h.link=function(t,o,n){return t===n&&(n=Object(a.d)(n)),o=Object(a.d)(o),!(t=Object(a.d)(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted?n:'
    '+n+""},h.paragraph=function(e){return"

    "+e+"

    "},t.codeBlockRenderer&&(h.code=function(e,o){var i=t.codeBlockRenderer(o,e),a=r.b.nextId(),l=Promise.all([i,c]).then((function(e){var t=e[0],o=n.querySelector('div[data-code="'+a+'"]');o&&(o.innerHTML=t)})).catch((function(e){}));return t.codeBlockRenderCallback&&l.then(t.codeBlockRenderCallback),'
    '+Object(s.escape)(e)+"
    "}),t.actionHandler&&t.actionHandler.disposeables.push(i.j(n,"click",(function(e){var o=e.target;if("A"===o.tagName||(o=o.parentElement)&&"A"===o.tagName){var n=o.dataset.href;n&&t.actionHandler.callback(n,e)}})));var d={sanitize:!0,renderer:h};return n.innerHTML=l(e.value,d),o(),n}o.d(t,"c",(function(){return c})),o.d(t,"a",(function(){return h})),o.d(t,"b",(function(){return d}));var g=function(){function e(e){this.source=e,this.index=0}return e.prototype.eos=function(){return this.index>=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}();function p(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=function(){function e(e,t,o){this.from=0|e,this.to=0|t,this.colorId=0|o}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}(),i=function(){function e(e,t,o){this.startLineNumber=e,this.endLineNumber=t,this.color=o,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.coloro&&(g=o-p);var f=u.color,m=this._color2Id[f];m||(m=++this._lastAssignedId,this._color2Id[f]=m,this._id2Color[m]=f);var _=new n(g-p,g+p,m);u.setColorZone(_),s.push(_)}return this._colorZonesInvalid=!1,s.sort(n.compare),s},e}()},function(e,t,o){"use strict";for(var n=o(64),i=o(127),r=o(182),s=o(100),a=new Array(256),l=0;l<256;l++)a[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;a[254]=a[254]=1;function u(){s.call(this,"utf-8 decode"),this.leftOver=null}function c(){s.call(this,"utf-8 encode")}t.utf8encode=function(e){return i.nodebuffer?r.newBufferFrom(e,"utf-8"):function(e){var t,o,n,r,s,a=e.length,l=0;for(r=0;r>>6,t[s++]=128|63&o):o<65536?(t[s++]=224|o>>>12,t[s++]=128|o>>>6&63,t[s++]=128|63&o):(t[s++]=240|o>>>18,t[s++]=128|o>>>12&63,t[s++]=128|o>>>6&63,t[s++]=128|63&o);return t}(e)},t.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,o,i,r,s=e.length,l=new Array(2*s);for(o=0,t=0;t4)l[o++]=65533,t+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&t1?l[o++]=65533:i<65536?l[o++]=i:(i-=65536,l[o++]=55296|i>>10&1023,l[o++]=56320|1023&i)}return l.length!==o&&(l.subarray?l=l.subarray(0,o):l.length=o),n.applyFromCharCode(l)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(u,s),u.prototype.processChunk=function(e){var o=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var r=o;(o=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),o.set(r,this.leftOver.length)}else o=this.leftOver.concat(o);this.leftOver=null}var s=function(e,t){var o;for((t=t||e.length)>e.length&&(t=e.length),o=t-1;o>=0&&128==(192&e[o]);)o--;return o<0?t:0===o?t:o+a[e[o]]>t?o:t}(o),l=o;s!==o.length&&(i.uint8array?(l=o.subarray(0,s),this.leftOver=o.subarray(s,o.length)):(l=o.slice(0,s),this.leftOver=o.slice(s,o.length))),this.push({data:t.utf8decode(l),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=u,n.inherits(c,s),c.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=c},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var o=function(){};o.prototype=t.prototype,e.prototype=new o,e.prototype.constructor=e}}},function(e,t,o){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function r(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new r(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},o(332),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,o(80))},function(e,t,o){"use strict";function n(e,t,o){var n=o?" !== ":" === ",i=o?" || ":" && ",r=o?"!":"",s=o?"":"!";switch(e){case"null":return t+n+"null";case"array":return r+"Array.isArray("+t+")";case"object":return"("+r+t+i+"typeof "+t+n+'"object"'+i+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+n+'"number"'+i+s+"("+t+" % 1)"+i+t+n+t+")";default:return"typeof "+t+n+'"'+e+'"'}}e.exports={copy:function(e,t){for(var o in t=t||{},e)t[o]=e[o];return t},checkDataType:n,checkDataTypes:function(e,t){switch(e.length){case 1:return n(e[0],t,!0);default:var o="",i=r(e);for(var s in i.array&&i.object&&(o=i.null?"(":"(!"+t+" || ",o+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)o+=(o?" && ":"")+n(s,t,!0);return o}},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var o=[],n=0;n=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return o[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(r="data"+(t-n||""),!i)return r}for(var a=r,u=i.split("/"),c=0;c0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},s=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var l=o(109),u=o(101),c=o(522),h=o(523),d=o(138),g=o(524),p=o(152);!function(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}(o(101));var f,m,_=function(){function e(){}return e.prototype.error=function(e){console.error(e)},e.prototype.warn=function(e){console.warn(e)},e.prototype.info=function(e){console.info(e)},e.prototype.log=function(e){console.log(e)},e}();!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(f=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(m=t.CloseAction||(t.CloseAction={}));var y,v,b,E=function(){function e(e){this.name=e,this.restarts=[]}return e.prototype.error=function(e,t,o){return o&&o<=3?f.Continue:f.Shutdown},e.prototype.closed=function(){return this.restarts.push(Date.now()),this.restarts.length<5?m.Restart:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(l.window.showErrorMessage("The "+this.name+" server crashed 5 times in the last 3 minutes. The server will not be restarted."),m.DoNotRestart):(this.restarts.shift(),m.Restart)},e}();!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(y=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Running=2]="Running"}(v=t.State||(t.State={})),function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.StartFailed=2]="StartFailed",e[e.Running=3]="Running",e[e.Stopping=4]="Stopping",e[e.Stopped=5]="Stopped"}(b||(b={}));var C,S=[u.SymbolKind.File,u.SymbolKind.Module,u.SymbolKind.Namespace,u.SymbolKind.Package,u.SymbolKind.Class,u.SymbolKind.Method,u.SymbolKind.Property,u.SymbolKind.Field,u.SymbolKind.Constructor,u.SymbolKind.Enum,u.SymbolKind.Interface,u.SymbolKind.Function,u.SymbolKind.Variable,u.SymbolKind.Constant,u.SymbolKind.String,u.SymbolKind.Number,u.SymbolKind.Boolean,u.SymbolKind.Array,u.SymbolKind.Object,u.SymbolKind.Key,u.SymbolKind.Null,u.SymbolKind.EnumMember,u.SymbolKind.Struct,u.SymbolKind.Event,u.SymbolKind.Operator,u.SymbolKind.TypeParameter],T=[u.CompletionItemKind.Text,u.CompletionItemKind.Method,u.CompletionItemKind.Function,u.CompletionItemKind.Constructor,u.CompletionItemKind.Field,u.CompletionItemKind.Variable,u.CompletionItemKind.Class,u.CompletionItemKind.Interface,u.CompletionItemKind.Module,u.CompletionItemKind.Property,u.CompletionItemKind.Unit,u.CompletionItemKind.Value,u.CompletionItemKind.Enum,u.CompletionItemKind.Keyword,u.CompletionItemKind.Snippet,u.CompletionItemKind.Color,u.CompletionItemKind.File,u.CompletionItemKind.Reference,u.CompletionItemKind.Folder,u.CompletionItemKind.EnumMember,u.CompletionItemKind.Constant,u.CompletionItemKind.Struct,u.CompletionItemKind.Event,u.CompletionItemKind.Operator,u.CompletionItemKind.TypeParameter];function w(e,t){return void 0===e[t]&&(e[t]={}),e[t]}!function(e){e.is=function(e){var t=e;return t&&d.func(t.register)&&d.func(t.unregister)&&d.func(t.dispose)&&void 0!==t.messages}}(C||(C={}));var k=function(){function e(e,t,o,n,i,r){this._client=e,this._event=t,this._type=o,this._middleware=n,this._createParams=i,this._selectorFilter=r,this._selectors=new Map}return e.textDocumentFilter=function(e,t){var o,n;try{for(var i=a(e),r=i.next();!r.done;r=i.next()){var s=r.value;if(l.languages.match(s,t))return!0}}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return!1},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))},e.prototype.callback=function(e){var t=this;this._selectorFilter&&!this._selectorFilter(this._selectors.values(),e)||(this._middleware?this._middleware(e,(function(e){return t._client.sendNotification(t._type,t._createParams(e))})):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))},e.prototype.notificationSent=function(e){},e.prototype.unregister=function(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._selectors.clear(),this._listener&&this._listener.dispose()},e}(),O=function(e){function t(t,o){var n=e.call(this,t,l.workspace.onDidOpenTextDocument,u.DidOpenTextDocumentNotification.type,t.clientOptions.middleware.didOpen,(function(e){return t.code2ProtocolConverter.asOpenTextDocumentParams(e)}),k.textDocumentFilter)||this;return n._syncedDocuments=o,n}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.DidOpenTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.openClose&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},t.prototype.register=function(t,o){var n=this;if(e.prototype.register.call(this,t,o),o.registerOptions.documentSelector){var i=o.registerOptions.documentSelector;l.workspace.textDocuments.forEach((function(e){var t=e.uri.toString();if(!n._syncedDocuments.has(t)&&l.languages.match(i,e)){var o=n._client.clientOptions.middleware,r=function(e){n._client.sendNotification(n._type,n._createParams(e))};o.didOpen?o.didOpen(e,r):r(e),n._syncedDocuments.set(t,e)}}))}},t.prototype.notificationSent=function(t){e.prototype.notificationSent.call(this,t),this._syncedDocuments.set(t.uri.toString(),t)},t}(k),R=function(e){function t(t,o){var n=e.call(this,t,l.workspace.onDidCloseTextDocument,u.DidCloseTextDocumentNotification.type,t.clientOptions.middleware.didClose,(function(e){return t.code2ProtocolConverter.asCloseTextDocumentParams(e)}),k.textDocumentFilter)||this;return n._syncedDocuments=o,n}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.DidCloseTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.openClose&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},t.prototype.notificationSent=function(t){e.prototype.notificationSent.call(this,t),this._syncedDocuments.delete(t.uri.toString())},t.prototype.unregister=function(t){var o=this,n=this._selectors.get(t);e.prototype.unregister.call(this,t);var i=this._selectors.values();this._syncedDocuments.forEach((function(e){if(l.languages.match(n,e)&&!o._selectorFilter(i,e)){var t=o._client.clientOptions.middleware,r=function(e){o._client.sendNotification(o._type,o._createParams(e))};o._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,r):r(e)}}))},t}(k),L=function(){function e(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.DidChangeTextDocumentNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0},e.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&void 0!==o.change&&o.change!==u.TextDocumentSyncKind.None&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:o.change})})},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=l.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(t.id,{documentSelector:t.registerOptions.documentSelector,syncKind:t.registerOptions.syncKind}))},e.prototype.callback=function(e){var t,o,n=this;if(0!==e.contentChanges.length){var i=function(t){if(l.languages.match(t.documentSelector,e.document)){var o=r._client.clientOptions.middleware;if(t.syncKind===u.TextDocumentSyncKind.Incremental){var i=r._client.code2ProtocolConverter.asChangeTextDocumentParams(e);o.didChange?o.didChange(e,(function(){return n._client.sendNotification(u.DidChangeTextDocumentNotification.type,i)})):r._client.sendNotification(u.DidChangeTextDocumentNotification.type,i)}else if(t.syncKind===u.TextDocumentSyncKind.Full){var s=function(e){n._changeDelayer?(n._changeDelayer.uri!==e.document.uri.toString()&&(n.forceDelivery(),n._changeDelayer.uri=e.document.uri.toString()),n._changeDelayer.delayer.trigger((function(){n._client.sendNotification(u.DidChangeTextDocumentNotification.type,n._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}))):(n._changeDelayer={uri:e.document.uri.toString(),delayer:new g.Delayer(200)},n._changeDelayer.delayer.trigger((function(){n._client.sendNotification(u.DidChangeTextDocumentNotification.type,n._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}),-1))};o.didChange?o.didChange(e,s):s(e)}}},r=this;try{for(var s=a(this._changeData.values()),c=s.next();!c.done;c=s.next()){i(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}}},e.prototype.unregister=function(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.forceDelivery=function(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}},e}(),N=function(e){function t(t){return e.call(this,t,l.workspace.onWillSaveTextDocument,u.WillSaveTextDocumentNotification.type,t.clientOptions.middleware.willSave,(function(e){return t.code2ProtocolConverter.asWillSaveTextDocumentParams(e)}),(function(e,t){return k.textDocumentFilter(e,t.document)}))||this}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.WillSaveTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").willSave=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.willSave&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},t}(k),I=function(){function e(e){this._client=e,this._selectors=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.WillSaveTextDocumentWaitUntilRequest.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").willSaveWaitUntil=!0},e.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.willSaveWaitUntil&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=l.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))},e.prototype.callback=function(e){var t=this;if(k.textDocumentFilter(this._selectors.values(),e.document)){var o=this._client.clientOptions.middleware,n=function(e){return t._client.sendRequest(u.WillSaveTextDocumentWaitUntilRequest.type,t._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((function(e){var o=t._client.protocol2CodeConverter.asTextEdits(e);return void 0===o?[]:o}))};e.waitUntil(o.willSaveWaitUntil?o.willSaveWaitUntil(e,n):n(e))}},e.prototype.unregister=function(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)},e}(),D=function(e){function t(t){var o=e.call(this,t,l.workspace.onDidSaveTextDocument,u.DidSaveTextDocumentNotification.type,t.clientOptions.middleware.didSave,(function(e){return t.code2ProtocolConverter.asSaveTextDocumentParams(e,o._includeText)}),k.textDocumentFilter)||this;return o}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.DidSaveTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").didSave=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.save&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{includeText:!!o.save.includeText})})},t.prototype.register=function(t,o){this._includeText=!!o.registerOptions.includeText,e.prototype.register.call(this,t,o)},t}(k),A=function(){function e(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.DidChangeWatchedFilesNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0},e.prototype.initialize=function(e,t){},e.prototype.register=function(e,t){var o,n;if(Array.isArray(t.registerOptions.watchers)){var i=[];try{for(var r=a(t.registerOptions.watchers),s=r.next();!s.done;s=r.next()){var c=s.value;if(d.string(c.globPattern)){var h=!0,g=!0,p=!0;void 0!==c.kind&&null!==c.kind&&(h=0!=(c.kind&u.WatchKind.Create),g=0!=(c.kind&u.WatchKind.Change),p=0!=(c.kind&u.WatchKind.Delete));var f=l.workspace.createFileSystemWatcher(c.globPattern,!h,!g,!p);this.hookListeners(f,h,g,p),i.push(f)}}}catch(e){o={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}this._watchers.set(t.id,i)}},e.prototype.registerRaw=function(e,t){var o,n,i=[];try{for(var r=a(t),s=r.next();!s.done;s=r.next()){var l=s.value;this.hookListeners(l,!0,!0,!0,i)}}catch(e){o={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}this._watchers.set(e,i)},e.prototype.hookListeners=function(e,t,o,n,i){var r=this;t&&e.onDidCreate((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:u.FileChangeType.Created})}),null,i),o&&e.onDidChange((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:u.FileChangeType.Changed})}),null,i),n&&e.onDidDelete((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:u.FileChangeType.Deleted})}),null,i)},e.prototype.unregister=function(e){var t,o,n=this._watchers.get(e);if(n)try{for(var i=a(n),r=i.next();!r.done;r=i.next()){r.value.dispose()}}catch(e){t={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(t)throw t.error}}},e.prototype.dispose=function(){this._watchers.forEach((function(e){var t,o;try{for(var n=a(e),i=n.next();!i.done;i=n.next()){i.value.dispose()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(t)throw t.error}}})),this._watchers.clear()},e}(),P=function(){function e(e,t){this._client=e,this._message=t,this._providers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){if(e.method!==this.messages.method)throw new Error("Register called on wrong feature. Requested "+e.method+" but reached feature "+this.messages.method);if(t.registerOptions.documentSelector){var o=this.registerLanguageProvider(t.registerOptions);o&&this._providers.set(t.id,o)}},e.prototype.unregister=function(e){var t=this._providers.get(e);t&&t.dispose()},e.prototype.dispose=function(){this._providers.forEach((function(e){e.dispose()})),this._providers.clear()},e}();t.TextDocumentFeature=P;var x=function(){function e(e,t){this._client=e,this._message=t,this._providers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){if(e.method!==this.messages.method)throw new Error("Register called on wron feature. Requested "+e.method+" but reached feature "+this.messages.method);var o=this.registerLanguageProvider(t.registerOptions);o&&this._providers.set(t.id,o)},e.prototype.unregister=function(e){var t=this._providers.get(e);t&&t.dispose()},e.prototype.dispose=function(){this._providers.forEach((function(e){e.dispose()})),this._providers.clear()},e}(),M=function(e){function t(t){return e.call(this,t,u.CompletionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[u.MarkupKind.Markdown,u.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0},t.completionItemKind={valueSet:T}},t.prototype.initialize=function(e,t){e.completionProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.completionProvider)})},t.prototype.registerLanguageProvider=function(e){var t=e.triggerCharacters||[],o=this._client,n=function(e,t,n,i){return o.sendRequest(u.CompletionRequest.type,o.code2ProtocolConverter.asCompletionParams(e,t,n),i).then(o.protocol2CodeConverter.asCompletionResult,(function(e){return o.logFailedRequest(u.CompletionRequest.type,e),Promise.resolve([])}))},i=function(e,t){return o.sendRequest(u.CompletionResolveRequest.type,o.code2ProtocolConverter.asCompletionItem(e),t).then(o.protocol2CodeConverter.asCompletionItem,(function(t){return o.logFailedRequest(u.CompletionResolveRequest.type,t),Promise.resolve(e)}))},r=this._client.clientOptions.middleware;return l.languages.registerCompletionItemProvider.apply(l.languages,s([e.documentSelector,{provideCompletionItems:function(e,t,o,i){return r.provideCompletionItem?r.provideCompletionItem(e,t,i,o,n):n(e,t,i,o)},resolveCompletionItem:e.resolveProvider?function(e,t){return r.resolveCompletionItem?r.resolveCompletionItem(e,t,i):i(e,t)}:void 0}],t))},t}(P),B=function(e){function t(t){return e.call(this,t,u.HoverRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[u.MarkupKind.Markdown,u.MarkupKind.PlainText]},t.prototype.initialize=function(e,t){e.hoverProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.HoverRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asHover,(function(e){return t.logFailedRequest(u.HoverRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware;return l.languages.registerHoverProvider(e.documentSelector,{provideHover:function(e,t,i){return n.provideHover?n.provideHover(e,t,i,o):o(e,t,i)}})},t}(P),F=function(e){function t(t){return e.call(this,t,u.SignatureHelpRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[u.MarkupKind.Markdown,u.MarkupKind.PlainText]}},t.prototype.initialize=function(e,t){e.signatureHelpProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.signatureHelpProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.SignatureHelpRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asSignatureHelp,(function(e){return t.logFailedRequest(u.SignatureHelpRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware,i=e.triggerCharacters||[];return l.languages.registerSignatureHelpProvider.apply(l.languages,s([e.documentSelector,{provideSignatureHelp:function(e,t,i){return n.provideSignatureHelp?n.provideSignatureHelp(e,t,i,o):o(e,t,i)}}],i))},t}(P),H=function(e){function t(t){return e.call(this,t,u.DefinitionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"definition").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.definitionProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.DefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(u.DefinitionRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware;return l.languages.registerDefinitionProvider(e.documentSelector,{provideDefinition:function(e,t,i){return n.provideDefinition?n.provideDefinition(e,t,i,o):o(e,t,i)}})},t}(P),U=function(e){function t(t){return e.call(this,t,u.ReferencesRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"references").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.referencesProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){return t.sendRequest(u.ReferencesRequest.type,t.code2ProtocolConverter.asReferenceParams(e,o,n),i).then(t.protocol2CodeConverter.asReferences,(function(e){return t.logFailedRequest(u.ReferencesRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerReferenceProvider(e.documentSelector,{provideReferences:function(e,t,i,r){return n.provideReferences?n.provideReferences(e,t,i,r,o):o(e,t,i,r)}})},t}(P),V=function(e){function t(t){return e.call(this,t,u.DocumentHighlightRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"documentHighlight").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentHighlightProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.DocumentHighlightRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asDocumentHighlights,(function(e){return t.logFailedRequest(u.DocumentHighlightRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentHighlightProvider(e.documentSelector,{provideDocumentHighlights:function(e,t,i){return n.provideDocumentHighlights?n.provideDocumentHighlights(e,t,i,o):o(e,t,i)}})},t}(P),W=function(e){function t(t){return e.call(this,t,u.DocumentSymbolRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:S},t.hierarchicalDocumentSymbolSupport=!0},t.prototype.initialize=function(e,t){e.documentSymbolProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.DocumentSymbolRequest.type,t.code2ProtocolConverter.asDocumentSymbolParams(e),o).then((function(e){if(null!==e){if(0===e.length)return[];var o=e[0];return u.DocumentSymbol.is(o)?t.protocol2CodeConverter.asDocumentSymbols(e):t.protocol2CodeConverter.asSymbolInformations(e)}}),(function(e){return t.logFailedRequest(u.DocumentSymbolRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentSymbolProvider(e.documentSelector,{provideDocumentSymbols:function(e,t){return n.provideDocumentSymbols?n.provideDocumentSymbols(e,t,o):o(e,t)}})},t}(P),j=function(e){function t(t){return e.call(this,t,u.WorkspaceSymbolRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:S}},t.prototype.initialize=function(e){e.workspaceSymbolProvider&&this.register(this.messages,{id:p.generateUuid(),registerOptions:void 0})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.WorkspaceSymbolRequest.type,{query:e},o).then(t.protocol2CodeConverter.asSymbolInformations,(function(e){return t.logFailedRequest(u.WorkspaceSymbolRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerWorkspaceSymbolProvider({provideWorkspaceSymbols:function(e,t){return n.provideWorkspaceSymbols?n.provideWorkspaceSymbols(e,t,o):o(e,t)}})},t}(x),G=function(e){function t(t){return e.call(this,t,u.CodeActionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.codeActionLiteralSupport={codeActionKind:{valueSet:["",u.CodeActionKind.QuickFix,u.CodeActionKind.Refactor,u.CodeActionKind.RefactorExtract,u.CodeActionKind.RefactorInline,u.CodeActionKind.RefactorRewrite,u.CodeActionKind.Source,u.CodeActionKind.SourceOrganizeImports]}}},t.prototype.initialize=function(e,t){e.codeActionProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(o),context:t.code2ProtocolConverter.asCodeActionContext(n)};return t.sendRequest(u.CodeActionRequest.type,r,i).then((function(e){var o,n;if(null!==e){var i=[];try{for(var r=a(e),s=r.next();!s.done;s=r.next()){var l=s.value;u.Command.is(l)?i.push(t.protocol2CodeConverter.asCommand(l)):i.push(t.protocol2CodeConverter.asCodeAction(l))}}catch(e){o={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i}}),(function(e){return t.logFailedRequest(u.CodeActionRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerCodeActionsProvider(e.documentSelector,{provideCodeActions:function(e,t,i,r){return n.provideCodeActions?n.provideCodeActions(e,t,i,r,o):o(e,t,i,r)}})},t}(P),z=function(e){function t(t){return e.call(this,t,u.CodeLensRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"codeLens").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.codeLensProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.codeLensProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.CodeLensRequest.type,t.code2ProtocolConverter.asCodeLensParams(e),o).then(t.protocol2CodeConverter.asCodeLenses,(function(e){return t.logFailedRequest(u.CodeLensRequest.type,e),Promise.resolve([])}))},n=function(e,o){return t.sendRequest(u.CodeLensResolveRequest.type,t.code2ProtocolConverter.asCodeLens(e),o).then(t.protocol2CodeConverter.asCodeLens,(function(o){return t.logFailedRequest(u.CodeLensResolveRequest.type,o),e}))},i=t.clientOptions.middleware;return l.languages.registerCodeLensProvider(e.documentSelector,{provideCodeLenses:function(e,t){return i.provideCodeLenses?i.provideCodeLenses(e,t,o):o(e,t)},resolveCodeLens:e.resolveProvider?function(e,t){return i.resolveCodeLens?i.resolveCodeLens(e,t,n):n(e,t)}:void 0})},t}(P),K=function(e){function t(t){return e.call(this,t,u.DocumentFormattingRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"formatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentFormattingProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){var i={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),options:t.code2ProtocolConverter.asFormattingOptions(o)};return t.sendRequest(u.DocumentFormattingRequest.type,i,n).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(u.DocumentFormattingRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentFormattingEditProvider(e.documentSelector,{provideDocumentFormattingEdits:function(e,t,i){return n.provideDocumentFormattingEdits?n.provideDocumentFormattingEdits(e,t,i,o):o(e,t,i)}})},t}(P),Y=function(e){function t(t){return e.call(this,t,u.DocumentRangeFormattingRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentRangeFormattingProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(o),options:t.code2ProtocolConverter.asFormattingOptions(n)};return t.sendRequest(u.DocumentRangeFormattingRequest.type,r,i).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(u.DocumentRangeFormattingRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,{provideDocumentRangeFormattingEdits:function(e,t,i,r){return n.provideDocumentRangeFormattingEdits?n.provideDocumentRangeFormattingEdits(e,t,i,r,o):o(e,t,i,r)}})},t}(P),X=function(e){function t(t){return e.call(this,t,u.DocumentOnTypeFormattingRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentOnTypeFormattingProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentOnTypeFormattingProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=e.moreTriggerCharacter||[],n=function(e,o,n,i,r){var s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(o),ch:n,options:t.code2ProtocolConverter.asFormattingOptions(i)};return t.sendRequest(u.DocumentOnTypeFormattingRequest.type,s,r).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(u.DocumentOnTypeFormattingRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerOnTypeFormattingEditProvider.apply(l.languages,s([e.documentSelector,{provideOnTypeFormattingEdits:function(e,t,o,r,s){return i.provideOnTypeFormattingEdits?i.provideOnTypeFormattingEdits(e,t,o,r,s,n):n(e,t,o,r,s)}},e.firstTriggerCharacter],o))},t}(P),q=function(e){function t(t){return e.call(this,t,u.RenameRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"rename").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.renameProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(o),newName:n};return t.sendRequest(u.RenameRequest.type,r,i).then(t.protocol2CodeConverter.asWorkspaceEdit,(function(e){return t.logFailedRequest(u.RenameRequest.type,e),Promise.reject(new Error(e.message))}))},n=t.clientOptions.middleware;return l.languages.registerRenameProvider(e.documentSelector,{provideRenameEdits:function(e,t,i,r){return n.provideRenameEdits?n.provideRenameEdits(e,t,i,r,o):o(e,t,i,r)}})},t}(P),$=function(e){function t(t){return e.call(this,t,u.DocumentLinkRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"documentLink").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentLinkProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentLinkProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.DocumentLinkRequest.type,t.code2ProtocolConverter.asDocumentLinkParams(e),o).then(t.protocol2CodeConverter.asDocumentLinks,(function(e){t.logFailedRequest(u.DocumentLinkRequest.type,e),Promise.resolve(new Error(e.message))}))},n=function(e,o){return t.sendRequest(u.DocumentLinkResolveRequest.type,t.code2ProtocolConverter.asDocumentLink(e),o).then(t.protocol2CodeConverter.asDocumentLink,(function(e){t.logFailedRequest(u.DocumentLinkResolveRequest.type,e),Promise.resolve(new Error(e.message))}))},i=t.clientOptions.middleware;return l.languages.registerDocumentLinkProvider(e.documentSelector,{provideDocumentLinks:function(e,t){return i.provideDocumentLinks?i.provideDocumentLinks(e,t,o):o(e,t)},resolveDocumentLink:e.resolveProvider?function(e,t){return i.resolveDocumentLink?i.resolveDocumentLink(e,t,n):n(e,t)}:void 0})},t}(P),J=function(){function e(e){this._client=e,this._listeners=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.DidChangeConfigurationNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0},e.prototype.initialize=function(){var e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{section:e}})},e.prototype.register=function(e,t){var o=this,n=l.workspace.onDidChangeConfiguration((function(e){o.onDidChangeConfiguration(t.registerOptions.section,e)}));this._listeners.set(t.id,n),void 0!==t.registerOptions.section&&this.onDidChangeConfiguration(t.registerOptions.section,void 0)},e.prototype.unregister=function(e){var t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())},e.prototype.dispose=function(){var e,t;try{for(var o=a(this._listeners.values()),n=o.next();!n.done;n=o.next()){n.value.dispose()}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this._listeners.clear()},e.prototype.onDidChangeConfiguration=function(e,t){var o,n=this;if(void 0!==(o=d.string(e)?[e]:e)&&void 0!==t&&!o.some((function(e){return t.affectsConfiguration(e)})))return;var i=function(e){void 0!==e?n._client.sendNotification(u.DidChangeConfigurationNotification.type,{settings:n.extractSettingsInformation(e)}):n._client.sendNotification(u.DidChangeConfigurationNotification.type,{settings:null})},r=this.getMiddleware();r?r(o,i):i(o)},e.prototype.extractSettingsInformation=function(e){function t(e,t){for(var o=e,n=0;n=0?l.workspace.getConfiguration(r.substr(0,s),o).get(r.substr(s+1)):l.workspace.getConfiguration(r,o)){var u=e[i].split(".");t(n,u)[u[u.length-1]]=a}}return n},e.prototype.getMiddleware=function(){var e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0},e}(),Z=function(){function e(e){this._client=e,this._commands=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.ExecuteCommandRequest.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"workspace"),"executeCommand").dynamicRegistration=!0},e.prototype.initialize=function(e){e.executeCommandProvider&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})},e.prototype.register=function(e,t){var o,n,i=this._client;if(t.registerOptions.commands){var r=[],s=function(e){r.push(l.commands.registerCommand(e,(function(){for(var t=[],o=0;o=0){var h=i.get(c.textDocument.uri);if(h&&h.version!==c.textDocument.version){r=!0;break}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}return r?Promise.resolve({applied:!1}):l.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then((function(e){return{applied:e}}))},t.prototype.logFailedRequest=function(e,t){t instanceof u.ResponseError&&t.code===u.ErrorCodes.RequestCancelled||this.error("Request "+e.method+" failed.",t)},t}();t.BaseLanguageClient=Q}).call(this,o(108))},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._value=e}return e.prototype.asHex=function(){return this._value},e.prototype.equals=function(e){return this.asHex()===e.asHex()},e}(),s=function(e){function t(){return e.call(this,[t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))||this}return i(t,e),t._oneOf=function(e){return e[Math.floor(e.length*Math.random())]},t._randomHex=function(){return t._oneOf(t._chars)},t._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],t._timeHighBits=["8","9","a","b"],t}(r);function a(){return new s}t.empty=new r("00000000-0000-0000-0000-000000000000"),t.v4=a;var l=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function u(e){return l.test(e)}t.isUUID=u,t.parse=function(e){if(!u(e))throw new Error("invalid uuid");return new r(e)},t.generateUuid=function(){return a().asHex()}},function(e,t,o){"use strict";o.r(t),o.d(t,"ToggleTabFocusModeAction",(function(){return l}));var n,i=o(0),r=o(3),s=o(131),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(e){function t(){return e.call(this,{id:t.ID,label:i.a({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:null,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})||this}return a(t,e),t.prototype.run=function(e,t){var o=s.b.getTabFocusMode();s.b.setTabFocusMode(!o)},t.ID="editor.action.toggleTabFocusMode",t}(r.b);Object(r.f)(l)},function(e,t,o){"use strict";o.r(t),o.d(t,"DefinitionActionConfig",(function(){return C})),o.d(t,"DefinitionAction",(function(){return S})),o.d(t,"GoToDefinitionAction",(function(){return w})),o.d(t,"OpenDefinitionToSideAction",(function(){return k})),o.d(t,"PeekDefinitionAction",(function(){return O})),o.d(t,"ImplementationAction",(function(){return R})),o.d(t,"GoToImplementationAction",(function(){return L})),o.d(t,"PeekImplementationAction",(function(){return N})),o.d(t,"TypeDefinitionAction",(function(){return I})),o.d(t,"GoToTypeDefinitionAction",(function(){return D})),o.d(t,"PeekTypeDefinitionAction",(function(){return A}));var n,i=o(0),r=o(58),s=o(39),a=o(15),l=o(36),u=o(2),c=o(3),h=o(164),d=o(99),g=o(56),p=o(113),f=o(12),m=o(142),_=o(5),y=o(129),v=o(45),b=o(17),E=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),C=function(e,t,o,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===o&&(o=!0),void 0===n&&(n=!0),this.openToSide=e,this.openInPeek=t,this.filterCurrent=o,this.showMessage=n},S=function(e){function t(t,o){var n=e.call(this,o)||this;return n._configuration=t,n}return E(t,e),t.prototype.run=function(e,t){var o=this,n=e.get(v.a),i=e.get(l.a),r=e.get(y.a),s=t.getModel(),a=t.getPosition(),c=this._getDeclarationsAtPosition(s,a).then((function(e){if(!s.isDisposed()&&t.getModel()===s){for(var n=-1,r=[],l=0;l1&&i.a("meta.title"," – {0} definitions",e.references.length)},t.prototype._onResult=function(e,t,o){var n=this,i=o.getAriaMessage();if(Object(r.a)(i),this._configuration.openInPeek)this._openInPeek(e,t,o);else{var s=o.nearestReference(t.getModel().uri,t.getPosition());this._openReference(t,e,s,this._configuration.openToSide).then((function(t){t&&o.references.length>1?n._openInPeek(e,t,o):o.dispose()}))}},t.prototype._openReference=function(e,t,o,n){var i=o.uri,r=o.range;return t.openCodeEditor({resource:i,options:{selection:u.a.collapseToStart(r),revealIfOpened:!0,revealInCenterIfOutsideViewport:!0}},e,n)},t.prototype._openInPeek=function(e,t,o){var n=this,i=d.a.get(t);i?i.toggleWidget(t.getSelection(),Object(b.i)((function(e){return Promise.resolve(o)})),{getMetaTitle:function(e){return n._getMetaTitle(e)},onGoto:function(o){return i.closeWidget(),n._openReference(t,e,o,!1)}}):o.dispose()},t}(c.b),T=a.f?2118:70,w=function(e){function t(){return e.call(this,new C,{id:t.ID,label:i.a("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:f.d.and(_.a.hasDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:T,weight:100},menuOpts:{group:"navigation",order:1.1}})||this}return E(t,e),t.ID="editor.action.goToDeclaration",t}(S),k=function(e){function t(){return e.call(this,new C(!0),{id:t.ID,label:i.a("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:f.d.and(_.a.hasDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:Object(s.a)(2089,T),weight:100}})||this}return E(t,e),t.ID="editor.action.openDeclarationToTheSide",t}(S),O=function(e){function t(){return e.call(this,new C(void 0,!0,!1),{id:"editor.action.previewDeclaration",label:i.a("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:f.d.and(_.a.hasDefinitionProvider,p.a.notInPeekEditor,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menuOpts:{group:"navigation",order:1.2}})||this}return E(t,e),t}(S),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return Object(h.b)(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?i.a("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):i.a("goToImplementation.generic.noResults","No implementation found")},t.prototype._getMetaTitle=function(e){return e.references.length>1&&i.a("meta.implementations.title"," – {0} implementations",e.references.length)},t}(S),L=function(e){function t(){return e.call(this,new C,{id:t.ID,label:i.a("actions.goToImplementation.label","Go to Implementation"),alias:"Go to Implementation",precondition:f.d.and(_.a.hasImplementationProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:2118,weight:100}})||this}return E(t,e),t.ID="editor.action.goToImplementation",t}(R),N=function(e){function t(){return e.call(this,new C(!1,!0,!1),{id:t.ID,label:i.a("actions.peekImplementation.label","Peek Implementation"),alias:"Peek Implementation",precondition:f.d.and(_.a.hasImplementationProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:3142,weight:100}})||this}return E(t,e),t.ID="editor.action.peekImplementation",t}(R),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return Object(h.c)(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?i.a("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):i.a("goToTypeDefinition.generic.noResults","No type definition found")},t.prototype._getMetaTitle=function(e){return e.references.length>1&&i.a("meta.typeDefinitions.title"," – {0} type definitions",e.references.length)},t}(S),D=function(e){function t(){return e.call(this,new C,{id:t.ID,label:i.a("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:f.d.and(_.a.hasTypeDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:0,weight:100},menuOpts:{group:"navigation",order:1.4}})||this}return E(t,e),t.ID="editor.action.goToTypeDefinition",t}(I),A=function(e){function t(){return e.call(this,new C(!1,!0,!1),{id:t.ID,label:i.a("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:f.d.and(_.a.hasTypeDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:0,weight:100}})||this}return E(t,e),t.ID="editor.action.peekTypeDefinition",t}(I);Object(c.f)(w),Object(c.f)(k),Object(c.f)(O),Object(c.f)(L),Object(c.f)(N),Object(c.f)(D),Object(c.f)(A)},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}));var n=function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.nextId=function(){return this._prefix+ ++this._lastId},e}(),i=new n("id#")},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("IWorkspaceEditService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return f}));var n,i=o(30),r=o(22),s=o(37),a=o(12),l=o(36),u=o(140),c=o(19),h=o(45),d=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),g=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},p=function(e,t){return function(o,n){t(o,n,e)}},f=function(e){function t(t,o,n,i,r,s,a,l,u){var c=e.call(this,t,n.getRawConfiguration(),{},i,r,s,a,l,u)||this;return c._parentEditor=n,c._overwriteOptions=o,e.prototype.updateOptions.call(c,c._overwriteOptions),c._register(n.onDidChangeConfiguration((function(e){return c._onParentConfigurationChanged(e)}))),c}return d(t,e),t.prototype.getParentEditor=function(){return this._parentEditor},t.prototype._onParentConfigurationChanged=function(t){e.prototype.updateOptions.call(this,this._parentEditor.getRawConfiguration()),e.prototype.updateOptions.call(this,this._overwriteOptions)},t.prototype.updateOptions=function(t){i.g(this._overwriteOptions,t,!0),e.prototype.updateOptions.call(this,this._overwriteOptions)},t=g([p(3,r.a),p(4,l.a),p(5,s.b),p(6,a.e),p(7,c.c),p(8,h.a)],t)}(u.a)},function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"b",(function(){return s}));var n=o(92),i=function(e,t){this.index=e,this.remainder=t},r=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=Object(n.b)(e);var o=this.values,i=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(o.length+r),this.values.set(o.subarray(0,e),0),this.values.set(o.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=Object(n.b)(e),t=Object(n.b)(t),this.values[e]!==t&&(this.values[e]=t,e-1=o.length)return!1;var r=o.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(o.length-t),this.values.set(o.subarray(0,e),0),this.values.set(o.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=Object(n.b)(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var o=t;o<=e;o++)this.prefixSum[o]=this.prefixSum[o-1]+this.values[o];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,o,n,r=0,s=this.values.length-1;r<=s;)if(t=r+(s-r)/2|0,e<(n=(o=this.prefixSum[t])-this.values[t]))s=t-1;else{if(!(e>=o))break;r=t+1}return new i(t,e-n)},e}(),s=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new r(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=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var o=0;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},g=function(e,t){return function(o,n){t(o,n,e)}},p=function(){function e(e,t,o){void 0===o&&(o=i.b),this._editor=e,this._modeService=t,this._openerService=o,this._onDidRenderCodeBlock=new c.a,this.onDidRenderCodeBlock=this._onDidRenderCodeBlock.event}return e.prototype.getOptions=function(e){var t=this;return{codeBlockRenderer:function(e,o){var n=e?t._modeService.getModeIdForLanguageName(e):t._editor.getModel().getLanguageIdentifier().language;return t._modeService.getOrCreateMode(n).then((function(e){return Object(l.b)(o,n)})).then((function(e){return''+e+""}))},codeBlockRenderCallback:function(){return t._onDidRenderCodeBlock.fire()},actionHandler:{callback:function(e){t._openerService.open(s.a.parse(e)).then(void 0,a.e)},disposeables:e}}},e.prototype.render=function(e){var t=[];return{element:e?Object(n.b)(e,this.getOptions(t)):document.createElement("span"),dispose:function(){return Object(h.d)(t)}}},e=d([g(1,r.a),g(2,Object(u.d)(i.a))],e)}()},function(e,t,o){"use strict";o(474);var n,i,r=o(0),s=o(10),a=o(15),l=o(21),u=o(13),c=o(97),h=function(){function e(e){this.modelProvider=Object(l.e)(e.getModel)?e:{getModel:function(){return e}}}return e.prototype.getId=function(e,t){if(!t)return null;var o=this.modelProvider.getModel();return o===t?"__root__":o.dataSource.getId(t)},e.prototype.hasChildren=function(e,t){var o=this.modelProvider.getModel();return o&&o===t&&o.entries.length>0},e.prototype.getChildren=function(e,t){var o=this.modelProvider.getModel();return s.b.as(o===t?o.entries:[])},e.prototype.getParent=function(e,t){return s.b.as(null)},e}(),d=function(){function e(e){this.modelProvider=e}return e.prototype.getAriaLabel=function(e,t){var o=this.modelProvider.getModel();return o.accessibilityProvider&&o.accessibilityProvider.getAriaLabel(t)},e.prototype.getPosInSet=function(e,t){var o=this.modelProvider.getModel();return String(o.entries.indexOf(t)+1)},e.prototype.getSetSize=function(){var e=this.modelProvider.getModel();return String(e.entries.length)},e}(),g=function(){function e(e){this.modelProvider=e}return e.prototype.isVisible=function(e,t){var o=this.modelProvider.getModel();return!o.filter||o.filter.isVisible(t)},e}(),p=function(){function e(e,t){this.modelProvider=e,this.styles=t}return e.prototype.updateStyles=function(e){this.styles=e},e.prototype.getHeight=function(e,t){return this.modelProvider.getModel().renderer.getHeight(t)},e.prototype.getTemplateId=function(e,t){return this.modelProvider.getModel().renderer.getTemplateId(t)},e.prototype.renderTemplate=function(e,t,o){return this.modelProvider.getModel().renderer.renderTemplate(t,o,this.styles)},e.prototype.renderElement=function(e,t,o,n){this.modelProvider.getModel().renderer.renderElement(t,o,n,this.styles)},e.prototype.disposeTemplate=function(e,t,o){this.modelProvider.getModel().renderer.disposeTemplate(t,o)},e}(),f=o(34),m=o(162),_=o(210),y=(o(475),o(1)),v=o(6),b=o(14),E=o(30),C=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),S={progressBarBackground:b.a.fromHex("#0E70C0")},T=function(e){function t(t,o){var n=e.call(this)||this;return n.options=o||Object.create(null),Object(E.g)(n.options,S,!1),n.workedVal=0,n.progressBarBackground=n.options.progressBarBackground,n.create(t),n}return C(t,e),t.prototype.create=function(e){var t=this;Object(f.a)(e).div({class:"monaco-progress-container"},(function(e){t.element=e.clone(),e.div({class:"progress-bit"}).on([y.d.ANIMATION_START,y.d.ANIMATION_END,y.d.ANIMATION_ITERATION],(function(e){switch(e.type){case y.d.ANIMATION_ITERATION:t.animationStopToken&&t.animationStopToken(null)}}),t.toDispose),t.bit=e.getHTMLElement()})),this.applyStyles()},t.prototype.off=function(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.removeClass("active"),this.element.removeClass("infinite"),this.element.removeClass("discrete"),this.workedVal=0,this.totalWork=void 0},t.prototype.stop=function(){return this.doDone(!1)},t.prototype.doDone=function(e){var t=this;return this.element.addClass("done"),this.element.hasClass("infinite")?(this.bit.style.opacity="0",e?s.b.timeout(200).then((function(){return t.off()})):this.off()):(this.bit.style.width="inherit",e?s.b.timeout(200).then((function(){return t.off()})):this.off()),this},t.prototype.hide=function(){this.element.hide()},t.prototype.style=function(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()},t.prototype.applyStyles=function(){if(this.bit){var e=this.progressBarBackground?this.progressBarBackground.toString():null;this.bit.style.backgroundColor=e}},t}(v.a),w=o(51),k=o(75),O=o(42),R=o(41),L=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return L(t,e),t.prototype.onContextMenu=function(t,o,n){return a.d?this.onLeftClick(t,o,n):e.prototype.onContextMenu.call(this,t,o,n)},t}(k.c);!function(e){e[e.ELEMENT_SELECTED=0]="ELEMENT_SELECTED",e[e.FOCUS_LOST=1]="FOCUS_LOST",e[e.CANCELED=2]="CANCELED"}(i||(i={}));var I={background:b.a.fromHex("#1E1E1E"),foreground:b.a.fromHex("#CCCCCC"),pickerGroupForeground:b.a.fromHex("#0097FB"),pickerGroupBorder:b.a.fromHex("#3F3F46"),widgetShadow:b.a.fromHex("#000000"),progressBarBackground:b.a.fromHex("#0E70C0")},D=r.a("quickOpenAriaLabel","Quick picker. Type to narrow down results."),A=function(e){function t(t,o,n){var i=e.call(this)||this;return i.isDisposed=!1,i.container=t,i.callbacks=o,i.options=n,i.styles=n||Object.create(null),Object(E.g)(i.styles,I,!1),i.model=null,i}return L(t,e),t.prototype.getModel=function(){return this.model},t.prototype.create=function(){var e=this;return this.builder=Object(f.a)().div((function(t){t.on(y.d.KEY_DOWN,(function(t){var o=new w.a(t);if(9===o.keyCode)y.c.stop(t,!0),e.hide(i.CANCELED);else if(2===o.keyCode&&!o.altKey&&!o.ctrlKey&&!o.metaKey){var n=t.currentTarget.querySelectorAll("input, .monaco-tree, .monaco-tree-row.focused .action-label.icon");o.shiftKey&&o.target===n[0]?(y.c.stop(t,!0),n[n.length-1].focus()):o.shiftKey||o.target!==n[n.length-1]||(y.c.stop(t,!0),n[0].focus())}})).on(y.d.CONTEXT_MENU,(function(e){return y.c.stop(e,!0)})).on(y.d.FOCUS,(function(t){return e.gainingFocus()}),null,!0).on(y.d.BLUR,(function(t){return e.loosingFocus(t)}),null,!0),e.progressBar=e._register(new T(t.clone(),{progressBarBackground:e.styles.progressBarBackground})),e.progressBar.hide(),t.div({class:"quick-open-input"},(function(t){e.inputContainer=t,e.inputBox=e._register(new m.b(t.getHTMLElement(),null,{placeholder:e.options.inputPlaceHolder||"",ariaLabel:D,inputBackground:e.styles.inputBackground,inputForeground:e.styles.inputForeground,inputBorder:e.styles.inputBorder,inputValidationInfoBackground:e.styles.inputValidationInfoBackground,inputValidationInfoBorder:e.styles.inputValidationInfoBorder,inputValidationWarningBackground:e.styles.inputValidationWarningBackground,inputValidationWarningBorder:e.styles.inputValidationWarningBorder,inputValidationErrorBackground:e.styles.inputValidationErrorBackground,inputValidationErrorBorder:e.styles.inputValidationErrorBorder})),e.inputElement=e.inputBox.inputElement,e.inputElement.setAttribute("role","combobox"),e.inputElement.setAttribute("aria-haspopup","false"),e.inputElement.setAttribute("aria-autocomplete","list"),y.g(e.inputBox.inputElement,y.d.KEY_DOWN,(function(t){var o=new w.a(t),n=e.shouldOpenInBackground(o);if(2!==o.keyCode)if(18===o.keyCode||16===o.keyCode||12===o.keyCode||11===o.keyCode)y.c.stop(t,!0),e.navigateInTree(o.keyCode,o.shiftKey),e.inputBox.inputElement.selectionStart===e.inputBox.inputElement.selectionEnd&&(e.inputBox.inputElement.selectionStart=e.inputBox.value.length);else if(3===o.keyCode||n){y.c.stop(t,!0);var i=e.tree.getFocus();i&&e.elementSelected(i,t,n?c.a.OPEN_IN_BACKGROUND:c.a.OPEN)}})),y.g(e.inputBox.inputElement,y.d.INPUT,(function(t){e.onType()}))})),e.resultCount=t.div({class:"quick-open-result-count","aria-live":"polite"}).clone(),e.treeContainer=t.div({class:"quick-open-tree"},(function(t){var o=e.options.treeCreator||function(e,t,o){return new _.a(e,t,o)};e.tree=e._register(o(t.getHTMLElement(),{dataSource:new h(e),controller:new N({clickBehavior:k.a.ON_MOUSE_UP,keyboardSupport:e.options.keyboardSupport}),renderer:e.renderer=new p(e,e.styles),filter:new g(e),accessibilityProvider:new d(e)},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:O.b.Visible,horizontalScrollMode:O.b.Hidden,ariaLabel:r.a("treeAriaLabel","Quick Picker"),keyboardSupport:e.options.keyboardSupport,preventRootFocus:!1})),e.treeElement=e.tree.getHTMLElement(),e._register(e.tree.onDidChangeFocus((function(t){e.elementFocused(t.focus,t)}))),e._register(e.tree.onDidChangeSelection((function(t){if(t.selection&&t.selection.length>0){var o=t.payload&&t.payload.originalEvent instanceof R.b?t.payload.originalEvent:void 0,n=!!o&&e.shouldOpenInBackground(o);e.elementSelected(t.selection[0],t,n?c.a.OPEN_IN_BACKGROUND:c.a.OPEN)}})))})).on(y.d.KEY_DOWN,(function(t){var o=new w.a(t);e.quickNavigateConfiguration&&(18!==o.keyCode&&16!==o.keyCode&&12!==o.keyCode&&11!==o.keyCode||(y.c.stop(t,!0),e.navigateInTree(o.keyCode)))})).on(y.d.KEY_UP,(function(t){var o=new w.a(t),n=o.keyCode;if(e.quickNavigateConfiguration){var i=e.quickNavigateConfiguration.keybindings;if(3===n||i.some((function(e){var t=e.getParts(),i=t[0];return!t[1]&&(i.shiftKey&&4===n?!(o.ctrlKey||o.altKey||o.metaKey):!(!i.altKey||6!==n)||(!(!i.ctrlKey||5!==n)||!(!i.metaKey||57!==n)))}))){var r=e.tree.getFocus();r&&e.elementSelected(r,t)}}})).clone()})).addClass("monaco-quick-open-widget").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions),this.applyStyles(),y.g(this.treeContainer.getHTMLElement(),y.d.KEY_DOWN,(function(t){var o=new w.a(t);e.quickNavigateConfiguration||18!==o.keyCode&&16!==o.keyCode&&12!==o.keyCode&&11!==o.keyCode||(y.c.stop(t,!0),e.navigateInTree(o.keyCode,o.shiftKey),e.treeElement.focus())})),this.builder.getHTMLElement()},t.prototype.style=function(e){this.styles=e,this.applyStyles()},t.prototype.applyStyles=function(){if(this.builder){var e=this.styles.foreground?this.styles.foreground.toString():null,t=this.styles.background?this.styles.background.toString():null,o=this.styles.borderColor?this.styles.borderColor.toString():null,n=this.styles.widgetShadow?this.styles.widgetShadow.toString():null;this.builder.style("color",e),this.builder.style("background-color",t),this.builder.style("border-color",o),this.builder.style("border-width",o?"1px":null),this.builder.style("border-style",o?"solid":null),this.builder.style("box-shadow",n?"0 5px 8px "+n:null)}this.progressBar&&this.progressBar.style({progressBarBackground:this.styles.progressBarBackground}),this.inputBox&&this.inputBox.style({inputBackground:this.styles.inputBackground,inputForeground:this.styles.inputForeground,inputBorder:this.styles.inputBorder,inputValidationInfoBackground:this.styles.inputValidationInfoBackground,inputValidationInfoBorder:this.styles.inputValidationInfoBorder,inputValidationWarningBackground:this.styles.inputValidationWarningBackground,inputValidationWarningBorder:this.styles.inputValidationWarningBorder,inputValidationErrorBackground:this.styles.inputValidationErrorBackground,inputValidationErrorBorder:this.styles.inputValidationErrorBorder}),this.tree&&!this.options.treeCreator&&this.tree.style(this.styles),this.renderer&&this.renderer.updateStyles(this.styles)},t.prototype.shouldOpenInBackground=function(e){if(e instanceof w.a){if(17!==e.keyCode)return!1;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;var t=this.inputBox.inputElement;return t.selectionEnd===this.inputBox.value.length&&t.selectionStart===t.selectionEnd}return e.middleButton},t.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},t.prototype.navigateInTree=function(e,t){var o=this.tree.getInput(),n=o?o.entries:[],i=this.tree.getFocus();switch(e){case 18:this.tree.focusNext();break;case 16:this.tree.focusPrevious();break;case 12:this.tree.focusNextPage();break;case 11:this.tree.focusPreviousPage();break;case 2:t?this.tree.focusPrevious():this.tree.focusNext()}var r=this.tree.getFocus();n.length>1&&i===r&&(16===e||2===e&&t?this.tree.focusLast():(18===e||2===e&&!t)&&this.tree.focusFirst()),(r=this.tree.getFocus())&&this.tree.reveal(r).done(null,u.e)},t.prototype.elementFocused=function(e,t){if(e&&this.isVisible()){this.inputElement.setAttribute("aria-activedescendant",this.treeElement.getAttribute("aria-activedescendant"));var o={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};this.model.runner.run(e,c.a.PREVIEW,o)}},t.prototype.elementSelected=function(e,t,o){var n=!0;if(this.isVisible()){var r=o||c.a.OPEN,s={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};n=this.model.runner.run(e,r,s)}n&&this.hide(i.ELEMENT_SELECTED)},t.prototype.extractKeyMods=function(e){return{ctrlCmd:e&&(e.ctrlKey||e.metaKey||e.payload&&e.payload.originalEvent&&(e.payload.originalEvent.ctrlKey||e.payload.originalEvent.metaKey)),alt:e&&(e.altKey||e.payload&&e.payload.originalEvent&&e.payload.originalEvent.altKey)}},t.prototype.show=function(e,t){this.visible=!0,this.isLoosingFocus=!1,this.quickNavigateConfiguration=t?t.quickNavigateConfiguration:void 0,this.quickNavigateConfiguration?(this.inputContainer.hide(),this.builder.show(),this.tree.domFocus()):(this.inputContainer.show(),this.builder.show(),this.inputBox.focus()),this.helpText&&(this.quickNavigateConfiguration||l.h(e)?this.helpText.hide():this.helpText.show()),l.h(e)?this.doShowWithPrefix(e):this.doShowWithInput(e,t&&t.autoFocus?t.autoFocus:{}),t&&t.inputSelection&&!this.quickNavigateConfiguration&&this.inputBox.select(t.inputSelection),this.callbacks.onShow&&this.callbacks.onShow()},t.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},t.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},t.prototype.setInputAndLayout=function(e,t){var o=this;this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.setInput(null).then((function(){return o.model=e,o.inputElement.setAttribute("aria-haspopup",String(e&&e.entries&&e.entries.length>0)),o.tree.setInput(e)})).done((function(){o.tree.layout();var n=e?e.entries.filter((function(t){return o.isElementVisible(e,t)})):[];o.updateResultCount(n.length),n.length&&o.autoFocus(e,n,t)}),u.e)},t.prototype.isElementVisible=function(e,t){return!e.filter||e.filter.isVisible(t)},t.prototype.autoFocus=function(e,t,o){if(void 0===o&&(o={}),o.autoFocusPrefixMatch){for(var n=void 0,i=void 0,r=o.autoFocusPrefixMatch,s=r.toLowerCase(),a=0;ao.autoFocusIndex&&(this.tree.focusNth(o.autoFocusIndex),this.tree.reveal(this.tree.getFocus()).done(null,u.e)):o.autoFocusSecondEntry?t.length>1&&this.tree.focusNth(1):o.autoFocusLastEntry&&t.length>1&&this.tree.focusLast()},t.prototype.getHeight=function(e){var o=this,n=e.renderer;if(!e){var i=n.getHeight(null);return this.options.minItemsToShow?this.options.minItemsToShow*i:0}var r,s=0;this.layoutDimensions&&this.layoutDimensions.height&&(r=.4*(this.layoutDimensions.height-50)),(!r||r>t.MAX_ITEMS_HEIGHT)&&(r=t.MAX_ITEMS_HEIGHT);for(var a=e.entries.filter((function(t){return o.isElementVisible(e,t)})),l=this.options.maxItemsToShow||a.length,u=0;u=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},j=function(e,t){return function(o,n){t(o,n,e)}},G=function(){function e(e,t){this.themeService=t,this.editor=e}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.widget&&(this.widget.destroy(),this.widget=null)},e.prototype.run=function(e){var t=this;this.widget&&(this.widget.destroy(),this.widget=null);var o=function(e){t.clearDecorations(),e&&t.lastKnownEditorSelection&&(t.editor.setSelection(t.lastKnownEditorSelection),t.editor.revealRangeInCenterIfOutsideViewport(t.lastKnownEditorSelection,0)),t.lastKnownEditorSelection=null,t.editor.focus()};this.widget=new B(this.editor,(function(){return o(!1)}),(function(){return o(!0)}),(function(o){t.widget.setInput(e.getModel(o),e.getAutoFocus(o))}),{inputAriaLabel:e.inputAriaLabel},this.themeService),this.lastKnownEditorSelection||(this.lastKnownEditorSelection=this.editor.getSelection()),this.widget.show("")},e.prototype.decorateLine=function(t,o){var n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId),this.rangeHighlightDecorationId=null);var i=[{range:t,options:e._RANGE_HIGHLIGHT_DECORATION}],r=o.deltaDecorations(n,i);this.rangeHighlightDecorationId=r[0]},e.prototype.clearDecorations=function(){this.rangeHighlightDecorationId&&(this.editor.deltaDecorations([this.rangeHighlightDecorationId],[]),this.rangeHighlightDecorationId=null)},e.ID="editor.controller.quickOpenController",e._RANGE_HIGHLIGHT_DECORATION=U.a.register({className:"rangeHighlight",isWholeLine:!0}),e=W([j(1,H.c)],e)}(),z=function(e){function t(t,o){var n=e.call(this,o)||this;return n._inputAriaLabel=t,n}return V(t,e),t.prototype.getController=function(e){return G.get(e)},t.prototype._show=function(e,t){e.run({inputAriaLabel:this._inputAriaLabel,getModel:function(e){return t.getModel(e)},getAutoFocus:function(e){return t.getAutoFocus(e)}})},t}(F.b);Object(F.h)(G)},function(e,t,o){"use strict";o(440);var n=o(0),i=o(24),r=o(1),s=o(144),a=o(58),l=o(74),u=o(203),c=o(4),h=o(59),d=o(14),g=o(30),p=o(112),f=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=10),this._initialize(e),this._limit=t,this._onChange()}return e.prototype.add=function(e){this._history.delete(e),this._history.add(e),this._onChange()},e.prototype.next=function(){return this._navigator.next()},e.prototype.previous=function(){return this._navigator.previous()},e.prototype.current=function(){return this._navigator.current()},e.prototype.parent=function(){return null},e.prototype.first=function(){return this._navigator.first()},e.prototype.last=function(){return this._navigator.last()},e.prototype.has=function(e){return this._history.has(e)},e.prototype._onChange=function(){this._reduceToLimit(),this._navigator=new p.b(this._elements,0,this._elements.length,this._elements.length)},e.prototype._reduceToLimit=function(){var e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))},e.prototype._initialize=function(e){this._history=new Set;for(var t=0,o=e;t0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),u=function(){function e(e,t,o){void 0===o&&(o=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=o,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,o,n,i){var r=this.ComputeDiffRecursive(e,t,o,n,[!1]);return i?this.ShiftChanges(r):r},e.prototype.ComputeDiffRecursive=function(e,t,o,i,r){for(r[0]=!1;e<=t&&o<=i&&this.ElementsAreEqual(e,o);)e++,o++;for(;t>=e&&i>=o&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||o>i){var a=void 0;return o<=i?(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new n(e,0,o,i-o+1)]):e<=t?(s.Assert(o===i+1,"modifiedStart should only be one more than modifiedEnd"),a=[new n(e,t-e+1,o,0)]):(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s.Assert(o===i+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}var l=[0],u=[0],c=this.ComputeRecursionPoint(e,t,o,i,l,u,r),h=l[0],d=u[0];if(null!==c)return c;if(!r[0]){var g=this.ComputeDiffRecursive(e,h,o,d,r),p=[];return p=r[0]?[new n(h+1,t-(h+1)+1,d+1,i-(d+1)+1)]:this.ComputeDiffRecursive(h+1,t,d+1,i,r),this.ConcatenateChanges(g,p)}return[new n(e,t-e+1,o,i-o+1)]},e.prototype.WALKTRACE=function(e,t,o,i,r,s,a,u,c,h,d,g,p,f,m,_,y,v){var b,E,C=null,S=new l,T=t,w=o,k=p[0]-_[0]-i,O=Number.MIN_VALUE,R=this.m_forwardHistory.length-1;do{(E=k+e)===T||E=0&&(e=(c=this.m_forwardHistory[R])[0],T=1,w=c.length-1)}while(--R>=-1);if(b=S.getReverseChanges(),v[0]){var L=p[0]+1,N=_[0]+1;if(null!==b&&b.length>0){var I=b[b.length-1];L=Math.max(L,I.getOriginalEnd()),N=Math.max(N,I.getModifiedEnd())}C=[new n(L,g-L+1,N,m-N+1)]}else{S=new l,T=s,w=a,k=p[0]-_[0]-u,O=Number.MAX_VALUE,R=y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(E=k+r)===T||E=h[E+1]?(f=(d=h[E+1]-1)-k-u,d>O&&S.MarkNextChange(),O=d+1,S.AddOriginalElement(d+1,f+1),k=E+1-r):(f=(d=h[E-1])-k-u,d>O&&S.MarkNextChange(),O=d,S.AddModifiedElement(d+1,f+1),k=E-1-r),R>=0&&(r=(h=this.m_reverseHistory[R])[0],T=1,w=h.length-1)}while(--R>=-1);C=S.getChanges()}return this.ConcatenateChanges(b,C)},e.prototype.ComputeRecursionPoint=function(e,t,o,i,r,s,l){var u,c,h,d=0,g=0,p=0,f=0;e--,o--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var m,_,y=t-e+(i-o),v=y+1,b=new Array(v),E=new Array(v),C=i-o,S=t-e,T=e-o,w=t-i,k=(S-C)%2==0;for(b[C]=e,E[S]=t,l[0]=!1,h=1;h<=y/2+1;h++){var O=0,R=0;for(d=this.ClipDiagonalBound(C-h,h,C,v),g=this.ClipDiagonalBound(C+h,h,C,v),m=d;m<=g;m+=2){for(c=(u=m===d||mO+R&&(O=u,R=c),!k&&Math.abs(m-S)<=h-1&&u>=E[m])return r[0]=u,s[0]=c,_<=E[m]&&h<=1448?this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l):null}var L=(O-e+(R-o)-h)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(O,this.OriginalSequence,L))return l[0]=!0,r[0]=O,s[0]=R,L>0&&h<=1448?this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l):[new n(++e,t-e+1,++o,i-o+1)];for(p=this.ClipDiagonalBound(S-h,h,S,v),f=this.ClipDiagonalBound(S+h,h,S,v),m=p;m<=f;m+=2){for(c=(u=m===p||m=E[m+1]?E[m+1]-1:E[m-1])-(m-S)-w,_=u;u>e&&c>o&&this.ElementsAreEqual(u,c);)u--,c--;if(E[m]=u,k&&Math.abs(m-C)<=h&&u<=b[m])return r[0]=u,s[0]=c,_>=b[m]&&h<=1448?this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l):null}if(h<=1447){var N=new Array(g-d+2);N[0]=C-d+1,a.Copy(b,d,N,1,g-d+1),this.m_forwardHistory.push(N),(N=new Array(f-p+2))[0]=S-p+1,a.Copy(E,p,N,1,f-p+1),this.m_reverseHistory.push(N)}}return this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l)},e.prototype.ShiftChanges=function(e){var t;do{t=!1;for(var o=0;o0,a=n.modifiedLength>0;n.originalStart+n.originalLength=0;o--){n=e[o],i=0,r=0;if(o>0){var c=e[o-1];c.originalLength>0&&(i=c.originalStart+c.originalLength),c.modifiedLength>0&&(r=c.modifiedStart+c.modifiedLength)}s=n.originalLength>0,a=n.modifiedLength>0;for(var h=0,d=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),g=1;;g++){var p=n.originalStart-g,f=n.modifiedStart-g;if(pd&&(d=m,h=g)}n.originalStart-=h,n.modifiedStart-=h}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 o=e+t;if(this._OriginalIsBoundary(o-1)||this._OriginalIsBoundary(o))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 o=e+t;if(this._ModifiedIsBoundary(o-1)||this._ModifiedIsBoundary(o))return!0}return!1},e.prototype._boundaryScore=function(e,t,o,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(o,n)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var o=[],n=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],o)?(n=new Array(e.length+t.length-1),a.Copy(e,0,n,0,e.length-1),n[e.length-1]=o[0],a.Copy(t,1,n,e.length,t.length-1),n):(n=new Array(e.length+t.length),a.Copy(e,0,n,0,e.length),a.Copy(t,0,n,e.length,t.length),n)},e.prototype.ChangesOverlap=function(e,t,o){if(s.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),s.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var i=e.originalStart,r=e.originalLength,a=e.modifiedStart,l=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(l=t.modifiedStart+t.modifiedLength-e.modifiedStart),o[0]=new n(i,r,a,l),!0}return o[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,o,n){if(e>=0&&e1,p=void 0;if(p=Object(l.c)(u.uri,e,!a.c)?"":Object(i.h)(Object(r.ltrim)(e.path.substr(u.uri.path.length),i.i),!0),c){var f=u&&u.name?u.name:Object(i.a)(u.uri.fsPath);p=p?f+" • "+p:f}return p}if(e.scheme!==s.a.file&&e.scheme!==s.a.untitled)return e.with({query:null,fragment:null}).toString(!0);if(h(e.fsPath))return Object(i.h)(d(e.fsPath),!0);var m=Object(i.h)(e.fsPath,!0);return!a.g&&t&&(m=function(e,t){if(a.g||!e||!t)return e;var o=g.original===t?g.normalized:void 0;o||(o=""+Object(r.rtrim)(t,i.i)+i.i,g={original:t,normalized:o});(a.c?Object(r.startsWith)(e,o):Object(r.startsWithIgnoreCase)(e,o))&&(e="~/"+e.substr(o.length));return e}(m,t.userHome)),m}function c(e){if(!e)return null;"string"==typeof e&&(e=n.a.file(e));var t=Object(i.a)(e.path)||(e.scheme===s.a.file?e.fsPath:e.path);return h(t)?d(t):t}function h(e){return a.g&&e&&":"===e[1]}function d(e){return h(e)?e.charAt(0).toUpperCase()+e.slice(1):e}var g=Object.create(null)},function(e,t,o){"use strict";function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0}),n(o(185)),n(o(121)),n(o(518)),n(o(519)),n(o(311)),n(o(312)),n(o(313)),n(o(314)),n(o(532)),n(o(315))},function(e,t,o){(function(e){function o(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===o(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===o(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===o(e)},t.isError=function(e){return"[object Error]"===o(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,o(120).Buffer)},function(e,t,o){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:o(340),e.exports={Promise:n}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.toString;function i(e){return"[object String]"===n.call(e)}function r(e){return Array.isArray(e)}t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"[object Number]"===n.call(e)},t.error=function(e){return"[object Error]"===n.call(e)},t.func=function(e){return"[object Function]"===n.call(e)},t.array=r,t.stringArray=function(e){return r(e)&&e.every((function(e){return i(e)}))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.create=function(e){return{dispose:e}}}(t.Disposable||(t.Disposable={})),function(e){var t={dispose:function(){}};e.None=function(){return t}}(t.Event||(t.Event={}));var n=function(){function e(){}return e.prototype.add=function(e,t,o){var n=this;void 0===t&&(t=null),this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(o)&&o.push({dispose:function(){return n.remove(e,t)}})},e.prototype.remove=function(e,t){if(void 0===t&&(t=null),this._callbacks){for(var o=!1,n=0,i=this._callbacks.length;nn(e))}},function(e,t,o){"use strict";o.r(t);var n=o(14);function i(e,t){switch(void 0===t&&(t=0),typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?(o=e,n=r(104579,n=t),o.reduce((function(e,t){return i(t,e)}),n)):function(e,t){return t=r(181387,t),Object.keys(e).sort().reduce((function(t,o){return t=s(o,t),i(e[o],t)}),t)}(e,t);case"string":return s(e,t);case"boolean":return function(e,t){return r(e?433:863,t)}(e,t);case"number":return r(e,t);case"undefined":return r(e,937);default:return r(e,617)}var o,n}function r(e,t){return(t<<5)-t+e|0}function s(e,t){t=r(149417,t);for(var o=0,n=e.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e,t){return function(o,n){t(o,n,e)}},v=function(){function e(e,t,o){var n=this;this._editor=e,this._codeEditorService=t,this._configurationService=o,this._globalToDispose=[],this._localToDispose=[],this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes={},this._globalToDispose.push(e.onDidChangeModel((function(e){n._isEnabled=n.isEnabled(),n.onModelChanged()}))),this._globalToDispose.push(e.onDidChangeModelLanguage((function(e){return n.onModelChanged()}))),this._globalToDispose.push(c.d.onDidChange((function(e){return n.onModelChanged()}))),this._globalToDispose.push(e.onDidChangeConfiguration((function(e){var t=n._isEnabled;n._isEnabled=n.isEnabled(),t!==n._isEnabled&&(n._isEnabled?n.onModelChanged():n.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}return e.prototype.isEnabled=function(){var e=this._editor.getModel();if(!e)return!1;var t=e.getLanguageIdentifier(),o=this._configurationService.getValue(t.language);if(o){var n=o.colorDecorators;if(n&&void 0!==n.enable&&!n.enable)return n.enable}return this._editor.getConfiguration().contribInfo.colorDecorators},e.prototype.getId=function(){return e.ID},e.get=function(e){return e.getContribution(this.ID)},e.prototype.dispose=function(){this.stop(),this.removeAllDecorations(),this._globalToDispose=Object(a.d)(this._globalToDispose)},e.prototype.onModelChanged=function(){var t=this;if(this.stop(),this._isEnabled){var o=this._editor.getModel();c.d.has(o)&&(this._localToDispose.push(this._editor.onDidChangeModelContent((function(o){t._timeoutTimer||(t._timeoutTimer=new f.f,t._timeoutTimer.cancelAndSet((function(){t._timeoutTimer=null,t.beginCompute()}),e.RECOMPUTE_TIME))}))),this.beginCompute())}},e.prototype.beginCompute=function(){var e=this;this._computePromise=Object(f.i)((function(t){return Object(d.b)(e._editor.getModel(),t)})),this._computePromise.then((function(t){e.updateDecorations(t),e.updateColorDecorators(t),e._computePromise=null}),m.e)},e.prototype.stop=function(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose=Object(a.d)(this._localToDispose)},e.prototype.updateDecorations=function(e){var t=this,o=e.map((function(e){return{range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:p.a.EMPTY}}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,o),this._colorDatas=new Map,this._decorationsIds.forEach((function(o,n){return t._colorDatas.set(o,e[n])}))},e.prototype.updateColorDecorators=function(e){for(var t=[],o={},r=0;r1){var m=o.getLineContent(f.lineNumber),_=a.firstNonWhitespaceIndex(m),y=-1===_?m.length+1:_+1;if(f.column<=y){var v=i.a.visibleColumnFromColumn2(t,o,f),b=i.a.prevTabStop(v,t.tabSize),E=i.a.columnFromVisibleColumn2(t,o,f.lineNumber,b);p=new r.a(f.lineNumber,E,f.lineNumber,f.column)}else p=new r.a(f.lineNumber,f.column-1,f.lineNumber,f.column)}else{var C=s.a.left(t,o,f.lineNumber,f.column);p=new r.a(C.lineNumber,C.column,f.lineNumber,f.column)}}p.isEmpty()?u[h]=null:(p.startLineNumber!==p.endLineNumber&&(c=!0),u[h]=new n.a(p,""))}return[c,u]},e.cut=function(e,t,o){for(var s=[],a=0,l=o.length;a1?(h=c.lineNumber-1,d=t.getLineMaxColumn(c.lineNumber-1),g=c.lineNumber,p=t.getLineMaxColumn(c.lineNumber)):(h=c.lineNumber,d=1,g=c.lineNumber,p=t.getLineMaxColumn(c.lineNumber));var f=new r.a(h,d,g,p);f.isEmpty()?s[a]=null:s[a]=new n.a(f,"")}else s[a]=null;else s[a]=new n.a(u,"")}return new i.e(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("clipboardService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"c",(function(){return s})),o.d(t,"b",(function(){return a}));var n=o(40),i=o(8);function r(e){return n.a(e.path)||e.authority}function s(e,t,o){return!(e!==t)||!(!e||!t)&&(o?Object(i.equalsIgnoreCase)(e.toString(),t.toString()):e.toString()===t.toString())}function a(e){var t=n.b(e.path);return e.authority&&t&&!n.d(t)?null:e.with({path:t})}},function(e,t,o){"use strict";o.d(t,"b",(function(){return r})),o.d(t,"a",(function(){return s}));var n=o(0),i=function(){function e(e,t,o){void 0===o&&(o=t),this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=o}return e.prototype.toLabel=function(e,t,o,n,i){return null===t&&null===n?null:function(e,t,o,n,i){var r=a(e,t,i);null!==n&&(r+=" ",r+=a(o,n,i));return r}(e,t,o,n,this.modifierLabels[i])},e}(),r=new i({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:n.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),s=new i({ctrlKey:n.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:n.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"});function a(e,t,o){if(null===t)return"";var n=[];return e.ctrlKey&&n.push(o.ctrlKey),e.shiftKey&&n.push(o.shiftKey),e.altKey&&n.push(o.altKey),e.metaKey&&n.push(o.metaKey),n.push(t),n.join(o.separator)}},function(e,t,o){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,o,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var r,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,o)}));case 3:return t.nextTick((function(){e.call(null,o,n)}));case 4:return t.nextTick((function(){e.call(null,o,n,i)}));default:for(r=new Array(a-1),s=0;s=o.length)o.copy(this.buffer,this.index,0,o.length);else{var r=(Math.ceil((this.index+o.length)/a)+1)*a;0===this.index?(this.buffer=new e(r),o.copy(this.buffer,0,0,o.length)):this.buffer=e.concat([this.buffer.slice(0,this.index),o],r)}this.index+=o.length},t.prototype.tryReadHeaders=function(){for(var e=void 0,t=0;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((function(t){var o=t.indexOf(":");if(-1===o)throw new Error("Message header must separate key and value using :");var n=t.substr(0,o),i=t.substr(o+1).trim();e[n]=i}));var o=t+4;return this.buffer=this.buffer.slice(o),this.index=this.index-o,e},t.prototype.tryReadContent=function(e){if(this.index0&&t.doWriteMessage(t.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(a);t.IPCMessageWriter=u;var c=function(t){function o(e,o){void 0===o&&(o="utf8");var n=t.call(this)||this;return n.socket=e,n.queue=[],n.sending=!1,n.encoding=o,n.errorCount=0,n.socket.on("error",(function(e){return n.fireError(e)})),n.socket.on("close",(function(){return n.fireClose()})),n}return i(o,t),o.prototype.write=function(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)},o.prototype.doWriteMessage=function(t){var o=this,n=JSON.stringify(t),i=["Content-Length: ",e.byteLength(n,this.encoding).toString(),"\r\n","\r\n"];try{this.sending=!0,this.socket.write(i.join(""),"ascii",(function(e){e&&o.handleError(e,t);try{o.socket.write(n,o.encoding,(function(e){o.sending=!1,e?o.handleError(e,t):o.errorCount=0,o.queue.length>0&&o.doWriteMessage(o.queue.shift())}))}catch(e){o.handleError(e,t)}}))}catch(e){this.handleError(e,t)}},o.prototype.handleError=function(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)},o}(a);t.SocketMessageWriter=c}).call(this,o(120).Buffer)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(121);t.Disposable=n.Disposable;var i=function(){function e(){this.disposables=[]}return e.prototype.dispose=function(){for(;0!==this.disposables.length;)this.disposables.pop().dispose()},e.prototype.push=function(e){var t=this.disposables;return t.push(e),{dispose:function(){var o=t.indexOf(e);-1!==o&&t.splice(o,1)}}},e}();t.DisposableCollection=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.create=function(e){return{dispose:e}}}(t.Disposable||(t.Disposable={})),function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class n{add(e,t=null,o){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(o)&&o.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(this._callbacks){for(var o=!1,n=0,i=this._callbacks.length;n{let r;return this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t),r={dispose:()=>{this._callbacks.remove(e,t),r.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)}},Array.isArray(o)&&o.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}i._noop=function(){},t.Emitter=i},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","title":"JSON schema for Block definitions files","type":"object","additionalProperties":false,"properties":{"requires":{"description":"Files to be included in the code archive","type":"array","items":{"type":"string"}},"header":{"description":"Code placed at the beginning of generated code","type":"string"},"footer":{"description":"Code placed at the end of generated code","type":"string"},"blocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","definition","template"],"properties":{"id":{"type":"string"},"definition":{"type":["string","array"],"items":{"type":["string","object"],"additionalProperties":false,"required":["id","type","default"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["number","boolean","angle","text"]},"default":{}}}},"template":{"type":"string"}}}}}}')},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=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 o=this,i=new n(e);if(this._first)if(t){var r=this._last;this._last=i,i.prev=r,r.next=i}else{var s=this._first;this._first=i,i.next=s,s.prev=i}else this._first=i,this._last=i;return function(){for(var e=o._first;e instanceof n;e=e.next)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||(o._first=o._first.next,o._first.prev=void 0):(o._last=o._last.prev,o._last.next=void 0):(o._first=void 0,o._last=void 0);break}}},e.prototype.iterator=function(){var e={done:void 0,value:void 0},t=this._first;return{next:function(){return t?(e.done=!1,e.value=t.element,t=t.next):(e.done=!0,e.value=void 0),e}}},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return R}));var n=o(25),i=o(8),r=o(40),s=o(79),a=o(10),l="**",u="/",c="[/\\\\]",h="[^/\\\\]",d=/\//g;function g(e){switch(e){case 0:return"";case 1:return h+"*?";default:return"(?:"+c+"|"+h+"+"+c+"|"+c+h+"+)*?"}}function p(e,t){if(!e)return[];for(var o,n=[],i=!1,r=!1,s="",a=0;a0;o--){var r=e.charCodeAt(o-1);if(47===r||92===r)break}t=e.substr(o)}var s=i.indexOf(t);return-1!==s?n[s]:null};a.basenames=i,a.patterns=n,a.allBasenames=i;var l=e.filter((function(e){return!e.basenames}));return l.push(a),l}},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return c}));o(441);var n,i,r,s=o(34),a=o(1),l=o(6);function u(e,t,o){var n=o.offset+o.size;return o.position===r.Before?t<=e-n?n:t<=o.offset?o.offset-t:Math.max(e-t,0):t<=o.offset?o.offset-t:t<=e-n?n:0}!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(n||(n={})),function(e){e[e.BELOW=0]="BELOW",e[e.ABOVE=1]="ABOVE"}(i||(i={})),function(e){e[e.Before=0]="Before",e[e.After=1]="After"}(r||(r={}));var c=function(){function e(e){var t=this;this.$view=Object(s.a)(".context-view").hide(),this.setContainer(e),this.toDispose=[Object(l.f)((function(){t.setContainer(null)}))],this.toDisposeOnClean=null}return e.prototype.setContainer=function(t){var o=this;this.$container&&(this.$container.getHTMLElement().removeChild(this.$view.getHTMLElement()),this.$container.off(e.BUBBLE_UP_EVENTS),this.$container.off(e.BUBBLE_DOWN_EVENTS,!0),this.$container=null),t&&(this.$container=Object(s.a)(t),this.$view.appendTo(this.$container),this.$container.on(e.BUBBLE_UP_EVENTS,(function(e){o.onDOMEvent(e,document.activeElement,!1)})),this.$container.on(e.BUBBLE_DOWN_EVENTS,(function(e){o.onDOMEvent(e,document.activeElement,!0)}),null,!0))},e.prototype.show=function(e){this.isVisible()&&this.hide(),this.$view.setClass("context-view").empty().style({top:"0px",left:"0px"}).show(),this.toDisposeOnClean=e.render(this.$view.getHTMLElement()),this.delegate=e,this.doLayout()},e.prototype.layout=function(){this.isVisible()&&(!1!==this.delegate.canRelayout?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())},e.prototype.doLayout=function(){var e,t=this.delegate.getAnchor();if(a.C(t)){var o=a.u(t);e={top:o.top,left:o.left,width:o.width,height:o.height}}else{var s=t;e={top:s.y,left:s.x,width:s.width||0,height:s.height||0}}var l,c=this.$view.getTotalSize(),h=this.delegate.anchorPosition||i.BELOW,d=this.delegate.anchorAlignment||n.LEFT,g={offset:e.top,size:e.height,position:h===i.BELOW?r.Before:r.After};l=d===n.LEFT?{offset:e.left,size:0,position:r.Before}:{offset:e.left+e.width,size:0,position:r.After};var p=a.u(this.$container.getHTMLElement()),f=u(window.innerHeight,c.height,g)-p.top,m=u(window.innerWidth,c.width,l)-p.left;this.$view.removeClass("top","bottom","left","right"),this.$view.addClass(h===i.BELOW?"bottom":"top"),this.$view.addClass(d===n.LEFT?"left":"right"),this.$view.style({top:f+"px",left:m+"px",width:"initial"})},e.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),this.$view.hide()},e.prototype.isVisible=function(){return!!this.delegate},e.prototype.onDOMEvent=function(e,t,o){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):o&&!a.B(e.target,this.$container.getHTMLElement())&&this.hide())},e.prototype.dispose=function(){this.hide(),this.toDispose=Object(l.d)(this.toDispose)},e.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],e.BUBBLE_DOWN_EVENTS=["click"],e}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return h})),o.d(t,"a",(function(){return d}));o(448);var n,i=o(1),r=o(125),s=o(40),a=o(165),l=o(6),u=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),c=function(){function e(e){this._element=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{set:function(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{set:function(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this.disposed||e===this._title||(this._title=e,this._title?this._element.title=e:this._element.removeAttribute("title"))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{set:function(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":null)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposed=!0},e}(),h=function(e){function t(t,o){var n=e.call(this)||this;return n.domNode=n._register(new c(i.k(t,i.a(".monaco-icon-label")))),n.labelDescriptionContainer=n._register(new c(i.k(n.domNode.element,i.a(".monaco-icon-label-description-container")))),o&&o.supportHighlights?n.labelNode=n._register(new r.a(i.k(n.labelDescriptionContainer.element,i.a("a.label-name")))):n.labelNode=n._register(new c(i.k(n.labelDescriptionContainer.element,i.a("a.label-name")))),o&&o.supportDescriptionHighlights?n.descriptionNodeFactory=function(){return n._register(new r.a(i.k(n.labelDescriptionContainer.element,i.a("span.label-description"))))}:n.descriptionNodeFactory=function(){return n._register(new c(i.k(n.labelDescriptionContainer.element,i.a("span.label-description"))))},n}return u(t,e),t.prototype.setValue=function(e,t,o){var n=["monaco-icon-label"];o&&(o.extraClasses&&n.push.apply(n,o.extraClasses),o.italic&&n.push("italic")),this.domNode.className=n.join(" "),this.domNode.title=o&&o.title?o.title:"",this.labelNode instanceof r.a?this.labelNode.set(e||"",o?o.matches:void 0):this.labelNode.textContent=e||"",(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof r.a?(this.descriptionNode.set(t||"",o?o.descriptionMatches:void 0),o&&o.descriptionTitle?this.descriptionNode.element.title=o.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=o&&o.descriptionTitle?o.descriptionTitle:"",this.descriptionNode.empty=!t))},t}(l.a),d=function(e){function t(t,o,n,i){var r=e.call(this,t)||this;return r.setFile(o,n,i),r}return u(t,e),t.prototype.setFile=function(e,t,o){var n=s.b(e.fsPath);this.setValue(Object(a.a)(e),n&&"."!==n?Object(a.b)(n,o,t):"",{title:e.fsPath})},t}(h)},function(e,t,o){"use strict";o.d(t,"b",(function(){return a})),o.d(t,"a",(function(){return l}));var n=o(8),i=o(11),r=o(69),s=o(87);function a(e,t){return function(e,t){for(var o='
    ',i=e.split(/\r\n|\r|\n/),r=t.getInitialState(),a=0,l=i.length;a0&&(o+="
    ");var c=t.tokenize2(u,r,0);s.a.convertToEndOffset(c.tokens,u.length);for(var h=new s.a(c.tokens,u).inflate(),d=0,g=0,p=h.getCount();g'+n.escape(u.substring(d,m))+"",d=m}r=c.endState}return o+="
    "}(e,function(e){var t=i.y.get(e);if(t)return t;return{getInitialState:function(){return r.c},tokenize:void 0,tokenize2:function(e,t,o){return Object(r.e)(0,e,t,o)}}}(t))}function l(e,t,o,n,i,r){for(var s="
    ",a=n,l=0,u=0,c=t.getCount();u0;)d+=" ",p--;break;case 60:d+="<";break;case 62:d+=">";break;case 38:d+="&";break;case 0:d+="�";break;case 65279:case 8232:d+="�";break;case 13:d+="​";break;default:d+=String.fromCharCode(g)}}if(s+=''+d+"",h>i||a>=i)break}}return s+="
    "}},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(10),i=function(){function e(e,t,o,n,i,r){this.id=e,this.label=t,this.alias=o,this._precondition=n,this._run=i,this._contextKeyService=r}return e.prototype.isSupported=function(){return this._contextKeyService.contextMatchesRules(this._precondition)},e.prototype.run=function(){if(!this.isSupported())return n.b.as(void 0);var e=this._run();return e||n.b.as(void 0)},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return _}));o(469);var n=o(6),i=o(30),r=o(1),s=o(93),a=o(2),l=o(14),u=o(26),c=o(155),h=o(18),d=new l.a(new l.c(0,122,204)),g={showArrow:!0,showFrame:!0,className:"",frameColor:d,arrowColor:d,keepEditorSelection:!1},p=function(){function e(e,t,o,n,i,r){this.domNode=e,this.afterLineNumber=t,this.afterColumn=o,this.heightInLines=n,this._onDomNodeTop=i,this._onComputedHeight=r}return e.prototype.onDomNodeTop=function(e){this._onDomNodeTop(e)},e.prototype.onComputedHeight=function(e){this._onComputedHeight(e)},e}(),f=function(){function e(e,t){this._id=e,this._domNode=t}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return null},e}(),m=function(){function e(t){this._editor=t,this._ruleName=e._IdGenerator.nextId(),this._decorations=[]}return e.prototype.dispose=function(){this.hide(),r.F(this._ruleName)},Object.defineProperty(e.prototype,"color",{set:function(e){this._color!==e&&(this._color=e,this._updateStyle())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(e){this._height!==e&&(this._height=e,this._updateStyle())},enumerable:!0,configurable:!0}),e.prototype._updateStyle=function(){r.F(this._ruleName),r.n(".monaco-editor "+this._ruleName,"border-style: solid; border-color: transparent; border-bottom-color: "+this._color+"; border-width: "+this._height+"px; bottom: -"+this._height+"px; margin-left: -"+this._height+"px; ")},e.prototype.show=function(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:a.a.fromPositions(e),options:{className:this._ruleName,stickiness:h.h.NeverGrowsWhenTypingAtEdges}}])},e.prototype.hide=function(){this._editor.deltaDecorations(this._decorations,[])},e._IdGenerator=new c.a(".arrow-decoration-"),e}(),_=function(){function e(e,t){void 0===t&&(t={});var o=this;this._positionMarkerId=[],this._disposables=[],this._isShowing=!1,this.editor=e,this.options=i.c(t),i.g(this.options,g,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.push(this.editor.onDidLayoutChange((function(e){var t=o._getWidth(e);o.domNode.style.width=t+"px",o.domNode.style.left=o._getLeft(e)+"px",o._onWidth(t)})))}return e.prototype.dispose=function(){var e=this;Object(n.d)(this._disposables),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((function(t){t.removeZone(e._viewZone.id),e._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[]},e.prototype.create=function(){r.f(this.domNode,"zone-widget"),r.f(this.domNode,this.options.className),this.container=document.createElement("div"),r.f(this.container,"zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new m(this.editor),this._disposables.push(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()},e.prototype.style=function(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()},e.prototype._applyStyles=function(){if(this.container){var e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow){var t=this.options.arrowColor.toString();this._arrow.color=t}},e.prototype._getWidth=function(e){return e.width-e.minimapWidth-e.verticalScrollbarWidth},e.prototype._getLeft=function(e){return e.minimapWidth>0&&0===e.minimapLeft?e.minimapWidth:0},e.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},e.prototype._onViewZoneHeight=function(e){this.domNode.style.height=e+"px";var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px";var o=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(o)),this._resizeSash.layout()},Object.defineProperty(e.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e){var t=this.editor.getModel().getDecorationRange(e);if(t)return t.getStartPosition()}},enumerable:!0,configurable:!0}),e.prototype.show=function(e,t){var o=a.a.isIRange(e)?e:new a.a(e.lineNumber,e.column,e.lineNumber,e.column);this._isShowing=!0,this._showImpl(o,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:o,options:u.a.EMPTY}])},e.prototype.hide=function(){var e=this;this._viewZone&&(this.editor.changeViewZones((function(t){t.removeZone(e._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()},e.prototype._decoratingElementsHeight=function(){var e=this.editor.getConfiguration().lineHeight,t=0;this.options.showArrow&&(t+=2*Math.round(e/3));this.options.showFrame&&(t+=2*Math.round(e/9));return t},e.prototype._showImpl=function(e,t){var o=this,n={lineNumber:e.startLineNumber,column:e.startColumn},i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(i)+"px";var s=document.createElement("div");s.style.overflow="hidden";var a=this.editor.getConfiguration().lineHeight,l=this.editor.getLayoutInfo().height/a*.8;t>=l&&(t=l);var u=0,c=0;if(this.options.showArrow&&(u=Math.round(a/3),this._arrow.height=u,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones((function(e){o._viewZone&&e.removeZone(o._viewZone.id),o._overlayWidget&&(o.editor.removeOverlayWidget(o._overlayWidget),o._overlayWidget=null),o.domNode.style.top="-1000px",o._viewZone=new p(s,n.lineNumber,n.column,t,(function(e){return o._onViewZoneTop(e)}),(function(e){return o._onViewZoneHeight(e)})),o._viewZone.id=e.addZone(o._viewZone),o._overlayWidget=new f("vs.editor.contrib.zoneWidget"+o._viewZone.id,o.domNode),o.editor.addOverlayWidget(o._overlayWidget)})),this.options.showFrame){var h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}var d=t*a-this._decoratingElementsHeight();this.container.style.top=u+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden",this._doLayout(d,r),this.options.keepEditorSelection||this.editor.setSelection(e);var g=Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1));this.revealLine(g)},e.prototype.revealLine=function(e){this.editor.revealLine(e,0)},e.prototype.setCssClass=function(e,t){t&&this.container.classList.remove(t),r.f(this.container,e)},e.prototype._onWidth=function(e){},e.prototype._doLayout=function(e,t){},e.prototype._relayout=function(e){var t=this;this._viewZone.heightInLines!==e&&this.editor.changeViewZones((function(o){t._viewZone.heightInLines=e,o.layoutZone(t._viewZone.id)}))},e.prototype._initSash=function(){var e,t=this;this._resizeSash=new s.b(this.domNode,this,{orientation:s.a.HORIZONTAL}),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=s.c.Disabled),this._disposables.push(this._resizeSash.onDidStart((function(o){t._viewZone&&(e={startY:o.startY,heightInLines:t._viewZone.heightInLines})}))),this._disposables.push(this._resizeSash.onDidEnd((function(){e=void 0}))),this._disposables.push(this._resizeSash.onDidChange((function(o){if(e){var n=(o.currentY-e.startY)/t.editor.getConfiguration().lineHeight,i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&t._relayout(r)}})))},e.prototype.getHorizontalSashLeft=function(){return 0},e.prototype.getHorizontalSashTop=function(){return parseInt(this.domNode.style.height)-this._decoratingElementsHeight()/2},e.prototype.getHorizontalSashWidth=function(){var e=this.editor.getLayoutInfo();return e.width-e.minimapWidth},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("uriDisplay")},function(e,t,o){"use strict";o.d(t,"a",(function(){return p}));o(299);var n,i=o(24),r=o(6),s=o(4),a=o(15),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function u(e,t){return!!e[t]}var c=function(e,t){this.target=e.target,this.hasTriggerModifier=u(e.event,t.triggerModifier),this.hasSideBySideModifier=u(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=i.k||e.event.detail<=1},h=function(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=u(e,t.triggerModifier)},d=function(){function e(e,t,o,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=o,this.triggerSideBySideModifier=n}return e.prototype.equals=function(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier},e}();function g(e){return"altKey"===e?a.d?new d(57,"metaKey",6,"altKey"):new d(5,"ctrlKey",6,"altKey"):a.d?new d(6,"altKey",57,"metaKey"):new d(6,"altKey",5,"ctrlKey")}var p=function(e){function t(t){var o=e.call(this)||this;return o._onMouseMoveOrRelevantKeyDown=o._register(new s.a),o.onMouseMoveOrRelevantKeyDown=o._onMouseMoveOrRelevantKeyDown.event,o._onExecute=o._register(new s.a),o.onExecute=o._onExecute.event,o._onCancel=o._register(new s.a),o.onCancel=o._onCancel.event,o._editor=t,o._opts=g(o._editor.getConfiguration().multiCursorModifier),o.lastMouseMoveEvent=null,o.hasTriggerKeyOnMouseDown=!1,o._register(o._editor.onDidChangeConfiguration((function(e){if(e.multiCursorModifier){var t=g(o._editor.getConfiguration().multiCursorModifier);if(o._opts.equals(t))return;o._opts=t,o.lastMouseMoveEvent=null,o.hasTriggerKeyOnMouseDown=!1,o._onCancel.fire()}}))),o._register(o._editor.onMouseMove((function(e){return o.onEditorMouseMove(new c(e,o._opts))}))),o._register(o._editor.onMouseDown((function(e){return o.onEditorMouseDown(new c(e,o._opts))}))),o._register(o._editor.onMouseUp((function(e){return o.onEditorMouseUp(new c(e,o._opts))}))),o._register(o._editor.onKeyDown((function(e){return o.onEditorKeyDown(new h(e,o._opts))}))),o._register(o._editor.onKeyUp((function(e){return o.onEditorKeyUp(new h(e,o._opts))}))),o._register(o._editor.onMouseDrag((function(){return o.resetHandler()}))),o._register(o._editor.onDidChangeCursorSelection((function(e){return o.onDidChangeCursorSelection(e)}))),o._register(o._editor.onDidChangeModel((function(e){return o.resetHandler()}))),o._register(o._editor.onDidChangeModelContent((function(){return o.resetHandler()}))),o._register(o._editor.onDidScrollChange((function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&o.resetHandler()}))),o}return l(t,e),t.prototype.onDidChangeCursorSelection=function(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this.resetHandler()},t.prototype.onEditorMouseMove=function(e){this.lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])},t.prototype.onEditorMouseDown=function(e){this.hasTriggerKeyOnMouseDown=e.hasTriggerModifier},t.prototype.onEditorMouseUp=function(e){this.hasTriggerKeyOnMouseDown&&this._onExecute.fire(e)},t.prototype.onEditorKeyDown=function(e){this.lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()},t.prototype.onEditorKeyUp=function(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()},t.prototype.resetHandler=function(){this.lastMouseMoveEvent=null,this.hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()},t}(r.a)},function(e,t,o){"use strict";o(470);var n,i,r,s=o(75),a=o(76),l=o(13),u=o(6),c=o(10),h=o(4),d=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),g=function(){function e(e){this._onDispose=new h.a,this.onDispose=this._onDispose.event,this._item=e}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose&&(this._onDispose.fire(),this._onDispose.dispose(),this._onDispose=null)},e}(),p=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var o,n,i=this,r=this.getLock(e);return r?new c.b((function(n,s){o=Object(h.k)(r.onDispose)((function(){return i.run(e,t).then(n,s)}))}),(function(){o.dispose()})):new c.b((function(o,r){if(e.isDisposed())return r(new Error("Item is disposed."));var s=i.locks[e.id]=new g(e);return n=t().then((function(t){return delete i.locks[e.id],s.dispose(),t})).then(o,r)}),(function(){return n.cancel()}))},e.prototype.getLock=function(e){var t;for(t in this.locks){var o=this.locks[t];if(e.intersects(o.item))return o}return null},e}(),f=function(){function e(){this._isDisposed=!1,this._onDidRevealItem=new h.d,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new h.d,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new h.d,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new h.d,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new h.d,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new h.d,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new h.d,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=new h.d,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new h.d,this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new h.d,this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new h.d,this.onDidDisposeItem=this._onDidDisposeItem.event,this.items={}}return e.prototype.register=function(e){a.a(!this.isRegistered(e.id),"item already registered: "+e.id);var t=Object(u.c)([this._onDidRevealItem.add(e.onDidReveal),this._onExpandItem.add(e.onExpand),this._onDidExpandItem.add(e.onDidExpand),this._onCollapseItem.add(e.onCollapse),this._onDidCollapseItem.add(e.onDidCollapse),this._onDidAddTraitItem.add(e.onDidAddTrait),this._onDidRemoveTraitItem.add(e.onDidRemoveTrait),this._onDidRefreshItem.add(e.onDidRefresh),this._onRefreshItemChildren.add(e.onRefreshChildren),this._onDidRefreshItemChildren.add(e.onDidRefreshChildren),this._onDidDisposeItem.add(e.onDidDispose)]);this.items[e.id]={item:e,disposable:t}},e.prototype.deregister=function(e){a.a(this.isRegistered(e.id),"item not registered: "+e.id),this.items[e.id].disposable.dispose(),delete this.items[e.id]},e.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},e.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},e.prototype.dispose=function(){this.items=null,this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e}(),m=function(){function e(e,t,o,n,i){this._onDidCreate=new h.a,this._onDidReveal=new h.a,this.onDidReveal=this._onDidReveal.event,this._onExpand=new h.a,this.onExpand=this._onExpand.event,this._onDidExpand=new h.a,this.onDidExpand=this._onDidExpand.event,this._onCollapse=new h.a,this.onCollapse=this._onCollapse.event,this._onDidCollapse=new h.a,this.onDidCollapse=this._onDidCollapse.event,this._onDidAddTrait=new h.a,this.onDidAddTrait=this._onDidAddTrait.event,this._onDidRemoveTrait=new h.a,this.onDidRemoveTrait=this._onDidRemoveTrait.event,this._onDidRefresh=new h.a,this.onDidRefresh=this._onDidRefresh.event,this._onRefreshChildren=new h.a,this.onRefreshChildren=this._onRefreshChildren.event,this._onDidRefreshChildren=new h.a,this.onDidRefreshChildren=this._onDidRefreshChildren.event,this._onDidDispose=new h.a,this.onDidDispose=this._onDidDispose.event,this.registry=t,this.context=o,this.lock=n,this.element=i,this.id=e,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.traits={},this.depth=0,this.expanded=this.context.dataSource.shouldAutoexpand&&this.context.dataSource.shouldAutoexpand(this.context.tree,i),this._onDidCreate.fire(this),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}return e.prototype.getElement=function(){return this.element},e.prototype.hasChildren=function(){return this.doesHaveChildren},e.prototype.getDepth=function(){return this.depth},e.prototype.isVisible=function(){return this.visible},e.prototype.setVisible=function(e){this.visible=e},e.prototype.isExpanded=function(){return this.expanded},e.prototype._setExpanded=function(e){this.expanded=e},e.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this._onDidReveal.fire(t)},e.prototype.expand=function(){var e=this;return this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this)?c.b.as(!1):this.lock.run(this,(function(){var t={item:e};return e._onExpand.fire(t),(e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):c.b.as(null)).then((function(){return e._setExpanded(!0),e._onDidExpand.fire(t),!0}))})).then((function(t){return!e.isDisposed()&&(e.context.options.autoExpandSingleChildren&&t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then((function(){return!0})):t)}))},e.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var o=c.b.as(null);return this.forEachChild((function(e){o=o.then((function(){return e.collapse(!0)}))})),o.then((function(){return t.collapse(!1)}))}return!this.isExpanded()||this.lock.isLocked(this)?c.b.as(!1):this.lock.run(this,(function(){var e={item:t};return t._onCollapse.fire(e),t._setExpanded(!1),t._onDidCollapse.fire(e),c.b.as(!0)}))},e.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this._onDidAddTrait.fire(t)},e.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e],this._onDidRemoveTrait.fire(t)},e.prototype.hasTrait=function(e){return this.traits[e]||!1},e.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},e.prototype.getHeight=function(){return this.height},e.prototype.refreshChildren=function(t,o,n){var i=this;if(void 0===o&&(o=!1),void 0===n&&(n=!1),!n&&!this.isExpanded())return this.needsChildrenRefresh=!0,c.b.as(this);this.needsChildrenRefresh=!1;var r=function(){var n={item:i,isNested:o};return i._onRefreshChildren.fire(n),(i.doesHaveChildren?i.context.dataSource.getChildren(i.context.tree,i.element):c.b.as([])).then((function(o){if(i.isDisposed()||i.registry.isDisposed())return c.b.as(null);if(!Array.isArray(o))return c.b.wrapError(new Error("Please return an array of children."));o=o?o.slice(0):[],o=i.sort(o);for(var n={};null!==i.firstChild;)n[i.firstChild.id]=i.firstChild,i.removeChild(i.firstChild);for(var r=0,s=o.length;r=0;r--)this.onInsertItem(u[r]);for(r=this.heightMap.length-1;r>=i;r--)this.onRefreshItem(this.heightMap[r]);return a},e.prototype.onInsertItem=function(e){},e.prototype.onRemoveItems=function(e){for(var t,o,n,i=null,r=0;t=e.next();){if(n=this.indexes[t],!(o=this.heightMap[n]))return void console.error("view item doesnt exist");r-=o.height,delete this.indexes[t],this.onRemoveItem(o),null===i&&(i=n)}if(0!==r)for(this.heightMap.splice(i,n-i+1),n=i;n=o.top+o.height))return t;if(n===t)break;n=t}return this.heightMap.length},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},e.prototype.itemAtIndex=function(e){return this.heightMap[e]},e.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},e.prototype.createViewItem=function(e){throw new Error("not implemented")},e.prototype.dispose=function(){this.heightMap=null,this.indexes=null},e}(),x=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),M=function(){function e(e,t,o){this._posx=e,this._posy=t,this._target=o}return e.prototype.preventDefault=function(){},e.prototype.stopPropagation=function(){},Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),e}(),B=function(e){function t(t){var o=e.call(this,t.posx,t.posy,t.target)||this;return o.originalEvent=t,o}return x(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(M),F=function(e){function t(t,o,n){var i=e.call(this,t,o,n.target)||this;return i.originalEvent=n,i}return x(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(M);!function(e){e[e.COPY=0]="COPY",e[e.MOVE=1]="MOVE"}(i||(i={})),function(e){e[e.BUBBLE_DOWN=0]="BUBBLE_DOWN",e[e.BUBBLE_UP=1]="BUBBLE_UP"}(r||(r={}));var H="ResourceURLs",U=o(17),V=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();var W=function(){function e(e){this.context=e,this._cache={"":[]}}return e.prototype.alloc=function(e){var t=this.cache(e).pop();if(!t){var o=document.createElement("div");o.className="content";var n=document.createElement("div");n.appendChild(o),t={element:n,templateId:e,templateData:this.context.renderer.renderTemplate(this.context.tree,e,o)}}return t},e.prototype.release=function(e,t){!function(e){try{e.parentElement.removeChild(e)}catch(e){}}(t.element),this.cache(e).push(t)},e.prototype.cache=function(e){return this._cache[e]||(this._cache[e]=[])},e.prototype.garbageCollect=function(){var e=this;this._cache&&Object.keys(this._cache).forEach((function(t){e._cache[t].forEach((function(o){e.context.renderer.disposeTemplate(e.context.tree,t,o.templateData),o.element=null,o.templateData=null})),delete e._cache[t]}))},e.prototype.dispose=function(){this.garbageCollect(),this._cache=null,this.context=null},e}(),j=function(){function e(e,t){var o=this;this.width=0,this.context=e,this.model=t,this.id=this.model.id,this.row=null,this.top=0,this.height=t.getHeight(),this._styles={},t.getAllTraits().forEach((function(e){return o._styles[e]=!0})),t.isExpanded()&&this.addClass("expanded")}return Object.defineProperty(e.prototype,"expanded",{set:function(e){e?this.addClass("expanded"):this.removeClass("expanded")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{set:function(e){e?this.addClass("loading"):this.removeClass("loading")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this._draggable},set:function(e){this._draggable=e,this.render(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropTarget",{set:function(e){e?this.addClass("drop-target"):this.removeClass("drop-target")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.row&&this.row.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId||(this._templateId=this.context.renderer.getTemplateId&&this.context.renderer.getTemplateId(this.context.tree,this.model.getElement()))},enumerable:!0,configurable:!0}),e.prototype.addClass=function(e){this._styles[e]=!0,this.render(!0)},e.prototype.removeClass=function(e){delete this._styles[e],this.render(!0)},e.prototype.render=function(e){var t=this;if(void 0===e&&(e=!1),this.model&&this.element){var o=["monaco-tree-row"];o.push.apply(o,Object.keys(this._styles)),this.model.hasChildren()&&o.push("has-children"),this.element.className=o.join(" "),this.element.draggable=this.draggable,this.element.style.height=this.height+"px",this.element.setAttribute("role","treeitem");var n=this.context.accessibilityProvider,i=n.getAriaLabel(this.context.tree,this.model.getElement());if(i&&this.element.setAttribute("aria-label",i),n.getPosInSet&&n.getSetSize&&(this.element.setAttribute("aria-setsize",n.getSetSize()),this.element.setAttribute("aria-posinset",n.getPosInSet(this.context.tree,this.model.getElement()))),this.model.hasTrait("focused")){var r=w.safeBtoa(this.model.id);this.element.setAttribute("aria-selected","true"),this.element.setAttribute("id",r)}else this.element.setAttribute("aria-selected","false"),this.element.removeAttribute("id");this.model.hasChildren()?this.element.setAttribute("aria-expanded",String(!!this._styles.expanded)):this.element.removeAttribute("aria-expanded"),this.element.setAttribute("aria-level",String(this.model.getDepth())),this.context.options.paddingOnRow?this.element.style.paddingLeft=this.context.options.twistiePixels+(this.model.getDepth()-1)*this.context.options.indentPixels+"px":(this.element.style.paddingLeft=(this.model.getDepth()-1)*this.context.options.indentPixels+"px",this.row.element.firstElementChild.style.paddingLeft=this.context.options.twistiePixels+"px");var s=this.context.dnd.getDragURI(this.context.tree,this.model.getElement());if(s!==this.uri&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),s?(this.uri=s,this.draggable=!0,this.unbindDragStart=C.g(this.element,"dragstart",(function(e){t.onDragStart(e)}))):this.uri=null),!e&&this.element){var a=window.getComputedStyle(this.element),l=parseFloat(a.paddingLeft);this.context.horizontalScrolling&&(this.element.style.width="fit-content"),this.context.renderer.renderElement(this.context.tree,this.model.getElement(),this.templateId,this.row.templateData),this.context.horizontalScrolling&&(this.width=C.t(this.element)+l,this.element.style.width="")}}},e.prototype.insertInDOM=function(e,t){if(this.row||(this.row=this.context.cache.alloc(this.templateId),this.element[z.BINDING]=this),!this.element.parentElement){if(null===t)e.appendChild(this.element);else try{e.insertBefore(this.element,t)}catch(t){console.warn("Failed to locate previous tree element"),e.appendChild(this.element)}this.render()}},e.prototype.removeFromDOM=function(){this.row&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),this.uri=null,this.element[z.BINDING]=null,this.context.cache.release(this.templateId,this.row),this.row=null)},e.prototype.dispose=function(){this.row=null,this.model=null},e}(),G=function(e){function t(t,o,n){var i=e.call(this,t,o)||this;return i.row={element:n,templateData:null,templateId:null},i}return V(t,e),t.prototype.render=function(){if(this.model&&this.element){var e=["monaco-tree-wrapper"];e.push.apply(e,Object.keys(this._styles)),this.model.hasChildren()&&e.push("has-children"),this.element.className=e.join(" ")}},t.prototype.insertInDOM=function(e,t){},t.prototype.removeFromDOM=function(){},t}(j);var z=function(e){function t(o,n){var i=e.call(this)||this;i.lastClickTimeStamp=0,i.contentWidthUpdateDelayer=new U.a(50),i.isRefreshing=!1,i.refreshingPreviousChildrenIds={},i._onDOMFocus=new h.a,i._onDOMBlur=new h.a,i._onDidScroll=new h.a,t.counter++,i.instance=t.counter;var r=void 0===o.options.horizontalScrollMode?A.b.Hidden:o.options.horizontalScrollMode;i.horizontalScrolling=r!==A.b.Hidden,i.context={dataSource:o.dataSource,renderer:o.renderer,controller:o.controller,dnd:o.dnd,filter:o.filter,sorter:o.sorter,tree:o.tree,accessibilityProvider:o.accessibilityProvider,options:o.options,cache:new W(o),horizontalScrolling:i.horizontalScrolling},i.modelListeners=[],i.viewListeners=[],i.model=null,i.items={},i.domNode=document.createElement("div"),i.domNode.className="monaco-tree no-focused-item monaco-tree-instance-"+i.instance,i.domNode.tabIndex=o.options.preventRootFocus?-1:0,i.styleElement=C.o(i.domNode),i.treeStyler=o.styler,i.treeStyler||(i.treeStyler=new s.f(i.styleElement,"monaco-tree-instance-"+i.instance)),i.domNode.setAttribute("role","tree"),i.context.options.ariaLabel&&i.domNode.setAttribute("aria-label",i.context.options.ariaLabel),i.context.options.alwaysFocused&&C.f(i.domNode,"focused"),i.context.options.paddingOnRow||C.f(i.domNode,"no-row-padding"),i.wrapper=document.createElement("div"),i.wrapper.className="monaco-tree-wrapper",i.scrollableElement=new D.b(i.wrapper,{alwaysConsumeMouseWheel:!0,horizontal:r,vertical:void 0!==o.options.verticalScrollMode?o.options.verticalScrollMode:A.b.Auto,useShadows:o.options.useShadows}),i.scrollableElement.onScroll((function(e){i.render(e.scrollTop,e.height,e.scrollLeft,e.width,e.scrollWidth),i._onDidScroll.fire()})),E.k?(i.wrapper.style.msTouchAction="none",i.wrapper.style.msContentZooming="none"):T.b.addTarget(i.wrapper),i.rowsContainer=document.createElement("div"),i.rowsContainer.className="monaco-tree-rows",o.options.showTwistie&&(i.rowsContainer.className+=" show-twisties");var a=C.O(i.domNode);return i.viewListeners.push(a.onDidFocus((function(){return i.onFocus()}))),i.viewListeners.push(a.onDidBlur((function(){return i.onBlur()}))),i.viewListeners.push(a),i.viewListeners.push(C.g(i.domNode,"keydown",(function(e){return i.onKeyDown(e)}))),i.viewListeners.push(C.g(i.domNode,"keyup",(function(e){return i.onKeyUp(e)}))),i.viewListeners.push(C.g(i.domNode,"mousedown",(function(e){return i.onMouseDown(e)}))),i.viewListeners.push(C.g(i.domNode,"mouseup",(function(e){return i.onMouseUp(e)}))),i.viewListeners.push(C.g(i.wrapper,"click",(function(e){return i.onClick(e)}))),i.viewListeners.push(C.g(i.wrapper,"auxclick",(function(e){return i.onClick(e)}))),i.viewListeners.push(C.g(i.domNode,"contextmenu",(function(e){return i.onContextMenu(e)}))),i.viewListeners.push(C.g(i.wrapper,T.a.Tap,(function(e){return i.onTap(e)}))),i.viewListeners.push(C.g(i.wrapper,T.a.Change,(function(e){return i.onTouchChange(e)}))),E.k&&(i.viewListeners.push(C.g(i.wrapper,"MSPointerDown",(function(e){return i.onMsPointerDown(e)}))),i.viewListeners.push(C.g(i.wrapper,"MSGestureTap",(function(e){return i.onMsGestureTap(e)}))),i.viewListeners.push(C.i(i.wrapper,"MSGestureChange",(function(e){return i.onThrottledMsGestureChange(e)}),(function(e,t){t.stopPropagation(),t.preventDefault();var o={translationY:t.translationY,translationX:t.translationX};return e&&(o.translationY+=e.translationY,o.translationX+=e.translationX),o})))),i.viewListeners.push(C.g(window,"dragover",(function(e){return i.onDragOver(e)}))),i.viewListeners.push(C.g(i.wrapper,"drop",(function(e){return i.onDrop(e)}))),i.viewListeners.push(C.g(window,"dragend",(function(e){return i.onDragEnd(e)}))),i.viewListeners.push(C.g(window,"dragleave",(function(e){return i.onDragOver(e)}))),i.wrapper.appendChild(i.rowsContainer),i.domNode.appendChild(i.scrollableElement.getDomNode()),n.appendChild(i.domNode),i.lastRenderTop=0,i.lastRenderHeight=0,i.didJustPressContextMenuKey=!1,i.currentDropTarget=null,i.currentDropTargets=[],i.shouldInvalidateDropReaction=!1,i.dragAndDropScrollInterval=null,i.dragAndDropScrollTimeout=null,i.onHiddenScrollTop=null,i.onRowsChanged(),i.layout(),i.setupMSGesture(),i.applyStyles(o.options),i}return V(t,e),Object.defineProperty(t.prototype,"onDOMFocus",{get:function(){return this._onDOMFocus.event},enumerable:!0,configurable:!0}),t.prototype.applyStyles=function(e){this.treeStyler.style(e)},t.prototype.createViewItem=function(e){return new j(this.context,e)},t.prototype.getHTMLElement=function(){return this.domNode},t.prototype.focus=function(){this.domNode.focus()},t.prototype.isFocused=function(){return document.activeElement===this.domNode},t.prototype.blur=function(){this.domNode.blur()},t.prototype.setupMSGesture=function(){var e=this;window.MSGesture&&(this.msGesture=new MSGesture,setTimeout((function(){return e.msGesture.target=e.wrapper}),100))},t.prototype.isTreeVisible=function(){return null===this.onHiddenScrollTop},t.prototype.layout=function(e,t){this.isTreeVisible()&&(this.viewHeight=e||C.s(this.wrapper),this.scrollHeight=this.getContentHeight(),this.horizontalScrolling&&(this.viewWidth=t||C.t(this.wrapper)))},t.prototype.render=function(e,t,o,n,i){var r,s,a=e,l=e+t,u=this.lastRenderTop+this.lastRenderHeight;for(r=this.indexAfter(l)-1,s=this.indexAt(Math.max(u,a));r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(l))-1,s=this.indexAt(a);r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=this.indexAt(this.lastRenderTop),s=Math.min(this.indexAt(a),this.indexAfter(u));r1e3,u=void 0,c=void 0;if(!l)c=(u=new S.a({getLength:function(){return r.length},getElementAtIndex:function(e){return r[e]}},{getLength:function(){return s.length},getElementAtIndex:function(e){return s[e].id}},null).ComputeDiff(!1)).some((function(e){if(e.modifiedLength>0)for(var o=e.modifiedStart,n=e.modifiedStart+e.modifiedLength;o0&&this.onRemoveItems(new I.a(r,g.originalStart,g.originalStart+g.originalLength)),g.modifiedLength>0){var p=s[g.modifiedStart-1]||o;p=p.getDepth()>0?p:null,this.onInsertItems(new I.a(s,g.modifiedStart,g.modifiedStart+g.modifiedLength),p?p.id:null)}}else(l||u.length)&&(this.onRemoveItems(new I.a(r)),this.onInsertItems(new I.a(s),o.getDepth()>0?o.id:null));(l||u.length)&&this.onRowsChanged()}},t.prototype.onItemRefresh=function(e){this.onItemsRefresh([e])},t.prototype.onItemsRefresh=function(e){var t=this;this.onRefreshItemSet(e.filter((function(e){return t.items.hasOwnProperty(e.id)}))),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,o=this.items[t.id];if(o){o.expanded=!0;var n=this.onInsertItems(t.getNavigator(),t.id),i=this.scrollTop;o.top+o.height<=this.scrollTop&&(i+=n),this.onRowsChanged(i)}},t.prototype.onItemCollapsing=function(e){var t=e.item,o=this.items[t.id];o&&(o.expanded=!1,this.onRemoveItems(new I.c(t.getNavigator(),(function(e){return e&&e.id}))),this.onRowsChanged())},t.prototype.onItemReveal=function(e){var t=e.item,o=e.relativeTop,n=this.items[t.id];if(n)if(null!==o){o=(o=o<0?0:o)>1?1:o;var i=n.height-this.viewHeight;this.scrollTop=i*o+n.top}else{var r=n.top+n.height,s=this.scrollTop+this.viewHeight;n.top=s&&(this.scrollTop=r-this.viewHeight)}},t.prototype.onItemAddTrait=function(e){var t=e.item,o=e.trait,n=this.items[t.id];n&&n.addClass(o),"highlighted"===o&&(C.f(this.domNode,o),n&&(this.highlightedItemWasDraggable=!!n.draggable,n.draggable&&(n.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){var t=e.item,o=e.trait,n=this.items[t.id];n&&n.removeClass(o),"highlighted"===o&&(C.G(this.domNode,o),this.highlightedItemWasDraggable&&(n.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();C.N(this.domNode,"no-focused-item",!e),e?this.domNode.setAttribute("aria-activedescendant",w.safeBtoa(this.context.dataSource.getId(this.context.tree,e))):this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(o){t.onDragStart(e,o)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t,this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new k.b(e),o=this.getItemAround(t.target);o&&(E.k&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.context.controller.onClick(this.context.tree,o.model.getElement(),t))}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.context.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new k.b(e);if(!(t.ctrlKey&&b.e&&b.d)){var o=this.getItemAround(t.target);o&&this.context.controller.onMouseDown(this.context.tree,o.model.getElement(),t)}}},t.prototype.onMouseUp=function(e){if(this.context.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new k.b(e);if(!(t.ctrlKey&&b.e&&b.d)){var o=this.getItemAround(t.target);o&&this.context.controller.onMouseUp(this.context.tree,o.model.getElement(),t)}}},t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget);t&&this.context.controller.onTap(this.context.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,o;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var n,i=new O.a(e);if(o=this.model.getFocus()){var r=this.context.dataSource.getId(this.context.tree,o),s=this.items[r];n=C.u(s.element)}else o=this.model.getInput(),n=C.u(this.inputItem.element);t=new F(n.left+n.width,n.top,i)}else{var a=new k.b(e),l=this.getItemAround(a.target);if(!l)return;o=l.model.getElement(),t=new B(a)}this.context.controller.onContextMenu(this.context.tree,o,t)},t.prototype.onKeyDown=function(e){var t=new O.a(e);this.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode,this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||this.context.controller.onKeyDown(this.context.tree,t)},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new O.a(e))},t.prototype.onDragStart=function(e,o){if(!this.model.getHighlight()){var n,i=e.model.getElement(),r=this.model.getSelection();if(n=r.indexOf(i)>-1?r:[i],o.dataTransfer.effectAllowed="copyMove",o.dataTransfer.setData(H,JSON.stringify([e.uri])),o.dataTransfer.setDragImage){var s=void 0;s=this.context.dnd.getDragLabel?this.context.dnd.getDragLabel(this.context.tree,n):String(n.length);var a=document.createElement("div");a.className="monaco-tree-drag-image",a.textContent=s,document.body.appendChild(a),o.dataTransfer.setDragImage(a,-10,-10),setTimeout((function(){return document.body.removeChild(a)}),0)}this.currentDragAndDropData=new R(n),t.currentExternalDragAndDropData=new L(n),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new k.a(o))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=C.w(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(void 0!==e.dragAndDropMouseY){var o=e.dragAndDropMouseY-t,n=0,i=e.viewHeight-35;o<35?n=Math.max(-14,.2*(o-35)):o>i&&(n=Math.min(14,.2*(o-i))),e.scrollTop+=n}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var o,n=this,s=new k.a(e),a=this.getItemAround(s.target);if(!a||0===s.posx&&0===s.posy&&s.browserEvent.type===C.d.DRAG_LEAVE)return this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=s.posy,!this.currentDragAndDropData)if(t.currentExternalDragAndDropData)this.currentDragAndDropData=t.currentExternalDragAndDropData;else{if(!s.dataTransfer.types)return!1;this.currentDragAndDropData=new N}this.currentDragAndDropData.update(s);var l,u=a.model;do{if(o=u?u.getElement():this.model.getInput(),!(l=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,o,s))||l.bubble!==r.BUBBLE_UP)break;u=u&&u.parent}while(u);if(!u)return this.currentDropElement=null,!1;var h=l&&l.accept;h?(this.currentDropElement=u.getElement(),s.preventDefault(),s.dataTransfer.dropEffect=l.effect===i.COPY?"copy":"move"):this.currentDropElement=null;var d,g,p=u.id===this.inputItem.id?this.inputItem:this.items[u.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==p||(d=this.currentDropElementReaction,g=l,!(!d&&!g||d&&g&&d.accept===g.accept&&d.bubble===g.bubble&&d.effect===g.effect)))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.currentDropTarget=p,this.currentDropElementReaction=l,h)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),l.bubble===r.BUBBLE_DOWN)for(var f,m=u.getNavigator();f=m.next();)(a=this.items[f.id])&&(a.dropTarget=!0,this.currentDropTargets.push(a));l.autoExpand&&(this.currentDropPromise=c.b.timeout(500).then((function(){return n.context.tree.expand(n.currentDropElement)})).then((function(){return n.shouldInvalidateDropReaction=!0})))}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new k.a(e);t.preventDefault(),this.currentDragAndDropData.update(t),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(e){this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[]),this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,t.currentExternalDragAndDropData=null,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null},t.prototype.onFocus=function(){this.context.options.alwaysFocused||C.f(this.domNode,"focused"),this._onDOMFocus.fire()},t.prototype.onBlur=function(){this.context.options.alwaysFocused||C.G(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;t!==(e.MSPOINTER_TYPE_MOUSE||"mouse")?t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)):this.lastPointerType="mouse"}},t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,o=this.itemAfter(e);o&&o.element&&(t=o.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e&&e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.topthis.lastRenderTop},t.prototype.getItemAround=function(e){var o=this.inputItem;do{if(e[t.BINDING]&&(o=e[t.BINDING]),e===this.wrapper||e===this.domNode)return o;if(e===document.body)return null}while(e=e.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=u.d(this.modelListeners),this.model=null)},t.prototype.dispose=function(){var t=this;this.scrollableElement.dispose(),this.releaseModel(),this.modelListeners=null,this.viewListeners=u.d(this.viewListeners),this._onDOMFocus.dispose(),this._onDOMBlur.dispose(),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.items&&(Object.keys(this.items).forEach((function(e){return t.items[e].removeFromDOM()})),this.items=null),this.context.cache&&(this.context.cache.dispose(),this.context.cache=null),e.prototype.dispose.call(this)},t.BINDING="monaco-tree-row",t.LOADING_DECORATION_DELAY=800,t.counter=0,t.currentExternalDragAndDropData=null,t}(P),K=o(14),Y=o(30);o.d(t,"a",(function(){return $}));var X=function(e,t,o){if(void 0===o&&(o={}),this.tree=e,this.configuration=t,this.options=o,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer,this.controller=t.controller||new s.c({clickBehavior:s.a.ON_MOUSE_UP,keyboardSupport:"boolean"!=typeof o.keyboardSupport||o.keyboardSupport}),this.dnd=t.dnd||new s.d,this.filter=t.filter||new s.e,this.sorter=t.sorter||null,this.accessibilityProvider=t.accessibilityProvider||new s.b,this.styler=t.styler||null},q={listFocusBackground:K.a.fromHex("#073655"),listActiveSelectionBackground:K.a.fromHex("#0E639C"),listActiveSelectionForeground:K.a.fromHex("#FFFFFF"),listFocusAndSelectionBackground:K.a.fromHex("#094771"),listFocusAndSelectionForeground:K.a.fromHex("#FFFFFF"),listInactiveSelectionBackground:K.a.fromHex("#3F3F46"),listHoverBackground:K.a.fromHex("#2A2D2E"),listDropBackground:K.a.fromHex("#383B3D")},$=function(){function e(e,t,o){void 0===o&&(o={}),this._onDidChangeFocus=new h.e,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeSelection=new h.e,this.onDidChangeSelection=this._onDidChangeSelection.event,this._onHighlightChange=new h.e,this._onDidExpandItem=new h.e,this._onDidCollapseItem=new h.e,this._onDispose=new h.a,this.onDidDispose=this._onDispose.event,this.container=e,Object(Y.g)(o,q,!1),o.twistiePixels="number"==typeof o.twistiePixels?o.twistiePixels:32,o.showTwistie=!1!==o.showTwistie,o.indentPixels="number"==typeof o.indentPixels?o.indentPixels:12,o.alwaysFocused=!0===o.alwaysFocused,o.useShadows=!1!==o.useShadows,o.paddingOnRow=!1!==o.paddingOnRow,o.showLoading=!1!==o.showLoading,this.context=new X(this,t,o),this.model=new v(this.context),this.view=new z(this.context,this.container),this.view.setModel(this.model),this._onDidChangeFocus.input=this.model.onDidFocus,this._onDidChangeSelection.input=this.model.onDidSelect,this._onHighlightChange.input=this.model.onDidHighlight,this._onDidExpandItem.input=this.model.onDidExpandItem,this._onDidCollapseItem.input=this.model.onDidCollapseItem}return e.prototype.style=function(e){this.view.applyStyles(e)},Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.view&&this.view.onDOMFocus},enumerable:!0,configurable:!0}),e.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.domFocus=function(){this.view.focus()},e.prototype.isDOMFocused=function(){return this.view.isFocused()},e.prototype.domBlur=function(){this.view.blur()},e.prototype.setInput=function(e){return this.model.setInput(e)},e.prototype.getInput=function(){return this.model.getInput()},e.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},e.prototype.expand=function(e){return this.model.expand(e)},e.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e,t)},e.prototype.toggleExpansion=function(e,t){return void 0===t&&(t=!1),this.model.toggleExpansion(e,t)},e.prototype.isExpanded=function(e){return this.model.isExpanded(e)},e.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},e.prototype.getHighlight=function(){return this.model.getHighlight()},e.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},e.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},e.prototype.getSelection=function(){return this.model.getSelection()},e.prototype.clearSelection=function(e){this.model.setSelection([],e)},e.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},e.prototype.getFocus=function(){return this.model.getFocus()},e.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},e.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},e.prototype.focusParent=function(e){this.model.focusParent(e)},e.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)},e.prototype.focusFirst=function(e,t){this.model.focusFirst(e,t)},e.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},e.prototype.focusLast=function(e,t){this.model.focusLast(e,t)},e.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},e.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},e.prototype.clearFocus=function(e){this.model.setFocus(null,e)},e.prototype.dispose=function(){this._onDispose.fire(),null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),this._onDidChangeFocus.dispose(),this._onDidChangeSelection.dispose(),this._onHighlightChange.dispose(),this._onDidExpandItem.dispose(),this._onDidCollapseItem.dispose(),this._onDispose.dispose()},e}()},function(e,t,o){"use strict";o(446);var n=o(0),i=o(13),r=o(4),s=o(6),a=o(62),l=o(8),u=o(10),c=o(14),h=o(34),d=o(1),g=o(93),p=(o(447),o(30)),f={badgeBackground:c.a.fromHex("#4D4D4D"),badgeForeground:c.a.fromHex("#FFFFFF")},m=function(){function e(e,t){this.options=t||Object.create(null),Object(p.g)(this.options,f,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Object(d.k)(e,Object(d.a)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},e.prototype.render=function(){this.element.textContent=Object(l.format)(this.countFormat,this.count),this.element.title=Object(l.format)(this.titleFormat,this.count),this.applyStyles()},e.prototype.style=function(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()},e.prototype.applyStyles=function(){if(this.element){var e=this.badgeBackground?this.badgeBackground.toString():null,t=this.badgeForeground?this.badgeForeground.toString():null,o=this.badgeBorder?this.badgeBorder.toString():null;this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=o?"1px":null,this.element.style.borderStyle=o?"solid":null,this.element.style.borderColor=o}},e}(),_=o(204),y=o(22),v=o(143),b=o(2),E=o(26),C=o(157),S=o(113),T=o(56),w=o(133),k=o(7),O=o(19),R=o(118),L=Object(y.c)("environmentService"),N=o(33),I=o(18),D=o(134),A=o(12),P=o(75),x=o(208),M=o(178);o.d(t,"b",(function(){return J})),o.d(t,"a",(function(){return Z}));var B,F=(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),H=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},U=function(e,t){return function(o,n){t(o,n,e)}},V=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},W=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]1?this.badge.setTitleFormat(n.a("referencesCount","{0} references",t)):this.badge.setTitleFormat(n.a("referenceCount","{0} reference",t))},e=H([U(1,v.a),U(2,Object(y.d)(L)),U(3,O.c)],e)}(),Y=function(){function e(e){var t=document.createElement("div");this.before=document.createElement("span"),this.inside=document.createElement("span"),this.after=document.createElement("span"),d.f(this.inside,"referenceMatch"),d.f(t,"reference"),t.appendChild(this.before),t.appendChild(this.inside),t.appendChild(this.after),e.appendChild(t)}return e.prototype.set=function(e){var t=e.parent.preview.preview(e.range),o=t.before,n=t.inside,i=t.after;this.before.innerHTML=l.escape(o),this.inside.innerHTML=l.escape(n),this.after.innerHTML=l.escape(i)},e}(),X=function(){function e(e,t,o){this._contextService=e,this._themeService=t,this._environmentService=o}return e.prototype.getHeight=function(e,t){return 23},e.prototype.getTemplateId=function(t,o){if(o instanceof T.a)return e._ids.FileReferences;if(o instanceof T.b)return e._ids.OneReference;throw o},e.prototype.renderTemplate=function(t,o,n){if(o===e._ids.FileReferences)return new K(n,this._contextService,this._environmentService,this._themeService);if(o===e._ids.OneReference)return new Y(n);throw o},e.prototype.renderElement=function(e,t,o,n){if(t instanceof T.a)n.set(t);else{if(!(t instanceof T.b))throw o;n.set(t)}},e.prototype.disposeTemplate=function(e,t,o){o instanceof K&&o.dispose()},e._ids={FileReferences:"FileReferences",OneReference:"OneReference"},e=H([U(0,v.a),U(1,O.c),U(2,Object(y.d)(L))],e)}(),q=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t instanceof T.a?t.getAriaMessage():t instanceof T.b?t.getAriaMessage():void 0},e}(),$=function(){function e(e,t){var o,n=this;this._disposables=[],this._onDidChangePercentages=new r.a,this._ratio=t,this._sash=new g.b(e,{getVerticalSashLeft:function(){return n._width*n._ratio},getVerticalSashHeight:function(){return n._height}}),this._disposables.push(this._sash.onDidStart((function(e){o=e.startX-n._width*n.ratio}))),this._disposables.push(this._sash.onDidChange((function(e){var t=e.currentX-o;t>20&&t+200?e.children[0]:void 0},t.prototype._revealReference=function(e,t){return V(this,void 0,void 0,(function(){var o,r=this;return W(this,(function(l){switch(l.label){case 0:return e.uri.scheme!==a.a.inMemory?this.setTitle(Object(M.a)(e.uri),this._uriDisplay.getLabel(Object(M.b)(e.uri),!1)):this.setTitle(n.a("peekView.alternateTitle","References")),o=this._textModelResolverService.createModelReference(e.uri),t?[4,this._tree.reveal(e.parent)]:[3,2];case 1:l.sent(),l.label=2;case 2:return[2,u.b.join([o,this._tree.reveal(e)]).then((function(t){var o=t[0];if(r._model){Object(s.d)(r._previewModelReference);var n=o.object;if(n){r._previewModelReference=o;var i=r._preview.getModel()===n.textEditorModel;r._preview.setModel(n.textEditorModel);var a=b.a.lift(e.range).collapseToStart();r._preview.setSelection(a),r._preview.revealRangeInCenter(a,i?0:1)}else r._preview.setModel(r._previewNotAvailableMessage),o.dispose()}else o.dispose()}),i.e)]}}))}))},t=H([U(3,O.c),U(4,w.a),U(5,y.a),U(6,x.a)],t)}(S.b),Q=Object(k.kb)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},n.a("peekViewTitleBackground","Background color of the peek view title area.")),ee=Object(k.kb)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},n.a("peekViewTitleForeground","Color of the peek view title.")),te=Object(k.kb)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#6c6c6cb3",hc:"#FFFFFF99"},n.a("peekViewTitleInfoForeground","Color of the peek view title info.")),oe=Object(k.kb)("peekView.border",{dark:"#007acc",light:"#007acc",hc:k.e},n.a("peekViewBorder","Color of the peek view borders and arrow.")),ne=Object(k.kb)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:c.a.black},n.a("peekViewResultsBackground","Background color of the peek view result list.")),ie=Object(k.kb)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:c.a.white},n.a("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),re=Object(k.kb)("peekViewResult.fileForeground",{dark:c.a.white,light:"#1E1E1E",hc:c.a.white},n.a("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),se=Object(k.kb)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},n.a("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),ae=Object(k.kb)("peekViewResult.selectionForeground",{dark:c.a.white,light:"#6C6C6C",hc:c.a.white},n.a("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),le=Object(k.kb)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:c.a.black},n.a("peekViewEditorBackground","Background color of the peek view editor.")),ue=Object(k.kb)("peekViewEditorGutter.background",{dark:le,light:le,hc:le},n.a("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),ce=Object(k.kb)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},n.a("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),he=Object(k.kb)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},n.a("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),de=Object(k.kb)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:k.b},n.a("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));Object(O.e)((function(e,t){var o=e.getColor(ce);o&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { background-color: "+o+"; }");var n=e.getColor(he);n&&t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: "+n+"; }");var i=e.getColor(de);i&&t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid "+i+"; box-sizing: border-box; }");var r=e.getColor(k.b);r&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted "+r+"; box-sizing: border-box; }");var s=e.getColor(ne);s&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree { background-color: "+s+"; }");var a=e.getColor(ie);a&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree { color: "+a+"; }");var l=e.getColor(re);l&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: "+l+"; }");var u=e.getColor(se);u&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+u+"; }");var c=e.getColor(ae);c&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+c+" !important; }");var h=e.getColor(le);h&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: "+h+";}");var d=e.getColor(ue);d&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: "+d+";}")}))},function(e,t,o){"use strict";var n,i="object"==typeof Reflect?Reflect:null,r=i&&"function"==typeof i.apply?i.apply:function(e,t,o){return Function.prototype.apply.call(e,t,o)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function c(e,t,o,n){var i,r,s,a;if("function"!=typeof o)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o);if(void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,o.listener?o.listener:o),r=e._events),s=r[t]),void 0===s)s=r[t]=o,++e._eventsCount;else if("function"==typeof s?s=r[t]=n?[o,s]:[s,o]:n?s.unshift(o):s.push(o),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function h(){for(var e=[],t=0;t0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var u=l.length,c=f(l,u);for(o=0;o=0;r--)if(o[r]===t||o[r].listener===t){s=o[r].listener,i=r;break}if(i<0)return this;0===i?o.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return g(this,e,!0)},a.prototype.rawListeners=function(e){return g(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,o){(t=e.exports=o(267)).Stream=t,t.Readable=t,t.Writable=o(214),t.Duplex=o(136),t.Transform=o(271),t.PassThrough=o(334)},function(e,t,o){"use strict";(function(t,n,i){var r=o(180);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,o){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(o),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var a,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:r.nextTick;y.WritableState=_;var u=o(167);u.inherits=o(147);var c={deprecate:o(333)},h=o(268),d=o(181).Buffer,g=i.Uint8Array||function(){};var p,f=o(269);function m(){}function _(e,t){a=a||o(136),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var o=e._writableState,n=o.sync,i=o.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(o),t)!function(e,t,o,n,i){--t.pendingcb,o?(r.nextTick(i,n),r.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),T(e,t))}(e,o,n,t,i);else{var s=C(o);s||o.corked||o.bufferProcessing||!o.bufferedRequest||E(e,o),n?l(b,e,o,s,i):b(e,o,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||o(136),!(p.call(y,this)||this instanceof a))return new y(e);this._writableState=new _(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function v(e,t,o,n,i,r,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,o?e._writev(i,t.onwrite):e._write(i,r,t.onwrite),t.sync=!1}function b(e,t,o,n){o||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function E(e,t){t.bufferProcessing=!0;var o=t.bufferedRequest;if(e._writev&&o&&o.next){var n=t.bufferedRequestCount,i=new Array(n),r=t.corkedRequestsFree;r.entry=o;for(var a=0,l=!0;o;)i[a]=o,o.isBuf||(l=!1),o=o.next,a+=1;i.allBuffers=l,v(e,t,!0,t.length,i,"",r.finish),t.pendingcb++,t.lastBufferedRequest=null,r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;o;){var u=o.chunk,c=o.encoding,h=o.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,c,h),o=o.next,t.bufferedRequestCount--,t.writing)break}null===o&&(t.lastBufferedRequest=null)}t.bufferedRequest=o,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(o){t.pendingcb--,o&&e.emit("error",o),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var o=C(t);return o&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,r.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),o}u.inherits(y,h),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(_.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===y&&(e&&e._writableState instanceof _)}})):p=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,o){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,d.isBuffer(n)||n instanceof g);return a&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(o=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof o&&(o=m),i.ended?function(e,t){var o=new Error("write after end");e.emit("error",o),r.nextTick(t,o)}(this,o):(a||function(e,t,o,n){var i=!0,s=!1;return null===o?s=new TypeError("May not write null values to stream"):"string"==typeof o||void 0===o||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),r.nextTick(n,s),i=!1),i}(this,i,e,o))&&(i.pendingcb++,s=function(e,t,o,n,i,r){if(!o){var s=function(e,t,o){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,o));return t}(t,n,i);n!==s&&(o=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,o){o(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,o){var n=this._writableState;"function"==typeof e?(o=e,e=null,t=null):"function"==typeof t&&(o=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,o){t.ending=!0,T(e,t),o&&(t.finished?r.nextTick(o):e.once("finish",o));t.ended=!0,e.writable=!1}(this,n,o)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=f.destroy,y.prototype._undestroy=f.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,o(108),o(148).setImmediate,o(80))},function(e,t,o){"use strict";var n=o(168),i=o(275),r=o(276),s=o(277);r=o(276);function a(e,t,o,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=o,this.compression=n,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new r("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,o){return e.pipe(new s).pipe(new r("uncompressedSize")).pipe(t.compressWorker(o)).pipe(new r("compressedSize")).withStreamInfo("compression",t)},e.exports=a},function(e,t,o){"use strict";var n=o(64);var i=function(){for(var e,t=[],o=0;o<256;o++){e=o;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[o]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,o,n){var r=i,s=n+o;e^=-1;for(var a=n;a>>8^r[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,o,n){var r=i,s=n+o;e^=-1;for(var a=n;a>>8^r[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},function(e,t,o){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,o){"use strict";var n=o(364),i=o(219),r=o(149),s=o(289),a=o(366);function l(e,t,o){var n=this._refs[o];if("string"==typeof n){if(!this._refs[n])return l.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[o])instanceof s)return p(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,r,a,c=u.call(this,t,o);return c&&(i=c.schema,t=c.root,a=c.baseId),i instanceof s?r=i.validate||e.call(this,i.schema,t,void 0,a):void 0!==i&&(r=p(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,a)),r}function u(e,t){var o=n.parse(t),i=m(o),r=f(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==r){var a=y(i),l=this._refs[a];if("string"==typeof l)return c.call(this,e,l,o);if(l instanceof s)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[a])instanceof s))return;if(l.validate||this._compile(l),a==y(t))return{schema:l,root:e,baseId:r};e=l}if(!e.schema)return;r=f(this._getId(e.schema))}return d.call(this,o,r,e.schema,e)}function c(e,t,o){var n=u.call(this,e,t);if(n){var i=n.schema,r=n.baseId;e=n.root;var s=this._getId(i);return s&&(r=v(r,s)),d.call(this,o,r,i,e)}}e.exports=l,l.normalizeId=y,l.fullPath=f,l.url=v,l.ids=function(e){var t=y(this._getId(e)),o={"":t},s={"":f(t,!1)},l={},u=this;return a(e,{allKeys:!0},(function(e,t,a,c,h,d,g){if(""!==t){var p=u._getId(e),f=o[c],m=s[c]+"/"+h;if(void 0!==g&&(m+="/"+("number"==typeof g?g:r.escapeFragment(g))),"string"==typeof p){p=f=y(f?n.resolve(f,p):p);var _=u._refs[p];if("string"==typeof _&&(_=u._refs[_]),_&&_.schema){if(!i(e,_.schema))throw new Error('id "'+p+'" resolves to more than one schema')}else if(p!=y(m))if("#"==p[0]){if(l[p]&&!i(e,l[p]))throw new Error('id "'+p+'" resolves to more than one schema');l[p]=e}else u._refs[p]=m}o[t]=f,s[t]=m}})),l},l.inlineRef=p,l.schema=u;var h=r.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function d(e,t,o,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),s=1;s=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},k=function(e,t){return function(o,n){t(o,n,e)}},O=new g.f("accessibilityHelpWidgetVisible",!1),R=function(e){function t(t,o){var n=e.call(this)||this;return n._editor=t,n._widget=n._register(o.createInstance(P,n._editor)),n}return T(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.show=function(){this._widget.show()},t.prototype.hide=function(){this._widget.hide()},t.ID="editor.contrib.accessibilityHelpController",t=w([k(1,h.a)],t)}(r.a),L=i.a("noSelection","No selection"),N=i.a("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),I=i.a("singleSelection","Line {0}, Column {1}"),D=i.a("multiSelectionRange","{0} selections ({1} characters selected)"),A=i.a("multiSelection","{0} selections");var P=function(e){function t(t,o,n,r){var s=e.call(this)||this;return s._contextKeyService=o,s._keybindingService=n,s._openerService=r,s._editor=t,s._isVisibleKey=O.bindTo(s._contextKeyService),s._domNode=Object(u.b)(document.createElement("div")),s._domNode.setClassName("accessibilityHelpWidget"),s._domNode.setDisplay("none"),s._domNode.setAttribute("role","dialog"),s._domNode.setAttribute("aria-hidden","true"),s._contentDomNode=Object(u.b)(document.createElement("div")),s._contentDomNode.setAttribute("role","document"),s._domNode.appendChild(s._contentDomNode),s._isVisible=!1,s._register(s._editor.onDidLayoutChange((function(){s._isVisible&&s._layout()}))),s._register(a.j(s._contentDomNode.domNode,"keydown",(function(e){if(s._isVisible&&(e.equals(2083)&&(Object(b.a)(i.a("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'.")),s._editor.updateOptions({accessibilitySupport:"on"}),a.l(s._contentDomNode.domNode),s._buildContent(),s._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){Object(b.a)(i.a("openingDocs","Now opening the Editor Accessibility documentation page."));var t=s._editor.getRawConfiguration().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),s._openerService.open(C.a.parse(t)),e.preventDefault(),e.stopPropagation()}}))),s.onblur(s._contentDomNode.domNode,(function(){s.hide()})),s._editor.addOverlayWidget(s),s}return T(t,e),t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.getPosition=function(){return{preference:null}},t.prototype.show=function(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())},t.prototype._descriptionForCommand=function(e,t,o){var n=this._keybindingService.lookupKeybinding(e);return n?s.format(t,n.getAriaLabel()):s.format(o,e)},t.prototype._buildContent=function(){var e=this._editor.getConfiguration(),t=this._editor.getSelections(),o=0;if(t){var n=this._editor.getModel();n&&t.forEach((function(e){o+=n.getValueLengthInRange(e)}))}var r=function(e,t){return e&&0!==e.length?1===e.length?t?s.format(N,e[0].positionLineNumber,e[0].positionColumn,t):s.format(I,e[0].positionLineNumber,e[0].positionColumn):t?s.format(D,e.length,t):e.length>0?s.format(A,e.length):null:L}(t,o);switch(e.wrappingInfo.inDiffEditor?e.readOnly?r+=i.a("readonlyDiffEditor"," in a read-only pane of a diff editor."):r+=i.a("editableDiffEditor"," in a pane of a diff editor."):e.readOnly?r+=i.a("readonlyEditor"," in a read-only code editor"):r+=i.a("editableEditor"," in a code editor"),e.accessibilitySupport){case 0:var a=v.d?i.a("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."):i.a("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now.");r+="\n\n - "+a;break;case 2:r+="\n\n - "+i.a("auto_on","The editor is configured to be optimized for usage with a Screen Reader.");break;case 1:r+="\n\n - "+i.a("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),r+=" "+a}var u=i.a("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),c=i.a("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),h=i.a("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),d=i.a("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.");e.tabFocusMode?r+="\n\n - "+this._descriptionForCommand(m.ToggleTabFocusModeAction.ID,u,c):r+="\n\n - "+this._descriptionForCommand(m.ToggleTabFocusModeAction.ID,h,d),r+="\n\n - "+(v.d?i.a("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."):i.a("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility.")),r+="\n\n"+i.a("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),this._contentDomNode.domNode.appendChild(Object(l.a)(r)),this._contentDomNode.domNode.setAttribute("aria-label",r)},t.prototype.hide=function(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,a.l(this._contentDomNode.domNode),this._editor.focus())},t.prototype._layout=function(){var e=this._editor.getLayoutInfo(),o=Math.max(5,Math.min(t.WIDTH,e.width-40)),n=Math.max(5,Math.min(t.HEIGHT,e.height-40));this._domNode.setWidth(o),this._domNode.setHeight(n);var i=Math.round((e.height-n)/2);this._domNode.setTop(i);var r=Math.round((e.width-o)/2);this._domNode.setLeft(r)},t.ID="editor.contrib.accessibilityHelpWidget",t.WIDTH=500,t.HEIGHT=300,t=w([k(1,g.e),k(2,d.a),k(3,E.a)],t)}(c.a),x=function(e){function t(){return e.call(this,{id:"editor.action.showAccessibilityHelp",label:i.a("ShowAccessibilityHelpAction","Show Accessibility Help"),alias:"Show Accessibility Help",precondition:null,kbOpts:{kbExpr:p.a.focus,primary:S.k?2107:571,weight:100}})||this}return T(t,e),t.prototype.run=function(e,t){var o=R.get(t);o&&o.show()},t}(f.b);Object(f.h)(R),Object(f.f)(x);var M=f.c.bindToContribution(R.get);Object(f.g)(new M({id:"closeAccessibilityHelp",precondition:O,handler:function(e){return e.hide()},kbOpts:{weight:200,kbExpr:p.a.focus,primary:9,secondary:[1033]}})),Object(_.e)((function(e,t){var o=e.getColor(y.D);o&&t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: "+o+"; }");var n=e.getColor(y.rb);n&&t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px "+n+"; }");var i=e.getColor(y.e);i&&t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid "+i+"; }")}))},function(e,t,o){"use strict";o.r(t),o.d(t,"BracketMatchingController",(function(){return E}));o(430);var n,i=o(0),r=o(6),s=o(9),a=o(23),l=o(17),u=o(3),c=o(5),h=o(19),d=o(29),g=o(26),p=o(7),f=o(18),m=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),_=Object(p.kb)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},i.a("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),y=function(e){function t(){return e.call(this,{id:"editor.action.jumpToBracket",label:i.a("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:null,kbOpts:{kbExpr:c.a.editorTextFocus,primary:3160,weight:100}})||this}return m(t,e),t.prototype.run=function(e,t){var o=E.get(t);o&&o.jumpToBracket()},t}(u.b),v=function(e){function t(){return e.call(this,{id:"editor.action.selectToBracket",label:i.a("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var o=E.get(t);o&&o.selectToBracket()},t}(u.b),b=function(e,t){this.position=e,this.brackets=t},E=function(e){function t(t){var o=e.call(this)||this;return o._editor=t,o._lastBracketsData=[],o._lastVersionId=0,o._decorations=[],o._updateBracketsSoon=o._register(new l.c((function(){return o._updateBrackets()}),50)),o._matchBrackets=o._editor.getConfiguration().contribInfo.matchBrackets,o._updateBracketsSoon.schedule(),o._register(t.onDidChangeCursorPosition((function(e){o._matchBrackets&&o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeModelContent((function(e){o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeModel((function(e){o._decorations=[],o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeModelLanguageConfiguration((function(e){o._lastBracketsData=[],o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeConfiguration((function(e){o._matchBrackets=o._editor.getConfiguration().contribInfo.matchBrackets,!o._matchBrackets&&o._decorations.length>0&&(o._decorations=o._editor.deltaDecorations(o._decorations,[])),o._updateBracketsSoon.schedule()}))),o}return m(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.jumpToBracket=function(){var e=this._editor.getModel();if(e){var t=this._editor.getSelections().map((function(t){var o=t.getStartPosition(),n=e.matchBracket(o),i=null;if(n)n[0].containsPosition(o)?i=n[1].getStartPosition():n[1].containsPosition(o)&&(i=n[0].getStartPosition());else{var r=e.findNextBracket(o);r&&r.range&&(i=r.range.getStartPosition())}return i?new a.a(i.lineNumber,i.column,i.lineNumber,i.column):new a.a(o.lineNumber,o.column,o.lineNumber,o.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}},t.prototype.selectToBracket=function(){var e=this._editor.getModel();if(e){var t=[];this._editor.getSelections().forEach((function(o){var n=o.getStartPosition(),i=e.matchBracket(n),r=null,s=null;if(!i){var l=e.findNextBracket(n);l&&l.range&&(i=e.matchBracket(l.range.getStartPosition()))}i&&(i[0].startLineNumber===i[1].startLineNumber?(r=i[1].startColumn0&&(this._editor.setSelections(t),this._editor.revealRange(t[0]))}},t.prototype._updateBrackets=function(){if(this._matchBrackets){this._recomputeBrackets();for(var e=[],o=0,n=0,i=this._lastBracketsData.length;n1&&i.sort(s.a.compare);var c=[],h=0,d=0,g=o.length;for(a=0,l=i.length;a=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e,t){return function(o,n){t(o,n,e)}},v=function(){function e(e,t,o,n,i,r){var s=this;this._contextMenuService=t,this._contextViewService=o,this._contextKeyService=n,this._keybindingService=i,this._menuService=r,this._toDispose=[],this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.push(this._editor.onContextMenu((function(e){return s._onContextMenu(e)}))),this._toDispose.push(this._editor.onDidScrollChange((function(e){s._contextMenuIsBeingShownCount>0&&s._contextViewService.hideContextView()}))),this._toDispose.push(this._editor.onKeyDown((function(e){58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())})))}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._onContextMenu=function(e){if(!this._editor.getConfiguration().contribInfo.contextmenu)return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));var t;e.target.type!==f.b.OVERLAY_WIDGET&&(e.event.preventDefault(),(e.target.type===f.b.CONTENT_TEXT||e.target.type===f.b.CONTENT_EMPTY||e.target.type===f.b.TEXTAREA)&&(this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position),e.target.type!==f.b.TEXTAREA&&(t={x:e.event.posx,y:e.event.posy+1}),this.showContextMenu(t)))},e.prototype.showContextMenu=function(e){if(this._editor.getConfiguration().contribInfo.contextmenu)if(this._contextMenuService){var t=this._getMenuActions();t.length>0&&this._doShowContextMenu(t,e)}else this._editor.focus()},e.prototype._getMenuActions=function(){var e=[],t=this._menuService.createMenu(d.b.EditorContext,this._contextKeyService),o=t.getActions({arg:this._editor.getModel().uri});t.dispose();for(var n=0,i=o;n0&&this._contextViewService.hideContextView(),this._toDispose=Object(r.d)(this._toDispose)},e.ID="editor.contrib.contextmenu",e=_([y(1,u.a),y(2,u.b),y(3,h.e),y(4,c.a),y(5,d.a)],e)}(),b=function(e){function t(){return e.call(this,{id:"editor.action.showContextMenu",label:i.a("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:null,kbOpts:{kbExpr:g.a.textInputFocus,primary:1092,weight:100}})||this}return m(t,e),t.prototype.run=function(e,t){v.get(t).showContextMenu()},t}(p.b);Object(p.h)(v),Object(p.f)(b)},function(e,t,o){"use strict";o.r(t),o.d(t,"CursorUndoController",(function(){return c})),o.d(t,"CursorUndo",(function(){return h}));var n,i=o(0),r=o(3),s=o(6),a=o(5),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),u=function(){function e(e){this.selections=e}return e.prototype.equals=function(e){var t=this.selections.length;if(t!==e.selections.length)return!1;for(var o=0;o50&&o._undoStack.shift()),o._prevState=o._readState()}))),o}return l(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype._readState=function(){return this._editor.getModel()?new u(this._editor.getSelections()):null},t.prototype.getId=function(){return t.ID},t.prototype.cursorUndo=function(){for(var e=new u(this._editor.getSelections());this._undoStack.length>0;){var t=this._undoStack.pop();if(!t.equals(e))return this._isCursorUndo=!0,this._editor.setSelections(t.selections),this._editor.revealRangeInCenterIfOutsideViewport(t.selections[0],0),void(this._isCursorUndo=!1)}},t.ID="editor.contrib.cursorUndoController",t}(s.a),h=function(e){function t(){return e.call(this,{id:"cursorUndo",label:i.a("cursor.undo","Soft Undo"),alias:"Soft Undo",precondition:null,kbOpts:{kbExpr:a.a.textInputFocus,primary:2099,weight:100}})||this}return l(t,e),t.prototype.run=function(e,t,o){c.get(t).cursorUndo()},t}(r.b);Object(r.h)(c),Object(r.f)(h)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(3),s=o(96),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomIn",label:i.a("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:null})||this}return a(t,e),t.prototype.run=function(e,t){s.a.setZoomLevel(s.a.getZoomLevel()+1)},t}(r.b),u=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomOut",label:i.a("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:null})||this}return a(t,e),t.prototype.run=function(e,t){s.a.setZoomLevel(s.a.getZoomLevel()-1)},t}(r.b),c=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomReset",label:i.a("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:null})||this}return a(t,e),t.prototype.run=function(e,t){s.a.setZoomLevel(0)},t}(r.b);Object(r.f)(l),Object(r.f)(u),Object(r.f)(c)},function(e,t,o){"use strict";o.r(t);o(299);var n=o(0),i=o(17),r=o(13),s=o(71),a=o(10),l=o(89),u=o(2),c=o(11),h=o(16),d=o(3),g=o(164),p=o(6),f=o(133),m=o(19),_=o(7),y=o(90),v=o(154),b=o(209),E=o(9),C=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},S=function(e,t){return function(o,n){t(o,n,e)}},T=function(){function e(e,t,o){var n=this;this.textModelResolverService=t,this.modeService=o,this.toUnhook=[],this.decorations=[],this.editor=e,this.throttler=new i.e;var s=new b.a(e);this.toUnhook.push(s),this.toUnhook.push(s.onMouseMoveOrRelevantKeyDown((function(e){var t=e[0],o=e[1];n.startFindDefinition(t,o)}))),this.toUnhook.push(s.onExecute((function(e){n.isEnabled(e)&&n.gotoDefinition(e.target,e.hasSideBySideModifier).done((function(){n.removeDecorations()}),(function(e){n.removeDecorations(),Object(r.e)(e)}))}))),this.toUnhook.push(s.onCancel((function(){n.removeDecorations(),n.currentWordUnderMouse=null})))}return e.prototype.startFindDefinition=function(e,t){var o=this;if(!this.isEnabled(e,t))return this.currentWordUnderMouse=null,void this.removeDecorations();var i=e.target.position,l=i?this.editor.getModel().getWordAtPosition(i):null;if(!l)return this.currentWordUnderMouse=null,void this.removeDecorations();if(!this.currentWordUnderMouse||this.currentWordUnderMouse.startColumn!==l.startColumn||this.currentWordUnderMouse.endColumn!==l.endColumn||this.currentWordUnderMouse.word!==l.word){this.currentWordUnderMouse=l;var c=new y.a(this.editor,15);this.throttler.queue((function(){return c.validate(o.editor)?o.findDefinition(e.target):a.b.wrap(null)})).then((function(e){if(e&&e.length&&c.validate(o.editor))if(e.length>1)o.addDecoration(new u.a(i.lineNumber,l.startColumn,i.lineNumber,l.endColumn),(new s.a).appendText(n.a("multipleResults","Click to show {0} definitions.",e.length)));else{var t=e[0];if(!t.uri)return;o.textModelResolverService.createModelReference(t.uri).then((function(e){if(e.object&&e.object.textEditorModel){var n=e.object.textEditorModel,r=t.range.startLineNumber;if(0!==n.getLineMaxColumn(r)){var a,c=o.getPreviewValue(n,r);a=t.origin?u.a.lift(t.origin):new u.a(i.lineNumber,l.startColumn,i.lineNumber,l.endColumn),o.addDecoration(a,(new s.a).appendCodeblock(o.modeService.getModeIdByFilenameOrFirstLine(n.uri.fsPath),c)),e.dispose()}else e.dispose()}else e.dispose()}))}else o.removeDecorations()})).done(void 0,r.e)}},e.prototype.getPreviewValue=function(t,o){var n=this.getPreviewRangeBasedOnBrackets(t,o);return n.endLineNumber-n.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(t,o)),this.stripIndentationFromPreviewRange(t,o,n)},e.prototype.stripIndentationFromPreviewRange=function(e,t,o){for(var n=e.getLineFirstNonWhitespaceColumn(t),i=t+1;in)return new u.a(o,1,n+1,1);s=t.findNextBracket(new E.a(c,h))}return new u.a(o,1,n+1,1)},e.prototype.addDecoration=function(e,t){var o={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.decorations=this.editor.deltaDecorations(this.decorations,[o])},e.prototype.removeDecorations=function(){this.decorations.length>0&&(this.decorations=this.editor.deltaDecorations(this.decorations,[]))},e.prototype.isEnabled=function(e,t){return this.editor.getModel()&&e.isNoneOrSingleMouseDown&&e.target.type===h.b.CONTENT_TEXT&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey)&&c.e.has(this.editor.getModel())},e.prototype.findDefinition=function(e){var t=this.editor.getModel();return t?Object(g.a)(t,e.position):a.b.as(null)},e.prototype.gotoDefinition=function(e,t){var o=this;this.editor.setPosition(e.position);var n=new v.DefinitionAction(new v.DefinitionActionConfig(t,!1,!0,!1),{alias:void 0,label:void 0,id:void 0,precondition:void 0});return this.editor.invokeWithinContext((function(e){return n.run(e,o.editor)}))},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.toUnhook=Object(p.d)(this.toUnhook)},e.ID="editor.contrib.gotodefinitionwithmouse",e.MAX_SOURCE_PREVIEW_LINES=8,e=C([S(1,f.a),S(2,l.a)],e)}();Object(d.h)(T),Object(m.e)((function(e,t){var o=e.getColor(_.m);o&&t.addRule(".monaco-editor .goto-definition-link { color: "+o+" !important; }")}))},function(e,t,o){"use strict";o.r(t),o.d(t,"GotoLineEntry",(function(){return p})),o.d(t,"GotoLineAction",(function(){return f}));o(472);var n,i=o(0),r=o(124),s=o(97),a=o(5),l=o(16),u=o(161),c=o(3),h=o(9),d=o(2),g=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),p=function(e){function t(t,o,n){var i=e.call(this)||this;return i.editor=o,i.decorator=n,i._parseResult=i._parseInput(t),i}return g(t,e),t.prototype._parseInput=function(e){var t,o,n=e.split(",").map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}));t=0===n.length?new h.a(-1,-1):1===n.length?new h.a(n[0],1):new h.a(n[0],n[1]);var r=(o=Object(l.d)(this.editor)?this.editor.getModel():this.editor.getModel().modified).validatePosition(t).equals(t);return{position:t,isValid:r,label:r?t.column&&t.column>1?i.a("gotoLineLabelValidLineAndColumn","Go to line {0} and character {1}",t.lineNumber,t.column):i.a("gotoLineLabelValidLine","Go to line {0}",t.lineNumber,t.column):t.lineNumber<1||t.lineNumber>o.getLineCount()?i.a("gotoLineLabelEmptyWithLineLimit","Type a line number between 1 and {0} to navigate to",o.getLineCount()):i.a("gotoLineLabelEmptyWithLineAndColumnLimit","Type a character between 1 and {0} to navigate to",o.getLineMaxColumn(t.lineNumber))}},t.prototype.getLabel=function(){return this._parseResult.label},t.prototype.getAriaLabel=function(){return i.a("gotoLineAriaLabel","Go to line {0}",this._parseResult.label)},t.prototype.run=function(e,t){return e===s.a.OPEN?this.runOpen():this.runPreview()},t.prototype.runOpen=function(){if(!this._parseResult.isValid)return!1;var e=this.toSelection();return this.editor.setSelection(e),this.editor.revealRangeInCenter(e,0),this.editor.focus(),!0},t.prototype.runPreview=function(){if(!this._parseResult.isValid)return this.decorator.clearDecorations(),!1;var e=this.toSelection();return this.editor.revealRangeInCenter(e,0),this.decorator.decorateLine(e,this.editor),!1},t.prototype.toSelection=function(){return new d.a(this._parseResult.position.lineNumber,this._parseResult.position.column,this._parseResult.position.lineNumber,this._parseResult.position.column)},t}(r.a),f=function(e){function t(){return e.call(this,i.a("gotoLineActionInput","Type a line number, followed by an optional colon and a character number to navigate to"),{id:"editor.action.gotoLine",label:i.a("GotoLineAction.label","Go to Line..."),alias:"Go to Line...",precondition:null,kbOpts:{kbExpr:a.a.focus,primary:2085,mac:{primary:293},weight:100}})||this}return g(t,e),t.prototype.run=function(e,t){var o=this;this._show(this.getController(t),{getModel:function(e){return new r.c([new p(e,t,o.getController(t))])},getAutoFocus:function(e){return{autoFocusFirstEntry:e.length>0}}})},t}(u.a);Object(c.f)(f)},function(e,t,o){"use strict";o.r(t);o(478);var n,i=o(0),r=o(6),s=o(8),a=o(3),l=o(16),u=o(89),c=o(11),h=o(103),d=o(69),g=o(14),p=o(19),f=o(7),m=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),_=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e,t){return function(o,n){t(o,n,e)}},v=function(e){function t(t,o,n){var i=e.call(this)||this;return i._editor=t,i._standaloneThemeService=o,i._modeService=n,i._widget=null,i._register(i._editor.onDidChangeModel((function(e){return i.stop()}))),i._register(i._editor.onDidChangeModelLanguage((function(e){return i.stop()}))),i._register(c.y.onDidChange((function(e){return i.stop()}))),i}return m(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.dispose=function(){this.stop(),e.prototype.dispose.call(this)},t.prototype.launch=function(){this._widget||this._editor.getModel()&&(this._widget=new E(this._editor,this._standaloneThemeService,this._modeService))},t.prototype.stop=function(){this._widget&&(this._widget.dispose(),this._widget=null)},t.ID="editor.contrib.inspectTokens",t=_([y(1,h.a),y(2,u.a)],t)}(r.a),b=function(e){function t(){return e.call(this,{id:"editor.action.inspectTokens",label:i.a("inspectTokens","Developer: Inspect Tokens"),alias:"Developer: Inspect Tokens",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var o=v.get(t);o&&o.launch()},t}(a.b);var E=function(e){function t(t,o,n){var i,r=e.call(this)||this;return r.allowEditorOverflow=!0,r._editor=t,r._modeService=n,r._model=r._editor.getModel(),r._domNode=document.createElement("div"),r._domNode.className="tokens-inspect-widget",r._tokenizationSupport=(i=r._model.getLanguageIdentifier(),c.y.get(i.language)||{getInitialState:function(){return d.c},tokenize:function(e,t,o){return Object(d.d)(i.language,e,t,o)},tokenize2:function(e,t,o){return Object(d.e)(i.id,e,t,o)}}),r._compute(r._editor.getPosition()),r._register(r._editor.onDidChangeCursorPosition((function(e){return r._compute(r._editor.getPosition())}))),r._editor.addContentWidget(r),r}return m(t,e),t.prototype.dispose=function(){this._editor.removeContentWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t._ID},t.prototype._compute=function(e){for(var t=this._getTokensAtLine(e.lineNumber),o=0,n=t.tokens1.length-1;n>=0;n--){var i=t.tokens1[n];if(e.column-1>=i.offset){o=n;break}}var r=0;for(n=t.tokens2.length>>>1;n>=0;n--)if(e.column-1>=t.tokens2[n<<1]){r=n;break}var a="",l=this._model.getLineContent(e.lineNumber),u="";if(o'+function(e){for(var t="",o=0,n=e.length;o('+u.length+" "+(1===u.length?"char":"chars")+")",a+='
    ';var d=this._decodeMetadata(t.tokens2[1+(r<<1)]);a+='',a+='",a+='",a+='",a+='",a+='",a+="",a+='
    ',o'+Object(s.escape)(t.tokens1[o].type)+""),this._domNode.innerHTML=a,this._editor.layoutContentWidget(this)},t.prototype._decodeMetadata=function(e){var t=c.y.getColorMap(),o=c.x.getLanguageId(e),n=c.x.getTokenType(e),i=c.x.getFontStyle(e),r=c.x.getForeground(e),s=c.x.getBackground(e);return{languageIdentifier:this._modeService.getLanguageIdentifier(o),tokenType:n,fontStyle:i,foreground:t[r],background:t[s]}},t.prototype._tokenTypeToString=function(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx"}return"??"},t.prototype._fontStyleToString=function(e){var t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),0===t.length&&(t="---"),t},t.prototype._getTokensAtLine=function(e){var t=this._getStateBeforeLine(e),o=this._tokenizationSupport.tokenize(this._model.getLineContent(e),t,0),n=this._tokenizationSupport.tokenize2(this._model.getLineContent(e),t,0);return{startState:t,tokens1:o.tokens,tokens2:n.tokens,endState:o.endState}},t.prototype._getStateBeforeLine=function(e){for(var t=this._tokenizationSupport.getInitialState(),o=1;o1&&o.push(new d.a(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}},t.prototype.run=function(e,t){var o=this,n=t.getModel(),i=t.getSelections(),r=[];i.forEach((function(e){return o.getCursorsForSelection(e,n,r)})),r.length>0&&t.setSelections(r)},t}(c.b),w=function(e,t,o){this.selections=e,this.revealRange=t,this.revealScrollType=o},k=function(){function e(e,t,o,n,i,r,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=o,this.searchText=n,this.wholeWord=i,this.matchCase=r,this.currentMatch=s}return e.create=function(t,o){var n=o.getState();if(!t.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new e(t,o,!1,n.searchString,n.wholeWord,n.matchCase,null);var i,r,s=!1,a=t.getSelections();1===a.length&&a[0].isEmpty()?(s=!0,i=!0,r=!0):(i=n.wholeWord,r=n.matchCase);var l,u=t.getSelection(),c=null;if(u.isEmpty()){var h=t.getModel().getWordAtPosition(u.getStartPosition());if(!h)return null;l=h.word,c=new d.a(u.startLineNumber,h.startColumn,u.startLineNumber,h.endColumn)}else l=t.getModel().getValueInRange(u).replace(/\r\n/g,"\n");return new e(t,o,s,l,i,r,c)},e.prototype.addSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.concat(e),e,0)},e.prototype.moveSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getNextMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),o=t[t.length-1],n=this._editor.getModel().findNextMatch(this.searchText,o.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return n?new d.a(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null},e.prototype.addSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.concat(e),e,0)},e.prototype.moveSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getPreviousMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),o=t[t.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,o.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return n?new d.a(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null},e.prototype.selectAll=function(){return this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824)},e}(),O=function(e){function t(t){var o=e.call(this)||this;return o._editor=t,o._ignoreSelectionChange=!1,o._session=null,o._sessionDispose=[],o}return E(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this._endSession(),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype._beginSessionIfNeeded=function(e){var t=this;if(!this._session){var o=k.create(this._editor,e);if(!o)return;this._session=o;var n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose=[this._editor.onDidChangeCursorSelection((function(e){t._ignoreSelectionChange||t._endSession()})),this._editor.onDidBlurEditorText((function(){t._endSession()})),e.getState().onFindReplaceStateChange((function(e){(e.matchCase||e.wholeWord)&&t._endSession()}))]}},t.prototype._endSession=function(){if(this._sessionDispose=Object(r.d)(this._sessionDispose),this._session&&this._session.isDisconnectedFromFindController){this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1)}this._session=null},t.prototype._setSelections=function(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1},t.prototype._expandEmptyToWord=function(e,t){if(!t.isEmpty())return t;var o=e.getWordAtPosition(t.getStartPosition());return o?new d.a(t.startLineNumber,o.startColumn,t.startLineNumber,o.endColumn):t},t.prototype._applySessionResult=function(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))},t.prototype.getSession=function(e){return this._session},t.prototype.addSelectionToNextFindMatch=function(e){if(!this._session){var t=this._editor.getSelections();if(t.length>1){var o=e.getState().matchCase;if(!B(this._editor.getModel(),t,o)){for(var n=this._editor.getModel(),i=[],r=0,s=t.length;r0&&o.isRegex)t=this._editor.getModel().findMatches(o.searchString,!0,o.isRegex,o.matchCase,o.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(t.length>0){for(var n=this._editor.getSelection(),i=0,r=t.length;i1){var l=r.getState().matchCase;if(!B(t.getModel(),a,l))return null}s=k.create(t,r)}if(!s)return null;var u=null,c=f.h.has(o);if(s.currentMatch){if(c)return null;if(!t.getConfiguration().contribInfo.occurrencesHighlight)return null;u=s.currentMatch}if(/^[ \t]+$/.test(s.searchText))return null;if(s.searchText.length>200)return null;var h=r.getState(),d=h.matchCase;if(h.isRevealed){var g=h.searchString;d||(g=g.toLowerCase());var p=s.searchText;if(d||(p=p.toLowerCase()),g===p&&s.matchCase===h.matchCase&&s.wholeWord===h.wholeWord&&!h.isRegex)return null}return new x(u,s.searchText,s.matchCase,s.wholeWord?t.getConfiguration().wordSeparators:null)},t.prototype._setState=function(e){if(x.softEquals(this.state,e))this.state=e;else if(this.state=e,this.state){var o=this.editor.getModel();if(!o.isTooLargeForTokenization()){var n=f.h.has(o),i=o.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map((function(e){return e.range}));i.sort(h.a.compareRangesUsingStarts);var r=this.editor.getSelections();r.sort(h.a.compareRangesUsingStarts);for(var s=[],a=0,l=0,u=i.length,c=r.length;a=c)s.push(d),a++;else{var g=h.a.compareRangesUsingStarts(d,r[l]);g<0?(!r[l].isEmpty()&&h.a.areIntersecting(d,r[l])||s.push(d),a++):g>0?l++:(a++,l++)}}var p=s.map((function(e){return{range:e,options:n?t._SELECTION_HIGHLIGHT:t._SELECTION_HIGHLIGHT_OVERVIEW}}));this.decorations=this.editor.deltaDecorations(this.decorations,p)}}else this.decorations=this.editor.deltaDecorations(this.decorations,[])},t.prototype.dispose=function(){this._setState(null),e.prototype.dispose.call(this)},t.ID="editor.contrib.selectionHighlighter",t._SELECTION_HIGHLIGHT_OVERVIEW=_.a.register({stickiness:l.h.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight",overviewRuler:{color:Object(v.f)(y.gb),darkColor:Object(v.f)(y.gb),position:l.f.Center}}),t._SELECTION_HIGHLIGHT=_.a.register({stickiness:l.h.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight"}),t}(r.a);function B(e,t,o){for(var n=F(e,t[0],!o),i=1,r=t.length;i=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},R=function(e,t){return function(o,n){t(o,n,e)}},L={getMetaTitle:function(e){return e.references.length>1&&i.a("meta.titleReference"," – {0} references",e.references.length)}},N=function(){function e(e,t){e instanceof y.a&&d.a.inPeekEditor.bindTo(t)}return e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.ID="editor.contrib.referenceController",e=O([R(1,s.e)],e)}(),I=function(e){function t(){return e.call(this,{id:"editor.action.referenceSearch.trigger",label:i.a("references.action.label","Find All References"),alias:"Find All References",precondition:s.d.and(_.a.hasReferenceProvider,d.a.notInPeekEditor,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:1094,weight:100},menuOpts:{group:"navigation",order:1.5}})||this}return k(t,e),t.prototype.run=function(e,t){var o=g.a.get(t);if(o){var n=t.getSelection(),i=t.getModel(),r=Object(f.i)((function(e){return P(i,n.getStartPosition(),e).then((function(e){return new p.c(e)}))}));o.toggleWidget(n,r,L)}},t}(u.b);Object(u.h)(N),Object(u.f)(I);function D(e,t){A(e,(function(e){return e.closeWidget()}))}function A(e,t){var o=Object(d.c)(e);if(o){var n=g.a.get(o);n&&t(n)}}function P(e,t,o){var n=c.r.ordered(e).map((function(o){return Object(f.h)((function(n){return o.provideReferences(e,t,{includeDeclaration:!0},n)})).then((function(e){if(Array.isArray(e))return e}),(function(e){Object(m.f)(e)}))}));return Promise.all(n).then((function(e){for(var t=[],o=0,n=e;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},p=function(e,t){return function(o,n){t(o,n,e)}},f=function(e){function t(t,o,n,i,r,s,a){return e.call(this,!0,t,o,n,i,r,s,a)||this}return d(t,e),t=g([p(1,s.e),p(2,i.a),p(3,c.a),p(4,r.a),p(5,l.a),p(6,a.b)],t)}(h.a);Object(u.h)(f)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(3),s=o(103),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(e){function t(){var t=e.call(this,{id:"editor.action.toggleHighContrast",label:i.a("toggleHighContrast","Toggle High Contrast Theme"),alias:"Toggle High Contrast Theme",precondition:null})||this;return t._originalThemeName=null,t}return a(t,e),t.prototype.run=function(e,t){var o=e.get(s.a);this._originalThemeName?(o.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=o.getTheme().themeName,o.setTheme("hc-black"))},t}(r.b);Object(r.f)(l)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(8),s=o(2),a=o(9),l=o(5),u=o(3),c=o(43),h=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),d=function(e){function t(){return e.call(this,{id:"editor.action.transposeLetters",label:i.a("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:l.a.writable,kbOpts:{kbExpr:l.a.textInputFocus,primary:0,mac:{primary:306},weight:100}})||this}return h(t,e),t.prototype.positionLeftOf=function(e,t){var o=e.column,n=e.lineNumber;return o>t.getLineMinColumn(n)?Object(r.isLowSurrogate)(t.getLineContent(n).charCodeAt(o-2))?o-=2:o-=1:n>1&&(n-=1,o=t.getLineMaxColumn(n)),new a.a(n,o)},t.prototype.positionRightOf=function(e,t){var o=e.column,n=e.lineNumber;return o0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())},t}(u.b);Object(u.f)(d)},function(e,t,o){"use strict";o.r(t),o.d(t,"editorWordHighlight",(function(){return S})),o.d(t,"editorWordHighlightStrong",(function(){return T})),o.d(t,"editorWordHighlightBorder",(function(){return w})),o.d(t,"editorWordHighlightStrongBorder",(function(){return k})),o.d(t,"overviewRulerWordHighlightForeground",(function(){return O})),o.d(t,"overviewRulerWordHighlightStrongForeground",(function(){return R})),o.d(t,"ctxHasWordHighlights",(function(){return L})),o.d(t,"getOccurrencesAtPosition",(function(){return N}));var n,i=o(0),r=o(17),s=o(13),a=o(2),l=o(3),u=o(11),c=o(6),h=o(7),d=o(19),g=o(35),p=o(26),f=o(12),m=o(5),_=o(25),y=o(18),v=o(48),b=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),E=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},C=function(e,t){return function(o,n){t(o,n,e)}},S=Object(h.kb)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},i.a("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque to not hide underlying decorations."),!0),T=Object(h.kb)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},i.a("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque to not hide underlying decorations."),!0),w=Object(h.kb)("editor.wordHighlightBorder",{light:null,dark:null,hc:h.b},i.a("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),k=Object(h.kb)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:h.b},i.a("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),O=Object(h.kb)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},i.a("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque to not hide underlying decorations."),!0),R=Object(h.kb)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},i.a("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque to not hide underlying decorations."),!0),L=new f.f("hasWordHighlights",!1);function N(e,t,o){var n=u.h.ordered(e);return Object(r.k)(n.map((function(n){return function(){return Promise.resolve(n.provideDocumentHighlights(e,t,o)).then(void 0,s.f)}})),(function(e){return!Object(_.k)(e)}))}Object(l.e)("_executeDocumentHighlights",(function(e,t){return N(e,t,v.a.None)}));var I=function(){function e(e,t){var o=this;this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=L.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getConfiguration().contribInfo.occurrencesHighlight,this.model=this.editor.getModel(),this.toUnhook=[],this.toUnhook.push(e.onDidChangeCursorPosition((function(e){o._ignorePositionChangeEvent||o.occurrencesHighlight&&o._onPositionChanged(e)}))),this.toUnhook.push(e.onDidChangeModel((function(e){o._stopAll(),o.model=o.editor.getModel()}))),this.toUnhook.push(e.onDidChangeModelContent((function(e){o._stopAll()}))),this.toUnhook.push(e.onDidChangeConfiguration((function(e){var t=o.editor.getConfiguration().contribInfo.occurrencesHighlight;o.occurrencesHighlight!==t&&(o.occurrencesHighlight=t,o._stopAll())}))),this._lastWordRange=null,this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return e.prototype.hasDecorations=function(){return this._decorationIds.length>0},e.prototype.restore=function(){this.occurrencesHighlight&&this._run()},e.prototype._getSortedHighlights=function(){var e=this;return this._decorationIds.map((function(t){return e.model.getDecorationRange(t)})).sort(a.a.compareRangesUsingStarts)},e.prototype.moveNext=function(){var e=this,t=this._getSortedHighlights(),o=t[(Object(_.h)(t,(function(t){return t.containsPosition(e.editor.getPosition())}))+1)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o)}finally{this._ignorePositionChangeEvent=!1}},e.prototype.moveBack=function(){var e=this,t=this._getSortedHighlights(),o=t[(Object(_.h)(t,(function(t){return t.containsPosition(e.editor.getPosition())}))-1+t.length)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o)}finally{this._ignorePositionChangeEvent=!1}},e.prototype._removeDecorations=function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))},e.prototype._stopAll=function(){this._lastWordRange=null,this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)},e.prototype._onPositionChanged=function(e){this.occurrencesHighlight&&e.reason===g.a.Explicit?this._run():this._stopAll()},e.prototype._run=function(){var e=this;if(u.h.has(this.model)){var t=this.editor.getSelection();if(t.startLineNumber===t.endLineNumber){var o=t.startLineNumber,n=t.startColumn,i=t.endColumn,l=this.model.getWordAtPosition({lineNumber:o,column:n});if(!l||l.startColumn>n||l.endColumn=i&&(h=!0)}if(this.lastCursorPositionChangeTime=(new Date).getTime(),h)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();var f=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=Object(r.i)((function(t){return N(e.model,e.editor.getPosition(),t)})),this.workerRequest.then((function(t){f===e.workerRequestTokenId&&(e.workerRequestCompleted=!0,e.workerRequestValue=t||[],e._beginRenderDecorations())}),s.e)}this._lastWordRange=c}}else this._stopAll()}else this._stopAll()},e.prototype._beginRenderDecorations=function(){var e=this,t=(new Date).getTime(),o=this.lastCursorPositionChangeTime+250;t>=o?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((function(){e.renderDecorations()}),o-t)},e.prototype.renderDecorations=function(){this.renderDecorationsTimer=-1;for(var t=[],o=0,n=this.workerRequestValue.length;o1)?r?r.apply(void 0,e.params.concat([d.token])):S.apply(void 0,[e.method].concat(e.params,[d.token])):r?r(e.params,d.token):S(e.method,e.params,d.token);f?m.then?m.then((function(o){delete L[p],t(o,e.method,c)}),(function(t){delete L[p],t instanceof a.ResponseError?n(t,e.method,c):t&&s.string(t.message)?n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,c):n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,c)})):(delete L[p],t(f,e.method,c)):(delete L[p],function(t,n,i){void 0===t&&(t=null);var r={jsonrpc:C,id:e.id,result:t};Y(r,n,i),o.write(r)}(f,e.method,c))}catch(o){delete L[p],o instanceof a.ResponseError?t(o,e.method,c):o&&s.string(o.message)?n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+o.message),e.method,c):n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,c)}}else n(new a.ResponseError(a.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,c)}(e):a.isNotificationMessage(e)?function(e){if(V())return;var t,o=void 0;if(e.method===d.type.method)t=function(e){var t=e.id,o=L[String(t)];o&&o.cancel()};else{var i=k[e.method];i&&(t=i.handler,o=i.type)}if(t||w)try{!function(e){if(N===g.Off||!l||e.method===f.type.method)return;var t=void 0;N===g.Verbose&&(t=e.params?"Params: "+JSON.stringify(e.params,null,4)+"\n\n":"No parameters provided.\n\n");l.log("Received notification '"+e.method+"'.",t)}(e),void 0===e.params||void 0!==o&&0===o.numberOfParams?t?t():w(e.method):s.array(e.params)&&(void 0===o||o.numberOfParams>1)?t?t.apply(void 0,e.params):w.apply(void 0,[e.method].concat(e.params)):t?t(e.params):w(e.method,e.params)}catch(t){t.message?n.error("Notification handler '"+e.method+"' failed with message: "+t.message):n.error("Notification handler '"+e.method+"' failed unexpectedly.")}else P.fire(e)}(e):a.isResponseMessage(e)?function(e){if(V())return;if(null===e.id)e.error?n.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):n.error("Received response message without id. No further error information provided.");else{var t=String(e.id),o=R[t];if(function(e,t){if(N===g.Off||!l)return;var o=void 0;N===g.Verbose&&(e.error&&e.error.data?o="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?o="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(o="No result returned.\n\n"));if(t){var n=e.error?" Request failed: "+e.error.message+" ("+e.error.code+").":"";l.log("Received response '"+t.method+" - ("+e.id+")' in "+(Date.now()-t.timerStart)+"ms."+n,o)}else l.log("Received response "+e.id+" without active response promise.",o)}(e,o),o){delete R[t];try{if(e.error){var i=e.error;o.reject(new a.ResponseError(i.code,i.message,i.data))}else{if(void 0===e.result)throw new Error("Should never happen.");o.resolve(e.result)}}catch(i){i.message?n.error("Response handler '"+o.method+"' failed with message: "+i.message):n.error("Response handler '"+o.method+"' failed unexpectedly.")}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));var t=e;if(s.string(t.id)||s.number(t.id)){var o=String(t.id),i=R[o];i&&i.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{j()}}()})))}t.onClose(W),t.onError((function(e){D.fire([e,void 0,void 0])})),o.onClose(W),o.onError((function(e){D.fire(e)}));var G=function(e){try{if(a.isNotificationMessage(e)&&e.method===d.type.method){var t=M(e.params.id),n=O.get(t);if(a.isRequestMessage(n)){var r=i&&i.cancelUndispatched?i.cancelUndispatched(n,F):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return O.delete(t),r.id=n.id,Y(r,e.method,Date.now()),void o.write(r)}}B(O,e)}finally{j()}};function z(e){if(N!==g.Off&&l){var t=void 0;N===g.Verbose&&e.params&&(t="Params: "+JSON.stringify(e.params,null,4)+"\n\n"),l.log("Sending request '"+e.method+" - ("+e.id+")'.",t)}}function K(e){if(N!==g.Off&&l){var t=void 0;N===g.Verbose&&(t=e.params?"Params: "+JSON.stringify(e.params,null,4)+"\n\n":"No parameters provided.\n\n"),l.log("Sending notification '"+e.method+"'.",t)}}function Y(e,t,o){if(N!==g.Off&&l){var n=void 0;N===g.Verbose&&(e.error&&e.error.data?n="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?n="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(n="No result returned.\n\n")),l.log("Sending response '"+t+" - ("+e.id+")'. Processing request took "+(Date.now()-o)+"ms",n)}}function X(){if(U())throw new v(m.Closed,"Connection is closed.");if(V())throw new v(m.Disposed,"Connection is disposed.")}function q(){if(!H())throw new Error("Call listen() first.")}function $(e){return void 0===e?null:e}function J(e,t){var o,n=e.numberOfParams;switch(n){case 0:o=null;break;case 1:o=$(t[0]);break;default:o=[];for(var i=0;i=o.length)o.copy(this.buffer,this.index,0,o.length);else{var s=(Math.ceil((this.index+o.length)/r)+1)*r;0===this.index?(this.buffer=e.allocUnsafe(s),o.copy(this.buffer,0,0,o.length)):this.buffer=e.concat([this.buffer.slice(0,this.index),o],s)}this.index+=o.length}tryReadHeaders(){let e=void 0,t=0;for(;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split(l).forEach(t=>{let o=t.indexOf(":");if(-1===o)throw new Error("Message header must separate key and value using :");let n=t.substr(0,o),i=t.substr(o+1).trim();e[n]=i});let o=t+4;return this.buffer=this.buffer.slice(o),this.index=this.index-o,e}tryReadContent(e){if(this.index{this.onData(e)}),this.readable.on("error",e=>this.fireError(e)),this.readable.on("close",()=>this.fireClose())}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){let e=this.buffer.tryReadHeaders();if(!e)return;let t=e["Content-Length"];if(!t)throw new Error("Header must provide a Content-Length property.");let o=parseInt(t);if(isNaN(o))throw new Error("Content-Length value must be a number.");this.nextMessageLength=o}var t=this.buffer.tryReadContent(this.nextMessageLength);if(null===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.messageToken++;var o=JSON.parse(t);this.callback(o)}}clearPartialMessageTimer(){this.partialMessageTimer&&(clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}t.StreamMessageReader=h;t.IPCMessageReader=class extends c{constructor(e){super(),this.process=e;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){this.process.on("message",e)}};t.SocketMessageReader=class extends h{constructor(e,t="utf-8"){super(e,t)}}}).call(this,o(120).Buffer)},function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const n=o(186),i=o(171);let r="Content-Length: ",s="\r\n";!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class a{constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,o){this.errorEmitter.fire([this.asError(e),t,o])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer recevied error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=a;t.StreamMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.writable=e,this.encoding=t,this.errorCount=0,this.writable.on("error",e=>this.fireError(e)),this.writable.on("close",()=>this.fireClose())}write(t){let o=JSON.stringify(t),n=e.byteLength(o,this.encoding),i=[r,n.toString(),s,s];try{this.writable.write(i.join(""),"ascii"),this.writable.write(o,this.encoding),this.errorCount=0}catch(e){this.errorCount++,this.fireError(e,t,this.errorCount)}}};t.IPCMessageWriter=class extends a{constructor(e){super(),this.process=e,this.errorCount=0,this.queue=[],this.sending=!1;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){try{this.process.send&&(this.sending=!0,this.process.send(e,void 0,void 0,t=>{this.sending=!1,t?(this.errorCount++,this.fireError(t,e,this.errorCount)):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())}))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}};t.SocketMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.socket=e,this.queue=[],this.sending=!1,this.encoding=t,this.errorCount=0,this.socket.on("error",e=>this.fireError(e)),this.socket.on("close",()=>this.fireClose())}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(t){let o=JSON.stringify(t),n=e.byteLength(o,this.encoding),i=[r,n.toString(),s,s];try{this.sending=!0,this.socket.write(i.join(""),"ascii",e=>{e&&this.handleError(e,t);try{this.socket.write(o,this.encoding,e=>{this.sending=!1,e?this.handleError(e,t):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())})}catch(e){this.handleError(e,t)}})}catch(e){this.handleError(e,t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}}}).call(this,o(120).Buffer)},function(e,t,o){"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&i(e.then)}},function(e,t,o){"use strict";o.r(t);var n=o(0),i=o(13),r=o(25),s=o(6),a=o(22),l=o(12),u=o(37),c=o(5),h=o(3),d=o(58),g=o(53),p=o(2),f=o(114),m=o(139),_=o(47),y=o(17),v=o(4),b=o(79),E=o(35),C=o(23),S=o(11),T=o(111),w=o(27),k=function(){function e(t,o,n,i){void 0===i&&(i=w.a.contribInfo.suggest),this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=o,this._options=i,this._refilterKind=1,this._lineContext=n,"top"===i.snippets?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===i.snippets&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return e.prototype.dispose=function(){for(var e=new Set,t=0,o=this._items;t2e3?T.c:T.d,a=0;at.score?-1:e.scoret.idx?1:0},e._compareCompletionItemsSnippetsDown=function(t,o){if(t.suggestion.type!==o.suggestion.type){if("snippet"===t.suggestion.type)return 1;if("snippet"===o.suggestion.type)return-1}return e._compareCompletionItems(t,o)},e._compareCompletionItemsSnippetsUp=function(t,o){if(t.suggestion.type!==o.suggestion.type){if("snippet"===t.suggestion.type)return-1;if("snippet"===o.suggestion.type)return 1}return e._compareCompletionItems(t,o)},e}(),O=function(){function e(e,t,o){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=o}return e.shouldAutoTrigger=function(e){var t=e.getModel();if(!t)return!1;var o=e.getPosition();t.tokenizeIfCheap(o.lineNumber);var n=t.getWordAtPosition(o);return!!n&&(n.endColumn===o.column&&!!isNaN(Number(n.word)))},e}(),R=function(){function e(e){var t=this;this._toDispose=[],this._triggerQuickSuggest=new y.f,this._triggerRefilter=new y.f,this._onDidCancel=new v.a,this._onDidTrigger=new v.a,this._onDidSuggest=new v.a,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._editor=e,this._state=0,this._requestPromise=null,this._completionModel=null,this._context=null,this._currentSelection=this._editor.getSelection()||new C.a(1,1,1,1),this._toDispose.push(this._editor.onDidChangeModel((function(){t._updateTriggerCharacters(),t.cancel()}))),this._toDispose.push(this._editor.onDidChangeModelLanguage((function(){t._updateTriggerCharacters(),t.cancel()}))),this._toDispose.push(this._editor.onDidChangeConfiguration((function(){t._updateTriggerCharacters(),t._updateQuickSuggest()}))),this._toDispose.push(S.u.onDidChange((function(){t._updateTriggerCharacters(),t._updateActiveSuggestSession()}))),this._toDispose.push(this._editor.onDidChangeCursorSelection((function(e){t._onCursorChange(e)}))),this._toDispose.push(this._editor.onDidChangeModelContent((function(e){t._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}return e.prototype.dispose=function(){Object(s.d)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerCharacterListener,this._triggerQuickSuggest,this._triggerRefilter]),this._toDispose=Object(s.d)(this._toDispose),Object(s.d)(this._completionModel),this.cancel()},e.prototype._updateQuickSuggest=function(){this._quickSuggestDelay=this._editor.getConfiguration().contribInfo.quickSuggestionsDelay,(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)},e.prototype._updateTriggerCharacters=function(){var e=this;if(Object(s.d)(this._triggerCharacterListener),!this._editor.getConfiguration().readOnly&&this._editor.getModel()&&this._editor.getConfiguration().contribInfo.suggestOnTriggerCharacters){for(var t=Object.create(null),o=0,n=S.u.all(this._editor.getModel());othis._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){var t=this._completionModel.incomplete,o=this._completionModel.adopt(t);this.trigger({auto:2===this._state},!0,Object(b.d)(t),o)}else{var n=this._completionModel.lineContext,i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(O.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,isFrozen:i})}}else this.cancel()},e}(),L=(o(485),o(8)),N=o(1),I=o(125),D=(o(486),o(21)),A=o(94),P=o(15),x=o(66),M=o(51),B=o(50),F=o(30),H=o(81),U=o(42);function V(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};var o=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-o<=0?{start:0,end:0}:{start:o,end:n}}function W(e){return e.end-e.start<=0}function j(e,t){var o=[],n={start:e.start,end:Math.min(t.start,e.end)},i={start:Math.max(t.end,e.start),end:e.end};return W(n)||o.push(n),W(i)||o.push(i),o}function G(e,t){for(var o=[],n=0,i=t;n=r.range.end)){if(e.end=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};var Z={useShadows:!0,verticalScrollMode:U.b.Auto},Q=function(){function e(e,t,o,n){void 0===n&&(n=Z),this.virtualDelegate=t,this.renderers=new Map,this.splicing=!1,this.items=[],this.itemId=0,this.rangeMap=new Y;for(var i=0,r=o;i=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"dblclick"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"mousedown"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"contextmenu"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"touchstart"),(function(t){return e.toTouchEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.rowsContainer,x.a.Tap),(function(t){return e.toGestureEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),e.prototype.toMouseEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),o=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:o&&o.element}},e.prototype.toTouchEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),o=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:o&&o.element}},e.prototype.toGestureEvent=function(e){var t=this.getItemIndexFromEventTarget(e.initialTarget),o=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:o&&o.element}},e.prototype.onScroll=function(e){try{this.render(e.scrollTop,e.height)}catch(t){throw console.log("Got bad scroll event:",e),t}},e.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},e.prototype.onDragOver=function(e){this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=e.posy},e.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=N.w(this._domNode).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(void 0!==e.dragAndDropMouseY){var o=e.dragAndDropMouseY-t,n=0,i=e.renderHeight-35;o<35?n=Math.max(-14,.2*(o-35)):o>i&&(n=Math.min(14,.2*(o-i))),e.scrollTop+=n}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},e.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},e.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},e.prototype.getItemIndexFromEventTarget=function(e){for(;e instanceof HTMLElement&&e!==this.rowsContainer;){var t=e,o=t.getAttribute("data-index");if(o){var n=Number(o);if(!isNaN(n))return n}e=t.parentElement}return-1},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype.getNextToLastElement=function(e){var t=e[e.length-1];if(!t)return null;var o=this.items[t.end];return o&&o.row?o.row.domNode:null},e.prototype.dispose=function(){if(this.items){for(var e=0,t=this.items;e=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},re=function(){function e(e){this.trait=e,this.renderedElements=[]}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"template:"+this.trait.trait},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return e},e.prototype.renderElement=function(e,t,o){var n=Object(r.h)(this.renderedElements,(function(e){return e.templateData===o}));if(n>=0){var i=this.renderedElements[n];this.trait.unrender(o),i.index=t}else{i={index:t,templateData:o};this.renderedElements.push(i)}this.trait.renderIndex(t,o)},e.prototype.disposeElement=function(){},e.prototype.splice=function(e,t,o){for(var n=[],i=0;i=e+t&&n.push({index:r.index+o-t,templateData:r.templateData})}this.renderedElements=n},e.prototype.renderIndexes=function(e){for(var t=0,o=this.renderedElements;t-1&&this.trait.renderIndex(i,r)}},e.prototype.disposeTemplate=function(e){var t=Object(r.h)(this.renderedElements,(function(t){return t.templateData===e}));t<0||this.renderedElements.splice(t,1)},e}(),se=function(){function e(e){this._trait=e,this._onChange=new v.a,this.indexes=[]}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trait",{get:function(){return this._trait},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return new re(this)},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,o){var n=o.length-t,i=e+t,r=this.indexes.filter((function(t){return t=i})).map((function(e){return e+n})));this.renderer.splice(e,t,o.length),this.set(r)},e.prototype.renderIndex=function(e,t){N.N(t,this._trait,this.contains(e))},e.prototype.unrender=function(e){N.G(e,this._trait)},e.prototype.set=function(e){var t=this.indexes;this.indexes=e;var o=ve(t,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e}),t},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return this.indexes.some((function(t){return t===e}))},e.prototype.dispose=function(){this.indexes=null,this._onChange=Object(s.d)(this._onChange)},ie([A.a],e.prototype,"renderer",null),e}(),ae=function(e){function t(t){var o=e.call(this,"focused")||this;return o.getDomId=t,o}return ne(t,e),t.prototype.renderIndex=function(t,o){e.prototype.renderIndex.call(this,t,o),o.setAttribute("role","treeitem"),o.setAttribute("id",this.getDomId(t))},t}(se),le=function(){function e(e,t,o){this.trait=e,this.view=t,this.getId=o}return e.prototype.splice=function(e,t,o){var n=this;if(!this.getId)return this.trait.splice(e,t,o.map((function(e){return!1})));var i=this.trait.get().map((function(e){return n.getId(n.view.element(e))})),r=o.map((function(e){return i.indexOf(n.getId(e))>-1}));this.trait.splice(e,t,r)},e}();function ue(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}var ce=function(){function e(e,t,o){this.list=e,this.view=t;var n=!(!1===o.multipleSelectionSupport);this.disposables=[],this.openController=o.openController||pe;var i=Object(v.g)(Object(B.a)(t.domNode,"keydown")).filter((function(e){return!ue(e.target)})).map((function(e){return new M.a(e)}));i.filter((function(e){return 3===e.keyCode})).on(this.onEnter,this,this.disposables),i.filter((function(e){return 16===e.keyCode})).on(this.onUpArrow,this,this.disposables),i.filter((function(e){return 18===e.keyCode})).on(this.onDownArrow,this,this.disposables),i.filter((function(e){return 11===e.keyCode})).on(this.onPageUpArrow,this,this.disposables),i.filter((function(e){return 12===e.keyCode})).on(this.onPageDownArrow,this,this.disposables),i.filter((function(e){return 9===e.keyCode})).on(this.onEscape,this,this.disposables),n&&i.filter((function(e){return(P.d?e.metaKey:e.ctrlKey)&&31===e.keyCode})).on(this.onCtrlA,this,this.disposables)}return e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus()),this.openController.shouldOpen(e.browserEvent)&&this.list.open(this.list.getFocus(),e.browserEvent)},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onCtrlA=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Object(r.m)(this.list.length)),this.view.domNode.focus()},e.prototype.onEscape=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([]),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables)},e}(),he=function(){function e(e,t){this.list=e,this.view=t,this.disposables=[],this.disposables=[],Object(v.g)(Object(B.a)(t.domNode,"keydown")).filter((function(e){return!ue(e.target)})).map((function(e){return new M.a(e)})).filter((function(e){return!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)})).on(this.onTab,this,this.disposables)}return e.prototype.onTab=function(e){if(e.target===this.view.domNode){var t=this.list.getFocus();if(0!==t.length){var o=this.view.domElement(t[0]).querySelector("[tabIndex]");if(o&&o instanceof HTMLElement){var n=window.getComputedStyle(o);"hidden"!==n.visibility&&"none"!==n.display&&(e.preventDefault(),e.stopPropagation(),o.focus())}}}},e.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables)},e}();function de(e){return e instanceof MouseEvent&&2===e.button}var ge={isSelectionSingleChangeEvent:function(e){return P.d?e.browserEvent.metaKey:e.browserEvent.ctrlKey},isSelectionRangeChangeEvent:function(e){return e.browserEvent.shiftKey}},pe={shouldOpen:function(e){return!(e instanceof MouseEvent)||!de(e)}},fe=function(){function e(e,t,o){void 0===o&&(o={}),this.list=e,this.view=t,this.options=o,this.didJustPressContextMenuKey=!1,this.disposables=[],this.multipleSelectionSupport=!(!1===o.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=o.multipleSelectionController||ge),this.openController=o.openController||pe,t.onMouseDown(this.onMouseDown,this,this.disposables),t.onMouseClick(this.onPointer,this,this.disposables),t.onMouseDblClick(this.onDoubleClick,this,this.disposables),t.onTouchStart(this.onMouseDown,this,this.disposables),t.onTap(this.onPointer,this,this.disposables),x.b.addTarget(t.domNode)}return Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this,t=Object(v.g)(Object(B.a)(this.view.domNode,"keydown")).map((function(e){return new M.a(e)})).filter((function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode})).filter((function(e){return e.preventDefault(),e.stopPropagation(),!1})).event,o=Object(v.g)(Object(B.a)(this.view.domNode,"keyup")).filter((function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t})).filter((function(){return e.list.getFocus().length>0})).map((function(){var t=e.list.getFocus()[0];return{index:t,element:e.view.element(t),anchor:e.view.domElement(t)}})).filter((function(e){return!!e.anchor})).event,n=Object(v.g)(this.view.onContextMenu).filter((function(){return!e.didJustPressContextMenuKey})).map((function(e){var t=e.element,o=e.index,n=e.browserEvent;return{element:t,index:o,anchor:{x:n.clientX+1,y:n.clientY}}})).event;return Object(v.f)(t,o,n)},enumerable:!0,configurable:!0}),e.prototype.isSelectionSingleChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):P.d?e.browserEvent.metaKey:e.browserEvent.ctrlKey},e.prototype.isSelectionRangeChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey},e.prototype.isSelectionChangeEvent=function(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)},e.prototype.onMouseDown=function(e){!1===this.options.focusOnMouseDown?(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation()):document.activeElement!==e.browserEvent.target&&this.view.domNode.focus();var t=this.list.getFocus()[0],o=this.list.getSelection();if(t=void 0===t?o[0]:t,this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e))return this.changeSelection(e,t);var n=e.index;if(o.every((function(e){return e!==n}))&&this.list.setFocus([n]),this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return this.changeSelection(e,t);this.options.selectOnMouseDown&&!de(e.browserEvent)&&(this.list.setSelection([n]),this.openController.shouldOpen(e.browserEvent)&&this.list.open([n],e.browserEvent))},e.prototype.onPointer=function(e){if(!(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)||this.options.selectOnMouseDown)){var t=this.list.getFocus();this.list.setSelection(t),this.openController.shouldOpen(e.browserEvent)&&this.list.open(t,e.browserEvent)}},e.prototype.onDoubleClick=function(e){if(!this.multipleSelectionSupport||!this.isSelectionChangeEvent(e)){var t=this.list.getFocus();this.list.setSelection(t),this.list.pin(t)}},e.prototype.changeSelection=function(e,t){var o=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){var n=Math.min(t,o),i=Math.max(t,o),s=Object(r.m)(n,i+1),a=function(e,t){var o=e.indexOf(t);if(-1===o)return[];var n=[],i=o-1;for(;i>=0&&e[i]===t-(o-i);)n.push(e[i--]);n.reverse(),i=o;for(;i=e.length)o.push(t[i++]);else if(i>=t.length)o.push(e[n++]);else{if(e[n]===t[i]){n++,i++;continue}e[n]=e.length)o.push(t[i++]);else if(i>=t.length)o.push(e[n++]);else{if(e[n]===t[i]){o.push(e[n]),n++,i++;continue}e[n]this.view.length)throw new Error("Invalid start index: "+e);if(t<0)throw new Error("Invalid delete count: "+t);0===t&&0===o.length||this.eventBufferer.bufferEvents((function(){return n.spliceable.splice(e,t,o)}))},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.getContentHeight()},enumerable:!0,configurable:!0}),e.prototype.layout=function(e){this.view.layout(e)},e.prototype.setSelection=function(e){for(var t=0,o=e;t=this.length)throw new Error("Invalid index "+n)}e=e.sort(be),this.selection.set(e)},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.setFocus=function(e){for(var t=0,o=e;t=this.length)throw new Error("Invalid index "+n)}e=e.sort(be),this.focus.set(e)},e.prototype.focusNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),n=o.length>0?o[0]+e:0;this.setFocus(t?[n%this.length]:[Math.min(n,this.length-1)])}},e.prototype.focusPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),n=o.length>0?o[0]-e:0;t&&n<0&&(n=(this.length+n%this.length)%this.length),this.setFocus([Math.max(n,0)])}},e.prototype.focusNextPage=function(){var e=this,t=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);t=0===t?0:t-1;var o=this.view.element(t);if(this.getFocusedElements()[0]!==o)this.setFocus([t]);else{var n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(t)),this.view.getScrollTop()!==n&&setTimeout((function(){return e.focusNextPage()}),0)}},e.prototype.focusPreviousPage=function(){var e,t=this,o=this.view.getScrollTop();e=0===o?this.view.indexAt(o):this.view.indexAfter(o-1);var n=this.view.element(e);if(this.getFocusedElements()[0]!==n)this.setFocus([e]);else{var i=o;this.view.setScrollTop(o-this.view.renderHeight),this.view.getScrollTop()!==i&&setTimeout((function(){return t.focusPreviousPage()}),0)}},e.prototype.focusLast=function(){0!==this.length&&this.setFocus([this.length-1])},e.prototype.focusFirst=function(){0!==this.length&&this.setFocus([0])},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.getFocusedElements=function(){var e=this;return this.getFocus().map((function(t){return e.view.element(t)}))},e.prototype.reveal=function(e,t){if(e<0||e>=this.length)throw new Error("Invalid index "+e);var o,n,i,r=this.view.getScrollTop(),s=this.view.elementTop(e),a=this.view.elementHeight(e);if(Object(D.f)(t)){var l=a-this.view.renderHeight;this.view.setScrollTop(l*(o=t,n=0,i=1,Math.min(Math.max(o,n),i))+s)}else{var u=s+a,c=r+this.view.renderHeight;s=c&&this.view.setScrollTop(u-this.view.renderHeight)}},e.prototype.getElementDomId=function(e){return this.idPrefix+"_"+e},e.prototype.isDOMFocused=function(){return this.view.domNode===document.activeElement},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e,t){for(var o=this,n=0,i=e;n=this.length)throw new Error("Invalid index "+r)}this._onOpen.fire({indexes:e,elements:e.map((function(e){return o.view.element(e)})),browserEvent:t})},e.prototype.pin=function(e){for(var t=0,o=e;t=this.length)throw new Error("Invalid index "+n)}this._onPin.fire(e)},e.prototype.style=function(e){this.styleController.style(e)},e.prototype.toListEvent=function(e){var t=this,o=e.indexes;return{indexes:o,elements:o.map((function(e){return t.view.element(e)}))}},e.prototype._onFocusChange=function(){var e=this.focus.get();e.length>0?this.view.domNode.setAttribute("aria-activedescendant",this.getElementDomId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"),N.N(this.view.domNode,"element-focused",e.length>0)},e.prototype._onSelectionChange=function(){var e=this.selection.get();N.N(this.view.domNode,"selection-none",0===e.length),N.N(this.view.domNode,"selection-single",1===e.length),N.N(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDidDispose.fire(),this.disposables=Object(s.d)(this.disposables)},e.InstanceCount=0,ie([A.a],e.prototype,"onFocusChange",null),ie([A.a],e.prototype,"onSelectionChange",null),e}(),Se=o(61),Te=o(16),we=o(110),ke=o(118),Oe=o(19),Re=o(7),Le=o(55),Ne=o(160),Ie=o(89),De=o(82),Ae=o(48),Pe=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},Me=function(e,t){return function(o,n){t(o,n,e)}},Be=!1,Fe=Object(Re.kb)("editorSuggestWidget.background",{dark:Re.D,light:Re.D,hc:Re.D},n.a("editorSuggestWidgetBackground","Background color of the suggest widget.")),He=Object(Re.kb)("editorSuggestWidget.border",{dark:Re.E,light:Re.E,hc:Re.E},n.a("editorSuggestWidgetBorder","Border color of the suggest widget.")),Ue=Object(Re.kb)("editorSuggestWidget.foreground",{dark:Re.u,light:Re.u,hc:Re.u},n.a("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),Ve=Object(Re.kb)("editorSuggestWidget.selectedBackground",{dark:Re.W,light:Re.W,hc:Re.W},n.a("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),We=Object(Re.kb)("editorSuggestWidget.highlightForeground",{dark:Re.Y,light:Re.Y,hc:Re.Y},n.a("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),je=/^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i;function Ge(e){return e&&e.match(je)?e:null}function ze(e){if(!e)return!1;var t=e.suggestion;return!!t.documentation||t.detail&&t.detail!==t.label}var Ke=function(){function e(e,t,o){this.widget=e,this.editor=t,this.triggerKeybindingLabel=o}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"suggestion"},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,o=Object.create(null);o.disposables=[],o.root=e,o.icon=Object(N.k)(e,Object(N.a)(".icon")),o.colorspan=Object(N.k)(o.icon,Object(N.a)("span.colorspan"));var i=Object(N.k)(e,Object(N.a)(".contents")),r=Object(N.k)(i,Object(N.a)(".main"));o.highlightedLabel=new I.a(r),o.disposables.push(o.highlightedLabel),o.typeLabel=Object(N.k)(r,Object(N.a)("span.type-label")),o.readMore=Object(N.k)(r,Object(N.a)("span.readMore")),o.readMore.title=n.a("readMore","Read More...{0}",this.triggerKeybindingLabel);var s=function(){var e=t.editor.getConfiguration(),n=e.fontInfo.fontFamily,i=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",s=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";o.root.style.fontSize=i,r.style.fontFamily=n,r.style.lineHeight=s,o.icon.style.height=s,o.icon.style.width=s,o.readMore.style.height=s,o.readMore.style.width=s};return s(),Object(v.g)(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function(e){return e.fontInfo||e.contribInfo})).on(s,null,o.disposables),o},e.prototype.renderElement=function(e,t,o){var i=this,r=o,s=e.suggestion;if(ze(e)?r.root.setAttribute("aria-label",n.a("suggestionWithDetailsAriaLabel","{0}, suggestion, has details",s.label)):r.root.setAttribute("aria-label",n.a("suggestionAriaLabel","{0}, suggestion",s.label)),r.icon.className="icon "+s.type,r.colorspan.style.backgroundColor="","color"===s.type){var a=Ge(s.label)||"string"==typeof s.documentation&&Ge(s.documentation);a&&(r.icon.className="icon customcolor",r.colorspan.style.backgroundColor=a)}r.highlightedLabel.set(s.label,Object(T.b)(e.matches),"",!0),r.typeLabel.textContent=(s.detail||"").replace(/\n.*$/m,""),ze(e)?(Object(N.M)(r.readMore),r.readMore.onmousedown=function(e){e.stopPropagation(),e.preventDefault()},r.readMore.onclick=function(e){e.stopPropagation(),e.preventDefault(),i.widget.toggleDetails()}):(Object(N.A)(r.readMore),r.readMore.onmousedown=null,r.readMore.onclick=null)},e.prototype.disposeElement=function(){},e.prototype.disposeTemplate=function(e){e.disposables=Object(s.d)(e.disposables)},e}(),Ye=function(){function e(e,t,o,i,r){var a=this;this.widget=t,this.editor=o,this.markdownRenderer=i,this.triggerKeybindingLabel=r,this.borderWidth=1,this.disposables=[],this.el=Object(N.k)(e,Object(N.a)(".details")),this.disposables.push(Object(s.f)((function(){return e.removeChild(a.el)}))),this.body=Object(N.a)(".body"),this.scrollbar=new H.a(this.body,{}),Object(N.k)(this.el,this.scrollbar.getDomNode()),this.disposables.push(this.scrollbar),this.header=Object(N.k)(this.body,Object(N.a)(".header")),this.close=Object(N.k)(this.header,Object(N.a)("span.close")),this.close.title=n.a("readLess","Read less...{0}",this.triggerKeybindingLabel),this.type=Object(N.k)(this.header,Object(N.a)("p.type")),this.docs=Object(N.k)(this.body,Object(N.a)("p.docs")),this.ariaLabel=null,this.configureFont(),Object(v.g)(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function(e){return e.fontInfo})).on(this.configureFont,this,this.disposables),i.onDidRenderCodeBlock((function(){return a.scrollbar.scanDomNode()}),this,this.disposables)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.el},enumerable:!0,configurable:!0}),e.prototype.render=function(e){var t=this;if(this.renderDisposeable=Object(s.d)(this.renderDisposeable),!e||!ze(e))return this.type.textContent="",this.docs.textContent="",Object(N.f)(this.el,"no-docs"),void(this.ariaLabel=null);if(Object(N.G)(this.el,"no-docs"),"string"==typeof e.suggestion.documentation)Object(N.G)(this.docs,"markdown-docs"),this.docs.textContent=e.suggestion.documentation;else{Object(N.f)(this.docs,"markdown-docs"),this.docs.innerHTML="";var o=this.markdownRenderer.render(e.suggestion.documentation);this.renderDisposeable=o,this.docs.appendChild(o.element)}e.suggestion.detail?(this.type.innerText=e.suggestion.detail,Object(N.M)(this.type)):(this.type.innerText="",Object(N.A)(this.type)),this.el.style.height=this.header.offsetHeight+this.docs.offsetHeight+2*this.borderWidth+"px",this.close.onmousedown=function(e){e.preventDefault(),e.stopPropagation()},this.close.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.widget.toggleDetails()},this.body.scrollTop=0,this.scrollbar.scanDomNode(),this.ariaLabel=L.format("{0}\n{1}\n{2}",e.suggestion.label||"",e.suggestion.detail||"",e.suggestion.documentation||"")},e.prototype.getAriaLabel=function(){return this.ariaLabel},e.prototype.scrollDown=function(e){void 0===e&&(e=8),this.body.scrollTop+=e},e.prototype.scrollUp=function(e){void 0===e&&(e=8),this.body.scrollTop-=e},e.prototype.scrollTop=function(){this.body.scrollTop=0},e.prototype.scrollBottom=function(){this.body.scrollTop=this.body.scrollHeight},e.prototype.pageDown=function(){this.scrollDown(80)},e.prototype.pageUp=function(){this.scrollUp(80)},e.prototype.setBorderWidth=function(e){this.borderWidth=e},e.prototype.configureFont=function(){var e=this.editor.getConfiguration(),t=e.fontInfo.fontFamily,o=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",n=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";this.el.style.fontSize=o,this.type.style.fontFamily=t,this.close.style.height=n,this.close.style.width=n},e.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables),this.renderDisposeable=Object(s.d)(this.renderDisposeable)},e}(),Xe=function(){function e(e,t,o,n,i,r,s,a){var l=this;this.editor=e,this.telemetryService=t,this.allowEditorOverflow=!0,this.ignoreFocusEvents=!1,this.editorBlurTimeout=new y.f,this.showTimeout=new y.f,this.onDidSelectEmitter=new v.a,this.onDidFocusEmitter=new v.a,this.onDidHideEmitter=new v.a,this.onDidShowEmitter=new v.a,this.onDidSelect=this.onDidSelectEmitter.event,this.onDidFocus=this.onDidFocusEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDidShow=this.onDidShowEmitter.event,this.maxWidgetWidth=660,this.listWidth=330,this.storageServiceAvailable=!0,this.expandSuggestionDocs=!1,this.firstFocusInCurrentList=!1;var u=r.lookupKeybinding("editor.action.triggerSuggest"),c=u?" ("+u.getLabel()+")":"",h=new Ne.a(e,s,a);this.isAuto=!1,this.focusedItem=null,this.storageService=i,void 0===this.expandDocsSettingFromStorage()&&(this.storageService.store("expandSuggestionDocs",Be,Le.c.GLOBAL),void 0===this.expandDocsSettingFromStorage()&&(this.storageServiceAvailable=!1)),this.element=Object(N.a)(".editor-widget.suggest-widget"),this.editor.getConfiguration().contribInfo.iconsInSuggestions||Object(N.f)(this.element,"no-icons"),this.messageElement=Object(N.k)(this.element,Object(N.a)(".message")),this.listElement=Object(N.k)(this.element,Object(N.a)(".tree")),this.details=new Ye(this.element,this,this.editor,h,c);var d=new Ke(this,this.editor,c);this.list=new Ce(this.listElement,this,[d],{useShadows:!1,selectOnMouseDown:!0,focusOnMouseDown:!1,openController:{shouldOpen:function(){return!1}}}),this.toDispose=[Object(ke.b)(this.list,n,{listInactiveFocusBackground:Ve,listInactiveFocusOutline:Re.b}),n.onThemeChange((function(e){return l.onThemeChange(e)})),e.onDidBlurEditorText((function(){return l.onEditorBlur()})),e.onDidLayoutChange((function(){return l.onEditorLayoutChange()})),this.list.onSelectionChange((function(e){return l.onListSelection(e)})),this.list.onFocusChange((function(e){return l.onListFocus(e)})),this.editor.onDidChangeCursorSelection((function(){return l.onCursorSelectionChanged()}))],this.suggestWidgetVisible=_.a.Visible.bindTo(o),this.suggestWidgetMultipleSuggestions=_.a.MultipleSuggestions.bindTo(o),this.suggestionSupportsAutoAccept=_.a.AcceptOnKey.bindTo(o),this.editor.addContentWidget(this),this.setState(0),this.onThemeChange(n.getTheme())}return e.prototype.onCursorSelectionChanged=function(){0!==this.state&&this.editor.layoutContentWidget(this)},e.prototype.onEditorBlur=function(){var e=this;this.editorBlurTimeout.cancelAndSet((function(){e.editor.hasTextFocus()||e.setState(0)}),150)},e.prototype.onEditorLayoutChange=function(){3!==this.state&&5!==this.state||!this.expandDocsSettingFromStorage()||this.expandSideOrBelow()},e.prototype.onListSelection=function(e){var t=this;if(e.elements.length){var o=e.elements[0],i=e.indexes[0];o.resolve(Ae.a.None).then((function(){t.onDidSelectEmitter.fire({item:o,index:i,model:t.completionModel}),Object(d.a)(n.a("suggestionAriaAccepted","{0}, accepted",o.suggestion.label)),t.editor.focus()}))}},e.prototype._getSuggestionAriaAlertLabel=function(e){return ze(e)?n.a("ariaCurrentSuggestionWithDetails","{0}, suggestion, has details",e.suggestion.label):n.a("ariaCurrentSuggestion","{0}, suggestion",e.suggestion.label)},e.prototype._ariaAlert=function(e){this._lastAriaAlertLabel!==e&&(this._lastAriaAlertLabel=e,this._lastAriaAlertLabel&&Object(d.a)(this._lastAriaAlertLabel))},e.prototype.onThemeChange=function(e){var t=e.getColor(Fe);t&&(this.listElement.style.backgroundColor=t.toString(),this.details.element.style.backgroundColor=t.toString(),this.messageElement.style.backgroundColor=t.toString());var o=e.getColor(He);o&&(this.listElement.style.borderColor=o.toString(),this.details.element.style.borderColor=o.toString(),this.messageElement.style.borderColor=o.toString(),this.detailsBorderColor=o.toString());var n=e.getColor(Re.H);n&&(this.detailsFocusBorderColor=n.toString()),this.details.setBorderWidth("hc"===e.type?2:1)},e.prototype.onListFocus=function(e){var t=this;if(!this.ignoreFocusEvents){if(!e.elements.length)return this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null,this.focusedItem=null),void this._ariaAlert(null);var o=e.elements[0];if(this._ariaAlert(this._getSuggestionAriaAlertLabel(o)),this.firstFocusInCurrentList=!this.focusedItem,o!==this.focusedItem){this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null);var n=e.indexes[0];this.suggestionSupportsAutoAccept.set(!o.suggestion.noAutoAccept),this.focusedItem=o,this.list.reveal(n),this.currentSuggestionDetails=Object(y.i)((function(e){return o.resolve(e)})),this.currentSuggestionDetails.then((function(){t.ignoreFocusEvents=!0,t.list.splice(n,1,[o]),t.list.setFocus([n]),t.ignoreFocusEvents=!1,t.expandDocsSettingFromStorage()?t.showDetails():Object(N.G)(t.element,"docs-side")})).catch(i.e).then((function(){t.focusedItem===o&&(t.currentSuggestionDetails=null)})),this.onDidFocusEmitter.fire({item:o,index:n,model:this.completionModel})}}},e.prototype.setState=function(t){if(this.element){var o=this.state!==t;switch(this.state=t,Object(N.N)(this.element,"frozen",4===t),t){case 0:Object(N.A)(this.messageElement,this.details.element,this.listElement),this.hide(),this.listHeight=0,o&&this.list.splice(0,this.list.length),this.focusedItem=null;break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,Object(N.A)(this.listElement,this.details.element),Object(N.M)(this.messageElement),Object(N.G)(this.element,"docs-side"),this.show(),this.focusedItem=null;break;case 2:this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,Object(N.A)(this.listElement,this.details.element),Object(N.M)(this.messageElement),Object(N.G)(this.element,"docs-side"),this.show(),this.focusedItem=null;break;case 3:case 4:Object(N.A)(this.messageElement),Object(N.M)(this.listElement),this.show();break;case 5:Object(N.A)(this.messageElement),Object(N.M)(this.details.element,this.listElement),this.show(),this._ariaAlert(this.details.getAriaLabel())}}},e.prototype.showTriggered=function(e){var t=this;0===this.state&&(this.isAuto=!!e,this.isAuto||(this.loadingTimeout=setTimeout((function(){t.loadingTimeout=null,t.setState(1)}),50)))},e.prototype.showSuggestions=function(e,t,o,n){if(this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.completionModel!==e&&(this.completionModel=e),o&&2!==this.state&&0!==this.state)this.setState(4);else{var i=this.completionModel.items.length,r=0===i;if(this.suggestWidgetMultipleSuggestions.set(i>1),r)n?this.setState(0):this.setState(2),this.completionModel=null;else{var s=this.completionModel.stats;s.wasAutomaticallyTriggered=!!n,this.telemetryService.publicLog("suggestWidget",Pe({},s,this.editor.getTelemetryData())),this.list.splice(0,this.list.length,this.completionModel.items),o?this.setState(4):this.setState(3),this.list.reveal(t,t),this.list.setFocus([t]),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}},e.prototype.selectNextPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}},e.prototype.selectNext=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}},e.prototype.selectLast=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollBottom(),!0;case 1:return!this.isAuto;default:return this.list.focusLast(),!0}},e.prototype.selectPreviousPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}},e.prototype.selectPrevious=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}},e.prototype.selectFirst=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollTop(),!0;case 1:return!this.isAuto;default:return this.list.focusFirst(),!0}},e.prototype.getFocusedItem=function(){if(0!==this.state&&2!==this.state&&1!==this.state)return{item:this.list.getFocusedElements()[0],index:this.list.getFocus()[0],model:this.completionModel}},e.prototype.toggleDetailsFocus=function(){5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)),this.telemetryService.publicLog("suggestWidget:toggleDetailsFocus",this.editor.getTelemetryData())},e.prototype.toggleDetails=function(){if(ze(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.updateExpandDocsSetting(!1),Object(N.A)(this.details.element),Object(N.G)(this.element,"docs-side"),Object(N.G)(this.element,"docs-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog("suggestWidget:collapseDetails",this.editor.getTelemetryData());else{if(3!==this.state&&5!==this.state&&4!==this.state)return;this.updateExpandDocsSetting(!0),this.showDetails(),this.telemetryService.publicLog("suggestWidget:expandDetails",this.editor.getTelemetryData())}},e.prototype.showDetails=function(){this.expandSideOrBelow(),Object(N.M)(this.details.element),this.details.render(this.list.getFocusedElements()[0]),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(),this.editor.focus(),this._ariaAlert(this.details.getAriaLabel())},e.prototype.show=function(){var e=this,t=this.updateListHeight();t!==this.listHeight&&(this.editor.layoutContentWidget(this),this.listHeight=t),this.suggestWidgetVisible.set(!0),this.showTimeout.cancelAndSet((function(){Object(N.f)(e.element,"visible"),e.onDidShowEmitter.fire(e)}),100)},e.prototype.hide=function(){this.suggestWidgetVisible.reset(),this.suggestWidgetMultipleSuggestions.reset(),Object(N.G)(this.element,"visible")},e.prototype.hideWidget=function(){clearTimeout(this.loadingTimeout),this.setState(0),this.onDidHideEmitter.fire(this)},e.prototype.getPosition=function(){return 0===this.state?null:{position:this.editor.getPosition(),preference:[Te.a.BELOW,Te.a.ABOVE]}},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.updateListHeight=function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{var t=this.list.contentHeight/this.unfocusedHeight;e=Math.min(t,12)*this.unfocusedHeight}return this.element.style.lineHeight=this.unfocusedHeight+"px",this.listElement.style.height=e+"px",this.list.layout(e),e},e.prototype.adjustDocsPosition=function(){var e=this.editor.getConfiguration().fontInfo.lineHeight,t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),o=Object(N.u)(this.editor.getDomNode()),n=o.left+t.left,i=o.top+t.top+t.height,r=Object(N.u)(this.element),s=r.left,a=r.top;sa&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop=this.details.element.offsetHeight-this.listElement.offsetHeight+"px")},e.prototype.expandSideOrBelow=function(){if(!ze(this.focusedItem)&&this.firstFocusInCurrentList)return Object(N.G)(this.element,"docs-side"),void Object(N.G)(this.element,"docs-below");var e=this.element.style.maxWidth.match(/(\d+)px/);!e||Number(e[1])=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},Je=function(e,t){return function(o,n){t(o,n,e)}},Ze=function(){function e(){}return e.prototype.select=function(e,t,o){if(0===o.length)return 0;for(var n=o[0].score,i=1;is&&c.type===l.type&&c.insertText===l.insertText&&(s=c.touch,r=a)}return-1===r?e.prototype.select.call(this,t,o,n):r},t.prototype.toJSON=function(){var e=[];return this._cache.forEach((function(t,o){e.push([o,t])})),e},t.prototype.fromJSON=function(e){this._cache.clear();for(var t=0,o=e;t0){this._seq=e[0][1].touch+1;for(var t=0,o=e;t=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},rt=function(e,t){return function(o,n){t(o,n,e)}},st=function(){function e(e,t,o){var n=this;this._disposables=[],this._activeAcceptCharacters=new Set,this._disposables.push(t.onDidShow((function(){return n._onItem(t.getFocusedItem())}))),this._disposables.push(t.onDidFocus(this._onItem,this)),this._disposables.push(t.onDidHide(this.reset,this)),this._disposables.push(e.onWillType((function(t){if(n._activeItem){var i=t[t.length-1];n._activeAcceptCharacters.has(i)&&e.getConfiguration().contribInfo.acceptSuggestionOnCommitCharacter&&o(n._activeItem)}})))}return e.prototype._onItem=function(e){if(e&&!Object(r.k)(e.item.suggestion.commitCharacters)){this._activeItem=e,this._activeAcceptCharacters.clear();for(var t=0,o=e.item.suggestion.commitCharacters;t0&&this._activeAcceptCharacters.add(n[0])}}else this.reset()},e.prototype.reset=function(){this._activeItem=void 0},e.prototype.dispose=function(){Object(s.d)(this._disposables)},e}(),at=function(){function e(e,t,o,n){var i=this;this._editor=e,this._commandService=t,this._contextKeyService=o,this._instantiationService=n,this._toDispose=[],this._model=new R(this._editor),this._memory=n.createInstance(ot,this._editor.getConfiguration().contribInfo.suggestSelection),this._toDispose.push(this._model.onDidTrigger((function(e){i._widget||i._createSuggestWidget(),i._widget.showTriggered(e.auto)}))),this._toDispose.push(this._model.onDidSuggest((function(e){var t=i._memory.select(i._editor.getModel(),i._editor.getPosition(),e.completionModel.items);i._widget.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}))),this._toDispose.push(this._model.onDidCancel((function(e){i._widget&&!e.retrigger&&i._widget.hideWidget()})));var r=_.a.AcceptSuggestionsOnEnter.bindTo(o),s=function(){var e=i._editor.getConfiguration().contribInfo,t=e.acceptSuggestionOnEnter,o=e.suggestSelection;r.set("on"===t||"smart"===t),i._memory.setMode(o)};this._toDispose.push(this._editor.onDidChangeConfiguration((function(e){return s()}))),s()}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._createSuggestWidget=function(){var e=this;this._widget=this._instantiationService.createInstance(Xe,this._editor),this._toDispose.push(this._widget.onDidSelect(this._onDidSelectItem,this));var t=new st(this._editor,this._widget,(function(t){return e._onDidSelectItem(t)}));this._toDispose.push(t,this._model.onDidSuggest((function(e){0===e.completionModel.items.length&&t.reset()})));var o=_.a.MakesTextEdit.bindTo(this._contextKeyService);this._toDispose.push(this._widget.onDidFocus((function(t){var n=t.item,i=e._editor.getPosition(),r=n.position.column-n.suggestion.overwriteBefore,s=i.column,a=!0;"smart"!==e._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter||2!==e._model.state||n.suggestion.command||n.suggestion.additionalTextEdits||"textmate"===n.suggestion.snippetType||s-r!==n.suggestion.insertText.length||(a=e._editor.getModel().getValueInRange({startLineNumber:i.lineNumber,startColumn:r,endLineNumber:i.lineNumber,endColumn:s})!==n.suggestion.insertText);o.set(a)}))),this._toDispose.push({dispose:function(){o.reset()}})},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._toDispose=Object(s.d)(this._toDispose),this._widget&&(this._widget.dispose(),this._widget=null),this._model&&(this._model.dispose(),this._model=null)},e.prototype._onDidSelectItem=function(e){var t;if(e&&e.item){var o=e.item,n=o.suggestion,r=o.position,s=this._editor.getPosition().column-r.column;this._editor.pushUndoStop(),Array.isArray(n.additionalTextEdits)&&this._editor.executeEdits("suggestController.additionalTextEdits",n.additionalTextEdits.map((function(e){return g.a.replace(p.a.lift(e.range),e.text)}))),this._memory.memorize(this._editor.getModel(),this._editor.getPosition(),e.item);var a=n.insertText;"textmate"!==n.snippetType&&(a=f.c.escape(a)),m.SnippetController2.get(this._editor).insert(a,n.overwriteBefore+s,n.overwriteAfter,!1,!1),this._editor.pushUndoStop(),n.command?n.command.id===lt.id?this._model.trigger({auto:!0},!0):((t=this._commandService).executeCommand.apply(t,[n.command.id].concat(n.command.arguments)).done(void 0,i.e),this._model.cancel()):this._model.cancel(),this._alertCompletionItem(e.item)}else this._model.cancel()},e.prototype._alertCompletionItem=function(e){var t=e.suggestion,o=n.a("arai.alert.snippet","Accepting '{0}' did insert the following text: {1}",t.label,t.insertText);Object(d.a)(o)},e.prototype.triggerSuggest=function(e){this._model.trigger({auto:!1},!1,e),this._editor.revealLine(this._editor.getPosition().lineNumber,0),this._editor.focus()},e.prototype.acceptSelectedSuggestion=function(){if(this._widget){var e=this._widget.getFocusedItem();this._onDidSelectItem(e)}},e.prototype.cancelSuggestWidget=function(){this._widget&&(this._model.cancel(),this._widget.hideWidget())},e.prototype.selectNextSuggestion=function(){this._widget&&this._widget.selectNext()},e.prototype.selectNextPageSuggestion=function(){this._widget&&this._widget.selectNextPage()},e.prototype.selectLastSuggestion=function(){this._widget&&this._widget.selectLast()},e.prototype.selectPrevSuggestion=function(){this._widget&&this._widget.selectPrevious()},e.prototype.selectPrevPageSuggestion=function(){this._widget&&this._widget.selectPreviousPage()},e.prototype.selectFirstSuggestion=function(){this._widget&&this._widget.selectFirst()},e.prototype.toggleSuggestionDetails=function(){this._widget&&this._widget.toggleDetails()},e.prototype.toggleSuggestionFocus=function(){this._widget&&this._widget.toggleDetailsFocus()},e.ID="editor.contrib.suggestController",e=it([rt(1,u.b),rt(2,l.e),rt(3,a.a)],e)}(),lt=function(e){function t(){return e.call(this,{id:t.id,label:n.a("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:l.d.and(c.a.writable,c.a.hasCompletionItemProvider),kbOpts:{kbExpr:c.a.textInputFocus,primary:2058,mac:{primary:266},weight:100}})||this}return nt(t,e),t.prototype.run=function(e,t){var o=at.get(t);o&&o.triggerSuggest()},t.id="editor.action.triggerSuggest",t}(h.b);Object(h.h)(at),Object(h.f)(lt);var ut=h.c.bindToContribution(at.get);Object(h.g)(new ut({id:"acceptSelectedSuggestion",precondition:_.a.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:2}})),Object(h.g)(new ut({id:"acceptSelectedSuggestionOnEnter",precondition:_.a.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:190,kbExpr:l.d.and(c.a.textInputFocus,_.a.AcceptSuggestionsOnEnter,_.a.MakesTextEdit),primary:3}})),Object(h.g)(new ut({id:"hideSuggestWidget",precondition:_.a.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:9,secondary:[1033]}})),Object(h.g)(new ut({id:"selectNextSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),Object(h.g)(new ut({id:"selectNextPageSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:12,secondary:[2060]}})),Object(h.g)(new ut({id:"selectLastSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectLastSuggestion()}})),Object(h.g)(new ut({id:"selectPrevSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),Object(h.g)(new ut({id:"selectPrevPageSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:11,secondary:[2059]}})),Object(h.g)(new ut({id:"selectFirstSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectFirstSuggestion()}})),Object(h.g)(new ut({id:"toggleSuggestionDetails",precondition:_.a.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:2058,mac:{primary:266}}})),Object(h.g)(new ut({id:"toggleSuggestionFocus",precondition:_.a.Visible,handler:function(e){return e.toggleSuggestionFocus()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:2570,mac:{primary:778}}}))},function(e,t,o){"use strict";o.r(t);o(476);var n=o(0),i=o(39),r=o(15),s=o(82),a=o(89),l=o(2),u=o(3),c=o(16),h=o(1),d=o(9),g=o(11),p=o(25),f=o(13),m=o(48);function _(e,t,o){var n=g.m.ordered(e).map((function(n){return Promise.resolve(n.provideHover(e,t,o)).then((function(e){return e&&(o=void 0!==(t=e).range,n=void 0!==t.contents&&t.contents&&t.contents.length>0,o&&n)?e:void 0;var t,o,n}),(function(e){Object(f.f)(e)}))}));return Promise.all(n).then((function(e){return Object(p.c)(e)}))}Object(u.e)("_executeHoverProvider",(function(e,t){return _(e,t,m.a.None)}));var y,v=o(17),b=function(){function e(t,o,n,i){var r=this;this._computer=t,this._state=0,this._hoverTime=e.HOVER_TIME,this._firstWaitScheduler=new v.c((function(){return r._triggerAsyncComputation()}),0),this._secondWaitScheduler=new v.c((function(){return r._triggerSyncComputation()}),0),this._loadingMessageScheduler=new v.c((function(){return r._showLoadingMessage()}),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=o,this._errorCallback=n,this._progressCallback=i}return e.prototype.setHoverTime=function(e){this._hoverTime=e},e.prototype._firstWaitTime=function(){return this._hoverTime/2},e.prototype._secondWaitTime=function(){return this._hoverTime/2},e.prototype._loadingMessageTime=function(){return 3*this._hoverTime},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Object(v.i)((function(t){return e._computer.computeAsync(t)})),this._asyncComputationPromise.then((function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)}),(function(t){return e._onError(t)}))):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):Object(f.e)(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0},e.HOVER_TIME=300,e}(),E=o(59),C=o(81),S=o(6),T=(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),w=function(e){function t(t,o){var n=e.call(this)||this;return n.disposables=[],n.allowEditorOverflow=!0,n._id=t,n._editor=o,n._isVisible=!1,n._containerDomNode=document.createElement("div"),n._containerDomNode.className="monaco-editor-hover hidden",n._containerDomNode.tabIndex=0,n._domNode=document.createElement("div"),n._domNode.className="monaco-editor-hover-content",n.scrollbar=new C.a(n._domNode,{}),n.disposables.push(n.scrollbar),n._containerDomNode.appendChild(n.scrollbar.getDomNode()),n.onkeydown(n._containerDomNode,(function(e){e.equals(9)&&n.hide()})),n._register(n._editor.onDidChangeConfiguration((function(e){e.fontInfo&&n.updateFont()}))),n._editor.onDidLayoutChange((function(e){return n.updateMaxHeight()})),n.updateMaxHeight(),n._editor.addContentWidget(n),n._showAtPosition=null,n}return T(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,Object(h.N)(this._containerDomNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._containerDomNode},t.prototype.showAt=function(e,t){this._showAtPosition=new d.a(e.lineNumber,e.column),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=t,t&&this._containerDomNode.focus()},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())},t.prototype.getPosition=function(){return this.isVisible?{position:this._showAtPosition,preference:[c.a.ABOVE,c.a.BELOW]}:null},t.prototype.dispose=function(){this._editor.removeContentWidget(this),this.disposables=Object(S.d)(this.disposables),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this;Array.prototype.slice.call(this._domNode.getElementsByClassName("code")).forEach((function(t){return e._editor.applyFontInfo(t)}))},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont(),this._editor.layoutContentWidget(this),this.onContentsChange()},t.prototype.onContentsChange=function(){this.scrollbar.scanDomNode()},t.prototype.updateMaxHeight=function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getConfiguration().fontInfo,o=t.fontSize,n=t.lineHeight;this._domNode.style.fontSize=o+"px",this._domNode.style.lineHeight=n+"px",this._domNode.style.maxHeight=e+"px"},t}(E.a),k=function(e){function t(t,o){var n=e.call(this)||this;return n._id=t,n._editor=o,n._isVisible=!1,n._domNode=document.createElement("div"),n._domNode.className="monaco-editor-hover hidden",n._domNode.setAttribute("aria-hidden","true"),n._domNode.setAttribute("role","presentation"),n._showAtLineNumber=-1,n._register(n._editor.onDidChangeConfiguration((function(e){e.fontInfo&&n.updateFont()}))),n._editor.addOverlayWidget(n),n}return T(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,Object(h.N)(this._domNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._domNode},t.prototype.showAt=function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),o=this._editor.getTopForLineNumber(this._showAtLineNumber),n=this._editor.getScrollTop(),i=this._editor.getConfiguration().lineHeight,r=o-n-(this._domNode.clientHeight-i)/2;this._domNode.style.left=t.glyphMarginLeft+t.glyphMarginWidth+"px",this._domNode.style.top=Math.max(Math.round(r),0)+"px"},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.getPosition=function(){return null},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),o=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(o).forEach((function(t){return e._editor.applyFontInfo(t)}))},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()},t}(E.a),O=o(71),R=o(26),L=o(4),N=function(){function e(e,t,o){this.presentationIndex=o,this._onColorFlushed=new L.a,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new L.a,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new L.a,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"presentation",{get:function(){return this.colorPresentations[this.presentationIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorPresentations",{get:function(){return this._colorPresentations},set:function(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var o=0;othis._editor.getModel().getLineCount())return[];var o=z.ColorDetector.get(this._editor),n=this._editor.getModel().getLineMaxColumn(t),i=this._editor.getLineDecorations(t),r=!1;return i.map((function(i){var s=i.range.startLineNumber===t?i.range.startColumn:1,a=i.range.endLineNumber===t?i.range.endColumn:n;if(s>e._range.startColumn||e._range.endColumn>a)return null;var u=new l.a(e._range.startLineNumber,s,e._range.startLineNumber,a),c=o.getColorData(i.range.getStartPosition());if(!r&&c){r=!0;var h=c.colorInfo,d=h.color,g=h.range;return new q(g,d,c.provider)}if(Object(O.b)(i.options.hoverMessage))return null;var p=void 0;return i.options.hoverMessage&&(p=Array.isArray(i.options.hoverMessage)?i.options.hoverMessage.slice():[i.options.hoverMessage]),{contents:p,range:u}})).filter((function(e){return!!e}))},e.prototype.onResult=function(e,t){this._result=t?e.concat(this._result.sort((function(e,t){return e instanceof q?-1:t instanceof q?1:0}))):this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{range:this._range,contents:[(new O.a).appendText(n.a("modesContentHover.loading","Loading..."))]}},e}(),J=function(e){function t(o,n,i){var r=e.call(this,t.ID,o)||this;return r._themeService=i,r.renderDisposable=S.a.None,r._computer=new $(r._editor),r._highlightDecorations=[],r._isChangingDecorations=!1,r._markdownRenderer=n,r._register(n.onDidRenderCodeBlock(r.onContentsChange,r)),r._hoverOperation=new b(r._computer,(function(e){return r._withResult(e,!0)}),null,(function(e){return r._withResult(e,!1)})),r._register(h.j(r.getDomNode(),h.d.FOCUS,(function(){r._colorPicker&&h.f(r.getDomNode(),"colorpicker-hover")}))),r._register(h.j(r.getDomNode(),h.d.BLUR,(function(){h.G(r.getDomNode(),"colorpicker-hover")}))),r._register(o.onDidChangeConfiguration((function(e){r._hoverOperation.setHoverTime(r._editor.getConfiguration().contribInfo.hover.delay)}))),r}return Y(t,e),t.prototype.dispose=function(){this.renderDisposable.dispose(),this.renderDisposable=S.a.None,this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))},t.prototype.startShowingAt=function(e,t,o){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition.lineNumber!==e.startLineNumber)this.hide();else{for(var n=[],i=0,r=this._messages.length;i=e.endColumn&&n.push(s)}if(n.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(var o=0;o0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,o){var n=this;this.renderDisposable.dispose(),this._colorPicker=null;var i,r=Number.MAX_VALUE,s=o[0].range,a=document.createDocumentFragment(),u=!0,c=!1;o.forEach((function(t){if(t.range)if(r=Math.min(r,t.range.startColumn),s=l.a.plusRange(s,t.range),t instanceof q){c=!0;var o=t.color,h=o.red,g=o.green,p=o.blue,f=o.alpha,_=new A.c(255*h,255*g,255*p,f),y=new A.a(_),v=n._editor.getModel(),b=new l.a(t.range.startLineNumber,t.range.startColumn,t.range.endLineNumber,t.range.endColumn),E={range:t.range,color:t.color},C=new N(y,[],0),T=new G(a,C,n._editor.getConfiguration().pixelRatio,n._themeService);Object(K.a)(v,E,t.provider,m.a.None).then((function(o){C.colorPresentations=o;var s=n._editor.getModel().getValueInRange(t.range);C.guessColorPresentation(y,s);var u=function(){var e,t;C.presentation.textEdit?(e=[C.presentation.textEdit],t=(t=new l.a(C.presentation.textEdit.range.startLineNumber,C.presentation.textEdit.range.startColumn,C.presentation.textEdit.range.endLineNumber,C.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+C.presentation.textEdit.text.length)):(e=[{identifier:null,range:b,text:C.presentation.label,forceMoveMarkers:!1}],t=b.setEndPosition(b.endLineNumber,b.startColumn+C.presentation.label.length)),n._editor.executeEdits("colorpicker",e),C.presentation.additionalTextEdits&&(e=C.presentation.additionalTextEdits.slice(),n._editor.executeEdits("colorpicker",e),n.hide()),n._editor.pushUndoStop(),b=t},c=function(e){return Object(K.a)(v,{range:b,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},t.provider,m.a.None).then((function(e){C.colorPresentations=e}))},h=C.onColorFlushed((function(e){c(e).then(u)})),g=C.onDidChangeColor(c);n._colorPicker=T,n.showAt(new d.a(e.startLineNumber,r),n._shouldFocus),n.updateContents(a),n._colorPicker.layout(),n.renderDisposable=Object(S.c)([h,g,T,i])}))}else t.contents.filter((function(e){return!Object(O.b)(e)})).forEach((function(e){var t=n._markdownRenderer.render(e);i=t,a.appendChild(X("div.hover-row",null,t.element)),u=!1}))})),c||u||(this.showAt(new d.a(e.startLineNumber,r),this._shouldFocus),this.updateContents(a)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[{range:s,options:t._DECORATION_OPTIONS}]),this._isChangingDecorations=!1},t.ID="editor.contrib.modesContentHoverWidget",t._DECORATION_OPTIONS=R.a.register({className:"hoverHighlight"}),t}(w);var Z=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Q=function(){function e(e){this._editor=e,this._lineNumber=-1}return e.prototype.setLineNumber=function(e){this._lineNumber=e,this._result=[]},e.prototype.clearResult=function(){this._result=[]},e.prototype.computeSync=function(){for(var e=function(e){return{value:e}},t=this._editor.getLineDecorations(this._lineNumber),o=[],n=0,i=t.length;n0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){var o=this;Object(S.d)(this._renderDisposeables),this._renderDisposeables=[];var n=document.createDocumentFragment();t.forEach((function(e){var t=o._markdownRenderer.render(e.value);o._renderDisposeables.push(t),n.appendChild(Object(h.a)("div.hover-row",null,t.element))})),this.updateContents(n),this.showAt(e)},t.ID="editor.contrib.modesGlyphHoverWidget",t}(k),te=o(5),oe=o(160);o.d(t,"ModesHoverController",(function(){return se}));var ne=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),ie=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},re=function(e,t){return function(o,n){t(o,n,e)}},se=function(){function e(e,t,o,n){var i=this;this._editor=e,this._openerService=t,this._modeService=o,this._themeService=n,this._toUnhook=[],this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((function(e){e.contribInfo&&(i._hideWidgets(),i._unhookEvents(),i._hookEvents())}))}return Object.defineProperty(e.prototype,"contentWidget",{get:function(){return this._contentWidget||this._createHoverWidget(),this._contentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphWidget",{get:function(){return this._glyphWidget||this._createHoverWidget(),this._glyphWidget},enumerable:!0,configurable:!0}),e.get=function(t){return t.getContribution(e.ID)},e.prototype._hookEvents=function(){var e=this,t=function(){return e._hideWidgets()},o=this._editor.getConfiguration().contribInfo.hover;this._isHoverEnabled=o.enabled,this._isHoverSticky=o.sticky,this._isHoverEnabled?(this._toUnhook.push(this._editor.onMouseDown((function(t){return e._onEditorMouseDown(t)}))),this._toUnhook.push(this._editor.onMouseUp((function(t){return e._onEditorMouseUp(t)}))),this._toUnhook.push(this._editor.onMouseMove((function(t){return e._onEditorMouseMove(t)}))),this._toUnhook.push(this._editor.onKeyDown((function(t){return e._onKeyDown(t)}))),this._toUnhook.push(this._editor.onDidChangeModelDecorations((function(){return e._onModelDecorationsChanged()})))):this._toUnhook.push(this._editor.onMouseMove(t)),this._toUnhook.push(this._editor.onMouseLeave(t)),this._toUnhook.push(this._editor.onDidChangeModel(t)),this._toUnhook.push(this._editor.onDidScrollChange((function(t){return e._onEditorScrollChanged(t)})))},e.prototype._unhookEvents=function(){this._toUnhook=Object(S.d)(this._toUnhook)},e.prototype._onModelDecorationsChanged=function(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorScrollChanged=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()},e.prototype._onEditorMouseDown=function(e){this._isMouseDown=!0;var t=e.target.type;t!==c.b.CONTENT_WIDGET||e.target.detail!==J.ID?t===c.b.OVERLAY_WIDGET&&e.target.detail===ee.ID||(t!==c.b.OVERLAY_WIDGET&&e.target.detail!==ee.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0},e.prototype._onEditorMouseUp=function(e){this._isMouseDown=!1},e.prototype._onEditorMouseMove=function(e){var t=e.target.type,o=r.d?e.event.metaKey:e.event.ctrlKey;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible())&&(!this._isHoverSticky||t!==c.b.CONTENT_WIDGET||e.target.detail!==J.ID||o)&&(!this._isHoverSticky||t!==c.b.OVERLAY_WIDGET||e.target.detail!==ee.ID||o)){if(t===c.b.CONTENT_EMPTY){var n=this._editor.getConfiguration().fontInfo.typicalHalfwidthCharacterWidth/2,i=e.target.detail;i&&!i.isAfterLines&&"number"==typeof i.horizontalDistanceToText&&i.horizontalDistanceToTextg)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=o}return e.prototype.ensureParentIndices=function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var t=[],o=function(o,n){var i=t[t.length-1];return e.getStartLineNumber(i)<=o&&e.getEndLineNumber(i)>=n},n=0,i=this._startIndexes.length;n16777215||s>16777215)throw new Error("startLineNumber or endLineNumber must not exceed 16777215");for(;t.length>0&&!o(r,s);)t.pop();var a=t.length>0?t[t.length-1]:-1;t.push(n),this._startIndexes[n]=r+((255&a)<<24),this._endIndexes[n]=s+((65280&a)<<16)}}},Object.defineProperty(e.prototype,"length",{get:function(){return this._startIndexes.length},enumerable:!0,configurable:!0}),e.prototype.getStartLineNumber=function(e){return 16777215&this._startIndexes[e]},e.prototype.getEndLineNumber=function(e){return 16777215&this._endIndexes[e]},e.prototype.getType=function(e){return this._types?this._types[e]:void 0},e.prototype.hasTypes=function(){return!!this._types},e.prototype.isCollapsed=function(e){var t=e/32|0,o=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((4278190080&this._endIndexes[e])>>>16);return t===g?-1:t},e.prototype.contains=function(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t},e.prototype.findIndex=function(e){var t=0,o=this._startIndexes.length;if(0===o)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1},e.prototype.toString=function(){for(var e=[],t=0;t=this.endLineNumber},e.prototype.containsLine=function(e){return this.startLineNumber<=e&&e<=this.endLineNumber},e}(),m=function(){function e(e,t){this._updateEventEmitter=new d.a,this._textModel=e,this._decorationProvider=t,this._regions=new p(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}return Object.defineProperty(e.prototype,"regions",{get:function(){return this._regions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textModel",{get:function(){return this._textModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this._isInitialized},enumerable:!0,configurable:!0}),e.prototype.toggleCollapseState=function(e){var t=this;if(e.length){var o={};this._decorationProvider.changeDecorations((function(n){for(var i=0,r=e;i=h))break;i(a,c===h),a++}}l=s()}for(;a0?e:null},e.prototype.applyMemento=function(e){if(Array.isArray(e)){for(var t=[],o=0,n=e;o=0;){var r=this._regions.toRegion(n);t&&!t(r,i)||o.push(r),i++,n=r.parentIndex}return o},e.prototype.getRegionAtLine=function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null},e.prototype.getRegionsInside=function(e,t){for(var o=[],n=t&&2===t.length,i=n?[]:null,r=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE,a=r,l=this._regions.length;a0&&!u.containedBy(i[i.length-1]);)i.pop();i.push(u),t(u,i.length)&&o.push(u)}else t&&!t(u)||o.push(u)}return o},e}();function _(e,t,o,n){void 0===o&&(o=Number.MAX_VALUE);var i=[];if(n&&n.length>0)for(var r=0,s=n;r1)){var u=e.getRegionsInside(l,(function(e,n){return e.isCollapsed!==t&&n=0;s--)if(o!==i.isCollapsed(s)){var a=i.getStartLineNumber(s);t.test(n.getLineContent(a))&&r.push(i.toRegion(s))}e.toggleCollapseState(r)}function b(e,t,o){for(var n=e.regions,i=[],r=n.length-1;r>=0;r--)o!==n.isCollapsed(r)&&t===n.getType(r)&&i.push(n.toRegion(r));e.toggleCollapseState(i)}var E=o(18),C=o(26),S=function(){function e(e){this.editor=e,this.autoHideFoldingControls=!0}return e.prototype.getDecorationOption=function(t){return t?e.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:e.EXPANDED_VISUAL_DECORATION},e.prototype.deltaDecorations=function(e,t){return this.editor.deltaDecorations(e,t)},e.prototype.changeDecorations=function(e){return this.editor.changeDecorations(e)},e.COLLAPSED_VISUAL_DECORATION=C.a.register({stickiness:E.h.NeverGrowsWhenTypingAtEdges,afterContentClassName:"inline-folded",linesDecorationsClassName:"folding collapsed"}),e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=C.a.register({stickiness:E.h.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding"}),e.EXPANDED_VISUAL_DECORATION=C.a.register({stickiness:E.h.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding alwaysShowFoldIcons"}),e}(),T=o(5),w=o(2),k=o(25),O=function(){function e(e){var t=this;this._updateEventEmitter=new d.a,this._foldingModel=e,this._foldingModelListener=e.onDidChange((function(e){return t.updateHiddenRanges()})),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenRanges",{get:function(){return this._hiddenRanges},enumerable:!0,configurable:!0}),e.prototype.updateHiddenRanges=function(){for(var e=!1,t=[],o=0,n=0,i=Number.MAX_VALUE,r=-1,s=this._foldingModel.regions;o0},e.prototype.isHidden=function(e){return null!==R(this._hiddenRanges,e)},e.prototype.adjustSelections=function(e){for(var t=this,o=!1,n=this._foldingModel.textModel,i=null,r=function(e){return i&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,i)||(i=R(t._hiddenRanges,e)),i?i.startLineNumber-1:null},s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)},e}();function R(e,t){var o=Object(k.f)(e,(function(e){return t=0&&e[o].endLineNumber>=t?e[o]:null}var L=o(32),N=5e3,I="indent",D=function(){function e(e){this.editorModel=e,this.id=I}return e.prototype.dispose=function(){},e.prototype.compute=function(e){var t=L.a.getFoldingRules(this.editorModel.getLanguageIdentifier().id),o=t&&t.offSide,n=t&&t.markers;return u.b.as(function(e,t,o,n){void 0===n&&(n=N);var i=e.getOptions().tabSize,r=new A(n),s=void 0;o&&(s=new RegExp("("+o.start.source+")|(?:"+o.end.source+")"));var a=[];a.push({indent:-1,line:e.getLineCount()+1,marker:!1});for(var l=e.getLineCount();l>0;l--){var u=e.getLineContent(l),c=C.b.computeIndentLevel(u,i),h=a[a.length-1];if(-1!==c){var d=void 0;if(s&&(d=u.match(s))){if(!d[1]){a.push({indent:-2,line:l,marker:!0});continue}for(var g=a.length-1;g>0&&!a[g].marker;)g--;if(g>0){a.length=g+1,h=a[g],r.insertFirst(l,h.line,c),h.marker=!1,h.indent=c,h.line=l;continue}}if(h.indent>c){do{a.pop(),h=a[a.length-1]}while(h.indent>c);var p=h.line-1;p-l>=1&&r.insertFirst(l,p,c)}h.indent===c?h.line=l:a.push({indent:c,line:l,marker:!1})}else t&&!h.marker&&(h.line=l)}return r.toIndentRanges(e)}(this.editorModel,o,n))},e}(),A=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.insertFirst=function(e,t,o){if(!(e>16777215||t>16777215)){var n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,o<1e3&&(this._indentOccurrences[o]=(this._indentOccurrences[o]||0)+1)}},e.prototype.toIndentRanges=function(e){if(this._length<=this._foldingRangesLimit){for(var t=new Uint32Array(this._length),o=new Uint32Array(this._length),n=this._length-1,i=0;n>=0;n--,i++)t[i]=this._startIndexes[n],o[i]=this._endIndexes[n];return new p(t,o)}var r=0,s=this._indentOccurrences.length;for(n=0;nthis._foldingRangesLimit){s=n;break}r+=a}}var l=e.getOptions().tabSize;for(t=new Uint32Array(this._foldingRangesLimit),o=new Uint32Array(this._foldingRangesLimit),n=this._length-1,i=0;n>=0;n--){var u=this._startIndexes[n],c=e.getLineContent(u),h=C.b.computeIndentLevel(c,l);(h0&&l.end>l.start&&l.end<=r&&n.push({start:l.start,end:l.end,rank:i,kind:l.kind})}}}),x.f)}));return u.b.join(i).then((function(e){return n}))}(this.providers,this.editorModel,e).then((function(e){return e?V(e,t.limit):null}))},e.prototype.dispose=function(){},e}();var U=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.add=function(e,t,o,n){if(!(e>16777215||t>16777215)){var i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._nestingLevels[i]=n,this._types[i]=o,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}},e.prototype.toIndentRanges=function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),o=0;othis._foldingRangesLimit){i=o;break}n+=r}}e=new Uint32Array(this._foldingRangesLimit),t=new Uint32Array(this._foldingRangesLimit);for(var s=[],a=(o=0,0);oi.start)if(l.end<=i.end)r.push(i),i=l,n.add(l.start,l.end,l.kind&&l.kind.value,r.length);else{if(l.start>i.end){do{i=r.pop()}while(i&&l.start>i.end);i&&r.push(i),i=l}n.add(l.start,l.end,l.kind&&l.kind.value,r.length)}}else i=l,n.add(l.start,l.end,l.kind&&l.kind.value,r.length)}return n.toIndentRanges()}var W="init",j=function(){function e(e,t,o,n){if(this.editorModel=e,this.id=W,t.length){this.decorationIds=e.deltaDecorations([],t.map((function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{stickiness:E.h.NeverGrowsWhenTypingAtEdges}}}))),this.timeout=setTimeout(o,n)}}return e.prototype.dispose=function(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e.prototype.compute=function(e){var t=[];if(this.decorationIds)for(var o=0,n=this.decorationIds;o0&&(this.rangeProvider=new H(e,o))}return this.foldingStateMemento=null,this.rangeProvider},e.prototype.getFoldingModel=function(){return this.foldingModelPromise},e.prototype.onModelContentChanged=function(){var e=this;this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((function(){if(!e.foldingModel)return null;var t=e.foldingRegionPromise=Object(s.i)((function(t){return e.getRangeProvider(e.foldingModel.textModel).compute(t)}));return u.b.wrap(t.then((function(o){if(o&&t===e.foldingRegionPromise){var n=e.editor.getSelections(),i=n?n.map((function(e){return e.startLineNumber})):[];e.foldingModel.update(o,i)}return e.foldingModel})))})))},e.prototype.onHiddenRangesChanges=function(e){if(e.length){var t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)},e.prototype.onCursorPositionChanged=function(){this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()},e.prototype.revealCursor=function(){var e=this;this.getFoldingModel().then((function(t){if(t){var o=e.editor.getSelections();if(o&&o.length>0){for(var n=[],i=function(o){var i=o.selectionStartLineNumber;e.hiddenRangeModel.isHidden(i)&&n.push.apply(n,t.getAllRegionsAtLine(i,(function(e){return e.isCollapsed&&i>e.startLineNumber})))},r=0,s=o;r=t._editor.getModel().getLineCount()&&t._futureFixes.cancel()}))),this._disposables.push(P.j(this._domNode,"click",(function(e){t._editor.focus();var o=P.u(t._domNode),n=o.top,i=o.height,r=t._editor.getConfiguration().lineHeight,s=Math.floor(r/3);t._position&&t._position.position.lineNumber0?n.isEmpty()&&e.every((function(e){return e.kind&&O.Refactor.contains(e.kind)}))?t.hide():t._show():t.hide()})).catch((function(e){t.hide()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._domNode.title},set:function(e){this._domNode.title=e},enumerable:!0,configurable:!0}),e.prototype._show=function(){var t=this._editor.getConfiguration();if(t.contribInfo.lightbulbEnabled){var o=this._model.position.lineNumber,n=this._editor.getModel();if(n){var i=n.getOptions().tabSize,r=n.getLineContent(o),s=U.b.computeIndentLevel(r,i),a=o;t.fontInfo.spaceWidth*s>22||(o>1?a-=1:a+=1),this._position={position:{lineNumber:a,column:1},preference:e._posPref},this._editor.layoutContentWidget(this)}}},e.prototype.hide=function(){this._position=null,this._model=null,this._futureFixes.cancel(),this._editor.layoutContentWidget(this)},e._posPref=[H.a.EXACT],e}(),W=(N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}N(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),j=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},G=function(e,t){return function(o,n){t(o,n,e)}},z=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},K=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=i)return null;for(var r=[],s=n;s<=i;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort((function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())})),!0===o&&(a=a.reverse()),{startLineNumber:n,endLineNumber:i,before:r,after:a}}var u=o(8),c=function(){function e(e,t){this.selection=e,this.cursors=t}return e.prototype.getEditOperations=function(e,t){for(var o=function(e,t){t.sort((function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber}));for(var o=t.length-2;o>=0;o--)t[o].lineNumber===t[o+1].lineNumber&&t.splice(o,1);for(var n=[],i=0,a=0,l=t.length,c=1,h=e.getLineCount();c<=h;c++){var d=e.getLineContent(c),g=d.length+1,p=0;if(!(a1&&(o-=1,i=e.getLineMaxColumn(o)),t.addTrackedEditOperation(new s.a(o,i,n,r),null)}},e.prototype.computeCursorState=function(e,t){var o=t.getInverseEditOperations()[0].range;return new g.a(o.endLineNumber,this.restoreCursorToColumn,o.endLineNumber,this.restoreCursorToColumn)},e}(),y=o(32),v=o(126);function b(e,t){for(var o=0,n=0;n=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var S=y.a.getGoodIndentForLine(l,e.getLanguageIdAtPosition(d,1),n.startLineNumber+1,a);if(null!==S){C=u.getLeadingWhitespace(e.getLineContent(n.startLineNumber));if((O=b(S,i))!==(R=b(C,i))){var T=O-R;this.getIndentEditsOfMovingBlock(e,t,n,i,r,T)}}}}else t.addEditOperation(new s.a(n.startLineNumber,1,n.startLineNumber,1),f+"\n")}else{var w;if(d=n.startLineNumber-1,p=e.getLineContent(d),t.addEditOperation(new s.a(d,1,d+1,1),null),t.addEditOperation(new s.a(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+p),this.shouldAutoIndent(e,n))if(l.getLineContent=function(t){return t===d?e.getLineContent(n.startLineNumber):e.getLineContent(t)},null!==(w=this.matchEnterRule(e,a,i,n.startLineNumber,n.startLineNumber-2)))0!==w&&this.getIndentEditsOfMovingBlock(e,t,n,i,r,w);else{var k=y.a.getGoodIndentForLine(l,e.getLanguageIdAtPosition(n.startLineNumber,1),d,a);if(null!==k){var O,R,L=u.getLeadingWhitespace(e.getLineContent(n.startLineNumber));if((O=b(k,i))!==(R=b(L,i))){T=O-R;this.getIndentEditsOfMovingBlock(e,t,n,i,r,T)}}}}}this._selectionId=t.trackSelection(n)}},e.prototype.buildIndentConverter=function(e){return{shiftIndent:function(t){for(var o=v.a.shiftIndentCount(t,t.length+1,e),n="",i=0;i=1;){var l=void 0;if(l=a===i&&void 0!==r?r:e.getLineContent(a),u.lastNonWhitespaceIndex(l)>=0)break;a--}if(a<1||n>e.getLineCount())return null;var c=e.getLineMaxColumn(a),h=y.a.getEnterAction(e,new s.a(a,c,a,c));if(h){var d=h.indentation,g=h.enterAction;g.indentAction===C.a.None?d=h.indentation+g.appendText:g.indentAction===C.a.Indent?d=h.indentation+g.appendText:g.indentAction===C.a.IndentOutdent?d=h.indentation:g.indentAction===C.a.Outdent&&(d=t.unshiftIndent(h.indentation)+g.appendText);var p=e.getLineContent(n);if(this.trimLeft(p).indexOf(this.trimLeft(d))>=0){var f=u.getLeadingWhitespace(e.getLineContent(n)),m=u.getLeadingWhitespace(d);return 2&y.a.getIndentMetadata(e,n)&&(m=t.unshiftIndent(m)),b(m,o)-b(f,o)}}return null},e.prototype.trimLeft=function(e){return e.replace(/^\s+/,"")},e.prototype.shouldAutoIndent=function(e,t){if(!this._autoIndent)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var o=e.getLanguageIdAtPosition(t.startLineNumber,1);return o===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==y.a.getIndentRulesSupport(o)},e.prototype.getIndentEditsOfMovingBlock=function(e,t,o,n,i,r){for(var a=o.startLineNumber;a<=o.endLineNumber;a++){var l=e.getLineContent(a),c=u.getLeadingWhitespace(l),h=E(b(c,n)+r,n,i);h!==c&&(t.addEditOperation(new s.a(a,1,a,c.length+1),h),a===o.endLineNumber&&o.endColumn<=c.length+1&&""===h&&(this._moveEndLineSelectionShrink=!0))}},e.prototype.computeCursorState=function(e,t){var o=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(o=o.setEndPosition(o.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&o.startLineNumber0){var s=t.startLineNumber-i;r=new g.a(s,t.startColumn,s,t.startColumn)}else r=new g.a(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);i+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?o=r:n.push(r)})),o&&n.unshift(o),n},t.prototype._getRangesToDelete=function(e){var t=e.getSelections(),o=e.getModel();return t.sort(s.a.compareRangesUsingStarts),t=t.map((function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),n=1===e.startLineNumber?1:o.getLineContent(t).length+1;return new s.a(t,n,e.startLineNumber,1)}return new s.a(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return e}))},t}(G),K=function(e){function t(){return e.call(this,{id:"deleteAllRight",label:n.a("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:h.a.writable,kbOpts:{kbExpr:h.a.textInputFocus,primary:null,mac:{primary:297,secondary:[2068]},weight:100}})||this}return R(t,e),t.prototype._getEndCursorState=function(e,t){for(var o,n=[],i=0,r=t.length;ie.endLineNumber+1?(i.push(e),t):new g.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(i.push(e),t):new g.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)}));i.push(a);for(var l=t.getModel(),u=[],c=[],h=n,d=0,p=0,f=i.length;p=1){var O=!0;""===S&&(O=!1),!O||" "!==S.charAt(S.length-1)&&"\t"!==S.charAt(S.length-1)||(O=!1,S=S.replace(/[\s\uFEFF\xA0]+$/g," "));var R=w.substr(k-1);S+=(O?" ":"")+R,y=O?R.length+1:R.length}else y=0}var L=new s.a(_,1,v,b);if(!L.isEmpty()){var N=void 0;m.isEmpty()?(u.push(r.a.replace(L,S)),N=new g.a(L.startLineNumber-d,S.length-y+1,_-d,S.length-y+1)):m.startLineNumber===m.endLineNumber?(u.push(r.a.replace(L,S)),N=new g.a(m.startLineNumber-d,m.startColumn,m.endLineNumber-d,m.endColumn)):(u.push(r.a.replace(L,S)),N=new g.a(m.startLineNumber-d,m.startColumn,m.startLineNumber-d,S.length-E)),null!==s.a.intersectRanges(L,n)?h=N:c.push(N)}d+=L.endLineNumber-L.startLineNumber}c.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,u,c),t.pushUndoStop()},t}(f.b),X=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:n.a("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:h.a.writable})||this}return R(t,e),t.prototype.run=function(e,t){for(var o=t.getSelections(),n=t.getModel(),i=[],r=0,a=o.length;r=c){if(u.lineNumber===n.getLineCount())continue;var h=new s.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber+1,1),p=n.getValueInRange(h).split("").reverse().join("");i.push(new d.a(new g.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber+1,1),p))}else{h=new s.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber,u.column+1),p=n.getValueInRange(h).split("").reverse().join("");i.push(new d.b(h,p,new g.a(u.lineNumber,u.column+1,u.lineNumber,u.column+1)))}}}t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()},t}(f.b),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.run=function(e,t){for(var o=t.getSelections(),n=t.getModel(),i=[],r=0,a=o.length;r=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e,t){return function(o,n){t(o,n,e)}},D=c.a,A=function(e){function t(o){var n=e.call(this)||this;return n._onHint=n._register(new m.a),n.onHint=n._onHint.event,n._onCancel=n._register(new m.a),n.onCancel=n._onCancel.event,n.editor=o,n.enabled=!1,n.triggerCharactersListeners=[],n.throttledDelayer=new p.c((function(){return n.doTrigger()}),t.DELAY),n.active=!1,n._register(n.editor.onDidChangeConfiguration((function(){return n.onEditorConfigurationChange()}))),n._register(n.editor.onDidChangeModel((function(e){return n.onModelChanged()}))),n._register(n.editor.onDidChangeModelLanguage((function(e){return n.onModelChanged()}))),n._register(n.editor.onDidChangeCursorSelection((function(e){return n.onCursorChange(e)}))),n._register(n.editor.onDidChangeModelContent((function(e){return n.onModelContentChange()}))),n._register(d.t.onDidChange(n.onModelChanged,n)),n.onEditorConfigurationChange(),n.onModelChanged(),n}return L(t,e),t.prototype.cancel=function(e){void 0===e&&(e=!1),this.active=!1,this.throttledDelayer.cancel(),e||this._onCancel.fire(void 0),this.provideSignatureHelpRequest&&(this.provideSignatureHelpRequest.cancel(),this.provideSignatureHelpRequest=void 0)},t.prototype.trigger=function(e){if(void 0===e&&(e=t.DELAY),d.t.has(this.editor.getModel()))return this.cancel(!0),this.throttledDelayer.schedule(e)},t.prototype.doTrigger=function(){var e=this;this.provideSignatureHelpRequest&&this.provideSignatureHelpRequest.cancel(),this.provideSignatureHelpRequest=Object(p.i)((function(t){return b(e.editor.getModel(),e.editor.getPosition(),t)})),this.provideSignatureHelpRequest.then((function(t){if(!t||!t.signatures||0===t.signatures.length)return e.cancel(),e._onCancel.fire(void 0),!1;e.active=!0;var o={hints:t};return e._onHint.fire(o),!0})).catch(f.e)},t.prototype.isTriggered=function(){return this.active||this.throttledDelayer.isScheduled()},t.prototype.onModelChanged=function(){var e=this;this.cancel(),this.triggerCharactersListeners=Object(i.d)(this.triggerCharactersListeners);var t=this.editor.getModel();if(t){for(var o=new S.b,n=0,r=d.t.ordered(t);n1;c.N(this.element,"multiple",e),this.keyMultipleSignatures.set(e),this.signature.innerHTML="",this.docs.innerHTML="";var t=this.hints.signatures[this.currentSignature];if(t){var o=c.k(this.signature,D(".code")),r=t.parameters.length>0,s=this.editor.getConfiguration().fontInfo;if(o.style.fontSize=s.fontSize+"px",o.style.fontFamily=s.fontFamily,r)this.renderParameters(o,t,this.hints.activeParameter);else c.k(o,D("span")).textContent=t.label;Object(i.d)(this.renderDisposeables),this.renderDisposeables=[];var a=t.parameters[this.hints.activeParameter];if(a&&a.documentation){var l=D("span.documentation");if("string"==typeof a.documentation)l.textContent=a.documentation;else{var u=this.markdownRenderer.render(a.documentation);c.f(u.element,"markdown-docs"),this.renderDisposeables.push(u),l.appendChild(u.element)}c.k(this.docs,D("p",null,l))}if(c.N(this.signature,"has-docs",!!t.documentation),"string"==typeof t.documentation)c.k(this.docs,D("p",null,t.documentation));else{u=this.markdownRenderer.render(t.documentation);c.f(u.element,"markdown-docs"),this.renderDisposeables.push(u),c.k(this.docs,u.element)}var d=String(this.currentSignature+1);if(this.hints.signatures.length<10&&(d+="/"+this.hints.signatures.length),this.overloads.textContent=d,a){var g=a.label;this.announcedLabel!==g&&(h.a(n.a("hint","{0}, hint",g)),this.announcedLabel=g)}this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}},e.prototype.renderParameters=function(e,t,o){for(var n,i=t.label.length,r=0,s=t.parameters.length-1;s>=0;s--){var a=t.parameters[s],l=0,u=0;(r=t.label.lastIndexOf(a.label,i-1))>=0&&(l=r,u=r+a.label.length),(n=document.createElement("span")).textContent=t.label.substring(u,i),c.E(e,n),(n=document.createElement("span")).className="parameter "+(s===o?"active":""),n.textContent=t.label.substring(l,u),c.E(e,n),i=l}(n=document.createElement("span")).textContent=t.label.substring(0,i),c.E(e,n)},e.prototype.next=function(){var e=this.hints.signatures.length,t=this.currentSignature%e==e-1;return e<2||t?(this.cancel(),!1):(this.currentSignature++,this.render(),!0)},e.prototype.previous=function(){var e=this.hints.signatures.length,t=0===this.currentSignature;return e<2||t?(this.cancel(),!1):(this.currentSignature--,this.render(),!0)},e.prototype.cancel=function(){this.model.cancel()},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.trigger=function(){this.model.trigger(0)},e.prototype.updateMaxHeight=function(){var e=Math.max(this.editor.getLayoutInfo().height/4,250);this.element.style.maxHeight=e+"px"},e.prototype.dispose=function(){this.disposables=Object(i.d)(this.disposables),this.renderDisposeables=Object(i.d)(this.renderDisposeables),this.model&&(this.model.dispose(),this.model=null)},e.ID="editor.widget.parameterHintsWidget",e=N([I(1,a.e),I(2,k.a),I(3,O.a)],e)}();Object(T.e)((function(e,t){var o=e.getColor(w.w);if(o){var n=e.type===T.b?2:1;t.addRule(".monaco-editor .parameter-hints-widget { border: "+n+"px solid "+o+"; }"),t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid "+o.transparent(.5)+"; }"),t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid "+o.transparent(.5)+"; }")}var i=e.getColor(w.v);i&&t.addRule(".monaco-editor .parameter-hints-widget { background-color: "+i+"; }");var r=e.getColor(w.qb);r&&t.addRule(".monaco-editor .parameter-hints-widget a { color: "+r+"; }");var s=e.getColor(w.pb);s&&t.addRule(".monaco-editor .parameter-hints-widget code { background-color: "+s+"; }")})),o.d(t,"TriggerParameterHintsAction",(function(){return H}));var x=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),M=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},B=function(e,t){return function(o,n){t(o,n,e)}},F=function(){function e(e,t){this.editor=e,this.widget=t.createInstance(P,this.editor)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.cancel=function(){this.widget.cancel()},e.prototype.previous=function(){this.widget.previous()},e.prototype.next=function(){this.widget.next()},e.prototype.trigger=function(){this.widget.trigger()},e.prototype.dispose=function(){this.widget=Object(i.d)(this.widget)},e.ID="editor.controller.parameterHints",e=M([B(1,r.a)],e)}(),H=function(e){function t(){return e.call(this,{id:"editor.action.triggerParameterHints",label:n.a("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:s.a.hasSignatureHelpProvider,kbOpts:{kbExpr:s.a.editorTextFocus,primary:3082,weight:100}})||this}return x(t,e),t.prototype.run=function(e,t){var o=F.get(t);o&&o.trigger()},t}(l.b);Object(l.h)(F),Object(l.f)(H);var U=l.c.bindToContribution(F.get);Object(l.g)(new U({id:"closeParameterHints",precondition:v.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:175,kbExpr:s.a.editorTextFocus,primary:9,secondary:[1033]}})),Object(l.g)(new U({id:"showPrevParameterHint",precondition:a.d.and(v.Visible,v.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:175,kbExpr:s.a.editorTextFocus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),Object(l.g)(new U({id:"showNextParameterHint",precondition:a.d.and(v.Visible,v.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{weight:175,kbExpr:s.a.editorTextFocus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(39),s=o(5),a=o(3),l=o(53),u=o(9),c=o(2),h=o(23),d=o(32),g=function(){function e(e){this._selection=e,this._usedEndToken=null}return e._haystackHasNeedleAtOffset=function(e,t,o){if(o<0)return!1;var n=t.length;if(o+n>e.length)return!1;for(var i=0;i=65&&r<=90&&r+32===s||s>=65&&s<=90&&s+32===r))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,o,n,i){var r,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,u=t.endColumn,h=n.getLineContent(s),d=n.getLineContent(l),g=o.blockCommentStartToken,p=o.blockCommentEndToken,f=h.lastIndexOf(g,a-1+g.length),m=d.indexOf(p,u-1-p.length);if(-1!==f&&-1!==m)if(s===l){h.substring(f+g.length,m).indexOf(p)>=0&&(f=-1,m=-1)}else{var _=h.substring(f+g.length),y=d.substring(0,m);(_.indexOf(p)>=0||y.indexOf(p)>=0)&&(f=-1,m=-1)}-1!==f&&-1!==m?(f+g.length0&&32===d.charCodeAt(m-1)&&(p=" "+p,m-=1),r=e._createRemoveBlockCommentOperations(new c.a(s,f+g.length+1,l,m+1),g,p)):(r=e._createAddBlockCommentOperations(t,g,p),this._usedEndToken=1===r.length?p:null);for(var v=0;va?r-1:r}},e}(),m=o(38),_=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),y=function(e){function t(t,o){var n=e.call(this,o)||this;return n._type=t,n}return _(t,e),t.prototype.run=function(e,t){var o=t.getModel();if(o){for(var n=[],i=t.getSelections(),r=o.getOptions(),s=0;s=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},P=function(e,t){return function(o,n){t(o,n,e)}};function x(e){if((e=e.filter((function(e){return e.range}))).length){for(var t=e[0].range,o=1;o1)){var o=this.editor.getModel(),n=this.editor.getPosition(),i=!1,s=this.editor.onDidChangeModelContent((function(e){if(e.isFlush)return i=!0,void s.dispose();for(var t=0,o=e.changes.length;t1)){var o=this.editor.getModel(),n=o.getOptions(),i=n.tabSize,s=n.insertSpaces,a=new L.a(this.editor,5);v(o,e,{tabSize:i,insertSpaces:s}).then((function(e){return t.workerService.computeMoreMinimalEdits(o.uri,e)})).then((function(e){a.validate(t.editor)&&!Object(r.k)(e)&&(S.execute(t.editor,e),x(e))}))}},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.callOnDispose=Object(a.d)(this.callOnDispose),this.callOnModel=Object(a.d)(this.callOnModel)},e.ID="editor.contrib.formatOnPaste",e=A([P(1,k.a)],e)}(),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.run=function(e,t){var o=this,n=e.get(k.a),i=e.get(I.a),s=this._getFormattingEdits(t);if(!s)return l.b.as(void 0);var a=new L.a(t,5);return s.then((function(e){return n.computeMoreMinimalEdits(t.getModel().uri,e)})).then((function(e){a.validate(t)&&!Object(r.k)(e)&&(S.execute(t,e),x(e),t.focus())}),(function(e){if(!(e instanceof Error&&e.name===y.Name))throw e;o._notifyNoProviderError(i,t.getModel().getLanguageIdentifier().language)}))},t.prototype._notifyNoProviderError=function(e,t){e.info(i.a("no.provider","There is no formatter for '{0}'-files installed.",t))},t}(c.b),H=function(e){function t(){return e.call(this,{id:"editor.action.formatDocument",label:i.a("formatDocument.label","Format Document"),alias:"Format Document",precondition:N.a.writable,kbOpts:{kbExpr:N.a.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},menuOpts:{when:N.a.hasDocumentFormattingProvider,group:"1_modification",order:1.3}})||this}return D(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),o=t.getOptions();return b(t,{tabSize:o.tabSize,insertSpaces:o.insertSpaces})},t.prototype._notifyNoProviderError=function(e,t){e.info(i.a("no.documentprovider","There is no document formatter for '{0}'-files installed.",t))},t}(F),U=function(e){function t(){return e.call(this,{id:"editor.action.formatSelection",label:i.a("formatSelection.label","Format Selection"),alias:"Format Code",precondition:u.d.and(N.a.writable,N.a.hasNonEmptySelection),kbOpts:{kbExpr:N.a.editorTextFocus,primary:Object(s.a)(2089,2084),weight:100},menuOpts:{when:u.d.and(N.a.hasDocumentSelectionFormattingProvider,N.a.hasNonEmptySelection),group:"1_modification",order:1.31}})||this}return D(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),o=t.getOptions(),n=o.tabSize,i=o.insertSpaces;return v(t,e.getSelection(),{tabSize:n,insertSpaces:i})},t.prototype._notifyNoProviderError=function(e,t){e.info(i.a("no.selectionprovider","There is no selection formatter for '{0}'-files installed.",t))},t}(F);Object(c.h)(M),Object(c.h)(B),Object(c.f)(H),Object(c.f)(U),T.a.registerCommand("editor.action.format",(function(e){var t=e.get(w.a).getFocusedCodeEditor();if(t)return(new(function(e){function t(){return e.call(this,{})||this}return D(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),o=e.getSelection(),n=t.getOptions(),i=n.tabSize,r=n.insertSpaces;return o.isEmpty()?b(t,{tabSize:i,insertSpaces:r}):v(t,o,{tabSize:i,insertSpaces:r})},t}(F))).run(e,t)}))},function(e,t,o){"use strict";o.r(t);var n=o(17),i=o(13),r=o(6),s=o(90),a=o(3),l=o(11),u=(o(434),o(8)),c=o(1),h=o(2),d=o(16),g=o(26),p=o(29),f=o(19),m=o(7),_=function(){function e(e,t){this.afterLineNumber=e,this._onHeight=t,this.heightInLines=1,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}return e.prototype.onComputedHeight=function(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())},e}(),y=function(){function e(t,o,n,i){var r=this;this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._disposables=[],this._commands=Object.create(null),this._id="codeLensWidget"+ ++e._idPool,this._editor=t,this.setSymbolRange(o),this._domNode=document.createElement("span"),this._domNode.innerHTML=" ",c.f(this._domNode,"codelens-decoration"),c.f(this._domNode,"invisible-cl"),this._updateHeight(),this._disposables.push(this._editor.onDidChangeConfiguration((function(e){return e.fontInfo&&r._updateHeight()}))),this._disposables.push(c.g(this._domNode,"click",(function(e){var o=e.target;if("A"===o.tagName&&o.id){var s=r._commands[o.id];s&&(t.focus(),n.executeCommand.apply(n,[s.id].concat(s.arguments)).done(void 0,(function(e){i.error(e)})))}}))),this.updateVisibility()}return e.prototype.dispose=function(){Object(r.d)(this._disposables)},e.prototype._updateHeight=function(){var e=this._editor.getConfiguration(),t=e.fontInfo,o=e.lineHeight;this._domNode.style.height=Math.round(1.1*o)+"px",this._domNode.style.lineHeight=o+"px",this._domNode.style.fontSize=Math.round(.9*t.fontSize)+"px",this._domNode.innerHTML=" "},e.prototype.updateVisibility=function(){this.isVisible()&&(c.G(this._domNode,"invisible-cl"),c.f(this._domNode,"fadein"))},e.prototype.withCommands=function(e){if(this._commands=Object.create(null),e&&e.length){for(var t=[],o=0;o{1}",o,i),this._commands[o]=n):r=Object(u.format)("{0}",i),t.push(r)}this._domNode.innerHTML=t.join(" | "),this._editor.layoutContentWidget(this)}else this._domNode.innerHTML="no commands"},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.setSymbolRange=function(e){var t=e.startLineNumber,o=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:o},preference:[d.a.ABOVE]}},e.prototype.getPosition=function(){return this._widgetPosition},e.prototype.isVisible=function(){return this._domNode.hasAttribute("monaco-visible-content-widget")},e._idPool=0,e}(),v=function(){function e(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return e.prototype.addDecoration=function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)},e.prototype.removeDecoration=function(e){this._removeDecorations.push(e)},e.prototype.commit=function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),o=0,n=t.length;o a:hover { color: "+n+" !important; }")}));var E=o(37),C=o(45),S=o(25),T=o(33),w=o(60),k=o(48);function O(e,t){var o=[],n=l.c.ordered(e),r=n.map((function(n){return Promise.resolve(n.provideCodeLenses(e,t)).then((function(e){if(Array.isArray(e))for(var t=0,i=e;tt.symbol.range.startLineNumber?1:n.indexOf(e.provider)n.indexOf(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0}))}))}Object(a.j)("_executeCodeLensProvider",(function(e,t){var o=t.resource,n=t.itemResolveCount;if(!(o instanceof T.a))throw Object(i.b)();var r=e.get(w.a).getModel(o);if(!r)throw Object(i.b)();var s=[];return O(r,k.a.None).then((function(e){for(var t=[],o=0,i=e;o0&&t.push(Promise.resolve(a.provider.resolveCodeLens(r,a.symbol,k.a.None)).then((function(e){return s.push(e)})))}return Promise.all(t)})).then((function(){return s}))})),o.d(t,"CodeLensContribution",(function(){return N}));var R=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},L=function(e,t){return function(o,n){t(o,n,e)}},N=function(){function e(e,t,o){var n=this;this._editor=e,this._commandService=t,this._notificationService=o,this._isEnabled=this._editor.getConfiguration().contribInfo.codeLens,this._globalToDispose=[],this._localToDispose=[],this._lenses=[],this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter=0,this._globalToDispose.push(this._editor.onDidChangeModel((function(){return n._onModelChange()}))),this._globalToDispose.push(this._editor.onDidChangeModelLanguage((function(){return n._onModelChange()}))),this._globalToDispose.push(this._editor.onDidChangeConfiguration((function(e){var t=n._isEnabled;n._isEnabled=n._editor.getConfiguration().contribInfo.codeLens,t!==n._isEnabled&&n._onModelChange()}))),this._globalToDispose.push(l.c.onDidChange(this._onModelChange,this)),this._onModelChange()}return e.prototype.dispose=function(){this._localDispose(),this._globalToDispose=Object(r.d)(this._globalToDispose)},e.prototype._localDispose=function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter++),this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=null),this._localToDispose=Object(r.d)(this._localToDispose)},e.prototype.getId=function(){return e.ID},e.prototype._onModelChange=function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._isEnabled&&l.c.has(t)){for(var o=0,a=l.c.all(t);o0&&e._detectVisibleLenses.schedule()}))),this._localToDispose.push(this._editor.onDidLayoutChange((function(t){e._detectVisibleLenses.schedule()}))),this._localToDispose.push(Object(r.f)((function(){if(e._editor.getModel()){var t=s.b.capture(e._editor);e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(o){e._disposeAllLenses(t,o)}))})),t.restore(e._editor)}else e._disposeAllLenses(null,null)}))),h.schedule()}},e.prototype._disposeAllLenses=function(e,t){var o=new v;this._lenses.forEach((function(e){return e.dispose(o,t)})),e&&o.commit(e),this._lenses=[]},e.prototype._renderCodeLensSymbols=function(e){var t=this;if(this._editor.getModel()){for(var o,n=this._editor.getModel().getLineCount(),i=[],r=0,a=e;rn||(o&&o[o.length-1].symbol.range.startLineNumber===u?o.push(l):(o=[l],i.push(o)))}var c=s.b.capture(this._editor);this._editor.changeDecorations((function(e){t._editor.changeViewZones((function(o){for(var n=0,r=0,s=new v;r0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.hasChildren&&!this.parent},enumerable:!0,configurable:!0}),t.prototype.append=function(e){return!!e&&(e.parent=this,this.children||(this.children=[]),e instanceof t?e.children&&this.children.push.apply(this.children,e.children):this.children.push(e),!0)},t}(m),y=function(e){function t(){var t=e.call(this)||this;return t.elements=new _,t.elements.parent=t,t}return f(t,e),t}(m),v=function(e,t,o){this.range=e,this.bracket=t,this.bracketType=o};function b(e){var t=new m;return t.start=e.range.getStartPosition(),t.end=e.range.getEndPosition(),t}var E=function(e,t,o){this.lineNumber=o,this.lineText=e.getLineContent(),this.startOffset=e.getStartOffset(t),this.endOffset=e.getEndOffset(t),this.type=e.getStandardTokenType(t),this.languageId=e.getLanguageId(t)},C=function(){function e(e){this._model=e,this._lineCount=this._model.getLineCount(),this._versionId=this._model.getVersionId(),this._lineNumber=0,this._tokenIndex=0,this._lineTokens=null,this._advance()}return e.prototype._advance=function(){for(this._lineTokens&&(this._tokenIndex++,this._tokenIndex>=this._lineTokens.getCount()&&(this._lineTokens=null));this._lineNumber0)return this._nextBuff.shift();var e=this._rawTokenScanner.next();if(!e)return null;var t=e.lineNumber,o=e.lineText,n=e.type,i=e.startOffset,r=e.endOffset;this._cachedLanguageId!==e.languageId&&(this._cachedLanguageId=e.languageId,this._cachedLanguageBrackets=p.a.getBracketsSupport(this._cachedLanguageId));var s,a=this._cachedLanguageBrackets;if(!a||Object(d.b)(n))return new v(new l.a(t,i+1,t,r+1),0,null);do{if(s=g.a.findNextBracketInToken(a.forwardRegex,t,o,i,r)){var u=s.startColumn-1,c=s.endColumn-1;i=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},k=function(e,t){return function(o,n){t(o,n,e)}},O=function(){function e(e){this._modelService=e}return e.prototype.getRangesToPosition=function(e,t){return s.b.as(this.getRangesToPositionSync(e,t))},e.prototype.getRangesToPositionSync=function(e,t){var o=this._modelService.getModel(e),n=[];return o&&this._doGetRangesToPosition(o,t).forEach((function(e){n.push({type:void 0,range:e})})),n},e.prototype._doGetRangesToPosition=function(e,t){var o,n;o=function e(t,o){if(t instanceof _&&t.isEmpty)return null;if(!l.a.containsPosition(t.range,o))return null;var n;if(t instanceof _){if(t.hasChildren)for(var i=0,r=t.children.length;i=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e,t){return function(o,n){t(o,n,e)}},D=function(e){this.editor=e,this.next=null,this.previous=null,this.selection=e.getSelection()},A=function(){function e(e,t){this.editor=e,this._tokenSelectionSupport=t.createInstance(O),this._state=null,this._ignoreSelection=!1}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(e){var t=this,o=this.editor.getSelection(),n=this.editor.getModel();this._state&&this._state.editor!==this.editor&&(this._state=null);var i=s.b.as(null);return this._state||(i=this._tokenSelectionSupport.getRangesToPosition(n.uri,o.getStartPosition()).then((function(e){if(!r.k(e)){var o;e.filter((function(e){var o=t.editor.getSelection(),n=new l.a(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);return n.containsPosition(o.getStartPosition())&&n.containsPosition(o.getEndPosition())})).forEach((function(e){var n=e.range,i=new D(t.editor);i.selection=new l.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn),o&&(i.next=o,o.previous=i),o=i}));var n=new D(t.editor);n.next=o,o&&(o.previous=n),t._state=n;var i=t.editor.onDidChangeCursorPosition((function(e){t._ignoreSelection||(t._state=null,i.dispose())}))}}))),i.then((function(){if(t._state&&(t._state=e?t._state.next:t._state.previous,t._state)){t._ignoreSelection=!0;try{t.editor.setSelection(t._state.selection)}finally{t._ignoreSelection=!1}}}))},e.ID="editor.contrib.smartSelectController",e=N([I(1,a.a)],e)}(),P=function(e){function t(t,o){var n=e.call(this,o)||this;return n._forward=t,n}return L(t,e),t.prototype.run=function(e,t){var o=A.get(t);if(o)return o.run(this._forward)},t}(c.b),x=function(e){function t(){return e.call(this,!0,{id:"editor.action.smartSelect.grow",label:i.a("smartSelect.grow","Expand Select"),alias:"Expand Select",precondition:null,kbOpts:{kbExpr:u.a.editorTextFocus,primary:1553,mac:{primary:3345},weight:100},menubarOpts:{menuId:R.b.MenubarSelectionMenu,group:"1_basic",title:i.a({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})||this}return L(t,e),t}(P),M=function(e){function t(){return e.call(this,!1,{id:"editor.action.smartSelect.shrink",label:i.a("smartSelect.shrink","Shrink Select"),alias:"Shrink Select",precondition:null,kbOpts:{kbExpr:u.a.editorTextFocus,primary:1551,mac:{primary:3343},weight:100},menubarOpts:{menuId:R.b.MenubarSelectionMenu,group:"1_basic",title:i.a({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})||this}return L(t,e),t}(P);Object(c.h)(A),Object(c.f)(x),Object(c.f)(M)},function(e,t,o){"use strict";o.r(t);o(482);var n=o(0),i=o(111),r=o(8),s=o(124),a=o(97),l=o(5),u=o(11),c=o(161),h=o(13),d=o(33),g=o(10),p=o(2),f=o(3),m=o(60),_=o(17);function y(e){var t=[],o=u.j.all(e).map((function(o){return Object(_.h)((function(t){return o.provideDocumentSymbols(e,t)})).then((function(e){Array.isArray(e)&&t.push.apply(t,e)}),(function(e){Object(h.f)(e)}))}));return g.b.join(o).then((function(){var e=[];return function e(t,o,n){for(var i=0,r=o;i0&&0===o.indexOf(":")){var f=null,m=null,_=0;for(c=0;c0)):_++}m&&m.setGroupLabel(this.typeToLabel(f,_))}else a.length>0&&a[0].setGroupLabel(n.a("symbols","symbols ({0})",a.length));return a},t.prototype.typeToLabel=function(e,t){switch(e){case"module":return n.a("modules","modules ({0})",t);case"class":return n.a("class","classes ({0})",t);case"interface":return n.a("interface","interfaces ({0})",t);case"method":return n.a("method","methods ({0})",t);case"function":return n.a("function","functions ({0})",t);case"property":return n.a("property","properties ({0})",t);case"variable":return n.a("variable","variables ({0})",t);case"var":return n.a("variable2","variables ({0})",t);case"constructor":return n.a("_constructor","constructors ({0})",t);case"call":return n.a("call","calls ({0})",t)}return e},t.prototype.sortNormal=function(e,t,o){var n=t.getLabel().toLowerCase(),i=o.getLabel().toLowerCase(),r=n.localeCompare(i);if(0!==r)return r;var s=t.getRange(),a=o.getRange();return s.startLineNumber-a.startLineNumber},t.prototype.sortScoped=function(e,t,o){e=e.substr(":".length);var n=t.getType(),i=o.getType(),r=n.localeCompare(i);if(0!==r)return r;if(e){var s=t.getLabel().toLowerCase(),a=o.getLabel().toLowerCase(),l=s.localeCompare(a);if(0!==l)return l}var u=t.getRange(),c=o.getRange();return u.startLineNumber-c.startLineNumber},t}(c.a);Object(f.f)(S)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(4),s=o(6),a=o(12),l=o(46),u=o(2),c=o(3),h=o(19),d=o(5),g=(o(471),o(1)),p=o(207),f=o(7),m=o(14),_=o(29),y=o(81),v=o(42),b=o(165),E=o(25),C=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),S=function(){function e(e,t,o){var n=this;this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=[],this._editor=t;var i=document.createElement("div");i.className="descriptioncontainer",i.setAttribute("aria-live","assertive"),i.setAttribute("role","alert"),this._messageBlock=document.createElement("div"),i.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),i.appendChild(this._relatedBlock),this._disposables.push(g.j(this._relatedBlock,"click",(function(e){e.preventDefault();var t=n._relatedDiagnostics.get(e.target);t&&o(t)}))),this._scrollable=new y.b(i,{horizontal:v.b.Auto,vertical:v.b.Auto,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),g.f(this._scrollable.getDomNode(),"block"),e.appendChild(this._scrollable.getDomNode()),this._disposables.push(this._scrollable.onScroll((function(e){i.style.left="-"+e.scrollLeft+"px",i.style.top="-"+e.scrollTop+"px"}))),this._disposables.push(this._scrollable)}return e.prototype.dispose=function(){Object(s.d)(this._disposables)},e.prototype.update=function(e){var t=e.source,o=e.message,n=e.relatedInformation;if(t){this._lines=0,this._longestLineLength=0;for(var i=new Array(t.length+3+1).join(" "),r=o.split(/\r\n|\r|\n/g),s=0;s=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},B=function(e,t){return function(o,n){t(o,n,e)}},F=function(){function e(e,t){var o=this;this._editor=e,this._markers=null,this._nextIdx=-1,this._toUnbind=[],this._ignoreSelectionChange=!1,this._onCurrentMarkerChanged=new r.a,this._onMarkerSetChanged=new r.a,this.setMarkers(t),this._toUnbind.push(this._editor.onDidDispose((function(){return o.dispose()}))),this._toUnbind.push(this._editor.onDidChangeCursorPosition((function(){o._ignoreSelectionChange||o.currentMarker&&u.a.containsPosition(o.currentMarker,o._editor.getPosition())||(o._nextIdx=-1)})))}return Object.defineProperty(e.prototype,"onCurrentMarkerChanged",{get:function(){return this._onCurrentMarkerChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMarkerSetChanged",{get:function(){return this._onMarkerSetChanged.event},enumerable:!0,configurable:!0}),e.prototype.setMarkers=function(e){var t=this._nextIdx>=0?this._markers[this._nextIdx]:void 0;this._markers=e||[],this._markers.sort(U.compareMarker),this._nextIdx=t?Math.max(-1,Object(E.b)(this._markers,t,U.compareMarker)):-1,this._onMarkerSetChanged.fire(this)},e.prototype.withoutWatchingEditorPosition=function(e){this._ignoreSelectionChange=!0;try{e()}finally{this._ignoreSelectionChange=!1}},e.prototype._initIdx=function(e){for(var t=!1,o=this._editor.getPosition(),n=0;n0?this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length:n=!0),o!==this._nextIdx){var i=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(i)}return n},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.findMarkerAtPosition=function(e){for(var t=0,o=this._markers;tthis.selection.endLineNumber?this.targetSelection=new u.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},_=function(e,t){return function(o,n){t(o,n,e)}},y=function(){function e(e,t){var o=this;this.themeService=t,this._disposables=[],this.allowEditorOverflow=!0,this._currentAcceptInput=null,this._currentCancelInput=null,this._editor=e,this._editor.addContentWidget(this),this._disposables.push(e.onDidChangeConfiguration((function(e){e.fontInfo&&o.updateFont()}))),this._disposables.push(t.onThemeChange((function(e){return o.onThemeChange(e)})))}return e.prototype.onThemeChange=function(e){this.updateStyles(e)},e.prototype.dispose=function(){this._disposables=Object(c.d)(this._disposables),this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"__renameInputWidget"},e.prototype.getDomNode=function(){return this._domNode||(this._inputField=document.createElement("input"),this._inputField.className="rename-input",this._inputField.type="text",this._inputField.setAttribute("aria-label",Object(n.a)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode=document.createElement("div"),this._domNode.style.height=this._editor.getConfiguration().lineHeight+"px",this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputField),this.updateFont(),this.updateStyles(this.themeService.getTheme())),this._domNode},e.prototype.updateStyles=function(e){if(this._inputField){var t=e.getColor(p.K),o=e.getColor(p.M),n=e.getColor(p.rb),i=e.getColor(p.L);this._inputField.style.backgroundColor=t?t.toString():null,this._inputField.style.color=o?o.toString():null,this._inputField.style.borderWidth=i?"1px":"0px",this._inputField.style.borderStyle=i?"solid":"none",this._inputField.style.borderColor=i?i.toString():"none",this._domNode.style.boxShadow=n?" 0 2px 8px "+n:null}},e.prototype.updateFont=function(){if(this._inputField){var e=this._editor.getConfiguration().fontInfo;this._inputField.style.fontFamily=e.fontFamily,this._inputField.style.fontWeight=e.fontWeight,this._inputField.style.fontSize=e.fontSize+"px"}},e.prototype.getPosition=function(){return this._visible?{position:this._position,preference:[d.a.BELOW,d.a.ABOVE]}:null},e.prototype.acceptInput=function(){this._currentAcceptInput&&this._currentAcceptInput()},e.prototype.cancelInput=function(e){this._currentCancelInput&&this._currentCancelInput(e)},e.prototype.getInput=function(e,t,o,n){var i=this;this._position=new f.a(e.startLineNumber,e.startColumn),this._inputField.value=t,this._inputField.setAttribute("selectionStart",o.toString()),this._inputField.setAttribute("selectionEnd",n.toString()),this._inputField.size=Math.max(1.1*(e.endColumn-e.startColumn),20);var s,a=[];return s=function(){Object(c.d)(a),i._hide()},new r.b((function(o){i._currentCancelInput=function(e){return i._currentAcceptInput=null,i._currentCancelInput=null,o(e),!0},i._currentAcceptInput=function(){0!==i._inputField.value.trim().length&&i._inputField.value!==t?(i._currentAcceptInput=null,i._currentCancelInput=null,o(i._inputField.value)):i.cancelInput(!0)};a.push(i._editor.onDidChangeCursorSelection((function(){h.a.containsPosition(e,i._editor.getPosition())||i.cancelInput(!0)}))),a.push(i._editor.onDidBlurEditorWidget((function(){return i.cancelInput(!1)}))),i._show()}),(function(){i._currentCancelInput(!0)})).then((function(e){return s(),e}),(function(e){return s(),r.b.wrapError(e)}))},e.prototype._show=function(){var e=this;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._editor.layoutContentWidget(this),setTimeout((function(){e._inputField.focus(),e._inputField.setSelectionRange(parseInt(e._inputField.getAttribute("selectionStart")),parseInt(e._inputField.getAttribute("selectionEnd")))}),100)},e.prototype._hide=function(){this._visible=!1,this._editor.layoutContentWidget(this)},e=m([_(1,g.c)],e)}(),v=o(17),b=o(11),E=o(58),C=o(142),S=o(90),T=o(45),w=o(156),k=o(33),O=o(36);o.d(t,"rename",(function(){return x})),o.d(t,"RenameAction",(function(){return F}));var R,L=(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),N=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e,t){return function(o,n){t(o,n,e)}},D=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},A=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0},e.prototype.resolveRenameLocation=function(){return D(this,void 0,void 0,(function(){var e,t,o,n=this;return A(this,(function(i){switch(i.label){case 0:return(e=this._provider[0]).resolveRenameLocation?[4,Object(v.h)((function(t){return e.resolveRenameLocation(n.model,n.position,t)}))]:[3,2];case 1:t=i.sent(),i.label=2;case 2:return t||(o=this.model.getWordAtPosition(this.position))&&(t={range:new h.a(this.position.lineNumber,o.startColumn,this.position.lineNumber,o.endColumn),text:o.word}),[2,t]}}))}))},e.prototype.provideRenameEdits=function(e,t,o,i){return void 0===t&&(t=0),void 0===o&&(o=[]),void 0===i&&(i=this.position),D(this,void 0,void 0,(function(){var i,r,s=this;return A(this,(function(a){switch(a.label){case 0:return t>=this._provider.length?[2,{edits:void 0,rejectReason:o.join("\n")}]:(i=this._provider[t],[4,Object(v.h)((function(t){return i.provideRenameEdits(s.model,s.position,e,t)}))]);case 1:return(r=a.sent())?r.rejectReason?[2,this.provideRenameEdits(e,t+1,o.concat(r.rejectReason))]:[2,r]:[2,this.provideRenameEdits(e,t+1,o.concat(n.a("no result","No result.")))]}}))}))},e}();function x(e,t,o){return D(this,void 0,void 0,(function(){return A(this,(function(n){return[2,new P(e,t).provideRenameEdits(o)]}))}))}var M=new s.f("renameInputVisible",!1),B=function(){function e(e,t,o,n,i,r){this.editor=e,this._notificationService=t,this._bulkEditService=o,this._progressService=n,this._renameInputField=new y(e,r),this._renameInputVisible=M.bindTo(i)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._renameInputField.dispose()},e.prototype.getId=function(){return e.ID},e.prototype.run=function(){return D(this,void 0,void 0,(function(){var e,t,o,i,s,a,l,u=this;return A(this,(function(c){switch(c.label){case 0:if(e=this.editor.getPosition(),!(t=new P(this.editor.getModel(),e)).hasProvider())return[2,void 0];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,t.resolveRenameLocation()];case 2:return o=c.sent(),[3,4];case 3:return i=c.sent(),C.a.get(this.editor).showMessage(i,e),[2,void 0];case 4:return o?(s=this.editor.getSelection(),a=0,l=o.text.length,h.a.isEmpty(s)||h.a.spansMultipleLines(s)||!h.a.containsRange(o.range,s)||(a=Math.max(0,s.startColumn-o.range.startColumn),l=Math.min(o.range.endColumn,s.endColumn)-o.range.startColumn),this._renameInputVisible.set(!0),[2,this._renameInputField.getInput(o.range,o.text,a,l).then((function(e){if(u._renameInputVisible.reset(),"boolean"!=typeof e){u.editor.focus();var i=new S.a(u.editor,15),s=r.b.wrap(t.provideRenameEdits(e,0,[],h.a.lift(o.range).getStartPosition()).then((function(t){if(!t.rejectReason)return u._bulkEditService.apply(t,{editor:u.editor}).then((function(t){t.ariaSummary&&Object(E.a)(n.a("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",o.text,e,t.ariaSummary))}));i.validate(u.editor)?C.a.get(u.editor).showMessage(t.rejectReason,u.editor.getPosition()):u._notificationService.info(t.rejectReason)}),(function(e){return u._notificationService.error(n.a("rename.failed","Rename failed to execute.")),r.b.wrapError(e)})));return u._progressService.showWhile(s,250),s}e&&u.editor.focus()}),(function(e){return u._renameInputVisible.reset(),r.b.wrapError(e)}))]):[2,void 0]}}))}))},e.prototype.acceptRenameInput=function(){this._renameInputField.acceptInput()},e.prototype.cancelRenameInput=function(){this._renameInputField.cancelInput(!0)},e.ID="editor.contrib.renameController",e=N([I(1,T.a),I(2,w.a),I(3,a.a),I(4,s.e),I(5,g.c)],e)}(),F=function(e){function t(){return e.call(this,{id:"editor.action.rename",label:n.a("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:s.d.and(u.a.writable,u.a.hasRenameProvider),kbOpts:{kbExpr:u.a.editorTextFocus,primary:60,weight:100},menuOpts:{group:"1_modification",order:1.1}})||this}return L(t,e),t.prototype.runCommand=function(t,o){var n=this,r=t.get(O.a),s=o||[void 0,void 0],a=s[0],l=s[1];return k.a.isUri(a)&&f.a.isIPosition(l)?r.openCodeEditor({resource:a},r.getActiveCodeEditor()).then((function(e){e.setPosition(l),e.invokeWithinContext((function(t){return n.reportTelemetry(t,e),n.run(t,e)}))}),i.e):e.prototype.runCommand.call(this,t,o)},t.prototype.run=function(e,t){var o=B.get(t);if(o)return r.b.wrap(o.run())},t}(l.b);Object(l.h)(B),Object(l.f)(F);var H=l.c.bindToContribution(B.get);Object(l.g)(new H({id:"acceptRenameInput",precondition:M,handler:function(e){return e.acceptRenameInput()},kbOpts:{weight:199,kbExpr:u.a.focus,primary:3}})),Object(l.g)(new H({id:"cancelRenameInput",precondition:M,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:199,kbExpr:u.a.focus,primary:9,secondary:[1033]}})),Object(l.e)("_executeDocumentRenameProvider",(function(e,t,o){var n=o.newName;if("string"!=typeof n)throw Object(i.b)("newName");return x(e,t,n)}))},function(e,t,o){"use strict";o.r(t);o(480);var n=o(0),i=o(13),r=o(15),s=o(82),a=o(3),l=o(11),u=o(16),c=o(33),h=o(10),d=o(2),g=o(17),p=o(37),f=o(60),m=o(48),_=function(){function e(e,t){this._link=e,this._provider=t}return e.prototype.toJSON=function(){return{range:this.range,url:this.url}},Object.defineProperty(e.prototype,"range",{get:function(){return this._link.range},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._link.url},enumerable:!0,configurable:!0}),e.prototype.resolve=function(){var e=this;if(this._link.url)try{return h.b.as(c.a.parse(this._link.url))}catch(e){return h.b.wrapError(new Error("invalid"))}return"function"==typeof this._provider.resolveLink?Object(g.h)((function(t){return e._provider.resolveLink(e._link,t)})).then((function(t){return e._link=t||e._link,e._link.url?e.resolve():h.b.wrapError(new Error("missing"))})):h.b.wrapError(new Error("missing"))},e}();function y(e,t){var o=[],n=l.p.ordered(e).reverse().map((function(n){return Promise.resolve(n.provideLinks(e,t)).then((function(e){if(Array.isArray(e)){var t=e.map((function(e){return new _(e,n)}));o=function(e,t){var o,n,i,r,s=[];for(o=0,i=0,n=e.length,r=t.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},N=function(e,t){return function(o,n){t(o,n,e)}},I=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},D=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},b=function(e,t){return function(o,n){t(o,n,e)}},E=function(){function e(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(t,o){var n=this;this.currentRequest&&this.currentRequest.cancel();var i=this.editor.getSelection(),r=this.editor.getModel().uri;if(i.startLineNumber!==i.endLineNumber)return null;var l=new d.a(this.editor,5);return this.editorWorkerService.canNavigateValueSet(r)?(this.currentRequest=Object(m.i)((function(e){return n.editorWorkerService.navigateValueSet(r,i,o)})),this.currentRequest.then((function(o){if(o&&o.range&&o.value&&l.validate(n.editor)){var r=s.a.lift(o.range),u=o.range,c=o.value.length-(i.endColumn-i.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+o.value.length},c>1&&(i=new a.a(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+c-1));var d=new h(r,i,o.value);n.editor.pushUndoStop(),n.editor.executeCommand(t,d),n.editor.pushUndoStop(),n.decorationIds=n.editor.deltaDecorations(n.decorationIds,[{range:u,options:e.DECORATION}]),n.decorationRemover&&n.decorationRemover.cancel(),n.decorationRemover=Object(m.m)(350),n.decorationRemover.then((function(){return n.decorationIds=n.editor.deltaDecorations(n.decorationIds,[])})).catch(_.e)}})).catch(_.e)):void 0},e.ID="editor.contrib.inPlaceReplaceController",e.DECORATION=f.a.register({className:"valueSetReplacement"}),e=v([b(1,c.a)],e)}(),C=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:i.a("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:l.a.writable,kbOpts:{kbExpr:l.a.editorTextFocus,primary:3154,weight:100}})||this}return y(t,e),t.prototype.run=function(e,t){var o=E.get(t);if(o)return r.b.wrap(o.run(this.id,!0))},t}(u.b),S=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:i.a("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:l.a.writable,kbOpts:{kbExpr:l.a.editorTextFocus,primary:3156,weight:100}})||this}return y(t,e),t.prototype.run=function(e,t){var o=E.get(t);if(o)return r.b.wrap(o.run(this.id,!1))},t}(u.b);Object(u.h)(E),Object(u.f)(C),Object(u.f)(S),Object(g.e)((function(e,t){var o=e.getColor(p.d);o&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px "+o+"; }")}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return u}));var n=o(76),i=o(30),r=o(2),s=o(6),a=o(4),l={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},u=function(){function e(e,t){void 0===t&&(t={});var o=this;this._onDidUpdate=new a.a,this._editor=e,this._options=i.g(t,l,!1),this.disposed=!1,this._disposables=[],this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=this._options.alwaysRevealFirst,this._disposables.push(this._editor.onDidDispose((function(){return o.dispose()}))),this._disposables.push(this._editor.onDidUpdateDiff((function(){return o._onDiffUpdated()}))),this._options.followsCaret&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeCursorPosition((function(e){o.ignoreSelectionChange||(o.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeModel((function(e){o.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 r.a(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):t.ranges.push({rhs:!0,range:new r.a(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){for(var t=!1,o=this._editor.getPosition(),n=0,i=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var o=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var i=o.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(){Object(s.d)(this._disposables),this._disposables.length=0,this._onDidUpdate.dispose(),this.ranges=null,this.disposed=!0},e}()},function(e,t,o){"use strict";o(490);var n,i=o(0),r=o(17),s=o(6),a=o(30),l=o(1),u=o(28),c=o(93),h=o(22),d=o(12),g=o(36),p=o(2),f=o(52),m=o(91),_=o(123),y=o(68),v=o(140),b=o(70),E=o(54),C=o(117),S=o(4),T=o(27),w=o(19),k=o(7),O=o(145),R=o(26),L=(o(491),o(87)),N=o(9),I=o(81),D=o(29),A=o(74),P=o(78),x=o(3),M=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),B=function(){function e(e,t,o,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=o,this.modifiedLineEnd=n}return e.prototype.getType=function(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0},e}(),F=function(e){this.entries=e},H=function(e){function t(t){var o=e.call(this)||this;return o._width=0,o._diffEditor=t,o._isVisible=!1,o.shadow=Object(u.b)(document.createElement("div")),o.shadow.setClassName("diff-review-shadow"),o.actionBarContainer=Object(u.b)(document.createElement("div")),o.actionBarContainer.setClassName("diff-review-actions"),o._actionBar=o._register(new A.a(o.actionBarContainer.domNode)),o._actionBar.push(new P.a("diffreview.close",i.a("label.close","Close"),"close-diff-review",!0,(function(){return o.hide(),null})),{label:!1,icon:!0}),o.domNode=Object(u.b)(document.createElement("div")),o.domNode.setClassName("diff-review monaco-editor-background"),o._content=Object(u.b)(document.createElement("div")),o._content.setClassName("diff-review-content"),o.scrollbar=o._register(new I.a(o._content.domNode,{})),o.domNode.domNode.appendChild(o.scrollbar.getDomNode()),o._register(t.onDidUpdateDiff((function(){o._isVisible&&(o._diffs=o._compute(),o._render())}))),o._register(t.getModifiedEditor().onDidChangeCursorPosition((function(){o._isVisible&&o._render()}))),o._register(t.getOriginalEditor().onDidFocusEditorWidget((function(){o._isVisible&&o.hide()}))),o._register(t.getModifiedEditor().onDidFocusEditorWidget((function(){o._isVisible&&o.hide()}))),o._register(l.j(o.domNode.domNode,"click",(function(e){e.preventDefault();var t=l.p(e.target,"diff-review-row");t&&o._goToRow(t)}))),o._register(l.j(o.domNode.domNode,"keydown",(function(e){(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),o._goToRow(o._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),o._goToRow(o._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),o.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),o.accept())}))),o._diffs=[],o._currentDiff=null,o}return M(t,e),t.prototype.prev=function(){var e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){for(var t=-1,o=0,n=this._diffs.length;o0){var y=e[r-1];m=0===y.originalEndLineNumber?y.originalStartLineNumber+1:y.originalEndLineNumber+1,_=0===y.modifiedEndLineNumber?y.modifiedStartLineNumber+1:y.modifiedEndLineNumber+1}var v=p-3+1,b=f-3+1;if(vS)O+=k=S-O,R+=k;if(R>T)O+=k=T-R,R+=k;d[g++]=new B(E,O,C,R),n[i++]=new F(d)}var L=n[0].entries,N=[],I=0;for(r=1,s=n.length;rp)&&(p=E),0!==C&&(0===f||Cm)&&(m=S)}var T=document.createElement("div");T.className="diff-review-row";var w=document.createElement("div");w.className="diff-review-cell diff-review-summary";var k=p-g+1,O=m-f+1;w.appendChild(document.createTextNode(c+1+"/"+this._diffs.length+": @@ -"+g+","+k+" +"+f+","+O+" @@")),T.setAttribute("data-line",String(f));var R=function(e){return 0===e?i.a("no_lines","no lines"):1===e?i.a("one_line","1 line"):i.a("more_lines","{0} lines",e)},L=R(k),N=R(O);T.setAttribute("aria-label",i.a({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}",c+1,this._diffs.length,g,L,f,N)),T.appendChild(w),T.setAttribute("role","listitem"),d.appendChild(T);var I=f;for(_=0,y=h.length;_=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},X=function(e,t){return function(o,n){t(o,n,e)}},q=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 o=0,n=t._zones.length;o0?i/o: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._lineChanges&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){if(0===this._lineChanges.length||e=s?o=i+1:(o=i,n=i)}return this._lineChanges[o]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.originalStartLineNumber}));if(!t)return e;var o=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),i=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-o;return s<=i?n+Math.min(s,r):n+r-i+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.modifiedStartLineNumber}));if(!t)return e;var o=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),i=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=r?o+Math.min(s,i):o+i-r+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=Y([X(2,m.a),X(3,d.e),X(4,h.a),X(5,g.a),X(6,w.c),X(7,G.a)],t)}(s.a),Z=function(e){function t(t){var o=e.call(this)||this;return o._dataSource=t,o}return K(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(k.i)||k.f).transparent(2),o=(e.getColor(k.k)||k.g).transparent(2),n=!t.equals(this._insertColor)||!o.equals(this._removeColor);return this._insertColor=t,this._removeColor=o,n},t.prototype.getEditorsDiffDecorations=function(e,t,o,n,i,r,s){i=i.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber})),n=n.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber}));var a=this._getViewZones(e,n,i,r,s,o),l=this._getOriginalEditorDecorations(e,t,o,r,s),u=this._getModifiedEditorDecorations(e,t,o,r,s);return{original:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.original},modified:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.modified}}},t}(s.a),Q=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++,this._index0){var o=e[e.length-1];if(o.afterLineNumber===t.afterLineNumber&&null===o.domNode)return void(o.heightInLines+=t.heightInLines)}e.push(t)},u=new Q(this.modifiedForeignVZ),c=new Q(this.originalForeignVZ),h=0,d=this.lineChanges.length;h<=d;h++){var g=h0?-1:0),i=g.modifiedStartLineNumber+(g.modifiedEndLineNumber>0?-1:0),o=g.originalEndLineNumber>0?g.originalEndLineNumber-g.originalStartLineNumber+1:0,t=g.modifiedEndLineNumber>0?g.modifiedEndLineNumber-g.modifiedStartLineNumber+1:0,r=Math.max(g.originalStartLineNumber,g.originalEndLineNumber),s=Math.max(g.modifiedStartLineNumber,g.modifiedEndLineNumber)):(r=n+=1e7+o,s=i+=1e7+t);for(var p,f=[],m=[];u.current&&u.current.afterLineNumber<=s;){var _=void 0;_=u.current.afterLineNumber<=i?n-i+u.current.afterLineNumber:r,f.push({afterLineNumber:_,heightInLines:u.current.heightInLines,domNode:null}),u.advance()}for(;c.current&&c.current.afterLineNumber<=r;){_=void 0;_=c.current.afterLineNumber<=n?i-n+c.current.afterLineNumber:s,m.push({afterLineNumber:_,heightInLines:c.current.heightInLines,domNode:null}),c.advance()}if(null!==g&&ae(g))(p=this._produceOriginalFromDiff(g,o,t))&&f.push(p);if(null!==g&&le(g))(p=this._produceModifiedFromDiff(g,o,t))&&m.push(p);var y=0,v=0;for(f=f.sort(a),m=m.sort(a);y=E.heightInLines?(b.heightInLines-=E.heightInLines,v++):(E.heightInLines-=b.heightInLines,y++)}for(;y2*t.MINIMUM_EDITOR_WIDTH?(no-t.MINIMUM_EDITOR_WIDTH&&(n=o-t.MINIMUM_EDITOR_WIDTH)):n=i,this._sashPosition!==n&&(this._sashPosition=n,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth()-J.ENTIRE_DIFF_OVERVIEW_WIDTH,o=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=o/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,o,n,i){return new ie(e,t,o).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,o,n,i){for(var r=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=n.getModel(),l=0,u=e.length;lt?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:o-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,o){return t>o?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-o,domNode:null}:null},t}(ee),re=function(e){function t(t,o){var n=e.call(this,t)||this;return n.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,n._register(t.getOriginalEditor().onDidLayoutChange((function(e){n.decorationsLeft!==e.decorationsLeft&&(n.decorationsLeft=e.decorationsLeft,t.relayoutEditors())}))),n}return K(t,e),t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,o,n,i,r){return new se(e,t,o,n,i,r).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,o,n,i){for(var r=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=0,l=e.length;a'])}d+=this.modifiedEditorConfiguration.viewInfo.scrollBeyondLastColumn;var m=document.createElement("div");m.className="view-lines line-delete",m.innerHTML=a.build(),b.a.applyFontInfoSlow(m,this.modifiedEditorConfiguration.fontInfo);var _=document.createElement("div");return _.className="inline-deleted-margin-view-zone",_.innerHTML=l.join(""),b.a.applyFontInfoSlow(_,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:d*h,domNode:m,marginDomNode:_}},t.prototype._renderOriginalLine=function(e,t,o,n,i,r,s){var a=t.getLineTokens(i),l=a.getLineContent(),u=_.a.filter(r,i,1,l.length+1);s.appendASCIIString('
    ');var c=E.d.isBasicASCII(l,t.mightContainNonBasicASCII()),h=E.d.containsRTL(l,c,t.mightContainRTL()),d=Object(y.c)(new y.b(o.fontInfo.isMonospace&&!o.viewInfo.disableMonospaceOptimizations,l,!1,c,h,0,a,u,n,o.fontInfo.spaceWidth,o.viewInfo.stopRenderingLineAfter,o.viewInfo.renderWhitespace,o.viewInfo.renderControlCharacters,o.viewInfo.fontLigatures),s);s.appendASCIIString("
    ");var g=d.characterMapping.getAbsoluteOffsets();return g.length>0?g[g.length-1]:0},t}(ee);function ae(e){return e.modifiedEndLineNumber>0}function le(e){return e.originalEndLineNumber>0}Object(w.e)((function(e,t){var o=e.getColor(k.i);o&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+o+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+o+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+o+"; }"));var n=e.getColor(k.k);n&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(k.j);i&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+i+"; }");var r=e.getColor(k.l);r&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+r+"; }");var s=e.getColor(k.lb);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }");var a=e.getColor(k.h);a&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid "+a+"; }")}))},function(e,t){var o={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},function(e,t,o){e.exports=o(328)},function(e,t,o){"use strict";(function(t,n){var i=o(180);e.exports=v;var r,s=o(265);v.ReadableState=y;o(212).EventEmitter;var a=function(e,t){return e.listeners(t).length},l=o(268),u=o(181).Buffer,c=t.Uint8Array||function(){};var h=o(167);h.inherits=o(147);var d=o(329),g=void 0;g=d&&d.debuglog?d.debuglog("stream"):function(){};var p,f=o(330),m=o(269);h.inherits(v,l);var _=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var n=t instanceof(r=r||o(136));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=o(270).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function v(e){if(r=r||o(136),!(this instanceof v))return new v(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function b(e,t,o,n,i){var r,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var o=t.decoder.end();o&&o.length&&(t.buffer.push(o),t.length+=t.objectMode?1:o.length)}t.ended=!0,T(e)}(e,s)):(i||(r=function(e,t){var o;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk"));var n;return o}(s,t)),r?e.emit("error",r):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!o?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):k(e,s)):E(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(w,e):w(e))}function w(e){g("emit readable"),e.emit("readable"),N(e)}function k(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(O,e,t))}function O(e,t){for(var o=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(o=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):o=function(e,t,o){var n;er.length?r.length:e;if(s===r.length?i+=r:i+=r.slice(0,e),0===(e-=s)){s===r.length?(++n,o.next?t.head=o.next:t.head=t.tail=null):(t.head=o,o.data=r.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var o=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(o),e-=n.data.length;for(;n=n.next;){var r=n.data,s=e>r.length?r.length:e;if(r.copy(o,o.length-e,0,s),0===(e-=s)){s===r.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=r.slice(s));break}++i}return t.length-=i,o}(e,t);return n}(e,t.buffer,t.decoder),o);var o}function D(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var o=0,n=e.length;o=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):T(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,i=t.needReadable;return g("need readable",i),(0===t.length||t.length-e0?I(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),o!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var o=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,g("pipe count=%d opts=%j",r.pipesCount,t);var l=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:v;function u(t,n){g("onunpipe"),t===o&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,g("cleanup"),e.removeListener("close",_),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",m),e.removeListener("unpipe",u),o.removeListener("end",c),o.removeListener("end",v),o.removeListener("data",f),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function c(){g("onend"),e.end()}r.endEmitted?i.nextTick(l):o.once("end",l),e.on("unpipe",u);var h=function(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,N(e))}}(o);e.on("drain",h);var d=!1;var p=!1;function f(t){g("ondata"),p=!1,!1!==e.write(t)||p||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==P(r.pipes,e))&&!d&&(g("false write response, pause",o._readableState.awaitDrain),o._readableState.awaitDrain++,p=!0),o.pause())}function m(t){g("onerror",t),v(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function _(){e.removeListener("finish",y),v()}function y(){g("onfinish"),e.removeListener("close",_),v()}function v(){g("unpipe"),o.unpipe(e)}return o.on("data",f),function(e,t,o){if("function"==typeof e.prependListener)return e.prependListener(t,o);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(o):e._events[t]=[o,e._events[t]]:e.on(t,o)}(e,"error",m),e.once("close",_),e.once("finish",y),e.emit("pipe",o),r.flowing||(g("pipe resume"),o.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,o={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,o),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,o=function(e,t,o){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==o?o:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var o=e.toString("utf16le",t);if(o){var n=o.charCodeAt(o.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],o.slice(0,-1)}return o}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var o=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,o)}return t}function c(e,t){var o=(e.length-t)%3;return 0===o?e.toString("base64",t):(this.lastNeed=3-o,this.lastTotal=3,1===o?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-o))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function g(e){return e&&e.length?this.write(e):""}t.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,o;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";o=this.lastNeed,this.lastNeed=0}else o=0;return o=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=o;var n=e.length-(o-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,o){"use strict";e.exports=s;var n=o(136),i=o(167);function r(e,t){var o=this._transformState;o.transforming=!1;var n=o.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));o.writechunk=null,o.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>2,a=(3&t)<<4|o>>4,l=g>1?(15&o)<<2|i>>6:64,u=g>2?63&i:64,c.push(r.charAt(s)+r.charAt(a)+r.charAt(l)+r.charAt(u));return c.join("")},t.decode=function(e){var t,o,n,s,a,l,u=0,c=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var h,d=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===r.charAt(64)&&d--,e.charAt(e.length-2)===r.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|d):new Array(0|d);u>4,o=(15&s)<<4|(a=r.indexOf(e.charAt(u++)))>>2,n=(3&a)<<6|(l=r.indexOf(e.charAt(u++))),h[c++]=t,64!==a&&(h[c++]=o),64!==l&&(h[c++]=n);return h}},function(e,t,o){"use strict";(function(t){var n=o(64),i=o(342),r=o(100),s=o(272),a=o(127),l=o(168),u=null;if(a.nodestream)try{u=o(343)}catch(e){}function c(e,o){return new l.Promise((function(i,r){var a=[],l=e._internalType,u=e._outputType,c=e._mimeType;e.on("data",(function(e,t){a.push(e),o&&o(t)})).on("error",(function(e){a=[],r(e)})).on("end",(function(){try{var e=function(e,t,o){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),o);case"base64":return s.encode(t);default:return n.transformTo(e,t)}}(u,function(e,o){var n,i=0,r=null,s=0;for(n=0;n=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=r},function(e,t,o){"use strict";var n=o(64),i=o(100);function r(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(r,i),r.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},e.exports=r},function(e,t,o){"use strict";var n=o(100),i=o(216);function r(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o(64).inherits(r,n),r.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=r},function(e,t,o){"use strict";var n=o(100);t.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},t.DEFLATE=o(346)},function(e,t,o){"use strict";e.exports=function(e,t,o,n){for(var i=65535&e|0,r=e>>>16&65535|0,s=0;0!==o;){o-=s=o>2e3?2e3:o;do{r=r+(i=i+t[n++]|0)|0}while(--s);i%=65521,r%=65521}return i|r<<16|0}},function(e,t,o){"use strict";var n=function(){for(var e,t=[],o=0;o<256;o++){e=o;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[o]=e}return t}();e.exports=function(e,t,o,i){var r=n,s=i+o;e^=-1;for(var a=i;a>>8^r[255&(e^t[a])];return-1^e}},function(e,t,o){"use strict";var n=o(128),i=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&r||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var o="",s=0;s>>6,t[s++]=128|63&o):o<65536?(t[s++]=224|o>>>12,t[s++]=128|o>>>6&63,t[s++]=128|63&o):(t[s++]=240|o>>>18,t[s++]=128|o>>>12&63,t[s++]=128|o>>>6&63,t[s++]=128|63&o);return t},t.buf2binstring=function(e){return l(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),o=0,i=t.length;o4)u[n++]=65533,o+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&o1?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return l(u,n)},t.utf8border=function(e,t){var o;for((t=t||e.length)>e.length&&(t=e.length),o=t-1;o>=0&&128==(192&e[o]);)o--;return o<0?t:0===o?t:o+s[e[o]]>t?o:t}},function(e,t,o){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,o){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,o){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},function(e,t,o){"use strict";var n=o(64),i=o(127),r=o(286),s=o(360),a=o(361),l=o(288);e.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new l(n.transformTo("uint8array",e)):new r(n.transformTo("array",e)):new s(e)}},function(e,t,o){"use strict";var n=o(287);function i(e){n.call(this,e);for(var t=0;t=0;--r)if(this.data[r]===t&&this.data[r+1]===o&&this.data[r+2]===n&&this.data[r+3]===i)return r-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),r=this.readData(4);return t===r[0]&&o===r[1]&&n===r[2]&&i===r[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(64);function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)o=(o<<8)+this.byteAt(t);return this.index+=e,o},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=i},function(e,t,o){"use strict";var n=o(286);function i(e){n.call(this,e)}o(64).inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(149);e.exports=function(e){n.copy(e,this)}},function(e,t,o){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var o,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(o=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},r={key:n,value:e[n]};return o(i,r)}}),r=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var o,s;if(Array.isArray(t)){for(s="[",o=0;o",y=g?">":"<",v=void 0;if(m){var b=e.util.getData(f.$data,s,e.dataPathArr),E="exclusive"+r,C="exclType"+r,S="exclIsNumber"+r,T="' + "+(O="op"+r)+" + '";i+=" var schemaExcl"+r+" = "+b+"; ",i+=" var "+E+"; var "+C+" = typeof "+(b="schemaExcl"+r)+"; if ("+C+" != 'boolean' && "+C+" != 'undefined' && "+C+" != 'number') { ";var w;v=p;(w=w||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(v||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var k=i;i=w.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+C+" == 'number' ? ( ("+E+" = "+n+" === undefined || "+b+" "+_+"= "+n+") ? "+h+" "+y+"= "+b+" : "+h+" "+y+" "+n+" ) : ( ("+E+" = "+b+" === true) ? "+h+" "+y+"= "+n+" : "+h+" "+y+" "+n+" ) || "+h+" !== "+h+") { var op"+r+" = "+E+" ? '"+_+"' : '"+_+"='; ",void 0===a&&(v=p,u=e.errSchemaPath+"/"+p,n=b,d=m)}else{T=_;if((S="number"==typeof f)&&d){var O="'"+T+"'";i+=" if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+f+" "+_+"= "+n+" ? "+h+" "+y+"= "+f+" : "+h+" "+y+" "+n+" ) || "+h+" !== "+h+") { "}else{S&&void 0===a?(E=!0,v=p,u=e.errSchemaPath+"/"+p,n=f,y+="="):(S&&(n=Math[g?"min":"max"](f,a)),f===(!S||n)?(E=!0,v=p,u=e.errSchemaPath+"/"+p,y+="="):(E=!1,T+="="));O="'"+T+"'";i+=" if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+h+" "+y+" "+n+" || "+h+" !== "+h+") { "}}v=v||t,(w=w||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(v||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+O+", limit: "+n+", exclusive: "+E+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+T+" ",i+=d?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";k=i;return i=w.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a,i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+h+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var g=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(g||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=d?"' + "+n+" + '":""+a,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var f=i;return i=p.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a;var g="maxLength"==t?">":"<";i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+h+".length ":i+=" ucs2length("+h+") ",i+=" "+g+" "+n+") { ";var p=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=d?"' + "+n+" + '":""+a,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var m=i;return i=f.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a,i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+h+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var g=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(g||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=d?"' + "+n+" + '":""+a,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var f=i;return i=p.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(e,t,o){var n=o(397),i=o(398),r=o(411),s=RegExp("['’]","g");e.exports=function(e){return function(t){return n(r(i(t).replace(s,"")),e,"")}}},function(e,t){var o=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return o.test(e)}},function(e,t,o){},function(e,t,o){"use strict";o.r(t);o(496),o(223),o(231),o(232),o(256),o(230),o(234),o(237),o(236);var n=o(137);for(var i in n)"default"!==i&&function(e){o.d(t,e,(function(){return n[e]}))}(i)},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r,s=o(169);!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(r=t.ErrorCodes||(t.ErrorCodes={}));var a=function(e){function t(o,n,i){var a=e.call(this,n)||this;return a.code=s.number(o)?o:r.UnknownErrorCode,a.data=i,Object.setPrototypeOf(a,t.prototype),a}return i(t,e),t.prototype.toJson=function(){return{code:this.code,message:this.message,data:this.data}},t}(Error);t.ResponseError=a;var l=function(){function e(e,t){this._method=e,this._numberOfParams=t}return Object.defineProperty(e.prototype,"method",{get:function(){return this._method},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfParams",{get:function(){return this._numberOfParams},enumerable:!0,configurable:!0}),e}();t.AbstractMessageType=l;var u=function(e){function t(t){var o=e.call(this,t,0)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType0=u;var c=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType=c;var h=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType1=h;var d=function(e){function t(t){var o=e.call(this,t,2)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType2=d;var g=function(e){function t(t){var o=e.call(this,t,3)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType3=g;var p=function(e){function t(t){var o=e.call(this,t,4)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType4=p;var f=function(e){function t(t){var o=e.call(this,t,5)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType5=f;var m=function(e){function t(t){var o=e.call(this,t,6)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType6=m;var _=function(e){function t(t){var o=e.call(this,t,7)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType7=_;var y=function(e){function t(t){var o=e.call(this,t,8)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType8=y;var v=function(e){function t(t){var o=e.call(this,t,9)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType9=v;var b=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType=b;var E=function(e){function t(t){var o=e.call(this,t,0)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType0=E;var C=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType1=C;var S=function(e){function t(t){var o=e.call(this,t,2)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType2=S;var T=function(e){function t(t){var o=e.call(this,t,3)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType3=T;var w=function(e){function t(t){var o=e.call(this,t,4)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType4=w;var k=function(e){function t(t){var o=e.call(this,t,5)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType5=k;var O=function(e){function t(t){var o=e.call(this,t,6)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType6=O;var R=function(e){function t(t){var o=e.call(this,t,7)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType7=R;var L=function(e){function t(t){var o=e.call(this,t,8)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType8=L;var N=function(e){function t(t){var o=e.call(this,t,9)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType9=N,t.isRequestMessage=function(e){var t=e;return t&&s.string(t.method)&&(s.string(t.id)||s.number(t.id))},t.isNotificationMessage=function(e){var t=e;return t&&s.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){var t=e;return t&&(void 0!==t.result||!!t.error)&&(s.string(t.id)||s.number(t.id)||null===t.id)}},function(e,t,o){(function(e){function o(e,t){for(var o=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),o++):o&&(e.splice(n,1),o--)}if(t)for(;o--;o)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var o=[],n=0;n=-1&&!i;r--){var s=r>=0?arguments[r]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return(i?"/":"")+(t=o(n(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var r=t.isAbsolute(e),s="/"===i(e,-1);return(e=o(n(e.split("/"),(function(e){return!!e})),!r).join("/"))||r||(e="."),e&&s&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,o){function n(e){for(var t=0;t=0&&""===e[o];o--);return t>o?[]:e.slice(t,o-t+1)}e=t.resolve(e).substr(1),o=t.resolve(o).substr(1);for(var i=n(e.split("/")),r=n(o.split("/")),s=Math.min(i.length,r.length),a=s,l=0;l=1;--r)if(47===(t=e.charCodeAt(r))){if(!i){n=r;break}}else i=!1;return-1===n?o?"/":".":o&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var o=function(e){"string"!=typeof e&&(e+="");var t,o=0,n=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){o=t+1;break}}else-1===n&&(i=!1,n=t+1);return-1===n?"":e.slice(o,n)}(e);return t&&o.substr(-1*t.length)===t&&(o=o.substr(0,o.length-t.length)),o},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,o=0,n=-1,i=!0,r=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(i=!1,n=s+1),46===a?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!i){o=s+1;break}}return-1===t||-1===n||0===r||1===r&&t===n-1&&t===o+1?"":e.slice(t,n)};var i="b"==="ab".substr(-1)?function(e,t,o){return e.substr(t,o)}:function(e,t,o){return t<0&&(t=e.length+t),e.substr(t,o)}}).call(this,o(108))},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,o){"use strict";function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0}),n(o(305)),n(o(306)),n(o(502))},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var o=e.call(this)||this;return o.socket=t,o.state="initial",o.events=[],o.socket.onMessage((function(e){return o.readMessage(e)})),o.socket.onError((function(e){return o.fireError(e)})),o.socket.onClose((function(e,t){if(1e3!==e){var n={name:""+e,message:"Error during socket reconnect: code = "+e+", reason = "+t};o.fireError(n)}o.fireClose()})),o}return i(t,e),t.prototype.listen=function(e){if("initial"===this.state)for(this.state="listening",this.callback=e;0!==this.events.length;){var t=this.events.pop();t.message?this.readMessage(t.message):t.error?this.fireError(t.error):this.fireClose()}},t.prototype.readMessage=function(e){if("initial"===this.state)this.events.splice(0,0,{message:e});else if("listening"===this.state){var t=JSON.parse(e);this.callback(t)}},t.prototype.fireError=function(t){"initial"===this.state?this.events.splice(0,0,{error:t}):"listening"===this.state&&e.prototype.fireError.call(this,t)},t.prototype.fireClose=function(){"initial"===this.state?this.events.splice(0,0,{}):"listening"===this.state&&e.prototype.fireClose.call(this),this.state="closed"},t}(o(183).AbstractMessageReader);t.WebSocketMessageReader=r},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var o=e.call(this)||this;return o.socket=t,o.errorCount=0,o}return i(t,e),t.prototype.write=function(e){try{var t=JSON.stringify(e);this.socket.send(t)}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(o(184).AbstractMessageWriter);t.WebSocketMessageWriter=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.error=function(e){console.error(e)},e.prototype.warn=function(e){console.warn(e)},e.prototype.info=function(e){console.info(e)},e.prototype.log=function(e){console.log(e)},e.prototype.debug=function(e){console.debug(e)},e}();t.ConsoleLogger=n},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t}(o(109).CompletionItem);t.default=r},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t}(o(109).CodeLens);t.default=r},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,o){return e.call(this,t,o)||this}return i(t,e),t}(o(109).DocumentLink);t.default=r},function(e,t,o){"use strict";var n=this&&this.__read||function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var s,a=o(530),l=o(121),u=o(531),c=o(185);function h(e,t){return a(e,{extended:!0,globstar:!0}).test(t)}!function(e){e.fromDocument=function(e){return{uri:monaco.Uri.parse(e.uri),languageId:e.languageId}},e.fromModel=function(e){return{uri:e.uri,languageId:e.getModeId()}}}(s=t.MonacoModelIdentifier||(t.MonacoModelIdentifier={})),t.testGlob=h;var d=function(){function e(e,t){this.p2m=e,this.m2p=t}return e.prototype.match=function(e,t){return this.matchModel(e,s.fromDocument(t))},e.prototype.createDiagnosticCollection=function(e){return new u.MonacoDiagnosticCollection(e||"default",this.p2m)},e.prototype.registerCompletionItemProvider=function(e,t){for(var o,n,s=[],a=2;a=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}},i=this&&this.__read||function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},r=this&&this.__spread||function(){for(var e=[],t=0;t0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},r=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var a,l,u,c=o(245),h=o(121);!function(e){e.is=function(e){return!!e&&"data"in e}}(a=t.ProtocolDocumentLink||(t.ProtocolDocumentLink={})),function(e){e.is=function(e){return!!e&&"data"in e}}(l=t.ProtocolCodeLens||(t.ProtocolCodeLens={})),function(e){e.is=function(e){return!!e&&"data"in e}}(u=t.ProtocolCompletionItem||(t.ProtocolCompletionItem={}));var d=function(){function e(){}return e.prototype.asPosition=function(e,t){return{line:null==e?void 0:e-1,character:null==t?void 0:t-1}},e.prototype.asRange=function(e){if(void 0!==e)return null===e?null:{start:this.asPosition(e.startLineNumber,e.startColumn),end:this.asPosition(e.endLineNumber,e.endColumn)}},e.prototype.asTextDocumentIdentifier=function(e){return{uri:e.uri.toString()}},e.prototype.asTextDocumentPositionParams=function(e,t){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column)}},e.prototype.asCompletionParams=function(e,t,o){return Object.assign(this.asTextDocumentPositionParams(e,t),{context:this.asCompletionContext(o)})},e.prototype.asCompletionContext=function(e){return{triggerKind:this.asTriggerKind(e.triggerKind),triggerCharacter:e.triggerCharacter}},e.prototype.asTriggerKind=function(e){switch(e){case monaco.languages.SuggestTriggerKind.TriggerCharacter:return h.CompletionTriggerKind.TriggerCharacter;case monaco.languages.SuggestTriggerKind.TriggerForIncompleteCompletions:return h.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return h.CompletionTriggerKind.Invoked}},e.prototype.asCompletionItem=function(e){var t={label:e.label},o=u.is(e)?e:void 0;return e.detail&&(t.detail=e.detail),e.documentation&&(o&&o.documentationFormat?t.documentation=this.asDocumentation(o.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),this.fillPrimaryInsertText(t,e),c.number(e.kind)&&(t.kind=this.asCompletionItemKind(e.kind,o&&o.originalItemKind)),e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=this.asTextEdits(e.additionalTextEdits)),e.command&&(t.command=this.asCommand(e.command)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=this.asCommand(e.command)),o&&(void 0!==o.data&&(t.data=o.data),!0!==o.deprecated&&!1!==o.deprecated||(t.deprecated=o.deprecated)),t},e.prototype.asCompletionItemKind=function(e,t){return void 0!==t?t:e+1},e.prototype.asDocumentation=function(e,t){switch(e){case h.MarkupKind.PlainText:return{kind:e,value:t};case h.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}},e.prototype.fillPrimaryInsertText=function(e,t){var o,n,i=h.InsertTextFormat.PlainText;t.textEdit?(o=t.textEdit.text,n=this.asRange(t.textEdit.range)):"string"==typeof t.insertText?o=t.insertText:t.insertText&&(i=h.InsertTextFormat.Snippet,o=t.insertText.value),t.range&&(n=this.asRange(t.range)),e.insertTextFormat=i,t.fromEdit&&o&&n?e.textEdit={newText:o,range:n}:e.insertText=o},e.prototype.asTextEdit=function(e){return{range:this.asRange(e.range),newText:e.text}},e.prototype.asTextEdits=function(e){var t=this;if(e)return e.map((function(e){return t.asTextEdit(e)}))},e.prototype.asReferenceParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),context:{includeDeclaration:o.includeDeclaration}}},e.prototype.asDocumentSymbolParams=function(e){return{textDocument:this.asTextDocumentIdentifier(e)}},e.prototype.asCodeLensParams=function(e){return{textDocument:this.asTextDocumentIdentifier(e)}},e.prototype.asDiagnosticSeverity=function(e){switch(e){case monaco.MarkerSeverity.Error:return h.DiagnosticSeverity.Error;case monaco.MarkerSeverity.Warning:return h.DiagnosticSeverity.Warning;case monaco.MarkerSeverity.Info:return h.DiagnosticSeverity.Information;case monaco.MarkerSeverity.Hint:return h.DiagnosticSeverity.Hint}},e.prototype.asDiagnostic=function(e){var t=this.asRange(new monaco.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)),o=this.asDiagnosticSeverity(e.severity);return h.Diagnostic.create(t,e.message,o,e.code,e.source)},e.prototype.asDiagnostics=function(e){var t=this;return null==e?e:e.map((function(e){return t.asDiagnostic(e)}))},e.prototype.asCodeActionContext=function(e){if(null==e)return e;var t=this.asDiagnostics(e.markers);return h.CodeActionContext.create(t,c.string(e.only)?[e.only]:void 0)},e.prototype.asCodeActionParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),range:this.asRange(t),context:this.asCodeActionContext(o)}},e.prototype.asCommand=function(e){if(e){var t=e.arguments||[];return h.Command.create.apply(h.Command,r([e.title,e.id],t))}},e.prototype.asCodeLens=function(e){var t=h.CodeLens.create(this.asRange(e.range));return e.command&&(t.command=this.asCommand(e.command)),l.is(e)&&e.data&&(t.data=e.data),t},e.prototype.asFormattingOptions=function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},e.prototype.asDocumentFormattingParams=function(e,t){return{textDocument:this.asTextDocumentIdentifier(e),options:this.asFormattingOptions(t)}},e.prototype.asDocumentRangeFormattingParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),range:this.asRange(t),options:this.asFormattingOptions(o)}},e.prototype.asDocumentOnTypeFormattingParams=function(e,t,o,n){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),ch:o,options:this.asFormattingOptions(n)}},e.prototype.asRenameParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),newName:o}},e.prototype.asDocumentLinkParams=function(e){return{textDocument:this.asTextDocumentIdentifier(e)}},e.prototype.asDocumentLink=function(e){var t=h.DocumentLink.create(this.asRange(e.range));return e.url&&(t.target=e.url),a.is(e)&&e.data&&(t.data=e.data),t},e}();t.MonacoToProtocolConverter=d;var g=function(){function e(){}return e.prototype.asResourceEdits=function(e,t,o){return{resource:e,edits:this.asTextEdits(t),modelVersionId:o}},e.prototype.asWorkspaceEdit=function(e){var t,o,n,i;if(e){var r=[];if(e.documentChanges)try{for(var a=s(e.documentChanges),l=a.next();!l.done;l=a.next()){var u=l.value,c=monaco.Uri.parse(u.textDocument.uri),h="number"==typeof u.textDocument.version?u.textDocument.version:void 0;r.push(this.asResourceEdits(c,u.edits,h))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}else if(e.changes)try{for(var d=s(Object.keys(e.changes)),g=d.next();!g.done;g=d.next()){var p=g.value;c=monaco.Uri.parse(p);r.push(this.asResourceEdits(c,e.changes[p]))}}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return{edits:r}}},e.prototype.asTextEdit=function(e){if(e)return{range:this.asRange(e.range),text:e.newText}},e.prototype.asTextEdits=function(e){var t=this;if(e)return e.map((function(e){return t.asTextEdit(e)}))},e.prototype.asCodeLens=function(e){if(e){var t={range:this.asRange(e.range)};return e.command&&(t.command=this.asCommand(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}},e.prototype.asCodeLenses=function(e){var t=this;if(e)return e.map((function(e){return t.asCodeLens(e)}))},e.prototype.asCodeActions=function(e){var t=this;return e.map((function(e){return t.asCodeAction(e)}))},e.prototype.asCodeAction=function(e){return h.CodeAction.is(e)?{title:e.title,command:this.asCommand(e.command),edit:this.asWorkspaceEdit(e.edit),diagnostics:this.asDiagnostics(e.diagnostics),kind:e.kind}:{command:{id:e.command,title:e.title,arguments:e.arguments},title:e.title}},e.prototype.asCommand=function(e){if(e)return{id:e.command,title:e.title,arguments:e.arguments}},e.prototype.asDocumentSymbol=function(e){var t=this,o=e.children&&e.children.map((function(e){return t.asDocumentSymbol(e)}));return{name:e.name,detail:e.detail||"",kind:this.asSymbolKind(e.kind),range:this.asRange(e.range),selectionRange:this.asRange(e.selectionRange),children:o}},e.prototype.asDocumentSymbols=function(e){var t=this;return h.DocumentSymbol.is(e[0])?e.map((function(e){return t.asDocumentSymbol(e)})):this.asSymbolInformations(e)},e.prototype.asSymbolInformations=function(e,t){var o=this;if(e)return e.map((function(e){return o.asSymbolInformation(e,t)}))},e.prototype.asSymbolInformation=function(e,t){var o=this.asLocation(t?n({},e.location,{uri:t.toString()}):e.location);return{name:e.name,detail:"",containerName:e.containerName,kind:this.asSymbolKind(e.kind),range:o.range,selectionRange:o.range}},e.prototype.asSymbolKind=function(e){return e<=h.SymbolKind.TypeParameter?e-1:monaco.languages.SymbolKind.Property},e.prototype.asDocumentHighlights=function(e){var t=this;if(e)return e.map((function(e){return t.asDocumentHighlight(e)}))},e.prototype.asDocumentHighlight=function(e){return{range:this.asRange(e.range),kind:c.number(e.kind)?this.asDocumentHighlightKind(e.kind):void 0}},e.prototype.asDocumentHighlightKind=function(e){switch(e){case h.DocumentHighlightKind.Text:return monaco.languages.DocumentHighlightKind.Text;case h.DocumentHighlightKind.Read:return monaco.languages.DocumentHighlightKind.Read;case h.DocumentHighlightKind.Write:return monaco.languages.DocumentHighlightKind.Write}return monaco.languages.DocumentHighlightKind.Text},e.prototype.asReferences=function(e){var t=this;if(e)return e.map((function(e){return t.asLocation(e)}))},e.prototype.asDefinitionResult=function(e){var t=this;if(e)return c.array(e)?e.map((function(e){return t.asLocation(e)})):this.asLocation(e)},e.prototype.asLocation=function(e){if(e)return{uri:monaco.Uri.parse(e.uri),range:this.asRange(e.range)}},e.prototype.asSignatureHelp=function(e){if(e){var t={};return c.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,c.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures?t.signatures=this.asSignatureInformations(e.signatures):t.signatures=[],t}},e.prototype.asSignatureInformations=function(e){var t=this;return e.map((function(e){return t.asSignatureInformation(e)}))},e.prototype.asSignatureInformation=function(e){var t={label:e.label};return e.documentation&&(t.documentation=this.asDocumentation(e.documentation)),e.parameters?t.parameters=this.asParameterInformations(e.parameters):t.parameters=[],t},e.prototype.asParameterInformations=function(e){var t=this;return e.map((function(e){return t.asParameterInformation(e)}))},e.prototype.asParameterInformation=function(e){var t={label:e.label};return e.documentation&&(t.documentation=this.asDocumentation(e.documentation)),t},e.prototype.asHover=function(e){if(e)return{contents:this.asHoverContent(e.contents),range:this.asRange(e.range)}},e.prototype.asHoverContent=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.asMarkdownString(e)})):[this.asMarkdownString(e)]},e.prototype.asDocumentation=function(e){return c.string(e)?e:e.kind===h.MarkupKind.PlainText?e.value:this.asMarkdownString(e)},e.prototype.asMarkdownString=function(e){return h.MarkupContent.is(e)?{value:e.value}:c.string(e)?{value:e}:{value:"```"+e.language+"\n"+e.value+"\n```"}},e.prototype.asSeverity=function(e){return 1===e?monaco.MarkerSeverity.Error:2===e?monaco.MarkerSeverity.Warning:3===e?monaco.MarkerSeverity.Info:monaco.MarkerSeverity.Hint},e.prototype.asDiagnostics=function(e){var t=this;if(e)return e.map((function(e){return t.asDiagnostic(e)}))},e.prototype.asDiagnostic=function(e){return{code:"number"==typeof e.code?e.code.toString():e.code,severity:this.asSeverity(e.severity),message:e.message,source:e.source,startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,relatedInformation:this.asRelatedInformations(e.relatedInformation)}},e.prototype.asRelatedInformations=function(e){var t=this;if(e)return e.map((function(e){return t.asRelatedInformation(e)}))},e.prototype.asRelatedInformation=function(e){return{resource:monaco.Uri.parse(e.location.uri),startLineNumber:e.location.range.start.line+1,startColumn:e.location.range.start.character+1,endLineNumber:e.location.range.end.line+1,endColumn:e.location.range.end.character+1,message:e.message}},e.prototype.asCompletionResult=function(e){var t=this;return e?Array.isArray(e)?{isIncomplete:!1,items:e.map((function(e){return t.asCompletionItem(e)}))}:{isIncomplete:e.isIncomplete,items:e.items.map(this.asCompletionItem.bind(this))}:{isIncomplete:!1,items:[]}},e.prototype.asCompletionItem=function(e){var t={label:e.label};e.detail&&(t.detail=e.detail),e.documentation&&(t.documentation=this.asDocumentation(e.documentation),t.documentationFormat=c.string(e.documentation)?void 0:e.documentation.kind),e.filterText&&(t.filterText=e.filterText);var o=this.asCompletionInsertText(e);if(o&&(t.insertText=o.text,t.range=o.range,t.fromEdit=o.fromEdit),c.number(e.kind)){var n=i(this.asCompletionItemKind(e.kind),2),r=n[0],s=n[1];t.kind=r,s&&(t.originalItemKind=s)}return e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=this.asTextEdits(e.additionalTextEdits)),c.stringArray(e.commitCharacters)&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=this.asCommand(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(t.deprecated=e.deprecated),void 0!==e.data&&(t.data=e.data),t},e.prototype.asCompletionItemKind=function(e){return h.CompletionItemKind.Text<=e&&e<=h.CompletionItemKind.TypeParameter?[e-1,void 0]:[h.CompletionItemKind.Text,e]},e.prototype.asCompletionInsertText=function(e){if(e.textEdit){var t=this.asRange(e.textEdit.range),o=e.textEdit.newText;return{text:e.insertTextFormat===h.InsertTextFormat.Snippet?{value:o}:o,range:t,fromEdit:!0}}if(e.insertText){o=e.insertText;return{text:e.insertTextFormat===h.InsertTextFormat.Snippet?{value:o}:o,fromEdit:!1}}},e.prototype.asDocumentLinks=function(e){var t=this;return e.map((function(e){return t.asDocumentLink(e)}))},e.prototype.asDocumentLink=function(e){return{range:this.asRange(e.range),url:e.target,data:e.data}},e.prototype.asRange=function(e){if(void 0!==e){if(null===e)return null;var t=this.asPosition(e.start),o=this.asPosition(e.end);return t instanceof monaco.Position&&o instanceof monaco.Position?new monaco.Range(t.lineNumber,t.column,o.lineNumber,o.column):{startLineNumber:t&&void 0!==t.lineNumber?t.lineNumber:void 0,startColumn:t&&void 0!==t.column?t.column:void 0,endLineNumber:o&&void 0!==o.lineNumber?o.lineNumber:void 0,endColumn:o&&void 0!==o.column?o.column:void 0}}},e.prototype.asPosition=function(e){if(void 0!==e){if(null===e)return null;var t=e.line,o=e.character,n=void 0===t?void 0:t+1,i=void 0===o?void 0:o+1;return void 0!==n&&void 0!==i?new monaco.Position(n,i):{lineNumber:n,column:i}}},e.prototype.asColorInformations=function(e){var t=this;return e.map((function(e){return t.asColorInformation(e)}))},e.prototype.asColorInformation=function(e){return{range:this.asRange(e.range),color:e.color}},e.prototype.asColorPresentations=function(e){var t=this;return e.map((function(e){return t.asColorPresentation(e)}))},e.prototype.asColorPresentation=function(e){return{label:e.label,textEdit:this.asTextEdit(e.textEdit),additionalTextEdits:this.asTextEdits(e.additionalTextEdits)}},e.prototype.asFoldingRanges=function(e){var t=this;return e?e.map((function(e){return t.asFoldingRange(e)})):e},e.prototype.asFoldingRange=function(e){return{start:e.startLine+1,end:e.endLine+1,kind:this.asFoldingRangeKind(e.kind)}},e.prototype.asFoldingRangeKind=function(e){if(e)switch(e){case h.FoldingRangeKind.Comment:return monaco.languages.FoldingRangeKind.Comment;case h.FoldingRangeKind.Imports:return monaco.languages.FoldingRangeKind.Imports;case h.FoldingRangeKind.Region:return monaco.languages.FoldingRangeKind.Region}},e}();t.ProtocolToMonacoConverter=g},function(e,t,o){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}n.prototype=o(325),n.prototype.loadAsync=o(358),n.support=o(127),n.defaults=o(274),n.version="3.2.0",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=o(168),e.exports=n},function(e,t,o){(function(o){var n,i,r;i=[],void 0===(r="function"==typeof(n=function(){"use strict";function t(e,t,o){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){s(n.response,t,o)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(o){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof o&&o.global===o?o:void 0,s=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,o,s){var a=r.URL||r.webkitURL,l=document.createElement("a");o=o||e.name||"download",l.download=o,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):n(l.href)?t(e,o,s):i(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,r){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,r),o);else if(n(e))t(e,o,r);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,o,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,o,n);var s="application/octet-stream"===e.type,a=/constructor/i.test(r.HTMLElement)||r.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&a)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var c=r.URL||r.webkitURL,h=c.createObjectURL(e);i?i.location=h:location.href=h,i=null,setTimeout((function(){c.revokeObjectURL(h)}),4e4)}});r.saveAs=s.saveAs=s,e.exports=s})?n.apply(t,i):n)||(e.exports=r)}).call(this,o(80))},function(e,t,o){"use strict";var n=o(363),i=o(218),r=o(367),s=o(289),a=o(290),l=o(368),u=o(369),c=o(390),h=o(149);e.exports=_,_.prototype.validate=function(e,t){var o;if("string"==typeof e){if(!(o=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);o=n.validate||this._compile(n)}var i=o(t);!0!==o.$async&&(this.errors=o.errors);return i},_.prototype.compile=function(e,t){var o=this._addSchema(e,void 0,t);return o.validate||this._compile(o)},_.prototype.addSchema=function(e,t,o,n){if(Array.isArray(e)){for(var r=0;r\n \n \n \n EQ\n \n \n AND\n \n \n \n TRUE\n \n \n \n \n 1\n \n \n \n \n \n \n 10\n \n \n \n \n WHILE\n \n \n i\n \n \n 1\n \n \n \n \n 10\n \n \n \n \n 1\n \n \n \n \n j\n \n \n BREAK\n \n \n \n \n 0\n \n \n ADD\n \n \n 1\n \n \n \n \n 1\n \n \n \n \n ROOT\n \n \n 9\n \n \n \n \n SIN\n \n \n 45\n \n \n \n \n PI\n \n \n \n EVEN\n \n \n 0\n \n \n \n \n ROUND\n \n \n 3.1\n \n \n \n \n \n SUM\n \n \n \n \n 64\n \n \n \n \n 10\n \n \n \n \n \n \n 50\n \n \n \n \n 1\n \n \n \n \n 100\n \n \n \n \n \n \n 1\n \n \n \n \n 100\n \n \n \n \n \n \n \n \n \n \n \n \n \n item\n \n \n \n \n \n \n \n \n \n abc\n \n \n \n \n \n \n \n \n \n \n \n FIRST\n \n \n text\n \n \n \n \n abc\n \n \n \n \n \n FROM_START\n \n \n text\n \n \n \n \n \n FROM_START\n FROM_START\n \n \n text\n \n \n \n \n UPPERCASE\n \n \n abc\n \n \n \n \n BOTH\n \n \n abc\n \n \n \n \n \n \n abc\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n \n \n \n \n \n \n FIRST\n \n \n list\n \n \n \n \n \n GET\n FROM_START\n \n \n list\n \n \n \n \n \n SET\n FROM_START\n \n \n list\n \n \n \n \n \n FROM_START\n FROM_START\n \n \n list\n \n \n \n \n \n SPLIT\n \n \n ,\n \n \n \n \n NUMERIC\n 1\n \n \n \n \n \n \n \n \n 1\n \n \n 20\n \n \n \n \n FORWARDS\n \n \n 1\n \n \n \n \n 20\n \n \n \n \n CLOCKWISE\n \n \n 1\n \n \n \n \n 20\n \n \n \n \n \n 1\n \n \n 50\n \n \n \n \n \n \n \n 1\n OUTPUT\n \n \n 1\n \n \n TRUE\n \n \n \n \n 1\n \n \n 1\n \n \n \n \n \n \n \n marker\n \n \n \n \n \n \n marker\n \n \n \n \n \n \n marker\n \n \n \n \n \n \n i\n \n \n \n \n \n'},function(e,t,o){"use strict";function n(e){for(var t=arguments,o=1;o0?t.children[0].text:""),i=t.props.inline,r=t.props.language,s=Prism.languages[r],a="language-"+r;return i?e("code",n({},t.data,{class:[t.data.class,a],domProps:n({},t.data.domProps,{innerHTML:Prism.highlight(o,s)})})):e("pre",n({},t.data,{class:[t.data.class,a]}),[e("code",{class:a,domProps:{innerHTML:Prism.highlight(o,s)}})])}};e.exports=i},function(e,t,o){"use strict";(function(e){o.d(t,"a",(function(){return f}));var n=o(115),i="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){!function(t){var o=function(e,t,n){if(!l(t)||c(t)||h(t)||d(t)||a(t))return t;var i,r=0,s=0;if(u(t))for(i=[],s=t.length;r=0||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o};function c(){for(var e=arguments.length,t=Array(e),o=0;o2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=(t.children||[]).map(h.bind(null,e)),s=Object.keys(t.attributes||{}).reduce((function(e,o){var n=t.attributes[o];switch(o){case"class":e.class=n.split(/\s+/).reduce((function(e,t){return e[t]=!0,e}),{});break;case"style":e.style=n.split(";").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var o=t.indexOf(":"),n=r.camelize(t.slice(0,o)),i=t.slice(o+1).trim();return e[n]=i,e}),{});break;default:e.attrs[o]=n}return e}),{class:{},style:{},attrs:{}}),a=n.class,d=void 0===a?{}:a,g=n.style,p=void 0===g?{}:g,f=n.attrs,m=void 0===f?{}:f,_=u(n,["class","style","attrs"]);return"string"==typeof t?t:e(t.tag,l({class:c(s.class,d),style:l({},s.style,p),attrs:l({},s.attrs,m)},_,{props:o}),i)}var d=!1;try{d=!0}catch(e){}function g(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?a({},e,t):{}}function p(e){return e&&"object"===(void 0===e?"undefined":s(e))&&e.prefix&&e.iconName&&e.icon?e:n.d.icon?n.d.icon(e):null===e?null:"object"===(void 0===e?"undefined":s(e))&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}var f={name:"FontAwesomeIcon",functional:!0,props:{beat:{type:Boolean,default:!1},border:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},flip:{type:String,default:null,validator:function(e){return["horizontal","vertical","both"].indexOf(e)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(e){return["right","left"].indexOf(e)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(e){return[90,180,270].indexOf(parseInt(e,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(e){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(e)>-1}},spin:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},inverse:{type:Boolean,default:!1}},render:function(e,t){var o=t.props,i=o.icon,r=o.mask,s=o.symbol,u=o.title,c=p(i),f=g("classes",function(e){var t,o=(t={"fa-spin":e.spin,"fa-spin-pulse":e.spinPulse,"fa-spin-reverse":e.spinReverse,"fa-pulse":e.pulse,"fa-beat":e.beat,"fa-fade":e.fade,"fa-flash":e.flash,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip-horizontal":"horizontal"===e.flip||"both"===e.flip,"fa-flip-vertical":"vertical"===e.flip||"both"===e.flip},a(t,"fa-"+e.size,null!==e.size),a(t,"fa-rotate-"+e.rotation,null!==e.rotation),a(t,"fa-pull-"+e.pull,null!==e.pull),a(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(o).map((function(e){return o[e]?e:null})).filter((function(e){return e}))}(o)),m=g("transform","string"==typeof o.transform?n.d.transform(o.transform):o.transform),_=g("mask",p(r)),y=Object(n.b)(c,l({},f,m,_,{symbol:s,title:u}));if(!y)return function(){var e;!d&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find one or more icon(s)",c,_);var v=y.abstract;return h.bind(null,e)(v[0],{},t.data)}};Boolean,String,Number,String,Object,Boolean,String}).call(this,o(80))},function(e,t,o){},function(e,t,o){(function(t){var o="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},n=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=o.Prism={manual:o.Prism&&o.Prism.manual,disableWorkerMessageHandler:o.Prism&&o.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof i?new i(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(E instanceof l)){if(f&&v!=t.length-1){if(d.lastIndex=b,!(O=d.exec(e)))break;for(var C=O.index+(p?O[1].length:0),S=O.index+O[0].length,T=v,w=b,k=t.length;T=(w+=t[T].length)&&(++v,b=w);if(t[v]instanceof l)continue;R=T-v,E=e.slice(b,w),O.index-=b}else{d.lastIndex=0;var O=d.exec(E),R=1}if(O){p&&(m=O[1]?O[1].length:0);S=(C=O.index+m)+(O=O[0].slice(m)).length;var L=E.slice(0,C),N=E.slice(S),I=[v,R];L&&(++v,b+=L.length,I.push(L));var D=new l(u,g?n.tokenize(O,g):O,_,O,f);if(I.push(D),N&&I.push(N),Array.prototype.splice.apply(t,I),1!=R&&n.matchGrammar(e,t,o,v,b,!0,u),s)break}else if(s)break}}}}},tokenize:function(e,t,o){var i=[e],r=t.rest;if(r){for(var s in r)t[s]=r[s];delete t.rest}return n.matchGrammar(e,i,t,0,0,!1),i},hooks:{all:{},add:function(e,t){var o=n.hooks.all;o[e]=o[e]||[],o[e].push(t)},run:function(e,t){var o=n.hooks.all[e];if(o&&o.length)for(var i,r=0;i=o[r++];)i(t)}}},i=n.Token=function(e,t,o,n,i){this.type=e,this.content=t,this.alias=o,this.length=0|(n||"").length,this.greedy=!!i};if(i.stringify=function(e,t,o){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map((function(o){return i.stringify(o,t,e)})).join("");var r={type:e.type,content:i.stringify(e.content,t,o),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:o};if(e.alias){var s="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,s)}n.hooks.run("wrap",r);var a=Object.keys(r.attributes).map((function(e){return e+'="'+(r.attributes[e]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+(a?" "+a:"")+">"+r.content+""},!o.document)return o.addEventListener?(n.disableWorkerMessageHandler||o.addEventListener("message",(function(e){var t=JSON.parse(e.data),i=t.language,r=t.code,s=t.immediateClose;o.postMessage(n.highlight(r,n.languages[i],i)),s&&o.close()}),!1),o.Prism):o.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),o.Prism}();e.exports&&(e.exports=n),void 0!==t&&(t.Prism=n),n.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/}}).call(this,o(80))},function(e,t,o){"use strict";var n=o(146),i=o(64),r=o(100),s=o(273),a=o(274),l=o(215),u=o(344),c=o(345),h=o(182),d=o(357),g=function(e,t,o){var n,s=i.getTypeOf(t),c=i.extend(o||{},a);c.date=c.date||new Date,null!==c.compression&&(c.compression=c.compression.toUpperCase()),"string"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(e=f(e)),c.createFolders&&(n=p(e))&&m.call(this,n,!0);var g="string"===s&&!1===c.binary&&!1===c.base64;o&&void 0!==o.binary||(c.binary=!g),(t instanceof l&&0===t.uncompressedSize||c.dir||!t||0===t.length)&&(c.base64=!1,c.binary=!0,t="",c.compression="STORE",s="string");var _=null;_=t instanceof l||t instanceof r?t:h.isNode&&h.isStream(t)?new d(e,t):i.prepareContent(e,t,c.binary,c.optimizedBinaryString,c.base64);var y=new u(e,_,c);this.files[e]=y},p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:a.createFolders,e=f(e),this.files[e]||g.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function _(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,o,n;for(t in this.files)this.files.hasOwnProperty(t)&&(n=this.files[t],(o=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(o,n))},filter:function(e){var t=[];return this.forEach((function(o,n){e(o,n)&&t.push(n)})),t},file:function(e,t,o){if(1===arguments.length){if(_(e)){var n=e;return this.filter((function(e,t){return!t.dir&&n.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null}return(e=this.root+e,g.call(this,e,t,o),this)},folder:function(e){if(!e)return this;if(_(e))return this.filter((function(t,o){return o.dir&&e.test(t)}));var t=this.root+e,o=m.call(this,t),n=this.clone();return n.root=o.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var o=this.filter((function(t,o){return o.name.slice(0,e.length)===e})),n=0;n0?s-4:s;for(o=0;o>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===a&&(t=i[e.charCodeAt(o)]<<2|i[e.charCodeAt(o+1)]>>4,l[c++]=255&t);1===a&&(t=i[e.charCodeAt(o)]<<10|i[e.charCodeAt(o+1)]<<4|i[e.charCodeAt(o+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,o=e.length,i=o%3,r=[],s=0,a=o-i;sa?a:s+16383));1===i?(t=e[o-1],r.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[o-2]<<8)+e[o-1],r.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return r.join("")};for(var n=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");return-1===o&&(o=t),[o,o===t?0:4-o%4]}function c(e,t,o){for(var i,r,s=[],a=t;a>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,o,n,i){var r,s,a=8*i-n-1,l=(1<>1,c=-7,h=o?i-1:0,d=o?-1:1,g=e[t+h];for(h+=d,r=g&(1<<-c)-1,g>>=-c,c+=a;c>0;r=256*r+e[t+h],h+=d,c-=8);for(s=r&(1<<-c)-1,r>>=-c,c+=n;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===r)r=1-u;else{if(r===l)return s?NaN:1/0*(g?-1:1);s+=Math.pow(2,n),r-=u}return(g?-1:1)*s*Math.pow(2,r-n)},t.write=function(e,t,o,n,i,r){var s,a,l,u=8*r-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:r-1,p=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[o+g]=255&a,g+=p,a/=256,i-=8);for(s=s<0;e[o+g]=255&s,g+=p,s/=256,u-=8);e[o+g-p]|=128*f}},function(e,t,o){e.exports=i;var n=o(212).EventEmitter;function i(){n.call(this)}o(147)(i,n),i.Readable=o(213),i.Writable=o(335),i.Duplex=o(336),i.Transform=o(337),i.PassThrough=o(338),i.Stream=i,i.prototype.pipe=function(e,t){var o=this;function i(t){e.writable&&!1===e.write(t)&&o.pause&&o.pause()}function r(){o.readable&&o.resume&&o.resume()}o.on("data",i),e.on("drain",r),e._isStdio||t&&!1===t.end||(o.on("end",a),o.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){o.removeListener("data",i),e.removeListener("drain",r),o.removeListener("end",a),o.removeListener("close",l),o.removeListener("error",u),e.removeListener("error",u),o.removeListener("end",c),o.removeListener("close",c),e.removeListener("close",c)}return o.on("error",u),e.on("error",u),o.on("end",c),o.on("close",c),e.on("close",c),e.emit("pipe",o),e}},function(e,t){},function(e,t,o){"use strict";var n=o(181).Buffer,i=o(331);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,o=""+t.data;t=t.next;)o+=e+t.data;return o},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,o,i,r=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,o=r,i=a,t.copy(o,i),a+=s.data.length,s=s.next;return r},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,o){(function(e,t){!function(e,o){"use strict";if(!e.setImmediate){var n,i,r,s,a,l=1,u={},c=!1,h=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,o=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=o,t}}()?e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){r.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,n=function(e){var t=h.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),o=0;o0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var o=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(o!==u)throw new Error(s[o]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var p;if(p="string"==typeof t.dictionary?r.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(o=n.deflateSetDictionary(this.strm,p))!==u)throw new Error(s[o]);this._dict_set=!0}}function p(e,t){var o=new g(t);if(o.push(e,!0),o.err)throw o.msg||s[o.err];return o.result}g.prototype.push=function(e,t){var o,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=r.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(c),a.next_out=0,a.avail_out=c),1!==(o=n.deflate(a,s))&&o!==u)return this.onEnd(o),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(r.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==o);return 4===s?(o=n.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===u):2!==s||(this.onEnd(u),a.avail_out=0,!0)},g.prototype.onData=function(e){this.chunks.push(e)},g.prototype.onEnd=function(e){e===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=g,t.deflate=p,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,p(e,t)}},function(e,t,o){"use strict";var n,i=o(128),r=o(350),s=o(279),a=o(280),l=o(217),u=0,c=1,h=3,d=4,g=5,p=0,f=1,m=-2,_=-3,y=-5,v=-1,b=1,E=2,C=3,S=4,T=0,w=2,k=8,O=9,R=15,L=8,N=286,I=30,D=19,A=2*N+1,P=15,x=3,M=258,B=M+x+1,F=32,H=42,U=69,V=73,W=91,j=103,G=113,z=666,K=1,Y=2,X=3,q=4,$=3;function J(e,t){return e.msg=l[t],t}function Z(e){return(e<<1)-(e>4?9:0)}function Q(e){for(var t=e.length;--t>=0;)e[t]=0}function ee(e){var t=e.state,o=t.pending;o>e.avail_out&&(o=e.avail_out),0!==o&&(i.arraySet(e.output,t.pending_buf,t.pending_out,o,e.next_out),e.next_out+=o,t.pending_out+=o,e.total_out+=o,e.avail_out-=o,t.pending-=o,0===t.pending&&(t.pending_out=0))}function te(e,t){r._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ee(e.strm)}function oe(e,t){e.pending_buf[e.pending++]=t}function ne(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function ie(e,t){var o,n,i=e.max_chain_length,r=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-B?e.strstart-(e.w_size-B):0,u=e.window,c=e.w_mask,h=e.prev,d=e.strstart+M,g=u[r+s-1],p=u[r+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(o=t)+s]===p&&u[o+s-1]===g&&u[o]===u[r]&&u[++o]===u[r+1]){r+=2,o++;do{}while(u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&rs){if(e.match_start=t,s=n,n>=a)break;g=u[r+s-1],p=u[r+s]}}}while((t=h[t&c])>l&&0!=--i);return s<=e.lookahead?s:e.lookahead}function re(e){var t,o,n,r,l,u,c,h,d,g,p=e.w_size;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-B)){i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=o=e.hash_size;do{n=e.head[--t],e.head[t]=n>=p?n-p:0}while(--o);t=o=p;do{n=e.prev[--t],e.prev[t]=n>=p?n-p:0}while(--o);r+=p}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,h=e.strstart+e.lookahead,d=r,g=void 0,(g=u.avail_in)>d&&(g=d),o=0===g?0:(u.avail_in-=g,i.arraySet(c,u.input,u.next_in,g,h),1===u.state.wrap?u.adler=s(u.adler,c,g,h):2===u.state.wrap&&(u.adler=a(u.adler,c,g,h)),u.next_in+=g,u.total_in+=g,g),e.lookahead+=o,e.lookahead+e.insert>=x)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<=x)if(n=r._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=x&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=x-1)),e.prev_length>=x&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-x,n=r._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(a=2,n-=16),r<1||r>O||o!==k||n<8||n>15||t<0||t>9||s<0||s>S)return J(e,m);8===n&&(n=9);var l=new ue;return e.state=l,l.strm=e,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<e.pending_buf_size-5&&(o=e.pending_buf_size-5);;){if(e.lookahead<=1){if(re(e),0===e.lookahead&&t===u)return K;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+o;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,te(e,!1),0===e.strm.avail_out))return K;if(e.strstart-e.block_start>=e.w_size-B&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?X:q):(e.strstart>e.block_start&&(te(e,!1),e.strm.avail_out),K)})),new le(4,4,8,4,se),new le(4,5,16,8,se),new le(4,6,32,32,se),new le(4,4,16,16,ae),new le(8,16,32,32,ae),new le(8,16,128,128,ae),new le(8,32,128,256,ae),new le(32,128,258,1024,ae),new le(32,258,258,4096,ae)],t.deflateInit=function(e,t){return de(e,t,k,R,L,T)},t.deflateInit2=de,t.deflateReset=he,t.deflateResetKeep=ce,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?m:(e.state.gzhead=t,p):m},t.deflate=function(e,t){var o,i,s,l;if(!e||!e.state||t>g||t<0)return e?J(e,m):m;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===z&&t!==d)return J(e,0===e.avail_out?y:m);if(i.strm=e,o=i.last_flush,i.last_flush=t,i.status===H)if(2===i.wrap)e.adler=0,oe(i,31),oe(i,139),oe(i,8),i.gzhead?(oe(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),oe(i,255&i.gzhead.time),oe(i,i.gzhead.time>>8&255),oe(i,i.gzhead.time>>16&255),oe(i,i.gzhead.time>>24&255),oe(i,9===i.level?2:i.strategy>=E||i.level<2?4:0),oe(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(oe(i,255&i.gzhead.extra.length),oe(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=U):(oe(i,0),oe(i,0),oe(i,0),oe(i,0),oe(i,0),oe(i,9===i.level?2:i.strategy>=E||i.level<2?4:0),oe(i,$),i.status=G);else{var _=k+(i.w_bits-8<<4)<<8;_|=(i.strategy>=E||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(_|=F),_+=31-_%31,i.status=G,ne(i,_),0!==i.strstart&&(ne(i,e.adler>>>16),ne(i,65535&e.adler)),e.adler=1}if(i.status===U)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending!==i.pending_buf_size));)oe(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=V)}else i.status=V;if(i.status===V)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.gzindex=0,i.status=W)}else i.status=W;if(i.status===W)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.status=j)}else i.status=j;if(i.status===j&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ee(e),i.pending+2<=i.pending_buf_size&&(oe(i,255&e.adler),oe(i,e.adler>>8&255),e.adler=0,i.status=G)):i.status=G),0!==i.pending){if(ee(e),0===e.avail_out)return i.last_flush=-1,p}else if(0===e.avail_in&&Z(t)<=Z(o)&&t!==d)return J(e,y);if(i.status===z&&0!==e.avail_in)return J(e,y);if(0!==e.avail_in||0!==i.lookahead||t!==u&&i.status!==z){var v=i.strategy===E?function(e,t){for(var o;;){if(0===e.lookahead&&(re(e),0===e.lookahead)){if(t===u)return K;break}if(e.match_length=0,o=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,o&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?X:q):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?K:Y}(i,t):i.strategy===C?function(e,t){for(var o,n,i,s,a=e.window;;){if(e.lookahead<=M){if(re(e),e.lookahead<=M&&t===u)return K;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+M;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=x?(o=r._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(o=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),o&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?X:q):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?K:Y}(i,t):n[i.level].func(i,t);if(v!==X&&v!==q||(i.status=z),v===K||v===X)return 0===e.avail_out&&(i.last_flush=-1),p;if(v===Y&&(t===c?r._tr_align(i):t!==g&&(r._tr_stored_block(i,0,0,!1),t===h&&(Q(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),ee(e),0===e.avail_out))return i.last_flush=-1,p}return t!==d?p:i.wrap<=0?f:(2===i.wrap?(oe(i,255&e.adler),oe(i,e.adler>>8&255),oe(i,e.adler>>16&255),oe(i,e.adler>>24&255),oe(i,255&e.total_in),oe(i,e.total_in>>8&255),oe(i,e.total_in>>16&255),oe(i,e.total_in>>24&255)):(ne(i,e.adler>>>16),ne(i,65535&e.adler)),ee(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?p:f)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==H&&t!==U&&t!==V&&t!==W&&t!==j&&t!==G&&t!==z?J(e,m):(e.state=null,t===G?J(e,_):p):m},t.deflateSetDictionary=function(e,t){var o,n,r,a,l,u,c,h,d=t.length;if(!e||!e.state)return m;if(2===(a=(o=e.state).wrap)||1===a&&o.status!==H||o.lookahead)return m;for(1===a&&(e.adler=s(e.adler,t,d,0)),o.wrap=0,d>=o.w_size&&(0===a&&(Q(o.head),o.strstart=0,o.block_start=0,o.insert=0),h=new i.Buf8(o.w_size),i.arraySet(h,t,d-o.w_size,o.w_size,0),t=h,d=o.w_size),l=e.avail_in,u=e.next_in,c=e.input,e.avail_in=d,e.next_in=0,e.input=t,re(o);o.lookahead>=x;){n=o.strstart,r=o.lookahead-(x-1);do{o.ins_h=(o.ins_h<=0;)e[t]=0}var u=0,c=1,h=2,d=29,g=256,p=g+1+d,f=30,m=19,_=2*p+1,y=15,v=16,b=7,E=256,C=16,S=17,T=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],k=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],R=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L=new Array(2*(p+2));l(L);var N=new Array(2*f);l(N);var I=new Array(512);l(I);var D=new Array(256);l(D);var A=new Array(d);l(A);var P,x,M,B=new Array(f);function F(e,t,o,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=o,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function H(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function U(e){return e<256?I[e]:I[256+(e>>>7)]}function V(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function W(e,t,o){e.bi_valid>v-o?(e.bi_buf|=t<>v-e.bi_valid,e.bi_valid+=o-v):(e.bi_buf|=t<>>=1,o<<=1}while(--t>0);return o>>>1}function z(e,t,o){var n,i,r=new Array(y+1),s=0;for(n=1;n<=y;n++)r[n]=s=s+o[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=G(r[a]++,a))}}function K(e){var t;for(t=0;t8?V(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function X(e,t,o,n){var i=2*t,r=2*o;return e[i]>1;o>=1;o--)q(e,r,o);i=l;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],q(e,r,1),n=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=n,r[2*i]=r[2*o]+r[2*n],e.depth[i]=(e.depth[o]>=e.depth[n]?e.depth[o]:e.depth[n])+1,r[2*o+1]=r[2*n+1]=i,e.heap[1]=i++,q(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var o,n,i,r,s,a,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,p=t.stat_desc.max_length,f=0;for(r=0;r<=y;r++)e.bl_count[r]=0;for(l[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<_;o++)(r=l[2*l[2*(n=e.heap[o])+1]+1]+1)>p&&(r=p,f++),l[2*n+1]=r,n>u||(e.bl_count[r]++,s=0,n>=g&&(s=d[n-g]),a=l[2*n],e.opt_len+=a*(r+s),h&&(e.static_len+=a*(c[2*n+1]+s)));if(0!==f){do{for(r=p-1;0===e.bl_count[r];)r--;e.bl_count[r]--,e.bl_count[r+1]+=2,e.bl_count[p]--,f-=2}while(f>0);for(r=p;0!==r;r--)for(n=e.bl_count[r];0!==n;)(i=e.heap[--o])>u||(l[2*i+1]!==r&&(e.opt_len+=(r-l[2*i+1])*l[2*i],l[2*i+1]=r),n--)}}(e,t),z(r,u,e.bl_count)}function Z(e,t,o){var n,i,r=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),t[2*(o+1)+1]=65535,n=0;n<=o;n++)i=s,s=t[2*(n+1)+1],++a>=7;n0?(e.strm.data_type===a&&(e.strm.data_type=function(e){var t,o=4093624447;for(t=0;t<=31;t++,o>>>=1)if(1&o&&0!==e.dyn_ltree[2*t])return r;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return s;for(t=32;t=3&&0===e.bl_tree[2*R[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),l=e.opt_len+3+7>>>3,(u=e.static_len+3+7>>>3)<=l&&(l=u)):l=u=o+5,o+4<=l&&-1!==t?te(e,t,o,n):e.strategy===i||u===l?(W(e,(c<<1)+(n?1:0),3),$(e,L,N)):(W(e,(h<<1)+(n?1:0),3),function(e,t,o,n){var i;for(W(e,t-257,5),W(e,o-1,5),W(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&o,e.last_lit++,0===t?e.dyn_ltree[2*o]++:(e.matches++,t--,e.dyn_ltree[2*(D[o]+g+1)]++,e.dyn_dtree[2*U(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){W(e,c<<1,3),j(e,E,L),function(e){16===e.bi_valid?(V(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,o){"use strict";var n=o(352),i=o(128),r=o(281),s=o(283),a=o(217),l=o(282),u=o(355),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var o=n.inflateInit2(this.strm,t.windowBits);if(o!==s.Z_OK)throw new Error(a[o]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=r.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(o=n.inflateSetDictionary(this.strm,t.dictionary))!==s.Z_OK))throw new Error(a[o])}function d(e,t){var o=new h(t);if(o.push(e,!0),o.err)throw o.msg||a[o.err];return o.result}h.prototype.push=function(e,t){var o,a,l,u,h,d=this.strm,g=this.options.chunkSize,p=this.options.dictionary,f=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?d.input=r.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(g),d.next_out=0,d.avail_out=g),(o=n.inflate(d,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(o=n.inflateSetDictionary(this.strm,p)),o===s.Z_BUF_ERROR&&!0===f&&(o=s.Z_OK,f=!1),o!==s.Z_STREAM_END&&o!==s.Z_OK)return this.onEnd(o),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&o!==s.Z_STREAM_END&&(0!==d.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=r.utf8border(d.output,d.next_out),u=d.next_out-l,h=r.buf2string(d.output,l),d.next_out=u,d.avail_out=g-u,u&&i.arraySet(d.output,d.output,l,u,0),this.onData(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(f=!0)}while((d.avail_in>0||0===d.avail_out)&&o!==s.Z_STREAM_END);return o===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(o=n.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),d.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=h,t.inflate=d,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.ungzip=d},function(e,t,o){"use strict";var n=o(128),i=o(279),r=o(280),s=o(353),a=o(354),l=0,u=1,c=2,h=4,d=5,g=6,p=0,f=1,m=2,_=-2,y=-3,v=-4,b=-5,E=8,C=1,S=2,T=3,w=4,k=5,O=6,R=7,L=8,N=9,I=10,D=11,A=12,P=13,x=14,M=15,B=16,F=17,H=18,U=19,V=20,W=21,j=22,G=23,z=24,K=25,Y=26,X=27,q=28,$=29,J=30,Z=31,Q=32,ee=852,te=592,oe=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ie(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function re(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=C,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(ee),t.distcode=t.distdyn=new n.Buf32(te),t.sane=1,t.back=-1,p):_}function se(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,re(e)):_}function ae(e,t){var o,n;return e&&e.state?(n=e.state,t<0?(o=0,t=-t):(o=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?_:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=o,n.wbits=t,se(e))):_}function le(e,t){var o,n;return e?(n=new ie,e.state=n,n.window=null,(o=ae(e,t))!==p&&(e.state=null),o):_}var ue,ce,he=!0;function de(e){if(he){var t;for(ue=new n.Buf32(512),ce=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(u,e.lens,0,288,ue,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(c,e.lens,0,32,ce,0,e.work,{bits:5}),he=!1}e.lencode=ue,e.lenbits=9,e.distcode=ce,e.distbits=5}function ge(e,t,o,i){var r,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,t,o-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((r=s.wsize-s.wnext)>i&&(r=i),n.arraySet(s.window,t,o-i,r,s.wnext),(i-=r)?(n.arraySet(s.window,t,o-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,o.check=r(o.check,Oe,2,0),ae=0,le=0,o.mode=S;break}if(o.flags=0,o.head&&(o.head.done=!1),!(1&o.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",o.mode=J;break}if((15&ae)!==E){e.msg="unknown compression method",o.mode=J;break}if(le-=4,Ce=8+(15&(ae>>>=4)),0===o.wbits)o.wbits=Ce;else if(Ce>o.wbits){e.msg="invalid window size",o.mode=J;break}o.dmax=1<>8&1),512&o.flags&&(Oe[0]=255&ae,Oe[1]=ae>>>8&255,o.check=r(o.check,Oe,2,0)),ae=0,le=0,o.mode=T;case T:for(;le<32;){if(0===re)break e;re--,ae+=ee[oe++]<>>8&255,Oe[2]=ae>>>16&255,Oe[3]=ae>>>24&255,o.check=r(o.check,Oe,4,0)),ae=0,le=0,o.mode=w;case w:for(;le<16;){if(0===re)break e;re--,ae+=ee[oe++]<>8),512&o.flags&&(Oe[0]=255&ae,Oe[1]=ae>>>8&255,o.check=r(o.check,Oe,2,0)),ae=0,le=0,o.mode=k;case k:if(1024&o.flags){for(;le<16;){if(0===re)break e;re--,ae+=ee[oe++]<>>8&255,o.check=r(o.check,Oe,2,0)),ae=0,le=0}else o.head&&(o.head.extra=null);o.mode=O;case O:if(1024&o.flags&&((he=o.length)>re&&(he=re),he&&(o.head&&(Ce=o.head.extra_len-o.length,o.head.extra||(o.head.extra=new Array(o.head.extra_len)),n.arraySet(o.head.extra,ee,oe,he,Ce)),512&o.flags&&(o.check=r(o.check,ee,he,oe)),re-=he,oe+=he,o.length-=he),o.length))break e;o.length=0,o.mode=R;case R:if(2048&o.flags){if(0===re)break e;he=0;do{Ce=ee[oe+he++],o.head&&Ce&&o.length<65536&&(o.head.name+=String.fromCharCode(Ce))}while(Ce&&he>9&1,o.head.done=!0),e.adler=o.check=0,o.mode=A;break;case I:for(;le<32;){if(0===re)break e;re--,ae+=ee[oe++]<>>=7&le,le-=7&le,o.mode=X;break}for(;le<3;){if(0===re)break e;re--,ae+=ee[oe++]<>>=1)){case 0:o.mode=x;break;case 1:if(de(o),o.mode=V,t===g){ae>>>=2,le-=2;break e}break;case 2:o.mode=F;break;case 3:e.msg="invalid block type",o.mode=J}ae>>>=2,le-=2;break;case x:for(ae>>>=7&le,le-=7≤le<32;){if(0===re)break e;re--,ae+=ee[oe++]<>>16^65535)){e.msg="invalid stored block lengths",o.mode=J;break}if(o.length=65535&ae,ae=0,le=0,o.mode=M,t===g)break e;case M:o.mode=B;case B:if(he=o.length){if(he>re&&(he=re),he>se&&(he=se),0===he)break e;n.arraySet(te,ee,oe,he,ie),re-=he,oe+=he,se-=he,ie+=he,o.length-=he;break}o.mode=A;break;case F:for(;le<14;){if(0===re)break e;re--,ae+=ee[oe++]<>>=5,le-=5,o.ndist=1+(31&ae),ae>>>=5,le-=5,o.ncode=4+(15&ae),ae>>>=4,le-=4,o.nlen>286||o.ndist>30){e.msg="too many length or distance symbols",o.mode=J;break}o.have=0,o.mode=H;case H:for(;o.have>>=3,le-=3}for(;o.have<19;)o.lens[Re[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,Te={bits:o.lenbits},Se=a(l,o.lens,0,19,o.lencode,0,o.work,Te),o.lenbits=Te.bits,Se){e.msg="invalid code lengths set",o.mode=J;break}o.have=0,o.mode=U;case U:for(;o.have>>16&255,ye=65535&ke,!((me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>>=me,le-=me,o.lens[o.have++]=ye;else{if(16===ye){for(we=me+2;le>>=me,le-=me,0===o.have){e.msg="invalid bit length repeat",o.mode=J;break}Ce=o.lens[o.have-1],he=3+(3&ae),ae>>>=2,le-=2}else if(17===ye){for(we=me+3;le>>=me)),ae>>>=3,le-=3}else{for(we=me+7;le>>=me)),ae>>>=7,le-=7}if(o.have+he>o.nlen+o.ndist){e.msg="invalid bit length repeat",o.mode=J;break}for(;he--;)o.lens[o.have++]=Ce}}if(o.mode===J)break;if(0===o.lens[256]){e.msg="invalid code -- missing end-of-block",o.mode=J;break}if(o.lenbits=9,Te={bits:o.lenbits},Se=a(u,o.lens,0,o.nlen,o.lencode,0,o.work,Te),o.lenbits=Te.bits,Se){e.msg="invalid literal/lengths set",o.mode=J;break}if(o.distbits=6,o.distcode=o.distdyn,Te={bits:o.distbits},Se=a(c,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,Te),o.distbits=Te.bits,Se){e.msg="invalid distances set",o.mode=J;break}if(o.mode=V,t===g)break e;case V:o.mode=W;case W:if(re>=6&&se>=258){e.next_out=ie,e.avail_out=se,e.next_in=oe,e.avail_in=re,o.hold=ae,o.bits=le,s(e,ce),ie=e.next_out,te=e.output,se=e.avail_out,oe=e.next_in,ee=e.input,re=e.avail_in,ae=o.hold,le=o.bits,o.mode===A&&(o.back=-1);break}for(o.back=0;_e=(ke=o.lencode[ae&(1<>>16&255,ye=65535&ke,!((me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>ve)])>>>16&255,ye=65535&ke,!(ve+(me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>>=ve,le-=ve,o.back+=ve}if(ae>>>=me,le-=me,o.back+=me,o.length=ye,0===_e){o.mode=Y;break}if(32&_e){o.back=-1,o.mode=A;break}if(64&_e){e.msg="invalid literal/length code",o.mode=J;break}o.extra=15&_e,o.mode=j;case j:if(o.extra){for(we=o.extra;le>>=o.extra,le-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=G;case G:for(;_e=(ke=o.distcode[ae&(1<>>16&255,ye=65535&ke,!((me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>ve)])>>>16&255,ye=65535&ke,!(ve+(me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>>=ve,le-=ve,o.back+=ve}if(ae>>>=me,le-=me,o.back+=me,64&_e){e.msg="invalid distance code",o.mode=J;break}o.offset=ye,o.extra=15&_e,o.mode=z;case z:if(o.extra){for(we=o.extra;le>>=o.extra,le-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){e.msg="invalid distance too far back",o.mode=J;break}o.mode=K;case K:if(0===se)break e;if(he=ce-se,o.offset>he){if((he=o.offset-he)>o.whave&&o.sane){e.msg="invalid distance too far back",o.mode=J;break}he>o.wnext?(he-=o.wnext,pe=o.wsize-he):pe=o.wnext-he,he>o.length&&(he=o.length),fe=o.window}else fe=te,pe=ie-o.offset,he=o.length;he>se&&(he=se),se-=he,o.length-=he;do{te[ie++]=fe[pe++]}while(--he);0===o.length&&(o.mode=W);break;case Y:if(0===se)break e;te[ie++]=o.length,se--,o.mode=W;break;case X:if(o.wrap){for(;le<32;){if(0===re)break e;re--,ae|=ee[oe++]<>>=b=v>>>24,p-=b,0===(b=v>>>16&255))k[r++]=65535&v;else{if(!(16&b)){if(0==(64&b)){v=f[(65535&v)+(g&(1<>>=b,p-=b),p<15&&(g+=w[n++]<>>=b=v>>>24,p-=b,!(16&(b=v>>>16&255))){if(0==(64&b)){v=m[(65535&v)+(g&(1<l){e.msg="invalid distance too far back",o.mode=30;break e}if(g>>>=b,p-=b,C>(b=r-s)){if((b=C-b)>c&&o.sane){e.msg="invalid distance too far back",o.mode=30;break e}if(S=0,T=d,0===h){if(S+=u-b,b2;)k[r++]=T[S++],k[r++]=T[S++],k[r++]=T[S++],E-=3;E&&(k[r++]=T[S++],E>1&&(k[r++]=T[S++]))}else{S=r-C;do{k[r++]=k[S++],k[r++]=k[S++],k[r++]=k[S++],E-=3}while(E>2);E&&(k[r++]=k[S++],E>1&&(k[r++]=k[S++]))}break}}break}}while(n>3,g&=(1<<(p-=E<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n=1&&0===x[k];k--);if(O>k&&(O=k),0===k)return u[c++]=20971520,u[c++]=20971520,d.bits=1,0;for(w=1;w0&&(0===e||1!==k))return-1;for(M[1]=0,S=1;S<15;S++)M[S+1]=M[S]+x[S];for(T=0;T852||2===e&&I>592)return 1;for(;;){v=S-L,h[T]y?(b=B[F+h[T]],E=A[P+h[T]]):(b=96,E=0),g=1<>L)+(p-=g)]=v<<24|b<<16|E|0}while(0!==p);for(g=1<>=1;if(0!==g?(D&=g-1,D+=g):D=0,T++,0==--x[S]){if(S===k)break;S=t[o+h[T]]}if(S>O&&(D&m)!==f){for(0===L&&(L=O),_+=w,N=1<<(R=S-L);R+L852||2===e&&I>592)return 1;u[f=D&m]=O<<24|R<<16|_-c|0}}return 0!==D&&(u[_+D]=S-L<<24|64<<16|0),d.bits=O,0}},function(e,t,o){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t,o){"use strict";var n=o(64),i=o(100),r=o(146),s=o(216),a=o(284),l=function(e,t){var o,n="";for(o=0;o>>=8;return n},u=function(e,t,o,i,u,c){var h,d,g=e.file,p=e.compression,f=c!==r.utf8encode,m=n.transformTo("string",c(g.name)),_=n.transformTo("string",r.utf8encode(g.name)),y=g.comment,v=n.transformTo("string",c(y)),b=n.transformTo("string",r.utf8encode(y)),E=_.length!==g.name.length,C=b.length!==y.length,S="",T="",w="",k=g.dir,O=g.date,R={crc32:0,compressedSize:0,uncompressedSize:0};t&&!o||(R.crc32=e.crc32,R.compressedSize=e.compressedSize,R.uncompressedSize=e.uncompressedSize);var L=0;t&&(L|=8),f||!E&&!C||(L|=2048);var N,I,D,A=0,P=0;k&&(A|=16),"UNIX"===u?(P=798,A|=(N=g.unixPermissions,I=k,D=N,N||(D=I?16893:33204),(65535&D)<<16)):(P=20,A|=63&(g.dosPermissions||0)),h=O.getUTCHours(),h<<=6,h|=O.getUTCMinutes(),h<<=5,h|=O.getUTCSeconds()/2,d=O.getUTCFullYear()-1980,d<<=4,d|=O.getUTCMonth()+1,d<<=5,d|=O.getUTCDate(),E&&(T=l(1,1)+l(s(m),4)+_,S+="up"+l(T.length,2)+T),C&&(w=l(1,1)+l(s(v),4)+b,S+="uc"+l(w.length,2)+w);var x="";return x+="\n\0",x+=l(L,2),x+=p.magic,x+=l(h,2),x+=l(d,2),x+=l(R.crc32,4),x+=l(R.compressedSize,4),x+=l(R.uncompressedSize,4),x+=l(m.length,2),x+=l(S.length,2),{fileRecord:a.LOCAL_FILE_HEADER+x+m+S,dirRecord:a.CENTRAL_FILE_HEADER+l(P,2)+x+l(v.length,2)+"\0\0\0\0"+l(A,4)+l(i,4)+m+S+v}},c=function(e){return a.DATA_DESCRIPTOR+l(e.crc32,4)+l(e.compressedSize,4)+l(e.uncompressedSize,4)};function h(e,t,o,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=o,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(h,i),h.prototype.push=function(e){var t=e.meta.percent||0,o=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:o?(t+100*(o-n-1))/o:100}}))},h.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var o=u(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:o.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,o=u(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(o.dirRecord),t)this.push({data:c(e),meta:{percent:100}});else for(this.push({data:o.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,r.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},function(e,t,o){"use strict";var n=o(287);function i(e){n.call(this,e)}o(64).inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(288);function i(e){n.call(this,e)}o(64).inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(285),i=o(64),r=o(215),s=o(216),a=o(146),l=o(278),u=o(127);function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,o;if(e.skip(22),this.fileNameLength=e.readInt(2),o=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(o),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(l.hasOwnProperty(t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new r(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,o,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:o},{index:n,compiling:!1})}function d(e,t,o){var n=g.call(this,e,t,o);n>=0&&this._compilations.splice(n,1)}function g(e,t,o){for(var n=0;n=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var o=e.length;if(0===o)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return W(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function f(e,t,o){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),o<=0)return"";if((o>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,o);case"utf8":case"utf-8":return k(this,t,o);case"ascii":return R(this,t,o);case"latin1":case"binary":return N(this,t,o);case"base64":return w(this,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,o);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,o){var n=e[t];e[t]=e[o],e[o]=n}function _(e,t,o,n,i){if(0===e.length)return-1;if("string"==typeof o?(n=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=i?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(i)return-1;o=e.length-1}else if(o<0){if(!i)return-1;o=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:y(e,t,o,n,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,o):Uint8Array.prototype.lastIndexOf.call(e,t,o):y(e,[t],o,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,o,n,i){var r,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,o/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var c=-1;for(r=o;ra&&(o=a-l),r=o;r>=0;r--){for(var h=!0,d=0;di&&(n=i):n=i;var r=t.length;if(r%2!=0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var s=0;s>8,i=o%256,r.push(i),r.push(n);return r}(t,e.length-o),e,o,n)}function w(e,t,o){return 0===t&&o===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,o))}function k(e,t,o){o=Math.min(e.length,o);for(var n=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+h<=o)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(r=e[i+1]))&&(l=(31&u)<<6|63&r)>127&&(c=l);break;case 3:r=e[i+1],s=e[i+2],128==(192&r)&&128==(192&s)&&(l=(15&u)<<12|(63&r)<<6|63&s)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:r=e[i+1],s=e[i+2],a=e[i+3],128==(192&r)&&128==(192&s)&&128==(192&a)&&(l=(15&u)<<18|(63&r)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var o="",n=0;for(;n0&&(e=this.toString("hex",0,o).match(/.{2}/g).join(" "),this.length>o&&(e+=" ... ")),""},l.prototype.compare=function(e,t,o,n,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===o&&(o=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||o>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=o)return 0;if(n>=i)return-1;if(t>=o)return 1;if(this===e)return 0;for(var r=(i>>>=0)-(n>>>=0),s=(o>>>=0)-(t>>>=0),a=Math.min(r,s),u=this.slice(n,i),c=e.slice(t,o),h=0;hi)&&(o=i),e.length>0&&(o<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return v(this,e,t,o);case"utf8":case"utf-8":return b(this,e,t,o);case"ascii":return E(this,e,t,o);case"latin1":case"binary":return C(this,e,t,o);case"base64":return S(this,e,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,o);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function R(e,t,o){var n="";o=Math.min(e.length,o);for(var i=t;in)&&(o=n);for(var i="",r=t;ro)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,o,n,i,r){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function P(e,t,o,n){t<0&&(t=65535+t+1);for(var i=0,r=Math.min(e.length-o,2);i>>8*(n?i:1-i)}function M(e,t,o,n){t<0&&(t=4294967295+t+1);for(var i=0,r=Math.min(e.length-o,4);i>>8*(n?i:3-i)&255}function x(e,t,o,n,i,r){if(o+n>e.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function B(e,t,o,n,r){return r||x(e,0,o,4),i.write(e,t,o,n,23,4),o+4}function F(e,t,o,n,r){return r||x(e,0,o,8),i.write(e,t,o,n,52,8),o+8}l.prototype.slice=function(e,t){var o,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},l.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,o){e|=0,t|=0,o||D(e,t,this.length);for(var n=this[e],i=1,r=0;++r=(i*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,o){e|=0,t|=0,o||D(e,t,this.length);for(var n=t,i=1,r=this[e+--n];n>0&&(i*=256);)r+=this[e+--n]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},l.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},l.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,o,n){(e=+e,t|=0,o|=0,n)||A(this,e,t,o,Math.pow(2,8*o)-1,0);var i=1,r=0;for(this[t]=255&e;++r=0&&(r*=256);)this[t+i]=e/r&255;return t+o},l.prototype.writeUInt8=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,o,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*o-1);A(this,e,t,o,i-1,-i)}var r=0,s=1,a=0;for(this[t]=255&e;++r>0)-a&255;return t+o},l.prototype.writeIntBE=function(e,t,o,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*o-1);A(this,e,t,o,i-1,-i)}var r=o-1,s=1,a=0;for(this[t+r]=255&e;--r>=0&&(s*=256);)e<0&&0===a&&0!==this[t+r+1]&&(a=1),this[t+r]=(e/s>>0)-a&255;return t+o},l.prototype.writeInt8=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,o){return e=+e,t|=0,o||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,o){return B(this,e,t,!0,o)},l.prototype.writeFloatBE=function(e,t,o){return B(this,e,t,!1,o)},l.prototype.writeDoubleLE=function(e,t,o){return F(this,e,t,!0,o)},l.prototype.writeDoubleBE=function(e,t,o){return F(this,e,t,!1,o)},l.prototype.copy=function(e,t,o,n){if(o||(o=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+o];else if(r<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,o=void 0===o?this.length:o>>>0,e||(e=0),"number"==typeof e)for(r=t;r55295&&o<57344){if(!i){if(o>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&r.push(239,191,189);continue}i=o;continue}if(o<56320){(t-=3)>-1&&r.push(239,191,189),i=o;continue}o=65536+(i-55296<<10|o-56320)}else i&&(t-=3)>-1&&r.push(239,191,189);if(i=null,o<128){if((t-=1)<0)break;r.push(o)}else if(o<2048){if((t-=2)<0)break;r.push(o>>6|192,63&o|128)}else if(o<65536){if((t-=3)<0)break;r.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return r}function W(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,o,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+o]=e[i];return i}}).call(this,o(80))},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(101),i=o(242);t.Disposable=i.Disposable,t.CancellationToken=i.CancellationToken,t.Event=i.Event,t.Emitter=i.Emitter,function(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}(o(101)),function(e){var t=window,o=Symbol("Services");e.get=function(){var e=t[o];if(!e)throw new Error("Language Client services has not been installed");return e},e.install=function(e){t[o]&&console.error(new Error("Language Client services has been overriden")),t[o]=e}}(t.Services||(t.Services={})),t.isDocumentSelector=function(e){return!(!e||!Array.isArray(e))&&e.every((function(e){return"string"==typeof e||n.DocumentFilter.is(e)}))},function(e){e.is=function(e){return!!e&&"uri"in e&&"languageId"in e}}(t.DocumentIdentifier||(t.DocumentIdentifier={})),function(e){e[e.Global=1]="Global",e[e.Workspace=2]="Workspace",e[e.WorkspaceFolder=3]="WorkspaceFolder"}(t.ConfigurationTarget||(t.ConfigurationTarget={}))},function(e,t,o){"use strict";(function(e){function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0});const i=o(171),r=o(504);t.RequestType=r.RequestType,t.RequestType0=r.RequestType0,t.RequestType1=r.RequestType1,t.RequestType2=r.RequestType2,t.RequestType3=r.RequestType3,t.RequestType4=r.RequestType4,t.RequestType5=r.RequestType5,t.RequestType6=r.RequestType6,t.RequestType7=r.RequestType7,t.RequestType8=r.RequestType8,t.RequestType9=r.RequestType9,t.ResponseError=r.ResponseError,t.ErrorCodes=r.ErrorCodes,t.NotificationType=r.NotificationType,t.NotificationType0=r.NotificationType0,t.NotificationType1=r.NotificationType1,t.NotificationType2=r.NotificationType2,t.NotificationType3=r.NotificationType3,t.NotificationType4=r.NotificationType4,t.NotificationType5=r.NotificationType5,t.NotificationType6=r.NotificationType6,t.NotificationType7=r.NotificationType7,t.NotificationType8=r.NotificationType8,t.NotificationType9=r.NotificationType9;const s=o(243);t.MessageReader=s.MessageReader,t.StreamMessageReader=s.StreamMessageReader,t.IPCMessageReader=s.IPCMessageReader,t.SocketMessageReader=s.SocketMessageReader;const a=o(244);t.MessageWriter=a.MessageWriter,t.StreamMessageWriter=a.StreamMessageWriter,t.IPCMessageWriter=a.IPCMessageWriter,t.SocketMessageWriter=a.SocketMessageWriter;const l=o(186);t.Disposable=l.Disposable,t.Event=l.Event,t.Emitter=l.Emitter;const u=o(505);t.CancellationTokenSource=u.CancellationTokenSource,t.CancellationToken=u.CancellationToken;const c=o(506);var h,d,g,p,f,m,_;n(o(507)),n(o(508)),function(e){e.type=new r.NotificationType("$/cancelRequest")}(h||(h={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(d=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose;default:return e.Off}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(d=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(g=t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(g=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new r.NotificationType("$/setTraceNotification")}(p=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new r.NotificationType("$/logTraceNotification")}(f=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(m=t.ConnectionErrors||(t.ConnectionErrors={}));class y extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,y.prototype)}}function v(t,o,n,s){let a=0,v=0,b=0;const E="2.0";let C,S,T=void 0,w=Object.create(null),k=void 0,O=Object.create(null),R=new c.LinkedMap,N=Object.create(null),L=Object.create(null),I=d.Off,D=g.Text,A=_.New,P=new l.Emitter,M=new l.Emitter,x=new l.Emitter,B=new l.Emitter;function F(e){return"req-"+e.toString()}function H(e,t){var o;r.isRequestMessage(t)?e.set(F(t.id),t):r.isResponseMessage(t)?e.set(null===(o=t.id)?"res-unknown-"+(++b).toString():"res-"+o.toString(),t):e.set("not-"+(++v).toString(),t)}function U(e){}function V(){return A===_.Listening}function W(){return A===_.Closed}function j(){return A===_.Disposed}function G(){A!==_.New&&A!==_.Listening||(A=_.Closed,M.fire(void 0))}function z(){C||0===R.size||(C=e(()=>{C=void 0,function(){if(0===R.size)return;let e=R.shift();try{r.isRequestMessage(e)?function(e){if(j())return;function t(t,n,i){let s={jsonrpc:E,id:e.id};t instanceof r.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,Y(s,n,i),o.write(s)}function n(t,n,i){let r={jsonrpc:E,id:e.id,error:t.toJson()};Y(r,n,i),o.write(r)}!function(e){if(I===d.Off||!S)return;if(D===g.Text){let t=void 0;I===d.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),S.log(`Received request '${e.method} - (${e.id})'.`,t)}else X("receive-request",e)}(e);let s,a,l=w[e.method];l&&(s=l.type,a=l.handler);let c=Date.now();if(a||T){let l=new u.CancellationTokenSource,h=String(e.id);L[h]=l;try{let u,d=u=void 0===e.params||void 0!==s&&0===s.numberOfParams?a?a(l.token):T(e.method,l.token):i.array(e.params)&&(void 0===s||s.numberOfParams>1)?a?a(...e.params,l.token):T(e.method,...e.params,l.token):a?a(e.params,l.token):T(e.method,e.params,l.token);u?d.then?d.then(o=>{delete L[h],t(o,e.method,c)},t=>{delete L[h],t instanceof r.ResponseError?n(t,e.method,c):t&&i.string(t.message)?n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,c):n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}):(delete L[h],t(u,e.method,c)):(delete L[h],function(t,n,i){void 0===t&&(t=null);let r={jsonrpc:E,id:e.id,result:t};Y(r,n,i),o.write(r)}(u,e.method,c))}catch(o){delete L[h],o instanceof r.ResponseError?t(o,e.method,c):o&&i.string(o.message)?n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${o.message}`),e.method,c):n(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}}else n(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,c)}(e):r.isNotificationMessage(e)?function(e){if(j())return;let t,o=void 0;if(e.method===h.type.method)t=e=>{let t=e.id,o=L[String(t)];o&&o.cancel()};else{let n=O[e.method];n&&(t=n.handler,o=n.type)}if(t||k)try{!function(e){if(I===d.Off||!S||e.method===f.type.method)return;if(D===g.Text){let t=void 0;I===d.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),S.log(`Received notification '${e.method}'.`,t)}else X("receive-notification",e)}(e),void 0===e.params||void 0!==o&&0===o.numberOfParams?t?t():k(e.method):i.array(e.params)&&(void 0===o||o.numberOfParams>1)?t?t(...e.params):k(e.method,...e.params):t?t(e.params):k(e.method,e.params)}catch(t){t.message?n.error(`Notification handler '${e.method}' failed with message: ${t.message}`):n.error(`Notification handler '${e.method}' failed unexpectedly.`)}else x.fire(e)}(e):r.isResponseMessage(e)?function(e){if(j())return;if(null===e.id)e.error?n.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):n.error("Received response message without id. No further error information provided.");else{let t=String(e.id),o=N[t];if(function(e,t){if(I===d.Off||!S)return;if(D===g.Text){let o=void 0;if(I===d.Verbose&&(e.error&&e.error.data?o=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?o=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(o="No result returned.\n\n")),t){let n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";S.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,o)}else S.log(`Received response ${e.id} without active response promise.`,o)}else X("receive-response",e)}(e,o),o){delete N[t];try{if(e.error){let t=e.error;o.reject(new r.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");o.resolve(e.result)}}catch(e){e.message?n.error(`Response handler '${o.method}' failed with message: ${e.message}`):n.error(`Response handler '${o.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(i.string(t.id)||i.number(t.id)){let e=String(t.id),o=N[e];o&&o.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{z()}}()}))}t.onClose(G),t.onError((function(e){P.fire([e,void 0,void 0])})),o.onClose(G),o.onError((function(e){P.fire(e)}));let K=e=>{try{if(r.isNotificationMessage(e)&&e.method===h.type.method){let t=F(e.params.id),n=R.get(t);if(r.isRequestMessage(n)){let i=s&&s.cancelUndispatched?s.cancelUndispatched(n,U):void 0;if(i&&(void 0!==i.error||void 0!==i.result))return R.delete(t),i.id=n.id,Y(i,e.method,Date.now()),void o.write(i)}}H(R,e)}finally{z()}};function Y(e,t,o){if(I!==d.Off&&S)if(D===g.Text){let n=void 0;I===d.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),S.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-o}ms`,n)}else X("send-response",e)}function X(e,t){if(!S||I===d.Off)return;const o={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};S.log(o)}function q(){if(W())throw new y(m.Closed,"Connection is closed.");if(j())throw new y(m.Disposed,"Connection is disposed.")}function $(e){return void 0===e?null:e}function J(e,t){let o,n=e.numberOfParams;switch(n){case 0:o=null;break;case 1:o=$(t[0]);break;default:o=[];for(let e=0;e{let n,r;if(q(),i.string(e))switch(n=e,t.length){case 0:r=null;break;case 1:r=t[0];break;default:r=t}else n=e.method,r=J(e,t);let s={jsonrpc:E,method:n,params:r};!function(e){if(I!==d.Off&&S)if(D===g.Text){let t=void 0;I===d.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),S.log(`Sending notification '${e.method}'.`,t)}else X("send-notification",e)}(s),o.write(s)},onNotification:(e,t)=>{q(),i.func(e)?k=e:t&&(i.string(e)?O[e]={type:void 0,handler:t}:O[e.method]={type:e,handler:t})},sendRequest:(e,...t)=>{let n,s;q(),function(){if(!V())throw new Error("Call listen() first.")}();let l=void 0;if(i.string(e))switch(n=e,t.length){case 0:s=null;break;case 1:u.CancellationToken.is(t[0])?(s=null,l=t[0]):s=$(t[0]);break;default:const e=t.length-1;u.CancellationToken.is(t[e])?(l=t[e],s=2===t.length?$(t[0]):t.slice(0,e).map(e=>$(e))):s=t.map(e=>$(e))}else{n=e.method,s=J(e,t);let o=e.numberOfParams;l=u.CancellationToken.is(t[o])?t[o]:void 0}let c=a++,p=new Promise((e,t)=>{let i={jsonrpc:E,id:c,method:n,params:s},a={method:n,timerStart:Date.now(),resolve:e,reject:t};!function(e){if(I!==d.Off&&S)if(D===g.Text){let t=void 0;I===d.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),S.log(`Sending request '${e.method} - (${e.id})'.`,t)}else X("send-request",e)}(i);try{o.write(i)}catch(e){a.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),a=null}a&&(N[String(c)]=a)});return l&&l.onCancellationRequested(()=>{Z.sendNotification(h.type,{id:c})}),p},onRequest:(e,t)=>{q(),i.func(e)?T=e:t&&(i.string(e)?w[e]={type:void 0,handler:t}:w[e.method]={type:e,handler:t})},trace:(e,t,o)=>{let n=!1,r=g.Text;void 0!==o&&(i.boolean(o)?n=o:(n=o.sendNotification||!1,r=o.traceFormat||g.Text)),D=r,S=(I=e)===d.Off?void 0:t,!n||W()||j()||Z.sendNotification(p.type,{value:d.toString(e)})},onError:P.event,onClose:M.event,onUnhandledNotification:x.event,onDispose:B.event,dispose:()=>{if(j())return;A=_.Disposed,B.fire(void 0);let e=new Error("Connection got disposed.");Object.keys(N).forEach(t=>{N[t].reject(e)}),N=Object.create(null),L=Object.create(null),R=new c.LinkedMap,i.func(o.dispose)&&o.dispose(),i.func(t.dispose)&&t.dispose()},listen:()=>{q(),function(){if(V())throw new y(m.AlreadyListening,"Connection is already listening")}(),A=_.Listening,t.listen(K)},inspect:()=>{console.log("inspect")}};return Z.onNotification(f.type,e=>{I!==d.Off&&S&&S.log(e.message,I===d.Verbose?e.verbose:void 0)}),Z}t.ConnectionError=y,function(e){e.is=function(e){let t=e;return t&&i.func(t.cancelUndispatched)}}(t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(_||(_={})),t.createMessageConnection=function(e,o,n,i){var r;return n||(n=t.NullLogger),v(void 0!==(r=e).listen&&void 0===r.read?e:new s.StreamMessageReader(e),function(e){return void 0!==e.write&&void 0===e.end}(o)?o:new a.StreamMessageWriter(o),n,i)}}).call(this,o(148).setImmediate)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return a}));var n=o(8),i=function(){function e(e,t,o,n){this.startColumn=e,this.endColumn=t,this.className=o,this.type=n}return e._equals=function(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type},e.equalsArr=function(t,o){var n=t.length;if(n!==o.length)return!1;for(var i=0;io)&&(!c.isEmpty()||0!==u.type&&3!==u.type)){var h=c.startLineNumber===o?c.startColumn:n,d=c.endLineNumber===o?c.endColumn:i;r[s++]=new e(h,d,u.inlineClassName,u.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}(),r=function(e,t,o){this.startOffset=e,this.endOffset=t,this.className=o},s=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,o){for(;this.count>0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(o,0,e),this.classNames.splice(o,0,t);break}this.count++},e}(),a=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var o=[],i=new s,r=0,a=0,l=t.length;a1){var g=e.charCodeAt(c-2);n.isHighSurrogate(g)&&c--}if(h>1){g=e.charCodeAt(h-2);n.isHighSurrogate(g)&&h--}var p=c-1,f=h-2;r=i.consumeLowerThan(p,r,o),0===i.count&&(r=p),i.insert(f,d)}return i.consumeLowerThan(1073741824,r,o),o},e}()},function(e,t,o){"use strict";var n=o(0),i=o(10),r=o(204),s=o(74),a=o(124),l=o(1),u=(o(473),o(30)),c=o(179),h=l.a,d=function(){function e(e,t){this.os=t,this.domNode=l.k(e,h(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}return e.prototype.set=function(t,o){this.didEverRender&&this.keybinding===t&&e.areSame(this.matches,o)||(this.keybinding=t,this.matches=o,this.render())},e.prototype.render=function(){if(l.l(this.domNode),this.keybinding){var e=this.keybinding.getParts(),t=e[0],o=e[1];t&&this.renderPart(this.domNode,t,this.matches?this.matches.firstPart:null),o&&(l.k(this.domNode,h("span.monaco-keybinding-key-chord-separator",null," ")),this.renderPart(this.domNode,o,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()}this.didEverRender=!0},e.prototype.renderPart=function(e,t,o){var n=c.b.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,o&&o.ctrlKey,n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,o&&o.shiftKey,n.separator),t.altKey&&this.renderKey(e,n.altKey,o&&o.altKey,n.separator),t.metaKey&&this.renderKey(e,n.metaKey,o&&o.metaKey,n.separator);var i=t.keyLabel;i&&this.renderKey(e,i,o&&o.keyCode,"")},e.prototype.renderKey=function(e,t,o,n){l.k(e,h("span.monaco-keybinding-key"+(o?".highlight":""),null,t)),n&&l.k(e,h("span.monaco-keybinding-key-separator",null,n))},e.prototype.dispose=function(){this.keybinding=null},e.areSame=function(e,t){return e===t||!e&&!t||!!e&&!!t&&Object(u.e)(e.firstPart,t.firstPart)&&Object(u.e)(e.chordPart,t.chordPart)},e}(),g=o(15);o.d(t,"a",(function(){return _})),o.d(t,"b",(function(){return y})),o.d(t,"c",(function(){return E}));var p,f=(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),m=0,_=function(){function e(e){void 0===e&&(e=[]),this.id=(m++).toString(),this.labelHighlights=e,this.descriptionHighlights=[]}return e.prototype.getId=function(){return this.id},e.prototype.getLabel=function(){return null},e.prototype.getLabelOptions=function(){return null},e.prototype.getAriaLabel=function(){return[this.getLabel(),this.getDescription(),this.getDetail()].filter((function(e){return!!e})).join(", ")},e.prototype.getDetail=function(){return null},e.prototype.getIcon=function(){return null},e.prototype.getDescription=function(){return null},e.prototype.getTooltip=function(){return null},e.prototype.getDescriptionTooltip=function(){return null},e.prototype.getKeybinding=function(){return null},e.prototype.isHidden=function(){return this.hidden},e.prototype.setHighlights=function(e,t,o){this.labelHighlights=e,this.descriptionHighlights=t,this.detailHighlights=o},e.prototype.getHighlights=function(){return[this.labelHighlights,this.descriptionHighlights,this.detailHighlights]},e.prototype.run=function(e,t){return!1},e}(),y=function(e){function t(t,o,n){var i=e.call(this)||this;return i.entry=t,i.groupLabel=o,i.withBorder=n,i}return f(t,e),t.prototype.getGroupLabel=function(){return this.groupLabel},t.prototype.setGroupLabel=function(e){this.groupLabel=e},t.prototype.showBorder=function(){return this.withBorder},t.prototype.setShowBorder=function(e){this.withBorder=e},t.prototype.getLabel=function(){return this.entry?this.entry.getLabel():e.prototype.getLabel.call(this)},t.prototype.getLabelOptions=function(){return this.entry?this.entry.getLabelOptions():e.prototype.getLabelOptions.call(this)},t.prototype.getAriaLabel=function(){return this.entry?this.entry.getAriaLabel():e.prototype.getAriaLabel.call(this)},t.prototype.getDetail=function(){return this.entry?this.entry.getDetail():e.prototype.getDetail.call(this)},t.prototype.getIcon=function(){return this.entry?this.entry.getIcon():e.prototype.getIcon.call(this)},t.prototype.getDescription=function(){return this.entry?this.entry.getDescription():e.prototype.getDescription.call(this)},t.prototype.getHighlights=function(){return this.entry?this.entry.getHighlights():e.prototype.getHighlights.call(this)},t.prototype.isHidden=function(){return this.entry?this.entry.isHidden():e.prototype.isHidden.call(this)},t.prototype.setHighlights=function(t,o,n){this.entry?this.entry.setHighlights(t,o,n):e.prototype.setHighlights.call(this,t,o,n)},t.prototype.run=function(t,o){return this.entry?this.entry.run(t,o):e.prototype.run.call(this,t,o)},t}(_),v=function(){function e(){}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return i.b.as(null)},e}(),b=function(){function e(e,t){void 0===e&&(e=new v),void 0===t&&(t=null),this.actionProvider=e,this.actionRunner=t}return e.prototype.getHeight=function(e){return e.getDetail()?44:22},e.prototype.getTemplateId=function(e){return e instanceof y?"quickOpenEntryGroup":"quickOpenEntry"},e.prototype.renderTemplate=function(e,t,o){var n=document.createElement("div");l.f(n,"sub-content"),t.appendChild(n);var i=l.a(".quick-open-row"),u=l.a(".quick-open-row"),c=l.a(".quick-open-entry",null,i,u);n.appendChild(c);var h=document.createElement("span");i.appendChild(h);var p=new r.b(i,{supportHighlights:!0,supportDescriptionHighlights:!0}),f=document.createElement("span");i.appendChild(f),l.f(f,"quick-open-entry-keybinding");var m=new d(f,g.a),_=document.createElement("div");u.appendChild(_),l.f(_,"quick-open-entry-meta");var y,v=new a.a(_);"quickOpenEntryGroup"===e&&(y=document.createElement("div"),l.f(y,"results-group"),t.appendChild(y)),l.f(t,"actions");var b=document.createElement("div");return l.f(b,"primary-action-bar"),t.appendChild(b),{container:t,entry:c,icon:h,label:p,detail:v,keybinding:m,group:y,actionBar:new s.a(b,{actionRunner:this.actionRunner})}},e.prototype.renderElement=function(e,t,o,n){if(this.actionProvider.hasActions(null,e)?l.f(o.container,"has-actions"):l.G(o.container,"has-actions"),o.actionBar.context=e,this.actionProvider.getActions(null,e).then((function(e){o.actionBar.isEmpty()&&e&&e.length>0?o.actionBar.push(e,{icon:!0,label:!1}):o.actionBar.isEmpty()||e&&0!==e.length||o.actionBar.clear()})),e instanceof y&&e.getGroupLabel()?l.f(o.container,"has-group-label"):l.G(o.container,"has-group-label"),e instanceof y){var i=e,r=o;i.showBorder()?(l.f(r.container,"results-group-separator"),r.container.style.borderTopColor=n.pickerGroupBorder.toString()):(l.G(r.container,"results-group-separator"),r.container.style.borderTopColor=null);var s=i.getGroupLabel()||"";r.group.textContent=s,r.group.style.color=n.pickerGroupForeground.toString()}if(e instanceof _){var a=e.getHighlights(),u=a[0],c=a[1],h=a[2],d=e.getIcon()?"quick-open-entry-icon "+e.getIcon():"";o.icon.className=d;var g=e.getLabelOptions()||Object.create(null);g.matches=u||[],g.title=e.getTooltip(),g.descriptionTitle=e.getDescriptionTooltip()||e.getDescription(),g.descriptionMatches=c||[],o.label.setValue(e.getLabel(),e.getDescription(),g),o.detail.set(e.getDetail(),h),o.keybinding.set(e.getKeybinding(),null)}},e.prototype.disposeTemplate=function(e,t){var o=t;o.actionBar.dispose(),o.actionBar=null,o.container=null,o.entry=null,o.keybinding.dispose(),o.keybinding=null,o.detail.dispose(),o.detail=null,o.group=null,o.icon=null,o.label.dispose(),o.label=null},e}(),E=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=new v),this._entries=e,this._dataSource=this,this._renderer=new b(t),this._filter=this,this._runner=this,this._accessibilityProvider=this}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._entries},set:function(e){this._entries=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runner",{get:function(){return this._runner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityProvider",{get:function(){return this._accessibilityProvider},enumerable:!0,configurable:!0}),e.prototype.getId=function(e){return e.getId()},e.prototype.getLabel=function(e){return e.getLabel()},e.prototype.getAriaLabel=function(e){return e.getAriaLabel()?n.a("quickOpenAriaLabelEntry","{0}, picker",e.getAriaLabel()):n.a("quickOpenAriaLabel","picker")},e.prototype.isVisible=function(e){return!e.isHidden()},e.prototype.run=function(e,t,o){return e.run(t,o)},e}()},function(e,t,o){"use strict";var n=o(1),i=o(30),r=o(8);function s(e){return Object(r.escape)(e)}o.d(t,"a",(function(){return a}));var a=function(){function e(e){this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",this.didEverRender=!1,e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(t,o,n,r){void 0===o&&(o=[]),void 0===n&&(n=""),t||(t=""),r&&(t=e.escapeNewLines(t,o)),this.didEverRender&&this.text===t&&this.title===n&&i.e(this.highlights,o)||(Array.isArray(o)||(o=[]),this.text=t,this.title=n,this.highlights=o,this.render())},e.prototype.render=function(){n.l(this.domNode);for(var e,t=[],o=0,i=0;i"),t.push(s(this.text.substring(o,e.start))),t.push(""),o=e.end),t.push(''),t.push(s(this.text.substring(e.start,e.end))),t.push(""),o=e.end);o"),t.push(s(this.text.substring(o))),t.push("")),this.domNode.innerHTML=t.join(""),this.domNode.title=this.title,this.didEverRender=!0},e.prototype.dispose=function(){this.text=null,this.highlights=null},e.escapeNewLines=function(e,t){var o=0,n=0;return e.replace(/\r\n|\r|\n/,(function(e,i){n="\r\n"===e?-1:0,i+=o;for(var r=0,s=t;r=i&&(a.start+=n),a.end>=i&&(a.end+=n))}return o+=n,"⏎"}))},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var n=o(8),i=o(20),r=o(2),s=o(23),a=o(32),l=function(){function e(e,t){this._opts=t,this._selection=e,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}return e.unshiftIndentCount=function(e,t,o){var n=i.a.visibleColumnFromColumn(e,t,o);return i.a.prevTabStop(n,o)/o},e.shiftIndentCount=function(e,t,o){var n=i.a.visibleColumnFromColumn(e,t,o);return i.a.nextTabStop(n,o)/o},e.prototype._addEditOperation=function(e,t,o){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,o):e.addEditOperation(t,o)},e.prototype.getEditOperations=function(t,o){var s=this._selection.startLineNumber,l=this._selection.endLineNumber;1===this._selection.endColumn&&s!==l&&(l-=1);var u=this._opts.tabSize,c=this._opts.oneIndent,h=s===l;if(this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(s))&&(this._useLastEditRangeForCursorEndPosition=!0),this._opts.useTabStops)for(var d=["",c],g=0,p=0,f=s;f<=l;f++,g=p){p=0;var m=t.getLineContent(f),_=n.firstNonWhitespaceIndex(m);if((!this._opts.isUnshift||0!==m.length&&0!==_)&&(h||this._opts.isUnshift||0!==m.length)){if(-1===_&&(_=m.length),f>1)if(i.a.visibleColumnFromColumn(m,_+1,u)%u!=0&&t.isCheapToTokenize(f-1)){var y=a.a.getRawEnterActionAtPosition(t,f-1,t.getLineMaxColumn(f-1));if(y){if(p=g,y.appendText)for(var v=0,b=y.appendText.length;v console.log` because `log` has been completed recently."),i.a("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],default:"recentlyUsed",description:i.a("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,description:i.a("suggestFontSize","Font size for the suggest widget.")},"editor.suggestLineHeight":{type:"integer",default:0,minimum:0,description:i.a("suggestLineHeight","Line height for the suggest widget.")},"editor.suggest.filterGraceful":{type:"boolean",default:!0,description:i.a("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:!0,description:i.a("suggest.snippetsPreventQuickSuggestions","Control whether an active snippet prevents quick suggestions.")},"editor.selectionHighlight":{type:"boolean",default:f.contribInfo.selectionHighlight,description:i.a("selectionHighlight","Controls whether the editor should highlight matches similar to the selection")},"editor.occurrencesHighlight":{type:"boolean",default:f.contribInfo.occurrencesHighlight,description:i.a("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")},"editor.overviewRulerLanes":{type:"integer",default:3,description:i.a("overviewRulerLanes","Controls the number of decorations that can show up at the same position in the overview ruler.")},"editor.overviewRulerBorder":{type:"boolean",default:f.viewInfo.overviewRulerBorder,description:i.a("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:g.k(f.viewInfo.cursorBlinking),description:i.a("cursorBlinking","Control the cursor animation style.")},"editor.mouseWheelZoom":{type:"boolean",default:f.viewInfo.mouseWheelZoom,description:i.a("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:g.l(f.viewInfo.cursorStyle),description:i.a("cursorStyle","Controls the cursor style.")},"editor.cursorWidth":{type:"integer",default:f.viewInfo.cursorWidth,description:i.a("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")},"editor.fontLigatures":{type:"boolean",default:f.viewInfo.fontLigatures,description:i.a("fontLigatures","Enables/Disables font ligatures.")},"editor.hideCursorInOverviewRuler":{type:"boolean",default:f.viewInfo.hideCursorInOverviewRuler,description:i.a("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")},"editor.renderWhitespace":{type:"string",enum:["none","boundary","all"],enumDescriptions:["",i.a("renderWhiteSpace.boundary","Render whitespace characters except for single spaces between words."),""],default:f.viewInfo.renderWhitespace,description:i.a("renderWhitespace","Controls how the editor should render whitespace characters.")},"editor.renderControlCharacters":{type:"boolean",default:f.viewInfo.renderControlCharacters,description:i.a("renderControlCharacters","Controls whether the editor should render control characters.")},"editor.renderIndentGuides":{type:"boolean",default:f.viewInfo.renderIndentGuides,description:i.a("renderIndentGuides","Controls whether the editor should render indent guides.")},"editor.highlightActiveIndentGuide":{type:"boolean",default:f.viewInfo.highlightActiveIndentGuide,description:i.a("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],enumDescriptions:["","","",i.a("renderLineHighlight.all","Highlights both the gutter and the current line.")],default:f.viewInfo.renderLineHighlight,description:i.a("renderLineHighlight","Controls how the editor should render the current line highlight.")},"editor.codeLens":{type:"boolean",default:f.contribInfo.codeLens,description:i.a("codeLens","Controls whether the editor shows CodeLens")},"editor.folding":{type:"boolean",default:f.contribInfo.folding,description:i.a("folding","Controls whether the editor has code folding enabled")},"editor.foldingStrategy":{type:"string",enum:["auto","indentation"],default:f.contribInfo.foldingStrategy,description:i.a("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:f.contribInfo.showFoldingControls,description:i.a("showFoldingControls","Controls whether the fold controls on the gutter are automatically hidden.")},"editor.matchBrackets":{type:"boolean",default:f.contribInfo.matchBrackets,description:i.a("matchBrackets","Highlight matching brackets when one of them is selected.")},"editor.glyphMargin":{type:"boolean",default:f.viewInfo.glyphMargin,description:i.a("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")},"editor.useTabStops":{type:"boolean",default:f.useTabStops,description:i.a("useTabStops","Inserting and deleting whitespace follows tab stops.")},"editor.trimAutoWhitespace":{type:"boolean",default:_.trimAutoWhitespace,description:i.a("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.stablePeek":{type:"boolean",default:!1,description:i.a("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.dragAndDrop":{type:"boolean",default:f.dragAndDrop,description:i.a("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")},"editor.accessibilitySupport":{type:"string",enum:["auto","on","off"],enumDescriptions:[i.a("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),i.a("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader."),i.a("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:f.accessibilitySupport,description:i.a("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers.")},"editor.showUnused":{type:"boolean",default:f.showUnused,description:i.a("showUnused","Controls fading out of unused code.")},"editor.links":{type:"boolean",default:f.contribInfo.links,description:i.a("links","Controls whether the editor should detect links and make them clickable.")},"editor.colorDecorators":{type:"boolean",default:f.contribInfo.colorDecorators,description:i.a("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")},"editor.lightbulb.enabled":{type:"boolean",default:f.contribInfo.lightbulbEnabled,description:i.a("codeActions","Enables the code action lightbulb in the editor.")},"editor.codeActionsOnSave":{type:"object",properties:{"source.organizeImports":{type:"boolean",description:i.a("codeActionsOnSave.organizeImports","Controls whether organize imports action should be run on file save.")}},additionalProperties:{type:"boolean"},default:f.contribInfo.codeActionsOnSave,description:i.a("codeActionsOnSave","Code action kinds to be run on save.")},"editor.codeActionsOnSaveTimeout":{type:"number",default:f.contribInfo.codeActionsOnSaveTimeout,description:i.a("codeActionsOnSaveTimeout","Timeout in milliseconds after which the code actions that are run on save are cancelled.")},"editor.selectionClipboard":{type:"boolean",default:f.contribInfo.selectionClipboard,description:i.a("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:l.c},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:i.a("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:i.a("ignoreTrimWhitespace","Controls whether the diff editor shows changes in leading or trailing whitespace as diffs.")},"editor.largeFileOptimizations":{type:"boolean",default:_.largeFileOptimizations,description:i.a("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:i.a("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")}}},S=null;function T(){return null===S&&(S=Object.create(null),Object.keys(C.properties).forEach((function(e){S[e]=!0}))),S}function w(e){return T()["editor."+e]||!1}function k(e){return T()["diffEditor."+e]||!1}E.registerConfiguration(C)},function(e,t,o){"use strict";o.d(t,"a",(function(){return d})),o.d(t,"b",(function(){return g}));var n,i=o(15),r=o(96),s=o(27),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=i.d?1.5:1.35;function u(e,t){if("number"==typeof e)return e;var o=parseFloat(e);return isNaN(o)?t:o}function c(e,t,o){return eo?o:e}function h(e,t){return"string"!=typeof e?t:e}var d=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,o){var n=h(t.fontFamily,s.b.fontFamily),i=h(t.fontWeight,s.b.fontWeight),a=u(t.fontSize,s.b.fontSize);0===(a=c(a,0,100))?a=s.b.fontSize:a<8&&(a=8);var d=function(e,t){if("number"==typeof e)return Math.round(e);var o=parseInt(e);return isNaN(o)?t:o}(t.lineHeight,0);0===(d=c(d,0,150))?d=Math.round(l*a):d<8&&(d=8);var g=u(t.letterSpacing,0);g=c(g,-5,20);var p=1+.1*r.a.getZoomLevel();return new e({zoomLevel:o,fontFamily:n,fontWeight:i,fontSize:a*=p,lineHeight:d*=p,letterSpacing:g})},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"+this.letterSpacing},e}(),g=function(e){function t(t,o){var n=e.call(this,t)||this;return n.isTrusted=o,n.isMonospace=t.isMonospace,n.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,n.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,n.spaceWidth=t.spaceWidth,n.maxDigitWidth=t.maxDigitWidth,n}return a(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.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t}(d)},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("textModelService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return S})),o.d(t,"b",(function(){return T})),o.d(t,"c",(function(){return B})),o.d(t,"d",(function(){return F}));var n,i,r=o(22),s=o(6),a=o(12),l=o(210),u=o(117),c=o(19),h=o(49),d=o(0),g=o(57),p=o(104),f=o(75),m=o(21),_=o(1),y=o(42),v=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),b=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},C=function(e,t){return function(o,n){t(o,n,e)}},S=Object(r.c)("listService"),T=function(){function e(e){this.lists=[],this._lastFocusedWidget=void 0}return Object.defineProperty(e.prototype,"lastFocusedList",{get:function(){return this._lastFocusedWidget},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var o=this;if(this.lists.some((function(t){return t.widget===e})))throw new Error("Cannot register the same widget multiple times");var n={widget:e,extraContextKeys:t};return this.lists.push(n),e.isDOMFocused()&&(this._lastFocusedWidget=e),Object(s.c)([e.onDidFocus((function(){return o._lastFocusedWidget=e})),Object(s.f)((function(){return o.lists.splice(o.lists.indexOf(n),1)})),e.onDidDispose((function(){o.lists=o.lists.filter((function(e){return e!==n})),o._lastFocusedWidget===e&&(o._lastFocusedWidget=void 0)}))])},e=E([C(0,a.e)],e)}(),w=new a.f("listFocus",!0),k=new a.f("listSupportsMultiselect",!0),O=new a.f("listHasSelectionOrFocus",!1),R=new a.f("listDoubleSelection",!1),N=new a.f("listMultiSelection",!1);var L,I="workbench.list.multiSelectModifier",D="workbench.list.openMode",A="workbench.tree.horizontalScrolling";function P(e){return"alt"===e.getValue(I)}function M(e){return"doubleClick"!==e.getValue(D)}function x(e,t){return e.controller||(e.controller=t.createInstance(F,{})),e.styler||(e.styler=new f.f((L||(L=Object(_.o)()),L))),e}var B=function(e){function t(t,o,n,i,r,s,a,l){var c=this,h=x(o,a),d=l.getValue(A)?y.b.Auto:y.b.Hidden,g=b({horizontalScrollMode:d,keyboardSupport:!1},Object(u.d)(s.getTheme(),u.e),n);return(c=e.call(this,t,h,g)||this).disposables=[],c.contextKeyService=function(e,t){var o=e.createScoped(t.getHTMLElement());return w.bindTo(o),o}(i,c),k.bindTo(c.contextKeyService),c.listHasSelectionOrFocus=O.bindTo(c.contextKeyService),c.listDoubleSelection=R.bindTo(c.contextKeyService),c.listMultiSelection=N.bindTo(c.contextKeyService),c._openOnSingleClick=M(l),c._useAltAsMultipleSelectionModifier=P(l),c.disposables.push(c.contextKeyService,r.register(c),Object(u.b)(c,s)),c.disposables.push(c.onDidChangeSelection((function(){var e=c.getSelection(),t=c.getFocus();c.listHasSelectionOrFocus.set(e&&e.length>0||!!t),c.listDoubleSelection.set(e&&2===e.length),c.listMultiSelection.set(e&&e.length>1)}))),c.disposables.push(c.onDidChangeFocus((function(){var e=c.getSelection(),t=c.getFocus();c.listHasSelectionOrFocus.set(e&&e.length>0||!!t)}))),c.disposables.push(l.onDidChangeConfiguration((function(e){e.affectsConfiguration(D)&&(c._openOnSingleClick=M(l)),e.affectsConfiguration(I)&&(c._useAltAsMultipleSelectionModifier=P(l))}))),c}return v(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=Object(s.d)(this.disposables)},t=E([C(3,a.e),C(4,S),C(5,c.c),C(6,r.a),C(7,h.b)],t)}(l.a);var F=function(e){function t(t,o){var n=e.call(this,function(e){return"boolean"!=typeof e.keyboardSupport&&(e.keyboardSupport=!1),"number"!=typeof e.clickBehavior&&(e.clickBehavior=f.a.ON_MOUSE_DOWN),e}(t))||this;return n.configurationService=o,n.disposables=[],Object(m.j)(t.openMode)&&(n.setOpenMode(n.getOpenModeSetting()),n.registerListeners()),n}return v(t,e),t.prototype.registerListeners=function(){var e=this;this.disposables.push(this.configurationService.onDidChangeConfiguration((function(t){t.affectsConfiguration(D)&&e.setOpenMode(e.getOpenModeSetting())})))},t.prototype.getOpenModeSetting=function(){return M(this.configurationService)?f.g.SINGLE_CLICK:f.g.DOUBLE_CLICK},t.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables)},t=E([C(1,h.b)],t)}(f.c);g.a.as(p.b.Configuration).registerConfiguration({id:"workbench",order:7,title:Object(d.a)("workbenchConfigurationTitle","Workbench"),type:"object",properties:(i={},i[I]={type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[Object(d.a)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),Object(d.a)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:Object(d.a)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},i[D]={type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(d.a)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). For parents with children in trees, this setting will control if a single click expands the parent or a double click. Note that some trees and lists might choose to ignore this setting if it is not applicable. ")},i[A]={type:"boolean",default:!1,description:Object(d.a)("horizontalScrolling setting","Controls whether trees support horizontal scrolling in the workbench.")},i)})},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=o(22),i=Object(n.c)("logService"),r=function(){function e(){}return e.prototype.trace=function(e){for(var t=[],o=1;o-1;i--){var r=o[i],s=(r.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(n=r)}return _.head.insertBefore(t,n),e}}var ie="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function re(){for(var e=12,t="";e-- >0;)t+=ie[62*Math.random()|0];return t}function se(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function ae(e){return Object.keys(e||{}).reduce((function(t,o){return t+"".concat(o,": ").concat(e[o],";")}),"")}function le(e){return e.size!==oe.size||e.x!==oe.x||e.y!==oe.y||e.rotate!==oe.rotate||e.flipX||e.flipY}function ue(e){var t=e.transform,o=e.containerWidth,n=e.iconWidth,i={transform:"translate(".concat(o/2," 256)")},r="translate(".concat(32*t.x,", ").concat(32*t.y,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)");return{outer:i,inner:{transform:"".concat(r," ").concat(s," ").concat(a)},path:{transform:"translate(".concat(n/2*-1," -256)")}}}var ce={x:0,y:0,width:"100%",height:"100%"};function he(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function de(e){var t=e.icons,o=t.main,n=t.mask,i=e.prefix,r=e.iconName,s=e.transform,l=e.symbol,u=e.title,c=e.extra,h=e.watchable,d=void 0!==h&&h,g=n.found?n:o,p=g.width,f=g.height,m="fa-w-".concat(Math.ceil(p/f*16)),_=[L.replacementClass,r?"".concat(L.familyPrefix,"-").concat(r):"",m].filter((function(e){return-1===c.classes.indexOf(e)})).concat(c.classes).join(" "),y={children:[],attributes:a({},c.attributes,{"data-prefix":i,"data-icon":r,class:_,role:c.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(p," ").concat(f)})};d&&(y.attributes[T]=""),u&&y.children.push({tag:"title",attributes:{id:y.attributes["aria-labelledby"]||"title-".concat(re())},children:[u]});var v=a({},y,{prefix:i,iconName:r,main:o,mask:n,transform:s,symbol:l,styles:c.styles}),b=n.found&&o.found?function(e){var t,o=e.children,n=e.attributes,i=e.main,r=e.mask,s=e.transform,l=i.width,u=i.icon,c=r.width,h=r.icon,d=ue({transform:s,containerWidth:c,iconWidth:l}),g={tag:"rect",attributes:a({},ce,{fill:"white"})},p=u.children?{children:u.children.map(he)}:{},f={tag:"g",attributes:a({},d.inner),children:[he(a({tag:u.tag,attributes:a({},u.attributes,d.path)},p))]},m={tag:"g",attributes:a({},d.outer),children:[f]},_="mask-".concat(re()),y="clip-".concat(re()),v={tag:"mask",attributes:a({},ce,{id:_,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[g,m]},b={tag:"defs",children:[{tag:"clipPath",attributes:{id:y},children:(t=h,"g"===t.tag?t.children:[t])},v]};return o.push(b,{tag:"rect",attributes:a({fill:"currentColor","clip-path":"url(#".concat(y,")"),mask:"url(#".concat(_,")")},ce)}),{children:o,attributes:n}}(v):function(e){var t=e.children,o=e.attributes,n=e.main,i=e.transform,r=ae(e.styles);if(r.length>0&&(o.style=r),le(i)){var s=ue({transform:i,containerWidth:n.width,iconWidth:n.width});t.push({tag:"g",attributes:a({},s.outer),children:[{tag:"g",attributes:a({},s.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:a({},n.icon.attributes,s.path)}]}]})}else t.push(n.icon);return{children:t,attributes:o}}(v),E=b.children,C=b.attributes;return v.children=E,v.attributes=C,l?function(e){var t=e.prefix,o=e.iconName,n=e.children,i=e.attributes,r=e.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:a({},i,{id:!0===r?"".concat(t,"-").concat(L.familyPrefix,"-").concat(o):r}),children:n}]}]}(v):function(e){var t=e.children,o=e.main,n=e.mask,i=e.attributes,r=e.styles,s=e.transform;if(le(s)&&o.found&&!n.found){var l={x:o.width/o.height/2,y:.5};i.style=ae(a({},r,{"transform-origin":"".concat(l.x+s.x/16,"em ").concat(l.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}(v)}function ge(e){var t=e.content,o=e.width,n=e.height,i=e.transform,r=e.title,s=e.extra,l=e.watchable,u=void 0!==l&&l,c=a({},s.attributes,r?{title:r}:{},{class:s.classes.join(" ")});u&&(c[T]="");var h=a({},s.styles);le(i)&&(h.transform=function(e){var t=e.transform,o=e.width,n=void 0===o?E:o,i=e.height,r=void 0===i?E:i,s=e.startCentered,a=void 0!==s&&s,l="";return l+=a&&b?"translate(".concat(t.x/te-n/2,"em, ").concat(t.y/te-r/2,"em) "):a?"translate(calc(-50% + ".concat(t.x/te,"em), calc(-50% + ").concat(t.y/te,"em)) "):"translate(".concat(t.x/te,"em, ").concat(t.y/te,"em) "),l+="scale(".concat(t.size/te*(t.flipX?-1:1),", ").concat(t.size/te*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) ")}({transform:i,startCentered:!0,width:o,height:n}),h["-webkit-transform"]=h.transform);var d=ae(h);d.length>0&&(c.style=d);var g=[];return g.push({tag:"span",attributes:c,children:[t]}),r&&g.push({tag:"span",attributes:{class:"sr-only"},children:[r]}),g}var pe=function(){},fe=(L.measurePerformance&&y&&y.mark&&y.measure,function(e,t,o,n){var i,r,s,a=Object.keys(e),l=a.length,u=void 0!==n?function(e,t){return function(o,n,i,r){return e.call(t,o,n,i,r)}}(t,n):t;for(void 0===o?(i=1,s=e[a[0]]):(i=0,s=o);i2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,n=void 0!==o&&o,i=Object.keys(t).reduce((function(e,o){var n=t[o];return!!n.icon?e[n.iconName]=n.icon:e[o]=n,e}),{});"function"!=typeof D.hooks.addPack||n?D.styles[e]=a({},D.styles[e]||{},i):D.hooks.addPack(e,i),"fas"===e&&me("fa",t)}var _e=D.styles,ye=D.shims,ve=function(){var e=function(e){return fe(_e,(function(t,o,n){return t[n]=fe(o,e,{}),t}),{})};e((function(e,t,o){return t[3]&&(e[t[3]]=o),e})),e((function(e,t,o){var n=t[2];return e[o]=o,n.forEach((function(t){e[t]=o})),e}));var t="far"in _e;fe(ye,(function(e,o){var n=o[0],i=o[1],r=o[2];return"far"!==i||t||(i="fas"),e[n]={prefix:i,iconName:r},e}),{})};ve();D.styles;function be(e,t,o){if(e&&e[t]&&e[t][o])return{prefix:t,iconName:o,icon:e[t][o]}}function Ee(e){var t=e.tag,o=e.attributes,n=void 0===o?{}:o,i=e.children,r=void 0===i?[]:i;return"string"==typeof e?se(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce((function(t,o){return t+"".concat(o,'="').concat(se(e[o]),'" ')}),"").trim()}(n),">").concat(r.map(Ee).join(""),"")}var Ce=function(e){var t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e?e.toLowerCase().split(" ").reduce((function(e,t){var o=t.toLowerCase().split("-"),n=o[0],i=o.slice(1).join("-");if(n&&"h"===i)return e.flipX=!0,e;if(n&&"v"===i)return e.flipY=!0,e;if(i=parseFloat(i),isNaN(i))return e;switch(n){case"grow":e.size=e.size+i;break;case"shrink":e.size=e.size-i;break;case"left":e.x=e.x-i;break;case"right":e.x=e.x+i;break;case"up":e.y=e.y-i;break;case"down":e.y=e.y+i;break;case"rotate":e.rotate=e.rotate+i}return e}),t):t};function Se(e){this.name="MissingIcon",this.message=e||"Icon unavailable",this.stack=(new Error).stack}Se.prototype=Object.create(Error.prototype),Se.prototype.constructor=Se;var Te={fill:"currentColor"},we={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},ke={tag:"path",attributes:a({},Te,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},Oe=a({},we,{attributeName:"opacity"});a({},Te,{cx:"256",cy:"364",r:"28"}),a({},we,{attributeName:"r",values:"28;14;28;28;14;28;"}),a({},Oe,{values:"1;0;1;1;0;1;"}),a({},Te,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),a({},Oe,{values:"1;0;0;0;0;1;"}),a({},Te,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),a({},Oe,{values:"0;0;1;1;0;0;"}),D.styles;function Re(e){var t=e[0],o=e[1],n=l(e.slice(4),1)[0];return{found:!0,width:t,height:o,icon:Array.isArray(n)?{tag:"g",attributes:{class:"".concat(L.familyPrefix,"-").concat(O.GROUP)},children:[{tag:"path",attributes:{class:"".concat(L.familyPrefix,"-").concat(O.SECONDARY),fill:"currentColor",d:n[0]}},{tag:"path",attributes:{class:"".concat(L.familyPrefix,"-").concat(O.PRIMARY),fill:"currentColor",d:n[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:n}}}}D.styles;var Ne='svg:not(:root).svg-inline--fa {\n overflow: visible;\n}\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-border {\n height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n width: 2em;\n}\n.svg-inline--fa.fa-fw {\n width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: 0.25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-lg {\n font-size: 1.3333333333em;\n line-height: 0.75em;\n vertical-align: -0.0667em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit;\n}\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: 0.1em;\n padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n float: left;\n}\n\n.fa-pull-right {\n float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: 0.3em;\n}\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n -webkit-filter: none;\n filter: none;\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: #fff;\n}\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse {\n color: #fff;\n}';function Le(){var e=C,t=S,o=L.familyPrefix,n=L.replacementClass,i=Ne;if(o!==e||n!==t){var r=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");i=i.replace(r,".".concat(o,"-")).replace(s,"--".concat(o,"-")).replace(a,".".concat(n))}return i}function Ie(){L.autoAddCss&&!xe&&(ne(Le()),xe=!0)}function De(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map((function(e){return Ee(e)}))}}),Object.defineProperty(e,"node",{get:function(){if(v){var t=_.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function Ae(e){var t=e.prefix,o=void 0===t?"fa":t,n=e.iconName;if(n)return be(Me.definitions,o,n)||be(D.styles,o,n)}var Pe,Me=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}}var t,o,n;return t=e,(o=[{key:"add",value:function(){for(var e=this,t=arguments.length,o=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},o=t.transform,n=void 0===o?oe:o,i=t.symbol,r=void 0!==i&&i,s=t.mask,l=void 0===s?null:s,u=t.title,c=void 0===u?null:u,h=t.classes,d=void 0===h?[]:h,g=t.attributes,p=void 0===g?{}:g,f=t.styles,m=void 0===f?{}:f;if(e){var _=e.prefix,y=e.iconName,v=e.icon;return De(a({type:"icon"},e),(function(){return Ie(),L.autoA11y&&(c?p["aria-labelledby"]="".concat(L.replacementClass,"-title-").concat(re()):(p["aria-hidden"]="true",p.focusable="false")),de({icons:{main:Re(v),mask:l?Re(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:_,iconName:y,transform:a({},oe,n),symbol:r,title:c,extra:{attributes:p,styles:m,classes:d}})}))}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(e||{}).icon?e:Ae(e||{}),n=t.mask;return n&&(n=(n||{}).icon?n:Ae(n||{})),Pe(o,a({},t,{mask:n}))}),He=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.transform,n=void 0===o?oe:o,i=t.title,r=void 0===i?null:i,s=t.classes,l=void 0===s?[]:s,c=t.attributes,h=void 0===c?{}:c,d=t.styles,g=void 0===d?{}:d;return De({type:"text",content:e},(function(){return Ie(),ge({content:e,transform:a({},oe,n),title:r,extra:{attributes:h,styles:g,classes:["".concat(L.familyPrefix,"-layers-text")].concat(u(l))}})}))}}).call(this,o(80),o(148).setImmediate)},function(e,t,o){"use strict";var n=o(180),i=Object.keys||function(e){var t=[];for(var o in e)t.push(o);return t};e.exports=h;var r=o(167);r.inherits=o(147);var s=o(267),a=o(214);r.inherits(h,s);for(var l=i(a.prototype),u=0;u=0){for(var n=[],i=0,r=this._placeholderGroups[this._placeholderGroupsIdx];i0&&this._editor.executeEdits("snippet.placeholderTransform",n)}return!0===t&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1),this._editor.getModel().changeDecorations((function(t){for(var n=new Set,i=[],r=0,s=o._placeholderGroups[o._placeholderGroupsIdx];r0},enumerable:!0,configurable:!0}),e.prototype.computePossibleSelections=function(){for(var e=new Map,t=0,o=this._placeholderGroups;t ")+'"'},e.prototype.insert=function(){var t=this,o=this._editor.getModel(),n=e.createEditsAndSnippets(this._editor,this._template,this._overwriteBefore,this._overwriteAfter,!1),i=n.edits,r=n.snippets;this._snippets=r;var s=o.pushEditOperations(this._editor.getSelections(),i,(function(e){return t._snippets[0].hasPlaceholder?t._move(!0):e.map((function(e){return c.a.fromPositions(e.range.getEndPosition())}))}));this._editor.setSelections(s),this._editor.revealRange(s[0])},e.prototype.merge=function(t,o,n){var i=this;void 0===o&&(o=0),void 0===n&&(n=0),this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);var r=e.createEditsAndSnippets(this._editor,t,o,n,!0),s=r.edits,a=r.snippets;this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(),s,(function(e){for(var t=0,o=i._snippets;t0},e}(),w=o(5),k=o(47),O=o(134);o.d(t,"SnippetController2",(function(){return L}));var R=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},N=function(e,t){return function(o,n){t(o,n,e)}},L=function(){function e(t,o,n){this._editor=t,this._logService=o,this._snippetListener=[],this._inSnippet=e.InSnippetMode.bindTo(n),this._hasNextTabstop=e.HasNextTabstop.bindTo(n),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(n)}return e.get=function(e){return e.getContribution("snippetController2")},e.prototype.dispose=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),Object(r.d)(this._session)},e.prototype.getId=function(){return"snippetController2"},e.prototype.insert=function(e,t,o,n,i){void 0===t&&(t=0),void 0===o&&(o=0),void 0===n&&(n=!0),void 0===i&&(i=!0);try{this._doInsert(e,t,o,n,i)}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}},e.prototype._doInsert=function(e,t,o,n,i){var s=this;void 0===t&&(t=0),void 0===o&&(o=0),void 0===n&&(n=!0),void 0===i&&(i=!0),this._snippetListener=Object(r.d)(this._snippetListener),n&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t,o):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new T(this._editor,e,t,o),this._session.insert()),i&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener=[this._editor.onDidChangeModelContent((function(e){return e.isFlush&&s.cancel()})),this._editor.onDidChangeModel((function(){return s.cancel()})),this._editor.onDidChangeCursorSelection((function(){return s._updateState()}))]},e.prototype._updateState=function(){if(this._session){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}},e.prototype._handleChoice=function(){var e=this._session.choice;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map((function(e){return c.a.fromPositions(e.getStartPosition())})));var t=e.options[0];Object(k.e)(this._editor,e.options.map((function(e,o){return{type:"value",label:e.value,insertText:e.value,sortText:Object(s.repeat)("a",o),overwriteAfter:t.value.length}})))}}else this._currentChoice=void 0},e.prototype.finish=function(){for(;this._inSnippet.get();)this.next()},e.prototype.cancel=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),Object(r.d)(this._snippetListener),Object(r.d)(this._session),this._session=void 0,this._modelVersionId=-1},e.prototype.prev=function(){this._session.prev(),this._updateState()},e.prototype.next=function(){this._session.next(),this._updateState()},e.prototype.isInSnippet=function(){return this._inSnippet.get()},e.InSnippetMode=new n.f("inSnippetMode",!1),e.HasNextTabstop=new n.f("hasNextTabstop",!1),e.HasPrevTabstop=new n.f("hasPrevTabstop",!1),e=R([N(1,O.a),N(2,n.e)],e)}();Object(i.h)(L);var I=i.c.bindToContribution(L.get);Object(i.g)(new I({id:"jumpToNextSnippetPlaceholder",precondition:n.d.and(L.InSnippetMode,L.HasNextTabstop),handler:function(e){return e.next()},kbOpts:{weight:130,kbExpr:w.a.editorTextFocus,primary:2}})),Object(i.g)(new I({id:"jumpToPrevSnippetPlaceholder",precondition:n.d.and(L.InSnippetMode,L.HasPrevTabstop),handler:function(e){return e.prev()},kbOpts:{weight:130,kbExpr:w.a.editorTextFocus,primary:1026}})),Object(i.g)(new I({id:"leaveSnippet",precondition:L.InSnippetMode,handler:function(e){return e.cancel()},kbOpts:{weight:130,kbExpr:w.a.editorTextFocus,primary:9,secondary:[1033]}})),Object(i.g)(new I({id:"acceptSnippet",precondition:L.InSnippetMode,handler:function(e){return e.finish()}}))},function(e,t,o){"use strict";o(449),o(450);var n,i=o(0),r=o(1),s=o(13),a=o(4),l=o(6),u=o(10),c=o(22),h=o(116),d=o(12),g=o(70),p=o(8),f=o(20),m=o(9),_=o(2),y=o(23),v=o(18),b=function(){function e(e){this.modelState=null,this.viewState=null,this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new f.f(new _.a(1,1,1,1),0,new m.a(1,1),0),new f.f(new _.a(1,1,1,1),0,new m.a(1,1),0))}return e.prototype.dispose=function(e){this._removeTrackedRange(e)},e.prototype.startTrackingSelection=function(e){this._trackSelection=!0,this._updateTrackedRange(e)},e.prototype.stopTrackingSelection=function(e){this._trackSelection=!1,this._removeTrackedRange(e)},e.prototype._updateTrackedRange=function(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,v.h.AlwaysGrowsWhenTypingAtEdges))},e.prototype._removeTrackedRange=function(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,v.h.AlwaysGrowsWhenTypingAtEdges)},e.prototype.asCursorState=function(){return new f.d(this.modelState,this.viewState)},e.prototype.readSelectionFromMarkers=function(e){var t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===y.b.LTR?new y.a(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new y.a(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)},e.prototype.ensureValidState=function(e){this._setState(e,this.modelState,this.viewState)},e.prototype.setState=function(e,t,o){this._setState(e,t,o)},e.prototype._setState=function(e,t,o){if(t){r=e.model.validateRange(t.selectionStart);var n=t.selectionStart.equalsRange(r)?t.selectionStartLeftoverVisibleColumns:0,i=(s=e.model.validatePosition(t.position),t.position.equals(s)?t.leftoverVisibleColumns:0);t=new f.f(r,n,s,i)}else{var r=e.model.validateRange(e.convertViewRangeToModelRange(o.selectionStart)),s=e.model.validatePosition(e.convertViewPositionToModelPosition(o.position.lineNumber,o.position.column));t=new f.f(r,o.selectionStartLeftoverVisibleColumns,s,o.leftoverVisibleColumns)}if(o){u=e.validateViewRange(o.selectionStart,t.selectionStart),c=e.validateViewPosition(o.position,t.position);o=new f.f(u,t.selectionStartLeftoverVisibleColumns,c,t.leftoverVisibleColumns)}else{var a=e.convertModelPositionToViewPosition(new m.a(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),l=e.convertModelPositionToViewPosition(new m.a(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),u=new _.a(a.lineNumber,a.column,l.lineNumber,l.column),c=e.convertModelPositionToViewPosition(t.position);o=new f.f(u,t.selectionStartLeftoverVisibleColumns,c,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=o,this._updateTrackedRange(e)},e}(),E=function(){function e(e){this.context=e,this.primaryCursor=new b(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()},e.prototype.startTrackingSelections=function(){this.primaryCursor.startTrackingSelection(this.context);for(var e=0,t=this.secondaryCursors.length;eo){var r=t-o;for(i=0;i=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,o=this.secondaryCursors.length;th&&t[S].index--;e.splice(h,1),t.splice(c,1),this._removeSecondaryCursor(h-1),i--}}}}},e}(),C=o(52),S=o(176),T=o(95),w=o(35),k=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),O=function(e){this.type=1,this.canUseLayerHinting=e.canUseLayerHinting,this.pixelRatio=e.pixelRatio,this.editorClassName=e.editorClassName,this.lineHeight=e.lineHeight,this.readOnly=e.readOnly,this.accessibilitySupport=e.accessibilitySupport,this.emptySelectionClipboard=e.emptySelectionClipboard,this.layoutInfo=e.layoutInfo,this.fontInfo=e.fontInfo,this.viewInfo=e.viewInfo,this.wrappingInfo=e.wrappingInfo},R=function(e){this.type=2,this.selections=e},N=function(){this.type=3},L=function(){this.type=4},I=function(e){this.type=5,this.isFocused=e},D=function(){this.type=6},A=function(e,t){this.type=7,this.fromLineNumber=e,this.toLineNumber=t},P=function(e,t){this.type=8,this.fromLineNumber=e,this.toLineNumber=t},M=function(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t},x=function(e,t,o,n){this.type=10,this.range=e,this.verticalType=t,this.revealHorizontal=o,this.scrollType=n},B=function(e){this.type=11,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged},F=function(e){this.type=12,this.ranges=e},H=function(){this.type=15},U=function(){this.type=13},V=function(){this.type=14},W=function(){this.type=16},j=function(e){function t(){var t=e.call(this)||this;return t._listeners=[],t._collector=null,t._collectorCnt=0,t}return k(t,e),t.prototype.dispose=function(){this._listeners=[],e.prototype.dispose.call(this)},t.prototype._beginEmit=function(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new G),this._collector},t.prototype._endEmit=function(){if(this._collectorCnt--,0===this._collectorCnt){var e=this._collector.finalize();this._collector=null,e.length>0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),o=0,n=t.length;ot.MAX_CURSOR_COUNT&&(n=n.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var i=new X(this._model,this);this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._emitStateChangedIfNecessary(e,o,i)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,o){this._revealRange(t,0,e,o)},t.prototype.revealRange=function(e,t,o,n){this.emitCursorRevealRange(t,o,e,n)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})},t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),o=0,n=t.length;o1)return;var a=new _.a(r.lineNumber,r.column,r.lineNumber,r.column);this.emitCursorRevealRange(a,t,o,n)},t.prototype.emitCursorRevealRange=function(e,t,o,n){try{this._beginEmit().emit(new x(e,t,o,n))}finally{this._endEmit()}},t.prototype.trigger=function(e,t,o){var n=C.b;if(t!==n.CompositionStart)if(t===n.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.editor.readOnly)this._onDidAttemptReadOnlyEdit.fire(void 0);else{var i=new X(this._model,this),r=w.a.NotSet;t!==n.Undo&&t!==n.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case n.Type:this._type(e,o.text);break;case n.ReplacePreviousChar:this._replacePreviousChar(o.text,o.replaceCharCnt);break;case n.Paste:r=w.a.Paste,this._paste(o.text,o.pasteOnNewLine,o.multicursorText);break;case n.Cut:this._cut();break;case n.Undo:r=w.a.Undo,this._interpretCommandResult(this._model.undo());break;case n.Redo:r=w.a.Redo,this._interpretCommandResult(this._model.redo());break;case n.ExecuteCommand:this._externalExecuteCommand(o);break;case n.ExecuteCommands:this._externalExecuteCommands(o);break;case n.CompositionEnd:this._interpretCompositionEnd(e)}}catch(e){Object(s.e)(e)}this._isHandling=!1,t!==n.Undo&&t!==n.Redo&&this._cursors.startTrackingSelections(),this._emitStateChangedIfNecessary(e,r,i)&&this._revealRange(0,0,!0,0)}else this._isDoingComposition=!0},t.prototype._interpretCompositionEnd=function(e){this._isDoingComposition||"keyboard"!==e||this._executeEditOperation(T.a.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections()))},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(T.a.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var o=0,n=t.length;o0&&(r[0]._isTracked=!0);var l=e.model.pushEditOperations(e.selectionsBefore,r,(function(o){for(var n=[],i=0;i0?(n[o].sort(s),a[o]=t[o].computeCursorState(e.model,{getInverseEditOperations:function(){return n[o]},getTrackedSelection:function(t){var o=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[o]);return e.trackedRangesDirection[o]===y.b.LTR?new y.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new y.a(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):a[o]=e.selectionsBefore[o]};for(i=0;ii.identifier.major?n.identifier.major:i.identifier.major).toString()]=!0;for(var s=0;s0&&o--}}return t},e}(),J=o(11),Z=o(205),Q=o(54),ee=function(){function e(e,t,o,n,i){this.editorId=e,this.model=t,this.configuration=o,this._linesCollection=n,this._coordinatesConverter=i,this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=null,this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,o=this._decorationsCache[t];if(!o){var n=e.range,i=e.options,r=void 0;if(i.isWholeLine){var s=this._coordinatesConverter.convertModelPositionToViewPosition(new m.a(n.startLineNumber,1)),a=this._coordinatesConverter.convertModelPositionToViewPosition(new m.a(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)));r=new _.a(s.lineNumber,s.column,a.lineNumber,a.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n);o=new Q.e(r,i),this._decorationsCache[t]=o}return o},e.prototype.getDecorationsViewportData=function(e){var t=!0;return(t=(t=t&&null!==this._cachedModelDecorationsResolver)&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,this.configuration.editor.readOnly),o=e.startLineNumber,n=e.endLineNumber,i=[],r=0,s=[],a=o;a<=n;a++)s[a-o]=[];for(var l=0,u=t.length;l=s&&h<=a,g=ce(this.linePositionMapperFactory,o[c],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!d);i[c]=g.getViewLineCount(),this.lines[c]=g}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new te.b(i)},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 o=e.map((function(e){return t.model.validateRange(e)})).sort(_.a.compareRangesUsingStarts),n=[],i=o[0].startLineNumber,r=o[0].endLineNumber,s=1,a=o.length;sr+1?(n.push(new _.a(i,1,r,1)),i=l.startLineNumber,r=l.endLineNumber):l.endLineNumber>r&&(r=l.endLineNumber)}return n.push(new _.a(i,1,r,1)),n},e.prototype.setHiddenAreas=function(e){var t=this,o=this._reduceRanges(e),n=this.hiddenAreasIds.map((function(e){return t.model.getDecorationRange(e)})).sort(_.a.compareRangesUsingStarts);if(o.length===n.length){for(var i=!1,r=0;r=l&&g<=u?this.lines[r].isVisible()&&(this.lines[r]=this.lines[r].setVisible(!1),p=!0):(d=!0,this.lines[r].isVisible()||(this.lines[r]=this.lines[r].setVisible(!0),p=!0)),p){var f=this.lines[r].getViewLineCount();this.prefixSumComputer.changeValue(r,f)}}return d||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,o){return(this.wrappingIndent!==e||this.wrappingColumn!==t||this.columnsForFullWidthChar!==o)&&(this.wrappingIndent=e,this.wrappingColumn=t,this.columnsForFullWidthChar=o,this._constructLines(!1),!0)},e.prototype.onModelFlushed=function(){this._constructLines(!0)},e.prototype.onModelLinesDeleted=function(e,t,o){if(e<=this._validModelVersionId)return null;var n=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,i=this.prefixSumComputer.getAccumulatedValue(o-1);return this.lines.splice(t-1,o-t+1),this.prefixSumComputer.removeValues(t-1,o-t+1),new P(n,i)},e.prototype.onModelLinesInserted=function(e,t,o,n){if(e<=this._validModelVersionId)return null;for(var i=this.getHiddenAreas(),r=!1,s=new m.a(t,1),a=0;aa?(p=(g=(c=(u=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+a-1)+1)+(i-a)-1,l=!0):it?t:e},e.prototype.warmUpLookupCache=function(e,t){this.prefixSumComputer.warmUpCache(e-1,t-1)},e.prototype.getActiveIndentGuide=function(e,t,o){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),o=this._toValidViewLineNumber(o);var n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),i=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),s=this.model.getActiveIndentGuide(n.lineNumber,i.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,1);return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var o=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),i=[],r=[],s=[],a=o.lineNumber-1,l=n.lineNumber-1,u=null,c=a;c<=l;c++){var h=this.lines[c];if(h.isVisible()){var d=h.getViewLineNumberOfModelPosition(0,c===a?o.column:1),g=h.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(c+1)),p=0;(C=g-d+1)>1&&1===h.getViewLineMinColumn(this.model,c+1,g)&&(p=0===d?1:2),r.push(C),s.push(p),null===u&&(u=new m.a(c+1,0))}else null!==u&&(i=i.concat(this.model.getLinesIndentGuides(u.lineNumber,c)),u=null)}null!==u&&(i=i.concat(this.model.getLinesIndentGuides(u.lineNumber,n.lineNumber)),u=null);for(var f=t-e+1,_=new Array(f),y=0,v=0,b=i.length;vt&&(g=!0,d=t-i+1);var p=h+d;if(c.getViewLinesData(this.model,l+1,h,p,i-e,o,a),i+=d,g)break}}return a},e.prototype.validateViewPosition=function(e,t,o){this._ensureValidState(),e=this._toValidViewLineNumber(e);var n=this.prefixSumComputer.getIndexOf(e-1),i=n.index,r=n.remainder,s=this.lines[i],a=s.getViewLineMinColumn(this.model,i+1,r),l=s.getViewLineMaxColumn(this.model,i+1,r);tl&&(t=l);var u=s.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new m.a(i+1,u)).equals(o)?new m.a(e,t):this.convertModelPositionToViewPosition(o.lineNumber,o.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e);var o=this.prefixSumComputer.getIndexOf(e-1),n=o.index,i=o.remainder,r=this.lines[n].getModelColumnOfViewPosition(i,t);return this.model.validatePosition(new m.a(n+1,r))},e.prototype.convertModelPositionToViewPosition=function(e,t){this._ensureValidState();for(var o=this.model.validatePosition(new m.a(e,t)),n=o.lineNumber,i=o.column,r=n-1,s=!1;r>0&&!this.lines[r].isVisible();)r--,s=!0;if(0===r&&!this.lines[r].isVisible())return new m.a(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[n-1].getViewPositionOfModelPosition(a,i)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var o=e-1;if(this.lines[o].isVisible()){var n=1+(0===o?0:this.prefixSumComputer.getAccumulatedValue(o-1));return this.lines[o].getViewLineNumberOfModelPosition(n,t)}for(;o>0&&!this.lines[o].isVisible();)o--;if(0===o&&!this.lines[o].isVisible())return 1;var i=1+(0===o?0:this.prefixSumComputer.getAccumulatedValue(o-1));return this.lines[o].getViewLineNumberOfModelPosition(i,this.model.getLineMaxColumn(o+1))},e.prototype.getAllOverviewRulerDecorations=function(e,t,o){for(var n=this.model.getOverviewRulerDecorations(e,t),i=new ge,r=0,s=n.length;r0&&(r=this.wrappedIndent+r),r},e.prototype.getViewLineLength=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");var n=this.getInputStartOffsetOfOutputLineIndex(o),i=this.getInputEndOffsetOfOutputLineIndex(e,t,o)-n;return o>0&&(i=this.wrappedIndent.length+i),i},e.prototype.getViewLineMinColumn=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");return o>0?this.wrappedIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,o).length+1},e.prototype.getViewLineData=function(e,t,o){if(!this._isVisible)throw new Error("Not supported");var n=this.getInputStartOffsetOfOutputLineIndex(o),i=this.getInputEndOffsetOfOutputLineIndex(e,t,o),r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:i+1});o>0&&(r=this.wrappedIndent+r);var s=o>0?this.wrappedIndentLength+1:1,a=r.length+1,l=o+10&&(u=this.wrappedIndentLength);var c=e.getLineTokens(t);return new Q.c(r,l,s,a,c.sliceAndInflate(n,i,u))},e.prototype.getViewLinesData=function(e,t,o,n,i,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=o;a0&&(o0&&(i+=this.wrappedIndentLength),new m.a(e+n,i)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this.positionMapper.getOutputPositionOfInputOffset(t-1).outputLineIndex},e}();function ce(e,t,o,n,i,r,s){var a=e.createLineMapping(t,o,n,i,r);return null===a?s?ae.INSTANCE:le.INSTANCE:new ue(a,s)}var he=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}(),de=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new he(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,o){return!1},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,o){return new P(t,o)},e.prototype.onModelLinesInserted=function(e,t,o,n){return new M(t,o)},e.prototype.onModelLineChanged=function(e,t,o){return[!1,new A(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,o){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var o=t-e+1,n=new Array(o),i=0;i=t)return void(o>s&&(i[i.length-1]=o));i.push(n,t,o)}else this.result[e]=[n,t,o]},e}();function pe(e,t){if(!e._resolvedColor){var o=t.type,n="dark"===o?e.darkColor:"light"===o?e.color:e.hcColor;e._resolvedColor=function(e,t){if("string"==typeof e)return e;var o=e?t.getColor(e.id):null;o||(o=ne.a.transparent);return o.toString()}(n,t)}return e._resolvedColor}var fe=function(){function e(t,o,n,i){this.r=e._clamp(t),this.g=e._clamp(o),this.b=e._clamp(n),this.a=e._clamp(i)}return e._clamp=function(e){return e<0?0:e>255?255:0|e},e}(),me=function(){function e(){var e=this;this._onDidChange=new a.a,this.onDidChange=this._onDidChange.event,this._updateColorMap(),J.y.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=J.y.getColorMap();if(!e)return this._colors=[null],void(this._backgroundIsLight=!0);this._colors=[null];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}(),_e=function(){function e(t,o){if(760!==t.length)throw new Error("Invalid x2CharData");if(190!==o.length)throw new Error("Invalid x1CharData");this.x2charData=t,this.x1charData=o,this.x2charDataLight=e.soften(t,.8),this.x1charDataLight=e.soften(o,50/60)}return e.soften=function(e,t){for(var o=new Uint8ClampedArray(e.length),n=0,i=e.length;nt.width||n+4>t.height)console.warn("bad render request outside image data");else{var l=a?this.x2charDataLight:this.x2charData,u=e._getChIndex(i),c=4*t.width,h=s.r,d=s.g,g=s.b,p=r.r-h,f=r.g-d,m=r.b-g,_=t.data,y=4*u*2,v=n*c+4*o,b=l[y]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+1]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b,v+=c;b=l[y+2]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+3]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b,v+=c;b=l[y+4]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+5]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b,v+=c;b=l[y+6]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b;b=l[y+7]/255;_[v+4]=h+p*b,_[v+5]=d+f*b,_[v+6]=g+m*b}},e.prototype.x1RenderChar=function(t,o,n,i,r,s,a){if(o+1>t.width||n+2>t.height)console.warn("bad render request outside image data");else{var l=a?this.x1charDataLight:this.x1charData,u=e._getChIndex(i),c=4*t.width,h=s.r,d=s.g,g=s.b,p=r.r-h,f=r.g-d,m=r.b-g,_=t.data,y=2*u*1,v=n*c+4*o,b=l[y]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b,v+=c;b=l[y+1]/255;_[v+0]=h+p*b,_[v+1]=d+f*b,_[v+2]=g+m*b}},e.prototype.x2BlockRenderChar=function(e,t,o,n,i,r){if(t+2>e.width||o+4>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=i.r,l=i.g,u=i.b,c=a+.5*(n.r-a),h=l+.5*(n.g-l),d=u+.5*(n.b-u),g=e.data,p=o*s+4*t;g[p+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d,g[p+4]=c,g[p+5]=h,g[p+6]=d}},e.prototype.x1BlockRenderChar=function(e,t,o,n,i,r){if(t+1>e.width||o+2>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=i.r,l=i.g,u=i.b,c=a+.5*(n.r-a),h=l+.5*(n.g-l),d=u+.5*(n.b-u),g=e.data,p=o*s+4*t;g[p+0]=c,g[p+1]=h,g[p+2]=d,g[(p+=s)+0]=c,g[p+1]=h,g[p+2]=d}},e}(),ye=o(115),ve=o(92),be=o(27),Ee=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ce=function(e){function t(t,o,n){for(var i=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}(ye.a),Se=function(){function e(e,t,o){this.classifier=new Ce(e,t,o)}return e.nextVisibleColumn=function(e,t,o,n){return e=+e,t=+t,n=+n,o?e+(t-e%t):e+n},e.prototype.createLineMapping=function(t,o,n,i,r){if(-1===n)return null;o=+o,n=+n,i=+i;var s=0,a="",l=-1;if((r=+r)!==be.j.None&&-1!==(l=p.firstNonWhitespaceIndex(t))){a=t.substring(0,l);for(var u=0;un&&(a="",s=0)}var h=this.classifier,d=0,g=[],f=0,m=0,_=-1,y=0,v=-1,b=0,E=t.length;for(u=0;u0){var w=t.charCodeAt(u-1);1!==h.get(w)&&(_=u,y=s)}var k=1;if(p.isFullWidthCharacter(C)&&(k=i),(m=e.nextVisibleColumn(m,o,S,k))>n&&0!==u){var O=void 0,R=void 0;-1!==_&&y<=n?(O=_,R=y):-1!==v&&b<=n?(O=v,R=b):(O=u,R=s),g[f++]=O-d,d=O,m=e.nextVisibleColumn(R,o,S,k),_=-1,y=0,v=-1,b=0}if(-1!==_&&(y=e.nextVisibleColumn(y,o,S,k)),-1!==v&&(b=e.nextVisibleColumn(b,o,S,k)),2===T&&(r===be.j.None||u>=l)&&(_=u+1,y=s),4===T&&u>>1;t===e[s]?n=t&&(this._whitespaceId2Index[u]=c+1)}this._whitespaceId2Index[e.toString()]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,o){e|=0,t|=0,o|=0;var n=!1;return n=this.changeWhitespaceHeight(e,o)||n,n=this.changeWhitespaceAfterLineNumber(e,t)||n},e.prototype.changeWhitespaceHeight=function(e,t){t|=0;var o=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(o)){var n=this._whitespaceId2Index[o];if(this._heights[n]!==t)return this._heights[n]=t,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,o){o|=0;var n=(t|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(n)){var i=this._whitespaceId2Index[n];if(this._afterLineNumbers[i]!==o){var r=this._ordinals[i],s=this._heights[i],a=this._minWidths[i];this.removeWhitespace(t);var l=e.findInsertionIndex(this._afterLineNumbers,o,this._ordinals,r);return this._insertWhitespaceAtIndex(t,l,o,r,s,a),!0}}return!1},e.prototype.removeWhitespace=function(e){var t=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var o=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],this._removeWhitespaceAtIndex(o),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),o=0,n=t.length;o=e&&(this._whitespaceId2Index[i]=r-1)}},e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var o=0,n=this._afterLineNumbers.length;ot&&(this._afterLineNumbers[o]-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var o=0,n=this._afterLineNumbers.length;o=t.length||t[i+1]>=e)return i;o=i+1|0}else n=i-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,o=this._lineHeight,n=1,i=t;n=s+o)n=r+1;else{if(e>=s)return r;i=r}}return n>t?t:n},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0;var o,n,i=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,l=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),u=0|this._whitespaces.getCount();-1===l?(l=u,n=a+1,o=0):(n=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(l),o=0|this._whitespaces.getHeightForWhitespaceIndex(l));var c=s,h=c,d=0;s>=5e5&&(d=5e5*Math.floor(s/5e5),h-=d=Math.floor(d/i)*i);for(var g=[],p=e+(t-e)/2,f=-1,m=r;m<=a;m++){if(-1===f){(c<=p&&pp)&&(f=m)}for(c+=i,g[m-r]=h,h+=i;n===m;)h+=o,c+=o,++l>=u?n=a+1:(n=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(l),o=0|this._whitespaces.getHeightForWhitespaceIndex(l));if(c>=t){a=m;break}}-1===f&&(f=a);var _=0|this.getVerticalOffsetForLineNumber(a),y=r,v=a;return yt&&v--,{bigNumbersDelta:d,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:g,centeredLineNumber:f,completelyVisibleStartLineNumber:y,completelyVisibleEndLineNumber:v}},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,o,n=0,i=this._whitespaces.getCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this._whitespaces.getHeightForWhitespaceIndex(i))return-1;for(;n=(o=this.getVerticalOffsetForWhitespaceIndex(t))+this._whitespaces.getHeightForWhitespaceIndex(t))n=t+1;else{if(e>=o)return t;i=t}return n},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 o=this.getVerticalOffsetForWhitespaceIndex(t);if(o>e)return null;var n=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:o,height:n}},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var o=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this._whitespaces.getCount()-1;if(o<0)return[];for(var i=[],r=o;r<=n;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this._whitespaces.getHeightForWhitespaceIndex(r);if(s>=t)break;i.push({id:this._whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return i},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight)},e}(),Re=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ne=function(e){function t(t,o,n){var i=e.call(this)||this;return i._configuration=t,i._linesLayout=new Oe(o,i._configuration.editor.lineHeight),i.scrollable=i._register(new we.a(0,n)),i._configureSmoothScrollDuration(),i.scrollable.setScrollDimensions({width:t.editor.layoutInfo.contentWidth,height:t.editor.layoutInfo.contentHeight}),i.onDidScroll=i.scrollable.onScroll,i._updateHeight(),i}return Re(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 this._configuration.editor.viewInfo.scrollbar.horizontal===we.b.Hidden?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 Q.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new Q.f(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,t){if(!this._configuration.editor.wrappingInfo.isViewportWrapping){var o=this._configuration.editor.viewInfo.scrollBeyondLastColumn*this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+o,t,n)}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,o=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(o),scrollLeft:e.scrollLeft}},t.prototype.addWhitespace=function(e,t,o,n){return this._linesLayout.insertWhitespace(e,t,o,n)},t.prototype.changeWhitespace=function(e,t,o){return this._linesLayout.changeWhitespace(e,t,o)},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 o=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:o.scrollLeft+e,scrollTop:o.scrollTop+t})},t}(l.a),Le=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ie=!0,De=function(e){function t(t,o,n,i){var r=e.call(this)||this;if(r.editorId=t,r.configuration=o,r.model=n,r.hasFocus=!1,r.viewportStartLine=-1,r.viewportStartLineTrackedRange=null,r.viewportStartLineTop=0,Ie&&r.model.isTooLargeForTokenization())r.lines=new de(r.model);else{var s=r.configuration.editor,a=new Se(s.wrappingInfo.wordWrapBreakBeforeCharacters,s.wrappingInfo.wordWrapBreakAfterCharacters,s.wrappingInfo.wordWrapBreakObtrusiveCharacters);r.lines=new se(r.model,a,r.model.getOptions().tabSize,s.wrappingInfo.wrappingColumn,s.fontInfo.typicalFullwidthCharacterWidth/s.fontInfo.typicalHalfwidthCharacterWidth,s.wrappingInfo.wrappingIndent)}return r.coordinatesConverter=r.lines.createCoordinatesConverter(),r.viewLayout=r._register(new Ne(r.configuration,r.getLineCount(),i)),r._register(r.viewLayout.onDidScroll((function(e){try{r._beginEmit().emit(new B(e))}finally{r._endEmit()}}))),r.decorations=new ee(r.editorId,r.model,r.configuration,r.lines,r.coordinatesConverter),r._registerModelEvents(),r._register(r.configuration.onDidChange((function(e){try{var t=r._beginEmit();r._onConfigurationChanged(t,e)}finally{r._endEmit()}}))),r._register(me.getInstance().onDidChange((function(){try{r._beginEmit().emit(new U)}finally{r._endEmit()}}))),r}return Le(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this.decorations.dispose(),this.lines.dispose(),this.viewportStartLineTrackedRange=this.model._setTrackedRange(this.viewportStartLineTrackedRange,null,v.h.NeverGrowsWhenTypingAtEdges)},t.prototype.setHasFocus=function(e){this.hasFocus=e},t.prototype._onConfigurationChanged=function(e,t){var o=null;if(-1!==this.viewportStartLine){var n=new m.a(this.viewportStartLine,this.getLineMinColumn(this.viewportStartLine));o=this.coordinatesConverter.convertViewPositionToModelPosition(n)}var i=!1,r=this.configuration.editor;if(this.lines.setWrappingSettings(r.wrappingInfo.wrappingIndent,r.wrappingInfo.wrappingColumn,r.fontInfo.typicalFullwidthCharacterWidth/r.fontInfo.typicalHalfwidthCharacterWidth)&&(e.emit(new L),e.emit(new D),e.emit(new N),this.decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(i=!0)),t.readOnly&&(this.decorations.reset(),e.emit(new N)),e.emit(new O(t)),this.viewLayout.onConfigurationChanged(t),i&&o){var s=this.coordinatesConverter.convertModelPositionToViewPosition(o),a=this.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber);this.viewLayout.deltaScrollNow(0,a-this.viewportStartLineTop)}},t.prototype._registerModelEvents=function(){var e=this;this._register(this.model.onDidChangeRawContentFast((function(t){try{for(var o=e._beginEmit(),n=!1,i=!1,r=t.changes,s=t.versionId,a=0,l=r.length;a=2&&e.viewportStartLineTrackedRange){var f=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(f){var m=e.coordinatesConverter.convertModelPositionToViewPosition(f.getStartPosition()),_=e.viewLayout.getVerticalOffsetForLineNumber(m.lineNumber);e.viewLayout.deltaScrollNow(0,_-e.viewportStartLineTop)}}}))),this._register(this.model.onDidChangeTokens((function(t){for(var o=[],n=0,i=t.ranges.length;na||(r0&&s[l-1]===s[l]||(a+=this.model.getLineContent(s[l])+i);return a}var u=[];for(l=0;l'+this._getHTMLToCopy(o,r)+""},t.prototype._getHTMLToCopy=function(e,t){for(var o=e.startLineNumber,n=e.startColumn,i=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),a="",l=o;l<=i;l++){var u=this.model.getLineTokens(l),c=u.getLineContent(),h=l===o?n-1:0,d=l===i?r-1:c.length;a+=""===c?"
    ":Object(Z.a)(c,u.inflate(),t,h,d,s)}return a},t.prototype._getColorMap=function(){for(var e=J.y.getColorMap(),t=[null],o=1,n=e.length;o'+o+"":String(n)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===o?String(o):o%10==0?String(o):"":String(o)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var o=We.c?this._lineHeight%2==0?" lh-even":" lh-odd":"",n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,r='
    ',s=[],a=n;a<=i;a++){var l=a-n,u=this._getLineRenderLineNumber(a);s[l]=u?r+u+"
    ":""}this._renderResult=s}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},t.CLASS_NAME="line-numbers",t}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.q);o&&t.addRule(".monaco-editor .line-numbers { color: "+o+"; }");var n=e.getColor(Je.b);n&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+n+"; }")}));var ot=o(102),nt=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),it=function(){function e(e,t,o){this.top=e,this.left=t,this.width=o}return e.prototype.setWidth=function(t){return new e(this.top,this.left,t)},e}(),rt=je.h||je.j,st=function(){function e(){this._lastState=null}return e.prototype.set=function(e){this._lastState=e},e.prototype.get=function(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState:(this._lastState=null,null)},e.INSTANCE=new e,e}(),at=function(e){function t(t,o,n){var i=e.call(this,t)||this;i._primaryCursorVisibleRange=null,i._viewController=o,i._viewHelper=n;var r=i._context.configuration.editor;i._accessibilitySupport=r.accessibilitySupport,i._contentLeft=r.layoutInfo.contentLeft,i._contentWidth=r.layoutInfo.contentWidth,i._contentHeight=r.layoutInfo.contentHeight,i._scrollLeft=0,i._scrollTop=0,i._fontInfo=r.fontInfo,i._lineHeight=r.lineHeight,i._emptySelectionClipboard=r.emptySelectionClipboard,i._visibleTextArea=null,i._selections=[new y.a(1,1,1,1)],i.textArea=Object(He.b)(document.createElement("textarea")),Xe.write(i.textArea,6),i.textArea.setClassName("inputarea"),i.textArea.setAttribute("wrap","off"),i.textArea.setAttribute("autocorrect","off"),i.textArea.setAttribute("autocapitalize","off"),i.textArea.setAttribute("autocomplete","off"),i.textArea.setAttribute("spellcheck","false"),i.textArea.setAttribute("aria-label",r.viewInfo.ariaLabel),i.textArea.setAttribute("role","textbox"),i.textArea.setAttribute("aria-multiline","true"),i.textArea.setAttribute("aria-haspopup","false"),i.textArea.setAttribute("aria-autocomplete","both"),i.textAreaCover=Object(He.b)(document.createElement("div")),i.textAreaCover.setPosition("absolute");var s={getLineCount:function(){return i._context.model.getLineCount()},getLineMaxColumn:function(e){return i._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return i._context.model.getValueInRange(e,t)}},a={getPlainTextToCopy:function(){var e=i._context.model.getPlainTextToCopy(i._selections,i._emptySelectionClipboard,We.g),t=i._context.model.getEOL(),o=i._emptySelectionClipboard&&1===i._selections.length&&i._selections[0].isEmpty(),n=Array.isArray(e)?e:null,r=Array.isArray(e)?e.join(t):e,s=null;(o||n)&&(s={lastCopiedValue:je.j?r.replace(/\r\n/g,"\n"):r,isFromEmptySelection:i._emptySelectionClipboard&&1===i._selections.length&&i._selections[0].isEmpty(),multicursorText:n});return st.INSTANCE.set(s),r},getHTMLToCopy:function(){return i._context.model.getHTMLToCopy(i._selections,i._emptySelectionClipboard)},getScreenReaderContent:function(e){if(je.l)return ze.b.EMPTY;if(1===i._accessibilitySupport){if(We.d){var t=i._selections[0];if(t.isEmpty()){var o=t.getStartPosition(),n=i._getWordBeforePosition(o);if(0===n.length&&(n=i._getCharacterBeforePosition(o)),n.length>0)return new ze.b(n,n.length,n.length,o,o)}}return ze.b.EMPTY}return ze.a.fromEditorSelection(e,s,i._selections[0],0===i._accessibilitySupport)},deduceModelPosition:function(e,t,o){return i._context.model.deduceModelPositionRelativeToViewPosition(e,t,o)}};return i._textAreaInput=i._register(new Ge.b(a,i.textArea)),i._register(i._textAreaInput.onKeyDown((function(e){i._viewController.emitKeyDown(e)}))),i._register(i._textAreaInput.onKeyUp((function(e){i._viewController.emitKeyUp(e)}))),i._register(i._textAreaInput.onPaste((function(e){var t=st.INSTANCE.get(e.text),o=!1,n=null;t&&(o=i._emptySelectionClipboard&&t.isFromEmptySelection,n=t.multicursorText),i._viewController.paste("keyboard",e.text,o,n)}))),i._register(i._textAreaInput.onCut((function(){i._viewController.cut("keyboard")}))),i._register(i._textAreaInput.onType((function(e){e.replaceCharCnt?i._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):i._viewController.type("keyboard",e.text)}))),i._register(i._textAreaInput.onSelectionChangeRequest((function(e){i._viewController.setSelection("keyboard",e)}))),i._register(i._textAreaInput.onCompositionStart((function(){var e=i._selections[0].startLineNumber,t=i._selections[0].startColumn;i._context.privateViewEventBus.emit(new x(new _.a(e,t,e,t),0,!0,1));var o=i._viewHelper.visibleRangeForPositionRelativeToEditor(e,t);o&&(i._visibleTextArea=new it(i._context.viewLayout.getVerticalOffsetForLineNumber(e),o.left,rt?0:1),i._render()),i.textArea.setClassName("inputarea ime-input"),i._viewController.compositionStart("keyboard")}))),i._register(i._textAreaInput.onCompositionUpdate((function(e){je.h?i._visibleTextArea=i._visibleTextArea.setWidth(0):i._visibleTextArea=i._visibleTextArea.setWidth(function(e,t){var o=document.createElement("canvas").getContext("2d");o.font=(n=t,i="normal",r=n.fontWeight,s=n.fontSize,a=n.lineHeight,l=n.fontFamily,i+" normal "+r+" "+s+"px / "+a+"px "+l);var n,i,r,s,a,l;var u=o.measureText(e);return je.j?u.width+2:u.width}(e.data,i._fontInfo)),i._render()}))),i._register(i._textAreaInput.onCompositionEnd((function(){i._visibleTextArea=null,i._render(),i.textArea.setClassName("inputarea"),i._viewController.compositionEnd("keyboard")}))),i._register(i._textAreaInput.onFocus((function(){i._context.privateViewEventBus.emit(new I(!0))}))),i._register(i._textAreaInput.onBlur((function(){i._context.privateViewEventBus.emit(new I(!1))}))),i}return nt(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),o=Object(ot.a)(this._context.configuration.editor.wordSeparators),n=e.column,i=0;n>1;){var r=t.charCodeAt(n-2);if(0!==o.get(r)||i>50)return t.substring(n-1,e.column-1);i++,n--}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(!p.isHighSurrogate(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),!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 m.a(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,rt?0:1,rt?0:1,!1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,o,n,i){var r=this.textArea,s=this.textAreaCover;i?g.a.applyFontInfo(r,this._fontInfo):(r.setFontSize(1),r.setLineHeight(this._fontInfo.lineHeight)),r.setTop(e),r.setLeft(t),r.setWidth(o),r.setHeight(n),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){var e=this.textArea,t=this.textAreaCover;if(g.a.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),rt)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 "+$e.OUTER_CLASS_NAME):0!==this._context.configuration.editor.viewInfo.renderLineNumbers?t.setClassName("monaco-editor-background textAreaCover "+tt.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(Ye);var lt=o(66),ut=o(16),ct=o(41),ht=o(73),dt=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),gt=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.toClientCoordinates=function(){return new pt(this.x-r.e.scrollX,this.y-r.e.scrollY)},e}(),pt=function(){function e(e,t){this.clientX=e,this.clientY=t}return e.prototype.toPageCoordinates=function(){return new gt(this.clientX+r.e.scrollX,this.clientY+r.e.scrollY)},e}(),ft=function(e,t,o,n){this.x=e,this.y=t,this.width=o,this.height=n};function mt(e){var t=r.u(e);return new ft(t.left,t.top,t.width,t.height)}var _t=function(e){function t(t,o){var n=e.call(this,t)||this;return n.pos=new gt(n.posx,n.posy),n.editorPos=mt(o),n}return dt(t,e),t}(ct.b),yt=function(){function e(e){this._editorViewDomNode=e}return e.prototype._create=function(e){return new _t(e,this._editorViewDomNode)},e.prototype.onContextMenu=function(e,t){var o=this;return r.g(e,"contextmenu",(function(e){t(o._create(e))}))},e.prototype.onMouseUp=function(e,t){var o=this;return r.g(e,"mouseup",(function(e){t(o._create(e))}))},e.prototype.onMouseDown=function(e,t){var o=this;return r.g(e,"mousedown",(function(e){t(o._create(e))}))},e.prototype.onMouseLeave=function(e,t){var o=this;return r.h(e,(function(e){t(o._create(e))}))},e.prototype.onMouseMoveThrottled=function(e,t,o,n){var i=this;return r.i(e,"mousemove",t,(function(e,t){return o(e,i._create(t))}),n)},e}(),vt=function(e){function t(t){var o=e.call(this)||this;return o._editorViewDomNode=t,o._globalMouseMoveMonitor=o._register(new ht.a),o._keydownListener=null,o}return dt(t,e),t.prototype.startMonitoring=function(e,t,o){var n=this;this._keydownListener=r.j(document,"keydown",(function(e){e.toKeybinding().isModifierKey()||n._globalMouseMoveMonitor.stopMonitoring(!0)}),!0);this._globalMouseMoveMonitor.startMonitoring((function(t,o){return e(t,new _t(o,n._editorViewDomNode))}),t,(function(){n._keydownListener.dispose(),o()}))},t}(l.a),bt=o(122),Et=o(68),Ct=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),St=function(e){function t(t,o,n){var i=e.call(this,t,o)||this;return i._viewLines=n,i}return Ct(t,e),t.prototype.linesVisibleRangesForRange=function(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)},t.prototype.visibleRangeForPosition=function(e){var t=this._viewLines.visibleRangesForRange2(new _.a(e.lineNumber,e.column,e.lineNumber,e.column));return t?t[0]:null},t}(function(){function e(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;var o=this._viewLayout.getCurrentViewport();this.scrollTop=o.top,this.scrollLeft=o.left,this.viewportWidth=o.width,this.viewportHeight=o.height}return e.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollTop},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.getDecorationsInViewport=function(){return this.viewportData.getDecorationsInViewport()},e}()),Tt=function(e,t){this.lineNumber=e,this.ranges=t},wt=function(){function e(e,t){this.left=Math.round(e),this.width=Math.round(t)}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e}(),kt=function(){function e(e,t){this.left=e,this.width=t}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e.compare=function(e,t){return e.left-t.left},e}(),Ot=function(){function e(){}return e._createRange=function(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange},e._detachRange=function(e,t){e.selectNodeContents(t)},e._readClientRects=function(e,t,o,n,i){var r=this._createRange();try{return r.setStart(e,t),r.setEnd(o,n),r.getClientRects()}catch(e){return null}finally{this._detachRange(r,i)}},e._mergeAdjacentRanges=function(e){if(1===e.length)return[new wt(e[0].left,e[0].width)];e.sort(kt.compare);for(var t=[],o=0,n=e[0].left,i=e[0].width,r=1,s=e.length;r=l?i=Math.max(i,l+u-n):(t[o++]=new wt(n,i),n=l,i=u)}return t[o++]=new wt(n,i),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var o=[],n=0,i=e.length;na)return null;(t=Math.min(a,Math.max(0,t)))!==(n=Math.min(a,Math.max(0,n)))&&n>0&&0===i&&(n--,i=Number.MAX_VALUE);var l=e.children[t].firstChild,u=e.children[n].firstChild;if(l&&u||(!l&&0===o&&t>0&&(l=e.children[t-1].firstChild,o=1073741824),!u&&0===i&&n>0&&(u=e.children[n-1].firstChild,i=1073741824)),!l||!u)return null;o=Math.min(l.textContent.length,Math.max(0,o)),i=Math.min(u.textContent.length,Math.max(0,i));var c=this._readClientRects(l,o,u,i,s);return this._createHorizontalRangesFromClientRects(c,r)},e}(),Rt=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Nt=!!We.e||!(We.c||je.j||je.m),Lt=je.h,It=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}(),Dt=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.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.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures},e}(),At=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=Object(He.b)(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!(!Lt&&this._options.themeType!==Fe.b)&&(this._isMaybeInvalid=!0,!0)},e.prototype.renderLine=function(t,o,n,i){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;var r=n.getViewLineRenderingData(t),s=this._options,a=bt.a.filter(r.inlineDecorations,t,r.minColumn,r.maxColumn);if(Lt||s.themeType===Fe.b)for(var l=n.selections,u=0,c=l.length;ut)){var d=h.startLineNumber===t?h.startColumn:r.minColumn,g=h.endLineNumber===t?h.endColumn:r.maxColumn;d');var f=Object(Et.c)(p,i);i.appendASCIIString("");var m=null;return Nt&&r.isBasicASCII&&s.useMonospaceOptimizations&&0===f.containsForeignElements&&r.content.length<300&&p.lineTokens.getCount()<100&&(m=new Pt(this._renderedViewLine?this._renderedViewLine.domNode:null,p,f.characterMapping)),m||(m=Bt(this._renderedViewLine?this._renderedViewLine.domNode:null,p,f.characterMapping,f.containsRTL,f.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,o){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 n=0|this._renderedViewLine.input.stopRenderingLineAfter;return-1!==n&&e>n&&t>n?null:(-1!==n&&e>n&&(e=n),-1!==n&&t>n&&(t=n),this._renderedViewLine.getVisibleRangesForRange(e,t,o))},e.prototype.getColumnOfNodeOffset=function(e,t,o){return this._renderedViewLine.getColumnOfNodeOffset(e,t,o)},e.CLASS_NAME="view-line",e}(),Pt=function(){function e(e,t,o){this.domNode=e,this.input=t,this._characterMapping=o,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,o){var n=this._getCharPosition(e),i=this._getCharPosition(t);return[new wt(n,i-n)]},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,o){for(var n=t.textContent.length,i=-1;t;)t=t.previousSibling,i++;return this._characterMapping.partDataToCharOffset(i,n,o)+1},e}(),Mt=function(){function e(e,t,o,n,i){if(this.domNode=e,this.input=t,this._characterMapping=o,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=i,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||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,o){if(null!==this._pixelOffsetCache){var n=this._readPixelOffset(e,o);if(-1===n)return null;var i=this._readPixelOffset(t,o);return-1===i?null:[new wt(n,i-n)]}return this._readVisibleRangesForRange(e,t,o)},e.prototype._readVisibleRangesForRange=function(e,t,o){if(e===t){var n=this._readPixelOffset(e,o);return-1===n?null:[new wt(n,0)]}return this._readRawVisibleRangesForRange(e,t,o)},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 o=this._pixelOffsetCache[e];if(-1!==o)return o;var n=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=n,n}return this._actualReadPixelOffset(e,t)},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length){var o=Ot.readHorizontalRanges(this._getReadingTarget(),0,0,0,0,t.clientRectDeltaLeft,t.endNode);return o&&0!==o.length?o[0].left:-1}if(e===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var n=this._characterMapping.charOffsetToPartData(e-1),i=Et.a.getPartIndex(n),r=Et.a.getCharIndex(n),s=Ot.readHorizontalRanges(this._getReadingTarget(),i,r,i,r,t.clientRectDeltaLeft,t.endNode);return s&&0!==s.length?s[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,o){if(1===e&&t===this._characterMapping.length)return[new wt(0,this.getWidth())];var n=this._characterMapping.charOffsetToPartData(e-1),i=Et.a.getPartIndex(n),r=Et.a.getCharIndex(n),s=this._characterMapping.charOffsetToPartData(t-1),a=Et.a.getPartIndex(s),l=Et.a.getCharIndex(s);return Ot.readHorizontalRanges(this._getReadingTarget(),i,r,a,l,o.clientRectDeltaLeft,o.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,o){for(var n=t.textContent.length,i=-1;t;)t=t.previousSibling,i++;return this._characterMapping.partDataToCharOffset(i,n,o)+1},e}(),xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rt(t,e),t.prototype._readVisibleRangesForRange=function(t,o,n){var i=e.prototype._readVisibleRangesForRange.call(this,t,o,n);if(!i||0===i.length||t===o||1===t&&o===this._characterMapping.length)return i;var r=this._readPixelOffset(o-1,n),s=this._readPixelOffset(o,n);if(-1!==r&&-1!==s){var a=r<=s,l=i[i.length-1];a&&l.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}(),jt=function(){function e(e,t,o){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=o,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){var o=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(o){var n=o.verticalOffset+o.height/2,i=e.model.getLineCount(),r=null,s=void 0,a=null;return o.afterLineNumber!==i&&(a=new m.a(o.afterLineNumber+1,1)),o.afterLineNumber>0&&(r=new m.a(o.afterLineNumber,e.model.getLineMaxColumn(o.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Yt._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))})),zt={isAfterLines:!0};function Kt(e){return{isAfterLines:!1,horizontalDistanceToText:e}}var Yt=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,o=Xe.collect(t,this._viewHelper.viewDomNode);return!(!Wt.isChildOfContentWidgets(o)&&!Wt.isChildOfOverflowingContentWidgets(o))||!!Wt.isChildOfOverlayWidgets(o)},e.prototype.createMouseTarget=function(t,o,n,i){var r=new jt(this._context,this._viewHelper,t),s=new Gt(r,o,n,i);try{return e._createMouseTarget(r,s,!1)}catch(e){return s.fulfill(ut.b.UNKNOWN)}},e._createMouseTarget=function(t,o,n){if(null===o.target){if(n)return o.fulfill(ut.b.UNKNOWN);var i=e._doHitTest(t,o);return i.position?e.createMouseTargetFromHitTestPosition(t,o,i.position.lineNumber,i.position.column):this._createMouseTarget(t,o.withTarget(i.hitTarget),!0)}var r=null;return(r=(r=(r=(r=(r=(r=(r=(r=(r=(r=r||e._hitTestContentWidget(t,o))||e._hitTestOverlayWidget(t,o))||e._hitTestMinimap(t,o))||e._hitTestScrollbarSlider(t,o))||e._hitTestViewZone(t,o))||e._hitTestMargin(t,o))||e._hitTestViewCursor(t,o))||e._hitTestTextArea(t,o))||e._hitTestViewLines(t,o,n))||e._hitTestScrollbar(t,o))||o.fulfill(ut.b.UNKNOWN)},e._hitTestContentWidget=function(e,t){if(Wt.isChildOfContentWidgets(t.targetPath)||Wt.isChildOfOverflowingContentWidgets(t.targetPath)){var o=e.findAttribute(t.target,"widgetId");return o?t.fulfill(ut.b.CONTENT_WIDGET,null,null,o):t.fulfill(ut.b.UNKNOWN)}return null},e._hitTestOverlayWidget=function(e,t){if(Wt.isChildOfOverlayWidgets(t.targetPath)){var o=e.findAttribute(t.target,"widgetId");return o?t.fulfill(ut.b.OVERLAY_WIDGET,null,null,o):t.fulfill(ut.b.UNKNOWN)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var o=0,n=(r=e.lastViewCursorsRenderData).length;oi.contentLeft+i.width)){var l=e.getVerticalOffsetForLineNumber(i.position.lineNumber);if(l<=a&&a<=l+i.height)return t.fulfill(ut.b.CONTENT_TEXT,i.position)}}}return null},e._hitTestViewZone=function(e,t){var o=e.getZoneAtCoord(t.mouseVerticalOffset);if(o){var n=t.isInContentArea?ut.b.CONTENT_VIEW_ZONE:ut.b.GUTTER_VIEW_ZONE;return t.fulfill(n,o.position,null,o)}return null},e._hitTestTextArea=function(e,t){return Wt.isTextArea(t.targetPath)?t.fulfill(ut.b.TEXTAREA):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var o=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=o.range.getStartPosition(),i=Math.abs(t.pos.x-t.editorPos.x),r={isAfterLines:o.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:i};return(i-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(ut.b.GUTTER_GLYPH_MARGIN,n,o.range,r):(i-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(ut.b.GUTTER_LINE_NUMBERS,n,o.range,r):(i-=e.layoutInfo.lineNumbersWidth,t.fulfill(ut.b.GUTTER_LINE_DECORATIONS,n,o.range,r))}return null},e._hitTestViewLines=function(t,o,n){if(!Wt.isChildOfViewLines(o.targetPath))return null;if(t.isAfterLines(o.mouseVerticalOffset)){var i=t.model.getLineCount(),r=t.model.getLineMaxColumn(i);return o.fulfill(ut.b.CONTENT_EMPTY,new m.a(i,r),void 0,zt)}if(n){if(Wt.isStrictChildOfViewLines(o.targetPath)){var s=t.getLineNumberAtVerticalOffset(o.mouseVerticalOffset);if(0===t.model.getLineLength(s)){var a=t.getLineWidth(s),l=Kt(o.mouseContentHorizontalOffset-a);return o.fulfill(ut.b.CONTENT_EMPTY,new m.a(s,1),void 0,l)}}return o.fulfill(ut.b.UNKNOWN)}var u=e._doHitTest(t,o);return u.position?e.createMouseTargetFromHitTestPosition(t,o,u.position.lineNumber,u.position.column):this._createMouseTarget(t,o.withTarget(u.hitTarget),!0)},e._hitTestMinimap=function(e,t){if(Wt.isChildOfMinimap(t.targetPath)){var o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(o);return t.fulfill(ut.b.SCROLLBAR,new m.a(o,n))}return null},e._hitTestScrollbarSlider=function(e,t){if(Wt.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var o=t.target.className;if(o&&/\b(slider|scrollbar)\b/.test(o)){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.model.getLineMaxColumn(n);return t.fulfill(ut.b.SCROLLBAR,new m.a(n,i))}}return null},e._hitTestScrollbar=function(e,t){if(Wt.isChildOfScrollableElement(t.targetPath)){var o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(o);return t.fulfill(ut.b.SCROLLBAR,new m.a(o,n))}return null},e.prototype.getMouseColumn=function(t,o){var n=this._context.configuration.editor.layoutInfo,i=this._context.viewLayout.getCurrentScrollLeft()+o.x-t.x-n.contentLeft;return e._getMouseColumn(i,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,o,n){var i=new m.a(o,n),r=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>r){if(je.g&&1===i.column){var s=Kt(t.mouseContentHorizontalOffset-r);return t.fulfill(ut.b.CONTENT_EMPTY,new m.a(o,e.model.getLineMaxColumn(o)),void 0,s)}var a=Kt(t.mouseContentHorizontalOffset-r);return t.fulfill(ut.b.CONTENT_EMPTY,i,void 0,a)}var l=e.visibleRangeForPosition2(o,n);if(!l)return t.fulfill(ut.b.UNKNOWN,i);var u=l.left;if(t.mouseContentHorizontalOffset===u)return t.fulfill(ut.b.CONTENT_TEXT,i);var c=[];if(c.push({offset:l.left,column:n}),n>1){var h=e.visibleRangeForPosition2(o,n-1);h&&c.push({offset:h.left,column:n-1})}if(n=t.editorPos.y+e.layoutInfo.height&&(i=t.editorPos.y+e.layoutInfo.height-1);var r=new gt(t.pos.x,i),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return s.position?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var o=document.caretRangeFromPoint(t.clientX,t.clientY);if(!o||!o.startContainer)return{position:null,hitTarget:null};var n,i=o.startContainer;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)===At.CLASS_NAME)return{position:e.getPositionFromDOMInfo(s,o.startOffset),hitTarget:null};n=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)===At.CLASS_NAME)return{position:e.getPositionFromDOMInfo(i,i.textContent.length),hitTarget:null};n=i}return{position:null,hitTarget:n}},e._doHitTestWithCaretPositionFromPoint=function(e,t){var o=document.caretPositionFromPoint(t.clientX,t.clientY);if(o.offsetNode.nodeType===o.offsetNode.TEXT_NODE){var n=o.offsetNode.parentNode,i=n?n.parentNode:null,r=i?i.parentNode:null;return(r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===At.CLASS_NAME?{position:e.getPositionFromDOMInfo(o.offsetNode.parentNode,o.offset),hitTarget:null}:{position:null,hitTarget:o.offsetNode.parentNode}}return{position:null,hitTarget:o.offsetNode}},e._doHitTestWithMoveToPoint=function(e,t){var o=null,n=null,i=document.body.createTextRange();try{i.moveToPoint(t.clientX,t.clientY)}catch(e){return{position:null,hitTarget:null}}i.collapse(!0);var r=i?i.parentElement():null,s=r?r.parentNode:null,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:"")===At.CLASS_NAME){var l=i.duplicate();l.moveToElementText(r),l.setEndPoint("EndToStart",i),o=e.getPositionFromDOMInfo(r,l.text.length),l.moveToElementText(e.viewDomNode)}else n=r;return i.moveToElementText(e.viewDomNode),{position:o,hitTarget:n}},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}(),Xt=o(17),qt=o(96),$t=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();function Jt(e){return function(t,o){var n=!1;return e&&(n=e.mouseTargetIsWidget(o)),n||o.preventDefault(),o}}var Zt=function(e){function t(o,n,i){var s=e.call(this)||this;s._isFocused=!1,s._context=o,s.viewController=n,s.viewHelper=i,s.mouseTargetFactory=new Yt(s._context,i),s._mouseDownOperation=s._register(new Qt(s._context,s.viewController,s.viewHelper,(function(e,t){return s._createMouseTarget(e,t)}),(function(e){return s._getMouseColumn(e)}))),s._asyncFocus=s._register(new Xt.c((function(){return s.viewHelper.focusTextArea()}),0)),s.lastMouseLeaveTime=-1;var a=new yt(s.viewHelper.viewDomNode);s._register(a.onContextMenu(s.viewHelper.viewDomNode,(function(e){return s._onContextMenu(e,!0)}))),s._register(a.onMouseMoveThrottled(s.viewHelper.viewDomNode,(function(e){return s._onMouseMove(e)}),Jt(s.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),s._register(a.onMouseUp(s.viewHelper.viewDomNode,(function(e){return s._onMouseUp(e)}))),s._register(a.onMouseLeave(s.viewHelper.viewDomNode,(function(e){return s._onMouseLeave(e)}))),s._register(a.onMouseDown(s.viewHelper.viewDomNode,(function(e){return s._onMouseDown(e)})));var l=function(e){if(s._context.configuration.editor.viewInfo.mouseWheelZoom){var t=new ct.c(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var o=qt.a.getZoomLevel(),n=t.deltaY>0?1:-1;qt.a.setZoomLevel(o+n),t.preventDefault(),t.stopPropagation()}}};return s._register(r.g(s.viewHelper.viewDomNode,"mousewheel",l,!0)),s._register(r.g(s.viewHelper.viewDomNode,"DOMMouseScroll",l,!0)),s._context.addEventHandler(s),s}return $t(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 o=new pt(e,t).toPageCoordinates(),n=mt(this.viewHelper.viewDomNode);if(o.yn.y+n.height||o.xn.x+n.width)return null;var i=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(i,n,o,null)},t.prototype._createMouseTarget=function(e,t){var o=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(o,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,l;r=n.getCurrentScrollTop()+(e.posy-t.y);if(a=jt.getZoneAtCoord(this._context,r))if(l=this._helpPositionJumpOverViewZone(a))return new Vt(null,ut.b.OUTSIDE_EDITOR,i,l);var u=n.getLineNumberAtVerticalOffset(r);return new Vt(null,ut.b.OUTSIDE_EDITOR,i,new m.a(u,o.getLineMaxColumn(u)))}var c=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new Vt(null,ut.b.OUTSIDE_EDITOR,i,new m.a(c,o.getLineMaxColumn(c))):null},t.prototype._findMousePosition=function(e,t){var o=this._getPositionOutsideEditor(e);if(o)return o;var n=this._createMouseTarget(e,t);if(!n.position)return null;if(n.type===ut.b.CONTENT_VIEW_ZONE||n.type===ut.b.GUTTER_VIEW_ZONE){var i=this._helpPositionJumpOverViewZone(n.detail);if(i)return new Vt(n.element,n.type,n.mouseColumn,i,null,n.detail)}return n},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new m.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),o=e.positionBefore,n=e.positionAfter;return o&&n?o.isBefore(t)?o:n:null},t.prototype._dispatchMouse=function(e,t){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}(l.a),eo=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,o){var n=(new Date).getTime();n-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=n,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(o)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=o,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}(),to=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();function oo(e,t){var o={translationY:t.translationY,translationX:t.translationX};return e&&(o.translationY+=e.translationY,o.translationX+=e.translationX),o}var no=function(e){function t(t,o,n){var i=e.call(this,t,o,n)||this;return i.viewHelper.linesContentDomNode.style.msTouchAction="none",i.viewHelper.linesContentDomNode.style.msContentZooming="none",i._installGestureHandlerTimeout=window.setTimeout((function(){if(i._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=i.viewHelper.linesContentDomNode,t.target=i.viewHelper.linesContentDomNode,i.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",(function(o){var n=o.pointerType;n!==(o.MSPOINTER_TYPE_MOUSE||"mouse")?n===(o.MSPOINTER_TYPE_TOUCH||"touch")?(i._lastPointerType="touch",e.addPointer(o.pointerId)):(i._lastPointerType="pen",t.addPointer(o.pointerId)):i._lastPointerType="mouse"})),i._register(r.i(i.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return i._onGestureChange(e)}),oo)),i._register(r.g(i.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return i._onCaptureGestureTap(e)}),!0))}}),100),i._lastPointerType="mouse",i}return to(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,o=new _t(e,this.viewHelper.viewDomNode),n=this._createMouseTarget(o,!1);n.position&&this.viewController.moveTo(n.position),o.browserEvent.fromElement?(o.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}(Zt),io=function(e){function t(t,o,n){var i=e.call(this,t,o,n)||this;return i.viewHelper.linesContentDomNode.style.touchAction="none",i._installGestureHandlerTimeout=window.setTimeout((function(){if(i._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=i.viewHelper.linesContentDomNode,t.target=i.viewHelper.linesContentDomNode,i.viewHelper.linesContentDomNode.addEventListener("pointerdown",(function(o){var n=o.pointerType;"mouse"!==n?"touch"===n?(i._lastPointerType="touch",e.addPointer(o.pointerId)):(i._lastPointerType="pen",t.addPointer(o.pointerId)):i._lastPointerType="mouse"})),i._register(r.i(i.viewHelper.linesContentDomNode,"MSGestureChange",(function(e){return i._onGestureChange(e)}),oo)),i._register(r.g(i.viewHelper.linesContentDomNode,"MSGestureTap",(function(e){return i._onCaptureGestureTap(e)}),!0))}}),100),i._lastPointerType="mouse",i}return to(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,o=new _t(e,this.viewHelper.viewDomNode),n=this._createMouseTarget(o,!1);n.position&&this.viewController.moveTo(n.position),o.browserEvent.fromElement?(o.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}(Zt),ro=function(e){function t(t,o,n){var i=e.call(this,t,o,n)||this;return lt.b.addTarget(i.viewHelper.linesContentDomNode),i._register(r.g(i.viewHelper.linesContentDomNode,lt.a.Tap,(function(e){return i.onTap(e)}))),i._register(r.g(i.viewHelper.linesContentDomNode,lt.a.Change,(function(e){return i.onChange(e)}))),i._register(r.g(i.viewHelper.linesContentDomNode,lt.a.Contextmenu,(function(e){return i._onContextMenu(new _t(e,i.viewHelper.viewDomNode),!1)}))),i}return to(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 _t(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}(Zt),so=function(){function e(e,t,o){window.navigator.msPointerEnabled?this.handler=new no(e,t,o):window.TouchEvent?this.handler=new ro(e,t,o):window.navigator.pointerEnabled||window.PointerEvent?this.handler=new io(e,t,o):this.handler=new Zt(e,t,o)}return e.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},e.prototype.dispose=function(){this.handler.dispose()},e}(),ao=o(72),lo=function(){function e(e,t,o,n,i){this.configuration=e,this.viewModel=t,this._execCoreEditorCommandFunc=o,this.outgoingEvents=n,this.commandDelegate=i}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this._execCoreEditorCommandFunc(e,t)},e.prototype.paste=function(e,t,o,n){this.commandDelegate.paste(e,t,o,n)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,o){this.commandDelegate.replacePreviousChar(e,t,o)},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._execCoreEditorCommandFunc(ao.CoreNavigationCommands.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(ao.CoreNavigationCommands.MoveTo,this._usualArgs(e))},e.prototype.moveToSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.MoveToSelect,this._usualArgs(e))},e.prototype.columnSelect=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(ao.CoreNavigationCommands.ColumnSelect,{position:this.convertViewToModelPosition(e),viewPosition:e,mouseColumn:t})},e.prototype.createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(ao.CoreNavigationCommands.CreateCursor,{position:this.convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype.lastCursorMoveToSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype.wordSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.WordSelect,this._usualArgs(e))},e.prototype.wordSelectDrag=function(e){this._execMouseCommand(ao.CoreNavigationCommands.WordSelectDrag,this._usualArgs(e))},e.prototype.lastCursorWordSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorWordSelect,this._usualArgs(e))},e.prototype.lineSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LineSelect,this._usualArgs(e))},e.prototype.lineSelectDrag=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LineSelectDrag,this._usualArgs(e))},e.prototype.lastCursorLineSelect=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorLineSelect,this._usualArgs(e))},e.prototype.lastCursorLineSelectDrag=function(e){this._execMouseCommand(ao.CoreNavigationCommands.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype.selectAll=function(){this._execMouseCommand(ao.CoreNavigationCommands.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}(),uo=function(){function e(e){this._eventHandlerGateKeeper=e,this._eventHandlers=[],this._eventQueue=null,this._isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){for(var t=0,o=this._eventHandlers.length;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 o=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;for(var r=0,s=0,a=o;a<=n;a++){var l=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=l,s=1):s++)}if(e=o&&r<=n&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),i=!0);return i},e.prototype.onLinesInserted=function(e,t){if(0===this.getCount())return null;var o=t-e+1,n=this.getStartLineNumber(),i=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=o,null;if(e>i)return null;if(o+e>i)return this._lines.splice(e-this._rendLineNumberStart,i-e+1);for(var r=[],s=0;so))for(var a=Math.max(t,s.fromLineNumber),l=Math.min(o,s.toLineNumber),u=a;u<=l;u++){var c=u-this._rendLineNumberStart;this._lines[c].onTokensChanged(),n=!0}}return n},e}(),go=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new ho((function(){return t._host.createVisibleLine()}))}return e.prototype._createDomNode=function(){var e=Object(He.b)(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 o=0,n=t.length;ot)(l=t)<=(s=Math.min(o,i.rendLineNumberStart-1))&&(this._insertLinesBefore(i,l,s,n,t),i.linesLength+=s-l+1);else if(i.rendLineNumberStart0&&(this._removeLinesBefore(i,a),i.linesLength-=a)}if(i.rendLineNumberStart=t,i.rendLineNumberStart+i.linesLength-1o){var s,a,l=Math.max(0,o-i.rendLineNumberStart+1);(a=(s=i.linesLength-1)-l+1)>0&&(this._removeLinesAfter(i,a),i.linesLength-=a)}return this._finishRendering(i,!1,n),i},e.prototype._renderUntouchedLines=function(e,t,o,n,i){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=o;a++){var l=r+a;s[a].layoutLine(l,n[l-i])}},e.prototype._insertLinesBefore=function(e,t,o,n,i){for(var r=[],s=0,a=t;a<=o;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var o=0;o=0;s--){var a=e.lines[s];n[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,o){var n=document.createElement("div");n.innerHTML=t;for(var i=0;i'),n.appendASCIIString(i),n.appendASCIIString(""),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}(),yo=function(e){function t(t){var o=e.call(this,t)||this;return o._contentWidth=o._context.configuration.editor.layoutInfo.contentWidth,o.domNode.setHeight(0),o}return fo(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}(mo),vo=function(e){function t(t){var o=e.call(this,t)||this;return o._contentLeft=o._context.configuration.editor.layoutInfo.contentLeft,o.domNode.setClassName("margin-view-overlays"),o.domNode.setWidth(1),g.a.applyFontInfo(o.domNode,o._context.configuration.editor.fontInfo),o}return fo(t,e),t.prototype.onConfigurationChanged=function(t){var o=!1;return t.fontInfo&&(g.a.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),o=!0),t.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,o=!0),e.prototype.onConfigurationChanged.call(this,t)||o},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 o=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(o),this.domNode.setWidth(this._contentLeft)},t}(mo),bo=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Eo=function(e,t){this.top=e,this.left=t},Co=function(e){function t(t,o){var n=e.call(this,t)||this;return n._viewDomNode=o,n._widgets={},n.domNode=Object(He.b)(document.createElement("div")),Xe.write(n.domNode,1),n.domNode.setClassName("contentWidgets"),n.domNode.setPosition("absolute"),n.domNode.setTop(0),n.overflowingContentWidgetsDomNode=Object(He.b)(document.createElement("div")),Xe.write(n.overflowingContentWidgetsDomNode,2),n.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets"),n}return bo(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null,this.domNode=null},t.prototype.onConfigurationChanged=function(e){for(var t=Object.keys(this._widgets),o=0,n=t.length;o=o,u=s,c=n.viewportHeight-s>=o,h=e.left;return h+t>n.scrollLeft+n.viewportWidth&&(h=n.scrollLeft+n.viewportWidth-t),hthis._contentWidth)return null;var s,a=e.top-o,l=e.top+this._lineHeight,u=i+this._contentLeft,c=r.u(this._viewDomNode.domNode),h=c.top+a-r.e.scrollY,d=c.top+l-r.e.scrollY,g=c.left+u-r.e.scrollX,p=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=h>=22,m=d+o<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;g+t+20>p&&(g-=s=g-(p-t-20),u-=s);g<0&&(g-=s=g,u-=s);return this._fixedOverflowWidgets&&(a=h,l=d,u=g),{aboveTop:a,fitsAbove:f,belowTop:l,fitsBelow:m,left:u}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new Eo(e.top,e.left+this._contentLeft)},e.prototype._getTopLeft=function(e){if(!this._viewPosition)return null;var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return null;var o=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop;return new Eo(o,t.left)},e.prototype._prepareRenderWidget=function(e,t){var o=this;if(!e)return null;for(var n=null,i=function(){if(!n){if(-1===o._cachedDomNodeClientWidth||-1===o._cachedDomNodeClientHeight){var i=o.domNode.domNode;o._cachedDomNodeClientWidth=i.clientWidth,o._cachedDomNodeClientHeight=i.clientHeight}n=o.allowEditorOverflow?o._layoutBoxInPage(e,o._cachedDomNodeClientWidth,o._cachedDomNodeClientHeight,t):o._layoutBoxInViewport(e,o._cachedDomNodeClientWidth,o._cachedDomNodeClientHeight,t)}},r=1;r<=2;r++)for(var s=0;se.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){var t=this._getTopLeft(e);this._renderData=this._prepareRenderWidget(t,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}(),To=(o(453),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),wo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._renderLineHighlight=o._context.configuration.editor.viewInfo.renderLineHighlight,o._selectionIsEmpty=!0,o._primaryCursorLineNumber=1,o._scrollWidth=0,o._contentWidth=o._context.configuration.editor.layoutInfo.contentWidth,o._context.addEventHandler(o),o}return To(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,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,o=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==o&&(this._primaryCursorLineNumber=o,t=!0);var n=e.selections[0].isEmpty();return this._selectionIsEmpty!==n?(this._selectionIsEmpty=n,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}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.o);if(o&&t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+o+"; }"),!o||o.isTransparent()||e.defines(Je.p)){var n=e.getColor(Je.p);n&&(t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+n+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"))}}));o(454);var ko=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Oo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._renderLineHighlight=o._context.configuration.editor.viewInfo.renderLineHighlight,o._selectionIsEmpty=!0,o._primaryCursorLineNumber=1,o._contentLeft=o._context.configuration.editor.layoutInfo.contentLeft,o._context.addEventHandler(o),o}return ko(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,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,o=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==o&&(this._primaryCursorLineNumber=o,t=!0);var n=e.selections[0].isEmpty();return this._selectionIsEmpty!==n?(this._selectionIsEmpty=n,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 o="current-line";if(this._shouldShowCurrentLine())o="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}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.o);if(o)t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+o+"; border: none; }");else{var n=e.getColor(Je.p);n&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+n+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")}}));o(455);var Ro=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),No=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._typicalHalfwidthCharacterWidth=o._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,o._renderResult=null,o._context.addEventHandler(o),o}return Ro(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,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(),o=[],n=0,i=0,r=t.length;it.options.zIndex)return 1;var o=e.options.className,n=t.options.className;return on?1:_.a.compareRangesUsingStarts(e.range,t.range)}));for(var a=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber,u=[],c=a;c<=l;c++){u[c-a]=""}this._renderWholeLineDecorations(e,o,u),this._renderNormalDecorations(e,o,u),this._renderResult=u},t.prototype._renderWholeLineDecorations=function(e,t,o){for(var n=String(this._lineHeight),i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s',c=Math.max(l.range.startLineNumber,i),h=Math.min(l.range.endLineNumber,r),d=c;d<=h;d++){o[d-i]+=u}}},t.prototype._renderNormalDecorations=function(e,t,o){for(var n=String(this._lineHeight),i=e.visibleRange.startLineNumber,r=null,s=!1,a=null,l=0,u=t.length;l';s[h]+=m}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},t}(Qe),Lo=(o(456),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Io=function(e,t,o){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(o)},Do=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Lo(t,e),t.prototype._render=function(e,t,o){for(var n=[],i=e;i<=t;i++){n[i-e]=[]}if(0===o.length)return n;o.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<=o;a++){var l=a-t,u=n[l];0===u.length?s[l]="":s[l]='
    =this._renderResult.length?"":this._renderResult[o]},t}(Do),Po=(o(457),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Mo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._primaryLineNumber=0,o._lineHeight=o._context.configuration.editor.lineHeight,o._spaceWidth=o._context.configuration.editor.fontInfo.spaceWidth,o._enabled=o._context.configuration.editor.viewInfo.renderIndentGuides,o._activeIndentEnabled=o._context.configuration.editor.viewInfo.highlightActiveIndentGuide,o._renderResult=null,o._context.addEventHandler(o),o}return Po(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,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],o=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==o&&(this._primaryLineNumber=o,!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,o=e.visibleRange.endLineNumber,n=this._context.model.getTabSize()*this._spaceWidth,i=e.scrollWidth,r=this._lineHeight,s=n,a=this._context.model.getLinesIndentGuides(t,o),l=0,u=0,c=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var h=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,o);l=h.startLineNumber,u=h.endLineNumber,c=h.indent}for(var d=[],g=t;g<=o;g++){for(var p=l<=g&&g<=u,f=g-t,_=a[f],y="",v=e.visibleRangeForPosition(new m.a(g,1)),b=v?v.left:0,E=1;E<=_;E++){if(y+='
    ',(b+=n)>i)break}d[f]=y}this._renderResult=d}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},t}(Qe);Object(Fe.e)((function(e,t){var o=e.getColor(Je.l);o&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+o+" inset; }");var n=e.getColor(Je.a)||o;n&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+n+" inset; }")}));o(458);var xo=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Bo=function(){function e(){this._currentVisibleRange=new _.a(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),Fo=function(e,t,o,n,i,r){this.lineNumber=e,this.startColumn=t,this.endColumn=o,this.startScrollTop=n,this.stopScrollTop=i,this.scrollType=r},Ho=function(e){function t(t,o){var n=e.call(this,t)||this;n._linesContent=o,n._textRangeRestingSpot=document.createElement("div"),n._visibleLines=new go(n),n.domNode=n._visibleLines.domNode;var i=n._context.configuration;return n._lineHeight=i.editor.lineHeight,n._typicalHalfwidthCharacterWidth=i.editor.fontInfo.typicalHalfwidthCharacterWidth,n._isViewportWrapping=i.editor.wrappingInfo.isViewportWrapping,n._revealHorizontalRightPadding=i.editor.viewInfo.revealHorizontalRightPadding,n._canUseLayerHinting=i.editor.canUseLayerHinting,n._viewLineOptions=new Dt(i,n._context.theme.type),Xe.write(n.domNode,7),n.domNode.setClassName("view-lines"),g.a.applyFontInfo(n.domNode,i.editor.fontInfo),n._maxLineWidth=0,n._asyncUpdateLineWidths=new Xt.c((function(){n._updateLineWidthsSlow()}),200),n._lastRenderedData=new Bo,n._horizontalRevealRequest=null,n}return xo(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 At(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&&g.a.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 Dt(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var o=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=o;i<=n;i++){this._visibleLines.getVisibleLine(i).onOptionsChanged(this._viewLineOptions)}return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber(),n=!1,i=t;i<=o;i++)n=this._visibleLines.getVisibleLine(i).onSelectionChanged()||n;return n},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber(),n=t;n<=o;n++)this._visibleLines.getVisibleLine(n).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),o=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?o={scrollTop:o.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new Fo(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),o.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-o.scrollTop);return 0===e.scrollType&&n>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(o):this._context.viewLayout.setScrollPositionNow(o),!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),o=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopo)&&(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 o=this._getViewLineDomNode(e);if(null===o)return null;var n=this._getLineNumberFor(o);if(-1===n)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new m.a(n,1);var i=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;var s=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t),a=this._context.model.getLineMinColumn(n);return so?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var o=e.endLineNumber;if(!(e=_.a.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange())))return null;var n,i=[],r=0,s=new It(this.domNode.domNode,this._textRangeRestingSpot);t&&(n=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new m.a(e.startLineNumber,1)).lineNumber);for(var a=this._visibleLines.getStartLineNumber(),l=this._visibleLines.getEndLineNumber(),u=e.startLineNumber;u<=e.endLineNumber;u++)if(!(ul)){var c=u===e.startLineNumber?e.startColumn:1,h=u===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(u),d=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(c,h,s);if(d&&0!==d.length){if(t&&ui)){var s=r===e.startLineNumber?e.startColumn:1,a=r===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(r),l=this._visibleLines.getVisibleLine(r).getVisibleRangesForRange(s,a,o);l&&0!==l.length&&(t=t.concat(l))}return 0===t.length?null:t},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(),o=this._visibleLines.getEndLineNumber(),n=1,i=!0,r=t;r<=o;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?n=Math.max(n,s.getWidth()):i=!1}return i&&1===t&&o===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),i},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,o=this._horizontalRevealRequest.startColumn,n=this._horizontalRevealRequest.endColumn,i=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,o,n);this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===i?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=d.left+d.width)}return i=c,u=Math.max(0,u-t.HORIZONTAL_EXTRA_PX),c+=this._revealHorizontalRightPadding,{scrollLeft:this._computeMinimumScrolling(s,a,u,c),maxHorizontalOffset:i}},t.prototype._computeMinimumScrolling=function(e,t,o,n,i,r){i=!!i,r=!!r;var s=(t|=0)-(e|=0);return(n|=0)-(o|=0)t?Math.max(0,n-s):e:o},t.HORIZONTAL_EXTRA_PX=30,t}(Ye),Uo=(o(459),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Vo=function(e){function t(t){var o=e.call(this)||this;return o._context=t,o._decorationsLeft=o._context.configuration.editor.layoutInfo.decorationsLeft,o._decorationsWidth=o._context.configuration.editor.layoutInfo.decorationsWidth,o._renderResult=null,o._context.addEventHandler(o),o}return Uo(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,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(),o=[],n=0,i=0,r=t.length;i
    ',r=[],s=t;s<=o;s++){for(var a=s-t,l=n[a],u="",c=0,h=l.length;c';i[s]=l}this._renderResult=i},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(Do),Go=(o(461),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),zo=function(e){function t(t){var o=e.call(this,t)||this;return o._widgets={},o._verticalScrollbarWidth=o._context.configuration.editor.layoutInfo.verticalScrollbarWidth,o._minimapWidth=o._context.configuration.editor.layoutInfo.minimapWidth,o._horizontalScrollbarHeight=o._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,o._editorHeight=o._context.configuration.editor.layoutInfo.height,o._editorWidth=o._context.configuration.editor.layoutInfo.width,o._domNode=Object(He.b)(document.createElement("div")),Xe.write(o._domNode,4),o._domNode.setClassName("overlayWidgets"),o}return Go(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null},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=Object(He.b)(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 o=this._widgets[e.getId()];return o.preference!==t&&(o.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var o=this._widgets[t].domNode.domNode;delete this._widgets[t],o.parentNode.removeChild(o),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(e.preference===ut.c.TOP_RIGHT_CORNER)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===ut.c.BOTTOM_RIGHT_CORNER){var o=t.domNode.clientHeight;t.setTop(this._editorHeight-o-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===ut.c.TOP_CENTER&&(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),o=0,n=t.length;o=3){var i,r,s,a=n-(i=Math.floor(n/3))-(r=Math.floor(n/3)),l=(s=e)+i;return[[0,s,l,s,s+i+a,s,l,s],[0,i,a,i+a,r,i+a+r,a+r,i+a+r]]}if(2===o)return[[0,s=e,s,s,s+(i=Math.floor(n/2)),s,s,s],[0,i,i,i,r=n-i,i+r,i+r,i+r]];return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]},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}(),Xo=function(e){function t(t){var o=e.call(this,t)||this;return o._domNode=Object(He.b)(document.createElement("canvas")),o._domNode.setClassName("decorationsOverviewRuler"),o._domNode.setPosition("absolute"),o._domNode.setLayerHinting(!0),o._domNode.setAttribute("aria-hidden","true"),o._settings=null,o._updateSettings(!1),o._tokensColorTrackerListener=J.y.onDidChange((function(e){e.changedColorMap&&o._updateSettings(!0)})),o._cursorPositions=[],o}return Ko(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new Yo(this._context.configuration,this._context.theme);return(null===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,o=e.selections.length;tt&&(N=t-a),T=N-a,I=N+a;T>y+1||E!==m?(0!==v&&l.fillRect(u[m],_,c[m],y-_),m=E,_=T,y=I):I>y&&(y=I)}l.fillRect(u[m],_,c[m],y-_)}if(!this._settings.hideCursor){var w=2*this._settings.pixelRatio|0,k=w/2|0,O=this._settings.x[7],R=this._settings.w[7];l.fillStyle=this._settings.cursorColor;for(_=-100,y=-100,v=0,b=this._cursorPositions.length;vt&&(N=t-k);var I=(T=N-k)+w;T>y+1?(0!==v&&l.fillRect(O,_,R,y-_),_=T,y=I):I>y&&(y=I)}l.fillRect(O,_,R,y-_)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())},t}(Ye),qo=o(145),$o=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Jo=function(e){function t(t,o){var n=e.call(this)||this;return n._context=t,n._domNode=Object(He.b)(document.createElement("canvas")),n._domNode.setClassName(o),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._zoneManager=new qo.b((function(e){return n._context.viewLayout.getVerticalOffsetForLineNumber(e)})),n._zoneManager.setDOMWidth(0),n._zoneManager.setDOMHeight(0),n._zoneManager.setOuterHeight(n._context.viewLayout.getScrollHeight()),n._zoneManager.setLineHeight(n._context.configuration.editor.lineHeight),n._zoneManager.setPixelRatio(n._context.configuration.editor.pixelRatio),n._context.addEventHandler(n),n}return $o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._zoneManager=null,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(),o=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),i=this._domNode.domNode.getContext("2d");return i.clearRect(0,0,e,t),o.length>0&&this._renderOneLane(i,o,n,e),!0},t.prototype._renderOneLane=function(e,t,o,n){for(var i=0,r=0,s=0,a=0,l=t.length;a=h?s=Math.max(s,d):(e.fillRect(0,r,n,s-r),r=h,s=d)}e.fillRect(0,r,n,s-r)},t}(Ve),Zo=(o(462),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),Qo=function(e){function t(t){var o=e.call(this,t)||this;return o.domNode=Object(He.b)(document.createElement("div")),o.domNode.setAttribute("role","presentation"),o.domNode.setAttribute("aria-hidden","true"),o.domNode.setClassName("view-rulers"),o._renderedRulers=[],o._rulers=o._context.configuration.editor.viewInfo.rulers,o._typicalHalfwidthCharacterWidth=o._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,o}return Zo(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=Object(He.b)(document.createElement("div"))).setClassName("view-ruler"),r.setWidth(o),this.domNode.appendChild(r),this._renderedRulers.push(r),n--}else for(var i=e-t;i>0;){var r=this._renderedRulers.pop();this.domNode.removeChild(r),i--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,o=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}(Ye);Object(Fe.e)((function(e,t){var o=e.getColor(en.lb);o&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+o+" 0 6px 6px -6px inset; }")}));o(464);var nn=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),rn=function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null},sn=function(e,t){this.lineNumber=e,this.ranges=t};function an(e){return new rn(e)}function ln(e){return new sn(e.lineNumber,e.ranges.map(an))}var un=je.h,cn=function(e){function t(t){var o=e.call(this)||this;return o._previousFrameVisibleRangesWithStyle=[],o._context=t,o._lineHeight=o._context.configuration.editor.lineHeight,o._roundedSelection=o._context.configuration.editor.viewInfo.roundedSelection,o._typicalHalfwidthCharacterWidth=o._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,o._selections=[],o._renderResult=null,o._context.addEventHandler(o),o}return nn(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._selections=null,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,o=e.length;t1)return!0}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,o){var n=this._typicalHalfwidthCharacterWidth/4,i=null,r=null;if(o&&o.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(var a=0;!i&&a=0;a--)o[a].lineNumber===l&&(r=o[a].ranges[0]);i&&!i.startStyle&&(i=null),r&&!r.startStyle&&(r=null)}a=0;for(var u=t.length;a0){var f=t[a-1].ranges[0].left,m=t[a-1].ranges[0].left+t[a-1].ranges[0].width;hn(h-f)f&&(g.top=1),hn(d-m)'},t.prototype._actualRenderOneSelection=function(e,o,n,i){for(var r=i.length>0&&i[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=i.length>0?i[0].lineNumber:0,u=i.length>0?i[i.length-1].lineNumber:0,c=0,h=i.length;c1,u)}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t},t.prototype.render=function(e,t){if(!this._renderResult)return"";var o=t-e;return o<0||o>=this._renderResult.length?"":this._renderResult[o]},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}(Qe);function hn(e){return e<0?-e:e}Object(Fe.e)((function(e,t){var o=e.getColor(en.z);o&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+o+"; }");var n=e.getColor(en.y);n&&t.addRule(".monaco-editor .selected-text { background-color: "+n+"; }");var i=e.getColor(en.A);i&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+i+"; }")}));o(465);var dn=function(e,t,o,n,i,r){this.top=e,this.left=t,this.width=o,this.height=n,this.textContent=i,this.textContentClassName=r},gn=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=Object(He.b)(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),g.a.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new m.a(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&&(g.a.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="",o="";if(this._cursorStyle===be.i.Line||this._cursorStyle===be.i.LineThin){var n,i=e.visibleRangeForPosition(this._position);if(!i)return null;if(this._cursorStyle===be.i.Line){if((n=r.m(this._lineCursorWidth>0?this._lineCursorWidth:2))>2)t=this._context.model.getLineContent(this._position.lineNumber).charAt(this._position.column-1)}else n=r.m(1);var s=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new dn(s,i.left,n,this._lineHeight,t,o)}var a=e.linesVisibleRangesForRange(new _.a(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 l=a[0].ranges[0],u=l.width<1?this._typicalHalfwidthCharacterWidth:l.width;if(this._cursorStyle===be.i.Block){var c=this._context.model.getViewLineData(this._position.lineNumber);t=c.content.charAt(this._position.column-1),p.isHighSurrogate(c.content.charCodeAt(this._position.column-1))&&(t+=c.content.charAt(this._position.column));var h=c.tokens.findTokenIndexAtOffset(this._position.column-1);o=c.tokens.getClassName(h)}var d=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,g=this._lineHeight;return this._cursorStyle!==be.i.Underline&&this._cursorStyle!==be.i.UnderlineThin||(d+=this._lineHeight-2,g=2),new dn(d,l.left,u,g,t,o)},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}(),pn=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),fn=function(e){function t(t){var o=e.call(this,t)||this;return o._readOnly=o._context.configuration.editor.readOnly,o._cursorBlinking=o._context.configuration.editor.viewInfo.cursorBlinking,o._cursorStyle=o._context.configuration.editor.viewInfo.cursorStyle,o._selectionIsEmpty=!0,o._primaryCursor=new gn(o._context),o._secondaryCursors=[],o._renderData=[],o._domNode=Object(He.b)(document.createElement("div")),o._domNode.setAttribute("role","presentation"),o._domNode.setAttribute("aria-hidden","true"),o._updateDomClassName(),o._domNode.appendChild(o._primaryCursor.getDomNode()),o._startCursorBlinkAnimation=new Xt.f,o._cursorFlatBlinkInterval=new Xt.b,o._blinkingEnabled=!1,o._editorHasFocus=!1,o._updateBlinking(),o}return pn(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,o=this._secondaryCursors.length;tt.length){var r=this._secondaryCursors.length-t.length;for(n=0;n=s)return new e(a,l,y,v,c,b=1,s);var b=Math.max(1,Math.floor(o-v*d/g));return u&&u.scrollHeight===l&&(u.scrollTop>a&&(b=Math.min(b,u.startLineNumber)),u.scrollTopPn)o._context.viewLayout.setScrollPositionNow({scrollTop:i.scrollTop});else{var s=e.posy-t;o._context.viewLayout.setScrollPositionNow({scrollTop:i.getDesiredScrollTopFromDelta(s)})}}),(function(){o._slider.toggleClassName("active",!1)}))}})),o}return In(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 Hn(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 Mn(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=xn.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 o=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,n=Math.min(this._options.minimapWidth,Math.round(o*An(this._options.renderMinimap)/this._options.pixelRatio));this._sliderHorizontal.setLeft(n),this._sliderHorizontal.setWidth(this._options.minimapWidth-n),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this._lastRenderData=this.renderLines(t)},t.prototype.renderLines=function(e){var o=this._options.renderMinimap,n=e.startLineNumber,i=e.endLineNumber,r=Dn(o);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var s=this._lastRenderData._get();return new Fn(e,s.imageData,s.lines)}for(var a=this._getBuffer(),l=t._renderUntouchedLines(a,n,i,r,this._lastRenderData),u=l[0],c=l[1],h=l[2],d=this._context.model.getMinimapLinesRenderingData(n,i,h),g=d.tabSize,p=this._tokensColorTracker.getColor(2),f=this._tokensColorTracker.backgroundIsLight(),m=0,_=[],y=0,v=i-n+1;y=0&&wd)return;var C=u.charCodeAt(f);if(9===C){var S=a-(f+m)%a;m+=S-1,g+=S*h}else if(32===C)g+=h;else for(var T=p.isFullWidthCharacter(C)?2:1,w=0;wd)return}},t}(Ye);Object(Fe.e)((function(e,t){var o=e.getColor(en.nb);if(o){var n=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+n+"; }")}var i=e.getColor(en.ob);if(i){var r=i.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(en.mb);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 l=e.getColor(en.lb);l&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+l+" -6px 0 6px -6px inset; }")}));var Vn=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Wn=function(e){function t(t,o,n,i,r,s){var a=e.call(this)||this;a._cursor=r,a._renderAnimationFrame=null,a.outgoingEvents=new bn(i);var l=new lo(o,i,s,a.outgoingEvents,t);return a.eventDispatcher=new uo((function(e){return a._renderOnce(e)})),a.eventDispatcher.addEventHandler(a),a._context=new yn(o,n.getTheme(),i,a.eventDispatcher),a._register(n.onThemeChange((function(e){a._context.theme=e,a.eventDispatcher.emit(new H),a.render(!0,!1)}))),a.viewParts=[],a._textAreaHandler=new at(a._context,l,a.createTextAreaHandlerHelper()),a.viewParts.push(a._textAreaHandler),a.createViewParts(),a._setLayout(),a.pointerHandler=new so(a._context,l,a.createPointerHandlerHelper()),a._register(i.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a._register(a._cursor.addEventListener((function(e){a.eventDispatcher.emitMany(e)}))),a}return Vn(t,e),t.prototype.createViewParts=function(){this.linesContent=Object(He.b)(document.createElement("div")),this.linesContent.setClassName("lines-content monaco-editor-background"),this.linesContent.setPosition("absolute"),this.domNode=Object(He.b)(document.createElement("div")),this.domNode.setClassName(this.getEditorClassName()),this.overflowGuardContainer=Object(He.b)(document.createElement("div")),Xe.write(this.overflowGuardContainer,3),this.overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new wn(this._context,this.linesContent,this.domNode,this.overflowGuardContainer),this.viewParts.push(this._scrollbar),this.viewLines=new Ho(this._context,this.linesContent),this.viewZones=new _n(this._context),this.viewParts.push(this.viewZones);var e=new Xo(this._context);this.viewParts.push(e);var t=new on(this._context);this.viewParts.push(t);var o=new yo(this._context);this.viewParts.push(o),o.addDynamicOverlay(new wo(this._context)),o.addDynamicOverlay(new cn(this._context)),o.addDynamicOverlay(new Mo(this._context)),o.addDynamicOverlay(new No(this._context));var n=new vo(this._context);this.viewParts.push(n),n.addDynamicOverlay(new Oo(this._context)),n.addDynamicOverlay(new Ao(this._context)),n.addDynamicOverlay(new jo(this._context)),n.addDynamicOverlay(new Vo(this._context)),n.addDynamicOverlay(new tt(this._context));var i=new $e(this._context);i.getDomNode().appendChild(this.viewZones.marginDomNode),i.getDomNode().appendChild(n.getDomNode()),this.viewParts.push(i),this.contentWidgets=new Co(this._context,this.domNode),this.viewParts.push(this.contentWidgets),this.viewCursors=new fn(this._context),this.viewParts.push(this.viewCursors),this.overlayWidgets=new zo(this._context),this.viewParts.push(this.overlayWidgets);var r=new Qo(this._context);this.viewParts.push(r);var s=new Un(this._context);if(this.viewParts.push(s),e){var a=this._scrollbar.getOverviewRulerLayoutInfo();a.parent.insertBefore(e.getDomNode(),a.insertBefore)}this.linesContent.appendChild(o.getDomNode()),this.linesContent.appendChild(r.domNode),this.linesContent.appendChild(this.viewZones.domNode),this.linesContent.appendChild(this.viewLines.getDomNode()),this.linesContent.appendChild(this.contentWidgets.domNode),this.linesContent.appendChild(this.viewCursors.getDomNode()),this.overflowGuardContainer.appendChild(i.getDomNode()),this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this.overflowGuardContainer.appendChild(t.getDomNode()),this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()),this.overflowGuardContainer.appendChild(s.getDomNode()),this.domNode.appendChild(this.overflowGuardContainer),this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode)},t.prototype._flushAccumulatedAndRenderNow=function(){this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode.domNode,linesContentDomNode:this.linesContent.domNode,focusTextArea:function(){e.focus()},getLastViewCursorsRenderData:function(){return e.viewCursors.getLastRenderData()||[]},shouldSuppressMouseDownOnViewZone:function(t){return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},shouldSuppressMouseDownOnWidget:function(t){return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)},getPositionFromDOMInfo:function(t,o){return e._flushAccumulatedAndRenderNow(),e.viewLines.getPositionFromDOMInfo(t,o)},visibleRangeForPosition2:function(t,o){e._flushAccumulatedAndRenderNow();var n=e.viewLines.visibleRangesForRange2(new _.a(t,o,t,o));return n?n[0]:null},getLineWidth:function(t){return e._flushAccumulatedAndRenderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createTextAreaHandlerHelper=function(){var e=this;return{visibleRangeForPositionRelativeToEditor:function(t,o){e._flushAccumulatedAndRenderNow();var n=e.viewLines.visibleRangesForRange2(new _.a(t,o,t,o));return n?n[0]:null}}},t.prototype._setLayout=function(){var e=this._context.configuration.editor.layoutInfo;this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this.overflowGuardContainer.setWidth(e.width),this.overflowGuardContainer.setHeight(e.height),this.linesContent.setWidth(1e6),this.linesContent.setHeight(1e6)},t.prototype.getEditorClassName=function(){var e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.editor.editorClassName+" "+Object(Fe.d)(this._context.theme.type)+e},t.prototype.onConfigurationChanged=function(e){return e.editorClassName&&this.domNode.setClassName(this.getEditorClassName()),e.layoutInfo&&this._setLayout(),!1},t.prototype.onFocusChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),this._context.model.setHasFocus(e.isFocused),e.isFocused?this.outgoingEvents.emitViewFocusGained():this.outgoingEvents.emitViewFocusLost(),!1},t.prototype.onScrollChanged=function(e){return this.outgoingEvents.emitScrollChanged(e),!1},t.prototype.onThemeChanged=function(e){return this.domNode.setClassName(this.getEditorClassName()),!1},t.prototype.dispose=function(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this.eventDispatcher.removeEventHandler(this),this.outgoingEvents.dispose(),this.pointerHandler.dispose(),this.viewLines.dispose();for(var t=0,o=this.viewParts.length;t=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},Xn=function(e,t){return function(o,n){t(o,n,e)}},qn=0,$n="showUnused",Jn=function(e){function t(t,o,n,i,r,l,u,c,g){var p=e.call(this)||this;p._onDidDispose=p._register(new a.a),p.onDidDispose=p._onDidDispose.event,p._onDidChangeModelContent=p._register(new a.a),p.onDidChangeModelContent=p._onDidChangeModelContent.event,p._onDidChangeModelLanguage=p._register(new a.a),p.onDidChangeModelLanguage=p._onDidChangeModelLanguage.event,p._onDidChangeModelLanguageConfiguration=p._register(new a.a),p.onDidChangeModelLanguageConfiguration=p._onDidChangeModelLanguageConfiguration.event,p._onDidChangeModelOptions=p._register(new a.a),p.onDidChangeModelOptions=p._onDidChangeModelOptions.event,p._onDidChangeModelDecorations=p._register(new a.a),p.onDidChangeModelDecorations=p._onDidChangeModelDecorations.event,p._onDidChangeConfiguration=p._register(new a.a),p.onDidChangeConfiguration=p._onDidChangeConfiguration.event,p._onDidChangeModel=p._register(new a.a),p.onDidChangeModel=p._onDidChangeModel.event,p._onDidChangeCursorPosition=p._register(new a.a),p.onDidChangeCursorPosition=p._onDidChangeCursorPosition.event,p._onDidChangeCursorSelection=p._register(new a.a),p.onDidChangeCursorSelection=p._onDidChangeCursorSelection.event,p._onDidAttemptReadOnlyEdit=p._register(new a.a),p.onDidAttemptReadOnlyEdit=p._onDidAttemptReadOnlyEdit.event,p._onDidLayoutChange=p._register(new a.a),p.onDidLayoutChange=p._onDidLayoutChange.event,p._editorTextFocus=p._register(new Zn),p.onDidFocusEditorText=p._editorTextFocus.onDidChangeToTrue,p.onDidBlurEditorText=p._editorTextFocus.onDidChangeToFalse,p._editorWidgetFocus=p._register(new Zn),p.onDidFocusEditorWidget=p._editorWidgetFocus.onDidChangeToTrue,p.onDidBlurEditorWidget=p._editorWidgetFocus.onDidChangeToFalse,p._onWillType=p._register(new a.a),p.onWillType=p._onWillType.event,p._onDidType=p._register(new a.a),p.onDidType=p._onDidType.event,p._onDidPaste=p._register(new a.a),p.onDidPaste=p._onDidPaste.event,p._onMouseUp=p._register(new a.a),p.onMouseUp=p._onMouseUp.event,p._onMouseDown=p._register(new a.a),p.onMouseDown=p._onMouseDown.event,p._onMouseDrag=p._register(new a.a),p.onMouseDrag=p._onMouseDrag.event,p._onMouseDrop=p._register(new a.a),p.onMouseDrop=p._onMouseDrop.event,p._onContextMenu=p._register(new a.a),p.onContextMenu=p._onContextMenu.event,p._onMouseMove=p._register(new a.a),p.onMouseMove=p._onMouseMove.event,p._onMouseLeave=p._register(new a.a),p.onMouseLeave=p._onMouseLeave.event,p._onKeyUp=p._register(new a.a),p.onKeyUp=p._onKeyUp.event,p._onKeyDown=p._register(new a.a),p.onKeyDown=p._onKeyDown.event,p._onDidScrollChange=p._register(new a.a),p.onDidScrollChange=p._onDidScrollChange.event,p._onDidChangeViewZones=p._register(new a.a),p.onDidChangeViewZones=p._onDidChangeViewZones.event,p.domElement=t,p.id=++qn,p._decorationTypeKeysToIds={},p._decorationTypeSubtypes={},p.isSimpleWidget=n.isSimpleWidget||!1,p._telemetryData=n.telemetryData||null,o=o||{},p._configuration=p._register(p._createConfiguration(o)),p._register(p._configuration.onDidChange((function(e){p._onDidChangeConfiguration.fire(e),e.layoutInfo&&p._onDidLayoutChange.fire(p._configuration.editor.layoutInfo),p._configuration.editor.showUnused?p.domElement.classList.add($n):p.domElement.classList.remove($n)}))),p._contextKeyService=p._register(u.createScoped(p.domElement)),p._notificationService=g,p._codeEditorService=r,p._commandService=l,p._themeService=c,p._register(new Qn(p,p._contextKeyService)),p._register(new ei(p,p._contextKeyService)),p._instantiationService=i.createChild(new h.a([d.e,p._contextKeyService])),p._attachModel(null),p._contributions={},p._actions={},p._focusTracker=new ti(t),p._focusTracker.onChange((function(){p._editorWidgetFocus.setValue(p._focusTracker.hasFocus())})),p.contentWidgets={},p.overlayWidgets={};var f=n.contributions;Array.isArray(f)||(f=Gn.d.getEditorContributions());for(var m=0,_=f.length;m<_;m++){var y=f[m];try{var v=p._instantiationService.createInstance(y,p);p._contributions[v.getId()]=v}catch(e){Object(s.e)(e)}}return Gn.d.getEditorActions().forEach((function(e){var t=new zn.a(e.id,e.label,e.alias,e.precondition,(function(){return p._instantiationService.invokeFunction((function(t){return e.runEditorCommand(t,p,null)}))}),p._contextKeyService);p._actions[t.id]=t})),p._codeEditorService.addCodeEditor(p),p}return Kn(t,e),t.prototype._createConfiguration=function(e){return new g.a(e,this.domElement)},t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return C.a.ICodeEditor},t.prototype.dispose=function(){this._codeEditorService.removeCodeEditor(this),this.contentWidgets={},this.overlayWidgets={},this._focusTracker.dispose();for(var t=Object.keys(this._contributions),o=0,n=t.length;o1),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(e&&e.canUndo()),this._canRedo.set(e&&e.canRedo())},t}(l.a),ei=function(e){function t(t,o){var n=e.call(this)||this;n._editor=t,n._langId=Ae.a.languageId.bindTo(o),n._hasCompletionItemProvider=Ae.a.hasCompletionItemProvider.bindTo(o),n._hasCodeActionsProvider=Ae.a.hasCodeActionsProvider.bindTo(o),n._hasCodeLensProvider=Ae.a.hasCodeLensProvider.bindTo(o),n._hasDefinitionProvider=Ae.a.hasDefinitionProvider.bindTo(o),n._hasImplementationProvider=Ae.a.hasImplementationProvider.bindTo(o),n._hasTypeDefinitionProvider=Ae.a.hasTypeDefinitionProvider.bindTo(o),n._hasHoverProvider=Ae.a.hasHoverProvider.bindTo(o),n._hasDocumentHighlightProvider=Ae.a.hasDocumentHighlightProvider.bindTo(o),n._hasDocumentSymbolProvider=Ae.a.hasDocumentSymbolProvider.bindTo(o),n._hasReferenceProvider=Ae.a.hasReferenceProvider.bindTo(o),n._hasRenameProvider=Ae.a.hasRenameProvider.bindTo(o),n._hasDocumentFormattingProvider=Ae.a.hasDocumentFormattingProvider.bindTo(o),n._hasDocumentSelectionFormattingProvider=Ae.a.hasDocumentSelectionFormattingProvider.bindTo(o),n._hasSignatureHelpProvider=Ae.a.hasSignatureHelpProvider.bindTo(o),n._isInWalkThrough=Ae.a.isInEmbeddedEditor.bindTo(o);var i=function(){return n._update()};return n._register(t.onDidChangeModel(i)),n._register(t.onDidChangeModelLanguage(i)),n._register(J.u.onDidChange(i)),n._register(J.a.onDidChange(i)),n._register(J.c.onDidChange(i)),n._register(J.e.onDidChange(i)),n._register(J.n.onDidChange(i)),n._register(J.z.onDidChange(i)),n._register(J.m.onDidChange(i)),n._register(J.h.onDidChange(i)),n._register(J.j.onDidChange(i)),n._register(J.r.onDidChange(i)),n._register(J.s.onDidChange(i)),n._register(J.f.onDidChange(i)),n._register(J.i.onDidChange(i)),n._register(J.t.onDidChange(i)),i(),n}return Kn(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(J.u.has(e)),this._hasCodeActionsProvider.set(J.a.has(e)),this._hasCodeLensProvider.set(J.c.has(e)),this._hasDefinitionProvider.set(J.e.has(e)),this._hasImplementationProvider.set(J.n.has(e)),this._hasTypeDefinitionProvider.set(J.z.has(e)),this._hasHoverProvider.set(J.m.has(e)),this._hasDocumentHighlightProvider.set(J.h.has(e)),this._hasDocumentSymbolProvider.set(J.j.has(e)),this._hasReferenceProvider.set(J.r.has(e)),this._hasRenameProvider.set(J.s.has(e)),this._hasSignatureHelpProvider.set(J.t.has(e)),this._hasDocumentFormattingProvider.set(J.f.has(e)||J.i.has(e)),this._hasDocumentSelectionFormattingProvider.set(J.i.has(e)),this._isInWalkThrough.set(e.uri.scheme===Pe.a.walkThroughSnippet)):this.reset()},t}(l.a),ti=function(e){function t(t){var o=e.call(this)||this;return o._onChange=o._register(new a.a),o.onChange=o._onChange.event,o._hasFocus=!1,o._domFocusTracker=o._register(r.O(t)),o._register(o._domFocusTracker.onDidFocus((function(){o._hasFocus=!0,o._onChange.fire(void 0)}))),o._register(o._domFocusTracker.onDidBlur((function(){o._hasFocus=!1,o._onChange.fire(void 0)}))),o}return Kn(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(l.a),oi=encodeURIComponent("");function ii(e){return oi+encodeURIComponent(e.toString())+ni}var ri=encodeURIComponent('');Object(Fe.e)((function(e,t){var o=e.getColor(Je.h);o&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+o+"; }");var n=e.getColor(Je.i);n&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+ii(n)+'") repeat-x bottom left; }');var i=e.getColor(Je.v);i&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+i+"; }");var r=e.getColor(Je.w);r&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+ii(r)+'") repeat-x bottom left; }');var s=e.getColor(Je.m);s&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+s+"; }");var a=e.getColor(Je.n);a&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+ii(a)+'") repeat-x bottom left; }');var l=e.getColor(Je.j);l&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+l+"; }");var u=e.getColor(Je.k);u&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+(ri+encodeURIComponent(u.toString())+si)+'") no-repeat bottom left; }');var c=e.getColor(Je.u);c&&t.addRule("."+$n+" .monaco-editor .squiggly-inline-unnecessary { opacity: "+c.rgba.a+"; will-change: opacity; }");var h=e.getColor(Je.t);h&&t.addRule("."+$n+" .monaco-editor .squiggly-unnecessary { border-bottom: 2px dashed "+h+"; }")}))},function(e,t,o){"use strict";o.r(t);var n=o(0),i=o(6),r=o(12),s=o(8),a=o(3),l=o(17),u=function(){function e(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?(this._staticValue=e[0].staticValue,this._pieces=null):(this._staticValue=null,this._pieces=e):(this._staticValue="",this._pieces=null)}return e.fromStaticValue=function(t){return new e([c.staticValue(t)])},Object.defineProperty(e.prototype,"hasReplacementPatterns",{get:function(){return null===this._staticValue},enumerable:!0,configurable:!0}),e.prototype.buildReplaceString=function(t){if(null!==this._staticValue)return this._staticValue;for(var o="",n=0,i=this._pieces.length;n0;){if(e=0?t+1:1},e.prototype.getCurrentMatchesPosition=function(t){for(var o=this._editor.getModel().getDecorationsInRange(t),n=0,i=o.length;n1e3){r=e._FIND_MATCH_NO_OVERVIEW_DECORATION;for(var a=n._editor.getModel().getLineCount(),l=n._editor.getLayoutInfo().height/a,u=Math.max(2,Math.ceil(3/l)),c=t[0].range.startLineNumber,h=t[0].range.endLineNumber,d=1,g=t.length;d=f.startLineNumber?f.endLineNumber>h&&(h=f.endLineNumber):(s.push({range:new p.a(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),c=f.startLineNumber,h=f.endLineNumber)}s.push({range:new p.a(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}var m=new Array(t.length);for(d=0,g=t.length;d=0;t--){var o=this._decorations[t],n=this._editor.getModel().getDecorationRange(o);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])},e.prototype.matchAfterPosition=function(e){if(0===this._decorations.length)return null;for(var t=0,o=this._decorations.length;te.lineNumber)return i;if(!(i.startColumn0){for(var o=[],n=0;n0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1},e.prototype._setCurrentFindMatch=function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)},e.prototype._prevSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),o=e.lineNumber,n=e.column,i=this._editor.getModel();return t||1===n?(1===o?o=i.getLineCount():o--,n=i.getLineMaxColumn(o)):n--,new g.a(o,n)},e.prototype._moveToPrevMatch=function(t,o){if(void 0===o&&(o=!1),this._decorations.getCount()<19999){var n=this._decorations.matchBeforePosition(t);return n&&n.isEmpty()&&n.getStartPosition().equals(t)&&(t=this._prevSearchPosition(t),n=this._decorations.matchBeforePosition(t)),void(n&&this._setCurrentFindMatch(n))}if(!this._cannotFind()){var i=this._decorations.getFindScope(),r=e._getSearchRange(this._editor.getModel(),i);r.getEndPosition().isBefore(t)&&(t=r.getEndPosition()),t.isBefore(r.getStartPosition())&&(t=r.getEndPosition());var s=t.lineNumber,a=t.column,l=this._editor.getModel(),u=new g.a(s,a),c=l.findPreviousMatch(this._state.searchString,u,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return c&&c.range.isEmpty()&&c.range.getStartPosition().equals(u)&&(u=this._prevSearchPosition(u),c=l.findPreviousMatch(this._state.searchString,u,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1)),c?o||r.containsRange(c.range)?void this._setCurrentFindMatch(c.range):this._moveToPrevMatch(c.range.getStartPosition(),!0):null}},e.prototype.moveToPrevMatch=function(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())},e.prototype._nextSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),o=e.lineNumber,n=e.column,i=this._editor.getModel();return t||n===i.getLineMaxColumn(o)?(o===i.getLineCount()?o=1:o++,n=1):n++,new g.a(o,n)},e.prototype._moveToNextMatch=function(e){if(this._decorations.getCount()<19999){var t=this._decorations.matchAfterPosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),t=this._decorations.matchAfterPosition(e)),void(t&&this._setCurrentFindMatch(t))}var o=this._getNextMatch(e,!1,!0);o&&this._setCurrentFindMatch(o.range)},e.prototype._getNextMatch=function(t,o,n,i){if(void 0===i&&(i=!1),this._cannotFind())return null;var r=this._decorations.getFindScope(),s=e._getSearchRange(this._editor.getModel(),r);s.getEndPosition().isBefore(t)&&(t=s.getStartPosition()),t.isBefore(s.getStartPosition())&&(t=s.getStartPosition());var a=t.lineNumber,l=t.column,u=this._editor.getModel(),c=new g.a(a,l),h=u.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,o);return n&&h&&h.range.isEmpty()&&h.range.getStartPosition().equals(c)&&(c=this._nextSearchPosition(c),h=u.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,o)),h?i||s.containsRange(h.range)?h:this._getNextMatch(h.range.getEndPosition(),o,n,!0):null},e.prototype.moveToNextMatch=function(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())},e.prototype._getReplacePattern=function(){return this._state.isRegex?function(e){if(!e||0===e.length)return new u(null);for(var t=new h(e),o=0,n=e.length;o=n)break;if(36===(a=e.charCodeAt(o))){t.emitUnchanged(o-1),t.emitStatic("$",o+1);continue}if(48===a||38===a){t.emitUnchanged(o-1),t.emitMatchIndex(0,o+1);continue}if(49<=a&&a<=57){var r=a-48;if(o+1=n)break;var a;switch(a=e.charCodeAt(o)){case 92:t.emitUnchanged(o-1),t.emitStatic("\\",o+1);break;case 110:t.emitUnchanged(o-1),t.emitStatic("\n",o+1);break;case 116:t.emitUnchanged(o-1),t.emitStatic("\t",o+1)}}}return t.finalize()}(this._state.replaceString):u.fromStaticValue(this._state.replaceString)},e.prototype.replace=function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),o=this._getNextMatch(t.getStartPosition(),e.hasReplacementPatterns,!1);if(o)if(t.equalsRange(o.range)){var n=e.buildReplaceString(o.matches),i=new d.a(t,n);this._executeEditorCommand("replace",i),this._decorations.setStartPosition(new g.a(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(o.range)}},e.prototype._findMatches=function(t,o,n){var i=e._getSearchRange(this._editor.getModel(),t);return this._editor.getModel().findMatches(this._state.searchString,i,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null,o,n)},e.prototype.replaceAll=function(){if(this._hasMatches()){var e=this._decorations.getFindScope();null===e&&this._state.matchesCount>=19999?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}},e.prototype._largeReplaceAll=function(){var e=new C.a(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var o="m";t.ignoreCase&&(o+="i"),t.global&&(o+="g"),t=new RegExp(t.source,o)}var n,i=this._editor.getModel(),r=i.getValue(y.c.LF),s=i.getFullModelRange(),a=this._getReplacePattern();n=a.hasReplacementPatterns?r.replace(t,(function(){return a.buildReplaceString(arguments)})):r.replace(t,a.buildReplaceString(null));var l=new d.b(s,n,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}},e.prototype._regularReplaceAll=function(e){for(var t=this._getReplacePattern(),o=this._findMatches(e,t.hasReplacementPatterns,1073741824),n=[],i=0,r=o.length;it&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,i=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,i=!0),void 0!==o&&(p.a.equalsRange(this._currentMatch,o)||(this._currentMatch=o,n.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(n)},e.prototype.change=function(e,t,o){void 0===o&&(o=!0);var n={moveCursor:t,updateHistory:o,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},i=!1,r=this.isRegex,s=this.wholeWord,a=this.matchCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,n.searchString=!0,i=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,n.replaceString=!0,i=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,n.isRevealed=!0,i=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,n.isReplaceRevealed=!0,i=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.searchScope&&(p.a.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,n.searchScope=!0,i=!0)),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,r!==this.isRegex&&(i=!0,n.isRegex=!0),s!==this.wholeWord&&(i=!0,n.wholeWord=!0),a!==this.matchCase&&(i=!0,n.matchCase=!0),i&&this._onFindReplaceStateChange.fire(n)},e}(),B=o(5),F=o(55),H=o(177),U=o(83),V=o(61),W=(o(438),o(13)),j=o(15),G=o(1),z=o(59),K=o(93),Y=o(16),X=o(162),q=(o(442),o(443),o(14)),$=o(30),J=(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),Z={inputActiveOptionBorder:q.a.fromHex("#007ACC")},Q=function(e){function t(t){var o=e.call(this)||this;return o._onChange=o._register(new A.a),o._onKeyDown=o._register(new A.a),o._opts=$.c(t),$.g(o._opts,Z,!1),o._checked=o._opts.isChecked,o.domNode=document.createElement("div"),o.domNode.title=o._opts.title,o.domNode.className="monaco-custom-checkbox "+o._opts.actionClassName+" "+(o._checked?"checked":"unchecked"),o.domNode.tabIndex=0,o.domNode.setAttribute("role","checkbox"),o.domNode.setAttribute("aria-checked",String(o._checked)),o.domNode.setAttribute("aria-label",o._opts.title),o.applyStyles(),o.onclick(o.domNode,(function(e){o.checked=!o._checked,o._onChange.fire(!1),e.preventDefault()})),o.onkeydown(o.domNode,(function(e){if(10===e.keyCode||3===e.keyCode)return o.checked=!o._checked,o._onChange.fire(!0),void e.preventDefault();o._onKeyDown.fire(e)})),o}return J(t,e),Object.defineProperty(t.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onKeyDown",{get:function(){return this._onKeyDown.event},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.domNode.focus()},Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this._checked?this.domNode.classList.add("checked"):this.domNode.classList.remove("checked"),this.applyStyles()},enumerable:!0,configurable:!0}),t.prototype.width=function(){return 22},t.prototype.style=function(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),this.applyStyles()},t.prototype.applyStyles=function(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent")},t.prototype.enable=function(){this.domNode.tabIndex=0,this.domNode.setAttribute("aria-disabled",String(!1))},t.prototype.disable=function(){G.H(this.domNode),this.domNode.setAttribute("aria-disabled",String(!0))},t}(z.a),ee=(o(444),function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}()),te=n.a("caseDescription","Match Case"),oe=n.a("wordsDescription","Match Whole Word"),ne=n.a("regexDescription","Use Regular Expression"),ie=function(e){function t(t){return e.call(this,{actionClassName:"monaco-case-sensitive",title:te+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return ee(t,e),t}(Q),re=function(e){function t(t){return e.call(this,{actionClassName:"monaco-whole-word",title:oe+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return ee(t,e),t}(Q),se=function(e){function t(t){return e.call(this,{actionClassName:"monaco-regex",title:ne+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder})||this}return ee(t,e),t}(Q),ae=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),le=n.a("defaultLabel","input"),ue=function(e){function t(t,o,n){var i=e.call(this)||this;return i._onDidOptionChange=i._register(new A.a),i.onDidOptionChange=i._onDidOptionChange.event,i._onKeyDown=i._register(new A.a),i.onKeyDown=i._onKeyDown.event,i._onMouseDown=i._register(new A.a),i.onMouseDown=i._onMouseDown.event,i._onInput=i._register(new A.a),i._onKeyUp=i._register(new A.a),i._onCaseSensitiveKeyDown=i._register(new A.a),i.onCaseSensitiveKeyDown=i._onCaseSensitiveKeyDown.event,i._onRegexKeyDown=i._register(new A.a),i._lastHighlightFindOptions=0,i.contextViewProvider=o,i.width=n.width||100,i.placeholder=n.placeholder||"",i.validation=n.validation,i.label=n.label||le,i.inputActiveOptionBorder=n.inputActiveOptionBorder,i.inputBackground=n.inputBackground,i.inputForeground=n.inputForeground,i.inputBorder=n.inputBorder,i.inputValidationInfoBorder=n.inputValidationInfoBorder,i.inputValidationInfoBackground=n.inputValidationInfoBackground,i.inputValidationWarningBorder=n.inputValidationWarningBorder,i.inputValidationWarningBackground=n.inputValidationWarningBackground,i.inputValidationErrorBorder=n.inputValidationErrorBorder,i.inputValidationErrorBackground=n.inputValidationErrorBackground,i.regex=null,i.wholeWords=null,i.caseSensitive=null,i.domNode=null,i.inputBox=null,i.buildDomNode(n.appendCaseSensitiveLabel||"",n.appendWholeWordsLabel||"",n.appendRegexLabel||"",n.history),Boolean(t)&&t.appendChild(i.domNode),i.onkeydown(i.inputBox.inputElement,(function(e){return i._onKeyDown.fire(e)})),i.onkeyup(i.inputBox.inputElement,(function(e){return i._onKeyUp.fire(e)})),i.oninput(i.inputBox.inputElement,(function(e){return i._onInput.fire()})),i.onmousedown(i.inputBox.inputElement,(function(e){return i._onMouseDown.fire(e)})),i}return ae(t,e),t.prototype.enable=function(){G.G(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()},t.prototype.disable=function(){G.f(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){this.inputBox.value!==e&&(this.inputBox.value=e)},t.prototype.style=function(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()},t.prototype.applyStyles=function(){if(this.domNode){var e={inputActiveOptionBorder:this.inputActiveOptionBorder};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);var t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getCaseSensitive=function(){return this.caseSensitive.checked},t.prototype.setCaseSensitive=function(e){this.caseSensitive.checked=e,this.setInputWidth()},t.prototype.getWholeWords=function(){return this.wholeWords.checked},t.prototype.setWholeWords=function(e){this.wholeWords.checked=e,this.setInputWidth()},t.prototype.getRegex=function(){return this.regex.checked},t.prototype.setRegex=function(e){this.regex.checked=e,this.setInputWidth(),this.validate()},t.prototype.focusOnCaseSensitive=function(){this.caseSensitive.focus()},t.prototype.highlightFindOptions=function(){G.G(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,G.f(this.domNode,"highlight-"+this._lastHighlightFindOptions)},t.prototype.setInputWidth=function(){var e=this.width-this.caseSensitive.width()-this.wholeWords.width()-this.regex.width();this.inputBox.width=e},t.prototype.buildDomNode=function(e,t,o,n){var i=this;this.domNode=document.createElement("div"),this.domNode.style.width=this.width+"px",G.f(this.domNode,"monaco-findInput"),this.inputBox=this._register(new X.a(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation||null},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:n})),this.regex=this._register(new se({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.regex.onChange((function(e){i._onDidOptionChange.fire(e),e||i.inputBox.focus(),i.setInputWidth(),i.validate()}))),this._register(this.regex.onKeyDown((function(e){i._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new re({appendTitle:t,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.wholeWords.onChange((function(e){i._onDidOptionChange.fire(e),e||i.inputBox.focus(),i.setInputWidth(),i.validate()}))),this.caseSensitive=this._register(new ie({appendTitle:e,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder})),this._register(this.caseSensitive.onChange((function(e){i._onDidOptionChange.fire(e),e||i.inputBox.focus(),i.setInputWidth(),i.validate()}))),this._register(this.caseSensitive.onKeyDown((function(e){i._onCaseSensitiveKeyDown.fire(e)})));var r=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=r.indexOf(document.activeElement);if(t>=0){var o=void 0;e.equals(17)?o=(t+1)%r.length:e.equals(15)&&(o=0===t?r.length-1:t-1),e.equals(9)?r[t].blur():o>=0&&r[o].focus(),G.c.stop(e,!0)}}})),this.setInputWidth();var s=document.createElement("div");s.className="controls",s.appendChild(this.caseSensitive.domNode),s.appendChild(this.wholeWords.domNode),s.appendChild(this.regex.domNode),this.domNode.appendChild(s)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(z.a);function ce(e,t){return e.getContext(document.activeElement).getValue(t)}var he=o(84),de=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),ge=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},pe=function(e,t){return function(o,n){t(o,n,e)}},fe="historyNavigationWidget",me="historyNavigationEnabled";function _e(e,t){var o=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,o){new r.f(o,t).bindTo(e)}(o,t,fe),{scopedContextKeyService:o,historyNavigationEnablement:new r.f(me,!0).bindTo(o)}}var ye=function(e){function t(t,o,n,i){var r=e.call(this,t,o,n)||this;return r._register(_e(i,{target:r.element,historyNavigator:r}).scopedContextKeyService),r}return de(t,e),t=ge([pe(3,r.e)],t)}(X.a),ve=function(e){function t(t,o,n,i){var r=e.call(this,t,o,n)||this;return r._register(_e(i,{target:r.inputBox.element,historyNavigator:r.inputBox}).scopedContextKeyService),r}return de(t,e),t=ge([pe(3,r.e)],t)}(ue);he.a.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:r.d.and(new r.b(fe),new r.c(me,!0)),primary:16,secondary:[528],handler:function(e,t){ce(e.get(r.e),fe).historyNavigator.showPreviousValue()}}),he.a.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:new r.a([new r.b(fe),new r.c(me,!0)]),primary:18,secondary:[530],handler:function(e,t){ce(e.get(r.e),fe).historyNavigator.showNextValue()}});var be=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ee=n.a("label.find","Find"),Ce=n.a("placeholder.find","Find"),Se=n.a("label.previousMatchButton","Previous match"),Te=n.a("label.nextMatchButton","Next match"),we=n.a("label.toggleSelectionFind","Find in selection"),ke=n.a("label.closeButton","Close"),Oe=n.a("label.replace","Replace"),Re=n.a("placeholder.replace","Replace"),Ne=n.a("label.replaceButton","Replace"),Le=n.a("label.replaceAllButton","Replace All"),Ie=n.a("label.toggleReplaceButton","Toggle Replace mode"),De=n.a("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",19999),Ae=n.a("label.matchesLocation","{0} of {1}"),Pe=n.a("label.noResults","No Results"),Me=69,xe=17+(Me+3+1)+92+2,Be=34,Fe=function(e){this.afterLineNumber=e,this.heightInPx=Be,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"},He=function(e){function t(t,o,n,i,r,s,a){var u=e.call(this)||this;return u._codeEditor=t,u._controller=o,u._state=n,u._contextViewProvider=i,u._keybindingService=r,u._contextKeyService=s,u._isVisible=!1,u._isReplaceVisible=!1,u._updateHistoryDelayer=new l.a(500),u._register(u._state.onFindReplaceStateChange((function(e){return u._onStateChanged(e)}))),u._buildDomNode(),u._updateButtons(),u._tryUpdateWidgetWidth(),u._register(u._codeEditor.onDidChangeConfiguration((function(e){e.readOnly&&(u._codeEditor.getConfiguration().readOnly&&u._state.change({isReplaceRevealed:!1},!1),u._updateButtons()),e.layoutInfo&&u._tryUpdateWidgetWidth()}))),u._register(u._codeEditor.onDidChangeCursorSelection((function(){u._isVisible&&u._updateToggleSelectionFindButton()}))),u._register(u._codeEditor.onDidFocusEditorWidget((function(){if(u._isVisible){var e=u._controller.getGlobalBufferTerm();e&&e!==u._state.searchString&&(u._state.change({searchString:e},!0),u._findInput.select())}}))),u._findInputFocused=w.bindTo(s),u._findFocusTracker=u._register(G.O(u._findInput.inputBox.inputElement)),u._register(u._findFocusTracker.onDidFocus((function(){u._findInputFocused.set(!0),u._updateSearchScope()}))),u._register(u._findFocusTracker.onDidBlur((function(){u._findInputFocused.set(!1)}))),u._replaceInputFocused=k.bindTo(s),u._replaceFocusTracker=u._register(G.O(u._replaceInputBox.inputElement)),u._register(u._replaceFocusTracker.onDidFocus((function(){u._replaceInputFocused.set(!0),u._updateSearchScope()}))),u._register(u._replaceFocusTracker.onDidBlur((function(){u._replaceInputFocused.set(!1)}))),u._codeEditor.addOverlayWidget(u),u._viewZone=new Fe(0),u._applyTheme(a.getTheme()),u._register(a.onThemeChange(u._applyTheme.bind(u))),u._register(u._codeEditor.onDidChangeModel((function(e){u._isVisible&&void 0!==u._viewZoneId&&u._codeEditor.changeViewZones((function(e){e.removeZone(u._viewZoneId),u._viewZoneId=void 0}))}))),u._register(u._codeEditor.onDidScrollChange((function(e){e.scrollTopChanged?u._layoutViewZone():setTimeout((function(){u._layoutViewZone()}),0)}))),u}return be(t,e),t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return this._isVisible?{preference:Y.c.TOP_RIGHT_CORNER}:null},t.prototype._onStateChanged=function(e){if(e.searchString&&(this._findInput.setValue(this._state.searchString),this._updateButtons()),e.replaceString&&(this._replaceInputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal(!0):this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getConfiguration().readOnly||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInputBox.width=this._findInput.inputBox.width,this._updateButtons()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){var t=this._state.searchString.length>0&&0===this._state.matchesCount;G.N(this._domNode,"no-results",t),this._updateMatchesCount()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory()},t.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},t.prototype._updateHistory=function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInputBox.addToHistory()},t.prototype._updateMatchesCount=function(){var e;if(this._matchesCount.style.minWidth=Me+"px",this._state.matchesCount>=19999?this._matchesCount.title=De:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=19999&&(t+="+");var o=String(this._state.matchesPosition);"0"===o&&(o="?"),e=s.format(Ae,o,t)}else e=Pe;this._matchesCount.appendChild(document.createTextNode(e)),Me=Math.max(Me,this._matchesCount.clientWidth)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),o=this._toggleSelectionFind.checked;this._toggleSelectionFind.setEnabled(this._isVisible&&(o||t))},t.prototype._updateButtons=function(){this._findInput.setEnabled(this._isVisible),this._replaceInputBox.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0;this._prevBtn.setEnabled(this._isVisible&&e),this._nextBtn.setEnabled(this._isVisible&&e),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),G.N(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var t=!this._codeEditor.getConfiguration().readOnly;this._toggleReplaceBtn.setEnabled(this._isVisible&&t)},t.prototype._reveal=function(e){var t=this;if(!this._isVisible){this._isVisible=!0;var o=this._codeEditor.getSelection();!!o&&(o.startLineNumber!==o.endLineNumber||o.startColumn!==o.endColumn)&&this._codeEditor.getConfiguration().contribInfo.find.autoFindInSelection?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout((function(){G.f(t._domNode,"visible"),t._domNode.setAttribute("aria-hidden","false")}),0),this._codeEditor.layoutOverlayWidget(this);var n=!0;if(this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection&&o){var i=G.u(this._codeEditor.getDomNode()),r=this._codeEditor.getScrolledVisiblePosition(o.getStartPosition()),s=i.left+r.left;if(r.topo.startLineNumber&&(n=!1);var a=G.w(this._domNode).left;s>a&&(n=!1);var l=this._codeEditor.getScrolledVisiblePosition(o.getEndPosition());i.left+l.left>a&&(n=!1)}}this._showViewZone(n)}},t.prototype._hide=function(e){var t=this;this._isVisible&&(this._isVisible=!1,this._updateButtons(),G.G(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._codeEditor.changeViewZones((function(e){void 0!==t._viewZoneId&&(e.removeZone(t._viewZoneId),t._viewZoneId=void 0,t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()-t._viewZone.heightInPx))})))},t.prototype._layoutViewZone=function(){var e=this;this._isVisible&&void 0===this._viewZoneId&&this._codeEditor.changeViewZones((function(t){e._state.isReplaceRevealed?e._viewZone.heightInPx=64:e._viewZone.heightInPx=Be,e._viewZoneId=t.addZone(e._viewZone),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+e._viewZone.heightInPx)}))},t.prototype._showViewZone=function(e){var t=this;void 0===e&&(e=!0),this._isVisible&&this._codeEditor.changeViewZones((function(o){var n=Be;void 0!==t._viewZoneId?(t._state.isReplaceRevealed?(t._viewZone.heightInPx=64,n=64-Be):(t._viewZone.heightInPx=Be,n=Be-64),o.removeZone(t._viewZoneId)):t._viewZone.heightInPx=Be,t._viewZoneId=o.addZone(t._viewZone),e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+n)}))},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(m.J),inputBackground:e.getColor(m.K),inputForeground:e.getColor(m.M),inputBorder:e.getColor(m.L),inputValidationInfoBackground:e.getColor(m.P),inputValidationInfoBorder:e.getColor(m.Q),inputValidationWarningBackground:e.getColor(m.R),inputValidationWarningBorder:e.getColor(m.S),inputValidationErrorBackground:e.getColor(m.N),inputValidationErrorBorder:e.getColor(m.O)};this._findInput.style(t),this._replaceInputBox.style(t)},t.prototype._tryUpdateWidgetWidth=function(){if(this._isVisible){var e=this._codeEditor.getConfiguration().layoutInfo.width,t=this._codeEditor.getConfiguration().layoutInfo.minimapWidth,o=!1,n=!1,i=!1;if(this._resized)if(G.y(this._domNode)>411)return this._domNode.style.maxWidth=e-28-t-15+"px",void(this._replaceInputBox.inputElement.style.width=G.y(this._findInput.inputBox.inputElement)+"px");if(439+t>=e&&(n=!0),439+t-Me>=e&&(i=!0),439+t-Me>=e+50&&(o=!0),G.N(this._domNode,"collapsed-find-widget",o),G.N(this._domNode,"narrow-find-widget",i),G.N(this._domNode,"reduced-find-widget",n),i||o||(this._domNode.style.maxWidth=e-28-t-15+"px"),this._resized){var r=G.y(this._findInput.inputBox.inputElement);r>0&&(this._replaceInputBox.inputElement.style.width=r+"px")}}},t.prototype.focusFindInput=function(){this._findInput.select(),this._findInput.focus()},t.prototype.focusReplaceInput=function(){this._replaceInputBox.select(),this._replaceInputBox.focus()},t.prototype.highlightFindOptions=function(){this._findInput.highlightFindOptions()},t.prototype._updateSearchScope=function(){if(this._toggleSelectionFind.checked){var e=this._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1));var t=this._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(p.a.equalsRange(e,t)||this._state.change({searchScope:e},!0))}},t.prototype._onFindInputMouseDown=function(e){e.middleButton&&e.stopPropagation()},t.prototype._onFindInputKeyDown=function(e){return e.equals(3)?(this._codeEditor.getAction(I.NextMatchFindAction).run().done(null,W.e),void e.preventDefault()):e.equals(1027)?(this._codeEditor.getAction(I.PreviousMatchFindAction).run().done(null,W.e),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInputBox.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype._onReplaceInputKeyDown=function(e){return e.equals(3)?(this._controller.replace(),void e.preventDefault()):e.equals(2051)?(this._controller.replaceAll(),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype.getHorizontalSashTop=function(e){return 0},t.prototype.getHorizontalSashLeft=function(e){return 0},t.prototype.getHorizontalSashWidth=function(e){return 500},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype._buildFindPart=function(){var e=this;this._findInput=this._register(new ve(null,this._contextViewProvider,{width:221,label:Ee,placeholder:Ce,appendCaseSensitiveLabel:this._keybindingLabelFor(I.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(I.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(I.ToggleRegexCommand),validation:function(t){if(0===t.length)return null;if(!e._findInput.getRegex())return null;try{return new RegExp(t),null}catch(e){return{content:e.message}}}},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((function(t){return e._onFindInputKeyDown(t)}))),this._register(this._findInput.inputBox.onDidChange((function(){e._state.change({searchString:e._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInputBox.focus(),t.preventDefault())}))),j.c&&this._register(this._findInput.onMouseDown((function(t){return e._onFindInputMouseDown(t)}))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Ve({label:Se+this._keybindingLabelFor(I.PreviousMatchFindAction),className:"previous",onTrigger:function(){e._codeEditor.getAction(I.PreviousMatchFindAction).run().done(null,W.e)}})),this._nextBtn=this._register(new Ve({label:Te+this._keybindingLabelFor(I.NextMatchFindAction),className:"next",onTrigger:function(){e._codeEditor.getAction(I.NextMatchFindAction).run().done(null,W.e)}}));var t=document.createElement("div");return t.className="find-part",t.appendChild(this._findInput.domNode),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Ue({parent:t,title:we+this._keybindingLabelFor(I.ToggleSearchScopeCommand),onChange:function(){if(e._toggleSelectionFind.checked){var t=e._codeEditor.getSelection();1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,1)),t.isEmpty()||e._state.change({searchScope:t},!0)}else e._state.change({searchScope:null},!0)}})),this._closeBtn=this._register(new Ve({label:ke+this._keybindingLabelFor(I.CloseFindWidgetCommand),className:"close-fw",onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),t.appendChild(this._closeBtn.domNode),t},t.prototype._buildReplacePart=function(){var e=this,t=document.createElement("div");t.className="replace-input",t.style.width="221px",this._replaceInputBox=this._register(new ye(t,null,{ariaLabel:Oe,placeholder:Re,history:[]},this._contextKeyService)),this._register(G.j(this._replaceInputBox.inputElement,"keydown",(function(t){return e._onReplaceInputKeyDown(t)}))),this._register(G.j(this._replaceInputBox.inputElement,"input",(function(t){e._state.change({replaceString:e._replaceInputBox.value},!1)}))),this._replaceBtn=this._register(new Ve({label:Ne+this._keybindingLabelFor(I.ReplaceOneAction),className:"replace",onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new Ve({label:Le+this._keybindingLabelFor(I.ReplaceAllAction),className:"replace-all",onTrigger:function(){e._controller.replaceAll()}}));var o=document.createElement("div");return o.className="replace-part",o.appendChild(t),o.appendChild(this._replaceBtn.domNode),o.appendChild(this._replaceAllBtn.domNode),o},t.prototype._buildDomNode=function(){var e=this,t=this._buildFindPart(),o=this._buildReplacePart();this._toggleReplaceBtn=this._register(new Ve({label:Ie,className:"toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInputBox.width=e._findInput.inputBox.width),e._showViewZone()}})),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="411px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(o),this._buildSash()},t.prototype._buildSash=function(){var e=this;this._resizeSash=new K.b(this._domNode,this,{orientation:K.a.VERTICAL}),this._resized=!1;var t=411;this._register(this._resizeSash.onDidStart((function(o){t=G.y(e._domNode)}))),this._register(this._resizeSash.onDidChange((function(o){e._resized=!0;var n=t+o.startX-o.currentX;if(!(n<411)){var i=n-xe;n>(parseFloat(G.r(e._domNode).maxWidth)||0)||(e._domNode.style.width=n+"px",e._isReplaceVisible&&(e._replaceInputBox.width=i))}})))},t.ID="editor.contrib.findWidget",t}(z.a),Ue=function(e){function t(o){var n=e.call(this)||this;return n._opts=o,n._domNode=document.createElement("div"),n._domNode.className="monaco-checkbox",n._domNode.title=n._opts.title,n._domNode.tabIndex=0,n._checkbox=document.createElement("input"),n._checkbox.type="checkbox",n._checkbox.className="checkbox",n._checkbox.id="checkbox-"+t._COUNTER++,n._checkbox.tabIndex=-1,n._label=document.createElement("label"),n._label.className="label",n._label.htmlFor=n._checkbox.id,n._label.tabIndex=-1,n._domNode.appendChild(n._checkbox),n._domNode.appendChild(n._label),n._opts.parent.appendChild(n._domNode),n.onchange(n._checkbox,(function(e){n._opts.onChange()})),n}return be(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checkbox.checked},set:function(e){this._checkbox.checked=e},enumerable:!0,configurable:!0}),t.prototype.enable=function(){this._checkbox.removeAttribute("disabled")},t.prototype.disable=function(){this._checkbox.disabled=!0},t.prototype.setEnabled=function(e){e?(this.enable(),this.domNode.tabIndex=0):(this.disable(),this.domNode.tabIndex=-1)},t._COUNTER=0,t}(z.a),Ve=function(e){function t(t){var o=e.call(this)||this;return o._opts=t,o._domNode=document.createElement("div"),o._domNode.title=o._opts.label,o._domNode.tabIndex=0,o._domNode.className="button "+o._opts.className,o._domNode.setAttribute("role","button"),o._domNode.setAttribute("aria-label",o._opts.label),o.onclick(o._domNode,(function(e){o._opts.onTrigger(),e.preventDefault()})),o.onkeydown(o._domNode,(function(e){if(e.equals(10)||e.equals(3))return o._opts.onTrigger(),void e.preventDefault();o._opts.onKeyDown&&o._opts.onKeyDown(e)})),o}return be(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),t.prototype.isEnabled=function(){return this._domNode.tabIndex>=0},t.prototype.focus=function(){this._domNode.focus()},t.prototype.setEnabled=function(e){G.N(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1},t.prototype.setExpanded=function(e){this._domNode.setAttribute("aria-expanded",String(!!e))},t.prototype.toggleClass=function(e,t){G.N(this._domNode,e,t)},t}(z.a);Object(_.e)((function(e,t){var o=function(e,o){o&&t.addRule(".monaco-editor "+e+" { background-color: "+o+"; }")};o(".findMatch",e.getColor(m.q)),o(".currentFindMatch",e.getColor(m.o)),o(".findScope",e.getColor(m.s)),o(".find-widget",e.getColor(m.D));var n=e.getColor(m.rb);n&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px "+n+"; }");var i=e.getColor(m.r);i&&t.addRule(".monaco-editor .findMatch { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+i+"; box-sizing: border-box; }");var r=e.getColor(m.p);r&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid "+r+"; padding: 1px; box-sizing: border-box; }");var s=e.getColor(m.t);s&&t.addRule(".monaco-editor .findScope { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; }");var a=e.getColor(m.e);a&&t.addRule(".monaco-editor .find-widget { border: 2px solid "+a+"; }");var l=e.getColor(m.G);l&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: "+l+"; }");var u=e.getColor(m.F);if(u)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+u+"; width: 3px !important; margin-left: -4px;}");else{var c=e.getColor(m.E);c&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+c+"; width: 3px !important; margin-left: -4px;}")}}));var We=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),je=function(e){function t(t,o,n,i){var r=e.call(this)||this;r._hideSoon=r._register(new l.c((function(){return r._hide()}),2e3)),r._isVisible=!1,r._editor=t,r._state=o,r._keybindingService=n,r._domNode=document.createElement("div"),r._domNode.className="findOptionsWidget",r._domNode.style.display="none",r._domNode.style.top="10px",r._domNode.setAttribute("role","presentation"),r._domNode.setAttribute("aria-hidden","true");var s=i.getTheme().getColor(m.J);return r.caseSensitive=r._register(new ie({appendTitle:r._keybindingLabelFor(I.ToggleCaseSensitiveCommand),isChecked:r._state.matchCase,inputActiveOptionBorder:s})),r._domNode.appendChild(r.caseSensitive.domNode),r._register(r.caseSensitive.onChange((function(){r._state.change({matchCase:r.caseSensitive.checked},!1)}))),r.wholeWords=r._register(new re({appendTitle:r._keybindingLabelFor(I.ToggleWholeWordCommand),isChecked:r._state.wholeWord,inputActiveOptionBorder:s})),r._domNode.appendChild(r.wholeWords.domNode),r._register(r.wholeWords.onChange((function(){r._state.change({wholeWord:r.wholeWords.checked},!1)}))),r.regex=r._register(new se({appendTitle:r._keybindingLabelFor(I.ToggleRegexCommand),isChecked:r._state.isRegex,inputActiveOptionBorder:s})),r._domNode.appendChild(r.regex.domNode),r._register(r.regex.onChange((function(){r._state.change({isRegex:r.regex.checked},!1)}))),r._editor.addOverlayWidget(r),r._register(r._state.onFindReplaceStateChange((function(e){var t=!1;e.isRegex&&(r.regex.checked=r._state.isRegex,t=!0),e.wholeWord&&(r.wholeWords.checked=r._state.wholeWord,t=!0),e.matchCase&&(r.caseSensitive.checked=r._state.matchCase,t=!0),!r._state.isRevealed&&t&&r._revealTemporarily()}))),r._register(G.h(r._domNode,(function(e){return r._onMouseOut()}))),r._register(G.g(r._domNode,"mouseover",(function(e){return r._onMouseOver()}))),r._applyTheme(i.getTheme()),r._register(i.onThemeChange(r._applyTheme.bind(r))),r}return We(t,e),t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{preference:Y.c.TOP_RIGHT_CORNER}},t.prototype.highlightFindOptions=function(){this._revealTemporarily()},t.prototype._revealTemporarily=function(){this._show(),this._hideSoon.schedule()},t.prototype._onMouseOut=function(){this._hideSoon.schedule()},t.prototype._onMouseOver=function(){this._hideSoon.cancel()},t.prototype._show=function(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")},t.prototype._hide=function(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(m.J)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)},t.ID="editor.contrib.findOptionsWidget",t}(z.a);Object(_.e)((function(e,t){var o=e.getColor(m.D);o&&t.addRule(".monaco-editor .findOptionsWidget { background-color: "+o+"; }");var n=e.getColor(m.rb);n&&t.addRule(".monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px "+n+"; }");var i=e.getColor(m.e);i&&t.addRule(".monaco-editor .findOptionsWidget { border: 2px solid "+i+"; }")}));var Ge=o(22),ze=o(38);o.d(t,"getSelectionSearchString",(function(){return qe})),o.d(t,"CommonFindController",(function(){return $e})),o.d(t,"FindController",(function(){return Je})),o.d(t,"StartFindAction",(function(){return Ze})),o.d(t,"StartFindWithSelectionAction",(function(){return Qe})),o.d(t,"MatchFindAction",(function(){return et})),o.d(t,"NextMatchFindAction",(function(){return tt})),o.d(t,"PreviousMatchFindAction",(function(){return ot})),o.d(t,"SelectionMatchFindAction",(function(){return nt})),o.d(t,"NextSelectionMatchFindAction",(function(){return it})),o.d(t,"PreviousSelectionMatchFindAction",(function(){return rt})),o.d(t,"StartFindReplaceAction",(function(){return st}));var Ke=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ye=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},Xe=function(e,t){return function(o,n){t(o,n,e)}};function qe(e){var t=e.getSelection();if(t.startLineNumber===t.endLineNumber){if(!t.isEmpty())return e.getModel().getValueInRange(t);var o=e.getModel().getWordAtPosition(t.getStartPosition());if(o)return o.word}return null}var $e=function(e){function t(t,o,n,i){var r=e.call(this)||this;return r._editor=t,r._findWidgetVisible=T.bindTo(o),r._storageService=n,r._clipboardService=i,r._updateHistoryDelayer=new l.a(500),r._state=r._register(new x),r.loadQueryState(),r._register(r._state.onFindReplaceStateChange((function(e){return r._onStateChanged(e)}))),r._model=null,r._register(r._editor.onDidChangeModel((function(){var e=r._editor.getModel()&&r._state.isRevealed;r.disposeModel(),r._state.change({searchScope:null,matchCase:r._storageService.getBoolean("editor.matchCase",F.c.WORKSPACE,!1),wholeWord:r._storageService.getBoolean("editor.wholeWord",F.c.WORKSPACE,!1),isRegex:r._storageService.getBoolean("editor.isRegex",F.c.WORKSPACE,!1)},!1),e&&r._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1})}))),r}return Ke(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},t.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},t.prototype.getId=function(){return t.ID},t.prototype._onStateChanged=function(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)},t.prototype.saveQueryState=function(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,F.c.WORKSPACE),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,F.c.WORKSPACE),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,F.c.WORKSPACE)},t.prototype.loadQueryState=function(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",F.c.WORKSPACE,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",F.c.WORKSPACE,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",F.c.WORKSPACE,this._state.isRegex)},!1)},t.prototype.getState=function(){return this._state},t.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},t.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1)},t.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1)},t.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1)},t.prototype.toggleSearchScope=function(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else{var e=this._editor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1)),e.isEmpty()||this._state.change({searchScope:e},!0)}},t.prototype.setSearchString=function(e){this._state.isRegex&&(e=s.escapeRegExpCharacters(e)),this._state.change({searchString:e},!1)},t.prototype.highlightFindOptions=function(){},t.prototype._start=function(e){if(this.disposeModel(),this._editor.getModel()){var t,o={isRevealed:!0};if(e.seedSearchStringFromSelection)(t=qe(this._editor))&&(this._state.isRegex?o.searchString=s.escapeRegExpCharacters(t):o.searchString=t);if(!o.searchString&&e.seedSearchStringFromGlobalClipboard)(t=this.getGlobalBufferTerm())&&(o.searchString=t);e.forceRevealReplace?o.isReplaceRevealed=!0:this._findWidgetVisible.get()||(o.isReplaceRevealed=!1),this._state.change(o,!1),this._model||(this._model=new D(this._editor,this._state))}},t.prototype.start=function(e){this._start(e)},t.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},t.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},t.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},t.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},t.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},t.prototype.getGlobalBufferTerm=function(){return this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""},t.prototype.setGlobalBufferTerm=function(e){this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)},t.ID="editor.contrib.findController",t=Ye([Xe(1,r.e),Xe(2,F.a),Xe(3,H.a)],t)}(i.a),Je=function(e){function t(t,o,n,i,r,s,a){var l=e.call(this,t,n,s,a)||this;return l._contextViewService=o,l._contextKeyService=n,l._keybindingService=i,l._themeService=r,l}return Ke(t,e),t.prototype._start=function(t){this._widget||this._createFindWidget(),e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t.prototype._createFindWidget=function(){this._widget=this._register(new He(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService)),this._findOptionsWidget=this._register(new je(this._editor,this._state,this._keybindingService,this._themeService))},t=Ye([Xe(1,U.b),Xe(2,r.e),Xe(3,V.a),Xe(4,_.c),Xe(5,F.a),Xe(6,Object(Ge.d)(H.a))],t)}($e),Ze=function(e){function t(){return e.call(this,{id:I.StartFindAction,label:n.a("startFindAction","Find"),alias:"Find",precondition:null,kbOpts:{kbExpr:null,primary:2084,weight:100},menubarOpts:{menuId:ze.b.MenubarEditMenu,group:"3_find",title:n.a({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}})||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);o&&o.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.globalFindClipboard,shouldFocus:1,shouldAnimate:!0})},t}(a.b),Qe=function(e){function t(){return e.call(this,{id:I.StartFindWithSelection,label:n.a("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:null,kbOpts:{kbExpr:null,primary:null,mac:{primary:2083},weight:100}})||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);o&&(o.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:1,shouldAnimate:!0}),o.setGlobalBufferTerm(o.getState().searchString))},t}(a.b),et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);o&&!this._run(o)&&(o.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===o.getState().searchString.length&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0}),this._run(o))},t}(a.b),tt=function(e){function t(){return e.call(this,{id:I.NextMatchFindAction,label:n.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(et),ot=function(e){function t(){return e.call(this,{id:I.PreviousMatchFindAction,label:n.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(et),nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ke(t,e),t.prototype.run=function(e,t){var o=$e.get(t);if(o){var n=qe(t);n&&o.setSearchString(n),this._run(o)||(o.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0}),this._run(o))}},t}(a.b),it=function(e){function t(){return e.call(this,{id:I.NextSelectionMatchFindAction,label:n.a("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:2109,weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(nt),rt=function(e){function t(){return e.call(this,{id:I.PreviousSelectionMatchFindAction,label:n.a("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:null,kbOpts:{kbExpr:B.a.focus,primary:3133,weight:100}})||this}return Ke(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(nt),st=function(e){function t(){return e.call(this,{id:I.StartFindReplaceAction,label:n.a("startReplace","Replace"),alias:"Replace",precondition:null,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menubarOpts:{menuId:ze.b.MenubarEditMenu,group:"3_find",title:n.a({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}})||this}return Ke(t,e),t.prototype.run=function(e,t){if(!t.getConfiguration().readOnly){var o=$e.get(t),n=t.getSelection(),i=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,r=o.getState().searchString||i?2:1;o&&o.start({forceRevealReplace:!0,seedSearchStringFromSelection:i,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,shouldFocus:r,shouldAnimate:!0})}},t}(a.b);Object(a.h)(Je),Object(a.f)(Ze),Object(a.f)(Qe),Object(a.f)(tt),Object(a.f)(ot),Object(a.f)(it),Object(a.f)(rt),Object(a.f)(st);var at=a.c.bindToContribution($e.get);Object(a.g)(new at({id:I.CloseFindWidgetCommand,precondition:T,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:9,secondary:[1033]}})),Object(a.g)(new at({id:I.ToggleCaseSensitiveCommand,precondition:null,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),Object(a.g)(new at({id:I.ToggleWholeWordCommand,precondition:null,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),Object(a.g)(new at({id:I.ToggleRegexCommand,precondition:null,handler:function(e){return e.toggleRegex()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:N.primary,mac:N.mac,win:N.win,linux:N.linux}})),Object(a.g)(new at({id:I.ToggleSearchScopeCommand,precondition:null,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:L.primary,mac:L.mac,win:L.win,linux:L.linux}})),Object(a.g)(new at({id:I.ReplaceOneAction,precondition:T,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:3094}})),Object(a.g)(new at({id:I.ReplaceAllAction,precondition:T,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:2563}})),Object(a.g)(new at({id:I.SelectAllMatchesAction,precondition:T,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:105,kbExpr:B.a.focus,primary:515}}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return _}));o(432);var n,i=o(0),r=o(17),s=o(6),a=o(58),l=o(2),u=o(3),c=o(16),h=o(12),d=o(19),g=o(7),p=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),f=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},m=function(e,t){return function(o,n){t(o,n,e)}},_=function(e){function t(o,n){var i=e.call(this)||this;return i._messageListeners=[],i._editor=o,i._visible=t.MESSAGE_VISIBLE.bindTo(n),i._register(i._editor.onDidAttemptReadOnlyEdit((function(){return i._onDidAttemptReadOnlyEdit()}))),i}return p(t,e),t.get=function(e){return e.getContribution(t._id)},t.prototype.getId=function(){return t._id},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._visible.reset()},t.prototype.showMessage=function(e,t){var o,n=this;Object(a.a)(e),this._visible.set(!0),Object(s.d)(this._messageWidget),this._messageListeners=Object(s.d)(this._messageListeners),this._messageWidget=new v(this._editor,t,e),this._messageListeners.push(this._editor.onDidBlurEditorText((function(){return n.closeMessage()}))),this._messageListeners.push(this._editor.onDidChangeCursorPosition((function(){return n.closeMessage()}))),this._messageListeners.push(this._editor.onDidDispose((function(){return n.closeMessage()}))),this._messageListeners.push(this._editor.onDidChangeModel((function(){return n.closeMessage()}))),this._messageListeners.push(Object(r.l)((function(){return n.closeMessage()}),3e3)),this._messageListeners.push(this._editor.onMouseMove((function(e){e.target.position&&(o?o.containsPosition(e.target.position)||n.closeMessage():o=new l.a(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))},t.prototype.closeMessage=function(){this._visible.reset(),this._messageListeners=Object(s.d)(this._messageListeners),this._messageListeners.push(v.fadeOut(this._messageWidget))},t.prototype._onDidAttemptReadOnlyEdit=function(){this.showMessage(i.a("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())},t._id="editor.contrib.messageController",t.MESSAGE_VISIBLE=new h.f("messageVisible",!1),t=f([m(1,h.e)],t)}(s.a),y=u.c.bindToContribution(_.get);Object(u.g)(new y({id:"leaveEditorMessage",precondition:_.MESSAGE_VISIBLE,handler:function(e){return e.closeMessage()},kbOpts:{weight:130,primary:9}}));var v=function(){function e(e,t,o){var n=t.lineNumber,i=t.column;this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(n,n,0),this._position={lineNumber:n,column:i-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");var r=document.createElement("div");r.classList.add("message"),r.textContent=o,this._domNode.appendChild(r);var s=document.createElement("div");s.classList.add("anchor"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}return e.fadeOut=function(e){var t,o=function(){e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",o)};return t=setTimeout(o,110),e.getDomNode().addEventListener("animationend",o),e.getDomNode().classList.add("fadeOut"),{dispose:o}},e.prototype.dispose=function(){this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"messageoverlay"},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return{position:this._position,preference:[c.a.ABOVE]}},e}();Object(u.h)(_),Object(d.e)((function(e,t){var o=e.getColor(g.Q);if(o){var n=e.type===d.b?2:1;t.addRule(".monaco-editor .monaco-editor-overlaymessage .anchor { border-top-color: "+o+"; }"),t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { border: "+n+"px solid "+o+"; }")}var i=e.getColor(g.P);i&&t.addRule(".monaco-editor .monaco-editor-overlaymessage .message { background-color: "+i+"; }")}))},function(e,t,o){"use strict";o.d(t,"a",(function(){return u})),o.d(t,"b",(function(){return c}));var n,i,r=o(33),s=o(40),a=o(22),l=o(79),u=Object(a.c)("contextService");!function(e){e.isIWorkspace=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.name&&Array.isArray(e.folders)}}(n||(n={})),function(e){e.isIWorkspaceFolder=function(e){return e&&"object"==typeof e&&r.a.isUri(e.uri)&&"string"==typeof e.name&&"function"==typeof e.toResource}}(i||(i={}));!function(){function e(e,t,o,n,i){void 0===t&&(t=""),void 0===o&&(o=[]),void 0===n&&(n=null),this._id=e,this._name=t,this._configuration=n,this._ctime=i,this._foldersMap=l.c.forPaths(),this.folders=o}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,"name",{get:function(){return this._name},set:function(e){this._name=e},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=l.c.forPaths();for(var e=0,t=this.folders;e ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:f,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function o(e){this.tokens=[],this.tokens.links={},this.options=e||v.defaults,this.rules=t.normal,this.options.pedantic?this.rules=t.pedantic:this.options.gfm&&(this.options.tables?this.rules=t.tables:this.rules=t.gfm)}t._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,t._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,t.def=h(t.def).replace("label",t._label).replace("title",t._title).getRegex(),t.bullet=/(?:[*+-]|\d+\.)/,t.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,t.item=h(t.item,"gm").replace(/bull/g,t.bullet).getRegex(),t.list=h(t.list).replace(/bull/g,t.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+t.def.source+")").getRegex(),t._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",t._comment=//,t.html=h(t.html,"i").replace("comment",t._comment).replace("tag",t._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t.paragraph=h(t.paragraph).replace("hr",t.hr).replace("heading",t.heading).replace("lheading",t.lheading).replace("tag",t._tag).getRegex(),t.blockquote=h(t.blockquote).replace("paragraph",t.paragraph).getRegex(),t.normal=m({},t),t.gfm=m({},t.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),t.gfm.paragraph=h(t.paragraph).replace("(?!","(?!"+t.gfm.fences.source.replace("\\1","\\2")+"|"+t.list.source.replace("\\1","\\3")+"|").getRegex(),t.tables=m({},t.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),t.pedantic=m({},t.normal,{html:h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",t._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),o.rules=t,o.lex=function(e,t){return new o(t).lex(e)},o.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},o.prototype.token=function(e,o){var n,i,r,s,a,l,u,c,h,d,g,p,f;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:y(r,"\n")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]||""});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(o&&(r=this.rules.nptable.exec(e))&&(l={type:"table",header:_(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(r[0].length),c=0;c ?/gm,""),this.token(r,o),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),g=(s=r[2]).length>1,this.tokens.push({type:"list_start",ordered:g,start:g?+s:""}),n=!1,d=(r=r[0].match(this.rules.item)).length,c=0;c1&&a.length>1||(e=r.slice(c+1).join("\n")+e,c=d-1)),i=n||/\n\n(?!\s*$)/.test(l),c!==d-1&&(n="\n"===l.charAt(l.length-1),i||(i=n)),f=void 0,(p=/^\[[ xX]\] /.test(l))&&(f=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),this.tokens.push({type:i?"loose_item_start":"list_item_start",task:p,checked:f}),this.token(l,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===r[1]||"script"===r[1]||"style"===r[1]),text:r[0]});else if(o&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),r[3]&&(r[3]=r[3].substring(1,r[3].length-1)),h=r[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[h]||(this.tokens.links[h]={href:r[2],title:r[3]});else if(o&&(r=this.rules.table.exec(e))&&(l={type:"table",header:_(r[1].replace(/^ *| *\| *$/g,"")),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3]?r[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(r[0].length),c=0;c?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:f,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,em:/^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:f,text:/^[\s\S]+?(?=[\\/g,">").replace(/"/g,""").replace(/'/g,"'")}function c(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}function h(e,t){return e=e.source||e,t=t||"",{replace:function(t,o){return o=(o=o.source||o).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,o),this},getRegex:function(){return new RegExp(e,t)}}}function d(e,t){return g[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?g[" "+e]=e+"/":g[" "+e]=y(e,"/",!0)),e=g[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}i._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=h(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=h(i.tag).replace("comment",t._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,i._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=h(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=h(i.reflink).replace("label",i._label).getRegex(),i.normal=m({},i),i.pedantic=m({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:h(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=m({},i.normal,{escape:h(i.escape).replace("])","~|])").getRegex(),url:h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",i._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:h(i.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),i.breaks=m({},i.gfm,{br:h(i.br).replace("{2,}","*").getRegex(),text:h(i.gfm.text).replace("{2,}","*").getRegex()}),r.rules=i,r.output=function(e,t,o){return new r(t,o).output(e)},r.prototype.output=function(e){for(var t,o,n,i,s,a="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),a+=s[1];else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),n="@"===s[2]?"mailto:"+(o=u(this.mangle(s[1]))):o=u(s[1]),a+=this.renderer.link(n,null,o);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.tag.exec(e))!this.inLink&&/^/i.test(s[0])&&(this.inLink=!1),e=e.substring(s[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):u(s[0]):s[0];else if(s=this.rules.link.exec(e))e=e.substring(s[0].length),this.inLink=!0,n=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n))?(n=t[1],i=t[3]):i="":i=s[3]?s[3].slice(1,-1):"",n=n.trim().replace(/^<([\s\S]*)>$/,"$1"),a+=this.outputLink(s,{href:r.escapes(n),title:r.escapes(i)}),this.inLink=!1;else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){a+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),a+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),a+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),a+=this.renderer.codespan(u(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),a+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),a+=this.renderer.del(this.output(s[1]));else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),a+=this.renderer.text(u(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else s[0]=this.rules._backpedal.exec(s[0])[0],e=e.substring(s[0].length),"@"===s[2]?n="mailto:"+(o=u(s[0])):(o=u(s[0]),n="www."===s[1]?"http://"+o:o),a+=this.renderer.link(n,null,o);return a},r.escapes=function(e){return e?e.replace(r.rules._escapes,"$1"):e},r.prototype.outputLink=function(e,t){var o=t.href,n=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(o,n,this.output(e[1])):this.renderer.image(o,n,u(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,o="",n=e.length,i=0;i.5&&(t="x"+t.toString(16)),o+="&#"+t+";";return o},s.prototype.code=function(e,t,o){if(this.options.highlight){var n=this.options.highlight(e,t);null!=n&&n!==e&&(o=!0,e=n)}return t?'
    '+(o?e:u(e,!0))+"
    \n":"
    "+(o?e:u(e,!0))+"
    "},s.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},s.prototype.html=function(e){return e},s.prototype.heading=function(e,t,o){return this.options.headerIds?"'+e+"\n":""+e+"\n"},s.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},s.prototype.list=function(e,t,o){var n=t?"ol":"ul";return"<"+n+(t&&1!==o?' start="'+o+'"':"")+">\n"+e+"\n"},s.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},s.prototype.checkbox=function(e){return" "},s.prototype.paragraph=function(e){return"

    "+e+"

    \n"},s.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},s.prototype.tablerow=function(e){return"\n"+e+"\n"},s.prototype.tablecell=function(e,t){var o=t.header?"th":"td";return(t.align?"<"+o+' align="'+t.align+'">':"<"+o+">")+e+"\n"},s.prototype.strong=function(e){return""+e+""},s.prototype.em=function(e){return""+e+""},s.prototype.codespan=function(e){return""+e+""},s.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},s.prototype.del=function(e){return""+e+""},s.prototype.link=function(e,t,o){if(this.options.sanitize){try{var n=decodeURIComponent(c(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return o}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return o}this.options.baseUrl&&!p.test(e)&&(e=d(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return o}var i='
    "},s.prototype.image=function(e,t,o){this.options.baseUrl&&!p.test(e)&&(e=d(this.options.baseUrl,e));var n=''+o+'":">"},s.prototype.text=function(e){return e},a.prototype.strong=a.prototype.em=a.prototype.codespan=a.prototype.del=a.prototype.text=function(e){return e},a.prototype.link=a.prototype.image=function(e,t,o){return""+o},a.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new r(e.links,this.options),this.inlineText=new r(e.links,m({},this.options,{renderer:new a})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop()},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,c(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,o,n,i="",r="";for(o="",e=0;e=0&&"\\"===o[i];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(o.length>t)o.splice(t);else for(;o.lengthAn error occurred:

    "+u(e.message+"",!0)+"
    ";throw e}}f.exec=f,v.options=v.setOptions=function(e){return m(v.defaults,e),v},v.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new s,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},v.defaults=v.getDefaults(),v.Parser=l,v.parser=l.parse,v.Renderer=s,v.TextRenderer=a,v.Lexer=o,v.lexer=o.lex,v.InlineLexer=r,v.inlineLexer=r.output,v.parse=v,n=v}).call(void 0);var l=n;n.Parser,n.parser,n.Renderer,n.TextRenderer,n.Lexer,n.lexer,n.InlineLexer,n.inlineLexer,n.parse;function u(e){var t=e.inline?"span":"div",o=document.createElement(t);return e.className&&(o.className=e.className),o}function c(e,t){void 0===t&&(t={});var o=u(t);return o.textContent=e,o}function h(e,t){void 0===t&&(t={});var o=u(t);return function e(t,o,n){var r;if(2===o.type)r=document.createTextNode(o.content);else if(3===o.type)r=document.createElement("b");else if(4===o.type)r=document.createElement("i");else if(5===o.type&&n){var s=document.createElement("a");s.href="#",n.disposeables.push(i.j(s,"click",(function(e){n.callback(String(o.index),e)}))),r=s}else 7===o.type?r=document.createElement("br"):1===o.type&&(r=t);t!==r&&t.appendChild(r);Array.isArray(o.children)&&o.children.forEach((function(t){e(r,t,n)}))}(o,function(e){var t={type:1,children:[]},o=0,n=t,i=[],r=new g(e);for(;!r.eos();){var s=r.next(),a="\\"===s&&0!==p(r.peek());if(a&&(s=r.next()),a||0===p(s)||s!==r.peek())if("\n"===s)2===n.type&&(n=i.pop()),n.children.push({type:7});else if(2!==n.type){var l={type:2,content:s};n.children.push(l),i.push(n),n=l}else n.content+=s;else{r.advance(),2===n.type&&(n=i.pop());var u=p(s);if(n.type===u||5===n.type&&6===u)n=i.pop();else{var c={type:u,children:[]};5===u&&(c.index=o,o++),n.children.push(c),i.push(n),n=c}}}2===n.type&&(n=i.pop());i.length;return t}(e),t.actionHandler),o}function d(e,t){void 0===t&&(t={});var o,n=u(t),c=new Promise((function(e){return o=e})),h=new l.Renderer;h.image=function(e,t,o){var n=[];if(e){var i=e.split("|").map((function(e){return e.trim()}));e=i[0];var r=i[1];if(r){var s=/height=(\d+)/.exec(r),a=/width=(\d+)/.exec(r),l=s&&s[1],u=a&&a[1],c=isFinite(parseInt(u)),h=isFinite(parseInt(l));c&&n.push('width="'+u+'"'),h&&n.push('height="'+l+'"')}}var d=[];return e&&d.push('src="'+e+'"'),o&&d.push('alt="'+o+'"'),t&&d.push('title="'+t+'"'),n.length&&(d=d.concat(n)),""},h.link=function(t,o,n){return t===n&&(n=Object(a.d)(n)),o=Object(a.d)(o),!(t=Object(a.d)(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted?n:'
    '+n+""},h.paragraph=function(e){return"

    "+e+"

    "},t.codeBlockRenderer&&(h.code=function(e,o){var i=t.codeBlockRenderer(o,e),a=r.b.nextId(),l=Promise.all([i,c]).then((function(e){var t=e[0],o=n.querySelector('div[data-code="'+a+'"]');o&&(o.innerHTML=t)})).catch((function(e){}));return t.codeBlockRenderCallback&&l.then(t.codeBlockRenderCallback),'
    '+Object(s.escape)(e)+"
    "}),t.actionHandler&&t.actionHandler.disposeables.push(i.j(n,"click",(function(e){var o=e.target;if("A"===o.tagName||(o=o.parentElement)&&"A"===o.tagName){var n=o.dataset.href;n&&t.actionHandler.callback(n,e)}})));var d={sanitize:!0,renderer:h};return n.innerHTML=l(e.value,d),o(),n}o.d(t,"c",(function(){return c})),o.d(t,"a",(function(){return h})),o.d(t,"b",(function(){return d}));var g=function(){function e(e){this.source=e,this.index=0}return e.prototype.eos=function(){return this.index>=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}();function p(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}},function(e,t,o){"use strict";o.d(t,"a",(function(){return i})),o.d(t,"b",(function(){return r}));var n=function(){function e(e,t,o){this.from=0|e,this.to=0|t,this.colorId=0|o}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}(),i=function(){function e(e,t,o){this.startLineNumber=e,this.endLineNumber=t,this.color=o,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.coloro&&(g=o-p);var f=u.color,m=this._color2Id[f];m||(m=++this._lastAssignedId,this._color2Id[f]=m,this._id2Color[m]=f);var _=new n(g-p,g+p,m);u.setColorZone(_),s.push(_)}return this._colorZonesInvalid=!1,s.sort(n.compare),s},e}()},function(e,t,o){"use strict";for(var n=o(64),i=o(126),r=o(182),s=o(100),a=new Array(256),l=0;l<256;l++)a[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;a[254]=a[254]=1;function u(){s.call(this,"utf-8 decode"),this.leftOver=null}function c(){s.call(this,"utf-8 encode")}t.utf8encode=function(e){return i.nodebuffer?r.newBufferFrom(e,"utf-8"):function(e){var t,o,n,r,s,a=e.length,l=0;for(r=0;r>>6,t[s++]=128|63&o):o<65536?(t[s++]=224|o>>>12,t[s++]=128|o>>>6&63,t[s++]=128|63&o):(t[s++]=240|o>>>18,t[s++]=128|o>>>12&63,t[s++]=128|o>>>6&63,t[s++]=128|63&o);return t}(e)},t.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,o,i,r,s=e.length,l=new Array(2*s);for(o=0,t=0;t4)l[o++]=65533,t+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&t1?l[o++]=65533:i<65536?l[o++]=i:(i-=65536,l[o++]=55296|i>>10&1023,l[o++]=56320|1023&i)}return l.length!==o&&(l.subarray?l=l.subarray(0,o):l.length=o),n.applyFromCharCode(l)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(u,s),u.prototype.processChunk=function(e){var o=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var r=o;(o=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),o.set(r,this.leftOver.length)}else o=this.leftOver.concat(o);this.leftOver=null}var s=function(e,t){var o;for((t=t||e.length)>e.length&&(t=e.length),o=t-1;o>=0&&128==(192&e[o]);)o--;return o<0?t:0===o?t:o+a[e[o]]>t?o:t}(o),l=o;s!==o.length&&(i.uint8array?(l=o.subarray(0,s),this.leftOver=o.subarray(s,o.length)):(l=o.slice(0,s),this.leftOver=o.slice(s,o.length))),this.push({data:t.utf8decode(l),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=u,n.inherits(c,s),c.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=c},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var o=function(){};o.prototype=t.prototype,e.prototype=new o,e.prototype.constructor=e}}},function(e,t,o){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function r(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new r(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},o(332),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,o(80))},function(e,t,o){"use strict";function n(e,t,o){var n=o?" !== ":" === ",i=o?" || ":" && ",r=o?"!":"",s=o?"":"!";switch(e){case"null":return t+n+"null";case"array":return r+"Array.isArray("+t+")";case"object":return"("+r+t+i+"typeof "+t+n+'"object"'+i+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+n+'"number"'+i+s+"("+t+" % 1)"+i+t+n+t+")";default:return"typeof "+t+n+'"'+e+'"'}}e.exports={copy:function(e,t){for(var o in t=t||{},e)t[o]=e[o];return t},checkDataType:n,checkDataTypes:function(e,t){switch(e.length){case 1:return n(e[0],t,!0);default:var o="",i=r(e);for(var s in i.array&&i.object&&(o=i.null?"(":"(!"+t+" || ",o+="typeof "+t+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer,i)o+=(o?" && ":"")+n(s,t,!0);return o}},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var o=[],n=0;n=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return o[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(r="data"+(t-n||""),!i)return r}for(var a=r,u=i.split("/"),c=0;c0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},s=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var l=o(109),u=o(101),c=o(522),h=o(523),d=o(138),g=o(524),p=o(152);!function(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}(o(101));var f,m,_=function(){function e(){}return e.prototype.error=function(e){console.error(e)},e.prototype.warn=function(e){console.warn(e)},e.prototype.info=function(e){console.info(e)},e.prototype.log=function(e){console.log(e)},e}();!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(f=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(m=t.CloseAction||(t.CloseAction={}));var y,v,b,E=function(){function e(e){this.name=e,this.restarts=[]}return e.prototype.error=function(e,t,o){return o&&o<=3?f.Continue:f.Shutdown},e.prototype.closed=function(){return this.restarts.push(Date.now()),this.restarts.length<5?m.Restart:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(l.window.showErrorMessage("The "+this.name+" server crashed 5 times in the last 3 minutes. The server will not be restarted."),m.DoNotRestart):(this.restarts.shift(),m.Restart)},e}();!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(y=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Running=2]="Running"}(v=t.State||(t.State={})),function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.StartFailed=2]="StartFailed",e[e.Running=3]="Running",e[e.Stopping=4]="Stopping",e[e.Stopped=5]="Stopped"}(b||(b={}));var C,S=[u.SymbolKind.File,u.SymbolKind.Module,u.SymbolKind.Namespace,u.SymbolKind.Package,u.SymbolKind.Class,u.SymbolKind.Method,u.SymbolKind.Property,u.SymbolKind.Field,u.SymbolKind.Constructor,u.SymbolKind.Enum,u.SymbolKind.Interface,u.SymbolKind.Function,u.SymbolKind.Variable,u.SymbolKind.Constant,u.SymbolKind.String,u.SymbolKind.Number,u.SymbolKind.Boolean,u.SymbolKind.Array,u.SymbolKind.Object,u.SymbolKind.Key,u.SymbolKind.Null,u.SymbolKind.EnumMember,u.SymbolKind.Struct,u.SymbolKind.Event,u.SymbolKind.Operator,u.SymbolKind.TypeParameter],T=[u.CompletionItemKind.Text,u.CompletionItemKind.Method,u.CompletionItemKind.Function,u.CompletionItemKind.Constructor,u.CompletionItemKind.Field,u.CompletionItemKind.Variable,u.CompletionItemKind.Class,u.CompletionItemKind.Interface,u.CompletionItemKind.Module,u.CompletionItemKind.Property,u.CompletionItemKind.Unit,u.CompletionItemKind.Value,u.CompletionItemKind.Enum,u.CompletionItemKind.Keyword,u.CompletionItemKind.Snippet,u.CompletionItemKind.Color,u.CompletionItemKind.File,u.CompletionItemKind.Reference,u.CompletionItemKind.Folder,u.CompletionItemKind.EnumMember,u.CompletionItemKind.Constant,u.CompletionItemKind.Struct,u.CompletionItemKind.Event,u.CompletionItemKind.Operator,u.CompletionItemKind.TypeParameter];function w(e,t){return void 0===e[t]&&(e[t]={}),e[t]}!function(e){e.is=function(e){var t=e;return t&&d.func(t.register)&&d.func(t.unregister)&&d.func(t.dispose)&&void 0!==t.messages}}(C||(C={}));var k=function(){function e(e,t,o,n,i,r){this._client=e,this._event=t,this._type=o,this._middleware=n,this._createParams=i,this._selectorFilter=r,this._selectors=new Map}return e.textDocumentFilter=function(e,t){var o,n;try{for(var i=a(e),r=i.next();!r.done;r=i.next()){var s=r.value;if(l.languages.match(s,t))return!0}}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return!1},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))},e.prototype.callback=function(e){var t=this;this._selectorFilter&&!this._selectorFilter(this._selectors.values(),e)||(this._middleware?this._middleware(e,(function(e){return t._client.sendNotification(t._type,t._createParams(e))})):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))},e.prototype.notificationSent=function(e){},e.prototype.unregister=function(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._selectors.clear(),this._listener&&this._listener.dispose()},e}(),O=function(e){function t(t,o){var n=e.call(this,t,l.workspace.onDidOpenTextDocument,u.DidOpenTextDocumentNotification.type,t.clientOptions.middleware.didOpen,(function(e){return t.code2ProtocolConverter.asOpenTextDocumentParams(e)}),k.textDocumentFilter)||this;return n._syncedDocuments=o,n}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.DidOpenTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.openClose&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},t.prototype.register=function(t,o){var n=this;if(e.prototype.register.call(this,t,o),o.registerOptions.documentSelector){var i=o.registerOptions.documentSelector;l.workspace.textDocuments.forEach((function(e){var t=e.uri.toString();if(!n._syncedDocuments.has(t)&&l.languages.match(i,e)){var o=n._client.clientOptions.middleware,r=function(e){n._client.sendNotification(n._type,n._createParams(e))};o.didOpen?o.didOpen(e,r):r(e),n._syncedDocuments.set(t,e)}}))}},t.prototype.notificationSent=function(t){e.prototype.notificationSent.call(this,t),this._syncedDocuments.set(t.uri.toString(),t)},t}(k),R=function(e){function t(t,o){var n=e.call(this,t,l.workspace.onDidCloseTextDocument,u.DidCloseTextDocumentNotification.type,t.clientOptions.middleware.didClose,(function(e){return t.code2ProtocolConverter.asCloseTextDocumentParams(e)}),k.textDocumentFilter)||this;return n._syncedDocuments=o,n}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.DidCloseTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.openClose&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},t.prototype.notificationSent=function(t){e.prototype.notificationSent.call(this,t),this._syncedDocuments.delete(t.uri.toString())},t.prototype.unregister=function(t){var o=this,n=this._selectors.get(t);e.prototype.unregister.call(this,t);var i=this._selectors.values();this._syncedDocuments.forEach((function(e){if(l.languages.match(n,e)&&!o._selectorFilter(i,e)){var t=o._client.clientOptions.middleware,r=function(e){o._client.sendNotification(o._type,o._createParams(e))};o._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,r):r(e)}}))},t}(k),N=function(){function e(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.DidChangeTextDocumentNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").dynamicRegistration=!0},e.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&void 0!==o.change&&o.change!==u.TextDocumentSyncKind.None&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:o.change})})},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=l.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(t.id,{documentSelector:t.registerOptions.documentSelector,syncKind:t.registerOptions.syncKind}))},e.prototype.callback=function(e){var t,o,n=this;if(0!==e.contentChanges.length){var i=function(t){if(l.languages.match(t.documentSelector,e.document)){var o=r._client.clientOptions.middleware;if(t.syncKind===u.TextDocumentSyncKind.Incremental){var i=r._client.code2ProtocolConverter.asChangeTextDocumentParams(e);o.didChange?o.didChange(e,(function(){return n._client.sendNotification(u.DidChangeTextDocumentNotification.type,i)})):r._client.sendNotification(u.DidChangeTextDocumentNotification.type,i)}else if(t.syncKind===u.TextDocumentSyncKind.Full){var s=function(e){n._changeDelayer?(n._changeDelayer.uri!==e.document.uri.toString()&&(n.forceDelivery(),n._changeDelayer.uri=e.document.uri.toString()),n._changeDelayer.delayer.trigger((function(){n._client.sendNotification(u.DidChangeTextDocumentNotification.type,n._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}))):(n._changeDelayer={uri:e.document.uri.toString(),delayer:new g.Delayer(200)},n._changeDelayer.delayer.trigger((function(){n._client.sendNotification(u.DidChangeTextDocumentNotification.type,n._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}),-1))};o.didChange?o.didChange(e,s):s(e)}}},r=this;try{for(var s=a(this._changeData.values()),c=s.next();!c.done;c=s.next()){i(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}}},e.prototype.unregister=function(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.forceDelivery=function(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}},e}(),L=function(e){function t(t){return e.call(this,t,l.workspace.onWillSaveTextDocument,u.WillSaveTextDocumentNotification.type,t.clientOptions.middleware.willSave,(function(e){return t.code2ProtocolConverter.asWillSaveTextDocumentParams(e)}),(function(e,t){return k.textDocumentFilter(e,t.document)}))||this}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.WillSaveTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").willSave=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.willSave&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},t}(k),I=function(){function e(e){this._client=e,this._selectors=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.WillSaveTextDocumentWaitUntilRequest.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").willSaveWaitUntil=!0},e.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.willSaveWaitUntil&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{documentSelector:t}})},e.prototype.register=function(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=l.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))},e.prototype.callback=function(e){var t=this;if(k.textDocumentFilter(this._selectors.values(),e.document)){var o=this._client.clientOptions.middleware,n=function(e){return t._client.sendRequest(u.WillSaveTextDocumentWaitUntilRequest.type,t._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((function(e){var o=t._client.protocol2CodeConverter.asTextEdits(e);return void 0===o?[]:o}))};e.waitUntil(o.willSaveWaitUntil?o.willSaveWaitUntil(e,n):n(e))}},e.prototype.unregister=function(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)},e.prototype.dispose=function(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)},e}(),D=function(e){function t(t){var o=e.call(this,t,l.workspace.onDidSaveTextDocument,u.DidSaveTextDocumentNotification.type,t.clientOptions.middleware.didSave,(function(e){return t.code2ProtocolConverter.asSaveTextDocumentParams(e,o._includeText)}),k.textDocumentFilter)||this;return o}return i(t,e),Object.defineProperty(t.prototype,"messages",{get:function(){return u.DidSaveTextDocumentNotification.type},enumerable:!0,configurable:!0}),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"synchronization").didSave=!0},t.prototype.initialize=function(e,t){var o=e.resolvedTextDocumentSync;t&&o&&o.save&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{includeText:!!o.save.includeText})})},t.prototype.register=function(t,o){this._includeText=!!o.registerOptions.includeText,e.prototype.register.call(this,t,o)},t}(k),A=function(){function e(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.DidChangeWatchedFilesNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0},e.prototype.initialize=function(e,t){},e.prototype.register=function(e,t){var o,n;if(Array.isArray(t.registerOptions.watchers)){var i=[];try{for(var r=a(t.registerOptions.watchers),s=r.next();!s.done;s=r.next()){var c=s.value;if(d.string(c.globPattern)){var h=!0,g=!0,p=!0;void 0!==c.kind&&null!==c.kind&&(h=0!=(c.kind&u.WatchKind.Create),g=0!=(c.kind&u.WatchKind.Change),p=0!=(c.kind&u.WatchKind.Delete));var f=l.workspace.createFileSystemWatcher(c.globPattern,!h,!g,!p);this.hookListeners(f,h,g,p),i.push(f)}}}catch(e){o={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}this._watchers.set(t.id,i)}},e.prototype.registerRaw=function(e,t){var o,n,i=[];try{for(var r=a(t),s=r.next();!s.done;s=r.next()){var l=s.value;this.hookListeners(l,!0,!0,!0,i)}}catch(e){o={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}this._watchers.set(e,i)},e.prototype.hookListeners=function(e,t,o,n,i){var r=this;t&&e.onDidCreate((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:u.FileChangeType.Created})}),null,i),o&&e.onDidChange((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:u.FileChangeType.Changed})}),null,i),n&&e.onDidDelete((function(e){return r._notifyFileEvent({uri:r._client.code2ProtocolConverter.asUri(e),type:u.FileChangeType.Deleted})}),null,i)},e.prototype.unregister=function(e){var t,o,n=this._watchers.get(e);if(n)try{for(var i=a(n),r=i.next();!r.done;r=i.next()){r.value.dispose()}}catch(e){t={error:e}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(t)throw t.error}}},e.prototype.dispose=function(){this._watchers.forEach((function(e){var t,o;try{for(var n=a(e),i=n.next();!i.done;i=n.next()){i.value.dispose()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(t)throw t.error}}})),this._watchers.clear()},e}(),P=function(){function e(e,t){this._client=e,this._message=t,this._providers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){if(e.method!==this.messages.method)throw new Error("Register called on wrong feature. Requested "+e.method+" but reached feature "+this.messages.method);if(t.registerOptions.documentSelector){var o=this.registerLanguageProvider(t.registerOptions);o&&this._providers.set(t.id,o)}},e.prototype.unregister=function(e){var t=this._providers.get(e);t&&t.dispose()},e.prototype.dispose=function(){this._providers.forEach((function(e){e.dispose()})),this._providers.clear()},e}();t.TextDocumentFeature=P;var M=function(){function e(e,t){this._client=e,this._message=t,this._providers=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return this._message},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){if(e.method!==this.messages.method)throw new Error("Register called on wron feature. Requested "+e.method+" but reached feature "+this.messages.method);var o=this.registerLanguageProvider(t.registerOptions);o&&this._providers.set(t.id,o)},e.prototype.unregister=function(e){var t=this._providers.get(e);t&&t.dispose()},e.prototype.dispose=function(){this._providers.forEach((function(e){e.dispose()})),this._providers.clear()},e}(),x=function(e){function t(t){return e.call(this,t,u.CompletionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[u.MarkupKind.Markdown,u.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0},t.completionItemKind={valueSet:T}},t.prototype.initialize=function(e,t){e.completionProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.completionProvider)})},t.prototype.registerLanguageProvider=function(e){var t=e.triggerCharacters||[],o=this._client,n=function(e,t,n,i){return o.sendRequest(u.CompletionRequest.type,o.code2ProtocolConverter.asCompletionParams(e,t,n),i).then(o.protocol2CodeConverter.asCompletionResult,(function(e){return o.logFailedRequest(u.CompletionRequest.type,e),Promise.resolve([])}))},i=function(e,t){return o.sendRequest(u.CompletionResolveRequest.type,o.code2ProtocolConverter.asCompletionItem(e),t).then(o.protocol2CodeConverter.asCompletionItem,(function(t){return o.logFailedRequest(u.CompletionResolveRequest.type,t),Promise.resolve(e)}))},r=this._client.clientOptions.middleware;return l.languages.registerCompletionItemProvider.apply(l.languages,s([e.documentSelector,{provideCompletionItems:function(e,t,o,i){return r.provideCompletionItem?r.provideCompletionItem(e,t,i,o,n):n(e,t,i,o)},resolveCompletionItem:e.resolveProvider?function(e,t){return r.resolveCompletionItem?r.resolveCompletionItem(e,t,i):i(e,t)}:void 0}],t))},t}(P),B=function(e){function t(t){return e.call(this,t,u.HoverRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[u.MarkupKind.Markdown,u.MarkupKind.PlainText]},t.prototype.initialize=function(e,t){e.hoverProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.HoverRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asHover,(function(e){return t.logFailedRequest(u.HoverRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware;return l.languages.registerHoverProvider(e.documentSelector,{provideHover:function(e,t,i){return n.provideHover?n.provideHover(e,t,i,o):o(e,t,i)}})},t}(P),F=function(e){function t(t){return e.call(this,t,u.SignatureHelpRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[u.MarkupKind.Markdown,u.MarkupKind.PlainText]}},t.prototype.initialize=function(e,t){e.signatureHelpProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.signatureHelpProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.SignatureHelpRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asSignatureHelp,(function(e){return t.logFailedRequest(u.SignatureHelpRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware,i=e.triggerCharacters||[];return l.languages.registerSignatureHelpProvider.apply(l.languages,s([e.documentSelector,{provideSignatureHelp:function(e,t,i){return n.provideSignatureHelp?n.provideSignatureHelp(e,t,i,o):o(e,t,i)}}],i))},t}(P),H=function(e){function t(t){return e.call(this,t,u.DefinitionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"definition").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.definitionProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.DefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(u.DefinitionRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware;return l.languages.registerDefinitionProvider(e.documentSelector,{provideDefinition:function(e,t,i){return n.provideDefinition?n.provideDefinition(e,t,i,o):o(e,t,i)}})},t}(P),U=function(e){function t(t){return e.call(this,t,u.ReferencesRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"references").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.referencesProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){return t.sendRequest(u.ReferencesRequest.type,t.code2ProtocolConverter.asReferenceParams(e,o,n),i).then(t.protocol2CodeConverter.asReferences,(function(e){return t.logFailedRequest(u.ReferencesRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerReferenceProvider(e.documentSelector,{provideReferences:function(e,t,i,r){return n.provideReferences?n.provideReferences(e,t,i,r,o):o(e,t,i,r)}})},t}(P),V=function(e){function t(t){return e.call(this,t,u.DocumentHighlightRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"documentHighlight").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentHighlightProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(u.DocumentHighlightRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asDocumentHighlights,(function(e){return t.logFailedRequest(u.DocumentHighlightRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentHighlightProvider(e.documentSelector,{provideDocumentHighlights:function(e,t,i){return n.provideDocumentHighlights?n.provideDocumentHighlights(e,t,i,o):o(e,t,i)}})},t}(P),W=function(e){function t(t){return e.call(this,t,u.DocumentSymbolRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:S},t.hierarchicalDocumentSymbolSupport=!0},t.prototype.initialize=function(e,t){e.documentSymbolProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.DocumentSymbolRequest.type,t.code2ProtocolConverter.asDocumentSymbolParams(e),o).then((function(e){if(null!==e){if(0===e.length)return[];var o=e[0];return u.DocumentSymbol.is(o)?t.protocol2CodeConverter.asDocumentSymbols(e):t.protocol2CodeConverter.asSymbolInformations(e)}}),(function(e){return t.logFailedRequest(u.DocumentSymbolRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentSymbolProvider(e.documentSelector,{provideDocumentSymbols:function(e,t){return n.provideDocumentSymbols?n.provideDocumentSymbols(e,t,o):o(e,t)}})},t}(P),j=function(e){function t(t){return e.call(this,t,u.WorkspaceSymbolRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:S}},t.prototype.initialize=function(e){e.workspaceSymbolProvider&&this.register(this.messages,{id:p.generateUuid(),registerOptions:void 0})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.WorkspaceSymbolRequest.type,{query:e},o).then(t.protocol2CodeConverter.asSymbolInformations,(function(e){return t.logFailedRequest(u.WorkspaceSymbolRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerWorkspaceSymbolProvider({provideWorkspaceSymbols:function(e,t){return n.provideWorkspaceSymbols?n.provideWorkspaceSymbols(e,t,o):o(e,t)}})},t}(M),G=function(e){function t(t){return e.call(this,t,u.CodeActionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=w(w(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.codeActionLiteralSupport={codeActionKind:{valueSet:["",u.CodeActionKind.QuickFix,u.CodeActionKind.Refactor,u.CodeActionKind.RefactorExtract,u.CodeActionKind.RefactorInline,u.CodeActionKind.RefactorRewrite,u.CodeActionKind.Source,u.CodeActionKind.SourceOrganizeImports]}}},t.prototype.initialize=function(e,t){e.codeActionProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(o),context:t.code2ProtocolConverter.asCodeActionContext(n)};return t.sendRequest(u.CodeActionRequest.type,r,i).then((function(e){var o,n;if(null!==e){var i=[];try{for(var r=a(e),s=r.next();!s.done;s=r.next()){var l=s.value;u.Command.is(l)?i.push(t.protocol2CodeConverter.asCommand(l)):i.push(t.protocol2CodeConverter.asCodeAction(l))}}catch(e){o={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return i}}),(function(e){return t.logFailedRequest(u.CodeActionRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerCodeActionsProvider(e.documentSelector,{provideCodeActions:function(e,t,i,r){return n.provideCodeActions?n.provideCodeActions(e,t,i,r,o):o(e,t,i,r)}})},t}(P),z=function(e){function t(t){return e.call(this,t,u.CodeLensRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"codeLens").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.codeLensProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.codeLensProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.CodeLensRequest.type,t.code2ProtocolConverter.asCodeLensParams(e),o).then(t.protocol2CodeConverter.asCodeLenses,(function(e){return t.logFailedRequest(u.CodeLensRequest.type,e),Promise.resolve([])}))},n=function(e,o){return t.sendRequest(u.CodeLensResolveRequest.type,t.code2ProtocolConverter.asCodeLens(e),o).then(t.protocol2CodeConverter.asCodeLens,(function(o){return t.logFailedRequest(u.CodeLensResolveRequest.type,o),e}))},i=t.clientOptions.middleware;return l.languages.registerCodeLensProvider(e.documentSelector,{provideCodeLenses:function(e,t){return i.provideCodeLenses?i.provideCodeLenses(e,t,o):o(e,t)},resolveCodeLens:e.resolveProvider?function(e,t){return i.resolveCodeLens?i.resolveCodeLens(e,t,n):n(e,t)}:void 0})},t}(P),K=function(e){function t(t){return e.call(this,t,u.DocumentFormattingRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"formatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentFormattingProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){var i={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),options:t.code2ProtocolConverter.asFormattingOptions(o)};return t.sendRequest(u.DocumentFormattingRequest.type,i,n).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(u.DocumentFormattingRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentFormattingEditProvider(e.documentSelector,{provideDocumentFormattingEdits:function(e,t,i){return n.provideDocumentFormattingEdits?n.provideDocumentFormattingEdits(e,t,i,o):o(e,t,i)}})},t}(P),Y=function(e){function t(t){return e.call(this,t,u.DocumentRangeFormattingRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentRangeFormattingProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(o),options:t.code2ProtocolConverter.asFormattingOptions(n)};return t.sendRequest(u.DocumentRangeFormattingRequest.type,r,i).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(u.DocumentRangeFormattingRequest.type,e),Promise.resolve([])}))},n=t.clientOptions.middleware;return l.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,{provideDocumentRangeFormattingEdits:function(e,t,i,r){return n.provideDocumentRangeFormattingEdits?n.provideDocumentRangeFormattingEdits(e,t,i,r,o):o(e,t,i,r)}})},t}(P),X=function(e){function t(t){return e.call(this,t,u.DocumentOnTypeFormattingRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentOnTypeFormattingProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentOnTypeFormattingProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=e.moreTriggerCharacter||[],n=function(e,o,n,i,r){var s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(o),ch:n,options:t.code2ProtocolConverter.asFormattingOptions(i)};return t.sendRequest(u.DocumentOnTypeFormattingRequest.type,s,r).then(t.protocol2CodeConverter.asTextEdits,(function(e){return t.logFailedRequest(u.DocumentOnTypeFormattingRequest.type,e),Promise.resolve([])}))},i=t.clientOptions.middleware;return l.languages.registerOnTypeFormattingEditProvider.apply(l.languages,s([e.documentSelector,{provideOnTypeFormattingEdits:function(e,t,o,r,s){return i.provideOnTypeFormattingEdits?i.provideOnTypeFormattingEdits(e,t,o,r,s,n):n(e,t,o,r,s)}},e.firstTriggerCharacter],o))},t}(P),q=function(e){function t(t){return e.call(this,t,u.RenameRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"rename").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.renameProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n,i){var r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(o),newName:n};return t.sendRequest(u.RenameRequest.type,r,i).then(t.protocol2CodeConverter.asWorkspaceEdit,(function(e){return t.logFailedRequest(u.RenameRequest.type,e),Promise.reject(new Error(e.message))}))},n=t.clientOptions.middleware;return l.languages.registerRenameProvider(e.documentSelector,{provideRenameEdits:function(e,t,i,r){return n.provideRenameEdits?n.provideRenameEdits(e,t,i,r,o):o(e,t,i,r)}})},t}(P),$=function(e){function t(t){return e.call(this,t,u.DocumentLinkRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){w(w(e,"textDocument"),"documentLink").dynamicRegistration=!0},t.prototype.initialize=function(e,t){e.documentLinkProvider&&t&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentLinkProvider)})},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o){return t.sendRequest(u.DocumentLinkRequest.type,t.code2ProtocolConverter.asDocumentLinkParams(e),o).then(t.protocol2CodeConverter.asDocumentLinks,(function(e){t.logFailedRequest(u.DocumentLinkRequest.type,e),Promise.resolve(new Error(e.message))}))},n=function(e,o){return t.sendRequest(u.DocumentLinkResolveRequest.type,t.code2ProtocolConverter.asDocumentLink(e),o).then(t.protocol2CodeConverter.asDocumentLink,(function(e){t.logFailedRequest(u.DocumentLinkResolveRequest.type,e),Promise.resolve(new Error(e.message))}))},i=t.clientOptions.middleware;return l.languages.registerDocumentLinkProvider(e.documentSelector,{provideDocumentLinks:function(e,t){return i.provideDocumentLinks?i.provideDocumentLinks(e,t,o):o(e,t)},resolveDocumentLink:e.resolveProvider?function(e,t){return i.resolveDocumentLink?i.resolveDocumentLink(e,t,n):n(e,t)}:void 0})},t}(P),J=function(){function e(e){this._client=e,this._listeners=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.DidChangeConfigurationNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0},e.prototype.initialize=function(){var e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register(this.messages,{id:p.generateUuid(),registerOptions:{section:e}})},e.prototype.register=function(e,t){var o=this,n=l.workspace.onDidChangeConfiguration((function(e){o.onDidChangeConfiguration(t.registerOptions.section,e)}));this._listeners.set(t.id,n),void 0!==t.registerOptions.section&&this.onDidChangeConfiguration(t.registerOptions.section,void 0)},e.prototype.unregister=function(e){var t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())},e.prototype.dispose=function(){var e,t;try{for(var o=a(this._listeners.values()),n=o.next();!n.done;n=o.next()){n.value.dispose()}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this._listeners.clear()},e.prototype.onDidChangeConfiguration=function(e,t){var o,n=this;if(void 0!==(o=d.string(e)?[e]:e)&&void 0!==t&&!o.some((function(e){return t.affectsConfiguration(e)})))return;var i=function(e){void 0!==e?n._client.sendNotification(u.DidChangeConfigurationNotification.type,{settings:n.extractSettingsInformation(e)}):n._client.sendNotification(u.DidChangeConfigurationNotification.type,{settings:null})},r=this.getMiddleware();r?r(o,i):i(o)},e.prototype.extractSettingsInformation=function(e){function t(e,t){for(var o=e,n=0;n=0?l.workspace.getConfiguration(r.substr(0,s),o).get(r.substr(s+1)):l.workspace.getConfiguration(r,o)){var u=e[i].split(".");t(n,u)[u[u.length-1]]=a}}return n},e.prototype.getMiddleware=function(){var e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0},e}(),Z=function(){function e(e){this._client=e,this._commands=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return u.ExecuteCommandRequest.type},enumerable:!0,configurable:!0}),e.prototype.fillClientCapabilities=function(e){w(w(e,"workspace"),"executeCommand").dynamicRegistration=!0},e.prototype.initialize=function(e){e.executeCommandProvider&&this.register(this.messages,{id:p.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})},e.prototype.register=function(e,t){var o,n,i=this._client;if(t.registerOptions.commands){var r=[],s=function(e){r.push(l.commands.registerCommand(e,(function(){for(var t=[],o=0;o=0){var h=i.get(c.textDocument.uri);if(h&&h.version!==c.textDocument.version){r=!0;break}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}return r?Promise.resolve({applied:!1}):l.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then((function(e){return{applied:e}}))},t.prototype.logFailedRequest=function(e,t){t instanceof u.ResponseError&&t.code===u.ErrorCodes.RequestCancelled||this.error("Request "+e.method+" failed.",t)},t}();t.BaseLanguageClient=Q}).call(this,o(108))},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._value=e}return e.prototype.asHex=function(){return this._value},e.prototype.equals=function(e){return this.asHex()===e.asHex()},e}(),s=function(e){function t(){return e.call(this,[t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),"-","4",t._randomHex(),t._randomHex(),t._randomHex(),"-",t._oneOf(t._timeHighBits),t._randomHex(),t._randomHex(),t._randomHex(),"-",t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex(),t._randomHex()].join(""))||this}return i(t,e),t._oneOf=function(e){return e[Math.floor(e.length*Math.random())]},t._randomHex=function(){return t._oneOf(t._chars)},t._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],t._timeHighBits=["8","9","a","b"],t}(r);function a(){return new s}t.empty=new r("00000000-0000-0000-0000-000000000000"),t.v4=a;var l=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function u(e){return l.test(e)}t.isUUID=u,t.parse=function(e){if(!u(e))throw new Error("invalid uuid");return new r(e)},t.generateUuid=function(){return a().asHex()}},function(e,t,o){"use strict";o.r(t),o.d(t,"ToggleTabFocusModeAction",(function(){return l}));var n,i=o(0),r=o(3),s=o(130),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(e){function t(){return e.call(this,{id:t.ID,label:i.a({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:null,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})||this}return a(t,e),t.prototype.run=function(e,t){var o=s.b.getTabFocusMode();s.b.setTabFocusMode(!o)},t.ID="editor.action.toggleTabFocusMode",t}(r.b);Object(r.f)(l)},function(e,t,o){"use strict";o.r(t),o.d(t,"DefinitionActionConfig",(function(){return C})),o.d(t,"DefinitionAction",(function(){return S})),o.d(t,"GoToDefinitionAction",(function(){return w})),o.d(t,"OpenDefinitionToSideAction",(function(){return k})),o.d(t,"PeekDefinitionAction",(function(){return O})),o.d(t,"ImplementationAction",(function(){return R})),o.d(t,"GoToImplementationAction",(function(){return N})),o.d(t,"PeekImplementationAction",(function(){return L})),o.d(t,"TypeDefinitionAction",(function(){return I})),o.d(t,"GoToTypeDefinitionAction",(function(){return D})),o.d(t,"PeekTypeDefinitionAction",(function(){return A}));var n,i=o(0),r=o(58),s=o(39),a=o(15),l=o(36),u=o(2),c=o(3),h=o(164),d=o(99),g=o(56),p=o(113),f=o(12),m=o(142),_=o(5),y=o(128),v=o(45),b=o(17),E=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),C=function(e,t,o,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===o&&(o=!0),void 0===n&&(n=!0),this.openToSide=e,this.openInPeek=t,this.filterCurrent=o,this.showMessage=n},S=function(e){function t(t,o){var n=e.call(this,o)||this;return n._configuration=t,n}return E(t,e),t.prototype.run=function(e,t){var o=this,n=e.get(v.a),i=e.get(l.a),r=e.get(y.a),s=t.getModel(),a=t.getPosition(),c=this._getDeclarationsAtPosition(s,a).then((function(e){if(!s.isDisposed()&&t.getModel()===s){for(var n=-1,r=[],l=0;l1&&i.a("meta.title"," – {0} definitions",e.references.length)},t.prototype._onResult=function(e,t,o){var n=this,i=o.getAriaMessage();if(Object(r.a)(i),this._configuration.openInPeek)this._openInPeek(e,t,o);else{var s=o.nearestReference(t.getModel().uri,t.getPosition());this._openReference(t,e,s,this._configuration.openToSide).then((function(t){t&&o.references.length>1?n._openInPeek(e,t,o):o.dispose()}))}},t.prototype._openReference=function(e,t,o,n){var i=o.uri,r=o.range;return t.openCodeEditor({resource:i,options:{selection:u.a.collapseToStart(r),revealIfOpened:!0,revealInCenterIfOutsideViewport:!0}},e,n)},t.prototype._openInPeek=function(e,t,o){var n=this,i=d.a.get(t);i?i.toggleWidget(t.getSelection(),Object(b.i)((function(e){return Promise.resolve(o)})),{getMetaTitle:function(e){return n._getMetaTitle(e)},onGoto:function(o){return i.closeWidget(),n._openReference(t,e,o,!1)}}):o.dispose()},t}(c.b),T=a.f?2118:70,w=function(e){function t(){return e.call(this,new C,{id:t.ID,label:i.a("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:f.d.and(_.a.hasDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:T,weight:100},menuOpts:{group:"navigation",order:1.1}})||this}return E(t,e),t.ID="editor.action.goToDeclaration",t}(S),k=function(e){function t(){return e.call(this,new C(!0),{id:t.ID,label:i.a("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:f.d.and(_.a.hasDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:Object(s.a)(2089,T),weight:100}})||this}return E(t,e),t.ID="editor.action.openDeclarationToTheSide",t}(S),O=function(e){function t(){return e.call(this,new C(void 0,!0,!1),{id:"editor.action.previewDeclaration",label:i.a("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:f.d.and(_.a.hasDefinitionProvider,p.a.notInPeekEditor,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menuOpts:{group:"navigation",order:1.2}})||this}return E(t,e),t}(S),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return Object(h.b)(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?i.a("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):i.a("goToImplementation.generic.noResults","No implementation found")},t.prototype._getMetaTitle=function(e){return e.references.length>1&&i.a("meta.implementations.title"," – {0} implementations",e.references.length)},t}(S),N=function(e){function t(){return e.call(this,new C,{id:t.ID,label:i.a("actions.goToImplementation.label","Go to Implementation"),alias:"Go to Implementation",precondition:f.d.and(_.a.hasImplementationProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:2118,weight:100}})||this}return E(t,e),t.ID="editor.action.goToImplementation",t}(R),L=function(e){function t(){return e.call(this,new C(!1,!0,!1),{id:t.ID,label:i.a("actions.peekImplementation.label","Peek Implementation"),alias:"Peek Implementation",precondition:f.d.and(_.a.hasImplementationProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:3142,weight:100}})||this}return E(t,e),t.ID="editor.action.peekImplementation",t}(R),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return Object(h.c)(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?i.a("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):i.a("goToTypeDefinition.generic.noResults","No type definition found")},t.prototype._getMetaTitle=function(e){return e.references.length>1&&i.a("meta.typeDefinitions.title"," – {0} type definitions",e.references.length)},t}(S),D=function(e){function t(){return e.call(this,new C,{id:t.ID,label:i.a("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:f.d.and(_.a.hasTypeDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:0,weight:100},menuOpts:{group:"navigation",order:1.4}})||this}return E(t,e),t.ID="editor.action.goToTypeDefinition",t}(I),A=function(e){function t(){return e.call(this,new C(!1,!0,!1),{id:t.ID,label:i.a("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:f.d.and(_.a.hasTypeDefinitionProvider,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:0,weight:100}})||this}return E(t,e),t.ID="editor.action.peekTypeDefinition",t}(I);Object(c.f)(w),Object(c.f)(k),Object(c.f)(O),Object(c.f)(N),Object(c.f)(L),Object(c.f)(D),Object(c.f)(A)},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}));var n=function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.nextId=function(){return this._prefix+ ++this._lastId},e}(),i=new n("id#")},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("IWorkspaceEditService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return f}));var n,i=o(30),r=o(22),s=o(37),a=o(12),l=o(36),u=o(140),c=o(19),h=o(45),d=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),g=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},p=function(e,t){return function(o,n){t(o,n,e)}},f=function(e){function t(t,o,n,i,r,s,a,l,u){var c=e.call(this,t,n.getRawConfiguration(),{},i,r,s,a,l,u)||this;return c._parentEditor=n,c._overwriteOptions=o,e.prototype.updateOptions.call(c,c._overwriteOptions),c._register(n.onDidChangeConfiguration((function(e){return c._onParentConfigurationChanged(e)}))),c}return d(t,e),t.prototype.getParentEditor=function(){return this._parentEditor},t.prototype._onParentConfigurationChanged=function(t){e.prototype.updateOptions.call(this,this._parentEditor.getRawConfiguration()),e.prototype.updateOptions.call(this,this._overwriteOptions)},t.prototype.updateOptions=function(t){i.g(this._overwriteOptions,t,!0),e.prototype.updateOptions.call(this,this._overwriteOptions)},t=g([p(3,r.a),p(4,l.a),p(5,s.b),p(6,a.e),p(7,c.c),p(8,h.a)],t)}(u.a)},function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"b",(function(){return s}));var n=o(92),i=function(e,t){this.index=e,this.remainder=t},r=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=Object(n.b)(e);var o=this.values,i=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(o.length+r),this.values.set(o.subarray(0,e),0),this.values.set(o.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=Object(n.b)(e),t=Object(n.b)(t),this.values[e]!==t&&(this.values[e]=t,e-1=o.length)return!1;var r=o.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(o.length-t),this.values.set(o.subarray(0,e),0),this.values.set(o.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=Object(n.b)(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var o=t;o<=e;o++)this.prefixSum[o]=this.prefixSum[o-1]+this.values[o];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,o,n,r=0,s=this.values.length-1;r<=s;)if(t=r+(s-r)/2|0,e<(n=(o=this.prefixSum[t])-this.values[t]))s=t-1;else{if(!(e>=o))break;r=t+1}return new i(t,e-n)},e}(),s=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new r(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=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var o=0;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},g=function(e,t){return function(o,n){t(o,n,e)}},p=function(){function e(e,t,o){void 0===o&&(o=i.b),this._editor=e,this._modeService=t,this._openerService=o,this._onDidRenderCodeBlock=new c.a,this.onDidRenderCodeBlock=this._onDidRenderCodeBlock.event}return e.prototype.getOptions=function(e){var t=this;return{codeBlockRenderer:function(e,o){var n=e?t._modeService.getModeIdForLanguageName(e):t._editor.getModel().getLanguageIdentifier().language;return t._modeService.getOrCreateMode(n).then((function(e){return Object(l.b)(o,n)})).then((function(e){return''+e+""}))},codeBlockRenderCallback:function(){return t._onDidRenderCodeBlock.fire()},actionHandler:{callback:function(e){t._openerService.open(s.a.parse(e)).then(void 0,a.e)},disposeables:e}}},e.prototype.render=function(e){var t=[];return{element:e?Object(n.b)(e,this.getOptions(t)):document.createElement("span"),dispose:function(){return Object(h.d)(t)}}},e=d([g(1,r.a),g(2,Object(u.d)(i.a))],e)}()},function(e,t,o){"use strict";o(474);var n,i,r=o(0),s=o(10),a=o(15),l=o(21),u=o(13),c=o(97),h=function(){function e(e){this.modelProvider=Object(l.e)(e.getModel)?e:{getModel:function(){return e}}}return e.prototype.getId=function(e,t){if(!t)return null;var o=this.modelProvider.getModel();return o===t?"__root__":o.dataSource.getId(t)},e.prototype.hasChildren=function(e,t){var o=this.modelProvider.getModel();return o&&o===t&&o.entries.length>0},e.prototype.getChildren=function(e,t){var o=this.modelProvider.getModel();return s.b.as(o===t?o.entries:[])},e.prototype.getParent=function(e,t){return s.b.as(null)},e}(),d=function(){function e(e){this.modelProvider=e}return e.prototype.getAriaLabel=function(e,t){var o=this.modelProvider.getModel();return o.accessibilityProvider&&o.accessibilityProvider.getAriaLabel(t)},e.prototype.getPosInSet=function(e,t){var o=this.modelProvider.getModel();return String(o.entries.indexOf(t)+1)},e.prototype.getSetSize=function(){var e=this.modelProvider.getModel();return String(e.entries.length)},e}(),g=function(){function e(e){this.modelProvider=e}return e.prototype.isVisible=function(e,t){var o=this.modelProvider.getModel();return!o.filter||o.filter.isVisible(t)},e}(),p=function(){function e(e,t){this.modelProvider=e,this.styles=t}return e.prototype.updateStyles=function(e){this.styles=e},e.prototype.getHeight=function(e,t){return this.modelProvider.getModel().renderer.getHeight(t)},e.prototype.getTemplateId=function(e,t){return this.modelProvider.getModel().renderer.getTemplateId(t)},e.prototype.renderTemplate=function(e,t,o){return this.modelProvider.getModel().renderer.renderTemplate(t,o,this.styles)},e.prototype.renderElement=function(e,t,o,n){this.modelProvider.getModel().renderer.renderElement(t,o,n,this.styles)},e.prototype.disposeTemplate=function(e,t,o){this.modelProvider.getModel().renderer.disposeTemplate(t,o)},e}(),f=o(34),m=o(162),_=o(210),y=(o(475),o(1)),v=o(6),b=o(14),E=o(30),C=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),S={progressBarBackground:b.a.fromHex("#0E70C0")},T=function(e){function t(t,o){var n=e.call(this)||this;return n.options=o||Object.create(null),Object(E.g)(n.options,S,!1),n.workedVal=0,n.progressBarBackground=n.options.progressBarBackground,n.create(t),n}return C(t,e),t.prototype.create=function(e){var t=this;Object(f.a)(e).div({class:"monaco-progress-container"},(function(e){t.element=e.clone(),e.div({class:"progress-bit"}).on([y.d.ANIMATION_START,y.d.ANIMATION_END,y.d.ANIMATION_ITERATION],(function(e){switch(e.type){case y.d.ANIMATION_ITERATION:t.animationStopToken&&t.animationStopToken(null)}}),t.toDispose),t.bit=e.getHTMLElement()})),this.applyStyles()},t.prototype.off=function(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.removeClass("active"),this.element.removeClass("infinite"),this.element.removeClass("discrete"),this.workedVal=0,this.totalWork=void 0},t.prototype.stop=function(){return this.doDone(!1)},t.prototype.doDone=function(e){var t=this;return this.element.addClass("done"),this.element.hasClass("infinite")?(this.bit.style.opacity="0",e?s.b.timeout(200).then((function(){return t.off()})):this.off()):(this.bit.style.width="inherit",e?s.b.timeout(200).then((function(){return t.off()})):this.off()),this},t.prototype.hide=function(){this.element.hide()},t.prototype.style=function(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()},t.prototype.applyStyles=function(){if(this.bit){var e=this.progressBarBackground?this.progressBarBackground.toString():null;this.bit.style.backgroundColor=e}},t}(v.a),w=o(51),k=o(75),O=o(42),R=o(41),N=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.prototype.onContextMenu=function(t,o,n){return a.d?this.onLeftClick(t,o,n):e.prototype.onContextMenu.call(this,t,o,n)},t}(k.c);!function(e){e[e.ELEMENT_SELECTED=0]="ELEMENT_SELECTED",e[e.FOCUS_LOST=1]="FOCUS_LOST",e[e.CANCELED=2]="CANCELED"}(i||(i={}));var I={background:b.a.fromHex("#1E1E1E"),foreground:b.a.fromHex("#CCCCCC"),pickerGroupForeground:b.a.fromHex("#0097FB"),pickerGroupBorder:b.a.fromHex("#3F3F46"),widgetShadow:b.a.fromHex("#000000"),progressBarBackground:b.a.fromHex("#0E70C0")},D=r.a("quickOpenAriaLabel","Quick picker. Type to narrow down results."),A=function(e){function t(t,o,n){var i=e.call(this)||this;return i.isDisposed=!1,i.container=t,i.callbacks=o,i.options=n,i.styles=n||Object.create(null),Object(E.g)(i.styles,I,!1),i.model=null,i}return N(t,e),t.prototype.getModel=function(){return this.model},t.prototype.create=function(){var e=this;return this.builder=Object(f.a)().div((function(t){t.on(y.d.KEY_DOWN,(function(t){var o=new w.a(t);if(9===o.keyCode)y.c.stop(t,!0),e.hide(i.CANCELED);else if(2===o.keyCode&&!o.altKey&&!o.ctrlKey&&!o.metaKey){var n=t.currentTarget.querySelectorAll("input, .monaco-tree, .monaco-tree-row.focused .action-label.icon");o.shiftKey&&o.target===n[0]?(y.c.stop(t,!0),n[n.length-1].focus()):o.shiftKey||o.target!==n[n.length-1]||(y.c.stop(t,!0),n[0].focus())}})).on(y.d.CONTEXT_MENU,(function(e){return y.c.stop(e,!0)})).on(y.d.FOCUS,(function(t){return e.gainingFocus()}),null,!0).on(y.d.BLUR,(function(t){return e.loosingFocus(t)}),null,!0),e.progressBar=e._register(new T(t.clone(),{progressBarBackground:e.styles.progressBarBackground})),e.progressBar.hide(),t.div({class:"quick-open-input"},(function(t){e.inputContainer=t,e.inputBox=e._register(new m.b(t.getHTMLElement(),null,{placeholder:e.options.inputPlaceHolder||"",ariaLabel:D,inputBackground:e.styles.inputBackground,inputForeground:e.styles.inputForeground,inputBorder:e.styles.inputBorder,inputValidationInfoBackground:e.styles.inputValidationInfoBackground,inputValidationInfoBorder:e.styles.inputValidationInfoBorder,inputValidationWarningBackground:e.styles.inputValidationWarningBackground,inputValidationWarningBorder:e.styles.inputValidationWarningBorder,inputValidationErrorBackground:e.styles.inputValidationErrorBackground,inputValidationErrorBorder:e.styles.inputValidationErrorBorder})),e.inputElement=e.inputBox.inputElement,e.inputElement.setAttribute("role","combobox"),e.inputElement.setAttribute("aria-haspopup","false"),e.inputElement.setAttribute("aria-autocomplete","list"),y.g(e.inputBox.inputElement,y.d.KEY_DOWN,(function(t){var o=new w.a(t),n=e.shouldOpenInBackground(o);if(2!==o.keyCode)if(18===o.keyCode||16===o.keyCode||12===o.keyCode||11===o.keyCode)y.c.stop(t,!0),e.navigateInTree(o.keyCode,o.shiftKey),e.inputBox.inputElement.selectionStart===e.inputBox.inputElement.selectionEnd&&(e.inputBox.inputElement.selectionStart=e.inputBox.value.length);else if(3===o.keyCode||n){y.c.stop(t,!0);var i=e.tree.getFocus();i&&e.elementSelected(i,t,n?c.a.OPEN_IN_BACKGROUND:c.a.OPEN)}})),y.g(e.inputBox.inputElement,y.d.INPUT,(function(t){e.onType()}))})),e.resultCount=t.div({class:"quick-open-result-count","aria-live":"polite"}).clone(),e.treeContainer=t.div({class:"quick-open-tree"},(function(t){var o=e.options.treeCreator||function(e,t,o){return new _.a(e,t,o)};e.tree=e._register(o(t.getHTMLElement(),{dataSource:new h(e),controller:new L({clickBehavior:k.a.ON_MOUSE_UP,keyboardSupport:e.options.keyboardSupport}),renderer:e.renderer=new p(e,e.styles),filter:new g(e),accessibilityProvider:new d(e)},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:O.b.Visible,horizontalScrollMode:O.b.Hidden,ariaLabel:r.a("treeAriaLabel","Quick Picker"),keyboardSupport:e.options.keyboardSupport,preventRootFocus:!1})),e.treeElement=e.tree.getHTMLElement(),e._register(e.tree.onDidChangeFocus((function(t){e.elementFocused(t.focus,t)}))),e._register(e.tree.onDidChangeSelection((function(t){if(t.selection&&t.selection.length>0){var o=t.payload&&t.payload.originalEvent instanceof R.b?t.payload.originalEvent:void 0,n=!!o&&e.shouldOpenInBackground(o);e.elementSelected(t.selection[0],t,n?c.a.OPEN_IN_BACKGROUND:c.a.OPEN)}})))})).on(y.d.KEY_DOWN,(function(t){var o=new w.a(t);e.quickNavigateConfiguration&&(18!==o.keyCode&&16!==o.keyCode&&12!==o.keyCode&&11!==o.keyCode||(y.c.stop(t,!0),e.navigateInTree(o.keyCode)))})).on(y.d.KEY_UP,(function(t){var o=new w.a(t),n=o.keyCode;if(e.quickNavigateConfiguration){var i=e.quickNavigateConfiguration.keybindings;if(3===n||i.some((function(e){var t=e.getParts(),i=t[0];return!t[1]&&(i.shiftKey&&4===n?!(o.ctrlKey||o.altKey||o.metaKey):!(!i.altKey||6!==n)||(!(!i.ctrlKey||5!==n)||!(!i.metaKey||57!==n)))}))){var r=e.tree.getFocus();r&&e.elementSelected(r,t)}}})).clone()})).addClass("monaco-quick-open-widget").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions),this.applyStyles(),y.g(this.treeContainer.getHTMLElement(),y.d.KEY_DOWN,(function(t){var o=new w.a(t);e.quickNavigateConfiguration||18!==o.keyCode&&16!==o.keyCode&&12!==o.keyCode&&11!==o.keyCode||(y.c.stop(t,!0),e.navigateInTree(o.keyCode,o.shiftKey),e.treeElement.focus())})),this.builder.getHTMLElement()},t.prototype.style=function(e){this.styles=e,this.applyStyles()},t.prototype.applyStyles=function(){if(this.builder){var e=this.styles.foreground?this.styles.foreground.toString():null,t=this.styles.background?this.styles.background.toString():null,o=this.styles.borderColor?this.styles.borderColor.toString():null,n=this.styles.widgetShadow?this.styles.widgetShadow.toString():null;this.builder.style("color",e),this.builder.style("background-color",t),this.builder.style("border-color",o),this.builder.style("border-width",o?"1px":null),this.builder.style("border-style",o?"solid":null),this.builder.style("box-shadow",n?"0 5px 8px "+n:null)}this.progressBar&&this.progressBar.style({progressBarBackground:this.styles.progressBarBackground}),this.inputBox&&this.inputBox.style({inputBackground:this.styles.inputBackground,inputForeground:this.styles.inputForeground,inputBorder:this.styles.inputBorder,inputValidationInfoBackground:this.styles.inputValidationInfoBackground,inputValidationInfoBorder:this.styles.inputValidationInfoBorder,inputValidationWarningBackground:this.styles.inputValidationWarningBackground,inputValidationWarningBorder:this.styles.inputValidationWarningBorder,inputValidationErrorBackground:this.styles.inputValidationErrorBackground,inputValidationErrorBorder:this.styles.inputValidationErrorBorder}),this.tree&&!this.options.treeCreator&&this.tree.style(this.styles),this.renderer&&this.renderer.updateStyles(this.styles)},t.prototype.shouldOpenInBackground=function(e){if(e instanceof w.a){if(17!==e.keyCode)return!1;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;var t=this.inputBox.inputElement;return t.selectionEnd===this.inputBox.value.length&&t.selectionStart===t.selectionEnd}return e.middleButton},t.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},t.prototype.navigateInTree=function(e,t){var o=this.tree.getInput(),n=o?o.entries:[],i=this.tree.getFocus();switch(e){case 18:this.tree.focusNext();break;case 16:this.tree.focusPrevious();break;case 12:this.tree.focusNextPage();break;case 11:this.tree.focusPreviousPage();break;case 2:t?this.tree.focusPrevious():this.tree.focusNext()}var r=this.tree.getFocus();n.length>1&&i===r&&(16===e||2===e&&t?this.tree.focusLast():(18===e||2===e&&!t)&&this.tree.focusFirst()),(r=this.tree.getFocus())&&this.tree.reveal(r).done(null,u.e)},t.prototype.elementFocused=function(e,t){if(e&&this.isVisible()){this.inputElement.setAttribute("aria-activedescendant",this.treeElement.getAttribute("aria-activedescendant"));var o={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};this.model.runner.run(e,c.a.PREVIEW,o)}},t.prototype.elementSelected=function(e,t,o){var n=!0;if(this.isVisible()){var r=o||c.a.OPEN,s={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};n=this.model.runner.run(e,r,s)}n&&this.hide(i.ELEMENT_SELECTED)},t.prototype.extractKeyMods=function(e){return{ctrlCmd:e&&(e.ctrlKey||e.metaKey||e.payload&&e.payload.originalEvent&&(e.payload.originalEvent.ctrlKey||e.payload.originalEvent.metaKey)),alt:e&&(e.altKey||e.payload&&e.payload.originalEvent&&e.payload.originalEvent.altKey)}},t.prototype.show=function(e,t){this.visible=!0,this.isLoosingFocus=!1,this.quickNavigateConfiguration=t?t.quickNavigateConfiguration:void 0,this.quickNavigateConfiguration?(this.inputContainer.hide(),this.builder.show(),this.tree.domFocus()):(this.inputContainer.show(),this.builder.show(),this.inputBox.focus()),this.helpText&&(this.quickNavigateConfiguration||l.h(e)?this.helpText.hide():this.helpText.show()),l.h(e)?this.doShowWithPrefix(e):this.doShowWithInput(e,t&&t.autoFocus?t.autoFocus:{}),t&&t.inputSelection&&!this.quickNavigateConfiguration&&this.inputBox.select(t.inputSelection),this.callbacks.onShow&&this.callbacks.onShow()},t.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},t.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},t.prototype.setInputAndLayout=function(e,t){var o=this;this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.setInput(null).then((function(){return o.model=e,o.inputElement.setAttribute("aria-haspopup",String(e&&e.entries&&e.entries.length>0)),o.tree.setInput(e)})).done((function(){o.tree.layout();var n=e?e.entries.filter((function(t){return o.isElementVisible(e,t)})):[];o.updateResultCount(n.length),n.length&&o.autoFocus(e,n,t)}),u.e)},t.prototype.isElementVisible=function(e,t){return!e.filter||e.filter.isVisible(t)},t.prototype.autoFocus=function(e,t,o){if(void 0===o&&(o={}),o.autoFocusPrefixMatch){for(var n=void 0,i=void 0,r=o.autoFocusPrefixMatch,s=r.toLowerCase(),a=0;ao.autoFocusIndex&&(this.tree.focusNth(o.autoFocusIndex),this.tree.reveal(this.tree.getFocus()).done(null,u.e)):o.autoFocusSecondEntry?t.length>1&&this.tree.focusNth(1):o.autoFocusLastEntry&&t.length>1&&this.tree.focusLast()},t.prototype.getHeight=function(e){var o=this,n=e.renderer;if(!e){var i=n.getHeight(null);return this.options.minItemsToShow?this.options.minItemsToShow*i:0}var r,s=0;this.layoutDimensions&&this.layoutDimensions.height&&(r=.4*(this.layoutDimensions.height-50)),(!r||r>t.MAX_ITEMS_HEIGHT)&&(r=t.MAX_ITEMS_HEIGHT);for(var a=e.entries.filter((function(t){return o.isElementVisible(e,t)})),l=this.options.maxItemsToShow||a.length,u=0;u=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},j=function(e,t){return function(o,n){t(o,n,e)}},G=function(){function e(e,t){this.themeService=t,this.editor=e}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.widget&&(this.widget.destroy(),this.widget=null)},e.prototype.run=function(e){var t=this;this.widget&&(this.widget.destroy(),this.widget=null);var o=function(e){t.clearDecorations(),e&&t.lastKnownEditorSelection&&(t.editor.setSelection(t.lastKnownEditorSelection),t.editor.revealRangeInCenterIfOutsideViewport(t.lastKnownEditorSelection,0)),t.lastKnownEditorSelection=null,t.editor.focus()};this.widget=new B(this.editor,(function(){return o(!1)}),(function(){return o(!0)}),(function(o){t.widget.setInput(e.getModel(o),e.getAutoFocus(o))}),{inputAriaLabel:e.inputAriaLabel},this.themeService),this.lastKnownEditorSelection||(this.lastKnownEditorSelection=this.editor.getSelection()),this.widget.show("")},e.prototype.decorateLine=function(t,o){var n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId),this.rangeHighlightDecorationId=null);var i=[{range:t,options:e._RANGE_HIGHLIGHT_DECORATION}],r=o.deltaDecorations(n,i);this.rangeHighlightDecorationId=r[0]},e.prototype.clearDecorations=function(){this.rangeHighlightDecorationId&&(this.editor.deltaDecorations([this.rangeHighlightDecorationId],[]),this.rangeHighlightDecorationId=null)},e.ID="editor.controller.quickOpenController",e._RANGE_HIGHLIGHT_DECORATION=U.a.register({className:"rangeHighlight",isWholeLine:!0}),e=W([j(1,H.c)],e)}(),z=function(e){function t(t,o){var n=e.call(this,o)||this;return n._inputAriaLabel=t,n}return V(t,e),t.prototype.getController=function(e){return G.get(e)},t.prototype._show=function(e,t){e.run({inputAriaLabel:this._inputAriaLabel,getModel:function(e){return t.getModel(e)},getAutoFocus:function(e){return t.getAutoFocus(e)}})},t}(F.b);Object(F.h)(G)},function(e,t,o){"use strict";o(440);var n=o(0),i=o(24),r=o(1),s=o(144),a=o(58),l=o(74),u=o(203),c=o(4),h=o(59),d=o(14),g=o(30),p=o(112),f=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=10),this._initialize(e),this._limit=t,this._onChange()}return e.prototype.add=function(e){this._history.delete(e),this._history.add(e),this._onChange()},e.prototype.next=function(){return this._navigator.next()},e.prototype.previous=function(){return this._navigator.previous()},e.prototype.current=function(){return this._navigator.current()},e.prototype.parent=function(){return null},e.prototype.first=function(){return this._navigator.first()},e.prototype.last=function(){return this._navigator.last()},e.prototype.has=function(e){return this._history.has(e)},e.prototype._onChange=function(){this._reduceToLimit(),this._navigator=new p.b(this._elements,0,this._elements.length,this._elements.length)},e.prototype._reduceToLimit=function(){var e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))},e.prototype._initialize=function(e){this._history=new Set;for(var t=0,o=e;t0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),u=function(){function e(e,t,o){void 0===o&&(o=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=o,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,o,n,i){var r=this.ComputeDiffRecursive(e,t,o,n,[!1]);return i?this.ShiftChanges(r):r},e.prototype.ComputeDiffRecursive=function(e,t,o,i,r){for(r[0]=!1;e<=t&&o<=i&&this.ElementsAreEqual(e,o);)e++,o++;for(;t>=e&&i>=o&&this.ElementsAreEqual(t,i);)t--,i--;if(e>t||o>i){var a=void 0;return o<=i?(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new n(e,0,o,i-o+1)]):e<=t?(s.Assert(o===i+1,"modifiedStart should only be one more than modifiedEnd"),a=[new n(e,t-e+1,o,0)]):(s.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s.Assert(o===i+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}var l=[0],u=[0],c=this.ComputeRecursionPoint(e,t,o,i,l,u,r),h=l[0],d=u[0];if(null!==c)return c;if(!r[0]){var g=this.ComputeDiffRecursive(e,h,o,d,r),p=[];return p=r[0]?[new n(h+1,t-(h+1)+1,d+1,i-(d+1)+1)]:this.ComputeDiffRecursive(h+1,t,d+1,i,r),this.ConcatenateChanges(g,p)}return[new n(e,t-e+1,o,i-o+1)]},e.prototype.WALKTRACE=function(e,t,o,i,r,s,a,u,c,h,d,g,p,f,m,_,y,v){var b,E,C=null,S=new l,T=t,w=o,k=p[0]-_[0]-i,O=Number.MIN_VALUE,R=this.m_forwardHistory.length-1;do{(E=k+e)===T||E=0&&(e=(c=this.m_forwardHistory[R])[0],T=1,w=c.length-1)}while(--R>=-1);if(b=S.getReverseChanges(),v[0]){var N=p[0]+1,L=_[0]+1;if(null!==b&&b.length>0){var I=b[b.length-1];N=Math.max(N,I.getOriginalEnd()),L=Math.max(L,I.getModifiedEnd())}C=[new n(N,g-N+1,L,m-L+1)]}else{S=new l,T=s,w=a,k=p[0]-_[0]-u,O=Number.MAX_VALUE,R=y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(E=k+r)===T||E=h[E+1]?(f=(d=h[E+1]-1)-k-u,d>O&&S.MarkNextChange(),O=d+1,S.AddOriginalElement(d+1,f+1),k=E+1-r):(f=(d=h[E-1])-k-u,d>O&&S.MarkNextChange(),O=d,S.AddModifiedElement(d+1,f+1),k=E-1-r),R>=0&&(r=(h=this.m_reverseHistory[R])[0],T=1,w=h.length-1)}while(--R>=-1);C=S.getChanges()}return this.ConcatenateChanges(b,C)},e.prototype.ComputeRecursionPoint=function(e,t,o,i,r,s,l){var u,c,h,d=0,g=0,p=0,f=0;e--,o--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var m,_,y=t-e+(i-o),v=y+1,b=new Array(v),E=new Array(v),C=i-o,S=t-e,T=e-o,w=t-i,k=(S-C)%2==0;for(b[C]=e,E[S]=t,l[0]=!1,h=1;h<=y/2+1;h++){var O=0,R=0;for(d=this.ClipDiagonalBound(C-h,h,C,v),g=this.ClipDiagonalBound(C+h,h,C,v),m=d;m<=g;m+=2){for(c=(u=m===d||mO+R&&(O=u,R=c),!k&&Math.abs(m-S)<=h-1&&u>=E[m])return r[0]=u,s[0]=c,_<=E[m]&&h<=1448?this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l):null}var N=(O-e+(R-o)-h)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(O,this.OriginalSequence,N))return l[0]=!0,r[0]=O,s[0]=R,N>0&&h<=1448?this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l):[new n(++e,t-e+1,++o,i-o+1)];for(p=this.ClipDiagonalBound(S-h,h,S,v),f=this.ClipDiagonalBound(S+h,h,S,v),m=p;m<=f;m+=2){for(c=(u=m===p||m=E[m+1]?E[m+1]-1:E[m-1])-(m-S)-w,_=u;u>e&&c>o&&this.ElementsAreEqual(u,c);)u--,c--;if(E[m]=u,k&&Math.abs(m-C)<=h&&u<=b[m])return r[0]=u,s[0]=c,_>=b[m]&&h<=1448?this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l):null}if(h<=1447){var L=new Array(g-d+2);L[0]=C-d+1,a.Copy(b,d,L,1,g-d+1),this.m_forwardHistory.push(L),(L=new Array(f-p+2))[0]=S-p+1,a.Copy(E,p,L,1,f-p+1),this.m_reverseHistory.push(L)}}return this.WALKTRACE(C,d,g,T,S,p,f,w,b,E,u,t,r,c,i,s,k,l)},e.prototype.ShiftChanges=function(e){var t;do{t=!1;for(var o=0;o0,a=n.modifiedLength>0;n.originalStart+n.originalLength=0;o--){n=e[o],i=0,r=0;if(o>0){var c=e[o-1];c.originalLength>0&&(i=c.originalStart+c.originalLength),c.modifiedLength>0&&(r=c.modifiedStart+c.modifiedLength)}s=n.originalLength>0,a=n.modifiedLength>0;for(var h=0,d=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),g=1;;g++){var p=n.originalStart-g,f=n.modifiedStart-g;if(pd&&(d=m,h=g)}n.originalStart-=h,n.modifiedStart-=h}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 o=e+t;if(this._OriginalIsBoundary(o-1)||this._OriginalIsBoundary(o))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 o=e+t;if(this._ModifiedIsBoundary(o-1)||this._ModifiedIsBoundary(o))return!0}return!1},e.prototype._boundaryScore=function(e,t,o,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(o,n)?1:0)},e.prototype.ConcatenateChanges=function(e,t){var o=[],n=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],o)?(n=new Array(e.length+t.length-1),a.Copy(e,0,n,0,e.length-1),n[e.length-1]=o[0],a.Copy(t,1,n,e.length,t.length-1),n):(n=new Array(e.length+t.length),a.Copy(e,0,n,0,e.length),a.Copy(t,0,n,e.length,t.length),n)},e.prototype.ChangesOverlap=function(e,t,o){if(s.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),s.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var i=e.originalStart,r=e.originalLength,a=e.modifiedStart,l=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(l=t.modifiedStart+t.modifiedLength-e.modifiedStart),o[0]=new n(i,r,a,l),!0}return o[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,o,n){if(e>=0&&e1,p=void 0;if(p=Object(l.c)(u.uri,e,!a.c)?"":Object(i.h)(Object(r.ltrim)(e.path.substr(u.uri.path.length),i.i),!0),c){var f=u&&u.name?u.name:Object(i.a)(u.uri.fsPath);p=p?f+" • "+p:f}return p}if(e.scheme!==s.a.file&&e.scheme!==s.a.untitled)return e.with({query:null,fragment:null}).toString(!0);if(h(e.fsPath))return Object(i.h)(d(e.fsPath),!0);var m=Object(i.h)(e.fsPath,!0);return!a.g&&t&&(m=function(e,t){if(a.g||!e||!t)return e;var o=g.original===t?g.normalized:void 0;o||(o=""+Object(r.rtrim)(t,i.i)+i.i,g={original:t,normalized:o});(a.c?Object(r.startsWith)(e,o):Object(r.startsWithIgnoreCase)(e,o))&&(e="~/"+e.substr(o.length));return e}(m,t.userHome)),m}function c(e){if(!e)return null;"string"==typeof e&&(e=n.a.file(e));var t=Object(i.a)(e.path)||(e.scheme===s.a.file?e.fsPath:e.path);return h(t)?d(t):t}function h(e){return a.g&&e&&":"===e[1]}function d(e){return h(e)?e.charAt(0).toUpperCase()+e.slice(1):e}var g=Object.create(null)},function(e,t,o){"use strict";function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0}),n(o(185)),n(o(120)),n(o(518)),n(o(519)),n(o(311)),n(o(312)),n(o(313)),n(o(314)),n(o(532)),n(o(315))},function(e,t,o){(function(e){function o(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===o(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===o(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===o(e)},t.isError=function(e){return"[object Error]"===o(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,o(119).Buffer)},function(e,t,o){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:o(340),e.exports={Promise:n}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.toString;function i(e){return"[object String]"===n.call(e)}function r(e){return Array.isArray(e)}t.boolean=function(e){return!0===e||!1===e},t.string=i,t.number=function(e){return"[object Number]"===n.call(e)},t.error=function(e){return"[object Error]"===n.call(e)},t.func=function(e){return"[object Function]"===n.call(e)},t.array=r,t.stringArray=function(e){return r(e)&&e.every((function(e){return i(e)}))}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.create=function(e){return{dispose:e}}}(t.Disposable||(t.Disposable={})),function(e){var t={dispose:function(){}};e.None=function(){return t}}(t.Event||(t.Event={}));var n=function(){function e(){}return e.prototype.add=function(e,t,o){var n=this;void 0===t&&(t=null),this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(o)&&o.push({dispose:function(){return n.remove(e,t)}})},e.prototype.remove=function(e,t){if(void 0===t&&(t=null),this._callbacks){for(var o=!1,n=0,i=this._callbacks.length;nn(e))}},function(e,t,o){"use strict";o.r(t);var n=o(14);function i(e,t){switch(void 0===t&&(t=0),typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?(o=e,n=r(104579,n=t),o.reduce((function(e,t){return i(t,e)}),n)):function(e,t){return t=r(181387,t),Object.keys(e).sort().reduce((function(t,o){return t=s(o,t),i(e[o],t)}),t)}(e,t);case"string":return s(e,t);case"boolean":return function(e,t){return r(e?433:863,t)}(e,t);case"number":return r(e,t);case"undefined":return r(e,937);default:return r(e,617)}var o,n}function r(e,t){return(t<<5)-t+e|0}function s(e,t){t=r(149417,t);for(var o=0,n=e.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e,t){return function(o,n){t(o,n,e)}},v=function(){function e(e,t,o){var n=this;this._editor=e,this._codeEditorService=t,this._configurationService=o,this._globalToDispose=[],this._localToDispose=[],this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes={},this._globalToDispose.push(e.onDidChangeModel((function(e){n._isEnabled=n.isEnabled(),n.onModelChanged()}))),this._globalToDispose.push(e.onDidChangeModelLanguage((function(e){return n.onModelChanged()}))),this._globalToDispose.push(c.d.onDidChange((function(e){return n.onModelChanged()}))),this._globalToDispose.push(e.onDidChangeConfiguration((function(e){var t=n._isEnabled;n._isEnabled=n.isEnabled(),t!==n._isEnabled&&(n._isEnabled?n.onModelChanged():n.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}return e.prototype.isEnabled=function(){var e=this._editor.getModel();if(!e)return!1;var t=e.getLanguageIdentifier(),o=this._configurationService.getValue(t.language);if(o){var n=o.colorDecorators;if(n&&void 0!==n.enable&&!n.enable)return n.enable}return this._editor.getConfiguration().contribInfo.colorDecorators},e.prototype.getId=function(){return e.ID},e.get=function(e){return e.getContribution(this.ID)},e.prototype.dispose=function(){this.stop(),this.removeAllDecorations(),this._globalToDispose=Object(a.d)(this._globalToDispose)},e.prototype.onModelChanged=function(){var t=this;if(this.stop(),this._isEnabled){var o=this._editor.getModel();c.d.has(o)&&(this._localToDispose.push(this._editor.onDidChangeModelContent((function(o){t._timeoutTimer||(t._timeoutTimer=new f.f,t._timeoutTimer.cancelAndSet((function(){t._timeoutTimer=null,t.beginCompute()}),e.RECOMPUTE_TIME))}))),this.beginCompute())}},e.prototype.beginCompute=function(){var e=this;this._computePromise=Object(f.i)((function(t){return Object(d.b)(e._editor.getModel(),t)})),this._computePromise.then((function(t){e.updateDecorations(t),e.updateColorDecorators(t),e._computePromise=null}),m.e)},e.prototype.stop=function(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose=Object(a.d)(this._localToDispose)},e.prototype.updateDecorations=function(e){var t=this,o=e.map((function(e){return{range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:p.a.EMPTY}}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,o),this._colorDatas=new Map,this._decorationsIds.forEach((function(o,n){return t._colorDatas.set(o,e[n])}))},e.prototype.updateColorDecorators=function(e){for(var t=[],o={},r=0;r1){var m=o.getLineContent(f.lineNumber),_=a.firstNonWhitespaceIndex(m),y=-1===_?m.length+1:_+1;if(f.column<=y){var v=i.a.visibleColumnFromColumn2(t,o,f),b=i.a.prevTabStop(v,t.tabSize),E=i.a.columnFromVisibleColumn2(t,o,f.lineNumber,b);p=new r.a(f.lineNumber,E,f.lineNumber,f.column)}else p=new r.a(f.lineNumber,f.column-1,f.lineNumber,f.column)}else{var C=s.a.left(t,o,f.lineNumber,f.column);p=new r.a(C.lineNumber,C.column,f.lineNumber,f.column)}}p.isEmpty()?u[h]=null:(p.startLineNumber!==p.endLineNumber&&(c=!0),u[h]=new n.a(p,""))}return[c,u]},e.cut=function(e,t,o){for(var s=[],a=0,l=o.length;a1?(h=c.lineNumber-1,d=t.getLineMaxColumn(c.lineNumber-1),g=c.lineNumber,p=t.getLineMaxColumn(c.lineNumber)):(h=c.lineNumber,d=1,g=c.lineNumber,p=t.getLineMaxColumn(c.lineNumber));var f=new r.a(h,d,g,p);f.isEmpty()?s[a]=null:s[a]=new n.a(f,"")}else s[a]=null;else s[a]=new n.a(u,"")}return new i.e(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("clipboardService")},function(e,t,o){"use strict";o.d(t,"a",(function(){return r})),o.d(t,"c",(function(){return s})),o.d(t,"b",(function(){return a}));var n=o(40),i=o(8);function r(e){return n.a(e.path)||e.authority}function s(e,t,o){return!(e!==t)||!(!e||!t)&&(o?Object(i.equalsIgnoreCase)(e.toString(),t.toString()):e.toString()===t.toString())}function a(e){var t=n.b(e.path);return e.authority&&t&&!n.d(t)?null:e.with({path:t})}},function(e,t,o){"use strict";o.d(t,"b",(function(){return r})),o.d(t,"a",(function(){return s}));var n=o(0),i=function(){function e(e,t,o){void 0===o&&(o=t),this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=o}return e.prototype.toLabel=function(e,t,o,n,i){return null===t&&null===n?null:function(e,t,o,n,i){var r=a(e,t,i);null!==n&&(r+=" ",r+=a(o,n,i));return r}(e,t,o,n,this.modifierLabels[i])},e}(),r=new i({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:n.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:n.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),s=new i({ctrlKey:n.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:n.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:n.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:n.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:n.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:n.a({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"});function a(e,t,o){if(null===t)return"";var n=[];return e.ctrlKey&&n.push(o.ctrlKey),e.shiftKey&&n.push(o.shiftKey),e.altKey&&n.push(o.altKey),e.metaKey&&n.push(o.metaKey),n.push(t),n.join(o.separator)}},function(e,t,o){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,o,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var r,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,o)}));case 3:return t.nextTick((function(){e.call(null,o,n)}));case 4:return t.nextTick((function(){e.call(null,o,n,i)}));default:for(r=new Array(a-1),s=0;s=o.length)o.copy(this.buffer,this.index,0,o.length);else{var r=(Math.ceil((this.index+o.length)/a)+1)*a;0===this.index?(this.buffer=new e(r),o.copy(this.buffer,0,0,o.length)):this.buffer=e.concat([this.buffer.slice(0,this.index),o],r)}this.index+=o.length},t.prototype.tryReadHeaders=function(){for(var e=void 0,t=0;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((function(t){var o=t.indexOf(":");if(-1===o)throw new Error("Message header must separate key and value using :");var n=t.substr(0,o),i=t.substr(o+1).trim();e[n]=i}));var o=t+4;return this.buffer=this.buffer.slice(o),this.index=this.index-o,e},t.prototype.tryReadContent=function(e){if(this.index0&&t.doWriteMessage(t.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(a);t.IPCMessageWriter=u;var c=function(t){function o(e,o){void 0===o&&(o="utf8");var n=t.call(this)||this;return n.socket=e,n.queue=[],n.sending=!1,n.encoding=o,n.errorCount=0,n.socket.on("error",(function(e){return n.fireError(e)})),n.socket.on("close",(function(){return n.fireClose()})),n}return i(o,t),o.prototype.write=function(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)},o.prototype.doWriteMessage=function(t){var o=this,n=JSON.stringify(t),i=["Content-Length: ",e.byteLength(n,this.encoding).toString(),"\r\n","\r\n"];try{this.sending=!0,this.socket.write(i.join(""),"ascii",(function(e){e&&o.handleError(e,t);try{o.socket.write(n,o.encoding,(function(e){o.sending=!1,e?o.handleError(e,t):o.errorCount=0,o.queue.length>0&&o.doWriteMessage(o.queue.shift())}))}catch(e){o.handleError(e,t)}}))}catch(e){this.handleError(e,t)}},o.prototype.handleError=function(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)},o}(a);t.SocketMessageWriter=c}).call(this,o(119).Buffer)},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(120);t.Disposable=n.Disposable;var i=function(){function e(){this.disposables=[]}return e.prototype.dispose=function(){for(;0!==this.disposables.length;)this.disposables.pop().dispose()},e.prototype.push=function(e){var t=this.disposables;return t.push(e),{dispose:function(){var o=t.indexOf(e);-1!==o&&t.splice(o,1)}}},e}();t.DisposableCollection=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.create=function(e){return{dispose:e}}}(t.Disposable||(t.Disposable={})),function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class n{add(e,t=null,o){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(o)&&o.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(this._callbacks){for(var o=!1,n=0,i=this._callbacks.length;n{let r;return this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t),r={dispose:()=>{this._callbacks.remove(e,t),r.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)}},Array.isArray(o)&&o.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}i._noop=function(){},t.Emitter=i},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e,t,o){},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","title":"JSON schema for Block definitions files","type":"object","additionalProperties":false,"properties":{"requires":{"description":"Files to be included in the code archive","type":"array","items":{"type":"string"}},"header":{"description":"Code placed at the beginning of generated code","type":"string"},"footer":{"description":"Code placed at the end of generated code","type":"string"},"blocks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","definition","template"],"properties":{"id":{"type":"string"},"definition":{"type":["string","array"],"items":{"type":["string","object"],"additionalProperties":false,"required":["id","type","default"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["number","boolean","angle","text"]},"default":{}}}},"template":{"type":"string"}}}}}}')},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=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 o=this,i=new n(e);if(this._first)if(t){var r=this._last;this._last=i,i.prev=r,r.next=i}else{var s=this._first;this._first=i,i.next=s,s.prev=i}else this._first=i,this._last=i;return function(){for(var e=o._first;e instanceof n;e=e.next)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||(o._first=o._first.next,o._first.prev=void 0):(o._last=o._last.prev,o._last.next=void 0):(o._first=void 0,o._last=void 0);break}}},e.prototype.iterator=function(){var e={done:void 0,value:void 0},t=this._first;return{next:function(){return t?(e.done=!1,e.value=t.element,t=t.next):(e.done=!0,e.value=void 0),e}}},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return R}));var n=o(25),i=o(8),r=o(40),s=o(79),a=o(10),l="**",u="/",c="[/\\\\]",h="[^/\\\\]",d=/\//g;function g(e){switch(e){case 0:return"";case 1:return h+"*?";default:return"(?:"+c+"|"+h+"+"+c+"|"+c+h+"+)*?"}}function p(e,t){if(!e)return[];for(var o,n=[],i=!1,r=!1,s="",a=0;a0;o--){var r=e.charCodeAt(o-1);if(47===r||92===r)break}t=e.substr(o)}var s=i.indexOf(t);return-1!==s?n[s]:null};a.basenames=i,a.patterns=n,a.allBasenames=i;var l=e.filter((function(e){return!e.basenames}));return l.push(a),l}},function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return c}));o(441);var n,i,r,s=o(34),a=o(1),l=o(6);function u(e,t,o){var n=o.offset+o.size;return o.position===r.Before?t<=e-n?n:t<=o.offset?o.offset-t:Math.max(e-t,0):t<=o.offset?o.offset-t:t<=e-n?n:0}!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(n||(n={})),function(e){e[e.BELOW=0]="BELOW",e[e.ABOVE=1]="ABOVE"}(i||(i={})),function(e){e[e.Before=0]="Before",e[e.After=1]="After"}(r||(r={}));var c=function(){function e(e){var t=this;this.$view=Object(s.a)(".context-view").hide(),this.setContainer(e),this.toDispose=[Object(l.f)((function(){t.setContainer(null)}))],this.toDisposeOnClean=null}return e.prototype.setContainer=function(t){var o=this;this.$container&&(this.$container.getHTMLElement().removeChild(this.$view.getHTMLElement()),this.$container.off(e.BUBBLE_UP_EVENTS),this.$container.off(e.BUBBLE_DOWN_EVENTS,!0),this.$container=null),t&&(this.$container=Object(s.a)(t),this.$view.appendTo(this.$container),this.$container.on(e.BUBBLE_UP_EVENTS,(function(e){o.onDOMEvent(e,document.activeElement,!1)})),this.$container.on(e.BUBBLE_DOWN_EVENTS,(function(e){o.onDOMEvent(e,document.activeElement,!0)}),null,!0))},e.prototype.show=function(e){this.isVisible()&&this.hide(),this.$view.setClass("context-view").empty().style({top:"0px",left:"0px"}).show(),this.toDisposeOnClean=e.render(this.$view.getHTMLElement()),this.delegate=e,this.doLayout()},e.prototype.layout=function(){this.isVisible()&&(!1!==this.delegate.canRelayout?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())},e.prototype.doLayout=function(){var e,t=this.delegate.getAnchor();if(a.C(t)){var o=a.u(t);e={top:o.top,left:o.left,width:o.width,height:o.height}}else{var s=t;e={top:s.y,left:s.x,width:s.width||0,height:s.height||0}}var l,c=this.$view.getTotalSize(),h=this.delegate.anchorPosition||i.BELOW,d=this.delegate.anchorAlignment||n.LEFT,g={offset:e.top,size:e.height,position:h===i.BELOW?r.Before:r.After};l=d===n.LEFT?{offset:e.left,size:0,position:r.Before}:{offset:e.left+e.width,size:0,position:r.After};var p=a.u(this.$container.getHTMLElement()),f=u(window.innerHeight,c.height,g)-p.top,m=u(window.innerWidth,c.width,l)-p.left;this.$view.removeClass("top","bottom","left","right"),this.$view.addClass(h===i.BELOW?"bottom":"top"),this.$view.addClass(d===n.LEFT?"left":"right"),this.$view.style({top:f+"px",left:m+"px",width:"initial"})},e.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),this.$view.hide()},e.prototype.isVisible=function(){return!!this.delegate},e.prototype.onDOMEvent=function(e,t,o){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):o&&!a.B(e.target,this.$container.getHTMLElement())&&this.hide())},e.prototype.dispose=function(){this.hide(),this.toDispose=Object(l.d)(this.toDispose)},e.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],e.BUBBLE_DOWN_EVENTS=["click"],e}()},function(e,t,o){"use strict";o.d(t,"b",(function(){return h})),o.d(t,"a",(function(){return d}));o(448);var n,i=o(1),r=o(124),s=o(40),a=o(165),l=o(6),u=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),c=function(){function e(e){this._element=e}return Object.defineProperty(e.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{set:function(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"className",{set:function(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{set:function(e){this.disposed||e===this._title||(this._title=e,this._title?this._element.title=e:this._element.removeAttribute("title"))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{set:function(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":null)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposed=!0},e}(),h=function(e){function t(t,o){var n=e.call(this)||this;return n.domNode=n._register(new c(i.k(t,i.a(".monaco-icon-label")))),n.labelDescriptionContainer=n._register(new c(i.k(n.domNode.element,i.a(".monaco-icon-label-description-container")))),o&&o.supportHighlights?n.labelNode=n._register(new r.a(i.k(n.labelDescriptionContainer.element,i.a("a.label-name")))):n.labelNode=n._register(new c(i.k(n.labelDescriptionContainer.element,i.a("a.label-name")))),o&&o.supportDescriptionHighlights?n.descriptionNodeFactory=function(){return n._register(new r.a(i.k(n.labelDescriptionContainer.element,i.a("span.label-description"))))}:n.descriptionNodeFactory=function(){return n._register(new c(i.k(n.labelDescriptionContainer.element,i.a("span.label-description"))))},n}return u(t,e),t.prototype.setValue=function(e,t,o){var n=["monaco-icon-label"];o&&(o.extraClasses&&n.push.apply(n,o.extraClasses),o.italic&&n.push("italic")),this.domNode.className=n.join(" "),this.domNode.title=o&&o.title?o.title:"",this.labelNode instanceof r.a?this.labelNode.set(e||"",o?o.matches:void 0):this.labelNode.textContent=e||"",(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof r.a?(this.descriptionNode.set(t||"",o?o.descriptionMatches:void 0),o&&o.descriptionTitle?this.descriptionNode.element.title=o.descriptionTitle:this.descriptionNode.element.removeAttribute("title")):(this.descriptionNode.textContent=t||"",this.descriptionNode.title=o&&o.descriptionTitle?o.descriptionTitle:"",this.descriptionNode.empty=!t))},t}(l.a),d=function(e){function t(t,o,n,i){var r=e.call(this,t)||this;return r.setFile(o,n,i),r}return u(t,e),t.prototype.setFile=function(e,t,o){var n=s.b(e.fsPath);this.setValue(Object(a.a)(e),n&&"."!==n?Object(a.b)(n,o,t):"",{title:e.fsPath})},t}(h)},function(e,t,o){"use strict";o.d(t,"b",(function(){return a})),o.d(t,"a",(function(){return l}));var n=o(8),i=o(11),r=o(69),s=o(87);function a(e,t){return function(e,t){for(var o='
    ',i=e.split(/\r\n|\r|\n/),r=t.getInitialState(),a=0,l=i.length;a0&&(o+="
    ");var c=t.tokenize2(u,r,0);s.a.convertToEndOffset(c.tokens,u.length);for(var h=new s.a(c.tokens,u).inflate(),d=0,g=0,p=h.getCount();g'+n.escape(u.substring(d,m))+"",d=m}r=c.endState}return o+="
    "}(e,function(e){var t=i.y.get(e);if(t)return t;return{getInitialState:function(){return r.c},tokenize:void 0,tokenize2:function(e,t,o){return Object(r.e)(0,e,t,o)}}}(t))}function l(e,t,o,n,i,r){for(var s="
    ",a=n,l=0,u=0,c=t.getCount();u0;)d+=" ",p--;break;case 60:d+="<";break;case 62:d+=">";break;case 38:d+="&";break;case 0:d+="�";break;case 65279:case 8232:d+="�";break;case 13:d+="​";break;default:d+=String.fromCharCode(g)}}if(s+=''+d+"",h>i||a>=i)break}}return s+="
    "}},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(10),i=function(){function e(e,t,o,n,i,r){this.id=e,this.label=t,this.alias=o,this._precondition=n,this._run=i,this._contextKeyService=r}return e.prototype.isSupported=function(){return this._contextKeyService.contextMatchesRules(this._precondition)},e.prototype.run=function(){if(!this.isSupported())return n.b.as(void 0);var e=this._run();return e||n.b.as(void 0)},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return _}));o(469);var n=o(6),i=o(30),r=o(1),s=o(93),a=o(2),l=o(14),u=o(26),c=o(155),h=o(18),d=new l.a(new l.c(0,122,204)),g={showArrow:!0,showFrame:!0,className:"",frameColor:d,arrowColor:d,keepEditorSelection:!1},p=function(){function e(e,t,o,n,i,r){this.domNode=e,this.afterLineNumber=t,this.afterColumn=o,this.heightInLines=n,this._onDomNodeTop=i,this._onComputedHeight=r}return e.prototype.onDomNodeTop=function(e){this._onDomNodeTop(e)},e.prototype.onComputedHeight=function(e){this._onComputedHeight(e)},e}(),f=function(){function e(e,t){this._id=e,this._domNode=t}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return null},e}(),m=function(){function e(t){this._editor=t,this._ruleName=e._IdGenerator.nextId(),this._decorations=[]}return e.prototype.dispose=function(){this.hide(),r.F(this._ruleName)},Object.defineProperty(e.prototype,"color",{set:function(e){this._color!==e&&(this._color=e,this._updateStyle())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(e){this._height!==e&&(this._height=e,this._updateStyle())},enumerable:!0,configurable:!0}),e.prototype._updateStyle=function(){r.F(this._ruleName),r.n(".monaco-editor "+this._ruleName,"border-style: solid; border-color: transparent; border-bottom-color: "+this._color+"; border-width: "+this._height+"px; bottom: -"+this._height+"px; margin-left: -"+this._height+"px; ")},e.prototype.show=function(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:a.a.fromPositions(e),options:{className:this._ruleName,stickiness:h.h.NeverGrowsWhenTypingAtEdges}}])},e.prototype.hide=function(){this._editor.deltaDecorations(this._decorations,[])},e._IdGenerator=new c.a(".arrow-decoration-"),e}(),_=function(){function e(e,t){void 0===t&&(t={});var o=this;this._positionMarkerId=[],this._disposables=[],this._isShowing=!1,this.editor=e,this.options=i.c(t),i.g(this.options,g,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.push(this.editor.onDidLayoutChange((function(e){var t=o._getWidth(e);o.domNode.style.width=t+"px",o.domNode.style.left=o._getLeft(e)+"px",o._onWidth(t)})))}return e.prototype.dispose=function(){var e=this;Object(n.d)(this._disposables),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((function(t){t.removeZone(e._viewZone.id),e._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[]},e.prototype.create=function(){r.f(this.domNode,"zone-widget"),r.f(this.domNode,this.options.className),this.container=document.createElement("div"),r.f(this.container,"zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new m(this.editor),this._disposables.push(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()},e.prototype.style=function(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()},e.prototype._applyStyles=function(){if(this.container){var e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow){var t=this.options.arrowColor.toString();this._arrow.color=t}},e.prototype._getWidth=function(e){return e.width-e.minimapWidth-e.verticalScrollbarWidth},e.prototype._getLeft=function(e){return e.minimapWidth>0&&0===e.minimapLeft?e.minimapWidth:0},e.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},e.prototype._onViewZoneHeight=function(e){this.domNode.style.height=e+"px";var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px";var o=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(o)),this._resizeSash.layout()},Object.defineProperty(e.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e){var t=this.editor.getModel().getDecorationRange(e);if(t)return t.getStartPosition()}},enumerable:!0,configurable:!0}),e.prototype.show=function(e,t){var o=a.a.isIRange(e)?e:new a.a(e.lineNumber,e.column,e.lineNumber,e.column);this._isShowing=!0,this._showImpl(o,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:o,options:u.a.EMPTY}])},e.prototype.hide=function(){var e=this;this._viewZone&&(this.editor.changeViewZones((function(t){t.removeZone(e._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()},e.prototype._decoratingElementsHeight=function(){var e=this.editor.getConfiguration().lineHeight,t=0;this.options.showArrow&&(t+=2*Math.round(e/3));this.options.showFrame&&(t+=2*Math.round(e/9));return t},e.prototype._showImpl=function(e,t){var o=this,n={lineNumber:e.startLineNumber,column:e.startColumn},i=this.editor.getLayoutInfo(),r=this._getWidth(i);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(i)+"px";var s=document.createElement("div");s.style.overflow="hidden";var a=this.editor.getConfiguration().lineHeight,l=this.editor.getLayoutInfo().height/a*.8;t>=l&&(t=l);var u=0,c=0;if(this.options.showArrow&&(u=Math.round(a/3),this._arrow.height=u,this._arrow.show(n)),this.options.showFrame&&(c=Math.round(a/9)),this.editor.changeViewZones((function(e){o._viewZone&&e.removeZone(o._viewZone.id),o._overlayWidget&&(o.editor.removeOverlayWidget(o._overlayWidget),o._overlayWidget=null),o.domNode.style.top="-1000px",o._viewZone=new p(s,n.lineNumber,n.column,t,(function(e){return o._onViewZoneTop(e)}),(function(e){return o._onViewZoneHeight(e)})),o._viewZone.id=e.addZone(o._viewZone),o._overlayWidget=new f("vs.editor.contrib.zoneWidget"+o._viewZone.id,o.domNode),o.editor.addOverlayWidget(o._overlayWidget)})),this.options.showFrame){var h=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=h+"px",this.container.style.borderBottomWidth=h+"px"}var d=t*a-this._decoratingElementsHeight();this.container.style.top=u+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden",this._doLayout(d,r),this.options.keepEditorSelection||this.editor.setSelection(e);var g=Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1));this.revealLine(g)},e.prototype.revealLine=function(e){this.editor.revealLine(e,0)},e.prototype.setCssClass=function(e,t){t&&this.container.classList.remove(t),r.f(this.container,e)},e.prototype._onWidth=function(e){},e.prototype._doLayout=function(e,t){},e.prototype._relayout=function(e){var t=this;this._viewZone.heightInLines!==e&&this.editor.changeViewZones((function(o){t._viewZone.heightInLines=e,o.layoutZone(t._viewZone.id)}))},e.prototype._initSash=function(){var e,t=this;this._resizeSash=new s.b(this.domNode,this,{orientation:s.a.HORIZONTAL}),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=s.c.Disabled),this._disposables.push(this._resizeSash.onDidStart((function(o){t._viewZone&&(e={startY:o.startY,heightInLines:t._viewZone.heightInLines})}))),this._disposables.push(this._resizeSash.onDidEnd((function(){e=void 0}))),this._disposables.push(this._resizeSash.onDidChange((function(o){if(e){var n=(o.currentY-e.startY)/t.editor.getConfiguration().lineHeight,i=n<0?Math.ceil(n):Math.floor(n),r=e.heightInLines+i;r>5&&r<35&&t._relayout(r)}})))},e.prototype.getHorizontalSashLeft=function(){return 0},e.prototype.getHorizontalSashTop=function(){return parseInt(this.domNode.style.height)-this._decoratingElementsHeight()/2},e.prototype.getHorizontalSashWidth=function(){var e=this.editor.getLayoutInfo();return e.width-e.minimapWidth},e}()},function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o(22),i=Object(n.c)("uriDisplay")},function(e,t,o){"use strict";o.d(t,"a",(function(){return p}));o(299);var n,i=o(24),r=o(6),s=o(4),a=o(15),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});function u(e,t){return!!e[t]}var c=function(e,t){this.target=e.target,this.hasTriggerModifier=u(e.event,t.triggerModifier),this.hasSideBySideModifier=u(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=i.k||e.event.detail<=1},h=function(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=u(e,t.triggerModifier)},d=function(){function e(e,t,o,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=o,this.triggerSideBySideModifier=n}return e.prototype.equals=function(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier},e}();function g(e){return"altKey"===e?a.d?new d(57,"metaKey",6,"altKey"):new d(5,"ctrlKey",6,"altKey"):a.d?new d(6,"altKey",57,"metaKey"):new d(6,"altKey",5,"ctrlKey")}var p=function(e){function t(t){var o=e.call(this)||this;return o._onMouseMoveOrRelevantKeyDown=o._register(new s.a),o.onMouseMoveOrRelevantKeyDown=o._onMouseMoveOrRelevantKeyDown.event,o._onExecute=o._register(new s.a),o.onExecute=o._onExecute.event,o._onCancel=o._register(new s.a),o.onCancel=o._onCancel.event,o._editor=t,o._opts=g(o._editor.getConfiguration().multiCursorModifier),o.lastMouseMoveEvent=null,o.hasTriggerKeyOnMouseDown=!1,o._register(o._editor.onDidChangeConfiguration((function(e){if(e.multiCursorModifier){var t=g(o._editor.getConfiguration().multiCursorModifier);if(o._opts.equals(t))return;o._opts=t,o.lastMouseMoveEvent=null,o.hasTriggerKeyOnMouseDown=!1,o._onCancel.fire()}}))),o._register(o._editor.onMouseMove((function(e){return o.onEditorMouseMove(new c(e,o._opts))}))),o._register(o._editor.onMouseDown((function(e){return o.onEditorMouseDown(new c(e,o._opts))}))),o._register(o._editor.onMouseUp((function(e){return o.onEditorMouseUp(new c(e,o._opts))}))),o._register(o._editor.onKeyDown((function(e){return o.onEditorKeyDown(new h(e,o._opts))}))),o._register(o._editor.onKeyUp((function(e){return o.onEditorKeyUp(new h(e,o._opts))}))),o._register(o._editor.onMouseDrag((function(){return o.resetHandler()}))),o._register(o._editor.onDidChangeCursorSelection((function(e){return o.onDidChangeCursorSelection(e)}))),o._register(o._editor.onDidChangeModel((function(e){return o.resetHandler()}))),o._register(o._editor.onDidChangeModelContent((function(){return o.resetHandler()}))),o._register(o._editor.onDidScrollChange((function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&o.resetHandler()}))),o}return l(t,e),t.prototype.onDidChangeCursorSelection=function(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this.resetHandler()},t.prototype.onEditorMouseMove=function(e){this.lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])},t.prototype.onEditorMouseDown=function(e){this.hasTriggerKeyOnMouseDown=e.hasTriggerModifier},t.prototype.onEditorMouseUp=function(e){this.hasTriggerKeyOnMouseDown&&this._onExecute.fire(e)},t.prototype.onEditorKeyDown=function(e){this.lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()},t.prototype.onEditorKeyUp=function(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()},t.prototype.resetHandler=function(){this.lastMouseMoveEvent=null,this.hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()},t}(r.a)},function(e,t,o){"use strict";o(470);var n,i,r,s=o(75),a=o(76),l=o(13),u=o(6),c=o(10),h=o(4),d=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),g=function(){function e(e){this._onDispose=new h.a,this.onDispose=this._onDispose.event,this._item=e}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose&&(this._onDispose.fire(),this._onDispose.dispose(),this._onDispose=null)},e}(),p=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var o,n,i=this,r=this.getLock(e);return r?new c.b((function(n,s){o=Object(h.k)(r.onDispose)((function(){return i.run(e,t).then(n,s)}))}),(function(){o.dispose()})):new c.b((function(o,r){if(e.isDisposed())return r(new Error("Item is disposed."));var s=i.locks[e.id]=new g(e);return n=t().then((function(t){return delete i.locks[e.id],s.dispose(),t})).then(o,r)}),(function(){return n.cancel()}))},e.prototype.getLock=function(e){var t;for(t in this.locks){var o=this.locks[t];if(e.intersects(o.item))return o}return null},e}(),f=function(){function e(){this._isDisposed=!1,this._onDidRevealItem=new h.d,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new h.d,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new h.d,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new h.d,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new h.d,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new h.d,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new h.d,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=new h.d,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new h.d,this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new h.d,this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new h.d,this.onDidDisposeItem=this._onDidDisposeItem.event,this.items={}}return e.prototype.register=function(e){a.a(!this.isRegistered(e.id),"item already registered: "+e.id);var t=Object(u.c)([this._onDidRevealItem.add(e.onDidReveal),this._onExpandItem.add(e.onExpand),this._onDidExpandItem.add(e.onDidExpand),this._onCollapseItem.add(e.onCollapse),this._onDidCollapseItem.add(e.onDidCollapse),this._onDidAddTraitItem.add(e.onDidAddTrait),this._onDidRemoveTraitItem.add(e.onDidRemoveTrait),this._onDidRefreshItem.add(e.onDidRefresh),this._onRefreshItemChildren.add(e.onRefreshChildren),this._onDidRefreshItemChildren.add(e.onDidRefreshChildren),this._onDidDisposeItem.add(e.onDidDispose)]);this.items[e.id]={item:e,disposable:t}},e.prototype.deregister=function(e){a.a(this.isRegistered(e.id),"item not registered: "+e.id),this.items[e.id].disposable.dispose(),delete this.items[e.id]},e.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},e.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},e.prototype.dispose=function(){this.items=null,this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e}(),m=function(){function e(e,t,o,n,i){this._onDidCreate=new h.a,this._onDidReveal=new h.a,this.onDidReveal=this._onDidReveal.event,this._onExpand=new h.a,this.onExpand=this._onExpand.event,this._onDidExpand=new h.a,this.onDidExpand=this._onDidExpand.event,this._onCollapse=new h.a,this.onCollapse=this._onCollapse.event,this._onDidCollapse=new h.a,this.onDidCollapse=this._onDidCollapse.event,this._onDidAddTrait=new h.a,this.onDidAddTrait=this._onDidAddTrait.event,this._onDidRemoveTrait=new h.a,this.onDidRemoveTrait=this._onDidRemoveTrait.event,this._onDidRefresh=new h.a,this.onDidRefresh=this._onDidRefresh.event,this._onRefreshChildren=new h.a,this.onRefreshChildren=this._onRefreshChildren.event,this._onDidRefreshChildren=new h.a,this.onDidRefreshChildren=this._onDidRefreshChildren.event,this._onDidDispose=new h.a,this.onDidDispose=this._onDidDispose.event,this.registry=t,this.context=o,this.lock=n,this.element=i,this.id=e,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.traits={},this.depth=0,this.expanded=this.context.dataSource.shouldAutoexpand&&this.context.dataSource.shouldAutoexpand(this.context.tree,i),this._onDidCreate.fire(this),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}return e.prototype.getElement=function(){return this.element},e.prototype.hasChildren=function(){return this.doesHaveChildren},e.prototype.getDepth=function(){return this.depth},e.prototype.isVisible=function(){return this.visible},e.prototype.setVisible=function(e){this.visible=e},e.prototype.isExpanded=function(){return this.expanded},e.prototype._setExpanded=function(e){this.expanded=e},e.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this._onDidReveal.fire(t)},e.prototype.expand=function(){var e=this;return this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this)?c.b.as(!1):this.lock.run(this,(function(){var t={item:e};return e._onExpand.fire(t),(e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):c.b.as(null)).then((function(){return e._setExpanded(!0),e._onDidExpand.fire(t),!0}))})).then((function(t){return!e.isDisposed()&&(e.context.options.autoExpandSingleChildren&&t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then((function(){return!0})):t)}))},e.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var o=c.b.as(null);return this.forEachChild((function(e){o=o.then((function(){return e.collapse(!0)}))})),o.then((function(){return t.collapse(!1)}))}return!this.isExpanded()||this.lock.isLocked(this)?c.b.as(!1):this.lock.run(this,(function(){var e={item:t};return t._onCollapse.fire(e),t._setExpanded(!1),t._onDidCollapse.fire(e),c.b.as(!0)}))},e.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this._onDidAddTrait.fire(t)},e.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e],this._onDidRemoveTrait.fire(t)},e.prototype.hasTrait=function(e){return this.traits[e]||!1},e.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},e.prototype.getHeight=function(){return this.height},e.prototype.refreshChildren=function(t,o,n){var i=this;if(void 0===o&&(o=!1),void 0===n&&(n=!1),!n&&!this.isExpanded())return this.needsChildrenRefresh=!0,c.b.as(this);this.needsChildrenRefresh=!1;var r=function(){var n={item:i,isNested:o};return i._onRefreshChildren.fire(n),(i.doesHaveChildren?i.context.dataSource.getChildren(i.context.tree,i.element):c.b.as([])).then((function(o){if(i.isDisposed()||i.registry.isDisposed())return c.b.as(null);if(!Array.isArray(o))return c.b.wrapError(new Error("Please return an array of children."));o=o?o.slice(0):[],o=i.sort(o);for(var n={};null!==i.firstChild;)n[i.firstChild.id]=i.firstChild,i.removeChild(i.firstChild);for(var r=0,s=o.length;r=0;r--)this.onInsertItem(u[r]);for(r=this.heightMap.length-1;r>=i;r--)this.onRefreshItem(this.heightMap[r]);return a},e.prototype.onInsertItem=function(e){},e.prototype.onRemoveItems=function(e){for(var t,o,n,i=null,r=0;t=e.next();){if(n=this.indexes[t],!(o=this.heightMap[n]))return void console.error("view item doesnt exist");r-=o.height,delete this.indexes[t],this.onRemoveItem(o),null===i&&(i=n)}if(0!==r)for(this.heightMap.splice(i,n-i+1),n=i;n=o.top+o.height))return t;if(n===t)break;n=t}return this.heightMap.length},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},e.prototype.itemAtIndex=function(e){return this.heightMap[e]},e.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},e.prototype.createViewItem=function(e){throw new Error("not implemented")},e.prototype.dispose=function(){this.heightMap=null,this.indexes=null},e}(),M=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),x=function(){function e(e,t,o){this._posx=e,this._posy=t,this._target=o}return e.prototype.preventDefault=function(){},e.prototype.stopPropagation=function(){},Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),e}(),B=function(e){function t(t){var o=e.call(this,t.posx,t.posy,t.target)||this;return o.originalEvent=t,o}return M(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(x),F=function(e){function t(t,o,n){var i=e.call(this,t,o,n.target)||this;return i.originalEvent=n,i}return M(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(x);!function(e){e[e.COPY=0]="COPY",e[e.MOVE=1]="MOVE"}(i||(i={})),function(e){e[e.BUBBLE_DOWN=0]="BUBBLE_DOWN",e[e.BUBBLE_UP=1]="BUBBLE_UP"}(r||(r={}));var H="ResourceURLs",U=o(17),V=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();var W=function(){function e(e){this.context=e,this._cache={"":[]}}return e.prototype.alloc=function(e){var t=this.cache(e).pop();if(!t){var o=document.createElement("div");o.className="content";var n=document.createElement("div");n.appendChild(o),t={element:n,templateId:e,templateData:this.context.renderer.renderTemplate(this.context.tree,e,o)}}return t},e.prototype.release=function(e,t){!function(e){try{e.parentElement.removeChild(e)}catch(e){}}(t.element),this.cache(e).push(t)},e.prototype.cache=function(e){return this._cache[e]||(this._cache[e]=[])},e.prototype.garbageCollect=function(){var e=this;this._cache&&Object.keys(this._cache).forEach((function(t){e._cache[t].forEach((function(o){e.context.renderer.disposeTemplate(e.context.tree,t,o.templateData),o.element=null,o.templateData=null})),delete e._cache[t]}))},e.prototype.dispose=function(){this.garbageCollect(),this._cache=null,this.context=null},e}(),j=function(){function e(e,t){var o=this;this.width=0,this.context=e,this.model=t,this.id=this.model.id,this.row=null,this.top=0,this.height=t.getHeight(),this._styles={},t.getAllTraits().forEach((function(e){return o._styles[e]=!0})),t.isExpanded()&&this.addClass("expanded")}return Object.defineProperty(e.prototype,"expanded",{set:function(e){e?this.addClass("expanded"):this.removeClass("expanded")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{set:function(e){e?this.addClass("loading"):this.removeClass("loading")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this._draggable},set:function(e){this._draggable=e,this.render(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropTarget",{set:function(e){e?this.addClass("drop-target"):this.removeClass("drop-target")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.row&&this.row.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId||(this._templateId=this.context.renderer.getTemplateId&&this.context.renderer.getTemplateId(this.context.tree,this.model.getElement()))},enumerable:!0,configurable:!0}),e.prototype.addClass=function(e){this._styles[e]=!0,this.render(!0)},e.prototype.removeClass=function(e){delete this._styles[e],this.render(!0)},e.prototype.render=function(e){var t=this;if(void 0===e&&(e=!1),this.model&&this.element){var o=["monaco-tree-row"];o.push.apply(o,Object.keys(this._styles)),this.model.hasChildren()&&o.push("has-children"),this.element.className=o.join(" "),this.element.draggable=this.draggable,this.element.style.height=this.height+"px",this.element.setAttribute("role","treeitem");var n=this.context.accessibilityProvider,i=n.getAriaLabel(this.context.tree,this.model.getElement());if(i&&this.element.setAttribute("aria-label",i),n.getPosInSet&&n.getSetSize&&(this.element.setAttribute("aria-setsize",n.getSetSize()),this.element.setAttribute("aria-posinset",n.getPosInSet(this.context.tree,this.model.getElement()))),this.model.hasTrait("focused")){var r=w.safeBtoa(this.model.id);this.element.setAttribute("aria-selected","true"),this.element.setAttribute("id",r)}else this.element.setAttribute("aria-selected","false"),this.element.removeAttribute("id");this.model.hasChildren()?this.element.setAttribute("aria-expanded",String(!!this._styles.expanded)):this.element.removeAttribute("aria-expanded"),this.element.setAttribute("aria-level",String(this.model.getDepth())),this.context.options.paddingOnRow?this.element.style.paddingLeft=this.context.options.twistiePixels+(this.model.getDepth()-1)*this.context.options.indentPixels+"px":(this.element.style.paddingLeft=(this.model.getDepth()-1)*this.context.options.indentPixels+"px",this.row.element.firstElementChild.style.paddingLeft=this.context.options.twistiePixels+"px");var s=this.context.dnd.getDragURI(this.context.tree,this.model.getElement());if(s!==this.uri&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),s?(this.uri=s,this.draggable=!0,this.unbindDragStart=C.g(this.element,"dragstart",(function(e){t.onDragStart(e)}))):this.uri=null),!e&&this.element){var a=window.getComputedStyle(this.element),l=parseFloat(a.paddingLeft);this.context.horizontalScrolling&&(this.element.style.width="fit-content"),this.context.renderer.renderElement(this.context.tree,this.model.getElement(),this.templateId,this.row.templateData),this.context.horizontalScrolling&&(this.width=C.t(this.element)+l,this.element.style.width="")}}},e.prototype.insertInDOM=function(e,t){if(this.row||(this.row=this.context.cache.alloc(this.templateId),this.element[z.BINDING]=this),!this.element.parentElement){if(null===t)e.appendChild(this.element);else try{e.insertBefore(this.element,t)}catch(t){console.warn("Failed to locate previous tree element"),e.appendChild(this.element)}this.render()}},e.prototype.removeFromDOM=function(){this.row&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),this.uri=null,this.element[z.BINDING]=null,this.context.cache.release(this.templateId,this.row),this.row=null)},e.prototype.dispose=function(){this.row=null,this.model=null},e}(),G=function(e){function t(t,o,n){var i=e.call(this,t,o)||this;return i.row={element:n,templateData:null,templateId:null},i}return V(t,e),t.prototype.render=function(){if(this.model&&this.element){var e=["monaco-tree-wrapper"];e.push.apply(e,Object.keys(this._styles)),this.model.hasChildren()&&e.push("has-children"),this.element.className=e.join(" ")}},t.prototype.insertInDOM=function(e,t){},t.prototype.removeFromDOM=function(){},t}(j);var z=function(e){function t(o,n){var i=e.call(this)||this;i.lastClickTimeStamp=0,i.contentWidthUpdateDelayer=new U.a(50),i.isRefreshing=!1,i.refreshingPreviousChildrenIds={},i._onDOMFocus=new h.a,i._onDOMBlur=new h.a,i._onDidScroll=new h.a,t.counter++,i.instance=t.counter;var r=void 0===o.options.horizontalScrollMode?A.b.Hidden:o.options.horizontalScrollMode;i.horizontalScrolling=r!==A.b.Hidden,i.context={dataSource:o.dataSource,renderer:o.renderer,controller:o.controller,dnd:o.dnd,filter:o.filter,sorter:o.sorter,tree:o.tree,accessibilityProvider:o.accessibilityProvider,options:o.options,cache:new W(o),horizontalScrolling:i.horizontalScrolling},i.modelListeners=[],i.viewListeners=[],i.model=null,i.items={},i.domNode=document.createElement("div"),i.domNode.className="monaco-tree no-focused-item monaco-tree-instance-"+i.instance,i.domNode.tabIndex=o.options.preventRootFocus?-1:0,i.styleElement=C.o(i.domNode),i.treeStyler=o.styler,i.treeStyler||(i.treeStyler=new s.f(i.styleElement,"monaco-tree-instance-"+i.instance)),i.domNode.setAttribute("role","tree"),i.context.options.ariaLabel&&i.domNode.setAttribute("aria-label",i.context.options.ariaLabel),i.context.options.alwaysFocused&&C.f(i.domNode,"focused"),i.context.options.paddingOnRow||C.f(i.domNode,"no-row-padding"),i.wrapper=document.createElement("div"),i.wrapper.className="monaco-tree-wrapper",i.scrollableElement=new D.b(i.wrapper,{alwaysConsumeMouseWheel:!0,horizontal:r,vertical:void 0!==o.options.verticalScrollMode?o.options.verticalScrollMode:A.b.Auto,useShadows:o.options.useShadows}),i.scrollableElement.onScroll((function(e){i.render(e.scrollTop,e.height,e.scrollLeft,e.width,e.scrollWidth),i._onDidScroll.fire()})),E.k?(i.wrapper.style.msTouchAction="none",i.wrapper.style.msContentZooming="none"):T.b.addTarget(i.wrapper),i.rowsContainer=document.createElement("div"),i.rowsContainer.className="monaco-tree-rows",o.options.showTwistie&&(i.rowsContainer.className+=" show-twisties");var a=C.O(i.domNode);return i.viewListeners.push(a.onDidFocus((function(){return i.onFocus()}))),i.viewListeners.push(a.onDidBlur((function(){return i.onBlur()}))),i.viewListeners.push(a),i.viewListeners.push(C.g(i.domNode,"keydown",(function(e){return i.onKeyDown(e)}))),i.viewListeners.push(C.g(i.domNode,"keyup",(function(e){return i.onKeyUp(e)}))),i.viewListeners.push(C.g(i.domNode,"mousedown",(function(e){return i.onMouseDown(e)}))),i.viewListeners.push(C.g(i.domNode,"mouseup",(function(e){return i.onMouseUp(e)}))),i.viewListeners.push(C.g(i.wrapper,"click",(function(e){return i.onClick(e)}))),i.viewListeners.push(C.g(i.wrapper,"auxclick",(function(e){return i.onClick(e)}))),i.viewListeners.push(C.g(i.domNode,"contextmenu",(function(e){return i.onContextMenu(e)}))),i.viewListeners.push(C.g(i.wrapper,T.a.Tap,(function(e){return i.onTap(e)}))),i.viewListeners.push(C.g(i.wrapper,T.a.Change,(function(e){return i.onTouchChange(e)}))),E.k&&(i.viewListeners.push(C.g(i.wrapper,"MSPointerDown",(function(e){return i.onMsPointerDown(e)}))),i.viewListeners.push(C.g(i.wrapper,"MSGestureTap",(function(e){return i.onMsGestureTap(e)}))),i.viewListeners.push(C.i(i.wrapper,"MSGestureChange",(function(e){return i.onThrottledMsGestureChange(e)}),(function(e,t){t.stopPropagation(),t.preventDefault();var o={translationY:t.translationY,translationX:t.translationX};return e&&(o.translationY+=e.translationY,o.translationX+=e.translationX),o})))),i.viewListeners.push(C.g(window,"dragover",(function(e){return i.onDragOver(e)}))),i.viewListeners.push(C.g(i.wrapper,"drop",(function(e){return i.onDrop(e)}))),i.viewListeners.push(C.g(window,"dragend",(function(e){return i.onDragEnd(e)}))),i.viewListeners.push(C.g(window,"dragleave",(function(e){return i.onDragOver(e)}))),i.wrapper.appendChild(i.rowsContainer),i.domNode.appendChild(i.scrollableElement.getDomNode()),n.appendChild(i.domNode),i.lastRenderTop=0,i.lastRenderHeight=0,i.didJustPressContextMenuKey=!1,i.currentDropTarget=null,i.currentDropTargets=[],i.shouldInvalidateDropReaction=!1,i.dragAndDropScrollInterval=null,i.dragAndDropScrollTimeout=null,i.onHiddenScrollTop=null,i.onRowsChanged(),i.layout(),i.setupMSGesture(),i.applyStyles(o.options),i}return V(t,e),Object.defineProperty(t.prototype,"onDOMFocus",{get:function(){return this._onDOMFocus.event},enumerable:!0,configurable:!0}),t.prototype.applyStyles=function(e){this.treeStyler.style(e)},t.prototype.createViewItem=function(e){return new j(this.context,e)},t.prototype.getHTMLElement=function(){return this.domNode},t.prototype.focus=function(){this.domNode.focus()},t.prototype.isFocused=function(){return document.activeElement===this.domNode},t.prototype.blur=function(){this.domNode.blur()},t.prototype.setupMSGesture=function(){var e=this;window.MSGesture&&(this.msGesture=new MSGesture,setTimeout((function(){return e.msGesture.target=e.wrapper}),100))},t.prototype.isTreeVisible=function(){return null===this.onHiddenScrollTop},t.prototype.layout=function(e,t){this.isTreeVisible()&&(this.viewHeight=e||C.s(this.wrapper),this.scrollHeight=this.getContentHeight(),this.horizontalScrolling&&(this.viewWidth=t||C.t(this.wrapper)))},t.prototype.render=function(e,t,o,n,i){var r,s,a=e,l=e+t,u=this.lastRenderTop+this.lastRenderHeight;for(r=this.indexAfter(l)-1,s=this.indexAt(Math.max(u,a));r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(l))-1,s=this.indexAt(a);r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=this.indexAt(this.lastRenderTop),s=Math.min(this.indexAt(a),this.indexAfter(u));r1e3,u=void 0,c=void 0;if(!l)c=(u=new S.a({getLength:function(){return r.length},getElementAtIndex:function(e){return r[e]}},{getLength:function(){return s.length},getElementAtIndex:function(e){return s[e].id}},null).ComputeDiff(!1)).some((function(e){if(e.modifiedLength>0)for(var o=e.modifiedStart,n=e.modifiedStart+e.modifiedLength;o0&&this.onRemoveItems(new I.a(r,g.originalStart,g.originalStart+g.originalLength)),g.modifiedLength>0){var p=s[g.modifiedStart-1]||o;p=p.getDepth()>0?p:null,this.onInsertItems(new I.a(s,g.modifiedStart,g.modifiedStart+g.modifiedLength),p?p.id:null)}}else(l||u.length)&&(this.onRemoveItems(new I.a(r)),this.onInsertItems(new I.a(s),o.getDepth()>0?o.id:null));(l||u.length)&&this.onRowsChanged()}},t.prototype.onItemRefresh=function(e){this.onItemsRefresh([e])},t.prototype.onItemsRefresh=function(e){var t=this;this.onRefreshItemSet(e.filter((function(e){return t.items.hasOwnProperty(e.id)}))),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,o=this.items[t.id];if(o){o.expanded=!0;var n=this.onInsertItems(t.getNavigator(),t.id),i=this.scrollTop;o.top+o.height<=this.scrollTop&&(i+=n),this.onRowsChanged(i)}},t.prototype.onItemCollapsing=function(e){var t=e.item,o=this.items[t.id];o&&(o.expanded=!1,this.onRemoveItems(new I.c(t.getNavigator(),(function(e){return e&&e.id}))),this.onRowsChanged())},t.prototype.onItemReveal=function(e){var t=e.item,o=e.relativeTop,n=this.items[t.id];if(n)if(null!==o){o=(o=o<0?0:o)>1?1:o;var i=n.height-this.viewHeight;this.scrollTop=i*o+n.top}else{var r=n.top+n.height,s=this.scrollTop+this.viewHeight;n.top=s&&(this.scrollTop=r-this.viewHeight)}},t.prototype.onItemAddTrait=function(e){var t=e.item,o=e.trait,n=this.items[t.id];n&&n.addClass(o),"highlighted"===o&&(C.f(this.domNode,o),n&&(this.highlightedItemWasDraggable=!!n.draggable,n.draggable&&(n.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){var t=e.item,o=e.trait,n=this.items[t.id];n&&n.removeClass(o),"highlighted"===o&&(C.G(this.domNode,o),this.highlightedItemWasDraggable&&(n.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();C.N(this.domNode,"no-focused-item",!e),e?this.domNode.setAttribute("aria-activedescendant",w.safeBtoa(this.context.dataSource.getId(this.context.tree,e))):this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(o){t.onDragStart(e,o)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t,this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new k.b(e),o=this.getItemAround(t.target);o&&(E.k&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.context.controller.onClick(this.context.tree,o.model.getElement(),t))}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.context.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new k.b(e);if(!(t.ctrlKey&&b.e&&b.d)){var o=this.getItemAround(t.target);o&&this.context.controller.onMouseDown(this.context.tree,o.model.getElement(),t)}}},t.prototype.onMouseUp=function(e){if(this.context.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new k.b(e);if(!(t.ctrlKey&&b.e&&b.d)){var o=this.getItemAround(t.target);o&&this.context.controller.onMouseUp(this.context.tree,o.model.getElement(),t)}}},t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget);t&&this.context.controller.onTap(this.context.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,o;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var n,i=new O.a(e);if(o=this.model.getFocus()){var r=this.context.dataSource.getId(this.context.tree,o),s=this.items[r];n=C.u(s.element)}else o=this.model.getInput(),n=C.u(this.inputItem.element);t=new F(n.left+n.width,n.top,i)}else{var a=new k.b(e),l=this.getItemAround(a.target);if(!l)return;o=l.model.getElement(),t=new B(a)}this.context.controller.onContextMenu(this.context.tree,o,t)},t.prototype.onKeyDown=function(e){var t=new O.a(e);this.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode,this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||this.context.controller.onKeyDown(this.context.tree,t)},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new O.a(e))},t.prototype.onDragStart=function(e,o){if(!this.model.getHighlight()){var n,i=e.model.getElement(),r=this.model.getSelection();if(n=r.indexOf(i)>-1?r:[i],o.dataTransfer.effectAllowed="copyMove",o.dataTransfer.setData(H,JSON.stringify([e.uri])),o.dataTransfer.setDragImage){var s=void 0;s=this.context.dnd.getDragLabel?this.context.dnd.getDragLabel(this.context.tree,n):String(n.length);var a=document.createElement("div");a.className="monaco-tree-drag-image",a.textContent=s,document.body.appendChild(a),o.dataTransfer.setDragImage(a,-10,-10),setTimeout((function(){return document.body.removeChild(a)}),0)}this.currentDragAndDropData=new R(n),t.currentExternalDragAndDropData=new N(n),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new k.a(o))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=C.w(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(void 0!==e.dragAndDropMouseY){var o=e.dragAndDropMouseY-t,n=0,i=e.viewHeight-35;o<35?n=Math.max(-14,.2*(o-35)):o>i&&(n=Math.min(14,.2*(o-i))),e.scrollTop+=n}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var o,n=this,s=new k.a(e),a=this.getItemAround(s.target);if(!a||0===s.posx&&0===s.posy&&s.browserEvent.type===C.d.DRAG_LEAVE)return this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=s.posy,!this.currentDragAndDropData)if(t.currentExternalDragAndDropData)this.currentDragAndDropData=t.currentExternalDragAndDropData;else{if(!s.dataTransfer.types)return!1;this.currentDragAndDropData=new L}this.currentDragAndDropData.update(s);var l,u=a.model;do{if(o=u?u.getElement():this.model.getInput(),!(l=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,o,s))||l.bubble!==r.BUBBLE_UP)break;u=u&&u.parent}while(u);if(!u)return this.currentDropElement=null,!1;var h=l&&l.accept;h?(this.currentDropElement=u.getElement(),s.preventDefault(),s.dataTransfer.dropEffect=l.effect===i.COPY?"copy":"move"):this.currentDropElement=null;var d,g,p=u.id===this.inputItem.id?this.inputItem:this.items[u.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==p||(d=this.currentDropElementReaction,g=l,!(!d&&!g||d&&g&&d.accept===g.accept&&d.bubble===g.bubble&&d.effect===g.effect)))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.currentDropTarget=p,this.currentDropElementReaction=l,h)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),l.bubble===r.BUBBLE_DOWN)for(var f,m=u.getNavigator();f=m.next();)(a=this.items[f.id])&&(a.dropTarget=!0,this.currentDropTargets.push(a));l.autoExpand&&(this.currentDropPromise=c.b.timeout(500).then((function(){return n.context.tree.expand(n.currentDropElement)})).then((function(){return n.shouldInvalidateDropReaction=!0})))}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new k.a(e);t.preventDefault(),this.currentDragAndDropData.update(t),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(e){this.currentDropTarget&&(this.currentDropTargets.forEach((function(e){return e.dropTarget=!1})),this.currentDropTargets=[]),this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,t.currentExternalDragAndDropData=null,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null},t.prototype.onFocus=function(){this.context.options.alwaysFocused||C.f(this.domNode,"focused"),this._onDOMFocus.fire()},t.prototype.onBlur=function(){this.context.options.alwaysFocused||C.G(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;t!==(e.MSPOINTER_TYPE_MOUSE||"mouse")?t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)):this.lastPointerType="mouse"}},t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,o=this.itemAfter(e);o&&o.element&&(t=o.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e&&e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.topthis.lastRenderTop},t.prototype.getItemAround=function(e){var o=this.inputItem;do{if(e[t.BINDING]&&(o=e[t.BINDING]),e===this.wrapper||e===this.domNode)return o;if(e===document.body)return null}while(e=e.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=u.d(this.modelListeners),this.model=null)},t.prototype.dispose=function(){var t=this;this.scrollableElement.dispose(),this.releaseModel(),this.modelListeners=null,this.viewListeners=u.d(this.viewListeners),this._onDOMFocus.dispose(),this._onDOMBlur.dispose(),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.items&&(Object.keys(this.items).forEach((function(e){return t.items[e].removeFromDOM()})),this.items=null),this.context.cache&&(this.context.cache.dispose(),this.context.cache=null),e.prototype.dispose.call(this)},t.BINDING="monaco-tree-row",t.LOADING_DECORATION_DELAY=800,t.counter=0,t.currentExternalDragAndDropData=null,t}(P),K=o(14),Y=o(30);o.d(t,"a",(function(){return $}));var X=function(e,t,o){if(void 0===o&&(o={}),this.tree=e,this.configuration=t,this.options=o,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer,this.controller=t.controller||new s.c({clickBehavior:s.a.ON_MOUSE_UP,keyboardSupport:"boolean"!=typeof o.keyboardSupport||o.keyboardSupport}),this.dnd=t.dnd||new s.d,this.filter=t.filter||new s.e,this.sorter=t.sorter||null,this.accessibilityProvider=t.accessibilityProvider||new s.b,this.styler=t.styler||null},q={listFocusBackground:K.a.fromHex("#073655"),listActiveSelectionBackground:K.a.fromHex("#0E639C"),listActiveSelectionForeground:K.a.fromHex("#FFFFFF"),listFocusAndSelectionBackground:K.a.fromHex("#094771"),listFocusAndSelectionForeground:K.a.fromHex("#FFFFFF"),listInactiveSelectionBackground:K.a.fromHex("#3F3F46"),listHoverBackground:K.a.fromHex("#2A2D2E"),listDropBackground:K.a.fromHex("#383B3D")},$=function(){function e(e,t,o){void 0===o&&(o={}),this._onDidChangeFocus=new h.e,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeSelection=new h.e,this.onDidChangeSelection=this._onDidChangeSelection.event,this._onHighlightChange=new h.e,this._onDidExpandItem=new h.e,this._onDidCollapseItem=new h.e,this._onDispose=new h.a,this.onDidDispose=this._onDispose.event,this.container=e,Object(Y.g)(o,q,!1),o.twistiePixels="number"==typeof o.twistiePixels?o.twistiePixels:32,o.showTwistie=!1!==o.showTwistie,o.indentPixels="number"==typeof o.indentPixels?o.indentPixels:12,o.alwaysFocused=!0===o.alwaysFocused,o.useShadows=!1!==o.useShadows,o.paddingOnRow=!1!==o.paddingOnRow,o.showLoading=!1!==o.showLoading,this.context=new X(this,t,o),this.model=new v(this.context),this.view=new z(this.context,this.container),this.view.setModel(this.model),this._onDidChangeFocus.input=this.model.onDidFocus,this._onDidChangeSelection.input=this.model.onDidSelect,this._onHighlightChange.input=this.model.onDidHighlight,this._onDidExpandItem.input=this.model.onDidExpandItem,this._onDidCollapseItem.input=this.model.onDidCollapseItem}return e.prototype.style=function(e){this.view.applyStyles(e)},Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.view&&this.view.onDOMFocus},enumerable:!0,configurable:!0}),e.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.domFocus=function(){this.view.focus()},e.prototype.isDOMFocused=function(){return this.view.isFocused()},e.prototype.domBlur=function(){this.view.blur()},e.prototype.setInput=function(e){return this.model.setInput(e)},e.prototype.getInput=function(){return this.model.getInput()},e.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},e.prototype.expand=function(e){return this.model.expand(e)},e.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e,t)},e.prototype.toggleExpansion=function(e,t){return void 0===t&&(t=!1),this.model.toggleExpansion(e,t)},e.prototype.isExpanded=function(e){return this.model.isExpanded(e)},e.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},e.prototype.getHighlight=function(){return this.model.getHighlight()},e.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},e.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},e.prototype.getSelection=function(){return this.model.getSelection()},e.prototype.clearSelection=function(e){this.model.setSelection([],e)},e.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},e.prototype.getFocus=function(){return this.model.getFocus()},e.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},e.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},e.prototype.focusParent=function(e){this.model.focusParent(e)},e.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)},e.prototype.focusFirst=function(e,t){this.model.focusFirst(e,t)},e.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},e.prototype.focusLast=function(e,t){this.model.focusLast(e,t)},e.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},e.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},e.prototype.clearFocus=function(e){this.model.setFocus(null,e)},e.prototype.dispose=function(){this._onDispose.fire(),null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),this._onDidChangeFocus.dispose(),this._onDidChangeSelection.dispose(),this._onHighlightChange.dispose(),this._onDidExpandItem.dispose(),this._onDidCollapseItem.dispose(),this._onDispose.dispose()},e}()},function(e,t,o){"use strict";o(446);var n=o(0),i=o(13),r=o(4),s=o(6),a=o(62),l=o(8),u=o(10),c=o(14),h=o(34),d=o(1),g=o(93),p=(o(447),o(30)),f={badgeBackground:c.a.fromHex("#4D4D4D"),badgeForeground:c.a.fromHex("#FFFFFF")},m=function(){function e(e,t){this.options=t||Object.create(null),Object(p.g)(this.options,f,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Object(d.k)(e,Object(d.a)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},e.prototype.render=function(){this.element.textContent=Object(l.format)(this.countFormat,this.count),this.element.title=Object(l.format)(this.titleFormat,this.count),this.applyStyles()},e.prototype.style=function(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()},e.prototype.applyStyles=function(){if(this.element){var e=this.badgeBackground?this.badgeBackground.toString():null,t=this.badgeForeground?this.badgeForeground.toString():null,o=this.badgeBorder?this.badgeBorder.toString():null;this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=o?"1px":null,this.element.style.borderStyle=o?"solid":null,this.element.style.borderColor=o}},e}(),_=o(204),y=o(22),v=o(143),b=o(2),E=o(26),C=o(157),S=o(113),T=o(56),w=o(132),k=o(7),O=o(19),R=o(117),N=Object(y.c)("environmentService"),L=o(33),I=o(18),D=o(133),A=o(12),P=o(75),M=o(208),x=o(178);o.d(t,"b",(function(){return J})),o.d(t,"a",(function(){return Z}));var B,F=(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),H=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},U=function(e,t){return function(o,n){t(o,n,e)}},V=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},W=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]1?this.badge.setTitleFormat(n.a("referencesCount","{0} references",t)):this.badge.setTitleFormat(n.a("referenceCount","{0} reference",t))},e=H([U(1,v.a),U(2,Object(y.d)(N)),U(3,O.c)],e)}(),Y=function(){function e(e){var t=document.createElement("div");this.before=document.createElement("span"),this.inside=document.createElement("span"),this.after=document.createElement("span"),d.f(this.inside,"referenceMatch"),d.f(t,"reference"),t.appendChild(this.before),t.appendChild(this.inside),t.appendChild(this.after),e.appendChild(t)}return e.prototype.set=function(e){var t=e.parent.preview.preview(e.range),o=t.before,n=t.inside,i=t.after;this.before.innerHTML=l.escape(o),this.inside.innerHTML=l.escape(n),this.after.innerHTML=l.escape(i)},e}(),X=function(){function e(e,t,o){this._contextService=e,this._themeService=t,this._environmentService=o}return e.prototype.getHeight=function(e,t){return 23},e.prototype.getTemplateId=function(t,o){if(o instanceof T.a)return e._ids.FileReferences;if(o instanceof T.b)return e._ids.OneReference;throw o},e.prototype.renderTemplate=function(t,o,n){if(o===e._ids.FileReferences)return new K(n,this._contextService,this._environmentService,this._themeService);if(o===e._ids.OneReference)return new Y(n);throw o},e.prototype.renderElement=function(e,t,o,n){if(t instanceof T.a)n.set(t);else{if(!(t instanceof T.b))throw o;n.set(t)}},e.prototype.disposeTemplate=function(e,t,o){o instanceof K&&o.dispose()},e._ids={FileReferences:"FileReferences",OneReference:"OneReference"},e=H([U(0,v.a),U(1,O.c),U(2,Object(y.d)(N))],e)}(),q=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return t instanceof T.a?t.getAriaMessage():t instanceof T.b?t.getAriaMessage():void 0},e}(),$=function(){function e(e,t){var o,n=this;this._disposables=[],this._onDidChangePercentages=new r.a,this._ratio=t,this._sash=new g.b(e,{getVerticalSashLeft:function(){return n._width*n._ratio},getVerticalSashHeight:function(){return n._height}}),this._disposables.push(this._sash.onDidStart((function(e){o=e.startX-n._width*n.ratio}))),this._disposables.push(this._sash.onDidChange((function(e){var t=e.currentX-o;t>20&&t+200?e.children[0]:void 0},t.prototype._revealReference=function(e,t){return V(this,void 0,void 0,(function(){var o,r=this;return W(this,(function(l){switch(l.label){case 0:return e.uri.scheme!==a.a.inMemory?this.setTitle(Object(x.a)(e.uri),this._uriDisplay.getLabel(Object(x.b)(e.uri),!1)):this.setTitle(n.a("peekView.alternateTitle","References")),o=this._textModelResolverService.createModelReference(e.uri),t?[4,this._tree.reveal(e.parent)]:[3,2];case 1:l.sent(),l.label=2;case 2:return[2,u.b.join([o,this._tree.reveal(e)]).then((function(t){var o=t[0];if(r._model){Object(s.d)(r._previewModelReference);var n=o.object;if(n){r._previewModelReference=o;var i=r._preview.getModel()===n.textEditorModel;r._preview.setModel(n.textEditorModel);var a=b.a.lift(e.range).collapseToStart();r._preview.setSelection(a),r._preview.revealRangeInCenter(a,i?0:1)}else r._preview.setModel(r._previewNotAvailableMessage),o.dispose()}else o.dispose()}),i.e)]}}))}))},t=H([U(3,O.c),U(4,w.a),U(5,y.a),U(6,M.a)],t)}(S.b),Q=Object(k.kb)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},n.a("peekViewTitleBackground","Background color of the peek view title area.")),ee=Object(k.kb)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},n.a("peekViewTitleForeground","Color of the peek view title.")),te=Object(k.kb)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#6c6c6cb3",hc:"#FFFFFF99"},n.a("peekViewTitleInfoForeground","Color of the peek view title info.")),oe=Object(k.kb)("peekView.border",{dark:"#007acc",light:"#007acc",hc:k.e},n.a("peekViewBorder","Color of the peek view borders and arrow.")),ne=Object(k.kb)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:c.a.black},n.a("peekViewResultsBackground","Background color of the peek view result list.")),ie=Object(k.kb)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:c.a.white},n.a("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),re=Object(k.kb)("peekViewResult.fileForeground",{dark:c.a.white,light:"#1E1E1E",hc:c.a.white},n.a("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),se=Object(k.kb)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},n.a("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),ae=Object(k.kb)("peekViewResult.selectionForeground",{dark:c.a.white,light:"#6C6C6C",hc:c.a.white},n.a("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),le=Object(k.kb)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:c.a.black},n.a("peekViewEditorBackground","Background color of the peek view editor.")),ue=Object(k.kb)("peekViewEditorGutter.background",{dark:le,light:le,hc:le},n.a("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),ce=Object(k.kb)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},n.a("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),he=Object(k.kb)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},n.a("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),de=Object(k.kb)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:k.b},n.a("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));Object(O.e)((function(e,t){var o=e.getColor(ce);o&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { background-color: "+o+"; }");var n=e.getColor(he);n&&t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: "+n+"; }");var i=e.getColor(de);i&&t.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid "+i+"; box-sizing: border-box; }");var r=e.getColor(k.b);r&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted "+r+"; box-sizing: border-box; }");var s=e.getColor(ne);s&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree { background-color: "+s+"; }");var a=e.getColor(ie);a&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree { color: "+a+"; }");var l=e.getColor(re);l&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: "+l+"; }");var u=e.getColor(se);u&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+u+"; }");var c=e.getColor(ae);c&&t.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+c+" !important; }");var h=e.getColor(le);h&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: "+h+";}");var d=e.getColor(ue);d&&t.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: "+d+";}")}))},function(e,t,o){"use strict";var n,i="object"==typeof Reflect?Reflect:null,r=i&&"function"==typeof i.apply?i.apply:function(e,t,o){return Function.prototype.apply.call(e,t,o)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var l=10;function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function c(e,t,o,n){var i,r,s,a;if("function"!=typeof o)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o);if(void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,o.listener?o.listener:o),r=e._events),s=r[t]),void 0===s)s=r[t]=o,++e._eventsCount;else if("function"==typeof s?s=r[t]=n?[o,s]:[s,o]:n?s.unshift(o):s.push(o),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function h(){for(var e=[],t=0;t0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var u=l.length,c=f(l,u);for(o=0;o=0;r--)if(o[r]===t||o[r].listener===t){s=o[r].listener,i=r;break}if(i<0)return this;0===i?o.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return g(this,e,!0)},a.prototype.rawListeners=function(e){return g(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,o){(t=e.exports=o(267)).Stream=t,t.Readable=t,t.Writable=o(214),t.Duplex=o(136),t.Transform=o(271),t.PassThrough=o(334)},function(e,t,o){"use strict";(function(t,n,i){var r=o(180);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,o){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(o),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var a,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:r.nextTick;y.WritableState=_;var u=o(167);u.inherits=o(147);var c={deprecate:o(333)},h=o(268),d=o(181).Buffer,g=i.Uint8Array||function(){};var p,f=o(269);function m(){}function _(e,t){a=a||o(136),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===e.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var o=e._writableState,n=o.sync,i=o.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(o),t)!function(e,t,o,n,i){--t.pendingcb,o?(r.nextTick(i,n),r.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),T(e,t))}(e,o,n,t,i);else{var s=C(o);s||o.corked||o.bufferProcessing||!o.bufferedRequest||E(e,o),n?l(b,e,o,s,i):b(e,o,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||o(136),!(p.call(y,this)||this instanceof a))return new y(e);this._writableState=new _(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function v(e,t,o,n,i,r,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,o?e._writev(i,t.onwrite):e._write(i,r,t.onwrite),t.sync=!1}function b(e,t,o,n){o||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function E(e,t){t.bufferProcessing=!0;var o=t.bufferedRequest;if(e._writev&&o&&o.next){var n=t.bufferedRequestCount,i=new Array(n),r=t.corkedRequestsFree;r.entry=o;for(var a=0,l=!0;o;)i[a]=o,o.isBuf||(l=!1),o=o.next,a+=1;i.allBuffers=l,v(e,t,!0,t.length,i,"",r.finish),t.pendingcb++,t.lastBufferedRequest=null,r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;o;){var u=o.chunk,c=o.encoding,h=o.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,c,h),o=o.next,t.bufferedRequestCount--,t.writing)break}null===o&&(t.lastBufferedRequest=null)}t.bufferedRequest=o,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function S(e,t){e._final((function(o){t.pendingcb--,o&&e.emit("error",o),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var o=C(t);return o&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,r.nextTick(S,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),o}u.inherits(y,h),_.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(_.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===y&&(e&&e._writableState instanceof _)}})):p=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,o){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=e,d.isBuffer(n)||n instanceof g);return a&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(o=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof o&&(o=m),i.ended?function(e,t){var o=new Error("write after end");e.emit("error",o),r.nextTick(t,o)}(this,o):(a||function(e,t,o,n){var i=!0,s=!1;return null===o?s=new TypeError("May not write null values to stream"):"string"==typeof o||void 0===o||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),r.nextTick(n,s),i=!1),i}(this,i,e,o))&&(i.pendingcb++,s=function(e,t,o,n,i,r){if(!o){var s=function(e,t,o){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,o));return t}(t,n,i);n!==s&&(o=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var l=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,o){o(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,o){var n=this._writableState;"function"==typeof e?(o=e,e=null,t=null):"function"==typeof t&&(o=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,o){t.ending=!0,T(e,t),o&&(t.finished?r.nextTick(o):e.once("finish",o));t.ended=!0,e.writable=!1}(this,n,o)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=f.destroy,y.prototype._undestroy=f.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,o(108),o(148).setImmediate,o(80))},function(e,t,o){"use strict";var n=o(168),i=o(275),r=o(276),s=o(277);r=o(276);function a(e,t,o,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=o,this.compression=n,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new r("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,o){return e.pipe(new s).pipe(new r("uncompressedSize")).pipe(t.compressWorker(o)).pipe(new r("compressedSize")).withStreamInfo("compression",t)},e.exports=a},function(e,t,o){"use strict";var n=o(64);var i=function(){for(var e,t=[],o=0;o<256;o++){e=o;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[o]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,o,n){var r=i,s=n+o;e^=-1;for(var a=n;a>>8^r[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,o,n){var r=i,s=n+o;e^=-1;for(var a=n;a>>8^r[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},function(e,t,o){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,o){"use strict";var n=o(364),i=o(219),r=o(149),s=o(289),a=o(366);function l(e,t,o){var n=this._refs[o];if("string"==typeof n){if(!this._refs[n])return l.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[o])instanceof s)return p(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,r,a,c=u.call(this,t,o);return c&&(i=c.schema,t=c.root,a=c.baseId),i instanceof s?r=i.validate||e.call(this,i.schema,t,void 0,a):void 0!==i&&(r=p(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,a)),r}function u(e,t){var o=n.parse(t),i=m(o),r=f(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==r){var a=y(i),l=this._refs[a];if("string"==typeof l)return c.call(this,e,l,o);if(l instanceof s)l.validate||this._compile(l),e=l;else{if(!((l=this._schemas[a])instanceof s))return;if(l.validate||this._compile(l),a==y(t))return{schema:l,root:e,baseId:r};e=l}if(!e.schema)return;r=f(this._getId(e.schema))}return d.call(this,o,r,e.schema,e)}function c(e,t,o){var n=u.call(this,e,t);if(n){var i=n.schema,r=n.baseId;e=n.root;var s=this._getId(i);return s&&(r=v(r,s)),d.call(this,o,r,i,e)}}e.exports=l,l.normalizeId=y,l.fullPath=f,l.url=v,l.ids=function(e){var t=y(this._getId(e)),o={"":t},s={"":f(t,!1)},l={},u=this;return a(e,{allKeys:!0},(function(e,t,a,c,h,d,g){if(""!==t){var p=u._getId(e),f=o[c],m=s[c]+"/"+h;if(void 0!==g&&(m+="/"+("number"==typeof g?g:r.escapeFragment(g))),"string"==typeof p){p=f=y(f?n.resolve(f,p):p);var _=u._refs[p];if("string"==typeof _&&(_=u._refs[_]),_&&_.schema){if(!i(e,_.schema))throw new Error('id "'+p+'" resolves to more than one schema')}else if(p!=y(m))if("#"==p[0]){if(l[p]&&!i(e,l[p]))throw new Error('id "'+p+'" resolves to more than one schema');l[p]=e}else u._refs[p]=m}o[t]=f,s[t]=m}})),l},l.inlineRef=p,l.schema=u;var h=r.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function d(e,t,o,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),s=1;s=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},k=function(e,t){return function(o,n){t(o,n,e)}},O=new g.f("accessibilityHelpWidgetVisible",!1),R=function(e){function t(t,o){var n=e.call(this)||this;return n._editor=t,n._widget=n._register(o.createInstance(P,n._editor)),n}return T(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.show=function(){this._widget.show()},t.prototype.hide=function(){this._widget.hide()},t.ID="editor.contrib.accessibilityHelpController",t=w([k(1,h.a)],t)}(r.a),N=i.a("noSelection","No selection"),L=i.a("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),I=i.a("singleSelection","Line {0}, Column {1}"),D=i.a("multiSelectionRange","{0} selections ({1} characters selected)"),A=i.a("multiSelection","{0} selections");var P=function(e){function t(t,o,n,r){var s=e.call(this)||this;return s._contextKeyService=o,s._keybindingService=n,s._openerService=r,s._editor=t,s._isVisibleKey=O.bindTo(s._contextKeyService),s._domNode=Object(u.b)(document.createElement("div")),s._domNode.setClassName("accessibilityHelpWidget"),s._domNode.setDisplay("none"),s._domNode.setAttribute("role","dialog"),s._domNode.setAttribute("aria-hidden","true"),s._contentDomNode=Object(u.b)(document.createElement("div")),s._contentDomNode.setAttribute("role","document"),s._domNode.appendChild(s._contentDomNode),s._isVisible=!1,s._register(s._editor.onDidLayoutChange((function(){s._isVisible&&s._layout()}))),s._register(a.j(s._contentDomNode.domNode,"keydown",(function(e){if(s._isVisible&&(e.equals(2083)&&(Object(b.a)(i.a("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'.")),s._editor.updateOptions({accessibilitySupport:"on"}),a.l(s._contentDomNode.domNode),s._buildContent(),s._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){Object(b.a)(i.a("openingDocs","Now opening the Editor Accessibility documentation page."));var t=s._editor.getRawConfiguration().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),s._openerService.open(C.a.parse(t)),e.preventDefault(),e.stopPropagation()}}))),s.onblur(s._contentDomNode.domNode,(function(){s.hide()})),s._editor.addOverlayWidget(s),s}return T(t,e),t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.getPosition=function(){return{preference:null}},t.prototype.show=function(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())},t.prototype._descriptionForCommand=function(e,t,o){var n=this._keybindingService.lookupKeybinding(e);return n?s.format(t,n.getAriaLabel()):s.format(o,e)},t.prototype._buildContent=function(){var e=this._editor.getConfiguration(),t=this._editor.getSelections(),o=0;if(t){var n=this._editor.getModel();n&&t.forEach((function(e){o+=n.getValueLengthInRange(e)}))}var r=function(e,t){return e&&0!==e.length?1===e.length?t?s.format(L,e[0].positionLineNumber,e[0].positionColumn,t):s.format(I,e[0].positionLineNumber,e[0].positionColumn):t?s.format(D,e.length,t):e.length>0?s.format(A,e.length):null:N}(t,o);switch(e.wrappingInfo.inDiffEditor?e.readOnly?r+=i.a("readonlyDiffEditor"," in a read-only pane of a diff editor."):r+=i.a("editableDiffEditor"," in a pane of a diff editor."):e.readOnly?r+=i.a("readonlyEditor"," in a read-only code editor"):r+=i.a("editableEditor"," in a code editor"),e.accessibilitySupport){case 0:var a=v.d?i.a("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."):i.a("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now.");r+="\n\n - "+a;break;case 2:r+="\n\n - "+i.a("auto_on","The editor is configured to be optimized for usage with a Screen Reader.");break;case 1:r+="\n\n - "+i.a("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),r+=" "+a}var u=i.a("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),c=i.a("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),h=i.a("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),d=i.a("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.");e.tabFocusMode?r+="\n\n - "+this._descriptionForCommand(m.ToggleTabFocusModeAction.ID,u,c):r+="\n\n - "+this._descriptionForCommand(m.ToggleTabFocusModeAction.ID,h,d),r+="\n\n - "+(v.d?i.a("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."):i.a("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility.")),r+="\n\n"+i.a("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),this._contentDomNode.domNode.appendChild(Object(l.a)(r)),this._contentDomNode.domNode.setAttribute("aria-label",r)},t.prototype.hide=function(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,a.l(this._contentDomNode.domNode),this._editor.focus())},t.prototype._layout=function(){var e=this._editor.getLayoutInfo(),o=Math.max(5,Math.min(t.WIDTH,e.width-40)),n=Math.max(5,Math.min(t.HEIGHT,e.height-40));this._domNode.setWidth(o),this._domNode.setHeight(n);var i=Math.round((e.height-n)/2);this._domNode.setTop(i);var r=Math.round((e.width-o)/2);this._domNode.setLeft(r)},t.ID="editor.contrib.accessibilityHelpWidget",t.WIDTH=500,t.HEIGHT=300,t=w([k(1,g.e),k(2,d.a),k(3,E.a)],t)}(c.a),M=function(e){function t(){return e.call(this,{id:"editor.action.showAccessibilityHelp",label:i.a("ShowAccessibilityHelpAction","Show Accessibility Help"),alias:"Show Accessibility Help",precondition:null,kbOpts:{kbExpr:p.a.focus,primary:S.k?2107:571,weight:100}})||this}return T(t,e),t.prototype.run=function(e,t){var o=R.get(t);o&&o.show()},t}(f.b);Object(f.h)(R),Object(f.f)(M);var x=f.c.bindToContribution(R.get);Object(f.g)(new x({id:"closeAccessibilityHelp",precondition:O,handler:function(e){return e.hide()},kbOpts:{weight:200,kbExpr:p.a.focus,primary:9,secondary:[1033]}})),Object(_.e)((function(e,t){var o=e.getColor(y.D);o&&t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: "+o+"; }");var n=e.getColor(y.rb);n&&t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px "+n+"; }");var i=e.getColor(y.e);i&&t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid "+i+"; }")}))},function(e,t,o){"use strict";o.r(t),o.d(t,"BracketMatchingController",(function(){return E}));o(430);var n,i=o(0),r=o(6),s=o(9),a=o(23),l=o(17),u=o(3),c=o(5),h=o(19),d=o(29),g=o(26),p=o(7),f=o(18),m=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),_=Object(p.kb)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},i.a("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets.")),y=function(e){function t(){return e.call(this,{id:"editor.action.jumpToBracket",label:i.a("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:null,kbOpts:{kbExpr:c.a.editorTextFocus,primary:3160,weight:100}})||this}return m(t,e),t.prototype.run=function(e,t){var o=E.get(t);o&&o.jumpToBracket()},t}(u.b),v=function(e){function t(){return e.call(this,{id:"editor.action.selectToBracket",label:i.a("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var o=E.get(t);o&&o.selectToBracket()},t}(u.b),b=function(e,t){this.position=e,this.brackets=t},E=function(e){function t(t){var o=e.call(this)||this;return o._editor=t,o._lastBracketsData=[],o._lastVersionId=0,o._decorations=[],o._updateBracketsSoon=o._register(new l.c((function(){return o._updateBrackets()}),50)),o._matchBrackets=o._editor.getConfiguration().contribInfo.matchBrackets,o._updateBracketsSoon.schedule(),o._register(t.onDidChangeCursorPosition((function(e){o._matchBrackets&&o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeModelContent((function(e){o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeModel((function(e){o._decorations=[],o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeModelLanguageConfiguration((function(e){o._lastBracketsData=[],o._updateBracketsSoon.schedule()}))),o._register(t.onDidChangeConfiguration((function(e){o._matchBrackets=o._editor.getConfiguration().contribInfo.matchBrackets,!o._matchBrackets&&o._decorations.length>0&&(o._decorations=o._editor.deltaDecorations(o._decorations,[])),o._updateBracketsSoon.schedule()}))),o}return m(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.jumpToBracket=function(){var e=this._editor.getModel();if(e){var t=this._editor.getSelections().map((function(t){var o=t.getStartPosition(),n=e.matchBracket(o),i=null;if(n)n[0].containsPosition(o)?i=n[1].getStartPosition():n[1].containsPosition(o)&&(i=n[0].getStartPosition());else{var r=e.findNextBracket(o);r&&r.range&&(i=r.range.getStartPosition())}return i?new a.a(i.lineNumber,i.column,i.lineNumber,i.column):new a.a(o.lineNumber,o.column,o.lineNumber,o.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}},t.prototype.selectToBracket=function(){var e=this._editor.getModel();if(e){var t=[];this._editor.getSelections().forEach((function(o){var n=o.getStartPosition(),i=e.matchBracket(n),r=null,s=null;if(!i){var l=e.findNextBracket(n);l&&l.range&&(i=e.matchBracket(l.range.getStartPosition()))}i&&(i[0].startLineNumber===i[1].startLineNumber?(r=i[1].startColumn0&&(this._editor.setSelections(t),this._editor.revealRange(t[0]))}},t.prototype._updateBrackets=function(){if(this._matchBrackets){this._recomputeBrackets();for(var e=[],o=0,n=0,i=this._lastBracketsData.length;n1&&i.sort(s.a.compare);var c=[],h=0,d=0,g=o.length;for(a=0,l=i.length;a=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e,t){return function(o,n){t(o,n,e)}},v=function(){function e(e,t,o,n,i,r){var s=this;this._contextMenuService=t,this._contextViewService=o,this._contextKeyService=n,this._keybindingService=i,this._menuService=r,this._toDispose=[],this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.push(this._editor.onContextMenu((function(e){return s._onContextMenu(e)}))),this._toDispose.push(this._editor.onDidScrollChange((function(e){s._contextMenuIsBeingShownCount>0&&s._contextViewService.hideContextView()}))),this._toDispose.push(this._editor.onKeyDown((function(e){58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())})))}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._onContextMenu=function(e){if(!this._editor.getConfiguration().contribInfo.contextmenu)return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));var t;e.target.type!==f.b.OVERLAY_WIDGET&&(e.event.preventDefault(),(e.target.type===f.b.CONTENT_TEXT||e.target.type===f.b.CONTENT_EMPTY||e.target.type===f.b.TEXTAREA)&&(this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position),e.target.type!==f.b.TEXTAREA&&(t={x:e.event.posx,y:e.event.posy+1}),this.showContextMenu(t)))},e.prototype.showContextMenu=function(e){if(this._editor.getConfiguration().contribInfo.contextmenu)if(this._contextMenuService){var t=this._getMenuActions();t.length>0&&this._doShowContextMenu(t,e)}else this._editor.focus()},e.prototype._getMenuActions=function(){var e=[],t=this._menuService.createMenu(d.b.EditorContext,this._contextKeyService),o=t.getActions({arg:this._editor.getModel().uri});t.dispose();for(var n=0,i=o;n0&&this._contextViewService.hideContextView(),this._toDispose=Object(r.d)(this._toDispose)},e.ID="editor.contrib.contextmenu",e=_([y(1,u.a),y(2,u.b),y(3,h.e),y(4,c.a),y(5,d.a)],e)}(),b=function(e){function t(){return e.call(this,{id:"editor.action.showContextMenu",label:i.a("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:null,kbOpts:{kbExpr:g.a.textInputFocus,primary:1092,weight:100}})||this}return m(t,e),t.prototype.run=function(e,t){v.get(t).showContextMenu()},t}(p.b);Object(p.h)(v),Object(p.f)(b)},function(e,t,o){"use strict";o.r(t),o.d(t,"CursorUndoController",(function(){return c})),o.d(t,"CursorUndo",(function(){return h}));var n,i=o(0),r=o(3),s=o(6),a=o(5),l=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),u=function(){function e(e){this.selections=e}return e.prototype.equals=function(e){var t=this.selections.length;if(t!==e.selections.length)return!1;for(var o=0;o50&&o._undoStack.shift()),o._prevState=o._readState()}))),o}return l(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype._readState=function(){return this._editor.getModel()?new u(this._editor.getSelections()):null},t.prototype.getId=function(){return t.ID},t.prototype.cursorUndo=function(){for(var e=new u(this._editor.getSelections());this._undoStack.length>0;){var t=this._undoStack.pop();if(!t.equals(e))return this._isCursorUndo=!0,this._editor.setSelections(t.selections),this._editor.revealRangeInCenterIfOutsideViewport(t.selections[0],0),void(this._isCursorUndo=!1)}},t.ID="editor.contrib.cursorUndoController",t}(s.a),h=function(e){function t(){return e.call(this,{id:"cursorUndo",label:i.a("cursor.undo","Soft Undo"),alias:"Soft Undo",precondition:null,kbOpts:{kbExpr:a.a.textInputFocus,primary:2099,weight:100}})||this}return l(t,e),t.prototype.run=function(e,t,o){c.get(t).cursorUndo()},t}(r.b);Object(r.h)(c),Object(r.f)(h)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(3),s=o(96),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomIn",label:i.a("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:null})||this}return a(t,e),t.prototype.run=function(e,t){s.a.setZoomLevel(s.a.getZoomLevel()+1)},t}(r.b),u=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomOut",label:i.a("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:null})||this}return a(t,e),t.prototype.run=function(e,t){s.a.setZoomLevel(s.a.getZoomLevel()-1)},t}(r.b),c=function(e){function t(){return e.call(this,{id:"editor.action.fontZoomReset",label:i.a("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:null})||this}return a(t,e),t.prototype.run=function(e,t){s.a.setZoomLevel(0)},t}(r.b);Object(r.f)(l),Object(r.f)(u),Object(r.f)(c)},function(e,t,o){"use strict";o.r(t);o(299);var n=o(0),i=o(17),r=o(13),s=o(71),a=o(10),l=o(89),u=o(2),c=o(11),h=o(16),d=o(3),g=o(164),p=o(6),f=o(132),m=o(19),_=o(7),y=o(90),v=o(154),b=o(209),E=o(9),C=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},S=function(e,t){return function(o,n){t(o,n,e)}},T=function(){function e(e,t,o){var n=this;this.textModelResolverService=t,this.modeService=o,this.toUnhook=[],this.decorations=[],this.editor=e,this.throttler=new i.e;var s=new b.a(e);this.toUnhook.push(s),this.toUnhook.push(s.onMouseMoveOrRelevantKeyDown((function(e){var t=e[0],o=e[1];n.startFindDefinition(t,o)}))),this.toUnhook.push(s.onExecute((function(e){n.isEnabled(e)&&n.gotoDefinition(e.target,e.hasSideBySideModifier).done((function(){n.removeDecorations()}),(function(e){n.removeDecorations(),Object(r.e)(e)}))}))),this.toUnhook.push(s.onCancel((function(){n.removeDecorations(),n.currentWordUnderMouse=null})))}return e.prototype.startFindDefinition=function(e,t){var o=this;if(!this.isEnabled(e,t))return this.currentWordUnderMouse=null,void this.removeDecorations();var i=e.target.position,l=i?this.editor.getModel().getWordAtPosition(i):null;if(!l)return this.currentWordUnderMouse=null,void this.removeDecorations();if(!this.currentWordUnderMouse||this.currentWordUnderMouse.startColumn!==l.startColumn||this.currentWordUnderMouse.endColumn!==l.endColumn||this.currentWordUnderMouse.word!==l.word){this.currentWordUnderMouse=l;var c=new y.a(this.editor,15);this.throttler.queue((function(){return c.validate(o.editor)?o.findDefinition(e.target):a.b.wrap(null)})).then((function(e){if(e&&e.length&&c.validate(o.editor))if(e.length>1)o.addDecoration(new u.a(i.lineNumber,l.startColumn,i.lineNumber,l.endColumn),(new s.a).appendText(n.a("multipleResults","Click to show {0} definitions.",e.length)));else{var t=e[0];if(!t.uri)return;o.textModelResolverService.createModelReference(t.uri).then((function(e){if(e.object&&e.object.textEditorModel){var n=e.object.textEditorModel,r=t.range.startLineNumber;if(0!==n.getLineMaxColumn(r)){var a,c=o.getPreviewValue(n,r);a=t.origin?u.a.lift(t.origin):new u.a(i.lineNumber,l.startColumn,i.lineNumber,l.endColumn),o.addDecoration(a,(new s.a).appendCodeblock(o.modeService.getModeIdByFilenameOrFirstLine(n.uri.fsPath),c)),e.dispose()}else e.dispose()}else e.dispose()}))}else o.removeDecorations()})).done(void 0,r.e)}},e.prototype.getPreviewValue=function(t,o){var n=this.getPreviewRangeBasedOnBrackets(t,o);return n.endLineNumber-n.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(t,o)),this.stripIndentationFromPreviewRange(t,o,n)},e.prototype.stripIndentationFromPreviewRange=function(e,t,o){for(var n=e.getLineFirstNonWhitespaceColumn(t),i=t+1;in)return new u.a(o,1,n+1,1);s=t.findNextBracket(new E.a(c,h))}return new u.a(o,1,n+1,1)},e.prototype.addDecoration=function(e,t){var o={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.decorations=this.editor.deltaDecorations(this.decorations,[o])},e.prototype.removeDecorations=function(){this.decorations.length>0&&(this.decorations=this.editor.deltaDecorations(this.decorations,[]))},e.prototype.isEnabled=function(e,t){return this.editor.getModel()&&e.isNoneOrSingleMouseDown&&e.target.type===h.b.CONTENT_TEXT&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey)&&c.e.has(this.editor.getModel())},e.prototype.findDefinition=function(e){var t=this.editor.getModel();return t?Object(g.a)(t,e.position):a.b.as(null)},e.prototype.gotoDefinition=function(e,t){var o=this;this.editor.setPosition(e.position);var n=new v.DefinitionAction(new v.DefinitionActionConfig(t,!1,!0,!1),{alias:void 0,label:void 0,id:void 0,precondition:void 0});return this.editor.invokeWithinContext((function(e){return n.run(e,o.editor)}))},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.toUnhook=Object(p.d)(this.toUnhook)},e.ID="editor.contrib.gotodefinitionwithmouse",e.MAX_SOURCE_PREVIEW_LINES=8,e=C([S(1,f.a),S(2,l.a)],e)}();Object(d.h)(T),Object(m.e)((function(e,t){var o=e.getColor(_.m);o&&t.addRule(".monaco-editor .goto-definition-link { color: "+o+" !important; }")}))},function(e,t,o){"use strict";o.r(t),o.d(t,"GotoLineEntry",(function(){return p})),o.d(t,"GotoLineAction",(function(){return f}));o(472);var n,i=o(0),r=o(123),s=o(97),a=o(5),l=o(16),u=o(161),c=o(3),h=o(9),d=o(2),g=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),p=function(e){function t(t,o,n){var i=e.call(this)||this;return i.editor=o,i.decorator=n,i._parseResult=i._parseInput(t),i}return g(t,e),t.prototype._parseInput=function(e){var t,o,n=e.split(",").map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}));t=0===n.length?new h.a(-1,-1):1===n.length?new h.a(n[0],1):new h.a(n[0],n[1]);var r=(o=Object(l.d)(this.editor)?this.editor.getModel():this.editor.getModel().modified).validatePosition(t).equals(t);return{position:t,isValid:r,label:r?t.column&&t.column>1?i.a("gotoLineLabelValidLineAndColumn","Go to line {0} and character {1}",t.lineNumber,t.column):i.a("gotoLineLabelValidLine","Go to line {0}",t.lineNumber,t.column):t.lineNumber<1||t.lineNumber>o.getLineCount()?i.a("gotoLineLabelEmptyWithLineLimit","Type a line number between 1 and {0} to navigate to",o.getLineCount()):i.a("gotoLineLabelEmptyWithLineAndColumnLimit","Type a character between 1 and {0} to navigate to",o.getLineMaxColumn(t.lineNumber))}},t.prototype.getLabel=function(){return this._parseResult.label},t.prototype.getAriaLabel=function(){return i.a("gotoLineAriaLabel","Go to line {0}",this._parseResult.label)},t.prototype.run=function(e,t){return e===s.a.OPEN?this.runOpen():this.runPreview()},t.prototype.runOpen=function(){if(!this._parseResult.isValid)return!1;var e=this.toSelection();return this.editor.setSelection(e),this.editor.revealRangeInCenter(e,0),this.editor.focus(),!0},t.prototype.runPreview=function(){if(!this._parseResult.isValid)return this.decorator.clearDecorations(),!1;var e=this.toSelection();return this.editor.revealRangeInCenter(e,0),this.decorator.decorateLine(e,this.editor),!1},t.prototype.toSelection=function(){return new d.a(this._parseResult.position.lineNumber,this._parseResult.position.column,this._parseResult.position.lineNumber,this._parseResult.position.column)},t}(r.a),f=function(e){function t(){return e.call(this,i.a("gotoLineActionInput","Type a line number, followed by an optional colon and a character number to navigate to"),{id:"editor.action.gotoLine",label:i.a("GotoLineAction.label","Go to Line..."),alias:"Go to Line...",precondition:null,kbOpts:{kbExpr:a.a.focus,primary:2085,mac:{primary:293},weight:100}})||this}return g(t,e),t.prototype.run=function(e,t){var o=this;this._show(this.getController(t),{getModel:function(e){return new r.c([new p(e,t,o.getController(t))])},getAutoFocus:function(e){return{autoFocusFirstEntry:e.length>0}}})},t}(u.a);Object(c.f)(f)},function(e,t,o){"use strict";o.r(t);o(478);var n,i=o(0),r=o(6),s=o(8),a=o(3),l=o(16),u=o(89),c=o(11),h=o(103),d=o(69),g=o(14),p=o(19),f=o(7),m=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),_=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},y=function(e,t){return function(o,n){t(o,n,e)}},v=function(e){function t(t,o,n){var i=e.call(this)||this;return i._editor=t,i._standaloneThemeService=o,i._modeService=n,i._widget=null,i._register(i._editor.onDidChangeModel((function(e){return i.stop()}))),i._register(i._editor.onDidChangeModelLanguage((function(e){return i.stop()}))),i._register(c.y.onDidChange((function(e){return i.stop()}))),i}return m(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.dispose=function(){this.stop(),e.prototype.dispose.call(this)},t.prototype.launch=function(){this._widget||this._editor.getModel()&&(this._widget=new E(this._editor,this._standaloneThemeService,this._modeService))},t.prototype.stop=function(){this._widget&&(this._widget.dispose(),this._widget=null)},t.ID="editor.contrib.inspectTokens",t=_([y(1,h.a),y(2,u.a)],t)}(r.a),b=function(e){function t(){return e.call(this,{id:"editor.action.inspectTokens",label:i.a("inspectTokens","Developer: Inspect Tokens"),alias:"Developer: Inspect Tokens",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var o=v.get(t);o&&o.launch()},t}(a.b);var E=function(e){function t(t,o,n){var i,r=e.call(this)||this;return r.allowEditorOverflow=!0,r._editor=t,r._modeService=n,r._model=r._editor.getModel(),r._domNode=document.createElement("div"),r._domNode.className="tokens-inspect-widget",r._tokenizationSupport=(i=r._model.getLanguageIdentifier(),c.y.get(i.language)||{getInitialState:function(){return d.c},tokenize:function(e,t,o){return Object(d.d)(i.language,e,t,o)},tokenize2:function(e,t,o){return Object(d.e)(i.id,e,t,o)}}),r._compute(r._editor.getPosition()),r._register(r._editor.onDidChangeCursorPosition((function(e){return r._compute(r._editor.getPosition())}))),r._editor.addContentWidget(r),r}return m(t,e),t.prototype.dispose=function(){this._editor.removeContentWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t._ID},t.prototype._compute=function(e){for(var t=this._getTokensAtLine(e.lineNumber),o=0,n=t.tokens1.length-1;n>=0;n--){var i=t.tokens1[n];if(e.column-1>=i.offset){o=n;break}}var r=0;for(n=t.tokens2.length>>>1;n>=0;n--)if(e.column-1>=t.tokens2[n<<1]){r=n;break}var a="",l=this._model.getLineContent(e.lineNumber),u="";if(o'+function(e){for(var t="",o=0,n=e.length;o('+u.length+" "+(1===u.length?"char":"chars")+")",a+='
    ';var d=this._decodeMetadata(t.tokens2[1+(r<<1)]);a+='',a+='",a+='",a+='",a+='",a+='",a+="",a+='
    ',o'+Object(s.escape)(t.tokens1[o].type)+""),this._domNode.innerHTML=a,this._editor.layoutContentWidget(this)},t.prototype._decodeMetadata=function(e){var t=c.y.getColorMap(),o=c.x.getLanguageId(e),n=c.x.getTokenType(e),i=c.x.getFontStyle(e),r=c.x.getForeground(e),s=c.x.getBackground(e);return{languageIdentifier:this._modeService.getLanguageIdentifier(o),tokenType:n,fontStyle:i,foreground:t[r],background:t[s]}},t.prototype._tokenTypeToString=function(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx"}return"??"},t.prototype._fontStyleToString=function(e){var t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),0===t.length&&(t="---"),t},t.prototype._getTokensAtLine=function(e){var t=this._getStateBeforeLine(e),o=this._tokenizationSupport.tokenize(this._model.getLineContent(e),t,0),n=this._tokenizationSupport.tokenize2(this._model.getLineContent(e),t,0);return{startState:t,tokens1:o.tokens,tokens2:n.tokens,endState:o.endState}},t.prototype._getStateBeforeLine=function(e){for(var t=this._tokenizationSupport.getInitialState(),o=1;o1&&o.push(new d.a(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}},t.prototype.run=function(e,t){var o=this,n=t.getModel(),i=t.getSelections(),r=[];i.forEach((function(e){return o.getCursorsForSelection(e,n,r)})),r.length>0&&t.setSelections(r)},t}(c.b),w=function(e,t,o){this.selections=e,this.revealRange=t,this.revealScrollType=o},k=function(){function e(e,t,o,n,i,r,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=o,this.searchText=n,this.wholeWord=i,this.matchCase=r,this.currentMatch=s}return e.create=function(t,o){var n=o.getState();if(!t.hasTextFocus()&&n.isRevealed&&n.searchString.length>0)return new e(t,o,!1,n.searchString,n.wholeWord,n.matchCase,null);var i,r,s=!1,a=t.getSelections();1===a.length&&a[0].isEmpty()?(s=!0,i=!0,r=!0):(i=n.wholeWord,r=n.matchCase);var l,u=t.getSelection(),c=null;if(u.isEmpty()){var h=t.getModel().getWordAtPosition(u.getStartPosition());if(!h)return null;l=h.word,c=new d.a(u.startLineNumber,h.startColumn,u.startLineNumber,h.endColumn)}else l=t.getModel().getValueInRange(u).replace(/\r\n/g,"\n");return new e(t,o,s,l,i,r,c)},e.prototype.addSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.concat(e),e,0)},e.prototype.moveSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getNextMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),o=t[t.length-1],n=this._editor.getModel().findNextMatch(this.searchText,o.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return n?new d.a(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null},e.prototype.addSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.concat(e),e,0)},e.prototype.moveSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new w(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getPreviousMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();var t=this._editor.getSelections(),o=t[t.length-1],n=this._editor.getModel().findPreviousMatch(this.searchText,o.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return n?new d.a(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn):null},e.prototype.selectAll=function(){return this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824)},e}(),O=function(e){function t(t){var o=e.call(this)||this;return o._editor=t,o._ignoreSelectionChange=!1,o._session=null,o._sessionDispose=[],o}return E(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this._endSession(),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype._beginSessionIfNeeded=function(e){var t=this;if(!this._session){var o=k.create(this._editor,e);if(!o)return;this._session=o;var n={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(n.wholeWordOverride=1,n.matchCaseOverride=1,n.isRegexOverride=2),e.getState().change(n,!1),this._sessionDispose=[this._editor.onDidChangeCursorSelection((function(e){t._ignoreSelectionChange||t._endSession()})),this._editor.onDidBlurEditorText((function(){t._endSession()})),e.getState().onFindReplaceStateChange((function(e){(e.matchCase||e.wholeWord)&&t._endSession()}))]}},t.prototype._endSession=function(){if(this._sessionDispose=Object(r.d)(this._sessionDispose),this._session&&this._session.isDisconnectedFromFindController){this._session.findController.getState().change({wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0},!1)}this._session=null},t.prototype._setSelections=function(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1},t.prototype._expandEmptyToWord=function(e,t){if(!t.isEmpty())return t;var o=e.getWordAtPosition(t.getStartPosition());return o?new d.a(t.startLineNumber,o.startColumn,t.startLineNumber,o.endColumn):t},t.prototype._applySessionResult=function(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))},t.prototype.getSession=function(e){return this._session},t.prototype.addSelectionToNextFindMatch=function(e){if(!this._session){var t=this._editor.getSelections();if(t.length>1){var o=e.getState().matchCase;if(!B(this._editor.getModel(),t,o)){for(var n=this._editor.getModel(),i=[],r=0,s=t.length;r0&&o.isRegex)t=this._editor.getModel().findMatches(o.searchString,!0,o.isRegex,o.matchCase,o.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(t.length>0){for(var n=this._editor.getSelection(),i=0,r=t.length;i1){var l=r.getState().matchCase;if(!B(t.getModel(),a,l))return null}s=k.create(t,r)}if(!s)return null;var u=null,c=f.h.has(o);if(s.currentMatch){if(c)return null;if(!t.getConfiguration().contribInfo.occurrencesHighlight)return null;u=s.currentMatch}if(/^[ \t]+$/.test(s.searchText))return null;if(s.searchText.length>200)return null;var h=r.getState(),d=h.matchCase;if(h.isRevealed){var g=h.searchString;d||(g=g.toLowerCase());var p=s.searchText;if(d||(p=p.toLowerCase()),g===p&&s.matchCase===h.matchCase&&s.wholeWord===h.wholeWord&&!h.isRegex)return null}return new M(u,s.searchText,s.matchCase,s.wholeWord?t.getConfiguration().wordSeparators:null)},t.prototype._setState=function(e){if(M.softEquals(this.state,e))this.state=e;else if(this.state=e,this.state){var o=this.editor.getModel();if(!o.isTooLargeForTokenization()){var n=f.h.has(o),i=o.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map((function(e){return e.range}));i.sort(h.a.compareRangesUsingStarts);var r=this.editor.getSelections();r.sort(h.a.compareRangesUsingStarts);for(var s=[],a=0,l=0,u=i.length,c=r.length;a=c)s.push(d),a++;else{var g=h.a.compareRangesUsingStarts(d,r[l]);g<0?(!r[l].isEmpty()&&h.a.areIntersecting(d,r[l])||s.push(d),a++):g>0?l++:(a++,l++)}}var p=s.map((function(e){return{range:e,options:n?t._SELECTION_HIGHLIGHT:t._SELECTION_HIGHLIGHT_OVERVIEW}}));this.decorations=this.editor.deltaDecorations(this.decorations,p)}}else this.decorations=this.editor.deltaDecorations(this.decorations,[])},t.prototype.dispose=function(){this._setState(null),e.prototype.dispose.call(this)},t.ID="editor.contrib.selectionHighlighter",t._SELECTION_HIGHLIGHT_OVERVIEW=_.a.register({stickiness:l.h.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight",overviewRuler:{color:Object(v.f)(y.gb),darkColor:Object(v.f)(y.gb),position:l.f.Center}}),t._SELECTION_HIGHLIGHT=_.a.register({stickiness:l.h.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight"}),t}(r.a);function B(e,t,o){for(var n=F(e,t[0],!o),i=1,r=t.length;i=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},R=function(e,t){return function(o,n){t(o,n,e)}},N={getMetaTitle:function(e){return e.references.length>1&&i.a("meta.titleReference"," – {0} references",e.references.length)}},L=function(){function e(e,t){e instanceof y.a&&d.a.inPeekEditor.bindTo(t)}return e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.ID="editor.contrib.referenceController",e=O([R(1,s.e)],e)}(),I=function(e){function t(){return e.call(this,{id:"editor.action.referenceSearch.trigger",label:i.a("references.action.label","Find All References"),alias:"Find All References",precondition:s.d.and(_.a.hasReferenceProvider,d.a.notInPeekEditor,_.a.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:1094,weight:100},menuOpts:{group:"navigation",order:1.5}})||this}return k(t,e),t.prototype.run=function(e,t){var o=g.a.get(t);if(o){var n=t.getSelection(),i=t.getModel(),r=Object(f.i)((function(e){return P(i,n.getStartPosition(),e).then((function(e){return new p.c(e)}))}));o.toggleWidget(n,r,N)}},t}(u.b);Object(u.h)(L),Object(u.f)(I);function D(e,t){A(e,(function(e){return e.closeWidget()}))}function A(e,t){var o=Object(d.c)(e);if(o){var n=g.a.get(o);n&&t(n)}}function P(e,t,o){var n=c.r.ordered(e).map((function(o){return Object(f.h)((function(n){return o.provideReferences(e,t,{includeDeclaration:!0},n)})).then((function(e){if(Array.isArray(e))return e}),(function(e){Object(m.f)(e)}))}));return Promise.all(n).then((function(e){for(var t=[],o=0,n=e;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},p=function(e,t){return function(o,n){t(o,n,e)}},f=function(e){function t(t,o,n,i,r,s,a){return e.call(this,!0,t,o,n,i,r,s,a)||this}return d(t,e),t=g([p(1,s.e),p(2,i.a),p(3,c.a),p(4,r.a),p(5,l.a),p(6,a.b)],t)}(h.a);Object(u.h)(f)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(3),s=o(103),a=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=function(e){function t(){var t=e.call(this,{id:"editor.action.toggleHighContrast",label:i.a("toggleHighContrast","Toggle High Contrast Theme"),alias:"Toggle High Contrast Theme",precondition:null})||this;return t._originalThemeName=null,t}return a(t,e),t.prototype.run=function(e,t){var o=e.get(s.a);this._originalThemeName?(o.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=o.getTheme().themeName,o.setTheme("hc-black"))},t}(r.b);Object(r.f)(l)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(8),s=o(2),a=o(9),l=o(5),u=o(3),c=o(43),h=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),d=function(e){function t(){return e.call(this,{id:"editor.action.transposeLetters",label:i.a("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:l.a.writable,kbOpts:{kbExpr:l.a.textInputFocus,primary:0,mac:{primary:306},weight:100}})||this}return h(t,e),t.prototype.positionLeftOf=function(e,t){var o=e.column,n=e.lineNumber;return o>t.getLineMinColumn(n)?Object(r.isLowSurrogate)(t.getLineContent(n).charCodeAt(o-2))?o-=2:o-=1:n>1&&(n-=1,o=t.getLineMaxColumn(n)),new a.a(n,o)},t.prototype.positionRightOf=function(e,t){var o=e.column,n=e.lineNumber;return o0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())},t}(u.b);Object(u.f)(d)},function(e,t,o){"use strict";o.r(t),o.d(t,"editorWordHighlight",(function(){return S})),o.d(t,"editorWordHighlightStrong",(function(){return T})),o.d(t,"editorWordHighlightBorder",(function(){return w})),o.d(t,"editorWordHighlightStrongBorder",(function(){return k})),o.d(t,"overviewRulerWordHighlightForeground",(function(){return O})),o.d(t,"overviewRulerWordHighlightStrongForeground",(function(){return R})),o.d(t,"ctxHasWordHighlights",(function(){return N})),o.d(t,"getOccurrencesAtPosition",(function(){return L}));var n,i=o(0),r=o(17),s=o(13),a=o(2),l=o(3),u=o(11),c=o(6),h=o(7),d=o(19),g=o(35),p=o(26),f=o(12),m=o(5),_=o(25),y=o(18),v=o(48),b=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),E=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},C=function(e,t){return function(o,n){t(o,n,e)}},S=Object(h.kb)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},i.a("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque to not hide underlying decorations."),!0),T=Object(h.kb)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},i.a("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque to not hide underlying decorations."),!0),w=Object(h.kb)("editor.wordHighlightBorder",{light:null,dark:null,hc:h.b},i.a("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),k=Object(h.kb)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:h.b},i.a("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),O=Object(h.kb)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},i.a("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque to not hide underlying decorations."),!0),R=Object(h.kb)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},i.a("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque to not hide underlying decorations."),!0),N=new f.f("hasWordHighlights",!1);function L(e,t,o){var n=u.h.ordered(e);return Object(r.k)(n.map((function(n){return function(){return Promise.resolve(n.provideDocumentHighlights(e,t,o)).then(void 0,s.f)}})),(function(e){return!Object(_.k)(e)}))}Object(l.e)("_executeDocumentHighlights",(function(e,t){return L(e,t,v.a.None)}));var I=function(){function e(e,t){var o=this;this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=N.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getConfiguration().contribInfo.occurrencesHighlight,this.model=this.editor.getModel(),this.toUnhook=[],this.toUnhook.push(e.onDidChangeCursorPosition((function(e){o._ignorePositionChangeEvent||o.occurrencesHighlight&&o._onPositionChanged(e)}))),this.toUnhook.push(e.onDidChangeModel((function(e){o._stopAll(),o.model=o.editor.getModel()}))),this.toUnhook.push(e.onDidChangeModelContent((function(e){o._stopAll()}))),this.toUnhook.push(e.onDidChangeConfiguration((function(e){var t=o.editor.getConfiguration().contribInfo.occurrencesHighlight;o.occurrencesHighlight!==t&&(o.occurrencesHighlight=t,o._stopAll())}))),this._lastWordRange=null,this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return e.prototype.hasDecorations=function(){return this._decorationIds.length>0},e.prototype.restore=function(){this.occurrencesHighlight&&this._run()},e.prototype._getSortedHighlights=function(){var e=this;return this._decorationIds.map((function(t){return e.model.getDecorationRange(t)})).sort(a.a.compareRangesUsingStarts)},e.prototype.moveNext=function(){var e=this,t=this._getSortedHighlights(),o=t[(Object(_.h)(t,(function(t){return t.containsPosition(e.editor.getPosition())}))+1)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o)}finally{this._ignorePositionChangeEvent=!1}},e.prototype.moveBack=function(){var e=this,t=this._getSortedHighlights(),o=t[(Object(_.h)(t,(function(t){return t.containsPosition(e.editor.getPosition())}))-1+t.length)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(o.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(o)}finally{this._ignorePositionChangeEvent=!1}},e.prototype._removeDecorations=function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))},e.prototype._stopAll=function(){this._lastWordRange=null,this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)},e.prototype._onPositionChanged=function(e){this.occurrencesHighlight&&e.reason===g.a.Explicit?this._run():this._stopAll()},e.prototype._run=function(){var e=this;if(u.h.has(this.model)){var t=this.editor.getSelection();if(t.startLineNumber===t.endLineNumber){var o=t.startLineNumber,n=t.startColumn,i=t.endColumn,l=this.model.getWordAtPosition({lineNumber:o,column:n});if(!l||l.startColumn>n||l.endColumn=i&&(h=!0)}if(this.lastCursorPositionChangeTime=(new Date).getTime(),h)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();var f=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=Object(r.i)((function(t){return L(e.model,e.editor.getPosition(),t)})),this.workerRequest.then((function(t){f===e.workerRequestTokenId&&(e.workerRequestCompleted=!0,e.workerRequestValue=t||[],e._beginRenderDecorations())}),s.e)}this._lastWordRange=c}}else this._stopAll()}else this._stopAll()},e.prototype._beginRenderDecorations=function(){var e=this,t=(new Date).getTime(),o=this.lastCursorPositionChangeTime+250;t>=o?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((function(){e.renderDecorations()}),o-t)},e.prototype.renderDecorations=function(){this.renderDecorationsTimer=-1;for(var t=[],o=0,n=this.workerRequestValue.length;o1)?r?r.apply(void 0,e.params.concat([d.token])):S.apply(void 0,[e.method].concat(e.params,[d.token])):r?r(e.params,d.token):S(e.method,e.params,d.token);f?m.then?m.then((function(o){delete N[p],t(o,e.method,c)}),(function(t){delete N[p],t instanceof a.ResponseError?n(t,e.method,c):t&&s.string(t.message)?n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+t.message),e.method,c):n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,c)})):(delete N[p],t(f,e.method,c)):(delete N[p],function(t,n,i){void 0===t&&(t=null);var r={jsonrpc:C,id:e.id,result:t};Y(r,n,i),o.write(r)}(f,e.method,c))}catch(o){delete N[p],o instanceof a.ResponseError?t(o,e.method,c):o&&s.string(o.message)?n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed with message: "+o.message),e.method,c):n(new a.ResponseError(a.ErrorCodes.InternalError,"Request "+e.method+" failed unexpectedly without providing any details."),e.method,c)}}else n(new a.ResponseError(a.ErrorCodes.MethodNotFound,"Unhandled method "+e.method),e.method,c)}(e):a.isNotificationMessage(e)?function(e){if(V())return;var t,o=void 0;if(e.method===d.type.method)t=function(e){var t=e.id,o=N[String(t)];o&&o.cancel()};else{var i=k[e.method];i&&(t=i.handler,o=i.type)}if(t||w)try{!function(e){if(L===g.Off||!l||e.method===f.type.method)return;var t=void 0;L===g.Verbose&&(t=e.params?"Params: "+JSON.stringify(e.params,null,4)+"\n\n":"No parameters provided.\n\n");l.log("Received notification '"+e.method+"'.",t)}(e),void 0===e.params||void 0!==o&&0===o.numberOfParams?t?t():w(e.method):s.array(e.params)&&(void 0===o||o.numberOfParams>1)?t?t.apply(void 0,e.params):w.apply(void 0,[e.method].concat(e.params)):t?t(e.params):w(e.method,e.params)}catch(t){t.message?n.error("Notification handler '"+e.method+"' failed with message: "+t.message):n.error("Notification handler '"+e.method+"' failed unexpectedly.")}else P.fire(e)}(e):a.isResponseMessage(e)?function(e){if(V())return;if(null===e.id)e.error?n.error("Received response message without id: Error is: \n"+JSON.stringify(e.error,void 0,4)):n.error("Received response message without id. No further error information provided.");else{var t=String(e.id),o=R[t];if(function(e,t){if(L===g.Off||!l)return;var o=void 0;L===g.Verbose&&(e.error&&e.error.data?o="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?o="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(o="No result returned.\n\n"));if(t){var n=e.error?" Request failed: "+e.error.message+" ("+e.error.code+").":"";l.log("Received response '"+t.method+" - ("+e.id+")' in "+(Date.now()-t.timerStart)+"ms."+n,o)}else l.log("Received response "+e.id+" without active response promise.",o)}(e,o),o){delete R[t];try{if(e.error){var i=e.error;o.reject(new a.ResponseError(i.code,i.message,i.data))}else{if(void 0===e.result)throw new Error("Should never happen.");o.resolve(e.result)}}catch(i){i.message?n.error("Response handler '"+o.method+"' failed with message: "+i.message):n.error("Response handler '"+o.method+"' failed unexpectedly.")}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error("Received message which is neither a response nor a notification message:\n"+JSON.stringify(e,null,4));var t=e;if(s.string(t.id)||s.number(t.id)){var o=String(t.id),i=R[o];i&&i.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{j()}}()})))}t.onClose(W),t.onError((function(e){D.fire([e,void 0,void 0])})),o.onClose(W),o.onError((function(e){D.fire(e)}));var G=function(e){try{if(a.isNotificationMessage(e)&&e.method===d.type.method){var t=x(e.params.id),n=O.get(t);if(a.isRequestMessage(n)){var r=i&&i.cancelUndispatched?i.cancelUndispatched(n,F):void 0;if(r&&(void 0!==r.error||void 0!==r.result))return O.delete(t),r.id=n.id,Y(r,e.method,Date.now()),void o.write(r)}}B(O,e)}finally{j()}};function z(e){if(L!==g.Off&&l){var t=void 0;L===g.Verbose&&e.params&&(t="Params: "+JSON.stringify(e.params,null,4)+"\n\n"),l.log("Sending request '"+e.method+" - ("+e.id+")'.",t)}}function K(e){if(L!==g.Off&&l){var t=void 0;L===g.Verbose&&(t=e.params?"Params: "+JSON.stringify(e.params,null,4)+"\n\n":"No parameters provided.\n\n"),l.log("Sending notification '"+e.method+"'.",t)}}function Y(e,t,o){if(L!==g.Off&&l){var n=void 0;L===g.Verbose&&(e.error&&e.error.data?n="Error data: "+JSON.stringify(e.error.data,null,4)+"\n\n":e.result?n="Result: "+JSON.stringify(e.result,null,4)+"\n\n":void 0===e.error&&(n="No result returned.\n\n")),l.log("Sending response '"+t+" - ("+e.id+")'. Processing request took "+(Date.now()-o)+"ms",n)}}function X(){if(U())throw new v(m.Closed,"Connection is closed.");if(V())throw new v(m.Disposed,"Connection is disposed.")}function q(){if(!H())throw new Error("Call listen() first.")}function $(e){return void 0===e?null:e}function J(e,t){var o,n=e.numberOfParams;switch(n){case 0:o=null;break;case 1:o=$(t[0]);break;default:o=[];for(var i=0;i=o.length)o.copy(this.buffer,this.index,0,o.length);else{var s=(Math.ceil((this.index+o.length)/r)+1)*r;0===this.index?(this.buffer=e.allocUnsafe(s),o.copy(this.buffer,0,0,o.length)):this.buffer=e.concat([this.buffer.slice(0,this.index),o],s)}this.index+=o.length}tryReadHeaders(){let e=void 0,t=0;for(;t+3=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split(l).forEach(t=>{let o=t.indexOf(":");if(-1===o)throw new Error("Message header must separate key and value using :");let n=t.substr(0,o),i=t.substr(o+1).trim();e[n]=i});let o=t+4;return this.buffer=this.buffer.slice(o),this.index=this.index-o,e}tryReadContent(e){if(this.index{this.onData(e)}),this.readable.on("error",e=>this.fireError(e)),this.readable.on("close",()=>this.fireClose())}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){let e=this.buffer.tryReadHeaders();if(!e)return;let t=e["Content-Length"];if(!t)throw new Error("Header must provide a Content-Length property.");let o=parseInt(t);if(isNaN(o))throw new Error("Content-Length value must be a number.");this.nextMessageLength=o}var t=this.buffer.tryReadContent(this.nextMessageLength);if(null===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.messageToken++;var o=JSON.parse(t);this.callback(o)}}clearPartialMessageTimer(){this.partialMessageTimer&&(clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}t.StreamMessageReader=h;t.IPCMessageReader=class extends c{constructor(e){super(),this.process=e;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){this.process.on("message",e)}};t.SocketMessageReader=class extends h{constructor(e,t="utf-8"){super(e,t)}}}).call(this,o(119).Buffer)},function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});const n=o(186),i=o(171);let r="Content-Length: ",s="\r\n";!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(t.MessageWriter||(t.MessageWriter={}));class a{constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,o){this.errorEmitter.fire([this.asError(e),t,o])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer recevied error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=a;t.StreamMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.writable=e,this.encoding=t,this.errorCount=0,this.writable.on("error",e=>this.fireError(e)),this.writable.on("close",()=>this.fireClose())}write(t){let o=JSON.stringify(t),n=e.byteLength(o,this.encoding),i=[r,n.toString(),s,s];try{this.writable.write(i.join(""),"ascii"),this.writable.write(o,this.encoding),this.errorCount=0}catch(e){this.errorCount++,this.fireError(e,t,this.errorCount)}}};t.IPCMessageWriter=class extends a{constructor(e){super(),this.process=e,this.errorCount=0,this.queue=[],this.sending=!1;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){try{this.process.send&&(this.sending=!0,this.process.send(e,void 0,void 0,t=>{this.sending=!1,t?(this.errorCount++,this.fireError(t,e,this.errorCount)):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())}))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}};t.SocketMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.socket=e,this.queue=[],this.sending=!1,this.encoding=t,this.errorCount=0,this.socket.on("error",e=>this.fireError(e)),this.socket.on("close",()=>this.fireClose())}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(t){let o=JSON.stringify(t),n=e.byteLength(o,this.encoding),i=[r,n.toString(),s,s];try{this.sending=!0,this.socket.write(i.join(""),"ascii",e=>{e&&this.handleError(e,t);try{this.socket.write(o,this.encoding,e=>{this.sending=!1,e?this.handleError(e,t):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())})}catch(e){this.handleError(e,t)}})}catch(e){this.handleError(e,t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}}}).call(this,o(119).Buffer)},function(e,t,o){"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&i(e.then)}},function(e,t,o){"use strict";o.r(t);var n=o(0),i=o(13),r=o(25),s=o(6),a=o(22),l=o(12),u=o(37),c=o(5),h=o(3),d=o(58),g=o(53),p=o(2),f=o(114),m=o(139),_=o(47),y=o(17),v=o(4),b=o(79),E=o(35),C=o(23),S=o(11),T=o(111),w=o(27),k=function(){function e(t,o,n,i){void 0===i&&(i=w.a.contribInfo.suggest),this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=o,this._options=i,this._refilterKind=1,this._lineContext=n,"top"===i.snippets?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===i.snippets&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return e.prototype.dispose=function(){for(var e=new Set,t=0,o=this._items;t2e3?T.c:T.d,a=0;at.score?-1:e.scoret.idx?1:0},e._compareCompletionItemsSnippetsDown=function(t,o){if(t.suggestion.type!==o.suggestion.type){if("snippet"===t.suggestion.type)return 1;if("snippet"===o.suggestion.type)return-1}return e._compareCompletionItems(t,o)},e._compareCompletionItemsSnippetsUp=function(t,o){if(t.suggestion.type!==o.suggestion.type){if("snippet"===t.suggestion.type)return-1;if("snippet"===o.suggestion.type)return 1}return e._compareCompletionItems(t,o)},e}(),O=function(){function e(e,t,o){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=o}return e.shouldAutoTrigger=function(e){var t=e.getModel();if(!t)return!1;var o=e.getPosition();t.tokenizeIfCheap(o.lineNumber);var n=t.getWordAtPosition(o);return!!n&&(n.endColumn===o.column&&!!isNaN(Number(n.word)))},e}(),R=function(){function e(e){var t=this;this._toDispose=[],this._triggerQuickSuggest=new y.f,this._triggerRefilter=new y.f,this._onDidCancel=new v.a,this._onDidTrigger=new v.a,this._onDidSuggest=new v.a,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._editor=e,this._state=0,this._requestPromise=null,this._completionModel=null,this._context=null,this._currentSelection=this._editor.getSelection()||new C.a(1,1,1,1),this._toDispose.push(this._editor.onDidChangeModel((function(){t._updateTriggerCharacters(),t.cancel()}))),this._toDispose.push(this._editor.onDidChangeModelLanguage((function(){t._updateTriggerCharacters(),t.cancel()}))),this._toDispose.push(this._editor.onDidChangeConfiguration((function(){t._updateTriggerCharacters(),t._updateQuickSuggest()}))),this._toDispose.push(S.u.onDidChange((function(){t._updateTriggerCharacters(),t._updateActiveSuggestSession()}))),this._toDispose.push(this._editor.onDidChangeCursorSelection((function(e){t._onCursorChange(e)}))),this._toDispose.push(this._editor.onDidChangeModelContent((function(e){t._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}return e.prototype.dispose=function(){Object(s.d)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerCharacterListener,this._triggerQuickSuggest,this._triggerRefilter]),this._toDispose=Object(s.d)(this._toDispose),Object(s.d)(this._completionModel),this.cancel()},e.prototype._updateQuickSuggest=function(){this._quickSuggestDelay=this._editor.getConfiguration().contribInfo.quickSuggestionsDelay,(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)},e.prototype._updateTriggerCharacters=function(){var e=this;if(Object(s.d)(this._triggerCharacterListener),!this._editor.getConfiguration().readOnly&&this._editor.getModel()&&this._editor.getConfiguration().contribInfo.suggestOnTriggerCharacters){for(var t=Object.create(null),o=0,n=S.u.all(this._editor.getModel());othis._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){var t=this._completionModel.incomplete,o=this._completionModel.adopt(t);this.trigger({auto:2===this._state},!0,Object(b.d)(t),o)}else{var n=this._completionModel.lineContext,i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(O.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,isFrozen:i})}}else this.cancel()},e}(),N=(o(485),o(8)),L=o(1),I=o(124),D=(o(486),o(21)),A=o(94),P=o(15),M=o(66),x=o(51),B=o(50),F=o(30),H=o(81),U=o(42);function V(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};var o=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-o<=0?{start:0,end:0}:{start:o,end:n}}function W(e){return e.end-e.start<=0}function j(e,t){var o=[],n={start:e.start,end:Math.min(t.start,e.end)},i={start:Math.max(t.end,e.start),end:e.end};return W(n)||o.push(n),W(i)||o.push(i),o}function G(e,t){for(var o=[],n=0,i=t;n=r.range.end)){if(e.end=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s};var Z={useShadows:!0,verticalScrollMode:U.b.Auto},Q=function(){function e(e,t,o,n){void 0===n&&(n=Z),this.virtualDelegate=t,this.renderers=new Map,this.splicing=!1,this.items=[],this.itemId=0,this.rangeMap=new Y;for(var i=0,r=o;i=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"dblclick"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"mousedown"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"contextmenu"),(function(t){return e.toMouseEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.domNode,"touchstart"),(function(t){return e.toTouchEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){var e=this;return Object(v.i)(Object(v.j)(Object(B.a)(this.rowsContainer,M.a.Tap),(function(t){return e.toGestureEvent(t)})),(function(e){return e.index>=0}))},enumerable:!0,configurable:!0}),e.prototype.toMouseEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),o=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:o&&o.element}},e.prototype.toTouchEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),o=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:o&&o.element}},e.prototype.toGestureEvent=function(e){var t=this.getItemIndexFromEventTarget(e.initialTarget),o=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:o&&o.element}},e.prototype.onScroll=function(e){try{this.render(e.scrollTop,e.height)}catch(t){throw console.log("Got bad scroll event:",e),t}},e.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},e.prototype.onDragOver=function(e){this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=e.posy},e.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=L.w(this._domNode).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval((function(){if(void 0!==e.dragAndDropMouseY){var o=e.dragAndDropMouseY-t,n=0,i=e.renderHeight-35;o<35?n=Math.max(-14,.2*(o-35)):o>i&&(n=Math.min(14,.2*(o-i))),e.scrollTop+=n}}),10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout((function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null}),1e3))},e.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},e.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},e.prototype.getItemIndexFromEventTarget=function(e){for(;e instanceof HTMLElement&&e!==this.rowsContainer;){var t=e,o=t.getAttribute("data-index");if(o){var n=Number(o);if(!isNaN(n))return n}e=t.parentElement}return-1},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype.getNextToLastElement=function(e){var t=e[e.length-1];if(!t)return null;var o=this.items[t.end];return o&&o.row?o.row.domNode:null},e.prototype.dispose=function(){if(this.items){for(var e=0,t=this.items;e=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},re=function(){function e(e){this.trait=e,this.renderedElements=[]}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"template:"+this.trait.trait},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){return e},e.prototype.renderElement=function(e,t,o){var n=Object(r.h)(this.renderedElements,(function(e){return e.templateData===o}));if(n>=0){var i=this.renderedElements[n];this.trait.unrender(o),i.index=t}else{i={index:t,templateData:o};this.renderedElements.push(i)}this.trait.renderIndex(t,o)},e.prototype.disposeElement=function(){},e.prototype.splice=function(e,t,o){for(var n=[],i=0;i=e+t&&n.push({index:r.index+o-t,templateData:r.templateData})}this.renderedElements=n},e.prototype.renderIndexes=function(e){for(var t=0,o=this.renderedElements;t-1&&this.trait.renderIndex(i,r)}},e.prototype.disposeTemplate=function(e){var t=Object(r.h)(this.renderedElements,(function(t){return t.templateData===e}));t<0||this.renderedElements.splice(t,1)},e}(),se=function(){function e(e){this._trait=e,this._onChange=new v.a,this.indexes=[]}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trait",{get:function(){return this._trait},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return new re(this)},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,o){var n=o.length-t,i=e+t,r=this.indexes.filter((function(t){return t=i})).map((function(e){return e+n})));this.renderer.splice(e,t,o.length),this.set(r)},e.prototype.renderIndex=function(e,t){L.N(t,this._trait,this.contains(e))},e.prototype.unrender=function(e){L.G(e,this._trait)},e.prototype.set=function(e){var t=this.indexes;this.indexes=e;var o=ve(t,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e}),t},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return this.indexes.some((function(t){return t===e}))},e.prototype.dispose=function(){this.indexes=null,this._onChange=Object(s.d)(this._onChange)},ie([A.a],e.prototype,"renderer",null),e}(),ae=function(e){function t(t){var o=e.call(this,"focused")||this;return o.getDomId=t,o}return ne(t,e),t.prototype.renderIndex=function(t,o){e.prototype.renderIndex.call(this,t,o),o.setAttribute("role","treeitem"),o.setAttribute("id",this.getDomId(t))},t}(se),le=function(){function e(e,t,o){this.trait=e,this.view=t,this.getId=o}return e.prototype.splice=function(e,t,o){var n=this;if(!this.getId)return this.trait.splice(e,t,o.map((function(e){return!1})));var i=this.trait.get().map((function(e){return n.getId(n.view.element(e))})),r=o.map((function(e){return i.indexOf(n.getId(e))>-1}));this.trait.splice(e,t,r)},e}();function ue(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}var ce=function(){function e(e,t,o){this.list=e,this.view=t;var n=!(!1===o.multipleSelectionSupport);this.disposables=[],this.openController=o.openController||pe;var i=Object(v.g)(Object(B.a)(t.domNode,"keydown")).filter((function(e){return!ue(e.target)})).map((function(e){return new x.a(e)}));i.filter((function(e){return 3===e.keyCode})).on(this.onEnter,this,this.disposables),i.filter((function(e){return 16===e.keyCode})).on(this.onUpArrow,this,this.disposables),i.filter((function(e){return 18===e.keyCode})).on(this.onDownArrow,this,this.disposables),i.filter((function(e){return 11===e.keyCode})).on(this.onPageUpArrow,this,this.disposables),i.filter((function(e){return 12===e.keyCode})).on(this.onPageDownArrow,this,this.disposables),i.filter((function(e){return 9===e.keyCode})).on(this.onEscape,this,this.disposables),n&&i.filter((function(e){return(P.d?e.metaKey:e.ctrlKey)&&31===e.keyCode})).on(this.onCtrlA,this,this.disposables)}return e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus()),this.openController.shouldOpen(e.browserEvent)&&this.list.open(this.list.getFocus(),e.browserEvent)},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onCtrlA=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Object(r.m)(this.list.length)),this.view.domNode.focus()},e.prototype.onEscape=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([]),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables)},e}(),he=function(){function e(e,t){this.list=e,this.view=t,this.disposables=[],this.disposables=[],Object(v.g)(Object(B.a)(t.domNode,"keydown")).filter((function(e){return!ue(e.target)})).map((function(e){return new x.a(e)})).filter((function(e){return!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)})).on(this.onTab,this,this.disposables)}return e.prototype.onTab=function(e){if(e.target===this.view.domNode){var t=this.list.getFocus();if(0!==t.length){var o=this.view.domElement(t[0]).querySelector("[tabIndex]");if(o&&o instanceof HTMLElement){var n=window.getComputedStyle(o);"hidden"!==n.visibility&&"none"!==n.display&&(e.preventDefault(),e.stopPropagation(),o.focus())}}}},e.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables)},e}();function de(e){return e instanceof MouseEvent&&2===e.button}var ge={isSelectionSingleChangeEvent:function(e){return P.d?e.browserEvent.metaKey:e.browserEvent.ctrlKey},isSelectionRangeChangeEvent:function(e){return e.browserEvent.shiftKey}},pe={shouldOpen:function(e){return!(e instanceof MouseEvent)||!de(e)}},fe=function(){function e(e,t,o){void 0===o&&(o={}),this.list=e,this.view=t,this.options=o,this.didJustPressContextMenuKey=!1,this.disposables=[],this.multipleSelectionSupport=!(!1===o.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=o.multipleSelectionController||ge),this.openController=o.openController||pe,t.onMouseDown(this.onMouseDown,this,this.disposables),t.onMouseClick(this.onPointer,this,this.disposables),t.onMouseDblClick(this.onDoubleClick,this,this.disposables),t.onTouchStart(this.onMouseDown,this,this.disposables),t.onTap(this.onPointer,this,this.disposables),M.b.addTarget(t.domNode)}return Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this,t=Object(v.g)(Object(B.a)(this.view.domNode,"keydown")).map((function(e){return new x.a(e)})).filter((function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode})).filter((function(e){return e.preventDefault(),e.stopPropagation(),!1})).event,o=Object(v.g)(Object(B.a)(this.view.domNode,"keyup")).filter((function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t})).filter((function(){return e.list.getFocus().length>0})).map((function(){var t=e.list.getFocus()[0];return{index:t,element:e.view.element(t),anchor:e.view.domElement(t)}})).filter((function(e){return!!e.anchor})).event,n=Object(v.g)(this.view.onContextMenu).filter((function(){return!e.didJustPressContextMenuKey})).map((function(e){var t=e.element,o=e.index,n=e.browserEvent;return{element:t,index:o,anchor:{x:n.clientX+1,y:n.clientY}}})).event;return Object(v.f)(t,o,n)},enumerable:!0,configurable:!0}),e.prototype.isSelectionSingleChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):P.d?e.browserEvent.metaKey:e.browserEvent.ctrlKey},e.prototype.isSelectionRangeChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey},e.prototype.isSelectionChangeEvent=function(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)},e.prototype.onMouseDown=function(e){!1===this.options.focusOnMouseDown?(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation()):document.activeElement!==e.browserEvent.target&&this.view.domNode.focus();var t=this.list.getFocus()[0],o=this.list.getSelection();if(t=void 0===t?o[0]:t,this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e))return this.changeSelection(e,t);var n=e.index;if(o.every((function(e){return e!==n}))&&this.list.setFocus([n]),this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return this.changeSelection(e,t);this.options.selectOnMouseDown&&!de(e.browserEvent)&&(this.list.setSelection([n]),this.openController.shouldOpen(e.browserEvent)&&this.list.open([n],e.browserEvent))},e.prototype.onPointer=function(e){if(!(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)||this.options.selectOnMouseDown)){var t=this.list.getFocus();this.list.setSelection(t),this.openController.shouldOpen(e.browserEvent)&&this.list.open(t,e.browserEvent)}},e.prototype.onDoubleClick=function(e){if(!this.multipleSelectionSupport||!this.isSelectionChangeEvent(e)){var t=this.list.getFocus();this.list.setSelection(t),this.list.pin(t)}},e.prototype.changeSelection=function(e,t){var o=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){var n=Math.min(t,o),i=Math.max(t,o),s=Object(r.m)(n,i+1),a=function(e,t){var o=e.indexOf(t);if(-1===o)return[];var n=[],i=o-1;for(;i>=0&&e[i]===t-(o-i);)n.push(e[i--]);n.reverse(),i=o;for(;i=e.length)o.push(t[i++]);else if(i>=t.length)o.push(e[n++]);else{if(e[n]===t[i]){n++,i++;continue}e[n]=e.length)o.push(t[i++]);else if(i>=t.length)o.push(e[n++]);else{if(e[n]===t[i]){o.push(e[n]),n++,i++;continue}e[n]this.view.length)throw new Error("Invalid start index: "+e);if(t<0)throw new Error("Invalid delete count: "+t);0===t&&0===o.length||this.eventBufferer.bufferEvents((function(){return n.spliceable.splice(e,t,o)}))},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.getContentHeight()},enumerable:!0,configurable:!0}),e.prototype.layout=function(e){this.view.layout(e)},e.prototype.setSelection=function(e){for(var t=0,o=e;t=this.length)throw new Error("Invalid index "+n)}e=e.sort(be),this.selection.set(e)},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.setFocus=function(e){for(var t=0,o=e;t=this.length)throw new Error("Invalid index "+n)}e=e.sort(be),this.focus.set(e)},e.prototype.focusNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),n=o.length>0?o[0]+e:0;this.setFocus(t?[n%this.length]:[Math.min(n,this.length-1)])}},e.prototype.focusPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var o=this.focus.get(),n=o.length>0?o[0]-e:0;t&&n<0&&(n=(this.length+n%this.length)%this.length),this.setFocus([Math.max(n,0)])}},e.prototype.focusNextPage=function(){var e=this,t=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);t=0===t?0:t-1;var o=this.view.element(t);if(this.getFocusedElements()[0]!==o)this.setFocus([t]);else{var n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(t)),this.view.getScrollTop()!==n&&setTimeout((function(){return e.focusNextPage()}),0)}},e.prototype.focusPreviousPage=function(){var e,t=this,o=this.view.getScrollTop();e=0===o?this.view.indexAt(o):this.view.indexAfter(o-1);var n=this.view.element(e);if(this.getFocusedElements()[0]!==n)this.setFocus([e]);else{var i=o;this.view.setScrollTop(o-this.view.renderHeight),this.view.getScrollTop()!==i&&setTimeout((function(){return t.focusPreviousPage()}),0)}},e.prototype.focusLast=function(){0!==this.length&&this.setFocus([this.length-1])},e.prototype.focusFirst=function(){0!==this.length&&this.setFocus([0])},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.getFocusedElements=function(){var e=this;return this.getFocus().map((function(t){return e.view.element(t)}))},e.prototype.reveal=function(e,t){if(e<0||e>=this.length)throw new Error("Invalid index "+e);var o,n,i,r=this.view.getScrollTop(),s=this.view.elementTop(e),a=this.view.elementHeight(e);if(Object(D.f)(t)){var l=a-this.view.renderHeight;this.view.setScrollTop(l*(o=t,n=0,i=1,Math.min(Math.max(o,n),i))+s)}else{var u=s+a,c=r+this.view.renderHeight;s=c&&this.view.setScrollTop(u-this.view.renderHeight)}},e.prototype.getElementDomId=function(e){return this.idPrefix+"_"+e},e.prototype.isDOMFocused=function(){return this.view.domNode===document.activeElement},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e,t){for(var o=this,n=0,i=e;n=this.length)throw new Error("Invalid index "+r)}this._onOpen.fire({indexes:e,elements:e.map((function(e){return o.view.element(e)})),browserEvent:t})},e.prototype.pin=function(e){for(var t=0,o=e;t=this.length)throw new Error("Invalid index "+n)}this._onPin.fire(e)},e.prototype.style=function(e){this.styleController.style(e)},e.prototype.toListEvent=function(e){var t=this,o=e.indexes;return{indexes:o,elements:o.map((function(e){return t.view.element(e)}))}},e.prototype._onFocusChange=function(){var e=this.focus.get();e.length>0?this.view.domNode.setAttribute("aria-activedescendant",this.getElementDomId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"),L.N(this.view.domNode,"element-focused",e.length>0)},e.prototype._onSelectionChange=function(){var e=this.selection.get();L.N(this.view.domNode,"selection-none",0===e.length),L.N(this.view.domNode,"selection-single",1===e.length),L.N(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDidDispose.fire(),this.disposables=Object(s.d)(this.disposables)},e.InstanceCount=0,ie([A.a],e.prototype,"onFocusChange",null),ie([A.a],e.prototype,"onSelectionChange",null),e}(),Se=o(61),Te=o(16),we=o(110),ke=o(117),Oe=o(19),Re=o(7),Ne=o(55),Le=o(160),Ie=o(89),De=o(82),Ae=o(48),Pe=Object.assign||function(e){for(var t,o=1,n=arguments.length;o=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},xe=function(e,t){return function(o,n){t(o,n,e)}},Be=!1,Fe=Object(Re.kb)("editorSuggestWidget.background",{dark:Re.D,light:Re.D,hc:Re.D},n.a("editorSuggestWidgetBackground","Background color of the suggest widget.")),He=Object(Re.kb)("editorSuggestWidget.border",{dark:Re.E,light:Re.E,hc:Re.E},n.a("editorSuggestWidgetBorder","Border color of the suggest widget.")),Ue=Object(Re.kb)("editorSuggestWidget.foreground",{dark:Re.u,light:Re.u,hc:Re.u},n.a("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),Ve=Object(Re.kb)("editorSuggestWidget.selectedBackground",{dark:Re.W,light:Re.W,hc:Re.W},n.a("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),We=Object(Re.kb)("editorSuggestWidget.highlightForeground",{dark:Re.Y,light:Re.Y,hc:Re.Y},n.a("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),je=/^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i;function Ge(e){return e&&e.match(je)?e:null}function ze(e){if(!e)return!1;var t=e.suggestion;return!!t.documentation||t.detail&&t.detail!==t.label}var Ke=function(){function e(e,t,o){this.widget=e,this.editor=t,this.triggerKeybindingLabel=o}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"suggestion"},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,o=Object.create(null);o.disposables=[],o.root=e,o.icon=Object(L.k)(e,Object(L.a)(".icon")),o.colorspan=Object(L.k)(o.icon,Object(L.a)("span.colorspan"));var i=Object(L.k)(e,Object(L.a)(".contents")),r=Object(L.k)(i,Object(L.a)(".main"));o.highlightedLabel=new I.a(r),o.disposables.push(o.highlightedLabel),o.typeLabel=Object(L.k)(r,Object(L.a)("span.type-label")),o.readMore=Object(L.k)(r,Object(L.a)("span.readMore")),o.readMore.title=n.a("readMore","Read More...{0}",this.triggerKeybindingLabel);var s=function(){var e=t.editor.getConfiguration(),n=e.fontInfo.fontFamily,i=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",s=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";o.root.style.fontSize=i,r.style.fontFamily=n,r.style.lineHeight=s,o.icon.style.height=s,o.icon.style.width=s,o.readMore.style.height=s,o.readMore.style.width=s};return s(),Object(v.g)(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function(e){return e.fontInfo||e.contribInfo})).on(s,null,o.disposables),o},e.prototype.renderElement=function(e,t,o){var i=this,r=o,s=e.suggestion;if(ze(e)?r.root.setAttribute("aria-label",n.a("suggestionWithDetailsAriaLabel","{0}, suggestion, has details",s.label)):r.root.setAttribute("aria-label",n.a("suggestionAriaLabel","{0}, suggestion",s.label)),r.icon.className="icon "+s.type,r.colorspan.style.backgroundColor="","color"===s.type){var a=Ge(s.label)||"string"==typeof s.documentation&&Ge(s.documentation);a&&(r.icon.className="icon customcolor",r.colorspan.style.backgroundColor=a)}r.highlightedLabel.set(s.label,Object(T.b)(e.matches),"",!0),r.typeLabel.textContent=(s.detail||"").replace(/\n.*$/m,""),ze(e)?(Object(L.M)(r.readMore),r.readMore.onmousedown=function(e){e.stopPropagation(),e.preventDefault()},r.readMore.onclick=function(e){e.stopPropagation(),e.preventDefault(),i.widget.toggleDetails()}):(Object(L.A)(r.readMore),r.readMore.onmousedown=null,r.readMore.onclick=null)},e.prototype.disposeElement=function(){},e.prototype.disposeTemplate=function(e){e.disposables=Object(s.d)(e.disposables)},e}(),Ye=function(){function e(e,t,o,i,r){var a=this;this.widget=t,this.editor=o,this.markdownRenderer=i,this.triggerKeybindingLabel=r,this.borderWidth=1,this.disposables=[],this.el=Object(L.k)(e,Object(L.a)(".details")),this.disposables.push(Object(s.f)((function(){return e.removeChild(a.el)}))),this.body=Object(L.a)(".body"),this.scrollbar=new H.a(this.body,{}),Object(L.k)(this.el,this.scrollbar.getDomNode()),this.disposables.push(this.scrollbar),this.header=Object(L.k)(this.body,Object(L.a)(".header")),this.close=Object(L.k)(this.header,Object(L.a)("span.close")),this.close.title=n.a("readLess","Read less...{0}",this.triggerKeybindingLabel),this.type=Object(L.k)(this.header,Object(L.a)("p.type")),this.docs=Object(L.k)(this.body,Object(L.a)("p.docs")),this.ariaLabel=null,this.configureFont(),Object(v.g)(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((function(e){return e.fontInfo})).on(this.configureFont,this,this.disposables),i.onDidRenderCodeBlock((function(){return a.scrollbar.scanDomNode()}),this,this.disposables)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.el},enumerable:!0,configurable:!0}),e.prototype.render=function(e){var t=this;if(this.renderDisposeable=Object(s.d)(this.renderDisposeable),!e||!ze(e))return this.type.textContent="",this.docs.textContent="",Object(L.f)(this.el,"no-docs"),void(this.ariaLabel=null);if(Object(L.G)(this.el,"no-docs"),"string"==typeof e.suggestion.documentation)Object(L.G)(this.docs,"markdown-docs"),this.docs.textContent=e.suggestion.documentation;else{Object(L.f)(this.docs,"markdown-docs"),this.docs.innerHTML="";var o=this.markdownRenderer.render(e.suggestion.documentation);this.renderDisposeable=o,this.docs.appendChild(o.element)}e.suggestion.detail?(this.type.innerText=e.suggestion.detail,Object(L.M)(this.type)):(this.type.innerText="",Object(L.A)(this.type)),this.el.style.height=this.header.offsetHeight+this.docs.offsetHeight+2*this.borderWidth+"px",this.close.onmousedown=function(e){e.preventDefault(),e.stopPropagation()},this.close.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.widget.toggleDetails()},this.body.scrollTop=0,this.scrollbar.scanDomNode(),this.ariaLabel=N.format("{0}\n{1}\n{2}",e.suggestion.label||"",e.suggestion.detail||"",e.suggestion.documentation||"")},e.prototype.getAriaLabel=function(){return this.ariaLabel},e.prototype.scrollDown=function(e){void 0===e&&(e=8),this.body.scrollTop+=e},e.prototype.scrollUp=function(e){void 0===e&&(e=8),this.body.scrollTop-=e},e.prototype.scrollTop=function(){this.body.scrollTop=0},e.prototype.scrollBottom=function(){this.body.scrollTop=this.body.scrollHeight},e.prototype.pageDown=function(){this.scrollDown(80)},e.prototype.pageUp=function(){this.scrollUp(80)},e.prototype.setBorderWidth=function(e){this.borderWidth=e},e.prototype.configureFont=function(){var e=this.editor.getConfiguration(),t=e.fontInfo.fontFamily,o=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",n=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";this.el.style.fontSize=o,this.type.style.fontFamily=t,this.close.style.height=n,this.close.style.width=n},e.prototype.dispose=function(){this.disposables=Object(s.d)(this.disposables),this.renderDisposeable=Object(s.d)(this.renderDisposeable)},e}(),Xe=function(){function e(e,t,o,n,i,r,s,a){var l=this;this.editor=e,this.telemetryService=t,this.allowEditorOverflow=!0,this.ignoreFocusEvents=!1,this.editorBlurTimeout=new y.f,this.showTimeout=new y.f,this.onDidSelectEmitter=new v.a,this.onDidFocusEmitter=new v.a,this.onDidHideEmitter=new v.a,this.onDidShowEmitter=new v.a,this.onDidSelect=this.onDidSelectEmitter.event,this.onDidFocus=this.onDidFocusEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDidShow=this.onDidShowEmitter.event,this.maxWidgetWidth=660,this.listWidth=330,this.storageServiceAvailable=!0,this.expandSuggestionDocs=!1,this.firstFocusInCurrentList=!1;var u=r.lookupKeybinding("editor.action.triggerSuggest"),c=u?" ("+u.getLabel()+")":"",h=new Le.a(e,s,a);this.isAuto=!1,this.focusedItem=null,this.storageService=i,void 0===this.expandDocsSettingFromStorage()&&(this.storageService.store("expandSuggestionDocs",Be,Ne.c.GLOBAL),void 0===this.expandDocsSettingFromStorage()&&(this.storageServiceAvailable=!1)),this.element=Object(L.a)(".editor-widget.suggest-widget"),this.editor.getConfiguration().contribInfo.iconsInSuggestions||Object(L.f)(this.element,"no-icons"),this.messageElement=Object(L.k)(this.element,Object(L.a)(".message")),this.listElement=Object(L.k)(this.element,Object(L.a)(".tree")),this.details=new Ye(this.element,this,this.editor,h,c);var d=new Ke(this,this.editor,c);this.list=new Ce(this.listElement,this,[d],{useShadows:!1,selectOnMouseDown:!0,focusOnMouseDown:!1,openController:{shouldOpen:function(){return!1}}}),this.toDispose=[Object(ke.b)(this.list,n,{listInactiveFocusBackground:Ve,listInactiveFocusOutline:Re.b}),n.onThemeChange((function(e){return l.onThemeChange(e)})),e.onDidBlurEditorText((function(){return l.onEditorBlur()})),e.onDidLayoutChange((function(){return l.onEditorLayoutChange()})),this.list.onSelectionChange((function(e){return l.onListSelection(e)})),this.list.onFocusChange((function(e){return l.onListFocus(e)})),this.editor.onDidChangeCursorSelection((function(){return l.onCursorSelectionChanged()}))],this.suggestWidgetVisible=_.a.Visible.bindTo(o),this.suggestWidgetMultipleSuggestions=_.a.MultipleSuggestions.bindTo(o),this.suggestionSupportsAutoAccept=_.a.AcceptOnKey.bindTo(o),this.editor.addContentWidget(this),this.setState(0),this.onThemeChange(n.getTheme())}return e.prototype.onCursorSelectionChanged=function(){0!==this.state&&this.editor.layoutContentWidget(this)},e.prototype.onEditorBlur=function(){var e=this;this.editorBlurTimeout.cancelAndSet((function(){e.editor.hasTextFocus()||e.setState(0)}),150)},e.prototype.onEditorLayoutChange=function(){3!==this.state&&5!==this.state||!this.expandDocsSettingFromStorage()||this.expandSideOrBelow()},e.prototype.onListSelection=function(e){var t=this;if(e.elements.length){var o=e.elements[0],i=e.indexes[0];o.resolve(Ae.a.None).then((function(){t.onDidSelectEmitter.fire({item:o,index:i,model:t.completionModel}),Object(d.a)(n.a("suggestionAriaAccepted","{0}, accepted",o.suggestion.label)),t.editor.focus()}))}},e.prototype._getSuggestionAriaAlertLabel=function(e){return ze(e)?n.a("ariaCurrentSuggestionWithDetails","{0}, suggestion, has details",e.suggestion.label):n.a("ariaCurrentSuggestion","{0}, suggestion",e.suggestion.label)},e.prototype._ariaAlert=function(e){this._lastAriaAlertLabel!==e&&(this._lastAriaAlertLabel=e,this._lastAriaAlertLabel&&Object(d.a)(this._lastAriaAlertLabel))},e.prototype.onThemeChange=function(e){var t=e.getColor(Fe);t&&(this.listElement.style.backgroundColor=t.toString(),this.details.element.style.backgroundColor=t.toString(),this.messageElement.style.backgroundColor=t.toString());var o=e.getColor(He);o&&(this.listElement.style.borderColor=o.toString(),this.details.element.style.borderColor=o.toString(),this.messageElement.style.borderColor=o.toString(),this.detailsBorderColor=o.toString());var n=e.getColor(Re.H);n&&(this.detailsFocusBorderColor=n.toString()),this.details.setBorderWidth("hc"===e.type?2:1)},e.prototype.onListFocus=function(e){var t=this;if(!this.ignoreFocusEvents){if(!e.elements.length)return this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null,this.focusedItem=null),void this._ariaAlert(null);var o=e.elements[0];if(this._ariaAlert(this._getSuggestionAriaAlertLabel(o)),this.firstFocusInCurrentList=!this.focusedItem,o!==this.focusedItem){this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null);var n=e.indexes[0];this.suggestionSupportsAutoAccept.set(!o.suggestion.noAutoAccept),this.focusedItem=o,this.list.reveal(n),this.currentSuggestionDetails=Object(y.i)((function(e){return o.resolve(e)})),this.currentSuggestionDetails.then((function(){t.ignoreFocusEvents=!0,t.list.splice(n,1,[o]),t.list.setFocus([n]),t.ignoreFocusEvents=!1,t.expandDocsSettingFromStorage()?t.showDetails():Object(L.G)(t.element,"docs-side")})).catch(i.e).then((function(){t.focusedItem===o&&(t.currentSuggestionDetails=null)})),this.onDidFocusEmitter.fire({item:o,index:n,model:this.completionModel})}}},e.prototype.setState=function(t){if(this.element){var o=this.state!==t;switch(this.state=t,Object(L.N)(this.element,"frozen",4===t),t){case 0:Object(L.A)(this.messageElement,this.details.element,this.listElement),this.hide(),this.listHeight=0,o&&this.list.splice(0,this.list.length),this.focusedItem=null;break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,Object(L.A)(this.listElement,this.details.element),Object(L.M)(this.messageElement),Object(L.G)(this.element,"docs-side"),this.show(),this.focusedItem=null;break;case 2:this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,Object(L.A)(this.listElement,this.details.element),Object(L.M)(this.messageElement),Object(L.G)(this.element,"docs-side"),this.show(),this.focusedItem=null;break;case 3:case 4:Object(L.A)(this.messageElement),Object(L.M)(this.listElement),this.show();break;case 5:Object(L.A)(this.messageElement),Object(L.M)(this.details.element,this.listElement),this.show(),this._ariaAlert(this.details.getAriaLabel())}}},e.prototype.showTriggered=function(e){var t=this;0===this.state&&(this.isAuto=!!e,this.isAuto||(this.loadingTimeout=setTimeout((function(){t.loadingTimeout=null,t.setState(1)}),50)))},e.prototype.showSuggestions=function(e,t,o,n){if(this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.completionModel!==e&&(this.completionModel=e),o&&2!==this.state&&0!==this.state)this.setState(4);else{var i=this.completionModel.items.length,r=0===i;if(this.suggestWidgetMultipleSuggestions.set(i>1),r)n?this.setState(0):this.setState(2),this.completionModel=null;else{var s=this.completionModel.stats;s.wasAutomaticallyTriggered=!!n,this.telemetryService.publicLog("suggestWidget",Pe({},s,this.editor.getTelemetryData())),this.list.splice(0,this.list.length,this.completionModel.items),o?this.setState(4):this.setState(3),this.list.reveal(t,t),this.list.setFocus([t]),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}},e.prototype.selectNextPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}},e.prototype.selectNext=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}},e.prototype.selectLast=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollBottom(),!0;case 1:return!this.isAuto;default:return this.list.focusLast(),!0}},e.prototype.selectPreviousPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}},e.prototype.selectPrevious=function(){switch(this.state){case 0:return!1;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}},e.prototype.selectFirst=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollTop(),!0;case 1:return!this.isAuto;default:return this.list.focusFirst(),!0}},e.prototype.getFocusedItem=function(){if(0!==this.state&&2!==this.state&&1!==this.state)return{item:this.list.getFocusedElements()[0],index:this.list.getFocus()[0],model:this.completionModel}},e.prototype.toggleDetailsFocus=function(){5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)),this.telemetryService.publicLog("suggestWidget:toggleDetailsFocus",this.editor.getTelemetryData())},e.prototype.toggleDetails=function(){if(ze(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.updateExpandDocsSetting(!1),Object(L.A)(this.details.element),Object(L.G)(this.element,"docs-side"),Object(L.G)(this.element,"docs-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog("suggestWidget:collapseDetails",this.editor.getTelemetryData());else{if(3!==this.state&&5!==this.state&&4!==this.state)return;this.updateExpandDocsSetting(!0),this.showDetails(),this.telemetryService.publicLog("suggestWidget:expandDetails",this.editor.getTelemetryData())}},e.prototype.showDetails=function(){this.expandSideOrBelow(),Object(L.M)(this.details.element),this.details.render(this.list.getFocusedElements()[0]),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(),this.editor.focus(),this._ariaAlert(this.details.getAriaLabel())},e.prototype.show=function(){var e=this,t=this.updateListHeight();t!==this.listHeight&&(this.editor.layoutContentWidget(this),this.listHeight=t),this.suggestWidgetVisible.set(!0),this.showTimeout.cancelAndSet((function(){Object(L.f)(e.element,"visible"),e.onDidShowEmitter.fire(e)}),100)},e.prototype.hide=function(){this.suggestWidgetVisible.reset(),this.suggestWidgetMultipleSuggestions.reset(),Object(L.G)(this.element,"visible")},e.prototype.hideWidget=function(){clearTimeout(this.loadingTimeout),this.setState(0),this.onDidHideEmitter.fire(this)},e.prototype.getPosition=function(){return 0===this.state?null:{position:this.editor.getPosition(),preference:[Te.a.BELOW,Te.a.ABOVE]}},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.updateListHeight=function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{var t=this.list.contentHeight/this.unfocusedHeight;e=Math.min(t,12)*this.unfocusedHeight}return this.element.style.lineHeight=this.unfocusedHeight+"px",this.listElement.style.height=e+"px",this.list.layout(e),e},e.prototype.adjustDocsPosition=function(){var e=this.editor.getConfiguration().fontInfo.lineHeight,t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),o=Object(L.u)(this.editor.getDomNode()),n=o.left+t.left,i=o.top+t.top+t.height,r=Object(L.u)(this.element),s=r.left,a=r.top;sa&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop=this.details.element.offsetHeight-this.listElement.offsetHeight+"px")},e.prototype.expandSideOrBelow=function(){if(!ze(this.focusedItem)&&this.firstFocusInCurrentList)return Object(L.G)(this.element,"docs-side"),void Object(L.G)(this.element,"docs-below");var e=this.element.style.maxWidth.match(/(\d+)px/);!e||Number(e[1])=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},Je=function(e,t){return function(o,n){t(o,n,e)}},Ze=function(){function e(){}return e.prototype.select=function(e,t,o){if(0===o.length)return 0;for(var n=o[0].score,i=1;is&&c.type===l.type&&c.insertText===l.insertText&&(s=c.touch,r=a)}return-1===r?e.prototype.select.call(this,t,o,n):r},t.prototype.toJSON=function(){var e=[];return this._cache.forEach((function(t,o){e.push([o,t])})),e},t.prototype.fromJSON=function(e){this._cache.clear();for(var t=0,o=e;t0){this._seq=e[0][1].touch+1;for(var t=0,o=e;t=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},rt=function(e,t){return function(o,n){t(o,n,e)}},st=function(){function e(e,t,o){var n=this;this._disposables=[],this._activeAcceptCharacters=new Set,this._disposables.push(t.onDidShow((function(){return n._onItem(t.getFocusedItem())}))),this._disposables.push(t.onDidFocus(this._onItem,this)),this._disposables.push(t.onDidHide(this.reset,this)),this._disposables.push(e.onWillType((function(t){if(n._activeItem){var i=t[t.length-1];n._activeAcceptCharacters.has(i)&&e.getConfiguration().contribInfo.acceptSuggestionOnCommitCharacter&&o(n._activeItem)}})))}return e.prototype._onItem=function(e){if(e&&!Object(r.k)(e.item.suggestion.commitCharacters)){this._activeItem=e,this._activeAcceptCharacters.clear();for(var t=0,o=e.item.suggestion.commitCharacters;t0&&this._activeAcceptCharacters.add(n[0])}}else this.reset()},e.prototype.reset=function(){this._activeItem=void 0},e.prototype.dispose=function(){Object(s.d)(this._disposables)},e}(),at=function(){function e(e,t,o,n){var i=this;this._editor=e,this._commandService=t,this._contextKeyService=o,this._instantiationService=n,this._toDispose=[],this._model=new R(this._editor),this._memory=n.createInstance(ot,this._editor.getConfiguration().contribInfo.suggestSelection),this._toDispose.push(this._model.onDidTrigger((function(e){i._widget||i._createSuggestWidget(),i._widget.showTriggered(e.auto)}))),this._toDispose.push(this._model.onDidSuggest((function(e){var t=i._memory.select(i._editor.getModel(),i._editor.getPosition(),e.completionModel.items);i._widget.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}))),this._toDispose.push(this._model.onDidCancel((function(e){i._widget&&!e.retrigger&&i._widget.hideWidget()})));var r=_.a.AcceptSuggestionsOnEnter.bindTo(o),s=function(){var e=i._editor.getConfiguration().contribInfo,t=e.acceptSuggestionOnEnter,o=e.suggestSelection;r.set("on"===t||"smart"===t),i._memory.setMode(o)};this._toDispose.push(this._editor.onDidChangeConfiguration((function(e){return s()}))),s()}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._createSuggestWidget=function(){var e=this;this._widget=this._instantiationService.createInstance(Xe,this._editor),this._toDispose.push(this._widget.onDidSelect(this._onDidSelectItem,this));var t=new st(this._editor,this._widget,(function(t){return e._onDidSelectItem(t)}));this._toDispose.push(t,this._model.onDidSuggest((function(e){0===e.completionModel.items.length&&t.reset()})));var o=_.a.MakesTextEdit.bindTo(this._contextKeyService);this._toDispose.push(this._widget.onDidFocus((function(t){var n=t.item,i=e._editor.getPosition(),r=n.position.column-n.suggestion.overwriteBefore,s=i.column,a=!0;"smart"!==e._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter||2!==e._model.state||n.suggestion.command||n.suggestion.additionalTextEdits||"textmate"===n.suggestion.snippetType||s-r!==n.suggestion.insertText.length||(a=e._editor.getModel().getValueInRange({startLineNumber:i.lineNumber,startColumn:r,endLineNumber:i.lineNumber,endColumn:s})!==n.suggestion.insertText);o.set(a)}))),this._toDispose.push({dispose:function(){o.reset()}})},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._toDispose=Object(s.d)(this._toDispose),this._widget&&(this._widget.dispose(),this._widget=null),this._model&&(this._model.dispose(),this._model=null)},e.prototype._onDidSelectItem=function(e){var t;if(e&&e.item){var o=e.item,n=o.suggestion,r=o.position,s=this._editor.getPosition().column-r.column;this._editor.pushUndoStop(),Array.isArray(n.additionalTextEdits)&&this._editor.executeEdits("suggestController.additionalTextEdits",n.additionalTextEdits.map((function(e){return g.a.replace(p.a.lift(e.range),e.text)}))),this._memory.memorize(this._editor.getModel(),this._editor.getPosition(),e.item);var a=n.insertText;"textmate"!==n.snippetType&&(a=f.c.escape(a)),m.SnippetController2.get(this._editor).insert(a,n.overwriteBefore+s,n.overwriteAfter,!1,!1),this._editor.pushUndoStop(),n.command?n.command.id===lt.id?this._model.trigger({auto:!0},!0):((t=this._commandService).executeCommand.apply(t,[n.command.id].concat(n.command.arguments)).done(void 0,i.e),this._model.cancel()):this._model.cancel(),this._alertCompletionItem(e.item)}else this._model.cancel()},e.prototype._alertCompletionItem=function(e){var t=e.suggestion,o=n.a("arai.alert.snippet","Accepting '{0}' did insert the following text: {1}",t.label,t.insertText);Object(d.a)(o)},e.prototype.triggerSuggest=function(e){this._model.trigger({auto:!1},!1,e),this._editor.revealLine(this._editor.getPosition().lineNumber,0),this._editor.focus()},e.prototype.acceptSelectedSuggestion=function(){if(this._widget){var e=this._widget.getFocusedItem();this._onDidSelectItem(e)}},e.prototype.cancelSuggestWidget=function(){this._widget&&(this._model.cancel(),this._widget.hideWidget())},e.prototype.selectNextSuggestion=function(){this._widget&&this._widget.selectNext()},e.prototype.selectNextPageSuggestion=function(){this._widget&&this._widget.selectNextPage()},e.prototype.selectLastSuggestion=function(){this._widget&&this._widget.selectLast()},e.prototype.selectPrevSuggestion=function(){this._widget&&this._widget.selectPrevious()},e.prototype.selectPrevPageSuggestion=function(){this._widget&&this._widget.selectPreviousPage()},e.prototype.selectFirstSuggestion=function(){this._widget&&this._widget.selectFirst()},e.prototype.toggleSuggestionDetails=function(){this._widget&&this._widget.toggleDetails()},e.prototype.toggleSuggestionFocus=function(){this._widget&&this._widget.toggleDetailsFocus()},e.ID="editor.contrib.suggestController",e=it([rt(1,u.b),rt(2,l.e),rt(3,a.a)],e)}(),lt=function(e){function t(){return e.call(this,{id:t.id,label:n.a("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:l.d.and(c.a.writable,c.a.hasCompletionItemProvider),kbOpts:{kbExpr:c.a.textInputFocus,primary:2058,mac:{primary:266},weight:100}})||this}return nt(t,e),t.prototype.run=function(e,t){var o=at.get(t);o&&o.triggerSuggest()},t.id="editor.action.triggerSuggest",t}(h.b);Object(h.h)(at),Object(h.f)(lt);var ut=h.c.bindToContribution(at.get);Object(h.g)(new ut({id:"acceptSelectedSuggestion",precondition:_.a.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:2}})),Object(h.g)(new ut({id:"acceptSelectedSuggestionOnEnter",precondition:_.a.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:190,kbExpr:l.d.and(c.a.textInputFocus,_.a.AcceptSuggestionsOnEnter,_.a.MakesTextEdit),primary:3}})),Object(h.g)(new ut({id:"hideSuggestWidget",precondition:_.a.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:9,secondary:[1033]}})),Object(h.g)(new ut({id:"selectNextSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),Object(h.g)(new ut({id:"selectNextPageSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:12,secondary:[2060]}})),Object(h.g)(new ut({id:"selectLastSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectLastSuggestion()}})),Object(h.g)(new ut({id:"selectPrevSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),Object(h.g)(new ut({id:"selectPrevPageSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:11,secondary:[2059]}})),Object(h.g)(new ut({id:"selectFirstSuggestion",precondition:l.d.and(_.a.Visible,_.a.MultipleSuggestions),handler:function(e){return e.selectFirstSuggestion()}})),Object(h.g)(new ut({id:"toggleSuggestionDetails",precondition:_.a.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:2058,mac:{primary:266}}})),Object(h.g)(new ut({id:"toggleSuggestionFocus",precondition:_.a.Visible,handler:function(e){return e.toggleSuggestionFocus()},kbOpts:{weight:190,kbExpr:c.a.textInputFocus,primary:2570,mac:{primary:778}}}))},function(e,t,o){"use strict";o.r(t);o(445);var n=o(0),i=o(21),r=o(8),s=o(17),a=o(39),l=o(6),u=o(10),c=o(3),h=o(16),d=o(4),g=65535,p=function(){function e(e,t,o){if(e.length!==t.length||e.length>g)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=o}return e.prototype.ensureParentIndices=function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var t=[],o=function(o,n){var i=t[t.length-1];return e.getStartLineNumber(i)<=o&&e.getEndLineNumber(i)>=n},n=0,i=this._startIndexes.length;n16777215||s>16777215)throw new Error("startLineNumber or endLineNumber must not exceed 16777215");for(;t.length>0&&!o(r,s);)t.pop();var a=t.length>0?t[t.length-1]:-1;t.push(n),this._startIndexes[n]=r+((255&a)<<24),this._endIndexes[n]=s+((65280&a)<<16)}}},Object.defineProperty(e.prototype,"length",{get:function(){return this._startIndexes.length},enumerable:!0,configurable:!0}),e.prototype.getStartLineNumber=function(e){return 16777215&this._startIndexes[e]},e.prototype.getEndLineNumber=function(e){return 16777215&this._endIndexes[e]},e.prototype.getType=function(e){return this._types?this._types[e]:void 0},e.prototype.hasTypes=function(){return!!this._types},e.prototype.isCollapsed=function(e){var t=e/32|0,o=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((4278190080&this._endIndexes[e])>>>16);return t===g?-1:t},e.prototype.contains=function(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t},e.prototype.findIndex=function(e){var t=0,o=this._startIndexes.length;if(0===o)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1},e.prototype.toString=function(){for(var e=[],t=0;t=this.endLineNumber},e.prototype.containsLine=function(e){return this.startLineNumber<=e&&e<=this.endLineNumber},e}(),m=function(){function e(e,t){this._updateEventEmitter=new d.a,this._textModel=e,this._decorationProvider=t,this._regions=new p(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}return Object.defineProperty(e.prototype,"regions",{get:function(){return this._regions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textModel",{get:function(){return this._textModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this._isInitialized},enumerable:!0,configurable:!0}),e.prototype.toggleCollapseState=function(e){var t=this;if(e.length){var o={};this._decorationProvider.changeDecorations((function(n){for(var i=0,r=e;i=h))break;i(a,c===h),a++}}l=s()}for(;a0?e:null},e.prototype.applyMemento=function(e){if(Array.isArray(e)){for(var t=[],o=0,n=e;o=0;){var r=this._regions.toRegion(n);t&&!t(r,i)||o.push(r),i++,n=r.parentIndex}return o},e.prototype.getRegionAtLine=function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null},e.prototype.getRegionsInside=function(e,t){for(var o=[],n=t&&2===t.length,i=n?[]:null,r=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE,a=r,l=this._regions.length;a0&&!u.containedBy(i[i.length-1]);)i.pop();i.push(u),t(u,i.length)&&o.push(u)}else t&&!t(u)||o.push(u)}return o},e}();function _(e,t,o,n){void 0===o&&(o=Number.MAX_VALUE);var i=[];if(n&&n.length>0)for(var r=0,s=n;r1)){var u=e.getRegionsInside(l,(function(e,n){return e.isCollapsed!==t&&n=0;s--)if(o!==i.isCollapsed(s)){var a=i.getStartLineNumber(s);t.test(n.getLineContent(a))&&r.push(i.toRegion(s))}e.toggleCollapseState(r)}function b(e,t,o){for(var n=e.regions,i=[],r=n.length-1;r>=0;r--)o!==n.isCollapsed(r)&&t===n.getType(r)&&i.push(n.toRegion(r));e.toggleCollapseState(i)}var E=o(18),C=o(26),S=function(){function e(e){this.editor=e,this.autoHideFoldingControls=!0}return e.prototype.getDecorationOption=function(t){return t?e.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:e.EXPANDED_VISUAL_DECORATION},e.prototype.deltaDecorations=function(e,t){return this.editor.deltaDecorations(e,t)},e.prototype.changeDecorations=function(e){return this.editor.changeDecorations(e)},e.COLLAPSED_VISUAL_DECORATION=C.a.register({stickiness:E.h.NeverGrowsWhenTypingAtEdges,afterContentClassName:"inline-folded",linesDecorationsClassName:"folding collapsed"}),e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=C.a.register({stickiness:E.h.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding"}),e.EXPANDED_VISUAL_DECORATION=C.a.register({stickiness:E.h.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding alwaysShowFoldIcons"}),e}(),T=o(5),w=o(2),k=o(25),O=function(){function e(e){var t=this;this._updateEventEmitter=new d.a,this._foldingModel=e,this._foldingModelListener=e.onDidChange((function(e){return t.updateHiddenRanges()})),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenRanges",{get:function(){return this._hiddenRanges},enumerable:!0,configurable:!0}),e.prototype.updateHiddenRanges=function(){for(var e=!1,t=[],o=0,n=0,i=Number.MAX_VALUE,r=-1,s=this._foldingModel.regions;o0},e.prototype.isHidden=function(e){return null!==R(this._hiddenRanges,e)},e.prototype.adjustSelections=function(e){for(var t=this,o=!1,n=this._foldingModel.textModel,i=null,r=function(e){return i&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,i)||(i=R(t._hiddenRanges,e)),i?i.startLineNumber-1:null},s=0,a=e.length;s0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)},e}();function R(e,t){var o=Object(k.f)(e,(function(e){return t=0&&e[o].endLineNumber>=t?e[o]:null}var N=o(32),L=5e3,I="indent",D=function(){function e(e){this.editorModel=e,this.id=I}return e.prototype.dispose=function(){},e.prototype.compute=function(e){var t=N.a.getFoldingRules(this.editorModel.getLanguageIdentifier().id),o=t&&t.offSide,n=t&&t.markers;return u.b.as(function(e,t,o,n){void 0===n&&(n=L);var i=e.getOptions().tabSize,r=new A(n),s=void 0;o&&(s=new RegExp("("+o.start.source+")|(?:"+o.end.source+")"));var a=[];a.push({indent:-1,line:e.getLineCount()+1,marker:!1});for(var l=e.getLineCount();l>0;l--){var u=e.getLineContent(l),c=C.b.computeIndentLevel(u,i),h=a[a.length-1];if(-1!==c){var d=void 0;if(s&&(d=u.match(s))){if(!d[1]){a.push({indent:-2,line:l,marker:!0});continue}for(var g=a.length-1;g>0&&!a[g].marker;)g--;if(g>0){a.length=g+1,h=a[g],r.insertFirst(l,h.line,c),h.marker=!1,h.indent=c,h.line=l;continue}}if(h.indent>c){do{a.pop(),h=a[a.length-1]}while(h.indent>c);var p=h.line-1;p-l>=1&&r.insertFirst(l,p,c)}h.indent===c?h.line=l:a.push({indent:c,line:l,marker:!1})}else t&&!h.marker&&(h.line=l)}return r.toIndentRanges(e)}(this.editorModel,o,n))},e}(),A=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.insertFirst=function(e,t,o){if(!(e>16777215||t>16777215)){var n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,o<1e3&&(this._indentOccurrences[o]=(this._indentOccurrences[o]||0)+1)}},e.prototype.toIndentRanges=function(e){if(this._length<=this._foldingRangesLimit){for(var t=new Uint32Array(this._length),o=new Uint32Array(this._length),n=this._length-1,i=0;n>=0;n--,i++)t[i]=this._startIndexes[n],o[i]=this._endIndexes[n];return new p(t,o)}var r=0,s=this._indentOccurrences.length;for(n=0;nthis._foldingRangesLimit){s=n;break}r+=a}}var l=e.getOptions().tabSize;for(t=new Uint32Array(this._foldingRangesLimit),o=new Uint32Array(this._foldingRangesLimit),n=this._length-1,i=0;n>=0;n--){var u=this._startIndexes[n],c=e.getLineContent(u),h=C.b.computeIndentLevel(c,l);(h0&&l.end>l.start&&l.end<=r&&n.push({start:l.start,end:l.end,rank:i,kind:l.kind})}}}),M.f)}));return u.b.join(i).then((function(e){return n}))}(this.providers,this.editorModel,e).then((function(e){return e?V(e,t.limit):null}))},e.prototype.dispose=function(){},e}();var U=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.add=function(e,t,o,n){if(!(e>16777215||t>16777215)){var i=this._length;this._startIndexes[i]=e,this._endIndexes[i]=t,this._nestingLevels[i]=n,this._types[i]=o,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}},e.prototype.toIndentRanges=function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),o=0;othis._foldingRangesLimit){i=o;break}n+=r}}e=new Uint32Array(this._foldingRangesLimit),t=new Uint32Array(this._foldingRangesLimit);for(var s=[],a=(o=0,0);oi.start)if(l.end<=i.end)r.push(i),i=l,n.add(l.start,l.end,l.kind&&l.kind.value,r.length);else{if(l.start>i.end){do{i=r.pop()}while(i&&l.start>i.end);i&&r.push(i),i=l}n.add(l.start,l.end,l.kind&&l.kind.value,r.length)}}else i=l,n.add(l.start,l.end,l.kind&&l.kind.value,r.length)}return n.toIndentRanges()}var W="init",j=function(){function e(e,t,o,n){if(this.editorModel=e,this.id=W,t.length){this.decorationIds=e.deltaDecorations([],t.map((function(t){return{range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{stickiness:E.h.NeverGrowsWhenTypingAtEdges}}}))),this.timeout=setTimeout(o,n)}}return e.prototype.dispose=function(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e.prototype.compute=function(e){var t=[];if(this.decorationIds)for(var o=0,n=this.decorationIds;o0&&(this.rangeProvider=new H(e,o))}return this.foldingStateMemento=null,this.rangeProvider},e.prototype.getFoldingModel=function(){return this.foldingModelPromise},e.prototype.onModelContentChanged=function(){var e=this;this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((function(){if(!e.foldingModel)return null;var t=e.foldingRegionPromise=Object(s.i)((function(t){return e.getRangeProvider(e.foldingModel.textModel).compute(t)}));return u.b.wrap(t.then((function(o){if(o&&t===e.foldingRegionPromise){var n=e.editor.getSelections(),i=n?n.map((function(e){return e.startLineNumber})):[];e.foldingModel.update(o,i)}return e.foldingModel})))})))},e.prototype.onHiddenRangesChanges=function(e){if(e.length){var t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)},e.prototype.onCursorPositionChanged=function(){this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()},e.prototype.revealCursor=function(){var e=this;this.getFoldingModel().then((function(t){if(t){var o=e.editor.getSelections();if(o&&o.length>0){for(var n=[],i=function(o){var i=o.selectionStartLineNumber;e.hiddenRangeModel.isHidden(i)&&n.push.apply(n,t.getAllRegionsAtLine(i,(function(e){return e.isCollapsed&&i>e.startLineNumber})))},r=0,s=o;r0,o&&n)?e:void 0;var t,o,n}),(function(e){Object(f.f)(e)}))}));return Promise.all(n).then((function(e){return Object(p.c)(e)}))}Object(u.e)("_executeHoverProvider",(function(e,t){return _(e,t,m.a.None)}));var y,v=o(17),b=function(){function e(t,o,n,i){var r=this;this._computer=t,this._state=0,this._hoverTime=e.HOVER_TIME,this._firstWaitScheduler=new v.c((function(){return r._triggerAsyncComputation()}),0),this._secondWaitScheduler=new v.c((function(){return r._triggerSyncComputation()}),0),this._loadingMessageScheduler=new v.c((function(){return r._showLoadingMessage()}),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=o,this._errorCallback=n,this._progressCallback=i}return e.prototype.setHoverTime=function(e){this._hoverTime=e},e.prototype._firstWaitTime=function(){return this._hoverTime/2},e.prototype._secondWaitTime=function(){return this._hoverTime/2},e.prototype._loadingMessageTime=function(){return 3*this._hoverTime},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Object(v.i)((function(t){return e._computer.computeAsync(t)})),this._asyncComputationPromise.then((function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)}),(function(t){return e._onError(t)}))):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):Object(f.e)(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0},e.HOVER_TIME=300,e}(),E=o(59),C=o(81),S=o(6),T=(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),w=function(e){function t(t,o){var n=e.call(this)||this;return n.disposables=[],n.allowEditorOverflow=!0,n._id=t,n._editor=o,n._isVisible=!1,n._containerDomNode=document.createElement("div"),n._containerDomNode.className="monaco-editor-hover hidden",n._containerDomNode.tabIndex=0,n._domNode=document.createElement("div"),n._domNode.className="monaco-editor-hover-content",n.scrollbar=new C.a(n._domNode,{}),n.disposables.push(n.scrollbar),n._containerDomNode.appendChild(n.scrollbar.getDomNode()),n.onkeydown(n._containerDomNode,(function(e){e.equals(9)&&n.hide()})),n._register(n._editor.onDidChangeConfiguration((function(e){e.fontInfo&&n.updateFont()}))),n._editor.onDidLayoutChange((function(e){return n.updateMaxHeight()})),n.updateMaxHeight(),n._editor.addContentWidget(n),n._showAtPosition=null,n}return T(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,Object(h.N)(this._containerDomNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._containerDomNode},t.prototype.showAt=function(e,t){this._showAtPosition=new d.a(e.lineNumber,e.column),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=t,t&&this._containerDomNode.focus()},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())},t.prototype.getPosition=function(){return this.isVisible?{position:this._showAtPosition,preference:[c.a.ABOVE,c.a.BELOW]}:null},t.prototype.dispose=function(){this._editor.removeContentWidget(this),this.disposables=Object(S.d)(this.disposables),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this;Array.prototype.slice.call(this._domNode.getElementsByClassName("code")).forEach((function(t){return e._editor.applyFontInfo(t)}))},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont(),this._editor.layoutContentWidget(this),this.onContentsChange()},t.prototype.onContentsChange=function(){this.scrollbar.scanDomNode()},t.prototype.updateMaxHeight=function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getConfiguration().fontInfo,o=t.fontSize,n=t.lineHeight;this._domNode.style.fontSize=o+"px",this._domNode.style.lineHeight=n+"px",this._domNode.style.maxHeight=e+"px"},t}(E.a),k=function(e){function t(t,o){var n=e.call(this)||this;return n._id=t,n._editor=o,n._isVisible=!1,n._domNode=document.createElement("div"),n._domNode.className="monaco-editor-hover hidden",n._domNode.setAttribute("aria-hidden","true"),n._domNode.setAttribute("role","presentation"),n._showAtLineNumber=-1,n._register(n._editor.onDidChangeConfiguration((function(e){e.fontInfo&&n.updateFont()}))),n._editor.addOverlayWidget(n),n}return T(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,Object(h.N)(this._domNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._domNode},t.prototype.showAt=function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),o=this._editor.getTopForLineNumber(this._showAtLineNumber),n=this._editor.getScrollTop(),i=this._editor.getConfiguration().lineHeight,r=o-n-(this._domNode.clientHeight-i)/2;this._domNode.style.left=t.glyphMarginLeft+t.glyphMarginWidth+"px",this._domNode.style.top=Math.max(Math.round(r),0)+"px"},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.getPosition=function(){return null},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),o=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(o).forEach((function(t){return e._editor.applyFontInfo(t)}))},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()},t}(E.a),O=o(71),R=o(26),N=o(4),L=function(){function e(e,t,o){this.presentationIndex=o,this._onColorFlushed=new N.a,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new N.a,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new N.a,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}return Object.defineProperty(e.prototype,"color",{get:function(){return this._color},set:function(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"presentation",{get:function(){return this.colorPresentations[this.presentationIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorPresentations",{get:function(){return this._colorPresentations},set:function(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var o=0;othis._editor.getModel().getLineCount())return[];var o=z.ColorDetector.get(this._editor),n=this._editor.getModel().getLineMaxColumn(t),i=this._editor.getLineDecorations(t),r=!1;return i.map((function(i){var s=i.range.startLineNumber===t?i.range.startColumn:1,a=i.range.endLineNumber===t?i.range.endColumn:n;if(s>e._range.startColumn||e._range.endColumn>a)return null;var u=new l.a(e._range.startLineNumber,s,e._range.startLineNumber,a),c=o.getColorData(i.range.getStartPosition());if(!r&&c){r=!0;var h=c.colorInfo,d=h.color,g=h.range;return new q(g,d,c.provider)}if(Object(O.b)(i.options.hoverMessage))return null;var p=void 0;return i.options.hoverMessage&&(p=Array.isArray(i.options.hoverMessage)?i.options.hoverMessage.slice():[i.options.hoverMessage]),{contents:p,range:u}})).filter((function(e){return!!e}))},e.prototype.onResult=function(e,t){this._result=t?e.concat(this._result.sort((function(e,t){return e instanceof q?-1:t instanceof q?1:0}))):this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{range:this._range,contents:[(new O.a).appendText(n.a("modesContentHover.loading","Loading..."))]}},e}(),J=function(e){function t(o,n,i){var r=e.call(this,t.ID,o)||this;return r._themeService=i,r.renderDisposable=S.a.None,r._computer=new $(r._editor),r._highlightDecorations=[],r._isChangingDecorations=!1,r._markdownRenderer=n,r._register(n.onDidRenderCodeBlock(r.onContentsChange,r)),r._hoverOperation=new b(r._computer,(function(e){return r._withResult(e,!0)}),null,(function(e){return r._withResult(e,!1)})),r._register(h.j(r.getDomNode(),h.d.FOCUS,(function(){r._colorPicker&&h.f(r.getDomNode(),"colorpicker-hover")}))),r._register(h.j(r.getDomNode(),h.d.BLUR,(function(){h.G(r.getDomNode(),"colorpicker-hover")}))),r._register(o.onDidChangeConfiguration((function(e){r._hoverOperation.setHoverTime(r._editor.getConfiguration().contribInfo.hover.delay)}))),r}return Y(t,e),t.prototype.dispose=function(){this.renderDisposable.dispose(),this.renderDisposable=S.a.None,this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))},t.prototype.startShowingAt=function(e,t,o){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition.lineNumber!==e.startLineNumber)this.hide();else{for(var n=[],i=0,r=this._messages.length;i=e.endColumn&&n.push(s)}if(n.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(var o=0;o0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,o){var n=this;this.renderDisposable.dispose(),this._colorPicker=null;var i,r=Number.MAX_VALUE,s=o[0].range,a=document.createDocumentFragment(),u=!0,c=!1;o.forEach((function(t){if(t.range)if(r=Math.min(r,t.range.startColumn),s=l.a.plusRange(s,t.range),t instanceof q){c=!0;var o=t.color,h=o.red,g=o.green,p=o.blue,f=o.alpha,_=new A.c(255*h,255*g,255*p,f),y=new A.a(_),v=n._editor.getModel(),b=new l.a(t.range.startLineNumber,t.range.startColumn,t.range.endLineNumber,t.range.endColumn),E={range:t.range,color:t.color},C=new L(y,[],0),T=new G(a,C,n._editor.getConfiguration().pixelRatio,n._themeService);Object(K.a)(v,E,t.provider,m.a.None).then((function(o){C.colorPresentations=o;var s=n._editor.getModel().getValueInRange(t.range);C.guessColorPresentation(y,s);var u=function(){var e,t;C.presentation.textEdit?(e=[C.presentation.textEdit],t=(t=new l.a(C.presentation.textEdit.range.startLineNumber,C.presentation.textEdit.range.startColumn,C.presentation.textEdit.range.endLineNumber,C.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+C.presentation.textEdit.text.length)):(e=[{identifier:null,range:b,text:C.presentation.label,forceMoveMarkers:!1}],t=b.setEndPosition(b.endLineNumber,b.startColumn+C.presentation.label.length)),n._editor.executeEdits("colorpicker",e),C.presentation.additionalTextEdits&&(e=C.presentation.additionalTextEdits.slice(),n._editor.executeEdits("colorpicker",e),n.hide()),n._editor.pushUndoStop(),b=t},c=function(e){return Object(K.a)(v,{range:b,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},t.provider,m.a.None).then((function(e){C.colorPresentations=e}))},h=C.onColorFlushed((function(e){c(e).then(u)})),g=C.onDidChangeColor(c);n._colorPicker=T,n.showAt(new d.a(e.startLineNumber,r),n._shouldFocus),n.updateContents(a),n._colorPicker.layout(),n.renderDisposable=Object(S.c)([h,g,T,i])}))}else t.contents.filter((function(e){return!Object(O.b)(e)})).forEach((function(e){var t=n._markdownRenderer.render(e);i=t,a.appendChild(X("div.hover-row",null,t.element)),u=!1}))})),c||u||(this.showAt(new d.a(e.startLineNumber,r),this._shouldFocus),this.updateContents(a)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[{range:s,options:t._DECORATION_OPTIONS}]),this._isChangingDecorations=!1},t.ID="editor.contrib.modesContentHoverWidget",t._DECORATION_OPTIONS=R.a.register({className:"hoverHighlight"}),t}(w);var Z=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Q=function(){function e(e){this._editor=e,this._lineNumber=-1}return e.prototype.setLineNumber=function(e){this._lineNumber=e,this._result=[]},e.prototype.clearResult=function(){this._result=[]},e.prototype.computeSync=function(){for(var e=function(e){return{value:e}},t=this._editor.getLineDecorations(this._lineNumber),o=[],n=0,i=t.length;n0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){var o=this;Object(S.d)(this._renderDisposeables),this._renderDisposeables=[];var n=document.createDocumentFragment();t.forEach((function(e){var t=o._markdownRenderer.render(e.value);o._renderDisposeables.push(t),n.appendChild(Object(h.a)("div.hover-row",null,t.element))})),this.updateContents(n),this.showAt(e)},t.ID="editor.contrib.modesGlyphHoverWidget",t}(k),te=o(5),oe=o(160);o.d(t,"ModesHoverController",(function(){return se}));var ne=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),ie=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},re=function(e,t){return function(o,n){t(o,n,e)}},se=function(){function e(e,t,o,n){var i=this;this._editor=e,this._openerService=t,this._modeService=o,this._themeService=n,this._toUnhook=[],this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((function(e){e.contribInfo&&(i._hideWidgets(),i._unhookEvents(),i._hookEvents())}))}return Object.defineProperty(e.prototype,"contentWidget",{get:function(){return this._contentWidget||this._createHoverWidget(),this._contentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphWidget",{get:function(){return this._glyphWidget||this._createHoverWidget(),this._glyphWidget},enumerable:!0,configurable:!0}),e.get=function(t){return t.getContribution(e.ID)},e.prototype._hookEvents=function(){var e=this,t=function(){return e._hideWidgets()},o=this._editor.getConfiguration().contribInfo.hover;this._isHoverEnabled=o.enabled,this._isHoverSticky=o.sticky,this._isHoverEnabled?(this._toUnhook.push(this._editor.onMouseDown((function(t){return e._onEditorMouseDown(t)}))),this._toUnhook.push(this._editor.onMouseUp((function(t){return e._onEditorMouseUp(t)}))),this._toUnhook.push(this._editor.onMouseMove((function(t){return e._onEditorMouseMove(t)}))),this._toUnhook.push(this._editor.onKeyDown((function(t){return e._onKeyDown(t)}))),this._toUnhook.push(this._editor.onDidChangeModelDecorations((function(){return e._onModelDecorationsChanged()})))):this._toUnhook.push(this._editor.onMouseMove(t)),this._toUnhook.push(this._editor.onMouseLeave(t)),this._toUnhook.push(this._editor.onDidChangeModel(t)),this._toUnhook.push(this._editor.onDidScrollChange((function(t){return e._onEditorScrollChanged(t)})))},e.prototype._unhookEvents=function(){this._toUnhook=Object(S.d)(this._toUnhook)},e.prototype._onModelDecorationsChanged=function(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorScrollChanged=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()},e.prototype._onEditorMouseDown=function(e){this._isMouseDown=!0;var t=e.target.type;t!==c.b.CONTENT_WIDGET||e.target.detail!==J.ID?t===c.b.OVERLAY_WIDGET&&e.target.detail===ee.ID||(t!==c.b.OVERLAY_WIDGET&&e.target.detail!==ee.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0},e.prototype._onEditorMouseUp=function(e){this._isMouseDown=!1},e.prototype._onEditorMouseMove=function(e){var t=e.target.type,o=r.d?e.event.metaKey:e.event.ctrlKey;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible())&&(!this._isHoverSticky||t!==c.b.CONTENT_WIDGET||e.target.detail!==J.ID||o)&&(!this._isHoverSticky||t!==c.b.OVERLAY_WIDGET||e.target.detail!==ee.ID||o)){if(t===c.b.CONTENT_EMPTY){var n=this._editor.getConfiguration().fontInfo.typicalHalfwidthCharacterWidth/2,i=e.target.detail;i&&!i.isAfterLines&&"number"==typeof i.horizontalDistanceToText&&i.horizontalDistanceToText=i)return null;for(var r=[],s=n;s<=i;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort((function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())})),!0===o&&(a=a.reverse()),{startLineNumber:n,endLineNumber:i,before:r,after:a}}var u=o(8),c=function(){function e(e,t){this.selection=e,this.cursors=t}return e.prototype.getEditOperations=function(e,t){for(var o=function(e,t){t.sort((function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber}));for(var o=t.length-2;o>=0;o--)t[o].lineNumber===t[o+1].lineNumber&&t.splice(o,1);for(var n=[],i=0,a=0,l=t.length,c=1,h=e.getLineCount();c<=h;c++){var d=e.getLineContent(c),g=d.length+1,p=0;if(!(a1&&(o-=1,i=e.getLineMaxColumn(o)),t.addTrackedEditOperation(new s.a(o,i,n,r),null)}},e.prototype.computeCursorState=function(e,t){var o=t.getInverseEditOperations()[0].range;return new g.a(o.endLineNumber,this.restoreCursorToColumn,o.endLineNumber,this.restoreCursorToColumn)},e}(),y=o(32),v=o(125);function b(e,t){for(var o=0,n=0;n=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var S=y.a.getGoodIndentForLine(l,e.getLanguageIdAtPosition(d,1),n.startLineNumber+1,a);if(null!==S){C=u.getLeadingWhitespace(e.getLineContent(n.startLineNumber));if((O=b(S,i))!==(R=b(C,i))){var T=O-R;this.getIndentEditsOfMovingBlock(e,t,n,i,r,T)}}}}else t.addEditOperation(new s.a(n.startLineNumber,1,n.startLineNumber,1),f+"\n")}else{var w;if(d=n.startLineNumber-1,p=e.getLineContent(d),t.addEditOperation(new s.a(d,1,d+1,1),null),t.addEditOperation(new s.a(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+p),this.shouldAutoIndent(e,n))if(l.getLineContent=function(t){return t===d?e.getLineContent(n.startLineNumber):e.getLineContent(t)},null!==(w=this.matchEnterRule(e,a,i,n.startLineNumber,n.startLineNumber-2)))0!==w&&this.getIndentEditsOfMovingBlock(e,t,n,i,r,w);else{var k=y.a.getGoodIndentForLine(l,e.getLanguageIdAtPosition(n.startLineNumber,1),d,a);if(null!==k){var O,R,N=u.getLeadingWhitespace(e.getLineContent(n.startLineNumber));if((O=b(k,i))!==(R=b(N,i))){T=O-R;this.getIndentEditsOfMovingBlock(e,t,n,i,r,T)}}}}}this._selectionId=t.trackSelection(n)}},e.prototype.buildIndentConverter=function(e){return{shiftIndent:function(t){for(var o=v.a.shiftIndentCount(t,t.length+1,e),n="",i=0;i=1;){var l=void 0;if(l=a===i&&void 0!==r?r:e.getLineContent(a),u.lastNonWhitespaceIndex(l)>=0)break;a--}if(a<1||n>e.getLineCount())return null;var c=e.getLineMaxColumn(a),h=y.a.getEnterAction(e,new s.a(a,c,a,c));if(h){var d=h.indentation,g=h.enterAction;g.indentAction===C.a.None?d=h.indentation+g.appendText:g.indentAction===C.a.Indent?d=h.indentation+g.appendText:g.indentAction===C.a.IndentOutdent?d=h.indentation:g.indentAction===C.a.Outdent&&(d=t.unshiftIndent(h.indentation)+g.appendText);var p=e.getLineContent(n);if(this.trimLeft(p).indexOf(this.trimLeft(d))>=0){var f=u.getLeadingWhitespace(e.getLineContent(n)),m=u.getLeadingWhitespace(d);return 2&y.a.getIndentMetadata(e,n)&&(m=t.unshiftIndent(m)),b(m,o)-b(f,o)}}return null},e.prototype.trimLeft=function(e){return e.replace(/^\s+/,"")},e.prototype.shouldAutoIndent=function(e,t){if(!this._autoIndent)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var o=e.getLanguageIdAtPosition(t.startLineNumber,1);return o===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==y.a.getIndentRulesSupport(o)},e.prototype.getIndentEditsOfMovingBlock=function(e,t,o,n,i,r){for(var a=o.startLineNumber;a<=o.endLineNumber;a++){var l=e.getLineContent(a),c=u.getLeadingWhitespace(l),h=E(b(c,n)+r,n,i);h!==c&&(t.addEditOperation(new s.a(a,1,a,c.length+1),h),a===o.endLineNumber&&o.endColumn<=c.length+1&&""===h&&(this._moveEndLineSelectionShrink=!0))}},e.prototype.computeCursorState=function(e,t){var o=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(o=o.setEndPosition(o.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&o.startLineNumber0){var s=t.startLineNumber-i;r=new g.a(s,t.startColumn,s,t.startColumn)}else r=new g.a(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);i+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?o=r:n.push(r)})),o&&n.unshift(o),n},t.prototype._getRangesToDelete=function(e){var t=e.getSelections(),o=e.getModel();return t.sort(s.a.compareRangesUsingStarts),t=t.map((function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),n=1===e.startLineNumber?1:o.getLineContent(t).length+1;return new s.a(t,n,e.startLineNumber,1)}return new s.a(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return e}))},t}(G),K=function(e){function t(){return e.call(this,{id:"deleteAllRight",label:n.a("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:h.a.writable,kbOpts:{kbExpr:h.a.textInputFocus,primary:null,mac:{primary:297,secondary:[2068]},weight:100}})||this}return R(t,e),t.prototype._getEndCursorState=function(e,t){for(var o,n=[],i=0,r=t.length;ie.endLineNumber+1?(i.push(e),t):new g.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(i.push(e),t):new g.a(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)}));i.push(a);for(var l=t.getModel(),u=[],c=[],h=n,d=0,p=0,f=i.length;p=1){var O=!0;""===S&&(O=!1),!O||" "!==S.charAt(S.length-1)&&"\t"!==S.charAt(S.length-1)||(O=!1,S=S.replace(/[\s\uFEFF\xA0]+$/g," "));var R=w.substr(k-1);S+=(O?" ":"")+R,y=O?R.length+1:R.length}else y=0}var N=new s.a(_,1,v,b);if(!N.isEmpty()){var L=void 0;m.isEmpty()?(u.push(r.a.replace(N,S)),L=new g.a(N.startLineNumber-d,S.length-y+1,_-d,S.length-y+1)):m.startLineNumber===m.endLineNumber?(u.push(r.a.replace(N,S)),L=new g.a(m.startLineNumber-d,m.startColumn,m.endLineNumber-d,m.endColumn)):(u.push(r.a.replace(N,S)),L=new g.a(m.startLineNumber-d,m.startColumn,m.startLineNumber-d,S.length-E)),null!==s.a.intersectRanges(N,n)?h=L:c.push(L)}d+=N.endLineNumber-N.startLineNumber}c.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,u,c),t.pushUndoStop()},t}(f.b),X=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:n.a("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:h.a.writable})||this}return R(t,e),t.prototype.run=function(e,t){for(var o=t.getSelections(),n=t.getModel(),i=[],r=0,a=o.length;r=c){if(u.lineNumber===n.getLineCount())continue;var h=new s.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber+1,1),p=n.getValueInRange(h).split("").reverse().join("");i.push(new d.a(new g.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber+1,1),p))}else{h=new s.a(u.lineNumber,Math.max(1,u.column-1),u.lineNumber,u.column+1),p=n.getValueInRange(h).split("").reverse().join("");i.push(new d.b(h,p,new g.a(u.lineNumber,u.column+1,u.lineNumber,u.column+1)))}}}t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()},t}(f.b),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return R(t,e),t.prototype.run=function(e,t){for(var o=t.getSelections(),n=t.getModel(),i=[],r=0,a=o.length;r=t._editor.getModel().getLineCount()&&t._futureFixes.cancel()}))),this._disposables.push(P.j(this._domNode,"click",(function(e){t._editor.focus();var o=P.u(t._domNode),n=o.top,i=o.height,r=t._editor.getConfiguration().lineHeight,s=Math.floor(r/3);t._position&&t._position.position.lineNumber0?n.isEmpty()&&e.every((function(e){return e.kind&&O.Refactor.contains(e.kind)}))?t.hide():t._show():t.hide()})).catch((function(e){t.hide()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._domNode.title},set:function(e){this._domNode.title=e},enumerable:!0,configurable:!0}),e.prototype._show=function(){var t=this._editor.getConfiguration();if(t.contribInfo.lightbulbEnabled){var o=this._model.position.lineNumber,n=this._editor.getModel();if(n){var i=n.getOptions().tabSize,r=n.getLineContent(o),s=U.b.computeIndentLevel(r,i),a=o;t.fontInfo.spaceWidth*s>22||(o>1?a-=1:a+=1),this._position={position:{lineNumber:a,column:1},preference:e._posPref},this._editor.layoutContentWidget(this)}}},e.prototype.hide=function(){this._position=null,this._model=null,this._futureFixes.cancel(),this._editor.layoutContentWidget(this)},e._posPref=[H.a.EXACT],e}(),W=(L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}L(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),j=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},G=function(e,t){return function(o,n){t(o,n,e)}},z=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},K=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e,t){return function(o,n){t(o,n,e)}},D=c.a,A=function(e){function t(o){var n=e.call(this)||this;return n._onHint=n._register(new m.a),n.onHint=n._onHint.event,n._onCancel=n._register(new m.a),n.onCancel=n._onCancel.event,n.editor=o,n.enabled=!1,n.triggerCharactersListeners=[],n.throttledDelayer=new p.c((function(){return n.doTrigger()}),t.DELAY),n.active=!1,n._register(n.editor.onDidChangeConfiguration((function(){return n.onEditorConfigurationChange()}))),n._register(n.editor.onDidChangeModel((function(e){return n.onModelChanged()}))),n._register(n.editor.onDidChangeModelLanguage((function(e){return n.onModelChanged()}))),n._register(n.editor.onDidChangeCursorSelection((function(e){return n.onCursorChange(e)}))),n._register(n.editor.onDidChangeModelContent((function(e){return n.onModelContentChange()}))),n._register(d.t.onDidChange(n.onModelChanged,n)),n.onEditorConfigurationChange(),n.onModelChanged(),n}return N(t,e),t.prototype.cancel=function(e){void 0===e&&(e=!1),this.active=!1,this.throttledDelayer.cancel(),e||this._onCancel.fire(void 0),this.provideSignatureHelpRequest&&(this.provideSignatureHelpRequest.cancel(),this.provideSignatureHelpRequest=void 0)},t.prototype.trigger=function(e){if(void 0===e&&(e=t.DELAY),d.t.has(this.editor.getModel()))return this.cancel(!0),this.throttledDelayer.schedule(e)},t.prototype.doTrigger=function(){var e=this;this.provideSignatureHelpRequest&&this.provideSignatureHelpRequest.cancel(),this.provideSignatureHelpRequest=Object(p.i)((function(t){return b(e.editor.getModel(),e.editor.getPosition(),t)})),this.provideSignatureHelpRequest.then((function(t){if(!t||!t.signatures||0===t.signatures.length)return e.cancel(),e._onCancel.fire(void 0),!1;e.active=!0;var o={hints:t};return e._onHint.fire(o),!0})).catch(f.e)},t.prototype.isTriggered=function(){return this.active||this.throttledDelayer.isScheduled()},t.prototype.onModelChanged=function(){var e=this;this.cancel(),this.triggerCharactersListeners=Object(i.d)(this.triggerCharactersListeners);var t=this.editor.getModel();if(t){for(var o=new S.b,n=0,r=d.t.ordered(t);n1;c.N(this.element,"multiple",e),this.keyMultipleSignatures.set(e),this.signature.innerHTML="",this.docs.innerHTML="";var t=this.hints.signatures[this.currentSignature];if(t){var o=c.k(this.signature,D(".code")),r=t.parameters.length>0,s=this.editor.getConfiguration().fontInfo;if(o.style.fontSize=s.fontSize+"px",o.style.fontFamily=s.fontFamily,r)this.renderParameters(o,t,this.hints.activeParameter);else c.k(o,D("span")).textContent=t.label;Object(i.d)(this.renderDisposeables),this.renderDisposeables=[];var a=t.parameters[this.hints.activeParameter];if(a&&a.documentation){var l=D("span.documentation");if("string"==typeof a.documentation)l.textContent=a.documentation;else{var u=this.markdownRenderer.render(a.documentation);c.f(u.element,"markdown-docs"),this.renderDisposeables.push(u),l.appendChild(u.element)}c.k(this.docs,D("p",null,l))}if(c.N(this.signature,"has-docs",!!t.documentation),"string"==typeof t.documentation)c.k(this.docs,D("p",null,t.documentation));else{u=this.markdownRenderer.render(t.documentation);c.f(u.element,"markdown-docs"),this.renderDisposeables.push(u),c.k(this.docs,u.element)}var d=String(this.currentSignature+1);if(this.hints.signatures.length<10&&(d+="/"+this.hints.signatures.length),this.overloads.textContent=d,a){var g=a.label;this.announcedLabel!==g&&(h.a(n.a("hint","{0}, hint",g)),this.announcedLabel=g)}this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}},e.prototype.renderParameters=function(e,t,o){for(var n,i=t.label.length,r=0,s=t.parameters.length-1;s>=0;s--){var a=t.parameters[s],l=0,u=0;(r=t.label.lastIndexOf(a.label,i-1))>=0&&(l=r,u=r+a.label.length),(n=document.createElement("span")).textContent=t.label.substring(u,i),c.E(e,n),(n=document.createElement("span")).className="parameter "+(s===o?"active":""),n.textContent=t.label.substring(l,u),c.E(e,n),i=l}(n=document.createElement("span")).textContent=t.label.substring(0,i),c.E(e,n)},e.prototype.next=function(){var e=this.hints.signatures.length,t=this.currentSignature%e==e-1;return e<2||t?(this.cancel(),!1):(this.currentSignature++,this.render(),!0)},e.prototype.previous=function(){var e=this.hints.signatures.length,t=0===this.currentSignature;return e<2||t?(this.cancel(),!1):(this.currentSignature--,this.render(),!0)},e.prototype.cancel=function(){this.model.cancel()},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.trigger=function(){this.model.trigger(0)},e.prototype.updateMaxHeight=function(){var e=Math.max(this.editor.getLayoutInfo().height/4,250);this.element.style.maxHeight=e+"px"},e.prototype.dispose=function(){this.disposables=Object(i.d)(this.disposables),this.renderDisposeables=Object(i.d)(this.renderDisposeables),this.model&&(this.model.dispose(),this.model=null)},e.ID="editor.widget.parameterHintsWidget",e=L([I(1,a.e),I(2,k.a),I(3,O.a)],e)}();Object(T.e)((function(e,t){var o=e.getColor(w.w);if(o){var n=e.type===T.b?2:1;t.addRule(".monaco-editor .parameter-hints-widget { border: "+n+"px solid "+o+"; }"),t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid "+o.transparent(.5)+"; }"),t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid "+o.transparent(.5)+"; }")}var i=e.getColor(w.v);i&&t.addRule(".monaco-editor .parameter-hints-widget { background-color: "+i+"; }");var r=e.getColor(w.qb);r&&t.addRule(".monaco-editor .parameter-hints-widget a { color: "+r+"; }");var s=e.getColor(w.pb);s&&t.addRule(".monaco-editor .parameter-hints-widget code { background-color: "+s+"; }")})),o.d(t,"TriggerParameterHintsAction",(function(){return H}));var M=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),x=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},B=function(e,t){return function(o,n){t(o,n,e)}},F=function(){function e(e,t){this.editor=e,this.widget=t.createInstance(P,this.editor)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.cancel=function(){this.widget.cancel()},e.prototype.previous=function(){this.widget.previous()},e.prototype.next=function(){this.widget.next()},e.prototype.trigger=function(){this.widget.trigger()},e.prototype.dispose=function(){this.widget=Object(i.d)(this.widget)},e.ID="editor.controller.parameterHints",e=x([B(1,r.a)],e)}(),H=function(e){function t(){return e.call(this,{id:"editor.action.triggerParameterHints",label:n.a("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:s.a.hasSignatureHelpProvider,kbOpts:{kbExpr:s.a.editorTextFocus,primary:3082,weight:100}})||this}return M(t,e),t.prototype.run=function(e,t){var o=F.get(t);o&&o.trigger()},t}(l.b);Object(l.h)(F),Object(l.f)(H);var U=l.c.bindToContribution(F.get);Object(l.g)(new U({id:"closeParameterHints",precondition:v.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:175,kbExpr:s.a.editorTextFocus,primary:9,secondary:[1033]}})),Object(l.g)(new U({id:"showPrevParameterHint",precondition:a.d.and(v.Visible,v.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:175,kbExpr:s.a.editorTextFocus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),Object(l.g)(new U({id:"showNextParameterHint",precondition:a.d.and(v.Visible,v.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{weight:175,kbExpr:s.a.editorTextFocus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(25),s=o(10),a=o(22),l=o(2),u=o(5),c=o(3),h=o(60),d=o(86),g=o(106),p=o(32),f=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),m=function(){function e(){}return Object.defineProperty(e.prototype,"range",{get:function(){return new l.a(this.start.lineNumber,this.start.column,this.end.lineNumber,this.end.column)},enumerable:!0,configurable:!0}),e}(),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),Object.defineProperty(t.prototype,"hasChildren",{get:function(){return this.children&&this.children.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.hasChildren&&!this.parent},enumerable:!0,configurable:!0}),t.prototype.append=function(e){return!!e&&(e.parent=this,this.children||(this.children=[]),e instanceof t?e.children&&this.children.push.apply(this.children,e.children):this.children.push(e),!0)},t}(m),y=function(e){function t(){var t=e.call(this)||this;return t.elements=new _,t.elements.parent=t,t}return f(t,e),t}(m),v=function(e,t,o){this.range=e,this.bracket=t,this.bracketType=o};function b(e){var t=new m;return t.start=e.range.getStartPosition(),t.end=e.range.getEndPosition(),t}var E=function(e,t,o){this.lineNumber=o,this.lineText=e.getLineContent(),this.startOffset=e.getStartOffset(t),this.endOffset=e.getEndOffset(t),this.type=e.getStandardTokenType(t),this.languageId=e.getLanguageId(t)},C=function(){function e(e){this._model=e,this._lineCount=this._model.getLineCount(),this._versionId=this._model.getVersionId(),this._lineNumber=0,this._tokenIndex=0,this._lineTokens=null,this._advance()}return e.prototype._advance=function(){for(this._lineTokens&&(this._tokenIndex++,this._tokenIndex>=this._lineTokens.getCount()&&(this._lineTokens=null));this._lineNumber0)return this._nextBuff.shift();var e=this._rawTokenScanner.next();if(!e)return null;var t=e.lineNumber,o=e.lineText,n=e.type,i=e.startOffset,r=e.endOffset;this._cachedLanguageId!==e.languageId&&(this._cachedLanguageId=e.languageId,this._cachedLanguageBrackets=p.a.getBracketsSupport(this._cachedLanguageId));var s,a=this._cachedLanguageBrackets;if(!a||Object(d.b)(n))return new v(new l.a(t,i+1,t,r+1),0,null);do{if(s=g.a.findNextBracketInToken(a.forwardRegex,t,o,i,r)){var u=s.startColumn-1,c=s.endColumn-1;i=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},k=function(e,t){return function(o,n){t(o,n,e)}},O=function(){function e(e){this._modelService=e}return e.prototype.getRangesToPosition=function(e,t){return s.b.as(this.getRangesToPositionSync(e,t))},e.prototype.getRangesToPositionSync=function(e,t){var o=this._modelService.getModel(e),n=[];return o&&this._doGetRangesToPosition(o,t).forEach((function(e){n.push({type:void 0,range:e})})),n},e.prototype._doGetRangesToPosition=function(e,t){var o,n;o=function e(t,o){if(t instanceof _&&t.isEmpty)return null;if(!l.a.containsPosition(t.range,o))return null;var n;if(t instanceof _){if(t.hasChildren)for(var i=0,r=t.children.length;i=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e,t){return function(o,n){t(o,n,e)}},D=function(e){this.editor=e,this.next=null,this.previous=null,this.selection=e.getSelection()},A=function(){function e(e,t){this.editor=e,this._tokenSelectionSupport=t.createInstance(O),this._state=null,this._ignoreSelection=!1}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(e){var t=this,o=this.editor.getSelection(),n=this.editor.getModel();this._state&&this._state.editor!==this.editor&&(this._state=null);var i=s.b.as(null);return this._state||(i=this._tokenSelectionSupport.getRangesToPosition(n.uri,o.getStartPosition()).then((function(e){if(!r.k(e)){var o;e.filter((function(e){var o=t.editor.getSelection(),n=new l.a(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);return n.containsPosition(o.getStartPosition())&&n.containsPosition(o.getEndPosition())})).forEach((function(e){var n=e.range,i=new D(t.editor);i.selection=new l.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn),o&&(i.next=o,o.previous=i),o=i}));var n=new D(t.editor);n.next=o,o&&(o.previous=n),t._state=n;var i=t.editor.onDidChangeCursorPosition((function(e){t._ignoreSelection||(t._state=null,i.dispose())}))}}))),i.then((function(){if(t._state&&(t._state=e?t._state.next:t._state.previous,t._state)){t._ignoreSelection=!0;try{t.editor.setSelection(t._state.selection)}finally{t._ignoreSelection=!1}}}))},e.ID="editor.contrib.smartSelectController",e=L([I(1,a.a)],e)}(),P=function(e){function t(t,o){var n=e.call(this,o)||this;return n._forward=t,n}return N(t,e),t.prototype.run=function(e,t){var o=A.get(t);if(o)return o.run(this._forward)},t}(c.b),M=function(e){function t(){return e.call(this,!0,{id:"editor.action.smartSelect.grow",label:i.a("smartSelect.grow","Expand Select"),alias:"Expand Select",precondition:null,kbOpts:{kbExpr:u.a.editorTextFocus,primary:1553,mac:{primary:3345},weight:100},menubarOpts:{menuId:R.b.MenubarSelectionMenu,group:"1_basic",title:i.a({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})||this}return N(t,e),t}(P),x=function(e){function t(){return e.call(this,!1,{id:"editor.action.smartSelect.shrink",label:i.a("smartSelect.shrink","Shrink Select"),alias:"Shrink Select",precondition:null,kbOpts:{kbExpr:u.a.editorTextFocus,primary:1551,mac:{primary:3343},weight:100},menubarOpts:{menuId:R.b.MenubarSelectionMenu,group:"1_basic",title:i.a({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})||this}return N(t,e),t}(P);Object(c.h)(A),Object(c.f)(M),Object(c.f)(x)},function(e,t,o){"use strict";o.r(t);var n=o(17),i=o(13),r=o(6),s=o(90),a=o(3),l=o(11),u=(o(434),o(8)),c=o(1),h=o(2),d=o(16),g=o(26),p=o(29),f=o(19),m=o(7),_=function(){function e(e,t){this.afterLineNumber=e,this._onHeight=t,this.heightInLines=1,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}return e.prototype.onComputedHeight=function(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())},e}(),y=function(){function e(t,o,n,i){var r=this;this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._disposables=[],this._commands=Object.create(null),this._id="codeLensWidget"+ ++e._idPool,this._editor=t,this.setSymbolRange(o),this._domNode=document.createElement("span"),this._domNode.innerHTML=" ",c.f(this._domNode,"codelens-decoration"),c.f(this._domNode,"invisible-cl"),this._updateHeight(),this._disposables.push(this._editor.onDidChangeConfiguration((function(e){return e.fontInfo&&r._updateHeight()}))),this._disposables.push(c.g(this._domNode,"click",(function(e){var o=e.target;if("A"===o.tagName&&o.id){var s=r._commands[o.id];s&&(t.focus(),n.executeCommand.apply(n,[s.id].concat(s.arguments)).done(void 0,(function(e){i.error(e)})))}}))),this.updateVisibility()}return e.prototype.dispose=function(){Object(r.d)(this._disposables)},e.prototype._updateHeight=function(){var e=this._editor.getConfiguration(),t=e.fontInfo,o=e.lineHeight;this._domNode.style.height=Math.round(1.1*o)+"px",this._domNode.style.lineHeight=o+"px",this._domNode.style.fontSize=Math.round(.9*t.fontSize)+"px",this._domNode.innerHTML=" "},e.prototype.updateVisibility=function(){this.isVisible()&&(c.G(this._domNode,"invisible-cl"),c.f(this._domNode,"fadein"))},e.prototype.withCommands=function(e){if(this._commands=Object.create(null),e&&e.length){for(var t=[],o=0;o{1}",o,i),this._commands[o]=n):r=Object(u.format)("{0}",i),t.push(r)}this._domNode.innerHTML=t.join(" | "),this._editor.layoutContentWidget(this)}else this._domNode.innerHTML="no commands"},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.setSymbolRange=function(e){var t=e.startLineNumber,o=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:o},preference:[d.a.ABOVE]}},e.prototype.getPosition=function(){return this._widgetPosition},e.prototype.isVisible=function(){return this._domNode.hasAttribute("monaco-visible-content-widget")},e._idPool=0,e}(),v=function(){function e(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return e.prototype.addDecoration=function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)},e.prototype.removeDecoration=function(e){this._removeDecorations.push(e)},e.prototype.commit=function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),o=0,n=t.length;o a:hover { color: "+n+" !important; }")}));var E=o(37),C=o(45),S=o(25),T=o(33),w=o(60),k=o(48);function O(e,t){var o=[],n=l.c.ordered(e),r=n.map((function(n){return Promise.resolve(n.provideCodeLenses(e,t)).then((function(e){if(Array.isArray(e))for(var t=0,i=e;tt.symbol.range.startLineNumber?1:n.indexOf(e.provider)n.indexOf(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0}))}))}Object(a.j)("_executeCodeLensProvider",(function(e,t){var o=t.resource,n=t.itemResolveCount;if(!(o instanceof T.a))throw Object(i.b)();var r=e.get(w.a).getModel(o);if(!r)throw Object(i.b)();var s=[];return O(r,k.a.None).then((function(e){for(var t=[],o=0,i=e;o0&&t.push(Promise.resolve(a.provider.resolveCodeLens(r,a.symbol,k.a.None)).then((function(e){return s.push(e)})))}return Promise.all(t)})).then((function(){return s}))})),o.d(t,"CodeLensContribution",(function(){return L}));var R=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},N=function(e,t){return function(o,n){t(o,n,e)}},L=function(){function e(e,t,o){var n=this;this._editor=e,this._commandService=t,this._notificationService=o,this._isEnabled=this._editor.getConfiguration().contribInfo.codeLens,this._globalToDispose=[],this._localToDispose=[],this._lenses=[],this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter=0,this._globalToDispose.push(this._editor.onDidChangeModel((function(){return n._onModelChange()}))),this._globalToDispose.push(this._editor.onDidChangeModelLanguage((function(){return n._onModelChange()}))),this._globalToDispose.push(this._editor.onDidChangeConfiguration((function(e){var t=n._isEnabled;n._isEnabled=n._editor.getConfiguration().contribInfo.codeLens,t!==n._isEnabled&&n._onModelChange()}))),this._globalToDispose.push(l.c.onDidChange(this._onModelChange,this)),this._onModelChange()}return e.prototype.dispose=function(){this._localDispose(),this._globalToDispose=Object(r.d)(this._globalToDispose)},e.prototype._localDispose=function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter++),this._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=null),this._localToDispose=Object(r.d)(this._localToDispose)},e.prototype.getId=function(){return e.ID},e.prototype._onModelChange=function(){var e=this;this._localDispose();var t=this._editor.getModel();if(t&&this._isEnabled&&l.c.has(t)){for(var o=0,a=l.c.all(t);o0&&e._detectVisibleLenses.schedule()}))),this._localToDispose.push(this._editor.onDidLayoutChange((function(t){e._detectVisibleLenses.schedule()}))),this._localToDispose.push(Object(r.f)((function(){if(e._editor.getModel()){var t=s.b.capture(e._editor);e._editor.changeDecorations((function(t){e._editor.changeViewZones((function(o){e._disposeAllLenses(t,o)}))})),t.restore(e._editor)}else e._disposeAllLenses(null,null)}))),h.schedule()}},e.prototype._disposeAllLenses=function(e,t){var o=new v;this._lenses.forEach((function(e){return e.dispose(o,t)})),e&&o.commit(e),this._lenses=[]},e.prototype._renderCodeLensSymbols=function(e){var t=this;if(this._editor.getModel()){for(var o,n=this._editor.getModel().getLineCount(),i=[],r=0,a=e;rn||(o&&o[o.length-1].symbol.range.startLineNumber===u?o.push(l):(o=[l],i.push(o)))}var c=s.b.capture(this._editor);this._editor.changeDecorations((function(e){t._editor.changeViewZones((function(o){for(var n=0,r=0,s=new v;r=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},P=function(e,t){return function(o,n){t(o,n,e)}};function M(e){if((e=e.filter((function(e){return e.range}))).length){for(var t=e[0].range,o=1;o1)){var o=this.editor.getModel(),n=this.editor.getPosition(),i=!1,s=this.editor.onDidChangeModelContent((function(e){if(e.isFlush)return i=!0,void s.dispose();for(var t=0,o=e.changes.length;t1)){var o=this.editor.getModel(),n=o.getOptions(),i=n.tabSize,s=n.insertSpaces,a=new N.a(this.editor,5);v(o,e,{tabSize:i,insertSpaces:s}).then((function(e){return t.workerService.computeMoreMinimalEdits(o.uri,e)})).then((function(e){a.validate(t.editor)&&!Object(r.k)(e)&&(S.execute(t.editor,e),M(e))}))}},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.callOnDispose=Object(a.d)(this.callOnDispose),this.callOnModel=Object(a.d)(this.callOnModel)},e.ID="editor.contrib.formatOnPaste",e=A([P(1,k.a)],e)}(),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.run=function(e,t){var o=this,n=e.get(k.a),i=e.get(I.a),s=this._getFormattingEdits(t);if(!s)return l.b.as(void 0);var a=new N.a(t,5);return s.then((function(e){return n.computeMoreMinimalEdits(t.getModel().uri,e)})).then((function(e){a.validate(t)&&!Object(r.k)(e)&&(S.execute(t,e),M(e),t.focus())}),(function(e){if(!(e instanceof Error&&e.name===y.Name))throw e;o._notifyNoProviderError(i,t.getModel().getLanguageIdentifier().language)}))},t.prototype._notifyNoProviderError=function(e,t){e.info(i.a("no.provider","There is no formatter for '{0}'-files installed.",t))},t}(c.b),H=function(e){function t(){return e.call(this,{id:"editor.action.formatDocument",label:i.a("formatDocument.label","Format Document"),alias:"Format Document",precondition:L.a.writable,kbOpts:{kbExpr:L.a.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},menuOpts:{when:L.a.hasDocumentFormattingProvider,group:"1_modification",order:1.3}})||this}return D(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),o=t.getOptions();return b(t,{tabSize:o.tabSize,insertSpaces:o.insertSpaces})},t.prototype._notifyNoProviderError=function(e,t){e.info(i.a("no.documentprovider","There is no document formatter for '{0}'-files installed.",t))},t}(F),U=function(e){function t(){return e.call(this,{id:"editor.action.formatSelection",label:i.a("formatSelection.label","Format Selection"),alias:"Format Code",precondition:u.d.and(L.a.writable,L.a.hasNonEmptySelection),kbOpts:{kbExpr:L.a.editorTextFocus,primary:Object(s.a)(2089,2084),weight:100},menuOpts:{when:u.d.and(L.a.hasDocumentSelectionFormattingProvider,L.a.hasNonEmptySelection),group:"1_modification",order:1.31}})||this}return D(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),o=t.getOptions(),n=o.tabSize,i=o.insertSpaces;return v(t,e.getSelection(),{tabSize:n,insertSpaces:i})},t.prototype._notifyNoProviderError=function(e,t){e.info(i.a("no.selectionprovider","There is no selection formatter for '{0}'-files installed.",t))},t}(F);Object(c.h)(x),Object(c.h)(B),Object(c.f)(H),Object(c.f)(U),T.a.registerCommand("editor.action.format",(function(e){var t=e.get(w.a).getFocusedCodeEditor();if(t)return(new(function(e){function t(){return e.call(this,{})||this}return D(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),o=e.getSelection(),n=t.getOptions(),i=n.tabSize,r=n.insertSpaces;return o.isEmpty()?b(t,{tabSize:i,insertSpaces:r}):v(t,o,{tabSize:i,insertSpaces:r})},t}(F))).run(e,t)}))},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(39),s=o(5),a=o(3),l=o(53),u=o(9),c=o(2),h=o(23),d=o(32),g=function(){function e(e){this._selection=e,this._usedEndToken=null}return e._haystackHasNeedleAtOffset=function(e,t,o){if(o<0)return!1;var n=t.length;if(o+n>e.length)return!1;for(var i=0;i=65&&r<=90&&r+32===s||s>=65&&s<=90&&s+32===r))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,o,n,i){var r,s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,u=t.endColumn,h=n.getLineContent(s),d=n.getLineContent(l),g=o.blockCommentStartToken,p=o.blockCommentEndToken,f=h.lastIndexOf(g,a-1+g.length),m=d.indexOf(p,u-1-p.length);if(-1!==f&&-1!==m)if(s===l){h.substring(f+g.length,m).indexOf(p)>=0&&(f=-1,m=-1)}else{var _=h.substring(f+g.length),y=d.substring(0,m);(_.indexOf(p)>=0||y.indexOf(p)>=0)&&(f=-1,m=-1)}-1!==f&&-1!==m?(f+g.length0&&32===d.charCodeAt(m-1)&&(p=" "+p,m-=1),r=e._createRemoveBlockCommentOperations(new c.a(s,f+g.length+1,l,m+1),g,p)):(r=e._createAddBlockCommentOperations(t,g,p),this._usedEndToken=1===r.length?p:null);for(var v=0;va?r-1:r}},e}(),m=o(38),_=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),y=function(e){function t(t,o){var n=e.call(this,o)||this;return n._type=t,n}return _(t,e),t.prototype.run=function(e,t){var o=t.getModel();if(o){for(var n=[],i=t.getSelections(),r=o.getOptions(),s=0;s=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},b=function(e,t){return function(o,n){t(o,n,e)}},E=function(){function e(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.prototype.run=function(t,o){var n=this;this.currentRequest&&this.currentRequest.cancel();var i=this.editor.getSelection(),r=this.editor.getModel().uri;if(i.startLineNumber!==i.endLineNumber)return null;var l=new d.a(this.editor,5);return this.editorWorkerService.canNavigateValueSet(r)?(this.currentRequest=Object(m.i)((function(e){return n.editorWorkerService.navigateValueSet(r,i,o)})),this.currentRequest.then((function(o){if(o&&o.range&&o.value&&l.validate(n.editor)){var r=s.a.lift(o.range),u=o.range,c=o.value.length-(i.endColumn-i.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+o.value.length},c>1&&(i=new a.a(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+c-1));var d=new h(r,i,o.value);n.editor.pushUndoStop(),n.editor.executeCommand(t,d),n.editor.pushUndoStop(),n.decorationIds=n.editor.deltaDecorations(n.decorationIds,[{range:u,options:e.DECORATION}]),n.decorationRemover&&n.decorationRemover.cancel(),n.decorationRemover=Object(m.m)(350),n.decorationRemover.then((function(){return n.decorationIds=n.editor.deltaDecorations(n.decorationIds,[])})).catch(_.e)}})).catch(_.e)):void 0},e.ID="editor.contrib.inPlaceReplaceController",e.DECORATION=f.a.register({className:"valueSetReplacement"}),e=v([b(1,c.a)],e)}(),C=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:i.a("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:l.a.writable,kbOpts:{kbExpr:l.a.editorTextFocus,primary:3154,weight:100}})||this}return y(t,e),t.prototype.run=function(e,t){var o=E.get(t);if(o)return r.b.wrap(o.run(this.id,!0))},t}(u.b),S=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:i.a("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:l.a.writable,kbOpts:{kbExpr:l.a.editorTextFocus,primary:3156,weight:100}})||this}return y(t,e),t.prototype.run=function(e,t){var o=E.get(t);if(o)return r.b.wrap(o.run(this.id,!1))},t}(u.b);Object(u.h)(E),Object(u.f)(C),Object(u.f)(S),Object(g.e)((function(e,t){var o=e.getColor(p.d);o&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px "+o+"; }")}))},function(e,t,o){"use strict";o.r(t);o(482);var n=o(0),i=o(111),r=o(8),s=o(123),a=o(97),l=o(5),u=o(11),c=o(161),h=o(13),d=o(33),g=o(10),p=o(2),f=o(3),m=o(60),_=o(17);function y(e){var t=[],o=u.j.all(e).map((function(o){return Object(_.h)((function(t){return o.provideDocumentSymbols(e,t)})).then((function(e){Array.isArray(e)&&t.push.apply(t,e)}),(function(e){Object(h.f)(e)}))}));return g.b.join(o).then((function(){var e=[];return function e(t,o,n){for(var i=0,r=o;i0&&0===o.indexOf(":")){var f=null,m=null,_=0;for(c=0;c0)):_++}m&&m.setGroupLabel(this.typeToLabel(f,_))}else a.length>0&&a[0].setGroupLabel(n.a("symbols","symbols ({0})",a.length));return a},t.prototype.typeToLabel=function(e,t){switch(e){case"module":return n.a("modules","modules ({0})",t);case"class":return n.a("class","classes ({0})",t);case"interface":return n.a("interface","interfaces ({0})",t);case"method":return n.a("method","methods ({0})",t);case"function":return n.a("function","functions ({0})",t);case"property":return n.a("property","properties ({0})",t);case"variable":return n.a("variable","variables ({0})",t);case"var":return n.a("variable2","variables ({0})",t);case"constructor":return n.a("_constructor","constructors ({0})",t);case"call":return n.a("call","calls ({0})",t)}return e},t.prototype.sortNormal=function(e,t,o){var n=t.getLabel().toLowerCase(),i=o.getLabel().toLowerCase(),r=n.localeCompare(i);if(0!==r)return r;var s=t.getRange(),a=o.getRange();return s.startLineNumber-a.startLineNumber},t.prototype.sortScoped=function(e,t,o){e=e.substr(":".length);var n=t.getType(),i=o.getType(),r=n.localeCompare(i);if(0!==r)return r;if(e){var s=t.getLabel().toLowerCase(),a=o.getLabel().toLowerCase(),l=s.localeCompare(a);if(0!==l)return l}var u=t.getRange(),c=o.getRange();return u.startLineNumber-c.startLineNumber},t}(c.a);Object(f.f)(S)},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(5),s=o(3),a=o(2),l=function(){function e(e,t){this._selection=e,this._isMovingLeft=t}return e.prototype.getEditOperations=function(e,t){var o=this._selection;if(this._selectionId=t.trackSelection(o),o.startLineNumber===o.endLineNumber&&(!this._isMovingLeft||0!==o.startColumn)&&(this._isMovingLeft||o.endColumn!==e.getLineMaxColumn(o.startLineNumber))){var n,i,r,s=o.selectionStartLineNumber,l=e.getLineContent(s);this._isMovingLeft?(n=l.substring(0,o.startColumn-2),i=l.substring(o.startColumn-1,o.endColumn-1),r=l.substring(o.startColumn-2,o.startColumn-1)+l.substring(o.endColumn-1)):(n=l.substring(0,o.startColumn-1)+l.substring(o.endColumn-1,o.endColumn),i=l.substring(o.startColumn-1,o.endColumn-1),r=l.substring(o.endColumn));var u=n+i+r;t.addEditOperation(new a.a(s,1,s,e.getLineMaxColumn(s)),null),t.addEditOperation(new a.a(s,1,s,1),u),this._cutStartIndex=o.startColumn+(this._isMovingLeft?-1:1),this._cutEndIndex=this._cutStartIndex+o.endColumn-o.startColumn,this._moved=!0}},e.prototype.computeCursorState=function(e,t){var o=t.getTrackedSelection(this._selectionId);return this._moved&&(o=(o=o.setStartPosition(o.startLineNumber,this._cutStartIndex)).setEndPosition(o.startLineNumber,this._cutEndIndex)),o},e}(),u=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),c=function(e){function t(t,o){var n=e.call(this,o)||this;return n.left=t,n}return u(t,e),t.prototype.run=function(e,t){for(var o=[],n=t.getSelections(),i=0;i=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},_=function(e,t){return function(o,n){t(o,n,e)}},y=function(){function e(e,t){var o=this;this.themeService=t,this._disposables=[],this.allowEditorOverflow=!0,this._currentAcceptInput=null,this._currentCancelInput=null,this._editor=e,this._editor.addContentWidget(this),this._disposables.push(e.onDidChangeConfiguration((function(e){e.fontInfo&&o.updateFont()}))),this._disposables.push(t.onThemeChange((function(e){return o.onThemeChange(e)})))}return e.prototype.onThemeChange=function(e){this.updateStyles(e)},e.prototype.dispose=function(){this._disposables=Object(c.d)(this._disposables),this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"__renameInputWidget"},e.prototype.getDomNode=function(){return this._domNode||(this._inputField=document.createElement("input"),this._inputField.className="rename-input",this._inputField.type="text",this._inputField.setAttribute("aria-label",Object(n.a)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode=document.createElement("div"),this._domNode.style.height=this._editor.getConfiguration().lineHeight+"px",this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputField),this.updateFont(),this.updateStyles(this.themeService.getTheme())),this._domNode},e.prototype.updateStyles=function(e){if(this._inputField){var t=e.getColor(p.K),o=e.getColor(p.M),n=e.getColor(p.rb),i=e.getColor(p.L);this._inputField.style.backgroundColor=t?t.toString():null,this._inputField.style.color=o?o.toString():null,this._inputField.style.borderWidth=i?"1px":"0px",this._inputField.style.borderStyle=i?"solid":"none",this._inputField.style.borderColor=i?i.toString():"none",this._domNode.style.boxShadow=n?" 0 2px 8px "+n:null}},e.prototype.updateFont=function(){if(this._inputField){var e=this._editor.getConfiguration().fontInfo;this._inputField.style.fontFamily=e.fontFamily,this._inputField.style.fontWeight=e.fontWeight,this._inputField.style.fontSize=e.fontSize+"px"}},e.prototype.getPosition=function(){return this._visible?{position:this._position,preference:[d.a.BELOW,d.a.ABOVE]}:null},e.prototype.acceptInput=function(){this._currentAcceptInput&&this._currentAcceptInput()},e.prototype.cancelInput=function(e){this._currentCancelInput&&this._currentCancelInput(e)},e.prototype.getInput=function(e,t,o,n){var i=this;this._position=new f.a(e.startLineNumber,e.startColumn),this._inputField.value=t,this._inputField.setAttribute("selectionStart",o.toString()),this._inputField.setAttribute("selectionEnd",n.toString()),this._inputField.size=Math.max(1.1*(e.endColumn-e.startColumn),20);var s,a=[];return s=function(){Object(c.d)(a),i._hide()},new r.b((function(o){i._currentCancelInput=function(e){return i._currentAcceptInput=null,i._currentCancelInput=null,o(e),!0},i._currentAcceptInput=function(){0!==i._inputField.value.trim().length&&i._inputField.value!==t?(i._currentAcceptInput=null,i._currentCancelInput=null,o(i._inputField.value)):i.cancelInput(!0)};a.push(i._editor.onDidChangeCursorSelection((function(){h.a.containsPosition(e,i._editor.getPosition())||i.cancelInput(!0)}))),a.push(i._editor.onDidBlurEditorWidget((function(){return i.cancelInput(!1)}))),i._show()}),(function(){i._currentCancelInput(!0)})).then((function(e){return s(),e}),(function(e){return s(),r.b.wrapError(e)}))},e.prototype._show=function(){var e=this;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._editor.layoutContentWidget(this),setTimeout((function(){e._inputField.focus(),e._inputField.setSelectionRange(parseInt(e._inputField.getAttribute("selectionStart")),parseInt(e._inputField.getAttribute("selectionEnd")))}),100)},e.prototype._hide=function(){this._visible=!1,this._editor.layoutContentWidget(this)},e=m([_(1,g.c)],e)}(),v=o(17),b=o(11),E=o(58),C=o(142),S=o(90),T=o(45),w=o(156),k=o(33),O=o(36);o.d(t,"rename",(function(){return M})),o.d(t,"RenameAction",(function(){return F}));var R,N=(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),L=function(e,t,o,n){var i,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},I=function(e,t){return function(o,n){t(o,n,e)}},D=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},A=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0},e.prototype.resolveRenameLocation=function(){return D(this,void 0,void 0,(function(){var e,t,o,n=this;return A(this,(function(i){switch(i.label){case 0:return(e=this._provider[0]).resolveRenameLocation?[4,Object(v.h)((function(t){return e.resolveRenameLocation(n.model,n.position,t)}))]:[3,2];case 1:t=i.sent(),i.label=2;case 2:return t||(o=this.model.getWordAtPosition(this.position))&&(t={range:new h.a(this.position.lineNumber,o.startColumn,this.position.lineNumber,o.endColumn),text:o.word}),[2,t]}}))}))},e.prototype.provideRenameEdits=function(e,t,o,i){return void 0===t&&(t=0),void 0===o&&(o=[]),void 0===i&&(i=this.position),D(this,void 0,void 0,(function(){var i,r,s=this;return A(this,(function(a){switch(a.label){case 0:return t>=this._provider.length?[2,{edits:void 0,rejectReason:o.join("\n")}]:(i=this._provider[t],[4,Object(v.h)((function(t){return i.provideRenameEdits(s.model,s.position,e,t)}))]);case 1:return(r=a.sent())?r.rejectReason?[2,this.provideRenameEdits(e,t+1,o.concat(r.rejectReason))]:[2,r]:[2,this.provideRenameEdits(e,t+1,o.concat(n.a("no result","No result.")))]}}))}))},e}();function M(e,t,o){return D(this,void 0,void 0,(function(){return A(this,(function(n){return[2,new P(e,t).provideRenameEdits(o)]}))}))}var x=new s.f("renameInputVisible",!1),B=function(){function e(e,t,o,n,i,r){this.editor=e,this._notificationService=t,this._bulkEditService=o,this._progressService=n,this._renameInputField=new y(e,r),this._renameInputVisible=x.bindTo(i)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._renameInputField.dispose()},e.prototype.getId=function(){return e.ID},e.prototype.run=function(){return D(this,void 0,void 0,(function(){var e,t,o,i,s,a,l,u=this;return A(this,(function(c){switch(c.label){case 0:if(e=this.editor.getPosition(),!(t=new P(this.editor.getModel(),e)).hasProvider())return[2,void 0];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,t.resolveRenameLocation()];case 2:return o=c.sent(),[3,4];case 3:return i=c.sent(),C.a.get(this.editor).showMessage(i,e),[2,void 0];case 4:return o?(s=this.editor.getSelection(),a=0,l=o.text.length,h.a.isEmpty(s)||h.a.spansMultipleLines(s)||!h.a.containsRange(o.range,s)||(a=Math.max(0,s.startColumn-o.range.startColumn),l=Math.min(o.range.endColumn,s.endColumn)-o.range.startColumn),this._renameInputVisible.set(!0),[2,this._renameInputField.getInput(o.range,o.text,a,l).then((function(e){if(u._renameInputVisible.reset(),"boolean"!=typeof e){u.editor.focus();var i=new S.a(u.editor,15),s=r.b.wrap(t.provideRenameEdits(e,0,[],h.a.lift(o.range).getStartPosition()).then((function(t){if(!t.rejectReason)return u._bulkEditService.apply(t,{editor:u.editor}).then((function(t){t.ariaSummary&&Object(E.a)(n.a("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",o.text,e,t.ariaSummary))}));i.validate(u.editor)?C.a.get(u.editor).showMessage(t.rejectReason,u.editor.getPosition()):u._notificationService.info(t.rejectReason)}),(function(e){return u._notificationService.error(n.a("rename.failed","Rename failed to execute.")),r.b.wrapError(e)})));return u._progressService.showWhile(s,250),s}e&&u.editor.focus()}),(function(e){return u._renameInputVisible.reset(),r.b.wrapError(e)}))]):[2,void 0]}}))}))},e.prototype.acceptRenameInput=function(){this._renameInputField.acceptInput()},e.prototype.cancelRenameInput=function(){this._renameInputField.cancelInput(!0)},e.ID="editor.contrib.renameController",e=L([I(1,T.a),I(2,w.a),I(3,a.a),I(4,s.e),I(5,g.c)],e)}(),F=function(e){function t(){return e.call(this,{id:"editor.action.rename",label:n.a("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:s.d.and(u.a.writable,u.a.hasRenameProvider),kbOpts:{kbExpr:u.a.editorTextFocus,primary:60,weight:100},menuOpts:{group:"1_modification",order:1.1}})||this}return N(t,e),t.prototype.runCommand=function(t,o){var n=this,r=t.get(O.a),s=o||[void 0,void 0],a=s[0],l=s[1];return k.a.isUri(a)&&f.a.isIPosition(l)?r.openCodeEditor({resource:a},r.getActiveCodeEditor()).then((function(e){e.setPosition(l),e.invokeWithinContext((function(t){return n.reportTelemetry(t,e),n.run(t,e)}))}),i.e):e.prototype.runCommand.call(this,t,o)},t.prototype.run=function(e,t){var o=B.get(t);if(o)return r.b.wrap(o.run())},t}(l.b);Object(l.h)(B),Object(l.f)(F);var H=l.c.bindToContribution(B.get);Object(l.g)(new H({id:"acceptRenameInput",precondition:x,handler:function(e){return e.acceptRenameInput()},kbOpts:{weight:199,kbExpr:u.a.focus,primary:3}})),Object(l.g)(new H({id:"cancelRenameInput",precondition:x,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:199,kbExpr:u.a.focus,primary:9,secondary:[1033]}})),Object(l.e)("_executeDocumentRenameProvider",(function(e,t,o){var n=o.newName;if("string"!=typeof n)throw Object(i.b)("newName");return M(e,t,n)}))},function(e,t,o){"use strict";o.r(t);var n,i=o(0),r=o(4),s=o(6),a=o(12),l=o(46),u=o(2),c=o(3),h=o(19),d=o(5),g=(o(471),o(1)),p=o(207),f=o(7),m=o(14),_=o(29),y=o(81),v=o(42),b=o(165),E=o(25),C=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),S=function(){function e(e,t,o){var n=this;this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=[],this._editor=t;var i=document.createElement("div");i.className="descriptioncontainer",i.setAttribute("aria-live","assertive"),i.setAttribute("role","alert"),this._messageBlock=document.createElement("div"),i.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),i.appendChild(this._relatedBlock),this._disposables.push(g.j(this._relatedBlock,"click",(function(e){e.preventDefault();var t=n._relatedDiagnostics.get(e.target);t&&o(t)}))),this._scrollable=new y.b(i,{horizontal:v.b.Auto,vertical:v.b.Auto,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),g.f(this._scrollable.getDomNode(),"block"),e.appendChild(this._scrollable.getDomNode()),this._disposables.push(this._scrollable.onScroll((function(e){i.style.left="-"+e.scrollLeft+"px",i.style.top="-"+e.scrollTop+"px"}))),this._disposables.push(this._scrollable)}return e.prototype.dispose=function(){Object(s.d)(this._disposables)},e.prototype.update=function(e){var t=e.source,o=e.message,n=e.relatedInformation;if(t){this._lines=0,this._longestLineLength=0;for(var i=new Array(t.length+3+1).join(" "),r=o.split(/\r\n|\r|\n/g),s=0;s=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},B=function(e,t){return function(o,n){t(o,n,e)}},F=function(){function e(e,t){var o=this;this._editor=e,this._markers=null,this._nextIdx=-1,this._toUnbind=[],this._ignoreSelectionChange=!1,this._onCurrentMarkerChanged=new r.a,this._onMarkerSetChanged=new r.a,this.setMarkers(t),this._toUnbind.push(this._editor.onDidDispose((function(){return o.dispose()}))),this._toUnbind.push(this._editor.onDidChangeCursorPosition((function(){o._ignoreSelectionChange||o.currentMarker&&u.a.containsPosition(o.currentMarker,o._editor.getPosition())||(o._nextIdx=-1)})))}return Object.defineProperty(e.prototype,"onCurrentMarkerChanged",{get:function(){return this._onCurrentMarkerChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMarkerSetChanged",{get:function(){return this._onMarkerSetChanged.event},enumerable:!0,configurable:!0}),e.prototype.setMarkers=function(e){var t=this._nextIdx>=0?this._markers[this._nextIdx]:void 0;this._markers=e||[],this._markers.sort(U.compareMarker),this._nextIdx=t?Math.max(-1,Object(E.b)(this._markers,t,U.compareMarker)):-1,this._onMarkerSetChanged.fire(this)},e.prototype.withoutWatchingEditorPosition=function(e){this._ignoreSelectionChange=!0;try{e()}finally{this._ignoreSelectionChange=!1}},e.prototype._initIdx=function(e){for(var t=!1,o=this._editor.getPosition(),n=0;n0?this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length:n=!0),o!==this._nextIdx){var i=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(i)}return n},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.findMarkerAtPosition=function(e){for(var t=0,o=this._markers;tthis.selection.endLineNumber?this.targetSelection=new u.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},L=function(e,t){return function(o,n){t(o,n,e)}},I=function(e,t,o,n){return new(o||(o=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){e.done?i(e.value):new o((function(t){t(e.value)})).then(s,a)}l((n=n.apply(e,t||[])).next())}))},D=function(e,t){var o,n,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(r){return function(a){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(i=2&r[0]?n.return:r[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,r[1])).done)return i;switch(n=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return s.label++,{value:r[1],done:!1};case 5:s.label++,n=r[1],r=[0];continue;case 7:r=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var o=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var i=o.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(){Object(s.d)(this._disposables),this._disposables.length=0,this._onDidUpdate.dispose(),this.ranges=null,this.disposed=!0},e}()},function(e,t,o){"use strict";o(490);var n,i=o(0),r=o(17),s=o(6),a=o(30),l=o(1),u=o(28),c=o(93),h=o(22),d=o(12),g=o(36),p=o(2),f=o(52),m=o(91),_=o(122),y=o(68),v=o(140),b=o(70),E=o(54),C=o(116),S=o(4),T=o(27),w=o(19),k=o(7),O=o(145),R=o(26),N=(o(491),o(87)),L=o(9),I=o(81),D=o(29),A=o(74),P=o(78),M=o(3),x=(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),B=function(){function e(e,t,o,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=o,this.modifiedLineEnd=n}return e.prototype.getType=function(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0},e}(),F=function(e){this.entries=e},H=function(e){function t(t){var o=e.call(this)||this;return o._width=0,o._diffEditor=t,o._isVisible=!1,o.shadow=Object(u.b)(document.createElement("div")),o.shadow.setClassName("diff-review-shadow"),o.actionBarContainer=Object(u.b)(document.createElement("div")),o.actionBarContainer.setClassName("diff-review-actions"),o._actionBar=o._register(new A.a(o.actionBarContainer.domNode)),o._actionBar.push(new P.a("diffreview.close",i.a("label.close","Close"),"close-diff-review",!0,(function(){return o.hide(),null})),{label:!1,icon:!0}),o.domNode=Object(u.b)(document.createElement("div")),o.domNode.setClassName("diff-review monaco-editor-background"),o._content=Object(u.b)(document.createElement("div")),o._content.setClassName("diff-review-content"),o.scrollbar=o._register(new I.a(o._content.domNode,{})),o.domNode.domNode.appendChild(o.scrollbar.getDomNode()),o._register(t.onDidUpdateDiff((function(){o._isVisible&&(o._diffs=o._compute(),o._render())}))),o._register(t.getModifiedEditor().onDidChangeCursorPosition((function(){o._isVisible&&o._render()}))),o._register(t.getOriginalEditor().onDidFocusEditorWidget((function(){o._isVisible&&o.hide()}))),o._register(t.getModifiedEditor().onDidFocusEditorWidget((function(){o._isVisible&&o.hide()}))),o._register(l.j(o.domNode.domNode,"click",(function(e){e.preventDefault();var t=l.p(e.target,"diff-review-row");t&&o._goToRow(t)}))),o._register(l.j(o.domNode.domNode,"keydown",(function(e){(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),o._goToRow(o._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),o._goToRow(o._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),o.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),o.accept())}))),o._diffs=[],o._currentDiff=null,o}return x(t,e),t.prototype.prev=function(){var e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){for(var t=-1,o=0,n=this._diffs.length;o0){var y=e[r-1];m=0===y.originalEndLineNumber?y.originalStartLineNumber+1:y.originalEndLineNumber+1,_=0===y.modifiedEndLineNumber?y.modifiedStartLineNumber+1:y.modifiedEndLineNumber+1}var v=p-3+1,b=f-3+1;if(vS)O+=k=S-O,R+=k;if(R>T)O+=k=T-R,R+=k;d[g++]=new B(E,O,C,R),n[i++]=new F(d)}var N=n[0].entries,L=[],I=0;for(r=1,s=n.length;rp)&&(p=E),0!==C&&(0===f||Cm)&&(m=S)}var T=document.createElement("div");T.className="diff-review-row";var w=document.createElement("div");w.className="diff-review-cell diff-review-summary";var k=p-g+1,O=m-f+1;w.appendChild(document.createTextNode(c+1+"/"+this._diffs.length+": @@ -"+g+","+k+" +"+f+","+O+" @@")),T.setAttribute("data-line",String(f));var R=function(e){return 0===e?i.a("no_lines","no lines"):1===e?i.a("one_line","1 line"):i.a("more_lines","{0} lines",e)},N=R(k),L=R(O);T.setAttribute("aria-label",i.a({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}",c+1,this._diffs.length,g,N,f,L)),T.appendChild(w),T.setAttribute("role","listitem"),d.appendChild(T);var I=f;for(_=0,y=h.length;_=0;a--)(i=e[a])&&(s=(r<3?i(s):r>3?i(t,o,s):i(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s},X=function(e,t){return function(o,n){t(o,n,e)}},q=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 o=0,n=t._zones.length;o0?i/o: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._lineChanges&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){if(0===this._lineChanges.length||e=s?o=i+1:(o=i,n=i)}return this._lineChanges[o]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.originalStartLineNumber}));if(!t)return e;var o=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),i=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-o;return s<=i?n+Math.min(s,r):n+r-i+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,(function(e){return e.modifiedStartLineNumber}));if(!t)return e;var o=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),i=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=r?o+Math.min(s,i):o+i-r+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=Y([X(2,m.a),X(3,d.e),X(4,h.a),X(5,g.a),X(6,w.c),X(7,G.a)],t)}(s.a),Z=function(e){function t(t){var o=e.call(this)||this;return o._dataSource=t,o}return K(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(k.i)||k.f).transparent(2),o=(e.getColor(k.k)||k.g).transparent(2),n=!t.equals(this._insertColor)||!o.equals(this._removeColor);return this._insertColor=t,this._removeColor=o,n},t.prototype.getEditorsDiffDecorations=function(e,t,o,n,i,r,s){i=i.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber})),n=n.sort((function(e,t){return e.afterLineNumber-t.afterLineNumber}));var a=this._getViewZones(e,n,i,r,s,o),l=this._getOriginalEditorDecorations(e,t,o,r,s),u=this._getModifiedEditorDecorations(e,t,o,r,s);return{original:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.original},modified:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.modified}}},t}(s.a),Q=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++,this._index0){var o=e[e.length-1];if(o.afterLineNumber===t.afterLineNumber&&null===o.domNode)return void(o.heightInLines+=t.heightInLines)}e.push(t)},u=new Q(this.modifiedForeignVZ),c=new Q(this.originalForeignVZ),h=0,d=this.lineChanges.length;h<=d;h++){var g=h0?-1:0),i=g.modifiedStartLineNumber+(g.modifiedEndLineNumber>0?-1:0),o=g.originalEndLineNumber>0?g.originalEndLineNumber-g.originalStartLineNumber+1:0,t=g.modifiedEndLineNumber>0?g.modifiedEndLineNumber-g.modifiedStartLineNumber+1:0,r=Math.max(g.originalStartLineNumber,g.originalEndLineNumber),s=Math.max(g.modifiedStartLineNumber,g.modifiedEndLineNumber)):(r=n+=1e7+o,s=i+=1e7+t);for(var p,f=[],m=[];u.current&&u.current.afterLineNumber<=s;){var _=void 0;_=u.current.afterLineNumber<=i?n-i+u.current.afterLineNumber:r,f.push({afterLineNumber:_,heightInLines:u.current.heightInLines,domNode:null}),u.advance()}for(;c.current&&c.current.afterLineNumber<=r;){_=void 0;_=c.current.afterLineNumber<=n?i-n+c.current.afterLineNumber:s,m.push({afterLineNumber:_,heightInLines:c.current.heightInLines,domNode:null}),c.advance()}if(null!==g&&ae(g))(p=this._produceOriginalFromDiff(g,o,t))&&f.push(p);if(null!==g&&le(g))(p=this._produceModifiedFromDiff(g,o,t))&&m.push(p);var y=0,v=0;for(f=f.sort(a),m=m.sort(a);y=E.heightInLines?(b.heightInLines-=E.heightInLines,v++):(E.heightInLines-=b.heightInLines,y++)}for(;y2*t.MINIMUM_EDITOR_WIDTH?(no-t.MINIMUM_EDITOR_WIDTH&&(n=o-t.MINIMUM_EDITOR_WIDTH)):n=i,this._sashPosition!==n&&(this._sashPosition=n,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth()-J.ENTIRE_DIFF_OVERVIEW_WIDTH,o=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=o/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,o,n,i){return new ie(e,t,o).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,o,n,i){for(var r=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=n.getModel(),l=0,u=e.length;lt?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:o-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,o){return t>o?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-o,domNode:null}:null},t}(ee),re=function(e){function t(t,o){var n=e.call(this,t)||this;return n.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,n._register(t.getOriginalEditor().onDidLayoutChange((function(e){n.decorationsLeft!==e.decorationsLeft&&(n.decorationsLeft=e.decorationsLeft,t.relayoutEditors())}))),n}return K(t,e),t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,o,n,i,r){return new se(e,t,o,n,i,r).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,o,n,i){for(var r=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=0,l=e.length;a'])}d+=this.modifiedEditorConfiguration.viewInfo.scrollBeyondLastColumn;var m=document.createElement("div");m.className="view-lines line-delete",m.innerHTML=a.build(),b.a.applyFontInfoSlow(m,this.modifiedEditorConfiguration.fontInfo);var _=document.createElement("div");return _.className="inline-deleted-margin-view-zone",_.innerHTML=l.join(""),b.a.applyFontInfoSlow(_,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:d*h,domNode:m,marginDomNode:_}},t.prototype._renderOriginalLine=function(e,t,o,n,i,r,s){var a=t.getLineTokens(i),l=a.getLineContent(),u=_.a.filter(r,i,1,l.length+1);s.appendASCIIString('
    ');var c=E.d.isBasicASCII(l,t.mightContainNonBasicASCII()),h=E.d.containsRTL(l,c,t.mightContainRTL()),d=Object(y.c)(new y.b(o.fontInfo.isMonospace&&!o.viewInfo.disableMonospaceOptimizations,l,!1,c,h,0,a,u,n,o.fontInfo.spaceWidth,o.viewInfo.stopRenderingLineAfter,o.viewInfo.renderWhitespace,o.viewInfo.renderControlCharacters,o.viewInfo.fontLigatures),s);s.appendASCIIString("
    ");var g=d.characterMapping.getAbsoluteOffsets();return g.length>0?g[g.length-1]:0},t}(ee);function ae(e){return e.modifiedEndLineNumber>0}function le(e){return e.originalEndLineNumber>0}Object(w.e)((function(e,t){var o=e.getColor(k.i);o&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+o+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+o+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+o+"; }"));var n=e.getColor(k.k);n&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(k.j);i&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+i+"; }");var r=e.getColor(k.l);r&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+r+"; }");var s=e.getColor(k.lb);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }");var a=e.getColor(k.h);a&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid "+a+"; }")}))},function(e,t){var o={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},function(e,t,o){e.exports=o(328)},function(e,t,o){"use strict";(function(t,n){var i=o(180);e.exports=v;var r,s=o(265);v.ReadableState=y;o(212).EventEmitter;var a=function(e,t){return e.listeners(t).length},l=o(268),u=o(181).Buffer,c=t.Uint8Array||function(){};var h=o(167);h.inherits=o(147);var d=o(329),g=void 0;g=d&&d.debuglog?d.debuglog("stream"):function(){};var p,f=o(330),m=o(269);h.inherits(v,l);var _=["error","close","destroy","pause","resume"];function y(e,t){e=e||{};var n=t instanceof(r=r||o(136));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=o(270).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function v(e){if(r=r||o(136),!(this instanceof v))return new v(e);this._readableState=new y(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function b(e,t,o,n,i){var r,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var o=t.decoder.end();o&&o.length&&(t.buffer.push(o),t.length+=t.objectMode?1:o.length)}t.ended=!0,T(e)}(e,s)):(i||(r=function(e,t){var o;n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk"));var n;return o}(s,t)),r?e.emit("error",r):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!o?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):k(e,s)):E(e,s,t,!1))):n||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(w,e):w(e))}function w(e){g("emit readable"),e.emit("readable"),L(e)}function k(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(O,e,t))}function O(e,t){for(var o=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(o=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):o=function(e,t,o){var n;er.length?r.length:e;if(s===r.length?i+=r:i+=r.slice(0,e),0===(e-=s)){s===r.length?(++n,o.next?t.head=o.next:t.head=t.tail=null):(t.head=o,o.data=r.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var o=u.allocUnsafe(e),n=t.head,i=1;n.data.copy(o),e-=n.data.length;for(;n=n.next;){var r=n.data,s=e>r.length?r.length:e;if(r.copy(o,o.length-e,0,s),0===(e-=s)){s===r.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=r.slice(s));break}++i}return t.length-=i,o}(e,t);return n}(e,t.buffer,t.decoder),o);var o}function D(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(A,t,e))}function A(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var o=0,n=e.length;o=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):T(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,i=t.needReadable;return g("need readable",i),(0===t.length||t.length-e0?I(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),o!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var o=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,g("pipe count=%d opts=%j",r.pipesCount,t);var l=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?c:v;function u(t,n){g("onunpipe"),t===o&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,g("cleanup"),e.removeListener("close",_),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",m),e.removeListener("unpipe",u),o.removeListener("end",c),o.removeListener("end",v),o.removeListener("data",f),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||h())}function c(){g("onend"),e.end()}r.endEmitted?i.nextTick(l):o.once("end",l),e.on("unpipe",u);var h=function(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,L(e))}}(o);e.on("drain",h);var d=!1;var p=!1;function f(t){g("ondata"),p=!1,!1!==e.write(t)||p||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==P(r.pipes,e))&&!d&&(g("false write response, pause",o._readableState.awaitDrain),o._readableState.awaitDrain++,p=!0),o.pause())}function m(t){g("onerror",t),v(),e.removeListener("error",m),0===a(e,"error")&&e.emit("error",t)}function _(){e.removeListener("finish",y),v()}function y(){g("onfinish"),e.removeListener("close",_),v()}function v(){g("unpipe"),o.unpipe(e)}return o.on("data",f),function(e,t,o){if("function"==typeof e.prependListener)return e.prependListener(t,o);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(o):e._events[t]=[o,e._events[t]]:e.on(t,o)}(e,"error",m),e.once("close",_),e.once("finish",y),e.emit("pipe",o),r.flowing||(g("pipe resume"),o.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,o={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,o),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,o=function(e,t,o){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==o?o:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var o=e.toString("utf16le",t);if(o){var n=o.charCodeAt(o.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],o.slice(0,-1)}return o}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var o=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,o)}return t}function c(e,t){var o=(e.length-t)%3;return 0===o?e.toString("base64",t):(this.lastNeed=3-o,this.lastTotal=3,1===o?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-o))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function g(e){return e&&e.length?this.write(e):""}t.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,o;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";o=this.lastNeed,this.lastNeed=0}else o=0;return o=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=o;var n=e.length-(o-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,o){"use strict";e.exports=s;var n=o(136),i=o(167);function r(e,t){var o=this._transformState;o.transforming=!1;var n=o.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));o.writechunk=null,o.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>2,a=(3&t)<<4|o>>4,l=g>1?(15&o)<<2|i>>6:64,u=g>2?63&i:64,c.push(r.charAt(s)+r.charAt(a)+r.charAt(l)+r.charAt(u));return c.join("")},t.decode=function(e){var t,o,n,s,a,l,u=0,c=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var h,d=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===r.charAt(64)&&d--,e.charAt(e.length-2)===r.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|d):new Array(0|d);u>4,o=(15&s)<<4|(a=r.indexOf(e.charAt(u++)))>>2,n=(3&a)<<6|(l=r.indexOf(e.charAt(u++))),h[c++]=t,64!==a&&(h[c++]=o),64!==l&&(h[c++]=n);return h}},function(e,t,o){"use strict";(function(t){var n=o(64),i=o(342),r=o(100),s=o(272),a=o(126),l=o(168),u=null;if(a.nodestream)try{u=o(343)}catch(e){}function c(e,o){return new l.Promise((function(i,r){var a=[],l=e._internalType,u=e._outputType,c=e._mimeType;e.on("data",(function(e,t){a.push(e),o&&o(t)})).on("error",(function(e){a=[],r(e)})).on("end",(function(){try{var e=function(e,t,o){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),o);case"base64":return s.encode(t);default:return n.transformTo(e,t)}}(u,function(e,o){var n,i=0,r=null,s=0;for(n=0;n=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=r},function(e,t,o){"use strict";var n=o(64),i=o(100);function r(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(r,i),r.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},e.exports=r},function(e,t,o){"use strict";var n=o(100),i=o(216);function r(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o(64).inherits(r,n),r.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=r},function(e,t,o){"use strict";var n=o(100);t.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},t.DEFLATE=o(346)},function(e,t,o){"use strict";e.exports=function(e,t,o,n){for(var i=65535&e|0,r=e>>>16&65535|0,s=0;0!==o;){o-=s=o>2e3?2e3:o;do{r=r+(i=i+t[n++]|0)|0}while(--s);i%=65521,r%=65521}return i|r<<16|0}},function(e,t,o){"use strict";var n=function(){for(var e,t=[],o=0;o<256;o++){e=o;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[o]=e}return t}();e.exports=function(e,t,o,i){var r=n,s=i+o;e^=-1;for(var a=i;a>>8^r[255&(e^t[a])];return-1^e}},function(e,t,o){"use strict";var n=o(127),i=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&r||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var o="",s=0;s>>6,t[s++]=128|63&o):o<65536?(t[s++]=224|o>>>12,t[s++]=128|o>>>6&63,t[s++]=128|63&o):(t[s++]=240|o>>>18,t[s++]=128|o>>>12&63,t[s++]=128|o>>>6&63,t[s++]=128|63&o);return t},t.buf2binstring=function(e){return l(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),o=0,i=t.length;o4)u[n++]=65533,o+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&o1?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return l(u,n)},t.utf8border=function(e,t){var o;for((t=t||e.length)>e.length&&(t=e.length),o=t-1;o>=0&&128==(192&e[o]);)o--;return o<0?t:0===o?t:o+s[e[o]]>t?o:t}},function(e,t,o){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,o){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,o){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},function(e,t,o){"use strict";var n=o(64),i=o(126),r=o(286),s=o(360),a=o(361),l=o(288);e.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new l(n.transformTo("uint8array",e)):new r(n.transformTo("array",e)):new s(e)}},function(e,t,o){"use strict";var n=o(287);function i(e){n.call(this,e);for(var t=0;t=0;--r)if(this.data[r]===t&&this.data[r+1]===o&&this.data[r+2]===n&&this.data[r+3]===i)return r-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),r=this.readData(4);return t===r[0]&&o===r[1]&&n===r[2]&&i===r[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(64);function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)o=(o<<8)+this.byteAt(t);return this.index+=e,o},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=i},function(e,t,o){"use strict";var n=o(286);function i(e){n.call(this,e)}o(64).inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(149);e.exports=function(e){n.copy(e,this)}},function(e,t,o){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var o,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(o=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},r={key:n,value:e[n]};return o(i,r)}}),r=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var o,s;if(Array.isArray(t)){for(s="[",o=0;o",y=g?">":"<",v=void 0;if(m){var b=e.util.getData(f.$data,s,e.dataPathArr),E="exclusive"+r,C="exclType"+r,S="exclIsNumber"+r,T="' + "+(O="op"+r)+" + '";i+=" var schemaExcl"+r+" = "+b+"; ",i+=" var "+E+"; var "+C+" = typeof "+(b="schemaExcl"+r)+"; if ("+C+" != 'boolean' && "+C+" != 'undefined' && "+C+" != 'number') { ";var w;v=p;(w=w||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(v||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var k=i;i=w.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+C+" == 'number' ? ( ("+E+" = "+n+" === undefined || "+b+" "+_+"= "+n+") ? "+h+" "+y+"= "+b+" : "+h+" "+y+" "+n+" ) : ( ("+E+" = "+b+" === true) ? "+h+" "+y+"= "+n+" : "+h+" "+y+" "+n+" ) || "+h+" !== "+h+") { var op"+r+" = "+E+" ? '"+_+"' : '"+_+"='; ",void 0===a&&(v=p,u=e.errSchemaPath+"/"+p,n=b,d=m)}else{T=_;if((S="number"==typeof f)&&d){var O="'"+T+"'";i+=" if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+f+" "+_+"= "+n+" ? "+h+" "+y+"= "+f+" : "+h+" "+y+" "+n+" ) || "+h+" !== "+h+") { "}else{S&&void 0===a?(E=!0,v=p,u=e.errSchemaPath+"/"+p,n=f,y+="="):(S&&(n=Math[g?"min":"max"](f,a)),f===(!S||n)?(E=!0,v=p,u=e.errSchemaPath+"/"+p,y+="="):(E=!1,T+="="));O="'"+T+"'";i+=" if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+h+" "+y+" "+n+" || "+h+" !== "+h+") { "}}v=v||t,(w=w||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(v||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+O+", limit: "+n+", exclusive: "+E+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+T+" ",i+=d?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";k=i;return i=w.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a,i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+h+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var g=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(g||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=d?"' + "+n+" + '":""+a,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var f=i;return i=p.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a;var g="maxLength"==t?">":"<";i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+h+".length ":i+=" ucs2length("+h+") ",i+=" "+g+" "+n+") { ";var p=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=d?"' + "+n+" + '":""+a,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var m=i;return i=f.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a,i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+h+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var g=t,p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(g||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=d?"' + "+n+" + '":""+a,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var f=i;return i=p.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(e,t,o){var n=o(397),i=o(398),r=o(411),s=RegExp("['’]","g");e.exports=function(e){return function(t){return n(r(i(t).replace(s,"")),e,"")}}},function(e,t){var o=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return o.test(e)}},function(e,t,o){},function(e,t,o){"use strict";o.r(t);o(496),o(223),o(231),o(232),o(257),o(230),o(234),o(237),o(236);var n=o(137);for(var i in n)"default"!==i&&function(e){o.d(t,e,(function(){return n[e]}))}(i)},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r,s=o(169);!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(r=t.ErrorCodes||(t.ErrorCodes={}));var a=function(e){function t(o,n,i){var a=e.call(this,n)||this;return a.code=s.number(o)?o:r.UnknownErrorCode,a.data=i,Object.setPrototypeOf(a,t.prototype),a}return i(t,e),t.prototype.toJson=function(){return{code:this.code,message:this.message,data:this.data}},t}(Error);t.ResponseError=a;var l=function(){function e(e,t){this._method=e,this._numberOfParams=t}return Object.defineProperty(e.prototype,"method",{get:function(){return this._method},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfParams",{get:function(){return this._numberOfParams},enumerable:!0,configurable:!0}),e}();t.AbstractMessageType=l;var u=function(e){function t(t){var o=e.call(this,t,0)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType0=u;var c=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType=c;var h=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType1=h;var d=function(e){function t(t){var o=e.call(this,t,2)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType2=d;var g=function(e){function t(t){var o=e.call(this,t,3)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType3=g;var p=function(e){function t(t){var o=e.call(this,t,4)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType4=p;var f=function(e){function t(t){var o=e.call(this,t,5)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType5=f;var m=function(e){function t(t){var o=e.call(this,t,6)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType6=m;var _=function(e){function t(t){var o=e.call(this,t,7)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType7=_;var y=function(e){function t(t){var o=e.call(this,t,8)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType8=y;var v=function(e){function t(t){var o=e.call(this,t,9)||this;return o._=void 0,o}return i(t,e),t}(l);t.RequestType9=v;var b=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType=b;var E=function(e){function t(t){var o=e.call(this,t,0)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType0=E;var C=function(e){function t(t){var o=e.call(this,t,1)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType1=C;var S=function(e){function t(t){var o=e.call(this,t,2)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType2=S;var T=function(e){function t(t){var o=e.call(this,t,3)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType3=T;var w=function(e){function t(t){var o=e.call(this,t,4)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType4=w;var k=function(e){function t(t){var o=e.call(this,t,5)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType5=k;var O=function(e){function t(t){var o=e.call(this,t,6)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType6=O;var R=function(e){function t(t){var o=e.call(this,t,7)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType7=R;var N=function(e){function t(t){var o=e.call(this,t,8)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType8=N;var L=function(e){function t(t){var o=e.call(this,t,9)||this;return o._=void 0,o}return i(t,e),t}(l);t.NotificationType9=L,t.isRequestMessage=function(e){var t=e;return t&&s.string(t.method)&&(s.string(t.id)||s.number(t.id))},t.isNotificationMessage=function(e){var t=e;return t&&s.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){var t=e;return t&&(void 0!==t.result||!!t.error)&&(s.string(t.id)||s.number(t.id)||null===t.id)}},function(e,t,o){(function(e){function o(e,t){for(var o=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),o++):o&&(e.splice(n,1),o--)}if(t)for(;o--;o)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var o=[],n=0;n=-1&&!i;r--){var s=r>=0?arguments[r]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return(i?"/":"")+(t=o(n(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var r=t.isAbsolute(e),s="/"===i(e,-1);return(e=o(n(e.split("/"),(function(e){return!!e})),!r).join("/"))||r||(e="."),e&&s&&(e+="/"),(r?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,o){function n(e){for(var t=0;t=0&&""===e[o];o--);return t>o?[]:e.slice(t,o-t+1)}e=t.resolve(e).substr(1),o=t.resolve(o).substr(1);for(var i=n(e.split("/")),r=n(o.split("/")),s=Math.min(i.length,r.length),a=s,l=0;l=1;--r)if(47===(t=e.charCodeAt(r))){if(!i){n=r;break}}else i=!1;return-1===n?o?"/":".":o&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var o=function(e){"string"!=typeof e&&(e+="");var t,o=0,n=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){o=t+1;break}}else-1===n&&(i=!1,n=t+1);return-1===n?"":e.slice(o,n)}(e);return t&&o.substr(-1*t.length)===t&&(o=o.substr(0,o.length-t.length)),o},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,o=0,n=-1,i=!0,r=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===n&&(i=!1,n=s+1),46===a?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!i){o=s+1;break}}return-1===t||-1===n||0===r||1===r&&t===n-1&&t===o+1?"":e.slice(t,n)};var i="b"==="ab".substr(-1)?function(e,t,o){return e.substr(t,o)}:function(e,t,o){return t<0&&(t=e.length+t),e.substr(t,o)}}).call(this,o(108))},function(e,t){t.endianness=function(){return"LE"},t.hostname=function(){return"undefined"!=typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"}},function(e,t,o){"use strict";function n(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}Object.defineProperty(t,"__esModule",{value:!0}),n(o(305)),n(o(306)),n(o(502))},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var o=e.call(this)||this;return o.socket=t,o.state="initial",o.events=[],o.socket.onMessage((function(e){return o.readMessage(e)})),o.socket.onError((function(e){return o.fireError(e)})),o.socket.onClose((function(e,t){if(1e3!==e){var n={name:""+e,message:"Error during socket reconnect: code = "+e+", reason = "+t};o.fireError(n)}o.fireClose()})),o}return i(t,e),t.prototype.listen=function(e){if("initial"===this.state)for(this.state="listening",this.callback=e;0!==this.events.length;){var t=this.events.pop();t.message?this.readMessage(t.message):t.error?this.fireError(t.error):this.fireClose()}},t.prototype.readMessage=function(e){if("initial"===this.state)this.events.splice(0,0,{message:e});else if("listening"===this.state){var t=JSON.parse(e);this.callback(t)}},t.prototype.fireError=function(t){"initial"===this.state?this.events.splice(0,0,{error:t}):"listening"===this.state&&e.prototype.fireError.call(this,t)},t.prototype.fireClose=function(){"initial"===this.state?this.events.splice(0,0,{}):"listening"===this.state&&e.prototype.fireClose.call(this),this.state="closed"},t}(o(183).AbstractMessageReader);t.WebSocketMessageReader=r},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var o=e.call(this)||this;return o.socket=t,o.errorCount=0,o}return i(t,e),t.prototype.write=function(e){try{var t=JSON.stringify(e);this.socket.send(t)}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}},t}(o(184).AbstractMessageWriter);t.WebSocketMessageWriter=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.error=function(e){console.error(e)},e.prototype.warn=function(e){console.warn(e)},e.prototype.info=function(e){console.info(e)},e.prototype.log=function(e){console.log(e)},e.prototype.debug=function(e){console.debug(e)},e}();t.ConsoleLogger=n},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t}(o(109).CompletionItem);t.default=r},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t}(o(109).CodeLens);t.default=r},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,o){return e.call(this,t,o)||this}return i(t,e),t}(o(109).DocumentLink);t.default=r},function(e,t,o){"use strict";var n=this&&this.__read||function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var s,a=o(530),l=o(120),u=o(531),c=o(185);function h(e,t){return a(e,{extended:!0,globstar:!0}).test(t)}!function(e){e.fromDocument=function(e){return{uri:monaco.Uri.parse(e.uri),languageId:e.languageId}},e.fromModel=function(e){return{uri:e.uri,languageId:e.getModeId()}}}(s=t.MonacoModelIdentifier||(t.MonacoModelIdentifier={})),t.testGlob=h;var d=function(){function e(e,t){this.p2m=e,this.m2p=t}return e.prototype.match=function(e,t){return this.matchModel(e,s.fromDocument(t))},e.prototype.createDiagnosticCollection=function(e){return new u.MonacoDiagnosticCollection(e||"default",this.p2m)},e.prototype.registerCompletionItemProvider=function(e,t){for(var o,n,s=[],a=2;a=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}},i=this&&this.__read||function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},r=this&&this.__spread||function(){for(var e=[],t=0;t0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},r=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var a,l,u,c=o(245),h=o(120);!function(e){e.is=function(e){return!!e&&"data"in e}}(a=t.ProtocolDocumentLink||(t.ProtocolDocumentLink={})),function(e){e.is=function(e){return!!e&&"data"in e}}(l=t.ProtocolCodeLens||(t.ProtocolCodeLens={})),function(e){e.is=function(e){return!!e&&"data"in e}}(u=t.ProtocolCompletionItem||(t.ProtocolCompletionItem={}));var d=function(){function e(){}return e.prototype.asPosition=function(e,t){return{line:null==e?void 0:e-1,character:null==t?void 0:t-1}},e.prototype.asRange=function(e){if(void 0!==e)return null===e?null:{start:this.asPosition(e.startLineNumber,e.startColumn),end:this.asPosition(e.endLineNumber,e.endColumn)}},e.prototype.asTextDocumentIdentifier=function(e){return{uri:e.uri.toString()}},e.prototype.asTextDocumentPositionParams=function(e,t){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column)}},e.prototype.asCompletionParams=function(e,t,o){return Object.assign(this.asTextDocumentPositionParams(e,t),{context:this.asCompletionContext(o)})},e.prototype.asCompletionContext=function(e){return{triggerKind:this.asTriggerKind(e.triggerKind),triggerCharacter:e.triggerCharacter}},e.prototype.asTriggerKind=function(e){switch(e){case monaco.languages.SuggestTriggerKind.TriggerCharacter:return h.CompletionTriggerKind.TriggerCharacter;case monaco.languages.SuggestTriggerKind.TriggerForIncompleteCompletions:return h.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return h.CompletionTriggerKind.Invoked}},e.prototype.asCompletionItem=function(e){var t={label:e.label},o=u.is(e)?e:void 0;return e.detail&&(t.detail=e.detail),e.documentation&&(o&&o.documentationFormat?t.documentation=this.asDocumentation(o.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),this.fillPrimaryInsertText(t,e),c.number(e.kind)&&(t.kind=this.asCompletionItemKind(e.kind,o&&o.originalItemKind)),e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=this.asTextEdits(e.additionalTextEdits)),e.command&&(t.command=this.asCommand(e.command)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=this.asCommand(e.command)),o&&(void 0!==o.data&&(t.data=o.data),!0!==o.deprecated&&!1!==o.deprecated||(t.deprecated=o.deprecated)),t},e.prototype.asCompletionItemKind=function(e,t){return void 0!==t?t:e+1},e.prototype.asDocumentation=function(e,t){switch(e){case h.MarkupKind.PlainText:return{kind:e,value:t};case h.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}},e.prototype.fillPrimaryInsertText=function(e,t){var o,n,i=h.InsertTextFormat.PlainText;t.textEdit?(o=t.textEdit.text,n=this.asRange(t.textEdit.range)):"string"==typeof t.insertText?o=t.insertText:t.insertText&&(i=h.InsertTextFormat.Snippet,o=t.insertText.value),t.range&&(n=this.asRange(t.range)),e.insertTextFormat=i,t.fromEdit&&o&&n?e.textEdit={newText:o,range:n}:e.insertText=o},e.prototype.asTextEdit=function(e){return{range:this.asRange(e.range),newText:e.text}},e.prototype.asTextEdits=function(e){var t=this;if(e)return e.map((function(e){return t.asTextEdit(e)}))},e.prototype.asReferenceParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),context:{includeDeclaration:o.includeDeclaration}}},e.prototype.asDocumentSymbolParams=function(e){return{textDocument:this.asTextDocumentIdentifier(e)}},e.prototype.asCodeLensParams=function(e){return{textDocument:this.asTextDocumentIdentifier(e)}},e.prototype.asDiagnosticSeverity=function(e){switch(e){case monaco.MarkerSeverity.Error:return h.DiagnosticSeverity.Error;case monaco.MarkerSeverity.Warning:return h.DiagnosticSeverity.Warning;case monaco.MarkerSeverity.Info:return h.DiagnosticSeverity.Information;case monaco.MarkerSeverity.Hint:return h.DiagnosticSeverity.Hint}},e.prototype.asDiagnostic=function(e){var t=this.asRange(new monaco.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)),o=this.asDiagnosticSeverity(e.severity);return h.Diagnostic.create(t,e.message,o,e.code,e.source)},e.prototype.asDiagnostics=function(e){var t=this;return null==e?e:e.map((function(e){return t.asDiagnostic(e)}))},e.prototype.asCodeActionContext=function(e){if(null==e)return e;var t=this.asDiagnostics(e.markers);return h.CodeActionContext.create(t,c.string(e.only)?[e.only]:void 0)},e.prototype.asCodeActionParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),range:this.asRange(t),context:this.asCodeActionContext(o)}},e.prototype.asCommand=function(e){if(e){var t=e.arguments||[];return h.Command.create.apply(h.Command,r([e.title,e.id],t))}},e.prototype.asCodeLens=function(e){var t=h.CodeLens.create(this.asRange(e.range));return e.command&&(t.command=this.asCommand(e.command)),l.is(e)&&e.data&&(t.data=e.data),t},e.prototype.asFormattingOptions=function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},e.prototype.asDocumentFormattingParams=function(e,t){return{textDocument:this.asTextDocumentIdentifier(e),options:this.asFormattingOptions(t)}},e.prototype.asDocumentRangeFormattingParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),range:this.asRange(t),options:this.asFormattingOptions(o)}},e.prototype.asDocumentOnTypeFormattingParams=function(e,t,o,n){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),ch:o,options:this.asFormattingOptions(n)}},e.prototype.asRenameParams=function(e,t,o){return{textDocument:this.asTextDocumentIdentifier(e),position:this.asPosition(t.lineNumber,t.column),newName:o}},e.prototype.asDocumentLinkParams=function(e){return{textDocument:this.asTextDocumentIdentifier(e)}},e.prototype.asDocumentLink=function(e){var t=h.DocumentLink.create(this.asRange(e.range));return e.url&&(t.target=e.url),a.is(e)&&e.data&&(t.data=e.data),t},e}();t.MonacoToProtocolConverter=d;var g=function(){function e(){}return e.prototype.asResourceEdits=function(e,t,o){return{resource:e,edits:this.asTextEdits(t),modelVersionId:o}},e.prototype.asWorkspaceEdit=function(e){var t,o,n,i;if(e){var r=[];if(e.documentChanges)try{for(var a=s(e.documentChanges),l=a.next();!l.done;l=a.next()){var u=l.value,c=monaco.Uri.parse(u.textDocument.uri),h="number"==typeof u.textDocument.version?u.textDocument.version:void 0;r.push(this.asResourceEdits(c,u.edits,h))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}else if(e.changes)try{for(var d=s(Object.keys(e.changes)),g=d.next();!g.done;g=d.next()){var p=g.value;c=monaco.Uri.parse(p);r.push(this.asResourceEdits(c,e.changes[p]))}}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return{edits:r}}},e.prototype.asTextEdit=function(e){if(e)return{range:this.asRange(e.range),text:e.newText}},e.prototype.asTextEdits=function(e){var t=this;if(e)return e.map((function(e){return t.asTextEdit(e)}))},e.prototype.asCodeLens=function(e){if(e){var t={range:this.asRange(e.range)};return e.command&&(t.command=this.asCommand(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}},e.prototype.asCodeLenses=function(e){var t=this;if(e)return e.map((function(e){return t.asCodeLens(e)}))},e.prototype.asCodeActions=function(e){var t=this;return e.map((function(e){return t.asCodeAction(e)}))},e.prototype.asCodeAction=function(e){return h.CodeAction.is(e)?{title:e.title,command:this.asCommand(e.command),edit:this.asWorkspaceEdit(e.edit),diagnostics:this.asDiagnostics(e.diagnostics),kind:e.kind}:{command:{id:e.command,title:e.title,arguments:e.arguments},title:e.title}},e.prototype.asCommand=function(e){if(e)return{id:e.command,title:e.title,arguments:e.arguments}},e.prototype.asDocumentSymbol=function(e){var t=this,o=e.children&&e.children.map((function(e){return t.asDocumentSymbol(e)}));return{name:e.name,detail:e.detail||"",kind:this.asSymbolKind(e.kind),range:this.asRange(e.range),selectionRange:this.asRange(e.selectionRange),children:o}},e.prototype.asDocumentSymbols=function(e){var t=this;return h.DocumentSymbol.is(e[0])?e.map((function(e){return t.asDocumentSymbol(e)})):this.asSymbolInformations(e)},e.prototype.asSymbolInformations=function(e,t){var o=this;if(e)return e.map((function(e){return o.asSymbolInformation(e,t)}))},e.prototype.asSymbolInformation=function(e,t){var o=this.asLocation(t?n({},e.location,{uri:t.toString()}):e.location);return{name:e.name,detail:"",containerName:e.containerName,kind:this.asSymbolKind(e.kind),range:o.range,selectionRange:o.range}},e.prototype.asSymbolKind=function(e){return e<=h.SymbolKind.TypeParameter?e-1:monaco.languages.SymbolKind.Property},e.prototype.asDocumentHighlights=function(e){var t=this;if(e)return e.map((function(e){return t.asDocumentHighlight(e)}))},e.prototype.asDocumentHighlight=function(e){return{range:this.asRange(e.range),kind:c.number(e.kind)?this.asDocumentHighlightKind(e.kind):void 0}},e.prototype.asDocumentHighlightKind=function(e){switch(e){case h.DocumentHighlightKind.Text:return monaco.languages.DocumentHighlightKind.Text;case h.DocumentHighlightKind.Read:return monaco.languages.DocumentHighlightKind.Read;case h.DocumentHighlightKind.Write:return monaco.languages.DocumentHighlightKind.Write}return monaco.languages.DocumentHighlightKind.Text},e.prototype.asReferences=function(e){var t=this;if(e)return e.map((function(e){return t.asLocation(e)}))},e.prototype.asDefinitionResult=function(e){var t=this;if(e)return c.array(e)?e.map((function(e){return t.asLocation(e)})):this.asLocation(e)},e.prototype.asLocation=function(e){if(e)return{uri:monaco.Uri.parse(e.uri),range:this.asRange(e.range)}},e.prototype.asSignatureHelp=function(e){if(e){var t={};return c.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,c.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures?t.signatures=this.asSignatureInformations(e.signatures):t.signatures=[],t}},e.prototype.asSignatureInformations=function(e){var t=this;return e.map((function(e){return t.asSignatureInformation(e)}))},e.prototype.asSignatureInformation=function(e){var t={label:e.label};return e.documentation&&(t.documentation=this.asDocumentation(e.documentation)),e.parameters?t.parameters=this.asParameterInformations(e.parameters):t.parameters=[],t},e.prototype.asParameterInformations=function(e){var t=this;return e.map((function(e){return t.asParameterInformation(e)}))},e.prototype.asParameterInformation=function(e){var t={label:e.label};return e.documentation&&(t.documentation=this.asDocumentation(e.documentation)),t},e.prototype.asHover=function(e){if(e)return{contents:this.asHoverContent(e.contents),range:this.asRange(e.range)}},e.prototype.asHoverContent=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.asMarkdownString(e)})):[this.asMarkdownString(e)]},e.prototype.asDocumentation=function(e){return c.string(e)?e:e.kind===h.MarkupKind.PlainText?e.value:this.asMarkdownString(e)},e.prototype.asMarkdownString=function(e){return h.MarkupContent.is(e)?{value:e.value}:c.string(e)?{value:e}:{value:"```"+e.language+"\n"+e.value+"\n```"}},e.prototype.asSeverity=function(e){return 1===e?monaco.MarkerSeverity.Error:2===e?monaco.MarkerSeverity.Warning:3===e?monaco.MarkerSeverity.Info:monaco.MarkerSeverity.Hint},e.prototype.asDiagnostics=function(e){var t=this;if(e)return e.map((function(e){return t.asDiagnostic(e)}))},e.prototype.asDiagnostic=function(e){return{code:"number"==typeof e.code?e.code.toString():e.code,severity:this.asSeverity(e.severity),message:e.message,source:e.source,startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,relatedInformation:this.asRelatedInformations(e.relatedInformation)}},e.prototype.asRelatedInformations=function(e){var t=this;if(e)return e.map((function(e){return t.asRelatedInformation(e)}))},e.prototype.asRelatedInformation=function(e){return{resource:monaco.Uri.parse(e.location.uri),startLineNumber:e.location.range.start.line+1,startColumn:e.location.range.start.character+1,endLineNumber:e.location.range.end.line+1,endColumn:e.location.range.end.character+1,message:e.message}},e.prototype.asCompletionResult=function(e){var t=this;return e?Array.isArray(e)?{isIncomplete:!1,items:e.map((function(e){return t.asCompletionItem(e)}))}:{isIncomplete:e.isIncomplete,items:e.items.map(this.asCompletionItem.bind(this))}:{isIncomplete:!1,items:[]}},e.prototype.asCompletionItem=function(e){var t={label:e.label};e.detail&&(t.detail=e.detail),e.documentation&&(t.documentation=this.asDocumentation(e.documentation),t.documentationFormat=c.string(e.documentation)?void 0:e.documentation.kind),e.filterText&&(t.filterText=e.filterText);var o=this.asCompletionInsertText(e);if(o&&(t.insertText=o.text,t.range=o.range,t.fromEdit=o.fromEdit),c.number(e.kind)){var n=i(this.asCompletionItemKind(e.kind),2),r=n[0],s=n[1];t.kind=r,s&&(t.originalItemKind=s)}return e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=this.asTextEdits(e.additionalTextEdits)),c.stringArray(e.commitCharacters)&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=this.asCommand(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(t.deprecated=e.deprecated),void 0!==e.data&&(t.data=e.data),t},e.prototype.asCompletionItemKind=function(e){return h.CompletionItemKind.Text<=e&&e<=h.CompletionItemKind.TypeParameter?[e-1,void 0]:[h.CompletionItemKind.Text,e]},e.prototype.asCompletionInsertText=function(e){if(e.textEdit){var t=this.asRange(e.textEdit.range),o=e.textEdit.newText;return{text:e.insertTextFormat===h.InsertTextFormat.Snippet?{value:o}:o,range:t,fromEdit:!0}}if(e.insertText){o=e.insertText;return{text:e.insertTextFormat===h.InsertTextFormat.Snippet?{value:o}:o,fromEdit:!1}}},e.prototype.asDocumentLinks=function(e){var t=this;return e.map((function(e){return t.asDocumentLink(e)}))},e.prototype.asDocumentLink=function(e){return{range:this.asRange(e.range),url:e.target,data:e.data}},e.prototype.asRange=function(e){if(void 0!==e){if(null===e)return null;var t=this.asPosition(e.start),o=this.asPosition(e.end);return t instanceof monaco.Position&&o instanceof monaco.Position?new monaco.Range(t.lineNumber,t.column,o.lineNumber,o.column):{startLineNumber:t&&void 0!==t.lineNumber?t.lineNumber:void 0,startColumn:t&&void 0!==t.column?t.column:void 0,endLineNumber:o&&void 0!==o.lineNumber?o.lineNumber:void 0,endColumn:o&&void 0!==o.column?o.column:void 0}}},e.prototype.asPosition=function(e){if(void 0!==e){if(null===e)return null;var t=e.line,o=e.character,n=void 0===t?void 0:t+1,i=void 0===o?void 0:o+1;return void 0!==n&&void 0!==i?new monaco.Position(n,i):{lineNumber:n,column:i}}},e.prototype.asColorInformations=function(e){var t=this;return e.map((function(e){return t.asColorInformation(e)}))},e.prototype.asColorInformation=function(e){return{range:this.asRange(e.range),color:e.color}},e.prototype.asColorPresentations=function(e){var t=this;return e.map((function(e){return t.asColorPresentation(e)}))},e.prototype.asColorPresentation=function(e){return{label:e.label,textEdit:this.asTextEdit(e.textEdit),additionalTextEdits:this.asTextEdits(e.additionalTextEdits)}},e.prototype.asFoldingRanges=function(e){var t=this;return e?e.map((function(e){return t.asFoldingRange(e)})):e},e.prototype.asFoldingRange=function(e){return{start:e.startLine+1,end:e.endLine+1,kind:this.asFoldingRangeKind(e.kind)}},e.prototype.asFoldingRangeKind=function(e){if(e)switch(e){case h.FoldingRangeKind.Comment:return monaco.languages.FoldingRangeKind.Comment;case h.FoldingRangeKind.Imports:return monaco.languages.FoldingRangeKind.Imports;case h.FoldingRangeKind.Region:return monaco.languages.FoldingRangeKind.Region}},e}();t.ProtocolToMonacoConverter=g},function(e,t,o){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}n.prototype=o(325),n.prototype.loadAsync=o(358),n.support=o(126),n.defaults=o(274),n.version="3.2.0",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=o(168),e.exports=n},function(e,t,o){(function(o){var n,i,r;i=[],void 0===(r="function"==typeof(n=function(){"use strict";function t(e,t,o){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){s(n.response,t,o)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(o){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof o&&o.global===o?o:void 0,s=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,o,s){var a=r.URL||r.webkitURL,l=document.createElement("a");o=o||e.name||"download",l.download=o,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):n(l.href)?t(e,o,s):i(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,r){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,r),o);else if(n(e))t(e,o,r);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,o,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,o,n);var s="application/octet-stream"===e.type,a=/constructor/i.test(r.HTMLElement)||r.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&a)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var c=r.URL||r.webkitURL,h=c.createObjectURL(e);i?i.location=h:location.href=h,i=null,setTimeout((function(){c.revokeObjectURL(h)}),4e4)}});r.saveAs=s.saveAs=s,e.exports=s})?n.apply(t,i):n)||(e.exports=r)}).call(this,o(80))},function(e,t,o){"use strict";var n=o(363),i=o(218),r=o(367),s=o(289),a=o(290),l=o(368),u=o(369),c=o(390),h=o(149);e.exports=_,_.prototype.validate=function(e,t){var o;if("string"==typeof e){if(!(o=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var n=this._addSchema(e);o=n.validate||this._compile(n)}var i=o(t);!0!==o.$async&&(this.errors=o.errors);return i},_.prototype.compile=function(e,t){var o=this._addSchema(e,void 0,t);return o.validate||this._compile(o)},_.prototype.addSchema=function(e,t,o,n){if(Array.isArray(e)){for(var r=0;r\n \n \n \n EQ\n \n \n AND\n \n \n \n TRUE\n \n \n \n \n 1\n \n \n \n \n \n \n 10\n \n \n \n \n WHILE\n \n \n i\n \n \n 1\n \n \n \n \n 10\n \n \n \n \n 1\n \n \n \n \n j\n \n \n BREAK\n \n \n \n \n 0\n \n \n ADD\n \n \n 1\n \n \n \n \n 1\n \n \n \n \n ROOT\n \n \n 9\n \n \n \n \n SIN\n \n \n 45\n \n \n \n \n PI\n \n \n \n EVEN\n \n \n 0\n \n \n \n \n ROUND\n \n \n 3.1\n \n \n \n \n \n SUM\n \n \n \n \n 64\n \n \n \n \n 10\n \n \n \n \n \n \n 50\n \n \n \n \n 1\n \n \n \n \n 100\n \n \n \n \n \n \n 1\n \n \n \n \n 100\n \n \n \n \n \n \n \n \n \n \n \n \n \n item\n \n \n \n \n \n \n \n \n \n abc\n \n \n \n \n \n \n \n \n \n \n \n FIRST\n \n \n text\n \n \n \n \n abc\n \n \n \n \n \n FROM_START\n \n \n text\n \n \n \n \n \n FROM_START\n FROM_START\n \n \n text\n \n \n \n \n UPPERCASE\n \n \n abc\n \n \n \n \n BOTH\n \n \n abc\n \n \n \n \n \n \n abc\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 5\n \n \n \n \n \n \n FIRST\n \n \n list\n \n \n \n \n \n GET\n FROM_START\n \n \n list\n \n \n \n \n \n SET\n FROM_START\n \n \n list\n \n \n \n \n \n FROM_START\n FROM_START\n \n \n list\n \n \n \n \n \n SPLIT\n \n \n ,\n \n \n \n \n NUMERIC\n 1\n \n \n \n \n \n \n \n \n 1\n \n \n 20\n \n \n \n \n FORWARDS\n \n \n 1\n \n \n \n \n 20\n \n \n \n \n CLOCKWISE\n \n \n 1\n \n \n \n \n 20\n \n \n \n \n \n 1\n \n \n 50\n \n \n \n \n \n \n \n 1\n OUTPUT\n \n \n 1\n \n \n TRUE\n \n \n \n \n 1\n \n \n 1\n \n \n \n \n \n \n \n \n marker\n \n \n \n \n \n \n marker\n \n \n \n \n \n \n marker\n \n \n \n \n \n \n \n \n\n \n i\n \n \n \n \n \n'},function(e,t,o){"use strict";function n(e){for(var t=arguments,o=1;o0?t.children[0].text:""),i=t.props.inline,r=t.props.language,s=Prism.languages[r],a="language-"+r;return i?e("code",n({},t.data,{class:[t.data.class,a],domProps:n({},t.data.domProps,{innerHTML:Prism.highlight(o,s)})})):e("pre",n({},t.data,{class:[t.data.class,a]}),[e("code",{class:a,domProps:{innerHTML:Prism.highlight(o,s)}})])}};e.exports=i},function(e,t,o){"use strict";(function(e){o.d(t,"a",(function(){return f}));var n=o(135),i="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){!function(t){var o=function(e,t,n){if(!l(t)||c(t)||h(t)||d(t)||a(t))return t;var i,r=0,s=0;if(u(t))for(i=[],s=t.length;r=0||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o};function c(){for(var e=arguments.length,t=Array(e),o=0;o2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=(t.children||[]).map(h.bind(null,e)),s=Object.keys(t.attributes||{}).reduce((function(e,o){var n=t.attributes[o];switch(o){case"class":e.class=n.split(/\s+/).reduce((function(e,t){return e[t]=!0,e}),{});break;case"style":e.style=n.split(";").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var o=t.indexOf(":"),n=r.camelize(t.slice(0,o)),i=t.slice(o+1).trim();return e[n]=i,e}),{});break;default:e.attrs[o]=n}return e}),{class:{},style:{},attrs:{}}),a=n.class,d=void 0===a?{}:a,g=n.style,p=void 0===g?{}:g,f=n.attrs,m=void 0===f?{}:f,_=u(n,["class","style","attrs"]);return"string"==typeof t?t:e(t.tag,l({class:c(s.class,d),style:l({},s.style,p),attrs:l({},s.attrs,m)},_,{props:o}),i)}var d=!1;try{d=!0}catch(e){}function g(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?a({},e,t):{}}function p(e){return null===e?null:"object"===(void 0===e?"undefined":s(e))&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}var f={name:"FontAwesomeIcon",functional:!0,props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:String,default:null,validator:function(e){return["horizontal","vertical","both"].indexOf(e)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(e){return["right","left"].indexOf(e)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(e){return[90,180,270].indexOf(parseInt(e,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(e){return["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(e)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null}},render:function(e,t){var o=t.props,i=o.icon,r=o.mask,s=o.symbol,u=o.title,c=p(i),f=g("classes",function(e){var t,o=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-flip-horizontal":"horizontal"===e.flip||"both"===e.flip,"fa-flip-vertical":"vertical"===e.flip||"both"===e.flip},a(t,"fa-"+e.size,null!==e.size),a(t,"fa-rotate-"+e.rotation,null!==e.rotation),a(t,"fa-pull-"+e.pull,null!==e.pull),a(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(o).map((function(e){return o[e]?e:null})).filter((function(e){return e}))}(o)),m=g("transform","string"==typeof o.transform?n.d.transform(o.transform):o.transform),_=g("mask",p(r)),y=Object(n.b)(c,l({},f,m,_,{symbol:s,title:u}));if(!y)return function(){var e;!d&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find one or more icon(s)",c,_);var v=y.abstract;return h.bind(null,e)(v[0],{},t.data)}};Boolean,String,Number,String,Object}).call(this,o(80))},function(e,t,o){},function(e,t,o){(function(t){var o="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},n=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=o.Prism={manual:o.Prism&&o.Prism.manual,disableWorkerMessageHandler:o.Prism&&o.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof i?new i(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(E instanceof l)){if(f&&v!=t.length-1){if(d.lastIndex=b,!(O=d.exec(e)))break;for(var C=O.index+(p?O[1].length:0),S=O.index+O[0].length,T=v,w=b,k=t.length;T=(w+=t[T].length)&&(++v,b=w);if(t[v]instanceof l)continue;R=T-v,E=e.slice(b,w),O.index-=b}else{d.lastIndex=0;var O=d.exec(E),R=1}if(O){p&&(m=O[1]?O[1].length:0);S=(C=O.index+m)+(O=O[0].slice(m)).length;var N=E.slice(0,C),L=E.slice(S),I=[v,R];N&&(++v,b+=N.length,I.push(N));var D=new l(u,g?n.tokenize(O,g):O,_,O,f);if(I.push(D),L&&I.push(L),Array.prototype.splice.apply(t,I),1!=R&&n.matchGrammar(e,t,o,v,b,!0,u),s)break}else if(s)break}}}}},tokenize:function(e,t,o){var i=[e],r=t.rest;if(r){for(var s in r)t[s]=r[s];delete t.rest}return n.matchGrammar(e,i,t,0,0,!1),i},hooks:{all:{},add:function(e,t){var o=n.hooks.all;o[e]=o[e]||[],o[e].push(t)},run:function(e,t){var o=n.hooks.all[e];if(o&&o.length)for(var i,r=0;i=o[r++];)i(t)}}},i=n.Token=function(e,t,o,n,i){this.type=e,this.content=t,this.alias=o,this.length=0|(n||"").length,this.greedy=!!i};if(i.stringify=function(e,t,o){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map((function(o){return i.stringify(o,t,e)})).join("");var r={type:e.type,content:i.stringify(e.content,t,o),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:o};if(e.alias){var s="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,s)}n.hooks.run("wrap",r);var a=Object.keys(r.attributes).map((function(e){return e+'="'+(r.attributes[e]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+(a?" "+a:"")+">"+r.content+""},!o.document)return o.addEventListener?(n.disableWorkerMessageHandler||o.addEventListener("message",(function(e){var t=JSON.parse(e.data),i=t.language,r=t.code,s=t.immediateClose;o.postMessage(n.highlight(r,n.languages[i],i)),s&&o.close()}),!1),o.Prism):o.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),o.Prism}();e.exports&&(e.exports=n),void 0!==t&&(t.Prism=n),n.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/}}).call(this,o(80))},function(e,t,o){"use strict";var n=o(146),i=o(64),r=o(100),s=o(273),a=o(274),l=o(215),u=o(344),c=o(345),h=o(182),d=o(357),g=function(e,t,o){var n,s=i.getTypeOf(t),c=i.extend(o||{},a);c.date=c.date||new Date,null!==c.compression&&(c.compression=c.compression.toUpperCase()),"string"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(e=f(e)),c.createFolders&&(n=p(e))&&m.call(this,n,!0);var g="string"===s&&!1===c.binary&&!1===c.base64;o&&void 0!==o.binary||(c.binary=!g),(t instanceof l&&0===t.uncompressedSize||c.dir||!t||0===t.length)&&(c.base64=!1,c.binary=!0,t="",c.compression="STORE",s="string");var _=null;_=t instanceof l||t instanceof r?t:h.isNode&&h.isStream(t)?new d(e,t):i.prepareContent(e,t,c.binary,c.optimizedBinaryString,c.base64);var y=new u(e,_,c);this.files[e]=y},p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},f=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},m=function(e,t){return t=void 0!==t?t:a.createFolders,e=f(e),this.files[e]||g.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function _(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,o,n;for(t in this.files)this.files.hasOwnProperty(t)&&(n=this.files[t],(o=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(o,n))},filter:function(e){var t=[];return this.forEach((function(o,n){e(o,n)&&t.push(n)})),t},file:function(e,t,o){if(1===arguments.length){if(_(e)){var n=e;return this.filter((function(e,t){return!t.dir&&n.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null}return(e=this.root+e,g.call(this,e,t,o),this)},folder:function(e){if(!e)return this;if(_(e))return this.filter((function(t,o){return o.dir&&e.test(t)}));var t=this.root+e,o=m.call(this,t),n=this.clone();return n.root=o.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var o=this.filter((function(t,o){return o.name.slice(0,e.length)===e})),n=0;n0?s-4:s;for(o=0;o>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===a&&(t=i[e.charCodeAt(o)]<<2|i[e.charCodeAt(o+1)]>>4,l[c++]=255&t);1===a&&(t=i[e.charCodeAt(o)]<<10|i[e.charCodeAt(o+1)]<<4|i[e.charCodeAt(o+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,o=e.length,i=o%3,r=[],s=0,a=o-i;sa?a:s+16383));1===i?(t=e[o-1],r.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[o-2]<<8)+e[o-1],r.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return r.join("")};for(var n=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");return-1===o&&(o=t),[o,o===t?0:4-o%4]}function c(e,t,o){for(var i,r,s=[],a=t;a>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,o,n,i){var r,s,a=8*i-n-1,l=(1<>1,c=-7,h=o?i-1:0,d=o?-1:1,g=e[t+h];for(h+=d,r=g&(1<<-c)-1,g>>=-c,c+=a;c>0;r=256*r+e[t+h],h+=d,c-=8);for(s=r&(1<<-c)-1,r>>=-c,c+=n;c>0;s=256*s+e[t+h],h+=d,c-=8);if(0===r)r=1-u;else{if(r===l)return s?NaN:1/0*(g?-1:1);s+=Math.pow(2,n),r-=u}return(g?-1:1)*s*Math.pow(2,r-n)},t.write=function(e,t,o,n,i,r){var s,a,l,u=8*r-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:r-1,p=n?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*l-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[o+g]=255&a,g+=p,a/=256,i-=8);for(s=s<0;e[o+g]=255&s,g+=p,s/=256,u-=8);e[o+g-p]|=128*f}},function(e,t,o){e.exports=i;var n=o(212).EventEmitter;function i(){n.call(this)}o(147)(i,n),i.Readable=o(213),i.Writable=o(335),i.Duplex=o(336),i.Transform=o(337),i.PassThrough=o(338),i.Stream=i,i.prototype.pipe=function(e,t){var o=this;function i(t){e.writable&&!1===e.write(t)&&o.pause&&o.pause()}function r(){o.readable&&o.resume&&o.resume()}o.on("data",i),e.on("drain",r),e._isStdio||t&&!1===t.end||(o.on("end",a),o.on("close",l));var s=!1;function a(){s||(s=!0,e.end())}function l(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){o.removeListener("data",i),e.removeListener("drain",r),o.removeListener("end",a),o.removeListener("close",l),o.removeListener("error",u),e.removeListener("error",u),o.removeListener("end",c),o.removeListener("close",c),e.removeListener("close",c)}return o.on("error",u),e.on("error",u),o.on("end",c),o.on("close",c),e.on("close",c),e.emit("pipe",o),e}},function(e,t){},function(e,t,o){"use strict";var n=o(181).Buffer,i=o(331);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,o=""+t.data;t=t.next;)o+=e+t.data;return o},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,o,i,r=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,o=r,i=a,t.copy(o,i),a+=s.data.length,s=s.next;return r},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,o){(function(e,t){!function(e,o){"use strict";if(!e.setImmediate){var n,i,r,s,a,l=1,u={},c=!1,h=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,o=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=o,t}}()?e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){r.port2.postMessage(e)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,n=function(e){var t=h.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&p(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),n=function(t){e.postMessage(s+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),o=0;o0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var o=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(o!==u)throw new Error(s[o]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var p;if(p="string"==typeof t.dictionary?r.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(o=n.deflateSetDictionary(this.strm,p))!==u)throw new Error(s[o]);this._dict_set=!0}}function p(e,t){var o=new g(t);if(o.push(e,!0),o.err)throw o.msg||s[o.err];return o.result}g.prototype.push=function(e,t){var o,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=r.string2buf(e):"[object ArrayBuffer]"===l.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(c),a.next_out=0,a.avail_out=c),1!==(o=n.deflate(a,s))&&o!==u)return this.onEnd(o),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(r.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==o);return 4===s?(o=n.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===u):2!==s||(this.onEnd(u),a.avail_out=0,!0)},g.prototype.onData=function(e){this.chunks.push(e)},g.prototype.onEnd=function(e){e===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=g,t.deflate=p,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,p(e,t)}},function(e,t,o){"use strict";var n,i=o(127),r=o(350),s=o(279),a=o(280),l=o(217),u=0,c=1,h=3,d=4,g=5,p=0,f=1,m=-2,_=-3,y=-5,v=-1,b=1,E=2,C=3,S=4,T=0,w=2,k=8,O=9,R=15,N=8,L=286,I=30,D=19,A=2*L+1,P=15,M=3,x=258,B=x+M+1,F=32,H=42,U=69,V=73,W=91,j=103,G=113,z=666,K=1,Y=2,X=3,q=4,$=3;function J(e,t){return e.msg=l[t],t}function Z(e){return(e<<1)-(e>4?9:0)}function Q(e){for(var t=e.length;--t>=0;)e[t]=0}function ee(e){var t=e.state,o=t.pending;o>e.avail_out&&(o=e.avail_out),0!==o&&(i.arraySet(e.output,t.pending_buf,t.pending_out,o,e.next_out),e.next_out+=o,t.pending_out+=o,e.total_out+=o,e.avail_out-=o,t.pending-=o,0===t.pending&&(t.pending_out=0))}function te(e,t){r._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ee(e.strm)}function oe(e,t){e.pending_buf[e.pending++]=t}function ne(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function ie(e,t){var o,n,i=e.max_chain_length,r=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-B?e.strstart-(e.w_size-B):0,u=e.window,c=e.w_mask,h=e.prev,d=e.strstart+x,g=u[r+s-1],p=u[r+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(o=t)+s]===p&&u[o+s-1]===g&&u[o]===u[r]&&u[++o]===u[r+1]){r+=2,o++;do{}while(u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&u[++r]===u[++o]&&rs){if(e.match_start=t,s=n,n>=a)break;g=u[r+s-1],p=u[r+s]}}}while((t=h[t&c])>l&&0!=--i);return s<=e.lookahead?s:e.lookahead}function re(e){var t,o,n,r,l,u,c,h,d,g,p=e.w_size;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-B)){i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=o=e.hash_size;do{n=e.head[--t],e.head[t]=n>=p?n-p:0}while(--o);t=o=p;do{n=e.prev[--t],e.prev[t]=n>=p?n-p:0}while(--o);r+=p}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,h=e.strstart+e.lookahead,d=r,g=void 0,(g=u.avail_in)>d&&(g=d),o=0===g?0:(u.avail_in-=g,i.arraySet(c,u.input,u.next_in,g,h),1===u.state.wrap?u.adler=s(u.adler,c,g,h):2===u.state.wrap&&(u.adler=a(u.adler,c,g,h)),u.next_in+=g,u.total_in+=g,g),e.lookahead+=o,e.lookahead+e.insert>=M)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=M&&(e.ins_h=(e.ins_h<=M)if(n=r._tr_tally(e,e.strstart-e.match_start,e.match_length-M),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=M){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=M&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=M-1)),e.prev_length>=M&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-M,n=r._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-M),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(a=2,n-=16),r<1||r>O||o!==k||n<8||n>15||t<0||t>9||s<0||s>S)return J(e,m);8===n&&(n=9);var l=new ue;return e.state=l,l.strm=e,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1<e.pending_buf_size-5&&(o=e.pending_buf_size-5);;){if(e.lookahead<=1){if(re(e),0===e.lookahead&&t===u)return K;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+o;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,te(e,!1),0===e.strm.avail_out))return K;if(e.strstart-e.block_start>=e.w_size-B&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?X:q):(e.strstart>e.block_start&&(te(e,!1),e.strm.avail_out),K)})),new le(4,4,8,4,se),new le(4,5,16,8,se),new le(4,6,32,32,se),new le(4,4,16,16,ae),new le(8,16,32,32,ae),new le(8,16,128,128,ae),new le(8,32,128,256,ae),new le(32,128,258,1024,ae),new le(32,258,258,4096,ae)],t.deflateInit=function(e,t){return de(e,t,k,R,N,T)},t.deflateInit2=de,t.deflateReset=he,t.deflateResetKeep=ce,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?m:(e.state.gzhead=t,p):m},t.deflate=function(e,t){var o,i,s,l;if(!e||!e.state||t>g||t<0)return e?J(e,m):m;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===z&&t!==d)return J(e,0===e.avail_out?y:m);if(i.strm=e,o=i.last_flush,i.last_flush=t,i.status===H)if(2===i.wrap)e.adler=0,oe(i,31),oe(i,139),oe(i,8),i.gzhead?(oe(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),oe(i,255&i.gzhead.time),oe(i,i.gzhead.time>>8&255),oe(i,i.gzhead.time>>16&255),oe(i,i.gzhead.time>>24&255),oe(i,9===i.level?2:i.strategy>=E||i.level<2?4:0),oe(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(oe(i,255&i.gzhead.extra.length),oe(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=U):(oe(i,0),oe(i,0),oe(i,0),oe(i,0),oe(i,0),oe(i,9===i.level?2:i.strategy>=E||i.level<2?4:0),oe(i,$),i.status=G);else{var _=k+(i.w_bits-8<<4)<<8;_|=(i.strategy>=E||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(_|=F),_+=31-_%31,i.status=G,ne(i,_),0!==i.strstart&&(ne(i,e.adler>>>16),ne(i,65535&e.adler)),e.adler=1}if(i.status===U)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending!==i.pending_buf_size));)oe(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=V)}else i.status=V;if(i.status===V)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.gzindex=0,i.status=W)}else i.status=W;if(i.status===W)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),ee(e),s=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.status=j)}else i.status=j;if(i.status===j&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&ee(e),i.pending+2<=i.pending_buf_size&&(oe(i,255&e.adler),oe(i,e.adler>>8&255),e.adler=0,i.status=G)):i.status=G),0!==i.pending){if(ee(e),0===e.avail_out)return i.last_flush=-1,p}else if(0===e.avail_in&&Z(t)<=Z(o)&&t!==d)return J(e,y);if(i.status===z&&0!==e.avail_in)return J(e,y);if(0!==e.avail_in||0!==i.lookahead||t!==u&&i.status!==z){var v=i.strategy===E?function(e,t){for(var o;;){if(0===e.lookahead&&(re(e),0===e.lookahead)){if(t===u)return K;break}if(e.match_length=0,o=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,o&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?X:q):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?K:Y}(i,t):i.strategy===C?function(e,t){for(var o,n,i,s,a=e.window;;){if(e.lookahead<=x){if(re(e),e.lookahead<=x&&t===u)return K;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=M&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+x;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=M?(o=r._tr_tally(e,1,e.match_length-M),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(o=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),o&&(te(e,!1),0===e.strm.avail_out))return K}return e.insert=0,t===d?(te(e,!0),0===e.strm.avail_out?X:q):e.last_lit&&(te(e,!1),0===e.strm.avail_out)?K:Y}(i,t):n[i.level].func(i,t);if(v!==X&&v!==q||(i.status=z),v===K||v===X)return 0===e.avail_out&&(i.last_flush=-1),p;if(v===Y&&(t===c?r._tr_align(i):t!==g&&(r._tr_stored_block(i,0,0,!1),t===h&&(Q(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),ee(e),0===e.avail_out))return i.last_flush=-1,p}return t!==d?p:i.wrap<=0?f:(2===i.wrap?(oe(i,255&e.adler),oe(i,e.adler>>8&255),oe(i,e.adler>>16&255),oe(i,e.adler>>24&255),oe(i,255&e.total_in),oe(i,e.total_in>>8&255),oe(i,e.total_in>>16&255),oe(i,e.total_in>>24&255)):(ne(i,e.adler>>>16),ne(i,65535&e.adler)),ee(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?p:f)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==H&&t!==U&&t!==V&&t!==W&&t!==j&&t!==G&&t!==z?J(e,m):(e.state=null,t===G?J(e,_):p):m},t.deflateSetDictionary=function(e,t){var o,n,r,a,l,u,c,h,d=t.length;if(!e||!e.state)return m;if(2===(a=(o=e.state).wrap)||1===a&&o.status!==H||o.lookahead)return m;for(1===a&&(e.adler=s(e.adler,t,d,0)),o.wrap=0,d>=o.w_size&&(0===a&&(Q(o.head),o.strstart=0,o.block_start=0,o.insert=0),h=new i.Buf8(o.w_size),i.arraySet(h,t,d-o.w_size,o.w_size,0),t=h,d=o.w_size),l=e.avail_in,u=e.next_in,c=e.input,e.avail_in=d,e.next_in=0,e.input=t,re(o);o.lookahead>=M;){n=o.strstart,r=o.lookahead-(M-1);do{o.ins_h=(o.ins_h<=0;)e[t]=0}var u=0,c=1,h=2,d=29,g=256,p=g+1+d,f=30,m=19,_=2*p+1,y=15,v=16,b=7,E=256,C=16,S=17,T=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],k=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],R=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N=new Array(2*(p+2));l(N);var L=new Array(2*f);l(L);var I=new Array(512);l(I);var D=new Array(256);l(D);var A=new Array(d);l(A);var P,M,x,B=new Array(f);function F(e,t,o,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=o,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function H(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function U(e){return e<256?I[e]:I[256+(e>>>7)]}function V(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function W(e,t,o){e.bi_valid>v-o?(e.bi_buf|=t<>v-e.bi_valid,e.bi_valid+=o-v):(e.bi_buf|=t<>>=1,o<<=1}while(--t>0);return o>>>1}function z(e,t,o){var n,i,r=new Array(y+1),s=0;for(n=1;n<=y;n++)r[n]=s=s+o[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=G(r[a]++,a))}}function K(e){var t;for(t=0;t8?V(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function X(e,t,o,n){var i=2*t,r=2*o;return e[i]>1;o>=1;o--)q(e,r,o);i=l;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],q(e,r,1),n=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=n,r[2*i]=r[2*o]+r[2*n],e.depth[i]=(e.depth[o]>=e.depth[n]?e.depth[o]:e.depth[n])+1,r[2*o+1]=r[2*n+1]=i,e.heap[1]=i++,q(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var o,n,i,r,s,a,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,g=t.stat_desc.extra_base,p=t.stat_desc.max_length,f=0;for(r=0;r<=y;r++)e.bl_count[r]=0;for(l[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<_;o++)(r=l[2*l[2*(n=e.heap[o])+1]+1]+1)>p&&(r=p,f++),l[2*n+1]=r,n>u||(e.bl_count[r]++,s=0,n>=g&&(s=d[n-g]),a=l[2*n],e.opt_len+=a*(r+s),h&&(e.static_len+=a*(c[2*n+1]+s)));if(0!==f){do{for(r=p-1;0===e.bl_count[r];)r--;e.bl_count[r]--,e.bl_count[r+1]+=2,e.bl_count[p]--,f-=2}while(f>0);for(r=p;0!==r;r--)for(n=e.bl_count[r];0!==n;)(i=e.heap[--o])>u||(l[2*i+1]!==r&&(e.opt_len+=(r-l[2*i+1])*l[2*i],l[2*i+1]=r),n--)}}(e,t),z(r,u,e.bl_count)}function Z(e,t,o){var n,i,r=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),t[2*(o+1)+1]=65535,n=0;n<=o;n++)i=s,s=t[2*(n+1)+1],++a>=7;n0?(e.strm.data_type===a&&(e.strm.data_type=function(e){var t,o=4093624447;for(t=0;t<=31;t++,o>>>=1)if(1&o&&0!==e.dyn_ltree[2*t])return r;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return s;for(t=32;t=3&&0===e.bl_tree[2*R[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),l=e.opt_len+3+7>>>3,(u=e.static_len+3+7>>>3)<=l&&(l=u)):l=u=o+5,o+4<=l&&-1!==t?te(e,t,o,n):e.strategy===i||u===l?(W(e,(c<<1)+(n?1:0),3),$(e,N,L)):(W(e,(h<<1)+(n?1:0),3),function(e,t,o,n){var i;for(W(e,t-257,5),W(e,o-1,5),W(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&o,e.last_lit++,0===t?e.dyn_ltree[2*o]++:(e.matches++,t--,e.dyn_ltree[2*(D[o]+g+1)]++,e.dyn_dtree[2*U(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){W(e,c<<1,3),j(e,E,N),function(e){16===e.bi_valid?(V(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,o){"use strict";var n=o(352),i=o(127),r=o(281),s=o(283),a=o(217),l=o(282),u=o(355),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var o=n.inflateInit2(this.strm,t.windowBits);if(o!==s.Z_OK)throw new Error(a[o]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=r.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(o=n.inflateSetDictionary(this.strm,t.dictionary))!==s.Z_OK))throw new Error(a[o])}function d(e,t){var o=new h(t);if(o.push(e,!0),o.err)throw o.msg||a[o.err];return o.result}h.prototype.push=function(e,t){var o,a,l,u,h,d=this.strm,g=this.options.chunkSize,p=this.options.dictionary,f=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?d.input=r.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(g),d.next_out=0,d.avail_out=g),(o=n.inflate(d,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(o=n.inflateSetDictionary(this.strm,p)),o===s.Z_BUF_ERROR&&!0===f&&(o=s.Z_OK,f=!1),o!==s.Z_STREAM_END&&o!==s.Z_OK)return this.onEnd(o),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&o!==s.Z_STREAM_END&&(0!==d.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(l=r.utf8border(d.output,d.next_out),u=d.next_out-l,h=r.buf2string(d.output,l),d.next_out=u,d.avail_out=g-u,u&&i.arraySet(d.output,d.output,l,u,0),this.onData(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(f=!0)}while((d.avail_in>0||0===d.avail_out)&&o!==s.Z_STREAM_END);return o===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(o=n.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),d.avail_out=0,!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=h,t.inflate=d,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.ungzip=d},function(e,t,o){"use strict";var n=o(127),i=o(279),r=o(280),s=o(353),a=o(354),l=0,u=1,c=2,h=4,d=5,g=6,p=0,f=1,m=2,_=-2,y=-3,v=-4,b=-5,E=8,C=1,S=2,T=3,w=4,k=5,O=6,R=7,N=8,L=9,I=10,D=11,A=12,P=13,M=14,x=15,B=16,F=17,H=18,U=19,V=20,W=21,j=22,G=23,z=24,K=25,Y=26,X=27,q=28,$=29,J=30,Z=31,Q=32,ee=852,te=592,oe=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ie(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function re(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=C,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(ee),t.distcode=t.distdyn=new n.Buf32(te),t.sane=1,t.back=-1,p):_}function se(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,re(e)):_}function ae(e,t){var o,n;return e&&e.state?(n=e.state,t<0?(o=0,t=-t):(o=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?_:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=o,n.wbits=t,se(e))):_}function le(e,t){var o,n;return e?(n=new ie,e.state=n,n.window=null,(o=ae(e,t))!==p&&(e.state=null),o):_}var ue,ce,he=!0;function de(e){if(he){var t;for(ue=new n.Buf32(512),ce=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(u,e.lens,0,288,ue,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(c,e.lens,0,32,ce,0,e.work,{bits:5}),he=!1}e.lencode=ue,e.lenbits=9,e.distcode=ce,e.distbits=5}function ge(e,t,o,i){var r,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,t,o-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((r=s.wsize-s.wnext)>i&&(r=i),n.arraySet(s.window,t,o-i,r,s.wnext),(i-=r)?(n.arraySet(s.window,t,o-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,o.check=r(o.check,Oe,2,0),ae=0,le=0,o.mode=S;break}if(o.flags=0,o.head&&(o.head.done=!1),!(1&o.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",o.mode=J;break}if((15&ae)!==E){e.msg="unknown compression method",o.mode=J;break}if(le-=4,Ce=8+(15&(ae>>>=4)),0===o.wbits)o.wbits=Ce;else if(Ce>o.wbits){e.msg="invalid window size",o.mode=J;break}o.dmax=1<>8&1),512&o.flags&&(Oe[0]=255&ae,Oe[1]=ae>>>8&255,o.check=r(o.check,Oe,2,0)),ae=0,le=0,o.mode=T;case T:for(;le<32;){if(0===re)break e;re--,ae+=ee[oe++]<>>8&255,Oe[2]=ae>>>16&255,Oe[3]=ae>>>24&255,o.check=r(o.check,Oe,4,0)),ae=0,le=0,o.mode=w;case w:for(;le<16;){if(0===re)break e;re--,ae+=ee[oe++]<>8),512&o.flags&&(Oe[0]=255&ae,Oe[1]=ae>>>8&255,o.check=r(o.check,Oe,2,0)),ae=0,le=0,o.mode=k;case k:if(1024&o.flags){for(;le<16;){if(0===re)break e;re--,ae+=ee[oe++]<>>8&255,o.check=r(o.check,Oe,2,0)),ae=0,le=0}else o.head&&(o.head.extra=null);o.mode=O;case O:if(1024&o.flags&&((he=o.length)>re&&(he=re),he&&(o.head&&(Ce=o.head.extra_len-o.length,o.head.extra||(o.head.extra=new Array(o.head.extra_len)),n.arraySet(o.head.extra,ee,oe,he,Ce)),512&o.flags&&(o.check=r(o.check,ee,he,oe)),re-=he,oe+=he,o.length-=he),o.length))break e;o.length=0,o.mode=R;case R:if(2048&o.flags){if(0===re)break e;he=0;do{Ce=ee[oe+he++],o.head&&Ce&&o.length<65536&&(o.head.name+=String.fromCharCode(Ce))}while(Ce&&he>9&1,o.head.done=!0),e.adler=o.check=0,o.mode=A;break;case I:for(;le<32;){if(0===re)break e;re--,ae+=ee[oe++]<>>=7&le,le-=7&le,o.mode=X;break}for(;le<3;){if(0===re)break e;re--,ae+=ee[oe++]<>>=1)){case 0:o.mode=M;break;case 1:if(de(o),o.mode=V,t===g){ae>>>=2,le-=2;break e}break;case 2:o.mode=F;break;case 3:e.msg="invalid block type",o.mode=J}ae>>>=2,le-=2;break;case M:for(ae>>>=7&le,le-=7≤le<32;){if(0===re)break e;re--,ae+=ee[oe++]<>>16^65535)){e.msg="invalid stored block lengths",o.mode=J;break}if(o.length=65535&ae,ae=0,le=0,o.mode=x,t===g)break e;case x:o.mode=B;case B:if(he=o.length){if(he>re&&(he=re),he>se&&(he=se),0===he)break e;n.arraySet(te,ee,oe,he,ie),re-=he,oe+=he,se-=he,ie+=he,o.length-=he;break}o.mode=A;break;case F:for(;le<14;){if(0===re)break e;re--,ae+=ee[oe++]<>>=5,le-=5,o.ndist=1+(31&ae),ae>>>=5,le-=5,o.ncode=4+(15&ae),ae>>>=4,le-=4,o.nlen>286||o.ndist>30){e.msg="too many length or distance symbols",o.mode=J;break}o.have=0,o.mode=H;case H:for(;o.have>>=3,le-=3}for(;o.have<19;)o.lens[Re[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,Te={bits:o.lenbits},Se=a(l,o.lens,0,19,o.lencode,0,o.work,Te),o.lenbits=Te.bits,Se){e.msg="invalid code lengths set",o.mode=J;break}o.have=0,o.mode=U;case U:for(;o.have>>16&255,ye=65535&ke,!((me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>>=me,le-=me,o.lens[o.have++]=ye;else{if(16===ye){for(we=me+2;le>>=me,le-=me,0===o.have){e.msg="invalid bit length repeat",o.mode=J;break}Ce=o.lens[o.have-1],he=3+(3&ae),ae>>>=2,le-=2}else if(17===ye){for(we=me+3;le>>=me)),ae>>>=3,le-=3}else{for(we=me+7;le>>=me)),ae>>>=7,le-=7}if(o.have+he>o.nlen+o.ndist){e.msg="invalid bit length repeat",o.mode=J;break}for(;he--;)o.lens[o.have++]=Ce}}if(o.mode===J)break;if(0===o.lens[256]){e.msg="invalid code -- missing end-of-block",o.mode=J;break}if(o.lenbits=9,Te={bits:o.lenbits},Se=a(u,o.lens,0,o.nlen,o.lencode,0,o.work,Te),o.lenbits=Te.bits,Se){e.msg="invalid literal/lengths set",o.mode=J;break}if(o.distbits=6,o.distcode=o.distdyn,Te={bits:o.distbits},Se=a(c,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,Te),o.distbits=Te.bits,Se){e.msg="invalid distances set",o.mode=J;break}if(o.mode=V,t===g)break e;case V:o.mode=W;case W:if(re>=6&&se>=258){e.next_out=ie,e.avail_out=se,e.next_in=oe,e.avail_in=re,o.hold=ae,o.bits=le,s(e,ce),ie=e.next_out,te=e.output,se=e.avail_out,oe=e.next_in,ee=e.input,re=e.avail_in,ae=o.hold,le=o.bits,o.mode===A&&(o.back=-1);break}for(o.back=0;_e=(ke=o.lencode[ae&(1<>>16&255,ye=65535&ke,!((me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>ve)])>>>16&255,ye=65535&ke,!(ve+(me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>>=ve,le-=ve,o.back+=ve}if(ae>>>=me,le-=me,o.back+=me,o.length=ye,0===_e){o.mode=Y;break}if(32&_e){o.back=-1,o.mode=A;break}if(64&_e){e.msg="invalid literal/length code",o.mode=J;break}o.extra=15&_e,o.mode=j;case j:if(o.extra){for(we=o.extra;le>>=o.extra,le-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=G;case G:for(;_e=(ke=o.distcode[ae&(1<>>16&255,ye=65535&ke,!((me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>ve)])>>>16&255,ye=65535&ke,!(ve+(me=ke>>>24)<=le);){if(0===re)break e;re--,ae+=ee[oe++]<>>=ve,le-=ve,o.back+=ve}if(ae>>>=me,le-=me,o.back+=me,64&_e){e.msg="invalid distance code",o.mode=J;break}o.offset=ye,o.extra=15&_e,o.mode=z;case z:if(o.extra){for(we=o.extra;le>>=o.extra,le-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){e.msg="invalid distance too far back",o.mode=J;break}o.mode=K;case K:if(0===se)break e;if(he=ce-se,o.offset>he){if((he=o.offset-he)>o.whave&&o.sane){e.msg="invalid distance too far back",o.mode=J;break}he>o.wnext?(he-=o.wnext,pe=o.wsize-he):pe=o.wnext-he,he>o.length&&(he=o.length),fe=o.window}else fe=te,pe=ie-o.offset,he=o.length;he>se&&(he=se),se-=he,o.length-=he;do{te[ie++]=fe[pe++]}while(--he);0===o.length&&(o.mode=W);break;case Y:if(0===se)break e;te[ie++]=o.length,se--,o.mode=W;break;case X:if(o.wrap){for(;le<32;){if(0===re)break e;re--,ae|=ee[oe++]<>>=b=v>>>24,p-=b,0===(b=v>>>16&255))k[r++]=65535&v;else{if(!(16&b)){if(0==(64&b)){v=f[(65535&v)+(g&(1<>>=b,p-=b),p<15&&(g+=w[n++]<>>=b=v>>>24,p-=b,!(16&(b=v>>>16&255))){if(0==(64&b)){v=m[(65535&v)+(g&(1<l){e.msg="invalid distance too far back",o.mode=30;break e}if(g>>>=b,p-=b,C>(b=r-s)){if((b=C-b)>c&&o.sane){e.msg="invalid distance too far back",o.mode=30;break e}if(S=0,T=d,0===h){if(S+=u-b,b2;)k[r++]=T[S++],k[r++]=T[S++],k[r++]=T[S++],E-=3;E&&(k[r++]=T[S++],E>1&&(k[r++]=T[S++]))}else{S=r-C;do{k[r++]=k[S++],k[r++]=k[S++],k[r++]=k[S++],E-=3}while(E>2);E&&(k[r++]=k[S++],E>1&&(k[r++]=k[S++]))}break}}break}}while(n>3,g&=(1<<(p-=E<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n=1&&0===M[k];k--);if(O>k&&(O=k),0===k)return u[c++]=20971520,u[c++]=20971520,d.bits=1,0;for(w=1;w0&&(0===e||1!==k))return-1;for(x[1]=0,S=1;S<15;S++)x[S+1]=x[S]+M[S];for(T=0;T852||2===e&&I>592)return 1;for(;;){v=S-N,h[T]y?(b=B[F+h[T]],E=A[P+h[T]]):(b=96,E=0),g=1<>N)+(p-=g)]=v<<24|b<<16|E|0}while(0!==p);for(g=1<>=1;if(0!==g?(D&=g-1,D+=g):D=0,T++,0==--M[S]){if(S===k)break;S=t[o+h[T]]}if(S>O&&(D&m)!==f){for(0===N&&(N=O),_+=w,L=1<<(R=S-N);R+N852||2===e&&I>592)return 1;u[f=D&m]=O<<24|R<<16|_-c|0}}return 0!==D&&(u[_+D]=S-N<<24|64<<16|0),d.bits=O,0}},function(e,t,o){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t,o){"use strict";var n=o(64),i=o(100),r=o(146),s=o(216),a=o(284),l=function(e,t){var o,n="";for(o=0;o>>=8;return n},u=function(e,t,o,i,u,c){var h,d,g=e.file,p=e.compression,f=c!==r.utf8encode,m=n.transformTo("string",c(g.name)),_=n.transformTo("string",r.utf8encode(g.name)),y=g.comment,v=n.transformTo("string",c(y)),b=n.transformTo("string",r.utf8encode(y)),E=_.length!==g.name.length,C=b.length!==y.length,S="",T="",w="",k=g.dir,O=g.date,R={crc32:0,compressedSize:0,uncompressedSize:0};t&&!o||(R.crc32=e.crc32,R.compressedSize=e.compressedSize,R.uncompressedSize=e.uncompressedSize);var N=0;t&&(N|=8),f||!E&&!C||(N|=2048);var L,I,D,A=0,P=0;k&&(A|=16),"UNIX"===u?(P=798,A|=(L=g.unixPermissions,I=k,D=L,L||(D=I?16893:33204),(65535&D)<<16)):(P=20,A|=63&(g.dosPermissions||0)),h=O.getUTCHours(),h<<=6,h|=O.getUTCMinutes(),h<<=5,h|=O.getUTCSeconds()/2,d=O.getUTCFullYear()-1980,d<<=4,d|=O.getUTCMonth()+1,d<<=5,d|=O.getUTCDate(),E&&(T=l(1,1)+l(s(m),4)+_,S+="up"+l(T.length,2)+T),C&&(w=l(1,1)+l(s(v),4)+b,S+="uc"+l(w.length,2)+w);var M="";return M+="\n\0",M+=l(N,2),M+=p.magic,M+=l(h,2),M+=l(d,2),M+=l(R.crc32,4),M+=l(R.compressedSize,4),M+=l(R.uncompressedSize,4),M+=l(m.length,2),M+=l(S.length,2),{fileRecord:a.LOCAL_FILE_HEADER+M+m+S,dirRecord:a.CENTRAL_FILE_HEADER+l(P,2)+M+l(v.length,2)+"\0\0\0\0"+l(A,4)+l(i,4)+m+S+v}},c=function(e){return a.DATA_DESCRIPTOR+l(e.crc32,4)+l(e.compressedSize,4)+l(e.uncompressedSize,4)};function h(e,t,o,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=o,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(h,i),h.prototype.push=function(e){var t=e.meta.percent||0,o=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:o?(t+100*(o-n-1))/o:100}}))},h.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var o=u(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:o.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,o=u(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(o.dirRecord),t)this.push({data:c(e),meta:{percent:100}});else for(this.push({data:o.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,r.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},function(e,t,o){"use strict";var n=o(287);function i(e){n.call(this,e)}o(64).inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(288);function i(e){n.call(this,e)}o(64).inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,o){"use strict";var n=o(285),i=o(64),r=o(215),s=o(216),a=o(146),l=o(278),u=o(126);function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,o;if(e.skip(22),this.fileNameLength=e.readInt(2),o=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(o),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(l.hasOwnProperty(t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new r(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,o,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:o},{index:n,compiling:!1})}function d(e,t,o){var n=g.call(this,e,t,o);n>=0&&this._compilations.splice(n,1)}function g(e,t,o){for(var n=0;n1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function m(e){throw new RangeError(g[e])}function _(e,t){var o=e.split("@"),n="";o.length>1&&(n=o[0]+"@",e=o[1]);var i=function(e,t){for(var o=[],n=e.length;n--;)o[n]=t(e[n]);return o}((e=e.replace(d,".")).split("."),t).join(".");return n+i}function y(e){for(var t=[],o=0,n=e.length;o=55296&&i<=56319&&o>1,e+=p(e/t);e>455;n+=36)e=p(e/35);return p(n+36*e/(e+38))},E=function(e){var t,o=[],n=e.length,i=0,r=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var l=0;l=128&&m("not-basic"),o.push(e.charCodeAt(l));for(var c=a>0?a+1:0;c=n&&m("invalid-input");var f=(t=e.charCodeAt(c++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(f>=36||f>p((u-i)/d))&&m("overflow"),i+=f*d;var _=g<=s?1:g>=s+26?26:g-s;if(f<_)break;var y=36-_;d>p(u/y)&&m("overflow"),d*=y}var v=o.length+1;s=b(i-h,v,0==h),p(i/v)>u-r&&m("overflow"),r+=p(i/v),i%=v,o.splice(i++,0,r)}return String.fromCodePoint.apply(String,o)},C=function(e){var t=[],o=(e=y(e)).length,n=128,i=0,r=72,s=!0,a=!1,l=void 0;try{for(var c,h=e[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var d=c.value;d<128&&t.push(f(d))}}catch(e){a=!0,l=e}finally{try{!s&&h.return&&h.return()}finally{if(a)throw l}}var g=t.length,_=g;for(g&&t.push("-");_=n&&Op((u-i)/R)&&m("overflow"),i+=(E-n)*R,n=E;var L=!0,N=!1,I=void 0;try{for(var D,A=e[Symbol.iterator]();!(L=(D=A.next()).done);L=!0){var P=D.value;if(Pu&&m("overflow"),P==n){for(var x=i,M=36;;M+=36){var B=M<=r?1:M>=r+26?26:M-r;if(x>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function k(e){for(var t="",o=0,n=e.length;o=194&&i<224){if(n-o>=6){var r=parseInt(e.substr(o+4,2),16);t+=String.fromCharCode((31&i)<<6|63&r)}else t+=e.substr(o,6);o+=6}else if(i>=224){if(n-o>=9){var s=parseInt(e.substr(o+4,2),16),a=parseInt(e.substr(o+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(o,9);o+=9}else t+=e.substr(o,3),o+=3}return t}function O(e,t){function o(e){var o=k(e);return o.match(t.UNRESERVED)?o:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,o).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,o).replace(t.NOT_USERINFO,w).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,o).toLowerCase().replace(t.NOT_HOST,w).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,o).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,w).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,o).replace(t.NOT_QUERY,w).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,o).replace(t.NOT_FRAGMENT,w).replace(t.PCT_ENCODED,i)),e}function R(e){return e.replace(/^0*(.*)/,"$1")||"0"}function L(e,t){var o=e.match(t.IPV4ADDRESS)||[],n=l(o,2)[1];return n?n.split(".").map(R).join("."):e}function N(e,t){var o=e.match(t.IPV6ADDRESS)||[],n=l(o,3),i=n[1],r=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=l(s,2),u=a[0],c=a[1],h=c?c.split(":").map(R):[],d=u.split(":").map(R),g=t.IPV4ADDRESS.test(d[d.length-1]),p=g?7:8,f=d.length-p,m=Array(p),_=0;_1){var b=m.slice(0,y.index),E=m.slice(y.index+y.length);v=b.join(":")+"::"+E.join(":")}else v=m.join(":");return r&&(v+="%"+r),v}return e}var I=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,D=void 0==="".match(/(){0}/)[1];function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(I);if(i){D?(o.scheme=i[1],o.userinfo=i[3],o.host=i[4],o.port=parseInt(i[5],10),o.path=i[6]||"",o.query=i[7],o.fragment=i[8],isNaN(o.port)&&(o.port=i[5])):(o.scheme=i[1]||void 0,o.userinfo=-1!==e.indexOf("@")?i[3]:void 0,o.host=-1!==e.indexOf("//")?i[4]:void 0,o.port=parseInt(i[5],10),o.path=i[6]||"",o.query=-1!==e.indexOf("?")?i[7]:void 0,o.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(o.port)&&(o.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),o.host&&(o.host=N(L(o.host,n),n)),void 0!==o.scheme||void 0!==o.userinfo||void 0!==o.host||void 0!==o.port||o.path||void 0!==o.query?void 0===o.scheme?o.reference="relative":void 0===o.fragment?o.reference="absolute":o.reference="uri":o.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==o.reference&&(o.error=o.error||"URI is not a "+t.reference+" reference.");var r=T[(t.scheme||o.scheme||"").toLowerCase()];if(t.unicodeSupport||r&&r.unicodeSupport)O(o,n);else{if(o.host&&(t.domainHost||r&&r.domainHost))try{o.host=S.toASCII(o.host.replace(n.PCT_ENCODED,k).toLowerCase())}catch(e){o.error=o.error||"Host's domain name can not be converted to ASCII via punycode: "+e}O(o,s)}r&&r.parse&&r.parse(o,t)}else o.error=o.error||"URI can not be parsed.";return o}var P=/^\.\.?\//,x=/^\/\.(\/|$)/,M=/^\/\.\.(\/|$)/,B=/^\/?(?:.|\n)*?(?=\/|$)/;function F(e){for(var t=[];e.length;)if(e.match(P))e=e.replace(P,"");else if(e.match(x))e=e.replace(x,"/");else if(e.match(M))e=e.replace(M,"/"),t.pop();else if("."===e||".."===e)e="";else{var o=e.match(B);if(!o)throw new Error("Unexpected dot segment condition");var n=o[0];e=e.slice(n.length),t.push(n)}return t.join("")}function H(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.iri?a:s,n=[],i=T[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(o.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?S.toUnicode(e.host):S.toASCII(e.host.replace(o.PCT_ENCODED,k).toLowerCase())}catch(o){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+o}O(e,o),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var r=function(e,t){var o=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(N(L(String(e.host),o),o).replace(o.IPV6ADDRESS,(function(e,t,o){return"["+t+(o?"%25"+o:"")+"]"}))),"number"==typeof e.port&&(n.push(":"),n.push(e.port.toString(10))),n.length?n.join(""):void 0}(e,t);if(void 0!==r&&("suffix"!==t.reference&&n.push("//"),n.push(r),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var l=e.path;t.absolutePath||i&&i.absolutePath||(l=F(l)),void 0===r&&(l=l.replace(/^\/\//,"/%2F")),n.push(l)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function U(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=A(H(e,o),o),t=A(H(t,o),o)),!(o=o||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=F(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=F(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=F(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=F(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function V(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,k)}var W={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},j={scheme:"https",domainHost:W.domainHost,parse:W.parse,serialize:W.serialize},G={},z="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",K="[0-9A-Fa-f]",Y=o(o("%[EFef][0-9A-Fa-f]%"+K+K+"%"+K+K)+"|"+o("%[89A-Fa-f][0-9A-Fa-f]%"+K+K)+"|"+o("%"+K+K)),X=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),q=new RegExp(z,"g"),$=new RegExp(Y,"g"),J=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),Z=new RegExp(t("[^]",z,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),Q=Z;function ee(e){var t=k(e);return t.match(q)?t:e}var te={scheme:"mailto",parse:function(e,t){var o=e,n=o.to=o.path?o.path.split(","):[];if(o.path=void 0,o.query){for(var i=!1,r={},s=o.query.split("&"),a=0,l=s.length;a=55296&&t<=56319&&i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,c=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,g=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function f(e){return e="full"==e?"full":"fast",n.copy(f[e])}function m(e){var t=e.match(i);if(!t)return!1;var o=+t[1],n=+t[2],s=+t[3];return n>=1&&n<=12&&s>=1&&s<=(2==n&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(o)?29:r[n])}function _(e,t){var o=e.match(s);if(!o)return!1;var n=o[1],i=o[2],r=o[3],a=o[5];return(n<=23&&i<=59&&r<=59||23==n&&59==i&&60==r)&&(!t||a)}e.exports=f,f.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":u,url:c,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:E,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":g,"relative-json-pointer":p},f.full={date:m,time:_,"date-time":function(e){var t=e.split(y);return 2==t.length&&m(t[0])&&_(t[1],!0)},uri:function(e){return v.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":u,url:c,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&a.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:E,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":g,"relative-json-pointer":p};var y=/t|\s/i;var v=/\/|:/;var b=/[^\\]\\Z/;function E(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},function(e,t,o){"use strict";var n=o(370),i=o(149).toHash;e.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=i(t),e.types=i(["number","integer","string","array","object","boolean","null"]),e.forEach((function(o){o.rules=o.rules.map((function(o){var i;if("object"==typeof o){var r=Object.keys(o)[0];i=o[r],o=r,i.forEach((function(o){t.push(o),e.all[o]=!0}))}return t.push(o),e.all[o]={keyword:o,code:n[o],implements:i}})),e.all.$comment={keyword:"$comment",code:n.$comment},o.type&&(e.types[o.type]=o)})),e.keywords=i(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},function(e,t,o){"use strict";e.exports={$ref:o(371),allOf:o(372),anyOf:o(373),$comment:o(374),const:o(375),contains:o(376),dependencies:o(377),enum:o(378),format:o(379),if:o(380),items:o(381),maximum:o(292),minimum:o(292),maxItems:o(293),minItems:o(293),maxLength:o(294),minLength:o(294),maxProperties:o(295),minProperties:o(295),multipleOf:o(382),not:o(383),oneOf:o(384),pattern:o(385),properties:o(386),propertyNames:o(387),required:o(388),uniqueItems:o(389),validate:o(291)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i,r=" ",s=e.level,a=e.dataLevel,l=e.schema[t],u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(a||""),d="valid"+s;if("#"==l||"#/"==l)e.isRoot?(n=e.async,i="validate"):(n=!0===e.root.schema.$async,i="root.refVal[0]");else{var g=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===g){var p=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(p),(y=y||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(r+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(r+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ";var f=r;r=y.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+f+"]); ":r+=" validate.errors = ["+f+"]; return false; ":r+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,p);e.logger.warn(p),c&&(r+=" if (true) { ")}}else if(g.inline){var m=e.util.copy(e);m.level++;var _="valid"+m.level;m.schema=g.schema,m.schemaPath="",m.errSchemaPath=l,r+=" "+e.validate(m).replace(/validate\.schema/g,g.code)+" ",c&&(r+=" if ("+_+") { ")}else n=!0===g.$async||e.async&&!1!==g.$async,i=g.code}if(i){var y;(y=y||[]).push(r),r="",e.opts.passContext?r+=" "+i+".call(this, ":r+=" "+i+"( ",r+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(r+=" + "+e.errorPath);var v=r+=" , "+(a?"data"+(a-1||""):"parentData")+" , "+(a?e.dataPathArr[a]:"parentDataProperty")+", rootData) ";if(r=y.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");c&&(r+=" var "+d+"; "),r+=" try { await "+v+"; ",c&&(r+=" "+d+" = true; "),r+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(r+=" "+d+" = false; "),r+=" } ",c&&(r+=" if ("+d+") { ")}else r+=" if (!"+v+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",c&&(r+=" else { ")}return r}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.schema[t],r=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,a=!e.opts.allErrors,l=e.util.copy(e),u="";l.level++;var c="valid"+l.level,h=l.baseId,d=!0,g=i;if(g)for(var p,f=-1,m=g.length-1;f0:e.util.schemaHasRules(p,e.RULES.all))&&(d=!1,l.schema=p,l.schemaPath=r+"["+f+"]",l.errSchemaPath=s+"/"+f,n+=" "+e.validate(l)+" ",l.baseId=h,a&&(n+=" if ("+c+") { ",u+="}"));return a&&(n+=d?" if (true) { ":" "+u.slice(0,-1)+" "),n=e.util.cleanUpCode(n)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="valid"+i,d="errs__"+i,g=e.util.copy(e),p="";g.level++;var f="valid"+g.level;if(s.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0:e.util.schemaHasRules(t,e.RULES.all)}))){var m=g.baseId;n+=" var "+d+" = errors; var "+h+" = false; ";var _=e.compositeRule;e.compositeRule=g.compositeRule=!0;var y=s;if(y)for(var v,b=-1,E=y.length-1;b0:e.util.schemaHasRules(s,e.RULES.all);if(n+="var "+d+" = errors;var "+h+";",v){var b=e.compositeRule;e.compositeRule=g.compositeRule=!0,g.schema=s,g.schemaPath=a,g.errSchemaPath=l,n+=" var "+p+" = false; for (var "+f+" = 0; "+f+" < "+c+".length; "+f+"++) { ",g.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);var E=c+"["+f+"]";g.dataPathArr[m]=f;var C=e.validate(g);g.baseId=y,e.util.varOccurences(C,_)<2?n+=" "+e.util.varReplace(C,_,E)+" ":n+=" var "+_+" = "+E+"; "+C+" ",n+=" if ("+p+") break; } ",e.compositeRule=g.compositeRule=b,n+=" if (!"+p+") {"}else n+=" if ("+c+".length == 0) {";var S=S||[];S.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should contain a valid item' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var T=n;return n=S.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+T+"]); ":n+=" validate.errors = ["+T+"]; return false; ":n+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",v&&(n+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(n+=" } "),n=e.util.cleanUpCode(n)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="errs__"+i,d=e.util.copy(e),g="";d.level++;var p="valid"+d.level,f={},m={},_=e.opts.ownProperties;for(E in s){var y=s[E],v=Array.isArray(y)?m:f;v[E]=y}n+="var "+h+" = errors;";var b=e.errorPath;for(var E in n+="var missing"+i+";",m)if((v=m[E]).length){if(n+=" if ( "+c+e.util.getProperty(E)+" !== undefined ",_&&(n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(E)+"') "),u){n+=" && ( ";var C=v;if(C)for(var S=-1,T=C.length-1;S0:e.util.schemaHasRules(y,e.RULES.all))&&(n+=" "+p+" = true; if ( "+c+e.util.getProperty(E)+" !== undefined ",_&&(n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(E)+"') "),n+=") { ",d.schema=y,d.schemaPath=a+e.util.getProperty(E),d.errSchemaPath=l+"/"+e.util.escapeFragment(E),n+=" "+e.validate(d)+" ",d.baseId=x,n+=" } ",u&&(n+=" if ("+p+") { ",g+="}"))}return u&&(n+=" "+g+" if ("+h+" == errors) {"),n=e.util.cleanUpCode(n)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="valid"+i,d=e.opts.$data&&s&&s.$data;d&&(n+=" var schema"+i+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; ");var g="i"+i,p="schema"+i;d||(n+=" var "+p+" = validate.schema"+a+";"),n+="var "+h+";",d&&(n+=" if (schema"+i+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+i+")) "+h+" = false; else {"),n+=h+" = false;for (var "+g+"=0; "+g+"<"+p+".length; "+g+"++) if (equal("+c+", "+p+"["+g+"])) { "+h+" = true; break; }",d&&(n+=" } "),n+=" if (!"+h+") { ";var f=f||[];f.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var m=n;return n=f.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+m+"]); ":n+=" validate.errors = ["+m+"]; return false; ":n+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",u&&(n+=" else { "),n}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||"");if(!1===e.opts.format)return u&&(n+=" if (true) { "),n;var h,d=e.opts.$data&&s&&s.$data;d?(n+=" var schema"+i+" = "+e.util.getData(s.$data,r,e.dataPathArr)+"; ",h="schema"+i):h=s;var g=e.opts.unknownFormats,p=Array.isArray(g);if(d){n+=" var "+(f="format"+i)+" = formats["+h+"]; var "+(m="isObject"+i)+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; var "+(_="formatType"+i)+" = "+m+" && "+f+".type || 'string'; if ("+m+") { ",e.async&&(n+=" var async"+i+" = "+f+".async; "),n+=" "+f+" = "+f+".validate; } if ( ",d&&(n+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),n+=" (","ignore"!=g&&(n+=" ("+h+" && !"+f+" ",p&&(n+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),n+=") || "),n+=" ("+f+" && "+_+" == '"+o+"' && !(typeof "+f+" == 'function' ? ",e.async?n+=" (async"+i+" ? await "+f+"("+c+") : "+f+"("+c+")) ":n+=" "+f+"("+c+") ",n+=" : "+f+".test("+c+"))))) {"}else{var f;if(!(f=e.formats[s])){if("ignore"==g)return e.logger.warn('unknown format "'+s+'" ignored in schema at path "'+e.errSchemaPath+'"'),u&&(n+=" if (true) { "),n;if(p&&g.indexOf(s)>=0)return u&&(n+=" if (true) { "),n;throw new Error('unknown format "'+s+'" is used in schema at path "'+e.errSchemaPath+'"')}var m,_=(m="object"==typeof f&&!(f instanceof RegExp)&&f.validate)&&f.type||"string";if(m){var y=!0===f.async;f=f.validate}if(_!=o)return u&&(n+=" if (true) { "),n;if(y){if(!e.async)throw new Error("async format in sync schema");n+=" if (!(await "+(v="formats"+e.util.getProperty(s)+".validate")+"("+c+"))) { "}else{n+=" if (! ";var v="formats"+e.util.getProperty(s);m&&(v+=".validate"),n+="function"==typeof f?" "+v+"("+c+") ":" "+v+".test("+c+") ",n+=") { "}}var b=b||[];b.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",n+=d?""+h:""+e.util.toQuotedString(s),n+=" } ",!1!==e.opts.messages&&(n+=" , message: 'should match format \"",n+=d?"' + "+h+" + '":""+e.util.escapeQuotes(s),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+a:""+e.util.toQuotedString(s),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var E=n;return n=b.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+E+"]); ":n+=" validate.errors = ["+E+"]; return false; ":n+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(n+=" else { "),n}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="valid"+i,d="errs__"+i,g=e.util.copy(e);g.level++;var p="valid"+g.level,f=e.schema.then,m=e.schema.else,_=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0:e.util.schemaHasRules(f,e.RULES.all)),y=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0:e.util.schemaHasRules(m,e.RULES.all)),v=g.baseId;if(_||y){var b;g.createErrors=!1,g.schema=s,g.schemaPath=a,g.errSchemaPath=l,n+=" var "+d+" = errors; var "+h+" = true; ";var E=e.compositeRule;e.compositeRule=g.compositeRule=!0,n+=" "+e.validate(g)+" ",g.baseId=v,g.createErrors=!0,n+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=g.compositeRule=E,_?(n+=" if ("+p+") { ",g.schema=e.schema.then,g.schemaPath=e.schemaPath+".then",g.errSchemaPath=e.errSchemaPath+"/then",n+=" "+e.validate(g)+" ",g.baseId=v,n+=" "+h+" = "+p+"; ",_&&y?n+=" var "+(b="ifClause"+i)+" = 'then'; ":b="'then'",n+=" } ",y&&(n+=" else { ")):n+=" if (!"+p+") { ",y&&(g.schema=e.schema.else,g.schemaPath=e.schemaPath+".else",g.errSchemaPath=e.errSchemaPath+"/else",n+=" "+e.validate(g)+" ",g.baseId=v,n+=" "+h+" = "+p+"; ",_&&y?n+=" var "+(b="ifClause"+i)+" = 'else'; ":b="'else'",n+=" } "),n+=" if (!"+h+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+b+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match \"' + "+b+" + '\" schema' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } ",u&&(n+=" else { "),n=e.util.cleanUpCode(n)}else u&&(n+=" if (true) { ");return n}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="valid"+i,d="errs__"+i,g=e.util.copy(e),p="";g.level++;var f="valid"+g.level,m="i"+i,_=g.dataLevel=e.dataLevel+1,y="data"+_,v=e.baseId;if(n+="var "+d+" = errors;var "+h+";",Array.isArray(s)){var b=e.schema.additionalItems;if(!1===b){n+=" "+h+" = "+c+".length <= "+s.length+"; ";var E=l;l=e.errSchemaPath+"/additionalItems",n+=" if (!"+h+") { ";var C=C||[];C.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+s.length+" } ",!1!==e.opts.messages&&(n+=" , message: 'should NOT have more than "+s.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var S=n;n=C.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",l=E,u&&(p+="}",n+=" else { ")}var T=s;if(T)for(var w,k=-1,O=T.length-1;k0:e.util.schemaHasRules(w,e.RULES.all)){n+=" "+f+" = true; if ("+c+".length > "+k+") { ";var R=c+"["+k+"]";g.schema=w,g.schemaPath=a+"["+k+"]",g.errSchemaPath=l+"/"+k,g.errorPath=e.util.getPathExpr(e.errorPath,k,e.opts.jsonPointers,!0),g.dataPathArr[_]=k;var L=e.validate(g);g.baseId=v,e.util.varOccurences(L,y)<2?n+=" "+e.util.varReplace(L,y,R)+" ":n+=" var "+y+" = "+R+"; "+L+" ",n+=" } ",u&&(n+=" if ("+f+") { ",p+="}")}if("object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0:e.util.schemaHasRules(b,e.RULES.all))){g.schema=b,g.schemaPath=e.schemaPath+".additionalItems",g.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+f+" = true; if ("+c+".length > "+s.length+") { for (var "+m+" = "+s.length+"; "+m+" < "+c+".length; "+m+"++) { ",g.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);R=c+"["+m+"]";g.dataPathArr[_]=m;L=e.validate(g);g.baseId=v,e.util.varOccurences(L,y)<2?n+=" "+e.util.varReplace(L,y,R)+" ":n+=" var "+y+" = "+R+"; "+L+" ",u&&(n+=" if (!"+f+") break; "),n+=" } } ",u&&(n+=" if ("+f+") { ",p+="}")}}else if(e.opts.strictKeywords?"object"==typeof s&&Object.keys(s).length>0:e.util.schemaHasRules(s,e.RULES.all)){g.schema=s,g.schemaPath=a,g.errSchemaPath=l,n+=" for (var "+m+" = 0; "+m+" < "+c+".length; "+m+"++) { ",g.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);R=c+"["+m+"]";g.dataPathArr[_]=m;L=e.validate(g);g.baseId=v,e.util.varOccurences(L,y)<2?n+=" "+e.util.varReplace(L,y,R)+" ":n+=" var "+y+" = "+R+"; "+L+" ",u&&(n+=" if (!"+f+") break; "),n+=" }"}return u&&(n+=" "+p+" if ("+d+" == errors) {"),n=e.util.cleanUpCode(n)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a,i+="var division"+r+";if (",d&&(i+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),i+=" (division"+r+" = "+h+" / "+n+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+r+") - division"+r+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+r+" !== parseInt(division"+r+") ",i+=" ) ",d&&(i+=" ) "),i+=" ) { ";var g=g||[];g.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=d?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var p=i;return i=g.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="errs__"+i,d=e.util.copy(e);d.level++;var g="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof s&&Object.keys(s).length>0:e.util.schemaHasRules(s,e.RULES.all)){d.schema=s,d.schemaPath=a,d.errSchemaPath=l,n+=" var "+h+" = errors; ";var p,f=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(p=d.opts.allErrors,d.opts.allErrors=!1),n+=" "+e.validate(d)+" ",d.createErrors=!0,p&&(d.opts.allErrors=p),e.compositeRule=d.compositeRule=f,n+=" if ("+g+") { ";var m=m||[];m.push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var _=n;n=m.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+_+"]); ":n+=" validate.errors = ["+_+"]; return false; ":n+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else n+=" var err = ",!1!==e.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ");return n}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="valid"+i,d="errs__"+i,g=e.util.copy(e),p="";g.level++;var f="valid"+g.level,m=g.baseId,_="prevValid"+i,y="passingSchemas"+i;n+="var "+d+" = errors , "+_+" = false , "+h+" = false , "+y+" = null; ";var v=e.compositeRule;e.compositeRule=g.compositeRule=!0;var b=s;if(b)for(var E,C=-1,S=b.length-1;C0:e.util.schemaHasRules(E,e.RULES.all))?(g.schema=E,g.schemaPath=a+"["+C+"]",g.errSchemaPath=l+"/"+C,n+=" "+e.validate(g)+" ",g.baseId=m):n+=" var "+f+" = true; ",C&&(n+=" if ("+f+" && "+_+") { "+h+" = false; "+y+" = ["+y+", "+C+"]; } else { ",p+="}"),n+=" if ("+f+") { "+h+" = "+_+" = true; "+y+" = "+C+"; }";return e.compositeRule=g.compositeRule=v,n+=p+"if (!"+h+") { var err = ",!1!==e.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&u&&(e.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(n+=" } "),n}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n,i=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;d?(i+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",n="schema"+r):n=a,i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'string') || "),i+=" !"+(d?"(new RegExp("+n+"))":e.usePattern(a))+".test("+h+") ) { ";var g=g||[];g.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",i+=d?""+n:""+e.util.toQuotedString(a),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=d?"' + "+n+" + '":""+e.util.escapeQuotes(a),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+e.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var p=i;return i=g.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="errs__"+i,d=e.util.copy(e),g="";d.level++;var p="valid"+d.level,f="key"+i,m="idx"+i,_=d.dataLevel=e.dataLevel+1,y="data"+_,v="dataProperties"+i,b=Object.keys(s||{}),E=e.schema.patternProperties||{},C=Object.keys(E),S=e.schema.additionalProperties,T=b.length||C.length,w=!1===S,k="object"==typeof S&&Object.keys(S).length,O=e.opts.removeAdditional,R=w||k||O,L=e.opts.ownProperties,N=e.baseId,I=e.schema.required;if(I&&(!e.opts.$data||!I.$data)&&I.length8)n+=" || validate.schema"+a+".hasOwnProperty("+f+") ";else{var A=b;if(A)for(var P=-1,x=A.length-1;P0:e.util.schemaHasRules(J,e.RULES.all)){var Z=e.util.getProperty(X),Q=(G=c+Z,K&&void 0!==J.default);d.schema=J,d.schemaPath=a+Z,d.errSchemaPath=l+"/"+e.util.escapeFragment(X),d.errorPath=e.util.getPath(e.errorPath,X,e.opts.jsonPointers),d.dataPathArr[_]=e.util.toQuotedString(X);z=e.validate(d);if(d.baseId=N,e.util.varOccurences(z,y)<2){z=e.util.varReplace(z,y,G);var ee=G}else{ee=y;n+=" var "+y+" = "+G+"; "}if(Q)n+=" "+z+" ";else{if(D&&D[X]){n+=" if ( "+ee+" === undefined ",L&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(X)+"') "),n+=") { "+p+" = false; ";H=e.errorPath,V=l;var te,oe=e.util.escapeQuotes(X);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(H,X,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(te=te||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+oe+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+oe+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";W=n;n=te.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+W+"]); ":n+=" validate.errors = ["+W+"]; return false; ":n+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=V,e.errorPath=H,n+=" } else { "}else u?(n+=" if ( "+ee+" === undefined ",L&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(X)+"') "),n+=") { "+p+" = true; } else { "):(n+=" if ("+ee+" !== undefined ",L&&(n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(X)+"') "),n+=" ) { ");n+=" "+z+" } "}}u&&(n+=" if ("+p+") { ",g+="}")}}if(C.length){var ne=C;if(ne)for(var ie,re=-1,se=ne.length-1;re0:e.util.schemaHasRules(J,e.RULES.all)){d.schema=J,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ie),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ie),n+=L?" "+v+" = "+v+" || Object.keys("+c+"); for (var "+m+"=0; "+m+"<"+v+".length; "+m+"++) { var "+f+" = "+v+"["+m+"]; ":" for (var "+f+" in "+c+") { ",n+=" if ("+e.usePattern(ie)+".test("+f+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers);G=c+"["+f+"]";d.dataPathArr[_]=f;z=e.validate(d);d.baseId=N,e.util.varOccurences(z,y)<2?n+=" "+e.util.varReplace(z,y,G)+" ":n+=" var "+y+" = "+G+"; "+z+" ",u&&(n+=" if (!"+p+") break; "),n+=" } ",u&&(n+=" else "+p+" = true; "),n+=" } ",u&&(n+=" if ("+p+") { ",g+="}")}}}return u&&(n+=" "+g+" if ("+h+" == errors) {"),n=e.util.cleanUpCode(n)}},function(e,t,o){"use strict";e.exports=function(e,t,o){var n=" ",i=e.level,r=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,c="data"+(r||""),h="errs__"+i,d=e.util.copy(e);d.level++;var g="valid"+d.level;if(n+="var "+h+" = errors;",e.opts.strictKeywords?"object"==typeof s&&Object.keys(s).length>0:e.util.schemaHasRules(s,e.RULES.all)){d.schema=s,d.schemaPath=a,d.errSchemaPath=l;var p="key"+i,f="idx"+i,m="i"+i,_="' + "+p+" + '",y="data"+(d.dataLevel=e.dataLevel+1),v="dataProperties"+i,b=e.opts.ownProperties,E=e.baseId;b&&(n+=" var "+v+" = undefined; "),n+=b?" "+v+" = "+v+" || Object.keys("+c+"); for (var "+f+"=0; "+f+"<"+v+".length; "+f+"++) { var "+p+" = "+v+"["+f+"]; ":" for (var "+p+" in "+c+") { ",n+=" var startErrs"+i+" = errors; ";var C=p,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var T=e.validate(d);d.baseId=E,e.util.varOccurences(T,y)<2?n+=" "+e.util.varReplace(T,y,C)+" ":n+=" var "+y+" = "+C+"; "+T+" ",e.compositeRule=d.compositeRule=S,n+=" if (!"+g+") { for (var "+m+"=startErrs"+i+"; "+m+"0:e.util.schemaHasRules(v,e.RULES.all))||(p[p.length]=m)}}else p=s;if(d||p.length){var b=e.errorPath,E=d||p.length>=e.opts.loopRequired,C=e.opts.ownProperties;if(u)if(n+=" var missing"+i+"; ",E){d||(n+=" var "+g+" = validate.schema"+a+"; ");var S="' + "+(L="schema"+i+"["+(k="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,L,e.opts.jsonPointers)),n+=" var "+h+" = true; ",d&&(n+=" if (schema"+i+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+i+")) "+h+" = false; else {"),n+=" for (var "+k+" = 0; "+k+" < "+g+".length; "+k+"++) { "+h+" = "+c+"["+g+"["+k+"]] !== undefined ",C&&(n+=" && Object.prototype.hasOwnProperty.call("+c+", "+g+"["+k+"]) "),n+="; if (!"+h+") break; } ",d&&(n+=" } "),n+=" if (!"+h+") { ",(R=R||[]).push(n),n="",!1!==e.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(n+=" , message: '",e.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+S+"\\'",n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var T=n;n=R.pop(),!e.compositeRule&&u?e.async?n+=" throw new ValidationError(["+T+"]); ":n+=" validate.errors = ["+T+"]; return false; ":n+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var w=p;if(w)for(var k=-1,O=w.length-1;k 1) { ";var p=e.schema.items&&e.schema.items.type,f=Array.isArray(p);if(!p||"object"==p||"array"==p||f&&(p.indexOf("object")>=0||p.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var m="checkDataType"+(f?"s":"");i+=" if ("+e.util[m](p,"item",!0)+") continue; ",f&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",g&&(i+=" } "),i+=" if (!"+d+") { ";var _=_||[];_.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=g?"validate.schema"+l:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var y=i;i=_.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c&&(i+=" else { ")}else c&&(i+=" if (true) { ");return i}},function(e,t,o){"use strict";var n=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,t){for(var o=0;o=i?e:n(e,t,o)}},function(e,t){e.exports=function(e,t,o){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(o=o>i?i:o)<0&&(o+=i),i=t>o?0:o-t>>>0,t>>>=0;for(var r=Array(i);++n{o=e});return new Promise((i,r)=>{let u=s.createServer(e=>{u.close(),o([new a.SocketMessageReader(e,t),new l.SocketMessageWriter(e,t)])});u.on("error",r),u.listen(e,()=>{u.removeListener("error",r),i({onConnected:()=>n})})})},t.createServerPipeTransport=function(e,t="utf-8"){const o=s.createConnection(e);return[new a.SocketMessageReader(o,t),new l.SocketMessageWriter(o,t)]}}).call(this,o(108))},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(150),i=o(243),r=o(244);t.createClientSocketTransport=function(e,t="utf-8"){let o,s=new Promise((e,t)=>{o=e});return new Promise((a,l)=>{let u=n.createServer(e=>{u.close(),o([new i.SocketMessageReader(e,t),new r.SocketMessageWriter(e,t)])});u.on("error",l),u.listen(e,"127.0.0.1",()=>{u.removeListener("error",l),a({onConnected:()=>s})})})},t.createServerSocketTransport=function(e,t="utf-8"){const o=n.createConnection(e,"127.0.0.1");return[new i.SocketMessageReader(o,t),new r.SocketMessageWriter(o,t)]}},function(e,t,o){"use strict";var n,i,r,s,a,l,u,c,h,d,g,p,f,m,_,y,v,b,E;o.r(t),o.d(t,"Position",(function(){return n})),o.d(t,"Range",(function(){return i})),o.d(t,"Location",(function(){return r})),o.d(t,"LocationLink",(function(){return s})),o.d(t,"Color",(function(){return a})),o.d(t,"ColorInformation",(function(){return l})),o.d(t,"ColorPresentation",(function(){return u})),o.d(t,"FoldingRangeKind",(function(){return c})),o.d(t,"FoldingRange",(function(){return h})),o.d(t,"DiagnosticRelatedInformation",(function(){return d})),o.d(t,"DiagnosticSeverity",(function(){return g})),o.d(t,"Diagnostic",(function(){return p})),o.d(t,"Command",(function(){return f})),o.d(t,"TextEdit",(function(){return m})),o.d(t,"TextDocumentEdit",(function(){return _})),o.d(t,"CreateFile",(function(){return y})),o.d(t,"RenameFile",(function(){return v})),o.d(t,"DeleteFile",(function(){return b})),o.d(t,"WorkspaceEdit",(function(){return E})),o.d(t,"WorkspaceChange",(function(){return U})),o.d(t,"TextDocumentIdentifier",(function(){return C})),o.d(t,"VersionedTextDocumentIdentifier",(function(){return S})),o.d(t,"TextDocumentItem",(function(){return T})),o.d(t,"MarkupKind",(function(){return w})),o.d(t,"MarkupContent",(function(){return k})),o.d(t,"CompletionItemKind",(function(){return O})),o.d(t,"InsertTextFormat",(function(){return R})),o.d(t,"CompletionItem",(function(){return L})),o.d(t,"CompletionList",(function(){return N})),o.d(t,"MarkedString",(function(){return I})),o.d(t,"Hover",(function(){return D})),o.d(t,"ParameterInformation",(function(){return A})),o.d(t,"SignatureInformation",(function(){return P})),o.d(t,"DocumentHighlightKind",(function(){return x})),o.d(t,"DocumentHighlight",(function(){return M})),o.d(t,"SymbolKind",(function(){return B})),o.d(t,"SymbolInformation",(function(){return F})),o.d(t,"DocumentSymbol",(function(){return K})),o.d(t,"CodeActionKind",(function(){return V})),o.d(t,"CodeActionContext",(function(){return W})),o.d(t,"CodeAction",(function(){return j})),o.d(t,"CodeLens",(function(){return G})),o.d(t,"FormattingOptions",(function(){return z})),o.d(t,"DocumentLink",(function(){return Y})),o.d(t,"EOL",(function(){return $})),o.d(t,"TextDocument",(function(){return X})),o.d(t,"TextDocumentSaveReason",(function(){return q})),function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return J.objectLiteral(t)&&J.number(t.line)&&J.number(t.character)}}(n||(n={})),function(e){e.create=function(e,t,o,i){if(J.number(e)&&J.number(t)&&J.number(o)&&J.number(i))return{start:n.create(e,t),end:n.create(o,i)};if(n.is(e)&&n.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+o+", "+i+"]")},e.is=function(e){var t=e;return J.objectLiteral(t)&&n.is(t.start)&&n.is(t.end)}}(i||(i={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return J.defined(t)&&i.is(t.range)&&(J.string(t.uri)||J.undefined(t.uri))}}(r||(r={})),function(e){e.create=function(e,t,o,n){return{targetUri:e,targetRange:t,targetSelectionRange:o,originSelectionRange:n}},e.is=function(e){var t=e;return J.defined(t)&&i.is(t.targetRange)&&J.string(t.targetUri)&&(i.is(t.targetSelectionRange)||J.undefined(t.targetSelectionRange))&&(i.is(t.originSelectionRange)||J.undefined(t.originSelectionRange))}}(s||(s={})),function(e){e.create=function(e,t,o,n){return{red:e,green:t,blue:o,alpha:n}},e.is=function(e){var t=e;return J.number(t.red)&&J.number(t.green)&&J.number(t.blue)&&J.number(t.alpha)}}(a||(a={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return i.is(t.range)&&a.is(t.color)}}(l||(l={})),function(e){e.create=function(e,t,o){return{label:e,textEdit:t,additionalTextEdits:o}},e.is=function(e){var t=e;return J.string(t.label)&&(J.undefined(t.textEdit)||m.is(t))&&(J.undefined(t.additionalTextEdits)||J.typedArray(t.additionalTextEdits,m.is))}}(u||(u={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(c||(c={})),function(e){e.create=function(e,t,o,n,i){var r={startLine:e,endLine:t};return J.defined(o)&&(r.startCharacter=o),J.defined(n)&&(r.endCharacter=n),J.defined(i)&&(r.kind=i),r},e.is=function(e){var t=e;return J.number(t.startLine)&&J.number(t.startLine)&&(J.undefined(t.startCharacter)||J.number(t.startCharacter))&&(J.undefined(t.endCharacter)||J.number(t.endCharacter))&&(J.undefined(t.kind)||J.string(t.kind))}}(h||(h={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return J.defined(t)&&r.is(t.location)&&J.string(t.message)}}(d||(d={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(g||(g={})),function(e){e.create=function(e,t,o,n,i,r){var s={range:e,message:t};return J.defined(o)&&(s.severity=o),J.defined(n)&&(s.code=n),J.defined(i)&&(s.source=i),J.defined(r)&&(s.relatedInformation=r),s},e.is=function(e){var t=e;return J.defined(t)&&i.is(t.range)&&J.string(t.message)&&(J.number(t.severity)||J.undefined(t.severity))&&(J.number(t.code)||J.string(t.code)||J.undefined(t.code))&&(J.string(t.source)||J.undefined(t.source))&&(J.undefined(t.relatedInformation)||J.typedArray(t.relatedInformation,d.is))}}(p||(p={})),function(e){e.create=function(e,t){for(var o=[],n=2;n0&&(i.arguments=o),i},e.is=function(e){var t=e;return J.defined(t)&&J.string(t.title)&&J.string(t.command)}}(f||(f={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return J.objectLiteral(t)&&J.string(t.newText)&&i.is(t.range)}}(m||(m={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return J.defined(t)&&S.is(t.textDocument)&&Array.isArray(t.edits)}}(_||(_={})),function(e){e.create=function(e,t){var o={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(o.options=t),o},e.is=function(e){var t=e;return t&&"create"===t.kind&&J.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||J.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||J.boolean(t.options.ignoreIfExists)))}}(y||(y={})),function(e){e.create=function(e,t,o){var n={kind:"rename",oldUri:e,newUri:t};return void 0===o||void 0===o.overwrite&&void 0===o.ignoreIfExists||(n.options=o),n},e.is=function(e){var t=e;return t&&"rename"===t.kind&&J.string(t.oldUri)&&J.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||J.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||J.boolean(t.options.ignoreIfExists)))}}(v||(v={})),function(e){e.create=function(e,t){var o={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(o.options=t),o},e.is=function(e){var t=e;return t&&"delete"===t.kind&&J.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||J.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||J.boolean(t.options.ignoreIfNotExists)))}}(b||(b={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return J.string(e.kind)?y.is(e)||v.is(e)||b.is(e):_.is(e)})))}}(E||(E={}));var C,S,T,w,k,O,R,L,N,I,D,A,P,x,M,B,F,H=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(m.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(m.replace(e,t))},e.prototype.delete=function(e){this.edits.push(m.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),U=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(_.is(e)){var o=new H(e.edits);t._textEditChanges[e.textDocument.uri]=o}})):e.changes&&Object.keys(e.changes).forEach((function(o){var n=new H(e.changes[o]);t._textEditChanges[o]=n})))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(S.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(n=this._textEditChanges[t.uri])){var o={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(o),n=new H(i),this._textEditChanges[t.uri]=n}return n}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n;if(!(n=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,n=new H(i),this._textEditChanges[e]=n}return n},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(y.create(e,t))},e.prototype.renameFile=function(e,t,o){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(v.create(e,t,o))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(b.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return J.defined(t)&&J.string(t.uri)}}(C||(C={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return J.defined(t)&&J.string(t.uri)&&(null===t.version||J.number(t.version))}}(S||(S={})),function(e){e.create=function(e,t,o,n){return{uri:e,languageId:t,version:o,text:n}},e.is=function(e){var t=e;return J.defined(t)&&J.string(t.uri)&&J.string(t.languageId)&&J.number(t.version)&&J.string(t.text)}}(T||(T={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(w||(w={})),function(e){e.is=function(t){var o=t;return o===e.PlainText||o===e.Markdown}}(w||(w={})),function(e){e.is=function(e){var t=e;return J.objectLiteral(e)&&w.is(t.kind)&&J.string(t.value)}}(k||(k={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(O||(O={})),function(e){e.PlainText=1,e.Snippet=2}(R||(R={})),function(e){e.create=function(e){return{label:e}}}(L||(L={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(N||(N={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return J.string(t)||J.objectLiteral(t)&&J.string(t.language)&&J.string(t.value)}}(I||(I={})),function(e){e.is=function(e){var t=e;return!!t&&J.objectLiteral(t)&&(k.is(t.contents)||I.is(t.contents)||J.typedArray(t.contents,I.is))&&(void 0===e.range||i.is(e.range))}}(D||(D={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(A||(A={})),function(e){e.create=function(e,t){for(var o=[],n=2;n=0;r--){var s=n[r],a=e.offsetAt(s.range.start),l=e.offsetAt(s.range.end);if(!(l<=i))throw new Error("Overlapping edit");o=o.substring(0,a)+s.newText+o.substring(l,o.length),i=a}return o}}(X||(X={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(q||(q={}));var J,Z=function(){function e(e,t,o,n){this._uri=e,this._languageId=t,this._version=o,this._content=n,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),o=this.offsetAt(e.end);return this._content.substring(t,o)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,o=!0,n=0;n0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),o=0,i=t.length;if(0===i)return n.create(0,e);for(;oe?i=r:o=r+1}var s=o-1;return n.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var o=t[e.line],n=e.line+10)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},i=this&&this.__spread||function(){for(var e=[],t=0;t0&&i[i.length-1])&&(6===r[0]||2===r[0])){s=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},s=this&&this.__spread||function(){for(var e=[],t=0;t=0}var a=/^\w[\w\d+.-]*$/,l=/^\//,u=/^\/\//,c=!0;function h(e){var t=c;return c=e,t}var d="",g="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,f=function(){function e(e,t,o,n,i,r){void 0===r&&(r=!1),"object"==typeof e?(this.scheme=e.scheme||d,this.authority=e.authority||d,this.path=e.path||d,this.query=e.query||d,this.fragment=e.fragment||d):(this.scheme=function(e,t){return t||c?e||d:(e||(e="file"),e)}(e,r),this.authority=t||d,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==g&&(t=g+t):t=g}return t}(this.scheme,o||d),this.query=n||d,this.fragment=i||d,function(e,t){if(!e.scheme&&(t||c))throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!l.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(u.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,r))}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return C(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,o=e.authority,n=e.path,i=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===o?o=this.authority:null===o&&(o=d),void 0===n?n=this.path:null===n&&(n=d),void 0===i?i=this.query:null===i&&(i=d),void 0===r?r=this.fragment:null===r&&(r=d),t===this.scheme&&o===this.authority&&n===this.path&&i===this.query&&r===this.fragment?this:new y(t,o,n,i,r)},e.parse=function(e,t){void 0===t&&(t=!1);var o=p.exec(e);return o?new y(o[2]||d,decodeURIComponent(o[4]||d),decodeURIComponent(o[5]||d),decodeURIComponent(o[7]||d),decodeURIComponent(o[9]||d),t):new y(d,d,d,d,d)},e.file=function(e){var t=d;if(i&&(e=e.replace(/\\/g,g)),e[0]===g&&e[1]===g){var o=e.indexOf(g,2);-1===o?(t=e.substring(2),e=g):(t=e.substring(2,o),e=e.substring(o)||g)}return new y("file",t,e,d,d)},e.from=function(e){return new y(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),S(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var o=new y(t);return o._formatted=t.external,o._fsPath=t._sep===_?t.fsPath:null,o}return t},e}();t.default=f;var m,_=i?1:void 0,y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return r(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?S(this,!0):(this._formatted||(this._formatted=S(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=_),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}(f),v=((m={})[58]="%3A",m[47]="%2F",m[63]="%3F",m[35]="%23",m[91]="%5B",m[93]="%5D",m[64]="%40",m[33]="%21",m[36]="%24",m[38]="%26",m[39]="%27",m[40]="%28",m[41]="%29",m[42]="%2A",m[43]="%2B",m[44]="%2C",m[59]="%3B",m[61]="%3D",m[32]="%20",m);function b(e,t){for(var o=void 0,n=-1,i=0;i=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==n&&(o+=encodeURIComponent(e.substring(n,i)),n=-1),void 0!==o&&(o+=e.charAt(i));else{void 0===o&&(o=e.substr(0,i));var s=v[r];void 0!==s?(-1!==n&&(o+=encodeURIComponent(e.substring(n,i)),n=-1),o+=s):-1===n&&(n=i)}}return-1!==n&&(o+=encodeURIComponent(e.substring(n))),void 0!==o?o:e}function E(e){for(var t=void 0,o=0;o1&&"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,i&&(t=t.replace(/\//g,"\\")),t}function S(e,t){var o=t?E:b,n="",i=e.scheme,r=e.authority,s=e.path,a=e.query,l=e.fragment;if(i&&(n+=i,n+=":"),(r||"file"===i)&&(n+=g,n+=g),r){var u=r.indexOf("@");if(-1!==u){var c=r.substr(0,u);r=r.substr(u+1),-1===(u=c.indexOf(":"))?n+=o(c,!1):(n+=o(c.substr(0,u),!1),n+=":",n+=o(c.substr(u+1),!1)),n+="@"}-1===(u=(r=r.toLowerCase()).indexOf(":"))?n+=o(r,!1):(n+=o(r.substr(0,u),!1),n+=r.substr(u))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2))(h=s.charCodeAt(1))>=65&&h<=90&&(s="/"+String.fromCharCode(h+32)+":"+s.substr(3));else if(s.length>=2&&58===s.charCodeAt(1)){var h;(h=s.charCodeAt(0))>=65&&h<=90&&(s=String.fromCharCode(h+32)+":"+s.substr(2))}n+=o(s,!0)}return a&&(n+="?",n+=o(a,!1)),l&&(n+="#",n+=t?l:b(l,!1)),n}}.call(this,o(108))},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(109),i=o(101),r=o(138),s=o(308),a=o(309),l=o(310);t.createConverter=function(e){var t=e||function(e){return e.toString()};function o(e){return t(e)}function u(e){return{uri:t(e.uri)}}function c(e){return{uri:t(e.uri),version:e.version}}function h(e){switch(e){case n.TextDocumentSaveReason.Manual:return i.TextDocumentSaveReason.Manual;case n.TextDocumentSaveReason.AfterDelay:return i.TextDocumentSaveReason.AfterDelay;case n.TextDocumentSaveReason.FocusOut:return i.TextDocumentSaveReason.FocusOut}return i.TextDocumentSaveReason.Manual}function d(e){switch(e){case n.CompletionTriggerKind.TriggerCharacter:return i.CompletionTriggerKind.TriggerCharacter;case n.CompletionTriggerKind.TriggerForIncompleteCompletions:return i.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return i.CompletionTriggerKind.Invoked}}function g(e){return{line:e.line,character:e.character}}function p(e){if(void 0!==e)return null===e?null:{line:e.line,character:e.character}}function f(e){return null==e?e:{start:p(e.start),end:p(e.end)}}function m(e){switch(e){case n.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case n.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case n.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case n.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}}function _(e){var t=i.Diagnostic.create(f(e.range),e.message);return r.number(e.severity)&&(t.severity=m(e.severity)),(r.number(e.code)||r.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),t}function y(e){return null==e?e:e.map(_)}function v(e){return{range:f(e.range),newText:e.newText}}function b(e){var t=i.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:o,asTextDocumentIdentifier:u,asOpenTextDocumentParams:function(e){return{textDocument:{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}},asChangeTextDocumentParams:function(e){var o;if((o=e).uri&&o.version)return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){var t=e;return!!t.document&&!!t.contentChanges}(e)){var n=e.document;return{textDocument:{uri:t(n.uri),version:n.version},contentChanges:e.contentChanges.map((function(e){var t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:u(e)}},asSaveTextDocumentParams:function(e,t){void 0===t&&(t=!1);var o={textDocument:c(e)};return t&&(o.text=e.getText()),o},asWillSaveTextDocumentParams:function(e){return{textDocument:u(e.document),reason:h(e.reason)}},asTextDocumentPositionParams:function(e,t){return{textDocument:u(e),position:g(t)}},asCompletionParams:function(e,t,o){return{textDocument:u(e),position:g(t),context:{triggerKind:d(o.triggerKind),triggerCharacter:o.triggerCharacter}}},asWorkerPosition:g,asRange:f,asPosition:p,asDiagnosticSeverity:m,asDiagnostic:_,asDiagnostics:y,asCompletionItem:function(e){var t,o,a={label:e.label},l=e instanceof s.default?e:void 0;return e.detail&&(a.detail=e.detail),e.documentation&&(l&&"$string"!==l.documentationFormat?a.documentation=function(e,t){switch(e){case"$string":return t;case i.MarkupKind.PlainText:return{kind:e,value:t};case i.MarkupKind.Markdown:return{kind:e,value:t.value};default:return"Unsupported Markup content received. Kind is: "+e}}(l.documentationFormat,e.documentation):a.documentation=e.documentation),e.filterText&&(a.filterText=e.filterText),function(e,t){var o,r=i.InsertTextFormat.PlainText,s=void 0;t.textEdit?(o=t.textEdit.newText,s=f(t.textEdit.range)):t.insertText instanceof n.SnippetString?(r=i.InsertTextFormat.Snippet,o=t.insertText.value):o=t.insertText;t.range&&(s=f(t.range));e.insertTextFormat=r,t.fromEdit&&o&&s?e.textEdit={newText:o,range:s}:e.insertText=o}(a,e),r.number(e.kind)&&(a.kind=(t=e.kind,void 0!==(o=l&&l.originalItemKind)?o:t+1)),e.sortText&&(a.sortText=e.sortText),e.additionalTextEdits&&(a.additionalTextEdits=function(e){if(null==e)return e;return e.map(v)}(e.additionalTextEdits)),e.commitCharacters&&(a.commitCharacters=e.commitCharacters.slice()),e.command&&(a.command=b(e.command)),!0!==e.preselect&&!1!==e.preselect||(a.preselect=e.preselect),l&&(void 0!==l.data&&(a.data=l.data),!0!==l.deprecated&&!1!==l.deprecated||(a.deprecated=l.deprecated)),a},asTextEdit:v,asReferenceParams:function(e,t,o){return{textDocument:u(e),position:g(t),context:{includeDeclaration:o.includeDeclaration}}},asCodeActionContext:function(e){return null==e?e:i.CodeActionContext.create(y(e.diagnostics),r.string(e.only)?[e.only]:void 0)},asCommand:b,asCodeLens:function(e){var t=i.CodeLens.create(f(e.range));return e.command&&(t.command=b(e.command)),e instanceof a.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},asDocumentSymbolParams:function(e){return{textDocument:u(e)}},asCodeLensParams:function(e){return{textDocument:u(e)}},asDocumentLink:function(e){var t=i.DocumentLink.create(f(e.range));e.target&&(t.target=o(e.target));var n=e instanceof l.default?e:void 0;return n&&n.data&&(t.data=n.data),t},asDocumentLinkParams:function(e){return{textDocument:u(e)}}}}},function(e,t,o){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],o=0;return t?t.call(e):{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}},i=this&&this.__read||function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,i,r=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0});var r,s=o(109),a=o(101),l=o(138),u=o(308),c=o(309),h=o(310);!function(e){e.is=function(e){var t=e;return t&&l.string(t.language)&&l.string(t.value)}}(r||(r={})),t.createConverter=function(e){var t=e||function(e){return s.Uri.parse(e)};function o(e){return t(e)}function d(e){return e.map(g)}function g(e){var t=new s.Diagnostic(m(e.range),e.message,_(e.severity));return(l.number(e.code)||l.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(p)),t}function p(e){return new s.DiagnosticRelatedInformation(k(e.location),e.message)}function f(e){if(e)return new s.Position(e.line,e.character)}function m(e){if(e)return new s.Range(f(e.start),f(e.end))}function _(e){if(null==e)return s.DiagnosticSeverity.Error;switch(e){case a.DiagnosticSeverity.Error:return s.DiagnosticSeverity.Error;case a.DiagnosticSeverity.Warning:return s.DiagnosticSeverity.Warning;case a.DiagnosticSeverity.Information:return s.DiagnosticSeverity.Information;case a.DiagnosticSeverity.Hint:return s.DiagnosticSeverity.Hint}return s.DiagnosticSeverity.Error}function y(e){if(l.string(e))return e;switch(e.kind){case a.MarkupKind.Markdown:return new s.MarkdownString(e.value);case a.MarkupKind.PlainText:return e.value;default:return"Unsupported Markup content received. Kind is: "+e.kind}}function v(e){var t=new u.default(e.label);e.detail&&(t.detail=e.detail),e.documentation&&(t.documentation=y(e.documentation),t.documentationFormat=l.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(t.filterText=e.filterText);var o,n=function(e){return e.textEdit?e.insertTextFormat===a.InsertTextFormat.Snippet?{text:new s.SnippetString(e.textEdit.newText),range:m(e.textEdit.range),fromEdit:!0}:{text:e.textEdit.newText,range:m(e.textEdit.range),fromEdit:!0}:e.insertText?e.insertTextFormat===a.InsertTextFormat.Snippet?{text:new s.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(n&&(t.insertText=n.text,t.range=n.range,t.fromEdit=n.fromEdit),l.number(e.kind)){var r=i((o=e.kind,a.CompletionItemKind.Text<=o&&o<=a.CompletionItemKind.TypeParameter?[o-1,void 0]:[s.CompletionItemKind.Text,o]),2),c=r[0],h=r[1];t.kind=c,h&&(t.originalItemKind=h)}return e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=E(e.additionalTextEdits)),l.stringArray(e.commitCharacters)&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=D(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(t.deprecated=e.deprecated),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect),void 0!==e.data&&(t.data=e.data),t}function b(e){if(e)return new s.TextEdit(m(e.range),e.newText)}function E(e){if(e)return e.map(b)}function C(e){return e.map(S)}function S(e){var t=new s.SignatureInformation(e.label);return e.documentation&&(t.documentation=y(e.documentation)),e.parameters&&(t.parameters=T(e.parameters)),t}function T(e){return e.map(w)}function w(e){var t=new s.ParameterInformation(e.label);return e.documentation&&(t.documentation=y(e.documentation)),t}function k(e){if(e)return new s.Location(t(e.uri),m(e.range))}function O(e){var t=new s.DocumentHighlight(m(e.range));return l.number(e.kind)&&(t.kind=R(e.kind)),t}function R(e){switch(e){case a.DocumentHighlightKind.Text:return s.DocumentHighlightKind.Text;case a.DocumentHighlightKind.Read:return s.DocumentHighlightKind.Read;case a.DocumentHighlightKind.Write:return s.DocumentHighlightKind.Write}return s.DocumentHighlightKind.Text}function L(e){return e<=a.SymbolKind.TypeParameter?e-1:s.SymbolKind.Property}function N(e,o){var n=new s.SymbolInformation(e.name,L(e.kind),m(e.location.range),e.location.uri?t(e.location.uri):o);return e.containerName&&(n.containerName=e.containerName),n}function I(e){var t,o,i=new s.DocumentSymbol(e.name,void 0!==e.detail?e.detail:e.name,L(e.kind),m(e.range),m(e.selectionRange));if(void 0!==e.children&&e.children.length>0){var r=[];try{for(var a=n(e.children),l=a.next();!l.done;l=a.next()){var u=l.value;r.push(I(u))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}i.children=r}return i}function D(e){var t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}var A=new Map;function P(e){if(e){var t=new c.default(m(e.range));return e.command&&(t.command=D(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}}function x(e){if(e){var o=new s.WorkspaceEdit;return e.documentChanges?e.documentChanges.forEach((function(e){o.set(t(e.textDocument.uri),E(e.edits))})):e.changes&&Object.keys(e.changes).forEach((function(n){o.set(t(n),E(e.changes[n]))})),o}}function M(e){var t=m(e.range),n=e.target?o(e.target):void 0,i=new h.default(t,n);return void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function B(e){return new s.Color(e.red,e.green,e.blue,e.alpha)}function F(e){return new s.ColorInformation(m(e.range),B(e.color))}function H(e){var t=new s.ColorPresentation(e.label);return t.additionalTextEdits=E(e.additionalTextEdits),e.textEdit&&(t.textEdit=b(e.textEdit)),t}function U(e){if(e)switch(e){case a.FoldingRangeKind.Comment:return s.FoldingRangeKind.Comment;case a.FoldingRangeKind.Imports:return s.FoldingRangeKind.Imports;case a.FoldingRangeKind.Region:return s.FoldingRangeKind.Region}}function V(e){return new s.FoldingRange(e.startLine,e.endLine,U(e.kind))}return A.set("",s.CodeActionKind.Empty),A.set(a.CodeActionKind.QuickFix,s.CodeActionKind.QuickFix),A.set(a.CodeActionKind.Refactor,s.CodeActionKind.Refactor),A.set(a.CodeActionKind.RefactorExtract,s.CodeActionKind.RefactorExtract),A.set(a.CodeActionKind.RefactorInline,s.CodeActionKind.RefactorInline),A.set(a.CodeActionKind.RefactorRewrite,s.CodeActionKind.RefactorRewrite),A.set(a.CodeActionKind.Source,s.CodeActionKind.Source),A.set(a.CodeActionKind.SourceOrganizeImports,s.CodeActionKind.SourceOrganizeImports),{asUri:o,asDiagnostics:d,asDiagnostic:g,asRange:m,asPosition:f,asDiagnosticSeverity:_,asHover:function(e){if(e)return new s.Hover(function(e){var t,o;if(l.string(e))return new s.MarkdownString(e);if(r.is(e))return(i=new s.MarkdownString).appendCodeblock(e.value,e.language);if(Array.isArray(e)){var i=[];try{for(var u=n(e),c=u.next();!c.done;c=u.next()){var h=c.value,d=new s.MarkdownString;r.is(h)?d.appendCodeblock(h.value,h.language):d.appendMarkdown(h),i.push(d)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(o=u.return)&&o.call(u)}finally{if(t)throw t.error}}return i}switch(i=void 0,e.kind){case a.MarkupKind.Markdown:return new s.MarkdownString(e.value);case a.MarkupKind.PlainText:return(i=new s.MarkdownString).appendText(e.value),i;default:return(i=new s.MarkdownString).appendText("Unsupported Markup content received. Kind is: "+e.kind),i}}(e.contents),m(e.range))},asCompletionResult:function(e){if(e){if(Array.isArray(e))return e.map(v);var t=e;return new s.CompletionList(t.items.map(v),t.isIncomplete)}},asCompletionItem:v,asTextEdit:b,asTextEdits:E,asSignatureHelp:function(e){if(e){var t=new s.SignatureHelp;return l.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,l.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=C(e.signatures)),t}},asSignatureInformations:C,asSignatureInformation:S,asParameterInformations:T,asParameterInformation:w,asDefinitionResult:function(e){if(e)return l.array(e)?e.map((function(e){return k(e)})):k(e)},asLocation:k,asReferences:function(e){if(e)return e.map((function(e){return k(e)}))},asDocumentHighlights:function(e){if(e)return e.map(O)},asDocumentHighlight:O,asDocumentHighlightKind:R,asSymbolInformations:function(e,t){if(e)return e.map((function(e){return N(e,t)}))},asSymbolInformation:N,asDocumentSymbols:function(e){if(null!=e)return e.map(I)},asDocumentSymbol:I,asCommand:D,asCommands:function(e){if(e)return e.map(D)},asCodeAction:function(e){if(null!=e){var t=new s.CodeAction(e.title);return void 0!==e.kind&&(t.kind=function(e){var t,o;if(null!=e){var i=A.get(e);if(i)return i;var r=e.split(".");i=s.CodeActionKind.Empty;try{for(var a=n(r),l=a.next();!l.done;l=a.next()){var u=l.value;i=i.append(u)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}return i}}(e.kind)),e.diagnostics&&(t.diagnostics=d(e.diagnostics)),e.edit&&(t.edit=x(e.edit)),e.command&&(t.command=D(e.command)),t}},asCodeLens:P,asCodeLenses:function(e){if(e)return e.map((function(e){return P(e)}))},asWorkspaceEdit:x,asDocumentLink:M,asDocumentLinks:function(e){if(e)return e.map(M)},asFoldingRangeKind:U,asFoldingRange:V,asFoldingRanges:function(e){if(Array.isArray(e))return e.map(V)},asColor:B,asColorInformation:F,asColorInformations:function(e){if(Array.isArray(e))return e.map(F)},asColorPresentation:H,asColorPresentations:function(e){if(Array.isArray(e))return e.map(H)}}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}return e.prototype.trigger=function(e,t){var o=this;return void 0===t&&(t=this.defaultDelay),this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((function(e){o.onSuccess=e})).then((function(){o.completionPromise=void 0,o.onSuccess=void 0;var e=o.task();return o.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=setTimeout((function(){o.timeout=void 0,o.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise},e.prototype.forceDelivery=function(){if(this.completionPromise){this.cancelTimeout();var e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}},e.prototype.isTriggered=function(){return void 0!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise=void 0},e.prototype.cancelTimeout=function(){void 0!==this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)},e}();t.Delayer=n},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=o(152),s=o(138),a=o(109),l=o(101);function u(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,l.TypeDefinitionRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){u(u(e,"textDocument"),"typeDefinition").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.typeDefinitionProvider)if(!0===e.typeDefinitionProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{var o=e.typeDefinitionProvider,n=s.string(o.id)&&o.id.length>0?o.id:r.generateUuid(),i=o.documentSelector||t;i&&this.register(this.messages,{id:n,registerOptions:Object.assign({},{documentSelector:i})})}},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(l.TypeDefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(l.TypeDefinitionRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware;return a.languages.registerTypeDefinitionProvider(e.documentSelector,{provideTypeDefinition:function(e,t,i){return n.provideTypeDefinition?n.provideTypeDefinition(e,t,i,o):o(e,t,i)}})},t}(o(151).TextDocumentFeature);t.TypeDefinitionFeature=c},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=o(152),s=o(138),a=o(109),l=o(101);function u(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,l.ImplementationRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){u(u(e,"textDocument"),"implementation").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.implementationProvider)if(!0===e.implementationProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{var o=e.implementationProvider,n=s.string(o.id)&&o.id.length>0?o.id:r.generateUuid(),i=o.documentSelector||t;i&&this.register(this.messages,{id:n,registerOptions:Object.assign({},{documentSelector:i})})}},t.prototype.registerLanguageProvider=function(e){var t=this._client,o=function(e,o,n){return t.sendRequest(l.ImplementationRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,o),n).then(t.protocol2CodeConverter.asDefinitionResult,(function(e){return t.logFailedRequest(l.ImplementationRequest.type,e),Promise.resolve(null)}))},n=t.clientOptions.middleware;return a.languages.registerImplementationProvider(e.documentSelector,{provideImplementation:function(e,t,i){return n.provideImplementation?n.provideImplementation(e,t,i,o):o(e,t,i)}})},t}(o(151).TextDocumentFeature);t.ImplementationFeature=c},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=o(152),s=o(138),a=o(109),l=o(101);function u(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,l.DocumentColorRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){u(u(e,"textDocument"),"colorProvider").dynamicRegistration=!0},t.prototype.initialize=function(e,t){if(e.colorProvider){var o=e.colorProvider,n=s.string(o.id)&&o.id.length>0?o.id:r.generateUuid(),i=o.documentSelector||t;i&&this.register(this.messages,{id:n,registerOptions:Object.assign({},{documentSelector:i})})}},t.prototype.registerLanguageProvider=function(e){var t=this,o=this._client,n=function(e,n,i){var r={color:e,textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(n.document),range:o.code2ProtocolConverter.asRange(n.range)};return o.sendRequest(l.ColorPresentationRequest.type,r,i).then(t.asColorPresentations.bind(t),(function(e){return o.logFailedRequest(l.ColorPresentationRequest.type,e),Promise.resolve(null)}))},i=function(e,n){var i={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e)};return o.sendRequest(l.DocumentColorRequest.type,i,n).then(t.asColorInformations.bind(t),(function(e){return o.logFailedRequest(l.ColorPresentationRequest.type,e),Promise.resolve(null)}))},r=o.clientOptions.middleware;return a.languages.registerColorProvider(e.documentSelector,{provideColorPresentations:function(e,t,o){return r.provideColorPresentations?r.provideColorPresentations(e,t,o,n):n(e,t,o)},provideDocumentColors:function(e,t){return r.provideDocumentColors?r.provideDocumentColors(e,t,i):i(e,t)}})},t.prototype.asColor=function(e){return new a.Color(e.red,e.green,e.blue,e.alpha)},t.prototype.asColorInformations=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return new a.ColorInformation(t._client.protocol2CodeConverter.asRange(e.range),t.asColor(e.color))})):[]},t.prototype.asColorPresentations=function(e){var t=this;return Array.isArray(e)?e.map((function(e){var o=new a.ColorPresentation(e.label);return o.additionalTextEdits=t._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),o.textEdit=t._client.protocol2CodeConverter.asTextEdit(e.textEdit),o})):[]},t}(o(151).TextDocumentFeature);t.ColorProviderFeature=c},function(e,t,o){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],o=0;return t?t.call(e):{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(152),r=o(109),s=o(101);function a(e,t){if(void 0!==e)return e[t]}var l=function(){function e(e){this._client=e,this._listeners=new Map}return Object.defineProperty(e.prototype,"messages",{get:function(){return s.DidChangeWorkspaceFoldersNotification.type},enumerable:!0,configurable:!0}),e.prototype.fillInitializeParams=function(e){var t=this,o=r.workspace.workspaceFolders;e.workspaceFolders=void 0===o?null:o.map((function(e){return t.asProtocol(e)}))},e.prototype.fillClientCapabilities=function(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0},e.prototype.initialize=function(e){var t=this,o=this._client;o.onRequest(s.WorkspaceFoldersRequest.type,(function(e){var n=function(){var e=r.workspace.workspaceFolders;return void 0===e?null:e.map((function(e){return t.asProtocol(e)}))},i=o.clientOptions.middleware.workspace;return i&&i.workspaceFolders?i.workspaceFolders(e,n):n()}));var n,l=a(a(a(e,"workspace"),"workspaceFolders"),"changeNotifications");"string"==typeof l?n=l:!0===l&&(n=i.generateUuid()),n&&this.register(this.messages,{id:n,registerOptions:void 0})},e.prototype.register=function(e,t){var o=this,n=t.id,i=this._client,a=r.workspace.onDidChangeWorkspaceFolders((function(e){var t=function(e){var t={event:{added:e.added.map((function(e){return o.asProtocol(e)})),removed:e.removed.map((function(e){return o.asProtocol(e)}))}};o._client.sendNotification(s.DidChangeWorkspaceFoldersNotification.type,t)},n=i.clientOptions.middleware.workspace;n&&n.didChangeWorkspaceFolders?n.didChangeWorkspaceFolders(e,t):t(e)}));this._listeners.set(n,a)},e.prototype.unregister=function(e){var t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())},e.prototype.dispose=function(){var e,t;try{for(var o=n(this._listeners.values()),i=o.next();!i.done;i=o.next()){i.value.dispose()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this._listeners.clear()},e.prototype.asProtocol=function(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}},e}();t.WorkspaceFoldersFeature=l},function(e,t,o){"use strict";var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var r=o(152),s=o(138),a=o(109),l=o(101);function u(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var c=function(e){function t(t){return e.call(this,t,l.FoldingRangeRequest.type)||this}return i(t,e),t.prototype.fillClientCapabilities=function(e){var t=u(u(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0},t.prototype.initialize=function(e,t){if(e.foldingRangeProvider){var o=e.foldingRangeProvider,n=s.string(o.id)&&o.id.length>0?o.id:r.generateUuid(),i=o.documentSelector||t;i&&this.register(this.messages,{id:n,registerOptions:Object.assign({},{documentSelector:i})})}},t.prototype.registerLanguageProvider=function(e){var t=this,o=this._client,n=function(e,n,i){var r={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e)};return o.sendRequest(l.FoldingRangeRequest.type,r,i).then(t.asFoldingRanges.bind(t),(function(e){return o.logFailedRequest(l.FoldingRangeRequest.type,e),Promise.resolve(null)}))},i=o.clientOptions.middleware;return a.languages.registerFoldingRangeProvider(e.documentSelector,{provideFoldingRanges:function(e,t,o){return i.provideFoldingRanges?i.provideFoldingRanges(e,t,o,n):n(e,0,o)}})},t.prototype.asFoldingRangeKind=function(e){if(e)switch(e){case l.FoldingRangeKind.Comment:return a.FoldingRangeKind.Comment;case l.FoldingRangeKind.Imports:return a.FoldingRangeKind.Imports;case l.FoldingRangeKind.Region:return a.FoldingRangeKind.Region}},t.prototype.asFoldingRanges=function(e){var t=this;return Array.isArray(e)?e.map((function(e){return new a.FoldingRange(e.startLine,e.endLine,t.asFoldingRangeKind(e.kind))})):[]},t}(o(151).TextDocumentFeature);t.FoldingRangeFeature=c},function(e,t){e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var o,n=String(e),i="",r=!!t&&!!t.extended,s=!!t&&!!t.globstar,a=!1,l=t&&"string"==typeof t.flags?t.flags:"",u=0,c=n.length;u1&&("/"===h||void 0===h)&&("/"===g||void 0===g)?(i+="(?:[^/]*(?:/|$))*",u++):i+="[^/]*";else i+=".*";break;default:i+=o}return l&&~l.indexOf("g")||(i="^"+i+"$"),new RegExp(i,l)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(185),i=function(){function e(e,t){this.name=e,this.p2m=t,this.diagnostics=new Map,this.toDispose=new n.DisposableCollection}return e.prototype.dispose=function(){this.toDispose.dispose()},e.prototype.get=function(e){var t=this.diagnostics.get(e);return t?t.diagnostics:[]},e.prototype.set=function(e,t){var o=this,i=this.diagnostics.get(e);if(i)i.diagnostics=t;else{var s=new r(e,t,this.name,this.p2m);this.diagnostics.set(e,s),this.toDispose.push(n.Disposable.create((function(){o.diagnostics.delete(e),s.dispose()})))}},e}();t.MonacoDiagnosticCollection=i;var r=function(){function e(e,t,o,n){var i=this;this.owner=o,this.p2m=n,this._markers=[],this._diagnostics=[],this.uri=monaco.Uri.parse(e),this.diagnostics=t,monaco.editor.onDidCreateModel((function(e){return i.doUpdateModelMarkers(e)}))}return Object.defineProperty(e.prototype,"diagnostics",{get:function(){return this._diagnostics},set:function(e){this._diagnostics=e,this._markers=this.p2m.asDiagnostics(e),this.updateModelMarkers()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._markers},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._markers=[],this.updateModelMarkers()},e.prototype.updateModelMarkers=function(){var e=monaco.editor.getModel(this.uri);this.doUpdateModelMarkers(e)},e.prototype.doUpdateModelMarkers=function(e){e&&this.uri.toString()===e.uri.toString()&&monaco.editor.setModelMarkers(e,this.owner,this._markers)},e}();t.MonacoModelDiagnostics=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(315),i=o(311),r=o(313),s=o(314),a=o(312),l=o(121);!function(e){function t(e,t){void 0===t&&(t={});var o=new n.MonacoToProtocolConverter,l=new n.ProtocolToMonacoConverter;return{commands:new i.MonacoCommands(e),languages:new r.MonacoLanguages(l,o),workspace:new s.MonacoWorkspace(l,o,t.rootUri),window:new a.ConsoleWindow}}e.create=t,e.install=function(e,o){void 0===o&&(o={});var n=t(e,o);return l.Services.install(n),n},e.get=function(){return l.Services.get()}}(t.MonacoServices||(t.MonacoServices={}))},function(e,t,o){const n=o(534);n.setLocale=function(e){"function"==typeof e.default?n.Msg=Object.assign(n.Msg,e.default()):n.Msg=Object.assign(e,n.Msg)()},n.setLocale(o(535)),n.Blocks=Object.assign(n.Blocks,o(536)(n)),n.JavaScript=o(537)(n),n.Lua=o(538)(n),n.Dart=o(539)(n),n.PHP=o(540)(n),n.Python=o(541)(n),e.exports=n},function(module,exports){module.exports=function(){"use strict";var $jscomp=$jscomp||{};$jscomp.scope={};var COMPILED=!0,goog=goog||{};goog.global=this||self,goog.isDef=function(e){return void 0!==e},goog.isString=function(e){return"string"==typeof e},goog.isBoolean=function(e){return"boolean"==typeof e},goog.isNumber=function(e){return"number"==typeof e},goog.exportPath_=function(e,t,o){e=e.split("."),o=o||goog.global,e[0]in o||void 0===o.execScript||o.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)!e.length&&goog.isDef(t)?o[n]=t:o=o[n]&&o[n]!==Object.prototype[n]?o[n]:o[n]={}},goog.define=function(e,t){var o=t;if(!COMPILED){var n=goog.global.CLOSURE_UNCOMPILED_DEFINES,i=goog.global.CLOSURE_DEFINES;n&&void 0===n.nodeType&&Object.prototype.hasOwnProperty.call(n,e)?o=n[e]:i&&void 0===i.nodeType&&Object.prototype.hasOwnProperty.call(i,e)&&(o=i[e])}return o},goog.FEATURESET_YEAR=2012,goog.DEBUG=!1,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");if(!COMPILED&&goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){if(!COMPILED){delete goog.implicitNamespaces_[e];for(var o=e;(o=o.substring(0,o.lastIndexOf(".")))&&!goog.getObjectByName(o);)goog.implicitNamespaces_[o]=!0}goog.exportPath_(e,t)},goog.getScriptNonce=function(e){return e&&e!=goog.global?goog.getScriptNonce_(e.document):(null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(e)?e:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");if(goog.moduleLoaderState_.moduleName=e,!COMPILED){if(goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');delete goog.implicitNamespaces_[e]}},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){if(!COMPILED){if(e in goog.loadedModules_)return goog.loadedModules_[e].exports;if(!goog.implicitNamespaces_[e])return null!=(e=goog.getObjectByName(e))?e:null}return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var e=goog.global.$jscomp;return!!e&&("function"==typeof e.getCurrentModulePath&&!!e.getCurrentModulePath())},goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInGoogModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(e){if(!COMPILED){if(!goog.isInEs6ModuleLoader_())throw Error("goog.declareModuleId may only be called from within an ES6 module");if(goog.moduleLoaderState_&&goog.moduleLoaderState_.moduleName)throw Error("goog.declareModuleId may only be called once per module.");if(e in goog.loadedModules_)throw Error('Module with namespace "'+e+'" already exists.')}if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=e;else{var t=goog.global.$jscomp;if(!t||"function"!=typeof t.getCurrentModulePath)throw Error('Module with namespace "'+e+'" has been loaded incorrectly.');t=t.require(t.getCurrentModulePath()),goog.loadedModules_[e]={exports:t,type:goog.ModuleType.ES6,moduleId:e}}},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},COMPILED||(goog.isProvided_=function(e){return e in goog.loadedModules_||!goog.implicitNamespaces_[e]&&goog.isDefAndNotNull(goog.getObjectByName(e))},goog.implicitNamespaces_={"goog.module":!0}),goog.getObjectByName=function(e,t){for(var o=e.split("."),n=t||goog.global,i=0;i>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if("function"==typeof e.clone)return e.clone();for(var o in t="array"==t?[]:{},e)t[o]=goog.cloneObject(e[o]);return t}return e},goog.bindNative_=function(e,t,o){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,o){if(!e)throw Error();if(2{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')})),a("es7",(function(){return b("2 ** 2 == 4")})),a("es8",(function(){return b("async () => 1, true")})),a("es9",(function(){return b("({...rest} = {}), true")})),a("es_next",(function(){return!1})),{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(e,t){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var o=this.createRequiresTranspilation_();this.requiresTranspilation_=o.map,this.transpilationTarget_=this.transpilationTarget_||o.target}if(e in this.requiresTranspilation_)return!!this.requiresTranspilation_[e]||!(!goog.inHtmlDocument_()||"es6"!=t||"noModule"in goog.global.document.createElement("script"));throw Error("Unknown language mode: "+e)},goog.Transpiler.prototype.transpile=function(e,t){return goog.transpile_(e,t,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(e){return e.replace(/<\/(SCRIPT)/gi,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={},this.idToPath_={},this.written_={},this.loadingDeps_=[],this.depsToLoad_=[],this.paused_=!1,this.factory_=new goog.DependencyFactory(goog.transpiler_),this.deferredCallbacks_={},this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(e,t){function o(){n&&(goog.global.setTimeout(n,0),n=null)}var n=t;if(e.length){for(var i=[],r=0;r<\/script>",t.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(n):n)}else{var i=t.createElement("script");i.defer=goog.Dependency.defer_,i.async=!1,i.type="text/javascript",(n=goog.getScriptNonce())&&i.setAttribute("nonce",n),goog.DebugLoader_.IS_OLD_IE_?(e.pause(),i.onreadystatechange=function(){"loaded"!=i.readyState&&"complete"!=i.readyState||(e.loaded(),e.resume())}):i.onload=function(){i.onload=null,e.loaded()},i.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path,t.head.appendChild(i)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."),e.loaded()):e.pause()},goog.Es6ModuleDependency=function(e,t,o,n,i){goog.Dependency.call(this,e,t,o,n,i)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(e){if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?e.loaded():e.pause();else if(goog.inHtmlDocument_()){var t=goog.global.document,o=this;if(goog.isDocumentLoading_()){var n=function(e,o){var n=o?'